Closed nickdesaulniers closed 8 years ago
just as we have a gatherStunCandidate method, let's add a getherTurnCandidate method.
One question we need to answer is: when is TURN needed? Always? Or only when our existing check list fails?
If it's always, we can start the TURN candidate gathering process right after getting host candidates, maybe by replacing this callback with one that does STUN+TURN: https://github.com/nickdesaulniers/node-rtc-peer-connection/blob/a8ee9efbdb25aac2b18fe7f348203b4ab5cc7929/lib/ice.js#L89
If it's only after we fail the existing checks, then we'd start the TURN stuff here: https://github.com/nickdesaulniers/node-rtc-peer-connection/blob/a8ee9efbdb25aac2b18fe7f348203b4ab5cc7929/lib/ice.js#L440
We also need to find a TURN server to test against, since the list of ICEServers passed in only has a single STUN server. We might need to use coturn locally.
EKR says TURN candidate gathering should start ASAP (after gathering HOST candidates) and that those candidates might also generate SRFLX candidates.
closing in favor of: https://github.com/nickdesaulniers/node-ice/issues/1
the IceAgent.prototype.gatherAllCandidates should be extended to support TURN. This is a lower priority.