preloadjs getResult(audio) doesn't work

208 views Asked by At

I am trying to use preloadjs to load mp3 file. I also use HTMLAudioPlugin in Soundjs, but when I want to get the audiodom as use getResult function, it doesn't work in ios but not in chrome.

preloadManifest = [{src: "bgm.mp3", id: 'bgm', type:'createjs.AbstractLoader.SOUND'}]

createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin]);

loader = new createjs.LoadQueue(true, null, true);

loader.addEventListener('complete',function () {
    loader.getResult('bgm') // undefined in ios
});
0

There are 0 answers