Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
api.init = function (audioFormat) {
if (!me.initialized) {
throw new Error("me.audio.init() called before engine initialization.");
}
// if no param is given to init we use mp3 by default
audioFormat = typeof audioFormat === "string" ? audioFormat : "mp3";
// convert it into an array
this.audioFormats = audioFormat.split(",");
return !Howler.noAudio;
};