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 |
浏览器兼容性
BCD tables only load in the browser