- From: CVS User abergkvi <cvsmail@w3.org>
- Date: Wed, 12 Dec 2012 13:38:42 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2011/webrtc/editor
In directory roscoe:/tmp/cvs-serv26279
Modified Files:
getusermedia.html webrtc.html
Log Message:
Added 20121212 archived version.
--- /sources/public/2011/webrtc/editor/getusermedia.html 2012/11/15 19:30:31 1.14
+++ /sources/public/2011/webrtc/editor/getusermedia.html 2012/12/12 13:38:41 1.15
@@ -150,20 +150,20 @@
silence. Muted video tracks MUST be replaced with blackness.</p>
<p>A new <code><a>MediaStream</a></code> object can be created from
- existing <code><a>MediaStreamTrack</a></code> objects using the
- <code><a href="#dom-mediastream">MediaStream()</a></code> constructor.
- The constructor takes two lists of <code><a>MediaStreamTrack</a></code>
- objects as arguments: one for audio tracks and one for video tracks. The
- lists can either be the track lists of another stream, subsets of such
- lists, or compositions of <code><a>MediaStreamTrack</a></code> objects
- from different <code><a>MediaStream</a></code> objects.</p>
+ accessible media sources (that does not require any additional
+ permissions) using the <code><a href="#dom-mediastream">MediaStream()</a>
+ </code> constructor. The constructor argument can either be an existing
+ <code><a>MediaStream</a></code> object, in which case the given stream is
+ cloned, or an array of <code><a>MediaStreamTrack</a></code> objects. The
+ latter from makes it possible to compose a stream from different source
+ streams.</p>
<p><img alt="A MediaStream" src="images/media-stream.png" width=
"40%"></p>
- <p>The ability to duplicate a <code><a>MediaStream</a></code>, i.e.
- create a new <code><a>MediaStream</a></code> object from the track lists
- of an existing stream, allows for greater control since separate
+ <p>The ability to duplicate a <code><a>MediaStream</a></code>,
+ specifically create a new <code><a>MediaStream</a></code> object using an
+ other stream as input, allows for greater control since separate
<code><a>MediaStream</a></code> instances can be manipulated and
<a title="consumer">consumed</a> individually.</p>
@@ -186,9 +186,9 @@
<p>The <dfn id="dom-mediastream"> <code>MediaStream()</code></dfn>
constructor takes zero or one argument. If the argument is supplied, it
- MUST either be of type <code><a>MediaStream</a></code>, an array of
- <code><a>MediaStreamTrack</a></code> objects or null. When the constructor
- is invoked, the UA must run the following steps:</p>
+ MUST either be of type <code><a>MediaStream</a></code> or an array of
+ <code><a>MediaStreamTrack</a></code> objects. When the constructor is
+ invoked, the UA must run the following steps:</p>
<ol>
<li>
@@ -197,16 +197,16 @@
</li>
<li>
- <p>Initialize <var>stream’s</var> label attribute to a newly generated
+ <p>Initialize <var>stream’s</var> <code><a href=
+ "#dom-mediastream-id">id</a></code> attribute to a newly generated
value.</p>
</li>
<li>
- <p>If the constructor’s argument is present and not null, run the sub
- steps that corresponds to the argument type.</p>
- </li>
+ <p>If the constructor’s argument is present, run the sub steps that
+ corresponds to the argument type.</p>
- <ul>
+ <ul>
<li>
<p><code>Array</code> of <code><a>MediaStreamTrack</a></code>
objects:</p>
@@ -233,12 +233,9 @@
and let it inherit <var>track’s</var> underlying source,
<code><a href="#dom-mediastreamtrack-kind">kind</a></code> and
<code><a href="#dom-mediastreamtrack-label">label</a></code>
- attributes. Append the new <code><a>MediaStreamTrack</a>
- </code> to the corresponding track list
- (<code><a href="#dom-mediastream-audiotracks">audioTracks</a>
- </code> or <code>
- <a href="#dom-mediastream-videotracks">videoTracks</a></code>)
- in <var>stream</var> according to kind.</p>
+ attributes. Add the new <code><a>MediaStreamTrack</a>
+ </code> to <var>stream</var>’s <a href="#track-set">track
+ set</a>.</p>
</li>
</ol>
@@ -248,14 +245,12 @@
<p><code><a>MediaStream</a></code>:</p>
<p>Run the sub steps labeled <em>Add track</em> (above) for every
- <code><a>MediaStreamTrack</a></code> in the argument stream’s two
- track lists
- (<code><a href="#dom-mediastream-audiotracks">audioTracks</a>
- </code> and <code>
- <a href="#dom-mediastream-videotracks">videoTracks</a></code>).
+ <code><a>MediaStreamTrack</a></code> in the argument stream’s
+ <a href="#track-set">track set</a>.
</p>
</li>
- </ul>
+ </ul>
+ </li>
<li>
<p>Return <var>stream</var>.</p>
@@ -268,17 +263,14 @@
The stream represented by a <code><a>MediaStream</a></code> thus has zero
or more tracks.</p>
- <p>The tracks of a <code><a>MediaStream</a></code> are stored in two
- track lists represented by <code><a>MediaStreamTrackList</a></code>
- objects: one for audio tracks and one for video tracks. The two track
- lists MUST contain the <code><a>MediaStreamTrack</a></code> objects that
- correspond to the tracks of the stream. The relative order of all tracks
- in a user agent MUST be stable. Tracks that come from a media resource
- whose format defines an order MUST be in the order defined by the format;
- tracks that come from a media resource whose format does not define an
- order MUST be in the relative order in which the tracks are declared in
- that media resource. Within these constraints, the order is user agent
- defined.</p>
+ <p>The tracks of a <code><a>MediaStream</a></code> are stored in a
+ <dfn id="track-set">track set</dfn>. The track set MUST contain the
+ <code><a>MediaStreamTrack</a></code> objects that correspond
+ to the tracks of the stream. The relative order of the tracks in the set
+ is user agent defined and the API will never put any requirements on the
+ order. The proper way to find a specific <code><a>MediaStreamTrack</a>
+ </code> object in the set is to look it up by its
+ <code><a href="#dom-mediastreamtrack-id">id</a></code>.</p>
<p>An object that reads data from the output of a
<code><a>MediaStream</a></code> is referred to as a
@@ -332,16 +324,16 @@
<dl class="idl"
title="[Constructor (),
- Constructor (MediaStream? stream),
+ Constructor (MediaStream stream),
Constructor (MediaStreamTrackArray tracks)]
interface MediaStream : EventTarget">
- <dt>readonly attribute DOMString label</dt>
+ <dt>readonly attribute DOMString id</dt>
<dd>
<p>When a <code><a>LocalMediaStream</a></code> object is created, the
user agent MUST generate a globally unique identifier string, and
MUST initialize the object’s <code><a href=
- "#dom-mediastream-label">label</a></code> attribute to that string.
+ "#dom-mediastream-id">id</a></code> attribute to that string.
Such strings MUST only use characters in the ranges U+0021, U+0023 to
U+0027, U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041
to U+005A, U+005E to U+007E, and MUST be 36 characters long.</p>
@@ -350,44 +342,128 @@
thing in SDP) -->
<!-- described below -->
- <p>When a <code><a>MediaStream</a></code> is created from another
- using the <code><a href="#dom-mediastream">MediaStream()</a></code>
- constructor, the <code><a>label</a></code> attribute is initialized to
- a newly generated value.</p><!-- described above -->
-
- <p>The <dfn id="dom-mediastream-label"><code>label</code></dfn>
+ <p>The <dfn id="dom-mediastream-id"><code>id</code></dfn>
attribute MUST return the value to which it was initialized when the
object was created.</p>
</dd>
- <dt>readonly attribute MediaStreamTrackList audioTracks</dt>
+ <dt>sequence<MediaStreamTrack> getAudioTracks()</dt>
<dd>
- <p>Returns a <code><a>MediaStreamTrackList</a></code> object
- representing the audio tracks that can be enabled and disabled.</p>
+ <p>Returns a sequence of <code><a>MediaStreamTrack</a></code> objects
+ representing the audio tracks in this stream.</p>
<p>The <dfn id=
- "dom-mediastream-audiotracks"><code>audioTracks</code></dfn>
- attribute MUST return an <span title="array host objects">array host
- object</span> for objects of type
- <code><a>MediaStreamTrack</a></code> that is <em>fixed length</em>
- and <em>read only</em>. The same object MUST be returned each time
- the attribute is accessed.</p>
+ "dom-mediastream-getaudiotracks"><code>getAudioTracks()</code></dfn>
+ method MUST return a sequence that represents a snapshot of all the
+ <code><a>MediaStreamTrack</a></code> objects in this stream’s
+ <a href="#track-set">track set</a> whose <code>
+ <a href="#dom-mediastreamtrack-kind">kind</a></code> is equal to
+ "<code>audio</code>". The conversion from the <a href=
+ "#track-set">track set</a> to the sequence is user agent defined and
+ the order does not have to stable between calls.</p>
</dd>
- <dt>readonly attribute MediaStreamTrackList videoTracks</dt>
+ <dt>sequence<MediaStreamTrack> getVideoTracks()</dt>
<dd>
- <p>Returns a <code><a>MediaStreamTrackList</a></code> object
- representing the video tracks that can be enabled and disabled.</p>
+ <p>Returns a sequence of <code><a>MediaStreamTrack</a></code> objects
+ representing the video tracks in this stream.</p>
+
+ <p>The <dfn id=
+ "dom-mediastream-getvideotracks"><code>getVideoTracks()</code></dfn>
+ method MUST return a sequence that represents a snapshot of all the
+ <code><a>MediaStreamTrack</a></code> objects in this stream’s
+ <a href="#track-set">track set</a> whose <code>
+ <a href="#dom-mediastreamtrack-kind">kind</a></code> is equal to
+ "<code>video</code>". The conversion from the <a href=
+ "#track-set">track set</a> to the sequence is user agent defined and
+ the order does not have to stable between calls.</p>
+ </dd>
+
+ <dt>MediaStreamTrack getTrackById(DOMString trackId)</dt>
+ <dd>
<p>The <dfn id=
- "dom-mediastream-videotracks"><code>videoTracks</code></dfn>
- attribute MUST return an <span title="array host objects">array host
- object</span> for objects of type
- <code><a>MediaStreamTrack</a></code> that is <em>fixed length</em>
- and <em>read only</em>. The same object MUST be returned each time
- the attribute is accessed.</p>
+ "dom-mediastream-gettrackbyid"><code>getTrackById()</code></dfn>
+ method MUST return the first <code><a>MediaStreamTrack</a></code>
+ object in this stream’s <a href="#track-set">track set</a> whose
+ <code><a href="#dom-mediastreamtrack-id">id</a></code> is equal to
+ <var>trackId</var>. The method MUST return null if no track matches
+ the <var>trackId</var> argument.</p>
+ </dd>
+
+ <dt>void addTrack(MediaStreamTrack track)</dt>
+
+ <dd>
+ <p>Adds the given <code><a>MediaStreamTrack</a></code> to this
+ <code><a>MediaStream</a></code>.</p>
+
+ <p>When the <dfn id=
+ "dom-mediastream-addtrack"><code>addTrack()</code></dfn> method is
+ invoked, the user agent MUST run the following steps:</p>
+
+ <ol>
+ <li>
+ <p>Let <var>track</var> be the <code><a>MediaStreamTrack</a>
+ </code> argument and <var>stream</var> this <code><a>MediaStream</a></code>
+ object.</p>
+ </li>
+
+ <li>
+ <p>If <var>stream</var> is <a>finished</a>, throw an
+ <code>INVALID_STATE_ERR</code> exception.</p>
+ </li>
+
+ <li>
+ <p>If <var>track</var> is already in <var>stream’s</var>
+ <a href="#track-set">track set</a>, then abort these steps.</p>
+ </li>
+
+ <li>
+ <p>Create a new <code><a>MediaStreamTrack</a></code> object
+ and let it inherit <var>track’s</var> underlying source,
+ <code><a href="#dom-mediastreamtrack-kind">kind</a></code> and
+ <code><a href="#dom-mediastreamtrack-label">label</a></code>
+ attributes. Add the new <code><a>MediaStreamTrack</a>
+ </code> to <var>stream</var>’s <a href="#track-set">track
+ set</a>.</p>
+ </li>
+ </ol>
+ </dd>
+
+ <dt>void removeTrack(MediaStreamTrack track)</dt>
+
+ <dd>
+ <p>Removes the given <code><a>MediaStreamTrack</a></code> from this
+ <code><a>MediaStream</a></code>.</p>
+
+ <p>When the <dfn id=
+ "dom-mediastream-removetrack"><code>removeTrack()</code></dfn> method
+ is invoked, the user agent MUST run the following steps:</p>
+
+ <ol>
+ <li>
+ <p>Let <var>track</var> be the <code><a>MediaStreamTrack</a>
+ </code> argument and <var>stream</var> this <code><a>MediaStream</a></code>
+ object.</p>
+ </li>
+
+ <li>
+ <p>If <var>stream</var> is <a>finished</a>, throw an
+ <code>INVALID_STATE_ERR</code> exception.</p>
+ </li>
+
+ <li>
+ <p>If <var>track</var> is not in <var>stream</var>’s
+ <a href="#track-set">track set</a>, abort these steps.</p>
+ </li>
+
+ <li>
+ <p>Remove <var>track</var> from <var>stream’s</var>
+ <a href="#track-set">track set</a>.</p>
+ </li>
+ </ol>
</dd>
<dt>attribute boolean ended</dt>
@@ -415,6 +491,20 @@
"#event-mediastream-ended">ended</a></code>, MUST be supported by all
objects implementing the <code><a>MediaStream</a></code>
interface.</dd>
+
+ <dt>attribute EventHandler onaddtrack</dt>
+
+ <dd>This event handler, of type <code><a href=
+ "#event-mediastream-addtrack">addtrack</a></code>, MUST be supported by
+ all objects implementing the <code><a>MediaStream</a></code> interface.
+ </dd>
+
+ <dt>attribute EventHandler onremovetrack</dt>
+
+ <dd>This event handler, of type <code><a href=
+ "#event-mediastream-removetrack">removetrack</a></code>, MUST be
+ supported by all objects implementing the <code><a>MediaStream</a>
+ </code> interface.</dd>
</dl>
</section>
@@ -538,16 +628,13 @@
<li>
<p>If the track’s <code><a href=
"#dom-mediastreamtrack-readystate">readyState</a></code> attribute
- has the value <code><a href=
- "#widl-MediaStreamTrack-ENDED">ENDED</a></code> (2) already, then
- abort these steps.</p>
+ has the value <code>ended</code> already, then abort these steps.</p>
</li>
<li>
<p>Set <var>track’s</var> <code><a href=
"#dom-mediastreamtrack-readystate">readyState</a></code> attribute to
- <code><a href="#widl-MediaStreamTrack-ENDED">ENDED</a></code>
- (2).</p>
+ <code>ended</code>.</p>
</li>
<li>
@@ -570,6 +657,25 @@
a video track.</p>
</dd>
+ <dt>readonly attribute DOMString id</dt>
+
+ <dd>
+ <p>Unless a <code><a>MediaStreamTrack</a></code> object is created as
+ a part a of special purpose algorithm that specifies how the track id
+ must be initialized, the user agent MUST generate a globally unique
+ identifier string and initialize the object’s <code><a href=
+ "#dom-mediastreamtrack-id">id</a></code> attribute to that string.</p>
+
+ <p>An example of an algorithm that specifies how the track id must be
+ initialized is the algorithm to represent an incoming network
+ component with a <code><a>MediaStreamTrack</a></code> object.
+ [[!WEBRTC10]]</p>
+
+ <p><dfn id="dom-mediastreamtrack-id">
+ <code>MediaStreamTrack.id</code></dfn> attribute MUST return the value
+ to which it was initialized when the object was created.</p>
+ </dd>
+
<dt>readonly attribute DOMString label</dt>
<dd>
@@ -606,65 +712,25 @@
value.</p>
</dd>
- <dt>const unsigned short LIVE = 0</dt>
-
- <dd>
- <p>The track is active (the track’s underlying media source is making
- a best-effort attempt to provide data in real time).</p>
-
- <p>The output of a track in the <code><a href=
- "#widl-MediaStreamTrack-LIVE">LIVE</a></code> state can be switched
- on and off with the <code><a href=
- "#dom-mediastreamtrack-enabled">enabled</a></code> attribute.</p>
- </dd>
-
- <dt>const unsigned short MUTED = 1</dt>
-
- <dd>
- <p>The track is muted (the track’s underlying media source is
- temporarily unable to provide data).</p>
-
- <p>A <code><a>MediaStreamTrack</a></code> in a
- <code><a>LocalMediaStream</a></code> may be muted if the user
- temporarily revokes the web application’s permission to use a media
- input device.</p>
- </dd>
-
- <dt>const unsigned short ENDED = 2</dt>
-
- <dd>
- <p>The track has <a>ended</a> (the track’s underlying media source is
[373 lines skipped]
--- /sources/public/2011/webrtc/editor/webrtc.html 2012/11/15 19:30:31 1.29
+++ /sources/public/2011/webrtc/editor/webrtc.html 2012/12/12 13:38:41 1.30
@@ -369,52 +369,23 @@
</li>
<li>
- <p>Create a <code><a>MediaStream</a></code> object to represent the
- media stream.
+ <p>Create a <code><a>MediaStream</a></code> object
+ <var>stream</var>, to represent the incoming media stream.
<!-- Set its <code> <a href="#dom-mediastream-label">label</a>
</code> attribute to the value of the SDP Label attribute for that
component's media stream. --></p>
</li>
<li>
- <p>Run the following steps for each component in the media
- stream.</p>
-
- <ol>
- <li>
- <p>Create a <code><a>MediaStreamTrack</a></code> object
- <var>track</var> to represent the component.</p>
- </li>
-
- <li>
- <p>If <var>track</var>'s <code><a href=
- "getusermedia.html#dom-mediastreamtrack-kind">kind</a></code>
- attribute equals "<code>audio</code>", add it to the
- <code><a>MediaStream</a></code> object's <code><a href=
- "getusermedia.html#dom-mediastream-audiotracks">audioTracks</a></code>
- <code><a>MediaStreamTrackList</a></code> object.</p>
- </li>
-
- <li>
- <p>If <var>track</var>'s <code><a href=
- "getusermedia.html#dom-mediastreamtrack-kind">kind</a></code>
- attribute equals "<code>video</code>", add it to the
- <code><a>MediaStream</a></code> object's <code><a href=
- "getusermedia.html#dom-mediastream-videotracks">videoTracks</a></code>
- <code><a>MediaStreamTrackList</a></code> object.</p>
- </li>
- </ol>
+ <p>Run the <a href="#represent-component-with-track">algorithm</a>
+ to represent an incoming component with a track for each incoming
+ component.</p>
<p class="note">The creation of new incoming
<code>MediaStream</code>s may be triggered either by SDP
negotiation or by the receipt of media on a given flow.
<!-- [[OPEN ISSUE: How many <code>MediaStream</code>s are created
when you receive multiple conflicting pranswers?]] --></p>
-
- <p class="note">The internal order of the
- <code><a>MediaStreamTrackList</a></code> objects on the receiving
- side should reflect the order on the sending side. One way to
- enforce this is to specify the order in the SDP.</p>
</li>
<li>
@@ -430,9 +401,8 @@
task ran -->
<li>
- <p>Add the newly created <code><a>MediaStream</a></code> object
- to the end of <var>connection</var>'s <code title=
- "dom-RTCPeerConnection-remoteStreams"><a href=
+ <p>Add <var>stream</var> to the end of <var>connection</var>'s
+ <code title="dom-RTCPeerConnection-remoteStreams"><a href=
"#widl-RTCPeerConnection-remoteStreams">remoteStreams</a></code>
array.</p>
</li>
@@ -440,9 +410,9 @@
<li>
<p><a href="#fire-a-stream-event">Fire a stream event</a> named
<code title="event-MediaStream-addstream"><a href=
- "#event-mediastream-addstream">addstream</a></code> with the
- newly created <code><a>MediaStream</a></code> object at the
- <var title="">connection</var> object.</p>
+ "#event-mediastream-addstream">addstream</a></code> with
+ <var>stream</var> at the <var title="">connection</var> object.
+ </p>
</li>
</ol>
</li>
@@ -519,11 +489,9 @@
<code><a>RTCPeerConnection</a></code> object.</p>
<p>In particular, if an <code><a>RTCPeerConnection</a></code> object is
- <a title="consumer">consuming</a> a <code><a>MediaStream</a></code> and
- a track is added to one of the stream's
- <code><a>MediaStreamTrackList</a></code> objects, by, e.g., the
- <code><a href=
- "getusermedia.html#dom-mediastreamtracklist-add">add()</a></code>
+ <a title="consumer">consuming</a> a <code><a>MediaStream</a></code> on
+ which a track is added, by, e.g., the <code><a href=
+ "getusermedia.html#dom-mediastream-addtrack">addTrack()</a></code>
method being invoked, the <code><a>RTCPeerConnection</a></code> object
MUST fire the "negotiationneeded" event. Removal of media components
must also trigger "negotiationneeded".</p>
@@ -1352,10 +1320,7 @@
<code>setRemoteDescription</code>. Onnaddstream happens as early as
possible after the <code>setRemoteDescription</code>. This callback
does not wait for a given media stream to be accepted or rejected via
- SDP negotiation. Later, when the SDP accepts something, you get the
- <code>addTrack</code> callback. Later if SDP ended a media flow, that
- would result in the <code>trackEnded</code> callback being
- called.</dd>
+ SDP negotiation.</dd>
<dt>attribute EventHandler onremovestream</dt>
@@ -2799,26 +2764,28 @@
<h3>MediaStream</h3>
<section>
- <h4>label</h4>
+ <h4>id</h4>
- <p>The <code>label</code> attribute specified in
- <code>MediaStream</code> returns a label that is unique to this stream,
+ <p>The <code><a href=
+ "getusermedia.html#dom-mediastream-id">id</a></code> attribute specified
+ in <code>MediaStream</code> returns an id that is unique to this stream,
so that streams can be recognized after they are sent through the
<code><a href="#rtcpeerconnection">RTCPeerConnection</a></code>
API.</p>
<p>When a <code><a href="#mediastream">MediaStream</a></code> is
created to represent a stream obtained from a remote peer, the
- <code>label</code> attribute is initialized from information provided
- by the remote source.</p>
+ <code><a href="getusermedia.html#dom-mediastream-id">id</a></code>
+ attribute is initialized from information provided by the remote
+ source.</p>
- <p class="note">The label of a <code><a>MediaStream</a></code> object
+ <p class="note">The id of a <code><a>MediaStream</a></code> object
is unique to the source of the stream, but that does not mean it is not
possible to end up with duplicates. For example, a locally generated
stream could be sent from one user agent to a remote peer using
<code><a>RTCPeerConnection</a></code> and then sent back to the
original user agent in the same manner, in which case the original user
- agent will have multiple streams with the same label (the
+ agent will have multiple streams with the same id (the
locally-generated one and the one received from the remote peer).</p>
</section>
@@ -2827,69 +2794,106 @@
<p>A new media track may be associated with an existing
<code><a>MediaStream</a></code>. For example, if a remote peer adds a
- new <code><a>MediaStreamTrack</a></code> object to one of the track
- lists of a <code><a>MediaStream</a></code> that is being sent over an
+ new <code><a>MediaStreamTrack</a></code> object to a
+ <code><a>MediaStream</a></code> that is being sent over an
<code><a>RTCPeerConnection</a></code>, this is observed on the local
user agent. If this happens for the reason exemplified, or for any
- other reason than the <code>add()</code> [[!GETUSERMEDIA]] method being
- invoked locally on a <code><a>MediaStreamTrackList</a></code> or tracks
- being added as the stream is created (i.e. the stream is initialized
- with tracks), the user agent MUST run the following steps:</p>
+ other reason than the <code><a href=
+ "getusermedia.html#dom-mediastream-addtrack">addTrack()</a></code>
+ method being invoked locally on a <code><a>MediaStream</a></code> or
+ tracks being added as the stream is created (i.e. the stream is
+ initialized with tracks), the user agent MUST run the following steps:
+ </p>
<ol>
<li>
- <p>Create a <code><a>MediaStreamTrack</a></code> object
- <var>track</var> to represent the new media component.</p>
+ <p>Let <var>stream</var> be the target
+ <code><a>MediaStream</a></code> object.</p>
</li>
<li>
- <p>If <var>track</var>'s <code><a href=
- "getusermedia.html#dom-mediastreamtrack-kind">kind</a></code>
- attribute equals "<code>audio</code>", add it to the
- <code><a>MediaStream</a></code> object’s <code><a href=
- "getusermedia.html#dom-mediastream-audiotracks">audioTracks</a></code>
- <code><a>MediaStreamTrackList</a></code> object.</p>
- </li>
+ <p><dfn id="represent-component-with-track">Represent component with
+ track</dfn>: Run the following steps to create a track representing
+ the incoming component:
+ </p>
- <li>
- <p>If <var>track</var>'s <code><a href=
- "getusermedia.html#dom-mediastreamtrack-kind">kind</a></code>
- attribute equals "<code>video</code>", add it to the
- <code><a>MediaStream</a></code> object’s <code><a href=
- "getusermedia.html#dom-mediastream-videotracks">videoTracks</a></code>
- <code><a>MediaStreamTrackList</a></code> object.</p>
+ <ol>
+ <li>
+ <p>Create a <code><a>MediaStreamTrack</a></code> object
+ <var>track</var> to represent the component.</p>
+ </li>
+
+ <li>
+ <p>Initialize <var>track’s</var> <code><a href=
+ "getusermedia.html#dom-mediastreamtrack-kind">kind</a></code>
+ attribute to "<code>audio</code>" or "<code>video</code>"
+ depending on the media type of the incoming component.</p>
+ </li>
+
+ <li>
+ <p>Initialize <var>track’s</var> <code><a href=
+ "getusermedia.html#dom-mediastreamtrack-id">id</a></code>
+ attribute to the component track id.</p>
+ </li>
+
+ <li>
+ <p>Initialize <var>track’s</var> <code><a href=
+ "getusermedia.html#dom-mediastreamtrack-label">label</a></code>
+ attribute to "<code>remote audio</code>" or "<code>remote
+ video</code>" depending on the media type of the incoming
+ component.</p>
+ </li>
+
+ <li>
+ <p>Initialize <var>track’s</var> <code><a href=
+ "getusermedia.html#dom-mediastreamtrack-readystate">readyState</a>
+ </code> attribute to <code>muted</code>.</p>
+ </li>
+
+ <li>
+ <p>Add <var>track</var> to <var>stream’s</var>
+ <a href="getusermedia.html#track-set">track set</a>.</p>
+ </li>
+ </ol>
</li>
<li>
<p>Fire a track event named <code><a href=
- "http://dev.w3.org/2011/webrtc/editor/getusermedia.html#event-mediastreamtracklist-addtrack">
- addtrack</a></code> with the newly created <var>track</var> at the
- <code><a>MediaStreamTrackList</a></code> object.</p>
+ "getusermedia.html#event-mediastream-addtrack">
+ addtrack</a></code> with the newly created
+ <code><a>MediaStreamTrack</a></code> object at <var>stream</var>.
+ </p>
</li>
</ol>
<p>An existing media track may also be disassociated from a
- <code><a>MediaStream</a></code> . If this happens for any other reason
- than the <code>remove()</code> [[!GETUSERMEDIA]] method being invoked
- locally on a <code><a>MediaStreamTrackList</a></code> or the stream
- being destroyed, the user agent MUST run the following steps:</p>
+ <code><a>MediaStream</a></code>. If this happens for any other reason
+ than the <code><a href=
+ "getusermedia.html#dom-mediastream-removetrack">removeTrack()</a></code>
+ method being invoked locally on a <code><a>MediaStream</a></code> or the
+ stream being destroyed, the user agent MUST run the following steps:</p>
<ol>
<li>
+ <p>Let <var>stream</var> be the target
+ <code><a>MediaStream</a></code> object.</p>
+ </li>
+
+ <li>
<p>Let <var>track</var> be the <code><a>MediaStreamTrack</a></code>
object representing the media component about to be removed.</p>
</li>
<li>
- <p>Remove <var>track</var> from the
- <code><a>MediaStreamTrackList</a></code> object.</p>
+ <p>Remove <var>track</var> from <var>stream’s</var>
+ <a href="getusermedia.html#track-set">track set</a>.</p>
</li>
<li>
<p>Fire a track event named <code><a href=
- "http://dev.w3.org/2011/webrtc/editor/getusermedia.html#event-mediastreamtracklist-removetrack">
- removetrack</a></code> with <var>track</var> at the
- <code><a>MediaStreamTrackList</a></code> object.</p>
+ "getusermedia.html#event-mediastream-removetrack">
+ removetrack</a></code> with <var>track</var> at <var>stream</var>.
+ </p>
</li>
</ol>
@@ -3581,6 +3585,13 @@
<ol>
<li>Made some clarifications as to how operation queuing works, and fixed
a few errors with the error handling description.</li>
+
+ <li>Introduced new representation of tracks in a stream
+ (removed MediaStreamTrackList). Added algorithm for creating a track
+ to represent an incoming network media component.</li>
+
+ <li>Renamed MediaStream.label to MediaStream.id (the definition needs
+ some more work).</li>
</ol>
<h3>Changes since Nov 03, 2012</h3>
Received on Wednesday, 12 December 2012 13:39:04 UTC