mozilla

Revision 512819 of RTCPeerConnectionErrorCallback

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

Revision Content

The RTCPeerConnectionErrorCallback is called when error occur while creating RTCPeerConnection offers or answers.

Example

var pc = new RTCPeerConnection();
var error = function(err) {
  alert("Oh no! " + JSON.stringify(e));
  pc.close();
}
pc.createOffer(function(offer) { }, error);

Revision Source

<p>The RTCPeerConnectionErrorCallback is called when error occur while creating <a href="/en-US/docs/">RTCPeerConnection</a> offers or answers.</p>
<h3 id="Example">Example</h3>
<pre>
var pc = new RTCPeerConnection();
var error = function(err) {
  alert("Oh no! " + JSON.stringify(e));
  pc.close();
}
pc.createOffer(function(offer) { }, error);
</pre>
Revert to this revision