W3C home > Mailing lists > Public > public-html-diffs@w3.org > September 2011

hixie: Have a TextTrackList object instead of a TextTrack[] array, so we can add members to it. (whatwg r6606)

From: poot <cvsmail@w3.org>
Date: Fri, 30 Sep 2011 19:06:16 -0400
To: public-html-diffs@w3.org
Message-Id: <E1R9m9o-0004jh-Ku@jay.w3.org>
hixie: Have a TextTrackList object instead of a TextTrack[] array, so we
can add members to it. (whatwg r6606)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5298&r2=1.5299&f=h
http://html5.org/tools/web-apps-tracker?from=6605&to=6606

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5298
retrieving revision 1.5299
diff -u -d -r1.5298 -r1.5299
--- Overview.html	30 Sep 2011 17:47:53 -0000	1.5298
+++ Overview.html	30 Sep 2011 23:06:00 -0000	1.5299
@@ -21872,7 +21872,7 @@
   // tracks
   readonly attribute <a href="#audiotracklist">AudioTrackList</a> <a href="#dom-media-audiotracks" title="dom-media-audioTracks">audioTracks</a>;
   readonly attribute <a href="#videotracklist">VideoTrackList</a> <a href="#dom-media-videotracks" title="dom-media-videoTracks">videoTracks</a>;
-  readonly attribute <a href="#texttrack">TextTrack</a>[] <a href="#dom-media-texttracks" title="dom-media-textTracks">textTracks</a>;
+  readonly attribute <a href="#texttracklist">TextTrackList</a> <a href="#dom-media-texttracks" title="dom-media-textTracks">textTracks</a>;
   <a href="#mutabletexttrack">MutableTextTrack</a> <a href="#dom-media-addtexttrack" title="dom-media-addTextTrack">addTextTrack</a>(DOMString kind, optional DOMString label, optional 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-crossorigin"><a href="#attr-media-crossorigin">crossorigin</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-mediagroup"><a href="#attr-media-mediagroup">mediagroup</a></code>, 
@@ -26148,7 +26148,10 @@
 
    <li><p>Jump to the step labeled <i>download</i>.</li>
 
-  </ol></div><h6 id="text-track-api"><span class="secno">4.8.10.12.4 </span>Text track API</h6><dl class="domintro"><dt><var title="">media</var> . <code title="dom-media-textTracks"><a href="#dom-media-texttracks">textTracks</a></code> . <code title="">length</code></dt>
+  </ol></div><h6 id="text-track-api"><span class="secno">4.8.10.12.4 </span>Text track API</h6><pre class="idl">interface <dfn id="texttracklist">TextTrackList</dfn> {
+  readonly attribute unsigned long <a href="#dom-texttracklist-length" title="dom-TextTrackList-length">length</a>;
+  getter <a href="#texttrack">TextTrack</a> (unsigned long index);
+};</pre><dl class="domintro"><dt><var title="">media</var> . <code title="dom-media-textTracks"><a href="#dom-media-texttracks">textTracks</a></code> . <code title="">length</code></dt>
    <dd>
     <p>Returns the number of <a href="#text-track" title="text track">text tracks</a> associated with the <a href="#media-element">media element</a> (e.g. from <code><a href="#the-track-element">track</a></code> elements). This is the number of <a href="#text-track" title="text track">text tracks</a> in the <a href="#media-element">media element</a>'s <a href="#list-of-text-tracks">list of text tracks</a>.</p>
    </dd>
@@ -26165,17 +26168,35 @@
 
   </dl><div class="impl">
 
-  <p>The <dfn id="dom-media-texttracks" title="dom-media-textTracks"><code>textTracks</code></dfn>
-  attribute of <a href="#media-element" title="media element">media elements</a> must
-  return a <a href="#platform-array-objects" title="platform array objects">platform array object</a>
-  for objects of type <code><a href="#texttrack">TextTrack</a></code> that is <i>fixed
-  length</i> and <i>read only</i>. The same object must be returned
-  each time the attribute is accessed. <a href="#refsWEBIDL">[WEBIDL]</a></p>
+  <p>A <code><a href="#texttracklist">TextTrackList</a></code> object represents a dynamically
+  updating list of <a href="#text-track" title="text track">text tracks</a> in a
+  given order.</p>
 
-  <p>The array must contain the <code><a href="#texttrack">TextTrack</a></code> objects of the
-  <a href="#text-track" title="text track">text tracks</a> in the <a href="#media-element">media
-  element</a>'s <a href="#list-of-text-tracks">list of text tracks</a>, in the same
-  order as in the <a href="#list-of-text-tracks">list of text tracks</a>.</p>
+  <p>The <dfn id="dom-media-texttracks" title="dom-media-textTracks"><code>textTracks</code></dfn> attribute
+  of <a href="#media-element" title="media element">media elements</a> must return a
+  <code><a href="#texttracklist">TextTrackList</a></code> object representing the
+  <code><a href="#texttrack">TextTrack</a></code> objects of the <a href="#text-track" title="text track">text
+  tracks</a> in the <a href="#media-element">media element</a>'s <a href="#list-of-text-tracks">list of text
+  tracks</a>, in the same order as in the <a href="#list-of-text-tracks">list of text
+  tracks</a>. The same object must be returned each time the
+  attribute is accessed. <a href="#refsWEBIDL">[WEBIDL]</a></p>
+
+  <p>The <dfn id="dom-texttracklist-length" title="dom-TextTrackList-length"><code>length</code></dfn> attribute
+  of a <code><a href="#texttracklist">TextTrackList</a></code> object must return the number of
+  <a href="#text-track" title="text track">text tracks</a> in the list represented
+  by the <code><a href="#texttracklist">TextTrackList</a></code> object.</p>
+
+  <p>The <a href="#supported-property-indices">supported property indices</a> of a
+  <code><a href="#texttracklist">TextTrackList</a></code> object at any instant are the numbers
+  from zero to the number of <a href="#text-track" title="text track">text
+  tracks</a> in the list represented by the
+  <code><a href="#texttracklist">TextTrackList</a></code> object minus one, if any. If there are no
+  <a href="#text-track" title="text track">text tracks</a> in the list, there are
+  no <a href="#supported-property-indices">supported property indices</a>.</p>
+
+  <p>To <a href="#determine-the-value-of-an-indexed-property">determine the value of an indexed property</a> of a
+  <code><a href="#texttracklist">TextTrackList</a></code> object for a given index <var title="">index</var>, the user agent must return the <var title="">index</var>th <a href="#text-track">text track</a> in the list
+  represented by the <code><a href="#texttracklist">TextTrackList</a></code> object.</p>
 
   </div><hr><pre class="idl">interface <dfn id="texttrack">TextTrack</dfn> : <a href="#eventtarget">EventTarget</a> {
   readonly attribute DOMString <a href="#dom-texttrack-kind" title="dom-TextTrack-kind">kind</a>;
Received on Friday, 30 September 2011 23:06:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 30 September 2011 23:06:26 GMT