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

stupid-player

0.3.2 • Public • Published

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

Downloadsweekly downloads

0

version

0.3.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability