2013-01-04 25 views
0

並iOS 6中的WebView有呈現視頻的問題一個鏈接? :(視頻嵌入不工作的UIWebView與iOS6的模擬器或設備

我的代碼是一個簡單的調用的WebView的loadRequest方法:

self.webview.scalesPageToFit = YES; 
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]]; 

cosole說:

[MPAVController] Autoplay: Enabling autoplay 
[MPAVController] Autoplay: Disabling autoplay for pause 
[MPAVController] Autoplay: Disabling autoplay 
[MPAVController] Autoplay: Ending background task assertion (8) for playback stall 
[MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1 
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 1) 

我提到this answer卻徒勞無功

請暗示答案。

+0

的WebView,前面已經提到。 –

+0

我只能使用webview,因爲我打算使用嵌入視頻的網頁。 –

+0

@Nikita看一看http://stackoverflow.com/questions/12399241/ios-uiwebview-not-working-due-to-parsing-error – DJB

回答

0

你好,因爲你不能使用的MPMoviePlayerController,你有使用網頁視圖,而不是使用

self.webview.scalesPageToFit = YES; 
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]]; 

Try this way to embed,

相關問題