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

Fix for WebAudio context not being unlocked on Android Chrome >= 55. #756

Merged
merged 2 commits into from
Jun 9, 2017

Conversation

Melatonin64
Copy link

I've encountered situations in which audio won't play on latest Android Chrome.
Recent Chrome changes cause AudioContext() to stay locked in suspended state, unless resume() is explicitly called from a stack initiated by user gesture.
This commit fixes it.

@goldfire
Copy link
Owner

Do you have a test case for this? I've been trying to reproduce the issue on latest Chrome on Android and haven't been able to so far.

@Melatonin64
Copy link
Author

Sorry - forgot to mention that this only happens on cross origin iframes.
The following warning is logged when trying to play any audio:
An AudioContext in a cross origin iframe must be created or resumed from a user gesture to enable audio output.
I can try to whip up a simple test case...

@Melatonin64
Copy link
Author

@goldfire
Copy link
Owner

goldfire commented Jun 9, 2017

Thanks for the test cases!

@goldfire goldfire merged commit 9a7f931 into goldfire:master Jun 9, 2017
ringcrl pushed a commit to ringcrl/howler.js that referenced this pull request Apr 21, 2019
Fix for WebAudio context not being unlocked on Android Chrome >= 55.
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

Successfully merging this pull request may close these issues.

2 participants