views:

50

answers:

1

Does anybody uses jMediaelement (http://protofunc.com/jme/index.html) for HTML5 videos? I am wondering how to display a youtube video. I see there's a demo on the homepage of jMediaelement, but the source code is not provided (clever!). Any idea how to? Thanks

+1  A: 

hi tiago,

the starter-code of all demos are provided as inline-javascript. If you download the dev-bundle package, there is also a youtube demo, including a playlist example: demos/more-examples/9-playlist-youtube.html

All you have to do is:

  1. include the javascript

  2. add your video tag: <video src="path-to-youtube-site/watch?v=siOHh0uzcuY"></video>

  3. call the js method on domready:

// either (for predefined non-stylable controls): $('video').jmeEmbed(); //try this first if you have any problems

// or (if you want to use custom stylable and writeable controls): $('video').jmeControl();

// or (if you want to style, but not write): $('video').jmeEmbedControls();

Note also that, you have to add your swf/html to the local trusted sandbox and/or test in an http-enviroment: http://protofunc.com/jme/documentation/documentation-faq.html

regards alex

alexander farkas