mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
connect: set playback_speed
according to player state
This commit is contained in:
parent
c8131beebb
commit
29cd9b3da3
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue