refactor(audio): extract IFormatDecoder/WavFormatDecoder and wire Content-Type to JS format selection

StreamDecoder is now format-agnostic; WavFormatDecoder delegates to WavUtils; contentType flows C# to JS.
This commit is contained in:
daniel-c-harvey
2026-06-11 06:08:09 -04:00
parent f8186fb7c7
commit 0b0bcb3dee
9 changed files with 308 additions and 105 deletions
+2 -2
View File
@@ -31,10 +31,10 @@ const DeepDrftAudio = {
}
},
initializeStreaming: (playerId: string, totalStreamLength: number): AudioResult => {
initializeStreaming: (playerId: string, totalStreamLength: number, contentType: string): AudioResult => {
const player = audioPlayers.get(playerId);
if (!player) return { success: false, error: 'Player not found' };
return player.initializeStreaming(totalStreamLength);
return player.initializeStreaming(totalStreamLength, contentType);
},
processStreamingChunk: async (playerId: string, chunk: Uint8Array): Promise<StreamingResult> => {