[html5] r1902 - [gow] (2) Make addCueRange() have an identifier so that people don't have to use [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jul 22 02:27:00 PDT 2008


Author: ianh
Date: 2008-07-22 02:26:59 -0700 (Tue, 22 Jul 2008)
New Revision: 1902

Modified:
   index
   source
Log:
[gow] (2) Make addCueRange() have an identifier so that people don't have to use currying. (Re: re-thinking 'cue ranges') (credit: ds)

Modified: index
===================================================================
--- index	2008-07-22 02:57:47 UTC (rev 1901)
+++ index	2008-07-22 09:26:59 UTC (rev 1902)
@@ -17438,7 +17438,7 @@
            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
@@ -18990,6 +18990,13 @@
    <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
@@ -19018,20 +19025,20 @@
 
   <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
@@ -19099,7 +19106,8 @@
     <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 -->
 
@@ -19107,7 +19115,8 @@
     <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 -->
 
@@ -19121,20 +19130,20 @@
   <!-- 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>
 

Modified: source
===================================================================
--- source	2008-07-22 02:57:47 UTC (rev 1901)
+++ source	2008-07-22 09:26:59 UTC (rev 1902)
@@ -15145,7 +15145,7 @@
            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
@@ -16642,6 +16642,11 @@
    <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
@@ -16664,13 +16669,14 @@
   </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
@@ -16741,14 +16747,14 @@
    <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>
@@ -16762,20 +16768,21 @@
   <!-- 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>




More information about the Commit-Watchers mailing list