mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
"yeah we need voice broadcasts cause we make big big music bots" no stop
This commit is contained in:
27
src/client/voice/player/BroadcastAudioPlayer.js
Normal file
27
src/client/voice/player/BroadcastAudioPlayer.js
Normal 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;
|
||||
Reference in New Issue
Block a user