Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138223

QML Video doesn't autoPlay after source change

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.1
    • Multimedia
    • None
    • OpenSUSE Tumbleweed

      Consider the following code

      import QtQuick
      import QtMultimedia
      import QtQuick.Controls
      
      Item {
          property bool b: false
          Video {
              id: vid
              anchors.fill: parent
              autoPlay: true
              loops: MediaPlayer.Infinite
              source: b ? "video1" : "video2"
          }
          Button {
              text: "Switch"
              onClicked: {
                  b = !b
              }
          }
      } 

      Replace video1 and video2 with valid video URLs.

      At start the first video starts playing as expected. However when pressing the button and thus changing the video source the second video doesn't start playing. Only when manually invoking play() it plays

        For Gerrit Dashboard: QTBUG-138223
        # Subject Branch Project Status CR V

            qtmultimediateam Qt Multimedia Team
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change