[Android] Make the video stats cancel the hud delay

Nicolas Pomepuy git at videolan.org
Thu Feb 16 11:16:55 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Feb 16 11:33:56 2023 +0100| [dbb0260d1830acffd79e5aebfadda700bd74ac02] | committer: Duncan McNamara

Make the video stats cancel the hud delay

Fixes #2857

> https://code.videolan.org/videolan/vlc-android/commit/dbb0260d1830acffd79e5aebfadda700bd74ac02
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
index 9d6e59c556..7a1e832b37 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
@@ -405,6 +405,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
             initOverlay()
             if (!::hudBinding.isInitialized) return
             overlayTimeout = when {
+                service.playlistManager.videoStatsOn.value == true -> VideoPlayerActivity.OVERLAY_INFINITE
                 player.isTalkbackIsEnabled() -> VideoPlayerActivity.OVERLAY_INFINITE
                 Settings.videoHudDelay == -1 -> VideoPlayerActivity.OVERLAY_INFINITE
                 isBookmarkShown() -> VideoPlayerActivity.OVERLAY_INFINITE
@@ -541,7 +542,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
                     player.delayDelegate.delayChanged(it, service)
                 }
                 service.playlistManager.videoStatsOn.observe(player) {
-                    if (it) showOverlay(true)
+                    if (it) showOverlay(true) else hideOverlay(false)
                     player.statsDelegate.container = hudBinding.statsContainer
                     player.statsDelegate.initPlotView(hudBinding)
                     if (it) player.statsDelegate.start() else player.statsDelegate.stop()



More information about the Android mailing list