Skip to content

Commit

Permalink
[giow] (2) Allow UAs that have downloaded at least two frames of vide…
Browse files Browse the repository at this point in the history
…o to go into the canplaythrough mode if they aren't going to bother getting any more however long the app and user wait.

Affected topics: Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@7138 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 15, 2012
1 parent d938d51 commit 5002eb4
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 35 deletions.
32 changes: 22 additions & 10 deletions complete.html
Expand Up @@ -30130,7 +30130,7 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>

<dl><dt><dfn id=dom-media-have_nothing title=dom-media-HAVE_NOTHING><code>HAVE_NOTHING</code></dfn> (numeric value 0)</dt>

<dd>No information regarding the <a href=#media-resource>media resource</a> is
<dd><p>No information regarding the <a href=#media-resource>media resource</a> is
available. No data for the <a href=#current-playback-position>current playback position</a>
is available. <a href=#media-element title="media element">Media elements</a>
whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code>
Expand All @@ -30140,7 +30140,7 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>

<dt><dfn id=dom-media-have_metadata title=dom-media-HAVE_METADATA><code>HAVE_METADATA</code></dfn> (numeric value 1)</dt>

<dd>Enough of the resource has been obtained that the duration of
<dd><p>Enough of the resource has been obtained that the duration of
the resource is available. In the case of a <code><a href=#the-video-element>video</a></code>
element, the dimensions of the video are also available. The API
will no longer throw an exception when seeking. No <a href=#media-data>media
Expand All @@ -30149,7 +30149,7 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>

<dt><dfn id=dom-media-have_current_data title=dom-media-HAVE_CURRENT_DATA><code>HAVE_CURRENT_DATA</code></dfn> (numeric value 2)</dt>

<dd>Data for the immediate <a href=#current-playback-position>current playback position</a>
<dd><p>Data for the immediate <a href=#current-playback-position>current playback position</a>
is available, but either not enough data is available that the user
agent could successfully advance the <a href=#current-playback-position>current playback
position</a> in the <a href=#direction-of-playback>direction of playback</a> at all
Expand All @@ -30163,7 +30163,7 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>

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

<dd>Data for the immediate <a href=#current-playback-position>current playback position</a>
<dd><p>Data for the immediate <a href=#current-playback-position>current playback position</a>
is available, as well as enough data for the user agent to advance
the <a href=#current-playback-position>current playback position</a> in the <a href=#direction-of-playback>direction
of playback</a> at least a little without immediately reverting
Expand All @@ -30181,12 +30181,24 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>

<dt><dfn id=dom-media-have_enough_data title=dom-media-HAVE_ENOUGH_DATA><code>HAVE_ENOUGH_DATA</code></dfn> (numeric value 4)</dt>

<dd>All the conditions described for the <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> state
are met, and, in addition, the user agent estimates that data is
being fetched at a rate where the <a href=#current-playback-position>current playback
position</a>, if it were to advance at the <a href=#effective-playback-rate>effective
playback rate</a>, would not overtake the available data before
playback reaches the end of the <a href=#media-resource>media resource</a>.</dd>
<dd>

<p>All the conditions described for the <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> state
are met, and, in addition, either of the following conditions is
also true:</p>

<ul><li>The user agent estimates that data is being fetched at a rate
where the <a href=#current-playback-position>current playback position</a>, if it were to
advance at the <a href=#effective-playback-rate>effective playback rate</a>, would not
overtake the available data before playback reaches the end of
the <a href=#media-resource>media resource</a>.</li>

<li>The user agent has entered a state where waiting longer will
not result in further data being obtained, and therefore nothing
would be gained by delaying playback any further. (For example,
the buffer might be full.)</li>

</ul></dd>

</dl><p class=note>In practice, the difference between <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> and <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> is
negligible. Really the only time the difference is relevant is when
Expand Down
32 changes: 22 additions & 10 deletions index
Expand Up @@ -30130,7 +30130,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dl><dt><dfn id=dom-media-have_nothing title=dom-media-HAVE_NOTHING><code>HAVE_NOTHING</code></dfn> (numeric value 0)</dt>

<dd>No information regarding the <a href=#media-resource>media resource</a> is
<dd><p>No information regarding the <a href=#media-resource>media resource</a> is
available. No data for the <a href=#current-playback-position>current playback position</a>
is available. <a href=#media-element title="media element">Media elements</a>
whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code>
Expand All @@ -30140,7 +30140,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dt><dfn id=dom-media-have_metadata title=dom-media-HAVE_METADATA><code>HAVE_METADATA</code></dfn> (numeric value 1)</dt>

<dd>Enough of the resource has been obtained that the duration of
<dd><p>Enough of the resource has been obtained that the duration of
the resource is available. In the case of a <code><a href=#the-video-element>video</a></code>
element, the dimensions of the video are also available. The API
will no longer throw an exception when seeking. No <a href=#media-data>media
Expand All @@ -30149,7 +30149,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dt><dfn id=dom-media-have_current_data title=dom-media-HAVE_CURRENT_DATA><code>HAVE_CURRENT_DATA</code></dfn> (numeric value 2)</dt>

<dd>Data for the immediate <a href=#current-playback-position>current playback position</a>
<dd><p>Data for the immediate <a href=#current-playback-position>current playback position</a>
is available, but either not enough data is available that the user
agent could successfully advance the <a href=#current-playback-position>current playback
position</a> in the <a href=#direction-of-playback>direction of playback</a> at all
Expand All @@ -30163,7 +30163,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

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

<dd>Data for the immediate <a href=#current-playback-position>current playback position</a>
<dd><p>Data for the immediate <a href=#current-playback-position>current playback position</a>
is available, as well as enough data for the user agent to advance
the <a href=#current-playback-position>current playback position</a> in the <a href=#direction-of-playback>direction
of playback</a> at least a little without immediately reverting
Expand All @@ -30181,12 +30181,24 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dt><dfn id=dom-media-have_enough_data title=dom-media-HAVE_ENOUGH_DATA><code>HAVE_ENOUGH_DATA</code></dfn> (numeric value 4)</dt>

<dd>All the conditions described for the <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> state
are met, and, in addition, the user agent estimates that data is
being fetched at a rate where the <a href=#current-playback-position>current playback
position</a>, if it were to advance at the <a href=#effective-playback-rate>effective
playback rate</a>, would not overtake the available data before
playback reaches the end of the <a href=#media-resource>media resource</a>.</dd>
<dd>

<p>All the conditions described for the <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> state
are met, and, in addition, either of the following conditions is
also true:</p>

<ul><li>The user agent estimates that data is being fetched at a rate
where the <a href=#current-playback-position>current playback position</a>, if it were to
advance at the <a href=#effective-playback-rate>effective playback rate</a>, would not
overtake the available data before playback reaches the end of
the <a href=#media-resource>media resource</a>.</li>

<li>The user agent has entered a state where waiting longer will
not result in further data being obtained, and therefore nothing
would be gained by delaying playback any further. (For example,
the buffer might be full.)</li>

</ul></dd>

</dl><p class=note>In practice, the difference between <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> and <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> is
negligible. Really the only time the difference is relevant is when
Expand Down
46 changes: 31 additions & 15 deletions source
Expand Up @@ -32752,27 +32752,27 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>

<dt><dfn title="dom-media-HAVE_NOTHING"><code>HAVE_NOTHING</code></dfn> (numeric value 0)</dt>

<dd>No information regarding the <span>media resource</span> is
<dd><p>No information regarding the <span>media resource</span> is
available. No data for the <span>current playback position</span>
is available. <span title="media element">Media elements</span>
whose <code title="dom-media-networkState">networkState</code>
attribute are set to <code
title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code> are always in
the <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>
state.</dd>
state.</p></dd>

<dt><dfn title="dom-media-HAVE_METADATA"><code>HAVE_METADATA</code></dfn> (numeric value 1)</dt>

<dd>Enough of the resource has been obtained that the duration of
<dd><p>Enough of the resource has been obtained that the duration of
the resource is available. In the case of a <code>video</code>
element, the dimensions of the video are also available. The API
will no longer throw an exception when seeking. No <span>media
data</span> is available for the immediate <span>current playback
position</span>.</dd>
position</span>.</p></dd>

<dt><dfn title="dom-media-HAVE_CURRENT_DATA"><code>HAVE_CURRENT_DATA</code></dfn> (numeric value 2)</dt>

<dd>Data for the immediate <span>current playback position</span>
<dd><p>Data for the immediate <span>current playback position</span>
is available, but either not enough data is available that the user
agent could successfully advance the <span>current playback
position</span> in the <span>direction of playback</span> at all
Expand All @@ -32783,11 +32783,11 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
agent having data from the current frame, but not the next frame,
when the <span>current playback position</span> is at the end of
the current frame; and to when <span title="ended
playback">playback has ended</span>.</dd>
playback">playback has ended</span>.</p></dd>

<dt><dfn title="dom-media-HAVE_FUTURE_DATA"><code>HAVE_FUTURE_DATA</code></dfn> (numeric value 3)</dt>

<dd>Data for the immediate <span>current playback position</span>
<dd><p>Data for the immediate <span>current playback position</span>
is available, as well as enough data for the user agent to advance
the <span>current playback position</span> in the <span>direction
of playback</span> at least a little without immediately reverting
Expand All @@ -32801,17 +32801,33 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<span>current playback position</span> is in the middle of a frame.
The user agent cannot be in this state if <span title="ended
playback">playback has ended</span>, as the <span>current playback
position</span> can never advance in this case.</dd>
position</span> can never advance in this case.</p></dd>

<dt><dfn title="dom-media-HAVE_ENOUGH_DATA"><code>HAVE_ENOUGH_DATA</code></dfn> (numeric value 4)</dt>

<dd>All the conditions described for the <code
title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> state
are met, and, in addition, the user agent estimates that data is
being fetched at a rate where the <span>current playback
position</span>, if it were to advance at the <span>effective
playback rate</span>, would not overtake the available data before
playback reaches the end of the <span>media resource</span>.</dd>
<dd>

<p>All the conditions described for the <code
title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> state
are met, and, in addition, either of the following conditions is
also true:</p>

<ul>

<li>The user agent estimates that data is being fetched at a rate
where the <span>current playback position</span>, if it were to
advance at the <span>effective playback rate</span>, would not
overtake the available data before playback reaches the end of
the <span>media resource</span>.</li>

<li>The user agent has entered a state where waiting longer will
not result in further data being obtained, and therefore nothing
would be gained by delaying playback any further. (For example,
the buffer might be full.)</li>

</ul>

</dd>

</dl>

Expand Down

0 comments on commit 5002eb4

Please sign in to comment.