Skip to content

Commit

Permalink
[] (1) Define the meaning of preload='' values while the video is pla…
Browse files Browse the repository at this point in the history
…ying.

Affected topics: Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@6858 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 9, 2011
1 parent cb3ac3e commit b4d1860
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 12 deletions.
19 changes: 15 additions & 4 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -28889,20 +28889,25 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
</ol></div>

<hr><p>The <dfn id=attr-media-preload title=attr-media-preload><code>preload</code></dfn>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following table
lists the keywords and states for the attribute &mdash; the keywords
in the left column map to the states in the cell in the second
column on the same row as the keyword.</p>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
table lists the keywords and states for the attribute &mdash; the
keywords in the left column map to the states in the cell in the
second column on the same row as the keyword. The attribute can be
changed even once the <a href=#media-resource>media resource</a> is being buffered
or played; the descriptions in the table below are to be interpreted
with that in mind.</p>

<table><thead><tr><th> Keyword
<th> State
<th> Brief description
<tbody><tr><td><dfn id=attr-media-preload-none title=attr-media-preload-none><code>none</code></dfn>
<td><dfn id=attr-media-preload-none-state title=attr-media-preload-none-state>None</dfn>
<td>Hints to the user agent that either the author does not expect the user to need the media resource, or that the server wants to minimise unnecessary traffic.
This state does not provide a hint regarding how aggressively to actually download the media resource if buffering starts anyway (e.g. once the user hits "play").
<tr><td><dfn id=attr-media-preload-metadata title=attr-media-preload-metadata><code>metadata</code></dfn>
<td><dfn id=attr-media-preload-metadata-state title=attr-media-preload-metadata-state>Metadata</dfn>
<td>Hints to the user agent that the author does not expect the user to need the media resource, but that fetching the resource metadata (dimensions, first frame, track list, duration, etc) is reasonable. If the user agent precisely fetches no more than the metadata, then the <a href=#media-element>media element</a> will end up with its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute set to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>; typically though, some frames will be obtained as well and it will probably be <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>.
When the media resource is playing, hints to the user agent that bandwidth is to be considered scarce, e.g. suggesting throttling the download so that the media data is obtained at the slowest possible rate that still maintains consistent playback.
<tr><td><dfn id=attr-media-preload-auto title=attr-media-preload-auto><code>auto</code></dfn>
<td><dfn id=attr-media-preload-auto-state title=attr-media-preload-auto-state>Automatic</dfn>
<td>Hints to the user agent that the user agent can put the user's needs first without risk to the server, up to and including optimistically downloading the entire resource.
Expand All @@ -28912,6 +28917,12 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
suggested as a compromise between reducing server load and providing
an optimal user experience.</p>

<p class=note>Authors might switch the attribute from "<code title=attr-media-preload-none><a href=#attr-media-preload-none>none</a></code>" or "<code title=attr-media-preload-metadata><a href=#attr-media-preload-metadata>metadata</a></code>" to "<code title=attr-media-preload-auto><a href=#attr-media-preload-auto>auto</a></code>" dynamically once the
user begins playback. For example, on a page with many videos this
might be used to indicate that the many videos are not to be
downloaded unless requested, but they once one <em>is</em> requested
it is to be downloaded aggressively.</p>

<div class=impl>

<p>The <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> attribute is
Expand Down
19 changes: 15 additions & 4 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -28889,20 +28889,25 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
</ol></div>

<hr><p>The <dfn id=attr-media-preload title=attr-media-preload><code>preload</code></dfn>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following table
lists the keywords and states for the attribute &mdash; the keywords
in the left column map to the states in the cell in the second
column on the same row as the keyword.</p>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
table lists the keywords and states for the attribute &mdash; the
keywords in the left column map to the states in the cell in the
second column on the same row as the keyword. The attribute can be
changed even once the <a href=#media-resource>media resource</a> is being buffered
or played; the descriptions in the table below are to be interpreted
with that in mind.</p>

<table><thead><tr><th> Keyword
<th> State
<th> Brief description
<tbody><tr><td><dfn id=attr-media-preload-none title=attr-media-preload-none><code>none</code></dfn>
<td><dfn id=attr-media-preload-none-state title=attr-media-preload-none-state>None</dfn>
<td>Hints to the user agent that either the author does not expect the user to need the media resource, or that the server wants to minimise unnecessary traffic.
This state does not provide a hint regarding how aggressively to actually download the media resource if buffering starts anyway (e.g. once the user hits "play").
<tr><td><dfn id=attr-media-preload-metadata title=attr-media-preload-metadata><code>metadata</code></dfn>
<td><dfn id=attr-media-preload-metadata-state title=attr-media-preload-metadata-state>Metadata</dfn>
<td>Hints to the user agent that the author does not expect the user to need the media resource, but that fetching the resource metadata (dimensions, first frame, track list, duration, etc) is reasonable. If the user agent precisely fetches no more than the metadata, then the <a href=#media-element>media element</a> will end up with its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute set to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>; typically though, some frames will be obtained as well and it will probably be <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>.
When the media resource is playing, hints to the user agent that bandwidth is to be considered scarce, e.g. suggesting throttling the download so that the media data is obtained at the slowest possible rate that still maintains consistent playback.
<tr><td><dfn id=attr-media-preload-auto title=attr-media-preload-auto><code>auto</code></dfn>
<td><dfn id=attr-media-preload-auto-state title=attr-media-preload-auto-state>Automatic</dfn>
<td>Hints to the user agent that the user agent can put the user's needs first without risk to the server, up to and including optimistically downloading the entire resource.
Expand All @@ -28912,6 +28917,12 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
suggested as a compromise between reducing server load and providing
an optimal user experience.</p>

<p class=note>Authors might switch the attribute from "<code title=attr-media-preload-none><a href=#attr-media-preload-none>none</a></code>" or "<code title=attr-media-preload-metadata><a href=#attr-media-preload-metadata>metadata</a></code>" to "<code title=attr-media-preload-auto><a href=#attr-media-preload-auto>auto</a></code>" dynamically once the
user begins playback. For example, on a page with many videos this
might be used to indicate that the many videos are not to be
downloaded unless requested, but they once one <em>is</em> requested
it is to be downloaded aggressively.</p>

<div class=impl>

<p>The <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> attribute is
Expand Down
22 changes: 18 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -31357,10 +31357,13 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<hr>

<p>The <dfn title="attr-media-preload"><code>preload</code></dfn>
attribute is an <span>enumerated attribute</span>. The following table
lists the keywords and states for the attribute &mdash; the keywords
in the left column map to the states in the cell in the second
column on the same row as the keyword.</p>
attribute is an <span>enumerated attribute</span>. The following
table lists the keywords and states for the attribute &mdash; the
keywords in the left column map to the states in the cell in the
second column on the same row as the keyword. The attribute can be
changed even once the <span>media resource</span> is being buffered
or played; the descriptions in the table below are to be interpreted
with that in mind.</p>

<table>
<thead>
Expand All @@ -31373,10 +31376,12 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<td><dfn title="attr-media-preload-none"><code>none</code></dfn>
<td><dfn title="attr-media-preload-none-state">None</dfn>
<td>Hints to the user agent that either the author does not expect the user to need the media resource, or that the server wants to minimise unnecessary traffic.
This state does not provide a hint regarding how aggressively to actually download the media resource if buffering starts anyway (e.g. once the user hits "play").
<tr>
<td><dfn title="attr-media-preload-metadata"><code>metadata</code></dfn>
<td><dfn title="attr-media-preload-metadata-state">Metadata</dfn>
<td>Hints to the user agent that the author does not expect the user to need the media resource, but that fetching the resource metadata (dimensions, first frame, track list, duration, etc) is reasonable. If the user agent precisely fetches no more than the metadata, then the <span>media element</span> will end up with its <code title="dom-media-readyState">readyState</code> attribute set to <code title="dom-media-HAVE_METADATA">HAVE_METADATA</code>; typically though, some frames will be obtained as well and it will probably be <code title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code> or <code title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>.
When the media resource is playing, hints to the user agent that bandwidth is to be considered scarce, e.g. suggesting throttling the download so that the media data is obtained at the slowest possible rate that still maintains consistent playback.
<tr>
<td><dfn title="attr-media-preload-auto"><code>auto</code></dfn>
<td><dfn title="attr-media-preload-auto-state">Automatic</dfn>
Expand All @@ -31391,6 +31396,15 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
suggested as a compromise between reducing server load and providing
an optimal user experience.</p>

<p class="note">Authors might switch the attribute from "<code
title="attr-media-preload-none">none</code>" or "<code
title="attr-media-preload-metadata">metadata</code>" to "<code
title="attr-media-preload-auto">auto</code>" dynamically once the
user begins playback. For example, on a page with many videos this
might be used to indicate that the many videos are not to be
downloaded unless requested, but they once one <em>is</em> requested
it is to be downloaded aggressively.</p>

<div class="impl">

<p>The <code title="attr-media-preload">preload</code> attribute is
Expand Down

0 comments on commit b4d1860

Please sign in to comment.