Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

vol

3.0.0 • Public • Published

vol

Get and set sound volume

Install

$ npm install vol

Usage

const vol = require('vol');
 
vol.get().then(level => {
    console.log(level);
    //=> 0.45
});
 
vol.set(0.65).then(() => {
    console.log('Changed volume to 65%');
});

API

.get()

Returns Promise with the current volume level.

.set(level)

Set volume level.

level

Type: number

A number between 0 and 1.

Related

License

MIT © Andreas Gillström

install

npm i vol

Downloadsweekly downloads

19

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability