Skip to content
Permalink
Browse files

[giow] (0) Captions - Stage 11: Work on sourcing out-of-band tracks

git-svn-id: http://svn.whatwg.org/webapps@5096 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed May 12, 2010
1 parent c6fc22b commit 179835888de5ede8183ea56399f389ae29709269
Showing with 294 additions and 163 deletions.
  1. +90 −50 complete.html
  2. +90 −50 index
  3. +114 −63 source

</div>

<div class=impl>

<p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
associated with a new <a href=#timed-track>timed track</a> and its corresponding
new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>

<p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
according to the following table; for a state given in a cell of the
first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
string given in the second column:</p>

<table><thead><tr><th>State
<th>String
<tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
<td><code title=dom-track-kind-subtitles>subtitles</code>
<tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
<td><code title=dom-track-kind-captions>captions</code>
<tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
<td><code title=dom-track-kind-descriptions>descriptions</code>
<tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
<td><code title=dom-track-kind-chapters>chapters</code>
<tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
<td><code title=dom-track-kind-metadata>metadata</code>
</table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
label</a>.</p>

<p>The <a href=#timed-track-language>timed track language</a> is the element's
<a href=#track-language>track language</a>, if any, or the empty string
otherwise.</p>

<p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
removed, or changed, the <a href=#timed-track>timed track</a> must update
accordingly, as per the definitions above.</p>

<p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
thereto. (blocked on defining how the mode is updated and how it
affects track loading)</p>

<p class=XXX>...cues! state! mode!</p>

</div>

<dl class=domintro><dt><var title="">track</var> . <code title=dom-track-track><a href=#dom-track-track>track</a></code></dt>

<dd>

<p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
track</a> that corresponds to data found in the <a href=#media-resource>media
resource</a>. Rules for processing and rendering such data are
defined by the relevant specifications, e.g. the specification of
the video format if the <a href=#media-resource>media resource</a> is a video.</p>
resource</a>.</p>


<div class=impl>

<p>Rules for processing and rendering such data are defined by the
relevant specifications, e.g. the specification of the video format
if the <a href=#media-resource>media resource</a> is a video.</p>

<p>When a <a href=#media-resource>media resource</a> contains data that the user
agent recognises and supports as being equivalent to a <a href=#timed-track>timed
of timed tracks</a> all the <a href=#media-resource-specific-timed-track title="media-resource-specific
timed track">media-resource-specific timed tracks</a>.</p>

</div>



<div class=impl>

<h6 id=sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</h6>

<p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
associated with a new <a href=#timed-track>timed track</a> and its corresponding
new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>

<p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
according to the following table; for a state given in a cell of the
first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
string given in the second column:</p>

<table><thead><tr><th>State
<th>String
<tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
<td><code title=dom-track-kind-subtitles>subtitles</code>
<tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
<td><code title=dom-track-kind-captions>captions</code>
<tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
<td><code title=dom-track-kind-descriptions>descriptions</code>
<tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
<td><code title=dom-track-kind-chapters>chapters</code>
<tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
<td><code title=dom-track-kind-metadata>metadata</code>
</table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
label</a>.</p>

<p>The <a href=#timed-track-language>timed track language</a> is the element's
<a href=#track-language>track language</a>, if any, or the empty string
otherwise.</p>

<p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
removed, or changed, the <a href=#timed-track>timed track</a> must update
accordingly, as per the definitions above.</p>

<p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
the algorithm below.</p>

<p class=XXX>...cues...</p>

<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
the new parent is a <a href=#media-element>media element</a>, then add the
<code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
the old parent was a <a href=#media-element>media element</a>, then remove the
<code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
tracks</a>.</p>

<p class=XXX>...manage the <a href=#timed-track-readiness-state>timed track readiness
state</a> and the <a href=#timed-track-mode>timed track mode</a>;
<a href=#fetch>fetch</a> the file as necessary</p>
<p>When a <a href=#timed-track>timed track</a> corresponding to a
<code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, <span class=XXX>update the mode appropriately</span>.</p>

<p>When a <a href=#timed-track>timed track</a> corresponding to a
<code><a href=#the-track-element>track</a></code> element is created or changes its <a href=#timed-track-mode>timed
track mode</a>, the user agent must immediately and synchronously
run the appropriate steps from the following list:</p>

<!-- XXX manage the <span>timed track readiness state</span> and the
<span>timed track mode</span>; <span>fetch</span> the file as
necessary -->

<dl class=switch><dt>If the <a href=#timed-track-readiness-state>timed track readiness state</a> is <a href=#timed-track-not-loaded title="timed track not loaded">not loaded</a> and the
<a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-hidden title="timed track
hidden">hidden</a> or <a href=#timed-track-showing title="timed track
showing">showing</a></dt>

<dd>

<ol><li><p>Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to <a href=#timed-track-loading title="timed track loading">loading</a>.</li>

<li><p>Asynchronously run the remaining steps, while continuing
with whatever task was responsible for creating the <a href=#timed-track>timed
track</a> or changing the <a href=#timed-track-mode>timed track
mode</a>.</li>

<li><p class=XXX>...</li>

</ol><p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
thereto</p>

</dd>

</dl></div>


<div class=impl>

<h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
<a href=#timed-track-cue title="timed track cue">timed track cues</a></h6>

<p class=XXX>...</p>

</div>


<h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>

140 index

</div>

<div class=impl>

<p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
associated with a new <a href=#timed-track>timed track</a> and its corresponding
new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>

<p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
according to the following table; for a state given in a cell of the
first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
string given in the second column:</p>

<table><thead><tr><th>State
<th>String
<tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
<td><code title=dom-track-kind-subtitles>subtitles</code>
<tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
<td><code title=dom-track-kind-captions>captions</code>
<tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
<td><code title=dom-track-kind-descriptions>descriptions</code>
<tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
<td><code title=dom-track-kind-chapters>chapters</code>
<tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
<td><code title=dom-track-kind-metadata>metadata</code>
</table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
label</a>.</p>

<p>The <a href=#timed-track-language>timed track language</a> is the element's
<a href=#track-language>track language</a>, if any, or the empty string
otherwise.</p>

<p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
removed, or changed, the <a href=#timed-track>timed track</a> must update
accordingly, as per the definitions above.</p>

<p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
thereto. (blocked on defining how the mode is updated and how it
affects track loading)</p>

<p class=XXX>...cues! state! mode!</p>

</div>

<dl class=domintro><dt><var title="">track</var> . <code title=dom-track-track><a href=#dom-track-track>track</a></code></dt>

<dd>

<p>A <dfn id=media-resource-specific-timed-track>media-resource-specific timed track</dfn> is a <a href=#timed-track>timed
track</a> that corresponds to data found in the <a href=#media-resource>media
resource</a>. Rules for processing and rendering such data are
defined by the relevant specifications, e.g. the specification of
the video format if the <a href=#media-resource>media resource</a> is a video.</p>
resource</a>.</p>


<div class=impl>

<p>Rules for processing and rendering such data are defined by the
relevant specifications, e.g. the specification of the video format
if the <a href=#media-resource>media resource</a> is a video.</p>

<p>When a <a href=#media-resource>media resource</a> contains data that the user
agent recognises and supports as being equivalent to a <a href=#timed-track>timed
of timed tracks</a> all the <a href=#media-resource-specific-timed-track title="media-resource-specific
timed track">media-resource-specific timed tracks</a>.</p>

</div>



<div class=impl>

<h6 id=sourcing-out-of-band-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing out-of-band timed tracks</h6>

<p>When a <code><a href=#the-track-element>track</a></code> element is created, it must be
associated with a new <a href=#timed-track>timed track</a> and its corresponding
new <code><a href=#timedtrack>TimedTrack</a></code> object.</p>

<p>The <a href=#timed-track-kind>timed track kind</a> is determined from the state of
the element's <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code> attribute
according to the following table; for a state given in a cell of the
first column, the <a href=#timed-track-kind title="timed track kind">kind</a> is the
string given in the second column:</p>

<table><thead><tr><th>State
<th>String
<tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a>
<td><code title=dom-track-kind-subtitles>subtitles</code>
<tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a>
<td><code title=dom-track-kind-captions>captions</code>
<tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a>
<td><code title=dom-track-kind-descriptions>descriptions</code>
<tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a>
<td><code title=dom-track-kind-chapters>chapters</code>
<tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a>
<td><code title=dom-track-kind-metadata>metadata</code>
</table><p>The <a href=#timed-track-label>timed track label</a> is the element's <a href=#track-label>track
label</a>.</p>

<p>The <a href=#timed-track-language>timed track language</a> is the element's
<a href=#track-language>track language</a>, if any, or the empty string
otherwise.</p>

<p>As the <code title=attr-track-kind><a href=#attr-track-kind>kind</a></code>, <code title=attr-track-label><a href=#attr-track-label>label</a></code>, and <code title=attr-track-srclang><a href=#attr-track-srclang>srclang</a></code> attributes are added,
removed, or changed, the <a href=#timed-track>timed track</a> must update
accordingly, as per the definitions above.</p>

<p class=note>Changes to the <a href=#track-url>track URL</a> are handled in
the algorithm below.</p>

<p class=XXX>...cues...</p>

<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
the new parent is a <a href=#media-element>media element</a>, then add the
<code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
the old parent was a <a href=#media-element>media element</a>, then remove the
<code><a href=#the-track-element>track</a></code> element's corresponding <a href=#timed-track>timed track</a>
to the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
from the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed
tracks</a>.</p>

<p class=XXX>...manage the <a href=#timed-track-readiness-state>timed track readiness
state</a> and the <a href=#timed-track-mode>timed track mode</a>;
<a href=#fetch>fetch</a> the file as necessary</p>
<p>When a <a href=#timed-track>timed track</a> corresponding to a
<code><a href=#the-track-element>track</a></code> element is added to a <a href=#media-element>media
element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, <span class=XXX>update the mode appropriately</span>.</p>

<p>When a <a href=#timed-track>timed track</a> corresponding to a
<code><a href=#the-track-element>track</a></code> element is created or changes its <a href=#timed-track-mode>timed
track mode</a>, the user agent must immediately and synchronously
run the appropriate steps from the following list:</p>

<!-- XXX manage the <span>timed track readiness state</span> and the
<span>timed track mode</span>; <span>fetch</span> the file as
necessary -->

<dl class=switch><dt>If the <a href=#timed-track-readiness-state>timed track readiness state</a> is <a href=#timed-track-not-loaded title="timed track not loaded">not loaded</a> and the
<a href=#timed-track-mode>timed track mode</a> is <a href=#timed-track-hidden title="timed track
hidden">hidden</a> or <a href=#timed-track-showing title="timed track
showing">showing</a></dt>

<dd>

<ol><li><p>Set the <a href=#timed-track-readiness-state>timed track readiness state</a> to <a href=#timed-track-loading title="timed track loading">loading</a>.</li>

<li><p>Asynchronously run the remaining steps, while continuing
with whatever task was responsible for creating the <a href=#timed-track>timed
track</a> or changing the <a href=#timed-track-mode>timed track
mode</a>.</li>

<li><p class=XXX>...</li>

</ol><p class=XXX>Handle the <a href=#track-url>track URL</a> and changes
thereto</p>

</dd>

</dl></div>


<div class=impl>

<h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span class=secno>4.8.10.10.4 </span><dfn>Guidelines for exposing cues</dfn> in various formats as
<a href=#timed-track-cue title="timed track cue">timed track cues</a></h6>

<p class=XXX>...</p>

</div>


<h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>

0 comments on commit 1798358

Please sign in to comment.
You can’t perform that action at this time.