HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/7150

SVNBugCommentTime (UTC)
715013359[Gecko] [Internet Explorer] [Opera] [Webkit] Define textTrack.inBandMetadataTrackDispatchType2012-06-28 05:11
Index: source
===================================================================
--- source	(revision 7149)
+++ source	(revision 7150)
@@ -2046,7 +2046,7 @@
   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
+  <p class="example">A 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>
@@ -34390,7 +34390,7 @@
 
   <p>The <dfn
   title="dom-AudioTrack-id"><code>AudioTrack.id</code></dfn> and <dfn
-  title="dom-VideoTrack-id"><code>VideTrack.id</code></dfn>
+  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 <span>media resource</span> is
   in a format that supports the <cite>Media Fragments URI</cite>
@@ -34399,6 +34399,10 @@
   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
   title="dom-AudioTrack-kind"><code>AudioTrack.kind</code></dfn> and
   <dfn title="dom-VideoTrack-kind"><code>VideoTrack.kind</code></dfn>
@@ -34418,12 +34422,12 @@
   and must only be returned for <code>VideoTrack</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>
 
@@ -35775,6 +35779,33 @@
 
    </dd>
 
+   <dt><dfn title="text track in-band metadata track dispatch type">An in-band metadata track dispatch type</dfn>
+
+   <dd>
+
+    <p>This is a string extracted from the <span>media resource</span>
+    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 <span
+    title="text track in-band metadata track dispatch type">in-band
+    metadata track dispatch type</span> is the empty string. How this
+    value is populated for different media formats is described in
+    <span>steps to expose a media-resource-specific text
+    track</span>.</p>
+
+   </dd>
+
    <dt><dfn title="text track language">A language</dfn>
 
    <dd>
@@ -36264,6 +36295,72 @@
    label in that data, then the <span title="text track
    label">label</span> must be set to the empty string.</p></li>
 
+   <li>
+
+    <p>If the new <span>text track</span>'s <span title="text track
+    kind">kind</span> is <code
+    title="dom-TextTrack-kind-metadata">metadata</code>, then set the
+    <span>text track in-band metadata track dispatch type</span> as
+    follows, based on the type of the <span>media resource</span>:</p>
+
+    <dl class="switch"> 
+
+     <dt>If the <span>media resource</span> is an Ogg file</dt>
+
+     <dd>The <span>text track in-band metadata track dispatch
+     type</span> must be set to the value of the Name header field. <a
+     href="#refsOGGSKELETONHEADERS">[OGGSKELETONHEADERS]</a></dd>
+
+     <dt>If the <span>media resource</span> is an WebM file</dt>
+
+     <dd>The <span>text track in-band metadata track dispatch
+     type</span> must be set to the value of the <code
+     title="">CodecID</code> element. <a
+     href="#refsWEBMCG">[WEBMCG]</a></dd>
+
+     <dt>If the <span>media resource</span> 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 <span>text track in-band
+     metadata track dispatch type</span> must be set to the empty
+     string.
+
+     Otherwise, if the <i>stsd box</i> has a <code
+     title="">mett</code> box then the <span>text track in-band
+     metadata track dispatch type</span> 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 <span>text track in-band metadata track dispatch
+     type</span> 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 <span>text track</span>'s <span
    title="text track list of cues">list of cues</span> with the cues
    parsed so far, folllowing the <span>guidelines for exposing
@@ -36339,19 +36436,19 @@
    <tbody>
     <tr>
      <td><span title="attr-track-kind-subtitles">Subtitles</span>
-     <td><code title="dom-timedtrack-kind-subtitles">subtitles</code>
+     <td><code title="dom-TextTrack-kind-subtitles">subtitles</code>
     <tr>
      <td><span title="attr-track-kind-captions">Captions</span>
-     <td><code title="dom-timedtrack-kind-captions">captions</code>
+     <td><code title="dom-TextTrack-kind-captions">captions</code>
     <tr>
      <td><span title="attr-track-kind-descriptions">Descriptions</span>
-     <td><code title="dom-timedtrack-kind-descriptions">descriptions</code>
+     <td><code title="dom-TextTrack-kind-descriptions">descriptions</code>
     <tr>
      <td><span title="attr-track-kind-chapters">Chapters</span>
-     <td><code title="dom-timedtrack-kind-chapters">chapters</code>
+     <td><code title="dom-TextTrack-kind-chapters">chapters</code>
     <tr>
      <td><span title="attr-track-kind-metadata">Metadata</span>
-     <td><code title="dom-timedtrack-kind-metadata">metadata</code>
+     <td><code title="dom-TextTrack-kind-metadata">metadata</code>
   </table>
 
   <p>The <span>text track label</span> is the element's <span>track
@@ -36826,6 +36923,7 @@
   readonly attribute DOMString <span title="dom-TextTrack-kind">kind</span>;
   readonly attribute DOMString <span title="dom-TextTrack-label">label</span>;
   readonly attribute DOMString <span title="dom-TextTrack-language">language</span>;
+  readonly attribute DOMString <span title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType</span>;
 
            attribute <span>TextTrackMode</span> <span title="dom-TextTrack-mode">mode</span>;
 
@@ -36858,6 +36956,11 @@
     <p>Returns the <span>text track language</span> string.</p>
    </dd>
 
+   <dt><var title="">textTrack</var> . <code title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType</code></dt>
+   <dd>
+    <p>Returns the <span>text track in-band metadata track dispatch type</span> string.</p>
+   </dd>
+
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-mode">mode</code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track mode</span>, represented by a
@@ -36926,6 +37029,12 @@
   <span>text track</span> that the <code>TextTrack</code> object
   represents.</p>
 
+  <p>The <dfn
+  title="dom-TextTrack-inBandMetadataTrackDispatchType">inBandMetadataTrackDispatchType<code></code></dfn>
+  attribute must return the <span>text track in-band metadata track
+  dispatch type</span> of the <span>text track</span> that the
+  <code>TextTrack</code> object represents.</p>
+
   <p>The <dfn title="dom-TextTrack-mode"><code>mode</code></dfn>
   attribute, on getting, must return the string corresponding to the
   <span>text track mode</span> of the <span>text track</span> that the
@@ -37983,7 +38092,7 @@
   text</span> or <span>WebVTT cue text</span> as their <span>cue
   payload</span>; <span>WebVTT metadata text</span> cues are only
   useful for scripted applications (using the <code
-  title="dom-timedtrack-kind-metadata">metadata</code> <span>text
+  title="dom-TextTrack-kind-metadata">metadata</code> <span>text
   track kind</span>).</p>
 
   <p>A <span>WebVTT file</span> whose cues all have a <span>cue
@@ -40273,7 +40382,7 @@
   <span title="text track showing">showing</span> or <span title="text
   track showing by default">showing by default</span> and whose
   <span>text track kind</span> is <code
-  title="dom-timedtrack-kind-chapters">chapters</code> should be used.
+  title="dom-TextTrack-kind-chapters">chapters</code> should be used.
   Such tracks must be interpreted according to the <span>rules for
   constructing the chapter tree from a text track</span>.</p>
 
@@ -120419,6 +120528,10 @@
    <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="refsMPEG4">[MPEG4]</dt>
+   <dd><cite><a href="">ISO/IEC 14496-12: ISO base media file format</a></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
@@ -120440,7 +120553,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>

|