From 64becaba80fafefb7aac085f511105812dbf07b1 Mon Sep 17 00:00:00 2001 From: Slavi Petrov Date: Wed, 14 Aug 2019 16:11:25 +0300 Subject: [PATCH] Fixed thumbnail visible when the auto start is not enabled and the progress SeekBar is dragged --- .../fullscreenvideoview/VideoControllerView.java | 2 ++ .../devlabs/fullscreenvideoview/VideoMediaPlayer.java | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoControllerView.java b/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoControllerView.java index 1bf962d..c69038b 100644 --- a/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoControllerView.java +++ b/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoControllerView.java @@ -586,6 +586,8 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (mediaControllerListener != null) { mediaControllerListener.onSeekBarProgressChanged(newPosition); } + + videoMediaPlayer.hideThumbnail(); } @Override diff --git a/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoMediaPlayer.java b/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoMediaPlayer.java index 95af20a..07a5986 100644 --- a/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoMediaPlayer.java +++ b/library/src/main/java/bg/devlabs/fullscreenvideoview/VideoMediaPlayer.java @@ -71,9 +71,13 @@ public void onPauseResume() { pause(); } else { start(); - if (fullscreenVideoView != null) { - fullscreenVideoView.hideThumbnail(); - } + hideThumbnail(); + } + } + + public void hideThumbnail() { + if (fullscreenVideoView != null) { + fullscreenVideoView.hideThumbnail(); } }