[html5] r1626 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed May 14 23:36:54 PDT 2008


Author: ianh
Date: 2008-05-14 23:36:54 -0700 (Wed, 14 May 2008)
New Revision: 1626

Modified:
   index
   source
Log:
[gow] (2) Define the order of events during the seeking algorithm better; add 'seeking' and 'seeked' events to the media element event extravaganza.

Modified: index
===================================================================
--- index	2008-05-15 06:00:17 UTC (rev 1625)
+++ index	2008-05-15 06:36:54 UTC (rev 1626)
@@ -16488,15 +16488,17 @@
    href="#current0">current playback position</a> changes in a discontinuous
    fashion (so that the relevant events fire).
 
-  <p>When a <a href="#media7">media element</a> that is <a
-   href="#actively">actively playing</a> stops playing because its <code
-   title=dom-media-readyState><a href="#readystate0">readyState</a></code>
-   attribute changes to a value lower than <code title=dom-media-CAN_PLAY><a
+  <p id=fire-waiting-when-waiting>When a <a href="#media7">media element</a>
+   that is <a href="#actively">actively playing</a> stops playing because its
+   <code title=dom-media-readyState><a
+   href="#readystate0">readyState</a></code> attribute changes to a value
+   lower than <code title=dom-media-CAN_PLAY><a
    href="#canplay">CAN_PLAY</a></code>, without the element having <a
    href="#ended">ended playback</a>, or playback having <a
    href="#stopped">stopped due to errors</a>, or playback having <a
-   href="#paused0">paused for user interaction</a>, the user agent must <a
-   href="#firing2">fire a simple event</a> called <code
+   href="#paused0">paused for user interaction</a>, or the <a href="#seek"
+   title=dom-media-seek>seeking algorithm</a> being invoked, the user agent
+   must <a href="#firing2">fire a simple event</a> called <code
    title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the
    element, and then must <a href="#firing2">fire a simple event</a> called
    <code title=event-waiting><a href="#waiting">waiting</a></code> at the
@@ -16777,16 +16779,50 @@
      href="#seeking0">seeking</a></code> DOM attribute must be set to true.
 
    <li>
-    <p>The user agent must <a href="#firing2">fire a simple event</a> called
-     <code title=event-timeupdate><a href="#timeupdate">timeupdate</a></code>
-     at the element.
+    <p>If the seek was in response to a DOM method call or setting of a DOM
+     attribute, then continue the script. The remainder of these steps must
+     be run asynchronously.
 
    <li>
-    <p>As soon as the user agent has established whether or not the <a
-     href="#media9">media data</a> for the <var title="">new playback
-     position</var> is available, and, if it is, decoded enough data to play
-     back that position, the <code title=dom-media-seeking><a
+    <p>Once any running scripts have finished executing, the user agent must
+     <a href="#firing2">fire a simple event</a> called <code
+     title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
+     the element.
+
+   <li>
+    <p>If the <a href="#media7">media element</a> was <a
+     href="#actively">actively playing</a> immediately before it started
+     seeking, but seeking caused its <code title=dom-media-readyState><a
+     href="#readystate0">readyState</a></code> attribute to change to a value
+     lower than <code title=dom-media-CAN_PLAY><a
+     href="#canplay">CAN_PLAY</a></code>, the user agent must <a
+     href="#firing2">fire a simple event</a> called <code
+     title=event-waiting><a href="#waiting">waiting</a></code> at the
+     element.
+
+   <li>
+    <p>If, when it reaches this step, the user agent has still not
+     established whether or not the <a href="#media9">media data</a> for the
+     <var title="">new playback position</var> is available, and, if it is,
+     decoded enough data to play back that position, the user agent must <a
+     href="#firing2">fire a simple event</a> called <code
+     title=event-seeking><a href="#seeking1">seeking</a></code> at the
+     element.
+
+   <li>
+    <p>The user agent must wait until it has established whether or not the
+     <a href="#media9">media data</a> for the <var title="">new playback
+     position</var> is available, and, if it is, until it has decoded enough
+     data to play back that position.
+
+   <li>
+    <p>The <code title=dom-media-seeking><a
      href="#seeking0">seeking</a></code> DOM attribute must be set to false.
+
+   <li>
+    <p>Once any running scripts have finished executing, the user agent must
+     <a href="#firing2">fire a simple event</a> called <code
+     title=event-seeked><a href="#seeked">seeked</a></code> at the element.
   </ol>
 
   <p>The <dfn id=seekable
@@ -17285,6 +17321,28 @@
       due to errors</a>.
 
     <tr>
+     <td><dfn id=seeking1 title=event-seeking><code>seeking</code></dfn>
+
+     <td><code>Event</code>
+
+     <td>The <code title=dom-media-seeking><a
+      href="#seeking0">seeking</a></code> DOM attribute changed to true and
+      the seek operation is taking long enough that the user agent has time
+      to fire the event.
+
+     <td>
+
+    <tr>
+     <td><dfn id=seeked title=event-seeked><code>seeked</code></dfn>
+
+     <td><code>Event</code>
+
+     <td>The <code title=dom-media-seeking><a
+      href="#seeking0">seeking</a></code> DOM attribute changed to false.
+
+     <td>
+
+    <tr>
      <td><dfn id=timeupdate
       title=event-timeupdate><code>timeupdate</code></dfn>
 

Modified: source
===================================================================
--- source	2008-05-15 06:00:17 UTC (rev 1625)
+++ source	2008-05-15 06:36:54 UTC (rev 1626)
@@ -14411,14 +14411,16 @@
   <span>current playback position</span> changes in a discontinuous
   fashion (so that the relevant events fire).</p>
 
-  <p>When a <span>media element</span> that is <span>actively
-  playing</span> stops playing because its <code
-  title="dom-media-readyState">readyState</code> attribute changes to
-  a value lower than <code title="dom-media-CAN_PLAY">CAN_PLAY</code>,
-  without the element having <span>ended playback</span>, or playback
-  having <span>stopped due to errors</span>, or playback having
-  <span>paused for user interaction</span>, the user agent must
-  <span>fire a simple event</span> called <code
+  <p id="fire-waiting-when-waiting">When a <span>media element</span>
+  that is <span>actively playing</span> stops playing because its
+  <code title="dom-media-readyState">readyState</code> attribute
+  changes to a value lower than <code
+  title="dom-media-CAN_PLAY">CAN_PLAY</code>, without the element
+  having <span>ended playback</span>, or playback having <span>stopped
+  due to errors</span>, or playback having <span>paused for user
+  interaction</span>, or the <span title="dom-media-seek">seeking
+  algorithm</span> being invoked, the user agent must <span>fire a
+  simple event</span> called <code
   title="event-timeupdate">timeupdate</code> at the element, and then
   must <span>fire a simple event</span> called <code
   title="event-waiting">waiting</code> at the element.</p>
@@ -14685,17 +14687,41 @@
    <li><p>The <code title="dom-media-seeking">seeking</code> DOM
    attribute must be set to true.</p></li>
 
-   <li><p>The user agent must <span>fire a simple event</span> called
-   <code title="event-timeupdate">timeupdate</code> at the
-   element.</p></li>
+   <li><p>If the seek was in response to a DOM method call or setting
+   of a DOM attribute, then continue the script. The remainder of
+   these steps must be run asynchronously.</p></li>
 
-   <li><p>As soon as the user agent has established whether or not the
-   <span>media data</span> for the <var title="">new playback
-   position</var> is available, and, if it is, decoded enough data to
-   play back that position, the <code
-   title="dom-media-seeking">seeking</code> DOM attribute must be set
-   to false.</p></li>
+   <li><p>Once any running scripts have finished executing, the user
+   agent must <span>fire a simple event</span> called <code
+   title="event-timeupdate">timeupdate</code> at the element.</p></li>
 
+   <li><p>If the <span>media element</span> was <span>actively
+   playing</span> immediately before it started seeking, but seeking
+   caused its <code title="dom-media-readyState">readyState</code>
+   attribute to change to a value lower than <code
+   title="dom-media-CAN_PLAY">CAN_PLAY</code>, the user agent must
+   <span>fire a simple event</span> called <code
+   title="event-waiting">waiting</code> at the element.</p></li>
+
+   <li><p>If, when it reaches this step, the user agent has still not
+   established whether or not the <span>media data</span> for the <var
+   title="">new playback position</var> is available, and, if it is,
+   decoded enough data to play back that position, the user agent must
+   <span>fire a simple event</span> called <code
+   title="event-seeking">seeking</code> at the element.</p></li>
+
+   <li><p>The user agent must wait until it has established whether or
+   not the <span>media data</span> for the <var title="">new playback
+   position</var> is available, and, if it is, until it has decoded
+   enough data to play back that position.</p></li>
+
+   <li><p>The <code title="dom-media-seeking">seeking</code> DOM
+   attribute must be set to false.</p></li>
+
+   <li><p>Once any running scripts have finished executing, the user
+   agent must <span>fire a simple event</span> called <code
+   title="event-seeked">seeked</code> at the element.</p></li>
+
   </ol>
 
   <p>The <dfn title="dom-media-seekable"><code>seekable</code></dfn>
@@ -15067,6 +15093,16 @@
      <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">readyState</code> is either <code title="dom-media-DATA_UNAVAILABLE">DATA_UNAVAILABLE</code> or <code title="dom-media-CAN_SHOW_CURRENT_FRAME">CAN_SHOW_CURRENT_FRAME</code>, and <code title="dom-media-paused">paused</code> is false. Either <code title="dom-media-seeking">seeking</code> is true, or the <span>current playback position</span> is not contained in any of the ranges in <code title="dom-media-buffered">buffered</code>. It is possible for playback to stop for two other reasons without <code title="dom-media-paused">paused</code> being false, but those two reasons do not fire this event: maybe <span title="ended playback">playback ended</span>, or playback <span>stopped due to errors</span>.
     <tr>
+     <td><dfn title="event-seeking"><code>seeking</code></dfn>
+     <td><code>Event</code>
+     <td>The <code title="dom-media-seeking">seeking</code> DOM attribute changed to true and the seek operation is taking long enough that the user agent has time to fire the event.
+     <td>
+    <tr>
+     <td><dfn title="event-seeked"><code>seeked</code></dfn>
+     <td><code>Event</code>
+     <td>The <code title="dom-media-seeking">seeking</code> DOM attribute changed to false.
+     <td>
+    <tr>
      <td><dfn title="event-timeupdate"><code>timeupdate</code></dfn>
      <td><code>Event</code>
      <td>The <span>current playback position</span> changed in an interesting way, for example discontinuously.




More information about the Commit-Watchers mailing list