[html5] r6025 - [giow] (0) Fix a few places where a media element could get out of sync with its [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Apr 22 12:36:16 PDT 2011


Author: ianh
Date: 2011-04-22 12:36:14 -0700 (Fri, 22 Apr 2011)
New Revision: 6025

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Fix a few places where a media element could get out of sync with its controller, and re-enable media fragments for loading resources with a controller.

Modified: complete.html
===================================================================
--- complete.html	2011-04-21 23:35:25 UTC (rev 6024)
+++ complete.html	2011-04-22 19:36:14 UTC (rev 6025)
@@ -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 21 April 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 22 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>-->
@@ -26993,14 +26993,16 @@
 
        </li>
 
+       <li><p>Let <var title="">jumped</var> be false.</li>
+
        <li>
 
         <p>If either the <a href=#media-resource>media resource</a> or the address of
         the <var title="">current media resource</var> indicate a
         particular start time, then set the <a href=#initial-playback-position>initial playback
-        position</a> to that time and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time. Ignore any
-        resulting exceptions (if the position is out of range, it is
-        effectively ignored).</p>
+        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
+        (if the position is out of range, it is effectively
+        ignored).</p>
 
         <p class=example>For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -27019,8 +27021,26 @@
        object.</li>
 
        <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
-       media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
-       to speed with its new media controller</a>.</p>
+       media controller</a>, then: if <var title="">jumped</var> is
+       true and the <a href=#initial-playback-position>initial playback position</a>, relative
+       to the <a href=#current-media-controller>current media controller</a>'s timeline, is
+       greater than the <a href=#current-media-controller>current media controller</a>'s
+       <a href=#media-controller-position>media controller position</a>, then <a href=#seek-the-media-controller>seek the
+       media controller</a> to the <a href=#media-element>media element</a>'s
+       <a href=#initial-playback-position>initial playback position</a>, relative to the
+       <a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
+       <a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
+       element</a> to the <a href=#media-controller-position>media controller position</a>,
+       relative to the <a href=#media-element>media element</a>'s timeline,
+       discarding any resulting exceptions.</li> <!-- i.e. "bring
+       the media element up to speed with its new media controller"
+       --> <!-- we do this because otherwise the fragment identifier
+       initial position is lost. Basically this means that if you are
+       attached to a media controller when you load your resource, and
+       you have a fragment identifier with a start time, you'll jump
+       the media controller to that time if it's not already past it.
+       (So if there are several, you'll jump the media controller to
+       the furthest one in the timeline.) -->
 <!--CONTROLLER-->
 
        <li>
@@ -28144,8 +28164,13 @@
    <li>
 
     <p>If the <a href=#ended-playback title="ended playback">playback has ended</a>
-    and the <a href=#direction-of-playback>direction of playback</a> is forwards, <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest possible
-    position</a> of the <a href=#media-resource>media resource</a>.</p>
+    and the <a href=#direction-of-playback>direction of playback</a> is forwards,
+<!--CONTROLLER-->
+    and the <a href=#media-element>media element</a> does not have a <a href=#current-media-controller>current
+    media controller</a>,
+<!--CONTROLLER-->
+    <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest
+    possible position</a> of the <a href=#media-resource>media resource</a>.</p>
 
     <p class=note>This <a href=#seekUpdate>will cause</a> the user
     agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
@@ -28155,6 +28180,12 @@
 
    </li>
 
+<!--CONTROLLER-->
+   <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
+   media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
+   to speed with its new media controller</a>.</p>
+<!--CONTROLLER-->
+
    <li>
 
     <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, run
@@ -28600,7 +28631,13 @@
   element</a> could play in a non-linear fashion. If this happens,
   the user agent must act as if the algorithm for <a href=#dom-media-seek title=dom-media-seek>seeking</a> was used whenever the
   <a href=#current-playback-position>current playback position</a> changes in a discontinuous
-  fashion (so that the relevant events fire).</p>
+  fashion (so that the relevant events fire).
+<!--CONTROLLER-->
+  If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+  controller</a>, then the user agent must <a href=#seek-the-media-controller>seek the media
+  controller</a> appropriately instead.
+<!--CONTROLLER-->
+  </p>
 
   </div>
 

Modified: index
===================================================================
--- index	2011-04-21 23:35:25 UTC (rev 6024)
+++ index	2011-04-22 19:36:14 UTC (rev 6025)
@@ -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 21 April 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 22 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>-->
@@ -27005,14 +27005,16 @@
 
        </li>
 
+       <li><p>Let <var title="">jumped</var> be false.</li>
+
        <li>
 
         <p>If either the <a href=#media-resource>media resource</a> or the address of
         the <var title="">current media resource</var> indicate a
         particular start time, then set the <a href=#initial-playback-position>initial playback
-        position</a> to that time and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time. Ignore any
-        resulting exceptions (if the position is out of range, it is
-        effectively ignored).</p>
+        position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
+        (if the position is out of range, it is effectively
+        ignored).</p>
 
         <p class=example>For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -27031,8 +27033,26 @@
        object.</li>
 
        <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
-       media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
-       to speed with its new media controller</a>.</p>
+       media controller</a>, then: if <var title="">jumped</var> is
+       true and the <a href=#initial-playback-position>initial playback position</a>, relative
+       to the <a href=#current-media-controller>current media controller</a>'s timeline, is
+       greater than the <a href=#current-media-controller>current media controller</a>'s
+       <a href=#media-controller-position>media controller position</a>, then <a href=#seek-the-media-controller>seek the
+       media controller</a> to the <a href=#media-element>media element</a>'s
+       <a href=#initial-playback-position>initial playback position</a>, relative to the
+       <a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
+       <a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
+       element</a> to the <a href=#media-controller-position>media controller position</a>,
+       relative to the <a href=#media-element>media element</a>'s timeline,
+       discarding any resulting exceptions.</li> <!-- i.e. "bring
+       the media element up to speed with its new media controller"
+       --> <!-- we do this because otherwise the fragment identifier
+       initial position is lost. Basically this means that if you are
+       attached to a media controller when you load your resource, and
+       you have a fragment identifier with a start time, you'll jump
+       the media controller to that time if it's not already past it.
+       (So if there are several, you'll jump the media controller to
+       the furthest one in the timeline.) -->
 <!--CONTROLLER-->
 
        <li>
@@ -28156,8 +28176,13 @@
    <li>
 
     <p>If the <a href=#ended-playback title="ended playback">playback has ended</a>
-    and the <a href=#direction-of-playback>direction of playback</a> is forwards, <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest possible
-    position</a> of the <a href=#media-resource>media resource</a>.</p>
+    and the <a href=#direction-of-playback>direction of playback</a> is forwards,
+<!--CONTROLLER-->
+    and the <a href=#media-element>media element</a> does not have a <a href=#current-media-controller>current
+    media controller</a>,
+<!--CONTROLLER-->
+    <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest
+    possible position</a> of the <a href=#media-resource>media resource</a>.</p>
 
     <p class=note>This <a href=#seekUpdate>will cause</a> the user
     agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
@@ -28167,6 +28192,12 @@
 
    </li>
 
+<!--CONTROLLER-->
+   <li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
+   media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
+   to speed with its new media controller</a>.</p>
+<!--CONTROLLER-->
+
    <li>
 
     <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, run
@@ -28612,7 +28643,13 @@
   element</a> could play in a non-linear fashion. If this happens,
   the user agent must act as if the algorithm for <a href=#dom-media-seek title=dom-media-seek>seeking</a> was used whenever the
   <a href=#current-playback-position>current playback position</a> changes in a discontinuous
-  fashion (so that the relevant events fire).</p>
+  fashion (so that the relevant events fire).
+<!--CONTROLLER-->
+  If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
+  controller</a>, then the user agent must <a href=#seek-the-media-controller>seek the media
+  controller</a> appropriately instead.
+<!--CONTROLLER-->
+  </p>
 
   </div>
 

Modified: source
===================================================================
--- source	2011-04-21 23:35:25 UTC (rev 6024)
+++ source	2011-04-22 19:36:14 UTC (rev 6025)
@@ -29266,15 +29266,18 @@
 
        </li>
 
+       <li><p>Let <var title="">jumped</var> be false.</p></li>
+
        <li>
 
         <p>If either the <span>media resource</span> or the address of
         the <var title="">current media resource</var> indicate a
         particular start time, then set the <span>initial playback
-        position</span> to that time and then <span
-        title="dom-media-seek">seek</span> to that time. Ignore any
-        resulting exceptions (if the position is out of range, it is
-        effectively ignored).</p>
+        position</span> to that time, <span
+        title="dom-media-seek">seek</span> to that time, and let <var
+        title="">jumped</var> be true. Ignore any resulting exceptions
+        (if the position is out of range, it is effectively
+        ignored).</p>
 
         <p class="example">For example, with media formats that
         support the <cite>Media Fragments URI</cite> fragment
@@ -29296,8 +29299,26 @@
        object.</p></li>
 
        <li><p>If the <span>media element</span> has a <span>current
-       media controller</span>, then <span>bring the media element up
-       to speed with its new media controller</span>.</p>
+       media controller</span>, then: if <var title="">jumped</var> is
+       true and the <span>initial playback position</span>, relative
+       to the <span>current media controller</span>'s timeline, is
+       greater than the <span>current media controller</span>'s
+       <span>media controller position</span>, then <span>seek the
+       media controller</span> to the <span>media element</span>'s
+       <span>initial playback position</span>, relative to the
+       <span>current media controller</span>'s timeline; otherwise,
+       <span title="dom-media-seek">seek</span> the <span>media
+       element</span> to the <span>media controller position</span>,
+       relative to the <span>media element</span>'s timeline,
+       discarding any resulting exceptions.</p></li> <!-- i.e. "bring
+       the media element up to speed with its new media controller"
+       --> <!-- we do this because otherwise the fragment identifier
+       initial position is lost. Basically this means that if you are
+       attached to a media controller when you load your resource, and
+       you have a fragment identifier with a start time, you'll jump
+       the media controller to that time if it's not already past it.
+       (So if there are several, you'll jump the media controller to
+       the furthest one in the timeline.) -->
 <!--START w3c-html--><!--CONTROLLER-->
 
        <li>
@@ -30630,9 +30651,13 @@
    <li>
 
     <p>If the <span title="ended playback">playback has ended</span>
-    and the <span>direction of playback</span> is forwards, <span
-    title="dom-media-seek">seek</span> to the <span>earliest possible
-    position</span> of the <span>media resource</span>.</p>
+    and the <span>direction of playback</span> is forwards,
+<!--END w3c-html--><!--CONTROLLER-->
+    and the <span>media element</span> does not have a <span>current
+    media controller</span>,
+<!--START w3c-html--><!--CONTROLLER-->
+    <span title="dom-media-seek">seek</span> to the <span>earliest
+    possible position</span> of the <span>media resource</span>.</p>
 
     <p class="note">This <a href="#seekUpdate">will cause</a> the user
     agent to <span>queue a task</span> to <span>fire a simple
@@ -30643,6 +30668,12 @@
 
    </li>
 
+<!--END w3c-html--><!--CONTROLLER-->
+   <li><p>If the <span>media element</span> has a <span>current
+   media controller</span>, then <span>bring the media element up
+   to speed with its new media controller</span>.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
    <li>
 
     <p>If the <span>media element</span>'s <code
@@ -31173,7 +31204,13 @@
   the user agent must act as if the algorithm for <span
   title="dom-media-seek">seeking</span> was used whenever the
   <span>current playback position</span> changes in a discontinuous
-  fashion (so that the relevant events fire).</p>
+  fashion (so that the relevant events fire).
+<!--END w3c-html--><!--CONTROLLER-->
+  If the <span>media element</span> has a <span>current media
+  controller</span>, then the user agent must <span>seek the media
+  controller</span> appropriately instead.
+<!--START w3c-html--><!--CONTROLLER-->
+  </p>
 
   </div>
 




More information about the Commit-Watchers mailing list