Is there a callback or a way to handle mp4 completion
listener in webview
.
As Mp4 is not supported in all device
. I have to open another activity on completion of a mp4 video.
So how could I now that a video is completed in WebView
.I know how to do this using VideoView .
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String urlNewString) {
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap facIcon) {
}
@Override
public void onPageFinished(WebView view, String url) {
}
});
webview delegate only helps to know that page is fully loaded
. Or tell me an alternate to handle onCompletion for MP4. mediaplayer.setOnCompletion only works for VideoView not for WebView.