Answer the question
In order to leave comments, you need to log in
Why can't video(iframe html5 youtube) play on android 2.3.3?
Welcome all. There is the following code:
mWebView = (WebView) findViewById(R.id.youtube_player);
WebSettings settings = mWebView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setPluginState(WebSettings.PluginState.ON);
mWebView.setWebChromeClient(new WebChromeClient());
mWebView.setWebViewClient(new WebViewClient());
html += "<html><body style=\"margin:0px\">";
html += "<iframe id=\"ytplayer\" type=\"text/html\" style=\"border: 0; width: 100%; height: 100%; margin:0px\" src=\"http://www.youtube.com/embed/"+ linkVideo +"\" frameborder=\"0\" allowfullscreen></iframe>";
html += "</body></html>";
mWebView.loadDataWithBaseURL("http://www.youtube.com",html, "text/html","UTF-8", null);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question