mirror of
https://github.com/danbulant/discord.js
synced 2026-06-22 16:22:01 +00:00
26 lines
616 B
JavaScript
26 lines
616 B
JavaScript
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;
|