I am working on an App and YouTube.com is embedded into a WebView. Videos cannot be played when I click any ones (it is in loading status forever). So I try to use VideoView or YouTubePlayerFragment to play videos when user clicks video play button. My question is: Are there any ways to detect that user has clicked play button?
I added below listener on WebView, but the hr is insufficient to tell use clicks play button.
webView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
WebView.HitTestResult hr = ((WebView)v).getHitTestResult();
return false;
}
});