[html5] r5087 - [giow] (0) Captions - Stage 10: Some work on handle in-band timed tracks and rel [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri May 7 23:38:00 PDT 2010


Author: ianh
Date: 2010-05-07 23:37:59 -0700 (Fri, 07 May 2010)
New Revision: 5087

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 10: Some work on handle in-band timed tracks and related changes.

Modified: complete.html
===================================================================
--- complete.html	2010-05-06 09:58:45 UTC (rev 5086)
+++ complete.html	2010-05-08 06:37:59 UTC (rev 5087)
@@ -186,7 +186,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 6 May 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 8 May 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -532,8 +532,10 @@
          <li><a href=#timed-track-model><span class=secno>4.8.10.10.1 </span>Timed track model</a></li>
          <li><a href=#sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</a></li>
          <li><a href=#sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</a></li>
-         <li><a href=#timed-track-api><span class=secno>4.8.10.10.4 </span>Timed track API</a></li>
-         <li><a href=#cue-events><span class=secno>4.8.10.10.5 </span>Event definitions</a></ol></li>
+         <li><a href=#guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span>Guidelines for exposing cues in various formats as
+  timed track cues</a></li>
+         <li><a href=#timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</a></li>
+         <li><a href=#cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</a></ol></li>
        <li><a href=#websrt><span class=secno>4.8.10.11 </span>WebSRT</a>
         <ol>
          <li><a href=#syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</a></li>
@@ -23572,27 +23574,27 @@
 
   <p>The <dfn id=attr-track-kind title=attr-track-kind><code>kind</code></dfn>
   attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
-  table lists the keywords defined for this attribute. The states
-  given in the first cell of the rows with keywords give the states to
-  which those keywords map.</p>
+  table lists the keywords defined for this attribute. The keyword
+  given in the first cell of each row maps to the state given in the
+  second cell.</p>
 
-  <table><thead><tr><th>State
-     <th>Keywords
+  <table><thead><tr><th>Keywords
+     <th>State
      <th>Brief description
-   <tbody><tr><td><dfn id=attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</dfn>
-     <td><dfn id=attr-track-kind-keyword-subtitles title=attr-track-kind-keyword-subtitles><code>subtitles</code></dfn>
+   <tbody><tr><td><dfn id=attr-track-kind-keyword-subtitles title=attr-track-kind-keyword-subtitles><code>subtitles</code></dfn>
+     <td><dfn id=attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</dfn>
      <td>Translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the <a href=#media-resource>media resource</a>'s soundtrack).
-    <tr><td><dfn id=attr-track-kind-captions title=attr-track-kind-captions>Captions</dfn>
-     <td><dfn id=attr-track-kind-keyword-captions title=attr-track-kind-keyword-captions><code>captions</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-captions title=attr-track-kind-keyword-captions><code>captions</code></dfn>
+     <td><dfn id=attr-track-kind-captions title=attr-track-kind-captions>Captions</dfn>
      <td>Transcription of the dialogue, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). 
-    <tr><td><dfn id=attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</dfn>
-     <td><dfn id=attr-track-kind-keyword-descriptions title=attr-track-kind-keyword-descriptions><code>descriptions</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-descriptions title=attr-track-kind-keyword-descriptions><code>descriptions</code></dfn>
+     <td><dfn id=attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</dfn>
      <td>Textual descriptions of the video component of the <a href=#media-resource>media resource</a>, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen while driving, or because the user is blind).
-    <tr><td><dfn id=attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</dfn>
-     <td><dfn id=attr-track-kind-keyword-chapters title=attr-track-kind-keyword-chapters><code>chapters</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-chapters title=attr-track-kind-keyword-chapters><code>chapters</code></dfn>
+     <td><dfn id=attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</dfn>
      <td>Chapter titles, intended to be used for navigating the <a href=#media-resource>media resource</a>.
-    <tr><td><dfn id=attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</dfn>
-     <td><dfn id=attr-track-kind-keyword-metadata title=attr-track-kind-keyword-metadata><code>metadata</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-metadata title=attr-track-kind-keyword-metadata><code>metadata</code></dfn>
+     <td><dfn id=attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</dfn>
      <td>Tracks intended for use from script.
   </table><p>The attribute may be omitted. The <i>missing value default</i> is
   the <a href=#attr-track-kind-captions title=attr-track-kind-captions>captions</a> state.</p>
@@ -23602,6 +23604,18 @@
   <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially surrounded by
   spaces</a>. This attribute must be present.</p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-src><a href=#attr-track-src>src</a></code>
+  attribute whose value is not the empty string and whose value, when
+  the attribute was set, could be successfully <a href=#resolve-a-url title="resolve a
+  url">resolved</a> relative to the element, then the element's
+  <dfn id=track-url>track URL</dfn> is the resulting <a href=#absolute-url>absolute
+  URL</a>. Otherwise, the element has no <a href=#track-url>track
+  URL</a>.</p>
+
+  </div>
+
   <p>The <dfn id=attr-track-srclang title=attr-track-srclang><code>srclang</code></dfn>
   attribute gives the language of the time track data. The value must
   be a valid BCP 47 language tag. This attribute must be present if
@@ -23609,16 +23623,81 @@
   in the <a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>subtitles</a>
   state. <a href=#refsBCP47>[BCP47]</a></p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attribute whose value is
+  not the empty string, then the element's <dfn id=track-language>track language</dfn>
+  is the value of the attribute. Otherwise, the element has no
+  <a href=#track-language>track language</a>.</p>
+
+  </div>
+
   <p>The <dfn id=attr-track-label title=attr-track-label><code>label</code></dfn>
   attribute gives a user-readable title for the track.</p>
 
-  <p>There must not be two <code><a href=#the-track-element>track</a></code> element children of the
-  same <a href=#media-element>media element</a> whose <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attributes are in the same
+  <p>The value of the <code title=attr-track-label><a href=#attr-track-label>label</a></code>
+  attribute, if the attribute is present, must not be the empty
+  string. Furthermore, there must not be two <code><a href=#the-track-element>track</a></code>
+  element children of the same <a href=#media-element>media element</a> whose <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attributes are in the same
   state, whose <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code>
   attributes are both missing or have values that represent the same
   language, and whose <code title=attr-track-label><a href=#attr-track-label>label</a></code>
   attributes are again both missing or both have the same value.</p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-label><a href=#attr-track-label>label</a></code>
+  attribute whose value is not the empty string, then the element's
+  <dfn id=track-label>track label</dfn> is the value of the attribute. Otherwise, the
+  element's <a href=#track-label>track label</a> is a user-agent defined string
+  (e.g. the string "untitled" in the user's locale, or a value
+  automatically generated from the other attributes).</p>
+
+  </div>
+
+  <div class=impl>
+
+  <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>
+
+  <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
+  according to the following table; for a state given in a cell of the
+  first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
+  string given in the second column:</p>
+
+  <table><thead><tr><th>State
+     <th>String
+   <tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
+     <td><code title=dom-track-kind-subtitles>subtitles</code>
+    <tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
+     <td><code title=dom-track-kind-captions>captions</code>
+    <tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
+     <td><code title=dom-track-kind-descriptions>descriptions</code>
+    <tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
+     <td><code title=dom-track-kind-chapters>chapters</code>
+    <tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
+     <td><code title=dom-track-kind-metadata>metadata</code>
+  </table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
+  label</a>.</p>
+
+  <p>The <a href=#timed-track-language>timed track language</a> is the element's
+  <a href=#track-language>track language</a>, if any, or the empty string
+  otherwise.</p>
+
+  <p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
+  removed, or changed, the <a href=#timed-track>timed track</a> must update
+  accordingly, as per the definitions above.</p>
+
+  <p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
+  thereto. (blocked on defining how the mode is updated and how it
+  affects track loading)</p>
+
+  <p class=XXX>...cues! state! mode!</p>
+
+  </div>
+
   <dl class=domintro><dt><var title="">track</var> . <code title=dom-track-track><a href=#dom-track-track>track</a></code></dt>
 
    <dd>
@@ -23629,10 +23708,6 @@
 
   </dl><div class=impl>
 
-  <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>
-
   <p>The <dfn id=dom-track-track title=dom-track-track><code>track</code></dfn> IDL
   attribute must, on getting, return the <code><a href=#the-track-element>track</a></code> element's
   <a href=#timed-track>timed track</a>'s corresponding <code><a href=#timedtrack>TimedTrack</a></code>
@@ -24086,7 +24161,8 @@
      <li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
      <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>.</li>
 
-     <li class=XXX><p>remove all timed tracks</li>
+     <li><p><a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's media-resource-specific
+     timed tracks</a>.</li>
 
      <li><p>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is
      not set to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then set it
@@ -24200,15 +24276,26 @@
      algorithm returns without aborting <em>this</em> one, then the
      load failed.</li>
 
-     <li><p><i>Failed</i>: Reaching this step indicates that the media
-     resource failed to load or that the given <a href=#url>URL</a> could
-     not be <a href=#resolve-a-url title="resolve a url">resolved</a>. Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute to a new
-     <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>. <span class=XXX>remove all timed tracks</span></li>
+     <li>
 
-     <li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
-     the <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a>
-     value.</li>
+      <p><i>Failed</i>: Reaching this step indicates that the media
+      resource failed to load or that the given <a href=#url>URL</a> could
+      not be <a href=#resolve-a-url title="resolve a url">resolved</a>. In one
+      atomic operation, run the following steps:</p>
 
+      <ol><li><p>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code>
+       attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
+       <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>
+
+       <li><p><a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's media-resource-specific
+       timed tracks</a>.</li>
+
+       <li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
+       the <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a>
+       value.</li>
+
+      </ol></li>
+
      <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
      event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
      at the <a href=#media-element>media element</a>.</li>
@@ -24310,8 +24397,7 @@
      <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <var title="">candidate</var> element, in the context of the <a href=#fetch title=fetch>fetching process</a> that was used to try to
      obtain <var title="">candidate</var>'s corresponding <a href=#media-resource>media
      resource</a> in the <a href=#concept-media-load-resource title=concept-media-load-resource>resource fetch
-     algorithm</a>. <span class=XXX>remove all timed
-     tracks</span></li>
+     algorithm</a>.</li>
 
      <li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>. The
      <a href=#synchronous-section>synchronous section</a> consists of all the remaining
@@ -24319,6 +24405,9 @@
      <a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous section">synchronous sections</a> are
      marked with ⌛.)</li>
 
+     <li><p>⌛ <a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's
+     media-resource-specific timed tracks</a>.</li>
+
      <li><p>⌛ <i title="">Find next candidate</i>: Let <var title="">candidate</var> be null.</li>
 
      <li><p>⌛ <i title="">Search loop</i>: If the node after
@@ -24478,15 +24567,13 @@
      <dt id=getting-media-metadata>Once enough of the <a href=#media-data>media
      data</a> has been fetched to determine the duration of the
      <a href=#media-resource>media resource</a>, its dimensions, and other
-     metadata</dt>
+     metadata, and once <a href=#the-timed-tracks-are-ready>the timed tracks are ready</a></dt>
 
      <dd>
 
       <p>This indicates that the resource is usable. The user agent
       must follow these substeps:</p>
 
-      <p class=XXX>this needs to wait until all active timed tracks have loaded also</p>
-
       <ol><li><p>Set the <a href=#current-playback-position>current playback position</a> to the
        <a href=#earliest-possible-position>earliest possible position</a>.</li>
 
@@ -24704,11 +24791,12 @@
      </dd>
 
 
-     <dt class=XXX>timed tracks are found</dt>
+     <dt id=found-a-media-resource-specific-timed-track>If the <a href=#media-resource>media resource</a> is found to declare a <a href=#media-resource-specific-timed-track>media-resource-specific timed track</a> that the user agent supports</dt>
 
      <dd>
 
-      <p class=XXX>...
+      <p>Run the <a href=#steps-to-expose-a-media-resource-specific-timed-track>steps to expose a media-resource-specific timed
+      track</a> with the relevant data.</p>
 
      </dd>
 
@@ -25789,9 +25877,10 @@
    the <code title=dom-media-addTrack>addTrack()</code> method, in
    the order they were added, oldest first.</li>
 
-   <li>Any <a href=#timed-track title="timed track">timed tracks</a> corresponding
-   to data in the <a href=#media-resource>media resource</a>, in the order defined by
-   the <a href=#media-resource>media resource</a>'s format specification.</li>
+   <li>Any <a href=#media-resource-specific-timed-track title="media-resource-specific timed
+   track">media-resource-specific timed tracks</a> (<a href=#timed-track title="timed track">timed tracks</a> corresponding to data in
+   the <a href=#media-resource>media resource</a>), in the order defined by the
+   <a href=#media-resource>media resource</a>'s format specification.</li>
 
   </ol><p>A <a href=#timed-track>timed track</a> consists of:</p>
 
@@ -26081,35 +26170,97 @@
   cue</a> is associated with a particular <a href=#timed-track>timed track</a>,
   the association is permanent.</p>
 
+  <p class=XXX><dfn id=the-timed-tracks-are-ready>the timed tracks are ready</dfn></p>
 
+
   <h6 id=sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
+  track</a> that corresponds to data found in the <a href=#media-resource>media
+  resource</a>. Rules for processing and rendering such data are
+  defined by the relevant specifications, e.g. the specification of
+  the video format if the <a href=#media-resource>media resource</a> is a video.</p>
 
+  <p>When a <a href=#media-resource>media resource</a> contains data that the user
+  agent recognises and supports as being equivalent to a <a href=#timed-track>timed
+  track</a>, the user agent <a href=#found-a-media-resource-specific-timed-track>runs</a> the
+  <dfn id=steps-to-expose-a-media-resource-specific-timed-track>steps to expose a media-resource-specific timed track</dfn>
+  with the relevant data, as follows:</p>
 
+  <ol><li><p>Associate the relevant data with a new <a href=#timed-track>timed
+   track</a> and its corresponding new <code><a href=#timedtrack>TimedTrack</a></code>
+   object. The <a href=#timed-track>timed track</a> is a
+   <a href=#media-resource-specific-timed-track>media-resource-specific timed track</a>.</li>
+
+   <li><p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-kind title="timed track
+   kind">kind</a>, <a href=#timed-track-label title="timed track label">label</a>,
+   and <a href=#timed-track-language title="timed track language">language</a> based on the
+   semantics of the relevant data, as defined by the relevant
+   specification.</li>
+
+   <li><p>Populate the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-list-of-cues title="timed track list of cues">list of cues</a> with the cues
+   parsed so far, folllowing the <a href=#guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues>guidelines for exposing
+   cues</a>, and begin updating it dynamically as
+   necessary.</li>
+
+   <li>
+
+    <p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-readiness-state title="timed track
+    readiness state">readiness state</a> to the value that most
+    correctly describes the current state, and begin updating it
+    dynamically as necessary.</p>
+
+    <p class=example>For example, if the relevant data in the
+    <a href=#media-resource>media resource</a> has been fully parsed and completely
+    describes the cues, then the <a href=#timed-track>timed track</a> would be
+    <a href=#timed-track-loaded title="timed track loaded">loaded</a>. On the other hand,
+    if the data for the cues is interleaved with the <a href=#media-data>media
+    data</a>, and the <a href=#media-resource>media resource</a> as a whole is
+    still being downloaded, then the <a href=#timed-track-loading title="timed track
+    loading">loading</a> state might be more accurate.</p>
+
+   </li>
+
+   <li><p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-mode title="timed
+   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>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>.</li>
+
+  </ol><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-timed-tracks">forget the media
+  element's media-resource-specific timed tracks</dfn>, the user
+  agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list
+  of timed tracks</a> all the <a href=#media-resource-specific-timed-track title="media-resource-specific
+  timed track">media-resource-specific timed tracks</a>.</p>
+
+
+
   <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 class=XXX>...
+  <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
+  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>
+  to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
+  tracks</a>.</p>
 
-   - when <track> inserted into media element:
-      - add the timed track to the list of timed tracks
+  <p class=XXX>...</p>
 
-   - when <track> removed from media element:
-      - remove the track from the list of timed tracks
 
-   - when <track> corresponding to a media element's timed track has a
-     content attribute changed:
-      - kind => timed track kind
-      - label => timed track label
-      - srclang => timed track language
-      - src => if it's changed, blow away all the cues, set readyState to NONE, then reprocess the mode
+  <h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
+  <a href=#timed-track-cue title="timed track cue">timed track cues</a></h6>
 
-  -->
+  <p class=XXX>...</p>
 
 
-  <h6 id=timed-track-api><span class=secno>4.8.10.10.4 </span>Timed track API</h6>
+  <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>
 
 <!--
   // timed tracks
@@ -26188,7 +26339,7 @@
   </div>
 
 
-  <h6 id=cue-events><span class=secno>4.8.10.10.5 </span>Event definitions</h6>
+  <h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>
 
   <p class=XXX>...
 

Modified: index
===================================================================
--- index	2010-05-06 09:58:45 UTC (rev 5086)
+++ index	2010-05-08 06:37:59 UTC (rev 5087)
@@ -190,7 +190,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 6 May 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 8 May 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -541,8 +541,10 @@
          <li><a href=#timed-track-model><span class=secno>4.8.10.10.1 </span>Timed track model</a></li>
          <li><a href=#sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</a></li>
          <li><a href=#sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</a></li>
-         <li><a href=#timed-track-api><span class=secno>4.8.10.10.4 </span>Timed track API</a></li>
-         <li><a href=#cue-events><span class=secno>4.8.10.10.5 </span>Event definitions</a></ol></li>
+         <li><a href=#guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span>Guidelines for exposing cues in various formats as
+  timed track cues</a></li>
+         <li><a href=#timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</a></li>
+         <li><a href=#cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</a></ol></li>
        <li><a href=#websrt><span class=secno>4.8.10.11 </span>WebSRT</a>
         <ol>
          <li><a href=#syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</a></li>
@@ -23473,27 +23475,27 @@
 
   <p>The <dfn id=attr-track-kind title=attr-track-kind><code>kind</code></dfn>
   attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
-  table lists the keywords defined for this attribute. The states
-  given in the first cell of the rows with keywords give the states to
-  which those keywords map.</p>
+  table lists the keywords defined for this attribute. The keyword
+  given in the first cell of each row maps to the state given in the
+  second cell.</p>
 
-  <table><thead><tr><th>State
-     <th>Keywords
+  <table><thead><tr><th>Keywords
+     <th>State
      <th>Brief description
-   <tbody><tr><td><dfn id=attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</dfn>
-     <td><dfn id=attr-track-kind-keyword-subtitles title=attr-track-kind-keyword-subtitles><code>subtitles</code></dfn>
+   <tbody><tr><td><dfn id=attr-track-kind-keyword-subtitles title=attr-track-kind-keyword-subtitles><code>subtitles</code></dfn>
+     <td><dfn id=attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</dfn>
      <td>Translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the <a href=#media-resource>media resource</a>'s soundtrack).
-    <tr><td><dfn id=attr-track-kind-captions title=attr-track-kind-captions>Captions</dfn>
-     <td><dfn id=attr-track-kind-keyword-captions title=attr-track-kind-keyword-captions><code>captions</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-captions title=attr-track-kind-keyword-captions><code>captions</code></dfn>
+     <td><dfn id=attr-track-kind-captions title=attr-track-kind-captions>Captions</dfn>
      <td>Transcription of the dialogue, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). 
-    <tr><td><dfn id=attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</dfn>
-     <td><dfn id=attr-track-kind-keyword-descriptions title=attr-track-kind-keyword-descriptions><code>descriptions</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-descriptions title=attr-track-kind-keyword-descriptions><code>descriptions</code></dfn>
+     <td><dfn id=attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</dfn>
      <td>Textual descriptions of the video component of the <a href=#media-resource>media resource</a>, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen while driving, or because the user is blind).
-    <tr><td><dfn id=attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</dfn>
-     <td><dfn id=attr-track-kind-keyword-chapters title=attr-track-kind-keyword-chapters><code>chapters</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-chapters title=attr-track-kind-keyword-chapters><code>chapters</code></dfn>
+     <td><dfn id=attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</dfn>
      <td>Chapter titles, intended to be used for navigating the <a href=#media-resource>media resource</a>.
-    <tr><td><dfn id=attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</dfn>
-     <td><dfn id=attr-track-kind-keyword-metadata title=attr-track-kind-keyword-metadata><code>metadata</code></dfn>
+    <tr><td><dfn id=attr-track-kind-keyword-metadata title=attr-track-kind-keyword-metadata><code>metadata</code></dfn>
+     <td><dfn id=attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</dfn>
      <td>Tracks intended for use from script.
   </table><p>The attribute may be omitted. The <i>missing value default</i> is
   the <a href=#attr-track-kind-captions title=attr-track-kind-captions>captions</a> state.</p>
@@ -23503,6 +23505,18 @@
   <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially surrounded by
   spaces</a>. This attribute must be present.</p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-src><a href=#attr-track-src>src</a></code>
+  attribute whose value is not the empty string and whose value, when
+  the attribute was set, could be successfully <a href=#resolve-a-url title="resolve a
+  url">resolved</a> relative to the element, then the element's
+  <dfn id=track-url>track URL</dfn> is the resulting <a href=#absolute-url>absolute
+  URL</a>. Otherwise, the element has no <a href=#track-url>track
+  URL</a>.</p>
+
+  </div>
+
   <p>The <dfn id=attr-track-srclang title=attr-track-srclang><code>srclang</code></dfn>
   attribute gives the language of the time track data. The value must
   be a valid BCP 47 language tag. This attribute must be present if
@@ -23510,16 +23524,81 @@
   in the <a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>subtitles</a>
   state. <a href=#refsBCP47>[BCP47]</a></p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attribute whose value is
+  not the empty string, then the element's <dfn id=track-language>track language</dfn>
+  is the value of the attribute. Otherwise, the element has no
+  <a href=#track-language>track language</a>.</p>
+
+  </div>
+
   <p>The <dfn id=attr-track-label title=attr-track-label><code>label</code></dfn>
   attribute gives a user-readable title for the track.</p>
 
-  <p>There must not be two <code><a href=#the-track-element>track</a></code> element children of the
-  same <a href=#media-element>media element</a> whose <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attributes are in the same
+  <p>The value of the <code title=attr-track-label><a href=#attr-track-label>label</a></code>
+  attribute, if the attribute is present, must not be the empty
+  string. Furthermore, there must not be two <code><a href=#the-track-element>track</a></code>
+  element children of the same <a href=#media-element>media element</a> whose <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attributes are in the same
   state, whose <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code>
   attributes are both missing or have values that represent the same
   language, and whose <code title=attr-track-label><a href=#attr-track-label>label</a></code>
   attributes are again both missing or both have the same value.</p>
 
+  <div class=impl>
+
+  <p>If the element has a <code title=attr-track-label><a href=#attr-track-label>label</a></code>
+  attribute whose value is not the empty string, then the element's
+  <dfn id=track-label>track label</dfn> is the value of the attribute. Otherwise, the
+  element's <a href=#track-label>track label</a> is a user-agent defined string
+  (e.g. the string "untitled" in the user's locale, or a value
+  automatically generated from the other attributes).</p>
+
+  </div>
+
+  <div class=impl>
+
+  <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>
+
+  <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
+  according to the following table; for a state given in a cell of the
+  first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
+  string given in the second column:</p>
+
+  <table><thead><tr><th>State
+     <th>String
+   <tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
+     <td><code title=dom-track-kind-subtitles>subtitles</code>
+    <tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
+     <td><code title=dom-track-kind-captions>captions</code>
+    <tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
+     <td><code title=dom-track-kind-descriptions>descriptions</code>
+    <tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
+     <td><code title=dom-track-kind-chapters>chapters</code>
+    <tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
+     <td><code title=dom-track-kind-metadata>metadata</code>
+  </table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
+  label</a>.</p>
+
+  <p>The <a href=#timed-track-language>timed track language</a> is the element's
+  <a href=#track-language>track language</a>, if any, or the empty string
+  otherwise.</p>
+
+  <p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
+  removed, or changed, the <a href=#timed-track>timed track</a> must update
+  accordingly, as per the definitions above.</p>
+
+  <p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
+  thereto. (blocked on defining how the mode is updated and how it
+  affects track loading)</p>
+
+  <p class=XXX>...cues! state! mode!</p>
+
+  </div>
+
   <dl class=domintro><dt><var title="">track</var> . <code title=dom-track-track><a href=#dom-track-track>track</a></code></dt>
 
    <dd>
@@ -23530,10 +23609,6 @@
 
   </dl><div class=impl>
 
-  <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>
-
   <p>The <dfn id=dom-track-track title=dom-track-track><code>track</code></dfn> IDL
   attribute must, on getting, return the <code><a href=#the-track-element>track</a></code> element's
   <a href=#timed-track>timed track</a>'s corresponding <code><a href=#timedtrack>TimedTrack</a></code>
@@ -23987,7 +24062,8 @@
      <li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
      <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>.</li>
 
-     <li class=XXX><p>remove all timed tracks</li>
+     <li><p><a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's media-resource-specific
+     timed tracks</a>.</li>
 
      <li><p>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is
      not set to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then set it
@@ -24101,15 +24177,26 @@
      algorithm returns without aborting <em>this</em> one, then the
      load failed.</li>
 
-     <li><p><i>Failed</i>: Reaching this step indicates that the media
-     resource failed to load or that the given <a href=#url>URL</a> could
-     not be <a href=#resolve-a-url title="resolve a url">resolved</a>. Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute to a new
-     <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>. <span class=XXX>remove all timed tracks</span></li>
+     <li>
 
-     <li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
-     the <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a>
-     value.</li>
+      <p><i>Failed</i>: Reaching this step indicates that the media
+      resource failed to load or that the given <a href=#url>URL</a> could
+      not be <a href=#resolve-a-url title="resolve a url">resolved</a>. In one
+      atomic operation, run the following steps:</p>
 
+      <ol><li><p>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code>
+       attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
+       <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>
+
+       <li><p><a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's media-resource-specific
+       timed tracks</a>.</li>
+
+       <li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
+       the <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a>
+       value.</li>
+
+      </ol></li>
+
      <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
      event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code>
      at the <a href=#media-element>media element</a>.</li>
@@ -24211,8 +24298,7 @@
      <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <var title="">candidate</var> element, in the context of the <a href=#fetch title=fetch>fetching process</a> that was used to try to
      obtain <var title="">candidate</var>'s corresponding <a href=#media-resource>media
      resource</a> in the <a href=#concept-media-load-resource title=concept-media-load-resource>resource fetch
-     algorithm</a>. <span class=XXX>remove all timed
-     tracks</span></li>
+     algorithm</a>.</li>
 
      <li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>. The
      <a href=#synchronous-section>synchronous section</a> consists of all the remaining
@@ -24220,6 +24306,9 @@
      <a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous section">synchronous sections</a> are
      marked with ⌛.)</li>
 
+     <li><p>⌛ <a href="#forget-the-media-element's-media-resource-specific-timed-tracks">Forget the media element's
+     media-resource-specific timed tracks</a>.</li>
+
      <li><p>⌛ <i title="">Find next candidate</i>: Let <var title="">candidate</var> be null.</li>
 
      <li><p>⌛ <i title="">Search loop</i>: If the node after
@@ -24379,15 +24468,13 @@
      <dt id=getting-media-metadata>Once enough of the <a href=#media-data>media
      data</a> has been fetched to determine the duration of the
      <a href=#media-resource>media resource</a>, its dimensions, and other
-     metadata</dt>
+     metadata, and once <a href=#the-timed-tracks-are-ready>the timed tracks are ready</a></dt>
 
      <dd>
 
       <p>This indicates that the resource is usable. The user agent
       must follow these substeps:</p>
 
-      <p class=XXX>this needs to wait until all active timed tracks have loaded also</p>
-
       <ol><li><p>Set the <a href=#current-playback-position>current playback position</a> to the
        <a href=#earliest-possible-position>earliest possible position</a>.</li>
 
@@ -24605,11 +24692,12 @@
      </dd>
 
 
-     <dt class=XXX>timed tracks are found</dt>
+     <dt id=found-a-media-resource-specific-timed-track>If the <a href=#media-resource>media resource</a> is found to declare a <a href=#media-resource-specific-timed-track>media-resource-specific timed track</a> that the user agent supports</dt>
 
      <dd>
 
-      <p class=XXX>...
+      <p>Run the <a href=#steps-to-expose-a-media-resource-specific-timed-track>steps to expose a media-resource-specific timed
+      track</a> with the relevant data.</p>
 
      </dd>
 
@@ -25690,9 +25778,10 @@
    the <code title=dom-media-addTrack>addTrack()</code> method, in
    the order they were added, oldest first.</li>
 
-   <li>Any <a href=#timed-track title="timed track">timed tracks</a> corresponding
-   to data in the <a href=#media-resource>media resource</a>, in the order defined by
-   the <a href=#media-resource>media resource</a>'s format specification.</li>
+   <li>Any <a href=#media-resource-specific-timed-track title="media-resource-specific timed
+   track">media-resource-specific timed tracks</a> (<a href=#timed-track title="timed track">timed tracks</a> corresponding to data in
+   the <a href=#media-resource>media resource</a>), in the order defined by the
+   <a href=#media-resource>media resource</a>'s format specification.</li>
 
   </ol><p>A <a href=#timed-track>timed track</a> consists of:</p>
 
@@ -25982,35 +26071,97 @@
   cue</a> is associated with a particular <a href=#timed-track>timed track</a>,
   the association is permanent.</p>
 
+  <p class=XXX><dfn id=the-timed-tracks-are-ready>the timed tracks are ready</dfn></p>
 
+
   <h6 id=sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</h6>
 
-  <p class=XXX>...
+  <p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
+  track</a> that corresponds to data found in the <a href=#media-resource>media
+  resource</a>. Rules for processing and rendering such data are
+  defined by the relevant specifications, e.g. the specification of
+  the video format if the <a href=#media-resource>media resource</a> is a video.</p>
 
+  <p>When a <a href=#media-resource>media resource</a> contains data that the user
+  agent recognises and supports as being equivalent to a <a href=#timed-track>timed
+  track</a>, the user agent <a href=#found-a-media-resource-specific-timed-track>runs</a> the
+  <dfn id=steps-to-expose-a-media-resource-specific-timed-track>steps to expose a media-resource-specific timed track</dfn>
+  with the relevant data, as follows:</p>
 
+  <ol><li><p>Associate the relevant data with a new <a href=#timed-track>timed
+   track</a> and its corresponding new <code><a href=#timedtrack>TimedTrack</a></code>
+   object. The <a href=#timed-track>timed track</a> is a
+   <a href=#media-resource-specific-timed-track>media-resource-specific timed track</a>.</li>
+
+   <li><p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-kind title="timed track
+   kind">kind</a>, <a href=#timed-track-label title="timed track label">label</a>,
+   and <a href=#timed-track-language title="timed track language">language</a> based on the
+   semantics of the relevant data, as defined by the relevant
+   specification.</li>
+
+   <li><p>Populate the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-list-of-cues title="timed track list of cues">list of cues</a> with the cues
+   parsed so far, folllowing the <a href=#guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues>guidelines for exposing
+   cues</a>, and begin updating it dynamically as
+   necessary.</li>
+
+   <li>
+
+    <p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-readiness-state title="timed track
+    readiness state">readiness state</a> to the value that most
+    correctly describes the current state, and begin updating it
+    dynamically as necessary.</p>
+
+    <p class=example>For example, if the relevant data in the
+    <a href=#media-resource>media resource</a> has been fully parsed and completely
+    describes the cues, then the <a href=#timed-track>timed track</a> would be
+    <a href=#timed-track-loaded title="timed track loaded">loaded</a>. On the other hand,
+    if the data for the cues is interleaved with the <a href=#media-data>media
+    data</a>, and the <a href=#media-resource>media resource</a> as a whole is
+    still being downloaded, then the <a href=#timed-track-loading title="timed track
+    loading">loading</a> state might be more accurate.</p>
+
+   </li>
+
+   <li><p>Set the new <a href=#timed-track>timed track</a>'s <a href=#timed-track-mode title="timed
+   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>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>.</li>
+
+  </ol><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-timed-tracks">forget the media
+  element's media-resource-specific timed tracks</dfn>, the user
+  agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list
+  of timed tracks</a> all the <a href=#media-resource-specific-timed-track title="media-resource-specific
+  timed track">media-resource-specific timed tracks</a>.</p>
+
+
+
   <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 class=XXX>...
+  <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
+  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>
+  to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
+  tracks</a>.</p>
 
-   - when <track> inserted into media element:
-      - add the timed track to the list of timed tracks
+  <p class=XXX>...</p>
 
-   - when <track> removed from media element:
-      - remove the track from the list of timed tracks
 
-   - when <track> corresponding to a media element's timed track has a
-     content attribute changed:
-      - kind => timed track kind
-      - label => timed track label
-      - srclang => timed track language
-      - src => if it's changed, blow away all the cues, set readyState to NONE, then reprocess the mode
+  <h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
+  <a href=#timed-track-cue title="timed track cue">timed track cues</a></h6>
 
-  -->
+  <p class=XXX>...</p>
 
 
-  <h6 id=timed-track-api><span class=secno>4.8.10.10.4 </span>Timed track API</h6>
+  <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>
 
 <!--
   // timed tracks
@@ -26089,7 +26240,7 @@
   </div>
 
 
-  <h6 id=cue-events><span class=secno>4.8.10.10.5 </span>Event definitions</h6>
+  <h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>
 
   <p class=XXX>...
 

Modified: source
===================================================================
--- source	2010-05-06 09:58:45 UTC (rev 5086)
+++ source	2010-05-08 06:37:59 UTC (rev 5087)
@@ -25204,36 +25204,36 @@
 
   <p>The <dfn title="attr-track-kind"><code>kind</code></dfn>
   attribute is an <span>enumerated attribute</span>. The following
-  table lists the keywords defined for this attribute. The states
-  given in the first cell of the rows with keywords give the states to
-  which those keywords map.</p>
+  table lists the keywords defined for this attribute. The keyword
+  given in the first cell of each row maps to the state given in the
+  second cell.</p>
 
   <table>
    <thead>
     <tr>
+     <th>Keywords
      <th>State
-     <th>Keywords
      <th>Brief description
    <tbody>
     <tr>
+     <td><dfn title="attr-track-kind-keyword-subtitles"><code>subtitles</code></dfn>
      <td><dfn title="attr-track-kind-subtitles">Subtitles</dfn>
-     <td><dfn title="attr-track-kind-keyword-subtitles"><code>subtitles</code></dfn>
      <td>Translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the <span>media resource</span>'s soundtrack).
     <tr>
+     <td><dfn title="attr-track-kind-keyword-captions"><code>captions</code></dfn>
      <td><dfn title="attr-track-kind-captions">Captions</dfn>
-     <td><dfn title="attr-track-kind-keyword-captions"><code>captions</code></dfn>
      <td>Transcription of the dialogue, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). 
     <tr>
+     <td><dfn title="attr-track-kind-keyword-descriptions"><code>descriptions</code></dfn>
      <td><dfn title="attr-track-kind-descriptions">Descriptions</dfn>
-     <td><dfn title="attr-track-kind-keyword-descriptions"><code>descriptions</code></dfn>
      <td>Textual descriptions of the video component of the <span>media resource</span>, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen while driving, or because the user is blind).
     <tr>
+     <td><dfn title="attr-track-kind-keyword-chapters"><code>chapters</code></dfn>
      <td><dfn title="attr-track-kind-chapters">Chapters</dfn>
-     <td><dfn title="attr-track-kind-keyword-chapters"><code>chapters</code></dfn>
      <td>Chapter titles, intended to be used for navigating the <span>media resource</span>.
     <tr>
+     <td><dfn title="attr-track-kind-keyword-metadata"><code>metadata</code></dfn>
      <td><dfn title="attr-track-kind-metadata">Metadata</dfn>
-     <td><dfn title="attr-track-kind-keyword-metadata"><code>metadata</code></dfn>
      <td>Tracks intended for use from script.
   </table>
 
@@ -25245,6 +25245,18 @@
   <span>valid non-empty URL potentially surrounded by
   spaces</span>. This attribute must be present.</p>
 
+  <div class="impl">
+
+  <p>If the element has a <code title="attr-track-src">src</code>
+  attribute whose value is not the empty string and whose value, when
+  the attribute was set, could be successfully <span title="resolve a
+  url">resolved</span> relative to the element, then the element's
+  <dfn>track URL</dfn> is the resulting <span>absolute
+  URL</span>. Otherwise, the element has no <span>track
+  URL</span>.</p>
+
+  </div>
+
   <p>The <dfn title="attr-track-srclang"><code>srclang</code></dfn>
   attribute gives the language of the time track data. The value must
   be a valid BCP 47 language tag. This attribute must be present if
@@ -25252,17 +25264,96 @@
   in the <span title="attr-track-kind-subtitles">subtitles</span>
   state. <a href="#refsBCP47">[BCP47]</a></p>
 
+  <div class="impl">
+
+  <p>If the element has a <code
+  title="attr-track-srclang">srclang</code> attribute whose value is
+  not the empty string, then the element's <dfn>track language</dfn>
+  is the value of the attribute. Otherwise, the element has no
+  <span>track language</span>.</p>
+
+  </div>
+
   <p>The <dfn title="attr-track-label"><code>label</code></dfn>
   attribute gives a user-readable title for the track.</p>
 
-  <p>There must not be two <code>track</code> element children of the
-  same <span>media element</span> whose <code
+  <p>The value of the <code title="attr-track-label">label</code>
+  attribute, if the attribute is present, must not be the empty
+  string. Furthermore, there must not be two <code>track</code>
+  element children of the same <span>media element</span> whose <code
   title="attr-track-kind">kind</code> attributes are in the same
   state, whose <code title="attr-track-srclang">srclang</code>
   attributes are both missing or have values that represent the same
   language, and whose <code title="attr-track-label">label</code>
   attributes are again both missing or both have the same value.</p>
 
+  <div class="impl">
+
+  <p>If the element has a <code title="attr-track-label">label</code>
+  attribute whose value is not the empty string, then the element's
+  <dfn>track label</dfn> is the value of the attribute. Otherwise, the
+  element's <span>track label</span> is a user-agent defined string
+  (e.g. the string "untitled" in the user's locale, or a value
+  automatically generated from the other attributes).</p>
+
+  </div>
+
+  <div class="impl">
+
+  <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>
+
+  <p>The <span>timed track kind</span> is determined from the state of
+  the element's <code title="attr-track-kind">kind</code> attribute
+  according to the following table; for a state given in a cell of the
+  first column, the <span title="timed track kind">kind</span> is the
+  string given in the second column:</p>
+
+  <table>
+   <thead>
+    <tr>
+     <th>State
+     <th>String
+   <tbody>
+    <tr>
+     <td><span title="attr-track-kind-subtitles">Subtitles</span>
+     <td><code title="dom-track-kind-subtitles">subtitles</code>
+    <tr>
+     <td><span title="attr-track-kind-captions">Captions</span>
+     <td><code title="dom-track-kind-captions">captions</code>
+    <tr>
+     <td><span title="attr-track-kind-descriptions">Descriptions</span>
+     <td><code title="dom-track-kind-descriptions">descriptions</code>
+    <tr>
+     <td><span title="attr-track-kind-chapters">Chapters</span>
+     <td><code title="dom-track-kind-chapters">chapters</code>
+    <tr>
+     <td><span title="attr-track-kind-metadata">Metadata</span>
+     <td><code title="dom-track-kind-metadata">metadata</code>
+  </table>
+
+  <p>The <span>timed track label</span> is the element's <span>track
+  label</span>.</p>
+
+  <p>The <span>timed track language</span> is the element's
+  <span>track language</span>, if any, or the empty string
+  otherwise.</p>
+
+  <p>As the <code title="attr-track-kind">kind</code>, <code
+  title="attr-track-label">label</code>, and <code
+  title="attr-track-srclang">srclang</code> attributes are added,
+  removed, or changed, the <span>timed track</span> must update
+  accordingly, as per the definitions above.</p>
+
+  <p class="XXX">Handle the <span>track URL</span> and changes
+  thereto. (blocked on defining how the mode is updated and how it
+  affects track loading)</p>
+
+  <p class="XXX">...cues! state! mode!</p>
+
+  </div>
+
   <dl class="domintro">
 
    <dt><var title="">track</var> . <code title="dom-track-track">track</code></dt>
@@ -25277,10 +25368,6 @@
 
   <div class="impl">
 
-  <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>
-
   <p>The <dfn title="dom-track-track"><code>track</code></dfn> IDL
   attribute must, on getting, return the <code>track</code> element's
   <span>timed track</span>'s corresponding <code>TimedTrack</code>
@@ -25808,7 +25895,8 @@
      <code
      title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>.</p></li>
 
-     <li class="XXX"><p>remove all timed tracks</p></li>
+     <li><p><span>Forget the media element's media-resource-specific
+     timed tracks</span>.</p></li>
 
      <li><p>If <code title="dom-media-readyState">readyState</code> is
      not set to <code
@@ -25954,21 +26042,34 @@
      algorithm returns without aborting <em>this</em> one, then the
      load failed.</p></li>
 
-     <li><p><i>Failed</i>: Reaching this step indicates that the media
-     resource failed to load or that the given <span>URL</span> could
-     not be <span title="resolve a url">resolved</span>. Set the <code
-     title="dom-media-error">error</code> attribute to a new
-     <code>MediaError</code> object whose <code
-     title="dom-MediaError-code">code</code> attribute is set to <code
-     title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</code>. <span
-     class="XXX">remove all timed tracks</span></p></li>
+     <li>
 
-     <li><p>Set the element's <code
-     title="dom-media-networkState">networkState</code> attribute to
-     the <span
-     title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</span>
-     value.</p></li>
+      <p><i>Failed</i>: Reaching this step indicates that the media
+      resource failed to load or that the given <span>URL</span> could
+      not be <span title="resolve a url">resolved</span>. In one
+      atomic operation, run the following steps:</p>
 
+      <ol>
+
+       <li><p>Set the <code title="dom-media-error">error</code>
+       attribute to a new <code>MediaError</code> object whose <code
+       title="dom-MediaError-code">code</code> attribute is set to
+       <code
+       title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</code>.</p></li>
+
+       <li><p><span>Forget the media element's media-resource-specific
+       timed tracks</span>.</p></li>
+
+       <li><p>Set the element's <code
+       title="dom-media-networkState">networkState</code> attribute to
+       the <span
+       title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</span>
+       value.</p></li>
+
+      </ol>
+
+     </li>
+
      <li><p><span>Queue a task</span> to <span>fire a simple
      event</span> named <code title="event-media-error">error</code>
      at the <span>media element</span>.</p></li>
@@ -26097,8 +26198,7 @@
      obtain <var title="">candidate</var>'s corresponding <span>media
      resource</span> in the <span
      title="concept-media-load-resource">resource fetch
-     algorithm</span>. <span class="XXX">remove all timed
-     tracks</span></p></li>
+     algorithm</span>.</p></li>
 
      <li><p>Asynchronously <span>await a stable state</span>. The
      <span>synchronous section</span> consists of all the remaining
@@ -26107,6 +26207,9 @@
      title="synchronous section">synchronous sections</span> are
      marked with &#x231B;.)</p></li>
 
+     <li><p>&#x231B; <span>Forget the media element's
+     media-resource-specific timed tracks</span>.</p></li>
+
      <li><p>&#x231B; <i title="">Find next candidate</i>: Let <var
      title="">candidate</var> be null.</p></li>
 
@@ -26297,15 +26400,13 @@
      <dt id="getting-media-metadata">Once enough of the <span>media
      data</span> has been fetched to determine the duration of the
      <span>media resource</span>, its dimensions, and other
-     metadata</dt>
+     metadata, and once <span>the timed tracks are ready</span></dt>
 
      <dd>
 
       <p>This indicates that the resource is usable. The user agent
       must follow these substeps:</p>
 
-      <p class="XXX">this needs to wait until all active timed tracks have loaded also</p>
-
       <ol>
 
        <li><p>Set the <span>current playback position</span> to the
@@ -26571,11 +26672,12 @@
      </dd>
 
 
-     <dt class="XXX">timed tracks are found</dt>
+     <dt id="found-a-media-resource-specific-timed-track">If the <span>media resource</span> is found to declare a <span>media-resource-specific timed track</span> that the user agent supports</dt>
 
      <dd>
 
-      <p class="XXX">...
+      <p>Run the <span>steps to expose a media-resource-specific timed
+      track</span> with the relevant data.</p>
 
      </dd>
 
@@ -27869,9 +27971,11 @@
    the <code title="dom-media-addTrack">addTrack()</code> method, in
    the order they were added, oldest first.</li>
 
-   <li>Any <span title="timed track">timed tracks</span> corresponding
-   to data in the <span>media resource</span>, in the order defined by
-   the <span>media resource</span>'s format specification.</li>
+   <li>Any <span title="media-resource-specific timed
+   track">media-resource-specific timed tracks</span> (<span
+   title="timed track">timed tracks</span> corresponding to data in
+   the <span>media resource</span>), in the order defined by the
+   <span>media resource</span>'s format specification.</li>
 
   </ol>
 
@@ -28191,32 +28295,100 @@
   cue</span> is associated with a particular <span>timed track</span>,
   the association is permanent.</p>
 
+  <p class="XXX"><dfn>the timed tracks are ready</dfn></p>
 
+
   <h6>Sourcing in-band timed tracks</h6>
 
-  <p class="XXX">...
+  <p>A <dfn>media-resource-specific timed track</dfn> is a <span>timed
+  track</span> that corresponds to data found in the <span>media
+  resource</span>. Rules for processing and rendering such data are
+  defined by the relevant specifications, e.g. the specification of
+  the video format if the <span>media resource</span> is a video.</p>
 
+  <p>When a <span>media resource</span> contains data that the user
+  agent recognises and supports as being equivalent to a <span>timed
+  track</span>, the user agent <a
+  href="#found-a-media-resource-specific-timed-track">runs</a> the
+  <dfn>steps to expose a media-resource-specific timed track</dfn>
+  with the relevant data, as follows:</p>
 
+  <ol>
+
+   <li><p>Associate the relevant data with a new <span>timed
+   track</span> and its corresponding new <code>TimedTrack</code>
+   object. The <span>timed track</span> is a
+   <span>media-resource-specific timed track</span>.</p></li>
+
+   <li><p>Set the new <span>timed track</span>'s <span title="timed track
+   kind">kind</span>, <span title="timed track label">label</span>,
+   and <span title="timed track language">language</span> based on the
+   semantics of the relevant data, as defined by the relevant
+   specification.</p></li>
+
+   <li><p>Populate the new <span>timed track</span>'s <span
+   title="timed track list of cues">list of cues</span> with the cues
+   parsed so far, folllowing the <span>guidelines for exposing
+   cues</span>, and begin updating it dynamically as
+   necessary.</p></li>
+
+   <li>
+
+    <p>Set the new <span>timed track</span>'s <span title="timed track
+    readiness state">readiness state</span> to the value that most
+    correctly describes the current state, and begin updating it
+    dynamically as necessary.</p>
+
+    <p class="example">For example, if the relevant data in the
+    <span>media resource</span> has been fully parsed and completely
+    describes the cues, then the <span>timed track</span> would be
+    <span title="timed track loaded">loaded</span>. On the other hand,
+    if the data for the cues is interleaved with the <span>media
+    data</span>, and the <span>media resource</span> as a whole is
+    still being downloaded, then the <span title="timed track
+    loading">loading</span> state might be more accurate.</p>
+
+   </li>
+
+   <li><p>Set the new <span>timed track</span>'s <span title="timed
+   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>Add the new <span>timed track</span> to the <span>media
+   element</span>'s <span>list of timed tracks</span>.</p></li>
+
+  </ol>
+
+  <p>When a <span>media element</span> is to <dfn>forget the media
+  element's media-resource-specific timed tracks</dfn>, the user
+  agent must remove from the <span>media element</span>'s <span>list
+  of timed tracks</span> all the <span title="media-resource-specific
+  timed track">media-resource-specific timed tracks</span>.</p>
+
+
+
   <h6>Sourcing out-of-band timed tracks</h6>
 
-  <p class="XXX">...
+  <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
+  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>
+  to the <span>media element</span>'s <span>list of timed
+  tracks</span>.</p>
 
-   - when <track> inserted into media element:
-      - add the timed track to the list of timed tracks
+  <p class="XXX">...</p>
 
-   - when <track> removed from media element:
-      - remove the track from the list of timed tracks
 
-   - when <track> corresponding to a media element's timed track has a
-     content attribute changed:
-      - kind => timed track kind
-      - label => timed track label
-      - srclang => timed track language
-      - src => if it's changed, blow away all the cues, set readyState to NONE, then reprocess the mode
+  <h6><dfn>Guidelines for exposing cues</dfn> in various formats as
+  <span title="timed track cue">timed track cues</span></h6>
 
-  -->
+  <p class="XXX">...</p>
 
 
   <h6>Timed track API</h6>




More information about the Commit-Watchers mailing list