[html5] r6562 - [giow] (2) When a media element ends, pause it. Same for MediaControllers. Also [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Sep 22 15:27:03 PDT 2011


Author: ianh
Date: 2011-09-22 15:27:01 -0700 (Thu, 22 Sep 2011)
New Revision: 6562

Modified:
   complete.html
   index
   source
Log:
[giow] (2) When a media element ends, pause it. Same for MediaControllers. Also a bunch of minor editorial tweaks.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12559

Modified: complete.html
===================================================================
--- complete.html	2011-09-22 17:40:11 UTC (rev 6561)
+++ complete.html	2011-09-22 22:27:01 UTC (rev 6562)
@@ -28446,9 +28446,10 @@
     </ul></li>
 
   </ul><p>The <dfn id=dom-media-ended title=dom-media-ended><code>ended</code></dfn>
-  attribute must return true if the <a href=#media-element>media element</a> has
+  attribute must return true if, the last time the <a href=#event-loop>event
+  loop</a> reached step 1, the <a href=#media-element>media element</a> had
   <a href=#ended-playback>ended playback</a> and the <a href=#direction-of-playback>direction of
-  playback</a> is forwards, and false otherwise.</p>
+  playback</a> was forwards, and false otherwise.</p>
 
   <p>A <a href=#media-element>media element</a> is said to have <dfn id=stopped-due-to-errors>stopped due to
   errors</dfn> when the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> or greater, and
@@ -28467,7 +28468,7 @@
   If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
   controller</a> when this happens, then the user agent must
   <a href=#report-the-controller-state>report the controller state</a> for the <a href=#media-element>media
-  element</a>'s <a href=#current-media-controller>current media controller</a>. If If the
+  element</a>'s <a href=#current-media-controller>current media controller</a>. If the
   <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
   controller</a> when the user makes a selection, allowing playback
   to resume, the user agent must similarly <a href=#report-the-controller-state>report the controller
@@ -28506,29 +28507,36 @@
    inexplicable (since the normally matching 'ended' given below event
    doesn't fire in the loop case). -->
 
-   <li><p>Stop playback.<p class=note>The <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> attribute becomes
-   true.</li>
+   <li><p>As defined above, the <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> IDL attribute starts returning
+   true once the <a href=#event-loop>event loop</a>'s current <a href=#concept-task title=concept-task>task</a> ends.</li>
 
-   <li><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-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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
+   element</a>.</li>
 
-   <li><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-ended><a href=#event-media-ended>ended</a></code>
-   at the element.</li>
+   <li><p><a href=#queue-a-task>Queue a task</a> that, if the <a href=#media-element>media
+   element</a> does not have a <a href=#current-media-controller>current media
+   controller</a>, and the <a href=#media-element>media element</a> has still
+   <a href=#ended-playback>ended playback</a>, and the <a href=#direction-of-playback>direction of
+   playback</a> is still forwards, and <a href=#dom-media-paused title=dom-media-paused>paused</a> is false, changes <a href=#dom-media-paused title=dom-media-paused>paused</a> to true and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-media-pause><a href=#event-media-pause>pause</a></code> at the <a href=#media-element>media
+   element</a>.</li>
 
+   <li><p><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-ended><a href=#event-media-ended>ended</a></code> at
+   the <a href=#media-element>media element</a>.</li>
+
+   <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+   controller</a>, then <a href=#report-the-controller-state>report the controller state</a>
+   for the <a href=#media-element>media element</a>'s <a href=#current-media-controller>current media
+   controller</a>.</li>
+
   </ol><p>When the <a href=#current-playback-position>current playback position</a> reaches the
   <a href=#earliest-possible-position>earliest possible position</a> of the <a href=#media-resource>media
   resource</a> when the <a href=#direction-of-playback>direction of playback</a> is
-  backwards, then the user agent must follow these steps:</p>
+  backwards, then the user agent must only <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-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</p>
 
-  <ol><li><p>Stop playback.</li>
-
-   <li><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-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
-   element.</li>
-
-  </ol><hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
+  <hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
   attribute gives the desired speed at which the <a href=#media-resource>media
   resource</a> is to play, as a multiple of its intrinsic
   speed. The attribute is mutable: on getting it must return the last
@@ -29751,31 +29759,31 @@
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-played><a href=#dom-mediacontroller-played>played</a></code></dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
 
    <dd>
 
-    <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
-    union of the time ranges in all the slaved <a href=#media-element title="media
-    element">media elements</a> that have been played.</p>
+    <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
+    attribute to false.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause</a></code>()</dt>
 
    <dd>
 
     <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
-    attribute to false.</p>
+    attribute to true.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause</a></code>()</dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-played><a href=#dom-mediacontroller-played>played</a></code></dt>
 
    <dd>
 
-    <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
-    attribute to true.</p>
+    <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
+    union of the time ranges in all the slaved <a href=#media-element title="media
+    element">media elements</a> that have been played.</p>
 
    </dd>
 
@@ -29921,14 +29929,6 @@
   object is a <a href=#paused-media-controller>paused media controller</a>, and false
   otherwise.</p>
 
-  <p>The <dfn id=dom-mediacontroller-played title=dom-MediaController-played><code>played</code></dfn>
-  attribute must return a new static <a href=#normalized-timeranges-object>normalized
-  <code>TimeRanges</code> object</a> that represents the union of
-  the ranges of the <a href=#media-resource title="media resource">media
-  resources</a> of the <a href=#slaved-media-elements>slaved media elements</a> that the
-  user agent has so far rendered, at the time the attribute is
-  evaluated.</p>
-
   <p>When the <dfn id=dom-mediacontroller-pause title=dom-MediaController-pause><code>pause()</code></dfn> method
   is invoked, if the <code><a href=#mediacontroller>MediaController</a></code> is a <a href=#playing-media-controller>playing
   media controller</a> then the user agent must change the
@@ -29947,6 +29947,14 @@
   <code><a href=#mediacontroller>MediaController</a></code>, and then <a href=#report-the-controller-state>report the controller
   state</a> of the <code><a href=#mediacontroller>MediaController</a></code>.</p>
 
+  <p>The <dfn id=dom-mediacontroller-played title=dom-MediaController-played><code>played</code></dfn>
+  attribute must return a new static <a href=#normalized-timeranges-object>normalized
+  <code>TimeRanges</code> object</a> that represents the union of
+  the ranges of the <a href=#media-resource title="media resource">media
+  resources</a> of the <a href=#slaved-media-elements>slaved media elements</a> that the
+  user agent has so far rendered, at the time the attribute is
+  evaluated.</p>
+
   <hr><p>A <code><a href=#mediacontroller>MediaController</a></code> has a <dfn id=media-controller-default-playback-rate>media controller
   default playback rate</dfn> and a <dfn id=media-controller-playback-rate>media controller playback
   rate</dfn>, which must both be set to 1.0 when the
@@ -30206,6 +30214,20 @@
 
    <li><p>If the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
    reported playback state</a> is not equal to <var title="">new
+   playback state</var> and the <var title="">new playback state</var>
+   is <i>ended</i>, then <a href=#queue-a-task>queue a task</a> that, if the
+   <code><a href=#mediacontroller>MediaController</a></code> object is a <a href=#playing-media-controller>playing media
+   controller</a>, and all of the <code><a href=#mediacontroller>MediaController</a></code>'s
+   <a href=#slaved-media-elements>slaved media elements</a> have still <a href=#ended-playback>ended
+   playback</a>, and the <a href=#media-controller-playback-rate>media controller playback
+   rate</a> is still positive or zero, changes the
+   <code><a href=#mediacontroller>MediaController</a></code> object to a <a href=#paused-media-controller>paused media
+   controller</a> and then <a href=#fire-a-simple-event title="fire a simple event">fires
+   a simple event</a> named <code title=event-MediaController-pause><a href=#event-mediacontroller-pause>pause</a></code> at the
+   <code><a href=#mediacontroller>MediaController</a></code> object.</li>
+
+   <li><p>If the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
+   reported playback state</a> is not equal to <var title="">new
    playback state</var> then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
    simple event</a> at the <code><a href=#mediacontroller>MediaController</a></code> object,
    whose name is <code title=event-MediaController-playing><a href=#event-mediacontroller-playing>playing</a></code> if <var title="">new playback state</var> is <i>playing</i>, <code title=event-MediaController-ended><a href=#event-mediacontroller-ended>ended</a></code> if <var title="">new playback state</var> is <i>ended</i>, and <code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>

Modified: index
===================================================================
--- index	2011-09-22 17:40:11 UTC (rev 6561)
+++ index	2011-09-22 22:27:01 UTC (rev 6562)
@@ -28313,9 +28313,10 @@
     </ul></li>
 
   </ul><p>The <dfn id=dom-media-ended title=dom-media-ended><code>ended</code></dfn>
-  attribute must return true if the <a href=#media-element>media element</a> has
+  attribute must return true if, the last time the <a href=#event-loop>event
+  loop</a> reached step 1, the <a href=#media-element>media element</a> had
   <a href=#ended-playback>ended playback</a> and the <a href=#direction-of-playback>direction of
-  playback</a> is forwards, and false otherwise.</p>
+  playback</a> was forwards, and false otherwise.</p>
 
   <p>A <a href=#media-element>media element</a> is said to have <dfn id=stopped-due-to-errors>stopped due to
   errors</dfn> when the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> or greater, and
@@ -28334,7 +28335,7 @@
   If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
   controller</a> when this happens, then the user agent must
   <a href=#report-the-controller-state>report the controller state</a> for the <a href=#media-element>media
-  element</a>'s <a href=#current-media-controller>current media controller</a>. If If the
+  element</a>'s <a href=#current-media-controller>current media controller</a>. If the
   <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
   controller</a> when the user makes a selection, allowing playback
   to resume, the user agent must similarly <a href=#report-the-controller-state>report the controller
@@ -28373,29 +28374,36 @@
    inexplicable (since the normally matching 'ended' given below event
    doesn't fire in the loop case). -->
 
-   <li><p>Stop playback.<p class=note>The <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> attribute becomes
-   true.</li>
+   <li><p>As defined above, the <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> IDL attribute starts returning
+   true once the <a href=#event-loop>event loop</a>'s current <a href=#concept-task title=concept-task>task</a> ends.</li>
 
-   <li><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-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> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
+   element</a>.</li>
 
-   <li><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-ended><a href=#event-media-ended>ended</a></code>
-   at the element.</li>
+   <li><p><a href=#queue-a-task>Queue a task</a> that, if the <a href=#media-element>media
+   element</a> does not have a <a href=#current-media-controller>current media
+   controller</a>, and the <a href=#media-element>media element</a> has still
+   <a href=#ended-playback>ended playback</a>, and the <a href=#direction-of-playback>direction of
+   playback</a> is still forwards, and <a href=#dom-media-paused title=dom-media-paused>paused</a> is false, changes <a href=#dom-media-paused title=dom-media-paused>paused</a> to true and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-media-pause><a href=#event-media-pause>pause</a></code> at the <a href=#media-element>media
+   element</a>.</li>
 
+   <li><p><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-ended><a href=#event-media-ended>ended</a></code> at
+   the <a href=#media-element>media element</a>.</li>
+
+   <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+   controller</a>, then <a href=#report-the-controller-state>report the controller state</a>
+   for the <a href=#media-element>media element</a>'s <a href=#current-media-controller>current media
+   controller</a>.</li>
+
   </ol><p>When the <a href=#current-playback-position>current playback position</a> reaches the
   <a href=#earliest-possible-position>earliest possible position</a> of the <a href=#media-resource>media
   resource</a> when the <a href=#direction-of-playback>direction of playback</a> is
-  backwards, then the user agent must follow these steps:</p>
+  backwards, then the user agent must only <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-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</p>
 
-  <ol><li><p>Stop playback.</li>
-
-   <li><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-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
-   element.</li>
-
-  </ol><hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
+  <hr><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
   attribute gives the desired speed at which the <a href=#media-resource>media
   resource</a> is to play, as a multiple of its intrinsic
   speed. The attribute is mutable: on getting it must return the last
@@ -29618,31 +29626,31 @@
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-played><a href=#dom-mediacontroller-played>played</a></code></dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
 
    <dd>
 
-    <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
-    union of the time ranges in all the slaved <a href=#media-element title="media
-    element">media elements</a> that have been played.</p>
+    <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
+    attribute to false.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause</a></code>()</dt>
 
    <dd>
 
     <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
-    attribute to false.</p>
+    attribute to true.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause</a></code>()</dt>
+   <dt><var title="">controller</var> . <code title=dom-MediaController-played><a href=#dom-mediacontroller-played>played</a></code></dt>
 
    <dd>
 
-    <p>Sets the <code title=dom-MediaController-paused><a href=#dom-mediacontroller-paused>paused</a></code>
-    attribute to true.</p>
+    <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
+    union of the time ranges in all the slaved <a href=#media-element title="media
+    element">media elements</a> that have been played.</p>
 
    </dd>
 
@@ -29788,14 +29796,6 @@
   object is a <a href=#paused-media-controller>paused media controller</a>, and false
   otherwise.</p>
 
-  <p>The <dfn id=dom-mediacontroller-played title=dom-MediaController-played><code>played</code></dfn>
-  attribute must return a new static <a href=#normalized-timeranges-object>normalized
-  <code>TimeRanges</code> object</a> that represents the union of
-  the ranges of the <a href=#media-resource title="media resource">media
-  resources</a> of the <a href=#slaved-media-elements>slaved media elements</a> that the
-  user agent has so far rendered, at the time the attribute is
-  evaluated.</p>
-
   <p>When the <dfn id=dom-mediacontroller-pause title=dom-MediaController-pause><code>pause()</code></dfn> method
   is invoked, if the <code><a href=#mediacontroller>MediaController</a></code> is a <a href=#playing-media-controller>playing
   media controller</a> then the user agent must change the
@@ -29814,6 +29814,14 @@
   <code><a href=#mediacontroller>MediaController</a></code>, and then <a href=#report-the-controller-state>report the controller
   state</a> of the <code><a href=#mediacontroller>MediaController</a></code>.</p>
 
+  <p>The <dfn id=dom-mediacontroller-played title=dom-MediaController-played><code>played</code></dfn>
+  attribute must return a new static <a href=#normalized-timeranges-object>normalized
+  <code>TimeRanges</code> object</a> that represents the union of
+  the ranges of the <a href=#media-resource title="media resource">media
+  resources</a> of the <a href=#slaved-media-elements>slaved media elements</a> that the
+  user agent has so far rendered, at the time the attribute is
+  evaluated.</p>
+
   <hr><p>A <code><a href=#mediacontroller>MediaController</a></code> has a <dfn id=media-controller-default-playback-rate>media controller
   default playback rate</dfn> and a <dfn id=media-controller-playback-rate>media controller playback
   rate</dfn>, which must both be set to 1.0 when the
@@ -30073,6 +30081,20 @@
 
    <li><p>If the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
    reported playback state</a> is not equal to <var title="">new
+   playback state</var> and the <var title="">new playback state</var>
+   is <i>ended</i>, then <a href=#queue-a-task>queue a task</a> that, if the
+   <code><a href=#mediacontroller>MediaController</a></code> object is a <a href=#playing-media-controller>playing media
+   controller</a>, and all of the <code><a href=#mediacontroller>MediaController</a></code>'s
+   <a href=#slaved-media-elements>slaved media elements</a> have still <a href=#ended-playback>ended
+   playback</a>, and the <a href=#media-controller-playback-rate>media controller playback
+   rate</a> is still positive or zero, changes the
+   <code><a href=#mediacontroller>MediaController</a></code> object to a <a href=#paused-media-controller>paused media
+   controller</a> and then <a href=#fire-a-simple-event title="fire a simple event">fires
+   a simple event</a> named <code title=event-MediaController-pause><a href=#event-mediacontroller-pause>pause</a></code> at the
+   <code><a href=#mediacontroller>MediaController</a></code> object.</li>
+
+   <li><p>If the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
+   reported playback state</a> is not equal to <var title="">new
    playback state</var> then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
    simple event</a> at the <code><a href=#mediacontroller>MediaController</a></code> object,
    whose name is <code title=event-MediaController-playing><a href=#event-mediacontroller-playing>playing</a></code> if <var title="">new playback state</var> is <i>playing</i>, <code title=event-MediaController-ended><a href=#event-mediacontroller-ended>ended</a></code> if <var title="">new playback state</var> is <i>ended</i>, and <code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>

Modified: source
===================================================================
--- source	2011-09-22 17:40:11 UTC (rev 6561)
+++ source	2011-09-22 22:27:01 UTC (rev 6562)
@@ -30845,9 +30845,10 @@
   </ul>
 
   <p>The <dfn title="dom-media-ended"><code>ended</code></dfn>
-  attribute must return true if the <span>media element</span> has
+  attribute must return true if, the last time the <span>event
+  loop</span> reached step 1, the <span>media element</span> had
   <span>ended playback</span> and the <span>direction of
-  playback</span> is forwards, and false otherwise.</p>
+  playback</span> was forwards, and false otherwise.</p>
 
   <p>A <span>media element</span> is said to have <dfn>stopped due to
   errors</dfn> when the element's <code
@@ -30870,7 +30871,7 @@
   If the <span>media element</span> has a <span>current media
   controller</span> when this happens, then the user agent must
   <span>report the controller state</span> for the <span>media
-  element</span>'s <span>current media controller</span>. If If the
+  element</span>'s <span>current media controller</span>. If the
   <span>media element</span> has a <span>current media
   controller</span> when the user makes a selection, allowing playback
   to resume, the user agent must similarly <span>report the controller
@@ -30915,37 +30916,45 @@
    inexplicable (since the normally matching 'ended' given below event
    doesn't fire in the loop case). -->
 
-   <li><p>Stop playback.</p><p class="note">The <code
-   title="dom-media-ended">ended</code> attribute becomes
-   true.</p></li>
+   <li><p>As defined above, the <code
+   title="dom-media-ended">ended</code> IDL attribute starts returning
+   true once the <span>event loop</span>'s current <span
+   title="concept-task">task</span> ends.</p></li>
 
-   <li><p>The user agent must <span>queue a task</span> to <span>fire
-   a simple event</span> named <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> named <code
+   title="event-media-timeupdate">timeupdate</code> at the <span>media
+   element</span>.</p></li>
 
-   <li><p>The user agent must <span>queue a task</span> to <span>fire
-   a simple event</span> named <code title="event-media-ended">ended</code>
-   at the element.</p></li>
+   <li><p><span>Queue a task</span> that, if the <span>media
+   element</span> does not have a <span>current media
+   controller</span>, and the <span>media element</span> has still
+   <span>ended playback</span>, and the <span>direction of
+   playback</span> is still forwards, and <span
+   title="dom-media-paused">paused</span> is false, changes <span
+   title="dom-media-paused">paused</span> to true and <span
+   title="fire a simple event">fires a simple event</span> named <code
+   title="event-media-pause">pause</code> at the <span>media
+   element</span>.</p></li>
 
+   <li><p><span>Queue a task</span> to <span>fire a simple
+   event</span> named <code title="event-media-ended">ended</code> at
+   the <span>media element</span>.</p></li>
+
+   <li><p>If the <span>media element</span> has a <span>current media
+   controller</span>, then <span>report the controller state</span>
+   for the <span>media element</span>'s <span>current media
+   controller</span>.</p></li>
+
   </ol>
 
   <p>When the <span>current playback position</span> reaches the
   <span>earliest possible position</span> of the <span>media
   resource</span> when the <span>direction of playback</span> is
-  backwards, then the user agent must follow these steps:</p>
+  backwards, then the user agent must only <span>queue a task</span>
+  to <span>fire a simple event</span> named <code
+  title="event-media-timeupdate">timeupdate</code> at the element.</p>
 
-  <ol>
-
-   <li><p>Stop playback.</p></li>
-
-   <li><p>The user agent must <span>queue a task</span> to <span>fire
-   a simple event</span> named <code
-   title="event-media-timeupdate">timeupdate</code> at the
-   element.</p></li>
-
-  </ol>
-
   <hr>
 
   <p>The <dfn
@@ -32356,31 +32365,31 @@
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title="dom-MediaController-played">played</code></dt>
+   <dt><var title="">controller</var> . <code title="dom-MediaController-play">play</code>()</dt>
 
    <dd>
 
-    <p>Returns a <code>TimeRanges</code> object that represents the
-    union of the time ranges in all the slaved <span title="media
-    element">media elements</span> that have been played.</p>
+    <p>Sets the <code title="dom-MediaController-paused">paused</code>
+    attribute to false.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title="dom-MediaController-play">play</code>()</dt>
+   <dt><var title="">controller</var> . <code title="dom-MediaController-pause">pause</code>()</dt>
 
    <dd>
 
     <p>Sets the <code title="dom-MediaController-paused">paused</code>
-    attribute to false.</p>
+    attribute to true.</p>
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title="dom-MediaController-pause">pause</code>()</dt>
+   <dt><var title="">controller</var> . <code title="dom-MediaController-played">played</code></dt>
 
    <dd>
 
-    <p>Sets the <code title="dom-MediaController-paused">paused</code>
-    attribute to true.</p>
+    <p>Returns a <code>TimeRanges</code> object that represents the
+    union of the time ranges in all the slaved <span title="media
+    element">media elements</span> that have been played.</p>
 
    </dd>
 
@@ -32548,15 +32557,6 @@
   object is a <span>paused media controller</span>, and false
   otherwise.</p>
 
-  <p>The <dfn
-  title="dom-MediaController-played"><code>played</code></dfn>
-  attribute must return a new static <span>normalized
-  <code>TimeRanges</code> object</span> that represents the union of
-  the ranges of the <span title="media resource">media
-  resources</span> of the <span>slaved media elements</span> that the
-  user agent has so far rendered, at the time the attribute is
-  evaluated.</p>
-
   <p>When the <dfn
   title="dom-MediaController-pause"><code>pause()</code></dfn> method
   is invoked, if the <code>MediaController</code> is a <span>playing
@@ -32579,6 +32579,15 @@
   <code>MediaController</code>, and then <span>report the controller
   state</span> of the <code>MediaController</code>.</p>
 
+  <p>The <dfn
+  title="dom-MediaController-played"><code>played</code></dfn>
+  attribute must return a new static <span>normalized
+  <code>TimeRanges</code> object</span> that represents the union of
+  the ranges of the <span title="media resource">media
+  resources</span> of the <span>slaved media elements</span> that the
+  user agent has so far rendered, at the time the attribute is
+  evaluated.</p>
+
   <hr>
 
   <p>A <code>MediaController</code> has a <dfn>media controller
@@ -32884,6 +32893,21 @@
 
    <li><p>If the <code>MediaController</code>'s <span>most recently
    reported playback state</span> is not equal to <var title="">new
+   playback state</var> and the <var title="">new playback state</var>
+   is <i>ended</i>, then <span>queue a task</span> that, if the
+   <code>MediaController</code> object is a <span>playing media
+   controller</span>, and all of the <code>MediaController</code>'s
+   <span>slaved media elements</span> have still <span>ended
+   playback</span>, and the <span>media controller playback
+   rate</span> is still positive or zero, changes the
+   <code>MediaController</code> object to a <span>paused media
+   controller</span> and then <span title="fire a simple event">fires
+   a simple event</span> named <code
+   title="event-MediaController-pause">pause</code> at the
+   <code>MediaController</code> object.</p></li>
+
+   <li><p>If the <code>MediaController</code>'s <span>most recently
+   reported playback state</span> is not equal to <var title="">new
    playback state</var> then <span>queue a task</span> to <span>fire a
    simple event</span> at the <code>MediaController</code> object,
    whose name is <code




More information about the Commit-Watchers mailing list