[html5] r7116 - [giow] (0) Expose the controller state, since implementing it is apparently easy [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jun 4 17:13:31 PDT 2012


Author: ianh
Date: 2012-06-04 17:13:30 -0700 (Mon, 04 Jun 2012)
New Revision: 7116

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Expose the controller state, since implementing it is apparently easy and it can be a bit more subtle than it looks.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=12547
Affected topics: Video and Audio

Modified: complete.html
===================================================================
--- complete.html	2012-06-04 23:40:30 UTC (rev 7115)
+++ complete.html	2012-06-05 00:13:30 UTC (rev 7116)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><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 4 June 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 5 June 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -31737,14 +31737,18 @@
 
   <h6 id=media-controllers><span class=secno>4.8.10.11.2 </span>Media controllers</h6>
 
-  <pre class=idl>[<a href=#dom-mediacontroller title=dom-MediaController>Constructor</a>]
+  <pre class=idl>enum <dfn id=mediacontrollerplaybackstate>MediaControllerPlaybackState</dfn> { "<a href=#dom-mediacontroller-waiting title=dom-MediaController-waiting>waiting</a>", "<a href=#dom-mediacontroller-playing title=dom-MediaController-playing>playing</a>", "<a href=#dom-mediacontroller-ended title=dom-MediaController-ended>ended</a>" };
+[<a href=#dom-mediacontroller title=dom-MediaController>Constructor</a>]
 interface <dfn id=mediacontroller>MediaController</dfn> {
+  readonly attribute unsigned short <a href=#dom-mediacontroller-readystate title=dom-MediaController-readyState>readyState</a>; // uses <a href=#htmlmediaelement>HTMLMediaElement</a>.<a href=#dom-media-readystate title=dom-media-readyState>readyState</a>'s values
+
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-buffered title=dom-MediaController-buffered>buffered</a>;
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-seekable title=dom-MediaController-seekable>seekable</a>;
   readonly attribute double <a href=#dom-mediacontroller-duration title=dom-MediaController-duration>duration</a>;
            attribute double <a href=#dom-mediacontroller-currenttime title=dom-MediaController-currentTime>currentTime</a>;
 
   readonly attribute boolean <a href=#dom-mediacontroller-paused title=dom-MediaController-paused>paused</a>;
+  readonly attribute <a href=#mediacontrollerplaybackstate>MediaControllerPlaybackState</a> <a href=#dom-mediacontroller-playbackstate title=dom-MediaController-playbackState>playbackState</a>;
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-played title=dom-MediaController-played>played</a>;
   void <a href=#dom-mediacontroller-play title=dom-MediaController-play>play</a>();
   void <a href=#dom-mediacontroller-pause title=dom-MediaController-pause>pause</a>();
@@ -31792,6 +31796,17 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title=dom-MediaController-readyState><a href=#dom-mediacontroller-readystate>readyState</a></code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code><a href=#mediacontroller>MediaController</a></code> was in
+    the last time it fired events as a result of <a href=#report-the-controller-state title="report
+    the controller state">reporting teh controller state</a>. The
+    values of this attribute are the same as for the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute of <a href=#media-element title="media element">media elements</a>.</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title=dom-MediaController-buffered><a href=#dom-mediacontroller-buffered>buffered</a></code></dt>
 
    <dd>
@@ -31847,6 +31862,22 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code><a href=#mediacontroller>MediaController</a></code> was in
+    the last time it fired events as a result of <a href=#report-the-controller-state title="report
+    the controller state">reporting teh controller state</a>. The
+    value of this attribute is either "<code title=dom-MediaController-playing><a href=#dom-mediacontroller-playing>playing</a></code>", indicating
+    that the media is actively playing, "<code title=dom-MediaController-ended><a href=#dom-mediacontroller-ended>ended</a></code>", indicating that
+    the media is not playing because playback has reached the end of
+    all the <a href=#slaved-media-elements>slaved media elements</a>, or "<code title=dom-MediaController-waiting><a href=#dom-mediacontroller-waiting>waiting</a></code>", indicating
+    that the media is not playing for some other reason (e.g. the
+    <code><a href=#mediacontroller>MediaController</a></code> is paused).</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
 
    <dd>
@@ -31994,7 +32025,14 @@
   constructor, when invoked, must return a newly created
   <code><a href=#mediacontroller>MediaController</a></code> object.</p>
 
-  <hr><p>The <dfn id=dom-mediacontroller-seekable title=dom-MediaController-seekable><code>seekable</code></dfn>
+  <hr><p>The <dfn id=dom-mediacontroller-readystate title=dom-MediaController-readyState><code>readyState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code><a href=#mediacontroller>MediaController</a></code> object is created, the
+  attribute must be set to the value 0 (<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>). The value is
+  updated by the <a href=#report-the-controller-state>report the controller state</a> algorithm
+  below.</p>
+
+  <p>The <dfn id=dom-mediacontroller-seekable title=dom-MediaController-seekable><code>seekable</code></dfn>
   attribute must return a new static <a href=#normalized-timeranges-object>normalized
   <code>TimeRanges</code> object</a> that represents the
   intersection of the ranges of the <a href=#media-resource title="media resource">media
@@ -32070,6 +32108,13 @@
   <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-playbackstate title=dom-MediaController-playbackState><code>playbackState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code><a href=#mediacontroller>MediaController</a></code> object is created, the
+  attribute must be set to the value "<code title=dom-MediaController-waiting><a href=#dom-mediacontroller-waiting>waiting</a></code>". The value is
+  updated by the <a href=#report-the-controller-state>report the controller state</a> algorithm
+  below.</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
@@ -32286,10 +32331,20 @@
      <li><p><i>Loop</i>: Increment <var title="">next state</var> by
      one.</li>
 
-     <li><p><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 the event name corresponding to the value of <var title="">next state</var> given in the table below.</li>
+     <li>
 
+      <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+      <ol><li><p>Set the <code><a href=#mediacontroller>MediaController</a></code>'s <code title=dom-MediaController-readyState><a href=#dom-mediacontroller-readystate>readyState</a></code>
+       attribute to the value <var title="">next state</var>.</li>
+
+       <li><p><a href=#fire-a-simple-event>Fire a simple event</a> at the
+       <code><a href=#mediacontroller>MediaController</a></code> object, whose name is the event
+       name corresponding to the value of <var title="">next
+       state</var> given in the table below.</li>
+
+      </ol></li>
+
      <li><p>If <var title="">next state</var> is less than <var title="">new readiness state</var>, then return to the step
      labeled <i>loop</i>.</li>
 
@@ -32367,13 +32422,37 @@
    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>
-   otherwise.</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 run the
+    following steps:</p>
+
+    <ol><li><p>Set the <code><a href=#mediacontroller>MediaController</a></code>'s <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code>
+     attribute to the value given in the second column of the row of
+     the following table whose first column contains the <var title="">new playback state</var>.</li>
+
+     <li><p><a href=#fire-a-simple-event>Fire a simple event</a> at the
+     <code><a href=#mediacontroller>MediaController</a></code> object, whose name is the value
+     given in the third column of the row of the following table whose
+     first column contains the <var title="">new playback
+     state</var>.</li>
+
+    </ol><table><thead><tr><th>New playback state
+       <th>New value for <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code>
+       <th>Event name
+     <tbody><tr><td><i>playing</i>
+       <td>"<dfn id=dom-mediacontroller-playing title=dom-MediaController-playing><code>playing</code></dfn>"
+       <td><code title=event-MediaController-playing><a href=#event-mediacontroller-playing>playing</a></code>
+      <tr><td><i>waiting</i>
+       <td>"<dfn id=dom-mediacontroller-waiting title=dom-MediaController-waiting><code>waiting</code></dfn>"
+       <td><code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>
+      <tr><td><i>ended</i>
+       <td>"<dfn id=dom-mediacontroller-ended title=dom-MediaController-ended><code>ended</code></dfn>"
+       <td><code title=event-MediaController-ended><a href=#event-mediacontroller-ended>ended</a></code>
+    </table></li>
+
    <li><p>Let the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
    reported playback state</a> be <var title="">new playback
    state</var>.</li>

Modified: index
===================================================================
--- index	2012-06-04 23:40:30 UTC (rev 7115)
+++ index	2012-06-05 00:13:30 UTC (rev 7116)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><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 4 June 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 5 June 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -31737,14 +31737,18 @@
 
   <h6 id=media-controllers><span class=secno>4.8.10.11.2 </span>Media controllers</h6>
 
-  <pre class=idl>[<a href=#dom-mediacontroller title=dom-MediaController>Constructor</a>]
+  <pre class=idl>enum <dfn id=mediacontrollerplaybackstate>MediaControllerPlaybackState</dfn> { "<a href=#dom-mediacontroller-waiting title=dom-MediaController-waiting>waiting</a>", "<a href=#dom-mediacontroller-playing title=dom-MediaController-playing>playing</a>", "<a href=#dom-mediacontroller-ended title=dom-MediaController-ended>ended</a>" };
+[<a href=#dom-mediacontroller title=dom-MediaController>Constructor</a>]
 interface <dfn id=mediacontroller>MediaController</dfn> {
+  readonly attribute unsigned short <a href=#dom-mediacontroller-readystate title=dom-MediaController-readyState>readyState</a>; // uses <a href=#htmlmediaelement>HTMLMediaElement</a>.<a href=#dom-media-readystate title=dom-media-readyState>readyState</a>'s values
+
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-buffered title=dom-MediaController-buffered>buffered</a>;
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-seekable title=dom-MediaController-seekable>seekable</a>;
   readonly attribute double <a href=#dom-mediacontroller-duration title=dom-MediaController-duration>duration</a>;
            attribute double <a href=#dom-mediacontroller-currenttime title=dom-MediaController-currentTime>currentTime</a>;
 
   readonly attribute boolean <a href=#dom-mediacontroller-paused title=dom-MediaController-paused>paused</a>;
+  readonly attribute <a href=#mediacontrollerplaybackstate>MediaControllerPlaybackState</a> <a href=#dom-mediacontroller-playbackstate title=dom-MediaController-playbackState>playbackState</a>;
   readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-mediacontroller-played title=dom-MediaController-played>played</a>;
   void <a href=#dom-mediacontroller-play title=dom-MediaController-play>play</a>();
   void <a href=#dom-mediacontroller-pause title=dom-MediaController-pause>pause</a>();
@@ -31792,6 +31796,17 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title=dom-MediaController-readyState><a href=#dom-mediacontroller-readystate>readyState</a></code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code><a href=#mediacontroller>MediaController</a></code> was in
+    the last time it fired events as a result of <a href=#report-the-controller-state title="report
+    the controller state">reporting teh controller state</a>. The
+    values of this attribute are the same as for the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute of <a href=#media-element title="media element">media elements</a>.</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title=dom-MediaController-buffered><a href=#dom-mediacontroller-buffered>buffered</a></code></dt>
 
    <dd>
@@ -31847,6 +31862,22 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code><a href=#mediacontroller>MediaController</a></code> was in
+    the last time it fired events as a result of <a href=#report-the-controller-state title="report
+    the controller state">reporting teh controller state</a>. The
+    value of this attribute is either "<code title=dom-MediaController-playing><a href=#dom-mediacontroller-playing>playing</a></code>", indicating
+    that the media is actively playing, "<code title=dom-MediaController-ended><a href=#dom-mediacontroller-ended>ended</a></code>", indicating that
+    the media is not playing because playback has reached the end of
+    all the <a href=#slaved-media-elements>slaved media elements</a>, or "<code title=dom-MediaController-waiting><a href=#dom-mediacontroller-waiting>waiting</a></code>", indicating
+    that the media is not playing for some other reason (e.g. the
+    <code><a href=#mediacontroller>MediaController</a></code> is paused).</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play</a></code>()</dt>
 
    <dd>
@@ -31994,7 +32025,14 @@
   constructor, when invoked, must return a newly created
   <code><a href=#mediacontroller>MediaController</a></code> object.</p>
 
-  <hr><p>The <dfn id=dom-mediacontroller-seekable title=dom-MediaController-seekable><code>seekable</code></dfn>
+  <hr><p>The <dfn id=dom-mediacontroller-readystate title=dom-MediaController-readyState><code>readyState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code><a href=#mediacontroller>MediaController</a></code> object is created, the
+  attribute must be set to the value 0 (<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>). The value is
+  updated by the <a href=#report-the-controller-state>report the controller state</a> algorithm
+  below.</p>
+
+  <p>The <dfn id=dom-mediacontroller-seekable title=dom-MediaController-seekable><code>seekable</code></dfn>
   attribute must return a new static <a href=#normalized-timeranges-object>normalized
   <code>TimeRanges</code> object</a> that represents the
   intersection of the ranges of the <a href=#media-resource title="media resource">media
@@ -32070,6 +32108,13 @@
   <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-playbackstate title=dom-MediaController-playbackState><code>playbackState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code><a href=#mediacontroller>MediaController</a></code> object is created, the
+  attribute must be set to the value "<code title=dom-MediaController-waiting><a href=#dom-mediacontroller-waiting>waiting</a></code>". The value is
+  updated by the <a href=#report-the-controller-state>report the controller state</a> algorithm
+  below.</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
@@ -32286,10 +32331,20 @@
      <li><p><i>Loop</i>: Increment <var title="">next state</var> by
      one.</li>
 
-     <li><p><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 the event name corresponding to the value of <var title="">next state</var> given in the table below.</li>
+     <li>
 
+      <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+      <ol><li><p>Set the <code><a href=#mediacontroller>MediaController</a></code>'s <code title=dom-MediaController-readyState><a href=#dom-mediacontroller-readystate>readyState</a></code>
+       attribute to the value <var title="">next state</var>.</li>
+
+       <li><p><a href=#fire-a-simple-event>Fire a simple event</a> at the
+       <code><a href=#mediacontroller>MediaController</a></code> object, whose name is the event
+       name corresponding to the value of <var title="">next
+       state</var> given in the table below.</li>
+
+      </ol></li>
+
      <li><p>If <var title="">next state</var> is less than <var title="">new readiness state</var>, then return to the step
      labeled <i>loop</i>.</li>
 
@@ -32367,13 +32422,37 @@
    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>
-   otherwise.</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 run the
+    following steps:</p>
+
+    <ol><li><p>Set the <code><a href=#mediacontroller>MediaController</a></code>'s <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code>
+     attribute to the value given in the second column of the row of
+     the following table whose first column contains the <var title="">new playback state</var>.</li>
+
+     <li><p><a href=#fire-a-simple-event>Fire a simple event</a> at the
+     <code><a href=#mediacontroller>MediaController</a></code> object, whose name is the value
+     given in the third column of the row of the following table whose
+     first column contains the <var title="">new playback
+     state</var>.</li>
+
+    </ol><table><thead><tr><th>New playback state
+       <th>New value for <code title=dom-MediaController-playbackState><a href=#dom-mediacontroller-playbackstate>playbackState</a></code>
+       <th>Event name
+     <tbody><tr><td><i>playing</i>
+       <td>"<dfn id=dom-mediacontroller-playing title=dom-MediaController-playing><code>playing</code></dfn>"
+       <td><code title=event-MediaController-playing><a href=#event-mediacontroller-playing>playing</a></code>
+      <tr><td><i>waiting</i>
+       <td>"<dfn id=dom-mediacontroller-waiting title=dom-MediaController-waiting><code>waiting</code></dfn>"
+       <td><code title=event-MediaController-waiting><a href=#event-mediacontroller-waiting>waiting</a></code>
+      <tr><td><i>ended</i>
+       <td>"<dfn id=dom-mediacontroller-ended title=dom-MediaController-ended><code>ended</code></dfn>"
+       <td><code title=event-MediaController-ended><a href=#event-mediacontroller-ended>ended</a></code>
+    </table></li>
+
    <li><p>Let the <code><a href=#mediacontroller>MediaController</a></code>'s <a href=#most-recently-reported-playback-state>most recently
    reported playback state</a> be <var title="">new playback
    state</var>.</li>

Modified: source
===================================================================
--- source	2012-06-04 23:40:30 UTC (rev 7115)
+++ source	2012-06-05 00:13:30 UTC (rev 7116)
@@ -34647,14 +34647,18 @@
 
   <h6>Media controllers</h6>
 
-  <pre class="idl">[<span title="dom-MediaController">Constructor</span>]
+  <pre class="idl">enum <dfn>MediaControllerPlaybackState</dfn> { "<span title="dom-MediaController-waiting">waiting</span>", "<span title="dom-MediaController-playing">playing</span>", "<span title="dom-MediaController-ended">ended</span>" };
+[<span title="dom-MediaController">Constructor</span>]
 interface <dfn>MediaController</dfn> {
+  readonly attribute unsigned short <span title="dom-MediaController-readyState">readyState</span>; // uses <span>HTMLMediaElement</span>.<span title="dom-media-readyState">readyState</span>'s values
+
   readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-buffered">buffered</span>;
   readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-seekable">seekable</span>;
   readonly attribute double <span title="dom-MediaController-duration">duration</span>;
            attribute double <span title="dom-MediaController-currentTime">currentTime</span>;
 
   readonly attribute boolean <span title="dom-MediaController-paused">paused</span>;
+  readonly attribute <span>MediaControllerPlaybackState</span> <span title="dom-MediaController-playbackState">playbackState</span>;
   readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-played">played</span>;
   void <span title="dom-MediaController-play">play</span>();
   void <span title="dom-MediaController-pause">pause</span>();
@@ -34705,6 +34709,19 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title="dom-MediaController-readyState">readyState</code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code>MediaController</code> was in
+    the last time it fired events as a result of <span title="report
+    the controller state">reporting teh controller state</span>. The
+    values of this attribute are the same as for the <code
+    title="dom-media-readyState">readyState</code> attribute of <span
+    title="media element">media elements</span>.</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title="dom-MediaController-buffered">buffered</code></dt>
 
    <dd>
@@ -34761,6 +34778,25 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title="dom-MediaController-playbackState">playbackState</code></dt>
+
+   <dd>
+
+    <p>Returns the state that the <code>MediaController</code> was in
+    the last time it fired events as a result of <span title="report
+    the controller state">reporting teh controller state</span>. The
+    value of this attribute is either "<code
+    title="dom-MediaController-playing">playing</code>", indicating
+    that the media is actively playing, "<code
+    title="dom-MediaController-ended">ended</code>", indicating that
+    the media is not playing because playback has reached the end of
+    all the <span>slaved media elements</span>, or "<code
+    title="dom-MediaController-waiting">waiting</code>", indicating
+    that the media is not playing for some other reason (e.g. the
+    <code>MediaController</code> is paused).</p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title="dom-MediaController-play">play</code>()</dt>
 
    <dd>
@@ -34928,6 +34964,15 @@
   <hr>
 
   <p>The <dfn
+  title="dom-MediaController-readyState"><code>readyState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code>MediaController</code> object is created, the
+  attribute must be set to the value 0 (<code
+  title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>). The value is
+  updated by the <span>report the controller state</span> algorithm
+  below.</p>
+
+  <p>The <dfn
   title="dom-MediaController-seekable"><code>seekable</code></dfn>
   attribute must return a new static <span>normalized
   <code>TimeRanges</code> object</span> that represents the
@@ -35017,6 +35062,15 @@
   state</span> of the <code>MediaController</code>.</p>
 
   <p>The <dfn
+  title="dom-MediaController-playbackState"><code>playbackState</code></dfn>
+  attribute must return the value to which it was most recently set.
+  When the <code>MediaController</code> object is created, the
+  attribute must be set to the value "<code
+  title="dom-MediaController-waiting">waiting</code>". The value is
+  updated by the <span>report the controller state</span> algorithm
+  below.</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
@@ -35265,11 +35319,25 @@
      <li><p><i>Loop</i>: Increment <var title="">next state</var> by
      one.</p></li>
 
-     <li><p><span>Queue a task</span> to <span>fire a simple
-     event</span> at the <code>MediaController</code> object, whose
-     name is the event name corresponding to the value of <var
-     title="">next state</var> given in the table below.</p></li>
+     <li>
 
+      <p><span>Queue a task</span> to run the following steps:</p>
+
+      <ol>
+
+       <li><p>Set the <code>MediaController</code>'s <code
+       title="dom-MediaController-readyState">readyState</code>
+       attribute to the value <var title="">next state</var>.</p></li>
+
+       <li><p><span>Fire a simple event</span> at the
+       <code>MediaController</code> object, whose name is the event
+       name corresponding to the value of <var title="">next
+       state</var> given in the table below.</p></li>
+
+      </ol>
+
+     </li>
+
      <li><p>If <var title="">next state</var> is less than <var
      title="">new readiness state</var>, then return to the step
      labeled <i>loop</i>.</p></li>
@@ -35367,18 +35435,52 @@
    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
-   title="event-MediaController-playing">playing</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">waiting</code>
-   otherwise.</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 run the
+    following steps:</p>
+
+    <ol>
+
+     <li><p>Set the <code>MediaController</code>'s <code
+     title="dom-MediaController-playbackState">playbackState</code>
+     attribute to the value given in the second column of the row of
+     the following table whose first column contains the <var
+     title="">new playback state</var>.</p></li>
+
+     <li><p><span>Fire a simple event</span> at the
+     <code>MediaController</code> object, whose name is the value
+     given in the third column of the row of the following table whose
+     first column contains the <var title="">new playback
+     state</var>.</p></li>
+
+    </ol>
+
+    <table>
+     <thead>
+      <tr>
+       <th>New playback state
+       <th>New value for <code title="dom-MediaController-playbackState">playbackState</code>
+       <th>Event name
+     <tbody>
+      <tr>
+       <td><i>playing</i>
+       <td>"<dfn title="dom-MediaController-playing"><code>playing</code></dfn>"
+       <td><code title="event-MediaController-playing">playing</code>
+      <tr>
+       <td><i>waiting</i>
+       <td>"<dfn title="dom-MediaController-waiting"><code>waiting</code></dfn>"
+       <td><code title="event-MediaController-waiting">waiting</code>
+      <tr>
+       <td><i>ended</i>
+       <td>"<dfn title="dom-MediaController-ended"><code>ended</code></dfn>"
+       <td><code title="event-MediaController-ended">ended</code>
+    </table>
+
+   </li>
+
    <li><p>Let the <code>MediaController</code>'s <span>most recently
    reported playback state</span> be <var title="">new playback
    state</var>.</p></li>




More information about the Commit-Watchers mailing list