- From: poot <cvsmail@w3.org>
- Date: Thu, 22 Sep 2011 18:29:47 -0400
- To: public-html-diffs@w3.org
hixie: When a media element ends, pause it. Same for MediaControllers.
Also a bunch of minor editorial tweaks. (whatwg r6562)
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5255&r2=1.5256&f=h
http://html5.org/tools/web-apps-tracker?from=6561&to=6562
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5255
retrieving revision 1.5256
diff -u -d -r1.5255 -r1.5256
--- Overview.html 22 Sep 2011 17:42:34 -0000 1.5255
+++ Overview.html 22 Sep 2011 22:29:24 -0000 1.5256
@@ -23658,9 +23658,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
@@ -23679,7 +23680,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
@@ -23712,29 +23713,36 @@
then <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> and
abort these steps.</li>
- <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>
-
- <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>
+ 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><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
@@ -24855,31 +24863,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>
@@ -25025,14 +25033,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
@@ -25051,6 +25051,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
@@ -25308,6 +25316,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>
Received on Thursday, 22 September 2011 22:29:54 UTC