[html5] r6858 - [] (1) Define the meaning of preload='' values while the video is playing. Affec [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Dec 9 13:46:49 PST 2011
Author: ianh
Date: 2011-12-09 13:46:47 -0800 (Fri, 09 Dec 2011)
New Revision: 6858
Modified:
complete.html
index
source
Log:
[] (1) Define the meaning of preload='' values while the video is playing.
Affected topics: Video and Audio
Modified: complete.html
===================================================================
--- complete.html 2011-12-09 20:24:05 UTC (rev 6857)
+++ complete.html 2011-12-09 21:46:47 UTC (rev 6858)
@@ -28889,10 +28889,13 @@
</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 — 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 — 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
@@ -28900,9 +28903,11 @@
<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.
@@ -28912,6 +28917,12 @@
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
Modified: index
===================================================================
--- index 2011-12-09 20:24:05 UTC (rev 6857)
+++ index 2011-12-09 21:46:47 UTC (rev 6858)
@@ -28889,10 +28889,13 @@
</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 — 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 — 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
@@ -28900,9 +28903,11 @@
<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.
@@ -28912,6 +28917,12 @@
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
Modified: source
===================================================================
--- source 2011-12-09 20:24:05 UTC (rev 6857)
+++ source 2011-12-09 21:46:47 UTC (rev 6858)
@@ -31357,10 +31357,13 @@
<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 — 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 — 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>
@@ -31373,10 +31376,12 @@
<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>
@@ -31391,6 +31396,15 @@
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
More information about the Commit-Watchers
mailing list