Skip to content

yetalex/node-loudness

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mwl-loudness

A node.js library to control the systems output volume fork from https://github.com/LinusU/node-loudness. added hazardous package for electron, fixed that the electron app can't find the correct path which in the "app.asar.unpacked" folder.

Usage

The library currently has support for four simple async functions. The volume is specified as an integer between 0 and 100 (inc.).

const loudness = require('loudness')

loudness.setVolume(45).then(() => {
  // do something..
})

loudness.getVolume().then((val) => {
  // val is current system volume.
  // do something..
})

loudness.setMuted(false).then(() => undefined)

loudness.getMuted().then((muted) => {
  // muted
})

OS Support

Currently Mac OS X, Linux (ALSA) and Windows NT is supported

About

🔊 A node.js library to control the systems output volume

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%