Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-06-09

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.

Tags


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links