letswritecode
letswritecode copied to clipboard
won't connect when clients are not in the same network
simple-peer won't connect when clients are not in the same network
It works perfectly if both clients are in the same network (connected to the same modem/WiFi) but even after setting iceServers, the connection is not working
link to the sample html file: https://github.com/omidshakeri/simple-peer-videocall
this a simplified version, without any Server so you should copy textbox values to other device
URL for initaiator: https://omidtest.ir/VC/VideoCall.html#init
URL for other peer: https://omidtest.ir/VC/VideoCall.html
Steps:
- after a few seconds, "MyID" in initaiator peer page will be filled
- copy that to "ClinetID" textbox in other peer device and press "Connect"
- after a few seconds, "MyID" in other peer page will be filled
- copy that to "ClinetID" textbox in initaiator peer device and press "Connect"
TURN Server urls are from free plan of "metered.ca"