Skip to content

Commit

Permalink
[gow] (2) Make addCueRange() have an identifier so that people don't …
Browse files Browse the repository at this point in the history
…have to use currying. (Re: re-thinking 'cue ranges') (credit: ds)

git-svn-id: http://svn.whatwg.org/webapps@1902 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 22, 2008
1 parent a8b5031 commit 0fd1faf
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 42 deletions.
57 changes: 33 additions & 24 deletions index
Expand Up @@ -17438,7 +17438,7 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
attribute unsigned long <a href="#currentloop" title=dom-media-currentLoop>currentLoop</a>;

// cue ranges
void <a href="#addcuerange" title=dom-media-addCueRange>addCueRange</a>(in DOMString className, in float start, in float end, in boolean pauseOnExit, in <a href="#voidcallback">VoidCallback</a> enterCallback, in <a href="#voidcallback">VoidCallback</a> exitCallback);
void <a href="#addcuerange" title=dom-media-addCueRange>addCueRange</a>(in DOMString className, in DOMString id, in float start, in float end, in boolean pauseOnExit, in <a href="#cuerangecallback">CueRangeCallback</a> enterCallback, in <a href="#cuerangecallback">CueRangeCallback</a> exitCallback);
void <a href="#removecueranges" title=dom-media-removeCueRanges>removeCueRanges</a>(in DOMString className);

// controls
Expand Down Expand Up @@ -18990,6 +18990,13 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<dd>A group of related ranges can be given the same class name so that
they can all be removed at the same time.

<dt>An identifier

<dt>

<dd>A string can be assigned to each cue range for identification by
script. The string need not be unique and can contain any value.

<dt>A start time

<dt>An end time
Expand Down Expand Up @@ -19018,20 +19025,20 @@ the time Marco had stuck his tongue out...&lt;/p></pre>

<p>The <dfn id=addcuerange
title=dom-media-addCueRange><code>addCueRange(<var
title="">className</var>, <var title="">start</var>, <var
title="">end</var>, <var title="">pauseOnExit</var>, <var
title="">enterCallback</var>, <var
title="">className</var>, <var title="">id</var>, <var
title="">start</var>, <var title="">end</var>, <var
title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var
title="">exitCallback</var>)</code></dfn> method must, when called, add a
<a href="#cue-ranges0">cue range</a> to the <a href="#media7">media
element</a>, that cue range having the class name <var
title="">className</var>, the start time <var title="">start</var> (in
seconds), the end time <var title="">end</var> (in seconds), the "pause"
boolean with the same value as <var title="">pauseOnExit</var>, the
"enter" callback <var title="">enterCallback</var>, the "exit" callback
<var title="">exitCallback</var>, and an "active" boolean that is true if
the <a href="#current0">current playback position</a> is equal to or
greater than the start time and less than the end time, and false
otherwise.
title="">className</var>, the identifier <var title="">id</var>, the start
time <var title="">start</var> (in seconds), the end time <var
title="">end</var> (in seconds), the "pause" boolean with the same value
as <var title="">pauseOnExit</var>, the "enter" callback <var
title="">enterCallback</var>, the "exit" callback <var
title="">exitCallback</var>, and an "active" boolean that is true if the
<a href="#current0">current playback position</a> is equal to or greater
than the start time and less than the end time, and false otherwise.

<p>The <dfn id=removecueranges
title=dom-media-removeCueRanges><code>removeCueRanges(<var
Expand Down Expand Up @@ -19099,15 +19106,17 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<p>Invoke all the non-null "exit" callbacks for all of the <a
href="#cue-ranges0" title="cue range">cue ranges</a> in <var
title="">other ranges</var> that have their "active" boolean set to
"true" (active), in list order.
"true" (active), in list order, passing their identifier as the
callback's only argument.
</li>
<!-- XXX queue -->

<li>
<p>Invoke all the non-null "enter" callbacks for all of the <a
href="#cue-ranges0" title="cue range">cue ranges</a> in <var
title="">current ranges</var> that have their "active" boolean set to
"false" (inactive), in list order.
"false" (inactive), in list order, passing their identifier as the
callback's only argument.
</li>
<!-- XXX queue -->

Expand All @@ -19121,20 +19130,20 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<!-- XXX the remainder of this subsection may be removed if we ever
get a way to mark up callbacks in IDL -->

<p>Invoking a callback (an object implementing the <code><a
href="#voidcallback">VoidCallback</a></code> interface) means calling its
<code title=dom-VoidCallback-handleEvent><a
href="#handleevent">handleEvent()</a></code> method.
<p>Invoking a callback (an object implementing one of the following two
interfaces) means calling its <code title="">handleEvent()</code> method.

<pre class=idl>interface <dfn id=voidcallback>VoidCallback</dfn> {
void <a href="#handleevent" title=dom-voidCallback-handleEvent>handleEvent</a>();
void <span title=dom-voidCallback-handleEvent>handleEvent</span>();
};

interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
void <span title=dom-cueRangeCallback-handleEvent>handleEvent</span>(in DOMString id);
};</pre>

<p>The <dfn id=handleevent
title=dom-voidCallback-handleEvent><code>handleEvent</code></dfn> method
of objects implementing the <code><a
href="#voidcallback">VoidCallback</a></code> interface is the entry point
for the callback represented by the object.
<p>The <dfn id=handleevent title=""><code>handleEvent</code></dfn> method
of objects implementing these interfaces is the entry point for the
callback represented by the object.

<h5 id=user-interface><span class=secno>4.7.10.10. </span>User interface</h5>

Expand Down
43 changes: 25 additions & 18 deletions source
Expand Up @@ -15145,7 +15145,7 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
attribute unsigned long <span title="dom-media-currentLoop">currentLoop</span>;

// cue ranges
void <span title="dom-media-addCueRange">addCueRange</span>(in DOMString className, in float start, in float end, in boolean pauseOnExit, in <span>VoidCallback</span> enterCallback, in <span>VoidCallback</span> exitCallback);
void <span title="dom-media-addCueRange">addCueRange</span>(in DOMString className, in DOMString id, in float start, in float end, in boolean pauseOnExit, in <span>CueRangeCallback</span> enterCallback, in <span>CueRangeCallback</span> exitCallback);
void <span title="dom-media-removeCueRanges">removeCueRanges</span>(in DOMString className);

// controls
Expand Down Expand Up @@ -16642,6 +16642,11 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<dd>A group of related ranges can be given the same class name so
that they can all be removed at the same time.</dd>

<dt>An identifier<dt>
<dd>A string can be assigned to each cue range for identification
by script. The string need not be unique and can contain any
value.</dd>

<dt>A start time</dt>
<dt>An end time</dt>
<dd>The actual time range, using the same timeline as the
Expand All @@ -16664,13 +16669,14 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
</dl>

<p>The <dfn title="dom-media-addCueRange"><code>addCueRange(<var
title="">className</var>, <var title="">start</var>, <var
title="">end</var>, <var title="">pauseOnExit</var>, <var
title="">enterCallback</var>, <var
title="">className</var>, <var title="">id</var>, <var
title="">start</var>, <var title="">end</var>, <var
title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var
title="">exitCallback</var>)</code></dfn> method must, when called,
add a <span>cue range</span> to the <span>media element</span>, that
cue range having the class name <var title="">className</var>, the
start time <var title="">start</var> (in seconds), the end time <var
identifier <var title="">id</var>, the start time <var
title="">start</var> (in seconds), the end time <var
title="">end</var> (in seconds), the "pause" boolean with the same
value as <var title="">pauseOnExit</var>, the "enter" callback <var
title="">enterCallback</var>, the "exit" callback <var
Expand Down Expand Up @@ -16741,14 +16747,14 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<li><p>Invoke all the non-null "exit" callbacks for all of the
<span title="cue range">cue ranges</span> in <var title="">other
ranges</var> that have their "active" boolean set to "true"
(active), in list order.</p></li>
<!-- XXX queue -->
(active), in list order, passing their identifier as the callback's
only argument.</p></li> <!-- XXX queue -->

<li><p>Invoke all the non-null "enter" callbacks for all of the
<span title="cue range">cue ranges</span> in <var title="">current
ranges</var> that have their "active" boolean set to "false"
(inactive), in list order.</p></li>
<!-- XXX queue -->
(inactive), in list order, passing their identifier as the
callback's only argument.</p></li> <!-- XXX queue -->

<li><p>Set the "active" boolean of all the <span title="cue
range">cue ranges</span> in the <var title="">current ranges</var>
Expand All @@ -16762,20 +16768,21 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<!-- XXX the remainder of this subsection may be removed if we ever
get a way to mark up callbacks in IDL -->

<p>Invoking a callback (an object implementing the
<code>VoidCallback</code> interface) means calling its <code
title="dom-VoidCallback-handleEvent">handleEvent()</code>
method.</p>
<p>Invoking a callback (an object implementing one of the following
two interfaces) means calling its <code
title="">handleEvent()</code> method.</p>

<pre class="idl">interface <dfn>VoidCallback</dfn> {
void <span title="dom-voidCallback-handleEvent">handleEvent</span>();
};

interface <dfn>CueRangeCallback</dfn> {
void <span title="dom-cueRangeCallback-handleEvent">handleEvent</span>(in DOMString id);
};</pre>

<p>The <dfn
title="dom-voidCallback-handleEvent"><code>handleEvent</code></dfn>
method of objects implementing the <code>VoidCallback</code>
interface is the entry point for the callback represented by the
object.</p>
<p>The <dfn title=""><code>handleEvent</code></dfn> method of
objects implementing these interfaces is the entry point for the
callback represented by the object.</p>


<h5>User interface</h5>
Expand Down

0 comments on commit 0fd1faf

Please sign in to comment.