Package Exports
- stupid-player
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stupid-player) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stupid-player
It's middleware for simple create player in node.js project.
You can play http-link, file path and magnet URI.
/** CREATE */
const StupidPlayer = require('stupid-player');
const player = new StupidPlayer();
player.on(player.EVENT_PLAY, callback);
player.on(player.EVENT_STOP, callback);
player.on(player.EVENT_ERROR, callback);
(async () => {
await player.play(urlOrPathOrMagnet)
// Some code...
/** CHANGE VOLUME */
const volume = 50;// 0..100
await player.setVolume(volume)
const currentVolume = player.getVolume();
console.log(currentVolume);
await player.stop();
})()