[html5] r2855 - [gw] (2) Add the autobuffer='' attribute as a hint to browsers.

whatwg at whatwg.org whatwg at whatwg.org
Mon Feb 23 03:14:04 PST 2009


Author: ianh
Date: 2009-02-23 03:14:03 -0800 (Mon, 23 Feb 2009)
New Revision: 2855

Modified:
   index
   source
Log:
[gw] (2) Add the autobuffer='' attribute as a hint to browsers.

Modified: index
===================================================================
--- index	2009-02-23 10:54:24 UTC (rev 2854)
+++ index	2009-02-23 11:14:03 UTC (rev 2855)
@@ -17723,6 +17723,7 @@
    <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-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>
@@ -17758,7 +17759,7 @@
   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-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-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
   elements</a>.</p>
 
   <p>The <dfn id=attr-video-poster title=attr-video-poster><code>poster</code></dfn>
@@ -17959,6 +17960,7 @@
    <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-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>
@@ -17990,7 +17992,7 @@
   <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-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-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
   elements</a>.</p>
  
   <p>When an <code><a href=#audio>audio</a></code> element is <a href=#potentially-playing>potentially
@@ -18180,6 +18182,7 @@
   const unsigned short <a href=#dom-media-network_loaded title=dom-media-NETWORK_LOADED>NETWORK_LOADED</a> = 3;
   const unsigned short <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a> = 4;
   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>;
   readonly attribute float <a href=#dom-media-bufferingrate title=dom-media-bufferingRate>bufferingRate</a>;
   readonly attribute boolean <a href=#dom-media-bufferingthrottled title=dom-media-bufferingThrottled>bufferingThrottled</a>;
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-media-buffered title=dom-media-buffered>buffered</a>;
@@ -18224,7 +18227,7 @@
   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-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-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
   this section.</p>
 
   <!-- proposed v2 (actually v3!) features:
@@ -18791,6 +18794,15 @@
     element. If and when downloading of the resource resumes, the
     user agent must set 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>The user agent may use whatever means necessary to fetch the
     resource (within the constraints put forward by this and other
     specifications); for example, reconnecting to the server in the
@@ -18878,6 +18890,13 @@
        flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load
        event">delaying the load event</a>.</li>
 
+       <li><p class=note>This is the point at which a user agent
+       that is attempting to reduce network usage while still fetching
+       the metadata for each <a href=#media-resource>media resource</a> would stop
+       buffering, 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.</li>
+
       </ol><p class=note>The user agent is <em>required</em> to
       determine the duration of the <a href=#media-resource>media resource</a> and
       go through this step before playing.</p> <!-- actually defined
@@ -19038,6 +19057,21 @@
   document</a>, the user agent must asynchronously invoke the
   <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>load algorithm</a>.</p>
 
+  <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.) 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.</p>
+
+  <p>The <dfn id=dom-media-autobuffer title=dom-media-autobuffer><code>autobuffer</code></dfn> DOM
+  attribute must <a href=#reflect>reflect</a> the content attribute of the
+  same name.</p>
+
   <p>The <dfn id=dom-media-bufferingrate title=dom-media-bufferingRate><code>bufferingRate</code></dfn>
   attribute must return the average number of bits received per second
   for the current download over the past few seconds. If there is no

Modified: source
===================================================================
--- source	2009-02-23 10:54:24 UTC (rev 2854)
+++ source	2009-02-23 11:14:03 UTC (rev 2855)
@@ -18963,6 +18963,7 @@
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-media-src">src</code></dd>
    <dd><code title="attr-video-poster">poster</code></dd>
+   <dd><code title="attr-media-autobuffer">autobuffer</code></dd>
    <dd><code title="attr-media-autoplay">autoplay</code></dd>
    <dd><code title="attr-media-loop">loop</code></dd>
    <dd><code title="attr-media-controls">controls</code></dd>
@@ -19001,6 +19002,7 @@
   with associated audio data.</p>
 
   <p>The <code title="attr-media-src">src</code>, <code
+  title="attr-media-autobuffer">autobuffer</code>, <code
   title="attr-media-autoplay">autoplay</code>, <code
   title="attr-media-loop">loop</code>, and <code
   title="attr-media-controls">controls</code> attributes are <span
@@ -19231,6 +19233,7 @@
    <dt>Content attributes:</dt>
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-media-src">src</code></dd>
+   <dd><code title="attr-media-autobuffer">autobuffer</code></dd>
    <dd><code title="attr-media-autoplay">autoplay</code></dd>
    <dd><code title="attr-media-loop">loop</code></dd>
    <dd><code title="attr-media-controls">controls</code></dd>
@@ -19265,6 +19268,7 @@
   whose <span>media data</span> is ostensibly audio data.</p>
 
   <p>The <code title="attr-media-src">src</code>, <code
+  title="attr-media-autobuffer">autobuffer</code>, <code
   title="attr-media-autoplay">autoplay</code>, <code
   title="attr-media-loop">loop</code>, and <code
   title="attr-media-controls">controls</code> attributes are <span
@@ -19483,6 +19487,7 @@
   const unsigned short <span title="dom-media-NETWORK_LOADED">NETWORK_LOADED</span> = 3;
   const unsigned short <span title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</span> = 4;
   readonly attribute unsigned short <span title="dom-media-networkState">networkState</span>;
+           attribute boolean <span title="dom-media-autobuffer">autobuffer</span>;
   readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;
   readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;
   readonly attribute <span>TimeRanges</span> <span title="dom-media-buffered">buffered</span>;
@@ -19529,6 +19534,7 @@
 
   <p>The <dfn>media element attributes</dfn>, <code
   title="attr-media-src">src</code>, <code
+  title="attr-media-autobuffer">autobuffer</code>, <code
   title="attr-media-autoplay">autoplay</code>, <code
   title="attr-media-loop">loop</code>, and <code
   title="attr-media-controls">controls</code>, apply to all <span
@@ -20204,6 +20210,15 @@
     title="dom-media-networkState">networkState</code> to <code
     title="dom-media-NETWORK_LOADING">NETWORK_LOADING</code>.</p>
 
+    <p>The <code title="attr-media-autobuffer">autobuffer</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">autoplay</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>The user agent may use whatever means necessary to fetch the
     resource (within the constraints put forward by this and other
     specifications); for example, reconnecting to the server in the
@@ -20310,6 +20325,17 @@
        flag</span> to false. This stops <span title="delay the load
        event">delaying the load event</span>.</p></li>
 
+       <li><p class="note">This is the point at which a user agent
+       that is attempting to reduce network usage while still fetching
+       the metadata for each <span>media resource</span> would stop
+       buffering, causing the <code
+       title="dom-media-networkState">networkState</code> attribute to
+       switch to the <code
+       title="dom-media-NETWORK_IDLE">NETWORK_IDLE</code> value, if
+       the <span>media element</span> did not have an <code
+       title="attr-media-autobuffer">autobuffer</code> or <code
+       title="attr-media-autoplay">autoplay</code> attribute.</p></li>
+
       </ol>
 
       <p class="note">The user agent is <em>required</em> to
@@ -20514,6 +20540,24 @@
   title="concept-media-load-algorithm">load algorithm</span>.</p>
 
   <p>The <dfn
+  title="attr-media-autobuffer"><code>autobuffer</code></dfn>
+  attribute is a <span>boolean attribute</span>. Its presence hints to
+  the user agent that the author believes that the <span>media
+  element</span> will likely be used, even though the element does not
+  have an <code title="attr-media-autoplay">autoplay</code>
+  attribute. (The attribute has no effect if used in conjunction with
+  the <code title="attr-media-autoplay">autoplay</code> attribute,
+  though including both is not an error.) This attribute may be
+  ignored altogether. The attribute must be ignored if the <code
+  title="attr-media-autoplay">autoplay</code> attribute is
+  present.</p>
+
+  <p>The <dfn
+  title="dom-media-autobuffer"><code>autobuffer</code></dfn> DOM
+  attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
+
+  <p>The <dfn
   title="dom-media-bufferingRate"><code>bufferingRate</code></dfn>
   attribute must return the average number of bits received per second
   for the current download over the past few seconds. If there is no




More information about the Commit-Watchers mailing list