[html5] r7115 - [giow] (0) Update the controller state when the current media controller changes [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jun 4 16:40:32 PDT 2012


Author: ianh
Date: 2012-06-04 16:40:30 -0700 (Mon, 04 Jun 2012)
New Revision: 7115

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Update the controller state when the current media controller changes.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=12547
Affected topics: Video and Audio

Modified: complete.html
===================================================================
--- complete.html	2012-06-01 22:44:12 UTC (rev 7114)
+++ complete.html	2012-06-04 23:40:30 UTC (rev 7115)
@@ -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 1 June 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 4 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>
@@ -29440,6 +29440,8 @@
        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.) -->
+       <!-- note that this can also trigger "report the controller
+       state" since it can change the element's readyState -->
 
       </ol><p>Once the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute
       reaches <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>,
@@ -31946,14 +31948,49 @@
   <hr><p>The <dfn id=dom-media-controller title=dom-media-controller><code>controller</code></dfn> attribute
   on a <a href=#media-element>media element</a>, on getting, must return the
   element's <a href=#current-media-controller>current media controller</a>, if any, or null
-  otherwise. On setting, it must first remove the element's <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> attribute, if any,
-  and then set the <a href=#current-media-controller>current media controller</a> to the given
-  value. If the given value is null, the element no longer has a
-  <a href=#current-media-controller>current media controller</a>; if it is not null, then the
-  user agent must <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>
+  otherwise. On setting, the user agent must run the following
+  steps:</p>
 
-  <hr><p>The <dfn id=dom-mediacontroller title=dom-MediaController><code>MediaController()</code></dfn>
+  <ol><!-- very similar to the algorithm below for setting the content attribute --><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
+   in question.</li>
+
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
+   <li><p>Let <var title="">m</var> have no <a href=#current-media-controller>current
+   media controller</a>, if it currently has one.</li>
+
+   <li><p>Remove the element's <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> content attribute,
+   if any.</li>
+
+   <li><p>If the new value is null, then jump to the <i>update
+   controllers</i> step below.</li>
+
+   <li><p>Let <var title="">m</var>'s <a href=#current-media-controller>current media
+   controller</a> be the new value.</li>
+
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>.</li>
+
+   <li><p><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>.</li>
+
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href=#slaved-media-elements>slaved media elements</a>, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
+  </ol><hr><p>The <dfn id=dom-mediacontroller title=dom-MediaController><code>MediaController()</code></dfn>
   constructor, when invoked, must return a newly created
   <code><a href=#mediacontroller>MediaController</a></code> object.</p>
 
@@ -32385,14 +32422,20 @@
   changed, or removed, the user agent must run the following
   steps:</p>
 
-  <ol><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
+  <ol><!-- very similar to the algorithm above for setting the IDL attribute --><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
    in question.</li>
 
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
    <li><p>Let <var title="">m</var> have no <a href=#current-media-controller>current
    media controller</a>, if it currently has one.</li>
 
    <li><p>If <var title="">m</var>'s <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> attribute is being
-   removed, then abort these steps.</li>
+   removed, then jump to the <i>update controllers</i> step
+   below.</li>
 
    <li>
 
@@ -32414,9 +32457,25 @@
    <li><p>Let <var title="">m</var>'s <a href=#current-media-controller>current media
    controller</a> be <var title="">controller</var>.</li>
 
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>.</li>
+
    <li><p><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>.</li>
 
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href=#slaved-media-elements>slaved media elements</a>, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
   </ol><p>The <dfn id=dom-media-mediagroup title=dom-media-mediaGroup><code>mediaGroup</code></dfn> IDL
   attribute on <a href=#media-element title="media element">media elements</a> must
   <a href=#reflect>reflect</a> the <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> content

Modified: index
===================================================================
--- index	2012-06-01 22:44:12 UTC (rev 7114)
+++ index	2012-06-04 23:40:30 UTC (rev 7115)
@@ -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 1 June 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 4 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>
@@ -29440,6 +29440,8 @@
        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.) -->
+       <!-- note that this can also trigger "report the controller
+       state" since it can change the element's readyState -->
 
       </ol><p>Once the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute
       reaches <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>,
@@ -31946,14 +31948,49 @@
   <hr><p>The <dfn id=dom-media-controller title=dom-media-controller><code>controller</code></dfn> attribute
   on a <a href=#media-element>media element</a>, on getting, must return the
   element's <a href=#current-media-controller>current media controller</a>, if any, or null
-  otherwise. On setting, it must first remove the element's <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> attribute, if any,
-  and then set the <a href=#current-media-controller>current media controller</a> to the given
-  value. If the given value is null, the element no longer has a
-  <a href=#current-media-controller>current media controller</a>; if it is not null, then the
-  user agent must <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>
+  otherwise. On setting, the user agent must run the following
+  steps:</p>
 
-  <hr><p>The <dfn id=dom-mediacontroller title=dom-MediaController><code>MediaController()</code></dfn>
+  <ol><!-- very similar to the algorithm below for setting the content attribute --><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
+   in question.</li>
+
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
+   <li><p>Let <var title="">m</var> have no <a href=#current-media-controller>current
+   media controller</a>, if it currently has one.</li>
+
+   <li><p>Remove the element's <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> content attribute,
+   if any.</li>
+
+   <li><p>If the new value is null, then jump to the <i>update
+   controllers</i> step below.</li>
+
+   <li><p>Let <var title="">m</var>'s <a href=#current-media-controller>current media
+   controller</a> be the new value.</li>
+
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>.</li>
+
+   <li><p><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>.</li>
+
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href=#slaved-media-elements>slaved media elements</a>, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
+  </ol><hr><p>The <dfn id=dom-mediacontroller title=dom-MediaController><code>MediaController()</code></dfn>
   constructor, when invoked, must return a newly created
   <code><a href=#mediacontroller>MediaController</a></code> object.</p>
 
@@ -32385,14 +32422,20 @@
   changed, or removed, the user agent must run the following
   steps:</p>
 
-  <ol><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
+  <ol><!-- very similar to the algorithm above for setting the IDL attribute --><li><p>Let <var title="">m</var> be the <a href=#media-element>media element</a>
    in question.</li>
 
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
    <li><p>Let <var title="">m</var> have no <a href=#current-media-controller>current
    media controller</a>, if it currently has one.</li>
 
    <li><p>If <var title="">m</var>'s <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> attribute is being
-   removed, then abort these steps.</li>
+   removed, then jump to the <i>update controllers</i> step
+   below.</li>
 
    <li>
 
@@ -32414,9 +32457,25 @@
    <li><p>Let <var title="">m</var>'s <a href=#current-media-controller>current media
    controller</a> be <var title="">controller</var>.</li>
 
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href=#current-media-controller>current media controller</a>.</li>
+
    <li><p><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>.</li>
 
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href=#slaved-media-elements>slaved media elements</a>, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href=#report-the-controller-state>report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
   </ol><p>The <dfn id=dom-media-mediagroup title=dom-media-mediaGroup><code>mediaGroup</code></dfn> IDL
   attribute on <a href=#media-element title="media element">media elements</a> must
   <a href=#reflect>reflect</a> the <code title=attr-media-mediagroup><a href=#attr-media-mediagroup>mediagroup</a></code> content

Modified: source
===================================================================
--- source	2012-06-01 22:44:12 UTC (rev 7114)
+++ source	2012-06-04 23:40:30 UTC (rev 7115)
@@ -31936,6 +31936,8 @@
        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.) -->
+       <!-- note that this can also trigger "report the controller
+       state" since it can change the element's readyState -->
 
       </ol>
 
@@ -34867,14 +34869,55 @@
   title="dom-media-controller"><code>controller</code></dfn> attribute
   on a <span>media element</span>, on getting, must return the
   element's <span>current media controller</span>, if any, or null
-  otherwise. On setting, it must first remove the element's <code
-  title="attr-media-mediagroup">mediagroup</code> attribute, if any,
-  and then set the <span>current media controller</span> to the given
-  value. If the given value is null, the element no longer has a
-  <span>current media controller</span>; if it is not null, then the
-  user agent must <span>bring the media element up to speed with its
-  new media controller</span>.</p>
+  otherwise. On setting, the user agent must run the following
+  steps:</p>
 
+  <ol> <!-- very similar to the algorithm below for setting the content attribute -->
+
+   <li><p>Let <var title="">m</var> be the <span>media element</span>
+   in question.</p></li>
+
+   <li><p>Let <var title="">old controller</var> be <var
+   title="">m</var>'s <span>current media controller</span>, if it
+   currently has one, and null otherwise.</p></li>
+
+   <li><p>Let <var title="">new controller</var> be null.</p></li>
+
+   <li><p>Let <var title="">m</var> have no <span>current
+   media controller</span>, if it currently has one.</p></li>
+
+   <li><p>Remove the element's <code
+   title="attr-media-mediagroup">mediagroup</code> content attribute,
+   if any.</p></li>
+
+   <li><p>If the new value is null, then jump to the <i>update
+   controllers</i> step below.</p></li>
+
+   <li><p>Let <var title="">m</var>'s <span>current media
+   controller</span> be the new value.</p></li>
+
+   <li><p>Let <var title="">new controller</var> be <var
+   title="">m</var>'s <span>current media controller</span>.</p></li>
+
+   <li><p><span>Bring the media element up to speed with its new media
+   controller</span>.</p></li>
+
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</p></li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <span>slaved media elements</span>, then
+   <span>report the controller state</span> for <var title="">old
+   controller</var>.</p></li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <span>report the controller state</span> for <var title="">new
+   controller</var>.</p></li>
+
+  </ol>
+
   <hr>
 
   <p>The <dfn
@@ -35400,17 +35443,24 @@
   changed, or removed, the user agent must run the following
   steps:</p>
 
-  <ol>
+  <ol> <!-- very similar to the algorithm above for setting the IDL attribute -->
 
    <li><p>Let <var title="">m</var> be the <span>media element</span>
    in question.</p></li>
 
+   <li><p>Let <var title="">old controller</var> be <var
+   title="">m</var>'s <span>current media controller</span>, if it
+   currently has one, and null otherwise.</p></li>
+
+   <li><p>Let <var title="">new controller</var> be null.</p></li>
+
    <li><p>Let <var title="">m</var> have no <span>current
    media controller</span>, if it currently has one.</p></li>
 
    <li><p>If <var title="">m</var>'s <code
    title="attr-media-mediagroup">mediagroup</code> attribute is being
-   removed, then abort these steps.</p></li>
+   removed, then jump to the <i>update controllers</i> step
+   below.</p></li>
 
    <li>
 
@@ -35435,9 +35485,26 @@
    <li><p>Let <var title="">m</var>'s <span>current media
    controller</span> be <var title="">controller</var>.</p></li>
 
+   <li><p>Let <var title="">new controller</var> be <var
+   title="">m</var>'s <span>current media controller</span>.</p></li>
+
    <li><p><span>Bring the media element up to speed with its new media
    controller</span>.</p></li>
 
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</p></li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <span>slaved media elements</span>, then
+   <span>report the controller state</span> for <var title="">old
+   controller</var>.</p></li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <span>report the controller state</span> for <var title="">new
+   controller</var>.</p></li>
+
   </ol>
 
   <p>The <dfn




More information about the Commit-Watchers mailing list