[whatwg] Video element and duration attribute

Conrad Parker conrad at metadecks.org
Wed Nov 19 01:40:05 PST 2008

2008/11/17 Ian Hickson <ian at hixie.ch>:
> It seems like a bad idea, since if we do this we'd have to define all
> kinds of error handling for when the author says the clip is 60 seconds
> long and then seeks to second 50 when the clip is really 40 seconds long,
> etc.


The likely use cases that could be perceived for this attribute are to
allow the HTML author to:
  * specify a shorter duration to be played than what is actually
available in the media
  * hint to the browser what the actual duration of the media is, for
formats that don't say so up-front in media or HTTP headers
  * hint to the user how long the content is before they hit "play"
and begin streaming (as displayed in the browser's normal timeline,
without adding extra text to the surrounding page).

I think these use cases are better handled with media fragments, which
give a more precise hint about the subview being played.

As for Ogg, we should (from xiph.org, not whatwg) encourage use of
X-Content-Duration. I've make a note to add that to oggz-chop's
response headers ...


More information about the whatwg mailing list