Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call connection issue when peers are outside the local network #41

Open
Vovanella95 opened this issue Jan 3, 2024 · 12 comments
Open

Call connection issue when peers are outside the local network #41

Vovanella95 opened this issue Jan 3, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@Vovanella95
Copy link

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:

  1. Fix this issue #40
  2. Run Android application on 2 devices (let's say A and B)
  3. A and B are in different networks
  4. 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
@Vovanella95 Vovanella95 added the bug Something isn't working label Jan 3, 2024
@Petar-CV
Copy link

Petar-CV commented Jan 8, 2024

Hello 👋

Any updates on this?

@hedihadi
Copy link

please we need this!!

@Vovanella95
Copy link
Author

Me too :D

@TetrixGauss
Copy link

hello guys! Any update on this??

@TetrixGauss
Copy link

what is going on with the developer of this package????

@TetrixGauss
Copy link

@MuhammedKpln ??????

@Vovanella95
Copy link
Author

@MuhammedKpln let it go
let it go
can't hold it back any more )))))

It's a joke, I'm also waiting for updates))

@TetrixGauss
Copy link

@Vovanella95 have you found any workaround for the connection with different networks? because in the same network it plays like a charm.

@Vovanella95
Copy link
Author

@TetrixGauss unfortunately, no :(

@TetrixGauss
Copy link

@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

@KamalPixi
Copy link

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"}
      ]
    }),
  )

@TetrixGauss
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants