We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An AudioContext must be created or resumed after the document received a user gesture to enable audio playback.
I get this warning in Chrome Canary (M65) on, eg, http://phaser.io/examples/v2/audio/fade-in (iframe), and on my localhost (no iframe) when I open a game tab in the background and then focus it. But I don't get it when doing the same on https://samme.github.io/phaser-examples-mirror/audio/fade%20in.html. Not sure why.
The audio context is created but with a suspended state. Playback appears to go normally but there's no audio output.
suspended
A workaround would be
if (game.sound.usingWebAudio && game.sound.context.state === 'suspended') { game.input.onTap.addOnce(game.sound.context.resume, game.sound.context); }
The text was updated successfully, but these errors were encountered:
The AudioContext was not allowed to start. It must be [resumed] (or created) after a user gesture on the page. https://goo.gl/7K7WLu
https://samme.github.io/phaser-examples-mirror/audio/fade%20in.html
Sorry, something went wrong.
98d49c4
Phaser can try to resume the audio context via mouseout, which is wrong and will fail.
mouseout
0147198
No branches or pull requests
I get this warning in Chrome Canary (M65) on, eg, http://phaser.io/examples/v2/audio/fade-in (iframe), and on my localhost (no iframe) when I open a game tab in the background and then focus it. But I don't get it when doing the same on https://samme.github.io/phaser-examples-mirror/audio/fade%20in.html. Not sure why.
The audio context is created but with a
suspended
state. Playback appears to go normally but there's no audio output.A workaround would be
The text was updated successfully, but these errors were encountered: