解决方案 »

  1.   

    //这是优酷官网上的脚本,修改一下clientid和视频id
    public String setWebView(String clientid, String vid) {
    return "<html>"
    + "<body>"
    + "<div id='youkuplayer' style='width:100%;height:100%'></div>"
    + "<script type='text/javascript' src='http://player.youku.com/jsapi'>"
    + "player = new YKU.Player('youkuplayer',{styleid: '0',client_id: '"
    + clientid
    + "',vid: '"
    + vid
    + "',autoplay: true,embsig: 'VERSION_TIMESTAMP_SIGNATURE'});</script>"
    + "</body>" + "</html>";
    }webview加载:
    webVideo.loadData(setWebView("clentid", "vid"),
    "text/html", "UTF-8");