【问题标题】:iPhone in app youtube playingiPhone 在应用 youtube 播放
【发布时间】:2010-12-23 05:19:17
【问题描述】:

我使用了 fmt_url_map 中的链接,但它不起作用。我想直接触发视频,不用原来的 youtube 应用。

【问题讨论】:

    标签: iphone youtube


    【解决方案1】:

    您可以简单地将视频嵌入到 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];
    

    其中 wbView 是您的网络视图,其中将嵌入视频 & url 是您的视频网址。

    希望对你有帮助

    【讨论】:

    猜你喜欢
    • 2011-11-16
    • 2012-04-05
    • 1970-01-01
    • 2014-01-21
    • 2011-09-18
    • 2011-04-25
    • 2013-07-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多