我正在使用 iphone 中的视频应用程序。当用户点击一个按钮时,它将导致第二个视图,并从那里我正在播放来自 url 的视频。
但是,当用户从该视图返回并再次转到视频未播放时。
它连续显示以下2行
[MPAVController] Autoplay: Likely to keep up or full buffer: 0
[MPAVController] Autoplay: Skipping autoplay, not enough buffered to keep up.
这是我的代码
- (void)viewDidLoad
{
[super viewDidLoad];
self.moviePlayerController = [[MPMoviePlayerController alloc] init];
[self.moviePlayerController prepareToPlay];
self.moviePlayerController.shouldAutoplay = YES;
[[self.moviePlayerController view] setFrame:CGRectMake(-30, 72, 360,140)];
[[self view] addSubview: [self.moviePlayerController view]];
NSString *strng = [NSString stringWithFormat:@"http://quickemee_videos.s3.amazonaws.com/videoStream_1352395870143_616.mp4"];
NSLog(@"strng %@",strng);
NSURL * adurl = [NSURL URLWithString:strng];
[self playVideo:adurl];
}
. . . .
-(IBAction)back:(id)sender{
[moviePlayerController stop];
[self.navigationController popViewControllerAnimated:YES];
}