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
67.5
Supply Chain
80.7
Quality
75.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
79,648
Last Day
71
Last Week
379
Last Month
1,938
Last Year
24,659
9 Stars
10 Commits
1 Forks
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
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
-33%
71
Compared to previous day
Last week
-4.5%
379
Compared to previous week
Last month
61.5%
1,938
Compared to previous month
Last year
40.5%
24,659
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-02-03
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