Socket
Book a DemoInstallSign in
Socket

vol

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vol

Get and set sound volume.

Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
8
-72.41%
Maintainers
2
Weekly downloads
 
Created
Source

vol Build Status

Get and set sound volume.

Install

$ npm install --save vol

Usage

var vol = require('vol');

vol.get(function (err, level) {
	console.log(level);
	//=> 0.45
});

vol.set(0.65, function (err) {
	console.log('Changed volume to 65%');
});

vol.mute(function (err) {
	console.log('Volume muted');
});

CLI

$ npm install --global vol
$ vol --help

  Usage
    $ vol (Interactive CLI)
    $ vol <level>
    $ vol mute

API

.get(callback)

Get volume level.

callback(err, level)

Type: function

level

Type: number

Current volume level.

.set(level, callback)

Set volume level.

level

Required Type: number

A number between 0 and 1.

callback(err)

Type: function

Returns nothing but a possible exception.

License

MIT © Andreas Gillström

Keywords

app

FAQs

Package last updated on 07 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts