Bluish Coder

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


2007-12-08

New <video> enabled experimental Firefox builds

I've uploaded new builds of Firefox with experimental support for the WHATWG <video> element. They are (compiled from this git commit):

The git repository has been updated with the code for this build.

Note that the code in these builds, and the git repository, is advanced from that in the patch attached to the video element bugzilla entry. That code can be accessed from git via the patch11 tag.

The usual disclaimer with the builds I provide applies.

Be aware that these are builds from a random point in the Mozilla CVS tree, with the Video patch applied. I don't guarantee they'll work for much more than demonstrating video support and it's very likely to contain bugs. That said, I run these builds often.

Two main additions with this build. The first is fixing the annoying bug whereby leaving a page that is playing video would leave the sound running in the background. This was due to the 'bfcache' keeping the page around in case the user hits the back or forward buttons. The video is effectively paused now when the page is in the bfcache.

The second is preliminary support for the <source> element, which can be used to provide a list of media resources, with mime types, and the browser selects out of the list the media resource to play based on what it supports. This initial implementation only supports a 'type' attribute set to 'video/ogg'. What this will let you do though, is add a source element for an MP4 encoding, and one for an Ogg encoding. When played on Firefox the Ogg version will play, and a browser that currently doesn't support Ogg but supports MP4 can choose to play that instead.

Issues I have partial fixes for but haven't yet made it into the main branch of the git repository, and not in these builds are:

  1. Sound support on Linux is patchy. I'm using sydney audio's OSS support which has issues when multiple devices open /dev/dsp. This can occasionally affect synchronisation of the video.
  2. There is no buffering for network loads. The video plays immediately so on a slow pipe or large video the playback will stutter. You can pause the video to let the download catch up but there is no progress indication yet. This can make performance look worse than it is in bandwidth constrained environments.
  3. Seeking forward and back in the stream. There is some support, but it's a work in progress and quite broken.

You might notice that full page zoom works in this build. And it works with videos. You can zoom a page and any videos on the page are zoomed. You can test this with Ctrl+ (Apple-+ on the Mac).

Test videos are available at my test page, or Opera's page.

There are sites using the <video> right now.

The Metavid project has support for the <video> element. If you look at the videos in a <video> enabled browser, the player is the interface provided with the 'controls' attribute set. For example, Senate Proceeding 11-16-07. Nice job, Metavid, and thanks for using <video>!

The Wikimedia video's seems to have experimental support for it. Unfortunately the test to see if the video element is supported appears to be done last, so usually the Java applet, etc is found first. You can get around this by setting a cookie. When the Wikimedia video page open, enter this in the URL bar:

javascript:wgOggPlayer.setCookie('ogg_player', 'videoElement', 7*86400*1000, false, false, false, false)

Remove it by deleting the 'commons.wikimedia.org' cookie if you want to go back to the default ordering of selections.

You'll notice some issues, which is probably why it's currently right at the end of the chain. Clicking on the video picture and pressing play works fine. But clicking the play button on the main page listing all the videos does not correctly display the video. I'll look into what's causing this.

If you know of any other <video> supported sites, please let me know in the comments.

I'll be attending the W3C Video on the Web Workshop in San Jose on the 12th and 13th of December. I fly out from Auckland on the 9th and leave San Francisco on the 16th. If you're in the area and want to catch up, let me know.

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