From 29cd9b3da35fc08db4539fe1ef12100fd4c066c9 Mon Sep 17 00:00:00 2001 From: Felix Prillwitz Date: Tue, 10 Dec 2024 18:29:37 +0100 Subject: [PATCH] connect: set `playback_speed` according to player state --- connect/src/state.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connect/src/state.rs b/connect/src/state.rs index 28e57dad..8bfea2a3 100644 --- a/connect/src/state.rs +++ b/connect/src/state.rs @@ -293,6 +293,12 @@ impl ConnectState { | SpircPlayStatus::Stopped ); + if player.is_paused { + player.playback_speed = 0.; + } else { + player.playback_speed = 1.; + } + // desktop and mobile require all 'states' set to true, when we are paused, // otherwise the play button (desktop) is grayed out or the preview (mobile) can't be opened player.is_buffering = player.is_paused