We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS


This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The RTCPeerConnection.onsignalingstatechange property is an EventHandler which specifies a function to be called when the signalingstatechange event occurs on an RTCPeerConnection interface. The function receives as input the event object, of type Event; this event is sent when the value of RTCPeerConnection.signalingState changes, as the result of a call to either setLocalDescription() or setRemoteDescription().


RTCPeerConnection.onsignalingstatechange = errorHandler;


Set this to a function which you provide that receives an Event object as input; this contains the signalingstatechange event. This event object doesn't provide details about what changed, but you can examine the signalingState property to determine what the new state is.


pc.onsignalingstatechange = function(event) {
  if (pc.signalingState === "have-local-pranswer") {
    // setLocalDescription() has been called with an answer


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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support561522 ?


37 — 43

FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support5656 Yes44


37 — 43


1. Promise based version.

See also

Document Tags and Contributors

Contributors to this page: fscholz, jpmedley, abbycar, Sheppy, Sebastianz, teoli
Last updated by: fscholz,