node-pulsemixer
Nodejs wrapper for pulsemixer. Control system's audio through nodeJS.
Requirements (for pulsemixer)
Python
>= 3PulseAudio
>= 1.0
Instalation
npm i pulsemixer
Basic Usage
const Pulsemixer = ; { const pulsemixer = ; await pulsemixer await pulsemixer const volume = await pulsemixer; await pulsemixer;};
API
Constructor
const pulsemixer = ;
pulsemixer
will be an interface for the default sink. In other words it will create an interface for the default audio card that is currently running.
const pulsemixer = a_sink_id;
You can also pass a sink id to control a specific sound card or sound interface.
Instance methods
Method | Parameters | Returns | Description |
---|---|---|---|
mute |
- |
Promise:Void |
Mutes system volume |
unmute |
- |
Promise:Void |
Unmutes system volume |
toggleMute |
- |
Promise:Void |
Toggle mute |
getMute |
- |
Promise:Boolean |
Gets current mute status |
setVolume |
{Number} |
Promise:Void |
Sets system volume |
getVolume |
- |
Promise:Number |
Get current system volume |
changeVolume |
{Number} |
Promise:Void |
Increase or decrease system volume by a number |
Static methods
Method | Parameters | Returns | Description |
---|---|---|---|
getSinks |
- |
Promise:Array |
Returns system's available sinks |
const Pulsemixer = ;Pulsemixer ;