Question
Getting past AudioContext chrome blocker - user click
Hi
I can see this was discussed backed in 2019 but I have virtually zero js knowledge. I understand the issue that chrome (canvas) wants the user to click before it will play my audio file and I added a button to do this. Still I get the "It must be resumed (or created) after a user gesture on the page" message.
let root = this;
this.mybutt.addEventListener ("click", playSound);
function playSound () {
createjs.Sound.play("mymix");
}
This is my attempt and it works locally.
I can see there are posting about resummed and suspend AudioContext but these dont go quite simple enough for my level, ie I cant find the whole piece of code or tutorial. Can anyone signpost me where I can find the whole solution to what must be a very common requirement?
Many thanks
Grouse
