I have a flutter app deployed on web that uses PeerDart (which copies the implementation from PeerJs). I tested video calls from a mobile device to a web browser using different wifi connections and everything works so far. The problem is that when I switch from wifi to data on my mobile device the video is never streamed, I can get the stream locally and show it on the screen and the connection between peers is established but no video or data is sent and the peer gets disconnected after a few seconds.
This only happens when using mobile data, with wifi it works perfectly fine.
I thought it may be a problem with my Android permissions, this are the internet permissions I currently have on the app:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Does anyone know how to solve this problem so the video calls work on both wifi and data networks?
This problem persists when testing both the mobile browser version and the application installed on the device.
Edit: Here are the logs from the browser side of the app:
PeerDart: Added ICE candidate for:4c84a3da-85f1-4bb9-8b49-36578768a1a2
2main.dart.js:21693 PeerDart: Received ICE candidates for 4c84a3da-85f1-4bb9-8b49-36578768a1a2: Instance of 'minified:oa'
main.dart.js:21693 PeerDart: iceConnectionState changed to disconnected on the connection with 4c84a3da-85f1-4bb9-8b49-36578768a1a2
main.dart.js:21693 PeerDart: Cleaning up PeerConnection to 4c84a3da-85f1-4bb9-8b49-36578768a1a2
main.dart.js:21693 PeerDart: iceConnectionState changed to disconnected on the connection with 4c84a3da-85f1-4bb9-8b49-36578768a1a2
main.dart.js:21693 PeerDart: Cleaning up PeerConnection to 4c84a3da-85f1-4bb9-8b49-36578768a1a2
I am using the default configuration for my peers.
Edit #2: When calling from the mobile device again after the first failed connection the video stream works correctly, why is this not the case on the first try?
from PeerDart disconnects when using mobile data
No comments:
Post a Comment