Can any one please help me to embed a YouTube video in the android WebView?
I've tried as follows but nothing is dispayed.
browser = (WebView)findViewById(R.id.webshow);
String html_head = "<html><body>";
String load =html_head+" <iframe class=\"youtube-player\" type=\"text/html\" " +
"width=\"640\" height=\"385\" src=\"http://www.youtube.com/embed/bIPcobKMB94\" frameborder=\"0\"></body></html>";
browser.loadData(load, "text/html", "UTF-8");
Try doing this
mWebView.getSettings().setPluginState(PluginState.ON);
mWebView.getSettings().setJavaScriptEnabled(true);