如何在Android中的webview中查看来自vimeo嵌入代码的视频? 我只听到音频,但视频保持黑色。
wb.getSettings().setJavaScriptEnabled(true);
wb.setWebViewClient(new WebViewClient());
wb.setWebChromeClient(new WebChromeClient());
wb.loadDataWithBaseURL(wb.getUrl(),
"<iframe src=\"http://player.vimeo.com/video/**********?title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>",
"text/html",
"utf-8",
null);
答案 0 :(得分:0)
webView.loadUrl("http://player.vimeo.com/video/" +"insert video id here"+ "?player_id=player&autoplay=1&title=0&byline=0&portrait=0&api=1&maxheight=680&maxwidth=1000");
根据您的需要改变宽度和高度