Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 512817 of RTCSessionDescriptionCallback

  • Revision slug: Web/API/RTCSessionDescriptionCallback
  • Revision title: RTCSessionDescriptionCallback
  • Revision id: 512817
  • Created:
  • Creator: wesj
  • Is current revision? No
  • Comment

Revision Content

The RTCSessionDescriptionCallback is passed into the RTCPeerConnection object when requesting it create offers or answers.

Example

var pc = new RTCPeerConnection();
var descriptionCallback = function(offer) {
  pc.setLocalDescription(offer);
}
pc.createOffer(descriptionCallback);

Revision Source

<p>The RTCSessionDescriptionCallback is passed into the <a href="/en-US/docs/">RTCPeerConnection</a> object when requesting it create offers or answers.</p>
<h3 id="Example">Example</h3>
<pre>
var pc = new RTCPeerConnection();
var descriptionCallback = function(offer) {
  pc.setLocalDescription(offer);
}
pc.createOffer(descriptionCallback);
</pre>
Revert to this revision