Преглед изворни кода

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();