connectionState property
RTCPeerConnectionState
get
connectionState
The connectionState
read-only property of the RTCPeerConnection
interface indicates the current state of the peer connection by returning
one of the following string values: new
, connecting
, connected
,
disconnected
, failed
, or closed
.
This state essentially represents the aggregate state of all ICE transports (which are of type RTCIceTransport or RTCDtlsTransport) being used by the connection.
When this property's value changes, a
RTCPeerConnection.connectionstatechange_event
event is sent to the
RTCPeerConnection instance.
Implementation
external RTCPeerConnectionState get connectionState;