Skip to content

Latest commit

 

History

History
57 lines (29 loc) · 3.48 KB

README.md

File metadata and controls

57 lines (29 loc) · 3.48 KB

WebRTC code samples

This is a repository for client-side HTML/CSS/JavaScript WebRTC code samples.

Many of the samples use new browser features. They may only work in Chrome Canary and/or Firefox Beta, and may require flags to be set.

All of the samples use adapter.js, a shim to insulate apps from spec changes and prefix differences. In fact, the standards and protocols used for WebRTC implementations are highly stable, and there are only a few prefixed names. For full interop information, see webrtc.org/interop.

NB: all samples that use getUserMedia() must be run from a server. Calling getUserMedia() from a file:// URL will result in a PermissionDeniedError NavigatorUserMediaError. See What are some chromium command-line flags relevant to WebRTC development/testing? for relevant flags.

For more information about WebRTC, we maintain a list of WebRTC Resources. If you've never worked with WebRTC, we recommend you start with the 2013 Google I/O WebRTC presentation.

Patches and issues welcome!

The demos

getUserMedia()

getUserMedia() + Canvas

getUserMedia() + Canvas + CSS Filters

getUserMedia() with resolution constraints

getUserMedia() with camera/mic selection

Audio-only getUserMedia() output to local audio element

Audio-only getUserMedia() displaying volume

Data channels

Peer connection

Audio-only peer connection

Multiple peer connections

Multiple relay

Munge SDP

ICE candidate gathering

Accept incoming peer connection

Peer connection states

Web Audio output as input to peer connection

Adjust constraints, view stats

Display createOffer output

DTMF

Face tracking