Simple MPlayer wrapper for node
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples better examples Dec 27, 2012
.gitignore
README.md
index.js
package.json

README.md

simple-mplayer

Simple MPlayer wrapper for node

Usage

var Media = require('simple-mplayer');

// with ability to pause/resume/stop:
var music = new Media('./trumpet.wav');
music.play({loop: 0}); // send "-loop 0" to MPlayer to loop the soundtrack forever

setTimeout(function () {
    music.pause(); // pause the music after one seconds
}, 1000);

setTimeout(function () {
    music.resume(); // and resume it two seconds after pausing
}, 3000);

setTimeout(function () {
    music.stop(); // and stop definitely seven seconds after resuming
}, 10000);

License

MIT