[html5] r5140 - [giow] (0) Captions - Stage 20.3: more wip for API definitions.

whatwg at whatwg.org whatwg at whatwg.org
Thu Jul 8 11:40:30 PDT 2010


Author: ianh
Date: 2010-07-08 11:40:29 -0700 (Thu, 08 Jul 2010)
New Revision: 5140

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 20.3: more wip for API definitions.

Modified: complete.html
===================================================================
--- complete.html	2010-07-08 17:57:23 UTC (rev 5139)
+++ complete.html	2010-07-08 18:40:29 UTC (rev 5140)
@@ -23818,7 +23818,7 @@
 <!--TT-->
   // timed tracks
   readonly attribute <a href=#timedtrack>TimedTrack</a>[] <a href=#dom-media-tracks title=dom-media-tracks>tracks</a>;
-  <a href=#mutabletimedtrack>MutableTimedTrack</a> <span title=dom-media-addTrack>addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
+  <a href=#mutabletimedtrack>MutableTimedTrack</a> <a href=#dom-media-addtrack title=dom-media-addTrack>addTrack</a>(in DOMString label, in DOMString kind, in DOMString language);
 <!--TT-->
 };</pre>
 
@@ -25963,7 +25963,7 @@
    element</a>, in <a href=#tree-order>tree order</a>.</li>
 
    <li>Any <a href=#timed-track title="timed track">timed tracks</a> added using
-   the <code title=dom-media-addTrack>addTrack()</code> method, in
+   the <code title=dom-media-addTrack><a href=#dom-media-addtrack>addTrack()</a></code> method, in
    the order they were added, oldest first.</li>
 
    <li>Any <a href=#media-resource-specific-timed-track title="media-resource-specific timed
@@ -26865,28 +26865,67 @@
    <dd>The <a href=#timed-track-hidden>timed track hidden</a> mode.</dd>
    <dt><dfn id=dom-timedtrack-showing title=dom-TimedTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
    <dd>The <a href=#timed-track-showing>timed track showing</a> mode.</dd>
-  </dl><p class=XXX>On setting, ...</p>
+  </dl><p>On setting, if the new value is not either 0, 1, or 2, the user
+  agent must throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code>
+  exception. Otherwise, if the new value isn't equal to what the
+  attribute would currently return, the new value must be processed as
+  follows:</p>
 
-<!-- XXX
-  changing dom-TimedTrack-mode to disabled/hidden should hide all the
-  titles, changing it to showing should show them. (Only 'showing'
-  tracks get updated automatically.)
--->
+  <dl class=switch><dt>If the new value is 0</dt>
 
-  <p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-disabled>timed track disabled</a> mode.</p>
+
+    <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
+    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
+    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+   <dt>If the new value is 1</dt>
+
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-hidden>timed track hidden</a> mode.</p>
+
+    <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
+    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
+    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+   <dt>If the new value is 2</dt>
+
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-showing>timed track showing</a> mode.</p>
+
+    <p><a href=#update-the-timed-track-rendering>Update the timed track rendering</a> of the
+    <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+  </dl><p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
   track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents is
   not the <a href=#timed-track-disabled>timed track disabled</a> mode, then the <dfn id=dom-timedtrack-cues title=dom-TimedTrack-cues><code>cues</code></dfn> attribute must
   return a <code><a href=#timedtrackcuelist>TimedTrackCueList</a></code> object that represents the
   subset of the <a href=#timed-track-list-of-cues>timed track list of cues</a> of the
   <a href=#timed-track>timed track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object
   represents whose <a href=#timed-track-cue-start-time title="timed track cue start time">start
-  times</a> occur before the <span>earliest possible position when
-  the script started</span>, in <a href=#timed-track-cue-order>timed track cue
+  times</a> occur before the <a href=#earliest-possible-position-when-the-script-started>earliest possible position when
+  the script started</a>, in <a href=#timed-track-cue-order>timed track cue
   order</a>. Otherwise, it must return null. When an object is
   returned, the same object must be returned each time.</p>
 
-  <p>The <dfn id=earliest-possibly-position-when-the-script-started>earliest possibly position when the script started</dfn>
-  is whatever the <span>earliest possibly position</span> was the last
+  <p>The <dfn id=earliest-possible-position-when-the-script-started>earliest possible position when the script started</dfn>
+  is whatever the <a href=#earliest-possible-position>earliest possible position</a> was the last
   time the <a href=#event-loop>event loop</a> reached step 1.</p>
 
   <p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
@@ -26907,30 +26946,25 @@
   is whatever the <a href=#current-playback-position>current playback position</a> was the last
   time the <a href=#event-loop>event loop</a> reached step 1.</p>
 
-<!-- XXX
- - <span>MutableTimedTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
-   - addTrack should add it as Loaded, Disabled, and with the rules for WebSRT.
--->
-
   </div>
 
   <hr><pre class=idl>interface <dfn id=mutabletimedtrack>MutableTimedTrack</dfn> : <a href=#timedtrack>TimedTrack</a> {
- void <span title=dom-MutableTimedTrack-addCue>addCue</span>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
- void <span title=dom-MutableTimedTrack-removeCue>removeCue</span>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
+ void <a href=#dom-mutabletimedtrack-addcue title=dom-MutableTimedTrack-addCue>addCue</a>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
+ void <a href=#dom-mutabletimedtrack-removecue title=dom-MutableTimedTrack-removeCue>removeCue</a>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
 };</pre>
 
-  <dl class=domintro><dt><var title="">mutableTimedTrack</var> = <var title="">media</var> . <code title=dom-media-addTrack>addTrack</code>( <var title="">label</var>, <var title="">kind</var>, <var title="">language</var> )</dt>
+  <dl class=domintro><dt><var title="">mutableTimedTrack</var> = <var title="">media</var> . <code title=dom-media-addTrack><a href=#dom-media-addtrack>addTrack</a></code>( <var title="">label</var>, <var title="">kind</var>, <var title="">language</var> )</dt>
    <dd>
     <p>Creates and returns a new <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
    </dd>
 
-   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue>addCue</code>( <var title="">cue</var> )</dt>
+   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">mutableTimedTrack</var>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>.</p>
     <!-- XXX exception thrown if the cue is already bound -->
    </dd>
 
-   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue>addCue</code>( <var title="">cue</var> )</dt>
+   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">mutableTimedTrack</var>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>.</p>
     <!-- XXX exception thrown if it's not there -->
@@ -26938,17 +26972,96 @@
 
   </dl><div class=impl>
 
-  <p class=XXX>...</p>
+  <p>The <dfn id=dom-media-addtrack title=dom-media-addTrack><code>addTrack(<var title="">label</var>, <var title="">kind</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
+  element">media elements</a>, when invoked, must run the following
+  steps:</p>
 
-<!-- XXX
-   Make sure that <code>TimedTrackCueList</code>s don't change while
-   script is running, except for addCue/removeCue and the removal of
-   all cues in the face of a dynamic track.src change.
-   (right now only in-band cues can change this, I think)
--->
+  <ol><li>
 
-  </div>
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and abort
+    these steps:</p>
 
+    <ul class=brief><li><code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code>
+     <li><code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code>
+     <li><code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code>
+     <li><code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code>
+     <li><code title=dom-TimedTrack-kind-metadata><a href=#dom-timedtrack-kind-metadata>metadata</a></code>
+    </ul></li>
+
+   <li>
+
+    <p>Create a new <a href=#timed-track>timed track</a>, and set its <a href=#timed-track-kind>timed
+    track kind</a> to <var title="">kind</var>, its <a href=#timed-track-label>timed
+    track label</a> to <var title="">label</var>, its <a href=#timed-track-language>timed
+    track language</a> to <var title="">language</var>, its
+    <a href=#timed-track-readiness-state>timed track readiness state</a> to the <a href=#timed-track-loaded>timed track
+    loaded</a> state, its <a href=#timed-track-mode>timed track mode</a> to the
+    <a href=#timed-track-hidden>timed track hidden</a> mode, and its <a href=#timed-track-list-of-cues>timed track
+    list of cues</a> to an empty list, with the rules for its
+    interpretation being the <a href=#websrt-cue-text-parsing-rules>WebSRT cue text parsing
+    rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>,
+    and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction rules</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Add the new <a href=#timed-track>timed track</a> to the <a href=#media-element>media
+    element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
+
+  </ol><p>The <dfn id=dom-mutabletimedtrack-addcue title=dom-MutableTimedTrack-addCue><code>addCue(<var title="">cue</var>)</code></dfn> method of
+  <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol><li><p>If <var title="">cue</var> is null, then throw an
+   <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
+   steps.</li>
+
+   <li><p>If the given <var title="">cue</var> is already associated
+   with a <a href=#timed-track>timed track</a> other than the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>,
+   then throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception and abort
+   these steps.</li>
+
+   <li><p>Associate <var title="">cue</var> with the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>,
+   if it is not currently associated with a <a href=#timed-track>timed
+   track</a>.</li>
+
+   <li><p>If the given <var title="">cue</var> is already listed in
+   the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>, then throw an
+   <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception.</li>
+
+   <li><p>Add <var title="">cue</var> to the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>'s
+   <a href=#timed-track-list-of-cues>timed track list of cues</a>.</li>
+
+  </ol><p>The <dfn id=dom-mutabletimedtrack-removecue title=dom-MutableTimedTrack-removeCue><code>removeCue(<var title="">cue</var>)</code></dfn> method of
+  <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol><li><p>If <var title="">cue</var> is null, then throw an
+   <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
+   steps.</li>
+
+   <li><p>If the given <var title="">cue</var> is not associated with
+   the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>, then throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code>
+   exception.</li>
+
+   <li><p>If the given <var title="">cue</var> is not currently listed
+   in the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>, then throw a
+   <code><a href=#not_found_err>NOT_FOUND_ERR</a></code> exception.</li>
+
+   <li><p>Remove <var title="">cue</var> from the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>'s
+   <a href=#timed-track-list-of-cues>timed track list of cues</a>.</li>
+
+  </ol></div>
+
   <hr><pre class=idl>interface <dfn id=timedtrackcuelist>TimedTrackCueList</dfn> {
   readonly attribute unsigned long <span title=dom-TimedTrackCueList-length>length</span>;
   getter <a href=#timedtrackcue>TimedTrackCue</a> (in unsigned long index);
@@ -26974,6 +27087,13 @@
 
   </dl><div class=impl>
 
+<!-- XXX
+   Make sure that <code>TimedTrackCueList</code>s don't change while
+   script is running, except for addCue/removeCue and the removal of
+   all cues in the face of a dynamic track.src change.
+   (right now only in-band cues can change this, I think)
+-->
+
   <p class=XXX>...</p>
 
   </div>
@@ -27004,7 +27124,7 @@
 
   <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue>TimedTrackCue</code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
    <dd>
-    <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue>addCue()</code> method.</p>
+    <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue()</a></code> method.</p>
     <p>The <var title="">id</var> argument sets the <a href=#timed-track-cue-identifier>timed track cue identifier</a>.</p>
     <p>The <var title="">startTime</var> argument sets the <a href=#timed-track-cue-start-time>timed track cue start time</a>.</p>
     <p>The <var title="">endTime</var> argument sets the <a href=#timed-track-cue-end-time>timed track cue end time</a>.</p>
@@ -86015,6 +86135,8 @@
 
   <p class=XXX>The <dfn id=rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</dfn>
 
+  <p class=XXX><dfn id=update-the-timed-track-rendering>update the timed track rendering</dfn> of a <a href=#media-element>media element</a></p>
+
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions

Modified: index
===================================================================
--- index	2010-07-08 17:57:23 UTC (rev 5139)
+++ index	2010-07-08 18:40:29 UTC (rev 5140)
@@ -23745,7 +23745,7 @@
 <!--TT-->
   // timed tracks
   readonly attribute <a href=#timedtrack>TimedTrack</a>[] <a href=#dom-media-tracks title=dom-media-tracks>tracks</a>;
-  <a href=#mutabletimedtrack>MutableTimedTrack</a> <span title=dom-media-addTrack>addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
+  <a href=#mutabletimedtrack>MutableTimedTrack</a> <a href=#dom-media-addtrack title=dom-media-addTrack>addTrack</a>(in DOMString label, in DOMString kind, in DOMString language);
 <!--TT-->
 };</pre>
 
@@ -25890,7 +25890,7 @@
    element</a>, in <a href=#tree-order>tree order</a>.</li>
 
    <li>Any <a href=#timed-track title="timed track">timed tracks</a> added using
-   the <code title=dom-media-addTrack>addTrack()</code> method, in
+   the <code title=dom-media-addTrack><a href=#dom-media-addtrack>addTrack()</a></code> method, in
    the order they were added, oldest first.</li>
 
    <li>Any <a href=#media-resource-specific-timed-track title="media-resource-specific timed
@@ -26792,28 +26792,67 @@
    <dd>The <a href=#timed-track-hidden>timed track hidden</a> mode.</dd>
    <dt><dfn id=dom-timedtrack-showing title=dom-TimedTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
    <dd>The <a href=#timed-track-showing>timed track showing</a> mode.</dd>
-  </dl><p class=XXX>On setting, ...</p>
+  </dl><p>On setting, if the new value is not either 0, 1, or 2, the user
+  agent must throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code>
+  exception. Otherwise, if the new value isn't equal to what the
+  attribute would currently return, the new value must be processed as
+  follows:</p>
 
-<!-- XXX
-  changing dom-TimedTrack-mode to disabled/hidden should hide all the
-  titles, changing it to showing should show them. (Only 'showing'
-  tracks get updated automatically.)
--->
+  <dl class=switch><dt>If the new value is 0</dt>
 
-  <p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-disabled>timed track disabled</a> mode.</p>
+
+    <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
+    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
+    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+   <dt>If the new value is 1</dt>
+
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-hidden>timed track hidden</a> mode.</p>
+
+    <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
+    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
+    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+   <dt>If the new value is 2</dt>
+
+   <dd>
+
+    <p>Set the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
+    track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
+    the <a href=#timed-track-showing>timed track showing</a> mode.</p>
+
+    <p><a href=#update-the-timed-track-rendering>Update the timed track rendering</a> of the
+    <a href=#media-element>media element</a>.</p>
+
+   </dd>
+
+  </dl><p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
   track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents is
   not the <a href=#timed-track-disabled>timed track disabled</a> mode, then the <dfn id=dom-timedtrack-cues title=dom-TimedTrack-cues><code>cues</code></dfn> attribute must
   return a <code><a href=#timedtrackcuelist>TimedTrackCueList</a></code> object that represents the
   subset of the <a href=#timed-track-list-of-cues>timed track list of cues</a> of the
   <a href=#timed-track>timed track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object
   represents whose <a href=#timed-track-cue-start-time title="timed track cue start time">start
-  times</a> occur before the <span>earliest possible position when
-  the script started</span>, in <a href=#timed-track-cue-order>timed track cue
+  times</a> occur before the <a href=#earliest-possible-position-when-the-script-started>earliest possible position when
+  the script started</a>, in <a href=#timed-track-cue-order>timed track cue
   order</a>. Otherwise, it must return null. When an object is
   returned, the same object must be returned each time.</p>
 
-  <p>The <dfn id=earliest-possibly-position-when-the-script-started>earliest possibly position when the script started</dfn>
-  is whatever the <span>earliest possibly position</span> was the last
+  <p>The <dfn id=earliest-possible-position-when-the-script-started>earliest possible position when the script started</dfn>
+  is whatever the <a href=#earliest-possible-position>earliest possible position</a> was the last
   time the <a href=#event-loop>event loop</a> reached step 1.</p>
 
   <p>If the <a href=#timed-track-mode>timed track mode</a> of the <a href=#timed-track>timed
@@ -26834,30 +26873,25 @@
   is whatever the <a href=#current-playback-position>current playback position</a> was the last
   time the <a href=#event-loop>event loop</a> reached step 1.</p>
 
-<!-- XXX
- - <span>MutableTimedTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
-   - addTrack should add it as Loaded, Disabled, and with the rules for WebSRT.
--->
-
   </div>
 
   <hr><pre class=idl>interface <dfn id=mutabletimedtrack>MutableTimedTrack</dfn> : <a href=#timedtrack>TimedTrack</a> {
- void <span title=dom-MutableTimedTrack-addCue>addCue</span>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
- void <span title=dom-MutableTimedTrack-removeCue>removeCue</span>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
+ void <a href=#dom-mutabletimedtrack-addcue title=dom-MutableTimedTrack-addCue>addCue</a>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
+ void <a href=#dom-mutabletimedtrack-removecue title=dom-MutableTimedTrack-removeCue>removeCue</a>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
 };</pre>
 
-  <dl class=domintro><dt><var title="">mutableTimedTrack</var> = <var title="">media</var> . <code title=dom-media-addTrack>addTrack</code>( <var title="">label</var>, <var title="">kind</var>, <var title="">language</var> )</dt>
+  <dl class=domintro><dt><var title="">mutableTimedTrack</var> = <var title="">media</var> . <code title=dom-media-addTrack><a href=#dom-media-addtrack>addTrack</a></code>( <var title="">label</var>, <var title="">kind</var>, <var title="">language</var> )</dt>
    <dd>
     <p>Creates and returns a new <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
    </dd>
 
-   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue>addCue</code>( <var title="">cue</var> )</dt>
+   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">mutableTimedTrack</var>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>.</p>
     <!-- XXX exception thrown if the cue is already bound -->
    </dd>
 
-   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue>addCue</code>( <var title="">cue</var> )</dt>
+   <dt><var title="">mutableTimedTrack</var> . <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">mutableTimedTrack</var>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>.</p>
     <!-- XXX exception thrown if it's not there -->
@@ -26865,17 +26899,96 @@
 
   </dl><div class=impl>
 
-  <p class=XXX>...</p>
+  <p>The <dfn id=dom-media-addtrack title=dom-media-addTrack><code>addTrack(<var title="">label</var>, <var title="">kind</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
+  element">media elements</a>, when invoked, must run the following
+  steps:</p>
 
-<!-- XXX
-   Make sure that <code>TimedTrackCueList</code>s don't change while
-   script is running, except for addCue/removeCue and the removal of
-   all cues in the face of a dynamic track.src change.
-   (right now only in-band cues can change this, I think)
--->
+  <ol><li>
 
-  </div>
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and abort
+    these steps:</p>
 
+    <ul class=brief><li><code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code>
+     <li><code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code>
+     <li><code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code>
+     <li><code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code>
+     <li><code title=dom-TimedTrack-kind-metadata><a href=#dom-timedtrack-kind-metadata>metadata</a></code>
+    </ul></li>
+
+   <li>
+
+    <p>Create a new <a href=#timed-track>timed track</a>, and set its <a href=#timed-track-kind>timed
+    track kind</a> to <var title="">kind</var>, its <a href=#timed-track-label>timed
+    track label</a> to <var title="">label</var>, its <a href=#timed-track-language>timed
+    track language</a> to <var title="">language</var>, its
+    <a href=#timed-track-readiness-state>timed track readiness state</a> to the <a href=#timed-track-loaded>timed track
+    loaded</a> state, its <a href=#timed-track-mode>timed track mode</a> to the
+    <a href=#timed-track-hidden>timed track hidden</a> mode, and its <a href=#timed-track-list-of-cues>timed track
+    list of cues</a> to an empty list, with the rules for its
+    interpretation being the <a href=#websrt-cue-text-parsing-rules>WebSRT cue text parsing
+    rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>,
+    and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction rules</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Add the new <a href=#timed-track>timed track</a> to the <a href=#media-element>media
+    element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
+
+  </ol><p>The <dfn id=dom-mutabletimedtrack-addcue title=dom-MutableTimedTrack-addCue><code>addCue(<var title="">cue</var>)</code></dfn> method of
+  <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol><li><p>If <var title="">cue</var> is null, then throw an
+   <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
+   steps.</li>
+
+   <li><p>If the given <var title="">cue</var> is already associated
+   with a <a href=#timed-track>timed track</a> other than the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>,
+   then throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception and abort
+   these steps.</li>
+
+   <li><p>Associate <var title="">cue</var> with the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>,
+   if it is not currently associated with a <a href=#timed-track>timed
+   track</a>.</li>
+
+   <li><p>If the given <var title="">cue</var> is already listed in
+   the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>, then throw an
+   <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception.</li>
+
+   <li><p>Add <var title="">cue</var> to the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>'s
+   <a href=#timed-track-list-of-cues>timed track list of cues</a>.</li>
+
+  </ol><p>The <dfn id=dom-mutabletimedtrack-removecue title=dom-MutableTimedTrack-removeCue><code>removeCue(<var title="">cue</var>)</code></dfn> method of
+  <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol><li><p>If <var title="">cue</var> is null, then throw an
+   <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
+   steps.</li>
+
+   <li><p>If the given <var title="">cue</var> is not associated with
+   the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>, then throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code>
+   exception.</li>
+
+   <li><p>If the given <var title="">cue</var> is not currently listed
+   in the method's <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed
+   track</a>'s <a href=#timed-track-list-of-cues>timed track list of cues</a>, then throw a
+   <code><a href=#not_found_err>NOT_FOUND_ERR</a></code> exception.</li>
+
+   <li><p>Remove <var title="">cue</var> from the method's
+   <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code> object's <a href=#timed-track>timed track</a>'s
+   <a href=#timed-track-list-of-cues>timed track list of cues</a>.</li>
+
+  </ol></div>
+
   <hr><pre class=idl>interface <dfn id=timedtrackcuelist>TimedTrackCueList</dfn> {
   readonly attribute unsigned long <span title=dom-TimedTrackCueList-length>length</span>;
   getter <a href=#timedtrackcue>TimedTrackCue</a> (in unsigned long index);
@@ -26901,6 +27014,13 @@
 
   </dl><div class=impl>
 
+<!-- XXX
+   Make sure that <code>TimedTrackCueList</code>s don't change while
+   script is running, except for addCue/removeCue and the removal of
+   all cues in the face of a dynamic track.src change.
+   (right now only in-band cues can change this, I think)
+-->
+
   <p class=XXX>...</p>
 
   </div>
@@ -26931,7 +27051,7 @@
 
   <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue>TimedTrackCue</code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
    <dd>
-    <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue>addCue()</code> method.</p>
+    <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue()</a></code> method.</p>
     <p>The <var title="">id</var> argument sets the <a href=#timed-track-cue-identifier>timed track cue identifier</a>.</p>
     <p>The <var title="">startTime</var> argument sets the <a href=#timed-track-cue-start-time>timed track cue start time</a>.</p>
     <p>The <var title="">endTime</var> argument sets the <a href=#timed-track-cue-end-time>timed track cue end time</a>.</p>
@@ -79256,6 +79376,8 @@
 
   <p class=XXX>The <dfn id=rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</dfn>
 
+  <p class=XXX><dfn id=update-the-timed-track-rendering>update the timed track rendering</dfn> of a <a href=#media-element>media element</a></p>
+
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions

Modified: source
===================================================================
--- source	2010-07-08 17:57:23 UTC (rev 5139)
+++ source	2010-07-08 18:40:29 UTC (rev 5140)
@@ -29110,14 +29110,57 @@
    <dd>The <span>timed track showing</span> mode.</dd>
   </dl>
 
-  <p class="XXX">On setting, ...</p>
+  <p>On setting, if the new value is not either 0, 1, or 2, the user
+  agent must throw an <code>INVALID_ACCESS_ERR</code>
+  exception. Otherwise, if the new value isn't equal to what the
+  attribute would currently return, the new value must be processed as
+  follows:</p>
 
-<!-- XXX
-  changing dom-TimedTrack-mode to disabled/hidden should hide all the
-  titles, changing it to showing should show them. (Only 'showing'
-  tracks get updated automatically.)
--->
+  <dl class="switch">
 
+   <dt>If the new value is 0</dt>
+
+   <dd>
+
+    <p>Set the <span>timed track mode</span> of the <span>timed
+    track</span> that the <code>TimedTrack</code> object represents to
+    the <span>timed track disabled</span> mode.</p>
+
+    <p>If the <span>timed track mode</span> was previously the
+    <span>timed track showing</span> mode, then <span>update the timed
+    track rendering</span> of the <span>media element</span>.</p>
+
+   </dd>
+
+   <dt>If the new value is 1</dt>
+
+   <dd>
+
+    <p>Set the <span>timed track mode</span> of the <span>timed
+    track</span> that the <code>TimedTrack</code> object represents to
+    the <span>timed track hidden</span> mode.</p>
+
+    <p>If the <span>timed track mode</span> was previously the
+    <span>timed track showing</span> mode, then <span>update the timed
+    track rendering</span> of the <span>media element</span>.</p>
+
+   </dd>
+
+   <dt>If the new value is 2</dt>
+
+   <dd>
+
+    <p>Set the <span>timed track mode</span> of the <span>timed
+    track</span> that the <code>TimedTrack</code> object represents to
+    the <span>timed track showing</span> mode.</p>
+
+    <p><span>Update the timed track rendering</span> of the
+    <span>media element</span>.</p>
+
+   </dd>
+
+  </dl>
+
   <p>If the <span>timed track mode</span> of the <span>timed
   track</span> that the <code>TimedTrack</code> object represents is
   not the <span>timed track disabled</span> mode, then the <dfn
@@ -29131,8 +29174,8 @@
   order</span>. Otherwise, it must return null. When an object is
   returned, the same object must be returned each time.</p>
 
-  <p>The <dfn>earliest possibly position when the script started</dfn>
-  is whatever the <span>earliest possibly position</span> was the last
+  <p>The <dfn>earliest possible position when the script started</dfn>
+  is whatever the <span>earliest possible position</span> was the last
   time the <span>event loop</span> reached step 1.</p>
 
   <p>If the <span>timed track mode</span> of the <span>timed
@@ -29154,11 +29197,6 @@
   is whatever the <span>current playback position</span> was the last
   time the <span>event loop</span> reached step 1.</p>
 
-<!-- XXX
- - <span>MutableTimedTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
-   - addTrack should add it as Loaded, Disabled, and with the rules for WebSRT.
--->
-
   </div>
 
   <hr>
@@ -29191,15 +29229,114 @@
 
   <div class="impl">
 
-  <p class="XXX">...</p>
+  <p>The <dfn title="dom-media-addTrack"><code>addTrack(<var
+  title="">label</var>, <var title="">kind</var>, <var
+  title="">language</var>)</code></dfn> method of <span title="media
+  element">media elements</span>, when invoked, must run the following
+  steps:</p>
 
-<!-- XXX
-   Make sure that <code>TimedTrackCueList</code>s don't change while
-   script is running, except for addCue/removeCue and the removal of
-   all cues in the face of a dynamic track.src change.
-   (right now only in-band cues can change this, I think)
--->
+  <ol>
 
+   <li>
+
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code>SYNTAX_ERR</code> exception and abort
+    these steps:</p>
+
+    <ul class="brief">
+     <li><code title="dom-TimedTrack-kind-subtitles">subtitles</code>
+     <li><code title="dom-TimedTrack-kind-captions">captions</code>
+     <li><code title="dom-TimedTrack-kind-descriptions">descriptions</code>
+     <li><code title="dom-TimedTrack-kind-chapters">chapters</code>
+     <li><code title="dom-TimedTrack-kind-metadata">metadata</code>
+    </ul>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <span>timed track</span>, and set its <span>timed
+    track kind</span> to <var title="">kind</var>, its <span>timed
+    track label</span> to <var title="">label</var>, its <span>timed
+    track language</span> to <var title="">language</var>, its
+    <span>timed track readiness state</span> to the <span>timed track
+    loaded</span> state, its <span>timed track mode</span> to the
+    <span>timed track hidden</span> mode, and its <span>timed track
+    list of cues</span> to an empty list, with the rules for its
+    interpretation being the <span>WebSRT cue text parsing
+    rules</span>, the <span>WebSRT cue text rendering rules</span>,
+    and the <span>WebSRT cue text DOM construction rules</span></p>
+
+   </li>
+
+   <li>
+
+    <p>Add the new <span>timed track</span> to the <span>media
+    element</span>'s <span>list of timed tracks</span>.</p>
+
+  </ol>
+
+  <p>The <dfn title="dom-MutableTimedTrack-addCue"><code>addCue(<var
+  title="">cue</var>)</code></dfn> method of
+  <code>MutableTimedTrack</code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol>
+
+   <li><p>If <var title="">cue</var> is null, then throw an
+   <code>INVALID_ACCESS_ERR</code> exception and abort these
+   steps.</p></li>
+
+   <li><p>If the given <var title="">cue</var> is already associated
+   with a <span>timed track</span> other than the method's
+   <code>MutableTimedTrack</code> object's <span>timed track</span>,
+   then throw an <code>INVALID_STATE_ERR</code> exception and abort
+   these steps.</p></li>
+
+   <li><p>Associate <var title="">cue</var> with the method's
+   <code>MutableTimedTrack</code> object's <span>timed track</span>,
+   if it is not currently associated with a <span>timed
+   track</span>.</p></li>
+
+   <li><p>If the given <var title="">cue</var> is already listed in
+   the method's <code>MutableTimedTrack</code> object's <span>timed
+   track</span>'s <span>timed track list of cues</span>, then throw an
+   <code>INVALID_STATE_ERR</code> exception.</p></li>
+
+   <li><p>Add <var title="">cue</var> to the method's
+   <code>MutableTimedTrack</code> object's <span>timed track</span>'s
+   <span>timed track list of cues</span>.</p></li>
+
+  </ol>
+
+  <p>The <dfn
+  title="dom-MutableTimedTrack-removeCue"><code>removeCue(<var
+  title="">cue</var>)</code></dfn> method of
+  <code>MutableTimedTrack</code> objects, when invoked, must run the
+  following steps:</p>
+
+  <ol>
+
+   <li><p>If <var title="">cue</var> is null, then throw an
+   <code>INVALID_ACCESS_ERR</code> exception and abort these
+   steps.</p></li>
+
+   <li><p>If the given <var title="">cue</var> is not associated with
+   the method's <code>MutableTimedTrack</code> object's <span>timed
+   track</span>, then throw an <code>INVALID_STATE_ERR</code>
+   exception.</p></li>
+
+   <li><p>If the given <var title="">cue</var> is not currently listed
+   in the method's <code>MutableTimedTrack</code> object's <span>timed
+   track</span>'s <span>timed track list of cues</span>, then throw a
+   <code>NOT_FOUND_ERR</code> exception.</p></li>
+
+   <li><p>Remove <var title="">cue</var> from the method's
+   <code>MutableTimedTrack</code> object's <span>timed track</span>'s
+   <span>timed track list of cues</span>.</p></li>
+
+  </ol>
+
   </div>
 
   <hr>
@@ -29233,6 +29370,13 @@
 
   <div class="impl">
 
+<!-- XXX
+   Make sure that <code>TimedTrackCueList</code>s don't change while
+   script is running, except for addCue/removeCue and the removal of
+   all cues in the face of a dynamic track.src change.
+   (right now only in-band cues can change this, I think)
+-->
+
   <p class="XXX">...</p>
 
   </div>
@@ -98104,6 +98248,8 @@
 
   <p class="XXX">The <dfn>rules for updating the display of WebSRT timed tracks</dfn>
 
+  <p class="XXX"><dfn>update the timed track rendering</dfn> of a <span>media element</span></p>
+
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions




More information about the Commit-Watchers mailing list