HTML 5 Video Javascript Wrapper
The Metavid blog has a post about the HTML 5 Video element and how it can be supported in browsers that don't have native support for <video>.
When their Javascript code, mv_embed, is included in a page it goes through the DOM and replaces all <video> elements with whatever playback method the client browser supports. If it supports HTML 5 <video> then it does nothing.
The replaced element is represented by a Javascript object with as much of the HTML 5 video Javascript API implemented as supported by the particular playback method. In this way code can be written to the standard API which works across all browsers. Very nice!
I'm making good progress on the Firefox implementation of native Ogg Theora playback. Today I got audio working by decoding the Vorbis stream within the video and using the portaudio library to control the sound hardware. I had multiple videos playing on a single page, each with sound, mixing well.
Categories: firefox, ogg
When their Javascript code, mv_embed, is included in a page it goes through the DOM and replaces all <video> elements with whatever playback method the client browser supports. If it supports HTML 5 <video> then it does nothing.
The replaced element is represented by a Javascript object with as much of the HTML 5 video Javascript API implemented as supported by the particular playback method. In this way code can be written to the standard API which works across all browsers. Very nice!
I'm making good progress on the Firefox implementation of native Ogg Theora playback. Today I got audio working by decoding the Vorbis stream within the video and using the portaudio library to control the sound hardware. I had multiple videos playing on a single page, each with sound, mixing well.
Categories: firefox, ogg
Labels: mozilla

5 Comments:
Nice to hear your work on video is coming along.
Actually the metavid mv_embed sample page ( http://metavid.ucsc.edu/wiki_dev/mv_embed/sample_page.php ) throws a JavaScript error when trying to get playback started in Firefox 2.0.0.4 on my rig - but I guess once minor stuff like this is sorted out mv_embed for sure is a great way to help video adoption.
maikmerten
maikmerten: Its been fixed :P... problems still remain with safari though if anyone wants to help :)
Doesn't the VIDEO element support ALT data in the middle?
Well, shouldn't the <video> element be replaced on the server side? I believe that it'd be much more effective.
It would still need client side javascript to query the browser to see what video playback method it supported.
Post a Comment
<< Home