Home

Awesome

rtc-everywhere NPM version Downloads Build Status

<img src="https://i.imgur.com/xDnqJCo.gif" align="center"/>

What is this?

Sick of the incompatible mess of vendor prefixes, adapters, plugins, extensions, and native modules? rtc-everywhere aims to provide a spec-compliant WebRTC implementation in as many environments as possible.

Supported Environments

:computer: Desktop

:iphone: Mobile

Other

Getting Started

npm install rtc-everywhere --save
var rtc = require('rtc-everywhere')();

// Available:
// rtc.RTCPeerConnection
// rtc.RTCIceCandidate
// rtc.RTCSessionDescription
// rtc.getUserMedia
// rtc.attachStream(stream, videoElement)

:crystal_ball: Want a more detailed example that uses these functions? Check out the loopback stream example!

API

RTCPeerConnection

Exactly the same as the specification. See the Specification Documentation!

RTCIceCandidate

Exactly the same as the specification. See the Specification Documentation!

RTCSessionDescription

Exactly the same as the specification. See the Specification Documentation!

getUserMedia(constraints, cb)

Similar to the specification, but slightly adjusted to have an easier API.

Modifications
// these are the same thing
rtc.getUserMedia(function(err, stream){});
rtc.getUserMedia({video: true, audio: true}, function(err, stream){});

attachStream(stream, element)

Related Libraries