Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which MIME Types are supported by MediaRecorder on Safari?

I'm mainly interested in audio MIME types but it would be helpful if someone can provide a list of all MIME types supported by Safari's MediaRecorder.

I've been unable to find any documentation on the matter. So far I've ran MediaRecorder.isTypeSupported(...) with all audio MIME types that are supported by Chrome and Firefox but none of them seem supported.

like image 403
mpium Avatar asked Dec 03 '25 16:12

mpium


1 Answers

Currently, it seems only audio/mp4 and video/mp4 containers are supported, at least they're the only values that MediaRecorder.isTypeSupported() would return as valid: [source code]

if (!equalLettersIgnoringASCIICase(containerType, "audio/mp4") && !equalLettersIgnoringASCIICase(containerType, "video/mp4"))
   return false;

And then the only codecs that are accepted by this same method are AVC1 for the video and MP4A for the audio.

if (!startsWithLettersIgnoringASCIICase(codec, "avc1") && !startsWithLettersIgnoringASCIICase(codec, "mp4a"))
   return false;

Now, there seems to be some "Experimental Features" flags we can switch in the "Develop" menu regarding adding support for webm decoders or adding VP9 support for WebRTC but there doesn't seem to be anything for the MediaRecorder...

like image 122
Kaiido Avatar answered Dec 06 '25 16:12

Kaiido



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!