simplayer-promise
v0.0.3
Published
Promisfy simple multi platform sound player
Downloads
4
Readme
About
This is simple multi platform sound player. I get ideas from opener.
This module should be used when to play simple sound or sound effect. Not suitable for music players.
Installation
npm install simplayer-promise --save
If platform is linux, then need to install the alsa
# before we start the work, please update
sudo apt-get update
sudo apt-get upgrade
# install ALSA
sudo apt-get install alsa-base alsa-utils
Usage
simplayer-promise function return Promise instance.
var play = require('simplayer-promise');
play('/path/to/sound.mp3')
.then(() => {
// something
})
.catch(() => {
// reject
});
Author
- Maxmellon
LICENSE
MIT