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

Streaming won't start when offline (server on local network) #26

Open
rija1 opened this issue Apr 14, 2023 · 7 comments
Open

Streaming won't start when offline (server on local network) #26

rija1 opened this issue Apr 14, 2023 · 7 comments

Comments

@rija1
Copy link

rija1 commented Apr 14, 2023

I've set up the solution on a local network that may be disconnected from the internet at times.

When offline, the "iceConnectionState" never becomes "connected" but remains at the "new" stage.
When online, it works fine and the audio stream plays without issues.

I am wondering why WebRTC seems to require an internet connection when both the client and server are running locally.

Any ideas or workaround to avoid this?

Thank you

@JoJoBond
Copy link
Owner

Can you describe your setup?
I personally have 3LAS running in a wifi network without Internet and it works just fine.

@rija1
Copy link
Author

rija1 commented Apr 14, 2023

Oh right it must come from my setup then indeed. It stops working as soon as I turn off the wifi in my case.

I am using these settings :
"RtcConfig": null,
"FallbackFFmpegPath": "/usr/local/bin/ffmpeg",
"FallbackUseMp3": true,
"FallbackUseWav": true,
"FallbackMp3Bitrate": 128,
"FallbackWavSampleRate": 16000,

The server and client nodes both run on my mac on ports 3000 and 3001.
I see the same issue with both Google Chrome and Firefox.

Also I modified the script to include four players on the same page (four language channels) so it may come from this. However it works perfectly fine as soon as I am connected to the internet that's why it keeps me wondering (but I can't see anything trying to connect to the internet in my developer tools' Network tab).

@JoJoBond
Copy link
Owner

Can you reduce your setup to a single player for now?
Since I never tested running the server on MacOS, there is a possibility that this is some kind of Apple shenanigan.
So, if possible, could you try running it in a true Linux environment? A VM would probably do just fine for testing.

@rija1
Copy link
Author

rija1 commented Apr 15, 2023 via email

@rija1
Copy link
Author

rija1 commented Apr 15, 2023

I just tested this again with a fresh install of the project and get the same results.
So it seems that it is not related to the OS nor to the customisations I've made.

@JoJoBond can you definitely launch a stream when your wifi is totally off and the ethernet cable unplugged ?

One thing I didn't mention is that the event log doesn't show any error, it just won't start playing :

[20:22:50] Init of WebSocketClient succeeded
[20:22:50] Trying to connect to server.
[20:22:50] Established connection with server.

@JoJoBond
Copy link
Owner

@JoJoBond can you definitely launch a stream when your wifi is totally off and the ethernet cable unplugged ?

I tested following scenarios:

Local test with 127.0.0.1 IP. Ethernet with internet is connected.
Ethernet that is connected to a Wifi AP with 192.168.0.X/24 IP. No internet connection.

Both do work.

@rija1
Copy link
Author

rija1 commented Apr 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants