Short URL: http://html5.org/r/6858
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 6858 | Define the meaning of preload='' values while the video is playing. | 2011-12-09 21:46 |
Index: source
===================================================================
--- source (revision 6857)
+++ source (revision 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