When talking about WebRTC, we immediately think about making a video conference call. There are two steps to start a call. First, WebKit needs access to the user’s camera and microphone. HTTPS websites use the Media Capture and Streams API on Safari for that purpose. Once the user grants permission through a prompt, capture streams start to flow. These streams can be tailored to websites’ needs through the use of constraints.
Second, the user joins the conversation, once he checks to make sure his hair looks good on-screen. Websites send these capture streams to the other participants. The user obviously wants to see the other participants’ coifs as well, so this is where the WebRTC API kicks in. WebKit finds and creates the optimal network channel to connect those streams.
To handle the networking layer, WebKit chose the LibWebRTC open source framework. LibWebRTC provides both a high level of interoperability and a rich set of streaming features for efficient video conferencing.