[Bug 12982] <video> canplay and canplaythrough should only fire once, when the new readyState is HAVE_FUTURE_DATA and HAVE_ENOUGH_DATA for the first time, respectively.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12982

--- Comment #4 from Matthew Gregan (:kinetik) <kinetik@flim.org> 2011-06-17 22:18:58 UTC ---
Firefox interprets the spec as allowing canplay/canplaythrough to be fired
multiple times as readyState changes allow.  This interpretation is useful
because canplaythrough is fired optimistically based on estimated transfer
completion time.  This estimate may become invalid if, for example, network
conditions or the bitrate of the media changes.  It is useful to signal this
change in state by moving to and from HAVE_ENOUGH_DATA (and firing the related
events) as conditions change.

Seeking to a new location in the media may result in a previous canplaythrough
estimate becoming invalid if the seek location is in an unbuffered segment of
the media that requires a new network request to transfer or significant
decoding work.  It then becomes more consistent (and therefore easier to code
against) if these events are also fired when seeking to a range that is already
buffered.

The example code in comment 3 is nonsensical in my opinion and therefore does
not provide a valid reason to change the spec.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 17 June 2011 22:19:00 UTC