mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
fix some voice stuff
This commit is contained in:
@@ -132,7 +132,7 @@ class StreamDispatcher extends EventEmitter {
|
||||
data.length = 20;
|
||||
data.missed = 0;
|
||||
data.startTime = Date.now();
|
||||
this._send();
|
||||
this.stream.once('readable', () => this._send());
|
||||
}
|
||||
|
||||
_pause(value) {
|
||||
|
||||
@@ -5,8 +5,12 @@ class DefaultPlayer extends BasePlayer {
|
||||
|
||||
playFile(file) {
|
||||
this._shutdown();
|
||||
const fileStream = fs.createReadStream(file);
|
||||
const pcmStream = this.convertStream(fileStream);
|
||||
return this.playStream(fs.createReadStream(file));
|
||||
}
|
||||
|
||||
playStream(stream) {
|
||||
this._shutdown();
|
||||
const pcmStream = this.convertStream(stream);
|
||||
const dispatcher = this.playPCMStream(pcmStream);
|
||||
return dispatcher;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user