Bluish Coder

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


2011-08-08

Temporal Media Fragment Support in Firefox

The W3C has a Media Fragments Working Group whose mission is to specify temporal and media fragments in the Web using URI's. The draft specification goes through in detail how these fragments work. I recently became a member of the working group and I've been working on adding support for the temporal dimension portion of the specification to Firefox.

In the most basic form you can specify a start time and an end time in the fragment part of a URI in an HTML video or audio element. For example:

<video src='/mediafrag/AudioAPI.webm#t=50,100'></video>

The '#t' portion of the URI identifies the fragment as being a temporal media fragment. In this example '50,100' means start the video at a current time of 50 seconds, and stop playing at 100 seconds. There are various other formats for the temporal media fragment defined in the specification. Examples can be seen in the UA Test Cases.

Development of this feature is being done in bug 648595. I've done test builds of the first iteration of the patch and they are available at my Firefox media fragment test builds page. The page has builds, an example, and a list of limitations which are currently:

  • Temporal syntax only. This means no spatial or track dimensions.
  • NPT time support only. No SMPTE time codes or Wall-clock time codes.
  • When changing the media fragment portion of a URL the media is not immediately updated. You need to refresh the page to see the change. This is most noticeable when directly navigating to the video and adding or changing a fragment.
  • The user interface for identifying the fragment in the standard controls is ugly and needs polish.
  • The HTML standard includes an 'initialTime' attribute for obtaining the start time. There is no way to obtain an end time so I've exposed a 'mozFragmentEnd' attribute on the video DOM object.

Tags


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


Tags

Archives
Links