This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The read-only property RTCPeerConnection.signalingState
returns an enum of type RTCSignalingState
that describes the signaling state of the local connection, that is the state of its set-up process.
This state describes the SDP offer, that defines the configuration of the connections like the description of the locally associated objects of type MediaStream
, the codec/RTP/RTCP options, the candidates gathered by the ICE Agent.
When the value of this property change a signalingstatechange
event is sent to the object.
Syntax
var state = peerConnection.signalingState;
Value
The allowed values are those of an enum of type RTCSignalingState
:
"stable"
: there is no SDP offer/answer exchange in progress. This is also the inital state of the connection."have-local-offer"
: the local end of the connection has locally applied a SDP offer."have-remote-offer"
: the remote end of the connection has locally applied a SDP offer."have-local-pranswer"
: a remote SDP offer has been applied, and a SDP pranswer applied locally."have-remote-pranswer":
a local SDP offer has been applied, and a SDP pranwer applied remotely."closed"
: the connection is closed.
Example
var pc = new RTCPeerConnection(configuration); var state = pc.signalingState;
Specifications
Specification | Status | Comment |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browser The definition of 'RTCPeerConnection.signalingState' in that specification. |
Working Draft | Initial specification. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) [1] | (Yes) [1] | Not supported | (Yes) | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | ? | ? | Not supported | ? | ? |
[1] Though this property is not prefixed, the interface it belongs to is.