🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

simple-webrtc

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-webrtc

A simple WebRTC and MediaRecorder wrapper.

1.0.2
Source
npm
Version published
Maintainers
1
Created
Source

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);

Keywords

webrtc

FAQs

Package last updated on 02 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts