peerdart
peerdart copied to clipboard
Call connection issue when peers are outside the local network
Hi developers! First of all want to say great thanks for your plugin! But I can not use it at this moment because of next issue:
Describe the bug
1Android -> Android connection can not be established in different Wifi networks. Let's say we have device A and device B. When I'm trying to connect device A to device B, I have Suspended
state on device A, and Connected
state on device B. Messages between devices are not working.
To Reproduce Steps to reproduce the behavior:
- Fix this issue #40
- Run Android application on 2 devices (let's say A and B)
- A and B are in different networks
- A tries to connect to B
Expected behavior A is successfully connected to B
Actual behavior
Device A has Suspended
status. Device B has Connected
status. There are not possible to sent any messages
Smartphone (please complete the following information):
- Android emulator
- Samsung galaxy S20
- Samsung galaxy Tab 7
Hello :wave:
Any updates on this?
please we need this!!
Me too :D
hello guys! Any update on this??
what is going on with the developer of this package????
@MuhammedKpln ??????
@MuhammedKpln let it go let it go can't hold it back any more )))))
It's a joke, I'm also waiting for updates))
@Vovanella95 have you found any workaround for the connection with different networks? because in the same network it plays like a charm.
@TetrixGauss unfortunately, no :(
@Vovanella95 have you checked maybe the peerjs server code ? because what i have seen is that both my clients are connected even though they are in different networks but the mediadata are not streaming
To make this works, you'll need turn server(ex: Coturn)
Minimul Coturn Conf.
external-ip=<Your_Public_IP_Address>
listening-ip=0.0.0.0
listening-port=3478
min-port=49152
max-port=65535
fingerprint
lt-cred-mech
user=username:password
realm=myrealm
log-file=/var/log/coturn.log
Then create your peer connection like this below.
Peer(
id: 'yourid-${Random().nextInt(100).toString()}', // or remove this line for auto gen. id
options: PeerOptions(debug: LogLevel.All, config: {
"iceServers": [
{"urls": "stun:YOUR-SERVER-IP:3478", "username": "USERNAME-HERE", "credential": "PASSWORD-HERE"},
{"urls": "turn:YOUR-SERVER-IP:3478", "username": "USERNAME-HERE", "credential": "PASSWORD-HERE"}
]
}),
)
Yes! I was about to answer almost the same thing! the problem with the connection is that we need dedicated turn server and not public! Turn servers are responsible for mediaData transfers! so we need the stun server for the whole connection thing but we need the turn servers as well for the media data connection!