Issue: When the iOS device is on silent, the sound being played from the app is muted.
Upon some digging into the iOS code, I found that out of the 7 "audio session categories" the right one to use for a music app is playback.
Question: How do I set the category in the audio_service
package?
Package version: 0.18.0-beta.1
audio_service only manages remote control of your app via notifications, lock screens, etc. The audio session is typically managed by the audio player plugin that you use.
If you use just_audio, it will by default set the required category, but if not, you can manually override the category via the audio_session package. e.g. The code below will configure reasonable defaults for a podcast app, including setting the category to playback
:
(await AudioSession.instance).configure(const AudioSessionConfiguration.speech());