osx-vol

2.0.0 • Public • Published

osx-vol

Get and set volume in OS X systems.

Install

$ npm install --save osx-vol

Usage

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

API

.get()

Returns a promise that resolves to current volume level.

.set(level)

Returns a promise that resolves nothing.

level

Required Type: number

A number between 0 and 1.

CLI

See the vol CLI.

License

MIT © Andreas Gillström

Package Sidebar

Install

npm i osx-vol

Weekly Downloads

2

Version

2.0.0

License

MIT

Last publish

Collaborators

  • gillstrom