[whatwg] Value of media.currentTime immediately after setting

Hi,

The media seek algorithm (4.8.10.9) states that the current playback
position should be set to the new playback position during the asynchronous
part of the algorithm, just before the seeking event is fired.  This implies
the following behaviour:

0. Initial load state (currentTime reports 0)
1. currentTime set to 20 by script
2. currentTime continues to report 0
3. Script returns to main loop
4. "seeking" event raised
5. currentTime reports 20 in "seeking" event handler

This is the behaviour in Firefox 4.  In every other browser I tested (Chrome
10, Opera 11, Safari 5, and Internet Explorer 9), the following behaviour is
observed:

2. currentTime immediately reports 20

This doesn't seem to be required by the current wording of the spec (in
fact, it seems to be incorrect behaviour), but I think this behaviour is
more intuitive, as it seems unusual that currentTime returns to the old
value immediately after being set and remains that way until the "seeking"
event fires.

Does it make sense to update the seeking algorithm to reflect how
non-Firefox browsers are implementing this?  My proposal is, effectively, to
take steps 5 through 8 and insert them before step 4.

I've uploaded a testcase to http://flim.org/~kinetik/seek-627139.html if
anyone's curious.

Thanks,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    kinetik at flim.org

Received on Wednesday, 19 January 2011 19:20:09 UTC