Android HTML5 video is not shutdown after destroying WebView

时光毁灭记忆、已成空白 提交于 2019-12-06 13:14:24

问题


I've got an issue with WebView on Android 3.1 and higher. I have a WebView with the <video> tag in my activity and it plays without any problems. When the activity onDestroy() is called I'm calling destroy() on the WebView to stop the video. Everything works fine.

The issue occurs when I press play, then switch into fullscreen, exit fullscreen and press play again. Then I destroy the Activity and WebView, but the video is still running—why?

I call the callback from onShowCustomView(View view, CustomViewCallback callback) when I return from fullscreen.

The video sound stops when I open the same or other video.

How can I shutdown everything when I'm done with the current Activity?


回答1:


Loading blank page when destroying activity works.



来源:https://stackoverflow.com/questions/7940943/android-html5-video-is-not-shutdown-after-destroying-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!