MediaElement.js - HTML5 Video & Audio Player
How to make it work with YouTube? (5 posts)

    Posted 3 years ago #

    WordPress 3.5
    mediaElement.js 2.9.1

    Has anyone gotten this to work with YouTube or Vimeo? I've tried everything I can think of and it just does not play YouTube videos. The solution provided here no longer works either. Has anyone gotten this to work with YouTube?


  2. drcrowley99
    Posted 3 years ago #

    Use a simple <iframe> directive:

    <iframe width="560" height="315" src="http://www.youtube.com/embed/oHAjPO-5vbM" frameborder="0" allowfullscreen></iframe>

    Make sure that you have the "embed" link from youtube, not the url of the webpage. You can see the video playing at http://www.eurotans.com (scroll down the screen)

    Maybe you can help me with my problem. I have a different video that I'm hosting on my site server. I can't get it to work on firefox, but it works on chrome, IE9, android and Iphone. Can you help me with this?

  3. ZeroGravity
    Posted 3 years ago #

    @drcrowley99 that will work but it isn't using the plugin from what I can see on your site.

    I have also tried every combination of options and YouTube links I can think of in the shortcode but cannot get the YouTube video to display. I just get a black box with a "Download File" link that links to the current page. This is what I currently have:

    [mejsvideo src="http://www.youtube.com/watch?v=mtk5Ej-xLsM" type="video/youtube" width="570" height="321"]

    This would be absolutely perfect for what I have in mind. I have two instances of the player that interact. When one starts the other stops. But unless it works with YouTube I can't use it.Sigh....

  4. ZeroGravity
    Posted 3 years ago #

    Using a hook I added the code for YouTube example from the website and it worked.

    <video width="640" height="360" id="player1" preload="none">
        <source type="video/youtube" src="http://www.youtube.com/watch?v=nOEw9iiopwI" />

    Just need to get mediaelement-js-wp.php to output the code.

  5. ddhservices
    Posted 3 years ago #

    Does anyone know if the above solution witl work with Vimeo.com ?

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MediaElement.js - HTML5 Video & Audio Player
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic