Hacker News new | ask | show | jobs
by zhinit 13 days ago
Yeah, for web apps you have to make sure your phone is not on silent and the ringer volume is up. This is why most audio apps for phones will force you to use their native app.

I was looking into a way around this and I don't think it exists without building out an entire phone app.

2 comments

Im building some web audio things and iOS is really a pain. Sometimes the audio plays, sometimes not, sometimes it get stuck playing in the bg. The silent mode button is also something i forget often haha thanks for reminding me again (my phone is always on silent because i get about 15 spam calls a day…)
Have you tried setting `navigator.audioSession.type = playback`?
Thank you! This one liner worked. I searched for a solution for this when I was building this app and am not sure why I couldn't find this.

Looks like this has been possible since iOS 17 but is not well documented.