Skip to content
New issue

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

The AudioContext was not allowed to start #92

Open
snax4a opened this issue Sep 26, 2021 · 5 comments
Open

The AudioContext was not allowed to start #92

snax4a opened this issue Sep 26, 2021 · 5 comments

Comments

@snax4a
Copy link

snax4a commented Sep 26, 2021

Hi, use-sound hook produces this warning in Google Chrome and Microsoft Edge browsers.

howler.js?1e5c:2517 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
setupAudioContext @ howler.js?1e5c:2517

Unfortunately, React does not allow to use hooks inside callbacks so I can't define it inside my onClick handler.
Can we somehow get rid of that warning?

@luizjr
Copy link

luizjr commented Nov 29, 2021

I have same problem!

@robksawyer
Copy link

Any workarounds here?

@lucasgbsampaio
Copy link

same problem.

@bransonngai
Copy link

Same here

@shaiq-dev
Copy link

This is not an error, this is the default behaviour according to the new Chrome's Autoplay Policy. https://developer.chrome.com/blog/autoplay/#webaudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants