- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 01 Dec 2008 12:31:28 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv13057 Modified Files: Overview.html Log Message: New plan. Introduce a 'playing' event for when the playback actually begins. (whatwg r2498) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1668 retrieving revision 1.1669 diff -u -d -r1.1668 -r1.1669 --- Overview.html 1 Dec 2008 12:08:27 -0000 1.1668 +++ Overview.html 1 Dec 2008 12:31:25 -0000 1.1669 @@ -14595,8 +14595,16 @@ <dt>If the prevous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or less, and the new ready state is <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code></dt> - <dd><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> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>.</dd> + <dd> + + <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> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>.</p> + + <p>If the element is <a href=#potentially-playing>potentially playing</a>, 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> called <code title=event-playing><a href=#event-playing>playing</a></code>.</p> + + </dd> <!-- going up to enough --> <dt>If the new ready state is <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code></dt> @@ -14619,6 +14627,11 @@ using script to force the video to play, so as to allow the user to override the behavior if so desired.</p> + <p>If the element is now <a href=#potentially-playing>potentially playing</a>, and the + previous ready state was not <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, 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> called <code title=event-playing><a href=#event-playing>playing</a></code>.</p> + </dd> </dl><p class=note>It is possible for the ready state of a media @@ -14791,15 +14804,26 @@ <p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, it must be set to false.</p> - <p>If this changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, 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> - called <code title=event-play><a href=#event-play>play</a></code> at the element; if, in - addition, the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a - value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, the - user agent must also <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a - simple event</a> called <code title=event-waiting><a href=#event-waiting>waiting</a></code> at the element.</p> + <p>If this changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, the user agent must run the following substeps:</p> - </li> + <ol><li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> + called <code title=event-play><a href=#event-play>play</a></code> at the element.</li> + + <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has the + value <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> + or <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>, + <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> + called <code title=event-waiting><a href=#event-waiting>waiting</a></code> at the + element.</li> + + <li><p>Otherwise, the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has the value + <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> + or <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>; + <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> + called <code title=event-playing><a href=#event-playing>playing</a></code> at the + element.</li> + + </ol></li> <li><p>The <a href=#media-element>media element</a>'s <a href=#autoplaying-flag>autoplaying flag</a> must be set to false.</li> @@ -14887,16 +14911,13 @@ steps.</li> <li><p>If the time was reached through the usual monotonic increase - of the current playback position during normal playback, and if - either the user agent has not fired a <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> event at the element in - the past 15 to 250ms, or there has been an instant since the last - time such an event was fired that the element was not - <a href=#potentially-playing>potentially playing</a>, then 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> - called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the - element. (In the other cases, such as explicit seeks, relevant - events get fired as part of the overall process of changing the - current playback position.)</p> + of the current playback position during normal playback, and if the + user agent has not fired a <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> event at the element in + the past 15 to 250ms, then 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> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the element. (In the + other cases, such as explicit seeks, relevant events get fired as + part of the overall process of changing the current playback + position.)</p> <p class=note>The event thus is not to be fired faster than about 66Hz or slower than 4Hz. User agents are encouraged to vary the @@ -15138,7 +15159,7 @@ <tbody><tr><td><dfn id=event-play title=event-play><code>play</code></dfn> <td><code>Event</code> - <td>Playback has begun. Fired after the <code title=dom-media-play><a href=#dom-media-play>play</a></code> method has returned. + <td>Playback has begun. Fired after the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method has returned. <td><code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false. <tr><td><dfn id=event-pause title=event-pause><code>pause</code></dfn> <td><code>Event</code> @@ -15157,6 +15178,10 @@ <td><code>Event</code> <td>Playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course. <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or less than <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>, and <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false. Either <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is true, or the <a href=#current-playback-position>current playback position</a> is not contained in any of the ranges in <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>. It is possible for playback to stop for two other reasons without <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> being false, but those two reasons do not fire this event: maybe <a href=#ended-playback title="ended playback">playback ended</a>, or playback <a href=#stopped-due-to-errors>stopped due to errors</a>. + <tr><td><dfn id=event-playing title=event-playing><code>playing</code></dfn> + <td><code>Event</code> + <td>Playback has started. + <td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false, <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is false, or the <a href=#current-playback-position>current playback position</a> is contained in one of the ranges in <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>. <tr><td><dfn id=event-canplay title=event-canplay><code>canplay</code></dfn> <td><code>Event</code> <td>The user agent can resume playback of the <a href=#media-data>media data</a>, but estimates that if playback were to be started now, the <a href=#media-resource>media resource</a> could not be rendered at the current playback rate up to its end without having to stop for further buffering of content.
Received on Monday, 1 December 2008 12:31:37 UTC