Well, I\'ve been searching few days already, how to display HTML5 video in full-screen mode on android WebView.
I managed to play HTML5 videos on my webview. Problem
Cprcrack's answer works very well for API levels 19 and under. Just a minor addition to cprcrack's onShowCustomView
will get it working on API level 21+
if (Build.VERSION.SDK_INT >= 21) {
videoViewContainer.setBackgroundColor(Color.BLACK);
((ViewGroup) webView.getParent()).addView(videoViewContainer);
webView.scrollTo(0,0); // centers full screen view
} else {
activityNonVideoView.setVisibility(View.INVISIBLE);
ViewGroup.LayoutParams vg = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
activityVideoView.addView(videoViewContainer,vg);
activityVideoView.setVisibility(View.VISIBLE);
}
You will also need to reflect the changes in onHideCustomView