HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3992

File a bug

SVNBugCommentTime (UTC)
3992Clean up the play() and pause() algorithms.2009-09-24 20:10
Index: source
===================================================================
--- source	(revision 3991)
+++ source	(revision 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>

|