I use this piece of code to load the Vimeo player into a 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");
And this is what I get:
However, when I click the play button, the background becomes gray and the video does not start:
Any idea guys on what might be wrong and how this could be fixed?
The code is running on a Samsung S4 with Android 4.2.2.