0
我正在使用UIWebView來顯示YouTube視頻。它在iOS 4+上運行良好,但在iPad(iOS 3.2)上無法運行。 UIWebView按預期加載並顯示視頻的縮略圖。當我點擊縮略圖時,我看到一個灰色的QuickTime圖標,可以聽到聲音,但沒有出現視頻。UIWebView Youtube嵌入聲音播放,但沒有視頻顯示在iOS 3.2(iPad)
這是我使用的代碼:
UIWebView* webView = [[UIWebView alloc] initWithFrame: CGRectMake(0,0,320,480)];
NSURL *url = [NSURL URLWithString:@"http://url.to.video/"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
VideoPlayerController* videoController = [[VideoPlayerController alloc] init];
[[videoController view] addSubview:webView];
UINavigationController* theNavController = [[UINavigationController alloc]
initWithRootViewController:videoController];
[self presentModalViewController:theNavController animated:YES];
[videoController release];
[theNavController release];
[webView release];