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

Webcam example without Internet connection #524

Closed
kueblert opened this issue Apr 15, 2021 · 11 comments
Closed

Webcam example without Internet connection #524

kueblert opened this issue Apr 15, 2021 · 11 comments
Labels
stale There has been no recent activity

Comments

@kueblert
Copy link

Hi,
the webcam example does not seem to work when there is no internet connection.
I am accessing the stream via http://127.0.0.1:8080 (0.0.0.0 didn't work for me on Windows),
There seems to be an issue with getting the ice candidates (none are found by the javascript client). The moment I plug in the internet connection, everything works nicely. I am nut using the STUN server.

Any guesses why this might be the case?

Best,
Thomas

@HenryWInfinity
Copy link

Have you solved the problem?

@HenryWInfinity
Copy link

i met it too.

@kueblert
Copy link
Author

kueblert commented Apr 20, 2021

Nope. No clue what's wrong with it.
I ended up switching to a gstreamer pipeline that handles the WebRTC. But compared to this library it's quite a messy piece of code that is necessary to call it from python in windows.

@HenryWInfinity
Copy link

image
it still use an online stun server in rtcicetransport.py.
is there a method that i can do webrtc offline without a stun server?

@kueblert
Copy link
Author

Removing the default does not have an effect. Still working with internet, not working without.

@filsav
Copy link

filsav commented Jun 25, 2021

I have same issue. All works as expected when serving from 127.0.0.1:8000 with internet connection. Without internet connection it got stuck with Peer connection (iceConnectionState) = "checking". Author, please help! How to run aiortc server on localhost while offline?

@jlaine
Copy link
Collaborator

jlaine commented Jun 30, 2021

What browser are you using?

For the connection to work you're going to need one of the following conditions to be met:

@kueblert
Copy link
Author

kueblert commented Jul 1, 2021

I have tried with Chrome and Edge.

@nicarl
Copy link

nicarl commented Sep 22, 2021

I encountered a similar problem with local/offline connections on the same network not getting established.
I was able to solve it by the following things:

  • use Chrome (the mentioned Firefox bug seems to be a problem)
  • open the peer connection with pc = RTCPeerConnection( configuration=RTCConfiguration(iceServers=[]) )
  • the second part of the connection was established using javascript and it was also important to use const pc = new RTCPeerConnection({ iceServers: [] });
  • be aware that docker containers run in an isolated network and this can also lead to problems

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale There has been no recent activity label Mar 14, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale There has been no recent activity
Projects
None yet
Development

No branches or pull requests

5 participants