<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26133</bug_id>
          
          <creation_ts>2014-06-18 09:48:29 +0000</creation_ts>
          <short_desc>readyState cannot be HAVE_NOTHING in &quot;If the media data is corrupted&quot;</short_desc>
          <delta_ts>2014-10-08 13:48:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#fatal-decode-error</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107994</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-06-18 09:48:29 +0000</bug_when>
    <thetext>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 &quot;If the media data is corrupted&quot;

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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107997</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-06-18 11:04:24 +0000</bug_when>
    <thetext>&quot;Fatal errors in decoding the media data that occur after the user agent has established whether the current media resource is usable&quot; means that readyState has already reached HAVE_METADATA, since that&apos;s where it says &quot;This indicates that the resource is usable.&quot;

That makes the HAVE_NOTHING case unreachable, and all that will remain is &quot;Set the element&apos;s networkState attribute to the NETWORK_IDLE value.&quot;

This is similar to a bug for the network case in 2011:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=12598</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107999</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-06-18 11:21:06 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110731</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-08-28 20:50:13 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #1)
&gt; 
&gt; That makes the HAVE_NOTHING case unreachable, and all that will remain is
&gt; &quot;Set the element&apos;s networkState attribute to the NETWORK_IDLE value.&quot;

Fixed.


(In reply to Philip Jägenstedt from comment #2)
&gt; 
&gt; Please also consider setting readyState before firing the event for both the
&gt; network and decode error case, since otherwise networkState may not accurate
&gt; reflect whatever the error event handler does.

I assume you mean networkState, not readyState. Fixed. Let me know if this breaks something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110733</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-08-28 20:53:21 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8726.
Check-in comment: &lt;video&gt;: Remove some redundant prose, and change when networkState is updated with respect to &apos;error&apos; events
http://html5.org/tools/web-apps-tracker?from=8725&amp;to=8726</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112823</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-10-08 13:48:31 +0000</bug_when>
    <thetext>I&apos;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.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>