Take the picture down when the queue runs out
The clip stayed frozen on screen after the music ended. Advancing the queue cleaned up the decoder but never unpublished the video track, and a published track keeps showing its last frame, so an empty queue left the bot displaying a still. Every other teardown path (stop, skip, leaving the channel) already dropped it; the natural end of the queue did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a1596cd654
commit
7cca374e66
@@ -428,6 +428,9 @@ export class GuildPlayer extends EventEmitter<GuildPlayerEvents> {
|
|||||||
private async advance(skipLoop: boolean): Promise<void> {
|
private async advance(skipLoop: boolean): Promise<void> {
|
||||||
const finished = this.current;
|
const finished = this.current;
|
||||||
this.current = null;
|
this.current = null;
|
||||||
|
// The track has to go with the sound: a published video track keeps showing
|
||||||
|
// its last frame, so the clip would hang on screen after the music stopped.
|
||||||
|
this.stopScreenShare();
|
||||||
this.currentInput?.cleanup();
|
this.currentInput?.cleanup();
|
||||||
this.currentInput = null;
|
this.currentInput = null;
|
||||||
this.seekOffset = 0;
|
this.seekOffset = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user