Skip to content

Phaser sounds/music stop playing in the new iOS 17.5.1 after losing/gaining focus in safari #6829

Closed
@condeagustin

Description

@condeagustin

Version

  • Phaser Version: 3.23.0 (but the issue still happens in any phaser version, even in the latest 3.80.1)

  • Operating system: iOS 17.5.1

Description

After upgrading iOS to 17.5.1 (in any iOS device), when losing and then gaining focus of safari, any phaser sound/music that was playing (before losing focus) is off for the rest of the session. Even if you tap on a UI element that is supposed to produce a sound, the sound never comes back unless you reload the whole page. This issue is 100% reproducible only on iOS 17.5.1. In the previous iOS version (e.g. 17.4.1) I tested it and this issue never happened

Example Test Code

The following official phaser web audio sample reproduces the issue 100%
https://labs.phaser.io/view.html?src=src%5C%5Caudio%5C%5CWeb%20Audio%5C%5Caudiosprite.js

Additional Information

Steps to reproduce:

  1. In iOS 17.5.1, open safari with this url https://labs.phaser.io/view.html?src=src%5C%5Caudio%5C%5CWeb%20Audio%5C%5Caudiosprite.js
  2. Tap on the "escape" button. This will play a long sound
  3. Lose focus of safari and wait 1 second
  4. Gain focus of safari
  5. The sound is completely gone and any other sound is also gone no matter if you keep tapping the buttons. The only way to make them sound again is by creating a new Web Audio context and set it into phaser sound manager

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions