[html5] r3992 - [e] (0) Clean up the play() and pause() algorithms.

whatwg at whatwg.org whatwg at whatwg.org
Thu Sep 24 13:10:56 PDT 2009


Author: ianh
Date: 2009-09-24 13:10:55 -0700 (Thu, 24 Sep 2009)
New Revision: 3992

Modified:
   index
   source
Log:
[e] (0) Clean up the play() and pause() algorithms.

Modified: index
===================================================================
--- index	2009-09-24 20:04:10 UTC (rev 3991)
+++ index	2009-09-24 20:10:55 UTC (rev 3992)
@@ -23380,16 +23380,15 @@
   must run the following steps.</p>
 
   <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
-   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, then the user
-   agent must invoke the <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, invoke the
+   <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
    algorithm</a>.</li>
 
    <li>
 
     <p>If the <a href=#ended-playback title="ended playback">playback has ended</a>,
-    then the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a>
-    to the <a href=#earliest-possible-position>earliest possible position</a> of the <a href=#media-resource>media
-    resource</a>.</p>
+    <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest
+    possible position</a> of the <a href=#media-resource>media resource</a>.</p>
 
     <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
@@ -23401,13 +23400,12 @@
 
    <li>
 
-    <p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, it must
-    be set to false.</p>
-
-    <p>If this changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, the user agent must run
+    <p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, run
     the following substeps:</p>
 
-    <ol><li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+    <ol><li><p>Change the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> to false.</li>
+
+     <li><p><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-media-play><a href=#event-media-play>play</a></code> at the element.</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 the
@@ -23427,32 +23425,35 @@
 
     </ol></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>Set the <a href=#media-element>media element</a>'s <a href=#autoplaying-flag>autoplaying
+   flag</a> to false.</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>
   method is invoked, the user agent must run the following steps:</p>
 
   <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
-   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, then the user
-   agent must invoke the <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+   the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, invoke the
+   <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
    algorithm</a>.</li>
 
-   <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is false, it must
-   be set to true.</li>
+   <li><p>Set the <a href=#media-element>media element</a>'s <a href=#autoplaying-flag>autoplaying
+   flag</a> to false.</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-paused><a href=#dom-media-paused>paused</a></code> attribute is false, run the
+   following steps:</p>
 
-   <li><p>If the second step above changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, 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-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
-   element, and <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-media-pause><a href=#event-media-pause>pause</a></code> at the
-   element.</li>
+    <ol><li><p>Change the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> to true.</li>
 
+     <li><p><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-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
+     element.</li>
+
+     <li><p><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-media-pause><a href=#event-media-pause>pause</a></code>
+     at the element.</li>
+
+    </ol></li>
+
   </ol><hr><p id=media-playback>When a <a href=#media-element>media element</a> is
   <a href=#potentially-playing>potentially playing</a> and its <code>Document</code> is an
   <a href=#active-document>active document</a>, its <a href=#current-playback-position>current playback

Modified: source
===================================================================
--- source	2009-09-24 20:04:10 UTC (rev 3991)
+++ source	2009-09-24 20:10:55 UTC (rev 3992)
@@ -25327,17 +25327,16 @@
    <li><p>If the <span>media element</span>'s <code
    title="dom-media-networkState">networkState</code> attribute has
    the value <code
-   title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, then the user
-   agent must invoke the <span>media element</span>'s <span
+   title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, invoke the
+   <span>media element</span>'s <span
    title="concept-media-load-algorithm">resource selection
    algorithm</span>.</p></li>
 
    <li>
 
     <p>If the <span title="ended playback">playback has ended</span>,
-    then the user agent must <span title="dom-media-seek">seek</span>
-    to the <span>earliest possible position</span> of the <span>media
-    resource</span>.</p>
+    <span title="dom-media-seek">seek</span> to the <span>earliest
+    possible position</span> of the <span>media resource</span>.</p>
 
     <p class="note">This <a href="#seekUpdate">will cause</a> the user
     agent to <span>queue a task</span> to <span>fire a simple
@@ -25351,15 +25350,14 @@
    <li>
 
     <p>If the <span>media element</span>'s <code
-    title="dom-media-paused">paused</code> attribute is true, it must
-    be set to false.</p>
-
-    <p>If this changed the value of <code
-    title="dom-media-paused">paused</code>, the user agent must run
+    title="dom-media-paused">paused</code> attribute is true, run
     the following substeps:</p>
 
     <ol>
 
+     <li><p>Change the value of <code
+     title="dom-media-paused">paused</code> to false.</p></li>
+
      <li><p><span>Queue a task</span> to <span>fire a simple event</span>
      called <code title="event-media-play">play</code> at the element.</p></li>
 
@@ -25386,11 +25384,9 @@
 
    </li>
 
-   <li><p>The <span>media element</span>'s <span>autoplaying
-   flag</span> must be set to false.</p></li>
+   <li><p>Set the <span>media element</span>'s <span>autoplaying
+   flag</span> to false.</p></li>
 
-   <li><p>The method must then return.</p></li>
-
   </ol>
 
   <hr>
@@ -25403,26 +25399,36 @@
    <li><p>If the <span>media element</span>'s <code
    title="dom-media-networkState">networkState</code> attribute has
    the value <code
-   title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, then the user
-   agent must invoke the <span>media element</span>'s <span
+   title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, invoke the
+   <span>media element</span>'s <span
    title="concept-media-load-algorithm">resource selection
    algorithm</span>.</p></li>
 
+   <li><p>Set the <span>media element</span>'s <span>autoplaying
+   flag</span> to false.</p></li>
+
    <li><p>If the <span>media element</span>'s <code
-   title="dom-media-paused">paused</code> attribute is false, it must
-   be set to true.</p></li>
+   title="dom-media-paused">paused</code> attribute is false, run the
+   following steps:</p>
 
-   <li><p>The <span>media element</span>'s <span>autoplaying
-   flag</span> must be set to false.</p></li>
+    <ol>
 
-   <li><p>If the second step above changed the value of <code
-   title="dom-media-paused">paused</code>, then the user agent must
-   <span>queue a task</span> to <span>fire a simple event</span>
-   called <code title="event-media-timeupdate">timeupdate</code> at the
-   element, and <span>queue a task</span> to <span>fire a simple
-   event</span> called <code title="event-media-pause">pause</code> at the
-   element.</p></li>
+     <li><p>Change the value of <code
+     title="dom-media-paused">paused</code> to true.</p></li>
 
+     <li><p><span>Queue a task</span> to <span>fire a simple
+     event</span> called <code
+     title="event-media-timeupdate">timeupdate</code> at the
+     element.</p></li>
+
+     <li><p><span>Queue a task</span> to <span>fire a simple
+     event</span> called <code title="event-media-pause">pause</code>
+     at the element.</p></li>
+
+    </ol>
+
+   </li>
+
   </ol>
 
   <hr>




More information about the Commit-Watchers mailing list