HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3992Clean up the play() and pause() algorithms.2009-09-24 20:10
@@ -25320,53 +25320,51 @@ interface <dfn>CueRangeCallback</dfn> {
 
   <p>When the <dfn title="dom-media-play"><code>play()</code></dfn>
   method on a <span>media element</span> is invoked, the user agent
   must run the following steps.</p>
 
   <ol>
 
    <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
     event</span> called <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' -->
 
    </li>
 
    <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>
 
      <li><p>If the <span>media element</span>'s <code
      title="dom-media-readyState">readyState</code> attribute has the
      value <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>,
      <code title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, or
      <code
      title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code>,
      <span>queue a task</span> to <span>fire a simple event</span>
@@ -25379,56 +25377,64 @@ interface <dfn>CueRangeCallback</dfn> {
      title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> or
      <code title="dom-media-HAVE_ENOUGH_DATA">HAVE_ENOUGH_DATA</code>;
      <span>queue a task</span> to <span>fire a simple event</span>
      called <code title="event-media-playing">playing</code> at the
      element.</p></li>
 
     </ol>
 
    </li>
 
-   <li><p>The <span>media element</span>'s <span>autoplaying
-   flag</span> must be set to false.</p></li>
-
-   <li><p>The method must then return.</p></li>
+   <li><p>Set the <span>media element</span>'s <span>autoplaying
+   flag</span> to false.</p></li>
 
   </ol>
 
   <hr>
 
   <p>When the <dfn 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 <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>
 
   <p id="media-playback">When a <span>media element</span> is
   <span>potentially playing</span> and its <code>Document</code> is an
   <span>active document</span>, its <span>current playback
   position</span> must increase monotonically at <code
   title="dom-media-playbackRate">playbackRate</code> units of media

|