-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
No sounds on iOS safari after 3.53 #5696
Comments
It's already more than half year and iOS15, when will this be fixed? Or any quick fix for embedding Phaser3 games using ionic framework + Angular instead of using v3.52? |
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
@photonstorm Just making sure I'm not missing something obvious (have searched all around and surprised how little I'm finding). We are building a cross platform iOS and Android app in phaser for a client. Audio on OSX Safari works completely fine but I cannot get a single thing to work for iOS Safari (testing on an iPhone 13 Pro running 15.6.1 and an iPad mini 2 running 12.4.8). At first I thought it had to do with ionic/capacitor (which was supposedly fixed here, #5706) but then I saw that even the examples online don't work on my devices (https://phaser.io/examples/v3/category/audio/web-audio). @laineus mentioned here that "3.52 is ok" and you said it's been addressed in Any ideas? Thanks! |
@edooley just tested this example https://labs.phaser.io/view.html?src=src/audio/Web%20Audio/basic%20playback%20and%20events.js on an iPhone 14 running iOS 16 and it works perfectly. Here is a video of the same test (and a couple of others) running on an iPhone 13 with iOS 15: screenRecording-15-10-2022-17-28.mp4Video recorded via Browserstack, but that's still real hardware, not emulated. Both demos are working with 3.55.2 and 3.60 Beta 14. I didn't test any further back. Both are definitely Web Audio. If you can isolate this with a simple test case, please open another issue. Edit: Sorry, wasn't aware the Browserstack videos didn't include audio! I can guarantee 100% it was playing though. Will record another video if I get time. |
@photonstorm Thanks for the quick and thorough response. I think I finally figured it out, but it's still a bit strange. Out of habit, I keep the silent toggle enabled on my iOS devices (didn't even think to try that until just now, as playing media always works in Silent Mode for me). In fact, this is the first media scenario I've ever seen where I've been forced to toggle off Silent Mode to get something to play. Is this by design or an issue worth reporting? Thanks! |
@edooley it's not possible for Phaser (or indeed the browser) to detect if you've got the Silent Mode toggle enabled or not. Media doesn't play by the same rules, so will ignore it, but Web Audio respects it. Apparently there may be a hacky work-around, but I've never tested it (and am doubtful it still works): goldfire/howler.js#1436 |
Ah ok. So this seems to be a key difference between HTML5 and web audio. As long as it is intended behavior then I'm not worried about it. It has been my experience that iOS users are pretty conditioned to the silent mode switch and shouldn't have an issue with it. I'm just one of those rare cases where I prefer to leave it on all the time and have somewhat forgotten it exists. Thanks for all the help! |
Version
Description
No sounds on iOS 14 safari after ver 3.53.
I found this commit 7cbf384 is making the issue.
Example Test Code
Additional Information
The text was updated successfully, but these errors were encountered: