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

Commit a41f97bd authored by Andrei Popescu's avatar Andrei Popescu
Browse files

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

parent b816377f
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).