[html5] r2491 - [gow] (2) Clarify the requirement that UAs must make the 'duration' attribute ac [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Dec 1 01:53:20 PST 2008


Author: ianh
Date: 2008-12-01 01:53:20 -0800 (Mon, 01 Dec 2008)
New Revision: 2491

Modified:
   index
   source
Log:
[gow] (2) Clarify the requirement that UAs must make the 'duration' attribute accurate before playing any media..

Modified: index
===================================================================
--- index	2008-12-01 07:54:38 UTC (rev 2490)
+++ index	2008-12-01 09:53:20 UTC (rev 2491)
@@ -17568,9 +17568,14 @@
 
          </li>
 
-        </ol></dd>
+        </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
+        in the 'duration' section -->
 
+       </dd>
 
+
        <dt>If the connection is interrupted, causing the user agent to
        give up trying to fetch the resource</dt>
 
@@ -17769,19 +17774,28 @@
   <p>The <dfn id=dom-media-duration title=dom-media-duration><code>duration</code></dfn>
   attribute must return the length of the <a href=#media-resource>media resource</a>,
   in seconds. If no <a href=#media-data>media data</a> is available, then the
-  attributes must return 0. If <a href=#media-data>media data</a> is available
-  but the length is not known, the attribute must return the
-  Not-a-Number (NaN) value. If the <a href=#media-resource>media resource</a> is
-  known to be unbounded (e.g. a streaming radio), then the attribute
-  must return the positive Infinity value.</p>
+  attributes must return the Not-a-Number (NaN) value. If the
+  <a href=#media-resource>media resource</a> is known to be unbounded (e.g. a
+  streaming radio), then the attribute must return the positive
+  Infinity value.</p>
 
+  <p>The user agent must determine the duration of the <a href=#media-resource>media
+  resource</a> before playing any part of the <a href=#media-data>media
+  data</a> and before setting <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> to a value equal to
+  or greater than <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, even if doing
+  so requires seeking to multiple parts of the resource.</p>
+
   <p id=durationChange>When the length of the <a href=#media-resource>media
-  resource</a> changes (e.g. from being unknown to known, or from
-  indeterminate to known, or from a previously established length to a
-  new length) the user agent must <a href=#queue-a-task>queue a task</a> to
-  <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-durationchange><a href=#event-durationchange>durationchange</a></code> at the
+  resource</a> changes (e.g. from being unknown to known, or from a
+  previously established length to a new length) the user agent must
+  <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called
+  <code title=event-durationchange><a href=#event-durationchange>durationchange</a></code> at the
   <a href=#media-element>media element</a>.</p>
 
+  <p class=example>If an "infinite" stream ends for some reason,
+  then the duration would change from positive Infinity to the time of
+  the last frame or sample in the stream.</p>
+
   <p><a href=#media-element title="media element">Media elements</a> have a
   <dfn id=current-playback-position>current playback position</dfn>, which must initially be
   zero. The current position is a time.</p>
@@ -53925,32 +53939,32 @@
   L. Carlson, Laura Wisewell, Laurens Holst, Lee Kowalkowski, Leif
   Halvard Silli, Lenny Domnitser, Léonard Bouchet, Leons
   Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej Stachowiak,
-  Magnus Kristiansen<!-- Dashiva -->, Malcolm Rowe, Mark Nottingham,
-  Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers, Martin Atkins,
-  Martin Dürst, Martin Honnen, Masataka Yakura, Mathieu Henri,
-  Matthew Gregan, Matthew Mastracci, Matthew Raymond, Matthew Thomas,
-  Mattias Waldau, Max Romantschuk, Michael 'Ratt' Iannarelli, Michael
-  A. Nachbaur, Michael A. Puls II<!--Shadow2531-->, Michael Carter,
-  Michael Gratton, Michael Nordman, Michael Powers, Michael(tm) Smith,
-  Michel Fortin, Michiel van der Blonk, Mihai Şucan<!-- from
-  ROBO Design -->, Mike Brown, Mike Dierken<!-- S. Mike Dierken -->,
-  Mike Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen, Neil
-  Deakin, Neil Soiffer, Olaf Hoffmann, Olav Junker Kjær, Oliver
-  Hunt, Peter Karlsson, Peter Kasting, Philip Jägenstedt, Philip
-  Taylor, Philip TAYLOR<!-- a different one -->, Rachid Finge, Rajas
-  Moonka, Ralf Stoltze, Ralph Giles, Raphael Champeimont, Rene
-  Saarsoo, Richard Ishida, Rimantas Liubertas, Robert Blaut, Robert
-  O'Callahan, Robert Sayre, Roman Ivanov, Ryan King, S. Mike Dierken,
-  Sam Kuper, Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun
-  Inman, Silvia Pfeiffer, Simon Pieters, Stefan Haustein, Steffen
-  Meschkat, Stephen Ma, Steve Faulkner, Steve Runyon, Steven Garrity,
-  Stewart Brodie, Stuart Parmenter, Sunava Dutta, Tantek Çelik,
-  Terrence Wood, Thomas Broyer, Thomas O'Connor, Tim Altman, Tim
-  Johansson, Travis Leithead, Tyler Close, Vladimir
-  Vukićević, Wakaba, Wayne Pollock, Wellington Fernando
-  de Macedo, William Swanson, Wolfram Kriesing, Yi-An Huang, and
-  Øistein E. Andersen, for their useful and substantial
-  comments.</p>
+  Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm Rowe, Mark
+  Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers,
+  Martin Atkins, Martin Dürst, Martin Honnen, Masataka Yakura,
+  Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew Raymond,
+  Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
+  Iannarelli, Michael A. Nachbaur, Michael A. Puls
+  II<!--Shadow2531-->, Michael Carter, Michael Gratton, Michael
+  Nordman, Michael Powers, Michael(tm) Smith, Michel Fortin, Michiel
+  van der Blonk, Mihai Şucan<!-- from ROBO Design -->, Mike
+  Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike
+  Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin, Neil Soiffer,
+  Olaf Hoffmann, Olav Junker Kjær, Oliver Hunt, Peter Karlsson,
+  Peter Kasting, Philip Jägenstedt, Philip Taylor, Philip
+  TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka, Ralf
+  Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo, Richard
+  Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan, Robert
+  Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper, Sam
+  Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
+  Pfeiffer, Simon Pieters, Stefan Haustein, Steffen Meschkat, Stephen
+  Ma, Steve Faulkner, Steve Runyon, Steven Garrity, Stewart Brodie,
+  Stuart Parmenter, Sunava Dutta, Tantek Çelik, Terrence Wood,
+  Thomas Broyer, Thomas O'Connor, Tim Altman, Tim Johansson, Travis
+  Leithead, Tyler Close, Vladimir Vukićević, Wakaba,
+  Wayne Pollock, Wellington Fernando de Macedo, William Swanson,
+  Wolfram Kriesing, Yi-An Huang, and Øistein E. Andersen, for
+  their useful and substantial comments.</p>
 
   <p>Thanks also to everyone who has ever posted about HTML5 to their
   blogs, public mailing lists, or forums, including the <a href=http://lists.w3.org/Archives/Public/public-html/>W3C

Modified: source
===================================================================
--- source	2008-12-01 07:54:38 UTC (rev 2490)
+++ source	2008-12-01 09:53:20 UTC (rev 2491)
@@ -18934,6 +18934,11 @@
 
         </ol>
 
+        <p class="note">The user agent is <em>required</em> to
+        determine the duration of the <span>media resource</span> and
+        go through this step before playing.</p> <!-- actually defined
+        in the 'duration' section -->
+
        </dd>
 
 
@@ -19194,20 +19199,30 @@
   <p>The <dfn title="dom-media-duration"><code>duration</code></dfn>
   attribute must return the length of the <span>media resource</span>,
   in seconds. If no <span>media data</span> is available, then the
-  attributes must return 0. If <span>media data</span> is available
-  but the length is not known, the attribute must return the
-  Not-a-Number (NaN) value. If the <span>media resource</span> is
-  known to be unbounded (e.g. a streaming radio), then the attribute
-  must return the positive Infinity value.</p>
+  attributes must return the Not-a-Number (NaN) value. If the
+  <span>media resource</span> is known to be unbounded (e.g. a
+  streaming radio), then the attribute must return the positive
+  Infinity value.</p>
 
+  <p>The user agent must determine the duration of the <span>media
+  resource</span> before playing any part of the <span>media
+  data</span> and before setting <code
+  title="dom-media-readyState">readyState</code> to a value equal to
+  or greater than <code
+  title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, even if doing
+  so requires seeking to multiple parts of the resource.</p>
+
   <p id="durationChange">When the length of the <span>media
-  resource</span> changes (e.g. from being unknown to known, or from
-  indeterminate to known, or from a previously established length to a
-  new length) the user agent must <span>queue a task</span> to
-  <span>fire a simple event</span> called <code
-  title="event-durationchange">durationchange</code> at the
+  resource</span> changes (e.g. from being unknown to known, or from a
+  previously established length to a new length) the user agent must
+  <span>queue a task</span> to <span>fire a simple event</span> called
+  <code title="event-durationchange">durationchange</code> at the
   <span>media element</span>.</p>
 
+  <p class="example">If an "infinite" stream ends for some reason,
+  then the duration would change from positive Infinity to the time of
+  the last frame or sample in the stream.</p>
+
   <p><span title="media element">Media elements</span> have a
   <dfn>current playback position</dfn>, which must initially be
   zero. The current position is a time.</p>
@@ -58883,32 +58898,32 @@
   L. Carlson, Laura Wisewell, Laurens Holst, Lee Kowalkowski, Leif
   Halvard Silli, Lenny Domnitser, Léonard Bouchet, Leons
   Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej Stachowiak,
-  Magnus Kristiansen<!-- Dashiva -->, Malcolm Rowe, Mark Nottingham,
-  Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers, Martin Atkins,
-  Martin Dürst, Martin Honnen, Masataka Yakura, Mathieu Henri,
-  Matthew Gregan, Matthew Mastracci, Matthew Raymond, Matthew Thomas,
-  Mattias Waldau, Max Romantschuk, Michael 'Ratt' Iannarelli, Michael
-  A. Nachbaur, Michael A. Puls II<!--Shadow2531-->, Michael Carter,
-  Michael Gratton, Michael Nordman, Michael Powers, Michael(tm) Smith,
-  Michel Fortin, Michiel van der Blonk, Mihai &#x015E;ucan<!-- from
-  ROBO Design -->, Mike Brown, Mike Dierken<!-- S. Mike Dierken -->,
-  Mike Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen, Neil
-  Deakin, Neil Soiffer, Olaf Hoffmann, Olav Junker Kjær, Oliver
-  Hunt, Peter Karlsson, Peter Kasting, Philip Jägenstedt, Philip
-  Taylor, Philip TAYLOR<!-- a different one -->, Rachid Finge, Rajas
-  Moonka, Ralf Stoltze, Ralph Giles, Raphael Champeimont, Rene
-  Saarsoo, Richard Ishida, Rimantas Liubertas, Robert Blaut, Robert
-  O'Callahan, Robert Sayre, Roman Ivanov, Ryan King, S. Mike Dierken,
-  Sam Kuper, Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun
-  Inman, Silvia Pfeiffer, Simon Pieters, Stefan Haustein, Steffen
-  Meschkat, Stephen Ma, Steve Faulkner, Steve Runyon, Steven Garrity,
-  Stewart Brodie, Stuart Parmenter, Sunava Dutta, Tantek Çelik,
-  Terrence Wood, Thomas Broyer, Thomas O'Connor, Tim Altman, Tim
-  Johansson, Travis Leithead, Tyler Close, Vladimir
-  Vuki&#x0107;evi&#x0107;, Wakaba, Wayne Pollock, Wellington Fernando
-  de Macedo, William Swanson, Wolfram Kriesing, Yi-An Huang, and
-  Øistein E. Andersen, for their useful and substantial
-  comments.</p>
+  Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm Rowe, Mark
+  Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers,
+  Martin Atkins, Martin Dürst, Martin Honnen, Masataka Yakura,
+  Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew Raymond,
+  Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
+  Iannarelli, Michael A. Nachbaur, Michael A. Puls
+  II<!--Shadow2531-->, Michael Carter, Michael Gratton, Michael
+  Nordman, Michael Powers, Michael(tm) Smith, Michel Fortin, Michiel
+  van der Blonk, Mihai &#x015E;ucan<!-- from ROBO Design -->, Mike
+  Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike
+  Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin, Neil Soiffer,
+  Olaf Hoffmann, Olav Junker Kjær, Oliver Hunt, Peter Karlsson,
+  Peter Kasting, Philip Jägenstedt, Philip Taylor, Philip
+  TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka, Ralf
+  Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo, Richard
+  Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan, Robert
+  Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper, Sam
+  Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
+  Pfeiffer, Simon Pieters, Stefan Haustein, Steffen Meschkat, Stephen
+  Ma, Steve Faulkner, Steve Runyon, Steven Garrity, Stewart Brodie,
+  Stuart Parmenter, Sunava Dutta, Tantek Çelik, Terrence Wood,
+  Thomas Broyer, Thomas O'Connor, Tim Altman, Tim Johansson, Travis
+  Leithead, Tyler Close, Vladimir Vuki&#x0107;evi&#x0107;, Wakaba,
+  Wayne Pollock, Wellington Fernando de Macedo, William Swanson,
+  Wolfram Kriesing, Yi-An Huang, and Øistein E. Andersen, for
+  their useful and substantial comments.</p>
 
   <p>Thanks also to everyone who has ever posted about HTML5 to their
   blogs, public mailing lists, or forums, including the <a




More information about the Commit-Watchers mailing list