I am new HTML5 developer, am using soundjs library for play audio in html5 web application. But soundjs is not able play sound in iPad1, Window Phone and some of android mobile. It seem to be not initialized audio plugin, that's hwy his not able to load file and dispatch complete event. Using code is (soundjs library import in script tag) :
if (!createjs.Sound.initializeDefaultPlugins())
{
alert("return")
return;
}
var audioPath = "assets/audio/";
var manifest = [
{id:"Music", src:audioPath+"waterSplash.mp3|"+audioPath+"waterSplash.ogg"},
{id:"Thunder", src:audioPath + "ohh.mp3|"+audioPath + "ohh.ogg"}
];
this.displayMessage.innerHTML = "loading audio";
//var loadProxy = createjs.proxy(this.handleLoad, this);
createjs.Sound.addEventListener("loadComplete", createjs.proxy(this.handleLoad, this));
createjs.Sound.registerManifest(manifest);
function handleLoad(data)
{
createjs.Sound.play("Music");
this.displayMessage.innerHTML = "Playing " + event.src;
}
In iPad1 and Window Phone, it retrun from this case "createjs.Sound.initializeDefaultPlugins()".
Please help me or suggest any other library which has work in all mobile and system browser.
Thanks....!