I want to play music when my application is in the background, so I've set
"audio background mode"
in my app's info.plist.
I want to set the audiosession's category to kAudioSessionCategory_SoloAmbientSound
, because I want to respect the mute switch, and I don't want to mix with other applications.
Is this possible?
If I set the category to kAudioSessionCategory_MediaPlayback
then my app is able to play music in background, but with kAudioSessionCategory_SoloAmbientSound
when I press the home button on the device, it stops playing (and when I return back to the foreground it returns playing music).
So I want to play music in background, and "respect" the mute switch's state. Is that possible?
Thanks for your answer in advance!