Get and set sound volume
$ npm install vol
const vol = require('vol');
vol.get().then(level => {
console.log(level);
//=> 0.45
});
vol.set(0.65).then(() => {
console.log('Changed volume to 65%');
});Returns Promise with the current volume level.
Set volume level.
Type: number
A number between 0 and 1.
- vol-cli - CLI for this module
MIT © Andreas Gillström