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.
cordova-iosrtc
cordova-crosswalk
react-native-webrtc
wrtc
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!
Exactly the same as the specification. See the Specification Documentation!
Exactly the same as the specification. See the Specification Documentation!
Exactly the same as the specification. See the Specification Documentation!
Similar to the specification, but slightly adjusted to have an easier API.
constraints
is optional (makes things easier)
{video: true, audio: true}
cb
is a node-style error first callback
// these are the same thing
rtc.getUserMedia(function(err, stream){});
rtc.getUserMedia({video: true, audio: true}, function(err, stream){});
object
element
object
element will be returned