title: Prevent muting of background audio when using AVPlayer
body: <p>I am playing a video using an instance of AVPlayer and I want to be able to continue listening to background music while playing the video.</p>
  
  <p>If any background app is playing music, the music is muted whenever I call <code>play</code> on the AVPlayer. How can I prevent background audio from being muted? </p>
  
  <p>Here's how I create and start my AVPlayer:</p>
  
  <pre><code>AVURLAsset *asset = [AVURLAsset URLAssetWithURL:videoURL options:nil];
  AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:asset];
  AVPlayer *player = [AVPlayer playerWithPlayerItem:playerItem];
  
  playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];
  [self.layer addSublayer:playerLayer];
  
  // mutes all background audio
  [player play];
  </code></pre>