RTCPeerConnection.connectionState
A propriedade connectionState
do tipo somente leitura da interface RTCPeerConnection
indica o estado atual da conexão em par, devolvendo um valor em string específicado por um enum RTCPeerConnection
.
Quando o valor da propriedade muda, o evento connectionstatechange
é enviado para a intância RTCPeerConnection
.
Syntax
var connectionState = RTCPeerConnection.connectionState;
Value
O estado atual da conexão, como um valor do enum RTCPeerConnectionState
.
Example
js
var pc = new RTCPeerConnection(configuration);
/* ... */
var connectionState = pc.connectionState;
Especificações
Specification |
---|
WebRTC: Real-Time Communication in Browsers # dom-peerconnection-connection-state |
Compatibilidade com navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
connectionState |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.