我正在使用以下代碼嘗試在我的應用中顯示YouTube電影。出現視頻播放器,顯示一秒鐘的控件,然後電影播放器收回。該應用程序不會崩潰。任何想法如何使這項工作?在MPMoviePlayerViewController中顯示YouTube電影 - iPhone
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];
啊,我已經讀過了,但它的日期是2009年,所以我認爲它現在可能已經升級了。 – Chris 2011-02-08 19:56:17