- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 05 Jun 2012 00:13:39 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv28847 Modified Files: Overview.html Log Message: Expose the controller state, since implementing it is apparently easy and it can be a bit more subtle than it looks. (whatwg r7116) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.5668 retrieving revision 1.5669 diff -u -d -r1.5668 -r1.5669 --- Overview.html 4 Jun 2012 23:40:39 -0000 1.5668 +++ Overview.html 5 Jun 2012 00:13:35 -0000 1.5669 @@ -321,7 +321,7 @@ <h1>HTML5</h1> <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id="editor-s-draft-4-june-2012">Editor's Draft 4 June 2012</h2> + <h2 class="no-num no-toc" id="editor-s-draft-5-june-2012">Editor's Draft 5 June 2012</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -514,7 +514,7 @@ Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 4 June 2012 Editor's Draft. + This specification is the 5 June 2012 Editor's Draft. </p> @@ -29643,14 +29643,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>(); @@ -29698,6 +29702,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> @@ -29753,6 +29768,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> @@ -29900,7 +29931,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 @@ -29976,6 +30014,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 @@ -30191,9 +30236,19 @@ <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> @@ -30272,12 +30327,36 @@ 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
Received on Tuesday, 5 June 2012 00:13:42 UTC