Sick of the incompatible mess of vendor prefixes, adapters, plugins, extensions, and native modules? rtc-everywhere gives you spec-compliant WebRTC in as many environments as possible, all with the same simple code.
npm install rtc-everywhere --save
var rtc = require('rtc-everywhere')();
// Available:
// rtc.RTCPeerConnection
// rtc.RTCIceCandidate
// rtc.RTCSessionDescription
// rtc.getUserMedia
// rtc.attachStream(stream, videoElement)
🔮 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
elementobject
element will be returnedVersion | Tag | Published |
---|---|---|
0.0.5 | latest | 7yrs ago |