Peer-to-peer communications with WebRTC

The WebRTC API is designed to allow JavaScript applications to create real-time connections containing audio and video streams as well as data channels for arbitrary data. These connections are created to directly link two users' browsers, without necessarily requiring any intermediary servers which support the WebRTC protocols. WebRTC also leverages the getUserMedia() method to get access to microphone and camera data. In this article, we'll take a look at how peer-to-peer connections are created and managed using WebRTC and its RTCPeerConnection interface.

A high-level description of what happens in an RTCPeerConnection was shown in an Hacks article (see all WebRTC Hacks articles here):

Simple pictograph describing the basics of RTCPeerConnection call setup

Resources

Specifications

Specification
Media Capture and Streams
WebRTC 1.0: Real-Time Communication Between Browsers