[BUG] iOS silence mode doesn't play on .playUrl
Stephane-Parent opened this issue · 1 comments
Stephane-Parent commented
Describe the bug
When playing a sound from SoundPlayer.playUrl
, no sound comes out if the Silence mode is ON (little switch on iPhone side).
To Reproduce
Steps to reproduce the behavior:
- Boot your app
- Play a sound with SoundPlayer.playUrl()
- Hear the sound
- Switch to silence mode
- No more sound
Expected behavior
Expose a function to enable sound on silence mode. It would be more convenient to manage when to respect silence mode.
Platform (please complete the following information):
- OS: iOS
- lib version 0.13.2
Additional context
I bypass it by calling SoundPlayer.setSpeaker(false) before seeking. Seems like [session setActive:true error:nil];
is needed to bypass the Silence Mode. Once this function is called, Silence mode won't be respected anymore.