我正在使用此代码将视频放在 MPMoviePlayerController 上,但我没有看到 MPMoviePlayerController 上的视频权限,它只显示黑屏。
NSURL *url = [NSURL fileURLWithPath:self.moviePath];
if (playerViewController != nil){
[playerViewController release];
}
playerViewController =[[[MPMoviePlayerController alloc] init]retain];
playerViewController.view.frame = CGRectMake(0.0, 0.0, videoView.frame.size.width, videoView.frame.size.height);
playerViewController.backgroundView.backgroundColor = [UIColor clearColor];
playerViewController setContentURL:url];
playerViewController.controlStyle=MPMovieControlStyleDefault;
playerViewController.shouldAutoplay = FALSE;
playerViewController.repeatMode=NO;
[videoView addSubview:playerViewController.view];