Prevent cueing sounds from playing on audio unlock
When audio is not unlocked by the user (and there is no way to understand that as I understand), all the sounds that I tried to play before unlock are played upon unlock which causes a boom (a big distortion) in sound (it plays all sounds at once). Is it possible to disable this cueing mechanism? I want Howler not to cue all sounds to play after unlock.
I am facing the same issue. :(
I even tried this:
const audio = new Howl({ src: [url] })
function play () {
if (!Howler.ctx || Howler.ctx.state !== 'running') { return }
audio.play()
}
to only play sounds with the context acquired, but then a lot of users started to complain that the sounds were stopping after some minutes.
This is my current solution:
const audio = new Howl({ src: [url] })
audio.once('unlock', () => audio.stop());
@samuelsimoes you can try turn off the autoSuspend global state