Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) add getKind() since WebM does have something like this, an…
…d MPEG is apparently planning to add it, so that (with Ogg) means three of the oft-supported formats have something relevant here.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12544

git-svn-id: http://svn.whatwg.org/webapps@6032 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 26, 2011
1 parent 84c5ab7 commit 174ef84
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 79 deletions.
56 changes: 20 additions & 36 deletions complete.html
Expand Up @@ -28661,8 +28661,8 @@ <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tra

<pre class=idl>interface <dfn id=tracklist>TrackList</dfn> {
readonly attribute unsigned long <a href=#dom-tracklist-length title=dom-TrackList-length>length</a>;
DOMString <a href=#dom-tracklist-getid title=dom-TrackList-getID>getID</a>(in unsigned long index);<!--
DOMString <span title="dom-TrackList-getKind">getKind</span>(in unsigned long index);-->
DOMString <a href=#dom-tracklist-getid title=dom-TrackList-getID>getID</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getkind title=dom-TrackList-getKind>getKind</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getlabel title=dom-TrackList-getLabel>getLabel</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getlanguage title=dom-TrackList-getLanguage>getLanguage</a>(in unsigned long index);

Expand Down Expand Up @@ -28697,15 +28697,15 @@ <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tra
<cite>Media Fragments URI</cite> syntax. <a href=#hrefMEDIAFRAG>[MEDIAFRAG]</a></p>

</dd>
<!--
<dt><var title="">kind</var> = <var title="">tracks</var> . <code title="dom-TrackList-getKind">getKind</code>( <var title="">index</var> )</dt>

<dt><var title="">kind</var> = <var title="">tracks</var> . <code title=dom-TrackList-getKind><a href=#dom-tracklist-getkind>getKind</a></code>( <var title="">index</var> )</dt>

<dd>

<p>Returns the category the given track falls into. The <a href="#dom-TrackList-getKind-categories">possible track categories</a> are given below.</p>
<p>Returns the category the given track falls into. The <a href=#dom-TrackList-getKind-categories>possible track categories</a> are given below.</p>

</dd>
-->

<dt><var title="">label</var> = <var title="">tracks</var> . <code title=dom-TrackList-getLabel><a href=#dom-tracklist-getlabel>getLabel</a></code>( <var title="">index</var> )</dt>

<dd>
Expand Down Expand Up @@ -28786,18 +28786,16 @@ <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tra
if used as the name of a track in the track dimension of such a
fragment identifier. <a href=#refsMEDIAFRAG>[MEDIAFRAG]</a></p>

<!--
<p>The <dfn title="dom-TrackList-getKind"><code>getKind(<var
title="">index</var>)</code></dfn> method must return the category
<p>The <dfn id=dom-tracklist-getkind title=dom-TrackList-getKind><code>getKind(<var title="">index</var>)</code></dfn> method must return the category
of the track with index <var title="">index</var>, if there is one.
If there is no such track, then the method must instead throw an
<code>INDEX_SIZE_ERR</code> exception.</p>
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception.</p>

<p>The category of a track is the string given in the first column
of the table below that is the most appropriate for the track based
on the definitions in the table's second and third columns, as
determined by the metadata included in the track in the <span>media
resource</span>. For Ogg files, the Role header of the track gives
determined by the metadata included in the track in the <a href=#media-resource>media
resource</a>. For Ogg files, the Role header of the track gives
the relevant metadata. The cell in the third column of a row says
what the category given in the cell in the first column of that row
applies to; a category is only appropriate for an audio track if it
Expand All @@ -28806,56 +28804,42 @@ <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tra

</div>

<table id="dom-TrackList-getKind-categories">
<caption>Return values for <code title="dom-TrackList-getKind">getKind()</code></caption>
<thead>
<tr>
<th>Category
<table id=dom-TrackList-getKind-categories><caption>Return values for <code title=dom-TrackList-getKind><a href=#dom-tracklist-getkind>getKind()</a></code></caption>
<thead><tr><th>Category
<th>Definition
<th>Applies to...</th>
<th>Examples
<tbody>

<tr>
<td>"<dfn title="dom-TrackList-getKind-alternate"><code>alternative</code></dfn>"
<tbody><tr><td>"<dfn id=dom-tracklist-getkind-alternate title=dom-TrackList-getKind-alternate><code>alternative</code></dfn>"
<td>A possible alternative to the main track, e.g. a different take of a song (audio), or a different angle (video).
<td>Audio and video.
<td>Ogg: "audio/alterate" or "video/alternate".

<tr>
<td>"<dfn title="dom-TrackList-getKind-description"><code>description</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-description title=dom-TrackList-getKind-description><code>description</code></dfn>"
<td>An audio description of a video track.
<td>Audio only.
<td>Ogg: "audio/audiodesc".

<tr>
<td>"<dfn title="dom-TrackList-getKind-main"><code>main</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-main title=dom-TrackList-getKind-main><code>main</code></dfn>"
<td>The primary audio or video track.
<td>Audio and video.
<td>Ogg: "audio/main" or "video/main".
<td>Ogg: "audio/main" or "video/main"; WebM: the "FlagDefault" element is set.

<tr>
<td>"<dfn title="dom-TrackList-getKind-sign"><code>sign</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-sign title=dom-TrackList-getKind-sign><code>sign</code></dfn>"
<td>A sign-language interpretation of an audio track.
<td>Video only.
<td>Ogg: "video/sign".

<tr>
<td>"<dfn title="dom-TrackList-getKind-translation"><code>translation</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-translation title=dom-TrackList-getKind-translation><code>translation</code></dfn>"
<td>A translated version of the main track.
<td>Audio only.
<td>Ogg: "audio/dub".

<tr>
<td>"<dfn title="dom-TrackList-getKind-none"><code></code></dfn>" (empty string)
<tr><td>"<dfn id=dom-tracklist-getkind-none title=dom-TrackList-getKind-none><code></code></dfn>" (empty string)
<td>No explicit kind, or the kind given by the track's metadata is not recognised by the user agent.
<td>Audio and video.
<td>Any other track type or track role.

</table>

<div class="impl">
-->
</table><div class=impl>

<p>The <dfn id=dom-tracklist-getlabel title=dom-TrackList-getLabel><code>getLabel(<var title="">index</var>)</code></dfn> method must return the label of
the track with index <var title="">index</var>, if there is one and
Expand Down
56 changes: 20 additions & 36 deletions index
Expand Up @@ -28684,8 +28684,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<pre class=idl>interface <dfn id=tracklist>TrackList</dfn> {
readonly attribute unsigned long <a href=#dom-tracklist-length title=dom-TrackList-length>length</a>;
DOMString <a href=#dom-tracklist-getid title=dom-TrackList-getID>getID</a>(in unsigned long index);<!--
DOMString <span title="dom-TrackList-getKind">getKind</span>(in unsigned long index);-->
DOMString <a href=#dom-tracklist-getid title=dom-TrackList-getID>getID</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getkind title=dom-TrackList-getKind>getKind</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getlabel title=dom-TrackList-getLabel>getLabel</a>(in unsigned long index);
DOMString <a href=#dom-tracklist-getlanguage title=dom-TrackList-getLanguage>getLanguage</a>(in unsigned long index);

Expand Down Expand Up @@ -28720,15 +28720,15 @@ interface <dfn id=exclusivetracklist>ExclusiveTrackList</dfn> : <a href=#trackli
<cite>Media Fragments URI</cite> syntax. <a href=#hrefMEDIAFRAG>[MEDIAFRAG]</a></p>

</dd>
<!--
<dt><var title="">kind</var> = <var title="">tracks</var> . <code title="dom-TrackList-getKind">getKind</code>( <var title="">index</var> )</dt>

<dt><var title="">kind</var> = <var title="">tracks</var> . <code title=dom-TrackList-getKind><a href=#dom-tracklist-getkind>getKind</a></code>( <var title="">index</var> )</dt>

<dd>

<p>Returns the category the given track falls into. The <a href="#dom-TrackList-getKind-categories">possible track categories</a> are given below.</p>
<p>Returns the category the given track falls into. The <a href=#dom-TrackList-getKind-categories>possible track categories</a> are given below.</p>

</dd>
-->

<dt><var title="">label</var> = <var title="">tracks</var> . <code title=dom-TrackList-getLabel><a href=#dom-tracklist-getlabel>getLabel</a></code>( <var title="">index</var> )</dt>

<dd>
Expand Down Expand Up @@ -28809,18 +28809,16 @@ interface <dfn id=exclusivetracklist>ExclusiveTrackList</dfn> : <a href=#trackli
if used as the name of a track in the track dimension of such a
fragment identifier. <a href=#refsMEDIAFRAG>[MEDIAFRAG]</a></p>

<!--
<p>The <dfn title="dom-TrackList-getKind"><code>getKind(<var
title="">index</var>)</code></dfn> method must return the category
<p>The <dfn id=dom-tracklist-getkind title=dom-TrackList-getKind><code>getKind(<var title="">index</var>)</code></dfn> method must return the category
of the track with index <var title="">index</var>, if there is one.
If there is no such track, then the method must instead throw an
<code>INDEX_SIZE_ERR</code> exception.</p>
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception.</p>

<p>The category of a track is the string given in the first column
of the table below that is the most appropriate for the track based
on the definitions in the table's second and third columns, as
determined by the metadata included in the track in the <span>media
resource</span>. For Ogg files, the Role header of the track gives
determined by the metadata included in the track in the <a href=#media-resource>media
resource</a>. For Ogg files, the Role header of the track gives
the relevant metadata. The cell in the third column of a row says
what the category given in the cell in the first column of that row
applies to; a category is only appropriate for an audio track if it
Expand All @@ -28829,56 +28827,42 @@ interface <dfn id=exclusivetracklist>ExclusiveTrackList</dfn> : <a href=#trackli

</div>

<table id="dom-TrackList-getKind-categories">
<caption>Return values for <code title="dom-TrackList-getKind">getKind()</code></caption>
<thead>
<tr>
<th>Category
<table id=dom-TrackList-getKind-categories><caption>Return values for <code title=dom-TrackList-getKind><a href=#dom-tracklist-getkind>getKind()</a></code></caption>
<thead><tr><th>Category
<th>Definition
<th>Applies to...</th>
<th>Examples
<tbody>

<tr>
<td>"<dfn title="dom-TrackList-getKind-alternate"><code>alternative</code></dfn>"
<tbody><tr><td>"<dfn id=dom-tracklist-getkind-alternate title=dom-TrackList-getKind-alternate><code>alternative</code></dfn>"
<td>A possible alternative to the main track, e.g. a different take of a song (audio), or a different angle (video).
<td>Audio and video.
<td>Ogg: "audio/alterate" or "video/alternate".

<tr>
<td>"<dfn title="dom-TrackList-getKind-description"><code>description</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-description title=dom-TrackList-getKind-description><code>description</code></dfn>"
<td>An audio description of a video track.
<td>Audio only.
<td>Ogg: "audio/audiodesc".

<tr>
<td>"<dfn title="dom-TrackList-getKind-main"><code>main</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-main title=dom-TrackList-getKind-main><code>main</code></dfn>"
<td>The primary audio or video track.
<td>Audio and video.
<td>Ogg: "audio/main" or "video/main".
<td>Ogg: "audio/main" or "video/main"; WebM: the "FlagDefault" element is set.

<tr>
<td>"<dfn title="dom-TrackList-getKind-sign"><code>sign</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-sign title=dom-TrackList-getKind-sign><code>sign</code></dfn>"
<td>A sign-language interpretation of an audio track.
<td>Video only.
<td>Ogg: "video/sign".

<tr>
<td>"<dfn title="dom-TrackList-getKind-translation"><code>translation</code></dfn>"
<tr><td>"<dfn id=dom-tracklist-getkind-translation title=dom-TrackList-getKind-translation><code>translation</code></dfn>"
<td>A translated version of the main track.
<td>Audio only.
<td>Ogg: "audio/dub".

<tr>
<td>"<dfn title="dom-TrackList-getKind-none"><code></code></dfn>" (empty string)
<tr><td>"<dfn id=dom-tracklist-getkind-none title=dom-TrackList-getKind-none><code></code></dfn>" (empty string)
<td>No explicit kind, or the kind given by the track's metadata is not recognised by the user agent.
<td>Audio and video.
<td>Any other track type or track role.

</table>

<div class="impl">
-->
</table><div class=impl>

<p>The <dfn id=dom-tracklist-getlabel title=dom-TrackList-getLabel><code>getLabel(<var title="">index</var>)</code></dfn> method must return the label of
the track with index <var title="">index</var>, if there is one and
Expand Down
12 changes: 5 additions & 7 deletions source
Expand Up @@ -31252,8 +31252,8 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>

<pre class="idl">interface <dfn>TrackList</dfn> {
readonly attribute unsigned long <span title="dom-TrackList-length">length</span>;
DOMString <span title="dom-TrackList-getID">getID</span>(in unsigned long index);<!--
DOMString <span title="dom-TrackList-getKind">getKind</span>(in unsigned long index);-->
DOMString <span title="dom-TrackList-getID">getID</span>(in unsigned long index);
DOMString <span title="dom-TrackList-getKind">getKind</span>(in unsigned long index);
DOMString <span title="dom-TrackList-getLabel">getLabel</span>(in unsigned long index);
DOMString <span title="dom-TrackList-getLanguage">getLanguage</span>(in unsigned long index);

Expand Down Expand Up @@ -31291,15 +31291,15 @@ interface <dfn>ExclusiveTrackList</dfn> : <span>TrackList</span> {
href="#hrefMEDIAFRAG">[MEDIAFRAG]</a></p>

</dd>
<!--

<dt><var title="">kind</var> = <var title="">tracks</var> . <code title="dom-TrackList-getKind">getKind</code>( <var title="">index</var> )</dt>

<dd>

<p>Returns the category the given track falls into. The <a href="#dom-TrackList-getKind-categories">possible track categories</a> are given below.</p>

</dd>
-->

<dt><var title="">label</var> = <var title="">tracks</var> . <code title="dom-TrackList-getLabel">getLabel</code>( <var title="">index</var> )</dt>

<dd>
Expand Down Expand Up @@ -31383,7 +31383,6 @@ interface <dfn>ExclusiveTrackList</dfn> : <span>TrackList</span> {
if used as the name of a track in the track dimension of such a
fragment identifier. <a href="#refsMEDIAFRAG">[MEDIAFRAG]</a></p>

<!--
<p>The <dfn title="dom-TrackList-getKind"><code>getKind(<var
title="">index</var>)</code></dfn> method must return the category
of the track with index <var title="">index</var>, if there is one.
Expand Down Expand Up @@ -31429,7 +31428,7 @@ interface <dfn>ExclusiveTrackList</dfn> : <span>TrackList</span> {
<td>"<dfn title="dom-TrackList-getKind-main"><code>main</code></dfn>"
<td>The primary audio or video track.
<td>Audio and video.
<td>Ogg: "audio/main" or "video/main".
<td>Ogg: "audio/main" or "video/main"; WebM: the "FlagDefault" element is set.

<tr>
<td>"<dfn title="dom-TrackList-getKind-sign"><code>sign</code></dfn>"
Expand All @@ -31452,7 +31451,6 @@ interface <dfn>ExclusiveTrackList</dfn> : <span>TrackList</span> {
</table>

<div class="impl">
-->

<p>The <dfn title="dom-TrackList-getLabel"><code>getLabel(<var
title="">index</var>)</code></dfn> method must return the label of
Expand Down

0 comments on commit 174ef84

Please sign in to comment.