HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/5975

File a bug

SVNBugCommentTime (UTC)
5975[Authors] [Conformance Checkers] [Gecko] [Internet Explorer] [Opera] [Webkit] [Tools] Make the MediaController feature more easily implementable.2011-04-08 06:53
Index: source
===================================================================
--- source	(revision 5974)
+++ source	(revision 5975)
@@ -27661,7 +27661,7 @@
   readonly attribute <span>ExclusiveTrackList</span> <span title="dom-media-videoTracks">videoTracks</span>;
 <!--START w3c-html--><!--CONTROLLER-->
   readonly attribute <span>TextTrack</span>[] <span title="dom-media-textTracks">textTracks</span>;
-  <span>MutableTextTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString kind, in optional DOMString label, in optional DOMString language);
+  <span>MutableTextTrack</span> <span title="dom-media-addTextTrack">addTextTrack</span>(in DOMString kind, in optional DOMString label, in optional DOMString language);
 <!--KEEP-START w3c-html--><!--TT-->
 };</pre>
 
@@ -28761,7 +28761,7 @@
         <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 seek <span
+        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>
@@ -28787,6 +28787,25 @@
         title="dom-media-videoTracks">videoTracks</code> object.</p>
 
        </li>
+
+       <li>
+
+        <p>If the <span>media element</span> has a <span>current
+        media controller</span>, then: if 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> <!-- i.e. "bring the
+        media element up to speed with its new media controller" -->
+
+       </li>
 <!--START w3c-html--><!--CONTROLLER-->
 
        <li>
@@ -29215,7 +29234,11 @@
     <p>Can be set, to seek to the given time.<p>
 
     <p>Will throw an <code>INVALID_STATE_ERR</code> exception if there
-    is no selected <span>media resource</span>. Will throw an
+    is no selected <span>media resource</span>
+<!--END w3c-html--><!--CONTROLLER-->
+    or if there is a <span>current media controller</span>.
+<!--START w3c-html--><!--CONTROLLER-->
+    Will throw an
     <code>INDEX_SIZE_ERR</code> exception if the given time is not
     within the ranges to which the user agent can seek.</p>
 
@@ -29320,7 +29343,13 @@
   <p>The <dfn
   title="dom-media-currentTime"><code>currentTime</code></dfn>
   attribute must, on getting, return the <span>current playback
-  position</span>, expressed in seconds. On setting, the user agent
+  position</span>, expressed in seconds. On setting,
+<!--END w3c-html--><!--CONTROLLER-->
+  if the <span>media element</span> has a <span>current media
+  controller</span>, then it must throw an
+  <code>INVALID_STATE_ERR</code> exception; otherwise,
+<!--START w3c-html--><!--CONTROLLER-->
+  the user agent
   must <span title="dom-media-seek">seek</span> to the new value
   (which might raise an exception).</p>
 
@@ -29425,6 +29454,12 @@
   indicates that the <span>media element</span> is to seek back to the
   start of the <span>media resource</span> upon reaching the end.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+  <p>The <code title="attr-media-loop">loop</code> attribute has no
+  effect while the element has a <span>current media
+  controller</span>.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
   <div class="impl">
 
   <p>The <dfn title="dom-media-loop"><code>loop</code></dfn> IDL
@@ -29522,11 +29557,9 @@
    title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> state
    are met, and, in addition, the user agent estimates that data is
    being fetched at a rate where the <span>current playback
-   position</span>, if it were to advance at the rate given by the
-   <code
-   title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
-   attribute, would not overtake the available data before playback
-   reaches the end of the <span>media resource</span>.</dd>
+   position</span>, if it were to advance at the <span>effective
+   playback rate</span>, would not overtake the available data before
+   playback reaches the end of the <span>media resource</span>.</dd>
 
   </dl>
 
@@ -29738,6 +29771,16 @@
     normal playback mode, it is expected that the rate of playback
     will be returned to the default rate of playback.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+    <p>When the element has a <span>current media controller</span>,
+    the <code
+    title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
+    attribute is ignored and the <span>current media
+    controller</span>'s <code
+    title="dom-MediaController-defaultPlaybackRate">defaultPlaybackRate</code>
+    is used instead.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
    </dd>
 
    <dt><var title="">media</var> . <code title="dom-media-playbackRate">playbackRate</code> [ = <var title="">value</var> ]</dt>
@@ -29748,6 +29791,15 @@
 
     <p>Can be set, to change the rate of playback.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+    <p>When the element has a <span>current media controller</span>,
+    the <code title="dom-media-playbackRate">playbackRate</code>
+    attribute is ignored and the <span>current media
+    controller</span>'s <code
+    title="dom-MediaController-playbackRate">playbackRate</code> is
+    used instead.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
    </dd>
 
    <dt><var title="">media</var> . <code title="dom-media-played">played</code></dt>
@@ -29802,23 +29854,60 @@
   playback has not <span>stopped due to errors</span>, 
 <!--END w3c-html--><!--CONTROLLER-->
   the element either has no <span>current media controller</span> or
-  has a <span>current media controller</span> that is itself not a
-  <span>blocked media controller</span>,
+  has a <span>current media controller</span> but is not <span>blocked
+  on its media controller</span>,
 <!--START w3c-html--><!--CONTROLLER-->
   and the element is not a <span>blocked media element</span>.</p>
 
   <p>A <span>media element</span> is said to have <dfn>ended
-  playback</dfn> when the element's <code
-  title="dom-media-readyState">readyState</code> attribute is <code
-  title="dom-media-HAVE_METADATA">HAVE_METADATA</code> or greater, and
-  either the <span>current playback position</span> is the end of the
-  <span>media resource</span> and the <span>direction of
-  playback</span> is forwards and the <span>media element</span> does
-  not have a <code title="attr-media-loop">loop</code> attribute
-  specified, or the <span>current playback position</span> is the
-  <span>earliest possible position</span> and the <span>direction of
-  playback</span> is backwards.</p>
+  playback</dfn> when:</p>
 
+  <ul>
+
+   <li>The element's <code
+   title="dom-media-readyState">readyState</code> attribute is <code
+   title="dom-media-HAVE_METADATA">HAVE_METADATA</code> or greater,
+   and
+
+   <li>
+
+    <p>Either:
+
+    <ul>
+
+     <li>The <span>current playback position</span> is the end of the
+     <span>media resource</span>, and
+
+     <li>The <span>direction of playback</span> is forwards, and
+
+     <li>
+<!--END w3c-html--><!--CONTROLLER-->
+     Either
+<!--START w3c-html--><!--CONTROLLER-->
+     the <span>media element</span> does not have a <code
+     title="attr-media-loop">loop</code> attribute specified,
+<!--END w3c-html--><!--CONTROLLER-->
+     or the <span>media element</span> has a <span>current media
+     controller</span>.
+<!--START w3c-html--><!--CONTROLLER-->
+
+    </ul>
+
+    <p>Or:
+
+    <ul>
+
+     <li>The <span>current playback position</span> is the
+     <span>earliest possible position</span>, and
+
+     <li>The <span>direction of playback</span> is backwards.
+
+    </ul>
+
+   </li>
+
+  </ul>
+
   <p>The <dfn title="dom-media-ended"><code>ended</code></dfn>
   attribute must return true if the <span>media element</span> has
   <span>ended playback</span> and the <span>direction of
@@ -29876,15 +29965,18 @@
   <ol>
 
    <li><p>If the <span>media element</span> has a <code
-   title="attr-media-loop">loop</code> attribute specified, then <span
-   title="dom-media-seek">seek</span> to the <span>earliest possible
-   position</span> of the <span>media resource</span> and abort these
-   steps.</p></li> <!-- v2/v3: We should fire a 'looping' event here
-   to explain why this immediately fires a 'playing' event, otherwise
-   the 'playing' event that fires from the readyState going from
-   HAVE_CURRENT_DATA back to HAVE_FUTURE_DATA will seem inexplicable
-   (since the normally matching 'ended' given below event doesn't fire
-   in the loop case). -->
+   title="attr-media-loop">loop</code> attribute specified
+<!--END w3c-html--><!--CONTROLLER-->
+   and does not have a <span>current media controller</span>,
+<!--START w3c-html--><!--CONTROLLER-->
+   then <span title="dom-media-seek">seek</span> to the <span>earliest
+   possible position</span> of the <span>media resource</span> and
+   abort these steps.</p></li> <!-- v2/v3: We should fire a 'looping'
+   event here to explain why this immediately fires a 'playing' event,
+   otherwise the 'playing' event that fires from the readyState going
+   from HAVE_CURRENT_DATA back to HAVE_FUTURE_DATA will seem
+   inexplicable (since the normally matching 'ended' given below event
+   doesn't fire in the loop case). -->
 
    <li><p>Stop playback.</p><p class="note">The <code
    title="dom-media-ended">ended</code> attribute becomes
@@ -29915,6 +30007,8 @@
 
   </ol>
 
+  <hr>
+
   <p>The <dfn
   title="dom-media-defaultPlaybackRate"><code>defaultPlaybackRate</code></dfn>
   attribute gives the desired speed at which the <span>media
@@ -29930,23 +30024,24 @@
 
   <p>The <dfn
   title="dom-media-playbackRate"><code>playbackRate</code></dfn>
-  attribute gives the speed at which the <span>media resource</span>
-  plays, as a multiple of its intrinsic speed. If it is not equal to
-  the <code
+  attribute gives the <span>effective playback rate</span>
+<!--END w3c-html--><!--CONTROLLER-->
+  (assuming there is no <span>current media controller</span> overriding it),
+<!--START w3c-html--><!--CONTROLLER-->
+  which is the speed at which the <span>media resource</span> plays,
+  as a multiple of its intrinsic speed. If it is not equal to the
+  <code
   title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>,
   then the implication is that the user is using a feature such as
   fast forward or slow motion playback. The attribute is mutable: on
   getting it must return the last value it was set to, or 1.0 if it
   hasn't yet been set; on setting the attribute must be set to the new
-  value, and the playback must change speed (if the element is
-  <span>potentially playing</span>).</p>
+  value, and the playback will change speed
+<!--END w3c-html--><!--CONTROLLER-->
+  (if the element is <span>potentially playing</span> and there is no
+  <span>current media controller</span>).</p>
+<!--START w3c-html--><!--CONTROLLER-->
 
-  <p>The <code title="dom-media-playbackRate">playbackRate</code> can
-  be 0.0, in which case the <span>current playback position</span>
-  doesn't move, despite playback not being paused (<code
-  title="dom-media-paused">paused</code> doesn't become true, and the
-  <code title="event-media-pause">pause</code> event doesn't fire).</p>
-
   <p id="rateUpdate">When the <code
   title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code> or
   <code title="dom-media-playbackRate">playbackRate</code> attributes
@@ -29957,6 +30052,18 @@
   title="event-media-ratechange">ratechange</code> at the <span>media
   element</span>.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+  <p class="note">The <code
+  title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code> and
+  <code title="dom-media-playbackRate">playbackRate</code> attributes
+  have no effect when the <span>media element</span> has a
+  <span>current media controller</span>; the namesake attributes on
+  the <code>MediaController</code> object are used instead in that
+  situation.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
+  <hr>
+
   <p>The <dfn title="dom-media-played"><code>played</code></dfn>
   attribute must return a new static <span>normalized
   <code>TimeRanges</code> object</span> that represents the ranges of
@@ -30090,33 +30197,38 @@
 
   <p>The
 <!--END w3c-html--><!--CONTROLLER-->
-  <var title="">effective playback rate</var> is not necessarily the
-  element's <code title="dom-media-playbackRate">playbackRate</code>.
-  When a <span>media element</span> has a <span>current media
-  controller</span>, its <var title="">effective playback rate</var>
-  is the element's <code
-  title="dom-media-playbackRate">playbackRate</code> multiplied by the
-  <code>MediaController</code>'s <span>media controller playback rate
-  multiplier</span>. Otherwise, the
+  <dfn>effective playback rate</dfn> is not necessarily the element's
+  <code title="dom-media-playbackRate">playbackRate</code>. When a
+  <span>media element</span> has a <span>current media
+  controller</span>, its <span>effective playback rate</span> is the
+  <code>MediaController</code>'s <span>media controller playback
+  rate</span>. Otherwise, the
 <!--START w3c-html--><!--CONTROLLER-->
-  <var title="">effective playback rate</var> is just the
-  element's <code
-  title="dom-media-playbackRate">playbackRate</code>.</p>
+  <span>effective playback rate</span> is just the element's <code
+  title="dom-media-playbackRate">playbackRate</code>.
+<!--END w3c-html--><!--CONTROLLER-->
+  Thus, the <span>current media controller</span> overrides the
+  <span>media element</span>.
+<!--START w3c-html--><!--CONTROLLER-->
+  </p>
 
-  <p>If the <var title="">effective playback rate</var> is positive or
-  zero, then the <dfn>direction of playback</dfn> is forwards.
-  Otherwise, it is backwards.</p>
+  <p>If the <span>effective playback rate</span> is positive or zero,
+  then the <dfn>direction of playback</dfn> is forwards. Otherwise, it
+  is backwards.</p>
 
   <p id="media-playback">When a <span>media element</span> is
   <span>potentially playing</span> and its <code>Document</code> is a
   <span>fully active</span> <code>Document</code>, its <span>current
-  playback position</span> must increase monotonically at <var
-  title="">effective playback rate</var> units of media time per unit
-  time of wall clock time.</p> <!--XXX will change with bug 12339 -->
+  playback position</span> must increase monotonically at
+  <span>effective playback rate</span> units of media time per unit time
+  of wall clock time.</p> <!--XXX will change with bug 12339 -->
 
-  <p class="note">If the <var title="">effective playback rate</var>
-  is zero, the <span>current playback position</span> doesn't
-  move.</p>
+  <p class="note">The <span>effective playback rate</span> can be 0.0,
+  in which case the <span>current playback position</span> doesn't
+  move, despite playback not being paused (<code
+  title="dom-media-paused">paused</code> doesn't become true, and the
+  <code title="event-media-pause">pause</code> event doesn't
+  fire).</p>
 
   <p class="note">This specification doesn't define how the user agent
   achieves the appropriate playback rate &mdash; depending on the
@@ -30128,25 +30240,30 @@
   interpolate any frames.</p>
 
   <p>When the <span>direction of playback</span> is backwards, any
-  corresponding audio must be muted. When the <var title="">effective
-  playback rate</var> is so low or so high that the user agent cannot
-  play audio usefully, the corresponding audio must also be muted. If
-  the <var title="">effective playback rate</var> is not 1.0, the user
-  agent may apply pitch adjustments to the audio as necessary to
-  render it faithfully.</p>
+  corresponding audio must be muted. When the <span>effective playback
+  rate</span> is so low or so high that the user agent cannot play
+  audio usefully, the corresponding audio must also be muted. If the
+  <span>effective playback rate</span> is not 1.0, the user agent may
+  apply pitch adjustments to the audio as necessary to render it
+  faithfully.</p>
 
   <p><span title="media element">Media elements</span> that are
   <span>potentially playing</span> while not <span>in a
   <code>Document</code></span> must not play any video, but should
   play any audio component. Media elements must not stop playing just
   because all references to them have been removed; only once a media
-  element to which no references exist has reached a point where no
-  further audio remains to be played for that element (e.g. because
-  the element is paused, or because the end of the clip has been
-  reached, or because its <code
-  title="dom-media-playbackRate">playbackRate</code> is 0.0) may the
-  element be garbage collected.</p>
+  element is in a state where no further audio could ever be played by
+  that element may the element be garbage collected.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+  <p class="note">It is possible for an element to which no explicit
+  references exist to play audio, even if such an element is not still
+  actively playing: for instance, it could have a <span>current media
+  controller</span> that still has references and can still be
+  unpaused, or it could be unpaused but stalled waiting for content to
+  buffer.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
   <hr>
 
   <p>When the <span>current playback position</span> of a <span>media
@@ -30192,16 +30309,16 @@
 <!--KEEP-START w3c-html--><!--TT-->
 
    <li><p>If the time was reached through the usual monotonic increase
-   of the current playback position during normal playback, and if the
-   user agent has not fired a <code
+   of the <span>current playback position</span> during normal
+   playback, and if the user agent has not fired a <code
    title="event-media-timeupdate">timeupdate</code> event at the
    element in the past 15 to 250ms and is not still running event
    handlers for such an event, then the user agent must <span>queue a
    task</span> to <span>fire a simple event</span> named <code
-   title="event-media-timeupdate">timeupdate</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>
+   title="event-media-timeupdate">timeupdate</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 <span>current
+   playback position</span>.)</p>
 
    <p class="note">The event thus is not to be fired faster than about
    66Hz or slower than 4Hz (assuming the event handlers don't take
@@ -30220,11 +30337,11 @@
    steps.</p></li>
 
    <li><p>If the time was reached through the usual monotonic increase
-   of the current playback position during normal playback, and there
-   are <span title="text track cue">cues</span> in <var title="">other
-   cues</var> that have both their <span>text track cue active
-   flag</span> set and their <span>text track cue pause-on-exit
-   flag</span> set, then immediately <span
+   of the <span>current playback position</span> during normal
+   playback, and there are <span title="text track cue">cues</span> in
+   <var title="">other cues</var> that have both their <span>text
+   track cue active flag</span> set and their <span>text track cue
+   pause-on-exit flag</span> set, then immediately <span
    title="dom-media-pause">pause</span> the <span>media
    element</span>. <!-- "pause" can in theory call load(), but never
    can it do so as part of this invokation, since we wouldn't be in
@@ -30570,6 +30687,8 @@
   readonly attribute unsigned long <span title="dom-TrackList-length">length</span>;
   DOMString <span title="dom-TrackList-getName">getName</span>(in unsigned long index);
   DOMString <span title="dom-TrackList-getLanguage">getLanguage</span>(in unsigned long index);
+
+           attribute <span>Function</span> <span title="handler-TrackList-onchange">onchange</span>;
 };
 
 interface <dfn>MultipleTrackList</dfn> : <span>TrackList</span> {
@@ -30709,6 +30828,11 @@
   index <var title="">index</var>, if there is one. If there is not,
   it must instead throw an <code>INDEX_SIZE_ERR</code> exception.</p>
 
+  <p>Whenever a track is enabled or disabled, the user agent must
+  <span>queue a task</span> to <span>fire a simple event</span> named
+  <code title="event-media-change">change</code> at the
+  <code>MultipleTrackList</code> object.</p>
+
   <hr>
 
   <p>An <code>ExclusiveTrackList</code> object represents a track list
@@ -30727,6 +30851,34 @@
   title="">index</var>, it must instead throw an
   <code>INDEX_SIZE_ERR</code> exception.</p>
 
+  <p>Whenever the selected track is changed, the user agent must
+  <span>queue a task</span> to <span>fire a simple event</span> named
+  <code title="event-media-change">change</code> at the
+  <code>MultipleTrackList</code> object.</p>
+
+  <hr>
+
+  <p>The following are the <span>event handlers</span> (and their
+  corresponding <span title="event handler event type">event handler
+  event types</span>) that must be supported, as IDL attributes, by
+  all objects implementing the <code>TrackList</code>
+  interface:</p>
+
+  <table>
+   <thead>
+    <tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
+   <tbody>
+    <tr><td><dfn title="handler-TrackList-onchange"><code>onchange</code></dfn> <td> <code title="event-change">change</code>
+  </table>
+
+  <hr>
+
+  <p>The <span>task source</span> for the <span
+  title="concept-task">tasks</span> listed in this section is the
+  <span>DOM manipulation task source</span>.</p>
+
+  <!-- v2 should also fire an event when the list changes -->
+
   </div>
 
 
@@ -30788,6 +30940,12 @@
   any of its slaved <span title="media element">media elements</span>
   unexpectedly stall, the others are stopped at the same time.</p>
 
+  <p>When a <span>media element</span> is slaved to a
+  <code>MediaController</code>, its playback rate is fixed to that of
+  the other tracks in the same <code>MediaController</code>, and any
+  looping is disabled.</p>
+
+<!-- v2: add control to loop, add control to playback rate
   <div class="example">
 
    <p>In this example, two audio elements are slaved to the same
@@ -30818,12 +30976,18 @@
    controlled by the <code>MediaController</code>.</p>
 
   </div>
+-->
 
 
   <h6>Media controllers</h6>
 
   <pre class="idl">[<span title="dom-MediaController">Constructor</span>]
 interface <dfn>MediaController</dfn> {
+  readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-buffered">buffered</span>;
+  readonly attribute <span>TimeRanges</span> <span title="dom-MediaController-seekable">seekable</span>;
+  readonly attribute double <span title="dom-MediaController-duration">duration</span>;
+           attribute double <span title="dom-MediaController-currentTime">currentTime</span>;
+
   readonly attribute boolean <span title="dom-MediaController-paused">paused</span>;
   void <span title="dom-MediaController-play">play</span>();
   void <span title="dom-MediaController-pause">pause</span>();
@@ -30834,8 +30998,8 @@
            attribute double <span title="dom-MediaController-volume">volume</span>;
            attribute boolean <span title="dom-MediaController-muted">muted</span>;
 
-  void <span title="dom-MediaController-seek">seek</span>(in double delta);
-
+           attribute <span>Function</span> <span title="handler-MediaController-ondurationchange">ondurationchange</span>;
+           attribute <span>Function</span> <span title="handler-MediaController-ontimeupdate">ontimeupdate</span>;
            attribute <span>Function</span> <span title="handler-MediaController-onplay">onplay</span>;
            attribute <span>Function</span> <span title="handler-MediaController-onpause">onpause</span>;
            attribute <span>Function</span> <span title="handler-MediaController-onratechange">onratechange</span>;
@@ -30865,6 +31029,52 @@
 
    </dd>
 
+   <dt><var title="">controller</var> . <code title="dom-MediaController-buffered">buffered</code></dt>
+
+   <dd>
+
+    <p>Returns a <code>TimeRanges</code> object that represents the
+    intersection of the time ranges for which the user agent has all
+    relevant media data for all the slaved <span title="media
+    element">media elements</span>.</p>
+
+   </dd>
+
+   <dt><var title="">controller</var> . <code title="dom-MediaController-seekable">seekable</code></dt>
+
+   <dd>
+
+    <p>Returns a <code>TimeRanges</code> object that represents the
+    intersection of the time ranges into which the user agent can seek
+    for all the slaved <span title="media element">media
+    elements</span>.</p>
+
+   </dd>
+
+   <dt><var title="">controller</var> . <code title="dom-MediaController-duration">duration</code></dt>
+
+   <dd>
+
+    <p>Returns the difference between the earliest playable moment and
+    the latest playable moment (not considering whether the data in
+    question is actually buffered or directly seekable, but not
+    including time in the future for infinite streams). Will return
+    zero if there is no media.</p>
+
+   </dd>
+
+   <dt><var title="">controller</var> . <code title="dom-MediaController-currentTime">currentTime</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the <span>current playback position</span>, in seconds,
+    as a position between zero time and the current <code
+    title="dom-MediaController-duration">duration</code>.</p>
+
+    <p>Can be set, to seek to the given time.<p>
+
+   </dd>
+
    <dt><var title="">controller</var> . <code title="dom-MediaController-paused">paused</code></dt>
 
    <dd>
@@ -30897,17 +31107,15 @@
 
    <dd>
 
-    <p>Returns the default multiplier of the rate of playback.</p>
+    <p>Returns the default rate of playback.</p>
 
-    <p>Can be set, to change the default multiplier of the rate of
-    playback.</p>
+    <p>Can be set, to change the default rate of playback.</p>
 
-    <p>This default multiplier has no direct effect on playback, but
-    if the user switches to a fast-forward mode, when they return to
-    the normal playback mode, it is expected that rate of playback
-    multiplier (<code
+    <p>This default rate has no direct effect on playback, but if the
+    user switches to a fast-forward mode, when they return to the
+    normal playback mode, it is expected that rate of playback (<code
     title="dom-MediaController-playbackRate">playbackRate</code>) will
-    be returned to this default multiplier.</p>
+    be returned to this default rate.</p>
 
    </dd>
 
@@ -30915,12 +31123,9 @@
 
    <dd>
 
-    <p>Returns the current multiplier of the rate playback, where 1.0
-    is no multiplier.</p>
+    <p>Returns the current rate of playback.</p>
 
-    <p>Can be set, to change the rate of playback of the <span
-    title="media element">media elements</span> slaved to this
-    controller.</p>
+    <p>Can be set, to change the rate of playback.</p>
 
    </dd>
 
@@ -30952,31 +31157,113 @@
 
    </dd>
 
-   <dt><var title="">controller</var> . <code title="dom-MediaController-seek">seek</code>( <var title="">delta</var> )</dt>
-
-   <dd>
-
-    <p>Advances the <span title="media element">media elements</span>
-    slaved to this controller by <var title="">delta</var> seconds,
-    corrected to take into account their relative playback rates.</p>
-
-   </dd>
-
   </dl>
 
   <div class="impl">
 
   <p>A <span>media element</span> can have a <dfn>current media
   controller</dfn>, which is a <code>MediaController</code> object.
-  The <dfn>slaved media elements</dfn> of a
+  When a <span>media element</span> is created without a <code
+  title="attr-media-mediagroup">mediagroup</code> attribute, it does
+  not have a <span>current media controller</span>. (If it is created
+  <em>with</em> such an attribute, then that attribute initializes the
+  <span>current media controller</span>, as defined below.)</p>
+
+  <p>The <dfn>slaved media elements</dfn> of a
   <code>MediaController</code> are the <span title="media
   element">media elements</span> whose <span>current media
-  controller</span> is that <code>MediaController</code>.</p>
+  controller</span> is that <code>MediaController</code>. All the
+  <span>slaved media elements</span> of a <code>MediaController</code>
+  must use the same clock for their definition of their <span>media
+  timeline</span>'s unit time.</p>
 
-  <p>All the <span>slaved media elements</span> of a
-  <code>MediaController</code> must use the same clock for their
-  definition of their <span>media timeline</span>'s unit time.</p>
+  <p>The <span title="media resource">media resources</span> of all
+  the <span>slaved media elements</span> of a
+  <code>MediaController</code> have a defined temporal relationship
+  which provides relative offsets between the zero time of each such
+  <span>media resource</span>: for <span title="media resource">media
+  resources</span> with a <span>timeline offset</span>, their relative
+  offsets are the difference between their <span>timeline
+  offset</span>; the zero times of all the <span title="media
+  resource">media resources</span> without a <span>timeline
+  offset</span> are not offset from each other (i.e. the origins of
+  their timelines are cotemporal); and finally, the zero time of the
+  <span>media resource</span> with the earliest <span>timeline
+  offset</span> (if any) is not offset from the zero times of the
+  <span title="media resource">media resources</span> without a
+  <span>timeline offset</span> (i.e. the origins of <span title="media
+  resource">media resources</span> without a <span>timeline
+  offset</span> are further cotemporal with the earliest defined point
+  on the timeline of the <span>media resource</span> with the earliest
+  <span>timeline offset</span>).</p>
 
+  <p>The <dfn>media resource end position</dfn> of a <span>media
+  resource</span> in a <span>media element</span> is defined as
+  follows: if the <span>media resource</span> has a finite and known
+  duration, the <span>media resource end position</span> is the
+  duration of the <span>media resource</span>'s timeline (the last
+  defined position on that timeline); otherwise, the <span>media
+  resource</span>'s duration is infinite or unknown, and the
+  <span>media resource end position</span> is the time of the last
+  frame of <span>media data</span> currently available for that
+  <span>media resource</span>.</p>
+
+  <p>Each <code>MediaController</code> also has its own defined
+  timeline. On this timeline, all the <span title="media
+  resource">media resources</span> of all the <span>slaved media
+  elements</span> of the <code>MediaController</code> are temporally
+  aligned according to their defined offsets. The <dfn>media
+  controller duration</dfn> of that <code>MediaController</code> is
+  the time from the earliest <span>earliest possible position</span>,
+  relative to this <code>MediaController</code> timeline, of any of
+  the <span title="media resource">media resources</span> of the
+  <span>slaved media elements</span> of the
+  <code>MediaController</code>, to the time of the latest <span>media
+  resource end position</span> of the <span title="media
+  resource">media resources</span> of the <span>slaved media
+  elements</span> of the <code>MediaController</code>, again relative
+  to this <code>MediaController</code> timeline.</p>
+
+  <p>Each <code>MediaController</code> has a <dfn>media controller
+  position</dfn>. This is the time on the
+  <code>MediaController</code>'s timeline at which the user agent is
+  trying to play the <span>slaved media elements</span>. When a
+  <code>MediaController</code> is created, its <span>media controller
+  position</span> is initially zero.</p>
+
+  <p>When the user agent is to <dfn title="bring the media element up
+  to speed with its new media controller">bring a media element up to
+  speed with its new media controller</dfn>, it must <span
+  title="dom-media-seek">seek</span> that <span>media element</span>
+  to the <code>MediaController</code>'s <span>media controller
+  position</span> relative to the <span>media element</span>'s
+  timeline, discarding any resulting exceptions.</p>
+
+  <p>When the user agent is to <dfn>seek the media controller</dfn> to
+  a particular <var title="">new playback position</var>, it must
+  follow these steps:</p>
+
+  <ol>
+
+   <li><p>If the <var title="">new playback position</var> is less
+   than zero, then set it to zero.</p></li>
+
+   <li><p>If the <var title="">new playback position</var> is greater
+   than the <span>media controller duration</span>, then set it to the
+   <span>media controller duration</span>.</p></li>
+
+   <li><p>Set the <span>media controller position</span> to the <var
+   title="">new playback position</var>.</p></li>
+
+   <li><p><span title="dom-media-seek">Seek</span> each <span
+   title="slaved media elements">slaved media element</span> to the
+   <var title="">new playback position</var> relative to the
+   <span>media element</span> timeline, discarding any resulting
+   exceptions.</p></li> <!-- i.e. "bring the media element up to speed
+   with its new media controller" -->
+
+  </ol>
+
   <p>When a <code>MediaController</code> is created it is a
   <dfn>playing media controller</dfn>. It can be changed into a
   <dfn>paused media controller</dfn> and back either via the user
@@ -30992,16 +31279,35 @@
   element">blocked media elements</span>, or if any of its
   <span>slaved media elements</span> whose <span>autoplaying
   flag</span> is true still have a <code
-  title="dom-media-paused">paused</code> attribute this is true.</p>
+  title="dom-media-paused">paused</code> attribute that is true.</p>
 
+  <p>A <span>media element</span> is <dfn>blocked on its media
+  controller</dfn> if the <code>MediaController</code> is a
+  <span>blocked media controller</span>, or if its <span>media
+  controller position</span> is either before the <span>media
+  resource</span>'s <span>earliest possible position</span> relative
+  to the <code>MediaController</code>'s timeline or after the end of
+  the <span>media resource</span> relative to the
+  <code>MediaController</code>'s timeline.</p>
+
   <p>A <code>MediaController</code> has a <dfn>media controller
-  default playback rate multiplier</dfn>, a <dfn>media controller
-  playback rate multiplier</dfn>, and a <dfn>media controller volume
-  multiplier</dfn>, which must all be set to 1.0 when the
-  <code>MediaController</code> object is created. A
-  <code>MediaController</code> also has a <dfn>media controller mute
-  override</dfn>, much must initially be false.</p>
+  default playback rate</dfn>, a <dfn>media controller playback
+  rate</dfn>, and a <dfn>media controller volume multiplier</dfn>,
+  which must all be set to 1.0 when the <code>MediaController</code>
+  object is created. A <code>MediaController</code> also has a
+  <dfn>media controller mute override</dfn>, much must initially be
+  false.</p>
 
+  <p id="controller-playback">When a <code>MediaController</code> is
+  not a <span>blocked media controller</span> and it has at least one
+  <span title="slaved media elements">slaved media element</span>
+  whose <code>Document</code> is a <span>fully active</span>
+  <code>Document</code>, the <code>MediaController</code>'s
+  <span>media controller position</span> must increase monotonically
+  at <span>media controller playback rate</span> units of time on the
+  <code>MediaController</code>'s timeline per unit time of the clock
+  used by its <span>slaved media elements</span>.</p>
+
   <hr>
 
   <p>The <dfn
@@ -31012,7 +31318,9 @@
   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>.</p>
+  <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>
 
   <hr>
 
@@ -31024,6 +31332,53 @@
   <hr>
 
   <p>The <dfn
+  title="dom-MediaController-seekable"><code>seekable</code></dfn>
+  attribute must return a new static <span>normalized
+  <code>TimeRanges</code> object</span> that represents the
+  intersection of the ranges of the <span title="media resource">media
+  resources</span> of the <span>slaved media elements</span> that the
+  user agent is able to seek to, at the time the attribute is
+  evaluated.</p>
+
+  <p>The <dfn
+  title="dom-MediaController-buffered"><code>buffered</code></dfn>
+  attribute must return a new static <span>normalized
+  <code>TimeRanges</code> object</span> that represents the
+  intersection of the ranges of the <span title="media resource">media
+  resources</span> of the <span>slaved media elements</span> that the
+  user agent has buffered, at the time the attribute is evaluated.
+  Users agents must accurately determine the ranges available, even
+  for media streams where this can only be determined by tedious
+  inspection.</p>
+
+  <p>The <dfn
+  title="dom-MediaController-duration"><code>duration</code></dfn>
+  attribute must return the <span>media controller
+  duration</span>.</p>
+
+  <p>Every 15 to 250ms, or whenever the <code>MediaController</code>'s
+  <span>media controller duration</span> changes, whichever happens
+  least often, the user agent must <span>queue a task</span> to
+  <span>fire a simple event</span> named <code
+  title="event-media-durationchange">durationchange</code> at the
+  <code>MediaController</code>.</p>
+
+  <p>The <dfn
+  title="dom-MediaController-currentTime"><code>currentTime</code></dfn>
+  attribute must return the <span>media controller position</span> on
+  getting, and on setting must <span>seek the media controller</span>
+  to the new value.</p>
+
+  <p>Every 15 to 250ms, or whenever the <code>MediaController</code>'s
+  <span>media controller position</span> changes, whichever happens
+  least often, the user agent must <span>queue a task</span> to
+  <span>fire a simple event</span> named <code
+  title="event-media-timeupdate">timeupdate</code> at the
+  <code>MediaController</code>.</p>
+
+  <hr>
+
+  <p>The <dfn
   title="dom-MediaController-paused"><code>paused</code></dfn>
   attribute must return true if the <code>MediaController</code>
   object is a <span>paused media controller</span>, and false
@@ -31061,22 +31416,22 @@
   title="dom-MediaController-defaultPlaybackRate"><code>defaultPlaybackRate</code></dfn>
   attribute, on getting, must return the
   <code>MediaController</code>'s <span>media controller default
-  playback rate multiplier</span>, and on setting, must set the
+  playback rate</span>, and on setting, must set the
   <code>MediaController</code>'s <span>media controller default
-  playback rate multiplier</span> to the new value.</p>
+  playback rate</span> to the new value.</p>
 
   <p>The <dfn
   title="dom-MediaController-playbackRate"><code>playbackRate</code></dfn>
   attribute, on getting, must return the
-  <code>MediaController</code>'s <span>media controller playback rate
-  multiplier</span>, and on setting, must set the
-  <code>MediaController</code>'s <span>media controller playback rate
-  multiplier</span> to the new value.</p>
+  <code>MediaController</code>'s <span>media controller playback
+  rate</span>, and on setting, must set the
+  <code>MediaController</code>'s <span>media controller playback
+  rate</span> to the new value.</p>
 
-  <p>Whenever the <span>media controller default playback rate
-  multiplier</span> or the <span>media controller playback rate
-  multiplier</span> are changed, the user agent must <span>queue a
-  task</span> to <span>fire a simple event</span> named <code
+  <p>Whenever the <span>media controller default playback rate</span>
+  or the <span>media controller playback rate</span> are changed, the
+  user agent must <span>queue a task</span> to <span>fire a simple
+  event</span> named <code
   title="event-media-ratechange">ratechange</code> at the
   <code>MediaController</code>.</p>
 
@@ -31110,61 +31465,6 @@
 
   <hr>
 
-  <p>The <dfn
-  title="dom-MediaController-seek"><code>seek()</code></dfn> method
-  must run the following steps for each <span title="slaved media
-  elements">slaved media element</span>, if any:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">delta</var> be the method's argument.</p></li>
-
-   <li><p>Let <var title="">element</var> be the <span title="slaved
-   media elements">slaved media element</span> being processed in this
-   iteration.</p></li>
-
-   <li><p>Let <var title="">effective delta</var> be <var
-   title="">delta</var> multiplied by the value of <var
-   title="">element</var>'s <code
-   title="dom-media-playbackRate">playbackRate</code>
-   attribute.</p></li>
-
-   <li><p>Let <var title="">new position</var> be <var
-   title="">element</var>'s <span>current playback position</span> (in
-   seconds) plus <var title="">effective delta</var>.</p></li>
-
-   <li><p>Let <var title="">duration</var> be the difference between
-   <var title="">element</var>'s <span>earliest possible
-   position</span> (in seconds) and the time at the end of <var
-   title="">element</var>'s <span>media data</span> (in
-   seconds).</p></li>
-
-   <li>
-
-    <p>If <var title="">element</var>'s <code
-    title="attr-media-loop">loop</code> attribute is not specified,
-    then skip this step. Otherwise:</p>
-
-    <p>While <var title="">new position</var> is greater than the time
-    at the end of <var title="">element</var>'s <span>media
-    data</span> (in seconds), decrement <var title="">new
-    position</var> by <var title="">duration</var>.</p>
-
-    <p>While <var title="">new position</var> is less than <var
-    title="">element</var>'s <span>earliest possible position</span>
-    (in seconds), increment <var title="">new position</var> by <var
-    title="">duration</var>.</p>
-
-   </li>
-
-   <li><p><span title="dom-media-seek">Seek</span> <var
-   title="">element</var> to <var title="">new position</var>
-   (interpreted as a time in seconds).</p></li>
-
-  </ol>
-
-  <hr>
-
   <p>The following are the <span>event handlers</span> that must be
   supported, as IDL attributes, by all objects implementing the
   <code>MediaController</code> interface:</p>
@@ -31173,12 +31473,20 @@
    <thead>
     <tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
    <tbody>
+    <tr><td><dfn title="handler-MediaController-ondurationchange"><code>ondurationchange</code></dfn> <td> <code title="event-durationchange">durationchange</code>
+    <tr><td><dfn title="handler-MediaController-ontimeupdate"><code>ontimeupdate</code></dfn> <td> <code title="event-durationchange">durationchange</code>
     <tr><td><dfn title="handler-MediaController-onplay"><code>onplay</code></dfn> <td> <code title="event-play">play</code>
     <tr><td><dfn title="handler-MediaController-onpause"><code>onpause</code></dfn> <td> <code title="event-pause">pause</code>
     <tr><td><dfn title="handler-MediaController-onratechange"><code>onratechange</code></dfn> <td> <code title="event-ratechange">ratechange</code>
     <tr><td><dfn title="handler-MediaController-onvolumechange"><code>onvolumechange</code></dfn> <td> <code title="event-volumechange">volumechange</code>
   </table>
 
+  <hr>
+
+  <p>The <span>task source</span> for the <span
+  title="concept-task">tasks</span> listed in this section is the
+  <span>DOM manipulation task source</span>.</p>
+
   </div>
 
 
@@ -31235,6 +31543,9 @@
    <li><p>Let <var title="">m</var>'s <span>current media
    controller</span> be <var title="">controller</var>.</p></li>
 
+   <li><p><span>Bring the media element up to speed with its new media
+   controller</span>.</p></li>
+
   </ol>
 
   <p>The <dfn
@@ -31314,7 +31625,7 @@
    element</span>, in <span>tree order</span>.</li>
 
    <li>Any <span title="text track">text tracks</span> added using
-   the <code title="dom-media-addTrack">addTrack()</code> method, in
+   the <code title="dom-media-addTextTrack">addTextTrack()</code> method, in
    the order they were added, oldest first.</li>
 
    <li>Any <span title="media-resource-specific text
@@ -32509,7 +32820,8 @@
 
   <dl class="domintro">
 
-   <dt><var title="">mutableTextTrack</var> = <var title="">media</var> . <code title="dom-media-addTrack">addTrack</code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
+   <dt><var title="">mutableTextTrack</var> = <var title="">media</var> . <code title="dom-media-addTextTrack">addTextTrack</code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
+
    <dd>
     <p>Creates and returns a new <code>MutableTextTrack</code> object, which is also added to the <span>media element</span>'s <span>list of text tracks</span>.</p>
    </dd>
@@ -32530,7 +32842,7 @@
 
   <div class="impl">
 
-  <p>The <dfn title="dom-media-addTrack"><code>addTrack(<var
+  <p>The <dfn title="dom-media-addTextTrack"><code>addTextTrack(<var
   title="">kind</var>, <var title="">label</var>, <var
   title="">language</var>)</code></dfn> method of <span title="media
   element">media elements</span>, when invoked, must run the following
@@ -32668,7 +32980,8 @@
    able to run the script at the exact time specified.</p>
 
    <pre>var sfx = new Audio('sfx.wav');
-var sounds = a.addTrack('metadata');
+var sounds = a.addTextTrack('metadata');
+
 // add sounds we care about
 sounds.addCue(new TextTrackCue('dog bark', 12.783, 13.612, '', '', '', true));
 sounds.addCue(new TextTrackCue('kitten mew', 13.612, 15.091, '', '', '', true));
@@ -35133,6 +35446,19 @@
   the user (e.g. full-screen video or in an independent resizable
   window). Other controls may also be made available.</p>
 
+<!--END w3c-html--><!--CONTROLLER-->
+  <p>If the <span>media element</span> has a <span>current media
+  controller</span>, then the user agent should expose audio tracks
+  from all the <span>slaved media elements</span> (although avoiding
+  duplicates if the same <span>media resource</span> is being used
+  several times). If a <span>media resource</span>'s audio track
+  exposed in this way has no known name, and it is the only audio
+  track for a particular <span>media element</span>, the user agent
+  should use the element's <code title="attr-title">title</code>
+  attribute, if any, as the name (or as part of the name) of that
+  track.</p>
+<!--START w3c-html--><!--CONTROLLER-->
+
   <p>Even when the attribute is absent, however, user agents may
   provide controls to affect playback of the media resource
   (e.g. play, pause, seeking, and volume controls), but such features
@@ -35153,12 +35479,12 @@
 
 <!--END w3c-html--><!--CONTROLLER-->
   <p>When a <span>media element</span> has a <span>current media
-  controller</span>, the user agent must implement its user interface
-  for pausing and unpausing playback, for seeking, for changing the
-  rate of playback, for fast-forwarding or rewinding, and for muting
-  or changing the volume of audio must be implemented specifically in
-  terms of the <code>MediaController</code> API exposed on that
-  <span>current media controller</span>.</p>
+  controller</span>, the user agent's user interface for pausing and
+  unpausing playback, for seeking, for changing the rate of playback,
+  for fast-forwarding or rewinding, and for muting or changing the
+  volume of audio must be implemented specifically in terms of the
+  <code>MediaController</code> API exposed on that <span>current media
+  controller</span>.</p>
 <!--START w3c-html--><!--CONTROLLER-->
 
   <p>The "play" function in the user agent's interface must set the
@@ -35581,23 +35907,23 @@
      <td>The <code title="dom-media-seeking">seeking</code> IDL attribute changed to false.
      <td>
     <tr>
-     <td><dfn title="event-media-timeupdate"><code>timeupdate</code></dfn>
-     <td><code>Event</code>
-     <td>The <span>current playback position</span> changed as part of normal playback or in an especially interesting way, for example discontinuously.
-     <td>
-    <tr>
      <td><dfn title="event-media-ended"><code>ended</code></dfn>
      <td><code>Event</code>
      <td>Playback has stopped because the end of the <span>media resource</span> was reached.
      <td><code title="dom-media-currentTime">currentTime</code> equals the end of the <span>media resource</span>; <code title="dom-media-ended">ended</code> is true.
+
+   <tbody>
     <tr>
      <td><dfn title="event-media-durationchange"><code>durationchange</code></dfn>
      <td><code>Event</code>
      <td>The <code title="dom-media-duration">duration</code> attribute has just been updated.
      <td>
-
-   <tbody>
     <tr>
+     <td><dfn title="event-media-timeupdate"><code>timeupdate</code></dfn>
+     <td><code>Event</code>
+     <td>The <span>current playback position</span> changed as part of normal playback or in an especially interesting way, for example discontinuously.
+     <td>
+    <tr>
      <td><dfn title="event-media-play"><code>play</code></dfn>
      <td><code>Event</code>
      <td>Playback has begun. Fired after the <code title="dom-media-play">play()</code> method has returned, or when the <code title="attr-media-autoplay">autoplay</code> attribute has caused playback to begin.
@@ -35620,7 +35946,7 @@
   </table>
 
 <!--END w3c-html--><!--CONTROLLER-->
-  <p>The last four events in this table are also fired on <code>MediaController</code> objects.</p>
+  <p>The last six events in this table are also fired on <code>MediaController</code> objects.</p>
 <!--START w3c-html--><!--CONTROLLER-->
 
 

|