![](/img/trans.png)
[英]SVProgressHUD not animating when enter to foreground from Background
[英]MPMoviePlayerController black screen when app enter foreground from background
我正在使用MPMoviePlayerController
在我的iPhone应用程序中播放视频。
播放MPMoviePlayerController
,按iPhone上的“主页”按钮,使应用程序进入后台。
然后点击应用程序的图标,使应用程序进入前台, 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];
我希望这能帮到您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.