simple-webrtc
A simple WebRTC and MediaRecorder wrapper.
Installation
npm install --save simple-webrtc
Usage
Initialization
var SimpleWebRtc = require('simple-webrtc');
var webRtc = SimpleWebRtc(rtcConfiguration, mediaConstraints);
Checking if the browser supports getUserMedia
console.log(webRtc.hasUserMedia);
// true or false, depending on wether
// the browser supports any form of getUserMedia
Checking if the browser supports MediaRecorder
console.log(webRtc.hasMediaRecorder);
// true or false, depending on wether
// the browser supports MediaRecorder
Creating a peer connection
var connection = webRtc.createConnection();
Creating a media recorder
var recorder = webRtc.createRecorder(constraints);