This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26133 - readyState cannot be HAVE_NOTHING in "If the media data is corrupted"
Summary: readyState cannot be HAVE_NOTHING in "If the media data is corrupted"
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-18 09:48 UTC by contributor
Modified: 2014-10-08 13:48 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-06-18 09:48:29 UTC
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)
Comment 1 Philip Jägenstedt 2014-06-18 11:04:24 UTC
"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
Comment 2 Philip Jägenstedt 2014-06-18 11:21:06 UTC
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.
Comment 3 Ian 'Hixie' Hickson 2014-08-28 20:50:13 UTC
(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.
Comment 4 contributor 2014-08-28 20:53:21 UTC
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
Comment 5 Philip Jägenstedt 2014-10-08 13:48:31 UTC
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.)