I’m using AVQueuePlayer
to play sounds (a little App for kids to listen illustrated books), but if iPhone is muted the audio isn’t audible.
There is a way to force audio even if iPhone is muted? I think to YouTube where audio is audible or Instagram when you have to pop up the volume to listen stories.
Thanks.
2
Answers
By default AVPlayer is dependent on ringer position if the ringer is in silent mode you can’t listen to audio. if you want to play audio even the ringer is in silent position then set setCategory as AVAudioSessionCategoryPlayback before playing video.
I don’t think you can’t overrule the hardware button (neither you should), a better approach would be to check if the device is silent and show an alert to the user in that case, BUT, as the below library says:
The library that may help you.