RTCPeerConnection.iceGatheringState
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
只读属性 RTCPeerConnection.iceGatheringState
返回一个描述连接的 ICE 收集状态的字符串。比如当 ICE 候选收集完成的时候,你可以通过该属性的变化侦测到。
通过监听 icegatheringstatechange
类型的事件,你可以侦测到该属性的变化。
值
示例
js
const pc = new RTCPeerConnection();
const state = pc.iceGatheringState;
规范
Specification |
---|
WebRTC: Real-Time Communication in Browsers # dom-peerconnection-ice-gathering-state |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
iceGatheringState |
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.