• Resolved Hirusha Cooray

    (@hirushacooray)


    Hi,

    When users copy and paste a video URL (eg: YouTube) it doesn’t display the preview of the video. How to enable this feature?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    That is referred to as oEmbed, and it works with any WP post, even those that are submitted via frontend. So with that in mind, are you able to add video to regular WP Posts?

    Thread Starter Hirusha Cooray

    (@hirushacooray)

    Yes. it’s works fine on back-end. But not working on front-end.

    Plugin Author Jeff Starr

    (@specialk)

    Not sure, but it could be a theme-related issue. Have you tried switching to one of the default WP themes (like Twenty Nineteen, et al). That would be the next thing I would try.

    Thread Starter Hirusha Cooray

    (@hirushacooray)

    Hi Jeff,

    yes. I have already tried but it didn’t work. So, I think there is no theme or plugin conflict. I found this below code and it’s works. but the problem is it’s only works when a user is logged in. (Administrator, Subscriber or any role). If a user is not logged in, then it’s not work.

    add_action( 'wp_enqueue_scripts', function() {
    	wp_enqueue_script( 'mce-view' );
    });

    when I’m not logged in, I can see this JS error in the console.

    Uncaught TypeError: Cannot read property 'id' of undefined at N.d.initialize (mce-view.min.js?ver=5.1.1:1)

    Any help will be much appreciated.

    Thanks

    Plugin Author Jeff Starr

    (@specialk)

    Thanks for the infos but I am unable to replicate the issue on default WP. If you want to share specific steps to recreate the error on a default WP setup (e.g. default theme, plugin, settings, etc.), I will investigate further asap. Also feel free to post again with any additional infos, clues, questions, etc. Thank you.

    • This reply was modified 5 years, 11 months ago by Jeff Starr.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show Video Preview in Front-end.’ is closed to new replies.