-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Safari mobile audiocontext suspended fix #3969
Conversation
@vincentfretin This PR is based on a contribution of yours in case you want to take a look, review or test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to check for browser here. You should always add the this.audioContext.onstatechange listener. It's harmless for other browsers.
9910206
to
4ce1725
Compare
@vincentfretin I have removed the iOS specific check. Still can't test so if anybody can please do and report. |
Yes, better. I'll try to test that soon with #3944 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one minor comment. LGTM otherwise.
4ce1725
to
a44234e
Compare
Test on iPad with iOS 14.3 Scenario:
With master: With this PR:
The changes works but with the wrong first message, weird. |
I don't know what going on with |
If I add a new message in |
I quickly looked at |
Thanks for the review @vincentfretin! Good catch, I was missing adding the messages to the |
Great, I'll merge then. Thanks a lot for your support! |
Fixes #338 Hack for a Safari Mobile issue where unplugging/plugging headphones may leave the Audio context in a suspended state.
Based on this contribution from @vincentfretin: #338 (comment)
I couldn't test this on a physical device so iOS Safari testing is needed.