Skip to content
Permalink
Browse files

[gow] (2) <video> and <audio> never fire 'load' anymore.

git-svn-id: http://svn.whatwg.org/webapps@4132 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Oct 14, 2009
1 parent fb72a50 commit a1377ddeac50f3f88f3f92d64d8e38478da39fc4
Showing with 27 additions and 105 deletions.
  1. +9 −33 complete.html
  2. +9 −33 index
  3. +9 −39 source
const unsigned short <a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a> = 0;
const unsigned short <a href=#dom-media-network_idle title=dom-media-NETWORK_IDLE>NETWORK_IDLE</a> = 1;
const unsigned short <a href=#dom-media-network_loading title=dom-media-NETWORK_LOADING>NETWORK_LOADING</a> = 2;
const unsigned short <a href=#dom-media-network_loaded title=dom-media-NETWORK_LOADED>NETWORK_LOADED</a> = 3;
const unsigned short <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a> = 4;
const unsigned short <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a> = 3;
readonly attribute unsigned short <a href=#dom-media-networkstate title=dom-media-networkState>networkState</a>;
attribute boolean <a href=#dom-media-autobuffer title=dom-media-autobuffer>autobuffer</a>;
<!--v3BUF readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;

<dd>The user agent is actively trying to download data.</dd>

<dt><dfn id=dom-media-network_loaded title=dom-media-NETWORK_LOADED><code>NETWORK_LOADED</code></dfn> (numeric value 3)</dt>

<dd>The entire <a href=#media-resource>media resource</a> has been obtained and is
available to the user agent locally. Network connectivity could be
lost without affecting the media playback.</dd>

<dt><dfn id=dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE><code>NETWORK_NO_SOURCE</code></dfn> (numeric value 4)</dt>
<dt><dfn id=dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE><code>NETWORK_NO_SOURCE</code></dfn> (numeric value 3)</dt>

<dd>The element<span class=impl>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> is active, but it</span> has failed to find a

</div>

<p class=note>Some resources, e.g. streaming Web radio, can never
reach the <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code> state.</p>




to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying
the load event</a>.</li>

<li><p>Abort these steps. Until the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method is invoked, the
<li><p>Abort these steps. Until the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method is invoked or the
<code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute is changed, the
element won't attempt to load another resource.</li>
<!-- it took its ball and went home, sulking. -->


</li>

<li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
<code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress
event</a> named <code title=event-media-load><a href=#event-media-load>load</a></code> at the
<a href=#media-element>media element</a>, in the context of the <a href=#fetch title=fetch>fetching process</a> started by this instance of
this algorithm.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress
event</a> named <code title=event-media-loadend><a href=#event-media-loadend>loadend</a></code> at
the <a href=#media-element>media element</a>, in the context of the <a href=#fetch title=fetch>fetching process</a> started by this instance of
this algorithm.</li>

<li><p>Finally, abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
<li><p>If the user agent ever reaches this step (which can only
happen if the entire resource gets loaded and kept available):
abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</li>

</ol><p>If a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent is intentionally not currently fetching <a href=#media-data>media data</a>, but does not have the entire <a href=#media-resource>media resource</a> downloaded.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
<tr><td><dfn id=event-media-load title=event-media-load><code>load</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent finishes fetching the entire <a href=#media-resource>media resource</a>.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>
<tr><td><dfn id=event-media-abort title=event-media-abort><code>abort</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent stops fetching the <a href=#media-data>media data</a> before it is completely downloaded, but not due to an error.
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>An error occurs while fetching the <a href=#media-data>media data</a>.
<td><code title=dom-media-error><a href=#dom-media-error>error</a></code> is an object with the code <code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code> or higher.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>, depending on when the download was aborted.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>, depending on when the download was aborted.
<tr><td><dfn id=event-media-loadend title=event-media-loadend><code>loadend</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent stops fetching the <a href=#media-data>media data</a>, for whatever reason.
<td>One of <code title=event-media-load><a href=#event-media-load>load</a></code>, <code title=event-media-abort><a href=#event-media-abort>abort</a></code>, or <code title=event-media-error><a href=#event-media-error>error</a></code> has just fired.
<td>One of <code title=event-media-abort><a href=#event-media-abort>abort</a></code> or <code title=event-media-error><a href=#event-media-error>error</a></code> has just fired.
<tr><td><dfn id=event-media-emptied title=event-media-emptied><code>emptied</code></dfn>
<td><code>Event</code>
<td>A <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> was previously not in the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> state has just switched to that state (either because of a fatal error during load that's about to be reported, or because the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method was invoked while the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection algorithm</a> was already running, in which case it is fired synchronously during the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method call).
42 index
const unsigned short <a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a> = 0;
const unsigned short <a href=#dom-media-network_idle title=dom-media-NETWORK_IDLE>NETWORK_IDLE</a> = 1;
const unsigned short <a href=#dom-media-network_loading title=dom-media-NETWORK_LOADING>NETWORK_LOADING</a> = 2;
const unsigned short <a href=#dom-media-network_loaded title=dom-media-NETWORK_LOADED>NETWORK_LOADED</a> = 3;
const unsigned short <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a> = 4;
const unsigned short <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a> = 3;
readonly attribute unsigned short <a href=#dom-media-networkstate title=dom-media-networkState>networkState</a>;
attribute boolean <a href=#dom-media-autobuffer title=dom-media-autobuffer>autobuffer</a>;
<!--v3BUF readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;

<dd>The user agent is actively trying to download data.</dd>

<dt><dfn id=dom-media-network_loaded title=dom-media-NETWORK_LOADED><code>NETWORK_LOADED</code></dfn> (numeric value 3)</dt>

<dd>The entire <a href=#media-resource>media resource</a> has been obtained and is
available to the user agent locally. Network connectivity could be
lost without affecting the media playback.</dd>

<dt><dfn id=dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE><code>NETWORK_NO_SOURCE</code></dfn> (numeric value 4)</dt>
<dt><dfn id=dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE><code>NETWORK_NO_SOURCE</code></dfn> (numeric value 3)</dt>

<dd>The element<span class=impl>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> is active, but it</span> has failed to find a

</div>

<p class=note>Some resources, e.g. streaming Web radio, can never
reach the <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code> state.</p>




to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying
the load event</a>.</li>

<li><p>Abort these steps. Until the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method is invoked, the
<li><p>Abort these steps. Until the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method is invoked or the
<code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute is changed, the
element won't attempt to load another resource.</li>
<!-- it took its ball and went home, sulking. -->


</li>

<li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
<code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress
event</a> named <code title=event-media-load><a href=#event-media-load>load</a></code> at the
<a href=#media-element>media element</a>, in the context of the <a href=#fetch title=fetch>fetching process</a> started by this instance of
this algorithm.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress
event</a> named <code title=event-media-loadend><a href=#event-media-loadend>loadend</a></code> at
the <a href=#media-element>media element</a>, in the context of the <a href=#fetch title=fetch>fetching process</a> started by this instance of
this algorithm.</li>

<li><p>Finally, abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
<li><p>If the user agent ever reaches this step (which can only
happen if the entire resource gets loaded and kept available):
abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</li>

</ol><p>If a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent is intentionally not currently fetching <a href=#media-data>media data</a>, but does not have the entire <a href=#media-resource>media resource</a> downloaded.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
<tr><td><dfn id=event-media-load title=event-media-load><code>load</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent finishes fetching the entire <a href=#media-resource>media resource</a>.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>
<tr><td><dfn id=event-media-abort title=event-media-abort><code>abort</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent stops fetching the <a href=#media-data>media data</a> before it is completely downloaded, but not due to an error.
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>An error occurs while fetching the <a href=#media-data>media data</a>.
<td><code title=dom-media-error><a href=#dom-media-error>error</a></code> is an object with the code <code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code> or higher.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>, depending on when the download was aborted.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>, depending on when the download was aborted.
<tr><td><dfn id=event-media-loadend title=event-media-loadend><code>loadend</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent stops fetching the <a href=#media-data>media data</a>, for whatever reason.
<td>One of <code title=event-media-load><a href=#event-media-load>load</a></code>, <code title=event-media-abort><a href=#event-media-abort>abort</a></code>, or <code title=event-media-error><a href=#event-media-error>error</a></code> has just fired.
<td>One of <code title=event-media-abort><a href=#event-media-abort>abort</a></code> or <code title=event-media-error><a href=#event-media-error>error</a></code> has just fired.
<tr><td><dfn id=event-media-emptied title=event-media-emptied><code>emptied</code></dfn>
<td><code>Event</code>
<td>A <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> was previously not in the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> state has just switched to that state (either because of a fatal error during load that's about to be reported, or because the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method was invoked while the <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection algorithm</a> was already running, in which case it is fired synchronously during the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method call).

0 comments on commit a1377dd

Please sign in to comment.
You can’t perform that action at this time.