-(void)playVideo:(NSURL *)url{
if (videoPlayer) {
[videoPlayer release];
videoPlayer = nil;
}
videoPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
url = nil;
videoPlayer.moviePlayer.controlStyle=MPMovieControlStyleFullscreen;
videoPlayer.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
videoPlayer.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
videoPlayer.view.backgroundColor = [UIColor blackColor];
[[UIApplication sharedApplication]
setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];
[videoPlayer.moviePlayer prepareToPlay];
videoPlayer.moviePlayer.shouldAutoplay = YES;
videoPlayer.hidesBottomBarWhenPushed = YES;
self.navigationController.navigationBarHidden=NO;
videoPlayer.navigationItem.hidesBackButton = YES;
[self.navigationController pushViewController:videoPlayer animated:YES];
[self addObservers];
}
谁能说该法典有什么错误? The url is streaming httplink. 录像机在播放,但在录像机消失之后。 它正在3G网络工作,但不是在wifi。