From 9b7dcfacf380148bd09bb608c934b06cd0087040 Mon Sep 17 00:00:00 2001 From: Manish Kumar Verma Date: Wed, 24 Jan 2024 00:47:58 +0530 Subject: [PATCH] fix: Replay video from notification player --- .../java/com/github/libretube/util/NowPlayingNotification.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt b/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt index f740a5f59..e1d9b5dc3 100644 --- a/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt +++ b/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt @@ -302,7 +302,9 @@ class NowPlayingNotification( PLAY_PAUSE -> { if (player.playerError != null) player.prepare() - if (player.isPlaying) player.pause() else player.play() + if (player.isPlaying) player.pause() + else if (player.playbackState == Player.STATE_ENDED) player.seekTo(0) + else player.play() } STOP -> {