mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
rollback
This commit is contained in:
1 parent
15a84cce69
commit
02b85bad5a
4 files changed
+4
-139
No files matched your search
@@ -253,26 +253,6 @@ const PlaybackMixin = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @private Shortly after a track starts, warm the NEXT queued track (resolve +
|
||||
* trackstream URL) so the transition does not wait on NodeLink.
|
||||
* @this {import('./Player.mjs').Player}
|
||||
*/
|
||||
_schedulePrefetchNext() {
|
||||
if (this._prefetchTimer) clearTimeout(this._prefetchTimer);
|
||||
this._prefetchTimer = setTimeout(() => {
|
||||
this._prefetchTimer = null;
|
||||
try {
|
||||
if (this._destroyed || this.leaving || !this._audioBridge?.prefetchTrack) return;
|
||||
if (this.queue.songLoop) return; // next track is the same one
|
||||
const next = this.queue.data?.[0];
|
||||
if (!next) return;
|
||||
this._audioBridge.prefetchTrack(next, this._guildId);
|
||||
} catch (_) {}
|
||||
}, 6_000);
|
||||
this._prefetchTimer.unref?.();
|
||||
},
|
||||
|
||||
/**
|
||||
* @private @async Play a track through the FluxerAudioBridge. For
|
||||
* radio/external tracks without an encoded payload, attempts Lavalink URL
|
||||
@@ -338,8 +318,6 @@ const PlaybackMixin = {
|
||||
const totalMs = this._getTrackDurationMs(songData);
|
||||
const durationMs = totalMs > 0 ? Math.max(0, totalMs - seekMs) : 0;
|
||||
|
||||
this._schedulePrefetchNext();
|
||||
|
||||
const result = await this._audioBridge.play(this._voiceConn, {
|
||||
encoded: songData.encoded,
|
||||
url: bridgeUrl,
|
||||
|
||||
Reference in new issue
Block a user