I have to play vimeo videos inside webview, consider the below code:
<iframe src='http://player.vimeo.com/video/74175376' width='100%' height='500px' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
When I play this, it plays only the audio but the video is black. I am using the below code:
WebSettings s = wv.getSettings();
wv.setWebChromeClient(new MyWebChromeClient());
s.setBuiltInZoomControls(true);
s.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
s.setUseWideViewPort(true);
s.setLoadWithOverviewMode(true);
s.setSavePassword(true);
s.setSaveFormData(true);
s.setAllowFileAccess(true);
s.setJavaScriptEnabled(true);
s.setJavaScriptCanOpenWindowsAutomatically(true);
s.setSupportMultipleWindows(true);
s.setGeolocationEnabled(true);
s.setDomStorageEnabled(true);
if (Build.VERSION.SDK_INT < 8) {
} else {
s.setPluginState(PluginState.ON);
}
Any hints why this is happening...
I have written customized webview for vimeo videos .
checkout my project below to play vimeo videos : Source Code
Basically you need to write html5 webview :