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

ICE failing #2

Open
sbeczkiewicz opened this issue Mar 19, 2021 · 2 comments
Open

ICE failing #2

sbeczkiewicz opened this issue Mar 19, 2021 · 2 comments

Comments

@sbeczkiewicz
Copy link

Hello!
I tried this project out to see if I could code a version myself to get some practice with WebRTC. I completed the project but I ran into the problem where ICE fails when I try to connect the remote video. I tried recreate the problem by cloning, and working with, this repository and the same thing happens. With this repository, when trying to connect to with a remote user, Firebase updates with call info and candidates but I keep getting an error in the console saying "WebRTC: ICE failed, add a TURN server and see about:webrtc for more details" and the remote video fails to show up. I didn't think a TURN server was required to get the basic functionality working so any advice would be appreciated to help me get this working.

@sbeczkiewicz sbeczkiewicz changed the title ICE fails even trying with different networks ICE failing Mar 19, 2021
@SanjeevKumarPandey
Copy link

Is your implementation working when you 1) Run it locally and use two tabs of same browser to test? and 2) Run locally and test on two different devices?

Local tests (within your own network where each device is set to be discoverable by others sharing the same network) would not need TURN server however remote tests with devices in different network will.

@SanjeevKumarPandey
Copy link

SanjeevKumarPandey commented May 18, 2021

If you're using this starter code, for your local test you could do something like:

const servers = null;
// Create peer connection 
const pc = new RTCPeerConnection(servers);
// Can add your own handler/logger for when icecandidate is available
pc.addEventListener('icecandidate', myhandleConnectionFunc);

For remote testing, you can use Google's servers:

const servers = {
  iceServers: [
    {
      urls: ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302'],
    },
  ],
  iceCandidatePoolSize: 10,
};

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