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:
parent
a7d32942c0
commit
e072b35854
5 changed files with 40 additions and 16 deletions
|
@ -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') ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue