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

[whatwg] Start position of media resources

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 30 Apr 2009 06:21:01 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0904300619510.829@hixie.dreamhostps.com>
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.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 29 April 2009 23:21:01 UTC

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