mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
test
This commit is contained in:
1 parent
40a14a6147
commit
3c938c5c32
1 file changed
+6
-9
+6
-9
@@ -1061,21 +1061,18 @@ export default class Player extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { host, port } = this._nl;
|
const { host, port } = this._nl;
|
||||||
const url = `http://${host}:${port}/v4/sessions/${liveSessionId}/players/${guildId}`;
|
|
||||||
|
const url = `http://${host}:${port}/v4/sessions/${liveSessionId}/players/${guildId}?noReplace=true`;
|
||||||
|
|
||||||
const current = this.queue.getCurrent();
|
const current = this.queue.getCurrent();
|
||||||
if (!current?.encoded) {
|
if (!current?.encoded) {
|
||||||
return { ok: false, reason: "No active track loaded. Start playback first." };
|
return { ok: false, reason: "No active track loaded. Start playback first." };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the current track so NodeLink knows what to keep playing.
|
// Send ONLY filters. With noReplace=true, NodeLink won't touch the track.
|
||||||
// Use the v4 format: track.encoded (not the deprecated encodedTrack).
|
// Including track.encoded causes NodeLink to restart the Voice Worker,
|
||||||
// Also include position so it resumes from where it left off instead of restarting.
|
// which aborts the current stream and causes the "Input stream error: aborted" FFmpeg error.
|
||||||
const body = JSON.stringify({
|
const body = JSON.stringify({ filters: filterPayload });
|
||||||
track: { encoded: current.encoded },
|
|
||||||
position: this.startedPlaying ? Date.now() - this.startedPlaying : 0,
|
|
||||||
filters: filterPayload,
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this._request(url, {
|
await this._request(url, {
|
||||||
|
|||||||
Reference in new issue
Block a user