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

media element seek algorithm: don't throw

From: Simon Pieters <simonp@opera.com>
Date: Tue, 02 Feb 2010 14:14:04 +0100
To: "public-html@w3.org" <public-html@w3.org>
Message-ID: <op.u7h4dndcidj3kv@zcorpandell.linkoping.osa>
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.

-- 
Simon Pieters
Opera Software
Received on Tuesday, 2 February 2010 13:14:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:01 GMT