[html5] r6531 - [giow] (1) Make video.currentTime return a stable value rather than the current [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Aug 29 00:32:34 PDT 2011


Author: ianh
Date: 2011-08-29 00:32:31 -0700 (Mon, 29 Aug 2011)
New Revision: 6531

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Make video.currentTime return a stable value rather than the current value. This lets us make setting this attribute always seem to work, so authors don't find the attribute hasn't changed after they set it.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12541

Modified: complete.html
===================================================================
--- complete.html	2011-08-26 20:10:46 UTC (rev 6530)
+++ complete.html	2011-08-29 07:32:31 UTC (rev 6531)
@@ -239,7 +239,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 26 August 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 29 August 2011</h2>
    </hgroup><dl><dt>Multiple-page version:</dt>
     <dd><a href=http://www.whatwg.org/specs/web-apps/current-work/complete/>http://www.whatwg.org/specs/web-apps/current-work/complete/</a></dd>
     <dt>One-page version:</dt>
@@ -27285,7 +27285,9 @@
 
       <p>Set the <a href=#current-playback-position>current playback position</a> to 0.</p>
 
-      <p>If this changed the <a href=#current-playback-position>current playback position</a>,
+      <p>Set the <a href=#official-playback-position>official playback position</a> to 0.</p>
+
+      <p>If this changed the <a href=#official-playback-position>official playback position</a>,
       then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
       event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
       <a href=#media-element>media element</a>.</p>
@@ -27759,8 +27761,9 @@
 
        </li>
 
-       <li><p>Set the <a href=#current-playback-position>current playback position</a> to the
-       <a href=#earliest-possible-position>earliest possible position</a>.</li>
+       <li><p>Set the <a href=#current-playback-position>current playback position</a> and the
+       <a href=#official-playback-position>official playback position</a> to the <a href=#earliest-possible-position>earliest
+       possible position</a>.</li>
 
        <li>
 
@@ -27801,9 +27804,7 @@
         <p>If either the <a href=#media-resource>media resource</a> or the address of
         the <var title="">current media resource</var> indicate a
         particular start time, then set the <a href=#initial-playback-position>initial playback
-        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
-        (if the position is out of range, it is effectively
-        ignored).</p>
+        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true.</p>
 
         <p class=example>For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -27835,16 +27836,15 @@
        <a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
        <a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
        element</a> to the <a href=#media-controller-position>media controller position</a>,
-       relative to the <a href=#media-element>media element</a>'s timeline,
-       discarding any resulting exceptions.</li> <!-- i.e. "bring
-       the media element up to speed with its new media controller"
-       --> <!-- we do this because otherwise the fragment identifier
-       initial position is lost. Basically this means that if you are
-       attached to a media controller when you load your resource, and
-       you have a fragment identifier with a start time, you'll jump
-       the media controller to that time if it's not already past it.
-       (So if there are several, you'll jump the media controller to
-       the furthest one in the timeline.) -->
+       relative to the <a href=#media-element>media element</a>'s timeline.</li>
+       <!-- i.e. "bring the media element up to speed with its new
+       media controller" --> <!-- we do this because otherwise the
+       fragment identifier initial position is lost. Basically this
+       means that if you are attached to a media controller when you
+       load your resource, and you have a fragment identifier with a
+       start time, you'll jump the media controller to that time if
+       it's not already past it. (So if there are several, you'll jump
+       the media controller to the furthest one in the timeline.) -->
 
        <li>
 
@@ -28180,7 +28180,7 @@
 
    <dd>
 
-    <p>Returns the <a href=#current-playback-position>current playback position</a>, in seconds.</p>
+    <p>Returns the <a href=#official-playback-position>official playback position</a>, in seconds.</p>
 
     <p>Can be set, to seek to the given time.<p>
 
@@ -28290,15 +28290,23 @@
   <a href=#current-playback-position>current playback position</a> is a time on the <a href=#media-timeline>media
   timeline</a>.</p>
 
+  <p><a href=#media-element title="media element">Media elements</a> also have an
+  <dfn id=official-playback-position>official playback position</dfn>, which must initially be set
+  to zero seconds. The <a href=#official-playback-position>official playback position</a> is an
+  approximation of the <a href=#current-playback-position>current playback position</a>
+  that is kept stable while scripts are running.</p>
+
   <p>The <dfn id=dom-media-currenttime title=dom-media-currentTime><code>currentTime</code></dfn>
-  attribute must, on getting, return the <a href=#current-playback-position>current playback
-  position</a>, expressed in seconds. On setting,
-  if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
-  controller</a>, then it must throw an
-  <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise,
-  the user agent
-  must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the new value
-  (which might raise an exception).</p>
+  attribute must, on getting, return the <a href=#official-playback-position>official playback
+  position</a>, expressed in seconds. On setting, if the
+  <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+  controller</a>, then the user agent must throw an
+  <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise, if the
+  <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then it must
+  raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise, the it
+  must set the <a href=#official-playback-position>official playback position</a> to the new
+  value and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to the new
+  value.</p>
 
   <p><a href=#media-element title="media element">Media elements</a> have an
   <dfn id=initial-playback-position>initial playback position</dfn>, which must initially (i.e. in
@@ -28871,7 +28879,8 @@
    true.</li>
 
    <li><p>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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
+   a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+   element.</li>
 
    <li><p>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> named <code title=event-media-ended><a href=#event-media-ended>ended</a></code>
@@ -28885,7 +28894,8 @@
   <ol><li><p>Stop playback.</li>
 
    <li><p>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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
+   a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+   element.</li>
 
   </ol><hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
   attribute gives the desired speed at which the <a href=#media-resource>media
@@ -28953,9 +28963,9 @@
 
     <p class=note>This <a href=#seekUpdate>will cause</a> the user
     agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-    event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
-    element</a>.</p> <!-- if we're already playing at this point,
-    it might also fire 'waiting' -->
+    event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+    <a href=#media-element>media element</a>.</p> <!-- if we're already playing at
+    this point, it might also fire 'waiting' -->
 
    </li>
 
@@ -29028,6 +29038,9 @@
      event</a> named <code title=event-media-pause><a href=#event-media-pause>pause</a></code>
      at the element.</li>
 
+     <li><p>Set the <a href=#official-playback-position>official playback position</a> to the
+     <a href=#current-playback-position>current playback position</a>.</li>
+
     </ol></li>
 
    <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
@@ -29073,6 +29086,11 @@
   playback rate) the client doesn't actually have to drop or
   interpolate any frames.</p>
 
+  <p>Any time the user agent <a href=#provide-a-stable-state title="provide a stable
+  state">provides a stable state</a>, the <a href=#official-playback-position>official playback
+  position</a> must be set to the <a href=#current-playback-position>current playback
+  position</a>.</p>
+
   <p>When the <a href=#direction-of-playback>direction of playback</a> is backwards, any
   corresponding audio must be muted. When the <a href=#effective-playback-rate>effective playback
   rate</a> is so low or so high that the user agent cannot play
@@ -29350,10 +29368,8 @@
   loop</a> algorithm). Steps in that section are marked with
   ⌛.</p>
 
-  <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then raise an
-   <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception (if the seek was in
-   response to a DOM method call or setting of an IDL attribute), and
-   abort these steps.</li>
+  <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these
+   steps.</li>
 
    <li><p>If the element's <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute is true,
    then another instance of this algorithm is already running. Abort
@@ -29406,6 +29422,11 @@
     element.</p> <!-- also, timeupdate -->
     <!-- also, it will do the "report the controller state" thing -->
 
+    <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does
+    not get updated asynchronously, as it returns the <a href=#official-playback-position>official
+    playback position</a>, not the <a href=#current-playback-position>current playback
+    position</a>.</p>
+
    </li>
 
    <li><p>Wait until the user agent has established whether or not the
@@ -30410,7 +30431,7 @@
   speed with its new media controller</dfn>, it must <a href=#dom-media-seek title=dom-media-seek>seek</a> that <a href=#media-element>media element</a>
   to the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#media-controller-position>media controller
   position</a> relative to the <a href=#media-element>media element</a>'s
-  timeline, discarding any resulting exceptions.</p>
+  timeline.</p>
 
   <p>When the user agent is to <dfn id=seek-the-media-controller>seek the media controller</dfn> to
   a particular <var title="">new playback position</var>, it must
@@ -30427,9 +30448,8 @@
 
    <li><p><a href=#dom-media-seek title=dom-media-seek>Seek</a> each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> to the
    <var title="">new playback position</var> relative to the
-   <a href=#media-element>media element</a> timeline, discarding any resulting
-   exceptions.</li> <!-- i.e. "bring the media element up to speed
-   with its new media controller" -->
+   <a href=#media-element>media element</a> timeline.</li> <!-- i.e. "bring the
+   media element up to speed with its new media controller" -->
 
   </ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media
   controller</dfn> if the <code><a href=#mediacontroller>MediaController</a></code> is a

Modified: index
===================================================================
--- index	2011-08-26 20:10:46 UTC (rev 6530)
+++ index	2011-08-29 07:32:31 UTC (rev 6531)
@@ -243,7 +243,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 26 August 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 29 August 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -27152,7 +27152,9 @@
 
       <p>Set the <a href=#current-playback-position>current playback position</a> to 0.</p>
 
-      <p>If this changed the <a href=#current-playback-position>current playback position</a>,
+      <p>Set the <a href=#official-playback-position>official playback position</a> to 0.</p>
+
+      <p>If this changed the <a href=#official-playback-position>official playback position</a>,
       then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
       event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
       <a href=#media-element>media element</a>.</p>
@@ -27626,8 +27628,9 @@
 
        </li>
 
-       <li><p>Set the <a href=#current-playback-position>current playback position</a> to the
-       <a href=#earliest-possible-position>earliest possible position</a>.</li>
+       <li><p>Set the <a href=#current-playback-position>current playback position</a> and the
+       <a href=#official-playback-position>official playback position</a> to the <a href=#earliest-possible-position>earliest
+       possible position</a>.</li>
 
        <li>
 
@@ -27668,9 +27671,7 @@
         <p>If either the <a href=#media-resource>media resource</a> or the address of
         the <var title="">current media resource</var> indicate a
         particular start time, then set the <a href=#initial-playback-position>initial playback
-        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
-        (if the position is out of range, it is effectively
-        ignored).</p>
+        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true.</p>
 
         <p class=example>For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -27702,16 +27703,15 @@
        <a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
        <a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
        element</a> to the <a href=#media-controller-position>media controller position</a>,
-       relative to the <a href=#media-element>media element</a>'s timeline,
-       discarding any resulting exceptions.</li> <!-- i.e. "bring
-       the media element up to speed with its new media controller"
-       --> <!-- we do this because otherwise the fragment identifier
-       initial position is lost. Basically this means that if you are
-       attached to a media controller when you load your resource, and
-       you have a fragment identifier with a start time, you'll jump
-       the media controller to that time if it's not already past it.
-       (So if there are several, you'll jump the media controller to
-       the furthest one in the timeline.) -->
+       relative to the <a href=#media-element>media element</a>'s timeline.</li>
+       <!-- i.e. "bring the media element up to speed with its new
+       media controller" --> <!-- we do this because otherwise the
+       fragment identifier initial position is lost. Basically this
+       means that if you are attached to a media controller when you
+       load your resource, and you have a fragment identifier with a
+       start time, you'll jump the media controller to that time if
+       it's not already past it. (So if there are several, you'll jump
+       the media controller to the furthest one in the timeline.) -->
 
        <li>
 
@@ -28047,7 +28047,7 @@
 
    <dd>
 
-    <p>Returns the <a href=#current-playback-position>current playback position</a>, in seconds.</p>
+    <p>Returns the <a href=#official-playback-position>official playback position</a>, in seconds.</p>
 
     <p>Can be set, to seek to the given time.<p>
 
@@ -28157,15 +28157,23 @@
   <a href=#current-playback-position>current playback position</a> is a time on the <a href=#media-timeline>media
   timeline</a>.</p>
 
+  <p><a href=#media-element title="media element">Media elements</a> also have an
+  <dfn id=official-playback-position>official playback position</dfn>, which must initially be set
+  to zero seconds. The <a href=#official-playback-position>official playback position</a> is an
+  approximation of the <a href=#current-playback-position>current playback position</a>
+  that is kept stable while scripts are running.</p>
+
   <p>The <dfn id=dom-media-currenttime title=dom-media-currentTime><code>currentTime</code></dfn>
-  attribute must, on getting, return the <a href=#current-playback-position>current playback
-  position</a>, expressed in seconds. On setting,
-  if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
-  controller</a>, then it must throw an
-  <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise,
-  the user agent
-  must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the new value
-  (which might raise an exception).</p>
+  attribute must, on getting, return the <a href=#official-playback-position>official playback
+  position</a>, expressed in seconds. On setting, if the
+  <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+  controller</a>, then the user agent must throw an
+  <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise, if the
+  <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then it must
+  raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception; otherwise, the it
+  must set the <a href=#official-playback-position>official playback position</a> to the new
+  value and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to the new
+  value.</p>
 
   <p><a href=#media-element title="media element">Media elements</a> have an
   <dfn id=initial-playback-position>initial playback position</dfn>, which must initially (i.e. in
@@ -28738,7 +28746,8 @@
    true.</li>
 
    <li><p>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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
+   a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+   element.</li>
 
    <li><p>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> named <code title=event-media-ended><a href=#event-media-ended>ended</a></code>
@@ -28752,7 +28761,8 @@
   <ol><li><p>Stop playback.</li>
 
    <li><p>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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
+   a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+   element.</li>
 
   </ol><hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
   attribute gives the desired speed at which the <a href=#media-resource>media
@@ -28820,9 +28830,9 @@
 
     <p class=note>This <a href=#seekUpdate>will cause</a> the user
     agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-    event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
-    element</a>.</p> <!-- if we're already playing at this point,
-    it might also fire 'waiting' -->
+    event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+    <a href=#media-element>media element</a>.</p> <!-- if we're already playing at
+    this point, it might also fire 'waiting' -->
 
    </li>
 
@@ -28895,6 +28905,9 @@
      event</a> named <code title=event-media-pause><a href=#event-media-pause>pause</a></code>
      at the element.</li>
 
+     <li><p>Set the <a href=#official-playback-position>official playback position</a> to the
+     <a href=#current-playback-position>current playback position</a>.</li>
+
     </ol></li>
 
    <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
@@ -28940,6 +28953,11 @@
   playback rate) the client doesn't actually have to drop or
   interpolate any frames.</p>
 
+  <p>Any time the user agent <a href=#provide-a-stable-state title="provide a stable
+  state">provides a stable state</a>, the <a href=#official-playback-position>official playback
+  position</a> must be set to the <a href=#current-playback-position>current playback
+  position</a>.</p>
+
   <p>When the <a href=#direction-of-playback>direction of playback</a> is backwards, any
   corresponding audio must be muted. When the <a href=#effective-playback-rate>effective playback
   rate</a> is so low or so high that the user agent cannot play
@@ -29217,10 +29235,8 @@
   loop</a> algorithm). Steps in that section are marked with
   ⌛.</p>
 
-  <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then raise an
-   <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception (if the seek was in
-   response to a DOM method call or setting of an IDL attribute), and
-   abort these steps.</li>
+  <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these
+   steps.</li>
 
    <li><p>If the element's <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute is true,
    then another instance of this algorithm is already running. Abort
@@ -29273,6 +29289,11 @@
     element.</p> <!-- also, timeupdate -->
     <!-- also, it will do the "report the controller state" thing -->
 
+    <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does
+    not get updated asynchronously, as it returns the <a href=#official-playback-position>official
+    playback position</a>, not the <a href=#current-playback-position>current playback
+    position</a>.</p>
+
    </li>
 
    <li><p>Wait until the user agent has established whether or not the
@@ -30277,7 +30298,7 @@
   speed with its new media controller</dfn>, it must <a href=#dom-media-seek title=dom-media-seek>seek</a> that <a href=#media-element>media element</a>
   to the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#media-controller-position>media controller
   position</a> relative to the <a href=#media-element>media element</a>'s
-  timeline, discarding any resulting exceptions.</p>
+  timeline.</p>
 
   <p>When the user agent is to <dfn id=seek-the-media-controller>seek the media controller</dfn> to
   a particular <var title="">new playback position</var>, it must
@@ -30294,9 +30315,8 @@
 
    <li><p><a href=#dom-media-seek title=dom-media-seek>Seek</a> each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> to the
    <var title="">new playback position</var> relative to the
-   <a href=#media-element>media element</a> timeline, discarding any resulting
-   exceptions.</li> <!-- i.e. "bring the media element up to speed
-   with its new media controller" -->
+   <a href=#media-element>media element</a> timeline.</li> <!-- i.e. "bring the
+   media element up to speed with its new media controller" -->
 
   </ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media
   controller</dfn> if the <code><a href=#mediacontroller>MediaController</a></code> is a

Modified: source
===================================================================
--- source	2011-08-26 20:10:46 UTC (rev 6530)
+++ source	2011-08-29 07:32:31 UTC (rev 6531)
@@ -29430,7 +29430,9 @@
 
       <p>Set the <span>current playback position</span> to 0.</p>
 
-      <p>If this changed the <span>current playback position</span>,
+      <p>Set the <span>official playback position</span> to 0.</p>
+
+      <p>If this changed the <span>official playback position</span>,
       then <span>queue a task</span> to <span>fire a simple
       event</span> named <code
       title="event-media-timeupdate">timeupdate</code> at the
@@ -30016,8 +30018,9 @@
 
        </li>
 
-       <li><p>Set the <span>current playback position</span> to the
-       <span>earliest possible position</span>.</p></li>
+       <li><p>Set the <span>current playback position</span> and the
+       <span>official playback position</span> to the <span>earliest
+       possible position</span>.</p></li>
 
        <li>
 
@@ -30069,9 +30072,7 @@
         particular start time, then set the <span>initial playback
         position</span> to that time, <span
         title="dom-media-seek">seek</span> to that time, and let <var
-        title="">jumped</var> be true. Ignore any resulting exceptions
-        (if the position is out of range, it is effectively
-        ignored).</p>
+        title="">jumped</var> be true.</p>
 
         <p class="example">For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -30106,16 +30107,15 @@
        <span>current media controller</span>'s timeline; otherwise,
        <span title="dom-media-seek">seek</span> the <span>media
        element</span> to the <span>media controller position</span>,
-       relative to the <span>media element</span>'s timeline,
-       discarding any resulting exceptions.</p></li> <!-- i.e. "bring
-       the media element up to speed with its new media controller"
-       --> <!-- we do this because otherwise the fragment identifier
-       initial position is lost. Basically this means that if you are
-       attached to a media controller when you load your resource, and
-       you have a fragment identifier with a start time, you'll jump
-       the media controller to that time if it's not already past it.
-       (So if there are several, you'll jump the media controller to
-       the furthest one in the timeline.) -->
+       relative to the <span>media element</span>'s timeline.</p></li>
+       <!-- i.e. "bring the media element up to speed with its new
+       media controller" --> <!-- we do this because otherwise the
+       fragment identifier initial position is lost. Basically this
+       means that if you are attached to a media controller when you
+       load your resource, and you have a fragment identifier with a
+       start time, you'll jump the media controller to that time if
+       it's not already past it. (So if there are several, you'll jump
+       the media controller to the furthest one in the timeline.) -->
 
        <li>
 
@@ -30528,7 +30528,7 @@
 
    <dd>
 
-    <p>Returns the <span>current playback position</span>, in seconds.</p>
+    <p>Returns the <span>official playback position</span>, in seconds.</p>
 
     <p>Can be set, to seek to the given time.<p>
 
@@ -30643,16 +30643,26 @@
   <span>current playback position</span> is a time on the <span>media
   timeline</span>.</p>
 
+  <p><span title="media element">Media elements</span> also have an
+  <dfn>official playback position</dfn>, which must initially be set
+  to zero seconds. The <span>official playback position</span> is an
+  approximation of the <span>current playback position</span>
+  that is kept stable while scripts are running.</p>
+
   <p>The <dfn
   title="dom-media-currentTime"><code>currentTime</code></dfn>
-  attribute must, on getting, return the <span>current playback
-  position</span>, expressed in seconds. On setting,
-  if the <span>media element</span> has a <span>current media
-  controller</span>, then it must throw an
-  <code>INVALID_STATE_ERR</code> exception; otherwise,
-  the user agent
-  must <span title="dom-media-seek">seek</span> to the new value
-  (which might raise an exception).</p>
+  attribute must, on getting, return the <span>official playback
+  position</span>, expressed in seconds. On setting, if the
+  <span>media element</span> has a <span>current media
+  controller</span>, then the user agent must throw an
+  <code>INVALID_STATE_ERR</code> exception; otherwise, if the
+  <span>media element</span>'s <code
+  title="dom-media-readyState">readyState</code> is <code
+  title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then it must
+  raise an <code>INVALID_STATE_ERR</code> exception; otherwise, the it
+  must set the <span>official playback position</span> to the new
+  value and then <span title="dom-media-seek">seek</span> to the new
+  value.</p>
 
   <p><span title="media element">Media elements</span> have an
   <dfn>initial playback position</dfn>, which must initially (i.e. in
@@ -31333,7 +31343,8 @@
 
    <li><p>The user agent must <span>queue a task</span> to <span>fire
    a simple event</span> named <code
-   title="event-media-timeupdate">timeupdate</code> at the element.</p></li>
+   title="event-media-timeupdate">timeupdate</code> at the
+   element.</p></li>
 
    <li><p>The user agent must <span>queue a task</span> to <span>fire
    a simple event</span> named <code title="event-media-ended">ended</code>
@@ -31352,7 +31363,8 @@
 
    <li><p>The user agent must <span>queue a task</span> to <span>fire
    a simple event</span> named <code
-   title="event-media-timeupdate">timeupdate</code> at the element.</p></li>
+   title="event-media-timeupdate">timeupdate</code> at the
+   element.</p></li>
 
   </ol>
 
@@ -31441,9 +31453,9 @@
     <p class="note">This <a href="#seekUpdate">will cause</a> the user
     agent to <span>queue a task</span> to <span>fire a simple
     event</span> named <code
-    title="event-media-timeupdate">timeupdate</code> at the <span>media
-    element</span>.</p> <!-- if we're already playing at this point,
-    it might also fire 'waiting' -->
+    title="event-media-timeupdate">timeupdate</code> at the
+    <span>media element</span>.</p> <!-- if we're already playing at
+    this point, it might also fire 'waiting' -->
 
    </li>
 
@@ -31541,6 +31553,9 @@
      event</span> named <code title="event-media-pause">pause</code>
      at the element.</p></li>
 
+     <li><p>Set the <span>official playback position</span> to the
+     <span>current playback position</span>.</p></li>
+
     </ol>
 
    </li>
@@ -31594,6 +31609,11 @@
   playback rate) the client doesn't actually have to drop or
   interpolate any frames.</p>
 
+  <p>Any time the user agent <span title="provide a stable
+  state">provides a stable state</span>, the <span>official playback
+  position</span> must be set to the <span>current playback
+  position</span>.</p>
+
   <p>When the <span>direction of playback</span> is backwards, any
   corresponding audio must be muted. When the <span>effective playback
   rate</span> is so low or so high that the user agent cannot play
@@ -31931,10 +31951,8 @@
 
    <li><p>If the <span>media element</span>'s <code
    title="dom-media-readyState">readyState</code> is <code
-   title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then raise an
-   <code>INVALID_STATE_ERR</code> exception (if the seek was in
-   response to a DOM method call or setting of an IDL attribute), and
-   abort these steps.</p></li>
+   title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, abort these
+   steps.</p></li>
 
    <li><p>If the element's <code
    title="dom-media-seeking">seeking</code> IDL attribute is true,
@@ -31994,6 +32012,12 @@
     element.</p> <!-- also, timeupdate -->
     <!-- also, it will do the "report the controller state" thing -->
 
+    <p class="note">The <code
+    title="dom-media-currentTime">currentTime</code> attribute does
+    not get updated asynchronously, as it returns the <span>official
+    playback position</span>, not the <span>current playback
+    position</span>.</p>
+
    </li>
 
    <li><p>Wait until the user agent has established whether or not the
@@ -33108,7 +33132,7 @@
   title="dom-media-seek">seek</span> that <span>media element</span>
   to the <code>MediaController</code>'s <span>media controller
   position</span> relative to the <span>media element</span>'s
-  timeline, discarding any resulting exceptions.</p>
+  timeline.</p>
 
   <p>When the user agent is to <dfn>seek the media controller</dfn> to
   a particular <var title="">new playback position</var>, it must
@@ -33129,9 +33153,8 @@
    <li><p><span title="dom-media-seek">Seek</span> each <span
    title="slaved media elements">slaved media element</span> to the
    <var title="">new playback position</var> relative to the
-   <span>media element</span> timeline, discarding any resulting
-   exceptions.</p></li> <!-- i.e. "bring the media element up to speed
-   with its new media controller" -->
+   <span>media element</span> timeline.</p></li> <!-- i.e. "bring the
+   media element up to speed with its new media controller" -->
 
   </ol>
 




More information about the Commit-Watchers mailing list