Peer-to-peer communications with WebRTC

Jump to:

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The WebRTC APIs are designed to allow JS applications to create real-time connections with Audio, Video, and/or Data channels directly between users via their browsers, or to servers supporting the WebRTC protocols.  It also leverages navigator.mozGetUserMedia() to get access to mic and camera data (getUserMedia() is being standardized in the Media Capture Task force, along with Recording APIs).

The primary sources for the evolving specifications for WebRTC are the W3's WebRTC and getUserMedia specs, and the various drafts at the IETF, mostly in the rtcweb working group, but also mmusic, rmcat and a few others.  Much of the implementation in Chrome and Firefox is based on code open-sourced by Google at webrtc.org.

Note: Current versions of FlashBlock may default to blocking HTML5 <video> widgets; if so tell it to allow content on the page, or disable the setting via Tools/Add-ons.

A good tutorial on basic features in WebRTC is at HTML5 Rocks.   A collection of basic test pages to support development are at webrtc-landing.

You can make simple person-to-person calls (including to people using Chrome) at apprtc.appspot.com.

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

Basics of RTCPeerConnection call setup

Specifications

Specification Status Comment
Media Capture and Streams Candidate Recommendation Definition of the getUserMedia API
WebRTC 1.0: Real-time Communication Between Browsers Candidate Recommendation Initial definition

Document Tags and Contributors

Contributors to this page: fscholz, teoli, Sebastianz, Jeremie, Laurentj, jesup
Last updated by: fscholz,