W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2008

[whatwg] HTMLMediaElement buffered/bufferedBytes

From: Philip Jägenstedt <philipj@opera.com>
Date: Tue, 10 Jun 2008 12:24:04 +0200
Message-ID: <1213093444.6664.35.camel@nog.bredbandsbolaget.se>
Hi,

I'm currently implementing more of <audio> and <video> (in Opera) and
will probably have quite a lot of questions/comments during the coming
months. If this is not the best place for such discussion, please point
out where I need to be.

Today's issue:

The name of the buffered/bufferedBytes attributes imply that these
ranges are buffered on disk or in memory, so that they will not have to
be re-downloaded. However, the description reads "the ranges of the
media resource, if any, that the user agent has downloaded, at the time
the attribute is evaluated."

This is not the same things, as we will not be able to buffer large
files on memory-limited devices. Instead, we might only buffer 1 MB of
data around the current playback point, or some other scheme.

I would suggest that buffered/bufferedBytes be taken to mean exactly
what they sound like by changing the description to something like:
(differences marked *like this*)

The buffered attribute must return a static normalized TimeRanges object
that represents the ranges of the media resource, if any, that the user
agent has *buffered*, at the time the attribute is evaluated.

Note: Typically this will be a single range anchored at the zero point,
but if, e.g. the user agent uses HTTP range requests in response to
seeking, then there could be multiple ranges. *There is no guarantee
that all buffered ranges will remain buffered, due to storage/memory
constraints or other reasons.*

The intention is that only ranges which are actually internally buffered
should be exposed in the buffered/bufferedBytes ranges, whereas the
current phrasing implies that all ranges which have at some point been
downloaded/buffered should be included.

Admittedly, this makes the attributes useless for determining how much
of the resource has been downloaded, but if this is needed I might
suggest the attributes downloaded/downloadedBytes instead. The
usefulness of the buffered attribute (in my current interpretation) is
not obvious to me at all, I would appreciate some use cases if possible.

--
Philip J?genstedt
?Opera Software
Received on Tuesday, 10 June 2008 03:24:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:41 UTC