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

mediastream-gain

Package Overview
Dependencies
Maintainers
4
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 1.0.0 to 1.0.1

2

package.json
{
"name": "mediastream-gain",
"description": "cross-browser getUserMedia shim with node.js style error-first API.",
"version": "1.0.0",
"version": "1.0.1",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -6,0 +6,0 @@ "dependencies": {

@@ -16,7 +16,5 @@ # mediastream-gain

1. **NOTE:** as of this writing FireFox (while it has good WebAudio support in upcoming versions doesn't have support for using media from getUserMedia as an audio source even in its most cutting edge releases. Specifically there's no `AudioContext.prototype.createMediaStreamSource`. So this can't be use to mute an audio stream, for example.
The way this works by replacing the first audio channel in the stream with one that is run through a gain filter. But beware that this *edits the stream you give it in place* it doesn't produce a new one.
2. The way this works by replacing the first audio channel in the stream with one that is run through a gain filter. But beware that this *edits the stream you give it in place* it doesn't produce a new one.
## Installing

@@ -46,3 +44,3 @@

// set gain to 0, effectively muting it
gainControl.getGain(0);
gainControl.setGain(0);
// there's also:

@@ -57,3 +55,3 @@ gainControl.off(); // equivalent to setGain(0)

It couldn't be simpler, but behavior varies slighly based on availability of WebAudio support that can be wired into WebRTC. Firefox, has WebAudio but user media can't yet be used as a source, rendering it useless for WebRTC applications.
It couldn't be simpler, but behavior varies slighly based on availability of WebAudio support that can be wired into WebRTC.

@@ -60,0 +58,0 @@ You can check for support by checking the `support` property of the an instance of `gainController`

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