简体   繁体   中英

Should I wait for RTCPeerConnection.setRemoteDescription() & RTCPeerConnection.addIceCandidate() Promises to settle?

  1. RTCPeerConnection.setRemoteDescription() returns a Promise that resolves once the value of the connection's remoteDescription is successfully changed. Do I need to wait for this Promise to resolve successfully before calling RTCPeerConnection.addIceCandidate() ?

  2. Furthermore RTCPeerConnection.addIceCandidate() returns a Promise which is fulfilled when the candidate has been successfully added to the remote peer's description by the ICE agent. Should I wait for this Promise to resolve successfully before adding the next available candidate via RTCPeerConnection.addIceCandidate() or can IceCandidates be added in parallel?

这是没有必要的,见的操作链的描述在本说明书中这保证了在顺序执行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM