Skip to content

Commit

Permalink
Updated the text about createOffer/createAnswer callback handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-be committed Nov 6, 2012
1 parent 306e7cb commit 1198dd8
Showing 1 changed file with 20 additions and 49 deletions.
69 changes: 20 additions & 49 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,32 +623,18 @@ <h3>Interface Definition</h3>
Identity assertions, then the session description SHALL contain an
appropriate assertion.</p>

<p>When the SDP generation process has produced a result, the user
agent MUST run the following steps:</p>
<p>If this <code>RTCPeerConnection</code> object is closed before
the SDP generation process completes, the USER agent MUST suppress
the result and not call any of the result callbacks.</p>

<ol>
<li>
<p>If the <code><a>RTCPeerConnection</a></code> object’s
<a href=
"#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
readiness state</a> is <code>"closed"</code>, abort these
steps, and throw an exception with an <code>RTCError</code>
object of type <code>INVALID_STATE</code>.</p>
</li>
<p>If the SDP generation process completed successfully, the user
agent MUST queue a task to invoke <var>successCallback</var> with a
newly created <code><a>RTCSessionDescription</a></code> object,
representing the generated offer, as its argument.</p>

<li>
<p>If an SDP was successfully generated, then queue a task to
invoke <var>successCallback</var> with a newly created
<code><a>RTCSessionDescription</a></code> object, representing
the generated offer, as its argument.</p>
</li>

<li>
<p>If the SDP generation process failed for any reason, then
queue a task to invoke <var>errorCallback</var> with the string
TBD as its argument.</p>
</li>
</ol>
<p>If the SDP generation process failed for any reason, the user
agent MUST queue a task to invoke <var>errorCallback</var> with an
<code>RTCError</code> object of type TBD as its argument.</p>

<p>An exception with an <code>RTCError</code> object of type
<code>INVALID_CONSTRAINTS_TYPE</code> is thrown if the constraints
Expand Down Expand Up @@ -701,33 +687,18 @@ <h3>Interface Definition</h3>
Identity assertions, then the session description SHALL contain an
appropriate assertion.</p>

<p>When the SDP generation process has produced a result, the user
agent MUST run the following steps:</p>
<p>If this <code>RTCPeerConnection</code> object is closed before
the SDP generation process completes, the USER agent MUST suppress
the result and not call any of the result callbacks.</p>

<ol>
<li>
<p>If the <code><a>RTCPeerConnection</a></code> object’s
<a href=
"#rtcpeerconnection-readiness-state"><code>RTCPeerConnection</code>
readiness state</a> is <code>"closed"</code>, abort these
steps, and throw an exception with an <code>RTCError</code>
object of type <code>INVALID_STATE</code>.</p>
</li>
<p>If the SDP generation process completed successfully, the user
agent MUST queue a task to invoke <var>successCallback</var> with a
newly created <code><a>RTCSessionDescription</a></code> object,
representing the generated answer, as its argument.</p>

<li>
<p>If an SDP was successfully generated, then queue a task to
invoke <var>successCallback</var> with a newly created
<code><a>RTCSessionDescription</a></code> object, representing
the generated answer, as its argument.</p>
</li>

<li>
<p>If an appropriate answer could not be generated for the
given offer or the SDP generation process failed for any other
reason, then queue a task to invoke <var>errorCallback</var>
with the string TBD as its argument.</p>
</li>
</ol>
<p>If the SDP generation process failed for any reason, the user
agent MUST queue a task to invoke <var>errorCallback</var> with an
<code>RTCError</code> object of type TBD as its argument.</p>

<p>An exception with an <code>RTCError</code> object of type
<code>INVALID_CONSTRAINTS_TYPE</code> is thrown if the constraints
Expand Down

0 comments on commit 1198dd8

Please sign in to comment.