- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 05 May 2010 05:48:58 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv18159 Modified Files: Overview.html Log Message: Captions - Stage 7: track.track. (whatwg r5077) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.4078 retrieving revision 1.4079 diff -u -d -r1.4078 -r1.4079 --- Overview.html 5 May 2010 00:59:44 -0000 1.4078 +++ Overview.html 5 May 2010 05:48:54 -0000 1.4079 @@ -686,7 +686,7 @@ <ol> <li><a href="#timed-track-model"><span class="secno">4.8.10.10.1 </span>Timed track model</a></li> <li><a href="#sourcing-in-band-timed-tracks"><span class="secno">4.8.10.10.2 </span>Sourcing in-band timed tracks</a></li> - <li><a href="#sourcing-websrt-timed-tracks"><span class="secno">4.8.10.10.3 </span>Sourcing WebSRT timed tracks</a></li> + <li><a href="#sourcing-out-of-band-timed-tracks"><span class="secno">4.8.10.10.3 </span>Sourcing out-of-band timed tracks</a></li> <li><a href="#timed-track-api"><span class="secno">4.8.10.10.4 </span>Timed track API</a></li> <li><a href="#cue-events"><span class="secno">4.8.10.10.5 </span>Event definitions</a></ol></li> <li><a href="#websrt"><span class="secno">4.8.10.11 </span>WebSRT</a> @@ -20319,12 +20319,11 @@ attribute DOMString <a href="#dom-track-src" title="dom-track-src">src</a>; attribute DOMString <a href="#dom-track-srclang" title="dom-track-srclang">srclang</a>; - readonly attribute <a href="#mediatrack">MediaTrack</a> <span title="dom-track-track">track</span>; + readonly attribute <a href="#timedtrack">TimedTrack</a> <a href="#dom-track-track" title="dom-track-track">track</a>; };</pre> </dd> </dl><p>The <code><a href="#the-track-element">track</a></code> element allows authors to specify explicit - external timed tracks for <a href="#media-element" title="media element">media - elements</a>. It does not <a href="#represents" title="represents">represent</a> anything on its own.<p>The <dfn id="attr-track-kind" title="attr-track-kind"><code>kind</code></dfn> + external <a href="#timed-track" title="timed track">timed tracks</a> for <a href="#media-element" title="media element">media elements</a>. It does not <a href="#represents" title="represents">represent</a> anything on its own.<p>The <dfn id="attr-track-kind" title="attr-track-kind"><code>kind</code></dfn> attribute is an <a href="#enumerated-attribute">enumerated attribute</a>. The following table lists the keywords defined for this attribute. The states given in the first cell of the rows with keywords give the states to @@ -20361,9 +20360,24 @@ state, whose <code title="attr-track-srclang"><a href="#attr-track-srclang">srclang</a></code> attributes are both missing or have values that represent the same language, and whose <code title="attr-track-label"><a href="#attr-track-label">label</a></code> - attributes are again both missing or both have the same value.<p class="XXX">domintro for track.track<div class="impl"> + attributes are again both missing or both have the same value.<dl class="domintro"><dt><var title="">track</var> . <code title="dom-track-track"><a href="#dom-track-track">track</a></code></dt> - <p class="XXX">track.track</p> + <dd> + + <p>Returns the <code><a href="#timedtrack">TimedTrack</a></code> object corresponding to the <a href="#timed-track">timed track</a> of the <code><a href="#the-track-element">track</a></code> element.</p> + + </dd> + + </dl><div class="impl"> + + <p>When a <code><a href="#the-track-element">track</a></code> element is created, it must be + associated with a new <a href="#timed-track">timed track</a> and its corresponding + new <code><a href="#timedtrack">TimedTrack</a></code> object.</p> + + <p>The <dfn id="dom-track-track" title="dom-track-track"><code>track</code></dfn> IDL + attribute must, on getting, return the <code><a href="#the-track-element">track</a></code> element's + <a href="#timed-track">timed track</a>'s corresponding <code><a href="#timedtrack">TimedTrack</a></code> + object.</p> <p>The IDL attributes <dfn id="dom-track-kind" title="dom-track-kind"><code>kind</code></dfn>, <dfn id="dom-track-label" title="dom-track-label"><code>label</code></dfn>, <dfn id="dom-track-src" title="dom-track-src"><code>src</code></dfn>, and <dfn id="dom-track-srclang" title="dom-track-srclang"><code>srclang</code></dfn> must <a href="#reflect">reflect</a> the respective content attributes of the same @@ -20420,8 +20434,8 @@ attribute boolean <a href="#dom-media-muted" title="dom-media-muted">muted</a>; // timed tracks - readonly attribute <a href="#mediatrack">MediaTrack</a>[] <span title="dom-media-tracks">tracks</span>; - <a href="#mutablemediatrack">MutableMediaTrack</a> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language); + readonly attribute <a href="#timedtrack">TimedTrack</a>[] <span title="dom-media-tracks">tracks</span>; + <a href="#mutabletimedtrack">MutableTimedTrack</a> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language); };</pre><p>The <dfn id="media-element-attributes">media element attributes</dfn>, <code title="attr-media-src"><a href="#attr-media-src">src</a></code>, <code title="attr-media-preload"><a href="#attr-media-preload">preload</a></code>, <code title="attr-media-autoplay"><a href="#attr-media-autoplay">autoplay</a></code>, <code title="attr-media-loop"><a href="#attr-media-loop">loop</a></code>, and <code title="attr-media-controls"><a href="#attr-media-controls">controls</a></code>, apply to all <a href="#media-element" title="media element">media elements</a>. They are defined in this section.</p><!-- proposed v2 (actually v3!) features: * frame forward / backwards / step(n) while paused @@ -22077,7 +22091,7 @@ <code title="dom-media-HAVE_CURRENT_DATA"><a href="#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>, <a href="#queue-a-task">queue a task</a> to <a href="#fire-a-simple-event">fire a simple event</a> named <code title="event-media-waiting"><a href="#event-media-waiting">waiting</a></code> at the - element.</li> + element.</p> <p>Otherwise, the <a href="#media-element">media element</a>'s <code title="dom-media-readyState"><a href="#dom-media-readystate">readyState</a></code> attribute has the value <code title="dom-media-HAVE_FUTURE_DATA"><a href="#dom-media-have_future_data">HAVE_FUTURE_DATA</a></code> or @@ -22086,14 +22100,14 @@ named <code title="event-media-playing"><a href="#event-media-playing">playing</a></code> at the element.</p> - </ol></li> + </li> - </ol><li><p>Set the <a href="#media-element">media element</a>'s <a href="#autoplaying-flag">autoplaying - flag</a> to false.</li> + </ol></li> - + <li><p>Set the <a href="#media-element">media element</a>'s <a href="#autoplaying-flag">autoplaying + flag</a> to false.</li> - <hr><p>When the <dfn id="dom-media-pause" title="dom-media-pause"><code>pause()</code></dfn> + </ol><hr><p>When the <dfn id="dom-media-pause" title="dom-media-pause"><code>pause()</code></dfn> method is invoked, the user agent must run the following steps:</p> <ol><li><p>If the <a href="#media-element">media element</a>'s <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code> attribute has @@ -22408,11 +22422,11 @@ <p>This decides how the track is handled by the user agent. The kind is represented by a string. The possible strings are:</p> - <ul class="brief"><li><dfn id="dom-mediatrack-kind-subtitles" title="dom-MediaTrack-kind-subtitles"><code>subtitles</code></dfn> - <li><dfn id="dom-mediatrack-kind-captions" title="dom-MediaTrack-kind-captions"><code>captions</code></dfn> - <li><dfn id="dom-mediatrack-kind-descriptions" title="dom-MediaTrack-kind-descriptions"><code>descriptions</code></dfn> - <li><dfn id="dom-mediatrack-kind-chapters" title="dom-MediaTrack-kind-chapters"><code>chapters</code></dfn> - <li><dfn id="dom-mediatrack-kind-metadata" title="dom-MediaTrack-kind-metadata"><code>metadata</code></dfn> + <ul class="brief"><li><dfn id="dom-timedtrack-kind-subtitles" title="dom-TimedTrack-kind-subtitles"><code>subtitles</code></dfn> + <li><dfn id="dom-timedtrack-kind-captions" title="dom-TimedTrack-kind-captions"><code>captions</code></dfn> + <li><dfn id="dom-timedtrack-kind-descriptions" title="dom-TimedTrack-kind-descriptions"><code>descriptions</code></dfn> + <li><dfn id="dom-timedtrack-kind-chapters" title="dom-TimedTrack-kind-chapters"><code>chapters</code></dfn> + <li><dfn id="dom-timedtrack-kind-metadata" title="dom-TimedTrack-kind-metadata"><code>metadata</code></dfn> </ul><p>The <a href="#timed-track-kind" title="timed track kind">kind of track</a> can change dynamically, in the case of a <a href="#timed-track">timed track</a> corresponding to a <code><a href="#the-track-element">track</a></code> element.</p> @@ -22481,7 +22495,7 @@ <p>Indicates that the timed track has been loaded with no fatal errors. No new cues will be added to the track except if the <a href="#timed-track">timed track</a> corresponds to a - <code>MutableTimedTrack</code> object.</p> + <code><a href="#mutabletimedtrack">MutableTimedTrack</a></code> object.</p> </dd> @@ -22543,11 +22557,11 @@ yet been made to obtain the track's cues, the user will perform such an attempt momentarily. The user agent is maintaining a list of which cues are active, and events are being fired - accordingly. In addition, for timed tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-subtitles"><a href="#dom-mediatrack-kind-subtitles">subtitles</a></code> or <code title="dom-mediatrack-kind-captions"><a href="#dom-mediatrack-kind-captions">captions</a></code>, the cues + accordingly. In addition, for timed tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-subtitles">subtitles</code> or <code title="dom-mediatrack-kind-captions">captions</code>, the cues are being displayed over the video as appropriate; for timed - tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-descriptions"><a href="#dom-mediatrack-kind-descriptions">descriptions</a></code>, + tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-descriptions">descriptions</code>, the user agent is making the cues available to the user in a - non-visual fashion; and for timed tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-chapters"><a href="#dom-mediatrack-kind-chapters">chapters</a></code>, the user + non-visual fashion; and for timed tracks whose <a href="#timed-track-kind" title="timed track kind">kind</a> is <code title="dom-mediatrack-kind-chapters">chapters</code>, the user agent is making available to the user a mechanism by which the user can navigate to any point in the <a href="#media-resource">media resource</a> by selecting a cue.</p> @@ -22567,13 +22581,14 @@ <a href="#timed-track">timed track</a> has <a href="#timed-track-not-loaded" title="timed track not loaded">not yet been loaded</a> or is still <a href="#timed-track-loading" title="timed track loading">loading</a>, or in the case of a <a href="#timed-track">timed - track</a> corresponding to a <code>MutableTimedTrack</code> + track</a> corresponding to a <code><a href="#mutabletimedtrack">MutableTimedTrack</a></code> object, where individual cues can be added or removed dynamically using the API.</p> </dd> - </dl><p>A <dfn id="timed-track-cue">timed track cue</dfn> is the unit of time-sensitive data + </dl><p>Each <a href="#timed-track">timed track</a> has a corresponding + <code><a href="#timedtrack">TimedTrack</a></code> object.<p>A <dfn id="timed-track-cue">timed track cue</dfn> is the unit of time-sensitive data in a <a href="#timed-track">timed track</a>, corresponding for instance for subtitles and captions to the text that appears at a particular time and disappears at another time.<p>Each <a href="#timed-track-cue">timed track cue</a> consists of:<dl><dt><dfn id="timed-track-cue-identifier" title="timed track cue identifier">An identifier</dfn> @@ -22672,70 +22687,91 @@ HTML.</p> </dd> - </dl><p>A <a href="#timed-track-cue">timed track cue</a> is immutable.<h6 id="sourcing-in-band-timed-tracks"><span class="secno">4.8.10.10.2 </span>Sourcing in-band timed tracks</h6><p class="XXX">... + </dl><p>A <a href="#timed-track-cue">timed track cue</a> is immutable.<p>Each <a href="#timed-track-cue">timed track cue</a> has a corresponding + <code><a href="#timedtrackcue">TimedTrackCue</a></code> object, and can be associated with a + particular <a href="#timed-track">timed track</a>. Once a <a href="#timed-track-cue">timed track + cue</a> is associated with a particular <a href="#timed-track">timed track</a>, + the association is permanent.<h6 id="sourcing-in-band-timed-tracks"><span class="secno">4.8.10.10.2 </span>Sourcing in-band timed tracks</h6><p class="XXX">... - <h6 id="sourcing-websrt-timed-tracks"><span class="secno">4.8.10.10.3 </span>Sourcing WebSRT timed tracks</h6><p class="XXX">...fetching timed tracks + <h6 id="sourcing-out-of-band-timed-tracks"><span class="secno">4.8.10.10.3 </span>Sourcing out-of-band timed tracks</h6><p class="XXX">... + + <!-- + + - when <track> inserted into media element: + - add the timed track to the list of timed tracks + + - when <track> removed from media element: + - remove the track from the list of timed tracks + + - when <track> corresponding to a media element's timed track has a + content attribute changed: + - kind => timed track kind + - label => timed track label + - srclang => timed track language + - src => if it's changed, blow away all the cues, set readyState to NONE, then reprocess the mode + + --> <h6 id="timed-track-api"><span class="secno">4.8.10.10.4 </span>Timed track API</h6><!-- // timed tracks - readonly attribute <span>MediaTrack</span>[] <span title="dom-media-tracks">tracks</span>; - <span>MutableMediaTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language); ---><pre class="idl">interface <dfn id="mediatrack">MediaTrack</dfn> { - readonly attribute DOMString <span title="dom-MediaTrack-kind">kind</span>; - readonly attribute DOMString <span title="dom-MediaTrack-label">label</span>; - readonly attribute DOMString <span title="dom-MediaTrack-language">language</span>; + readonly attribute <span>TimedTrack</span>[] <span title="dom-media-tracks">tracks</span>; + <span>MutableTimedTrack</span> <span title="dom-media-addTrack">addTrack</span>(in DOMString label, in DOMString kind, in DOMString language); +--><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-MediaTrack-NONE">NONE</span> = 0; - const unsigned short <span title="dom-MediaTrack-LOADING">LOADING</span> = 1; - const unsigned short <span title="dom-MediaTrack-LOADED">LOADED</span> = 2; - const unsigned short <span title="dom-MediaTrack-ERROR">ERROR</span> = 3; - readonly attribute unsigned short <span title="dom-MediaTrack-readyState">readyState</span>; - readonly attribute <a href="#function">Function</a> <span title="dom-MediaTrack-onload">onload</span>; - readonly attribute <a href="#function">Function</a> <span title="dom-MediaTrack-onerror">onerror</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 <a href="#function">Function</a> <span title="dom-TimedTrack-onload">onload</span>; + readonly attribute <a href="#function">Function</a> <span title="dom-TimedTrack-onerror">onerror</span>; - const unsigned short <span title="dom-MediaTrack-OFF">OFF</span> = 0; - const unsigned short <span title="dom-MediaTrack-HIDDEN">HIDDEN</span> = 1; - const unsigned short <span title="dom-MediaTrack-SHOWING">SHOWING</span> = 2; - attribute unsigned short <span title="dom-MediaTrack-mode">mode</span>; + const unsigned short <span title="dom-TimedTrack-OFF">OFF</span> = 0; + const unsigned short <span title="dom-TimedTrack-HIDDEN">HIDDEN</span> = 1; + const unsigned short <span title="dom-TimedTrack-SHOWING">SHOWING</span> = 2; + attribute unsigned short <span title="dom-TimedTrack-mode">mode</span>; - readonly attribute <a href="#mediacuelist">MediaCueList</a> <span title="dom-MediaTrack-cues">cues</span>; - readonly attribute <a href="#mediacuelist">MediaCueList</a> <span title="dom-MediaTrack-activeCues">activeCues</span>; - readonly attribute <a href="#function">Function</a> <span title="dom-MediaTrack-onentercue">onentercue</span>; - readonly attribute <a href="#function">Function</a> <span title="dom-MediaTrack-onexitcue">onexitcue</span>; + readonly attribute <a href="#timedtrackcuelist">TimedTrackCueList</a> <span title="dom-TimedTrack-cues">cues</span>; + readonly attribute <a href="#timedtrackcuelist">TimedTrackCueList</a> <span title="dom-TimedTrack-activeCues">activeCues</span>; + readonly attribute <a href="#function">Function</a> <span title="dom-TimedTrack-onentercue">onentercue</span>; + readonly attribute <a href="#function">Function</a> <span title="dom-TimedTrack-onexitcue">onexitcue</span>; }; -interface <dfn id="mutablemediatrack">MutableMediaTrack</dfn> : <a href="#mediatrack">MediaTrack</a> { - void <span title="dom-MutableMediaTrack-addCue">addCue</span>(in <a href="#mediacue">MediaCue</a> cue); - void <span title="dom-MutableMediaTrack-removeCue">removeCue</span>(in <a href="#mediacue">MediaCue</a> cue); +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); + void <span title="dom-MutableTimedTrack-removeCue">removeCue</span>(in <a href="#timedtrackcue">TimedTrackCue</a> cue); }; -interface <dfn id="mediacuelist">MediaCueList</dfn> { - readonly attribute unsigned long <span title="dom-MediaCueList-length">length</span>; - getter <a href="#mediacue">MediaCue</a> (in unsigned long index); - <a href="#mediacue">MediaCue</a> getCueById(in DOMString id); +interface <dfn id="timedtrackcuelist">TimedTrackCueList</dfn> { + readonly attribute unsigned long <span title="dom-TimedTrackCueList-length">length</span>; + getter <a href="#timedtrackcue">TimedTrackCue</a> (in unsigned long index); + <a href="#timedtrackcue">TimedTrackCue</a> getCueById(in DOMString id); }; [Constructor(in DOMString id, in float startTime, in float endTime, in DOMString settings, in DOMString text, in optional boolean pauseOnExit)] -interface <dfn id="mediacue">MediaCue</dfn> { - readonly attribute <a href="#mediatrack">MediaTrack</a> <span title="dom-MediaCue-track">track</span>; - readonly attribute DOMString <span title="dom-MediaCue-id">id</span>; +interface <dfn id="timedtrackcue">TimedTrackCue</dfn> { + readonly attribute <a href="#timedtrack">TimedTrack</a> <span title="dom-TimedTrackCue-track">track</span>; + readonly attribute DOMString <span title="dom-TimedTrackCue-id">id</span>; - readonly attribute float <span title="dom-MediaCue-startTime">startTime</span>; - readonly attribute float <span title="dom-MediaCue-endTime">endTime</span>; - readonly attribute boolean <span title="dom-MediaCue-pauseOnExit">pauseOnExit</span>; + readonly attribute float <span title="dom-TimedTrackCue-startTime">startTime</span>; + readonly attribute float <span title="dom-TimedTrackCue-endTime">endTime</span>; + readonly attribute boolean <span title="dom-TimedTrackCue-pauseOnExit">pauseOnExit</span>; - readonly attribute DOMString <span title="dom-MediaCue-direction">direction</span>; - readonly attribute boolean <span title="dom-MediaCue-snapToLines">snapToLines</span>; - readonly attribute long <span title="dom-MediaCue-linePosition">linePosition</span>; - readonly attribute long <span title="dom-MediaCue-textPosition">textPosition</span>; - readonly attribute long <span title="dom-MediaCue-size">size</span>; - readonly attribute DOMString <span title="dom-MediaCue-alignment">alignment</span>; + readonly attribute DOMString <span title="dom-TimedTrackCue-direction">direction</span>; + readonly attribute boolean <span title="dom-TimedTrackCue-snapToLines">snapToLines</span>; + readonly attribute long <span title="dom-TimedTrackCue-linePosition">linePosition</span>; + readonly attribute long <span title="dom-TimedTrackCue-textPosition">textPosition</span>; + readonly attribute long <span title="dom-TimedTrackCue-size">size</span>; + readonly attribute DOMString <span title="dom-TimedTrackCue-alignment">alignment</span>; - readonly attribute DOMString <span title="dom-MediaCue-voice">voice</span>; - DOMString <span title="dom-MediaCue-getCueAsSource()">getCueAsSource</span>(); - <a href="#documentfragment">DocumentFragment</a> <span title="dom-MediaCue-getCueAsHTML()">getCueAsHTML</span>(); + readonly attribute DOMString <span title="dom-TimedTrackCue-voice">voice</span>; + DOMString <span title="dom-TimedTrackCue-getCueAsSource()">getCueAsSource</span>(); + <a href="#documentfragment">DocumentFragment</a> <span title="dom-TimedTrackCue-getCueAsHTML()">getCueAsHTML</span>(); };</pre><p class="XXX">domintro <div class="impl"> @@ -22746,7 +22782,7 @@ <!-- XXX CueEvent - readonly attribute MediaCue cue; + readonly attribute TimedTrackCue cue; -->
Received on Wednesday, 5 May 2010 05:49:02 UTC