Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10d268e3 authored by Andrei Popescu's avatar Andrei Popescu Committed by Android (Google) Code Review
Browse files

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

parents 0f5525ad a41f97bd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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).