Closed condeagustin closed 1 month ago
I have the same issue on Phaser 3.80.1 and iOS 17.5.1
There is a browser error in the console (no stack trace): Unhandled Promise Rejection: InvalidStateError: Failed to start the audio device
I was able to reproduce the issue on the phaser webaudio demos: https://labs.phaser.io/view-iframe.html?src=src\audio\Web%20Audio\play%20audio%20file.js
Sometimes it starts working ok for no reason while I was debugging. it can still be reproduced by closing the browser completely and reopening it.
The problem is not reproducible on HTML5 audio demos but I have other issues with that fallback on my games, likely because many sounds play at the same time.
Hi @condeagustin @damy90
Thanks for reporting this issue. Initial testing and investigation shows that iOS 17.5.1 has problems with web audio. There have been user reports elsewhere mentioning even Youtube, Spotify, SoundCloud having audio issues after the 17.5.1 update.
Since it is an issue with iOS itself, we can only wait for Apple to release new iOS updates that will hopefully address this sooner than later.
Some other sites to test and see if the issue persists: https://codepen.io/Rumyra/pen/qyMzqN/ https://soundcloud.com/user-272592510/sets/mario-kart-wii-ost https://pixijs.io/sound/examples/ https://threejs.org/examples/#webaudio_visualizer https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all
Have tested this on iOS 17.6.1 and it works again. Whatever it was, Apple fixed it. So am going to close this issue off.
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: