[html5] r5110 - [giow] (0) Captions - Stage 11.2: minor fixes and steps towards completion

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 24 15:05:14 PDT 2010


Author: ianh
Date: 2010-06-24 15:05:12 -0700 (Thu, 24 Jun 2010)
New Revision: 5110

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 11.2: minor fixes and steps towards completion

Modified: complete.html
===================================================================
--- complete.html	2010-06-24 06:51:45 UTC (rev 5109)
+++ complete.html	2010-06-24 22:05:12 UTC (rev 5110)
@@ -26098,17 +26098,27 @@
     timed track</a> can change dynamically, either because the
     <a href=#timed-track>timed track</a> has <a href=#timed-track-not-loaded title="timed track not
     loaded">not yet been loaded</a> or is still <a href=#timed-track-loading title="timed
-    track loading">loading</a>, or in the case of a <a href=#timed-track>timed
-    track</a> corresponding to a <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code>
-    object, where individual cues can be added or removed
-    dynamically using the API.</p>
+    track loading">loading</a>, or because the the <a href=#timed-track>timed
+    track</a> corresponds to a <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code>
+    object, whose API allows individual cues can be added or removed
+    dynamically.</p>
 
    </dd>
 
   </dl><p>Each <a href=#timed-track>timed track</a> has a corresponding
   <code><a href=#timedtrack>TimedTrack</a></code> object.</p>
 
-  <p>A <dfn id=timed-track-cue>timed track cue</dfn> is the unit of time-sensitive data
+  <p>The <a href=#timed-track title="timed track">timed tracks</a> of a
+  <a href=#media-element>media element</a> are <dfn id=the-timed-tracks-are-ready title="the timed tracks are
+  ready">ready</dfn> if all the <a href=#timed-track title="timed track">timed
+  tracks</a> whose <a href=#timed-track-mode title="timed track mode">mode</a> was
+  not in the <a href=#timed-track-disabled title="timed track disabled">disabled</a> state
+  when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+  algorithm</a> last started now have a <a href=#timed-track-readiness-state>timed track readiness
+  state</a> of <a href=#timed-track-loaded title="timed track loaded">loaded</a> or
+  <a href=#timed-track-failed-to-load title="timed track failed to load">failed to load</a>.</p>
+
+  <hr><p>A <dfn id=timed-track-cue>timed track cue</dfn> is the unit of time-sensitive data
   in a <a href=#timed-track>timed track</a>, corresponding for instance for
   subtitles and captions to the text that appears at a particular time
   and disappears at another time.</p>
@@ -26152,6 +26162,22 @@
     line extends vertically and is positioned horizontally, with
     consecutive lines displayed to the left of each other<!-- used for
     mongolian -->).</p>
+
+    <p>If the <a href=#timed-track-cue-writing-direction title="timed track cue writing direction">writing
+    direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal
+    writing direction">horizontal</a>, then <a href=#timed-track-cue-line-position title="timed
+    track cue line position">line position</a> percentages are
+    relative to the height of the video, and <a href=#timed-track-cue-text-position title="timed track
+    cue text position">text position</a> and <a href=#timed-track-cue-size title="timed
+    track cue size">size</a> percentages are relative to the width
+    of the video.</p>
+
+    <p>Otherwise, <a href=#timed-track-cue-line-position title="timed track cue line position">line
+    position</a> percentages are relative to the width of the
+    video, and <a href=#timed-track-cue-text-position title="timed track cue text position">text
+    position</a> and <a href=#timed-track-cue-size title="timed track cue size">size</a>
+    percentages are relative to the height of the video.</p>
+
    </dd>
 
    <dt><dfn id=timed-track-cue-snap-to-lines-flag title="timed track cue snap-to-lines flag">A snap-to-lines flag</dfn>
@@ -26219,17 +26245,7 @@
   cue</a> is associated with a particular <a href=#timed-track>timed track</a>,
   the association is permanent.</p>
 
-  <p>The <a href=#timed-track title="timed track">timed tracks</a> of a
-  <a href=#media-element>media element</a> are <dfn id=the-timed-tracks-are-ready title="the timed tracks are
-  ready">ready</dfn> if all the <a href=#timed-track title="timed track">timed
-  tracks</a> whose <a href=#timed-track-mode title="timed track mode">mode</a> was
-  not in the <a href=#timed-track-disabled title="timed track disabled">disabled</a> state
-  when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
-  algorithm</a> last started now have a <a href=#timed-track-readiness-state>timed track readiness
-  state</a> of <a href=#timed-track-loaded title="timed track loaded">loaded</a> or
-  <a href=#timed-track-failed-to-load title="timed track failed to load">failed to load</a>.</p>
 
-
   <h6 id=sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</h6>
 
   <p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
@@ -26306,8 +26322,9 @@
   <h6 id=sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</h6>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
-  associated with a new <a href=#timed-track>timed track</a> and its corresponding
-  new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>
+  associated with a new <a href=#timed-track>timed track</a> (with its value set
+  as defined below) and its corresponding new <code><a href=#timedtrack>TimedTrack</a></code>
+  object.</p>
 
   <p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
   the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
@@ -26341,25 +26358,68 @@
   <p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
   the algorithm below.</p>
 
-  <p class=XXX>...cues...</p>
+  <p>The <a href=#timed-track-list-of-cues>timed track list of cues</a> is initially empty. It
+  is dynamically modified when the referenced file is parsed.</p>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
-  the new parent is a <a href=#media-element>media element</a>, then add the
-  <code><a href=#the-track-element>track</a></code> element's corresponding <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
+  the new parent is a <a href=#media-element>media element</a>, then the user agent
+  must add the <code><a href=#the-track-element>track</a></code> element's corresponding <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>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
-  the old parent was a <a href=#media-element>media element</a>, then remove the
-  <code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
-  from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
-  tracks</a>.</p>
+  the old parent was a <a href=#media-element>media element</a>, then the user agent
+  must remove the <code><a href=#the-track-element>track</a></code> element's corresponding
+  <a href=#timed-track>timed track</a> from the <a href=#media-element>media element</a>'s
+  <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
 
   <p>When a <a href=#timed-track>timed track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
-  element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, <span class=XXX>update the mode appropriately</span>.</p>
+  element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, the user agent
+  must set the <a href=#timed-track-mode>timed track mode</a> appropriately, as
+  determined by the following conditions:</p>
 
-  <p>When a <a href=#timed-track>timed track</a> corresponding to a
+  <dl class=switch><dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code> or <code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code> and the user
+   has indicated an interest in having a track with this <a href=#timed-track-kind>timed
+   track kind</a>, <a href=#timed-track-language>timed track language</a>, and
+   <a href=#timed-track-label>timed track label</a> enabled, and there is no other
+   <a href=#timed-track>timed track</a> in the <a href=#media-element>media element</a>'s
+   <a href=#list-of-timed-tracks>list of timed tracks</a> with a <a href=#timed-track-kind>timed track
+   kind</a> of either <code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code> or <code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code> and
+   the user has indicated an interest in having text descriptions with
+   this <a href=#timed-track-language>timed track language</a> and <a href=#timed-track-label>timed track
+   label</a> enabled, and there is no other <a href=#timed-track>timed
+   track</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of
+   timed tracks</a> with a <a href=#timed-track-kind>timed track kind</a> of <code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code> and the
+   <a href=#timed-track-language>timed track language</a> is one that the user agent has
+   reason to believe is appropriate for the user, and there is no
+   other <a href=#timed-track>timed track</a> in the <a href=#media-element>media element</a>'s
+   <a href=#list-of-timed-tracks>list of timed tracks</a> with a <a href=#timed-track-kind>timed track
+   kind</a> of <code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dd>
+    <p>Let the <a href=#timed-track-mode>timed track mode</a> be <a href=#timed-track-showing title="timed
+    track showing">showing</a>.</p>
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+    <p>Let the <a href=#timed-track-mode>timed track mode</a> be <a href=#timed-track-disabled title="timed
+    track disabled">disabled</a>.</p>
+   </dd>
+
+  </dl><p>When a <a href=#timed-track>timed track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is created with <a href=#timed-track-mode>timed track
   mode</a> set to <a href=#timed-track-hidden title="timed track hidden">hidden</a> or
   <a href=#timed-track-showing title="timed track showing">showing</a>, and when a
@@ -26368,8 +26428,11 @@
   changes its <a href=#timed-track-mode>timed track mode</a> to <a href=#timed-track-hidden title="timed
   track hidden">hidden</a> or <a href=#timed-track-showing title="timed track
   showing">showing</a> for the first time, the user agent must
-  immediately and synchronously run the 
-  following steps:</p>
+  immediately and synchronously run the following algorithm. This
+  algorithm interacts closely with the <a href=#event-loop>event loop</a>
+  mechanism; in particular, it has a <a href=#synchronous-section>synchronous section</a>
+  (which is triggered as part of the <a href=#event-loop>event loop</a>
+  algorithm). The step in that section is marked with ⌛.</p>
 
   <ol><li><p>Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to <a href=#timed-track-loading title="timed track loading">loading</a>.</li>
 
@@ -26392,9 +26455,17 @@
     <p>The <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue
     a task">queued</a> by the <a href=#fetch title=fetch>fetching
     algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
-    process the data as it is being fetched must <span class=XXX>...this is where cross-origin checks go</span>.</p>
+    process the data as it is being fetched must run the following
+    steps:</p>
 
-    <p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
+    <ol><li><p><span class=XXX>...this is where cross-origin checks
+     go...</span></li>
+
+     <li><p class=XXX>determine format...</li>
+
+     <li><p class=XXX>hand off to appropriate parser...</li>
+
+    </ol><p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
     any reason (network error, the server returns an error code, the
     cross-origin checks mentioned above fail, etc), or if <var title="">URL</var> is the empty string, then <a href=#queue-a-task>queue a
     task</a> to first change the <a href=#timed-track-readiness-state>timed track readiness state</a>
@@ -26448,6 +26519,24 @@
    hidden">hidden</a> or <a href=#timed-track-showing title="timed track
    showing">showing</a>.</li>
 
+   <li><p>Wait until the <a href=#timed-track-readiness-state>timed track readiness state</a> is
+   no longer set to <a href=#timed-track-loading title="timed track
+   loading">loading</a>.</li>
+
+   <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous
+   section</a> consists of the following step. (The step in the
+   <a href=#synchronous-section>synchronous section</a> is marked with ⌛.)</li>
+
+   <li><p>⌛ Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to
+   <a href=#timed-track-loading title="timed track loading">loading</a>.</li>
+
+   <!-- if you add more, change the grammar of the sentences above to
+   be plural with respect to the number of synchronous steps (both in
+   the step above and in the intro to the whole algorithm) -->
+
+   <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
+   remaining steps asynchronously.</li>
+
    <li><p>Jump to the step labeled <i>download</i>.</li>
 
   </ol></div>

Modified: index
===================================================================
--- index	2010-06-24 06:51:45 UTC (rev 5109)
+++ index	2010-06-24 22:05:12 UTC (rev 5110)
@@ -1269,7 +1269,7 @@
    present in the W3C version due to the W3C HTML working group not
    wanting the examples to be quite so brutally honest, as documented
    in <a href=http://lists.w3.org/Archives/Public/public-html/2010Jun/0562.html>this
-   working group decision from June 2010</a>.
+   working group decision from June 2010</a>.</li>
 
    <li>The W3C version omits a paragraph of implementation advice
    because of <a href=http://lists.w3.org/Archives/Public/public-html/2010Jun/0001.html>a
@@ -26031,17 +26031,27 @@
     timed track</a> can change dynamically, either because the
     <a href=#timed-track>timed track</a> has <a href=#timed-track-not-loaded title="timed track not
     loaded">not yet been loaded</a> or is still <a href=#timed-track-loading title="timed
-    track loading">loading</a>, or in the case of a <a href=#timed-track>timed
-    track</a> corresponding to a <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code>
-    object, where individual cues can be added or removed
-    dynamically using the API.</p>
+    track loading">loading</a>, or because the the <a href=#timed-track>timed
+    track</a> corresponds to a <code><a href=#mutabletimedtrack>MutableTimedTrack</a></code>
+    object, whose API allows individual cues can be added or removed
+    dynamically.</p>
 
    </dd>
 
   </dl><p>Each <a href=#timed-track>timed track</a> has a corresponding
   <code><a href=#timedtrack>TimedTrack</a></code> object.</p>
 
-  <p>A <dfn id=timed-track-cue>timed track cue</dfn> is the unit of time-sensitive data
+  <p>The <a href=#timed-track title="timed track">timed tracks</a> of a
+  <a href=#media-element>media element</a> are <dfn id=the-timed-tracks-are-ready title="the timed tracks are
+  ready">ready</dfn> if all the <a href=#timed-track title="timed track">timed
+  tracks</a> whose <a href=#timed-track-mode title="timed track mode">mode</a> was
+  not in the <a href=#timed-track-disabled title="timed track disabled">disabled</a> state
+  when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+  algorithm</a> last started now have a <a href=#timed-track-readiness-state>timed track readiness
+  state</a> of <a href=#timed-track-loaded title="timed track loaded">loaded</a> or
+  <a href=#timed-track-failed-to-load title="timed track failed to load">failed to load</a>.</p>
+
+  <hr><p>A <dfn id=timed-track-cue>timed track cue</dfn> is the unit of time-sensitive data
   in a <a href=#timed-track>timed track</a>, corresponding for instance for
   subtitles and captions to the text that appears at a particular time
   and disappears at another time.</p>
@@ -26085,6 +26095,22 @@
     line extends vertically and is positioned horizontally, with
     consecutive lines displayed to the left of each other<!-- used for
     mongolian -->).</p>
+
+    <p>If the <a href=#timed-track-cue-writing-direction title="timed track cue writing direction">writing
+    direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal
+    writing direction">horizontal</a>, then <a href=#timed-track-cue-line-position title="timed
+    track cue line position">line position</a> percentages are
+    relative to the height of the video, and <a href=#timed-track-cue-text-position title="timed track
+    cue text position">text position</a> and <a href=#timed-track-cue-size title="timed
+    track cue size">size</a> percentages are relative to the width
+    of the video.</p>
+
+    <p>Otherwise, <a href=#timed-track-cue-line-position title="timed track cue line position">line
+    position</a> percentages are relative to the width of the
+    video, and <a href=#timed-track-cue-text-position title="timed track cue text position">text
+    position</a> and <a href=#timed-track-cue-size title="timed track cue size">size</a>
+    percentages are relative to the height of the video.</p>
+
    </dd>
 
    <dt><dfn id=timed-track-cue-snap-to-lines-flag title="timed track cue snap-to-lines flag">A snap-to-lines flag</dfn>
@@ -26152,17 +26178,7 @@
   cue</a> is associated with a particular <a href=#timed-track>timed track</a>,
   the association is permanent.</p>
 
-  <p>The <a href=#timed-track title="timed track">timed tracks</a> of a
-  <a href=#media-element>media element</a> are <dfn id=the-timed-tracks-are-ready title="the timed tracks are
-  ready">ready</dfn> if all the <a href=#timed-track title="timed track">timed
-  tracks</a> whose <a href=#timed-track-mode title="timed track mode">mode</a> was
-  not in the <a href=#timed-track-disabled title="timed track disabled">disabled</a> state
-  when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
-  algorithm</a> last started now have a <a href=#timed-track-readiness-state>timed track readiness
-  state</a> of <a href=#timed-track-loaded title="timed track loaded">loaded</a> or
-  <a href=#timed-track-failed-to-load title="timed track failed to load">failed to load</a>.</p>
 
-
   <h6 id=sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</h6>
 
   <p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
@@ -26239,8 +26255,9 @@
   <h6 id=sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</h6>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
-  associated with a new <a href=#timed-track>timed track</a> and its corresponding
-  new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>
+  associated with a new <a href=#timed-track>timed track</a> (with its value set
+  as defined below) and its corresponding new <code><a href=#timedtrack>TimedTrack</a></code>
+  object.</p>
 
   <p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
   the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
@@ -26274,25 +26291,68 @@
   <p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
   the algorithm below.</p>
 
-  <p class=XXX>...cues...</p>
+  <p>The <a href=#timed-track-list-of-cues>timed track list of cues</a> is initially empty. It
+  is dynamically modified when the referenced file is parsed.</p>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
-  the new parent is a <a href=#media-element>media element</a>, then add the
-  <code><a href=#the-track-element>track</a></code> element's corresponding <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
+  the new parent is a <a href=#media-element>media element</a>, then the user agent
+  must add the <code><a href=#the-track-element>track</a></code> element's corresponding <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>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
-  the old parent was a <a href=#media-element>media element</a>, then remove the
-  <code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
-  from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
-  tracks</a>.</p>
+  the old parent was a <a href=#media-element>media element</a>, then the user agent
+  must remove the <code><a href=#the-track-element>track</a></code> element's corresponding
+  <a href=#timed-track>timed track</a> from the <a href=#media-element>media element</a>'s
+  <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
 
   <p>When a <a href=#timed-track>timed track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
-  element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, <span class=XXX>update the mode appropriately</span>.</p>
+  element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, the user agent
+  must set the <a href=#timed-track-mode>timed track mode</a> appropriately, as
+  determined by the following conditions:</p>
 
-  <p>When a <a href=#timed-track>timed track</a> corresponding to a
+  <dl class=switch><dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code> or <code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code> and the user
+   has indicated an interest in having a track with this <a href=#timed-track-kind>timed
+   track kind</a>, <a href=#timed-track-language>timed track language</a>, and
+   <a href=#timed-track-label>timed track label</a> enabled, and there is no other
+   <a href=#timed-track>timed track</a> in the <a href=#media-element>media element</a>'s
+   <a href=#list-of-timed-tracks>list of timed tracks</a> with a <a href=#timed-track-kind>timed track
+   kind</a> of either <code title=dom-TimedTrack-kind-subtitles><a href=#dom-timedtrack-kind-subtitles>subtitles</a></code> or <code title=dom-TimedTrack-kind-captions><a href=#dom-timedtrack-kind-captions>captions</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code> and
+   the user has indicated an interest in having text descriptions with
+   this <a href=#timed-track-language>timed track language</a> and <a href=#timed-track-label>timed track
+   label</a> enabled, and there is no other <a href=#timed-track>timed
+   track</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of
+   timed tracks</a> with a <a href=#timed-track-kind>timed track kind</a> of <code title=dom-TimedTrack-kind-descriptions><a href=#dom-timedtrack-kind-descriptions>descriptions</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dt>If the <a href=#timed-track-kind>timed track kind</a> is <code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code> and the
+   <a href=#timed-track-language>timed track language</a> is one that the user agent has
+   reason to believe is appropriate for the user, and there is no
+   other <a href=#timed-track>timed track</a> in the <a href=#media-element>media element</a>'s
+   <a href=#list-of-timed-tracks>list of timed tracks</a> with a <a href=#timed-track-kind>timed track
+   kind</a> of <code title=dom-TimedTrack-kind-chapters><a href=#dom-timedtrack-kind-chapters>chapters</a></code> whose
+   <a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-showing title="timed track
+   showing">showing</a></dt>
+
+   <dd>
+    <p>Let the <a href=#timed-track-mode>timed track mode</a> be <a href=#timed-track-showing title="timed
+    track showing">showing</a>.</p>
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+    <p>Let the <a href=#timed-track-mode>timed track mode</a> be <a href=#timed-track-disabled title="timed
+    track disabled">disabled</a>.</p>
+   </dd>
+
+  </dl><p>When a <a href=#timed-track>timed track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is created with <a href=#timed-track-mode>timed track
   mode</a> set to <a href=#timed-track-hidden title="timed track hidden">hidden</a> or
   <a href=#timed-track-showing title="timed track showing">showing</a>, and when a
@@ -26301,8 +26361,11 @@
   changes its <a href=#timed-track-mode>timed track mode</a> to <a href=#timed-track-hidden title="timed
   track hidden">hidden</a> or <a href=#timed-track-showing title="timed track
   showing">showing</a> for the first time, the user agent must
-  immediately and synchronously run the 
-  following steps:</p>
+  immediately and synchronously run the following algorithm. This
+  algorithm interacts closely with the <a href=#event-loop>event loop</a>
+  mechanism; in particular, it has a <a href=#synchronous-section>synchronous section</a>
+  (which is triggered as part of the <a href=#event-loop>event loop</a>
+  algorithm). The step in that section is marked with ⌛.</p>
 
   <ol><li><p>Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to <a href=#timed-track-loading title="timed track loading">loading</a>.</li>
 
@@ -26325,9 +26388,17 @@
     <p>The <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue
     a task">queued</a> by the <a href=#fetch title=fetch>fetching
     algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
-    process the data as it is being fetched must <span class=XXX>...this is where cross-origin checks go</span>.</p>
+    process the data as it is being fetched must run the following
+    steps:</p>
 
-    <p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
+    <ol><li><p><span class=XXX>...this is where cross-origin checks
+     go...</span></li>
+
+     <li><p class=XXX>determine format...</li>
+
+     <li><p class=XXX>hand off to appropriate parser...</li>
+
+    </ol><p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
     any reason (network error, the server returns an error code, the
     cross-origin checks mentioned above fail, etc), or if <var title="">URL</var> is the empty string, then <a href=#queue-a-task>queue a
     task</a> to first change the <a href=#timed-track-readiness-state>timed track readiness state</a>
@@ -26381,6 +26452,24 @@
    hidden">hidden</a> or <a href=#timed-track-showing title="timed track
    showing">showing</a>.</li>
 
+   <li><p>Wait until the <a href=#timed-track-readiness-state>timed track readiness state</a> is
+   no longer set to <a href=#timed-track-loading title="timed track
+   loading">loading</a>.</li>
+
+   <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous
+   section</a> consists of the following step. (The step in the
+   <a href=#synchronous-section>synchronous section</a> is marked with ⌛.)</li>
+
+   <li><p>⌛ Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to
+   <a href=#timed-track-loading title="timed track loading">loading</a>.</li>
+
+   <!-- if you add more, change the grammar of the sentences above to
+   be plural with respect to the number of synchronous steps (both in
+   the step above and in the intro to the whole algorithm) -->
+
+   <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
+   remaining steps asynchronously.</li>
+
    <li><p>Jump to the step labeled <i>download</i>.</li>
 
   </ol></div>

Modified: source
===================================================================
--- source	2010-06-24 06:51:45 UTC (rev 5109)
+++ source	2010-06-24 22:05:12 UTC (rev 5110)
@@ -66,7 +66,7 @@
    wanting the examples to be quite so brutally honest, as documented
    in <a
    href="http://lists.w3.org/Archives/Public/public-html/2010Jun/0562.html">this
-   working group decision from June 2010</a>.</p>
+   working group decision from June 2010</a>.</li>
 
    <li>The W3C version omits a paragraph of implementation advice
    because of <a
@@ -28238,10 +28238,10 @@
     timed track</span> can change dynamically, either because the
     <span>timed track</span> has <span title="timed track not
     loaded">not yet been loaded</span> or is still <span title="timed
-    track loading">loading</span>, or in the case of a <span>timed
-    track</span> corresponding to a <code>MutableTimedTrack</code>
-    object, where individual cues can be added or removed
-    dynamically using the API.</p>
+    track loading">loading</span>, or because the the <span>timed
+    track</span> corresponds to a <code>MutableTimedTrack</code>
+    object, whose API allows individual cues can be added or removed
+    dynamically.</p>
 
    </dd>
 
@@ -28250,6 +28250,19 @@
   <p>Each <span>timed track</span> has a corresponding
   <code>TimedTrack</code> object.</p>
 
+  <p>The <span title="timed track">timed tracks</span> of a
+  <span>media element</span> are <dfn title="the timed tracks are
+  ready">ready</dfn> if all the <span title="timed track">timed
+  tracks</span> whose <span title="timed track mode">mode</span> was
+  not in the <span title="timed track disabled">disabled</span> state
+  when the element's <span
+  title="concept-media-load-algorithm">resource selection
+  algorithm</span> last started now have a <span>timed track readiness
+  state</span> of <span title="timed track loaded">loaded</span> or
+  <span title="timed track failed to load">failed to load</span>.</p>
+
+  <hr>
+
   <p>A <dfn>timed track cue</dfn> is the unit of time-sensitive data
   in a <span>timed track</span>, corresponding for instance for
   subtitles and captions to the text that appears at a particular time
@@ -28296,6 +28309,22 @@
     line extends vertically and is positioned horizontally, with
     consecutive lines displayed to the left of each other<!-- used for
     mongolian -->).</p>
+
+    <p>If the <span title="timed track cue writing direction">writing
+    direction</span> is <span title="timed track cue horizontal
+    writing direction">horizontal</span>, then <span title="timed
+    track cue line position">line position</span> percentages are
+    relative to the height of the video, and <span title="timed track
+    cue text position">text position</span> and <span title="timed
+    track cue size">size</span> percentages are relative to the width
+    of the video.</p>
+
+    <p>Otherwise, <span title="timed track cue line position">line
+    position</span> percentages are relative to the width of the
+    video, and <span title="timed track cue text position">text
+    position</span> and <span title="timed track cue size">size</span>
+    percentages are relative to the height of the video.</p>
+
    </dd>
 
    <dt><dfn title="timed track cue snap-to-lines flag">A snap-to-lines flag</dfn>
@@ -28367,18 +28396,7 @@
   cue</span> is associated with a particular <span>timed track</span>,
   the association is permanent.</p>
 
-  <p>The <span title="timed track">timed tracks</span> of a
-  <span>media element</span> are <dfn title="the timed tracks are
-  ready">ready</dfn> if all the <span title="timed track">timed
-  tracks</span> whose <span title="timed track mode">mode</span> was
-  not in the <span title="timed track disabled">disabled</span> state
-  when the element's <span
-  title="concept-media-load-algorithm">resource selection
-  algorithm</span> last started now have a <span>timed track readiness
-  state</span> of <span title="timed track loaded">loaded</span> or
-  <span title="timed track failed to load">failed to load</span>.</p>
 
-
   <h6>Sourcing in-band timed tracks</h6>
 
   <p>A <dfn>media-resource-specific timed track</dfn> is a <span>timed
@@ -28461,8 +28479,9 @@
   <h6>Sourcing out-of-band timed tracks</h6>
 
   <p>When a <code>track</code> element is created, it must be
-  associated with a new <span>timed track</span> and its corresponding
-  new <code>TimedTrack</code> object.</p>
+  associated with a new <span>timed track</span> (with its value set
+  as defined below) and its corresponding new <code>TimedTrack</code>
+  object.</p>
 
   <p>The <span>timed track kind</span> is determined from the state of
   the element's <code title="attr-track-kind">kind</code> attribute
@@ -28509,25 +28528,79 @@
   <p class="note">Changes to the <span>track URL</span> are handled in
   the algorithm below.</p>
 
-  <p class="XXX">...cues...</p>
+  <p>The <span>timed track list of cues</span> is initially empty. It
+  is dynamically modified when the referenced file is parsed.</p>
 
   <p>When a <code>track</code> element's parent element changes and
-  the new parent is a <span>media element</span>, then add the
-  <code>track</code> element's corresponding <span>timed track</span>
-  to the <span>media element</span>'s <span>list of timed
+  the new parent is a <span>media element</span>, then the user agent
+  must add the <code>track</code> element's corresponding <span>timed
+  track</span> to the <span>media element</span>'s <span>list of timed
   tracks</span>.</p>
 
   <p>When a <code>track</code> element's parent element changes and
-  the old parent was a <span>media element</span>, then remove the
-  <code>track</code> element's corresponding <span>timed track</span>
-  from the <span>media element</span>'s <span>list of timed
-  tracks</span>.</p>
+  the old parent was a <span>media element</span>, then the user agent
+  must remove the <code>track</code> element's corresponding
+  <span>timed track</span> from the <span>media element</span>'s
+  <span>list of timed tracks</span>.</p>
 
   <p>When a <span>timed track</span> corresponding to a
   <code>track</code> element is added to a <span>media
-  element</span>'s <span>list of timed tracks</span>, <span
-  class="XXX">update the mode appropriately</span>.</p>
+  element</span>'s <span>list of timed tracks</span>, the user agent
+  must set the <span>timed track mode</span> appropriately, as
+  determined by the following conditions:</p>
 
+  <dl class="switch">
+
+   <dt>If the <span>timed track kind</span> is <code
+   title="dom-TimedTrack-kind-subtitles">subtitles</code> or <code
+   title="dom-TimedTrack-kind-captions">captions</code> and the user
+   has indicated an interest in having a track with this <span>timed
+   track kind</span>, <span>timed track language</span>, and
+   <span>timed track label</span> enabled, and there is no other
+   <span>timed track</span> in the <span>media element</span>'s
+   <span>list of timed tracks</span> with a <span>timed track
+   kind</span> of either <code
+   title="dom-TimedTrack-kind-subtitles">subtitles</code> or <code
+   title="dom-TimedTrack-kind-captions">captions</code> whose
+   <span>timed track mode</span> is <span title="timed track
+   showing">showing</span></dt>
+
+   <dt>If the <span>timed track kind</span> is <code
+   title="dom-TimedTrack-kind-descriptions">descriptions</code> and
+   the user has indicated an interest in having text descriptions with
+   this <span>timed track language</span> and <span>timed track
+   label</span> enabled, and there is no other <span>timed
+   track</span> in the <span>media element</span>'s <span>list of
+   timed tracks</span> with a <span>timed track kind</span> of <code
+   title="dom-TimedTrack-kind-descriptions">descriptions</code> whose
+   <span>timed track mode</span> is <span title="timed track
+   showing">showing</span></dt>
+
+   <dt>If the <span>timed track kind</span> is <code
+   title="dom-TimedTrack-kind-chapters">chapters</code> and the
+   <span>timed track language</span> is one that the user agent has
+   reason to believe is appropriate for the user, and there is no
+   other <span>timed track</span> in the <span>media element</span>'s
+   <span>list of timed tracks</span> with a <span>timed track
+   kind</span> of <code
+   title="dom-TimedTrack-kind-chapters">chapters</code> whose
+   <span>timed track mode</span> is <span title="timed track
+   showing">showing</span></dt>
+
+   <dd>
+    <p>Let the <span>timed track mode</span> be <span title="timed
+    track showing">showing</span>.</p>
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+    <p>Let the <span>timed track mode</span> be <span title="timed
+    track disabled">disabled</span>.</p>
+   </dd>
+
+  </dl>
+
   <p>When a <span>timed track</span> corresponding to a
   <code>track</code> element is created with <span>timed track
   mode</span> set to <span title="timed track hidden">hidden</span> or
@@ -28538,8 +28611,11 @@
   changes its <span>timed track mode</span> to <span title="timed
   track hidden">hidden</span> or <span title="timed track
   showing">showing</span> for the first time, the user agent must
-  immediately and synchronously run the 
-  following steps:</p>
+  immediately and synchronously run the following algorithm. This
+  algorithm interacts closely with the <span>event loop</span>
+  mechanism; in particular, it has a <span>synchronous section</span>
+  (which is triggered as part of the <span>event loop</span>
+  algorithm). The step in that section is marked with &#x231B;.</p>
 
   <ol>
 
@@ -28565,9 +28641,20 @@
     <p>The <span title="concept-task">tasks</span> <span title="queue
     a task">queued</span> by the <span title="fetch">fetching
     algorithm</span> on the <span>networking task source</span> to
-    process the data as it is being fetched must <span
-    class="XXX">...this is where cross-origin checks go</span>.</p>
+    process the data as it is being fetched must run the following
+    steps:</p>
 
+    <ol>
+
+     <li><p><span class="XXX">...this is where cross-origin checks
+     go...</span></p></li>
+
+     <li><p class="XXX">determine format...</p></li>
+
+     <li><p class="XXX">hand off to appropriate parser...</p></li>
+
+    </ol>
+
     <p>If the <span title="fetch">fetching algorithm</span> fails for
     any reason (network error, the server returns an error code, the
     cross-origin checks mentioned above fail, etc), or if <var
@@ -28636,6 +28723,24 @@
    hidden">hidden</span> or <span title="timed track
    showing">showing</span>.</p></li>
 
+   <li><p>Wait until the <span>timed track readiness state</span> is
+   no longer set to <span title="timed track
+   loading">loading</span>.</p></li>
+
+   <li><p><span>Await a stable state</span>. The <span>synchronous
+   section</span> consists of the following step. (The step in the
+   <span>synchronous section</span> is marked with &#x231B;.)</p></li>
+
+   <li><p>&#x231B; Set the <span>timed track readiness state</span> to
+   <span title="timed track loading">loading</span>.</p></li>
+
+   <!-- if you add more, change the grammar of the sentences above to
+   be plural with respect to the number of synchronous steps (both in
+   the step above and in the intro to the whole algorithm) -->
+
+   <li><p>End the <span>synchronous section</span>, continuing the
+   remaining steps asynchronously.</p></li>
+
    <li><p>Jump to the step labeled <i>download</i>.</p></li>
 
   </ol>




More information about the Commit-Watchers mailing list