Skip to content

push23/simple-mplayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple MPlayer wrapper for node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published