mirror of https://github.com/KDE/kasts.git
Make playPause() also work when player is in stopped state
This commit is contained in:
parent
749eb17c56
commit
9483607a20
|
@ -442,10 +442,11 @@ void AudioManager::pause()
|
||||||
|
|
||||||
void AudioManager::playPause()
|
void AudioManager::playPause()
|
||||||
{
|
{
|
||||||
if (playbackState() == KMediaSession::PlaybackState::PausedState)
|
if (playbackState() == KMediaSession::PlaybackState::PlayingState) {
|
||||||
play();
|
|
||||||
else if (playbackState() == KMediaSession::PlaybackState::PlayingState)
|
|
||||||
pause();
|
pause();
|
||||||
|
} else {
|
||||||
|
play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioManager::stop()
|
void AudioManager::stop()
|
||||||
|
|
Loading…
Reference in New Issue