In WebRTC, I can establish a connection on my own computer, but I cannot connect over external networks

81 Views Asked by At

https://github.com/chillyen/Funny-cat/blob/main/src/components/ChatInterface.svelte
In the ChatInterface.svelte file below, I have confirmed that my STUN and TURN servers can connect. However, in my tests, when I open Chrome and Edge on my computer and pair two users, they can connect to each other. I suspect that they might be using an internal network and not actually connecting through the TURN server. But when I try with a mobile phone and a computer, two different devices, they are unable to detect each other joining the same room server. Connections can be established in different browsers or on different devices.

1

There are 1 best solutions below

0
AAVISHKAR KOLTE On

I think the STUN server you are using is not working. I checked your STUN server URI using the Trickle ICE web page, and I can't see any entry with type srflx.

Try this STUN server URI: "stun:stun1.l.google.com:19302"

Or you can use any STUN server from this list: https://gist.github.com/zziuni/3741933

Before using any URI, use Trickle ICE to check whether it is working properly Link: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/