Add ulaw and alaw support to ISOBMFF demuxer

This commit is contained in:
Vanilagy
2025-01-01 22:03:12 +01:00
parent fac4e4bf7b
commit 4e0b3a7b3a
2 changed files with 39 additions and 26 deletions
+6
View File
@@ -35,6 +35,8 @@ export const AUDIO_CODECS = [
'aac',
'mp3',
'opus',
'ulaw',
'alaw',
...PCM_CODECS,
] as const; // TODO add the rest
/** @public */
@@ -398,6 +400,10 @@ export const extractAudioCodecString = (codec: AudioCodec, description: Uint8Arr
return 'opus';
} else if (codec.startsWith('pcm-')) {
return codec;
} else if (codec === 'ulaw') {
return 'ulaw';
} else if (codec === 'alaw') {
return 'alaw';
} else if (codec === 'vorbis') {
return 'vorbis';
}