iPhone in app youtube playing
I had used the links in fmt_url_map, but it does not work. I want to trigger the video directly without the o开发者_Go百科riginal youtube app.
You can simply embedd the video in webView
NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: white;\
}\
</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,url, 64.0, 64.0];
[wbView loadHTMLString:html baseURL:nil];
where wbView is your webview in which video will be embedded & url is your video url.
Hope it helps
精彩评论