WebRTC

Real-time communication for the web

With WebRTC, you can add real-time communication capabilities to your application that works on top of an open standard. It supports video, voice, and generic data to be sent between peers, allowing developers to build powerful voice- and video-communication solutions. The technology is available on all modern browsers as well as on native clients for all major platforms. The technologies behind WebRTC are implemented as an open web standard and available as regular JavaScript APIs in all major browsers. For native clients, like Android and iOS applications, a library is available that provides the same functionality. The WebRTC project is open-source and supported by Apple, Google, Microsoft and Mozilla, amongst others. This page is maintained by the Google WebRTC team.
This is a collection of small samples demonstrating various parts of the WebRTC APIs. The code for all samples are available in the GitHub repository.

Most of the samples use adapter.js, a shim to insulate apps from spec changes and prefix differences.
https://webrtc.org/getting-started/testing lists command line flags useful for development and testing with Chrome.
Patches and issues welcome! See CONTRIBUTING.md for instructions.

Warning: It is highly recommended to use headphones when testing these samples, as it will otherwise risk loud audio feedback on your system.

getUserMedia():

Access media devices

Devices:

Query media devices

Stream capture:

Stream from canvas or video elements

RTCPeerConnection:

Controlling peer connectivity

RTCDataChannel:

Send arbitrary data over peer connections


Video chat:

Full featured WebRTC application

Insertable Streams:

API for processing media

    (Experimental)
    (Experimental)
    (Experimental)
    (Experimental)
A WebRTC application will usually go through a common application flow. Accessing the media devices, opening peer connections, discovering peers, and start streaming. We recommend that new developers read through our introduction to WebRTC before they start developing.

Getting started with WebRTC

Creating a new application based on the WebRTC technologies can be overwhelming if you're unfamiliar with the APIs. In this section we will show how to get started with the various APIs in the WebRTC standard, by explaining a number of common use cases and code snippets for solving those.

WebRTC APIs


The WebRTC standard covers, on a high level, two different technologies: media capture devices and peer-to-peer connectivity.

Media capture devices includes video cameras and microphones, but also screen capturing "devices". For cameras and microphones, we use navigator.mediaDevices.getUserMedia() to capture MediaStreams. For screen recording, we use navigator.mediaDevices.getDisplayMedia() instead.

The peer-to-peer connectivity is handled by the RTCPeerConnection interface. This is the central point for establishing and controlling the connection between two peers in WebRTC.

Leave a Reply

Your email address will not be published. Required fields are marked *