Surface ffmpeg startup failures

This commit is contained in:
2026-06-22 12:16:21 +02:00
parent 1a77896c32
commit d10dae1b53
4 changed files with 118 additions and 3 deletions
+6
View File
@@ -108,6 +108,12 @@ export default class AudioManager {
const resolvedSource = this.resolveSource();
this.stopCurrentPlayback();
this.ffmpeg = startFfmpeg(resolvedSource.input, this.options.ffmpeg);
try {
await this.ffmpeg.ready;
} catch (error) {
this.stopCurrentPlayback();
throw error;
}
this.resource = createAudioResource(this.ffmpeg.process.stdout, {
inputType: StreamType.Raw,
inlineVolume: this.options.volume?.enabled === true,