我正在使用
我该如何解决这个问题?
MPMoviePlayerController
播放视频,但是遇到以下错误: _itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;
}
以下是我的代码,
NSURL *fileURL = [NSURL URLWithString:_videoUrl];
NSLog(@" fileURL: %@",fileURL);
_moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
_moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
UIWindow *backgroundWindow = [[UIApplication sharedApplication] keyWindow];
[_moviePlayer.view setFrame:backgroundWindow.frame];
[backgroundWindow addSubview:_moviePlayer.view];
[_moviePlayer prepareToPlay];
[_moviePlayer play];
我该如何解决这个问题?