media element seek algorithm: don't throw

"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 UTC