Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Youtube为uiwebview嵌入html不工作(在iOS 4.2 iPhone 3G上)_Iphone_Objective C_Ios_Uiwebview_Youtube - Fatal编程技术网

Youtube为uiwebview嵌入html不工作(在iOS 4.2 iPhone 3G上)

Youtube为uiwebview嵌入html不工作(在iOS 4.2 iPhone 3G上),iphone,objective-c,ios,uiwebview,youtube,Iphone,Objective C,Ios,Uiwebview,Youtube,我有一个UIWebView,其中嵌入了以下代码: <embed id="yt" src="http://www.youtube.com/watch?v=1T6YM7RE5wQ" type="application/x-shockwave-flash" width="280" height="186"></embed> 这在我的iPhone4(iOS 4.3)上运行良好,但在iPhone3G(iOS 4.2)上测试时,会出现全屏youtube播放器,但会在“加载电影…

我有一个UIWebView,其中嵌入了以下代码:

<embed id="yt" src="http://www.youtube.com/watch?v=1T6YM7RE5wQ" type="application/x-shockwave-flash" width="280" height="186"></embed>

这在我的iPhone4(iOS 4.3)上运行良好,但在iPhone3G(iOS 4.2)上测试时,会出现全屏youtube播放器,但会在“加载电影…”时暂停/挂起

我应该为4.2使用不同的嵌入代码吗?我应该使用不同的嵌入代码吗

非常感谢您的建议

谢谢各位

dunc

试试这个:

<iframe id="yt" class="youtube-player" type="text/html" width="280" height="186" src="http://www.youtube.com/embed/1T6YM7RE5wQ" frameborder="0">


它使用的是HTML5视频元素,而不是flash。

我在iPhone 3G上也遇到了这个问题。我现在不在做这个项目,但如果其他人能证实这一点,我会将其标记为答案。谢谢Jensen2k哦天哪。我没看到那是一个旧帖子。很抱歉但是,它无论如何都应该起作用。Mobile Safari使用WebKit,WebKit像charm.OK mate一样支持HTML5视频。我会尝试一下,然后再给你回复。无论如何,谢谢你的支持!