Merge "Allow a video to be correctly resumed programatically after being paused."

This commit is contained in:
Andrei Popescu
2010-01-11 10:47:23 -08:00
committed by Android (Google) Code Review

View File

@@ -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).