From 42d081f04e132bc4ff5dbf408c596bd1f6927992 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sun, 17 Sep 2023 11:32:21 +0200 Subject: [PATCH] fix(player): allow pausing while loading Fixes https://github.com/libre-tube/LibreTube/issues/4784, the player should only pause when it has no buffer to play, not when it is loading, as it always loads, until the allocated buffer is full. --- app/src/main/java/com/github/libretube/extensions/Player.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/extensions/Player.kt b/app/src/main/java/com/github/libretube/extensions/Player.kt index 60a1ea17e..ec43965be 100644 --- a/app/src/main/java/com/github/libretube/extensions/Player.kt +++ b/app/src/main/java/com/github/libretube/extensions/Player.kt @@ -13,7 +13,7 @@ fun Player.togglePlayPauseState() { seekTo(0) } - !isPlaying && !isLoading -> play() + !isPlaying && totalBufferedDuration > 0 -> play() else -> pause() } }