"yeah we need voice broadcasts cause we make big big music bots" no stop

This commit is contained in:
Amish Shah
2017-10-26 21:00:53 +01:00
parent 3696b4a810
commit bdf8955098
7 changed files with 200 additions and 371 deletions

View File

@@ -0,0 +1,27 @@
const prism = require('prism-media');
const BroadcastDispatcher = require('../dispatcher/BroadcastDispatcher');
const BasePlayer = require('./BasePlayer');
/**
* An Audio Player for a Voice Connection.
* @private
* @extends {EventEmitter}
*/
class AudioPlayer extends BasePlayer {
constructor(broadcast) {
super();
/**
* The broadcast that the player serves
* @type {VoiceBroadcast}
*/
this.broadcast = broadcast;
}
createDispatcher(options, streams) {
this.destroyDispatcher();
const dispatcher = new BroadcastDispatcher(this, options, streams);
return dispatcher;
}
}
module.exports = AudioPlayer;