title: AVAudioSession configuration to record and play with others
body: <p>I want to configure AVAudioSession that I can record video with audio and also play music from Music app (or any other app that is producing sound, typically internet radios apps)</p>
  
  <p>I configure session like this:</p>
  
  <pre><code>try? AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, with: .mixWithOthers)
  try? AVAudioSession.sharedInstance().setActive(true, with: .notifyOthersOnDeactivation)
  </code></pre>
  
  <p>This works the way that when my recording app is running I can start playing audio from music app and record video (also record audio as well). So far good.</p>
  
  <p>Now, I put my recording app to the background. Music app continues to play. It is fine. But, when my app is coming back from background music app stop its playback. I would like it to continue. So it basically behaves as build in camera app when shooting video. Is there a way to tell the system that I want other app to continue playback?</p>