[html5] r7327 - [giow] (1) Reform the processing model around loading of text tracks to solve a [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Sep 11 14:59:14 PDT 2012


Author: ianh
Date: 2012-09-11 14:59:07 -0700 (Tue, 11 Sep 2012)
New Revision: 7327

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Reform the processing model around loading of text tracks to solve a number of problems: what happens when there's no media element parent, how to make sure we pick the right text track when there's a user preference, and some race conditions
Affected topics: HTML, Rendering, Video Text Tracks, Video and Audio

Modified: complete.html
===================================================================
--- complete.html	2012-09-07 21:52:27 UTC (rev 7326)
+++ complete.html	2012-09-11 21:59:07 UTC (rev 7327)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 7 September 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 11 September 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -1586,6 +1586,10 @@
    different text for web+, etc. I haven't fixed these yet since I
    expect the WHATWG to switch approach at some point soon too. -->
 
+   <li>The W3C HTML specification avoids mentioning
+   <code><a href=#mouseeventinit>MouseEventInit</a></code>, resulting in a different definition
+   for <code><a href=#drageventinit>DragEventInit</a></code>.</li>
+
   </ul><p>The following sections are only published in the WHATWG
   specifications and are not currently available anywhere else:</p>
 
@@ -28429,11 +28433,10 @@
   format.</p>
 
   <p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any
-  <a href=#text-track-cue title="text track cue">text track cues</a> whose
-  <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
-  <a href=#text-track>text track</a> is in the <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> modes.</p>
+  <a href=#text-track-cue title="text track cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text
+  track cue active flag</a> is set and whose <a href=#text-track>text
+  track</a> is in the <a href=#text-track-showing title="text track
+  showing">showing</a> mode.</p>
 
   <p>In addition to the above, the user agent may provide messages to
   the user (such as "buffering", "no video loaded", "error", or more
@@ -31738,21 +31741,20 @@
   </p>
 
   <ol><li><p>Let <var title="">current cues</var> be a list of <a href=#text-track-cue title="text track cue">cues</a>, initialized to contain all the
-   <a href=#text-track-cue title="text track cue">cues</a> of all the <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> <a href=#text-track title="text track">text
-   tracks</a> of the <a href=#media-element>media element</a> (not the <a href=#text-track-disabled title="text track disabled">disabled</a> ones) whose <a href=#text-track-cue-start-time title="text track cue start time">start times</a> are less than
-   or equal to the <a href=#current-playback-position>current playback position</a> and whose
-   <a href=#text-track-cue-end-time title="text track cue end time">end times</a> are greater
-   than the <a href=#current-playback-position>current playback position</a>.</li>
+   <a href=#text-track-cue title="text track cue">cues</a> of all the <a href=#text-track-hidden title="text track hidden">hidden</a> or <a href=#text-track-showing title="text track
+   showing">showing</a> <a href=#text-track title="text track">text tracks</a>
+   of the <a href=#media-element>media element</a> (not the <a href=#text-track-disabled title="text track
+   disabled">disabled</a> ones) whose <a href=#text-track-cue-start-time title="text track cue
+   start time">start times</a> are less than or equal to the
+   <a href=#current-playback-position>current playback position</a> and whose <a href=#text-track-cue-end-time title="text
+   track cue end time">end times</a> are greater than the
+   <a href=#current-playback-position>current playback position</a>.</li>
 
    <li><p>Let <var title="">other cues</var> be a list of <a href=#text-track-cue title="text track cue">cues</a>, initialized to contain all the
    <a href=#text-track-cue title="text track cue">cues</a> of <a href=#text-track-hidden title="text track
-   hidden">hidden</a>, <a href=#text-track-showing title="text track
-   showing">showing</a>, and <a href=#text-track-showing-by-default title="text track showing by
-   default">showing by default</a> <a href=#text-track title="text track">text
-   tracks</a> of the <a href=#media-element>media element</a> that are not
-   present in <var title="">current cues</var>.</li>
+   hidden">hidden</a> and <a href=#text-track-showing title="text track
+   showing">showing</a> <a href=#text-track title="text track">text tracks</a>
+   of the <a href=#media-element>media element</a> that are not present in <var title="">current cues</var>.</li>
 
    <li><p>Let <var title="">last time</var> be the <a href=#current-playback-position>current
    playback position</a> at the time this algorithm was last run
@@ -31898,12 +31900,9 @@
 
    <li><p>Run the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
    rendering</a> of each of the <a href=#text-track title="text track">text
-   tracks</a> in <var title="">affected tracks</var> that are <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 example, for <a href=#text-track title="text track">text tracks</a>
-   based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the
-   display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a>
-   </li>
+   tracks</a> in <var title="">affected tracks</var> that are <a href=#text-track-showing title="text track showing">showing</a>. For example, for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
+   the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+   tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a> </li>
 
   </ol><p>For the purposes of the algorithm above, a <a href=#text-track-cue>text track
   cue</a> is considered to be part of a <a href=#text-track>text track</a>
@@ -33709,9 +33708,8 @@
      </dd>
 
      <dt><dfn id=text-track-showing title="text track showing">Showing</dfn>
-     <dt><dfn id=text-track-showing-by-default title="text track showing by default">Showing by default</dfn>
 
-     </dt><dd>
+     <dd>
 
       <p>Indicates that the text track is active. If no attempt has
       yet been made to obtain the track's cues, the user agent will
@@ -33728,13 +33726,6 @@
       user can navigate to any point in the <a href=#media-resource>media
       resource</a> by selecting a cue.</p>
 
-      <p>The <a href=#text-track-showing-by-default title="text track showing by default">showing by
-      default</a> state is used in conjunction with the <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute on
-      <code><a href=#the-track-element>track</a></code> elements to indicate that the text track was
-      enabled due to that attribute. This allows the user agent to
-      override the state if a later track is discovered that is more
-      appropriate per the user's preferences.</p>
-
      </dd>
 
     </dl></dd>
@@ -33762,18 +33753,21 @@
   <code><a href=#texttrack>TextTrack</a></code> object.</p>
 
   <hr><p>Each <a href=#media-element>media element</a> has a <dfn id=list-of-pending-text-tracks>list of pending text
-  tracks</dfn>, which must initially be empty, and a
-  <dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false.
-  When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of pending
-  text tracks</dfn> of a <a href=#media-element>media element</a>, the user agent
-  must add to the element's <a href=#list-of-pending-text-tracks>list of pending text tracks</a>
-  each <a href=#text-track>text track</a> in the element's <a href=#list-of-text-tracks>list of text
-  tracks</a> whose <a href=#text-track-mode>text track mode</a> is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose <a href=#text-track-readiness-state>text
-  track readiness state</a> is <!--either <span title="text track
-  not loaded">not loaded</span> or [there can't be any in the 'not
-  loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track
-  loading">loading</a>.</p>
+  tracks</dfn>, which must initially be empty, a
+  <dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false,
+  and a <dfn id=did-perform-automatic-track-selection>did-perform-automatic-track-selection</dfn> flag, which
+  must also initially be false.</p>
 
+  <p>When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of
+  pending text tracks</dfn> of a <a href=#media-element>media element</a>, the user
+  agent must add to the element's <a href=#list-of-pending-text-tracks>list of pending text
+  tracks</a> each <a href=#text-track>text track</a> in the element's
+  <a href=#list-of-text-tracks>list of text tracks</a> whose <a href=#text-track-mode>text track mode</a>
+  is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose
+  <a href=#text-track-readiness-state>text track readiness state</a> is <!--either <span
+  title="text track not loaded">not loaded</span> or [there can't be
+  any in the 'not loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track loading">loading</a>.</p>
+
   <p>Whenever a <code><a href=#the-track-element>track</a></code> element's parent node changes, the
   user agent must remove the corresponding <a href=#text-track>text track</a>
   from any <a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>
@@ -33789,8 +33783,9 @@
   the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag to true. When a
   <a href=#media-element>media element</a> is popped off the <a href=#stack-of-open-elements>stack of open
   elements</a> of an <a href=#html-parser>HTML parser</a> or <a href=#xml-parser>XML
-  parser</a>, the user agent must <a href=#populate-the-list-of-pending-text-tracks>populate the list of
-  pending text tracks</a> and set the element's
+  parser</a>, the user agent must <a href=#honor-user-preferences-for-automatic-text-track-selection>honor user preferences for
+  automatic text track selection</a>, <a href=#populate-the-list-of-pending-text-tracks>populate the list of
+  pending text tracks</a>, and set the element's
   <a href=#blocked-on-parser>blocked-on-parser</a> flag to false.</p>
 
   <p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media
@@ -33899,18 +33894,18 @@
      cue</a>.</li>
 
      <li><p>If <var title="">cue</var> is not associated with a
-     <a href=#text-track>text track</a>, return −1 and abort these
-     steps.</li>
+     <a href=#text-track>text track</a>, or if that <a href=#text-track>text track</a> is
+     not in the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media
+     element</a>, return −1 and abort these steps.</li>
 
      <li><p>Let <var title="">track</var> be the <a href=#text-track>text
      track</a> that the <var title="">cue</var> is associated
      with.</li>
 
      <li><p>Let <var title="">n</var> be the number of <a href=#text-track title="text track">text tracks</a> whose <a href=#text-track-mode>text track
-     mode</a> is <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 that are in the <a href=#media-element>media element</a>'s
-     <a href=#list-of-text-tracks>list of text tracks</a> before <var title="">track</var>.</li>
+     mode</a> is <a href=#text-track-showing title="text track showing">showing</a>
+     and that are in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
+     text tracks</a> before <var title="">track</var>.</li>
 
      <li><p>Increment <var title="">n</var> by one.</li>
 
@@ -33981,16 +33976,14 @@
     disabled">disabled</a>; and whenever the <a href=#media-element>media
     element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is changed back to
     <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>. When the
-    flag is unset in this way for one or more cues in <a href=#text-track title="text track">text tracks</a> that were <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> prior to the
-    relevant incident, the user agent must, after having unset the
-    flag for all the affected cues, apply the <a href=#rules-for-updating-the-text-track-rendering>rules for updating
-    the text track rendering</a> of those <a href=#text-track title="text
-    track">text tracks</a>.
-    For example, for <a href=#text-track title="text track">text tracks</a>
-    based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the
-    display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
-   </dd>
+    flag is unset in this way for one or more cues in <a href=#text-track title="text track">text tracks</a> that were <a href=#text-track-showing title="text
+    track showing">showing</a> prior to the relevant incident, the
+    user agent must, after having unset the flag for all the affected
+    cues, apply the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
+    rendering</a> of those <a href=#text-track title="text track">text
+    tracks</a>. For example, for <a href=#text-track title="text track">text
+    tracks</a> based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for
+    updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p> </dd>
 
    <dt>The <dfn id=text-track-cue-display-state title="text track cue display state">display state</dfn>
    <dd>
@@ -34009,17 +34002,17 @@
   the <a href=#text-track-cue title="text track cue">cues</a> by their <a href=#text-track>text
   track</a>, with the groups being sorted in the same order as
   their <a href=#text-track title="text track">text tracks</a> appear in the
-  <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>;
-  then, within each group, <a href=#text-track-cue title="text track cue">cues</a>
-  must be sorted by their <a href=#text-track-cue-start-time title="text track cue start
-  time">start time</a>, earliest first; then, any <a href=#text-track-cue title="text track cue">cues</a> with the same <a href=#text-track-cue-start-time title="text
-  track cue start time">start time</a> must be sorted by their
-  <a href=#text-track-cue-end-time title="text track cue end time">end time</a>, latest
-  first; and finally, any <a href=#text-track-cue title="text track cue">cues</a>
-  with identical <a href=#text-track-cue-end-time title="text track cue end time">end
-  times</a> must be sorted in the order they were created (so
-  e.g. for cues from a <a href=#webvtt>WebVTT</a> file, that would be the
-  order in which the cues were listed in the file). <a href=#refsWEBVTT>[WEBVTT]</a></p>
+  <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>; then,
+  within each group, <a href=#text-track-cue title="text track cue">cues</a> must be
+  sorted by their <a href=#text-track-cue-start-time title="text track cue start time">start
+  time</a>, earliest first; then, any <a href=#text-track-cue title="text track
+  cue">cues</a> with the same <a href=#text-track-cue-start-time title="text track cue start
+  time">start time</a> must be sorted by their <a href=#text-track-cue-end-time title="text
+  track cue end time">end time</a>, latest first; and finally, any
+  <a href=#text-track-cue title="text track cue">cues</a> with identical <a href=#text-track-cue-end-time title="text track cue end time">end times</a> must be sorted in
+  the order they were created (so e.g. for cues from a
+  <a href=#webvtt>WebVTT</a> file, that would be the order in which the cues
+  were listed in the file). <a href=#refsWEBVTT>[WEBVTT]</a></p>
 
 
   <h6 id=sourcing-in-band-text-tracks><span class=secno>4.8.10.12.2 </span>Sourcing in-band text tracks</h6>
@@ -34144,11 +34137,11 @@
    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>
+   the data.</li> <!-- it's too late to apply the normal
+   heuristic, so we don't bother -->
 
    <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>
@@ -34172,6 +34165,9 @@
   of text tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific
   text track">media-resource-specific text tracks</a>.</p>
 
+  <!-- if, after in-band text tracks have been found, there's no
+  out-of-band text tracks, then apply user prefs? -->
+
   </div>
 
 
@@ -34217,6 +34213,10 @@
   <p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
   the algorithm below.</p>
 
+  <p>The <a href=#text-track-readiness-state>text track readiness state</a> is initially <a href=#text-track-not-loaded title="text track not loaded">not loaded</a>, and the <a href=#text-track-mode>text
+  track mode</a> is initially <a href=#text-track-disabled title="text track
+  disabled">disabled</a>.</p>
+
   <p>The <a href=#text-track-list-of-cues>text track list of cues</a> is initially empty. It
   is dynamically modified when the referenced file is parsed.
   Associated with the list are the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text
@@ -34249,99 +34249,125 @@
   <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
   <code><a href=#texttracklist>TextTrackList</a></code> object.</p> <!-- removetrack -->
 
-  <p>When a <a href=#text-track>text track</a> corresponding to a
+  <hr><p>When a <a href=#text-track>text track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, the user agent
-  must set the <a href=#text-track-mode>text track mode</a> appropriately, as
-  determined by the following conditions:</p>
+  must <a href=#queue-a-task>queue a task</a> to run the following steps for the
+  <a href=#media-element>media element</a>:</p>
 
-  <dl class=switch><dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> or <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code> and the user
-   has indicated an interest in having a track with this <a href=#text-track-kind>text
-   track kind</a>, <a href=#text-track-language>text track language</a>, and
-   <a href=#text-track-label>text track label</a> enabled, and there is no other
-   <a href=#text-track>text track</a> in the <a href=#media-element>media element</a>'s
-   <a href=#list-of-text-tracks>list of text tracks</a> with a <a href=#text-track-kind>text track
-   kind</a> of either <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> or <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+  <ol><li><p>If the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag is
+   true, abort these steps.</li>
 
-   <dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code> and
-   the user has indicated an interest in having text descriptions with
-   this <a href=#text-track-language>text track language</a> and <a href=#text-track-label>text track
-   label</a> enabled, and there is no other <a href=#text-track>text
-   track</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
-   text tracks</a> with a <a href=#text-track-kind>text track kind</a> of <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+   <li><p>If the element's
+   <a href=#did-perform-automatic-track-selection>did-perform-automatic-track-selection</a> flag is true,
+   abort these steps.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing title="text
-    track showing">showing</a>.</p>
+   <li><p><a href=#honor-user-preferences-for-automatic-text-track-selection>Honor user preferences for automatic text track
+   selection</a> for this element.</li>
 
-    <p>If there is a <a href=#text-track>text track</a> in the <a href=#media-element>media
-    element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose
-    <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing-by-default title="text track showing
-    by default">showing by default</a>, the user agent must
-    furthermore change <em>that</em> <a href=#text-track>text track</a>'s
-    <a href=#text-track-mode>text track mode</a> to <a href=#text-track-hidden title="text track
-    hidden">hidden</a>.</p> <!-- so that we still get events and
-    stuff: we can expect authors to forget that default doesn't mean
-    that it'll always be turned on, and that they'll still rely on
-    events firing even if it doesn't show -->
+  </ol><p>When the user agent is required to <dfn id=honor-user-preferences-for-automatic-text-track-selection>honor user preferences
+  for automatic text track selection</dfn> for a <a href=#media-element>media
+  element</a>, the user agent must run the following steps:</p>
 
-   </dd>
+  <ol><li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> and <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>.</li>
 
-   <dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> and the
-   <a href=#text-track-language>text track language</a> is one that the user agent has
-   reason to believe is appropriate for the user, and there is no
-   other <a href=#text-track>text track</a> in the <a href=#media-element>media element</a>'s
-   <a href=#list-of-text-tracks>list of text tracks</a> with a <a href=#text-track-kind>text track
-   kind</a> of <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing title="text
-    track showing">showing</a>.</p>
-   </dd>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>.</li>
 
-   <dt>If the <code><a href=#the-track-element>track</a></code> element has a <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute specified, and
-   there is no other <a href=#text-track>text track</a> in the <a href=#media-element>media
-   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose
-   <a href=#text-track-mode>text track mode</a> is <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></dt>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing-by-default title="text
-    track showing by default">showing by default</a>.</p>
-   </dd>
+   <li><p>Set the element's
+   <a href=#did-perform-automatic-track-selection>did-perform-automatic-track-selection</a> flag to
+   true.</li>
 
-   <dt>Otherwise</dt>
+  </ol><p>When the steps above say to <dfn id=perform-automatic-text-track-selection>perform automatic text track
+  selection</dfn> for one or more <a href=#text-track-kind title="text track kind">text
+  track kinds</a>, it means to run the following steps:</p>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-disabled title="text
-    track disabled">disabled</a>.</p>
-   </dd>
+  <ol><li><p>Let <var title="">candidates</var> be a list consisting of
+   the <a href=#text-track title="text track">text tracks</a> in the <a href=#media-element>media
+   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose <a href=#text-track-kind>text
+   track kind</a> is one of the kinds that were passed to the
+   algorithm, if any.</li>
 
-  </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 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>
+   <li><p>If <var title="">candidates</var> is empty, then abort these
+   steps.</li>
 
-  <ol><li><p><i>Top</i>: <a href=#await-a-stable-state>Await a stable state</a>. The
+   <li><p>If any of the <a href=#text-track title="text track">text tracks</a> in
+   <var title="">candidates</var> have a <a href=#text-track-mode>text track mode</a>
+   set to <a href=#text-track-showing title="text track showing">showing</a>, abort these
+   steps.</li>
+
+   <li>
+
+    <p>If the user has expressed an interest in having a track from
+    <var title="">candidates</var> enabled based on its <a href=#text-track-kind>text
+    track kind</a>, <a href=#text-track-language>text track language</a>, and
+    <a href=#text-track-label>text track label</a>, then set its <a href=#text-track-mode>text track
+    mode</a> to <a href=#text-track-showing title="text track
+    showing">showing</a>.</p>
+
+    <p class=note>For example, the user could have set a browser
+    preference to the effect of "I want French captions whenever
+    possible", or "If there is a subtitle track with 'Commentary' in
+    the title, enable it", or "If there are audio description tracks
+    available, enable one, ideally in Swiss German, but failing that
+    in Standard Swiss German or Standard German".</p>
+
+   </li>
+
+   <li><p>If there are any <a href=#text-track title="text track">text tracks</a>
+   in <var title="">candidates</var> that correspond to
+   <code><a href=#the-track-element>track</a></code> elements with a <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute set whose
+   <a href=#text-track-mode>text track mode</a> is set to <a href=#text-track-disabled title="text track
+   disabled">disabled</a>, then set the <a href=#text-track-mode>text track
+   mode</a> of each such track to <a href=#text-track-hidden title="text track
+   hidden">hidden</a>.</p> <!-- so that we still get events and
+   stuff: we can expect authors to forget that default doesn't mean
+   that it'll always be turned on, and that they'll still rely on
+   events firing even if it doesn't show -->
+
+  </ol><p>When a <a href=#text-track>text track</a> corresponding to a
+  <code><a href=#the-track-element>track</a></code> element experiences any of the following
+  circumstances, the user agent must <a href=#start-the-track-processing-model>start the
+  <code>track</code> processing model</a> for that <a href=#text-track>text
+  track</a> and its <code><a href=#the-track-element>track</a></code> element:
+
+  <ul><li>The <code><a href=#the-track-element>track</a></code> element is created.</li>
+
+   <li>The <a href=#text-track>text track</a> has its <a href=#text-track-mode>text track
+   mode</a> changed.</li>
+
+   <li>The <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>.</li>
+
+  </ul><p>When a user agent is to <dfn id=start-the-track-processing-model>start the <code>track</code>
+  processing model</dfn> for a <a href=#text-track>text track</a> and its
+  <code><a href=#the-track-element>track</a></code> element, it must 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>If another occurrence of this algorithm is already running
+   for this <a href=#text-track>text track</a> and its <code><a href=#the-track-element>track</a></code>
+   element, abort these steps, letting that other algorithm take care
+   of this element.</li>
+
+   <li><p>If the <a href=#text-track>text track</a>'s <a href=#text-track-mode>text track
+   mode</a> is not set to one of <a href=#text-track-hidden title="text track
+   hidden">hidden</a> or <a href=#text-track-showing title="text track
+   showing">showing</a>, abort these steps.</li>
+
+   <li><p>If the <a href=#text-track>text track</a>'s <code><a href=#the-track-element>track</a></code> element
+   does not have a <a href=#media-element>media element</a> as a parent, abort these
+   steps.</li>
+
+   <li><p>Run the remainder of these steps asynchronously, allowing
+   whatever caused these steps to run to continue.</li>
+
+   <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>
@@ -34352,16 +34378,20 @@
    <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>⌛ If the <code><a href=#the-track-element>track</a></code> element's parent is a
+   <a href=#media-element>media element</a> then let <var title="">CORS mode</var>
+   be the state of the parent <a href=#media-element>media element</a>'s <code title=attr-media-crossorigin><a href=#attr-media-crossorigin>crossorigin</a></code> content
+   attribute. Otherwise, let <var title="">CORS mode</var> be <a href=#attr-crossorigin-none title=attr-crossorigin-none>No CORS</a>.</li>
+
    <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
    remaining steps asynchronously.</li>
 
    <li>
 
     <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
-    attribute, the <i title="">origin</i> being the
-    <a href=#origin>origin</a> of the <a href=#media-element>media element</a>'s
+    <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of <var title="">URL</var>, with the <i>mode</i> being <var title="">CORS
+    mode</var>, the <i title="">origin</i> being the
+    <a href=#origin>origin</a> of the <code><a href=#the-track-element>track</a></code> element's
     <code><a href=#document>Document</a></code>, and the <i>default origin behaviour</i> set
     to <i>fail</i>.</p>
 
@@ -34406,7 +34436,7 @@
     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 run these steps:
+    supported text track format, then run these steps:</p>
 
     <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
@@ -34421,9 +34451,8 @@
      <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>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>.</li>
 
      <li><p>Jump to the step labeled <i>top</i>.</li>
 
@@ -34454,9 +34483,8 @@
      <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>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>.</li>
 
      <li><p>Jump back to the step labeled <i>top</i>.</li>
 
@@ -34466,14 +34494,13 @@
     <ul><li>the <a href=#track-url>track URL</a> changes so that it is no longer
      equal to <var title="">URL</var>, while 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>; or</li>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>; or</li>
 
-     <li>the <a href=#text-track-mode>text track mode</a> changes 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>, while the
-     <a href=#track-url>track URL</a> is not equal to <var title="">URL</var></li>
+     <li>the <a href=#text-track-mode>text track mode</a> changes to <a href=#text-track-hidden title="text
+     track hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>, while the <a href=#track-url>track URL</a> is not
+     equal to <var title="">URL</var></li>
 
     </ul><p>...then the user agent must run the following steps:</p>
 
@@ -34636,8 +34663,13 @@
            attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttrack-oncuechange title=handler-TextTrack-oncuechange>oncuechange</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
+  <dl class=domintro><dt><var title="">textTrack</var> = <var title="">media</var> . <code title=dom-media-addTextTrack><a href=#dom-media-addtexttrack>addTextTrack</a></code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
    <dd>
+    <p>Creates and returns a new <code><a href=#texttrack>TextTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
+   </dd>
+
+   <dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
+   <dd>
     <p>Returns the <a href=#text-track-kind>text track kind</a> string.</p>
    </dd>
 
@@ -34673,7 +34705,7 @@
      </dd>
      <dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
      <dd>
-      <p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
+      <p>The <a href=#text-track-showing>text track showing</a> mode.</p>
      </dd>
     </dl><p>Can be set, to change the mode.</p>
    </dd>
@@ -34700,14 +34732,85 @@
     <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or not in the list of cues.</p>
    </dd>
 
-   <dt><var title="">textTrack</var> = <var title="">media</var> . <code title=dom-media-addTextTrack><a href=#dom-media-addtexttrack>addTextTrack</a></code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
-   <dd>
-    <p>Creates and returns a new <code><a href=#texttrack>TextTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
-   </dd>
-
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
+  <p>The <dfn id=dom-media-addtexttrack title=dom-media-addTextTrack><code>addTextTrack(<var title="">kind</var>, <var title="">label</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
+  element">media elements</a>, when invoked, must run the following
+  steps:</p>
+
+  <ol><li>
+
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
+    these steps:</p>
+
+    <ul class=brief><li><code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code>
+     <li><code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>
+     <li><code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>
+     <li><code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>
+     <li><code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>
+    </ul></li>
+
+   <li>
+
+    <p>If the <var title="">label</var> argument was omitted, let <var title="">label</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title="">language</var> argument was omitted, let
+    <var title="">language</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <code><a href=#texttrack>TextTrack</a></code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <a href=#text-track>text track</a> corresponding to the new
+    object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
+    state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
+    <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
+    mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
+    list.
+    Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
+    <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>
+    as its <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>.
+    <a href=#refsWEBVTT>[WEBVTT]</a>
+    </p>
+
+   </li>
+
+   <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>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=#queue-a-task>Queue a task</a> to fire an event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and
+    is not cancelable, and that uses the <code><a href=#trackevent>TrackEvent</a></code>
+    interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to
+    the new <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object,
+    at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
+    <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return the new <code><a href=#texttrack>TextTrack</a></code> object.</p>
+
+   </li>
+
+  </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
   attribute must return the <a href=#text-track-kind>text track kind</a> of the
   <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
   represents.</p>
@@ -34738,7 +34841,7 @@
    <dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
    <dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
    <dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
-   <dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
+   <dd>The <a href=#text-track-showing>text track showing</a> mode.</dd>
   </dl><p>On setting, if the new value isn't equal to what the attribute
   would currently return, the new value must be processed as
   follows:</p>
@@ -34773,13 +34876,7 @@
 
    </dd>
 
-  </dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
-  default">showing by default</a>, then there is no way to change
-  it to <a href=#text-track-showing title="text track showing">showing</a> without first
-  changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
-  <a href=#text-track-hidden title="text track hidden">hidden</a>.</p>
-
-  <p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
+  </dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
   track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
   not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
   return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that
@@ -34852,82 +34949,6 @@
    <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>'s
    <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
 
-  </ol><hr><p>The <dfn id=dom-media-addtexttrack title=dom-media-addTextTrack><code>addTextTrack(<var title="">kind</var>, <var title="">label</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
-  element">media elements</a>, when invoked, must run the following
-  steps:</p>
-
-  <ol><li>
-
-    <p>If <var title="">kind</var> is not one of the following
-    strings, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
-    these steps:</p>
-
-    <ul class=brief><li><code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code>
-     <li><code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>
-     <li><code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>
-     <li><code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>
-     <li><code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>
-    </ul></li>
-
-   <li>
-
-    <p>If the <var title="">label</var> argument was omitted, let <var title="">label</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>If the <var title="">language</var> argument was omitted, let
-    <var title="">language</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <code><a href=#texttrack>TextTrack</a></code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <a href=#text-track>text track</a> corresponding to the new
-    object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
-    state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
-    <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
-    mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
-    list.
-    Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
-    <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>
-    as its <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>.
-    <a href=#refsWEBVTT>[WEBVTT]</a>
-    </p>
-
-   </li>
-
-   <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>.</p>
-
-   </li>
-
-   <li>
-
-    <p><a href=#queue-a-task>Queue a task</a> to fire an event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and
-    is not cancelable, and that uses the <code><a href=#trackevent>TrackEvent</a></code>
-    interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to
-    the new <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object,
-    at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
-    <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Return the new <code><a href=#texttrack>TextTrack</a></code> object.</p>
-
-   </li>
-
   </ol></div>
 
   <div class=example>
@@ -35580,8 +35601,7 @@
   <p>For the purposes of listing chapters in the <a href=#media-resource>media
   resource</a>, only <a href=#text-track title="text track">text tracks</a> in
   the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</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 whose
+  that are <a href=#text-track-showing title="text track showing">showing</a> and whose
   <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> should be used.
   Such tracks must be interpreted according to the <a href=#rules-for-constructing-the-chapter-tree-from-a-text-track>rules for
   constructing the chapter tree from a text track</a>.</p>
@@ -98070,12 +98090,13 @@
 
   <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface
   to the user">exposing a user interface</a> for a
-  <code><a href=#the-video-element>video</a></code> element, the user agent should run the <a href=#rules-for-updating-the-text-track-rendering>rules
-  for updating the text track rendering</a> of each of the <a href=#text-track title="text track">text tracks</a> in the <code><a href=#the-video-element>video</a></code>
-  element's <a href=#list-of-text-tracks>list of text tracks</a> that are <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> (e.g., for <a href=#text-track title="text track">text tracks</a> based on
-  <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of
-  WebVTT text tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
+  <code><a href=#the-video-element>video</a></code> element, the user agent should run the
+  <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a> of each of
+  the <a href=#text-track title="text track">text tracks</a> in the
+  <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that
+  are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
+  the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+  tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
 
   <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code>
   elements does not interrupt video playback or clear the canvas.</p>

Modified: index
===================================================================
--- index	2012-09-07 21:52:27 UTC (rev 7326)
+++ index	2012-09-11 21:59:07 UTC (rev 7327)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 7 September 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 11 September 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -1586,6 +1586,10 @@
    different text for web+, etc. I haven't fixed these yet since I
    expect the WHATWG to switch approach at some point soon too. -->
 
+   <li>The W3C HTML specification avoids mentioning
+   <code><a href=#mouseeventinit>MouseEventInit</a></code>, resulting in a different definition
+   for <code><a href=#drageventinit>DragEventInit</a></code>.</li>
+
   </ul><p>The following sections are only published in the WHATWG
   specifications and are not currently available anywhere else:</p>
 
@@ -28429,11 +28433,10 @@
   format.</p>
 
   <p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any
-  <a href=#text-track-cue title="text track cue">text track cues</a> whose
-  <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
-  <a href=#text-track>text track</a> is in the <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> modes.</p>
+  <a href=#text-track-cue title="text track cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text
+  track cue active flag</a> is set and whose <a href=#text-track>text
+  track</a> is in the <a href=#text-track-showing title="text track
+  showing">showing</a> mode.</p>
 
   <p>In addition to the above, the user agent may provide messages to
   the user (such as "buffering", "no video loaded", "error", or more
@@ -31738,21 +31741,20 @@
   </p>
 
   <ol><li><p>Let <var title="">current cues</var> be a list of <a href=#text-track-cue title="text track cue">cues</a>, initialized to contain all the
-   <a href=#text-track-cue title="text track cue">cues</a> of all the <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> <a href=#text-track title="text track">text
-   tracks</a> of the <a href=#media-element>media element</a> (not the <a href=#text-track-disabled title="text track disabled">disabled</a> ones) whose <a href=#text-track-cue-start-time title="text track cue start time">start times</a> are less than
-   or equal to the <a href=#current-playback-position>current playback position</a> and whose
-   <a href=#text-track-cue-end-time title="text track cue end time">end times</a> are greater
-   than the <a href=#current-playback-position>current playback position</a>.</li>
+   <a href=#text-track-cue title="text track cue">cues</a> of all the <a href=#text-track-hidden title="text track hidden">hidden</a> or <a href=#text-track-showing title="text track
+   showing">showing</a> <a href=#text-track title="text track">text tracks</a>
+   of the <a href=#media-element>media element</a> (not the <a href=#text-track-disabled title="text track
+   disabled">disabled</a> ones) whose <a href=#text-track-cue-start-time title="text track cue
+   start time">start times</a> are less than or equal to the
+   <a href=#current-playback-position>current playback position</a> and whose <a href=#text-track-cue-end-time title="text
+   track cue end time">end times</a> are greater than the
+   <a href=#current-playback-position>current playback position</a>.</li>
 
    <li><p>Let <var title="">other cues</var> be a list of <a href=#text-track-cue title="text track cue">cues</a>, initialized to contain all the
    <a href=#text-track-cue title="text track cue">cues</a> of <a href=#text-track-hidden title="text track
-   hidden">hidden</a>, <a href=#text-track-showing title="text track
-   showing">showing</a>, and <a href=#text-track-showing-by-default title="text track showing by
-   default">showing by default</a> <a href=#text-track title="text track">text
-   tracks</a> of the <a href=#media-element>media element</a> that are not
-   present in <var title="">current cues</var>.</li>
+   hidden">hidden</a> and <a href=#text-track-showing title="text track
+   showing">showing</a> <a href=#text-track title="text track">text tracks</a>
+   of the <a href=#media-element>media element</a> that are not present in <var title="">current cues</var>.</li>
 
    <li><p>Let <var title="">last time</var> be the <a href=#current-playback-position>current
    playback position</a> at the time this algorithm was last run
@@ -31898,12 +31900,9 @@
 
    <li><p>Run the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
    rendering</a> of each of the <a href=#text-track title="text track">text
-   tracks</a> in <var title="">affected tracks</var> that are <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 example, for <a href=#text-track title="text track">text tracks</a>
-   based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the
-   display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a>
-   </li>
+   tracks</a> in <var title="">affected tracks</var> that are <a href=#text-track-showing title="text track showing">showing</a>. For example, for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
+   the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+   tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a> </li>
 
   </ol><p>For the purposes of the algorithm above, a <a href=#text-track-cue>text track
   cue</a> is considered to be part of a <a href=#text-track>text track</a>
@@ -33709,9 +33708,8 @@
      </dd>
 
      <dt><dfn id=text-track-showing title="text track showing">Showing</dfn>
-     <dt><dfn id=text-track-showing-by-default title="text track showing by default">Showing by default</dfn>
 
-     </dt><dd>
+     <dd>
 
       <p>Indicates that the text track is active. If no attempt has
       yet been made to obtain the track's cues, the user agent will
@@ -33728,13 +33726,6 @@
       user can navigate to any point in the <a href=#media-resource>media
       resource</a> by selecting a cue.</p>
 
-      <p>The <a href=#text-track-showing-by-default title="text track showing by default">showing by
-      default</a> state is used in conjunction with the <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute on
-      <code><a href=#the-track-element>track</a></code> elements to indicate that the text track was
-      enabled due to that attribute. This allows the user agent to
-      override the state if a later track is discovered that is more
-      appropriate per the user's preferences.</p>
-
      </dd>
 
     </dl></dd>
@@ -33762,18 +33753,21 @@
   <code><a href=#texttrack>TextTrack</a></code> object.</p>
 
   <hr><p>Each <a href=#media-element>media element</a> has a <dfn id=list-of-pending-text-tracks>list of pending text
-  tracks</dfn>, which must initially be empty, and a
-  <dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false.
-  When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of pending
-  text tracks</dfn> of a <a href=#media-element>media element</a>, the user agent
-  must add to the element's <a href=#list-of-pending-text-tracks>list of pending text tracks</a>
-  each <a href=#text-track>text track</a> in the element's <a href=#list-of-text-tracks>list of text
-  tracks</a> whose <a href=#text-track-mode>text track mode</a> is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose <a href=#text-track-readiness-state>text
-  track readiness state</a> is <!--either <span title="text track
-  not loaded">not loaded</span> or [there can't be any in the 'not
-  loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track
-  loading">loading</a>.</p>
+  tracks</dfn>, which must initially be empty, a
+  <dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false,
+  and a <dfn id=did-perform-automatic-track-selection>did-perform-automatic-track-selection</dfn> flag, which
+  must also initially be false.</p>
 
+  <p>When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of
+  pending text tracks</dfn> of a <a href=#media-element>media element</a>, the user
+  agent must add to the element's <a href=#list-of-pending-text-tracks>list of pending text
+  tracks</a> each <a href=#text-track>text track</a> in the element's
+  <a href=#list-of-text-tracks>list of text tracks</a> whose <a href=#text-track-mode>text track mode</a>
+  is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose
+  <a href=#text-track-readiness-state>text track readiness state</a> is <!--either <span
+  title="text track not loaded">not loaded</span> or [there can't be
+  any in the 'not loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track loading">loading</a>.</p>
+
   <p>Whenever a <code><a href=#the-track-element>track</a></code> element's parent node changes, the
   user agent must remove the corresponding <a href=#text-track>text track</a>
   from any <a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>
@@ -33789,8 +33783,9 @@
   the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag to true. When a
   <a href=#media-element>media element</a> is popped off the <a href=#stack-of-open-elements>stack of open
   elements</a> of an <a href=#html-parser>HTML parser</a> or <a href=#xml-parser>XML
-  parser</a>, the user agent must <a href=#populate-the-list-of-pending-text-tracks>populate the list of
-  pending text tracks</a> and set the element's
+  parser</a>, the user agent must <a href=#honor-user-preferences-for-automatic-text-track-selection>honor user preferences for
+  automatic text track selection</a>, <a href=#populate-the-list-of-pending-text-tracks>populate the list of
+  pending text tracks</a>, and set the element's
   <a href=#blocked-on-parser>blocked-on-parser</a> flag to false.</p>
 
   <p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media
@@ -33899,18 +33894,18 @@
      cue</a>.</li>
 
      <li><p>If <var title="">cue</var> is not associated with a
-     <a href=#text-track>text track</a>, return −1 and abort these
-     steps.</li>
+     <a href=#text-track>text track</a>, or if that <a href=#text-track>text track</a> is
+     not in the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media
+     element</a>, return −1 and abort these steps.</li>
 
      <li><p>Let <var title="">track</var> be the <a href=#text-track>text
      track</a> that the <var title="">cue</var> is associated
      with.</li>
 
      <li><p>Let <var title="">n</var> be the number of <a href=#text-track title="text track">text tracks</a> whose <a href=#text-track-mode>text track
-     mode</a> is <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 that are in the <a href=#media-element>media element</a>'s
-     <a href=#list-of-text-tracks>list of text tracks</a> before <var title="">track</var>.</li>
+     mode</a> is <a href=#text-track-showing title="text track showing">showing</a>
+     and that are in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
+     text tracks</a> before <var title="">track</var>.</li>
 
      <li><p>Increment <var title="">n</var> by one.</li>
 
@@ -33981,16 +33976,14 @@
     disabled">disabled</a>; and whenever the <a href=#media-element>media
     element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is changed back to
     <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>. When the
-    flag is unset in this way for one or more cues in <a href=#text-track title="text track">text tracks</a> that were <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> prior to the
-    relevant incident, the user agent must, after having unset the
-    flag for all the affected cues, apply the <a href=#rules-for-updating-the-text-track-rendering>rules for updating
-    the text track rendering</a> of those <a href=#text-track title="text
-    track">text tracks</a>.
-    For example, for <a href=#text-track title="text track">text tracks</a>
-    based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the
-    display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
-   </dd>
+    flag is unset in this way for one or more cues in <a href=#text-track title="text track">text tracks</a> that were <a href=#text-track-showing title="text
+    track showing">showing</a> prior to the relevant incident, the
+    user agent must, after having unset the flag for all the affected
+    cues, apply the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track
+    rendering</a> of those <a href=#text-track title="text track">text
+    tracks</a>. For example, for <a href=#text-track title="text track">text
+    tracks</a> based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for
+    updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p> </dd>
 
    <dt>The <dfn id=text-track-cue-display-state title="text track cue display state">display state</dfn>
    <dd>
@@ -34009,17 +34002,17 @@
   the <a href=#text-track-cue title="text track cue">cues</a> by their <a href=#text-track>text
   track</a>, with the groups being sorted in the same order as
   their <a href=#text-track title="text track">text tracks</a> appear in the
-  <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>;
-  then, within each group, <a href=#text-track-cue title="text track cue">cues</a>
-  must be sorted by their <a href=#text-track-cue-start-time title="text track cue start
-  time">start time</a>, earliest first; then, any <a href=#text-track-cue title="text track cue">cues</a> with the same <a href=#text-track-cue-start-time title="text
-  track cue start time">start time</a> must be sorted by their
-  <a href=#text-track-cue-end-time title="text track cue end time">end time</a>, latest
-  first; and finally, any <a href=#text-track-cue title="text track cue">cues</a>
-  with identical <a href=#text-track-cue-end-time title="text track cue end time">end
-  times</a> must be sorted in the order they were created (so
-  e.g. for cues from a <a href=#webvtt>WebVTT</a> file, that would be the
-  order in which the cues were listed in the file). <a href=#refsWEBVTT>[WEBVTT]</a></p>
+  <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>; then,
+  within each group, <a href=#text-track-cue title="text track cue">cues</a> must be
+  sorted by their <a href=#text-track-cue-start-time title="text track cue start time">start
+  time</a>, earliest first; then, any <a href=#text-track-cue title="text track
+  cue">cues</a> with the same <a href=#text-track-cue-start-time title="text track cue start
+  time">start time</a> must be sorted by their <a href=#text-track-cue-end-time title="text
+  track cue end time">end time</a>, latest first; and finally, any
+  <a href=#text-track-cue title="text track cue">cues</a> with identical <a href=#text-track-cue-end-time title="text track cue end time">end times</a> must be sorted in
+  the order they were created (so e.g. for cues from a
+  <a href=#webvtt>WebVTT</a> file, that would be the order in which the cues
+  were listed in the file). <a href=#refsWEBVTT>[WEBVTT]</a></p>
 
 
   <h6 id=sourcing-in-band-text-tracks><span class=secno>4.8.10.12.2 </span>Sourcing in-band text tracks</h6>
@@ -34144,11 +34137,11 @@
    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>
+   the data.</li> <!-- it's too late to apply the normal
+   heuristic, so we don't bother -->
 
    <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>
@@ -34172,6 +34165,9 @@
   of text tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific
   text track">media-resource-specific text tracks</a>.</p>
 
+  <!-- if, after in-band text tracks have been found, there's no
+  out-of-band text tracks, then apply user prefs? -->
+
   </div>
 
 
@@ -34217,6 +34213,10 @@
   <p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
   the algorithm below.</p>
 
+  <p>The <a href=#text-track-readiness-state>text track readiness state</a> is initially <a href=#text-track-not-loaded title="text track not loaded">not loaded</a>, and the <a href=#text-track-mode>text
+  track mode</a> is initially <a href=#text-track-disabled title="text track
+  disabled">disabled</a>.</p>
+
   <p>The <a href=#text-track-list-of-cues>text track list of cues</a> is initially empty. It
   is dynamically modified when the referenced file is parsed.
   Associated with the list are the <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text
@@ -34249,99 +34249,125 @@
   <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
   <code><a href=#texttracklist>TextTrackList</a></code> object.</p> <!-- removetrack -->
 
-  <p>When a <a href=#text-track>text track</a> corresponding to a
+  <hr><p>When a <a href=#text-track>text track</a> corresponding to a
   <code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, the user agent
-  must set the <a href=#text-track-mode>text track mode</a> appropriately, as
-  determined by the following conditions:</p>
+  must <a href=#queue-a-task>queue a task</a> to run the following steps for the
+  <a href=#media-element>media element</a>:</p>
 
-  <dl class=switch><dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> or <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code> and the user
-   has indicated an interest in having a track with this <a href=#text-track-kind>text
-   track kind</a>, <a href=#text-track-language>text track language</a>, and
-   <a href=#text-track-label>text track label</a> enabled, and there is no other
-   <a href=#text-track>text track</a> in the <a href=#media-element>media element</a>'s
-   <a href=#list-of-text-tracks>list of text tracks</a> with a <a href=#text-track-kind>text track
-   kind</a> of either <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> or <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+  <ol><li><p>If the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag is
+   true, abort these steps.</li>
 
-   <dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code> and
-   the user has indicated an interest in having text descriptions with
-   this <a href=#text-track-language>text track language</a> and <a href=#text-track-label>text track
-   label</a> enabled, and there is no other <a href=#text-track>text
-   track</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
-   text tracks</a> with a <a href=#text-track-kind>text track kind</a> of <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+   <li><p>If the element's
+   <a href=#did-perform-automatic-track-selection>did-perform-automatic-track-selection</a> flag is true,
+   abort these steps.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing title="text
-    track showing">showing</a>.</p>
+   <li><p><a href=#honor-user-preferences-for-automatic-text-track-selection>Honor user preferences for automatic text track
+   selection</a> for this element.</li>
 
-    <p>If there is a <a href=#text-track>text track</a> in the <a href=#media-element>media
-    element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose
-    <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing-by-default title="text track showing
-    by default">showing by default</a>, the user agent must
-    furthermore change <em>that</em> <a href=#text-track>text track</a>'s
-    <a href=#text-track-mode>text track mode</a> to <a href=#text-track-hidden title="text track
-    hidden">hidden</a>.</p> <!-- so that we still get events and
-    stuff: we can expect authors to forget that default doesn't mean
-    that it'll always be turned on, and that they'll still rely on
-    events firing even if it doesn't show -->
+  </ol><p>When the user agent is required to <dfn id=honor-user-preferences-for-automatic-text-track-selection>honor user preferences
+  for automatic text track selection</dfn> for a <a href=#media-element>media
+  element</a>, the user agent must run the following steps:</p>
 
-   </dd>
+  <ol><li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> and <code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>.</li>
 
-   <dt>If the <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> and the
-   <a href=#text-track-language>text track language</a> is one that the user agent has
-   reason to believe is appropriate for the user, and there is no
-   other <a href=#text-track>text track</a> in the <a href=#media-element>media element</a>'s
-   <a href=#list-of-text-tracks>list of text tracks</a> with a <a href=#text-track-kind>text track
-   kind</a> of <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> whose
-   <a href=#text-track-mode>text track mode</a> is <a href=#text-track-showing title="text track
-   showing">showing</a></dt>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing title="text
-    track showing">showing</a>.</p>
-   </dd>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>.</li>
 
-   <dt>If the <code><a href=#the-track-element>track</a></code> element has a <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute specified, and
-   there is no other <a href=#text-track>text track</a> in the <a href=#media-element>media
-   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose
-   <a href=#text-track-mode>text track mode</a> is <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></dt>
+   <li><p><a href=#perform-automatic-text-track-selection>Perform automatic text track selection</a> for <code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>.</li>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-showing-by-default title="text
-    track showing by default">showing by default</a>.</p>
-   </dd>
+   <li><p>Set the element's
+   <a href=#did-perform-automatic-track-selection>did-perform-automatic-track-selection</a> flag to
+   true.</li>
 
-   <dt>Otherwise</dt>
+  </ol><p>When the steps above say to <dfn id=perform-automatic-text-track-selection>perform automatic text track
+  selection</dfn> for one or more <a href=#text-track-kind title="text track kind">text
+  track kinds</a>, it means to run the following steps:</p>
 
-   <dd>
-    <p>Let the <a href=#text-track-mode>text track mode</a> be <a href=#text-track-disabled title="text
-    track disabled">disabled</a>.</p>
-   </dd>
+  <ol><li><p>Let <var title="">candidates</var> be a list consisting of
+   the <a href=#text-track title="text track">text tracks</a> in the <a href=#media-element>media
+   element</a>'s <a href=#list-of-text-tracks>list of text tracks</a> whose <a href=#text-track-kind>text
+   track kind</a> is one of the kinds that were passed to the
+   algorithm, if any.</li>
 
-  </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 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>
+   <li><p>If <var title="">candidates</var> is empty, then abort these
+   steps.</li>
 
-  <ol><li><p><i>Top</i>: <a href=#await-a-stable-state>Await a stable state</a>. The
+   <li><p>If any of the <a href=#text-track title="text track">text tracks</a> in
+   <var title="">candidates</var> have a <a href=#text-track-mode>text track mode</a>
+   set to <a href=#text-track-showing title="text track showing">showing</a>, abort these
+   steps.</li>
+
+   <li>
+
+    <p>If the user has expressed an interest in having a track from
+    <var title="">candidates</var> enabled based on its <a href=#text-track-kind>text
+    track kind</a>, <a href=#text-track-language>text track language</a>, and
+    <a href=#text-track-label>text track label</a>, then set its <a href=#text-track-mode>text track
+    mode</a> to <a href=#text-track-showing title="text track
+    showing">showing</a>.</p>
+
+    <p class=note>For example, the user could have set a browser
+    preference to the effect of "I want French captions whenever
+    possible", or "If there is a subtitle track with 'Commentary' in
+    the title, enable it", or "If there are audio description tracks
+    available, enable one, ideally in Swiss German, but failing that
+    in Standard Swiss German or Standard German".</p>
+
+   </li>
+
+   <li><p>If there are any <a href=#text-track title="text track">text tracks</a>
+   in <var title="">candidates</var> that correspond to
+   <code><a href=#the-track-element>track</a></code> elements with a <code title=attr-track-default><a href=#attr-track-default>default</a></code> attribute set whose
+   <a href=#text-track-mode>text track mode</a> is set to <a href=#text-track-disabled title="text track
+   disabled">disabled</a>, then set the <a href=#text-track-mode>text track
+   mode</a> of each such track to <a href=#text-track-hidden title="text track
+   hidden">hidden</a>.</p> <!-- so that we still get events and
+   stuff: we can expect authors to forget that default doesn't mean
+   that it'll always be turned on, and that they'll still rely on
+   events firing even if it doesn't show -->
+
+  </ol><p>When a <a href=#text-track>text track</a> corresponding to a
+  <code><a href=#the-track-element>track</a></code> element experiences any of the following
+  circumstances, the user agent must <a href=#start-the-track-processing-model>start the
+  <code>track</code> processing model</a> for that <a href=#text-track>text
+  track</a> and its <code><a href=#the-track-element>track</a></code> element:
+
+  <ul><li>The <code><a href=#the-track-element>track</a></code> element is created.</li>
+
+   <li>The <a href=#text-track>text track</a> has its <a href=#text-track-mode>text track
+   mode</a> changed.</li>
+
+   <li>The <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>.</li>
+
+  </ul><p>When a user agent is to <dfn id=start-the-track-processing-model>start the <code>track</code>
+  processing model</dfn> for a <a href=#text-track>text track</a> and its
+  <code><a href=#the-track-element>track</a></code> element, it must 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>If another occurrence of this algorithm is already running
+   for this <a href=#text-track>text track</a> and its <code><a href=#the-track-element>track</a></code>
+   element, abort these steps, letting that other algorithm take care
+   of this element.</li>
+
+   <li><p>If the <a href=#text-track>text track</a>'s <a href=#text-track-mode>text track
+   mode</a> is not set to one of <a href=#text-track-hidden title="text track
+   hidden">hidden</a> or <a href=#text-track-showing title="text track
+   showing">showing</a>, abort these steps.</li>
+
+   <li><p>If the <a href=#text-track>text track</a>'s <code><a href=#the-track-element>track</a></code> element
+   does not have a <a href=#media-element>media element</a> as a parent, abort these
+   steps.</li>
+
+   <li><p>Run the remainder of these steps asynchronously, allowing
+   whatever caused these steps to run to continue.</li>
+
+   <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>
@@ -34352,16 +34378,20 @@
    <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>⌛ If the <code><a href=#the-track-element>track</a></code> element's parent is a
+   <a href=#media-element>media element</a> then let <var title="">CORS mode</var>
+   be the state of the parent <a href=#media-element>media element</a>'s <code title=attr-media-crossorigin><a href=#attr-media-crossorigin>crossorigin</a></code> content
+   attribute. Otherwise, let <var title="">CORS mode</var> be <a href=#attr-crossorigin-none title=attr-crossorigin-none>No CORS</a>.</li>
+
    <li><p>End the <a href=#synchronous-section>synchronous section</a>, continuing the
    remaining steps asynchronously.</li>
 
    <li>
 
     <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
-    attribute, the <i title="">origin</i> being the
-    <a href=#origin>origin</a> of the <a href=#media-element>media element</a>'s
+    <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of <var title="">URL</var>, with the <i>mode</i> being <var title="">CORS
+    mode</var>, the <i title="">origin</i> being the
+    <a href=#origin>origin</a> of the <code><a href=#the-track-element>track</a></code> element's
     <code><a href=#document>Document</a></code>, and the <i>default origin behaviour</i> set
     to <i>fail</i>.</p>
 
@@ -34406,7 +34436,7 @@
     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 run these steps:
+    supported text track format, then run these steps:</p>
 
     <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
@@ -34421,9 +34451,8 @@
      <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>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>.</li>
 
      <li><p>Jump to the step labeled <i>top</i>.</li>
 
@@ -34454,9 +34483,8 @@
      <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>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>.</li>
 
      <li><p>Jump back to the step labeled <i>top</i>.</li>
 
@@ -34466,14 +34494,13 @@
     <ul><li>the <a href=#track-url>track URL</a> changes so that it is no longer
      equal to <var title="">URL</var>, while 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>; or</li>
+     hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>; or</li>
 
-     <li>the <a href=#text-track-mode>text track mode</a> changes 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>, while the
-     <a href=#track-url>track URL</a> is not equal to <var title="">URL</var></li>
+     <li>the <a href=#text-track-mode>text track mode</a> changes to <a href=#text-track-hidden title="text
+     track hidden">hidden</a> or <a href=#text-track-showing title="text track
+     showing">showing</a>, while the <a href=#track-url>track URL</a> is not
+     equal to <var title="">URL</var></li>
 
     </ul><p>...then the user agent must run the following steps:</p>
 
@@ -34636,8 +34663,13 @@
            attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttrack-oncuechange title=handler-TextTrack-oncuechange>oncuechange</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
+  <dl class=domintro><dt><var title="">textTrack</var> = <var title="">media</var> . <code title=dom-media-addTextTrack><a href=#dom-media-addtexttrack>addTextTrack</a></code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
    <dd>
+    <p>Creates and returns a new <code><a href=#texttrack>TextTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
+   </dd>
+
+   <dt><var title="">textTrack</var> . <code title=dom-TextTrack-kind><a href=#dom-texttrack-kind>kind</a></code></dt>
+   <dd>
     <p>Returns the <a href=#text-track-kind>text track kind</a> string.</p>
    </dd>
 
@@ -34673,7 +34705,7 @@
      </dd>
      <dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
      <dd>
-      <p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
+      <p>The <a href=#text-track-showing>text track showing</a> mode.</p>
      </dd>
     </dl><p>Can be set, to change the mode.</p>
    </dd>
@@ -34700,14 +34732,85 @@
     <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or not in the list of cues.</p>
    </dd>
 
-   <dt><var title="">textTrack</var> = <var title="">media</var> . <code title=dom-media-addTextTrack><a href=#dom-media-addtexttrack>addTextTrack</a></code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
-   <dd>
-    <p>Creates and returns a new <code><a href=#texttrack>TextTrack</a></code> object, which is also added to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
-   </dd>
-
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
+  <p>The <dfn id=dom-media-addtexttrack title=dom-media-addTextTrack><code>addTextTrack(<var title="">kind</var>, <var title="">label</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
+  element">media elements</a>, when invoked, must run the following
+  steps:</p>
+
+  <ol><li>
+
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
+    these steps:</p>
+
+    <ul class=brief><li><code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code>
+     <li><code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>
+     <li><code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>
+     <li><code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>
+     <li><code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>
+    </ul></li>
+
+   <li>
+
+    <p>If the <var title="">label</var> argument was omitted, let <var title="">label</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title="">language</var> argument was omitted, let
+    <var title="">language</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <code><a href=#texttrack>TextTrack</a></code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <a href=#text-track>text track</a> corresponding to the new
+    object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
+    state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
+    <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
+    mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
+    list.
+    Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
+    <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>
+    as its <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>.
+    <a href=#refsWEBVTT>[WEBVTT]</a>
+    </p>
+
+   </li>
+
+   <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>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=#queue-a-task>Queue a task</a> to fire an event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and
+    is not cancelable, and that uses the <code><a href=#trackevent>TrackEvent</a></code>
+    interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to
+    the new <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object,
+    at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
+    <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return the new <code><a href=#texttrack>TextTrack</a></code> object.</p>
+
+   </li>
+
+  </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
   attribute must return the <a href=#text-track-kind>text track kind</a> of the
   <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
   represents.</p>
@@ -34738,7 +34841,7 @@
    <dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
    <dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
    <dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
-   <dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
+   <dd>The <a href=#text-track-showing>text track showing</a> mode.</dd>
   </dl><p>On setting, if the new value isn't equal to what the attribute
   would currently return, the new value must be processed as
   follows:</p>
@@ -34773,13 +34876,7 @@
 
    </dd>
 
-  </dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
-  default">showing by default</a>, then there is no way to change
-  it to <a href=#text-track-showing title="text track showing">showing</a> without first
-  changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
-  <a href=#text-track-hidden title="text track hidden">hidden</a>.</p>
-
-  <p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
+  </dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
   track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
   not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
   return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that
@@ -34852,82 +34949,6 @@
    <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>'s
    <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
 
-  </ol><hr><p>The <dfn id=dom-media-addtexttrack title=dom-media-addTextTrack><code>addTextTrack(<var title="">kind</var>, <var title="">label</var>, <var title="">language</var>)</code></dfn> method of <a href=#media-element title="media
-  element">media elements</a>, when invoked, must run the following
-  steps:</p>
-
-  <ol><li>
-
-    <p>If <var title="">kind</var> is not one of the following
-    strings, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
-    these steps:</p>
-
-    <ul class=brief><li><code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code>
-     <li><code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code>
-     <li><code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code>
-     <li><code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code>
-     <li><code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>
-    </ul></li>
-
-   <li>
-
-    <p>If the <var title="">label</var> argument was omitted, let <var title="">label</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>If the <var title="">language</var> argument was omitted, let
-    <var title="">language</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <code><a href=#texttrack>TextTrack</a></code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <a href=#text-track>text track</a> corresponding to the new
-    object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
-    state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
-    <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
-    mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
-    list.
-    Associate the <a href=#text-track-list-of-cues>text track list of cues</a> with the
-    <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>
-    as its <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a>.
-    <a href=#refsWEBVTT>[WEBVTT]</a>
-    </p>
-
-   </li>
-
-   <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>.</p>
-
-   </li>
-
-   <li>
-
-    <p><a href=#queue-a-task>Queue a task</a> to fire an event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and
-    is not cancelable, and that uses the <code><a href=#trackevent>TrackEvent</a></code>
-    interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to
-    the new <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object,
-    at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
-    <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Return the new <code><a href=#texttrack>TextTrack</a></code> object.</p>
-
-   </li>
-
   </ol></div>
 
   <div class=example>
@@ -35580,8 +35601,7 @@
   <p>For the purposes of listing chapters in the <a href=#media-resource>media
   resource</a>, only <a href=#text-track title="text track">text tracks</a> in
   the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</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 whose
+  that are <a href=#text-track-showing title="text track showing">showing</a> and whose
   <a href=#text-track-kind>text track kind</a> is <code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> should be used.
   Such tracks must be interpreted according to the <a href=#rules-for-constructing-the-chapter-tree-from-a-text-track>rules for
   constructing the chapter tree from a text track</a>.</p>
@@ -98070,12 +98090,13 @@
 
   <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface
   to the user">exposing a user interface</a> for a
-  <code><a href=#the-video-element>video</a></code> element, the user agent should run the <a href=#rules-for-updating-the-text-track-rendering>rules
-  for updating the text track rendering</a> of each of the <a href=#text-track title="text track">text tracks</a> in the <code><a href=#the-video-element>video</a></code>
-  element's <a href=#list-of-text-tracks>list of text tracks</a> that are <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> (e.g., for <a href=#text-track title="text track">text tracks</a> based on
-  <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of
-  WebVTT text tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
+  <code><a href=#the-video-element>video</a></code> element, the user agent should run the
+  <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a> of each of
+  the <a href=#text-track title="text track">text tracks</a> in the
+  <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that
+  are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
+  the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+  tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
 
   <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code>
   elements does not interrupt video playback or clear the canvas.</p>

Modified: source
===================================================================
--- source	2012-09-07 21:52:27 UTC (rev 7326)
+++ source	2012-09-11 21:59:07 UTC (rev 7327)
@@ -306,6 +306,10 @@
    different text for web+, etc. I haven't fixed these yet since I
    expect the WHATWG to switch approach at some point soon too. -->
 
+   <li>The W3C HTML specification avoids mentioning
+   <code>MouseEventInit</code>, resulting in a different definition
+   for <code>DragEventInit</code>.</li>
+
   </ul>
 
   <p>The following sections are only published in the WHATWG
@@ -30717,11 +30721,10 @@
   format.</p>
 
   <p>The <code>video</code> element also <span>represents</span> any
-  <span title="text track cue">text track cues</span> whose
-  <span>text track cue active flag</span> is set and whose
-  <span>text track</span> is in the <span title="text track
-  showing">showing</span> or <span title="text track showing by
-  default">showing by default</span> modes.</p>
+  <span title="text track cue">text track cues</span> whose <span>text
+  track cue active flag</span> is set and whose <span>text
+  track</span> is in the <span title="text track
+  showing">showing</span> mode.</p>
 
   <p>In addition to the above, the user agent may provide messages to
   the user (such as "buffering", "no video loaded", "error", or more
@@ -34639,24 +34642,22 @@
    <li><p>Let <var title="">current cues</var> be a list of <span
    title="text track cue">cues</span>, initialized to contain all the
    <span title="text track cue">cues</span> of all the <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> <span title="text track">text
-   tracks</span> of the <span>media element</span> (not the <span
-   title="text track disabled">disabled</span> ones) whose <span
-   title="text track cue start time">start times</span> are less than
-   or equal to the <span>current playback position</span> and whose
-   <span title="text track cue end time">end times</span> are greater
-   than the <span>current playback position</span>.</p></li>
+   title="text track hidden">hidden</span> or <span title="text track
+   showing">showing</span> <span title="text track">text tracks</span>
+   of the <span>media element</span> (not the <span title="text track
+   disabled">disabled</span> ones) whose <span title="text track cue
+   start time">start times</span> are less than or equal to the
+   <span>current playback position</span> and whose <span title="text
+   track cue end time">end times</span> are greater than the
+   <span>current playback position</span>.</p></li>
 
    <li><p>Let <var title="">other cues</var> be a list of <span
    title="text track cue">cues</span>, initialized to contain all the
    <span title="text track cue">cues</span> of <span title="text track
-   hidden">hidden</span>, <span title="text track
-   showing">showing</span>, and <span title="text track showing by
-   default">showing by default</span> <span title="text track">text
-   tracks</span> of the <span>media element</span> that are not
-   present in <var title="">current cues</var>.</p></li>
+   hidden">hidden</span> and <span title="text track
+   showing">showing</span> <span title="text track">text tracks</span>
+   of the <span>media element</span> that are not present in <var
+   title="">current cues</var>.</p></li>
 
    <li><p>Let <var title="">last time</var> be the <span>current
    playback position</span> at the time this algorithm was last run
@@ -34836,12 +34837,10 @@
    <li><p>Run the <span>rules for updating the text track
    rendering</span> of each of the <span title="text track">text
    tracks</span> in <var title="">affected tracks</var> that are <span
-   title="text track showing">showing</span> or <span title="text
-   track showing by default">showing by default</span>.
-   For example, for <span title="text track">text tracks</span>
-   based on <span>WebVTT</span>, the <span>rules for updating the
-   display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a>
-   </p></li>
+   title="text track showing">showing</span>. For example, for <span
+   title="text track">text tracks</span> based on <span>WebVTT</span>,
+   the <span>rules for updating the display of WebVTT text
+   tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a> </p></li>
 
   </ol>
 
@@ -36909,7 +36908,6 @@
      </dd>
 
      <dt><dfn title="text track showing">Showing</dfn>
-     <dt><dfn title="text track showing by default">Showing by default</dfn>
 
      <dd>
 
@@ -36932,14 +36930,6 @@
       user can navigate to any point in the <span>media
       resource</span> by selecting a cue.</p>
 
-      <p>The <span title="text track showing by default">showing by
-      default</span> state is used in conjunction with the <code
-      title="attr-track-default">default</code> attribute on
-      <code>track</code> elements to indicate that the text track was
-      enabled due to that attribute. This allows the user agent to
-      override the state if a later track is discovered that is more
-      appropriate per the user's preferences.</p>
-
      </dd>
 
     </dl>
@@ -36973,19 +36963,22 @@
   <hr>
 
   <p>Each <span>media element</span> has a <dfn>list of pending text
-  tracks</dfn>, which must initially be empty, and a
-  <dfn>blocked-on-parser</dfn> flag, which must initially be false.
-  When the user agent is required to <dfn>populate the list of pending
-  text tracks</dfn> of a <span>media element</span>, the user agent
-  must add to the element's <span>list of pending text tracks</span>
-  each <span>text track</span> in the element's <span>list of text
-  tracks</span> whose <span>text track mode</span> is not <span
-  title="text track disabled">disabled</span> and whose <span>text
-  track readiness state</span> is <!--either <span title="text track
-  not loaded">not loaded</span> or [there can't be any in the 'not
-  loaded' state that are not 'disabled']--> <span title="text track
-  loading">loading</span>.</p>
+  tracks</dfn>, which must initially be empty, a
+  <dfn>blocked-on-parser</dfn> flag, which must initially be false,
+  and a <dfn>did-perform-automatic-track-selection</dfn> flag, which
+  must also initially be false.</p>
 
+  <p>When the user agent is required to <dfn>populate the list of
+  pending text tracks</dfn> of a <span>media element</span>, the user
+  agent must add to the element's <span>list of pending text
+  tracks</span> each <span>text track</span> in the element's
+  <span>list of text tracks</span> whose <span>text track mode</span>
+  is not <span title="text track disabled">disabled</span> and whose
+  <span>text track readiness state</span> is <!--either <span
+  title="text track not loaded">not loaded</span> or [there can't be
+  any in the 'not loaded' state that are not 'disabled']--> <span
+  title="text track loading">loading</span>.</p>
+
   <p>Whenever a <code>track</code> element's parent node changes, the
   user agent must remove the corresponding <span>text track</span>
   from any <span>list of pending text tracks</span> that it is in.</p>
@@ -37001,8 +36994,9 @@
   the element's <span>blocked-on-parser</span> flag to true. When a
   <span>media element</span> is popped off the <span>stack of open
   elements</span> of an <span>HTML parser</span> or <span>XML
-  parser</span>, the user agent must <span>populate the list of
-  pending text tracks</span> and set the element's
+  parser</span>, the user agent must <span>honor user preferences for
+  automatic text track selection</span>, <span>populate the list of
+  pending text tracks</span>, and set the element's
   <span>blocked-on-parser</span> flag to false.</p>
 
   <p>The <span title="text track">text tracks</span> of a <span>media
@@ -37117,8 +37111,9 @@
      cue</span>.</p></li>
 
      <li><p>If <var title="">cue</var> is not associated with a
-     <span>text track</span>, return &#x2212;1 and abort these
-     steps.</p></li>
+     <span>text track</span>, or if that <span>text track</span> is
+     not in the <span>list of text tracks</span> of a <span>media
+     element</span>, return &#x2212;1 and abort these steps.</p></li>
 
      <li><p>Let <var title="">track</var> be the <span>text
      track</span> that the <var title="">cue</var> is associated
@@ -37126,11 +37121,9 @@
 
      <li><p>Let <var title="">n</var> be the number of <span
      title="text track">text tracks</span> whose <span>text track
-     mode</span> is <span title="text track showing">showing</span> or
-     <span title="text track showing by default">showing by
-     default</span> and that are in the <span>media element</span>'s
-     <span>list of text tracks</span> before <var
-     title="">track</var>.</p></li>
+     mode</span> is <span title="text track showing">showing</span>
+     and that are in the <span>media element</span>'s <span>list of
+     text tracks</span> before <var title="">track</var>.</p></li>
 
      <li><p>Increment <var title="">n</var> by one.</p></li>
 
@@ -37211,17 +37204,15 @@
     title="dom-media-readyState">readyState</code> is changed back to
     <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>. When the
     flag is unset in this way for one or more cues in <span
-    title="text track">text tracks</span> that were <span
-    title="text track showing">showing</span> or <span title="text
-    track showing by default">showing by default</span> prior to the
-    relevant incident, the user agent must, after having unset the
-    flag for all the affected cues, apply the <span>rules for updating
-    the text track rendering</span> of those <span title="text
-    track">text tracks</span>.
-    For example, for <span title="text track">text tracks</span>
-    based on <span>WebVTT</span>, the <span>rules for updating the
-    display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
-   </dd>
+    title="text track">text tracks</span> that were <span title="text
+    track showing">showing</span> prior to the relevant incident, the
+    user agent must, after having unset the flag for all the affected
+    cues, apply the <span>rules for updating the text track
+    rendering</span> of those <span title="text track">text
+    tracks</span>. For example, for <span title="text track">text
+    tracks</span> based on <span>WebVTT</span>, the <span>rules for
+    updating the display of WebVTT text tracks</span>. <a
+    href="#refsWEBVTT">[WEBVTT]</a></p> </dd>
 
    <dt>The <dfn title="text track cue display state">display state</dfn>
    <dd>
@@ -37242,18 +37233,18 @@
   the <span title="text track cue">cues</span> by their <span>text
   track</span>, with the groups being sorted in the same order as
   their <span title="text track">text tracks</span> appear in the
-  <span>media element</span>'s <span>list of text tracks</span>;
-  then, within each group, <span title="text track cue">cues</span>
-  must be sorted by their <span title="text track cue start
-  time">start time</span>, earliest first; then, any <span
-  title="text track cue">cues</span> with the same <span title="text
-  track cue start time">start time</span> must be sorted by their
-  <span title="text track cue end time">end time</span>, latest
-  first; and finally, any <span title="text track cue">cues</span>
-  with identical <span title="text track cue end time">end
-  times</span> must be sorted in the order they were created (so
-  e.g. for cues from a <span>WebVTT</span> file, that would be the
-  order in which the cues were listed in the file). <a href="#refsWEBVTT">[WEBVTT]</a></p>
+  <span>media element</span>'s <span>list of text tracks</span>; then,
+  within each group, <span title="text track cue">cues</span> must be
+  sorted by their <span title="text track cue start time">start
+  time</span>, earliest first; then, any <span title="text track
+  cue">cues</span> with the same <span title="text track cue start
+  time">start time</span> must be sorted by their <span title="text
+  track cue end time">end time</span>, latest first; and finally, any
+  <span title="text track cue">cues</span> with identical <span
+  title="text track cue end time">end times</span> must be sorted in
+  the order they were created (so e.g. for cues from a
+  <span>WebVTT</span> file, that would be the order in which the cues
+  were listed in the file). <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
 
   <h6>Sourcing in-band text tracks</h6>
@@ -37396,11 +37387,11 @@
    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>
+   the data.</p></li> <!-- it's too late to apply the normal
+   heuristic, so we don't bother -->
 
    <li><p>Add the new <span>text track</span> to the <span>media
    element</span>'s <span>list of text tracks</span>.</p></li>
@@ -37429,6 +37420,9 @@
   of text tracks</span> all the <span title="media-resource-specific
   text track">media-resource-specific text tracks</span>.</p>
 
+  <!-- if, after in-band text tracks have been found, there's no
+  out-of-band text tracks, then apply user prefs? -->
+
   </div>
 
 
@@ -37487,6 +37481,11 @@
   <p class="note">Changes to the <span>track URL</span> are handled in
   the algorithm below.</p>
 
+  <p>The <span>text track readiness state</span> is initially <span
+  title="text track not loaded">not loaded</span>, and the <span>text
+  track mode</span> is initially <span title="text track
+  disabled">disabled</span>.</p>
+
   <p>The <span>text track list of cues</span> is initially empty. It
   is dynamically modified when the referenced file is parsed.
   Associated with the list are the <span>rules for updating the text
@@ -37522,115 +37521,150 @@
   <code title="dom-media-textTracks">textTracks</code> attribute's
   <code>TextTrackList</code> object.</p> <!-- removetrack -->
 
+  <hr>
+
   <p>When a <span>text track</span> corresponding to a
   <code>track</code> element is added to a <span>media
   element</span>'s <span>list of text tracks</span>, the user agent
-  must set the <span>text track mode</span> appropriately, as
-  determined by the following conditions:</p>
+  must <span>queue a task</span> to run the following steps for the
+  <span>media element</span>:</p>
 
-  <dl class="switch">
+  <ol>
 
-   <dt>If the <span>text track kind</span> is <code
-   title="dom-TextTrack-kind-subtitles">subtitles</code> or <code
-   title="dom-TextTrack-kind-captions">captions</code> and the user
-   has indicated an interest in having a track with this <span>text
-   track kind</span>, <span>text track language</span>, and
-   <span>text track label</span> enabled, and there is no other
-   <span>text track</span> in the <span>media element</span>'s
-   <span>list of text tracks</span> with a <span>text track
-   kind</span> of either <code
-   title="dom-TextTrack-kind-subtitles">subtitles</code> or <code
-   title="dom-TextTrack-kind-captions">captions</code> whose
-   <span>text track mode</span> is <span title="text track
-   showing">showing</span></dt>
+   <li><p>If the element's <span>blocked-on-parser</span> flag is
+   true, abort these steps.</p></li>
 
-   <dt>If the <span>text track kind</span> is <code
-   title="dom-TextTrack-kind-descriptions">descriptions</code> and
-   the user has indicated an interest in having text descriptions with
-   this <span>text track language</span> and <span>text track
-   label</span> enabled, and there is no other <span>text
-   track</span> in the <span>media element</span>'s <span>list of
-   text tracks</span> with a <span>text track kind</span> of <code
-   title="dom-TextTrack-kind-descriptions">descriptions</code> whose
-   <span>text track mode</span> is <span title="text track
-   showing">showing</span></dt>
+   <li><p>If the element's
+   <span>did-perform-automatic-track-selection</span> flag is true,
+   abort these steps.</p></li>
 
-   <dd>
-    <p>Let the <span>text track mode</span> be <span title="text
-    track showing">showing</span>.</p>
+   <li><p><span>Honor user preferences for automatic text track
+   selection</span> for this element.</p></li>
 
-    <p>If there is a <span>text track</span> in the <span>media
-    element</span>'s <span>list of text tracks</span> whose
-    <span>text track mode</span> is <span title="text track showing
-    by default">showing by default</span>, the user agent must
-    furthermore change <em>that</em> <span>text track</span>'s
-    <span>text track mode</span> to <span title="text track
-    hidden">hidden</span>.</p> <!-- so that we still get events and
-    stuff: we can expect authors to forget that default doesn't mean
-    that it'll always be turned on, and that they'll still rely on
-    events firing even if it doesn't show -->
+  </ol>
 
-   </dd>
+  <p>When the user agent is required to <dfn>honor user preferences
+  for automatic text track selection</dfn> for a <span>media
+  element</span>, the user agent must run the following steps:</p>
 
-   <dt>If the <span>text track kind</span> is <code
-   title="dom-TextTrack-kind-chapters">chapters</code> and the
-   <span>text track language</span> is one that the user agent has
-   reason to believe is appropriate for the user, and there is no
-   other <span>text track</span> in the <span>media element</span>'s
-   <span>list of text tracks</span> with a <span>text track
-   kind</span> of <code
-   title="dom-TextTrack-kind-chapters">chapters</code> whose
-   <span>text track mode</span> is <span title="text track
-   showing">showing</span></dt>
+  <ol>
 
-   <dd>
-    <p>Let the <span>text track mode</span> be <span title="text
-    track showing">showing</span>.</p>
-   </dd>
+   <li><p><span>Perform automatic text track selection</span> for <code
+   title="dom-TextTrack-kind-subtitles">subtitles</code> and <code
+   title="dom-TextTrack-kind-captions">captions</code>.</p></li>
 
-   <dt>If the <code>track</code> element has a <code
-   title="attr-track-default">default</code> attribute specified, and
-   there is no other <span>text track</span> in the <span>media
-   element</span>'s <span>list of text tracks</span> whose
-   <span>text track mode</span> is <span title="text track
-   showing">showing</span> or <span title="text track
-   showing by default">showing by default</span></dt>
+   <li><p><span>Perform automatic text track selection</span> for <code
+   title="dom-TextTrack-kind-descriptions">descriptions</code>.</p></li>
 
-   <dd>
-    <p>Let the <span>text track mode</span> be <span title="text
-    track showing by default">showing by default</span>.</p>
-   </dd>
+   <li><p><span>Perform automatic text track selection</span> for <code
+   title="dom-TextTrack-kind-chapters">chapters</code>.</p></li>
 
-   <dt>Otherwise</dt>
+   <li><p><span>Perform automatic text track selection</span> for <code
+   title="dom-TextTrack-kind-metadata">metadata</code>.</p></li>
 
-   <dd>
-    <p>Let the <span>text track mode</span> be <span title="text
-    track disabled">disabled</span>.</p>
-   </dd>
+   <li><p>Set the element's
+   <span>did-perform-automatic-track-selection</span> flag to
+   true.</p></li>
 
-  </dl>
+  </ol>
 
+  <p>When the steps above say to <dfn>perform automatic text track
+  selection</dfn> for one or more <span title="text track kind">text
+  track kinds</span>, it means to run the following steps:</p>
+
+  <ol>
+
+   <li><p>Let <var title="">candidates</var> be a list consisting of
+   the <span title="text track">text tracks</span> in the <span>media
+   element</span>'s <span>list of text tracks</span> whose <span>text
+   track kind</span> is one of the kinds that were passed to the
+   algorithm, if any.</p></li>
+
+   <li><p>If <var title="">candidates</var> is empty, then abort these
+   steps.</p></li>
+
+   <li><p>If any of the <span title="text track">text tracks</span> in
+   <var title="">candidates</var> have a <span>text track mode</span>
+   set to <span title="text track showing">showing</span>, abort these
+   steps.</p></li>
+
+   <li>
+
+    <p>If the user has expressed an interest in having a track from
+    <var title="">candidates</var> enabled based on its <span>text
+    track kind</span>, <span>text track language</span>, and
+    <span>text track label</span>, then set its <span>text track
+    mode</span> to <span title="text track
+    showing">showing</span>.</p>
+
+    <p class="note">For example, the user could have set a browser
+    preference to the effect of "I want French captions whenever
+    possible", or "If there is a subtitle track with 'Commentary' in
+    the title, enable it", or "If there are audio description tracks
+    available, enable one, ideally in Swiss German, but failing that
+    in Standard Swiss German or Standard German".</p>
+
+   </li>
+
+   <li><p>If there are any <span title="text track">text tracks</span>
+   in <var title="">candidates</var> that correspond to
+   <code>track</code> elements with a <code
+   title="attr-track-default">default</code> attribute set whose
+   <span>text track mode</span> is set to <span title="text track
+   disabled">disabled</span>, then set the <span>text track
+   mode</span> of each such track to <span title="text track
+   hidden">hidden</span>.</p> <!-- so that we still get events and
+   stuff: we can expect authors to forget that default doesn't mean
+   that it'll always be turned on, and that they'll still rely on
+   events firing even if it doesn't show -->
+
+  </ol>
+
   <p>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 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 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>
+  <code>track</code> element experiences any of the following
+  circumstances, the user agent must <span>start the
+  <code>track</code> processing model</span> for that <span>text
+  track</span> and its <code>track</code> element:
 
+  <ul>
+
+   <li>The <code>track</code> element is created.</li>
+
+   <li>The <span>text track</span> has its <span>text track
+   mode</span> changed.</li>
+
+   <li>The <code>track</code> element's parent element changes and the
+   new parent is a <span>media element</span>.</li>
+
+  </ul>
+
+  <p>When a user agent is to <dfn>start the <code>track</code>
+  processing model</dfn> for a <span>text track</span> and its
+  <code>track</code> element, it must 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>If another occurrence of this algorithm is already running
+   for this <span>text track</span> and its <code>track</code>
+   element, abort these steps, letting that other algorithm take care
+   of this element.</p></li>
+
+   <li><p>If the <span>text track</span>'s <span>text track
+   mode</span> is not set to one of <span title="text track
+   hidden">hidden</span> or <span title="text track
+   showing">showing</span>, abort these steps.</p></li>
+
+   <li><p>If the <span>text track</span>'s <code>track</code> element
+   does not have a <span>media element</span> as a parent, abort these
+   steps.</p></li>
+
+   <li><p>Run the remainder of these steps asynchronously, allowing
+   whatever caused these steps to run to continue.</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
@@ -37642,6 +37676,13 @@
    <li><p>&#x231B; Let <var title="">URL</var> be the <span>track
    URL</span> of the <code>track</code> element.</p></li>
 
+   <li><p>&#x231B; If the <code>track</code> element's parent is a
+   <span>media element</span> then let <var title="">CORS mode</var>
+   be the state of the parent <span>media element</span>'s <code
+   title="attr-media-crossorigin">crossorigin</code> content
+   attribute. Otherwise, let <var title="">CORS mode</var> be <span
+   title="attr-crossorigin-none">No CORS</span>.</p></li>
+
    <li><p>End the <span>synchronous section</span>, continuing the
    remaining steps asynchronously.</p></li>
 
@@ -37649,11 +37690,9 @@
 
     <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
-    <span>media element</span>'s <code
-    title="attr-media-crossorigin">crossorigin</code> content
-    attribute, the <i title="">origin</i> being the
-    <span>origin</span> of the <span>media element</span>'s
+    title="">URL</var>, with the <i>mode</i> being <var title="">CORS
+    mode</var>, the <i title="">origin</i> being the
+    <span>origin</span> of the <code>track</code> element's
     <code>Document</code>, and the <i>default origin behaviour</i> set
     to <i>fail</i>.</p>
 
@@ -37700,7 +37739,7 @@
     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 run these steps:
+    supported text track format, then run these steps:</p>
 
     <ol>
 
@@ -37717,9 +37756,8 @@
      <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>
+     hidden">hidden</span> or <span title="text track
+     showing">showing</span>.</p></li>
 
      <li><p>Jump to the step labeled <i>top</i>.</p></li>
 
@@ -37754,9 +37792,8 @@
      <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>
+     hidden">hidden</span> or <span title="text track
+     showing">showing</span>.</p></li>
 
      <li><p>Jump back to the step labeled <i>top</i>.</p></li>
 
@@ -37770,16 +37807,13 @@
      <li>the <span>track URL</span> changes so that it is no longer
      equal to <var title="">URL</var>, while 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>; or</li>
+     hidden">hidden</span> or <span title="text track
+     showing">showing</span>; or</li>
 
-     <li>the <span>text track mode</span> changes 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>, while the
-     <span>track URL</span> is not equal to <var
-     title="">URL</var></li>
+     <li>the <span>text track mode</span> changes to <span title="text
+     track hidden">hidden</span> or <span title="text track
+     showing">showing</span>, while the <span>track URL</span> is not
+     equal to <var title="">URL</var></li>
 
     </ul>
 
@@ -37967,6 +38001,11 @@
 
   <dl class="domintro">
 
+   <dt><var title="">textTrack</var> = <var title="">media</var> . <code title="dom-media-addTextTrack">addTextTrack</code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
+   <dd>
+    <p>Creates and returns a new <code>TextTrack</code> object, which is also added to the <span>media element</span>'s <span>list of text tracks</span>.</p>
+   </dd>
+
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-kind">kind</code></dt>
    <dd>
     <p>Returns the <span>text track kind</span> string.</p>
@@ -38005,7 +38044,7 @@
      </dd>
      <dt>"<code title="dom-TextTrack-showing">showing</code>"</dt>
      <dd>
-      <p>The <span>text track showing</span> and <span title="text track showing by default">showing by default</span> modes.</p>
+      <p>The <span>text track showing</span> mode.</p>
      </dd>
     </dl>
     <p>Can be set, to change the mode.</p>
@@ -38033,15 +38072,104 @@
     <p>Throws an exception if the argument is associated with another <span>text track</span> or not in the list of cues.</p>
    </dd>
 
-   <dt><var title="">textTrack</var> = <var title="">media</var> . <code title="dom-media-addTextTrack">addTextTrack</code>( <var title="">kind</var> [, <var title="">label</var> [, <var title="">language</var> ] ] )</dt>
-   <dd>
-    <p>Creates and returns a new <code>TextTrack</code> object, which is also added to the <span>media element</span>'s <span>list of text tracks</span>.</p>
-   </dd>
-
   </dl>
 
   <div class="impl">
 
+  <p>The <dfn title="dom-media-addTextTrack"><code>addTextTrack(<var
+  title="">kind</var>, <var title="">label</var>, <var
+  title="">language</var>)</code></dfn> method of <span title="media
+  element">media elements</span>, when invoked, must run the following
+  steps:</p>
+
+  <ol>
+
+   <li>
+
+    <p>If <var title="">kind</var> is not one of the following
+    strings, then throw a <code>SyntaxError</code> exception and abort
+    these steps:</p>
+
+    <ul class="brief">
+     <li><code title="dom-TextTrack-kind-subtitles">subtitles</code>
+     <li><code title="dom-TextTrack-kind-captions">captions</code>
+     <li><code title="dom-TextTrack-kind-descriptions">descriptions</code>
+     <li><code title="dom-TextTrack-kind-chapters">chapters</code>
+     <li><code title="dom-TextTrack-kind-metadata">metadata</code>
+    </ul>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title="">label</var> argument was omitted, let <var
+    title="">label</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title="">language</var> argument was omitted, let
+    <var title="">language</var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <code>TextTrack</code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <span>text track</span> corresponding to the new
+    object, and set its <span>text track kind</span> to <var
+    title="">kind</var>, its <span>text track label</span> to <var
+    title="">label</var>, its <span>text track language</span> to <var
+    title="">language</var>, its <span>text track readiness
+    state</span> to the <span>text track loaded</span> state, its
+    <span>text track mode</span> to the <span>text track hidden</span>
+    mode, and its <span>text track list of cues</span> to an empty
+    list.
+    Associate the <span>text track list of cues</span> with the
+    <span>rules for updating the display of WebVTT text tracks</span>
+    as its <span>rules for updating the text track rendering</span>.
+    <a href="#refsWEBVTT">[WEBVTT]</a>
+    </p>
+
+   </li>
+
+   <li>
+
+    <p>Add the new <span>text track</span> to the <span>media
+    element</span>'s <span>list of text tracks</span>.</p>
+
+   </li>
+
+   <li>
+
+    <p><span>Queue a task</span> to fire an event with the name <code
+    title="event-addtrack">addtrack</code>, that does not bubble and
+    is not cancelable, and that uses the <code>TrackEvent</code>
+    interface, with the <code
+    title="dom-TrackEvent-track">track</code> attribute initialized to
+    the new <span>text track</span>'s <code>TextTrack</code> object,
+    at the <span>media element</span>'s <code
+    title="dom-media-textTracks">textTracks</code> attribute's
+    <code>TextTrackList</code> object.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return the new <code>TextTrack</code> object.</p>
+
+   </li>
+
+  </ol>
+
+  <hr>
+
   <p>The <dfn title="dom-TextTrack-kind"><code>kind</code></dfn>
   attribute must return the <span>text track kind</span> of the
   <span>text track</span> that the <code>TextTrack</code> object
@@ -38076,7 +38204,7 @@
    <dt>"<dfn title="dom-TextTrack-hidden"><code>hidden</code></dfn>"</dt>
    <dd>The <span>text track hidden</span> mode.</dd>
    <dt>"<dfn title="dom-TextTrack-showing"><code>showing</code></dfn>"</dt>
-   <dd>The <span>text track showing</span> and <span title="text track showing by default">showing by default</span> modes.</dd>
+   <dd>The <span>text track showing</span> mode.</dd>
   </dl>
 
   <p>On setting, if the new value isn't equal to what the attribute
@@ -38117,12 +38245,6 @@
 
   </dl>
 
-  <p class="note">If the mode is <span title="text track showing by
-  default">showing by default</span>, then there is no way to change
-  it to <span title="text track showing">showing</span> without first
-  changing it to <span title="text track disabled">disabled</span> or
-  <span title="text track hidden">hidden</span>.</p>
-
   <p>If the <span>text track mode</span> of the <span>text
   track</span> that the <code>TextTrack</code> object represents is
   not the <span>text track disabled</span> mode, then the <dfn
@@ -38211,100 +38333,6 @@
 
   </ol>
 
-  <hr>
-
-  <p>The <dfn title="dom-media-addTextTrack"><code>addTextTrack(<var
-  title="">kind</var>, <var title="">label</var>, <var
-  title="">language</var>)</code></dfn> method of <span title="media
-  element">media elements</span>, when invoked, must run the following
-  steps:</p>
-
-  <ol>
-
-   <li>
-
-    <p>If <var title="">kind</var> is not one of the following
-    strings, then throw a <code>SyntaxError</code> exception and abort
-    these steps:</p>
-
-    <ul class="brief">
-     <li><code title="dom-TextTrack-kind-subtitles">subtitles</code>
-     <li><code title="dom-TextTrack-kind-captions">captions</code>
-     <li><code title="dom-TextTrack-kind-descriptions">descriptions</code>
-     <li><code title="dom-TextTrack-kind-chapters">chapters</code>
-     <li><code title="dom-TextTrack-kind-metadata">metadata</code>
-    </ul>
-
-   </li>
-
-   <li>
-
-    <p>If the <var title="">label</var> argument was omitted, let <var
-    title="">label</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>If the <var title="">language</var> argument was omitted, let
-    <var title="">language</var> be the empty string.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <code>TextTrack</code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Create a new <span>text track</span> corresponding to the new
-    object, and set its <span>text track kind</span> to <var
-    title="">kind</var>, its <span>text track label</span> to <var
-    title="">label</var>, its <span>text track language</span> to <var
-    title="">language</var>, its <span>text track readiness
-    state</span> to the <span>text track loaded</span> state, its
-    <span>text track mode</span> to the <span>text track hidden</span>
-    mode, and its <span>text track list of cues</span> to an empty
-    list.
-    Associate the <span>text track list of cues</span> with the
-    <span>rules for updating the display of WebVTT text tracks</span>
-    as its <span>rules for updating the text track rendering</span>.
-    <a href="#refsWEBVTT">[WEBVTT]</a>
-    </p>
-
-   </li>
-
-   <li>
-
-    <p>Add the new <span>text track</span> to the <span>media
-    element</span>'s <span>list of text tracks</span>.</p>
-
-   </li>
-
-   <li>
-
-    <p><span>Queue a task</span> to fire an event with the name <code
-    title="event-addtrack">addtrack</code>, that does not bubble and
-    is not cancelable, and that uses the <code>TrackEvent</code>
-    interface, with the <code
-    title="dom-TrackEvent-track">track</code> attribute initialized to
-    the new <span>text track</span>'s <code>TextTrack</code> object,
-    at the <span>media element</span>'s <code
-    title="dom-media-textTracks">textTracks</code> attribute's
-    <code>TextTrackList</code> object.</p>
-
-   </li>
-
-   <li>
-
-    <p>Return the new <code>TextTrack</code> object.</p>
-
-   </li>
-
-  </ol>
-
   </div>
 
   <div class="example">
@@ -39031,7 +39059,6 @@
    <li><dfn>Text track kind</dfn>
    <li><dfn>Text track mode</dfn>
    <li><dfn>Text track showing</dfn>
-   <li><dfn>Text track showing by default</dfn>
    <li><dfn>Text track cue</dfn>
    <li><dfn>Text track list of cues</dfn>
    <li><dfn>Text track cue order</dfn>
@@ -41408,8 +41435,7 @@
   <p>For the purposes of listing chapters in the <span>media
   resource</span>, only <span title="text track">text tracks</span> in
   the <span>media element</span>'s <span>list of text tracks</span>
-  <span title="text track showing">showing</span> or <span title="text
-  track showing by default">showing by default</span> and whose
+  that are <span title="text track showing">showing</span> and whose
   <span>text track kind</span> is <code
   title="dom-TextTrack-kind-chapters">chapters</code> should be used.
   Such tracks must be interpreted according to the <span>rules for
@@ -113399,15 +113425,14 @@
 
   <p>When the user agent starts <span title="expose a user interface
   to the user">exposing a user interface</span> for a
-  <code>video</code> element, the user agent should run the <span>rules
-  for updating the text track rendering</span> of each of the <span
-  title="text track">text tracks</span> in the <code>video</code>
-  element's <span>list of text tracks</span> that are <span
-  title="text track showing">showing</span> or <span title="text
-  track showing by default">showing by default</span> (e.g., for <span
-  title="text track">text tracks</span> based on
-  <span>WebVTT</span>, the <span>rules for updating the display of
-  WebVTT text tracks</span>). <a href="#refsWEBVTT">[WEBVTT]</a></p>
+  <code>video</code> element, the user agent should run the
+  <span>rules for updating the text track rendering</span> of each of
+  the <span title="text track">text tracks</span> in the
+  <code>video</code> element's <span>list of text tracks</span> that
+  are <span title="text track showing">showing</span> (e.g., for <span
+  title="text track">text tracks</span> based on <span>WebVTT</span>,
+  the <span>rules for updating the display of WebVTT text
+  tracks</span>). <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p class="note">Resizing <code>video</code> and <code>canvas</code>
   elements does not interrupt video playback or clear the canvas.</p>
@@ -113476,8 +113501,7 @@
    as their <span>rules for updating the text track rendering</span>
    these <span>rules for updating the display of WebVTT text
    tracks</span>, and whose <span>text track mode</span> is <span
-   title="text track showing">showing</span> or <span title="text
-   track showing by default">showing by default</span>.</p></li>
+   title="text track showing">showing</span>.</p></li>
 
    <li><p>Let <var title="">cues</var> be an empty list of <span
    title="text track cue">text track cues</span>.</p></li>




More information about the Commit-Watchers mailing list