If a WebRTC client behind NAT cannot connect to other peer then it should use TURN server. How that client actually receives stream from TURN server?

EDIT: Need to add this question also.

Why turn server is needed if we run media server.

1 Answers

0
Philipp Hancke On Best Solutions

The TURN server has a public ip and opens up a port. This avoids NAT traversal and the only remaining issue are firewalls that block UDP -- for that, TURN can be used over TCP or TLS.

When using a media server, TURN might not be required. This blog post has some data supporting this argument but you might want to measure yourself. Note that not using a TURN server requires a number of things on the media server side such as running all sessions on a single port (443) and implementing ICE-TCP.