You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lowercase '6b' in 'mp4a.6b' fails Chromium's canPlayType() check #586
I encountered this when parsing an MP4 containing MP3 audio with codec 'mp4a.6B'. (Thanks for the package! first time reporter here).
mp4box.js reports mp4a.6b, while MP4Box reports mp4a.6B (note the capital). Passing the lowercase one to Chromium's canPlayType() returns an empty string (i.e. not supported) and uppercase returns "probably".
This is because of the mapping in Chromium's source code here (line 64), it doesn't recognise the lowercase version in this particular audio codec. The justification of using the uppercase version is here in RFC 6381. So I think it makes sense for mp4box.js to also report mp4a.6B instead so applications can pass the reported codec from mp4box.js directly to browser capability checks (which is what I was trying to do).
Happy to contribute a PR to fix this if this is the direction maintainers think it should be taken (with some guidance ideally as I am not familiar with the codebase). Thank you.
To Reproduce
Using an MP4 containing MP3 audio with codec 'mp4a.6B' (audio_mp4a.6b.mp4 here):
Activity