[html5] r7326 - [giow] (1) <track> loading algorithm updates (part 1) Affected topics: Video Tex [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Sep 7 14:52:28 PDT 2012


Author: ianh
Date: 2012-09-07 14:52:27 -0700 (Fri, 07 Sep 2012)
New Revision: 7326

Modified:
   complete.html
   index
   source
Log:
[giow] (1) <track> loading algorithm updates (part 1)
Affected topics: Video Text Tracks, Video and Audio

Modified: complete.html
===================================================================
--- complete.html	2012-09-07 04:07:48 UTC (rev 7325)
+++ complete.html	2012-09-07 21:52:27 UTC (rev 7326)
@@ -33513,7 +33513,7 @@
 
   <p><dfn>Ducking</dfn> is the process of reducing the volume of one
   audio track when another audio track is playing, for example
-  occasionally reducing the volume of a the soundtrack to allow the
+  occasionally reducing the volume of a soundtrack to allow the
   viewer to hear an intermittent commentary track.</p>
 
   (add an "autoduck" attribute that reduces the volume of other media
@@ -34056,6 +34056,10 @@
    label in that data, then the <a href=#text-track-label title="text track
    label">label</a> must be set to the empty string.</li>
 
+   <li><p>Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
+   <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>
+   appropriate for the format in question.</p>
+
    <li>
 
     <p>If the new <a href=#text-track>text track</a>'s <a href=#text-track-kind title="text track
@@ -34140,15 +34144,12 @@
    to load the whole media file just to start playing the first
    frame... -->
 
+   <!-- XXX-MODE-HEURISTIC -->
    <li><p>Set the new <a href=#text-track>text track</a>'s <a href=#text-track-mode title="text
    track mode">mode</a> to the mode consistent with the user's
    preferences and the requirements of the relevant specification for
    the data.</li>
 
-   <li><p>Leave the <a href=#text-track-list-of-cues>text track list of cues</a> empty, and
-   associate with it the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
-   rendering</a> appropriate for the format in question.</p>
-
    <li><p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media
    element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</li>
 
@@ -34326,34 +34327,36 @@
   </dl><p>When a <a href=#text-track>text track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is created with <a href=#text-track-mode>text track
   mode</a> set to <a href=#text-track-hidden title="text track hidden">hidden</a>,
-  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a>,
-  and when a <a href=#text-track>text track</a> corresponding to a
-  <code><a href=#the-track-element>track</a></code> element is created with <a href=#text-track-mode>text track
-  mode</a> set to <a href=#text-track-disabled title="text track
-  disabled">disabled</a> and subsequently changes its <a href=#text-track-mode>text
-  track mode</a> to <a href=#text-track-hidden title="text track hidden">hidden</a>,
-  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> for
-  the first time, the user agent must 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>
+  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a>, and
+  when a <a href=#text-track>text track</a> corresponding to a <code><a href=#the-track-element>track</a></code>
+  element is created with <a href=#text-track-mode>text track mode</a> set to <a href=#text-track-disabled title="text track disabled">disabled</a> and subsequently changes
+  its <a href=#text-track-mode>text track mode</a> to <a href=#text-track-hidden title="text track
+  hidden">hidden</a>, <a href=#text-track-showing title="text track
+  showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+  default">showing by default</a> for the first time, the user
+  agent must asynchronously 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 steps in that section are marked with
+  ⌛.</p>
 
-  <ol><li><p>Set the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-loading title="text track loading">loading</a>.</li>
+  <ol><li><p><i>Top</i>: <a href=#await-a-stable-state>Await a stable state</a>. The
+   <a href=#synchronous-section>synchronous section</a> consists of the following steps.
+   (The steps in the <a href=#synchronous-section>synchronous section</a> are marked with
+   ⌛.)</li>
 
-   <li><p>Let <var title="">URL</var> be the <a href=#track-url>track URL</a> of
-   the <code><a href=#the-track-element>track</a></code> element.</li>
+   <li><p>⌛ Set the <a href=#text-track-readiness-state>text track readiness state</a> to
+   <a href=#text-track-loading title="text track loading">loading</a>.</li>
 
-   <li><p>Asynchronously run the remaining steps, while continuing
-   with whatever task was responsible for creating the <a href=#text-track>text
-   track</a> or changing the <a href=#text-track-mode>text track
-   mode</a>.</li>
+   <li><p>⌛ Let <var title="">URL</var> be the <a href=#track-url>track
+   URL</a> of the <code><a href=#the-track-element>track</a></code> element.</li>
 
+   <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
+   remaining steps asynchronously.</li>
+
    <li>
 
-    <p><i>Download</i>: At this point, the text track is downloaded.</p>
-
     <p>If <var title="">URL</var> is not the empty string, perform a
     <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of <var title="">URL</var>, with the <i>mode</i> being the state of the
     <a href=#media-element>media element</a>'s <code title=attr-media-crossorigin><a href=#attr-media-crossorigin>crossorigin</a></code> content
@@ -34372,14 +34375,20 @@
     algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
     process the data as it is being fetched must <!--<span
     title="Content-Type sniffing">-->determine the <!--sniffed--> type
-    of a the resource<!--</span>-->. If the <!--sniffed--> type of the
+    of the resource<!--</span>-->. If the <!--sniffed--> type of the
     resource is not a supported text track format, the load will fail,
     as described below. Otherwise, the resource's data must be passed
     to the appropriate parser (e.g. the <a href=#webvtt-parser>WebVTT parser</a><!--
     if the file starts with the "<code title="">WEBVTT</code>"
     signature-->) as it is received, with the <a href=#text-track-list-of-cues>text track list of
-    cues</a> being used for that parser's output. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+    cues</a> being used for that parser's output. <a href=#refsWEBVTT>[WEBVTT]</a></p><!-- see also critical block
+    below, and the word "sniffed" in the paragraph after that -->
 
+    <p class=note>The appropriate parser will synchronously (during
+    these <a href=#networking-task-source>networking task source</a> <a href=#concept-task title=concept-task>tasks</a>) and incrementally (as each such
+    task is run with whatever data has been received from the network)
+    update the <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
+
     <p class=critical>This specification does not currently say
     whether or how to check the MIME types of text tracks, or whether
     or how to perform file type sniffing using the actual file data.
@@ -34396,15 +34405,29 @@
     <p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
     any reason (network error, the server returns an error code, a
     cross-origin check fails, etc), if <var title="">URL</var> is the
-    empty string, or if the sniffed type of the resource is not a
-    supported text track format, then <a href=#queue-a-task>queue a task</a> to
-    first change the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to load">failed to load</a> and then
-    <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-track-element>track</a></code>
-    element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
-    task">queued</a>, move on to the step below labeled
-    <i>monitoring</i>.</p>
+    empty string, or if the <!--sniffed--> type of the resource is not a
+    supported text track format, then run these steps:
 
-    <p>If the <a href=#fetch title=fetch>fetching algorithm</a> does not
+    <ol><li><p><a href=#queue-a-task>Queue a task</a> to first change the <a href=#text-track-readiness-state>text
+     track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to
+     load">failed to load</a> and then <a href=#fire-a-simple-event>fire a simple
+     event</a> named <code title=event-error>error</code> at the
+     <code><a href=#the-track-element>track</a></code> element.</li>
+
+     <li><p>Wait until the <a href=#text-track-readiness-state>text track readiness state</a> is
+     no longer set to <a href=#text-track-loading title="text track
+     loading">loading</a>.</li>
+
+     <li><p>Wait until the <a href=#track-url>track URL</a> is no longer equal
+     to <var title="">URL</var>, at the same time as the <a href=#text-track-mode>text
+     track mode</a> is set to <a href=#text-track-hidden title="text track
+     hidden">hidden</a>, <a href=#text-track-showing title="text track
+     showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+     default">showing by default</a>.</li>
+
+     <li><p>Jump to the step labeled <i>top</i>.</li>
+
+    </ol><p>If the <a href=#fetch title=fetch>fetching algorithm</a> does not
     fail, then the final <a href=#concept-task title=concept-task>task</a> that
     is <a href=#queue-a-task title="queue a task">queued</a> by the
     <a href=#networking-task-source>networking task source</a> must run the following
@@ -34419,17 +34442,24 @@
       event</a> named <code title=event-load>load</code> at the
       <code><a href=#the-track-element>track</a></code> element.</p>
 
-      <p>If the file was not successfully processed, e.g. the format
-      in question is an XML format and the file contained a
+      <p>Otherwise, the file was not successfully processed (e.g. the
+      format in question is an XML format and the file contained a
       well-formedness error that the XML specification requires be
-      detected and reported to the application, then <a href=#fire-a-simple-event>fire a
-      simple event</a> named <code title=event-error>error</code>
-      at the <code><a href=#the-track-element>track</a></code> element.</p>
+      detected and reported to the application); <a href=#fire-a-simple-event>fire a simple
+      event</a> named <code title=event-error>error</code> at the
+      <code><a href=#the-track-element>track</a></code> element.</p>
 
      </li>
 
-     <li><p>Jump to the step below labeled <i>monitoring</i>.</li>
+     <li><p>Wait until the <a href=#track-url>track URL</a> is no longer equal
+     to <var title="">URL</var>, at the same time as the <a href=#text-track-mode>text
+     track mode</a> is set to <a href=#text-track-hidden title="text track
+     hidden">hidden</a>, <a href=#text-track-showing title="text track
+     showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+     default">showing by default</a>.</li>
 
+     <li><p>Jump back to the step labeled <i>top</i>.</li>
+
     </ol><p>If, while the <a href=#fetch title=fetch>fetching algorithm</a> is
     active, either:</p>
 
@@ -34449,49 +34479,26 @@
 
     <ol><li><p>Abort the <a href=#fetch title=fetch>fetching algorithm</a>,
      discarding any pending <a href=#concept-task title=concept-task>tasks</a>
-     generated by that algorithm.</li>
+     generated by that algorithm (and in particular, not adding any
+     cues to the <a href=#text-track-list-of-cues>text track list of cues</a> after the moment
+     the URL changed).</li>
 
-     <li><p>Let <var title="">URL</var> be the new <a href=#track-url>track
-     URL</a>.</li>
+     <li><p>Jump back to the step labeled <i>top</i>.</li>
 
-     <li><p>Jump back to the top of the step labeled
-     <i>download</i>.</li>
-
     </ol><p>Until one of the above circumstances occurs, the user agent
     must remain on this step.</p>
 
    </li>
 
-   <li><p><i>Monitoring</i>: Wait until the <a href=#track-url>track URL</a> is
-   no longer equal to <var title="">URL</var>, at the same time as the
-   <a href=#text-track-mode>text track mode</a> is set to <a href=#text-track-hidden title="text track
-   hidden">hidden</a>, <a href=#text-track-showing title="text track
-   showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
-   default">showing by default</a>.</li>
+  </ol><p>Whenever a <code><a href=#the-track-element>track</a></code> element has its <code title=attr-track-src><a href=#attr-track-src>src</a></code> attribute set, changed, or
+  removed, the user agent must synchronously empty the element's
+  <a href=#text-track>text track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>.
+  (This also causes the algorithm above to stop adding cues from the
+  resource being obtained using the previously given URL, if any.)</p>
 
-   <li><p>Wait until the <a href=#text-track-readiness-state>text track readiness state</a> is
-   no longer set to <a href=#text-track-loading title="text track
-   loading">loading</a>.</li>
+  </div>
 
-   <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=#text-track-readiness-state>text track readiness state</a> to
-   <a href=#text-track-loading title="text 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>
-
-
   <div class=impl>
 
   <h6 id=guidelines-for-exposing-cues-in-various-formats-as-text-track-cues><span class=secno>4.8.10.12.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
@@ -34715,7 +34722,7 @@
   <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
   represents.</p>
 
-  <p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType>inBandMetadataTrackDispatchType<code></code></dfn>
+  <p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType><code>inBandMetadataTrackDispatchType</code></dfn>
   attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track
   dispatch type</a> of the <a href=#text-track>text track</a> that the
   <code><a href=#texttrack>TextTrack</a></code> object represents.</p>

Modified: index
===================================================================
--- index	2012-09-07 04:07:48 UTC (rev 7325)
+++ index	2012-09-07 21:52:27 UTC (rev 7326)
@@ -33513,7 +33513,7 @@
 
   <p><dfn>Ducking</dfn> is the process of reducing the volume of one
   audio track when another audio track is playing, for example
-  occasionally reducing the volume of a the soundtrack to allow the
+  occasionally reducing the volume of a soundtrack to allow the
   viewer to hear an intermittent commentary track.</p>
 
   (add an "autoduck" attribute that reduces the volume of other media
@@ -34056,6 +34056,10 @@
    label in that data, then the <a href=#text-track-label title="text track
    label">label</a> must be set to the empty string.</li>
 
+   <li><p>Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
+   <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>
+   appropriate for the format in question.</p>
+
    <li>
 
     <p>If the new <a href=#text-track>text track</a>'s <a href=#text-track-kind title="text track
@@ -34140,15 +34144,12 @@
    to load the whole media file just to start playing the first
    frame... -->
 
+   <!-- XXX-MODE-HEURISTIC -->
    <li><p>Set the new <a href=#text-track>text track</a>'s <a href=#text-track-mode title="text
    track mode">mode</a> to the mode consistent with the user's
    preferences and the requirements of the relevant specification for
    the data.</li>
 
-   <li><p>Leave the <a href=#text-track-list-of-cues>text track list of cues</a> empty, and
-   associate with it the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
-   rendering</a> appropriate for the format in question.</p>
-
    <li><p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media
    element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</li>
 
@@ -34326,34 +34327,36 @@
   </dl><p>When a <a href=#text-track>text track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is created with <a href=#text-track-mode>text track
   mode</a> set to <a href=#text-track-hidden title="text track hidden">hidden</a>,
-  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a>,
-  and when a <a href=#text-track>text track</a> corresponding to a
-  <code><a href=#the-track-element>track</a></code> element is created with <a href=#text-track-mode>text track
-  mode</a> set to <a href=#text-track-disabled title="text track
-  disabled">disabled</a> and subsequently changes its <a href=#text-track-mode>text
-  track mode</a> to <a href=#text-track-hidden title="text track hidden">hidden</a>,
-  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> for
-  the first time, the user agent must 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>
+  <a href=#text-track-showing title="text track showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a>, and
+  when a <a href=#text-track>text track</a> corresponding to a <code><a href=#the-track-element>track</a></code>
+  element is created with <a href=#text-track-mode>text track mode</a> set to <a href=#text-track-disabled title="text track disabled">disabled</a> and subsequently changes
+  its <a href=#text-track-mode>text track mode</a> to <a href=#text-track-hidden title="text track
+  hidden">hidden</a>, <a href=#text-track-showing title="text track
+  showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+  default">showing by default</a> for the first time, the user
+  agent must asynchronously 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 steps in that section are marked with
+  ⌛.</p>
 
-  <ol><li><p>Set the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-loading title="text track loading">loading</a>.</li>
+  <ol><li><p><i>Top</i>: <a href=#await-a-stable-state>Await a stable state</a>. The
+   <a href=#synchronous-section>synchronous section</a> consists of the following steps.
+   (The steps in the <a href=#synchronous-section>synchronous section</a> are marked with
+   ⌛.)</li>
 
-   <li><p>Let <var title="">URL</var> be the <a href=#track-url>track URL</a> of
-   the <code><a href=#the-track-element>track</a></code> element.</li>
+   <li><p>⌛ Set the <a href=#text-track-readiness-state>text track readiness state</a> to
+   <a href=#text-track-loading title="text track loading">loading</a>.</li>
 
-   <li><p>Asynchronously run the remaining steps, while continuing
-   with whatever task was responsible for creating the <a href=#text-track>text
-   track</a> or changing the <a href=#text-track-mode>text track
-   mode</a>.</li>
+   <li><p>⌛ Let <var title="">URL</var> be the <a href=#track-url>track
+   URL</a> of the <code><a href=#the-track-element>track</a></code> element.</li>
 
+   <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
+   remaining steps asynchronously.</li>
+
    <li>
 
-    <p><i>Download</i>: At this point, the text track is downloaded.</p>
-
     <p>If <var title="">URL</var> is not the empty string, perform a
     <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of <var title="">URL</var>, with the <i>mode</i> being the state of the
     <a href=#media-element>media element</a>'s <code title=attr-media-crossorigin><a href=#attr-media-crossorigin>crossorigin</a></code> content
@@ -34372,14 +34375,20 @@
     algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
     process the data as it is being fetched must <!--<span
     title="Content-Type sniffing">-->determine the <!--sniffed--> type
-    of a the resource<!--</span>-->. If the <!--sniffed--> type of the
+    of the resource<!--</span>-->. If the <!--sniffed--> type of the
     resource is not a supported text track format, the load will fail,
     as described below. Otherwise, the resource's data must be passed
     to the appropriate parser (e.g. the <a href=#webvtt-parser>WebVTT parser</a><!--
     if the file starts with the "<code title="">WEBVTT</code>"
     signature-->) as it is received, with the <a href=#text-track-list-of-cues>text track list of
-    cues</a> being used for that parser's output. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+    cues</a> being used for that parser's output. <a href=#refsWEBVTT>[WEBVTT]</a></p><!-- see also critical block
+    below, and the word "sniffed" in the paragraph after that -->
 
+    <p class=note>The appropriate parser will synchronously (during
+    these <a href=#networking-task-source>networking task source</a> <a href=#concept-task title=concept-task>tasks</a>) and incrementally (as each such
+    task is run with whatever data has been received from the network)
+    update the <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
+
     <p class=critical>This specification does not currently say
     whether or how to check the MIME types of text tracks, or whether
     or how to perform file type sniffing using the actual file data.
@@ -34396,15 +34405,29 @@
     <p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
     any reason (network error, the server returns an error code, a
     cross-origin check fails, etc), if <var title="">URL</var> is the
-    empty string, or if the sniffed type of the resource is not a
-    supported text track format, then <a href=#queue-a-task>queue a task</a> to
-    first change the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to load">failed to load</a> and then
-    <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-track-element>track</a></code>
-    element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
-    task">queued</a>, move on to the step below labeled
-    <i>monitoring</i>.</p>
+    empty string, or if the <!--sniffed--> type of the resource is not a
+    supported text track format, then run these steps:
 
-    <p>If the <a href=#fetch title=fetch>fetching algorithm</a> does not
+    <ol><li><p><a href=#queue-a-task>Queue a task</a> to first change the <a href=#text-track-readiness-state>text
+     track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to
+     load">failed to load</a> and then <a href=#fire-a-simple-event>fire a simple
+     event</a> named <code title=event-error>error</code> at the
+     <code><a href=#the-track-element>track</a></code> element.</li>
+
+     <li><p>Wait until the <a href=#text-track-readiness-state>text track readiness state</a> is
+     no longer set to <a href=#text-track-loading title="text track
+     loading">loading</a>.</li>
+
+     <li><p>Wait until the <a href=#track-url>track URL</a> is no longer equal
+     to <var title="">URL</var>, at the same time as the <a href=#text-track-mode>text
+     track mode</a> is set to <a href=#text-track-hidden title="text track
+     hidden">hidden</a>, <a href=#text-track-showing title="text track
+     showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+     default">showing by default</a>.</li>
+
+     <li><p>Jump to the step labeled <i>top</i>.</li>
+
+    </ol><p>If the <a href=#fetch title=fetch>fetching algorithm</a> does not
     fail, then the final <a href=#concept-task title=concept-task>task</a> that
     is <a href=#queue-a-task title="queue a task">queued</a> by the
     <a href=#networking-task-source>networking task source</a> must run the following
@@ -34419,17 +34442,24 @@
       event</a> named <code title=event-load>load</code> at the
       <code><a href=#the-track-element>track</a></code> element.</p>
 
-      <p>If the file was not successfully processed, e.g. the format
-      in question is an XML format and the file contained a
+      <p>Otherwise, the file was not successfully processed (e.g. the
+      format in question is an XML format and the file contained a
       well-formedness error that the XML specification requires be
-      detected and reported to the application, then <a href=#fire-a-simple-event>fire a
-      simple event</a> named <code title=event-error>error</code>
-      at the <code><a href=#the-track-element>track</a></code> element.</p>
+      detected and reported to the application); <a href=#fire-a-simple-event>fire a simple
+      event</a> named <code title=event-error>error</code> at the
+      <code><a href=#the-track-element>track</a></code> element.</p>
 
      </li>
 
-     <li><p>Jump to the step below labeled <i>monitoring</i>.</li>
+     <li><p>Wait until the <a href=#track-url>track URL</a> is no longer equal
+     to <var title="">URL</var>, at the same time as the <a href=#text-track-mode>text
+     track mode</a> is set to <a href=#text-track-hidden title="text track
+     hidden">hidden</a>, <a href=#text-track-showing title="text track
+     showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
+     default">showing by default</a>.</li>
 
+     <li><p>Jump back to the step labeled <i>top</i>.</li>
+
     </ol><p>If, while the <a href=#fetch title=fetch>fetching algorithm</a> is
     active, either:</p>
 
@@ -34449,49 +34479,26 @@
 
     <ol><li><p>Abort the <a href=#fetch title=fetch>fetching algorithm</a>,
      discarding any pending <a href=#concept-task title=concept-task>tasks</a>
-     generated by that algorithm.</li>
+     generated by that algorithm (and in particular, not adding any
+     cues to the <a href=#text-track-list-of-cues>text track list of cues</a> after the moment
+     the URL changed).</li>
 
-     <li><p>Let <var title="">URL</var> be the new <a href=#track-url>track
-     URL</a>.</li>
+     <li><p>Jump back to the step labeled <i>top</i>.</li>
 
-     <li><p>Jump back to the top of the step labeled
-     <i>download</i>.</li>
-
     </ol><p>Until one of the above circumstances occurs, the user agent
     must remain on this step.</p>
 
    </li>
 
-   <li><p><i>Monitoring</i>: Wait until the <a href=#track-url>track URL</a> is
-   no longer equal to <var title="">URL</var>, at the same time as the
-   <a href=#text-track-mode>text track mode</a> is set to <a href=#text-track-hidden title="text track
-   hidden">hidden</a>, <a href=#text-track-showing title="text track
-   showing">showing</a>, or <a href=#text-track-showing-by-default title="text track showing by
-   default">showing by default</a>.</li>
+  </ol><p>Whenever a <code><a href=#the-track-element>track</a></code> element has its <code title=attr-track-src><a href=#attr-track-src>src</a></code> attribute set, changed, or
+  removed, the user agent must synchronously empty the element's
+  <a href=#text-track>text track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>.
+  (This also causes the algorithm above to stop adding cues from the
+  resource being obtained using the previously given URL, if any.)</p>
 
-   <li><p>Wait until the <a href=#text-track-readiness-state>text track readiness state</a> is
-   no longer set to <a href=#text-track-loading title="text track
-   loading">loading</a>.</li>
+  </div>
 
-   <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=#text-track-readiness-state>text track readiness state</a> to
-   <a href=#text-track-loading title="text 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>
-
-
   <div class=impl>
 
   <h6 id=guidelines-for-exposing-cues-in-various-formats-as-text-track-cues><span class=secno>4.8.10.12.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
@@ -34715,7 +34722,7 @@
   <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
   represents.</p>
 
-  <p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType>inBandMetadataTrackDispatchType<code></code></dfn>
+  <p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType><code>inBandMetadataTrackDispatchType</code></dfn>
   attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track
   dispatch type</a> of the <a href=#text-track>text track</a> that the
   <code><a href=#texttrack>TextTrack</a></code> object represents.</p>

Modified: source
===================================================================
--- source	2012-09-07 04:07:48 UTC (rev 7325)
+++ source	2012-09-07 21:52:27 UTC (rev 7326)
@@ -36693,7 +36693,7 @@
 
   <p><dfn>Ducking</dfn> is the process of reducing the volume of one
   audio track when another audio track is playing, for example
-  occasionally reducing the volume of a the soundtrack to allow the
+  occasionally reducing the volume of a soundtrack to allow the
   viewer to hear an intermittent commentary track.</p>
 
   (add an "autoduck" attribute that reduces the volume of other media
@@ -37293,6 +37293,10 @@
    label in that data, then the <span title="text track
    label">label</span> must be set to the empty string.</p></li>
 
+   <li><p>Associate the <span>text track list of cues</span> with the
+   <span>rules for updating the text track rendering</span>
+   appropriate for the format in question.</p>
+
    <li>
 
     <p>If the new <span>text track</span>'s <span title="text track
@@ -37392,15 +37396,12 @@
    to load the whole media file just to start playing the first
    frame... -->
 
+   <!-- XXX-MODE-HEURISTIC -->
    <li><p>Set the new <span>text track</span>'s <span title="text
    track mode">mode</span> to the mode consistent with the user's
    preferences and the requirements of the relevant specification for
    the data.</p></li>
 
-   <li><p>Leave the <span>text track list of cues</span> empty, and
-   associate with it the <span>rules for updating the text track
-   rendering</span> appropriate for the format in question.</p>
-
    <li><p>Add the new <span>text track</span> to the <span>media
    element</span>'s <span>list of text tracks</span>.</p></li>
 
@@ -37613,38 +37614,39 @@
   <code>track</code> element is created with <span>text track
   mode</span> set to <span title="text track hidden">hidden</span>,
   <span title="text track showing">showing</span>, or <span
-  title="text track showing by default">showing by default</span>,
-  and when a <span>text track</span> corresponding to a
-  <code>track</code> element is created with <span>text track
-  mode</span> set to <span title="text track
-  disabled">disabled</span> and subsequently changes its <span>text
-  track mode</span> to <span title="text track hidden">hidden</span>,
-  <span title="text track showing">showing</span>, or <span
-  title="text track showing by default">showing by default</span> for
-  the first time, the user agent must 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>
+  title="text track showing by default">showing by default</span>, and
+  when a <span>text track</span> corresponding to a <code>track</code>
+  element is created with <span>text track mode</span> set to <span
+  title="text track disabled">disabled</span> and subsequently changes
+  its <span>text track mode</span> to <span title="text track
+  hidden">hidden</span>, <span title="text track
+  showing">showing</span>, or <span title="text track showing by
+  default">showing by default</span> for the first time, the user
+  agent must asynchronously 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 steps in that section are marked with
+  &#x231B;.</p>
 
   <ol>
 
-   <li><p>Set the <span>text track readiness state</span> to <span
-   title="text track loading">loading</span>.</p></li>
+   <li><p><i>Top</i>: <span>Await a stable state</span>. The
+   <span>synchronous section</span> consists of the following steps.
+   (The steps in the <span>synchronous section</span> are marked with
+   &#x231B;.)</p></li>
 
-   <li><p>Let <var title="">URL</var> be the <span>track URL</span> of
-   the <code>track</code> element.</p></li>
+   <li><p>&#x231B; Set the <span>text track readiness state</span> to
+   <span title="text track loading">loading</span>.</p></li>
 
-   <li><p>Asynchronously run the remaining steps, while continuing
-   with whatever task was responsible for creating the <span>text
-   track</span> or changing the <span>text track
-   mode</span>.</p></li>
+   <li><p>&#x231B; Let <var title="">URL</var> be the <span>track
+   URL</span> of the <code>track</code> element.</p></li>
 
+   <li><p>End the <span>synchronous section</span>, continuing the
+   remaining steps asynchronously.</p></li>
+
    <li>
 
-    <p><i>Download</i>: At this point, the text track is downloaded.</p>
-
     <p>If <var title="">URL</var> is not the empty string, perform a
     <span>potentially CORS-enabled fetch</span> of <var
     title="">URL</var>, with the <i>mode</i> being the state of the
@@ -37665,14 +37667,22 @@
     algorithm</span> on the <span>networking task source</span> to
     process the data as it is being fetched must <!--<span
     title="Content-Type sniffing">-->determine the <!--sniffed--> type
-    of a the resource<!--</span>-->. If the <!--sniffed--> type of the
+    of the resource<!--</span>-->. If the <!--sniffed--> type of the
     resource is not a supported text track format, the load will fail,
     as described below. Otherwise, the resource's data must be passed
     to the appropriate parser (e.g. the <span>WebVTT parser</span><!--
     if the file starts with the "<code title="">WEBVTT</code>"
     signature-->) as it is received, with the <span>text track list of
-    cues</span> being used for that parser's output. <a href="#refsWEBVTT">[WEBVTT]</a></p>
+    cues</span> being used for that parser's output. <a
+    href="#refsWEBVTT">[WEBVTT]</a></p><!-- see also critical block
+    below, and the word "sniffed" in the paragraph after that -->
 
+    <p class="note">The appropriate parser will synchronously (during
+    these <span>networking task source</span> <span
+    title="concept-task">tasks</span>) and incrementally (as each such
+    task is run with whatever data has been received from the network)
+    update the <span>text track list of cues</span>.</p>
+
     <p class="critical">This specification does not currently say
     whether or how to check the MIME types of text tracks, or whether
     or how to perform file type sniffing using the actual file data.
@@ -37689,17 +37699,32 @@
     <p>If the <span title="fetch">fetching algorithm</span> fails for
     any reason (network error, the server returns an error code, a
     cross-origin check fails, etc), if <var title="">URL</var> is the
-    empty string, or if the sniffed type of the resource is not a
-    supported text track format, then <span>queue a task</span> to
-    first change the <span>text track readiness state</span> to <span
-    title="text track failed to load">failed to load</span> and then
-    <span>fire a simple event</span> named <code
-    title="event-error">error</code> at the <code>track</code>
-    element; and then, once that <span
-    title="concept-task">task</span> is <span title="queue a
-    task">queued</span>, move on to the step below labeled
-    <i>monitoring</i>.</p>
+    empty string, or if the <!--sniffed--> type of the resource is not a
+    supported text track format, then run these steps:
 
+    <ol>
+
+     <li><p><span>Queue a task</span> to first change the <span>text
+     track readiness state</span> to <span title="text track failed to
+     load">failed to load</span> and then <span>fire a simple
+     event</span> named <code title="event-error">error</code> at the
+     <code>track</code> element.</p></li>
+
+     <li><p>Wait until the <span>text track readiness state</span> is
+     no longer set to <span title="text track
+     loading">loading</span>.</p></li>
+
+     <li><p>Wait until the <span>track URL</span> is no longer equal
+     to <var title="">URL</var>, at the same time as the <span>text
+     track mode</span> is set to <span title="text track
+     hidden">hidden</span>, <span title="text track
+     showing">showing</span>, or <span title="text track showing by
+     default">showing by default</span>.</p></li>
+
+     <li><p>Jump to the step labeled <i>top</i>.</p></li>
+
+    </ol>
+
     <p>If the <span title="fetch">fetching algorithm</span> does not
     fail, then the final <span title="concept-task">task</span> that
     is <span title="queue a task">queued</span> by the
@@ -37717,17 +37742,24 @@
       event</span> named <code title="event-load">load</code> at the
       <code>track</code> element.</p>
 
-      <p>If the file was not successfully processed, e.g. the format
-      in question is an XML format and the file contained a
+      <p>Otherwise, the file was not successfully processed (e.g. the
+      format in question is an XML format and the file contained a
       well-formedness error that the XML specification requires be
-      detected and reported to the application, then <span>fire a
-      simple event</span> named <code title="event-error">error</code>
-      at the <code>track</code> element.</p>
+      detected and reported to the application); <span>fire a simple
+      event</span> named <code title="event-error">error</code> at the
+      <code>track</code> element.</p>
 
      </li>
 
-     <li><p>Jump to the step below labeled <i>monitoring</i>.</p></li>
+     <li><p>Wait until the <span>track URL</span> is no longer equal
+     to <var title="">URL</var>, at the same time as the <span>text
+     track mode</span> is set to <span title="text track
+     hidden">hidden</span>, <span title="text track
+     showing">showing</span>, or <span title="text track showing by
+     default">showing by default</span>.</p></li>
 
+     <li><p>Jump back to the step labeled <i>top</i>.</p></li>
+
     </ol>
 
     <p>If, while the <span title="fetch">fetching algorithm</span> is
@@ -37757,14 +37789,12 @@
 
      <li><p>Abort the <span title="fetch">fetching algorithm</span>,
      discarding any pending <span title="concept-task">tasks</span>
-     generated by that algorithm.</p></li>
+     generated by that algorithm (and in particular, not adding any
+     cues to the <span>text track list of cues</span> after the moment
+     the URL changed).</p></li>
 
-     <li><p>Let <var title="">URL</var> be the new <span>track
-     URL</span>.</p></li>
+     <li><p>Jump back to the step labeled <i>top</i>.</p></li>
 
-     <li><p>Jump back to the top of the step labeled
-     <i>download</i>.</p></li>
-
     </ol>
 
     <p>Until one of the above circumstances occurs, the user agent
@@ -37772,35 +37802,15 @@
 
    </li>
 
-   <li><p><i>Monitoring</i>: Wait until the <span>track URL</span> is
-   no longer equal to <var title="">URL</var>, at the same time as the
-   <span>text track mode</span> is set to <span title="text track
-   hidden">hidden</span>, <span title="text track
-   showing">showing</span>, or <span title="text track showing by
-   default">showing by default</span>.</p></li>
+  </ol>
 
-   <li><p>Wait until the <span>text track readiness state</span> is
-   no longer set to <span title="text track
-   loading">loading</span>.</p></li>
+  <p>Whenever a <code>track</code> element has its <code
+  title="attr-track-src">src</code> attribute set, changed, or
+  removed, the user agent must synchronously empty the element's
+  <span>text track</span>'s <span>text track list of cues</span>.
+  (This also causes the algorithm above to stop adding cues from the
+  resource being obtained using the previously given URL, if any.)</p>
 
-   <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>text track readiness state</span> to
-   <span title="text 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>
-
   </div>
 
 
@@ -38049,7 +38059,7 @@
   represents.</p>
 
   <p>The <dfn
-  title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType<code></code></dfn>
+  title="dom-TextTrack-inBandMetadataTrackDispatchType"><code>inBandMetadataTrackDispatchType</code></dfn>
   attribute must return the <span>text track in-band metadata track
   dispatch type</span> of the <span>text track</span> that the
   <code>TextTrack</code> object represents.</p>




More information about the Commit-Watchers mailing list