Copy link to clipboard
Copied
I tried createjs.Sound but my sounds have nothing under Linkage in the library. I think that's what you need to reference the sound when using createjs.Sound right? Any other ways to avoid the user having to arbitrarily click to hear sounds?
Hi.
Chrome requires a user to interact with a page to allow sound playback but only once. So as long as the user, for example, clicked on a button, you can play sounds afterwards without interaction.
But there's no way to avoid this first interaction as far as I can tell.
Regards,
JC
Copy link to clipboard
Copied
ok well I found out how to add a Linkage name. Simply double-click the Linkage area next to the library item.
This is the code I tried:
createjs.Sound.play("Swish");
Doesn't work. Still have to click to hear sounds.
Copy link to clipboard
Copied
Hi.
Chrome requires a user to interact with a page to allow sound playback but only once. So as long as the user, for example, clicked on a button, you can play sounds afterwards without interaction.
But there's no way to avoid this first interaction as far as I can tell.
Regards,
JC
Copy link to clipboard
Copied
rats. I thought that createjs could do it. Ok thanks, I'll have a popup that says "choose an activity" with an OK button.
Copy link to clipboard
Copied
You're welcome.
It's not just CreateJS. No technology is able to overcome this limitation without some kind of hack.
Regards,
JC
Copy link to clipboard
Copied
and it's not just chrome. all modern browsers (thankfully) require user interaction before playing a sound.
you should see it in action at virtually every website that has ads.