isUniversallyPlayableAudio
function isUniversallyPlayableAudio(mime): boolean;Defined in: packages/sdk/src/audio-compat.ts:34
true when a browser can play these bytes as uploaded, so re-encoding them
to MP3 buys nothing.
audio/mpeg— unambiguous.audio/mp4/audio/aac— plays in Safari, Chrome, Firefox and Edge on desktop and mobile. The historical worry was old AOSP builds without proprietary codecs; the call to treat AAC as universal was made with the platform’s one real AAC consumer, whose viewer is WebGL — a device that cannot decode AAC cannot run that product at all, so the fallback would only ever protect a device that had already lost.
Deliberately NOT here: audio/webm and audio/ogg (Opus). iOS Safari
cannot decode them, and that is the case the MP3 fallback exists for.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
mime |
string |
Returns
Section titled “Returns”boolean