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 750889 of RTCSessionDescriptionCallback

  • Revision slug: Web/API/RTCSessionDescriptionCallback
  • Revision title: RTCSessionDescriptionCallback
  • Revision id: 750889
  • Created:
  • Creator: teoli
  • Is current revision? Yes
  • Comment

Revision Content

{{APIRef("WebRTC")}}{{SeeCompatTable}}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>{{APIRef("WebRTC")}}{{SeeCompatTable}}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