【发布时间】:2023-03-19 21:53:01
【问题描述】:
-
RTCPeerConnection.setRemoteDescription() 返回一个 Promise,一旦连接的 remoteDescription 的值成功更改,该 Promise 就会解析。我是否需要等待这个 Promise 成功解决后再调用 RTCPeerConnection.addIceCandidate()?
-
此外,
RTCPeerConnection.addIceCandidate()返回一个 Promise,当 ICE 代理成功地将候选者添加到远程对等点的描述中时,该 Promise 就实现了。在通过RTCPeerConnection.addIceCandidate()添加下一个可用候选人之前,我应该等待此 Promise 成功解决,还是可以并行添加 IceCandidates?
【问题讨论】:
标签: webrtc rtcpeerconnection peer-connection