Bluish Coder

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


2008-10-21

Video Element Update

Some updates to the video element have landed and are now in the Firefox nightly builds. Bug 449159 was landed which refactors the Ogg backend to improve stability and add seeking support. Some of the changes include:

  • Improved stability. Deadlocks and crashes involving shutdown have been fixed.
  • Improved performance. CPU usage of video playback is better. There were problems that would result in the CPU usage pegging at 100% at times, especially after playback. These have been resolved.
  • After a video has completed playing, calling the play() method, or using the built in controls, will now restart playback.
  • The totalBytes DOM attribute is implemented.
  • Seeking is supported in certain cases. If the playback is from a local file, or a server that supports HTTP byte ranges, then seeking should work. There is no UI yet, but setting the currentTime attribute to a floating point value representing the number of seconds to seek should work. A 'seeking' event is raised when seek starts, and a 'seeked' event is raised when seeking completes.
  • Playback of video and audio would miss a portion of the end of the file. This was especially noticeable on small audio samples. Now files should play back completely.

My video test page has byte range support if you want to test seeking out. Since there's no user interface I recommend using the JavaScript Shell bookmarklet and interact with the video from JavaScript. Here's an example interaction:

var v = document.getElementsByTagName("video")[0];
v.play()
v.addEventListener("seeked", function() { print('seek completed!'); }, true);

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