Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • WebRTC Blueprints
  • Toc
  • feedback
WebRTC Blueprints

WebRTC Blueprints

By : Andrii Sergiienko
4.2 (9)
close
WebRTC Blueprints

WebRTC Blueprints

4.2 (9)
By: Andrii Sergiienko

Overview of this book

Table of Contents (13 chapters)
close
WebRTC Blueprints
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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, we can refer to a TURN server as follows:

{
  'iceServers': [
    {
      'url': 'stun:stun.l.google.com:19302'
    },
    {
      'url': 'turn:turn1.myserver.com:12345?transport=udp',
      'credential': 'UGJKBJHVYT',
      'username...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete