diff options
| author | Andrei Popescu <andreip@google.com> | 2010-01-11 18:36:25 +0000 |
|---|---|---|
| committer | Andrei Popescu <andreip@google.com> | 2010-01-11 18:36:25 +0000 |
| commit | a41f97bd77f2583e2e3698cfbba62230a8ac4789 (patch) | |
| tree | 51d3e421552d1f85f5beb4b2dde40d4fc25524c9 /core/java/android/webkit/HTML5VideoViewProxy.java | |
| parent | b816377fed0180ff0b132a8d9891e51fb3527138 (diff) | |
Allow a video to be correctly resumed programatically after being paused.
Fix for http://b/issue?id=2366241
Diffstat (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java')
| -rw-r--r-- | core/java/android/webkit/HTML5VideoViewProxy.java | 8 |
1 files changed, 8 insertions, 0 deletions
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). |
