-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
At the moment when loading an unsupported audio format the browser returns an error without any explanations, perhaps we can support that in the loader?
here's an example of how one can check the browser's capabilities:
var myAudio = document.createElement('audio');
if (myAudio.canPlayType) {
// Currently canPlayType(type) returns: "", "maybe" or "probably"
var canPlayMp3 = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/mpeg');
var canPlayOgg = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/ogg; codecs="vorbis"');
console.log(canPlayMp3, canPlayOgg);
}