connectionState property of the
RTCPeerConnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum
var connectionState = RTCPeerConnection.connectionState;
The current state of the connection, as a value from the enum
RTCPeerConnectionState enum defines string constants which describe states in which the
RTCPeerConnection may be. These values are returned by the
connectionState property. This state essentially represents the aggregate state of all ICE transports (which are of type
RTCDtlsTransport) being used by the connection.
||At least one of the connection's ICE transports (
||One or more of the ICE transports are currently in the process of establishing a connection; that is, their
||Every ICE transport used by the connection is either in use (state
||At least one of the ICE transports for the connection is in the
||One or more of the ICE transports on the connection is in the
var pc = new RTCPeerConnection(configuration); /* ... */ var connectionState = pc.connectionState;
|WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnection.connectionState' in that specification.
|Candidate Recommendation||Initial specification.|
|Feature||Android webview||Chrome for Android||Edge mobile||Firefox for Android||Opera Android||iOS Safari||Samsung Internet|
37 — 43
1. Promise based version.