peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Works only for same network

Open Eternal-Rise opened this issue 1 year ago • 7 comments

I thought, that maybe I have some problem in my code. I have tried different free STUN/TURN servers, but still - not working when try to connect with different networks. Locally - perfect, different networks - messaging via socket works fine, but then just iceConnectionState changed to disconnected on the connection with <id>

I have tried examples (https://peerjs.com/examples) and it's not working too for me. Again, locally - fine, different networks - not working.

Eternal-Rise avatar Feb 01 '24 20:02 Eternal-Rise

same for me

strukturart avatar Feb 02 '24 10:02 strukturart

Probably, this the main issue. https://github.com/orgs/peers/discussions/1172 Works fine with TURN by https://www.metered.ca/tools/openrelay/

Eternal-Rise avatar Feb 04 '24 13:02 Eternal-Rise

@Eternal-Rise Can you please show me your working example, unfortunately it doesn't work for me: https://github.com/strukturart/watermelon

strukturart avatar Feb 04 '24 17:02 strukturart

@strukturart , https://github.com/Eternal-Rise/p2p-cinema/blob/master/src/stores/peer.js#L76-L81, https://eternal-rise.github.io/p2p-cinema

Your code looks fine, should work. (In part of connection)

Eternal-Rise avatar Feb 04 '24 19:02 Eternal-Rise

I haven't had any success yet, maybe it's because the KaiOS browser isn't up to date

strukturart avatar Feb 06 '24 21:02 strukturart

@Eternal-Rise many thanks. your solution works for me. Metered offers 5 ice servers for free plan. upto (500MB)

Ravindu007 avatar May 16 '24 06:05 Ravindu007