Post

Replies

Boosts

Views

Activity

Reply to Audio interruption handling in AVFoundation and starting audio in the background
I got a final answer from Apple support. If you want to start audio from the background without mixing, the best you can do is to use category .playback and category options .duckOthers and .interruptSpokenAudioAndMixWithOthers (check options here) - https://developer.apple.com/documentation/avfoundation/avaudiosession/categoryoptions. This means not spoken other audio will be mixed and ducked and may make it difficult to hear your app's audio.
Jan ’21
Reply to Audio interruption handling in AVFoundation and starting audio in the background
Hi Eirik Unfortunately, I haven't found a solution yet. I am still in discussion with Apple support. Below you will find the answers I have got so far. I will update this information as soon as I know more. If an app is in the background (the user pressed the home or sleep button), by design, it can only start audio with mixing. If an app registered for remote commands (MPNowPlayingInfoCenter, MPRemoteCommandCenter) and its audio is not mixable, when it becomes the "Now playing" app, by design, it causes other apps to stop their audio, rather than just interrupting them. Cheers Rony
Jan ’21