嵌入式Vimeo播放器无法在Android上播放

时间:2014-08-08 07:31:35

标签: android vimeo vimeo-player

我使用这段代码将Vimeo播放器加载到WebView中:

WebView webView = (WebView) rootView.findViewById(R.id.web_view);
webView.getSettings().setJavaScriptEnabled(true);
String data = "<iframe src=\"http://player.vimeo.com/video/102234762\" width=\"350\" height=\"300\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
webView.loadData(data, "text/html", "UTF-8");  

这就是我得到的:
enter image description here

但是,当我点击播放按钮时,背景变为灰色且视频无法启动: enter image description here

任何人都知道可能出现什么问题以及如何解决这个问题? 该代码在带有Android 4.2.2的Samsung S4上运行。

0 个答案:

没有答案