CVS 2011/webrtc/editor

Update of /sources/public/2011/webrtc/editor
In directory roscoe:/tmp/cvs-serv24901

Modified Files:
	webrtc.html 
Log Message:
Added 20130116 archived version.

--- /sources/public/2011/webrtc/editor/webrtc.html	2012/12/12 13:38:41	1.30
+++ /sources/public/2011/webrtc/editor/webrtc.html	2013/01/16 15:16:24	1.31
@@ -25,8 +25,7 @@
   </script>
 </head>
 
-<body>
-  <section id="abstract">
+<body>  <section id="abstract">
     <p>This document defines a set of ECMAScript APIs in WebIDL to allow media
     to be sent to and received from another browser or device implementing the
     appropriate set of real-time protocols. This specification is being
@@ -169,7 +168,7 @@
 
         <p>An example array of RTCIceServer objects is:</p>
 
-        <p><code>[ { url:"stun:stun.example.net"] } , {
+        <p><code>[ { url:"stun:stun.example.net" } , {
         url:"turn:user@turn.example.org", credential:"myPassword"} ]</code></p>
       </section>
     </section>
@@ -191,11 +190,21 @@
         each type and any TURN server also acts as a STUN server.</p>
 
         <p>An <code><a>RTCPeerConnection</a></code> object has an associated
-        <dfn id="rtcpeerconnection-ice-agent">ICE agent</dfn>, [[!ICE]]
-        <dfn id="rtcpeerconnection-readiness-state">RTCPeerConnection readiness
-        state</dfn>, and ICE state. These are initialized when the object is
+         ICE agent[[!ICE]], 
+        RTCPeerConnection signaling
+        state, ICE gathering state, and ICE connection state.
+        These are initialized when the object is
         created.</p>
 
+        <p>An <code><a>RTCPeerConnection</a></code> object has two associated
+        stream sets. A <dfn id="local-streams-set">local streams set</dfn>,
+        representing streams that are currently sent, and a <dfn id=
+        "remote-streams-set">remote streams set</dfn>, representing streams that
+        are currently received with this
+        <code><a>RTCPeerConnection</a></code> object. The stream sets are
+        initialized to empty sets when the <code><a>RTCPeerConnection</a></code>
+        object is created.</p>
+
         <p>When the <dfn id=
         "dom-peerconnection"><code>RTCPeerConnection()</code></dfn> constructor
         is invoked, the user agent MUST run the following steps. This algorithm
@@ -204,49 +213,40 @@
 
         <ol>
           <li>
-            <p>Create an ICE Agent and let <var>connection</var>'s <a href=
-            "#rtcpeerconnection-ice-agent"><code>RTCPeerConnection</code> ICE
-            Agent</a> be that ICE Agent and provide it the STUN and TURN
+            <p>Create an ICE Agent as defined in [[!ICE]] and let
+          <var>connection</var>'s
+          <code>RTCPeerConnection</code> ICE
+            Agent be that ICE Agent and provide it the STUN and TURN
             servers from the configuration array. The ICE Agent will proceed
             with gathering as soon as the IceTransports constraint is not set
             to "none". At this point the ICE Agent does not know how many ICE
             components it needs (and hence the number of candidates to gather),
-            but it can make a reasonable assumption. As the
+            but it can make a reasonable assumption such as 2. As the
             <code>RTCPeerConnection</code> object gets more information, the
             ICE Agent can adjust the number of components.</p>
           </li>
 
           <li>
             <p>Set <var>connection</var>'s <a href=
-            "#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
-            readiness state</a> to <code>new</code>.</p>
+            "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
+            signalingState</a> to <code>stable</code>.</p>
           </li>
 
           <li>
             <p>Set <var>connection</var>'s <a href=
-            "#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
-            ice state</a> to <code>new</code>.</p>
-          </li>
-
-          <li>
-            <p>Initialize an internal variable to represent a queue of
-            <code>operations</code> with an empty set.</p>
+            "#dom-peerconnection-ice-connection-state"><code>RTCPeerConnection</code>
+            ice connection state</a> to <code>starting</code>.</p>
           </li>
-
+          
           <li>
-            <p>Let <var>connection</var>'s <code title=
-            "dom-RTCPeerConnection-localStreams"><a href=
-            "#widl-RTCPeerConnection-localStreams">localStreams</a></code>
-            attribute be an empty read-only <code><a>MediaStream</a></code>
-            array.</p>
+            <p>Set <var>connection</var>'s <a href=
+            "#dom-peerconnection-ice-gathering-state"><code>RTCPeerConnection</code>
+            ice gathering state</a> to <code>new</code>.</p>
           </li>
 
           <li>
-            <p>Let <var>connection</var>'s <code title=
-            "dom-RTCPeerConnection-remoteStreams"><a href=
-            "#widl-RTCPeerConnection-remoteStreams">remoteStreams</a></code>
-            attribute be an empty read-only <code><a>MediaStream</a></code>
-            array.</p>
+            <p>Initialize an internal variable to represent a queue of
+            <code>operations</code> with an empty set.</p>
           </li>
 
           <li>
@@ -299,35 +299,39 @@
 
         <ol>
           <li>
-            <p>If <var>iceState</var> is "new" and the IceTransports constraint
+            <p>If <var>iceConnectionState</var> is "starting" and the IceTransports constraint
             is not set to "none", it MUST queue a task to start gathering ICE
-            addresses and set the <var>iceState</var> to "gathering".</p>
+            addresses and set the <var>iceConnectionState</var> to "gathering".</p>
           </li>
 
           <li>
             <p>If the ICE Agent has found one or more candidate pairs for each
-            MediaStreamTrack that forms a valid connection, the ICE state is
+            MediaStreamTrack that forms a valid connection, the ICE connection state is
             changed to "connected".</p>
           </li>
 
           <li>
             <p>When the ICE Agent finishes checking all candidate pairs, if at
             least one connection has been found for each MediaStreamTrack, the
-            <var>iceState</var> is changed to "completed"; else the iceState is
+            <var>iceConnectionState</var> is changed to "completed"; else the iceConnectionState is
             changed to "failed".</p>
           </li>
 
           <li>
-            <p>If the <var>iceState</var> is "connected" or "completed" and
-            both the local and remote session descriptions are set, the
-            RTCPeerConnection state is set to "active".</p>
+            <p>If the <var>iceConnectionState</var> is "connected" or "completed" and
+            both the local and remote session descriptions have received a valid
+            SDP offer / answer pair, the
+            RTCPeerConnection state is set to "stable".</p>
           </li>
 
           <li>
-            <p>If the <var>iceState</var> is "failed", a task is queued to call
+            <p>If the <var>iceConnectionState</var> is "failed", a task is queued to call
             the close method.</p>
 
-            <p class="issue">ISSUE:: CJ - this seems wrong to me.</p>
+            <p class="issue">Open Issue: CJ - this seems wrong to me - just
+          because a network connection failed does not mean the PC should be put
+          into a dead state it can not recover from.</p>
+          
           </li>
         </ol>
 
@@ -338,22 +342,6 @@
         user agents renegotiate for a resolution that matches the rendered
         display size.</p>
 
-        <!--
-          <p>All SDP media descriptions for RTP flows represented by <code>
-              <a>MediaStreamTrack</a>
-            </code> objects MUST include a label attribute ("<code
-          title="">a=label:</code>") whose value is the value of the <code>
-              <a>MediaStream</a>
-            </code> object's <code title="dom-MediaStream-label">
-              <a href="#dom-mediastream-label">label</a>
-            </code> attribute. [[!SDP]] [[!SDPLABEL]]</p>
-
-          <p><a href="#rtcpeerconnection"><code>RTCPeerConnection</code>s</a> MUST not
-          generate any candidates for media streams whose media descriptions do
-          not have a label attribute ("<code>a=label:</code>"). [[!ICE]] [[!SDP]]
-          [[!SDPLABEL]]  (Note: CJ - I have no idea why this is here) </p>
-        -->
-
         <p>The word "components" in this context refers to an RTP media flow
         and does not have anything to do with how [[ICE]] uses the term
         "component".</p>
@@ -371,9 +359,7 @@
           <li>
             <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>
+            </p>
           </li>
 
           <li>
@@ -394,17 +380,15 @@
             <ol>
               <li>
                 <p>If the <var>connection</var>'s <a href=
-                "#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
-                readiness state</a> is <code>closed</code>, abort these
+                "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
+                signalingState</a> is <code>closed</code>, abort these
                 steps.</p>
               </li><!-- close() was probably called just before this
          task ran -->
 
               <li>
-                <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>
+                <p>Add <var>stream</var> to <var>connection</var>'s
+                <a href="#remote-streams-set">remote streams set</a>.</p>
               </li>
 
               <li>
@@ -424,9 +408,7 @@
         the component with that <code><a>MediaStream</a></code> object.</p>
 
         <p>When an <code><a>RTCPeerConnection</a></code> finds that a stream
-        from the remote peer has been removed <!-- (its
-          port has been set to zero in a media description sent on the signaling
-          channel), -->, the user agent MUST follow these steps:</p>
+        from the remote peer has been removed, the user agent MUST follow these steps:</p>
 
         <ol>
           <li>
@@ -455,17 +437,15 @@
             <ol>
               <li>
                 <p>If the <var>connection</var>'s <a href=
-                "#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
-                readiness state</a> is <code>closed</code>, abort these
+                "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
+                signalingState</a> is <code>closed</code>, abort these
                 steps.</p>
               </li><!-- close() was probably called just before this
          task ran -->
 
               <li>
                 <p>Remove <var>stream</var> from <var>connection</var>'s
-                <code><a href=
-                "#widl-RTCPeerConnection-remoteStreams">remoteStreams</a></code>
-                array.</p>
+                <a href="#remote-streams-set">remote streams set</a>.</p>
               </li>
 
               <li>
@@ -506,8 +486,6 @@
       <section>
         <h3>Interface Definition</h3>
 
-        <dl class="idl" title="typedef MediaStream[] MediaStreamArray"></dl>
-
         <dl class="idl" title=
         "[Constructor (RTCConfiguration configuration, optional MediaConstraints constraints)] interface RTCPeerConnection : EventTarget ">
         <!--
@@ -603,7 +581,7 @@
 
           <dt>void createAnswer (RTCSessionDescriptionCallback successCallback,
           RTCPeerConnectionErrorCallback failureCallback, optional
-          MediaConstraints? constraints = null)</dt>
+          MediaConstraints constraints)</dt>
 
           <dd>
             <p>The createAnswer method generates an [[!SDP]] answer with the
@@ -662,7 +640,7 @@
           </dd>
 
           <dt>void setLocalDescription (RTCSessionDescription description,
-          RTCVoidCallback successCallback, RTCPeerConnectionErrorCallback
+          VoidFunction successCallback, RTCPeerConnectionErrorCallback
           failureCallback)</dt>
 
           <dd>
@@ -721,7 +699,7 @@
           </dd>
 
           <dt>void setRemoteDescription (RTCSessionDescription description,
-          RTCVoidCallback successCallback, RTCPeerConnectionErrorCallback
+          VoidFunction successCallback, RTCPeerConnectionErrorCallback
           failureCallback)</dt>
 
           <dd>
@@ -769,18 +747,19 @@
             yet been set.</p>
           </dd>
 
-          <dt>readonly attribute RTCPeerState readyState</dt>
+          <dt>readonly attribute RTCSignalingState signalingState</dt>
 
           <dd>
-            <p>The <dfn id="dom-peerconnection-readystate"><code title=
-            "">readyState</code></dfn> attribute MUST return the
-            <code><a>RTCPeerConnection</a></code> object's <a href=
-            "#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
-            readiness state</a>.</p>
+            <p>The <dfn
+            id="dom-peerconnection-signaling-state"><code>signalingState</code></dfn>
+            attribute MUST return the
+            <code><a href="#dom-peerconnection-signaling-state">RTCPeerConnection</a></code> object's <a href=
+            "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
+            signaling state</a>.</p>
           </dd>
 
-          <dt>void updateIce (optional RTCConfiguration? configuration = null,
-          MediaConstraints? constraints = null)</dt>
+          <dt>void updateIce (optional RTCConfiguration configuration,
+          optional MediaConstraints constraints)</dt>
 
           <dd>
             <p>The updateIce method updates the ICE Agent process of gathering
@@ -815,7 +794,7 @@
             being added to the remote description, connectivity checks will be
             sent to the new candidates as long as the "IceTransports"
             constraint is not set to "none". This call will result in a change
-            to the state of the ICE Agent, and may result in a change to media
+            to the connection state of the ICE Agent, and may result in a change to media
             state if it results in different connectivity being
             established.</p>
 
@@ -824,46 +803,87 @@
             parameter is malformed.</p>
           </dd>
 
-          <dt>readonly attribute RTCGatheringState iceGatheringState</dt>
+          <dt>readonly attribute RTCIceGatheringState iceGatheringState</dt>
 
           <dd>
             <p>The <dfn id=
-            "dom-peerconnection-icegatherstate"><code>iceGatheringState</code></dfn>
+            "dom-peerconnection-ice-gathering-state"><code>iceGatheringState</code></dfn>
             attribute MUST return the gathering state of the <a href=
             "#rtcpeerconnection-ice-agent"><code>RTCPeerConnection</code> ICE
             Agent</a> connection state.</p>
           </dd>
 
-          <dt>readonly attribute RTCIceState iceState</dt>
+          <dt>readonly attribute RTCIceConnectionState iceConnectionState</dt>
 
           <dd>
             <p>The <dfn id=
-            "dom-peerconnection-icestate"><code>iceState</code></dfn> attribute
+            "dom-peerconnection-ice-connection-state"><code>iceConnectionState</code></dfn> attribute
             MUST return the state of the <a href=
             "#rtcpeerconnection-ice-agent"><code>RTCPeerConnection</code> ICE
             Agent</a> ICE state.</p>
           </dd>
 
-          <dt>readonly attribute MediaStreamArray localStreams</dt>
+          <dt>sequence&lt;MediaStream&gt; getLocalStreams()</dt>
 
           <dd>
-            <p>Returns a live array containing the local streams (those that
-            were added with <code title=
-            "dom-RTCPeerConnection-addStream"><a href=
-            "#dom-peerconnection-addstream">addStream()</a></code> ).</p>
+            <p>Returns a sequence of <code><a>MediaStream</a></code> objects
+            representing the streams that are currently sent with this
+            <code><a>RTCPeerConnection</a></code> object.</p>
+
+            <p>The <dfn id="dom-peerconnection-getlocalstreams">
+            <code>getLocalStreams()</code></dfn> method MUST return a new
+            sequence that represents a snapshot of all the <code>
+            <a>MediaStream</a></code> objects in this <code>
+            <a>RTCPeerConnection</a></code> object’s <a href=
+            "#local-streams-set">local streams set</a>. The conversion from the
+            streams set to the sequence, to be returned, is user agent defined
+            and the order does not have to stable between calls.</p>
           </dd>
 
-          <dt>readonly attribute MediaStreamArray remoteStreams</dt>
+          <dt>sequence&lt;MediaStream&gt; getRemoteStreams()</dt>
 
           <dd>
-            <p>Returns a live array containing the remote streams (those that
-            were added by the remote side).</p>
+            <p>Returns a sequence of <code><a>MediaStream</a></code> objects
+            representing the streams that are currently received with this
+            <code><a>RTCPeerConnection</a></code> object.</p>
 
-            <p>This array is updated when <code><a href=
-            "#event-mediastream-addstream">addstream</a></code> and
-            <code title="event-MediaStream-removestream"><a href=
-            "#event-mediastream-removestream">removestream</a></code> events
-            are fired.</p>
+            <p>The <dfn id="dom-peerconnection-getremotestreams">
+            <code>getRemoteStreams()</code></dfn> method MUST return a new
+            sequence that represents a snapshot of all the <code>
+            <a>MediaStream</a></code> objects in this <code>
+            <a>RTCPeerConnection</a></code> object’s <a href=
+            "#remote-streams-set">remote streams set</a>. The conversion from the
+            streams set to the sequence, to be returned, is user agent defined
+            and the order does not have to stable between calls.</p>
+          </dd>
+
+          <dt>MediaStream getStreamById(DOMString streamId)</dt>
+
+          <dd>
+            <p>If a <code><a>MediaStream</a></code> object, with an <code>

[1269 lines skipped]

Received on Wednesday, 16 January 2013 15:16:29 UTC