fix: resolve silent voice playback on VPS and queue screenshare streams
- Call unpause() when starting a stream in DiscordPlayer to prevent getting stuck in a paused state. - Call stop() instead of pause() in VoiceController on disconnect to fully reset the player. - Add user-agent header to ffmpeg calls in MusicPlayer and Transcoder to prevent YouTube 403 Forbidden on VPS. - Add screenshare streams to the media queue when successfully started. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
279ae07745
commit
3ae7a4c6ad
@@ -35,6 +35,16 @@ export class Transcoder {
|
||||
"-hide_banner",
|
||||
"-loglevel",
|
||||
"warning",
|
||||
];
|
||||
|
||||
if (this.source.startsWith("http://") || this.source.startsWith("https://")) {
|
||||
args.push(
|
||||
"-user_agent",
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
|
||||
);
|
||||
}
|
||||
|
||||
args.push(
|
||||
"-i",
|
||||
this.source,
|
||||
"-c:v",
|
||||
@@ -53,8 +63,8 @@ export class Transcoder {
|
||||
"libopus",
|
||||
"-f",
|
||||
"matroska",
|
||||
"-",
|
||||
];
|
||||
"-"
|
||||
);
|
||||
|
||||
const cmd = spawn("ffmpeg", args, { stdio: ["ignore", "pipe", "pipe"] });
|
||||
const out = cmd.stdout ?? new PassThrough();
|
||||
|
||||
Reference in New Issue
Block a user