【发布时间】:2011-06-23 16:06:24
【问题描述】:
我正在使用以下代码尝试在我的应用中显示 YouTube 电影。视频播放器出现,显示控件一秒钟,然后电影播放器缩回。该应用程序不会崩溃。任何想法如何使这项工作?
MPMoviePlayerViewController *mpViewController =
[[MPMoviePlayerViewController alloc]
initWithContentURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=VKsVSBhSwJg"]];
[mpViewController shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
[self presentMoviePlayerViewControllerAnimated:mpViewController];
[mpViewController release];
【问题讨论】:
标签: iphone youtube mpmovieplayercontroller