WebView Problem on Youtube site in Android?

后端 未结 3 1385
轻奢々
轻奢々 2021-01-16 03:21

i tried to load the url ww.youtube.com on my app in a webview. but it cant be load completely. it loads just like below image. in the browser it loads comfortably. why? Any

相关标签:
3条回答
  • 2021-01-16 03:55

    It might be a problem with WebViews - WebViews aren't fully fledged browsers, and have limited functionality. For example, the reference page specifically says that WebViews don't handle JavaScripts. If JavaScripts, Flash or something like that is required to properly load YouTube, then that could be why the WebView doesn't handle it properly.

    0 讨论(0)
  • 2021-01-16 04:01

    the simple answer is to call the youtube app thats loaded on every phone with your webview. check out the code on http://fluxkore.com/index.php/android-apps/ to call the youtube app.....

    0 讨论(0)
  • 2021-01-16 04:19

    Enable JavaScript! =)

    myWebView = (WebView) findViewById(R.id.webview); 
    WebSettings webSettings = myWebView.getSettings(); 
    webSettings.setJavaScriptEnabled(true); 
    myWebView.loadUrl("http://www.youtube.com"); 
    
    0 讨论(0)
提交回复
热议问题