RTCPeerConnection: signalingstatechange event

An signalingstatechange event is sent to an RTCPeerConnection to notify it that its signaling state, as indicated by the signalingState property, has changed.

Bubbles No
Cancelable No
Interface Event
Event handler property RTCPeerConnection.onsignalingstatechange

Examples

Given an RTCPeerConnection, pc, and an updateStatus() function that presents status information to the user, this code sets up an event handler to let the user know when the ICE negotiation process finishes up.

pc.addEventListener("signalingstatechange", ev => {
  switch(pc.signalingState) {
    case "stable":
      updateStatus("ICE negotiation complete");
      break;
  }
}, false);

Using onsignalingstatechange, it looks like this:

pc.onsignalingstatechange = ev => {
  switch(pc.signalingState) {
    case "stable":
      updateStatus("ICE negotiation complete");
      break;
    }
};

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'signalingstatechange' in that specification.
Candidate Recommendation

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
signalingstatechange eventChrome Full support 28Edge Full support 15Firefox Full support 22IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support YesChrome Android Full support 28Firefox Android Full support 44Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 6.0

Legend

Full support
Full support
No support
No support

See also