YouTube video does not open in webView

The problem is that I can upload a YouTube site and navigate through videos,

but when I click to play the video, nothing happens.

The video just gets an orange flash as it is selected,

but does not start downloading or playback.

I am using Android 2.2.

The methods that I use in the web view are as follows:

webView.getSettings () setJavaScriptEnabled (true). . WebView.getSettings () setPluginState (PluginState.ON); . WebView.getSettings () setPluginsEnabled (true);

enter image description here

any help is appreciated

thank

+5
source share
2 answers

, YouTube , .. .., .

if (url.contains("youtube")) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
} else {
    webView.loadUrl(url);
}
0

HTML5

0

All Articles