Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) Transition this API to strings rather than numbers.
Affected topics: Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7071 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 25, 2012
1 parent 9ef6870 commit aa5f836
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 89 deletions.
56 changes: 26 additions & 30 deletions complete.html
Expand Up @@ -32913,10 +32913,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
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>;

const unsigned short <a href=#dom-texttrack-disabled title=dom-TextTrack-DISABLED>DISABLED</a> = 0;
const unsigned short <a href=#dom-texttrack-hidden title=dom-TextTrack-HIDDEN>HIDDEN</a> = 1;
const unsigned short <a href=#dom-texttrack-showing title=dom-TextTrack-SHOWING>SHOWING</a> = 2;
attribute unsigned short <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
attribute DOMString <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;

readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-cues title=dom-TextTrack-cues>cues</a>;
readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
Expand Down Expand Up @@ -32945,16 +32942,16 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
<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
number from the following list:</p>
<dl><dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-DISABLED><a href=#dom-texttrack-disabled>DISABLED</a></code> (0)</dt>
string from the following list:</p>
<dl><dt>"<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
<dd>
<p>The <a href=#text-track-disabled>text track disabled</a> mode.</p>
</dd>
<dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-HIDDEN><a href=#dom-texttrack-hidden>HIDDEN</a></code> (1)</dt>
<dt>"<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
<dd>
<p>The <a href=#text-track-hidden>text track hidden</a> mode.</p>
</dd>
<dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-SHOWING><a href=#dom-texttrack-showing>SHOWING</a></code> (2)</dt>
<dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
<dd>
<p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
</dd>
Expand Down Expand Up @@ -33006,24 +33003,23 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
represents.</p>

<p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
attribute, on getting, must return the numeric value corresponding
to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a>
that the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by
the following list:</p>
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
<code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
following list:</p>

<dl><dt><dfn id=dom-texttrack-disabled title=dom-TextTrack-DISABLED><code>DISABLED</code></dfn> (numeric value 0)</dt>
<dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
<dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
<dt><dfn id=dom-texttrack-hidden title=dom-TextTrack-HIDDEN><code>HIDDEN</code></dfn> (numeric value 1)</dt>
<dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
<dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
<dt><dfn id=dom-texttrack-showing title=dom-TextTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
<dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
<dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
</dl><p>On setting, if the new value is not either 0, 1, or 2, the user
agent must throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
exception. Otherwise, if the new value isn't equal to what the
attribute would currently return, the new value must be processed as
follows:</p>
</dl><p>On setting, if the new value is not either the string "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>", "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>", "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>", the user agent must
throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception. Otherwise, if
the new value isn't equal to what the attribute would currently
return, the new value must be processed as follows:</p>

<dl class=switch><dt>If the new value is 0</dt>
<dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>

<dd>

Expand All @@ -33033,7 +33029,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

</dd>

<dt>If the new value is 1</dt>
<dt>If the new value is "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>

<dd>

Expand All @@ -33043,23 +33039,23 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

</dd>

<dt>If the new value is 2</dt>
<dt>If the new value is "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>

<dd>

<p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
the <a href=#text-track-showing>text track showing</a> mode.</p>

<p class=note>If the mode had been <a href=#text-track-showing-by-default title="text track
showing by default">showing by default</a>, this will change it
to <a href=#text-track-showing title="text track showing">showing</a>, even though
the value of <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> would
appear not to change.</p>

</dd>

</dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
</dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
default">showing by default</a>, then there is no way to change
it to <a href=#text-track-showing title="text track showing">showing</a> without first
changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
<a href=#text-track-hidden title="text track hidden">hidden</a>.</p>

<p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that
Expand Down
56 changes: 26 additions & 30 deletions index
Expand Up @@ -32913,10 +32913,7 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
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>;

const unsigned short <a href=#dom-texttrack-disabled title=dom-TextTrack-DISABLED>DISABLED</a> = 0;
const unsigned short <a href=#dom-texttrack-hidden title=dom-TextTrack-HIDDEN>HIDDEN</a> = 1;
const unsigned short <a href=#dom-texttrack-showing title=dom-TextTrack-SHOWING>SHOWING</a> = 2;
attribute unsigned short <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
attribute DOMString <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;

readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-cues title=dom-TextTrack-cues>cues</a>;
readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
Expand Down Expand Up @@ -32945,16 +32942,16 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
<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
number from the following list:</p>
<dl><dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-DISABLED><a href=#dom-texttrack-disabled>DISABLED</a></code> (0)</dt>
string from the following list:</p>
<dl><dt>"<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
<dd>
<p>The <a href=#text-track-disabled>text track disabled</a> mode.</p>
</dd>
<dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-HIDDEN><a href=#dom-texttrack-hidden>HIDDEN</a></code> (1)</dt>
<dt>"<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
<dd>
<p>The <a href=#text-track-hidden>text track hidden</a> mode.</p>
</dd>
<dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-SHOWING><a href=#dom-texttrack-showing>SHOWING</a></code> (2)</dt>
<dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
<dd>
<p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
</dd>
Expand Down Expand Up @@ -33006,24 +33003,23 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
represents.</p>

<p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
attribute, on getting, must return the numeric value corresponding
to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a>
that the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by
the following list:</p>
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
<code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
following list:</p>

<dl><dt><dfn id=dom-texttrack-disabled title=dom-TextTrack-DISABLED><code>DISABLED</code></dfn> (numeric value 0)</dt>
<dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
<dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
<dt><dfn id=dom-texttrack-hidden title=dom-TextTrack-HIDDEN><code>HIDDEN</code></dfn> (numeric value 1)</dt>
<dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
<dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
<dt><dfn id=dom-texttrack-showing title=dom-TextTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
<dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
<dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
</dl><p>On setting, if the new value is not either 0, 1, or 2, the user
agent must throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
exception. Otherwise, if the new value isn't equal to what the
attribute would currently return, the new value must be processed as
follows:</p>
</dl><p>On setting, if the new value is not either the string "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>", "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>", "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>", the user agent must
throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception. Otherwise, if
the new value isn't equal to what the attribute would currently
return, the new value must be processed as follows:</p>

<dl class=switch><dt>If the new value is 0</dt>
<dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>

<dd>

Expand All @@ -33033,7 +33029,7 @@ interface <dfn id=mediacontroller>MediaController</dfn> {

</dd>

<dt>If the new value is 1</dt>
<dt>If the new value is "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>

<dd>

Expand All @@ -33043,23 +33039,23 @@ interface <dfn id=mediacontroller>MediaController</dfn> {

</dd>

<dt>If the new value is 2</dt>
<dt>If the new value is "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>

<dd>

<p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
the <a href=#text-track-showing>text track showing</a> mode.</p>

<p class=note>If the mode had been <a href=#text-track-showing-by-default title="text track
showing by default">showing by default</a>, this will change it
to <a href=#text-track-showing title="text track showing">showing</a>, even though
the value of <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> would
appear not to change.</p>

</dd>

</dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
</dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
default">showing by default</a>, then there is no way to change
it to <a href=#text-track-showing title="text track showing">showing</a> without first
changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
<a href=#text-track-hidden title="text track hidden">hidden</a>.</p>

<p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that
Expand Down

0 comments on commit aa5f836

Please sign in to comment.