Problem WebView on Youtube in Android?

I tried loading the ww.youtube.com URL in my webview application. but it cannot be fully loaded. it loads as shown below. in the browser it loads comfortably. What for? Any idea?

image http://www.freeimagehosting.net/uploads/d7356dd8e1.png

+1
source share
3 answers

Enable JavaScript! =)

myWebView = (WebView) findViewById(R.id.webview); 
WebSettings webSettings = myWebView.getSettings(); 
webSettings.setJavaScriptEnabled(true); 
myWebView.loadUrl("http://www.youtube.com"); 
+2
source

the simple answer is to call the youtube app downloaded to each phone via web browsing. look at the code http://fluxkore.com/index.php/android-apps/ to call the youtube application .....

+3
source

This may be a problem with WebViews - WebViews are not fully functional browsers and have limited functionality. For example, a help page indicates that WebViews does not process JavaScripts. If JavaScripts, Flash, or something like that is required for YouTube to load properly, that’s probably why WebView can't handle it.

+2
source

Source: https://habr.com/ru/post/1750247/


All Articles