2013-12-23 59 views
1

我建立一個需要vimeo視頻播放支持的應用程序。我在播放視頻方面取得了成功,但不知道如何獲得當前的視頻播放進度。 我使用的是https://github.com/droid28/VimeoVideo中建議的HTML5WebView。 如果有人已經idea..please建議.. 感謝如何從android webview播放Vimeo視頻的進度?

這裏是代碼:

webview = (WebView)findViewById(R.id.webView1); 
WebSettings webViewSettings = webview.getSettings(); 
webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true); 
webview.addJavascriptInterface(new JavaScriptInterface(this),"jsInterface"); 
webview.setWebChromeClient(new WebChromeClient());  
webViewSettings.setJavaScriptEnabled(true); 
webViewSettings.setPluginState(PluginState.ON); 

String page="<html> " + 
       "<head> " + 
        "<style>" + 
         "iframe {" + 
          "position: absolute;" + 
          "z-index: 1;" + 
          "top: 0;" + 
          "left: 0;" + 
          "width: 100%;" + 
          "height: 100%;" + 
         "}" + 
        "</style>" + 
       "</head>" + 
        "<body>" + 
         "<iframe id=\"player\" src=\"http://player.vimeo.com/video/"+video_id+"?api=1&player_id=player\" width=\"400\" height=\"225\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen>" + 
         "</iframe>" + 
        "</body>" + 
       "</html>"; 



webview.loadDataWithBaseURL("file:///android_asset/page.html", page,"text/html", "UTF-8",null); 
+0

能否請你展示一些代碼。 –

回答