Abhay Rawat
Abhay Rawat

Reputation: 83

How many ICE candidates to exchange for video call?

Suppose there are 2 users user 1: 10 Ice candidates generated user 2: 5 Ice candidates generated

And I know only 1 candidate is required to establish a connection. So any of the above user sends candidates to other user and the connection gets established.

My question is they should exchange all candidates, In order to agree on best connection route ?

If they exchange all candidates , all I have to do is feed all Ice candidates to my peerConnection as shown in dart code below, Am I right ?

RTCPeerConnection _peerConnection;
await _peerConnection.addCandidate(candidate);

Upvotes: 1

Views: 875

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17350

You should exchange all the candidates and feed any candidates from the local onicecandidate event into the remote's addIceCandidate call.

ICE will figure out the best pair to use (by trying each and using what works)

Upvotes: 1

Related Questions