From a41f97bd77f2583e2e3698cfbba62230a8ac4789 Mon Sep 17 00:00:00 2001 From: Andrei Popescu Date: Mon, 11 Jan 2010 18:36:25 +0000 Subject: Allow a video to be correctly resumed programatically after being paused. Fix for http://b/issue?id=2366241 --- core/java/android/webkit/HTML5VideoViewProxy.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java') diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index 3e0be1cc938c..ecbc7e761e9d 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -118,11 +118,19 @@ class HTML5VideoViewProxy extends Handler public static void play(String url, int time, HTML5VideoViewProxy proxy, WebChromeClient client) { + if (mCurrentProxy == proxy) { + if (!mVideoView.isPlaying()) { + mVideoView.start(); + } + return; + } + if (mCurrentProxy != null) { // Some other video is already playing. Notify the caller that its playback ended. proxy.playbackEnded(); return; } + mCurrentProxy = proxy; // Create a FrameLayout that will contain the VideoView and the // progress view (if any). -- cgit v1.2.3