机器人的WebView停止Flash插件的onPause [英] android WebView stop Flash plugin onPause

查看:222
本文介绍了机器人的WebView停止Flash插件的onPause的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含一个包含Flash插件(视频)一个HTML文件的WebView。

I have a WebView that contains a html file that contains a Flash plugin (a video).

当用户presses上的Flash插件播放,视频播放罚款。

When the user presses play on the Flash plugin, the video plays fine.

然而,当用户关闭应用程序或移动到一个新的活动时,Flash仍然在后台播放。让我们再回到看法似乎创建一个新的线程与在其上运行的Flash插件。

However when the user closes the app or moves to a new Activity, the Flash is still playing in the background. Going back to the view appears to create a new thread with the Flash plugin running on it.

我们怎样才能停止运行的onPause Flash插件?

How can we stop the Flash plugin running onPause?

感谢

推荐答案

我碰到了同样的问题。下面为我​​工作:

I ran into the same issue. The following worked for me:

@Override
protected void onDestroy() {
    super.onDestroy();
    final WebView webview = (WebView)findViewById(R.id.webPlayer);
    // Calling .clearView does not stop the flash player must load new data
    webview.loadData("", "text/html", "utf-8");
}

这篇关于机器人的WebView停止Flash插件的onPause的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆