4 ms·
I was playing around to create something similar and these problems were EXACTLY what I bumped into. STUN is a must for discovery, TURN is a must if both people
by jitbit 6y ago
I was playing around to create something similar and these problems were EXACTLY what I bumped into. STUN is a must for discovery, TURN is a must if both people are behind NATs, Apple support is meh...
So, to sum up, for a webRTC p2p app you need to:
1-3) The things you mentioned.
4) Code your own signaling server to transmit events like "call", "hung up", "room" tracking, etc.
- MayeulC 6y ago> TURN is a must if both people are behind NATs This is not what double NAT means. If both people are behind single NAT, STUN is enough. I think it is also enough if one person (or both) are behind more than one regular NAT, which is what double-nat usually means. Where STUN doesn't work is symmetric NAT [1], where different destination servers will receive a packet with different source ports, even if the original source port was the same. It also doesn't work in a few, lesser-used NAT types [2]. [1] https://en.wikipedia.org/wiki/Network_address_translation#Symmetric_NAT https://en.wikipedia.org/wiki/Network_address_translation#Sy... [2] https://en.wikipedia.org/wiki/STUN#Limitations https://en.wikipedia.org/wiki/STUN#Limitations