1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-03 17:49:16 +02:00

Fix for m4a files as audio/mp4. Up-rev to 1.1.2.

This commit is contained in:
Jeff Schiller 2023-09-30 11:17:16 -07:00
parent a7d32942c0
commit e072b35854
5 changed files with 40 additions and 16 deletions

View file

@ -58,6 +58,11 @@ export function getShortMIMEString(info) {
return 'audio/flac';
}
// M4A files are specifically audio/mp4.
if (info?.format?.filename?.toLowerCase().endsWith('.m4a')) {
return 'audio/mp4';
}
// Otherwise, any file with at least 1 video stream is considered video/.
// Otherwise, any file with at least 1 audio stream is considered audio/.
const type = info.streams.some(s => s.codec_type === 'video') ?