[resolved] What's the current BEST way to embed Youtube & Flash Videos? (4 posts)

  1. Shapeshifter 3
    Posted 2 years ago #

    I've been using the [embed][/embed] shortcodes to post music videos for the past 2 years.

    Should I stop using them now and use [video][/video] shortcodes in the same fashion, OR a different fashion?

    I tried doing this: [video src="YouTube Music Video URL"] and it didn't work. I read this page: http://codex.wordpress.org/Video_Shortcode, but couldn't make sense of how to use it for a YouTube video.

    Can anybody help me out?

  2. tnorth12
    Posted 2 years ago #

    Are you embedding files hosted on other servers or locally on the web server running your site? I believe the video short codes are for use with locally hosted media files that require a player. I may be wrong about that.

    YouTube's embed code (Share > Embed below each video) provides all the benefits of YouTube's platform delivered to your page.

  3. Shapeshifter 3
    Posted 2 years ago #


    Thank you for your response. Sorry, it took so long to get back to you.

    My embedded files are hosted locally on the same shared web server running my site. After reading the above WordPress Codex on Video Shortcodes, I was wondering if the old [embed][/embed] shortcodes were not as versatile as the new [video][/video] shortcodes when using different file formats.

    I currently use YouTube, Vimeo, and WordPress TV videos and would like to use a singular embedding code that accurately displays all three formats without problems.

    I'm currently tinkering with these two WordPress Plugins:
    and wondering if they are even necessary since the WordPress Core now includes this plugin: http://wordpress.org/plugins/media-element-html5-video-and-audio-player/ .

    What I'm trying to do is arrive at the most efficient method possible when embedding videos of different file formats (including HTML5 with a Flash Player fallback), and the least amount of display problems possible. If there is some way to do that without using plugins...I'm all for it.

    Any suggestions?

  4. adarshkr
    Posted 1 year ago #

    Best way to include the YouTube video is to add iframe code instead of [embed]

    <iframe width="736" height="414" src="//www.youtube.com/embed/DzAyrxwYslA" frameborder="0" allowfullscreen></iframe>

    You can find <iframe> code on youtube itself..

    just open the video which you want to include and then click on share, then click on embed. There you will get the Specific <iframe> code, Copy and paste it wherever you want display it..


Topic Closed

This topic has been closed to new replies.

About this Topic