I have made a very basic WebRTC based videoconferencing app and it works great when accessing from my own local network. Now the next step is to supply it with STUN/TURN servers so that it could be used publicly.
There are a lot of tutorials out there for how to setup WebRTC for local area teleconferencing, but barely any for when it comes to using STUN/TURN servers.
const iceConfiguration = {}
iceConfiguration.iceServers = [
{
urls: 'stun:stun1.l.google.com:19302'
},
{
urls: 'stun:stun3.l.google.com:19302'
},
{
urls: 'stun:stun4.l.google.com:19302'
}
];
// some stuff happens...
localConnection = new RTCPeerConnection(iceConfiguration);
so, this works locally, but when I tested this with some pals remotely it didn't work. It could be the case that they were all behind symmetric NATs, and that I would need to use a TURN server, but I hear that NAT configuration is somewhat rare so it seems likely that it would work with at least one person. Is this the right way to set STUN servers? I really could only find one tutorial on this, the most content online is about how to build your own TURN/STUN server and not how to use one...