title: Responding to MPMoviePlayerController notifications during background media playback
body: <p>I have an app that streams video from the net and plays it using an <code>MPMoviePlayerController</code> object for playback on the device or via AirPlay.</p>
  
  <p>The app supports background operation and has the 'audio' option listed within the required <code>UIBackgroundModes</code> key in its plist file.</p>
  
  <p>When playing over AirPlay, the app can successfully be pushed to the background and the video continues to play properly. So far, so good.</p>
  
  <p>According to the <a href="https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html" rel="nofollow">Apple documentation</a>:</p>
  
  <blockquote>
    <p>Including the audio key tells the system frameworks that they should
    continue playing and make the necessary callbacks to the app at
    appropriate intervals. If the app does not include this key, any audio
    being played by the app stops when the app moves to the background.</p>
  </blockquote>
  
  <p>However, these callbacks are not being made. </p>
  
  <p>The app uses two types of callback: those associated with notifications <code>MPMoviePlayerController</code> and <code>AVPlayer</code> send during playback together with timer based callbacks that monitor the playback position and performance stats for monitoring purposes.</p>
  
  <p>Looking at Apple's notes, I would certainly expect to receive the first type of callback so that the app can respond to <code>MPMoviePlayerPlaybackStateDidChangeNotification</code>, <code>MPMoviePlayerPlaybackDidFinishNotification</code> and <code>MPMoviePlayerLoadStateDidChangeNotification</code>, but this doesn't happen.</p>
  
  <p>Does anyone know if it is possible to receive these during background AirPlay playback and, if so, how was this achieved?  </p>
  
  <p>**Please note: the app works correctly when running in the foreground and receives the notifications fine. It is only when pushed to the background and playing over AirPlay that the notifications are not received.</p>
  
  <p>Likewise, the video plays over AirPlay in the background properly. It is only the notifications which are not received**</p>