SoFunction
Updated on 2025-03-11

Android webview specifies video player to play website videos


        (new WebViewClient() {
            public boolean shouldOverrideUrlLoading(final WebView view,
                    final String url) {

                if (("3gp") || ("mp4")) {//http://113.31.34.14:80/work/500/152/283/484/500.20120913082849.3gp
loadurl(view, url, true);//Load video
                } else {
loadurl(view, url, false);// Load the web page
                }
//                http://113.31.34.15:80/work/500/094/076/171/500.20120716165645.3gp

                return true;
}// Rewrite the click action and load it with webview

        });