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

Audio playback stops when safari unfocused on ios #138

Open
Codigo-Fuentes opened this issue Mar 3, 2024 · 1 comment
Open

Audio playback stops when safari unfocused on ios #138

Codigo-Fuentes opened this issue Mar 3, 2024 · 1 comment
Assignees

Comments

@Codigo-Fuentes
Copy link

Describe the bug
Audio playback stops when safari unfocused on ios. If i use a regular tag it keeps playing in the background when i unfocus safari. this is what i expect and want.

To Reproduce
Steps to reproduce the behavior:

  1. load a song
  2. play it
  3. unfocus safari

Expected behavior
Audio keeps playing on unfocus.

Environment (please complete the following information):

  • Browser/ browser version: safari ios 17.3.1
  • Library version: 2.2.0
  • React version: 18.2.0
  • Node version: 21.1.0
@E-Kuerschner
Copy link
Owner

Hi @Codigo-Fuentes thanks for opening the issue. I don't think I'll be able to get around to triaging this any time soon (feel free to take a look and open a PR if you want to take a stab at it!), but can I ask how you are loading the sound? I think you may need to load with the html5 option set to true. The media session API only works with HTML5 elements, not the Web Audio API which Howler uses by default.

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

No branches or pull requests

2 participants