Skip to content

Fix audio resuming after backgrounding#1770

Open
developer1 wants to merge 1 commit into
goldfire:masterfrom
developer1:iOSResume
Open

Fix audio resuming after backgrounding#1770
developer1 wants to merge 1 commit into
goldfire:masterfrom
developer1:iOSResume

Conversation

@developer1

Copy link
Copy Markdown

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

Add event listener to resume audio context after backgrounding.
@tommykwanpg

Copy link
Copy Markdown

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.
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