Vin*_*tti 13
查看以下SO帖子: 如何在Android上的WebView中嵌入YouTube剪辑
请尝试以下可能对您有帮助的代码.我只是将它框起来供你参考
myWebView = (WebView) findViewById( R.id.webview_compontent );
String playVideo= "<html><body>Youtube video .. <br> <iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"385\" src=\"http://www.youtube.com/embed/bIPcobKMB94\" frameborder=\"0\"></body></html>"
myWebView.loadData(playVideo, "text/html", "utf-8");
Run Code Online (Sandbox Code Playgroud)
有关如何使用Webview的信息,请参阅以下链接:http://developer.android.com/reference/android/webkit/WebView.html
| 归档时间: |
|
| 查看次数: |
28841 次 |
| 最近记录: |