On my iPhone i'm playing video/audio files in fullscreen mode. When the video/audio file reached its end then the following method is triggered:
- (void) movieFinishedCallback:(NSNotification*) aNotification {
MPMoviePlayerController *player = [aNotification object];
[player stop];
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player autorelease];
[moviePlayer.view removeFromSuperview];
NSLog(@"stopped?");
}
That works fine! But the problem is when i press on the "Done" button when the video/audio file is still playing. Then this method doesn't get triggered...
Anyone any idea how to catch the event when the "Done" button is pressed? Because right now media player stays in the view. Its not disappearing.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…