Copy link to clipboard
Copied
Hi, after browsing the web for hours, I managed to find a code that sort of works:
createjs.Sound.on("fileload", handleLoad);
createjs.Sound.registerSound("https://s0.vocaroo.com/media/download_temp/Vocaroo_s03IOthwckn1.mp3", "bgmLoop");
function handleLoad(event) {
var bgmLoopInstance = createjs.Sound.play("bgmLoop", {
interrupt: createjs.Sound.INTERRUPT_ANY,
loop: -1
});
}
The problems are:
1. The music doesn't loop seamlessly, there's a gap before it starts back again.
2. The music doesn't start in desktop Firefox and Chrome.
Anyone have any ideas how to fix?
I heard howler.js does loops seamlessly, but I have no idea how to use it together with createjs in Animate CC.
Try this tutorial. It is about looping and may help you fix your issue.
Copy link to clipboard
Copied
Hey there,
Gaps in looping html 5 audio is a common problem.
Not sure about create.js but I found a JavaScript solution for here: Hivenfour/SeamlessLoop · GitHub
My intelligence is quite limited so if you need help in incorporating this GitHub seamless loop into your file, we would need an expert to chime in over here.
Thanks,
Ankush
Copy link to clipboard
Copied
Try this tutorial. It is about looping and may help you fix your issue.