Open lannymcnie opened 9 years ago
I did a quick test, and currently SoundJS determines that "weba" is not supported. This is based on the snippet in the Sound class that determines support, and you can test it in any browser console.
var audio = document.createElement("audio");
var canPlay = audio.canPlayType("audio/weba");
var ok = (canPlay != "no" && canPlay != "");
In Chrome, canPlayType("audio/weba")
returns an empty string, which we consider to be a failure. Subbing in "webm", and it returns "maybe".
It is possible that this format is playable still, but we need to determine how to check for it. For example, the "m4a" extension is actually checked using "audio/mp4". There is an EXTENSION_MAP
in SoundJS, which will map any additional extensions not specified in the SUPPORTED_EXTENSIONS
to a specific type, and "weba" might have to be wired up like this.
Docs: http://createjs.com/docs/soundjs/classes/Sound.html#property_EXTENSION_MAP http://createjs.com/docs/soundjs/classes/Sound.html#property_SUPPORTED_EXTENSIONS
Issue is described here: http://stackoverflow.com/questions/33216192/support-for-webm-and-weba-files-in-soundjs-and-preloadjs