W3C home > Mailing lists > Public > public-html@w3.org > February 2010

Re: media element seek algorithm: don't throw

From: Simon Pieters <simonp@opera.com>
Date: Tue, 02 Feb 2010 16:52:38 +0100
To: "Eric Carlson" <eric.carlson@apple.com>, HTMLwg <public-html@w3.org>
Message-ID: <op.u7ibp0akidj3kv@zcorpandell.linkoping.osa>
On Tue, 02 Feb 2010 16:27:16 +0100, Eric Carlson <eric.carlson@apple.com>  

> On Feb 2, 2010, at 5:14 AM, Simon Pieters wrote:
>> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#seeking
>> "4. If the (possibly now changed) new playback position is not in one  
>> of the ranges given in the seekable attribute, then the user agent must  
>> raise an INDEX_SIZE_ERR exception (if the seek was in response to a DOM  
>> method call or setting of an IDL attribute), and abort these steps."
>> It's annoying to use try/catch every time you set currentTime. It's  
>> nicer to check seekable and then set currentTime. However, even if you  
>> check seekable there's no guarentee that currentTime won't throw  
>> because the cache might be cleared between the check and the setting.  
>> Therefore we think it's better to silently abort the algorithm instead  
>> of throwing.
>   I agree, throwing for an out-of-range seek is unexpected if the  
> questions we have gotten from developers is any indication. I think it  
> makes more sense to clamp the time value to the maximum seekable time.

Hmm, good point. It seems better to seek to the closest seekable time than  
to do nothing.

Simon Pieters
Opera Software
Received on Tuesday, 2 February 2010 15:52:48 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:58 UTC