[whatwg] Small inconsistencies in video events

Robert O'Callahan robert at ocallahan.org
Sun Feb 8 18:22:31 PST 2009


I was just writing some tests for various events and noticed that there's a
slight weirdness in the events fired for readyState transitions. If
readyState changes from HAVE_CURRENT_DATA to HAVE_FUTURE_DATA, the element
is then potentially playing, and then readyState changes to
HAVE_ENOUGH_DATA, we fire "canplay", "playing", "canplay" again,
"canplaythrough" and "playing" again. OTOH if readyState changes from
HAVE_CURRENT_DATA directly to HAVE_ENOUGH_DATA and the element is
potentially playing, then we fire "canplay", "canplaythrough", and
"playing".

I think we should fire the same set of events in the same order whether we
transition through HAVE_FUTURE_DATA or not. So, I suggest that a transition
from HAVE_FUTURE_DATA to HAVE_ENOUGH_DATA should not fire "canplay" or
"playing". Also, a transition from HAVE_CURRENT_DATA to HAVE_ENOUGH_DATA
should fire "canplaythrough" after we've handled autoplay and potentially
fired "playing".

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090209/93228aa6/attachment.htm>


More information about the whatwg mailing list