In trickle ICE, how do you handle remote ice candidates if they arrive before the SDP answer?

522 views
Skip to first unread message

Ameem Shaik

unread,
Mar 12, 2021, 4:16:09 PM3/12/21
to discuss-webrtc
I can't seem to find any relevant documentation on this. The reason I ask is because I noticed some of the existing JS libraries for WebRTC seem to explicitly handle this condition by temporarily storing the ice candidates until the remote description is set. For example:
https://github.com/Kurento/kurento-utils-js/blob/master/lib/WebRtcPeer.js#L140

Both of the libraries above add the ice candidates to a queue until the remote description is set, at which point they empty the queue.

Is this actually required? Or is it somehow handled by the WebRTC API itself?

Thanks!
Ameem

Sean DuBois

unread,
Mar 12, 2021, 10:01:49 PM3/12/21
to discuss...@googlegroups.com
Hi,

Would you mind bringing this up here. https://github.com/w3c/webrtc-pc/issues/2519

Would love to see this fixed/complexity removed from client code!

On Mar 12, 2021, at 13:16, Ameem Shaik <ame...@gmail.com> wrote:


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f57cdb9e-a93d-4ae4-9c99-3b9c31fc7e3dn%40googlegroups.com.

shakeeb nazmus

unread,
Mar 13, 2021, 6:39:56 AM3/13/21
to discuss-webrtc
Hi Ameem,

>>I can't seem to find any relevant documentation on this.
WebRTC uses trickle ICE(rfc8838). It doesn't send remote candidates before remote SDP. 
If we assume that signaling is sequential then there is no chance of the coming candidates before SDP.

But our assumption about signaling is not always true. WebRTC can be used with different signaling where 
the message may come out of order ( UDP based signaling )

>>Both of the libraries above add the ice candidates to a queue until the remote description is set, at which point they empty the queue.
So it is nice to have queuing candidates.

>>Is this actually required? Or is it somehow handled by the WebRTC API itself?
Yes. WebRTC API doesn't handle it. ( found while testing )
    

Thanks,
Shakeeb
Reply all
Reply to author
Forward
0 new messages