这对我有用。按下视频播放器完成按钮时加载错误的 url。例如
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlaybackComplete:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:yourViewController];
并实施
- (void)moviePlaybackComplete:(NSNotification *)notification
{
self.playerViewController=[self.playerViewController initWithContentURL:[NSURL URLWithString:@"dummyUrl"]];
[self.playerViewController.moviePlayer stop];
MPMoviePlayerViewController *moviePlayerController = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
}
这工作得很好。谢谢