I am using to play the youtube videos in androidwebview .Loading and playing all related youtube videos well in android version of 4.3 and below .but problem in starting video not playing in android version of 4.4 and above.i didn't findout the mistake where i done .because its working androidversion 4.3 and below.some problem in androidversion 4.4 and above.please guide anyone known.
I am using code to load the webview video url:
Webview wvYoutube=(WebView)view.findViewById(R.id.wv_youtube);
wvYoutube.clearCache(true);
wvYoutube.clearHistory();
wvYoutube.clearView();
wvYoutube.getSettings().setJavaScriptEnabled(true);
wvYoutube.getSettings().setRenderPriority(RenderPriority.HIGH);
wvYoutube.getSettings().setPluginState(PluginState.ON);
wvYoutube.getSettings().setLoadWithOverviewMode(true);
wvYoutube.getSettings().setUseWideViewPort(true);
wvYoutube.setWebChromeClient(new MyWebChromeClient());
wvYoutube.setWebViewClient(new myWebViewClient());
try {
wvYoutube.loadUrl("http://www.youtube.com//watch?v=LXrxCT0NpHo");
} catch (IllegalArgumentException e) {
//TODO Auto-generated catch block
e.printStackTrace();
}
and the related image
image showing video not playing .Advance thanks to all