Skip to content

Commit

Permalink
[giow] (1) These steps are already running in a task, not async, so n…
Browse files Browse the repository at this point in the history
…o need to have them queue more tasks to fire events.

git-svn-id: http://svn.whatwg.org/webapps@6581 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 23, 2011
1 parent 6bef4b5 commit 22d0fa1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 81 deletions.
49 changes: 22 additions & 27 deletions complete.html
Expand Up @@ -27500,19 +27500,16 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the

<dd>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-media-progress><a href=#event-media-progress>progress</a></code> at the
<a href=#media-element>media element</a>.</p>
<p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-progress><a href=#event-media-progress>progress</a></code> at the <a href=#media-element>media
element</a>.</p>

<p>Then, <a href=#queue-a-task>queue a task</a> to set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> and
<p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> and
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code> at the <a href=#media-element>media
element</a>.</p>

<p>If the user agent ever discards any <a href=#media-data>media data</a>
and then needs to resume the network activity to obtain it
again, then it must wait <a href=#queue-a-task>queue a task</a> to set the
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to
<code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.</p>
again, then it must <a href=#queue-a-task>queue a task</a> to set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.</p>

<p class=note>If the user agent can keep the <a href=#media-resource>media
resource</a> loaded, then the algorithm will continue to its
Expand Down Expand Up @@ -27542,9 +27539,8 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
Expand Down Expand Up @@ -27576,17 +27572,15 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_DECODE><a href=#dom-mediaerror-media_err_decode>MEDIA_ERR_DECODE</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set the
element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element. Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
value and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
value.</li>

Expand Down Expand Up @@ -27619,17 +27613,15 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set the
element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element. Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
value and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
value.</li>

Expand Down Expand Up @@ -27660,14 +27652,17 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
</dd>


<dt id=found-a-media-resource-specific-timed-track>If the <a href=#media-resource>media resource</a> is found to declare a <a href=#media-resource-specific-text-track>media-resource-specific text track</a> that the user agent supports</dt>
<dt id=found-a-media-resource-specific-timed-track>If the
<a href=#media-resource>media resource</a> is found to declare a
<a href=#media-resource-specific-text-track>media-resource-specific text track</a> that the user
agent supports</dt>

<dd>

<p>If the <a href=#media-data>media data</a> is
<a href=#cors-same-origin>CORS-same-origin</a>, <a href=#queue-a-task>queue a task</a> to run
the <a href=#steps-to-expose-a-media-resource-specific-text-track>steps to expose a media-resource-specific text
track</a> with the relevant data.</p>
<a href=#cors-same-origin>CORS-same-origin</a>, run the <a href=#steps-to-expose-a-media-resource-specific-text-track>steps to expose a
media-resource-specific text track</a> with the relevant
data.</p>

<p class=note>Cross-origin videos do not expose their
subtitles, since that would allow attacks such as hostile sites
Expand All @@ -27694,7 +27689,7 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
even once the <a href=#ended-playback title="ended playback">playback has
ended</a>, because there is always the chance the user will
seek back to the start. In fact, in this situation, once <a href=#ended-playback title="ended playback">playback has ended</a>, the user agent
will end up firing a <code title=event-media-stalled><a href=#event-media-stalled>stalled</a></code> event, as described
will end up firing a <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code> event, as described
earlier.</p>

</li>
Expand Down
49 changes: 22 additions & 27 deletions index
Expand Up @@ -27367,19 +27367,16 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dd>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-media-progress><a href=#event-media-progress>progress</a></code> at the
<a href=#media-element>media element</a>.</p>
<p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-progress><a href=#event-media-progress>progress</a></code> at the <a href=#media-element>media
element</a>.</p>

<p>Then, <a href=#queue-a-task>queue a task</a> to set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> and
<p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> and
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code> at the <a href=#media-element>media
element</a>.</p>

<p>If the user agent ever discards any <a href=#media-data>media data</a>
and then needs to resume the network activity to obtain it
again, then it must wait <a href=#queue-a-task>queue a task</a> to set the
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to
<code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.</p>
again, then it must <a href=#queue-a-task>queue a task</a> to set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.</p>

<p class=note>If the user agent can keep the <a href=#media-resource>media
resource</a> loaded, then the algorithm will continue to its
Expand Down Expand Up @@ -27409,9 +27406,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
Expand Down Expand Up @@ -27443,17 +27439,15 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_DECODE><a href=#dom-mediaerror-media_err_decode>MEDIA_ERR_DECODE</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set the
element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element. Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
value and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
value.</li>

Expand Down Expand Up @@ -27486,17 +27480,15 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code>
at the <a href=#media-element>media element</a>.</li>
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at the <a href=#media-element>media
element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set the
element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element. Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
value and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
value.</li>

Expand Down Expand Up @@ -27527,14 +27519,17 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
</dd>


<dt id=found-a-media-resource-specific-timed-track>If the <a href=#media-resource>media resource</a> is found to declare a <a href=#media-resource-specific-text-track>media-resource-specific text track</a> that the user agent supports</dt>
<dt id=found-a-media-resource-specific-timed-track>If the
<a href=#media-resource>media resource</a> is found to declare a
<a href=#media-resource-specific-text-track>media-resource-specific text track</a> that the user
agent supports</dt>

<dd>

<p>If the <a href=#media-data>media data</a> is
<a href=#cors-same-origin>CORS-same-origin</a>, <a href=#queue-a-task>queue a task</a> to run
the <a href=#steps-to-expose-a-media-resource-specific-text-track>steps to expose a media-resource-specific text
track</a> with the relevant data.</p>
<a href=#cors-same-origin>CORS-same-origin</a>, run the <a href=#steps-to-expose-a-media-resource-specific-text-track>steps to expose a
media-resource-specific text track</a> with the relevant
data.</p>

<p class=note>Cross-origin videos do not expose their
subtitles, since that would allow attacks such as hostile sites
Expand All @@ -27561,7 +27556,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
even once the <a href=#ended-playback title="ended playback">playback has
ended</a>, because there is always the chance the user will
seek back to the start. In fact, in this situation, once <a href=#ended-playback title="ended playback">playback has ended</a>, the user agent
will end up firing a <code title=event-media-stalled><a href=#event-media-stalled>stalled</a></code> event, as described
will end up firing a <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code> event, as described
earlier.</p>

</li>
Expand Down

0 comments on commit 22d0fa1

Please sign in to comment.