Delay pause on resume playback

This commit is contained in:
Jonas Kvinge 2021-07-23 21:54:46 +02:00
parent 4abac65316
commit 62a5031ccf
1 changed files with 1 additions and 1 deletions

View File

@ -1458,7 +1458,7 @@ void MainWindow::ResumePlayback() {
std::shared_ptr<QMetaObject::Connection> connection = std::make_shared<QMetaObject::Connection>();
*connection = QObject::connect(app_->player(), &Player::Playing, app_->player(), [this, connection]() {
QObject::disconnect(*connection);
app_->player()->PlayPause();
QTimer::singleShot(300, app_->player(), &Player::PlayPauseHelper);
});
}
app_->player()->Play(playback_position * kNsecPerSec);