Make playPause() also work when player is in stopped state

This commit is contained in:
Bart De Vries 2023-12-04 13:43:55 +01:00
parent 749eb17c56
commit 9483607a20
1 changed files with 4 additions and 3 deletions

View File

@ -442,10 +442,11 @@ void AudioManager::pause()
void AudioManager::playPause()
{
if (playbackState() == KMediaSession::PlaybackState::PausedState)
play();
else if (playbackState() == KMediaSession::PlaybackState::PlayingState)
if (playbackState() == KMediaSession::PlaybackState::PlayingState) {
pause();
} else {
play();
}
}
void AudioManager::stop()