diegogurgel / react-webrtc

Video chat using webRTC and react
https://react-webrtc-example.herokuapp.com
260 stars 75 forks source link

Not connecting clients from different networks #9

Closed diegogurgel closed 4 years ago

diegogurgel commented 4 years ago

@diegogurgel I am having issue in video chat. When two clients connected to same network, it working fine. But having issue on connecting with different client. I am running you example code. Anything extra configuration I need to do

Originally posted by @donny08 in https://github.com/diegogurgel/react-webrtc/issues/7#issuecomment-609437849

diegogurgel commented 4 years ago

Can you tell me where you are running it?

AwolDes commented 4 years ago

~From a quick look around, it looks like a STUN and/or TURN server need to be configured: https://stackoverflow.com/questions/43992334/why-my-webrtc-connection-works-only-at-local-network~ I can see this is already configured in simple-peer.js.

I noticed the demo won't work with separate networks either, so I'm guessing this is the missing piece of the puzzle. Maybe this is a configuration issue in the service hosting the TURN server?

diegogurgel commented 4 years ago

Yes, it can be. I'll be investigating this during this week. Last week it was possible to do a call Poland-Korea. Something stopped working or got updated. I also considering that I am using free stun and turn servers and right now the use of those servers have increased

diegogurgel commented 4 years ago

I'm noticing the same problem with other webrtc demos out there.

donny08 commented 4 years ago

Can you tell me where you are running it?

I'm running on heroku

diegogurgel commented 4 years ago

Can you tell me where you are running it?

I'm running on heroku

Yes I'm having the same problem but I think that is something related to turn and stun server not with the application itself. I also asked about that on simple-peer repository because I saw that other applications are having the same problem.

diegogurgel commented 4 years ago

I was able to solve it by testing my stun and turn servers here https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ in my case, I was getting unauthorized. I just created a new turn user 😅

I deployed the updated version check it out https://react-webrtc-build.dgurgel.now.sh