Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (3) <video>: Remove some redundant prose, and change when netw…
…orkState is updated with respect to 'error' events

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26133
Affected topics: Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@8726 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 28, 2014
1 parent df1f5d1 commit a56ce89
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 69 deletions.
39 changes: 15 additions & 24 deletions complete.html
Expand Up @@ -22647,32 +22647,23 @@ <h5 id=loading-the-media-resource>4.8.14.5 Loading the media resource</h5>

<ol><li><p>The user agent should cancel the fetching process.<li><p>Set the <code id=loading-the-media-resource:dom-media-error-3><a href=#dom-media-error>error</a></code> attribute to a new
<code id=loading-the-media-resource:mediaerror-2><a href=#mediaerror>MediaError</a></code> object whose <code id=loading-the-media-resource:dom-mediaerror-code-2><a href=#dom-mediaerror-code>code</a></code> attribute
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_network><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-15>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-error-2><a href=#event-media-error>error</a></code> at
the <a href=#media-element id=loading-the-media-resource:media-element-45>media element</a>.<li><p>Set the element's <code id=loading-the-media-resource:dom-media-networkstate-16><a href=#dom-media-networkstate>networkState</a></code> attribute
to the <code id=loading-the-media-resource:dom-media-network_idle-6><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.<li><p>Set the element's <a href=#delaying-the-load-event-flag id=loading-the-media-resource:delaying-the-load-event-flag-10>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event id=loading-the-media-resource:delay-the-load-event-10>delaying the load event</a>.<li><p>Abort the overall <a href=#concept-media-load-algorithm id=loading-the-media-resource:concept-media-load-algorithm-4>resource selection
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_network><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code>.<li><p>Set the element's <code id=loading-the-media-resource:dom-media-networkstate-16><a href=#dom-media-networkstate>networkState</a></code> attribute
to the <code id=loading-the-media-resource:dom-media-network_idle-6><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.<li><p>Set the element's <a href=#delaying-the-load-event-flag id=loading-the-media-resource:delaying-the-load-event-flag-10>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event id=loading-the-media-resource:delay-the-load-event-10>delaying the load event</a>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-15>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-error-2><a href=#event-media-error>error</a></code> at
the <a href=#media-element id=loading-the-media-resource:media-element-45>media element</a>.<li><p>Abort the overall <a href=#concept-media-load-algorithm id=loading-the-media-resource:concept-media-load-algorithm-4>resource selection
algorithm</a>.</ol>

<dt id=fatal-decode-error>If the <a href=#media-data id=loading-the-media-resource:media-data-12>media data</a> is corrupted<dd>

<p>Fatal errors in decoding the <a href=#media-data id=loading-the-media-resource:media-data-13>media data</a> that occur after the user agent has
established whether the <var>current media resource</var> is usable must cause the
established whether the <var>current media resource</var> is usable (i.e. once the <a href=#media-element id=loading-the-media-resource:media-element-46>media element</a>'s
<code id=loading-the-media-resource:dom-media-readystate-6><a href=#dom-media-readystate>readyState</a></code> attribute is no longer <code id=loading-the-media-resource:dom-media-have_nothing-3><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>) must cause the
user agent to execute the following steps:</p>

<ol><li><p>The user agent should cancel the fetching process.<li><p>Set the <code id=loading-the-media-resource:dom-media-error-4><a href=#dom-media-error>error</a></code> attribute to a new
<code id=loading-the-media-resource:mediaerror-3><a href=#mediaerror>MediaError</a></code> object whose <code id=loading-the-media-resource:dom-mediaerror-code-3><a href=#dom-mediaerror-code>code</a></code> attribute
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_decode><a href=#dom-mediaerror-media_err_decode>MEDIA_ERR_DECODE</a></code>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-16>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-error-3><a href=#event-media-error>error</a></code> at
the <a href=#media-element id=loading-the-media-resource:media-element-46>media element</a>.<li>

<p>If the <a href=#media-element id=loading-the-media-resource:media-element-47>media element</a>'s <code id=loading-the-media-resource:dom-media-readystate-6><a href=#dom-media-readystate>readyState</a></code>
attribute has a value equal to <code id=loading-the-media-resource:dom-media-have_nothing-3><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set
the element's <code id=loading-the-media-resource:dom-media-networkstate-17><a href=#dom-media-networkstate>networkState</a></code> attribute to the
<code id=loading-the-media-resource:dom-media-network_empty-3><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value, set the element's
<a href=#show-poster-flag id=loading-the-media-resource:show-poster-flag-4>show poster flag</a> to true, and <a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-17>fire a simple event</a> named <code id=loading-the-media-resource:event-media-emptied-2><a href=#event-media-emptied>emptied</a></code> at the element.</p>

<p>Otherwise, set the element's <code id=loading-the-media-resource:dom-media-networkstate-18><a href=#dom-media-networkstate>networkState</a></code>
attribute to the <code id=loading-the-media-resource:dom-media-network_idle-7><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</p>

<li><p>Set the element's <a href=#delaying-the-load-event-flag id=loading-the-media-resource:delaying-the-load-event-flag-11>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event id=loading-the-media-resource:delay-the-load-event-11>delaying the load event</a>.<li><p>Abort the overall <a href=#concept-media-load-algorithm id=loading-the-media-resource:concept-media-load-algorithm-5>resource selection
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_decode><a href=#dom-mediaerror-media_err_decode>MEDIA_ERR_DECODE</a></code>.<li><p>Set the element's <code id=loading-the-media-resource:dom-media-networkstate-17><a href=#dom-media-networkstate>networkState</a></code> attribute
to the <code id=loading-the-media-resource:dom-media-network_idle-7><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.<li><p>Set the element's <a href=#delaying-the-load-event-flag id=loading-the-media-resource:delaying-the-load-event-flag-11>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event id=loading-the-media-resource:delay-the-load-event-11>delaying the load event</a>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-16>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-error-3><a href=#event-media-error>error</a></code> at
the <a href=#media-element id=loading-the-media-resource:media-element-47>media element</a>.<li><p>Abort the overall <a href=#concept-media-load-algorithm id=loading-the-media-resource:concept-media-load-algorithm-5>resource selection
algorithm</a>.</ol>

<dt>If the <a href=#media-data id=loading-the-media-resource:media-data-14>media data</a> fetching process is aborted by the user<dd>
Expand All @@ -22684,16 +22675,16 @@ <h5 id=loading-the-media-resource>4.8.14.5 Loading the media resource</h5>

<ol><li><p>The user agent should cancel the fetching process.<li><p>Set the <code id=loading-the-media-resource:dom-media-error-5><a href=#dom-media-error>error</a></code> attribute to a new
<code id=loading-the-media-resource:mediaerror-4><a href=#mediaerror>MediaError</a></code> object whose <code id=loading-the-media-resource:dom-mediaerror-code-4><a href=#dom-mediaerror-code>code</a></code> attribute
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_aborted><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-18>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-abort-2><a href=#event-media-abort>abort</a></code> at
is set to <code id=loading-the-media-resource:dom-mediaerror-media_err_aborted><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.<li><p><a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-17>Fire a simple event</a> named <code id=loading-the-media-resource:event-media-abort-2><a href=#event-media-abort>abort</a></code> at
the <a href=#media-element id=loading-the-media-resource:media-element-48>media element</a>.<li>

<p>If the <a href=#media-element id=loading-the-media-resource:media-element-49>media element</a>'s <code id=loading-the-media-resource:dom-media-readystate-7><a href=#dom-media-readystate>readyState</a></code>
attribute has a value equal to <code id=loading-the-media-resource:dom-media-have_nothing-4><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set
the element's <code id=loading-the-media-resource:dom-media-networkstate-19><a href=#dom-media-networkstate>networkState</a></code> attribute to the
<code id=loading-the-media-resource:dom-media-network_empty-4><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value, set the element's
<a href=#show-poster-flag id=loading-the-media-resource:show-poster-flag-5>show poster flag</a> to true, and <a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-19>fire a simple event</a> named <code id=loading-the-media-resource:event-media-emptied-3><a href=#event-media-emptied>emptied</a></code> at the element.</p>
the element's <code id=loading-the-media-resource:dom-media-networkstate-18><a href=#dom-media-networkstate>networkState</a></code> attribute to the
<code id=loading-the-media-resource:dom-media-network_empty-3><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value, set the element's
<a href=#show-poster-flag id=loading-the-media-resource:show-poster-flag-4>show poster flag</a> to true, and <a href=#fire-a-simple-event id=loading-the-media-resource:fire-a-simple-event-18>fire a simple event</a> named <code id=loading-the-media-resource:event-media-emptied-2><a href=#event-media-emptied>emptied</a></code> at the element.</p>

<p>Otherwise, set the element's <code id=loading-the-media-resource:dom-media-networkstate-20><a href=#dom-media-networkstate>networkState</a></code>
<p>Otherwise, set the element's <code id=loading-the-media-resource:dom-media-networkstate-19><a href=#dom-media-networkstate>networkState</a></code>
attribute to the <code id=loading-the-media-resource:dom-media-network_idle-8><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</p>

<li><p>Set the element's <a href=#delaying-the-load-event-flag id=loading-the-media-resource:delaying-the-load-event-flag-12>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event id=loading-the-media-resource:delay-the-load-event-12>delaying the load event</a>.<li><p>Abort the overall <a href=#concept-media-load-algorithm id=loading-the-media-resource:concept-media-load-algorithm-6>resource selection
Expand Down Expand Up @@ -22729,7 +22720,7 @@ <h5 id=loading-the-media-resource>4.8.14.5 Loading the media resource</h5>
tracks</a> all the <a href=#media-resource-specific-text-track id=loading-the-media-resource:media-resource-specific-text-track-3>media-resource-specific
text tracks</a>, then empty the <a href=#media-element id=loading-the-media-resource:media-element-52>media element</a>'s <code id=loading-the-media-resource:dom-media-audiotracks-2><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code id=loading-the-media-resource:audiotracklist-3><a href=#audiotracklist>AudioTrackList</a></code> object,
then empty the <a href=#media-element id=loading-the-media-resource:media-element-53>media element</a>'s <code id=loading-the-media-resource:dom-media-videotracks-2><a href=#dom-media-videotracks>videoTracks</a></code>
attribute's <code id=loading-the-media-resource:videotracklist-3><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code id=loading-the-media-resource:event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code> events) are fired as part of this; the <code id=loading-the-media-resource:event-media-error-4><a href=#event-media-error>error</a></code> and <code id=loading-the-media-resource:event-media-emptied-4><a href=#event-media-emptied>emptied</a></code>
attribute's <code id=loading-the-media-resource:videotracklist-3><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code id=loading-the-media-resource:event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code> events) are fired as part of this; the <code id=loading-the-media-resource:event-media-error-4><a href=#event-media-error>error</a></code> and <code id=loading-the-media-resource:event-media-emptied-3><a href=#event-media-emptied>emptied</a></code>
events, fired by the algorithms that invoke this one, can be used instead.</p>


Expand Down

0 comments on commit a56ce89

Please sign in to comment.