Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    stupid-playerpublic

    stupid-player

    It's middleware for simple create player in node.js project.

    /** CREATE */
    var player = new (require('stupid-player'));
     
    player.on(player.EVENT_PLAY, callback);
    player.on(player.EVENT_STOP, callback);
    player.on(player.EVENT_ERROR, callback);
     
    player.play(urlOrPath)
      .then(function() {
        /** SOME CODE */
      });
      
    /** CHANGE VOLUME */
    var value = 50;// 0..100
    player.setVolume(value)
      .then(function() {
        var currentVolume = player.getVolume();
        console.log(currentVolume);
      };
    player.stop();

    install

    npm i stupid-player

    Downloadslast 7 days

    2

    version

    0.3.2

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar