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

Commit 4dd9dc82 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu
Browse files

Keep the controller when video ended.

Use the media controller as a reminder to the user when the video ended.
We don't quit the video here b/c user may want to replay the video.

bug:5340224
Change-Id: I6d5fdb54bb614277b75e1a18ebe0a7dadd47017e
parent f4c77df0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView
        // after reading the MetaData
        if (mMediaController != null) {
            mMediaController.setEnabled(true);
            mMediaController.show();
        }

        if (mProgressView != null) {
@@ -320,6 +321,11 @@ public class HTML5VideoFullScreen extends HTML5VideoView
    return 0;
    }

    @Override
    public void showControllerInFullScreen() {
        mMediaController.show(0);
    }

    // Other listeners functions:
    private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener =
        new MediaPlayer.OnBufferingUpdateListener() {
+3 −0
Original line number Diff line number Diff line
@@ -342,4 +342,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener {
        return m_startWhenPrepared;
    }

    public void showControllerInFullScreen() {
    }

}
+1 −0
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ class HTML5VideoViewProxy extends Handler
        }

        public static void end() {
            mHTML5VideoView.showControllerInFullScreen();
            if (mCurrentProxy != null) {
                if (isVideoSelfEnded)
                    mCurrentProxy.dispatchOnEnded();