Twitter video not loading android webview

前端 未结 2 663
耶瑟儿~
耶瑟儿~ 2021-01-27 14:11

When playing twitter video in android web view it shows the message \'by playing this video you agree to the Twitter use of cookies\' and video is not played after that.

相关标签:
2条回答
  • 2021-01-27 14:55

    Call loadDataWithBaseURL instead of loadData, like this:

    loadDataWithBaseURL("https://mywebsite.com", mContent, "text/html", "UTF-8", null);

    0 讨论(0)
  • 2021-01-27 15:03

    JavaScript is disabled in a WebView by default.

    WebView myWebView = (WebView) findViewById(R.id.webview);
    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    

    UPDATED:

    Use TweetView for Native Videos Launching native video support for Twitter Kit

    0 讨论(0)
提交回复
热议问题