我MPMoviePlayerController
在我的 iPhone 应用程序中使用播放视频。
播放时MPMoviePlayerController
,按 iPhone 上的 Home 键,让应用进入后台。
然后点击应用图标,让应用进入前台,MPMoviePlayerController
界面会短暂黑屏,大概1到15秒。
MPMoviePlayerController
当应用程序进入前台时,如何使视频立即显示?
特别感谢!:D
我MPMoviePlayerController
在我的 iPhone 应用程序中使用播放视频。
播放时MPMoviePlayerController
,按 iPhone 上的 Home 键,让应用进入后台。
然后点击应用图标,让应用进入前台,MPMoviePlayerController
界面会短暂黑屏,大概1到15秒。
MPMoviePlayerController
当应用程序进入前台时,如何使视频立即显示?
特别感谢!:D
NSURL *movieURL = [NSURL URLWithString:@"http://......"];
// Initialize a movie player object with the specified URL
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
self.moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
[self.moviePlayer.view setFrame:self.view.bounds];
[self.view addSubview:self.moviePlayer.view];
[self.moviePlayer play];
我希望这能帮到您。