The WebRTC API
The next few sections will cover the WebRTC API currently implemented in the browser. These functions and objects allow developers to communicate with the WebRTC layer and make peer connections to other users. It consists of a few main pieces of technology:
- The
RTCPeerConnection
object - Signaling and negotiation
- Session Description Protocol (SDP)
- Interactive Connectivity Establishment (ICE)
The RTCPeerConnection object
The RTCPeerConnection
object is the main entry point to the WebRTC API. It is what allows us to initialize a connection, connect to peers, and attach media stream information. It handles the creation of a UDP connection with another user. It is time to get familiar with this name because you will be seeing it a lot throughout the rest of the book.
The job of the RTCPeerConnection
object is to maintain the session and state of a peer connection in the browser. It also handles the setup and creation of a peer connection. It encapsulates all of these things and exposes...