Fix audio resuming after backgrounding#1770
Open
developer1 wants to merge 1 commit into
Open
Conversation
Add event listener to resume audio context after backgrounding.
3 tasks
|
Is it not working again now? I tried a my safari in iOS 26.2 with fast click returning background. Audio is not resumed. Anyone experienced this too? |
pim-at-stink
added a commit
to Kaggle/kaggle-environments
that referenced
this pull request
Apr 16, 2026
This fixes a bug where the audiocontext gets suspended by iOS when the document.visibilityState changes. See goldfire/howler.js#1660 goldfire/howler.js#1770 goldfire/howler.js#1702 goldfire/howler.js#1771 Good to note this is not a Howler bug, it's an iOS bug. We have tried several audio libraries that all produced the same behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add event listener to resume audio context after backgrounding.
Issue/Feature
On iOS mobile safari, audio would not resume after resuming after backgrounding with the latest iOS release. This will resume audio playback when returning.
Related Issues
Audio not playing after returning from background on iOS Chrome and a possible solution
No sound on IOS 26
Solution
Added event listener for state change to resume Howler ctx if audio has been previously unlocked
Reproduction/Testing
On physical iOS device only (not reproducible with iPhone simulator): background the browser by going to the home screen then return to the game. Previously audio playback wouldn't auto resume, but now it should.
Breaking Changes
N/A