Explorar el Código

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 hace 8 años
padre
commit
240b52949a
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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();