0.0.8 • Published 8 years ago

simplayer v0.0.8

Weekly downloads
89
License
MIT
Repository
-
Last release
8 years ago

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 -g

# if you want to use in node
npm install simplayer --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 function return child process instance.

var simplayer = require('simplayer');

var musicProcess = simplayer('/path/to/sound.mp3');

var musicProcess = simplayer('path/to/song.mp3', function (error) {
  if (error) throw error;
  console.log('end of song!');
});

If platform is windows, then support wav file only.

var musicProcess = simplayer('C:\\path\\to\\sound.wav');
// or
var musicProcess = simplayer('C:/path/to/sound.wav');

If handle to close event, Please, in the following manner.

var simplayer = require('simplayer');

var musicProcess = simplayer('/path/to/sound.mp3');

musicProcess.on('close', function(code) {
  console.log('child process exited with code ' + code);
});

Use in the following manner in command line.

simplayer /path/to/sample.mp3

For Japanese

Author

  • Maxmellon

LICENSE

MIT

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago