Skip to content

Commit

Permalink
[giow] (0) Captions - Stage 20.1: wip for API definitions.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@5137 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 8, 2010
1 parent 472a105 commit 804835d
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 83 deletions.
110 changes: 75 additions & 35 deletions complete.html
Expand Up @@ -209,7 +209,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 7 July 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 8 July 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -23817,7 +23817,7 @@ <h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4>
attribute boolean <a href=#dom-media-muted title=dom-media-muted>muted</a>;
<!--TT-->
// timed tracks
readonly attribute <a href=#timedtrack>TimedTrack</a>[] <span title=dom-media-tracks>tracks</span>;
readonly attribute <a href=#timedtrack>TimedTrack</a>[] <a href=#dom-media-tracks title=dom-media-tracks>tracks</a>;
<a href=#mutabletimedtrack>MutableTimedTrack</a> <span title=dom-media-addTrack>addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
<!--TT-->
};</pre>
Expand Down Expand Up @@ -26701,41 +26701,47 @@ <h6 id=guidelines-for-exposing-cues-in-various-formats-as-timed-track-cues><span

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

<dl class=domintro><dt><var title="">media</var> . <code title=dom-media-tracks>tracks</code> . <code title="">length</code></dt>
<dl class=domintro><dt><var title="">media</var> . <code title=dom-media-tracks><a href=#dom-media-tracks>tracks</a></code> . <code title="">length</code></dt>
<dd>
<p>Returns the number of timed tracks associated with the element (e.g. from <code><a href=#the-track-element>track</a></code> elements).</p>
<p>Returns the number of <a href=#timed-track title="timed track">timed tracks</a> associated with the <a href=#media-element>media element</a> (e.g. from <code><a href=#the-track-element>track</a></code> elements). This is the number of <a href=#timed-track title="timed track">timed tracks</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
</dd>

<dt><var title="">media</var> . <code title=dom-media-tracks>tracks[</code> <var title="">n</var> <code title="">]</code></dt>
<dt><var title="">media</var> . <code title=dom-media-tracks><a href=#dom-media-tracks>tracks[</a></code> <var title="">n</var> <code title="">]</code></dt>
<dd>
<p>Returns the <code><a href=#timedtrack>TimedTrack</a></code> object representing the <var title="">n</var>th timed track.</p>
<p>Returns the <code><a href=#timedtrack>TimedTrack</a></code> object representing the <var title="">n</var>th <a href=#timed-track>timed track</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>
</dd>

<dt><var title="">track</var> . <code title=dom-track-track><a href=#dom-track-track>track</a></code></dt>
<dd>
<p>Returns the <code><a href=#timedtrack>TimedTrack</a></code> object representing the <code><a href=#the-track-element>track</a></code> element's timed track.</p>
<p>Returns the <code><a href=#timedtrack>TimedTrack</a></code> object representing the <code><a href=#the-track-element>track</a></code> element's <a href=#timed-track>timed track</a>.</p>
</dd>

</dl><div class=impl>

<!-- XXX
- readonly attribute <span>TimedTrack</span>[] <span title="dom-media-tracks">tracks</span>
-->
<p>The <dfn id=dom-media-tracks title=dom-media-tracks><code>tracks</code></dfn>
attribute of <a href=#media-element title="media element">media elements</a> must
return an <span title="array host objects">array host object</span>
for objects of type <code><a href=#timedtrack>TimedTrack</a></code> that is <i>fixed
length</i> and <i>read only</i>. The same object must be returned
each time the attribute is accessed. <a href=#refsWEBIDL>[WEBIDL]</a></p>

<p class=XXX>...</p>
<p>The array must contain the <code><a href=#timedtrack>TimedTrack</a></code> objects of the
<a href=#timed-track title="timed track">timed tracks</a> in the <a href=#media-element>media
element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>, in the same
order as in the <a href=#list-of-timed-tracks>list of timed tracks</a>.</p>

</div>

<hr><pre class=idl>interface <dfn id=timedtrack>TimedTrack</dfn> {
readonly attribute DOMString <span title=dom-TimedTrack-kind>kind</span>;
readonly attribute DOMString <span title=dom-TimedTrack-label>label</span>;
readonly attribute DOMString <span title=dom-TimedTrack-language>language</span>;

const unsigned short <span title=dom-TimedTrack-NONE>NONE</span> = 0;
const unsigned short <span title=dom-TimedTrack-LOADING>LOADING</span> = 1;
const unsigned short <span title=dom-TimedTrack-LOADED>LOADED</span> = 2;
const unsigned short <span title=dom-TimedTrack-ERROR>ERROR</span> = 3;
readonly attribute unsigned short <span title=dom-TimedTrack-readyState>readyState</span>;
readonly attribute DOMString <a href=#dom-timedtrack-kind title=dom-TimedTrack-kind>kind</a>;
readonly attribute DOMString <a href=#dom-timedtrack-label title=dom-TimedTrack-label>label</a>;
readonly attribute DOMString <a href=#dom-timedtrack-language title=dom-TimedTrack-language>language</a>;

const unsigned short <a href=#dom-timedtrack-none title=dom-TimedTrack-NONE>NONE</a> = 0;
const unsigned short <a href=#dom-timedtrack-loading title=dom-TimedTrack-LOADING>LOADING</a> = 1;
const unsigned short <a href=#dom-timedtrack-loaded title=dom-TimedTrack-LOADED>LOADED</a> = 2;
const unsigned short <a href=#dom-timedtrack-error title=dom-TimedTrack-ERROR>ERROR</a> = 3;
readonly attribute unsigned short <a href=#dom-timedtrack-readystate title=dom-TimedTrack-readyState>readyState</a>;
readonly attribute <a href=#function>Function</a> <a href=#handler-timedtrack-onload title=handler-TimedTrack-onload>onload</a>;
readonly attribute <a href=#function>Function</a> <a href=#handler-timedtrack-onerror title=handler-TimedTrack-onerror>onerror</a>;

Expand All @@ -26750,38 +26756,38 @@ <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>
readonly attribute <a href=#function>Function</a> <a href=#handler-timedtrack-oncuechange title=handler-TimedTrack-oncuechange>oncuechange</a>;
};</pre>

<dl class=domintro><dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-kind>kind</code></dt>
<dl class=domintro><dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-kind><a href=#dom-timedtrack-kind>kind</a></code></dt>
<dd>
<p>Returns the <a href=#timed-track-kind>timed track kind</a> string.</p>
</dd>

<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-label>label</code></dt>
<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-label><a href=#dom-timedtrack-label>label</a></code></dt>
<dd>
<p>Returns the <a href=#timed-track-label>timed track label</a>.</p>
</dd>

<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-language>language</code></dt>
<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-language><a href=#dom-timedtrack-language>language</a></code></dt>
<dd>
<p>Returns the <a href=#timed-track-language>timed track language</a> string.</p>
</dd>

<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-readyState>readyState</code></dt>
<dt><var title="">timedTrack</var> . <code title=dom-TimedTrack-readyState><a href=#dom-timedtrack-readystate>readyState</a></code></dt>
<dd>
<p>Returns the <a href=#timed-track-readiness-state>timed track readiness state</a>,
represented by a number from the following list:</p>
<dl><dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-NONE>NONE</code> (0)</dt>
<dl><dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-NONE><a href=#dom-timedtrack-none>NONE</a></code> (0)</dt>
<dd>
<p>The <a href=#timed-track-not-loaded>timed track not loaded</a> state.</p>
</dd>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-LOADING>LOADING</code> (1)</dt>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-LOADING><a href=#dom-timedtrack-loading>LOADING</a></code> (1)</dt>
<dd>
<p>The <a href=#timed-track-loading>timed track loading</a> state.</p>
</dd>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-LOADED>LOADED</code> (2)</dt>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-LOADED><a href=#dom-timedtrack-loaded>LOADED</a></code> (2)</dt>
<dd>
<p>The <a href=#timed-track-loaded>timed track loaded</a> state.</p>
</dd>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-ERROR>ERROR</code> (3)</dt>
<dt><code><a href=#timedtrack>TimedTrack</a></code> . <code title=dom-TimedTrack-ERROR><a href=#dom-timedtrack-error>ERROR</a></code> (3)</dt>
<dd>
<p>The <a href=#timed-track-failed-to-load>timed track failed to load</a> state.</p>
</dd>
Expand Down Expand Up @@ -26818,9 +26824,45 @@ <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>

</dl><div class=impl>

<p class=XXX>...</p>
<p>The <dfn id=dom-timedtrack-kind title=dom-TimedTrack-kind><code>kind</code></dfn>
attribute must return the <a href=#timed-track-kind>timed track kind</a> of the
<a href=#timed-track>timed track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object
represents.</p>

<p>The <dfn id=dom-timedtrack-label title=dom-TimedTrack-label><code>label</code></dfn>
attribute must return the <a href=#timed-track-label>timed track label</a> of the
<a href=#timed-track>timed track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object
represents.</p>

<p>The <dfn id=dom-timedtrack-language title=dom-TimedTrack-language><code>language</code></dfn>
attribute must return the <a href=#timed-track-language>timed track language</a> of the
<a href=#timed-track>timed track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object
represents.</p>

<p>The <dfn id=dom-timedtrack-readystate title=dom-TimedTrack-readyState><code>readyState</code></dfn>
attribute must return the code corresponding to the <a href=#timed-track-readiness-state>timed
track readiness state</a> of the <a href=#timed-track>timed track</a> that
the <code><a href=#timedtrack>TimedTrack</a></code> object represents, as defined by the
following list:</p>

<dl><dt><dfn id=dom-timedtrack-none title=dom-TimedTrack-NONE><code>NONE</code></dfn> (numeric value 0)</dt>
<dd>The <a href=#timed-track-not-loaded>timed track not loaded</a> state.</dd>
<dt><dfn id=dom-timedtrack-loading title=dom-TimedTrack-LOADING><code>LOADING</code></dfn> (numeric value 1)</dt>
<dd>The <a href=#timed-track-loading>timed track loading</a> state.</dd>
<dt><dfn id=dom-timedtrack-loaded title=dom-TimedTrack-LOADED><code>LOADED</code></dfn> (numeric value 2)</dt>
<dd>The <a href=#timed-track-loaded>timed track loaded</a> state.</dd>
<dt><dfn id=dom-timedtrack-error title=dom-TimedTrack-ERROR><code>ERROR</code></dfn> (numeric value 3)</dt>
<dd>The <a href=#timed-track-failed-to-load>timed track failed to load</a> state.</dd>
</dl><!-- XXX

const unsigned short <dfn title="dom-TimedTrack-OFF"><code>OFF</code></dfn> = 0
const unsigned short <dfn title="dom-TimedTrack-HIDDEN"><code>HIDDEN</code></dfn> = 1
const unsigned short <dfn title="dom-TimedTrack-SHOWING"><code>SHOWING</code></dfn> = 2
attribute unsigned short <dfn title="dom-TimedTrack-mode"><code>mode</code></dfn>

readonly attribute <span>TimedTrackCueList</span> <dfn title="dom-TimedTrack-cues"><code>cues</code></dfn>
readonly attribute <span>TimedTrackCueList</span> <dfn title="dom-TimedTrack-activeCues"><code>activeCues</code></dfn>

<!-- XXX
Make sure that .cues and .activeCues doesn't change while script is
running, except for addCue/removeCue and the removal of all cues in
the face of a dynamic track.src change.
Expand All @@ -26835,9 +26877,7 @@ <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>

- <span>MutableTimedTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language);
- addTrack should add it as Loaded, Disabled, and with the rules for WebSRT.
-->

</div>
--></div>

<hr><pre class=idl>interface <dfn id=mutabletimedtrack>MutableTimedTrack</dfn> : <a href=#timedtrack>TimedTrack</a> {
void <span title=dom-MutableTimedTrack-addCue>addCue</span>(in <a href=#timedtrackcue>TimedTrackCue</a> cue);
Expand Down Expand Up @@ -26962,7 +27002,7 @@ <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>
<dt><var title="">cue</var> . <span title=dom-TimedTrackCue-direction>direction</span></dt>
<dd>
<p>Returns a string representing the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a>, as follows:</p>
<dl><dt>If it is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a></dt>
<dl class=switch><dt>If it is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a></dt>
<dd><p>The string "<code title="">horizontal</code>".</dd>
<dt>If it is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a></dt>
<dd><p>The string "<code title="">vertical</code>".</dd>
Expand Down Expand Up @@ -26995,7 +27035,7 @@ <h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>
<dt><var title="">cue</var> . <span title=dom-TimedTrackCue-alignment>alignment</span></dt>
<dd>
<p>Returns a string representing the <a href=#timed-track-cue-alignment>timed track cue alignment</a>, as follows:</p>
<dl><dt>If it is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start alignment</a></dt>
<dl class=switch><dt>If it is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start alignment</a></dt>
<dd><p>The string "<code title="">start</code>".</dd>
<dt>If it is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle alignment</a></dt>
<dd><p>The string "<code title="">middle</code>".</dd>
Expand Down

0 comments on commit 804835d

Please sign in to comment.