Gathering detailed insights and metrics for audio-stream-meter
Gathering detailed insights and metrics for audio-stream-meter
Gathering detailed insights and metrics for audio-stream-meter
Gathering detailed insights and metrics for audio-stream-meter
npm install audio-stream-meter
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
10 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Oct 17, 2024
Latest Version
1.0.5
Package Id
audio-stream-meter@1.0.5
Unpacked Size
5.50 kB
Size
2.65 kB
File Count
4
NPM Version
5.5.1
Node Version
8.9.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
Simple meter for showing audio stream volume.
1$ npm install audio-stream-meter
1var AudioStreamMeter = require('audio-stream-meter'); 2 3navigator.mediaDevices.getUserMedia({audio:true}) 4.then(stream => { 5 var audioContext = new AudioContext(); 6 7 var mediaStream = audioContext.createMediaStreamSource(stream); 8 var volume = document.getElementById('volume'); 9 10 var meter = AudioStreamMeter.audioStreamProcessor(audioContext, function() { 11 volume.style.width = meter.volume * 100 + '%'; 12 }); 13 14 mediaStream.connect(meter); 15 stream.onended = meter.close.bind(meter); 16}); 17 18<!-- html volume --> 19<div style="width:300px;height:30px;background-color:#FF00FF"> 20 <div id="volume" style="height:30px;background-color:#00FFFF"></div> 21</div>
1var config = { 2 bufferSize: 1024, // default: 1024, interval: {0, 256, 512, 1024, 2048, 4096, 8192, 16384} 3 inputChannels: 1, // default: 1, interval: [1, 32] 4 volumeFall: 0.95, // default: 0.95, interval: (0,1) 5 throttle: 1, // default: 1, interval: [1, 10] 6}; 7 8var meter = AudioStreamMeter.audioStreamProcessor(audioContext, callbackFn(), config);
- bufferSize - more value create higher latency of audio sample-frames,
- inputChannels - how many input channels should be handling, passing more channels then exists in stream will flatten volume,
- volumeFall - more means volume wave will be fall slower.
- throttle - sets step for which will be take samples for calculations, see percent of calculated samples by means of formula f(x) = 1 / x * 100,
- callbackFn() - function is invoke after each processing audio samples and can use within data from 'Output data' paragraph. For example: callbackFn(){ console.log(meter.volume)}
- meter.close() - close and disconnect audio processing
- meter.volume - gives info about volume of the last package of samples - intervals [0, 1],
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More