2012-04-25 44 views
0

我嵌在我的应用程序YouTube视频,就像是表演上的很多教程没有一些嵌入YouTube视频在Xcode

NSString *htmlString = [NSString stringWithFormat:@"\ 
         <html><head>\ 
         <style type=\"text/css\">\ 
         body {\ 
         background-color: transparent;\ 
         color: white;\ 
         }\ 
         </style>\ 
         </head><body style=\"margin:0\">\ 
         <embed src=\"%@\"\ 
         type=\"application/x-shockwave-flash\" width=\"180\" height=\"140\"></embed>\ 
         </body></html>", videoLink]; 

[webView loadHTMLString:htmlString baseURL:nil]; 

为什么我可以播放视频这样www.youtube.com/watch?v=FMueitNN8HI 而不是这个www.youtube.com/watch?v=jsFV1A8l5e4?

在第二种情况下,它显示了按钮玩网页视图划掉像this

问题出在哪里? 谢谢

回答

2

这是因为上传第二个视频的帐户的所有者选择不使视频手机兼容。以下是我的电脑上打开的第二个视频的屏幕截图,其中浏览器用户代理设置为iPhone。

enter image description here