connect: set playback_speed according to player state

This commit is contained in:
Felix Prillwitz 2024-12-10 18:29:37 +01:00
parent c8131beebb
commit 29cd9b3da3
No known key found for this signature in database
GPG key ID: DE334B43606D1455

View file

@ -293,6 +293,12 @@ impl ConnectState {
| SpircPlayStatus::Stopped | 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, // 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 // otherwise the play button (desktop) is grayed out or the preview (mobile) can't be opened
player.is_buffering = player.is_paused player.is_buffering = player.is_paused