我有一部短片可以在我的视图背景中循环播放。我使用 MPMoviePlayerController 播放电影。repeatMode 设置为 MPMovieRepeatModeOne,这在 iPad 2、3 和模拟器上运行良好。然而,在 iPad 1 上,影片循环播放一次并在第二次播放后立即停止。该项目是 iOS 5 w/o ARC(从 GM 测试到 5.1.1)。
- (void)loadVideo {
NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"movieFileName.m4v" ofType:nil];
self.videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:urlStr]];
self.videoPlayer.controlStyle = MPMovieControlStyleNone;
self.videoPlayer.scalingMode = MPMovieScalingModeFill;
self.videoPlayer.repeatMode = MPMovieRepeatModeOne;
self.videoPlayer.view.userInteractionEnabled = NO;
[self.videoPlayer.view setFrame:self.movieContainer.bounds];
[self.movieContainer addSubview:self.videoPlayer.view];
}
如何让电影在 iPad 1 上循环播放?