我使用此代码在我的应用程序嵌入YouTube视频iPhone UIWebView中嵌入YouTube视频
NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: transparent;\
}\
</style>\
</head><body style=\"margin:0\">\
<embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></embed>\
</body></html>";
NSString *html = [NSString stringWithFormat:embedHTML, urlString, frame.size.width, frame.size.height];
YouTube视频的网址是urlString,像“http://www.youtube.com/v/QfWGRIlpNBE” 。而这段代码工作正常。
我的问题是,如果视频是闪光格式,那么它不能在iphone上播放,我得到一个晃动跨越播放按钮。
如何检测YouTube视频是Flash格式还是H.264格式?我只有视频的网址。
任何人都可以帮我吗?谢谢,非常感谢 – Gargamal 2011-06-08 19:37:29