pdcarroll / react-kinesis-webrtc

An experimental library of React hooks for the AWS Kinesis WebRTC JavaScript SDK.
ISC License
13 stars 7 forks source link

P2P Connection cannot be established for devices in different networks #20

Open WyeK opened 1 year ago

WyeK commented 1 year ago

Hi @pdcarroll, I am a student attempting to create a video chat application and your repo was a big help for a beginner in WebRTC like me.

I was able to set up an elastic beanstalk web application on https and it works. However it only works when both devices are connected to the same network.

When the 2nd device on a separate network (my phone on mobile data), connects as a viewer, the master receives the sdp offer, peer track, and ice candidates. However, the ice connection state does not change and the media stream does not show.

When Connecting from same network: working

Connecting from different network: not working

I followed the code as showed in your documentation.

Do you have any idea what the issue might be?

pdcarroll commented 1 year ago

Hi @WyeK. I have not seen this issue previously, but will attempt to reproduce...

WyeK commented 1 year ago

Hello @pdcarroll, after switching my browser from Chrome to Firefox, the ice connection state was able to change.

However, the ice connection state failed.

After checking the logs of webrtc in the browser, all trickled candidates for the viewer failed. image

Do you know what the problem could be?