Quellcode durchsuchen

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 vor 8 Jahren
Ursprung
Commit
240b52949a
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  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();