Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Hotfix for backgrounded/suspended IOS issue #1660

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

Open
keiththomas1 wants to merge 1 commit into goldfire:master
base: master
Choose a base branch
Loading
from keiththomas1:master

Conversation

@keiththomas1
Copy link

@keiththomas1 keiththomas1 commented May 16, 2023

  • Verified working on IOS 14/15/16
  • Doesn't fix core of the issue, which is - on IOS we end up in the 'suspending' state when backgrounding an app, but the logic for resuming the context while 'suspending' is based on a 30 second timer that may or may not get hit depending on how long you have it backgrounded for.

Issue/Feature

Issue was that after a certain amount of time after backgrounding the app and then coming back (~10-40 secs), audio would be forever muted.

Related Issues

Solution

Reproduction/Testing

On IOS 14/15/16, background an app using Howler for 10/20/30/40/50 seconds, and then return to that app and observe if audio is working or not.

Breaking Changes

This could break instances where the state is 'running' and we should not be resuming the context because the state is not interrupted, but I haven't seen this happen yet in testing.

desen94, TheNotorius0, Umbraculum, jzstern, risenxxx, and WandererXII reacted with thumbs up emoji TheNotorius0, jzstern, and risenxxx reacted with hooray emoji jzstern and risenxxx reacted with heart emoji
- Verified working on IOS 14/15/16
- Issue was that after a certain amount of time after backgrounding the
 app and then coming back (~10-40 secs), audio would be forever muted
Copy link
Author

I don't have write access, but anybody who does feel free to merge this.

Copy link

Can someone please merge this PR ??? We want the fix as we are facing issues on older IOS devices.

mindyourlifeguide, elieven, jzstern, and weirdinside reacted with thumbs up emoji

Copy link

I would love this fix as well for an app I'm working on. Is there any possibility of this being merged/published soon?

Copy link

For what it's worth, I realized that my particular issue with the suspending of audio (after returning from inactivity) was being caused by Howler's global autoSuspend setting, not iOS. See below:

autoSuspend Boolean true

Automatically suspends the Web Audio AudioContext after 30 seconds of inactivity to decrease processing and energy usage. Automatically resumes upon new playback. Set this property to false to disable this behavior.

Disabling this global setting solved my particular issue.

import { Howl, Howler } from 'howler';
Howler.autoSuspend = false;

Hope this helps someone!

Copy link

caleb531 commented Aug 4, 2024

Okay, even after setting Howler.autoSuspend = false, I was still experiencing an issue where the sound would stop playing after switching away from iOS Safari, even for a few seconds, then switching back. Applying this PR to my codebase fixed the issue immediately, so thank you @keiththomas1 for this fix!

@goldfire Any possibility of reviewing/merging this PR soon? It would be wonderful to have in the official package.

keiththomas1, risenxxx, PandaChiu55688, and WandererXII reacted with heart emoji

Copy link

risenxxx commented Aug 5, 2024

To fix this problem, I had to use the fork too. I would be glad if this PR is reviewed faster

tommykwanpg added a commit to wegdevio/howler.js that referenced this pull request Sep 20, 2024
Copy link

aiferrer commented Nov 4, 2024

We have to use this fork as well... but It would be great if you could merge this PR as soon as possible! :)

Copy link

kttmv commented Mar 18, 2025

I also confirm this commit fixes the issue. Any chance it could be merged?

Copy link

akicho8 commented Oct 4, 2025

It's been quite a while, is there a reason this hasn't been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

3 more reviewers

@agnelrdx agnelrdx agnelrdx approved these changes

@Soabbar Soabbar Soabbar approved these changes

@stanislavkirilov89 stanislavkirilov89 stanislavkirilov89 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /