Reputation: 1693
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()?
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?
Upvotes: 0
Views: 407
Reputation: 17265
That is not necessary, see the description of the operations chain in the specification which ensures in-order execution.
Upvotes: 2