[html5] r6026 - [giow] (0) Add an 'ended' event to MediaController.
whatwg at whatwg.org
whatwg at whatwg.org
Mon Apr 25 15:29:17 PDT 2011
Author: ianh
Date: 2011-04-25 15:29:15 -0700 (Mon, 25 Apr 2011)
New Revision: 6026
Modified:
complete.html
index
source
Log:
[giow] (0) Add an 'ended' event to MediaController.
Modified: complete.html
===================================================================
--- complete.html 2011-04-22 19:36:14 UTC (rev 6025)
+++ complete.html 2011-04-25 22:29:15 UTC (rev 6026)
@@ -239,7 +239,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 22 April 2011</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 25 April 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -29552,7 +29552,7 @@
readiness state</dfn>, which is a number from 0 to 4 derived from
the numbers used for the <a href=#media-element>media element</a> <code title=attr-media-readyState>readyState</code> attribute, and a
<dfn id=most-recently-reported-playback-state>most recently reported playback state</dfn>, which is either
- <i>playing</i> or <i>waiting</i>.</p>
+ <i>playing</i>, <i>waiting</i>, or <i>ended</i>.</p>
<p>When a <code><a href=#mediacontroller>MediaController</a></code> is created, its <a href=#most-recently-reported-readiness-state>most
recently reported readiness state</a> must be set to 0, and its
@@ -29607,16 +29607,40 @@
reported readiness state</a> be <var title="">new readiness
state</var>.</li>
- <li><p>If the <code><a href=#mediacontroller>MediaController</a></code> has no <a href=#slaved-media-elements>slaved
- media elements</a>, or the <code><a href=#mediacontroller>MediaController</a></code> is a
- <a href=#blocked-media-controller>blocked media controller</a>, let <var title="">new
- playback state</var> be false; otherwise, let it be true.</li>
+ <li>
+ <p>Initialize <var title="">new playback state</var> by setting it
+ to the state given for the first matching condition from the
+ following list:</p>
+
+ <dl class=switch><dt>If the <code><a href=#mediacontroller>MediaController</a></code> has no <a href=#slaved-media-elements>slaved
+ media elements</a></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>If all of the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#slaved-media-elements>slaved
+ media elements</a> have <a href=#ended-playback>ended playback</a> and the
+ <a href=#media-controller-playback-rate>media controller playback rate</a> is positive or
+ zero</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>ended</i>.</dd>
+
+ <dt>If the <code><a href=#mediacontroller>MediaController</a></code> is a <a href=#blocked-media-controller>blocked media
+ controller</a></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>Otherwise</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>playing</i>.</dd>
+
+ </dl></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 true, and whose name is <code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>
+ 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>ended</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>
otherwise.</li>
<li><p>Let the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
@@ -33479,6 +33503,9 @@
<tr><td><dfn id=event-mediacontroller-waiting title=event-MediaController-waiting><code>waiting</code></dfn>
<td><code><a href=#event>Event</a></code>
<td>The <code><a href=#mediacontroller>MediaController</a></code> is now a <a href=#blocked-media-controller>blocked media controller</a>.
+ <tr><td><dfn id=event-mediacontcoller-ended title=event-MediaContcoller-ended><code>ended</code></dfn>
+ <td><code><a href=#event>Event</a></code>
+ <td>All the <a href=#slaved-media-elements>slaved media elements</a> have newly <a href=#ended-playback>ended playback</a>.
<tbody><tr><td><dfn id=event-mediacontroller-durationchange title=event-MediaController-durationchange><code>durationchange</code></dfn>
<td><code><a href=#event>Event</a></code>
Modified: index
===================================================================
--- index 2011-04-22 19:36:14 UTC (rev 6025)
+++ index 2011-04-25 22:29:15 UTC (rev 6026)
@@ -243,7 +243,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 22 April 2011</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 25 April 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -29564,7 +29564,7 @@
readiness state</dfn>, which is a number from 0 to 4 derived from
the numbers used for the <a href=#media-element>media element</a> <code title=attr-media-readyState>readyState</code> attribute, and a
<dfn id=most-recently-reported-playback-state>most recently reported playback state</dfn>, which is either
- <i>playing</i> or <i>waiting</i>.</p>
+ <i>playing</i>, <i>waiting</i>, or <i>ended</i>.</p>
<p>When a <code><a href=#mediacontroller>MediaController</a></code> is created, its <a href=#most-recently-reported-readiness-state>most
recently reported readiness state</a> must be set to 0, and its
@@ -29619,16 +29619,40 @@
reported readiness state</a> be <var title="">new readiness
state</var>.</li>
- <li><p>If the <code><a href=#mediacontroller>MediaController</a></code> has no <a href=#slaved-media-elements>slaved
- media elements</a>, or the <code><a href=#mediacontroller>MediaController</a></code> is a
- <a href=#blocked-media-controller>blocked media controller</a>, let <var title="">new
- playback state</var> be false; otherwise, let it be true.</li>
+ <li>
+ <p>Initialize <var title="">new playback state</var> by setting it
+ to the state given for the first matching condition from the
+ following list:</p>
+
+ <dl class=switch><dt>If the <code><a href=#mediacontroller>MediaController</a></code> has no <a href=#slaved-media-elements>slaved
+ media elements</a></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>If all of the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#slaved-media-elements>slaved
+ media elements</a> have <a href=#ended-playback>ended playback</a> and the
+ <a href=#media-controller-playback-rate>media controller playback rate</a> is positive or
+ zero</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>ended</i>.</dd>
+
+ <dt>If the <code><a href=#mediacontroller>MediaController</a></code> is a <a href=#blocked-media-controller>blocked media
+ controller</a></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>Otherwise</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>playing</i>.</dd>
+
+ </dl></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 true, and whose name is <code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>
+ 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>ended</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>
otherwise.</li>
<li><p>Let the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
@@ -33491,6 +33515,9 @@
<tr><td><dfn id=event-mediacontroller-waiting title=event-MediaController-waiting><code>waiting</code></dfn>
<td><code><a href=#event>Event</a></code>
<td>The <code><a href=#mediacontroller>MediaController</a></code> is now a <a href=#blocked-media-controller>blocked media controller</a>.
+ <tr><td><dfn id=event-mediacontcoller-ended title=event-MediaContcoller-ended><code>ended</code></dfn>
+ <td><code><a href=#event>Event</a></code>
+ <td>All the <a href=#slaved-media-elements>slaved media elements</a> have newly <a href=#ended-playback>ended playback</a>.
<tbody><tr><td><dfn id=event-mediacontroller-durationchange title=event-MediaController-durationchange><code>durationchange</code></dfn>
<td><code><a href=#event>Event</a></code>
Modified: source
===================================================================
--- source 2011-04-22 19:36:14 UTC (rev 6025)
+++ source 2011-04-25 22:29:15 UTC (rev 6026)
@@ -32222,7 +32222,7 @@
the numbers used for the <span>media element</span> <code
title="attr-media-readyState">readyState</code> attribute, and a
<dfn>most recently reported playback state</dfn>, which is either
- <i>playing</i> or <i>waiting</i>.</p>
+ <i>playing</i>, <i>waiting</i>, or <i>ended</i>.</p>
<p>When a <code>MediaController</code> is created, its <span>most
recently reported readiness state</span> must be set to 0, and its
@@ -32292,18 +32292,48 @@
reported readiness state</span> be <var title="">new readiness
state</var>.</p></li>
- <li><p>If the <code>MediaController</code> has no <span>slaved
- media elements</span>, or the <code>MediaController</code> is a
- <span>blocked media controller</span>, let <var title="">new
- playback state</var> be false; otherwise, let it be true.</p></li>
+ <li>
+ <p>Initialize <var title="">new playback state</var> by setting it
+ to the state given for the first matching condition from the
+ following list:</p>
+
+ <dl class="switch">
+
+ <dt>If the <code>MediaController</code> has no <span>slaved
+ media elements</span></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>If all of the <code>MediaController</code>'s <span>slaved
+ media elements</span> have <span>ended playback</span> and the
+ <span>media controller playback rate</span> is positive or
+ zero</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>ended</i>.</dd>
+
+ <dt>If the <code>MediaController</code> is a <span>blocked media
+ controller</span></dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>waiting</i>.</dd>
+
+ <dt>Otherwise</dt>
+
+ <dd>Let <var title="">new playback state</var> be <i>playing</i>.</dd>
+
+ </dl>
+
+ </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
title="event-MediaController-playing">playing</code> if <var
- title="">new playback state</var> is true, and whose name is <code
+ title="">new playback state</var> is <i>playing</i>, <code
+ title="event-MediaController-ended">ended</code> if <var
+ title="">new playback state</var> is <i>ended</i>, and <code
title="event-MediaController-waiting">waiting</code>
otherwise.</p></li>
@@ -36854,6 +36884,10 @@
<td><dfn title="event-MediaController-waiting"><code>waiting</code></dfn>
<td><code>Event</code>
<td>The <code>MediaController</code> is now a <span>blocked media controller</span>.
+ <tr>
+ <td><dfn title="event-MediaContcoller-ended"><code>ended</code></dfn>
+ <td><code>Event</code>
+ <td>All the <span>slaved media elements</span> have newly <span>ended playback</span>.
<tbody>
<tr>
More information about the Commit-Watchers
mailing list