Skip to content
Permalink
Browse files

[giow] (0) Captions - Stage 20.2: more wip for API definitions.

git-svn-id: http://svn.whatwg.org/webapps@5138 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jul 8, 2010
1 parent 804835d commit 4a105264bed32f362874e2089fa6ca48270e20af
Showing with 64 additions and 19 deletions.
  1. +64 −19 source
83 source

<p>The <dfn
title="dom-TimedTrack-readyState"><code>readyState</code></dfn>
attribute must return the code corresponding to the <span>timed
track readiness state</span> of the <span>timed track</span> that
the <code>TimedTrack</code> object represents, as defined by the
following list:</p>
attribute must return the numeric value corresponding to the
<span>timed track readiness state</span> of the <span>timed
track</span> that the <code>TimedTrack</code> object represents, as
defined by the following list:</p>

<dl>
<dt><dfn title="dom-TimedTrack-NONE"><code>NONE</code></dfn> (numeric value 0)</dt>
<dd>The <span>timed track failed to load</span> 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>
<p>The <dfn title="dom-TimedTrack-mode"><code>mode</code></dfn>
attribute, on getting, must return the numeric value corresponding
to the <span>timed track mode</span> of the <span>timed track</span>
that the <code>TimedTrack</code> object represents, as defined by
the following list:</p>

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.
<dl>
<dt><dfn title="dom-TimedTrack-OFF"><code>OFF</code></dfn> (numeric value 0)</dt>
<dd>The <span>timed track disabled</span> mode.</dd>
<dt><dfn title="dom-TimedTrack-HIDDEN"><code>HIDDEN</code></dfn> (numeric value 1)</dt>
<dd>The <span>timed track hidden</span> mode.</dd>
<dt><dfn title="dom-TimedTrack-SHOWING"><code>SHOWING</code></dfn> (numeric value 2)</dt>
<dd>The <span>timed track showing</span> mode.</dd>
</dl>

<p>User agents must not expose cues whose start and end times are
entirely prior to the <span>media resource</span>'s <span>earliest
possible position</span>.</p>
<p class="XXX">On setting, ...</p>

<!-- XXX
changing dom-TimedTrack-mode to disabled/hidden should hide all the
titles, changing it to showing should show them. (Only 'showing'
tracks get updated automatically.)
-->

<p>If the <span>timed track mode</span> of the <span>timed
track</span> that the <code>TimedTrack</code> object represents is
not the <span>timed track disabled</span> mode, then the <dfn
title="dom-TimedTrack-cues"><code>cues</code></dfn> attribute must
return a <code>TimedTrackCueList</code> object that represents the
subset of the <span>timed track list of cues</span> of the
<span>timed track</span> that the <code>TimedTrack</code> object
represents whose <span title="timed track cue start time">start
times</span> occur before the <span>earliest possible position when
the script started</span>, in <span>timed track cue
order</span>. Otherwise, it must return null. When an object is
returned, the same object must be returned each time.</p>

<p>The <dfn>earliest possibly position when the script started</dfn>
is whatever the <span>earliest possibly position</span> was the last
time the <span>event loop</span> reached step 1.</p>

<p>If the <span>timed track mode</span> of the <span>timed
track</span> that the <code>TimedTrack</code> object represents is
not the <span>timed track disabled</span> mode, then the <dfn
title="dom-TimedTrack-cues"><code>cues</code></dfn> attribute must
return a <code>TimedTrackCueList</code> object that represents the
subset of the <span>timed track list of cues</span> of the
<span>timed track</span> that the <code>TimedTrack</code> object
represents whose <span title="timed track cue start time">start
times</span> occur before the <span>current playback position when
the script started</span> and whose <span title="timed track cue end
time">end times</span> occur after the <span>current playback
position when the script started</span>, in <span>timed track cue
order</span>. Otherwise, it must return null. When an object is
returned, the same object must be returned each time.</p>

<p>The <dfn>current playback position when the script started</dfn>
is whatever the <span>current playback position</span> was the last
time the <span>event loop</span> reached step 1.</p>

<!-- XXX
- <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.
-->

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

<!-- XXX
Make sure that <code>TimedTrackCueList</code>s don'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.
(right now only in-band cues can change this, I think)
-->

</div>

<hr>

0 comments on commit 4a10526

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