-
-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate candidates when iceCandidatePoolSize and trickle are enabled. #469
Comments
Yes, it's safe to drop ice candidates that have been sent another way (either by not sending the 2nd message or by filtering out the relevant lines from the offer). However, based on the candidate type, you may want to consider removing the duplicate line from the SDP instead. reflex and relay candidates should be trickled. https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02#section-6.1:
|
at first I thought this was a chrome bug as the spec is pretty clear that the candidates should only be surfaced via the candidate event. As looking at the fiddle in chrome://webrtc-internals shows, the SDP from createOffer and setLocalDescription doesn't contain those candidates however. btw, its unlikely you need a iceCandidatePoolSize of 5. Note that this is not the number of candidates to pre-gather but the number of components (one for sctp, one for audio, one for video, etc; and with bundle you rarely need more than 1 even) |
Using
[email protected]
Demo: https://jsfiddle.net/guanzo/gupdrm1a/5/
Setting the
iceCandidatePoolSize
option enables candidate prefetching to occur beforesetLocalDescription
is called.When creating an initiating peer like so:
The sdp offer in the first
signal
event contains a prefetched host candidate. Problem is, the nextsignal
event which contains a trickled candidate, is the same candidate as the prefetched one. Is this supposed to happen? It seems redundant to send the same candidate twice to the other peer.Example:
1st
signal
2nd
signal
. It's the same as the prefetched candidate!?candidate:1769160098 1 udp 2113937152 192.168.1.92 39452 typ host generation 0 ufrag 4xkg network-cost 999
3rd
signal
candidate:842163049 1 udp 1677729535 73.189.204.6 39452 typ srflx raddr 192.168.1.92 rport 39452 generation 0 ufrag 4xkg network-cost 999
Is it safe to not send the 2nd
signal
to the signaling server, seeing how it's already been sent in the initial offer? Trickling candidates puts a lot more load on my server than non-trickle, so I'll take any opportunity to reduce the amount of messaging required.The text was updated successfully, but these errors were encountered: