RTCPeerConnection:iceGatheringState 属性
RTCPeerConnection 接口的只读属性 iceGatheringState 返回一个字符串,该字符串描述此连接的整体 ICE 收集状态。这使您能够检测,例如,ICE 候选集的收集何时完成。
您可以通过监听类型为 icegatheringstatechange 的事件来检测此属性值的变化。
请注意,iceGatheringState 代表连接的整体收集状态,包括连接中每个 RTCRtpSender 和每个 RTCRtpReceiver 使用的每个 RTCIceTransport。这与 RTCIceTransport.gatheringState 不同,后者代表单个传输的收集状态。