- From: Sam Ruby via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 07 Sep 2012 19:43:54 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv16064 Modified Files: infrastructure.html media-elements.html references.html single-page.html spec.html the-track-element.html Log Message: commit 04a0852a7bd5a57e29d2a218143f284394ed5968 Author: Silvia Pfeiffer <silviapfeiffer1@gmail.com> Date: Sat Sep 8 05:13:51 2012 +1000 Fix merge error. Index: media-elements.html =================================================================== RCS file: /sources/public/html5/spec/media-elements.html,v retrieving revision 1.170 retrieving revision 1.171 diff -u -d -r1.170 -r1.171 --- media-elements.html 7 Sep 2012 00:13:58 -0000 1.170 +++ media-elements.html 7 Sep 2012 19:43:50 -0000 1.171 @@ -928,6 +928,14 @@ <li> + <p>⌛ If the <a href="#media-element">media element</a>'s + <a href="#blocked-on-parser">blocked-on-parser</a> flag is false, then <a href="#populate-the-list-of-pending-text-tracks">populate + the list of pending text tracks</a>.</p> + + </li> + + <li> + <p>⌛ If the <a href="#media-element">media element</a> has a <code title="attr-media-src"><a href="#attr-media-src">src</a></code> attribute, then let <var title="">mode</var> be <i title="">attribute</i>.</p> <p>⌛ Otherwise, if the <a href="#media-element">media element</a> does not @@ -1173,7 +1181,12 @@ algorithm. This is now the element's <a href="#media-resource">media resource</a>.</p></li> - <li><p>Optionally, run the following substeps. This is the expected + <li><p>Remove all <a href="#media-resource-specific-text-track" title="media-resource-specific text + track">media-resource-specific text tracks</a> from the + <a href="#media-element">media element</a>'s <a href="#list-of-pending-text-tracks">list of pending text + tracks</a>, if any.</p> + + </li><li><p>Optionally, run the following substeps. This is the expected behavior if the user agent intends to not attempt to fetch the resource until the use requests it explicitly (e.g. as a way to implement the <code title="attr-media-preload"><a href="#attr-media-preload">preload</a></code> @@ -3541,7 +3554,7 @@ be set to false (not selected). The <a href="#concept-media-load-resource" title="concept-media-load-resource">resource fetch algorithm</a> can override this.</p> - <p>The <dfn id="dom-audiotrack-id" title="dom-AudioTrack-id"><code>AudioTrack.id</code></dfn> and <dfn id="dom-videotrack-id" title="dom-VideoTrack-id"><code>VideTrack.id</code></dfn> + <p>The <dfn id="dom-audiotrack-id" title="dom-AudioTrack-id"><code>AudioTrack.id</code></dfn> and <dfn id="dom-videotrack-id" title="dom-VideoTrack-id"><code>VideoTrack.id</code></dfn> attributes must return the identifier of the track, if it has one, or the empty string otherwise. If the <a href="#media-resource">media resource</a> is in a format that supports the <cite>Media Fragments URI</cite> @@ -3550,6 +3563,9 @@ used as the name of a track in the track dimension of such a fragment identifier. <a href="references.html#refsMEDIAFRAG">[MEDIAFRAG]</a></p> + <p class="example">For example, in Ogg files, this would be the Name + header field of the track. <a href="references.html#refsOGGSKELETONHEADERS">[OGGSKELETONHEADERS]</a></p> + <p>The <dfn id="dom-audiotrack-kind" title="dom-AudioTrack-kind"><code>AudioTrack.kind</code></dfn> and <dfn id="dom-videotrack-kind" title="dom-VideoTrack-kind"><code>VideoTrack.kind</code></dfn> attributes must return the category of the track, if it has one, or @@ -3568,9 +3584,10 @@ and must only be returned for <code><a href="#videotrack">VideoTrack</a></code> objects if they are appropriate for video.</p> - <p>For Ogg files, the Role header of the track gives the relevant - metadata. For DASH media resources, the <code title="">Role</code> - element conveys the information. For WebM, only the <code title="">FlagDefault</code> element currently maps to a value. <a href="references.html#refsOGGROLE">[OGGROLE]</a> <a href="references.html#refsDASH">[DASH]</a> <a href="references.html#refsWEBMCG">[WEBMCG]</a></p> + <p>For Ogg files, the Role header field of the track gives the + relevant metadata. For DASH media resources, the <code title="">Role</code> element conveys the information. For WebM, only + the <code title="">FlagDefault</code> element currently maps to a + value. <a href="references.html#refsOGGSKELETONHEADERS">[OGGSKELETONHEADERS]</a> <a href="references.html#refsDASH">[DASH]</a> <a href="references.html#refsWEBMCG">[WEBMCG]</a></p> </div> @@ -4711,14 +4728,43 @@ </dt><dd> <p>This is a human-readable string intended to identify the track - for the user. In certain cases, the label might be generated - automatically.</p> + for the user.</p> <p>The <a href="#text-track-label" title="text track label">label of a track</a> can change dynamically, in the case of a <a href="#text-track">text track</a> - corresponding to a <code><a href="the-track-element.html#the-track-element">track</a></code> element or in the case of an - automatically-generated label whose value depends on variable - factors such as the user's preferred user interface language.</p> + corresponding to a <code><a href="the-track-element.html#the-track-element">track</a></code> element.</p> + + <p>When a <a href="#text-track-label">text track label</a> is the empty string, the + user agent should automatically generate an appropriate label from + the text track's other properties (e.g. the kind of text track and + the text track's language) for use in its user interface. This + automatically-generated label is not exposed in the API.</p> + + </dd> + + <dt><dfn id="text-track-in-band-metadata-track-dispatch-type" title="text track in-band metadata track dispatch type">An in-band metadata track dispatch type</dfn> + + </dt><dd> + + <p>This is a string extracted from the <a href="#media-resource">media resource</a> + specifically for in-band metadata tracks to enable such tracks to + be dispatched to different scripts in the document.</p> + + <p class="example">For example, a traditional TV station broadcast + streamed on the Web and augmented with Web-specific interactive + features could include text tracks with metadata for ad + targetting, trivia game data during game shows, player states + during sports games, recipe information during food programs, and + so forth. As each program starts and ends, new tracks might be + added or removed from the stream, and as each one is added, the + user agent could bind them to dedicated script modules using the + value of this attribute.</p> + + <p>Other than for in-band metadata text tracks, the <a href="#text-track-in-band-metadata-track-dispatch-type" title="text track in-band metadata track dispatch type">in-band + metadata track dispatch type</a> is the empty string. How this + value is populated for different media formats is described in + <a href="#steps-to-expose-a-media-resource-specific-text-track">steps to expose a media-resource-specific text + track</a>.</p> </dd> @@ -4872,15 +4918,43 @@ </dl><p>Each <a href="#text-track">text track</a> has a corresponding <code><a href="#texttrack">TextTrack</a></code> object.</p> - <p>The <a href="#text-track" title="text track">text tracks</a> of a - <a href="#media-element">media element</a> are <dfn id="the-text-tracks-are-ready" title="the text tracks are - ready">ready</dfn> if all the <a href="#text-track" title="text track">text - tracks</a> whose <a href="#text-track-mode" title="text track mode">mode</a> was - not in the <a href="#text-track-disabled" title="text track disabled">disabled</a> state - when the element's <a href="#concept-media-load-algorithm" title="concept-media-load-algorithm">resource selection - algorithm</a> last started now have a <a href="#text-track-readiness-state">text track readiness - state</a> of <a href="#text-track-loaded" title="text track loaded">loaded</a> or - <a href="#text-track-failed-to-load" title="text track failed to load">failed to load</a>.</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> + + <p>Whenever a <code><a href="the-track-element.html#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> + + <p>Whenever a <a href="#text-track">text track</a>'s <a href="#text-track-readiness-state">text track readiness + state</a> changes to either <a href="#text-track-loaded" title="text track + loaded">loaded</a> or <a href="#text-track-failed-to-load" title="text track failed to + load">failed to load</a>, the user agent must remove it from any + <a href="#list-of-pending-text-tracks">list of pending text tracks</a> that it is in.</p> + + <p>When a <a href="#media-element">media element</a> is created by an <a href="parsing.html#html-parser">HTML + parser</a> or <a href="the-xhtml-syntax.html#xml-parser">XML parser</a>, the user agent must set + 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="parsing.html#stack-of-open-elements">stack of open + elements</a> of an <a href="parsing.html#html-parser">HTML parser</a> or <a href="the-xhtml-syntax.html#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 + <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 + element</a> are <dfn id="the-text-tracks-are-ready" title="the text tracks are + ready">ready</dfn> when both the element's <a href="#list-of-pending-text-tracks">list of pending + text tracks</a> is empty and the element's + <a href="#blocked-on-parser">blocked-on-parser</a> flag is false.</p> <hr><p>A <dfn id="text-track-cue">text track cue</dfn> is the unit of time-sensitive data in a <a href="#text-track">text track</a>, corresponding for instance for @@ -5131,11 +5205,85 @@ object. The <a href="#text-track">text track</a> is a <a href="#media-resource-specific-text-track">media-resource-specific text track</a>.</p></li> - <li><p>Set the new <a href="#text-track">text track</a>'s <a href="#text-track-kind" title="text track - kind">kind</a>, <a href="#text-track-label" title="text track label">label</a>, - and <a href="#text-track-language" title="text track language">language</a> based on the - semantics of the relevant data, as defined by the relevant - specification.</p></li> + <li><p>Set the new <a href="#text-track">text track</a>'s <a href="#text-track-kind" title="text + track kind">kind</a>, <a href="#text-track-label" title="text track + label">label</a>, and <a href="#text-track-language" title="text track + language">language</a> based on the semantics of the relevant + data, as defined by the relevant specification. If there is no + label in that data, then the <a href="#text-track-label" title="text track + label">label</a> must be set to the empty string.</p></li> + + <li> + + <p>If the new <a href="#text-track">text track</a>'s <a href="#text-track-kind" title="text track + kind">kind</a> is <code title="dom-TextTrack-kind-metadata"><a href="#dom-texttrack-kind-metadata">metadata</a></code>, then set the + <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track dispatch type</a> as + follows, based on the type of the <a href="#media-resource">media resource</a>:</p> + + <dl class="switch"><dt>If the <a href="#media-resource">media resource</a> is an Ogg file</dt> + + <dd>The <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track dispatch + type</a> must be set to the value of the Name header field. <a href="references.html#refsOGGSKELETONHEADERS">[OGGSKELETONHEADERS]</a></dd> + + <dt>If the <a href="#media-resource">media resource</a> is a WebM file</dt> + + <dd>The <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track dispatch + type</a> must be set to the value of the <code title="">CodecID</code> element. <a href="references.html#refsWEBMCG">[WEBMCG]</a></dd> + + <dt>If the <a href="#media-resource">media resource</a> is an MPEG-2 file</dt> + + <dd>Let <var title="">stream type</var> be the value of the + "stream_type" field describing the text track's type in the + file's program map section, interpreted as an 8-bit unsigned + integer. Let <var title="">length</var> be the value of the + "ES_info_length" field for the track in the same part of the + program map section, interpreted as an integer as defined by the + MPEG-2 specification. Let <var title="">descriptor bytes</var> be + the <var title="">length</var> bytes following the + "ES_info_length" field. The <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata + track dispatch type</a> must be set to the concatenation of + the <var title="">stream type</var> byte and the zero or more + <var title="">descriptor bytes</var> bytes, expressed in + hexadecimal using characters in the ranges <a href="common-microsyntaxes.html#ascii-digits">ASCII digits</a> and U+0041 LATIN CAPITAL LETTER A to + U+0046 LATIN CAPITAL LETTER F. + <a href="references.html#refsMPEG2">[MPEG2]</a> + + </dd> + + <dt>If the <a href="#media-resource">media resource</a> is an MPEG-4 file</dt> + + <dd>Let the + first <code title="">stsd</code> box of the + first <code title="">stbl</code> box of the + first <code title="">minf</code> box of the + first <code title="">mdia</code> box of the + first <code title="">trak</code> box of the + first <code title="">moov</code> box + of the file be the <i>stsd box</i>, if any. + + If the file has no <i>stsd box</i>, or if the <i>stsd box</i> has + neither a <code title="">mett</code> box nor a <code title="">metx</code> box, then the <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band + metadata track dispatch type</a> must be set to the empty + string. + + Otherwise, if the <i>stsd box</i> has a <code title="">mett</code> box then the <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band + metadata track dispatch type</a> must be set to the + concatenation of the string "<code title="">mett</code>", a + U+0020 SPACE character, and the value of the first <code title="">mime_format</code> field of the first <code title="">mett</code> box of the <i>stsd box</i>, or the empty + string if that field is absent in that box. + + Otherwise, if the <i>stsd box</i> has no <code title="">mett</code> box but has a <code title="">metx</code> box + then the <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track dispatch + type</a> must be set to the concatenation of the string "<code title="">metx</code>", a U+0020 SPACE character, and the value of + the first <code title="">namespace</code> field of the first + <code title="">metx</code> box of the <i>stsd box</i>, or the + empty string if that field is absent in that box. + + <a href="references.html#refsMPEG4">[MPEG4]</a> + + </dd> + + </dl></li> <li><p>Populate the new <a href="#text-track">text track</a>'s <a href="#text-track-list-of-cues" title="text track list of cues">list of cues</a> with the cues parsed so far, folllowing the <a href="#guidelines-for-exposing-cues-in-various-formats-as-text-track-cues">guidelines for exposing @@ -5201,15 +5349,15 @@ <table><thead><tr><th>State </th><th>String </th></tr></thead><tbody><tr><td><a href="the-track-element.html#attr-track-kind-subtitles" title="attr-track-kind-subtitles">Subtitles</a> - </td><td><code title="dom-timedtrack-kind-subtitles">subtitles</code> + </td><td><code title="dom-TextTrack-kind-subtitles"><a href="#dom-texttrack-kind-subtitles">subtitles</a></code> </td></tr><tr><td><a href="the-track-element.html#attr-track-kind-captions" title="attr-track-kind-captions">Captions</a> - </td><td><code title="dom-timedtrack-kind-captions">captions</code> + </td><td><code title="dom-TextTrack-kind-captions"><a href="#dom-texttrack-kind-captions">captions</a></code> </td></tr><tr><td><a href="the-track-element.html#attr-track-kind-descriptions" title="attr-track-kind-descriptions">Descriptions</a> - </td><td><code title="dom-timedtrack-kind-descriptions">descriptions</code> + </td><td><code title="dom-TextTrack-kind-descriptions"><a href="#dom-texttrack-kind-descriptions">descriptions</a></code> </td></tr><tr><td><a href="the-track-element.html#attr-track-kind-chapters" title="attr-track-kind-chapters">Chapters</a> - </td><td><code title="dom-timedtrack-kind-chapters">chapters</code> + </td><td><code title="dom-TextTrack-kind-chapters"><a href="#dom-texttrack-kind-chapters">chapters</a></code> </td></tr><tr><td><a href="the-track-element.html#attr-track-kind-metadata" title="attr-track-kind-metadata">Metadata</a> - </td><td><code title="dom-timedtrack-kind-metadata">metadata</code> + </td><td><code title="dom-TextTrack-kind-metadata"><a href="#dom-texttrack-kind-metadata">metadata</a></code> </td></tr></tbody></table><p>The <a href="#text-track-label">text track label</a> is the element's <a href="the-track-element.html#track-label">track label</a>.</p> @@ -5624,6 +5772,7 @@ readonly attribute DOMString <a href="#dom-texttrack-kind" title="dom-TextTrack-kind">kind</a>; readonly attribute DOMString <a href="#dom-texttrack-label" title="dom-TextTrack-label">label</a>; readonly attribute DOMString <a href="#dom-texttrack-language" title="dom-TextTrack-language">language</a>; + readonly attribute DOMString <a href="#dom-texttrack-inbandmetadatatrackdispatchtype" title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType</a>; attribute <a href="#texttrackmode">TextTrackMode</a> <a href="#dom-texttrack-mode" title="dom-TextTrack-mode">mode</a>; @@ -5643,7 +5792,10 @@ <dt><var title="">textTrack</var> . <code title="dom-TextTrack-label"><a href="#dom-texttrack-label">label</a></code></dt> <dd> - <p>Returns the <a href="#text-track-label">text track label</a>.</p> + <p>Returns the <a href="#text-track-label">text track label</a>, if there is one, or + the empty string otherwise (indicating that a custom label + probably needs to be generated from the other attributes of the + object if the object is exposed to the user).</p> </dd> <dt><var title="">textTrack</var> . <code title="dom-TextTrack-language"><a href="#dom-texttrack-language">language</a></code></dt> @@ -5651,6 +5803,11 @@ <p>Returns the <a href="#text-track-language">text track language</a> string.</p> </dd> + <dt><var title="">textTrack</var> . <code title="dom-TextTrack-inBandMetadataTrackDispatchType"><a href="#dom-texttrack-inbandmetadatatrackdispatchtype">inBandMetadataTrackDispatchType</a></code></dt> + <dd> + <p>Returns the <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track dispatch type</a> string.</p> + </dd> + <dt><var title="">textTrack</var> . <code title="dom-TextTrack-mode"><a href="#dom-texttrack-mode">mode</a></code> [ = <var title="">value</var> ]</dt> <dd> <p>Returns the <a href="#text-track-mode">text track mode</a>, represented by a @@ -5714,6 +5871,11 @@ <a href="#text-track">text track</a> that the <code><a href="#texttrack">TextTrack</a></code> object represents.</p> + <p>The <dfn id="dom-texttrack-inbandmetadatatrackdispatchtype" title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType<code></code></dfn> + attribute must return the <a href="#text-track-in-band-metadata-track-dispatch-type">text track in-band metadata track + dispatch type</a> of the <a href="#text-track">text track</a> that the + <code><a href="#texttrack">TextTrack</a></code> object represents.</p> + <p>The <dfn id="dom-texttrack-mode" title="dom-TextTrack-mode"><code>mode</code></dfn> attribute, on getting, must return the string corresponding to the <a href="#text-track-mode">text track mode</a> of the <a href="#text-track">text track</a> that the @@ -6569,7 +6731,7 @@ 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 - <a href="#text-track-kind">text track kind</a> is <code title="dom-timedtrack-kind-chapters">chapters</code> should be used. + <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> Index: infrastructure.html =================================================================== RCS file: /sources/public/html5/spec/infrastructure.html,v retrieving revision 1.1295 retrieving revision 1.1296 diff -u -d -r1.1295 -r1.1296 --- infrastructure.html 7 Sep 2012 11:43:45 -0000 1.1295 +++ infrastructure.html 7 Sep 2012 19:43:50 -0000 1.1296 @@ -419,8 +419,8 @@ rendered, even if, unbeknownst to the implementation, the image also contained animation data.</p> - <p class="example">A MPEG4 video file would not be considered to be - in a supported format if the compression format used was not + <p class="example">An MPEG-4 video file would not be considered to + be in a supported format if the compression format used was not supported, even if the implementation could determine the dimensions of the movie from the file's metadata.</p> Index: single-page.html =================================================================== RCS file: /sources/public/html5/spec/single-page.html,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- single-page.html 7 Sep 2012 19:14:36 -0000 1.98 +++ single-page.html 7 Sep 2012 19:43:51 -0000 1.99 @@ -2923,8 +2923,8 @@ rendered, even if, unbeknownst to the implementation, the image also contained animation data.</p> - <p class=example>A MPEG4 video file would not be considered to be - in a supported format if the compression format used was not + <p class=example>An MPEG-4 video file would not be considered to + be in a supported format if the compression format used was not supported, even if the implementation could determine the dimensions of the movie from the file's metadata.</p> @@ -27053,9 +27053,7 @@ <p>If the element has a <code title=attr-track-label><a href=#attr-track-label>label</a></code> attribute whose value is not the empty string, then the element's <dfn id=track-label>track label</dfn> is the value of the attribute. Otherwise, the - element's <a href=#track-label>track label</a> is a user-agent defined string - (e.g. the string "untitled" in the user's locale, or a value - automatically generated from the other attributes).</p> + element's <a href=#track-label>track label</a> is an empty string.</p> </div> @@ -27727,6 +27725,14 @@ <li> + <p>⌛ If the <a href=#media-element>media element</a>'s + <a href=#blocked-on-parser>blocked-on-parser</a> flag is false, then <a href=#populate-the-list-of-pending-text-tracks>populate + the list of pending text tracks</a>.</p> + + </li> + + <li> + <p>⌛ If the <a href=#media-element>media element</a> has a <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute, then let <var title="">mode</var> be <i title="">attribute</i>.</p> <p>⌛ Otherwise, if the <a href=#media-element>media element</a> does not @@ -27972,7 +27978,12 @@ algorithm. This is now the element's <a href=#media-resource>media resource</a>.</p></li> - <li><p>Optionally, run the following substeps. This is the expected + <li><p>Remove all <a href=#media-resource-specific-text-track title="media-resource-specific text + track">media-resource-specific text tracks</a> from the + <a href=#media-element>media element</a>'s <a href=#list-of-pending-text-tracks>list of pending text + tracks</a>, if any.</p> + + </li><li><p>Optionally, run the following substeps. This is the expected behavior if the user agent intends to not attempt to fetch the resource until the use requests it explicitly (e.g. as a way to implement the <code title=attr-media-preload><a href=#attr-media-preload>preload</a></code> @@ -30340,7 +30351,7 @@ be set to false (not selected). The <a href=#concept-media-load-resource title=concept-media-load-resource>resource fetch algorithm</a> can override this.</p> - <p>The <dfn id=dom-audiotrack-id title=dom-AudioTrack-id><code>AudioTrack.id</code></dfn> and <dfn id=dom-videotrack-id title=dom-VideoTrack-id><code>VideTrack.id</code></dfn> + <p>The <dfn id=dom-audiotrack-id title=dom-AudioTrack-id><code>AudioTrack.id</code></dfn> and <dfn id=dom-videotrack-id title=dom-VideoTrack-id><code>VideoTrack.id</code></dfn> attributes must return the identifier of the track, if it has one, or the empty string otherwise. If the <a href=#media-resource>media resource</a> is in a format that supports the <cite>Media Fragments URI</cite> @@ -30349,6 +30360,9 @@ used as the name of a track in the track dimension of such a fragment identifier. <a href=#refsMEDIAFRAG>[MEDIAFRAG]</a></p> + <p class=example>For example, in Ogg files, this would be the Name + header field of the track. <a href=#refsOGGSKELETONHEADERS>[OGGSKELETONHEADERS]</a></p> + <p>The <dfn id=dom-audiotrack-kind title=dom-AudioTrack-kind><code>AudioTrack.kind</code></dfn> and <dfn id=dom-videotrack-kind title=dom-VideoTrack-kind><code>VideoTrack.kind</code></dfn> attributes must return the category of the track, if it has one, or @@ -30367,9 +30381,10 @@ and must only be returned for <code><a href=#videotrack>VideoTrack</a></code> objects if they are appropriate for video.</p> - <p>For Ogg files, the Role header of the track gives the relevant - metadata. For DASH media resources, the <code title="">Role</code> - element conveys the information. For WebM, only the <code title="">FlagDefault</code> element currently maps to a value. <a href=#refsOGGROLE>[OGGROLE]</a> <a href=#refsDASH>[DASH]</a> <a href=#refsWEBMCG>[WEBMCG]</a></p> + <p>For Ogg files, the Role header field of the track gives the + relevant metadata. For DASH media resources, the <code title="">Role</code> element conveys the information. For WebM, only + the <code title="">FlagDefault</code> element currently maps to a + value. <a href=#refsOGGSKELETONHEADERS>[OGGSKELETONHEADERS]</a> <a href=#refsDASH>[DASH]</a> <a href=#refsWEBMCG>[WEBMCG]</a></p> </div> @@ -31510,14 +31525,43 @@ </dt><dd> <p>This is a human-readable string intended to identify the track - for the user. In certain cases, the label might be generated - automatically.</p> + for the user.</p> <p>The <a href=#text-track-label title="text track label">label of a track</a> can change dynamically, in the case of a <a href=#text-track>text track</a> - corresponding to a <code><a href=#the-track-element>track</a></code> element or in the case of an - automatically-generated label whose value depends on variable - factors such as the user's preferred user interface language.</p> + corresponding to a <code><a href=#the-track-element>track</a></code> element.</p> + + <p>When a <a href=#text-track-label>text track label</a> is the empty string, the + user agent should automatically generate an appropriate label from + the text track's other properties (e.g. the kind of text track and + the text track's language) for use in its user interface. This + automatically-generated label is not exposed in the API.</p> + + </dd> + + <dt><dfn id=text-track-in-band-metadata-track-dispatch-type title="text track in-band metadata track dispatch type">An in-band metadata track dispatch type</dfn> + + </dt><dd> + + <p>This is a string extracted from the <a href=#media-resource>media resource</a> + specifically for in-band metadata tracks to enable such tracks to + be dispatched to different scripts in the document.</p> + + <p class=example>For example, a traditional TV station broadcast + streamed on the Web and augmented with Web-specific interactive + features could include text tracks with metadata for ad + targetting, trivia game data during game shows, player states + during sports games, recipe information during food programs, and + so forth. As each program starts and ends, new tracks might be + added or removed from the stream, and as each one is added, the + user agent could bind them to dedicated script modules using the + value of this attribute.</p> + + <p>Other than for in-band metadata text tracks, the <a href=#text-track-in-band-metadata-track-dispatch-type title="text track in-band metadata track dispatch type">in-band + metadata track dispatch type</a> is the empty string. How this + value is populated for different media formats is described in + <a href=#steps-to-expose-a-media-resource-specific-text-track>steps to expose a media-resource-specific text + track</a>.</p> </dd> @@ -31671,15 +31715,43 @@ </dl><p>Each <a href=#text-track>text track</a> has a corresponding <code><a href=#texttrack>TextTrack</a></code> object.</p> - <p>The <a href=#text-track title="text track">text tracks</a> of a - <a href=#media-element>media element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are - ready">ready</dfn> if all the <a href=#text-track title="text track">text - tracks</a> whose <a href=#text-track-mode title="text track mode">mode</a> was - not in the <a href=#text-track-disabled title="text track disabled">disabled</a> state - when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection - algorithm</a> last started now have a <a href=#text-track-readiness-state>text track readiness - state</a> of <a href=#text-track-loaded title="text track loaded">loaded</a> or - <a href=#text-track-failed-to-load title="text track failed to load">failed to load</a>.</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> + + <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> + + <p>Whenever a <a href=#text-track>text track</a>'s <a href=#text-track-readiness-state>text track readiness + state</a> changes to either <a href=#text-track-loaded title="text track + loaded">loaded</a> or <a href=#text-track-failed-to-load title="text track failed to + load">failed to load</a>, the user agent must remove it from any + <a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p> + + <p>When a <a href=#media-element>media element</a> is created by an <a href=#html-parser>HTML + parser</a> or <a href=#xml-parser>XML parser</a>, the user agent must set + 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 + <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 + element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are + ready">ready</dfn> when both the element's <a href=#list-of-pending-text-tracks>list of pending + text tracks</a> is empty and the element's + <a href=#blocked-on-parser>blocked-on-parser</a> flag is false.</p> <hr><p>A <dfn id=text-track-cue>text track cue</dfn> is the unit of time-sensitive data in a <a href=#text-track>text track</a>, corresponding for instance for @@ -31930,11 +32002,85 @@ object. The <a href=#text-track>text track</a> is a <a href=#media-resource-specific-text-track>media-resource-specific text track</a>.</p></li> - <li><p>Set the new <a href=#text-track>text track</a>'s <a href=#text-track-kind title="text track - kind">kind</a>, <a href=#text-track-label title="text track label">label</a>, - and <a href=#text-track-language title="text track language">language</a> based on the - semantics of the relevant data, as defined by the relevant - specification.</p></li> + <li><p>Set the new <a href=#text-track>text track</a>'s <a href=#text-track-kind title="text + track kind">kind</a>, <a href=#text-track-label title="text track + label">label</a>, and <a href=#text-track-language title="text track + language">language</a> based on the semantics of the relevant + data, as defined by the relevant specification. If there is no + label in that data, then the <a href=#text-track-label title="text track + label">label</a> must be set to the empty string.</p></li> + + <li> + + <p>If the new <a href=#text-track>text track</a>'s <a href=#text-track-kind title="text track + kind">kind</a> is <code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code>, then set the + <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch type</a> as + follows, based on the type of the <a href=#media-resource>media resource</a>:</p> + + <dl class=switch><dt>If the <a href=#media-resource>media resource</a> is an Ogg file</dt> + + <dd>The <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch + type</a> must be set to the value of the Name header field. <a href=#refsOGGSKELETONHEADERS>[OGGSKELETONHEADERS]</a></dd> + + <dt>If the <a href=#media-resource>media resource</a> is a WebM file</dt> + + <dd>The <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch + type</a> must be set to the value of the <code title="">CodecID</code> element. <a href=#refsWEBMCG>[WEBMCG]</a></dd> + + <dt>If the <a href=#media-resource>media resource</a> is an MPEG-2 file</dt> + + <dd>Let <var title="">stream type</var> be the value of the + "stream_type" field describing the text track's type in the + file's program map section, interpreted as an 8-bit unsigned + integer. Let <var title="">length</var> be the value of the + "ES_info_length" field for the track in the same part of the + program map section, interpreted as an integer as defined by the + MPEG-2 specification. Let <var title="">descriptor bytes</var> be + the <var title="">length</var> bytes following the + "ES_info_length" field. The <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata + track dispatch type</a> must be set to the concatenation of + the <var title="">stream type</var> byte and the zero or more + <var title="">descriptor bytes</var> bytes, expressed in + hexadecimal using characters in the ranges <a href=#ascii-digits>ASCII digits</a> and U+0041 LATIN CAPITAL LETTER A to + U+0046 LATIN CAPITAL LETTER F. + <a href=#refsMPEG2>[MPEG2]</a> + + </dd> + + <dt>If the <a href=#media-resource>media resource</a> is an MPEG-4 file</dt> + + <dd>Let the + first <code title="">stsd</code> box of the + first <code title="">stbl</code> box of the + first <code title="">minf</code> box of the + first <code title="">mdia</code> box of the + first <code title="">trak</code> box of the + first <code title="">moov</code> box + of the file be the <i>stsd box</i>, if any. + + If the file has no <i>stsd box</i>, or if the <i>stsd box</i> has + neither a <code title="">mett</code> box nor a <code title="">metx</code> box, then the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band + metadata track dispatch type</a> must be set to the empty + string. + + Otherwise, if the <i>stsd box</i> has a <code title="">mett</code> box then the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band + metadata track dispatch type</a> must be set to the + concatenation of the string "<code title="">mett</code>", a + U+0020 SPACE character, and the value of the first <code title="">mime_format</code> field of the first <code title="">mett</code> box of the <i>stsd box</i>, or the empty + string if that field is absent in that box. + + Otherwise, if the <i>stsd box</i> has no <code title="">mett</code> box but has a <code title="">metx</code> box + then the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch + type</a> must be set to the concatenation of the string "<code title="">metx</code>", a U+0020 SPACE character, and the value of + the first <code title="">namespace</code> field of the first + <code title="">metx</code> box of the <i>stsd box</i>, or the + empty string if that field is absent in that box. + + <a href=#refsMPEG4>[MPEG4]</a> + + </dd> + + </dl></li> <li><p>Populate the new <a href=#text-track>text track</a>'s <a href=#text-track-list-of-cues title="text track list of cues">list of cues</a> with the cues parsed so far, folllowing the <a href=#guidelines-for-exposing-cues-in-various-formats-as-text-track-cues>guidelines for exposing @@ -32000,15 +32146,15 @@ <table><thead><tr><th>State </th><th>String </th></tr></thead><tbody><tr><td><a href=#attr-track-kind-subtitles title=attr-track-kind-subtitles>Subtitles</a> - </td><td><code title=dom-timedtrack-kind-subtitles>subtitles</code> + </td><td><code title=dom-TextTrack-kind-subtitles><a href=#dom-texttrack-kind-subtitles>subtitles</a></code> </td></tr><tr><td><a href=#attr-track-kind-captions title=attr-track-kind-captions>Captions</a> - </td><td><code title=dom-timedtrack-kind-captions>captions</code> + </td><td><code title=dom-TextTrack-kind-captions><a href=#dom-texttrack-kind-captions>captions</a></code> </td></tr><tr><td><a href=#attr-track-kind-descriptions title=attr-track-kind-descriptions>Descriptions</a> - </td><td><code title=dom-timedtrack-kind-descriptions>descriptions</code> + </td><td><code title=dom-TextTrack-kind-descriptions><a href=#dom-texttrack-kind-descriptions>descriptions</a></code> </td></tr><tr><td><a href=#attr-track-kind-chapters title=attr-track-kind-chapters>Chapters</a> - </td><td><code title=dom-timedtrack-kind-chapters>chapters</code> + </td><td><code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> </td></tr><tr><td><a href=#attr-track-kind-metadata title=attr-track-kind-metadata>Metadata</a> - </td><td><code title=dom-timedtrack-kind-metadata>metadata</code> + </td><td><code title=dom-TextTrack-kind-metadata><a href=#dom-texttrack-kind-metadata>metadata</a></code> </td></tr></tbody></table><p>The <a href=#text-track-label>text track label</a> is the element's <a href=#track-label>track label</a>.</p> @@ -32423,6 +32569,7 @@ readonly attribute DOMString <a href=#dom-texttrack-kind title=dom-TextTrack-kind>kind</a>; readonly attribute DOMString <a href=#dom-texttrack-label title=dom-TextTrack-label>label</a>; readonly attribute DOMString <a href=#dom-texttrack-language title=dom-TextTrack-language>language</a>; + readonly attribute DOMString <a href=#dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType>inBandMetadataTrackDispatchType</a>; attribute <a href=#texttrackmode>TextTrackMode</a> <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>; @@ -32442,7 +32589,10 @@ <dt><var title="">textTrack</var> . <code title=dom-TextTrack-label><a href=#dom-texttrack-label>label</a></code></dt> <dd> - <p>Returns the <a href=#text-track-label>text track label</a>.</p> + <p>Returns the <a href=#text-track-label>text track label</a>, if there is one, or + the empty string otherwise (indicating that a custom label + probably needs to be generated from the other attributes of the + object if the object is exposed to the user).</p> </dd> <dt><var title="">textTrack</var> . <code title=dom-TextTrack-language><a href=#dom-texttrack-language>language</a></code></dt> @@ -32450,6 +32600,11 @@ <p>Returns the <a href=#text-track-language>text track language</a> string.</p> </dd> + <dt><var title="">textTrack</var> . <code title=dom-TextTrack-inBandMetadataTrackDispatchType><a href=#dom-texttrack-inbandmetadatatrackdispatchtype>inBandMetadataTrackDispatchType</a></code></dt> + <dd> + <p>Returns the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch type</a> string.</p> + </dd> + <dt><var title="">textTrack</var> . <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> [ = <var title="">value</var> ]</dt> <dd> <p>Returns the <a href=#text-track-mode>text track mode</a>, represented by a @@ -32513,6 +32668,11 @@ <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents.</p> + <p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType>inBandMetadataTrackDispatchType<code></code></dfn> + attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track + dispatch type</a> of the <a href=#text-track>text track</a> that the + <code><a href=#texttrack>TextTrack</a></code> object represents.</p> + <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn> attribute, on getting, must return the string corresponding to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the @@ -33368,7 +33528,7 @@ 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 - <a href=#text-track-kind>text track kind</a> is <code title=dom-timedtrack-kind-chapters>chapters</code> should be used. + <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> @@ -85244,6 +85404,14 @@ <dt id=refsMIMESNIFF>[MIMESNIFF]</dt> <dd><cite><a href=http://mimesniff.spec.whatwg.org/>MIME Sniffing</a></cite>, A. Barth, I. Hickson. WHATWG.</dd> + <dt id=refsMPEG2>[MPEG2]</dt> + <dd><cite>ISO/IEC 13818-1: Information technology — Generic coding of moving pictures and associated audio information: Systems</cite>. ISO/IEC.</dd> + <!-- search for ["bytes are removed from this buffer at a rate defined by sb_leak_rate"] to find it --> + + <dt id=refsMPEG4>[MPEG4]</dt> + <dd><cite>ISO/IEC 14496-12: ISO base media file format</cite>. ISO/IEC.</dd> + <!-- search for ["Box Structure was and subsequent clauses were re-organized"] to find it --> + <dt id=refsMQ>[MQ]</dt> <!-- <dd><cite><a href="http://www.w3.org/TR/css3-mediaqueries/">Media @@ -85263,7 +85431,7 @@ Work in progress. <!--!--> </dd> - <dt id=refsOGGROLE>[OGGROLE]</dt> + <dt id=refsOGGSKELETONHEADERS>[OGGSKELETONHEADERS]</dt> <dd><cite><a href=http://wiki.xiph.org/SkeletonHeaders>SkeletonHeaders</a></cite>. Xiph.Org.</dd> <dt id=refsOPENSEARCH>[OPENSEARCH]</dt> Index: the-track-element.html =================================================================== RCS file: /sources/public/html5/spec/the-track-element.html,v retrieving revision 1.170 retrieving revision 1.171 diff -u -d -r1.170 -r1.171 --- the-track-element.html 7 Sep 2012 00:14:07 -0000 1.170 +++ the-track-element.html 7 Sep 2012 19:43:51 -0000 1.171 @@ -469,9 +469,7 @@ <p>If the element has a <code title="attr-track-label"><a href="#attr-track-label">label</a></code> attribute whose value is not the empty string, then the element's <dfn id="track-label">track label</dfn> is the value of the attribute. Otherwise, the - element's <a href="#track-label">track label</a> is a user-agent defined string - (e.g. the string "untitled" in the user's locale, or a value - automatically generated from the other attributes).</p> + element's <a href="#track-label">track label</a> is an empty string.</p> </div> Index: references.html =================================================================== RCS file: /sources/public/html5/spec/references.html,v retrieving revision 1.1245 retrieving revision 1.1246 diff -u -d -r1.1245 -r1.1246 --- references.html 7 Sep 2012 00:13:59 -0000 1.1245 +++ references.html 7 Sep 2012 19:43:50 -0000 1.1246 @@ -684,6 +684,14 @@ <dt id="refsMIMESNIFF">[MIMESNIFF]</dt> <dd><cite><a href="http://mimesniff.spec.whatwg.org/">MIME Sniffing</a></cite>, A. Barth, I. Hickson. WHATWG.</dd> + <dt id="refsMPEG2">[MPEG2]</dt> + <dd><cite>ISO/IEC 13818-1: Information technology — Generic coding of moving pictures and associated audio information: Systems</cite>. ISO/IEC.</dd> + <!-- search for ["bytes are removed from this buffer at a rate defined by sb_leak_rate"] to find it --> + + <dt id="refsMPEG4">[MPEG4]</dt> + <dd><cite>ISO/IEC 14496-12: ISO base media file format</cite>. ISO/IEC.</dd> + <!-- search for ["Box Structure was and subsequent clauses were re-organized"] to find it --> + <dt id="refsMQ">[MQ]</dt> <!-- <dd><cite><a href="http://www.w3.org/TR/css3-mediaqueries/">Media @@ -703,7 +711,7 @@ Work in progress. <!--!--> </dd> - <dt id="refsOGGROLE">[OGGROLE]</dt> + <dt id="refsOGGSKELETONHEADERS">[OGGSKELETONHEADERS]</dt> <dd><cite><a href="http://wiki.xiph.org/SkeletonHeaders">SkeletonHeaders</a></cite>. Xiph.Org.</dd> <dt id="refsOPENSEARCH">[OPENSEARCH]</dt>
Received on Friday, 7 September 2012 19:43:58 UTC