How the ICE decides whether to use STUN or TURN in order to find the public IP address of a device?

PressRex profile image
by PressRex
How the ICE decides whether to use STUN or TURN in order to find the public IP address of a device?

I am trying to establish connection between devices in WebRTC. The devices are behinf NAT, hence the public IP address has to be determined. I learnt that STUN is used to find the public IP of the device. But if STUN fails, then TURN server is used. I also learnt that ICE is the mechanism which handles this. I would like to know how ICE works? How it determines whether to use STUN or TURN? How does it determine failure of STUN and immediately switches to TURN?

Source: View source

PressRex profile image
by PressRex

Subscribe to New Posts

Lorem ultrices malesuada sapien amet pulvinar quis. Feugiat etiam ullamcorper pharetra vitae nibh enim vel.

Success! Now Check Your Email

To complete Subscribe, click the confirmation link in your inbox. If it doesn’t arrive within 3 minutes, check your spam folder.

Ok, Thanks

Read More