[html5] r6017 - [giow] (0) Make 'playing' fire even if the video is paused for user interaction, [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Apr 15 14:15:10 PDT 2011


Author: ianh
Date: 2011-04-15 14:15:08 -0700 (Fri, 15 Apr 2011)
New Revision: 6017

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Make 'playing' fire even if the video is paused for user interaction, since otherwise you never get that event, which could be rather confusing for authors. Sadly this makes 'playing' somewhat redundant with a combination of 'canplay', 'canplaythrough', and 'play', but it's probably still useful enough.

Modified: complete.html
===================================================================
--- complete.html	2011-04-15 20:57:29 UTC (rev 6016)
+++ complete.html	2011-04-15 21:15:08 UTC (rev 6017)
@@ -27744,9 +27744,9 @@
     <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-canplay><a href=#event-media-canplay>canplay</a></code>.</p>
 
-    <p>If the element is <a href=#potentially-playing>potentially playing</a>, 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-playing><a href=#event-media-playing>playing</a></code>.</p>
+    <p>If the element's <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
+    attribute is false, 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-playing><a href=#event-media-playing>playing</a></code>.</p>
 
    </dd>
 
@@ -27757,9 +27757,10 @@
 
     <p>If the previous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or
     less, 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-canplay><a href=#event-media-canplay>canplay</a></code>, and, if the element is also
-    <a href=#potentially-playing>potentially playing</a>, <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-playing><a href=#event-media-playing>playing</a></code>.</p>
+    a simple event</a> named <code title=event-media-canplay><a href=#event-media-canplay>canplay</a></code>, and, if the element's
+    <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is false,
+    <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-playing><a href=#event-media-playing>playing</a></code>.</p>
 
     <p>If the <a href=#autoplaying-flag>autoplaying flag</a> is true, and the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, and the
     <a href=#media-element>media element</a> has an <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute specified,
@@ -28152,10 +28153,10 @@
 
       <p>Otherwise, the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has the
       value <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> or
-      <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>; if
-      the <a href=#media-element>media element</a> is <a href=#potentially-playing>potentially
-      playing</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-playing><a href=#event-media-playing>playing</a></code> at the element.</p>
+      <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>:
+      <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-playing><a href=#event-media-playing>playing</a></code> at the
+      element.</p>
 
      </li>
 
@@ -33087,13 +33088,12 @@
      <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>.
     <tr><td><dfn id=event-media-playing title=event-media-playing><code>playing</code></dfn>
      <td><code><a href=#event>Event</a></code>
-     <td>Playback has started after having been delayed due to lack of <a href=#media-data>media data</a>.
-     <td>The element is newly <a href=#potentially-playing>potentially playing</a>, either because <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, or because <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false. It is possible for playback to start without this event firing, e.g. if when playback would have started, 
+     <td>Playback is ready to start after having been paused or delayed due to lack of <a href=#media-data>media data</a>.
+     <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> and <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false, or <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false and <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>. Even if this event fires, the element might still not be <a href=#potentially-playing>potentially playing</a>, e.g. if
 <!--CONTROLLER-->
-     the element was <a href=#blocked-on-its-media-controller>blocked on its media controller</a>, or
+     the element is <a href=#blocked-on-its-media-controller>blocked on its media controller</a> (e.g. because the <a href=#current-media-controller>current media controller</a> is paused, or another <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> is stalled somehow, or because the <a href=#media-resource>media resource</a> has no data corresponding to the <a href=#media-controller-position>media controller position</a>), or
 <!--CONTROLLER-->
-     the element had been <a href=#paused-for-user-interaction>paused for user interaction</a>.
-     <!-- XXXXX we should change this so that 'playing' fires in those three cases too (when readyState/paused change, not when playback actually starts) -->
+     the element is <a href=#paused-for-user-interaction>paused for user interaction</a>.
     <tr><td><dfn id=event-media-waiting title=event-media-waiting><code>waiting</code></dfn>
      <td><code><a href=#event>Event</a></code>
      <td>Playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course.

Modified: index
===================================================================
--- index	2011-04-15 20:57:29 UTC (rev 6016)
+++ index	2011-04-15 21:15:08 UTC (rev 6017)
@@ -27756,9 +27756,9 @@
     <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-canplay><a href=#event-media-canplay>canplay</a></code>.</p>
 
-    <p>If the element is <a href=#potentially-playing>potentially playing</a>, 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-playing><a href=#event-media-playing>playing</a></code>.</p>
+    <p>If the element's <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
+    attribute is false, 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-playing><a href=#event-media-playing>playing</a></code>.</p>
 
    </dd>
 
@@ -27769,9 +27769,10 @@
 
     <p>If the previous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or
     less, 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-canplay><a href=#event-media-canplay>canplay</a></code>, and, if the element is also
-    <a href=#potentially-playing>potentially playing</a>, <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-playing><a href=#event-media-playing>playing</a></code>.</p>
+    a simple event</a> named <code title=event-media-canplay><a href=#event-media-canplay>canplay</a></code>, and, if the element's
+    <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is false,
+    <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-playing><a href=#event-media-playing>playing</a></code>.</p>
 
     <p>If the <a href=#autoplaying-flag>autoplaying flag</a> is true, and the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, and the
     <a href=#media-element>media element</a> has an <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute specified,
@@ -28164,10 +28165,10 @@
 
       <p>Otherwise, the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has the
       value <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> or
-      <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>; if
-      the <a href=#media-element>media element</a> is <a href=#potentially-playing>potentially
-      playing</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-playing><a href=#event-media-playing>playing</a></code> at the element.</p>
+      <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>:
+      <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-playing><a href=#event-media-playing>playing</a></code> at the
+      element.</p>
 
      </li>
 
@@ -33099,13 +33100,12 @@
      <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>.
     <tr><td><dfn id=event-media-playing title=event-media-playing><code>playing</code></dfn>
      <td><code><a href=#event>Event</a></code>
-     <td>Playback has started after having been delayed due to lack of <a href=#media-data>media data</a>.
-     <td>The element is newly <a href=#potentially-playing>potentially playing</a>, either because <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, or because <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false. It is possible for playback to start without this event firing, e.g. if when playback would have started, 
+     <td>Playback is ready to start after having been paused or delayed due to lack of <a href=#media-data>media data</a>.
+     <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> and <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false, or <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false and <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>. Even if this event fires, the element might still not be <a href=#potentially-playing>potentially playing</a>, e.g. if
 <!--CONTROLLER-->
-     the element was <a href=#blocked-on-its-media-controller>blocked on its media controller</a>, or
+     the element is <a href=#blocked-on-its-media-controller>blocked on its media controller</a> (e.g. because the <a href=#current-media-controller>current media controller</a> is paused, or another <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> is stalled somehow, or because the <a href=#media-resource>media resource</a> has no data corresponding to the <a href=#media-controller-position>media controller position</a>), or
 <!--CONTROLLER-->
-     the element had been <a href=#paused-for-user-interaction>paused for user interaction</a>.
-     <!-- XXXXX we should change this so that 'playing' fires in those three cases too (when readyState/paused change, not when playback actually starts) -->
+     the element is <a href=#paused-for-user-interaction>paused for user interaction</a>.
     <tr><td><dfn id=event-media-waiting title=event-media-waiting><code>waiting</code></dfn>
      <td><code><a href=#event>Event</a></code>
      <td>Playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course.

Modified: source
===================================================================
--- source	2011-04-15 20:57:29 UTC (rev 6016)
+++ source	2011-04-15 21:15:08 UTC (rev 6017)
@@ -30151,9 +30151,9 @@
     simple event</span> named <code
     title="event-media-canplay">canplay</code>.</p>
 
-    <p>If the element is <span>potentially playing</span>, the user
-    agent must <span>queue a task</span> to <span>fire a simple
-    event</span> named <code
+    <p>If the element's <code title="dom-media-paused">paused</code>
+    attribute is false, the user agent must <span>queue a task</span>
+    to <span>fire a simple event</span> named <code
     title="event-media-playing">playing</code>.</p>
 
    </dd>
@@ -30168,10 +30168,10 @@
     title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code> or
     less, the user agent must <span>queue a task</span> to <span>fire
     a simple event</span> named <code
-    title="event-media-canplay">canplay</code>, and, if the element is also
-    <span>potentially playing</span>, <span>queue a task</span> to
-    <span>fire a simple event</span> named <code
-    title="event-media-playing">playing</code>.</p>
+    title="event-media-canplay">canplay</code>, and, if the element's
+    <code title="dom-media-paused">paused</code> attribute is false,
+    <span>queue a task</span> to <span>fire a simple event</span>
+    named <code title="event-media-playing">playing</code>.</p>
 
     <p>If the <span>autoplaying flag</span> is true, and the <code
     title="dom-media-paused">paused</code> attribute is true, and the
@@ -30646,11 +30646,10 @@
       value <code
       title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> or
       <code
-      title="dom-media-HAVE_ENOUGH_DATA">HAVE_ENOUGH_DATA</code>; if
-      the <span>media element</span> is <span>potentially
-      playing</span>, then <span>queue a task</span> to <span>fire a
-      simple event</span> named <code
-      title="event-media-playing">playing</code> at the element.</p>
+      title="dom-media-HAVE_ENOUGH_DATA">HAVE_ENOUGH_DATA</code>:
+      <span>queue a task</span> to <span>fire a simple event</span>
+      named <code title="event-media-playing">playing</code> at the
+      element.</p>
 
      </li>
 
@@ -36399,13 +36398,12 @@
     <tr>
      <td><dfn title="event-media-playing"><code>playing</code></dfn>
      <td><code>Event</code>
-     <td>Playback has started after having been delayed due to lack of <span>media data</span>.
-     <td>The element is newly <span>potentially playing</span>, either because <code title="dom-media-readyState">readyState</code> is newly equal to or greater than <code title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>, or because <code title="dom-media-paused">paused</code> is newly false. It is possible for playback to start without this event firing, e.g. if when playback would have started, 
+     <td>Playback is ready to start after having been paused or delayed due to lack of <span>media data</span>.
+     <td><code title="dom-media-readyState">readyState</code> is newly equal to or greater than <code title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> and <code title="dom-media-paused">paused</code> is false, or <code title="dom-media-paused">paused</code> is newly false and <code title="dom-media-readyState">readyState</code> is equal to or greater than <code title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>. Even if this event fires, the element might still not be <span>potentially playing</span>, e.g. if
 <!--END w3c-html--><!--CONTROLLER-->
-     the element was <span>blocked on its media controller</span>, or
+     the element is <span>blocked on its media controller</span> (e.g. because the <span>current media controller</span> is paused, or another <span title="slaved media elements">slaved media element</span> is stalled somehow, or because the <span>media resource</span> has no data corresponding to the <span>media controller position</span>), or
 <!--START w3c-html--><!--CONTROLLER-->
-     the element had been <span>paused for user interaction</span>.
-     <!-- XXXXX we should change this so that 'playing' fires in those three cases too (when readyState/paused change, not when playback actually starts) -->
+     the element is <span>paused for user interaction</span>.
     <tr>
      <td><dfn title="event-media-waiting"><code>waiting</code></dfn>
      <td><code>Event</code>




More information about the Commit-Watchers mailing list