videosdk-live / webrtc

WebRTC means Web Real Time Communication. Free WebRTC Demos and Examples.
https://github.com/videosdk-live/webrtc
78 stars 42 forks source link

Wifi and Mobile data | Not Connection #15

Open bilalbaz1 opened 4 months ago

bilalbaz1 commented 4 months ago

I'm running it across different internet connections. I set up a TURN server. It does not work on some internet connections. It usually doesn't work between wifi and mobile data. Has anyone encountered this problem? I've been searching for days but I couldn't find a solution.

(Not device related. My internet connection speed is not slow.)

IMG_ok IMG_no

harithm918 commented 4 months ago

yes. I'm also facing this issue. any solution?

bilalbaz1 commented 4 months ago

yes. I'm also facing this issue. any solution?

No. I couldn't find any solution. I also tried it on packages like peerdart [https://pub.dev/packages/peerdart]. The same problem occurs in many cases. It works on some internet connections. It doesn't work on some.

D/FlutterWebRTCPlugin(19001): onConnectionChangeCONNECTING D/FlutterWebRTCPlugin(19001): onConnectionChangeFAILED

justbendev commented 2 weeks ago

You need to do some reading on how WebRTC works. Its actually really interesting. In your specific case you couldn't do NAT Hole Punching Basically create a port forwarding by exploiting firewall state tables

This demo is using Google Public STUN Servers to help with that as defined in the iceServers list. If it fails you need a 3rd party server running a TURN to relay packets between your clients. Basically a last resort backup when direct P2P fails

In this demo its located at lib/screens/call_screen.dart line:62