Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What generates the ICE candidates on a local webRTC application with no STUN server specified?

Tags:

webrtc

stun

I wish to understand what generates the ICE candidates in a local webRTC application that does not use a STUN server.

like image 233
FlubberFlubs Avatar asked Apr 07 '19 21:04

FlubberFlubs


People also ask

How are ICE candidates generated?

ICE candidates. As well as exchanging information about the media (discussed above in Offer/Answer and SDP), peers must exchange information about the network connection. This is known as an ICE candidate and details the available methods the peer is able to communicate (directly or through a TURN server).

What are ICE candidates in WebRTC?

An ICE candidate describes the protocols and routing needed for WebRTC to be able to communicate with a remote device.

Can WebRTC work without STUN server?

As it turns out, we can use WebRTC enabled communication without having to set up a STUN/TURN or signaling server. As long as both peers are on an IPv6 network.

How does WebRTC ICE work?

Once the WebRTC Client has all the collected ICE addresses of itself and its peer, it starts initiating connectivity checks. These checks essentially try sending media over the various addresses until success. The downside of using ICE is the time it takes, which can be 10s of seconds.


1 Answers

Without a STUN server configured, the only candidates you might get from onicecandidate are host candidates, based on your system's IP address in its local network. The browser running on your system already knows this IP, and does not need ask a STUN server for it.

A STUN server is only needed to learn what IP addresses a system might be contactable on from outside a NAT. A STUN server acts as a mirror that sends back the IP it sees from packets sent through the NAT.

like image 70
jib Avatar answered Nov 15 '22 09:11

jib