Socket
Socket
Sign inDemoInstall

webrtc

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

6

package.json
{
"name": "webrtc",
"version": "0.5.0",
"version": "0.5.1",
"keywords": ["webrtc", "browser"],

@@ -12,5 +12,5 @@ "repository": {

"dependencies": {
"webrtcsupport": "0.4.1",
"webrtcsupport": "0.5.0",
"wildemitter": "0.0.5",
"rtcpeerconnection": "0.2.0",
"rtcpeerconnection": "0.3.1",
"getusermedia": "0.2.1",

@@ -17,0 +17,0 @@ "hark": "0.1.1",

@@ -359,2 +359,3 @@ (function(e){if("function"==typeof bootstrap)bootstrap("webrtc",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeWebRTC=e}else"undefined"!=typeof window?window.WebRTC=e():global.WebRTC=e()})(function(){var define,ses,bootstrap,module,exports;

}();
var MediaStream = window.webkitMediaStream || window.MediaStream;
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;

@@ -369,2 +370,3 @@ var AudioContext = window.webkitAudioContext || window.AudioContext;

webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
screenSharing: screenSharing,

@@ -603,3 +605,3 @@ AudioContext: AudioContext,

var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var webAudio = !!window.webkitAudioContext;
var AudioContext = window.webkitAudioContext || window.AudioContext;

@@ -611,4 +613,5 @@ // export support flags and constructors.prototype && PC

prefix: prefix,
webAudio: webAudio,
webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
screenSharing: screenSharing,
AudioContext: AudioContext,
PeerConnection: PC,

@@ -705,7 +708,7 @@ SessionDescription: SessionDescription,

PeerConnection.prototype.answerVideoOnly = function (offer, cb) {
PeerConnection.prototype.answerBroadcastOnly = function (offer, cb) {
var mediaConstraints = {
mandatory: {
OfferToReceiveAudio: false,
OfferToReceiveVideo: true
OfferToReceiveVideo: false
}

@@ -758,50 +761,3 @@ };

},{"webrtcsupport":9,"wildemitter":5}],7:[function(require,module,exports){
var support = require('webrtcsupport');
function GainController(stream) {
this.support = support.webAudio;
// set our starting value
this.gain = 1;
if (this.support) {
var context = this.context = new support.AudioContext();
this.microphone = context.createMediaStreamSource(stream);
this.gainFilter = context.createGain();
this.destination = context.createMediaStreamDestination();
this.outputStream = this.destination.stream;
this.microphone.connect(this.gainFilter);
this.gainFilter.connect(this.destination);
stream.removeTrack(stream.getAudioTracks()[0]);
stream.addTrack(this.outputStream.getAudioTracks()[0]);
}
this.stream = stream;
}
// setting
GainController.prototype.setGain = function (val) {
// check for support
if (!this.support) return;
this.gainFilter.gain.value = val;
this.gain = val;
};
GainController.prototype.getGain = function () {
return this.gain;
};
GainController.prototype.off = function () {
return this.setGain(0);
};
GainController.prototype.on = function () {
this.setGain(1);
};
module.exports = GainController;
},{"webrtcsupport":2}],6:[function(require,module,exports){
},{"webrtcsupport":9,"wildemitter":5}],6:[function(require,module,exports){
var WildEmitter = require('wildemitter');

@@ -899,4 +855,51 @@

},{"wildemitter":5}]},{},[1])(1)
},{"wildemitter":5}],7:[function(require,module,exports){
var support = require('webrtcsupport');
function GainController(stream) {
this.support = support.webAudio;
// set our starting value
this.gain = 1;
if (this.support) {
var context = this.context = new support.AudioContext();
this.microphone = context.createMediaStreamSource(stream);
this.gainFilter = context.createGain();
this.destination = context.createMediaStreamDestination();
this.outputStream = this.destination.stream;
this.microphone.connect(this.gainFilter);
this.gainFilter.connect(this.destination);
stream.removeTrack(stream.getAudioTracks()[0]);
stream.addTrack(this.outputStream.getAudioTracks()[0]);
}
this.stream = stream;
}
// setting
GainController.prototype.setGain = function (val) {
// check for support
if (!this.support) return;
this.gainFilter.gain.value = val;
this.gain = val;
};
GainController.prototype.getGain = function () {
return this.gain;
};
GainController.prototype.off = function () {
return this.setGain(0);
};
GainController.prototype.on = function () {
this.setGain(1);
};
module.exports = GainController;
},{"webrtcsupport":2}]},{},[1])(1)
});
;
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