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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
signalingstatechange event | Chrome Full support 28 | Edge Full support 15 | Firefox Full support 22 | IE No support No | Opera Full support 43 | Safari Full support 11 | WebView Android Full support Yes | Chrome Android Full support 28 | Firefox Android Full support 44 | Opera Android Full support 43 | Safari iOS No support No | Samsung Internet Android Full support 6.0 |
Legend
- Full support
- Full support
- No support
- No support