CVS 2011/webrtc/editor

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

Modified Files:
	webrtc.html 
Log Message:
updated 

--- /sources/public/2011/webrtc/editor/webrtc.html	2013/02/22 13:37:09	1.32
+++ /sources/public/2011/webrtc/editor/webrtc.html	2013/03/22 20:25:07	1.33
@@ -230,7 +230,7 @@
           <li>
             <p>Set <var>connection</var>'s <a href=
             "#dom-peerconnection-ice-connection-state"><code>RTCPeerConnection</code>
-            ice connection state</a> to <code>starting</code>.</p>
+            ice connection state</a> to <code>new</code>.</p>
           </li>
           
           <li>
@@ -273,7 +273,7 @@
           </li>
 
           <li>
-            <p>When the ascynchronous operation completes (either successfully
+            <p>When the asynchronous operation completes (either successfully
             or with an error), remove the corresponding object from the
             <code>operations</code> array. After removal, if the array is
             non-empty, execute the first object queued asynchronously and
@@ -294,8 +294,8 @@
 
         <ol>
           <li>
-            <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
+            <p>If <var>iceConnectionState</var> is <code>new</code> and the IceTransports constraint
+            is not set to <code>none</code>, it MUST queue a task to start gathering ICE
             addresses and set the <var>iceConnectionState</var> to "gathering".</p>
           </li>
 
@@ -330,6 +330,55 @@
           </li>
         </ol>
 
+        <p>When the ICE Agent needs to notify the script about the candidate
+        gathering progress, the user agent must queue a task to run the
+        following steps:</p>
+
+        <ol>
+          <li>
+            <p>Let <var>connection</var> be the
+            <code><a>RTCPeerConnection</a></code> object associated with this
+            ICE Agent.</p>
+          </li>
+
+          <li>
+            <p>If <var>connection</var>'s <a href=
+            "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
+            signalingState</a> is <code>closed</code>, abort these
+            steps.</p>
+          </li>
+
+          <li>
+            <p>If the intent of the ICE Agent is to notify the script that:</p>
+
+            <ul>
+              <li>
+                <p>A new candidate is available.</p>
+
+                <p>Add the candidate to <var>connection</var>'s <code>
+                <a>localDescription</a></code> and create a <code>
+                <a>RTCIceCandidate</a></code> object to represent the
+                candidate. Let <var>newCandidate</var> be that object.</p>
+              </li>
+
+              <li>
+               <p>The gathering process is done.</p>
+
+               <p>Set <var>connection</var>'s
+               <a href="#dom-peerconnection-ice-gathering-state">ice gathering
+               state</a> to <code>completed</code> and let
+               <var>newCandidate</var> be null.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Fire a icecandidate event named  <code><a href=
+          "#event-icecandidate">icecandidate</a></code> with
+          <var>newCandidate</var> at <var>connection</var>.</p>
+          </li>
+        </ol>
+
         <p>User agents negotiate the codec resolution, bitrate, and other media
         parameters. It is RECOMMENDED that user agents initially negotiate for
         the maximum resolution of a video stream. For streams that are then
@@ -536,7 +585,7 @@
 
             <p>Session descriptions generated by createOffer MUST be
             immediately usable by setLocalDescription without causing an error
-            as long as setLocalDiscription is called within the successCallback
+            as long as setLocalDescription is called within the successCallback
             function. If a system has limited resources (e.g. a finite number
             of decoders), createOffer needs to return an offer that reflects
             the current state of the system, so that setLocalDescription will
@@ -661,21 +710,156 @@
             <p>To Do: specify what parts of the SDP can be changed between the
             createOffer and setLocalDescription</p>
 
-            <p>Changes to the state of media transmission will occur when a
-            final answer is successfully applied.
-            <code><a>localDescription</a></code> MUST return the previous
-            description until the new description is successfully applied.</p>
-
-            <p>The <code>failureCallback</code> will be called if the
-            <code><a>RTCSessionDescription</a></code> is a valid description
-            but cannot be applied at the media layer, e.g., if there are
-            insufficient resources to apply the SDP. The user agent MUST roll
-            back as necessary if the new description was partially applied when
-            the failure occurred.</p>
-
-            <p>An <code>RTCError</code> object of type
-            <code>INVALID_SESSION_DESCRIPTION</code> is provided to the failure
-            callback if the SDP content is invalid.</p>
+            <p>When the method is invoked, the user agent must follow the
+            <dfn id="set-description-model">processing model</dfn> described
+            by the following list:</p>
+
+            <ul>
+              <li>
+                <p>If this <code><a>RTCPeerConnection</a></code> object's
+                <a href="#dom-peerconnection-signaling-state">signaling state</a> is
+                <code>closed</code>, the user agent MUST throw an exception with
+                an <code>RTCError</code> object of type <code>INVALID_STATE</code>
+                and abort this operation.</p>
+              </li>
+
+              <li>
+                <p>If a local description contains a different set of ICE
+                credentials, then the ICE Agent MUST trigger an ICE restart.
+                </p>
+              </li>
+
+              <li>
+                <p>If the process to apply the <code>
+                <a>RTCSessionDescription</a></code> argument fails for any
+                reason, then user agent must queue a task runs the following
+                steps:</p>
+
+                <ol>
+                  <li>
+                    <p>Let <var>connection</var> be the
+                    <code><a>RTCPeerConnection</a></code> object on with this
+                    method was invoked.</p>
+                  </li>
+
+                  <li>
+                    <p>If <var>connection</var>'s <a href=
+                    "#dom-peerconnection-signaling-state">signaling state</a>
+                    is <code>closed</code>, then abort these steps.</p>
+                  </li>
+
+                  <li>
+                    <p>If the reason for the failure is:</p>
+
+                    <ul>
+                      <li>
+                        <p>The content of the <code>
+                        <a>RTCSessionDescription</a></code> argument is invalid
+                        or the <code><a href=
+                        "#widl-RTCSessionDescription-type">type</a></code> is
+                        wrong for the current <a href=
+                        "#dom-peerconnection-signaling-state">signaling state</a>
+                        of <var>connection</var>.
+                        </p>
+
+                        <p>Let <var>errorType</var> be
+                        <code>INVALID_SESSION_DESCRIPTION</code>.</p>
+                      </li>
+
+                      <li>
+                        <p>The <code><a>RTCSessionDescription</a></code> is
+                        a valid description but cannot be applied at the media
+                        layer.</p>
+
+                        <p>This can happen, e.g., if there are
+                        insufficient resources to apply the SDP. The user agent
+                        MUST then roll back as necessary if the new description
+                        was partially applied when the failure occurred.</p>
+
+                        <p>If rollback was not necessary or was completed
+                        successfully, let <var>errorType</var> be
+                        <code>INCOMPATIBLE_SESSION_DESCRIPTION</code>. If
+                        rollback was not possible, let <var>errorType</var> be
+                        <code>INTERNAL_ERROR</code> and set
+                        <var>connection</var>'s <a href=
+                        "#dom-peerconnection-signaling-state">signaling
+                        state</a> to <code>closed</code>.</p>
+                      </li>
+                    </ul>
+                  </li>
+
+                  <li>
+                    <p>Invoke the <var>failureCallback</var> with an
+                    <code>RTCError</code> object, of type
+                    <var>errorType</var>, as its argument.
+                  </li>
+                </ol>
+              </li>
+
+              <li>
+                <p>If the <code><a>RTCSessionDescription</a></code> argument is
+                applied successfully, then user agent must queue a task runs the
+                following steps:</p>
+
+                <ol>
+                  <li>
+                    <p>Let <var>connection</var> be the
+                    <code><a>RTCPeerConnection</a></code> object on with this
+                    metod was invoked.</p>
+                  </li>
+
+                  <li>
+                    <p>If <var>connection</var>'s <a href=
+                    "#dom-peerconnection-signaling-state">signaling state</a>
+                    is <code>closed</code>, then abort these steps.</p>
+                  </li>
+
+                  <li>
+                    <p>Set <var>connection</var>'s description attribute
+                    (<code><a>localDescription</a></code> or <code>
+                    <a>remoteDescription</a></code> depending on the setting
+                    operation) to the <code><a>RTCSessionDescription</a></code>
+                    argument.</p>
+                  </li>
+
+                  <li>
+                    <p>If the local description was set,
+                    <var>connection</var>'s <a href=
+                    "#dom-peerconnection-ice-gathering-state">ice gathering
+                    state</a> is <code>new</code>, and the local description
+                    contains media, then set <var>connection</var>'s <a href=
+                    "#dom-peerconnection-ice-gathering-state">ice gathering
+                    state</a> to <code>gathering</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>If the local description was set with content that
+                    caused an ICE restart, then set <var>connection</var>'s
+                    <a href="#dom-peerconnection-ice-gathering-state">ice
+                    gathering state</a> to <code>gathering</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>Set <var>connection</var>'s <a href=
+                    "#dom-peerconnection-signaling-state">signalingState</a>
+                    accordingly.</p>
+                  </li>
+
+                  <li>
+                    <p>Fire a simple event named <code><a href=
+                    "#event-signalingstatechange">signalingstatechange</a>
+                    </code> at <var>connection</var>.</p>
+                  </li>
+
+                  <li>
+                    <p>Queue a new task that, if <var>connection</var>'s <a href=
+                    "#dom-peerconnection-signaling-state">signalingState</a>
+                    is not <code>closed</code>, invokes the
+                    <var>successCallback</var>.</p>
+                  </li>
+                </ol>
+              </li>
+            </ul>
           </dd>
 
           <dt>readonly attribute RTCSessionDescription localDescription</dt>
@@ -708,21 +892,11 @@
             verifies the identity following the procedures in [XREF
             sec.identity-proxy-assertion-request].</p>
 
-            <p>Changes to the state of media transmission will occur when a
-            final answer is successfully applied.
-            <code><a>remoteDescription</a></code> MUST return the previous
-            description until the new description is successfully applied.</p>
-
-            <p>The <code>failureCallback</code> will be called if the
-            <code><a>RTCSessionDescription</a></code> is a valid description
-            but cannot be applied at the media layer, e.g., if there are
-            insufficient resources to apply the SDP. The user agent MUST roll
-            back as necessary if the new description was partially applied when
-            the failure occurred.</p>
-
-            <p>An <code>RTCError</code> object of type
-            <code>INVALID_SESSION_DESCRIPTION</code> is provided to the failure
-            callback if the SDP content is invalid.</p>
+            <p>When the method is invoked, the user agent must follow the
+            <a href="#set-description-model">processing model</a> of
+            <code><a href=
+            "#dom-peerconnection-setlocaldescription">setLocalDescription()</a>
+            </code>.</p>
           </dd>
 
           <dt>readonly attribute RTCSessionDescription remoteDescription</dt>
@@ -959,7 +1133,14 @@
 
             <ol>
               <li>
-                <p>If the <code><a>RTCPeerConnection</a></code> object's
+                <p>Let <var>connection</var> be the <code>
+                <a>RTCPeerConnection</a></code> object on which the <code>
+                <a>MediaStream</a></code>, <var>stream</var>,
+                is to be added.</p>
+              </li>
+
+              <li>
+                <p>If <var>connection</var>'s
                 <a href=
                 "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
                 signalingState</a> is <code>closed</code>, abort these steps,
@@ -968,15 +1149,13 @@
               </li>
 
               <li>
-                <p>If <var>stream</var> is already in the
-                <code><a>RTCPeerConnection</a></code> object's <a href=
+                <p>If <var>stream</var> is already in <var>connection</var>'s <a href=
                 "#local-streams-set">local streams set</a>, then abort these
                 steps.</p>
               </li>
 
               <li>
-                <p>Add <var>stream</var> to the
-                <code><a>RTCPeerConnection</a></code> object's <a href=
+                <p>Add <var>stream</var> to <var>connection</var>'s <a href=
                 "#local-streams-set">local streams set</a>.</p>
               </li>
 
@@ -990,7 +1169,12 @@
               </li>
 
               <li>
-                <p>Fire a negotiationneeded event.</p>
+                <p>If <var>connection</var>'s <a href=
+                "#dom-peerconnection-signaling-state">
+                <code>RTCPeerConnection</code> signalingState</a> is
+                <code>stable</code>, then fire a <a href=
+                "#event-negotiation">negotiationneeded</a> event at
+                <var>connection</var>.</p>
 
                 <p class="issue">ISSUE: Should this fire if the
                 RTCPeerConnection is in "new"?</p>
@@ -1001,9 +1185,8 @@
           <dt>void removeStream (MediaStream stream)</dt>
 
           <dd>
-            <p>Removes the given stream from the localStream array in the
-            RTCPeerConnection and fires the <a href=
-            "#event-negotiation">negotiationneeded</a> event.</p>
+            <p>Removes the given stream from the <code>
+            <a>RTCPeerConnection</a></code>.</p>
 
             <p>When the other peer stops sending a stream in this manner, a
             <code title="event-MediaStream-removestream"><a href=
@@ -1015,8 +1198,15 @@
             MUST run the following steps:</p>
 
             <ol>
+               <li>
+                <p>Let <var>connection</var> be the <code>
+                <a>RTCPeerConnection</a></code> object on which the <code>
+                <a>MediaStream</a></code>, <var>stream</var>,
+                is to be removed.</p>
+              </li>
+
               <li>
-                <p>If the <code><a>RTCPeerConnection</a></code> object's
+                <p>If <var>connection</var>'s
                 <a href=
                 "#dom-peerconnection-signaling-state"><code>RTCPeerConnection</code>
                 signalingState</a> is <code>closed</code>, throw an
@@ -1024,20 +1214,22 @@
               </li>
 
               <li>
-                <p>If <var>stream</var> is not in the
-                <code><a>RTCPeerConnection</a></code> object's <a href=
+                <p>If <var>stream</var> is not in <var>connection</var>'s <a href=
                 "#local-streams-set">local streams set</a>, then abort these steps.</p>
               </li>
 
               <li>
-                <p>Remove <var>stream</var> from the
-                <code><a>RTCPeerConnection</a></code> object's <a href=
+                <p>Remove <var>stream</var> from <var>connection</var>'s <a href=
                 "#local-streams-set">local streams set</a>.</p>
               </li>
 
               <li>
-                <p>Fire a <a href="#event-negotiation">negotiationneeded</a>
-                event.</p>
+                <p>If <var>connection</var>'s <a href=
+                "#dom-peerconnection-signaling-state">
+                <code>RTCPeerConnection</code> signalingState</a> is
+                <code>stable</code>, then fire a <a href=
+                "#event-negotiation">negotiationneeded</a> event at
+                <var>connection</var>.</p></p>
               </li>
             </ol>

[411 lines skipped]

Received on Friday, 22 March 2013 20:25:08 UTC