i am trying to play a youtube video in android webview.. The following are the things that i have done
VideoWebview.java :
String URL = "http://www.youtube.com/results";
WebSettings settings = volWebview.getSettings();
settings.setPluginState(PluginState.ON);
settings.setJavaScriptEnabled(true);
volWebview.setWebViewClient(new WebViewClient());
volWebview.setInitialScale(1);
volWebview.setWebChromeClient(new WebChromeClient());
settings.setLoadWithOverviewMode(true);
settings.setUseWideViewPort(true);
volWebview.loadUrl(URL);
webview_file.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/web_webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
i have added android:hardwareAccelerated="true"
to the manifest file
The url is getting loaded.. but when tried to play a video, its not playing. Any help regarding the same will be highly appreciated.. Thank you..