mplayer-promises

0.0.4 • Public • Published

Description

Promises-based MPlayer interface.

Bundled with Windows MPlayer binaries because setting up PATH stuff there is a real pain. See license in /mplayerwin/.

How to install

npm install mplayer-bin

On OS X, you'll additionally need to brew install mplayer (or install some other way).

How to use

I recommend looking at the tests, but:

var player = new MPlayer();
 
player
    .spawn()
    .then(() => player.loadFile("sample.mp3"))
    .then(() => player.play())
    .then(() => Promise.delay(2000))
    .then(() => player.seek(1000))
    .then(() => player.setSpeed(1.5))
    .then(() => Promise.delay(2000))
    .then(() => player.pause())
    .then(() => player.kill());

Or you can be fancy and use await if you'd really like.

/mplayer-promises/

    Package Sidebar

    Install

    npm i mplayer-promises

    Weekly Downloads

    2

    Version

    0.0.4

    License

    GPL3

    Unpacked Size

    65.7 MB

    Total Files

    81

    Last publish

    Collaborators

    • jsoma