1.0.4 • Published 1 year ago

musicsound v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

SoundControl

A simple Node.js library for controlling/getting system audio volume (compatible with Windows, Linux, macOS).

installation:

npm i musicsound

Setup and Usage:

The library exposes a class called operatingSystem. This class contains two functions: setVolume, which takes a volume level as a parameter, and getVolume, which returns the current volume level. Both functions return promises, either resolving with the specified volume level or rejecting with an error if applicable. The library is designed to work seamlessly across different operating systems.

Example:

const { operatingSystem } = require("musicsound");
// prettier-ignore
operatingSystem.getVolume().then(vol => console.log(vol)).catch(err => console.log(err))
// prettier-ignore
operatingSystem.setVolume(50).then(vol => console.log(vol)).catch(err => console.log(err))
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago