Answer the question
In order to leave comments, you need to log in
How to stop audio playback in WebView?
The problem is this, I load the video into a WebView, and minimize it (or close it, or switch to another activity), and the sound continues to play. In onStop() I call webView.stopLoading(), but the part of the video that had time to load produces sound. Tried calling webView.onDestroy() but doesn't help. Loading a blank page in onStop()/onPause() doesn't work either, since I'm restoring the previous state of the webView (webView.restoreState()).
Answer the question
In order to leave comments, you need to log in
try to remove the WebView from the activity (layout.remove(webview)),
or even better, move the playback from WebView to VideoView
HTML5 version of the player on androids is not very stable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question