This handy little method detects Audio formats and features your browser supports.
AudioSupports(function (supports) {
});
{
'audio': { // these are supported on new Audio()
'vorbis': true,
'opus': true,
'mp3': true
},
'audioapi': { // these are supported on new AudioContext()
'vorbis': false,
'opus': false,
'mp3': true
},
'midiapi': true,
'vorbis': true, // these are supported either on Audio() or AudioContext()
'opus': true,
'mp3': true
}
AudioSupports.register(format, codec, base64);