0

I working on host a website that include videos , when I run the video and click to fullscreen player button the white color fill all screen but the video sound still playing

MainActivity.class

    mWebview = (WebView) findViewById(R.id.web);
    mWebview.setWebViewClient(new MyWebViewClient());
    mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript
    mWebview.getSettings().setDomStorageEnabled(true);
    mWebview.loadUrl("http://www.my-site.com/");
    mWebview.setWebChromeClient(new WebChromeClient() {

        public void onShowCustomView (View view, WebChromeClient.CustomViewCallback callback) {
            //do stuff
        }

        public void onHideCustomView () {
            //do stuff
        }

    });

MyWebViewClient.class

public class MyWebViewClient extends WebViewClient {
    public boolean shuldOverrideKeyEvent(WebView view, KeyEvent event) {

        return true;

    }


    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        try {
            String s = Uri.parse(url).getHost();
            if((s.contains("rulanerder"))|| (s.contains("disqus"))){
                view.stopLoading();
                view.goBack();
                return true; }
                     }

            // reject anything other

        } catch (Exception e) {
            Log.d("Error", "shouldOverrideUrlLoading");
        }
        return false;
    }
}

how can fixed that ?

Mike jess
  • 151
  • 1
  • 10

0 Answers0