Skip to content

Commit

Permalink
[giow] (2) Change autobuffer to preload.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8731

git-svn-id: http://svn.whatwg.org/webapps@4811 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 25, 2010
1 parent fda39ea commit 934df39
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 127 deletions.
106 changes: 64 additions & 42 deletions complete.html
Expand Up @@ -14409,7 +14409,7 @@ <h4 id=the-footer-element><span class=secno>4.4.9 </span>The <dfn><code>footer</
&lt;H1&gt;The Ramblings of a Scientist&lt;/H1&gt;
&lt;ARTICLE&gt;
&lt;H1&gt;Episode 15&lt;/H1&gt;
&lt;VIDEO SRC="/fm/015.ogv" CONTROLS AUTOBUFFER&gt;
&lt;VIDEO SRC="/fm/015.ogv" CONTROLS PRELOAD&gt;
&lt;P&gt;&lt;A HREF="/fm/015.ogv"&gt;Download video&lt;/A&gt;.&lt;/P&gt;
&lt;/VIDEO&gt;
&lt;FOOTER&gt; &lt;!-- footer for article --&gt;
Expand Down Expand Up @@ -21543,7 +21543,7 @@ <h4 id=video><span class=secno>4.8.6 </span>The <dfn><code>video</code></dfn> el
<dd><a href=#global-attributes>Global attributes</a></dd>
<dd><code title=attr-media-src><a href=#attr-media-src>src</a></code></dd>
<dd><code title=attr-video-poster><a href=#attr-video-poster>poster</a></code></dd>
<dd><code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code></dd>
<dd><code title=attr-media-preload><a href=#attr-media-preload>preload</a></code></dd>
<dd><code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code></dd>
<dd><code title=attr-media-loop><a href=#attr-media-loop>loop</a></code></dd>
<dd><code title=attr-media-controls><a href=#attr-media-controls>controls</a></code></dd>
Expand Down Expand Up @@ -21581,7 +21581,7 @@ <h4 id=video><span class=secno>4.8.6 </span>The <dfn><code>video</code></dfn> el
whose <a href=#media-data>media data</a> is ostensibly video data, possibly
with associated audio data.</p>

<p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
<p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
elements</a>.</p>

<p>The <dfn id=attr-video-poster title=attr-video-poster><code>poster</code></dfn>
Expand Down Expand Up @@ -21832,7 +21832,7 @@ <h4 id=audio><span class=secno>4.8.7 </span>The <dfn><code>audio</code></dfn> el
<dt>Content attributes:</dt>
<dd><a href=#global-attributes>Global attributes</a></dd>
<dd><code title=attr-media-src><a href=#attr-media-src>src</a></code></dd>
<dd><code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code></dd>
<dd><code title=attr-media-preload><a href=#attr-media-preload>preload</a></code></dd>
<dd><code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code></dd>
<dd><code title=attr-media-loop><a href=#attr-media-loop>loop</a></code></dd>
<dd><code title=attr-media-controls><a href=#attr-media-controls>controls</a></code></dd>
Expand Down Expand Up @@ -21879,7 +21879,7 @@ <h4 id=audio><span class=secno>4.8.7 </span>The <dfn><code>audio</code></dfn> el
<p>The <code><a href=#audio>audio</a></code> element is a <a href=#media-element>media element</a>
whose <a href=#media-data>media data</a> is ostensibly audio data.</p>

<p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
<p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
elements</a>.</p>

<div class=impl>
Expand Down Expand Up @@ -21908,8 +21908,8 @@ <h4 id=audio><span class=secno>4.8.7 </span>The <dfn><code>audio</code></dfn> el
<code><a href=#htmlaudioelement>HTMLAudioElement</a></code> objects (in addition to the factory
methods from DOM Core such as <code title="">createElement()</code>): <dfn id=dom-audio title=dom-Audio><code>Audio()</code></dfn> and <dfn id=dom-audio-s title=dom-Audio-s><code>Audio(<var title="">src</var>)</code></dfn>. When invoked as constructors,
these must return a new <code><a href=#htmlaudioelement>HTMLAudioElement</a></code> object (a new
<code><a href=#audio>audio</a></code> element). The element must have its <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code> attribute set to the
literal value "<code title="">autobuffer</code>". If the <var title="">src</var> argument is present, the object created must have
<code><a href=#audio>audio</a></code> element). The element must have its <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> attribute set to the
literal value "<code title=attr-media-preload-auto><a href=#attr-media-preload-auto>auto</a></code>". If the <var title="">src</var> argument is present, the object created must have
its <code title=attr-media-src><a href=#attr-media-src>src</a></code> content attribute set to
the provided value, and the user agent must invoke the object's
<a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
Expand Down Expand Up @@ -22146,7 +22146,7 @@ <h4 id=media-elements><span class=secno>4.8.9 </span>Media elements</h4>
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_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>;
attribute DOMString <a href=#dom-media-preload title=dom-media-preload>preload</a>;
<!--v3BUF readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;
readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;
--> readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-media-buffered title=dom-media-buffered>buffered</a>;
Expand Down Expand Up @@ -22192,7 +22192,7 @@ <h4 id=media-elements><span class=secno>4.8.9 </span>Media elements</h4>
void <span title="dom-CueRangeCallback-handleEvent">handleEvent</span>(in DOMString id);
};--></pre>

<p>The <dfn id=media-element-attributes>media element attributes</dfn>, <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>, apply to all <a href=#media-element title="media element">media elements</a>. They are defined in
<p>The <dfn id=media-element-attributes>media element attributes</dfn>, <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>, apply to all <a href=#media-element title="media element">media elements</a>. They are defined in
this section.</p>

<!-- proposed v2 (actually v3!) features:
Expand Down Expand Up @@ -22902,14 +22902,9 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.9.5 </span>Loading the m
the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to
<code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.</p>

<p>The <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>
attribute provides a hint that the author expects that downloading
the entire resource optimistically will be worth it, even in the
absence of the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>
attribute. In the absence of either attribute, the user agent is
likely to find that waiting until the user starts playback before
downloading any further content leads to a more efficient use of
the network resources.</p>
<p class=note>The <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> attribute provides a
hint regarding how much buffering the author thinks is advisable,
even in the absence of the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute.</p>

<p>When a user agent decides to completely stall a download,
e.g. if it is waiting until the user starts playback before
Expand Down Expand Up @@ -23036,8 +23031,10 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.9.5 </span>Loading the m
network usage while still fetching the metadata for each
<a href=#media-resource>media resource</a> would also stop buffering at this
point, causing the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute
to switch to the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value, if
the <a href=#media-element>media element</a> did not have an <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code> or <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute.</p>
to switch to the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value. This
is also where a user agent would stop buffering when honoring
the <a href=#media-element>media element</a>'s <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>'s <a href=#attr-media-preload-metadata-state title=attr-media-preload-metadata-state>Metadata</a>
state.</p>

</li>

Expand Down Expand Up @@ -23223,27 +23220,50 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.9.5 </span>Loading the m

</ol></div>

<p>The <dfn id=attr-media-autobuffer title=attr-media-autobuffer><code>autobuffer</code></dfn>
attribute is a <a href=#boolean-attribute>boolean attribute</a>. Its presence hints to
the user agent that the author believes that the <a href=#media-element>media
element</a> will likely be used, even though the element does not
have an <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>
attribute. (The attribute has no effect if used in conjunction with
the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute,
though including both is not an error.) <span class=impl>This
attribute may be ignored altogether. The attribute must be ignored
if the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute
is present.</span></p>
<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>

<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 the author either does not expect the user to need the media resource, or that the server wants to minimise unnecessary traffic.
<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 either 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.
<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.
</table><p>The empty string is also a valid keyword, and maps to the <a href=#attr-media-preload-auto-state title=attr-media-preload-auto-state>Automatic</a> state. The
attribute's <i>missing value default</i> is user-agent defined,
though the <a href=#attr-media-preload-auto-state title=attr-media-preload-auto-state>Automatic</a> state is
suggested in high-bandwidth situations.</p>

<div class=impl>

<p>The <dfn id=dom-media-autobuffer title=dom-media-autobuffer><code>autobuffer</code></dfn> IDL
<p>The <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> attribute is
intended to provide a hint to the user agent about what the author
thinks will lead to the best user experience. The attribute may be
ignored altogether, for example based on explicit user preferences
or based on the available connectivity. The attribute must be
ignored if the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>
attribute is present.</p>

<p>The <dfn id=dom-media-preload title=dom-media-preload><code>preload</code></dfn> IDL
attribute must <a href=#reflect>reflect</a> the content attribute of the
same name.</p>

</div>

<!--v3BUF (when readding this, also add a domintro block)
<p class=note>The <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>
attribute has no effect if used in conjunction with the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute, though
including both is not an error.</p>

<hr><!--v3BUF (when readding this, also add a domintro block)
<p>The <dfn
title="dom-media-bufferingRate"><code>bufferingRate</code></dfn>
attribute must return the average number of bits received per second
Expand All @@ -23256,9 +23276,9 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.9.5 </span>Loading the m
throttling the bandwidth used by the download (including when
throttling to zero to pause the download altogether), and false
otherwise.</p>
-->

<dl class=domintro><dt><var title="">media</var> . <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code></dt>
<hr>
--><dl class=domintro><dt><var title="">media</var> . <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code></dt>

<dd>

Expand Down Expand Up @@ -75940,7 +75960,7 @@ <h5 id=the-before-head-insertion-mode><span class=secno>12.2.5.6 </span>The "<df
<dt>A start tag whose tag name is "li"</dt>
<dd>

<p>Run the following steps:</p>
<p>Run these steps:</p>

<ol><li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>

Expand Down Expand Up @@ -86114,7 +86134,7 @@ <h3 class=no-num id=elements-1>Elements</h3>
<a href=#transparent>transparent</a>*</td>
<td><a href=#global-attributes title="global attributes">globals</a>;
<code title=attr-media-src><a href=#attr-media-src>src</a></code>;
<code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>;
<code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>;
<code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>;
<code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>;
<code title=attr-media-controls><a href=#attr-media-controls>controls</a></code></td>
Expand Down Expand Up @@ -87114,7 +87134,7 @@ <h3 class=no-num id=elements-1>Elements</h3>
<td><a href=#global-attributes title="global attributes">globals</a>;
<code title=attr-media-src><a href=#attr-media-src>src</a></code>;
<code title=attr-video-poster><a href=#attr-video-poster>poster</a></code>;
<code title=attr-media-autobuffer><a href=#attr-media-autobuffer>autobuffer</a></code>;
<code title=attr-media-preload><a href=#attr-media-preload>preload</a></code>;
<code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>;
<code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>;
<code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>;
Expand Down Expand Up @@ -87461,11 +87481,6 @@ <h3 class=no-num id=element-content-categories>Element content categories</h3>
<td> <code title=attr-script-async><a href=#attr-script-async>script</a></code>
<td> Execute script asynchronously
<td> <a href=#boolean-attribute>Boolean attribute</a>
<tr><th> <code title="">autobuffer</code>
<td> <code title=attr-media-autobuffer><a href=#attr-media-autobuffer>audio</a></code>;
<code title=attr-media-autobuffer><a href=#attr-media-autobuffer>video</a></code>
<td> Hint that buffering the <a href=#media-resource>media resource</a> will likely be needed
<td> <a href=#boolean-attribute>Boolean attribute</a>
<tr><th> <code title="">autocomplete</code>
<td> <code title=attr-form-autocomplete><a href=#attr-form-autocomplete>form</a></code>;
<code title=attr-input-autocomplete><a href=#attr-input-autocomplete>input</a></code>
Expand Down Expand Up @@ -87839,6 +87854,13 @@ <h3 class=no-num id=element-content-categories>Element content categories</h3>
<td> <code title=attr-video-poster><a href=#attr-video-poster>video</a></code>
<td> Poster frame to show prior to video playback
<td> <a href=#valid-url>Valid URL</a>
<tr><th> <code title="">preload</code>
<td> <code title=attr-media-preload><a href=#attr-media-preload>audio</a></code>;
<code title=attr-media-preload><a href=#attr-media-preload>video</a></code>
<td> Hints how much buffering the <a href=#media-resource>media resource</a> will likely need
<td> "<code title=attr-media-preload-none><a href=#attr-media-preload-none>none</a></code>";
"<code title=attr-media-preload-metadata><a href=#attr-media-preload-metadata>metadata</a></code>";
"<code title=attr-media-preload-auto><a href=#attr-media-preload-auto>auto</a></code>"
<tr><th> <code title="">pubdate</code>
<td> <code title=attr-time-pubdate><a href=#attr-time-pubdate>time</a></code>
<td> Whether the element's value represents a publication time for the nearest <code><a href=#the-article-element>article</a></code> or <code><a href=#the-body-element-0>body</a></code>
Expand Down

0 comments on commit 934df39

Please sign in to comment.