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

QML Video doesn't autoPlay after source change

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes