O'Reilly logo

WebRTC Blueprints by Andrii Sergiienko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the TURN authentication

From Chapter 1, Developing a WebRTC Application, you know that we used such a construction to get a new peer connection object:

var pc = RTCPeerConnection(pc_config, pc_constraints);

The pc_config parameter in the preceding code is a set of configuration options that we want to use while creating the peer connection object.

In the previous chapter, we used only the STUN technology, and usually, pc_config was something similar to the following:

var pc_config = {"iceServers":
       [{url:'stun:23.21.150.121'},
        {url:'stun:stun.l.google.com:19302'}]};

Here, you can see the two URLs of the ICE servers (we also discussed the ICE framework in Chapter 1, Developing a WebRTC Application), and they are both STUN servers.

In the same way, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required