node-music-mplayer
============

A node.js wrapper for MPlayer, which allows you to play audio files (e.g. mp3, wav, ogg...) on your soundcard.

This wrapper uses [`mplayer's slave mode`](https://www.mplayerhq.hu/DOCS/tech/slave.txt).

This project is forked from [`@loics2`](https://github.com/loics2/node-mplayer) and is done to approaching an even better api which allows a more fluent and an expanded usage of mplayer's slave mode options.

##Usage

1) Firstly you need MPlayer, which can be downloaded [`here`](https://www.mplayerhq.hu).

2) When mplayer is available through command line, install node-music-mplayer

Then, you need to make a new instance of the module.

	var player = require('node-music-mplayer'); 
    
	var player = new Mplayer(arg1, arg2);
	
	arg1 represents either a string, representing the path to the file you want to play or an object of options
	
	if arg1 is the path string, then arg2 can be the object of options

##Stability

This module uses the [`readline`](http://www.nodejs.org/api/readline.html) module, which is currently marked unstable. 

This module has been tested on Windows 8.1 with MPlayer 4.9.2
