MPMoviePlayerController ... applicationDidEnterBackground .. applicationWillEnterForeground
<p>I am Playing a video in my application from the resource. While the video is playing if I click the home button and open the app again the video is freezing. any please help me.</p>

<pre><code>NSString *urlStr = [[NSBundle mainBundle] 
    pathForResource:@"78x36Productions_Intro_v05_iPhone3G_Audio_H264.mov" ofType:nil];
    NSURL *urlvi = [NSURL fileURLWithPath:urlStr];
    videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:urlvi];

    //videoPlayer.view.transform = tr;
    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"videoStarted"];
    videoPlayer.controlStyle = 0;
    [[NSNotificationCenter defaultCenter] 
        addObserver:self selector:@selector(movieDidFinish:) 
        name:MPMoviePlayerPlaybackDidFinishNotification object:videoPlayer];
        [self.view addSubview:videoPlayer.view];
        videoPlayer.view.frame = CGRectMake(0, 0,480,320); 
        [videoPlayer setScalingMode:MPMovieScalingModeAspectFill];
        [videoPlayer play];
</code></pre>
