html5/spec Overview.html,1.1667,1.1668

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv9635

Modified Files:
	Overview.html 
Log Message:
Prevent firing double 'waiting' events in play(). Make sure we fire a 'timeupdate' when we begin playing, even if we only paused very briefly. (whatwg r2497)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1667
retrieving revision 1.1668
diff -u -d -r1.1667 -r1.1668
--- Overview.html	1 Dec 2008 11:36:37 -0000	1.1667
+++ Overview.html	1 Dec 2008 12:08:27 -0000	1.1668
@@ -14781,7 +14781,8 @@
     <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> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
-    element</a>.</p>
+    element</a>.</p> <!-- if we're already playing at this point,
+    it might also fire 'waiting' -->
 
    </li>
 
@@ -14792,19 +14793,17 @@
 
     <p>If this changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, 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-play><a href=#event-play>play</a></code> at the element.</p>
+    called <code title=event-play><a href=#event-play>play</a></code> at the element; if, in
+    addition, the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
+    value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, the
+    user agent must also <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-waiting><a href=#event-waiting>waiting</a></code> at the element.</p>
 
    </li>
 
    <li><p>The <a href=#media-element>media element</a>'s <a href=#autoplaying-flag>autoplaying
    flag</a> must be set to false.</li>
 
-   <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> attribute has a
-   value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, 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-waiting><a href=#event-waiting>waiting</a></code> at
-   the element.</li>
-
    <li><p>The method must then return.</li>
 
   </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
@@ -14888,13 +14887,16 @@
    steps.</li>
 
    <li><p>If the time was reached through the usual monotonic increase
-   of the current playback position during normal playback, and if the
-   user agent has not fired a <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> event at the element in
-   the past 15 to 250ms, the user agent must then <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-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the element. (In the
-   other cases, such as explicit seeks, relevant events get fired as
-   part of the overall process of changing the current playback
-   position.)</p>
+   of the current playback position during normal playback, and if
+   either the user agent has not fired a <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> event at the element in
+   the past 15 to 250ms, or there has been an instant since the last
+   time such an event was fired that the element was not
+   <a href=#potentially-playing>potentially playing</a>, then 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-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the
+   element. (In the other cases, such as explicit seeks, relevant
+   events get fired as part of the overall process of changing the
+   current playback position.)</p>
 
    <p class=note>The event thus is not to be fired faster than about
    66Hz or slower than 4Hz. User agents are encouraged to vary the

Received on Monday, 1 December 2008 12:08:40 UTC