[html5] r5965 - [agiow] (0) Change how pausing media is exposed in GeneratedStream, and expose m [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 25 15:14:54 PDT 2011


Author: ianh
Date: 2011-03-25 15:14:53 -0700 (Fri, 25 Mar 2011)
New Revision: 5965

Modified:
   complete.html
   index
   source
Log:
[agiow] (0) Change how pausing media is exposed in GeneratedStream, and expose multiple tracks.

Modified: complete.html
===================================================================
--- complete.html	2011-03-25 00:55:06 UTC (rev 5964)
+++ complete.html	2011-03-25 22:14:53 UTC (rev 5965)
@@ -28163,11 +28163,20 @@
   element</a>'s <a href=#media-resource>media resource</a>. The same object must
   be returned each time.</p>
 
+  <p class=note>There are only ever two <code><a href=#tracklist>TrackList</a></code>
+  objects (one <code><a href=#multipletracklist>MultipleTrackList</a></code> object and one
+  <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object) per <a href=#media-element>media
+  element</a>, even if another <a href=#media-resource>media resource</a> is
+  loaded into the element: the objects are reused.</p>
+
   </div>
 
 
   <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tracklist>TrackList</a></code> objects</h6>
 
+  <!-- should probably move this section out since it is also used by
+  the video conferencing stuff -->
+
   <p>The <code><a href=#multipletracklist>MultipleTrackList</a></code> and
   <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> interfaces, used by the attributes
   defined in the previous section, are substantially similar. Their
@@ -28257,12 +28266,6 @@
 
   </dl><div class=impl>
 
-  <p class=note>There are only ever two <code><a href=#tracklist>TrackList</a></code>
-  objects (one <code><a href=#multipletracklist>MultipleTrackList</a></code> object and one
-  <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object) per <a href=#media-element>media
-  element</a>, even if another <a href=#media-resource>media resource</a> is
-  loaded into the element: the objects are reused.</p>
-
   <p>The <dfn id=dom-tracklist-length title=dom-TrackList-length><code>length</code></dfn>
   attribute must return the number of tracks represented by the
   <code><a href=#tracklist>TrackList</a></code> object at the time of getting.</p>
@@ -72069,9 +72072,10 @@
 
   <p>The <code><a href=#generatedstream>GeneratedStream</a></code> interface is used when the user
   agent is generating the stream's data (e.g. from a camera or
-  streaming it from a local video file). It allows authors to pause
-  the generation of the content, e.g. to allow the user to temporarily
-  disable a local camera during a video-conference chat.</p>
+  streaming it from a local video file). It allows authors to control
+  individual tracks during the generation of the content, e.g. to
+  allow the user to temporarily disable a local camera during a
+  video-conference chat.</p>
 
   <p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object is being generated
   from a local file (as opposed to a live audio/video source), the
@@ -72098,12 +72102,9 @@
 interface <dfn id=generatedstream>GeneratedStream</dfn> : <a href=#stream>Stream</a> {
   void <a href=#dom-stream-stop title=dom-stream-stop>stop</a>();
 
-  // temporarily pausing the stream
-  const unsigned short <a href=#dom-stream-paused title=dom-stream-PAUSED>PAUSED</a> = 3;
-  void <a href=#dom-stream-pause title=dom-stream-pause>pause</a>();
-  void <a href=#dom-stream-resume title=dom-stream-resume>resume</a>();
-           attribute <a href=#function>Function</a> <a href=#handler-stream-onpause title=handler-stream-onpause>onpause</a>;
-           attribute <a href=#function>Function</a> <a href=#handler-stream-onplay title=handler-stream-onplay>onplay</a>;
+  // track control
+  readonly attribute <a href=#multipletracklist>MultipleTrackList</a> <a href=#dom-stream-audiotracks title=dom-stream-audioTracks>audioTracks</a>;
+  readonly attribute <a href=#exclusivetracklist>ExclusiveTrackList</a> <a href=#dom-stream-videotracks title=dom-stream-videoTracks>videoTracks</a>;
 };</pre>
 
   <dl class=domintro><dt><var title="">stream</var> . <code title=dom-stream-label><a href=#dom-stream-label>label</a></code></dt>
@@ -72137,32 +72138,26 @@
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title=dom-stream-paused><a href=#dom-stream-paused>paused</a></code></dt>
+   <dt><var title="">stream</var> . <code title=dom-stream-audioTracks><a href=#dom-stream-audiotracks>audioTracks</a></code></dt>
 
    <dd>
 
-    <p>Returns false if the stream is generating data; true if it is pause.</p>
+    <p>Returns a <code><a href=#multipletracklist>MultipleTrackList</a></code> object representing
+    the audio tracks available for mixing into the <code><a href=#generatedstream>GeneratedStream</a></code>'s stream.</p>
 
    </dd>
 
+   <dt><var title="">stream</var> . <code title=dom-stream-videoTracks><a href=#dom-stream-videotracks>videoTracks</a></code></dt>
 
-   <dt><var title="">stream</var> . <code title=dom-stream-pause><a href=#dom-stream-pause>pause</a></code>()</dt>
-
    <dd>
 
-    <p>Temporarily stops the generation of media data for the stream.</p>
+    <p>Returns an <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object representing
+    the video tracks available for the <code><a href=#generatedstream>GeneratedStream</a></code>'s
+    stream.</p>
 
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title=dom-stream-resume><a href=#dom-stream-resume>resume</a></code>()</dt>
-
-   <dd>
-
-    <p>Resumes the generation of media data for the stream if it was temporarily stopped.</p>
-
-   </dd>
-
   </dl><div class=impl>
 
   <p>The <dfn id=dom-stream-readystate title=dom-stream-readyState><code>readyState</code></dfn>
@@ -72181,12 +72176,6 @@
    or generating data, and will never receive or generate more data
    for this stream).</dd>
 
-   <dt><dfn id=dom-stream-paused title=dom-stream-PAUSED><code>PAUSED</code></dfn> (numeric value 3)</dt>
-
-   <dd>The stream is not generating data at this time, but could still
-   be resumed. Only <code><a href=#generatedstream>GeneratedStream</a></code> objects can be in
-   this state.</dd>
-
   </dl><p>When a <code><a href=#stream>Stream</a></code> object is created, its <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute must be
   set to <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1).</p>
 
@@ -72258,44 +72247,47 @@
 
    <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-ended>ended</code> at the object.</li>
 
-  </ol><hr><p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object's <dfn id=dom-stream-pause title=dom-stream-pause><code>pause()</code></dfn> method is
-  invoked, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
-  following steps:</p>
+  </ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> queued for the <code title=dom-stream-stop><a href=#dom-stream-stop>stop()</a></code> method is the <a href=#dom-manipulation-task-source>DOM
+  manipulation task source</a>.</p>
 
-  <ol><li><p>If the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute is not in
-   the <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1) state, then abort
-   these steps.</li>
+  <hr><p>A <code><a href=#generatedstream>GeneratedStream</a></code> can have multiple audio and video
+  sources (e.g. because the user has multiple microphones, or because
+  the real source of the stream is a <a href=#media-resource>media resource</a> with
+  many media tracks). The stream represented by a
+  <code><a href=#generatedstream>GeneratedStream</a></code> has either zero or one audio track and
+  either zero or one video track.</p>
 
-   <li><p>Pause the generation of data for the stream. If the data is
-   being generated from a live source (e.g. a microphone or camera),
-   then data collected for this stream while the stream is paused must
-   be discarded. If the data is being generated from a prerecorded
-   source (e.g. a video file), the user agent should follow user
-   preferences for handling a pause (either skipping over data in real
-   time or resuming from the same point when the stream is later
-   resumed).</li>
+  <div class=impl>
 
-   <li><p>Set the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute to <code title=dom-stream-PAUSED><a href=#dom-stream-paused>PAUSED</a></code> (3).</li>
+  <p>The <dfn id=dom-stream-audiotracks title=dom-stream-audioTracks><code>audioTracks</code></dfn>
+  attribute of a <code><a href=#generatedstream>GeneratedStream</a></code> object must return a
+  <a href=#live>live</a> <code><a href=#multipletracklist>MultipleTrackList</a></code> object representing
+  the audio sources available to the <code><a href=#generatedstream>GeneratedStream</a></code>. The
+  same object must be returned each time. The
+  <code><a href=#generatedstream>GeneratedStream</a></code>'s output audio track must be the result
+  of mixing all the enabled audio sources, if any.</p>
 
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-pause>pause</code> at the object.</li>
+  <p>The <dfn id=dom-stream-videotracks title=dom-stream-videoTracks><code>videoTracks</code></dfn>
+  attribute of a <code><a href=#generatedstream>GeneratedStream</a></code> object must return a
+  <a href=#live>live</a> <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object
+  representing the video sources available to the
+  <code><a href=#generatedstream>GeneratedStream</a></code>. The same object must be returned each
+  time. The <code><a href=#generatedstream>GeneratedStream</a></code>'s output video track must be
+  the selected video source, if any.</p>
 
-  </ol><p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object's <dfn id=dom-stream-resume title=dom-stream-resume><code>resume()</code></dfn> method is
-  invoked, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
-  following steps:</p>
+  <p>User agents may label audio and video sources (e.g. "Internal
+  microphone" or "External USB Webcam"), in which case the <code title=dom-TrackList-getName><a href=#dom-tracklist-getname>getName()</a></code> methods (on the
+  <code><a href=#multipletracklist>MultipleTrackList</a></code> and <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code>
+  objects) must use the labels the user agent has assigned as the
+  track names of the source tracks of the <code><a href=#generatedstream>GeneratedStream</a></code>
+  object. Otherwise, the <code title=dom-TrackList-getName><a href=#dom-tracklist-getname>getName()</a></code> methods must use the
+  empty string as the track names of the source tracks of the
+  <code><a href=#generatedstream>GeneratedStream</a></code> object. The <code title=dom-TrackList-getLanguage><a href=#dom-tracklist-getlanguage>getLanguage()</a></code> methods must
+  use the empty string as the track language for all the source tracks
+  of the <code><a href=#generatedstream>GeneratedStream</a></code> object.</p>
 
-  <ol><li><p>If the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute is not in
-   the <code title=dom-stream-PAUSED><a href=#dom-stream-paused>PAUSED</a></code> (3) state, then
-   abort these steps.</li>
+  </div>
 
-   <li><p>Resume the generation of data for the stream.</li>
-
-   <li><p>Set the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute to <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1).</li>
-
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-play>play</code> at the object.</li>
-
-  </ol><hr><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> queued for the <code title=dom-stream-stop><a href=#dom-stream-stop>stop()</a></code>, <code title=dom-stream-pause><a href=#dom-stream-pause>pause()</a></code>, and <code title=dom-stream-resume><a href=#dom-stream-resume>resume()</a></code> methods is the <a href=#dom-manipulation-task-source>DOM
-  manipulation task source</a>.</p>
-
   <hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their
   corresponding <a href=#event-handler-event-type title="event handler event type">event handler
   event types</a>) that must be supported, as IDL attributes, by
@@ -72303,15 +72295,6 @@
 
   <table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
    <tbody><tr><td><dfn id=handler-stream-onended title=handler-stream-onended><code>onended</code></dfn> <td> <code title=event-stream-ended>ended</code>
-  </table><p>The following are the additional <a href=#event-handlers>event handlers</a> (and
-  their corresponding <a href=#event-handler-event-type title="event handler event type">event
-  handler event types</a>) that must be supported, as IDL
-  attributes, by all objects implementing the
-  <code><a href=#generatedstream>GeneratedStream</a></code> interface:</p>
-
-  <table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
-   <tbody><tr><td><dfn id=handler-stream-onpause title=handler-stream-onpause><code>onpause</code></dfn> <td> <code title=event-stream-pause>pause</code>
-    <tr><td><dfn id=handler-stream-onplay title=handler-stream-onplay><code>onplay</code></dfn> <td> <code title=event-stream-play>play</code>
   </table></div>
 
   <div class=example>

Modified: index
===================================================================
--- index	2011-03-25 00:55:06 UTC (rev 5964)
+++ index	2011-03-25 22:14:53 UTC (rev 5965)
@@ -28143,11 +28143,20 @@
   element</a>'s <a href=#media-resource>media resource</a>. The same object must
   be returned each time.</p>
 
+  <p class=note>There are only ever two <code><a href=#tracklist>TrackList</a></code>
+  objects (one <code><a href=#multipletracklist>MultipleTrackList</a></code> object and one
+  <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object) per <a href=#media-element>media
+  element</a>, even if another <a href=#media-resource>media resource</a> is
+  loaded into the element: the objects are reused.</p>
+
   </div>
 
 
   <h6 id=tracklist-objects><span class=secno>4.8.10.10.1 </span><code><a href=#tracklist>TrackList</a></code> objects</h6>
 
+  <!-- should probably move this section out since it is also used by
+  the video conferencing stuff -->
+
   <p>The <code><a href=#multipletracklist>MultipleTrackList</a></code> and
   <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> interfaces, used by the attributes
   defined in the previous section, are substantially similar. Their
@@ -28237,12 +28246,6 @@
 
   </dl><div class=impl>
 
-  <p class=note>There are only ever two <code><a href=#tracklist>TrackList</a></code>
-  objects (one <code><a href=#multipletracklist>MultipleTrackList</a></code> object and one
-  <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object) per <a href=#media-element>media
-  element</a>, even if another <a href=#media-resource>media resource</a> is
-  loaded into the element: the objects are reused.</p>
-
   <p>The <dfn id=dom-tracklist-length title=dom-TrackList-length><code>length</code></dfn>
   attribute must return the number of tracks represented by the
   <code><a href=#tracklist>TrackList</a></code> object at the time of getting.</p>
@@ -72075,9 +72078,10 @@
 
   <p>The <code><a href=#generatedstream>GeneratedStream</a></code> interface is used when the user
   agent is generating the stream's data (e.g. from a camera or
-  streaming it from a local video file). It allows authors to pause
-  the generation of the content, e.g. to allow the user to temporarily
-  disable a local camera during a video-conference chat.</p>
+  streaming it from a local video file). It allows authors to control
+  individual tracks during the generation of the content, e.g. to
+  allow the user to temporarily disable a local camera during a
+  video-conference chat.</p>
 
   <p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object is being generated
   from a local file (as opposed to a live audio/video source), the
@@ -72104,12 +72108,9 @@
 interface <dfn id=generatedstream>GeneratedStream</dfn> : <a href=#stream>Stream</a> {
   void <a href=#dom-stream-stop title=dom-stream-stop>stop</a>();
 
-  // temporarily pausing the stream
-  const unsigned short <a href=#dom-stream-paused title=dom-stream-PAUSED>PAUSED</a> = 3;
-  void <a href=#dom-stream-pause title=dom-stream-pause>pause</a>();
-  void <a href=#dom-stream-resume title=dom-stream-resume>resume</a>();
-           attribute <a href=#function>Function</a> <a href=#handler-stream-onpause title=handler-stream-onpause>onpause</a>;
-           attribute <a href=#function>Function</a> <a href=#handler-stream-onplay title=handler-stream-onplay>onplay</a>;
+  // track control
+  readonly attribute <a href=#multipletracklist>MultipleTrackList</a> <a href=#dom-stream-audiotracks title=dom-stream-audioTracks>audioTracks</a>;
+  readonly attribute <a href=#exclusivetracklist>ExclusiveTrackList</a> <a href=#dom-stream-videotracks title=dom-stream-videoTracks>videoTracks</a>;
 };</pre>
 
   <dl class=domintro><dt><var title="">stream</var> . <code title=dom-stream-label><a href=#dom-stream-label>label</a></code></dt>
@@ -72143,32 +72144,26 @@
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title=dom-stream-paused><a href=#dom-stream-paused>paused</a></code></dt>
+   <dt><var title="">stream</var> . <code title=dom-stream-audioTracks><a href=#dom-stream-audiotracks>audioTracks</a></code></dt>
 
    <dd>
 
-    <p>Returns false if the stream is generating data; true if it is pause.</p>
+    <p>Returns a <code><a href=#multipletracklist>MultipleTrackList</a></code> object representing
+    the audio tracks available for mixing into the <code><a href=#generatedstream>GeneratedStream</a></code>'s stream.</p>
 
    </dd>
 
+   <dt><var title="">stream</var> . <code title=dom-stream-videoTracks><a href=#dom-stream-videotracks>videoTracks</a></code></dt>
 
-   <dt><var title="">stream</var> . <code title=dom-stream-pause><a href=#dom-stream-pause>pause</a></code>()</dt>
-
    <dd>
 
-    <p>Temporarily stops the generation of media data for the stream.</p>
+    <p>Returns an <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object representing
+    the video tracks available for the <code><a href=#generatedstream>GeneratedStream</a></code>'s
+    stream.</p>
 
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title=dom-stream-resume><a href=#dom-stream-resume>resume</a></code>()</dt>
-
-   <dd>
-
-    <p>Resumes the generation of media data for the stream if it was temporarily stopped.</p>
-
-   </dd>
-
   </dl><div class=impl>
 
   <p>The <dfn id=dom-stream-readystate title=dom-stream-readyState><code>readyState</code></dfn>
@@ -72187,12 +72182,6 @@
    or generating data, and will never receive or generate more data
    for this stream).</dd>
 
-   <dt><dfn id=dom-stream-paused title=dom-stream-PAUSED><code>PAUSED</code></dfn> (numeric value 3)</dt>
-
-   <dd>The stream is not generating data at this time, but could still
-   be resumed. Only <code><a href=#generatedstream>GeneratedStream</a></code> objects can be in
-   this state.</dd>
-
   </dl><p>When a <code><a href=#stream>Stream</a></code> object is created, its <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute must be
   set to <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1).</p>
 
@@ -72264,44 +72253,47 @@
 
    <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-ended>ended</code> at the object.</li>
 
-  </ol><hr><p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object's <dfn id=dom-stream-pause title=dom-stream-pause><code>pause()</code></dfn> method is
-  invoked, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
-  following steps:</p>
+  </ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> queued for the <code title=dom-stream-stop><a href=#dom-stream-stop>stop()</a></code> method is the <a href=#dom-manipulation-task-source>DOM
+  manipulation task source</a>.</p>
 
-  <ol><li><p>If the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute is not in
-   the <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1) state, then abort
-   these steps.</li>
+  <hr><p>A <code><a href=#generatedstream>GeneratedStream</a></code> can have multiple audio and video
+  sources (e.g. because the user has multiple microphones, or because
+  the real source of the stream is a <a href=#media-resource>media resource</a> with
+  many media tracks). The stream represented by a
+  <code><a href=#generatedstream>GeneratedStream</a></code> has either zero or one audio track and
+  either zero or one video track.</p>
 
-   <li><p>Pause the generation of data for the stream. If the data is
-   being generated from a live source (e.g. a microphone or camera),
-   then data collected for this stream while the stream is paused must
-   be discarded. If the data is being generated from a prerecorded
-   source (e.g. a video file), the user agent should follow user
-   preferences for handling a pause (either skipping over data in real
-   time or resuming from the same point when the stream is later
-   resumed).</li>
+  <div class=impl>
 
-   <li><p>Set the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute to <code title=dom-stream-PAUSED><a href=#dom-stream-paused>PAUSED</a></code> (3).</li>
+  <p>The <dfn id=dom-stream-audiotracks title=dom-stream-audioTracks><code>audioTracks</code></dfn>
+  attribute of a <code><a href=#generatedstream>GeneratedStream</a></code> object must return a
+  <a href=#live>live</a> <code><a href=#multipletracklist>MultipleTrackList</a></code> object representing
+  the audio sources available to the <code><a href=#generatedstream>GeneratedStream</a></code>. The
+  same object must be returned each time. The
+  <code><a href=#generatedstream>GeneratedStream</a></code>'s output audio track must be the result
+  of mixing all the enabled audio sources, if any.</p>
 
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-pause>pause</code> at the object.</li>
+  <p>The <dfn id=dom-stream-videotracks title=dom-stream-videoTracks><code>videoTracks</code></dfn>
+  attribute of a <code><a href=#generatedstream>GeneratedStream</a></code> object must return a
+  <a href=#live>live</a> <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code> object
+  representing the video sources available to the
+  <code><a href=#generatedstream>GeneratedStream</a></code>. The same object must be returned each
+  time. The <code><a href=#generatedstream>GeneratedStream</a></code>'s output video track must be
+  the selected video source, if any.</p>
 
-  </ol><p>When a <code><a href=#generatedstream>GeneratedStream</a></code> object's <dfn id=dom-stream-resume title=dom-stream-resume><code>resume()</code></dfn> method is
-  invoked, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
-  following steps:</p>
+  <p>User agents may label audio and video sources (e.g. "Internal
+  microphone" or "External USB Webcam"), in which case the <code title=dom-TrackList-getName><a href=#dom-tracklist-getname>getName()</a></code> methods (on the
+  <code><a href=#multipletracklist>MultipleTrackList</a></code> and <code><a href=#exclusivetracklist>ExclusiveTrackList</a></code>
+  objects) must use the labels the user agent has assigned as the
+  track names of the source tracks of the <code><a href=#generatedstream>GeneratedStream</a></code>
+  object. Otherwise, the <code title=dom-TrackList-getName><a href=#dom-tracklist-getname>getName()</a></code> methods must use the
+  empty string as the track names of the source tracks of the
+  <code><a href=#generatedstream>GeneratedStream</a></code> object. The <code title=dom-TrackList-getLanguage><a href=#dom-tracklist-getlanguage>getLanguage()</a></code> methods must
+  use the empty string as the track language for all the source tracks
+  of the <code><a href=#generatedstream>GeneratedStream</a></code> object.</p>
 
-  <ol><li><p>If the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute is not in
-   the <code title=dom-stream-PAUSED><a href=#dom-stream-paused>PAUSED</a></code> (3) state, then
-   abort these steps.</li>
+  </div>
 
-   <li><p>Resume the generation of data for the stream.</li>
-
-   <li><p>Set the object's <code title=dom-stream-readyState><a href=#dom-stream-readystate>readyState</a></code> attribute to <code title=dom-stream-LIVE><a href=#dom-stream-live>LIVE</a></code> (1).</li>
-
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-stream-play>play</code> at the object.</li>
-
-  </ol><hr><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> queued for the <code title=dom-stream-stop><a href=#dom-stream-stop>stop()</a></code>, <code title=dom-stream-pause><a href=#dom-stream-pause>pause()</a></code>, and <code title=dom-stream-resume><a href=#dom-stream-resume>resume()</a></code> methods is the <a href=#dom-manipulation-task-source>DOM
-  manipulation task source</a>.</p>
-
   <hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their
   corresponding <a href=#event-handler-event-type title="event handler event type">event handler
   event types</a>) that must be supported, as IDL attributes, by
@@ -72309,15 +72301,6 @@
 
   <table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
    <tbody><tr><td><dfn id=handler-stream-onended title=handler-stream-onended><code>onended</code></dfn> <td> <code title=event-stream-ended>ended</code>
-  </table><p>The following are the additional <a href=#event-handlers>event handlers</a> (and
-  their corresponding <a href=#event-handler-event-type title="event handler event type">event
-  handler event types</a>) that must be supported, as IDL
-  attributes, by all objects implementing the
-  <code><a href=#generatedstream>GeneratedStream</a></code> interface:</p>
-
-  <table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
-   <tbody><tr><td><dfn id=handler-stream-onpause title=handler-stream-onpause><code>onpause</code></dfn> <td> <code title=event-stream-pause>pause</code>
-    <tr><td><dfn id=handler-stream-onplay title=handler-stream-onplay><code>onplay</code></dfn> <td> <code title=event-stream-play>play</code>
   </table></div>
 
   <div class=example>

Modified: source
===================================================================
--- source	2011-03-25 00:55:06 UTC (rev 5964)
+++ source	2011-03-25 22:14:53 UTC (rev 5965)
@@ -30542,11 +30542,20 @@
   element</span>'s <span>media resource</span>. The same object must
   be returned each time.</p>
 
+  <p class="note">There are only ever two <code>TrackList</code>
+  objects (one <code>MultipleTrackList</code> object and one
+  <code>ExclusiveTrackList</code> object) per <span>media
+  element</span>, even if another <span>media resource</span> is
+  loaded into the element: the objects are reused.</p>
+
   </div>
 
 
   <h6><code>TrackList</code> objects</h6>
 
+  <!-- should probably move this section out since it is also used by
+  the video conferencing stuff -->
+
   <p>The <code>MultipleTrackList</code> and
   <code>ExclusiveTrackList</code> interfaces, used by the attributes
   defined in the previous section, are substantially similar. Their
@@ -30640,12 +30649,6 @@
 
   <div class="impl">
 
-  <p class="note">There are only ever two <code>TrackList</code>
-  objects (one <code>MultipleTrackList</code> object and one
-  <code>ExclusiveTrackList</code> object) per <span>media
-  element</span>, even if another <span>media resource</span> is
-  loaded into the element: the objects are reused.</p>
-
   <p>The <dfn title="dom-TrackList-length"><code>length</code></dfn>
   attribute must return the number of tracks represented by the
   <code>TrackList</code> object at the time of getting.</p>
@@ -82154,9 +82157,10 @@
 
   <p>The <code>GeneratedStream</code> interface is used when the user
   agent is generating the stream's data (e.g. from a camera or
-  streaming it from a local video file). It allows authors to pause
-  the generation of the content, e.g. to allow the user to temporarily
-  disable a local camera during a video-conference chat.</p>
+  streaming it from a local video file). It allows authors to control
+  individual tracks during the generation of the content, e.g. to
+  allow the user to temporarily disable a local camera during a
+  video-conference chat.</p>
 
   <p>When a <code>GeneratedStream</code> object is being generated
   from a local file (as opposed to a live audio/video source), the
@@ -82183,12 +82187,9 @@
 interface <dfn>GeneratedStream</dfn> : <span>Stream</span> {
   void <span title="dom-stream-stop">stop</span>();
 
-  // temporarily pausing the stream
-  const unsigned short <span title="dom-stream-PAUSED">PAUSED</span> = 3;
-  void <span title="dom-stream-pause">pause</span>();
-  void <span title="dom-stream-resume">resume</span>();
-           attribute <span>Function</span> <span title="handler-stream-onpause">onpause</span>;
-           attribute <span>Function</span> <span title="handler-stream-onplay">onplay</span>;
+  // track control
+  readonly attribute <span>MultipleTrackList</span> <span title="dom-stream-audioTracks">audioTracks</span>;
+  readonly attribute <span>ExclusiveTrackList</span> <span title="dom-stream-videoTracks">videoTracks</span>;
 };</pre>
 
   <dl class="domintro">
@@ -82224,32 +82225,26 @@
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title="dom-stream-paused">paused</code></dt>
+   <dt><var title="">stream</var> . <code title="dom-stream-audioTracks">audioTracks</code></dt>
 
    <dd>
 
-    <p>Returns false if the stream is generating data; true if it is pause.</p>
+    <p>Returns a <code>MultipleTrackList</code> object representing
+    the audio tracks available for mixing into the <code>GeneratedStream</code>'s stream.</p>
 
    </dd>
 
+   <dt><var title="">stream</var> . <code title="dom-stream-videoTracks">videoTracks</code></dt>
 
-   <dt><var title="">stream</var> . <code title="dom-stream-pause">pause</code>()</dt>
-
    <dd>
 
-    <p>Temporarily stops the generation of media data for the stream.</p>
+    <p>Returns an <code>ExclusiveTrackList</code> object representing
+    the video tracks available for the <code>GeneratedStream</code>'s
+    stream.</p>
 
    </dd>
 
 
-   <dt><var title="">stream</var> . <code title="dom-stream-resume">resume</code>()</dt>
-
-   <dd>
-
-    <p>Resumes the generation of media data for the stream if it was temporarily stopped.</p>
-
-   </dd>
-
   </dl>
 
   <div class="impl">
@@ -82273,12 +82268,6 @@
    or generating data, and will never receive or generate more data
    for this stream).</dd>
 
-   <dt><dfn title="dom-stream-PAUSED"><code>PAUSED</code></dfn> (numeric value 3)</dt>
-
-   <dd>The stream is not generating data at this time, but could still
-   be resumed. Only <code>GeneratedStream</code> objects can be in
-   this state.</dd>
-
   </dl>
 
   <p>When a <code>Stream</code> object is created, its <code
@@ -82380,72 +82369,58 @@
 
   </ol>
 
+  <p>The <span>task source</span> for the <span
+  title="concept-task">tasks</span> queued for the <code
+  title="dom-stream-stop">stop()</code> method is the <span>DOM
+  manipulation task source</span>.</p>
+
   <hr>
 
-  <p>When a <code>GeneratedStream</code> object's <dfn
-  title="dom-stream-pause"><code>pause()</code></dfn> method is
-  invoked, the user agent must <span>queue a task</span> that runs the
-  following steps:</p>
+  <p>A <code>GeneratedStream</code> can have multiple audio and video
+  sources (e.g. because the user has multiple microphones, or because
+  the real source of the stream is a <span>media resource</span> with
+  many media tracks). The stream represented by a
+  <code>GeneratedStream</code> has either zero or one audio track and
+  either zero or one video track.</p>
 
-  <ol>
+  <div class="impl">
 
-   <li><p>If the object's <code
-   title="dom-stream-readyState">readyState</code> attribute is not in
-   the <code title="dom-stream-LIVE">LIVE</code> (1) state, then abort
-   these steps.</p></li>
+  <p>The <dfn
+  title="dom-stream-audioTracks"><code>audioTracks</code></dfn>
+  attribute of a <code>GeneratedStream</code> object must return a
+  <span>live</span> <code>MultipleTrackList</code> object representing
+  the audio sources available to the <code>GeneratedStream</code>. The
+  same object must be returned each time. The
+  <code>GeneratedStream</code>'s output audio track must be the result
+  of mixing all the enabled audio sources, if any.</p>
 
-   <li><p>Pause the generation of data for the stream. If the data is
-   being generated from a live source (e.g. a microphone or camera),
-   then data collected for this stream while the stream is paused must
-   be discarded. If the data is being generated from a prerecorded
-   source (e.g. a video file), the user agent should follow user
-   preferences for handling a pause (either skipping over data in real
-   time or resuming from the same point when the stream is later
-   resumed).</p></li>
+  <p>The <dfn
+  title="dom-stream-videoTracks"><code>videoTracks</code></dfn>
+  attribute of a <code>GeneratedStream</code> object must return a
+  <span>live</span> <code>ExclusiveTrackList</code> object
+  representing the video sources available to the
+  <code>GeneratedStream</code>. The same object must be returned each
+  time. The <code>GeneratedStream</code>'s output video track must be
+  the selected video source, if any.</p>
 
-   <li><p>Set the object's <code
-   title="dom-stream-readyState">readyState</code> attribute to <code
-   title="dom-stream-PAUSED">PAUSED</code> (3).</p></li>
+  <p>User agents may label audio and video sources (e.g. "Internal
+  microphone" or "External USB Webcam"), in which case the <code
+  title="dom-TrackList-getName">getName()</code> methods (on the
+  <code>MultipleTrackList</code> and <code>ExclusiveTrackList</code>
+  objects) must use the labels the user agent has assigned as the
+  track names of the source tracks of the <code>GeneratedStream</code>
+  object. Otherwise, the <code
+  title="dom-TrackList-getName">getName()</code> methods must use the
+  empty string as the track names of the source tracks of the
+  <code>GeneratedStream</code> object. The <code
+  title="dom-TrackList-getLanguage">getLanguage()</code> methods must
+  use the empty string as the track language for all the source tracks
+  of the <code>GeneratedStream</code> object.</p>
 
-   <li><p><span>Fire a simple event</span> named <code
-   title="event-stream-pause">pause</code> at the object.</p></li>
+  </div>
 
-  </ol>
-
-  <p>When a <code>GeneratedStream</code> object's <dfn
-  title="dom-stream-resume"><code>resume()</code></dfn> method is
-  invoked, the user agent must <span>queue a task</span> that runs the
-  following steps:</p>
-
-  <ol>
-
-   <li><p>If the object's <code
-   title="dom-stream-readyState">readyState</code> attribute is not in
-   the <code title="dom-stream-PAUSED">PAUSED</code> (3) state, then
-   abort these steps.</p></li>
-
-   <li><p>Resume the generation of data for the stream.</p></li>
-
-   <li><p>Set the object's <code
-   title="dom-stream-readyState">readyState</code> attribute to <code
-   title="dom-stream-LIVE">LIVE</code> (1).</p></li>
-
-   <li><p><span>Fire a simple event</span> named <code
-   title="event-stream-play">play</code> at the object.</p></li>
-
-  </ol>
-
   <hr>
 
-  <p>The <span>task source</span> for the <span
-  title="concept-task">tasks</span> queued for the <code
-  title="dom-stream-stop">stop()</code>, <code
-  title="dom-stream-pause">pause()</code>, and <code
-  title="dom-stream-resume">resume()</code> methods is the <span>DOM
-  manipulation task source</span>.</p>
-
-  <hr>
-
   <p>The following are the <span>event handlers</span> (and their
   corresponding <span title="event handler event type">event handler
   event types</span>) that must be supported, as IDL attributes, by
@@ -82458,20 +82433,6 @@
     <tr><td><dfn title="handler-stream-onended"><code>onended</code></dfn> <td> <code title="event-stream-ended">ended</code>
   </table>
 
-  <p>The following are the additional <span>event handlers</span> (and
-  their corresponding <span title="event handler event type">event
-  handler event types</span>) that must be supported, as IDL
-  attributes, by all objects implementing the
-  <code>GeneratedStream</code> interface:</p>
-
-  <table>
-   <thead>
-    <tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
-   <tbody>
-    <tr><td><dfn title="handler-stream-onpause"><code>onpause</code></dfn> <td> <code title="event-stream-pause">pause</code>
-    <tr><td><dfn title="handler-stream-onplay"><code>onplay</code></dfn> <td> <code title="event-stream-play">play</code>
-  </table>
-
   </div>
 
   <div class="example">




More information about the Commit-Watchers mailing list