Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

lib/user-media.js

12

lib/connection.js
var events = require('events');
var IceCandidate = require('./webrtc/ice-candidate');
var PeerConnection = require('./webrtc/peer-connection');
var SessionDescription = require('./webrtc/session-description');
var EventEmitter = events.EventEmitter;

@@ -11,3 +7,3 @@

var connection = new EventEmitter();
var peerConnection = new PeerConnection(config);
var peerConnection = new window.RTCPeerConnection(config);
var localStream = null;

@@ -64,3 +60,3 @@ var remoteStream = null;

return new Promise(function(resolve, reject) {
var sessionDescription = new SessionDescription(offer);
var sessionDescription = new window.RTCSessionDescription(offer);
peerConnection.setRemoteDescription(sessionDescription, resolve, reject);

@@ -71,3 +67,3 @@ });

function addIceCandidate(candidate) {
peerConnection.addIceCandidate(new IceCandidate(candidate));
peerConnection.addIceCandidate(new window.RTCIceCandidate(candidate));
}

@@ -108,3 +104,3 @@

return new Promise(function(resolve, reject) {
var sessionDescription = new SessionDescription(sdp);
var sessionDescription = new window.RTCSessionDescription(sdp);
var onSuccess = resolve.bind(null, sdp);

@@ -111,0 +107,0 @@ peerConnection.setLocalDescription(sessionDescription, onSuccess, reject);

var events = require('events');
var webRtcAdapter = require('webrtc-adapter');
var Connection = require('./connection');
var Recorder = require('./recorder');
var UserMedia = require('./webrtc/user-media');
var UserMedia = require('./user-media');

@@ -7,0 +8,0 @@ var EventEmitter = events.EventEmitter;

{
"name": "simple-webrtc",
"version": "1.0.2",
"version": "2.0.0",
"description": "A simple WebRTC and MediaRecorder wrapper.",
"main": "lib/index.js",
"scripts": {
"test": "mocha --recursive -R spec"
},

@@ -26,3 +25,6 @@ "repository": {

"mocha": "^2.5.3"
},
"dependencies": {
"webrtc-adapter": "^1.3.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc