开发者

iPhone in app youtube playing

开发者 https://www.devze.com 2023-02-01 02:19 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消