mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 19:33:51 +02:00
Add FLAC support to ISOBMFF demuxer
This commit is contained in:
+6
-2
@@ -35,6 +35,8 @@ export const AUDIO_CODECS = [
|
||||
'aac',
|
||||
'mp3',
|
||||
'opus',
|
||||
'vorbis',
|
||||
'flac',
|
||||
'ulaw',
|
||||
'alaw',
|
||||
...PCM_CODECS,
|
||||
@@ -398,14 +400,16 @@ export const extractAudioCodecString = (codec: AudioCodec, description: Uint8Arr
|
||||
return 'mp3';
|
||||
} else if (codec === 'opus') {
|
||||
return 'opus';
|
||||
} else if (codec === 'vorbis') {
|
||||
return 'vorbis';
|
||||
} else if (codec === 'flac') {
|
||||
return 'flac';
|
||||
} 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';
|
||||
}
|
||||
|
||||
throw new TypeError(`Unhandled codec '${codec}'.`);
|
||||
|
||||
Reference in New Issue
Block a user