W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] Start position of media resources

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 30 Apr 2009 18:47:46 +1200
Message-ID: <11e306600904292347u128af26bva8e900452d0419b@mail.gmail.com>
On Thu, Apr 30, 2009 at 6:21 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Thu, 30 Apr 2009, Robert O'Callahan wrote:
> > On Thu, Apr 30, 2009 at 1:04 PM, Ian Hickson <ian at hixie.ch> wrote:
> > >
> > > I have left the spec as is (except for adding startTime), which means
> > > that currentTime can be greater than duration if startTime is not
> > > zero.
> >
> > I think it would be safer to have the invariant that 0 <= currentTime <=
> > duration. Most resources will probably have startTime==0 so authors will
> > write scripts expecting these invariants, and their scripts will break
> > when confronted with unusual resources with startTime>0.
> >
> > So I think a safer design would be to interpret currentTime as relative
> > to the startTime, perhaps renaming startTime to 'timeOffset' instead?
>
> I considered that, but it seems that in the streaming video ("DVR-like")
> case, in the steady state where the data in the buffer is being thrown
> away at the same rate as the video is being played you'd end up in a weird
> position of the currentTime not changing despite the video playing, which
> would likely be even more confusing.
>

Why should the "start time" change in this case? I assume you mean the
server is streaming video and does not support sending any data except the
data for the current time, and the UA is caching a window of data. Then I
would expect the element to expose a fixed start time (the time, relative to
the start of the resource, at which the UA first opened the stream). As the
stream plays, 'duration' would increase and the 'seekable' and 'buffered'
TimeRanges would change to reflect the data the UA has in its buffer.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090430/c6c4817f/attachment-0001.htm>
Received on Wednesday, 29 April 2009 23:47:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC