Installations
npm install audio-stream-meter
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.9.1
NPM Version
5.5.1
Score
67.5
Supply Chain
80.7
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
krzaku281
Download Statistics
Total Downloads
79,648
Last Day
71
Last Week
379
Last Month
1,938
Last Year
24,659
GitHub Statistics
9 Stars
10 Commits
1 Forks
1 Watching
1 Branches
1 Contributors
Bundle Size
813.00 B
Minified
467.00 B
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
79,648
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
No dependencies detected.
audio-stream-meter
Simple meter for showing audio stream volume.
Installation
1$ npm install audio-stream-meter
Quick start
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>
Configuration
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,
Controls
- 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
Output data
- meter.volume - gives info about volume of the last package of samples - intervals [0, 1],
Licence
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
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