WebRTC only works locally even after deploying to Heroku

2k Views Asked by At

WebRTC only works locally even after deploying to Heroku. I am using EasyRTC and their demo files from GitHub.

All works great in localhost. I also deployed the files using Heroku, which also worked great locally (in LAN, same Wifi). But when I tried it in WAN it did not work and started to give errors.

Please help on any ways to fix this or a suggestion for another deployment method or webrtc library.

1

There are 1 best solutions below

0
On BEST ANSWER

You will need a TURN server such as coturn. See https://testrtc.com/webrtc-api-trace/ in the description "Example #1 – My WebRTC app works locally but not on a different network!" for a description how to diagnose these problems. See also https://bloggeek.me/google-free-turn-server/ for why you need to run your own or pay for it.