Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mediastream-gain

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

mediastream-gain - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

26

mediastream-gain.bundle.js

@@ -29,11 +29,3 @@ (function(e){if("function"==typeof bootstrap)bootstrap("mediastreamgaincontroller",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.makeMediaStreamGainController=e}else"undefined"!=typeof window?window.MediaStreamGainController=e():global.MediaStreamGainController=e()})(function(){var define,ses,bootstrap,module,exports;

// check for support
if (!this.support) {
// if we're being asked to set to
// 0 we can still disable it.
if (val === 0) {
return this.off();
} else {
return;
}
}
if (!this.support) return;
this.gainFilter.gain.value = val;

@@ -48,20 +40,10 @@ this.gain = val;

GainController.prototype.off = function () {
if (this.support) return this.setGain(0);
this._enableAudio(false);
this.gain = 0;
return this.setGain(0);
};
GainController.prototype.on = function () {
if (this.support) return this.setGain(1);
this._enableAudio(true);
this.gain = 1;
this.setGain(1);
};
GainController.prototype._enableAudio = function (bool) {
this.stream.getAudioTracks().forEach(function (track) {
track.enabled = bool;
});
};
module.exports = GainController;

@@ -89,3 +71,3 @@

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

@@ -92,0 +74,0 @@ AudioContext: AudioContext,

4

package.json
{
"name": "mediastream-gain",
"version": "0.0.1",
"version": "0.0.2",
"description": "cross-browser getUserMedia shim with node.js style error-first API.",

@@ -20,3 +20,3 @@ "main": "mediastream-gain.js",

"dependencies": {
"webrtcsupport": "0.4.0"
"webrtcsupport": "0.4.1"
},

@@ -23,0 +23,0 @@ "devDependencies": {

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