[whatwg] Handling unknown 'duration's

Robert O'Callahan robert at ocallahan.org
Fri Dec 17 18:34:19 PST 2010


http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-durationsays:

The duration attribute must return the time of the end of the media
resource<http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-resource>,
> in seconds, on the media timeline<http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-timeline>.
> If no media data<http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-data>is available, then the attributes must return the Not-a-Number (NaN) value.
> If the media resource<http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-resource>is known to be unbounded (e.g. a streaming radio), then the attribute must
> return the positive Infinity value.
>

What if the duration is not currently known?

I think in general it will be very difficult for a user-agent to know that a
stream is unbounded. In Ogg or WebM a stream might not contain an explicit
duration but still eventually end. Maybe it would make more sense for the
last sentence to read "If the media resource is not known to be bounded,
..."

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101218/9808f5d5/attachment.htm>


More information about the whatwg mailing list