This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html Multipage: http://www.whatwg.org/C#fatal-decode-error Complete: http://www.whatwg.org/c#fatal-decode-error Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/ Comment: readyState cannot be HAVE_NOTHING in "If the media data is corrupted" Posted from: 83.218.67.123 User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.18 Safari/537.36 OPR/23.0.1528.0 (Edition Developer)
"Fatal errors in decoding the media data that occur after the user agent has established whether the current media resource is usable" means that readyState has already reached HAVE_METADATA, since that's where it says "This indicates that the resource is usable." That makes the HAVE_NOTHING case unreachable, and all that will remain is "Set the element's networkState attribute to the NETWORK_IDLE value." This is similar to a bug for the network case in 2011: https://www.w3.org/Bugs/Public/show_bug.cgi?id=12598
One caveat here is that the error event is fired synchronously, so the event handler could actually call load() or otherwise cause readyState to revert to HAVE_NOTHING, but when these steps were written the event was async so that's not the reason things are the way they are. Please also consider setting readyState before firing the event for both the network and decode error case, since otherwise networkState may not accurate reflect whatever the error event handler does.
(In reply to Philip Jägenstedt from comment #1) > > That makes the HAVE_NOTHING case unreachable, and all that will remain is > "Set the element's networkState attribute to the NETWORK_IDLE value." Fixed. (In reply to Philip Jägenstedt from comment #2) > > Please also consider setting readyState before firing the event for both the > network and decode error case, since otherwise networkState may not accurate > reflect whatever the error event handler does. I assume you mean networkState, not readyState. Fixed. Let me know if this breaks something.
Checked in as WHATWG revision r8726. Check-in comment: <video>: Remove some redundant prose, and change when networkState is updated with respect to 'error' events http://html5.org/tools/web-apps-tracker?from=8725&to=8726
I've reviewed the changes and they LGTM. Blink already does what the spec now says in these steps, modulo event timing. (It queues tasks to fire rather than firing as part of these algorithms.)