HTML5 Tracker

Diff (omit for latest revision)
Filter

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

SVNBugCommentTime (UTC)
714915951[Gecko] [Internet Explorer] [Opera] [Webkit] Make TextTrack.label not expose the UA-specific label if one is being used.2012-06-27 21:23
Index: source
===================================================================
--- source	(revision 7148)
+++ source	(revision 7149)
@@ -30472,9 +30472,7 @@
   <p>If the element has a <code title="attr-track-label">label</code>
   attribute whose value is not the empty string, then the element's
   <dfn>track label</dfn> is the value of the attribute. Otherwise, the
-  element's <span>track label</span> 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 <span>track label</span> is an empty string.</p>
 
   </div>
 
@@ -35763,15 +35761,18 @@
    <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 <span title="text track label">label of a track</span> can
     change dynamically, in the case of a <span>text track</span>
-    corresponding to a <code>track</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>track</code> element.</p>
 
+    <p>When a <span>text track label</span> 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 title="text track language">A language</dfn>
@@ -36255,11 +36256,13 @@
    object. The <span>text track</span> is a
    <span>media-resource-specific text track</span>.</p></li>
 
-   <li><p>Set the new <span>text track</span>'s <span title="text track
-   kind">kind</span>, <span title="text track label">label</span>,
-   and <span title="text track language">language</span> based on the
-   semantics of the relevant data, as defined by the relevant
-   specification.</p></li>
+   <li><p>Set the new <span>text track</span>'s <span title="text
+   track kind">kind</span>, <span title="text track
+   label">label</span>, and <span title="text track
+   language">language</span> based on the semantics of the relevant
+   data, as defined by the relevant specification. If there is no
+   label in that data, then the <span title="text track
+   label">label</span> must be set to the empty string.</p></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
@@ -36844,7 +36847,10 @@
 
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-label">label</code></dt>
    <dd>
-    <p>Returns the <span>text track label</span>.</p>
+    <p>Returns the <span>text track label</span>, 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">language</code></dt>

|