Replace broken per-segment Opus decode with WebCodecs AudioDecoder streaming pipeline

This commit is contained in:
daniel-c-harvey
2026-06-23 17:42:06 -04:00
parent d0118997b6
commit 7f3fb74126
13 changed files with 1270 additions and 649 deletions
+3 -3
View File
@@ -47,9 +47,9 @@ const DeepDrftAudio = {
return player.setOpusSidecar(sidecarBytes);
},
// Capability seam (wave 18.4). Resolves whether this browser can decode Ogg Opus via
// decodeAudioData (Safari < 18.4 cannot). Wave 18.5 / 18.6 consume this to choose lossless
// when unsupported; this module only reports the capability.
// Capability seam. Resolves whether this browser can stream-decode Ogg Opus via WebCodecs
// (AudioDecoder + codec:'opus'; Safari < 16.4 / older Firefox cannot). The player consumes this
// to choose lossless when unsupported; this module only reports the capability.
canDecodeOggOpus: (): Promise<boolean> => canDecodeOggOpus(),
processStreamingChunk: async (playerId: string, chunk: Uint8Array): Promise<StreamingResult> => {