我有一个带有 MPMoviePlayerController 的 iOS 应用程序,我需要从 URL 播放视频。一切似乎都正常,但是当播放结束时 MPMoviePlayerController 显示一个奇怪的图像,并且需要 AGES 重播视频......
这是我到目前为止所拥有的:
mp =  [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayerLoadStateChanged:)
                                             name:MPMoviePlayerLoadStateDidChangeNotification
                                           object:nil];
而moviePlayerLoadStateChanged 和moviePlayBackDidFinish 看起来像这样:
- (void) moviePlayerLoadStateChanged:(NSNotification*)notification
{
    if ([mp loadState] != MPMovieLoadStateUnknown)
    {
        [[NSNotificationCenter defaultCenter]removeObserver:self
                                                name:MPMoviePlayerLoadStateDidChangeNotification
                                              object:nil];
        [mp setControlStyle:MPMovieControlStyleEmbedded];
        [mp setFullscreen:NO];
        [mp.view setFrame:CGRectMake(10, 54, 300, 200)];
        [mp setShouldAutoplay:NO];
        [mp prepareToPlay];
        [[self view] addSubview:[self.mp view]];
    }   
}
我不知道那个图像是什么,但我想替换它......我认为它需要很多,因为它是从 URL 加载视频,我不知道如何添加加载或微调器... 任何想法?
