mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
really really really messy implementation of prism
This commit is contained in:
@@ -16,17 +16,10 @@ nonce.fill(0);
|
||||
* @extends {EventEmitter}
|
||||
*/
|
||||
class StreamDispatcher extends EventEmitter {
|
||||
constructor(player, stream, sd, streamOptions) {
|
||||
constructor(player, stream, streamOptions) {
|
||||
super();
|
||||
this.player = player;
|
||||
this.stream = stream;
|
||||
this.streamingData = {
|
||||
channels: 2,
|
||||
count: 0,
|
||||
sequence: sd.sequence,
|
||||
timestamp: sd.timestamp,
|
||||
pausedTime: 0,
|
||||
};
|
||||
this._startStreaming();
|
||||
this._triggered = false;
|
||||
this._volume = streamOptions.volume;
|
||||
@@ -47,6 +40,10 @@ class StreamDispatcher extends EventEmitter {
|
||||
this.setVolume(streamOptions.volume || 1);
|
||||
}
|
||||
|
||||
get streamingData() {
|
||||
return this.player.streamingData;
|
||||
}
|
||||
|
||||
/**
|
||||
* How long the stream dispatcher has been "speaking" for
|
||||
* @type {number}
|
||||
|
||||
Reference in New Issue
Block a user