6

in my Android app I have a WebView with basic browsing functionality. My problem is that I want to get notified somehow if the user starts playing a flash video. I tried to set a WebViewClient on my webView, and monitor the URLs in the onLoadResource method, but it doesn't work. My question is the following: is it possible to catch an event of this kind, and if yes, how?

Thanks.

4

1 回答 1

1

wv.setOnTouchListener(new View.OnTouchListener() {

    public boolean onTouch(View v, MotionEvent event) {
        WebView.HitTestResult hr = ((WebView)v).getHitTestResult();

        return false;
    }
});

是否无法通过 html 元素 ID 检测到对视频播放按钮的点击?在 onTouchListener

视频是如何显示的?即时播放或按钮开始播放?

于 2013-10-28T01:36:45.107 回答