title: MPMoviePlayer play on when application goes Background
body: <p>I am working with <strong>iOS5</strong>.</p>
  
  <p>I am working on HTTPLivestream project .Here i am using <strong>MPMovieplayer</strong> ,my problem is when application goes to background there is no audio . i am changing the plist in background mode is audio.But there is no result please help me .</p>
  
  <h2>AppDel</h2>
  
  <pre><code>- (void)applicationDidEnterBackground:(UIApplication *)application {
    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
    [[AVAudioSession sharedInstance] setActive: YES error: nil];
  
    UIApplication *app = [UIApplication sharedApplication];
    backgroundTask = [app beginBackgroundTaskWithExpirationHandler:^{
    }];
  
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
    });
  }
  </code></pre>
  
  <h2>RadioControlView</h2>
  
  <pre><code>  NSString *path =[[NSString alloc] initWithString:@"http://*******/alayam/alayam/playlist.m3u8"];
  
    audioUrl=[NSURL URLWithString:path];
  
    appDelegate.player =  [[MPMoviePlayerController alloc] initWithContentURL:audioUrl];
                                     [[NSNotificationCenter defaultCenter] addObserver:self 
                                                           selector:@selector(loadStateDidChange:) 
                                                               name:MPMoviePlayerLoadStateDidChangeNotification 
                                                             object:appDelegate.player];
                  if ([appDelegate.player respondsToSelector:@selector(loadState)]) 
                  {
                      [appDelegate.player setControlStyle:MPMovieControlModeVolumeOnly];
                      [appDelegate.player setFullscreen:YES];
                      [appDelegate.player prepareToPlay];
                   }
  
  - (void)loadStateDidChange:(NSNotification *)notification
        {   
          [[NSNotificationCenter defaultCenter]removeObserver:self name:MPMoviePlayerLoadStateDidChangeNotification object:appDelegate.player];
  
        }
  </code></pre>
  
  <p>Thanks in Advance                     </p>