goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.87k stars 2.23k forks source link

Expected behavior when Silent Mode is on in iOS Safari? #1436

Open hubol opened 3 years ago

hubol commented 3 years ago

In iOS Safari with Silent Mode on, some of the demos at https://www.howlerjs.com will not play sound. Music Player and Radio play sound in this mode, but the other demos do not. Why is this?

Running iOS 14.1

ethanmay commented 3 years ago

This is still a problem. I had to turn off Silent Mode (which usually applies only to the ringer) in order for my phone to play sound.

EXPSTUDIOmo commented 3 years ago

Came across the same Problem.

https://stackoverflow.com/questions/21122418/ios-webaudio-only-works-on-headphones/46839941#46839941

seems like it has to do with HTML5 vs WebAudio. There is this unmute JavaScript that does a workaround. Is there a way to use it with howler?

https://github.com/swevans/unmute

derindutz commented 2 years ago

An alternative solution to this problem is to force HTML5 audio with the html5 flag: https://github.com/goldfire/howler.js#html5-boolean-false