فهرست منبع

PlayerComponent: kill currently held keys when playback starts

This fixes the issue that playback sometimes starts paused. This happens
because the key is either still held down (then the keyup might toggle
pause), or because the key is autorepeated.
Vincent Lang 8 سال پیش
والد
کامیت
240b52949a
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/player/PlayerComponent.cpp

+ 2 - 0
src/player/PlayerComponent.cpp

@@ -240,6 +240,8 @@ bool PlayerComponent::load(const QString& url, const QVariantMap& options, const
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 void PlayerComponent::queueMedia(const QString& url, const QVariantMap& options, const QVariantMap &metadata, const QString& audioStream, const QString& subtitleStream)
 {
+  InputComponent::Get().cancelAutoRepeat();
+
   m_mediaFrameRate = metadata["frameRate"].toFloat(); // returns 0 on failure
   m_serverMediaInfo = metadata["media"].toMap();