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

Inconsistent Video playback behaviour on playlist change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.2
    • 5.10.0, 5.9.6
    • Documentation, Multimedia
    • None
    • B801, Android 7.0, armeabi-v7a
    • Android

    Description

      On Android, if you have a QML Video with `autoPlay` set to `true`, and you change its playlist (eg. via `addItem`), it requires manually `stop()`ping the video playback before the changes take effect. This doesn't seem to be required on desktop. Looking at the docs of Video and MediaPlayer I didn't found the exact behavior documented either.

      Example code:

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtMultimedia 5.9
      
      Window {
          visible: true
          width: 640; height: 480
          title: qsTr("Hello World")
      
          Timer {
              interval: 100; running: true
              onTriggered: {
                  myvideo.playlist.addItem("qrc:///big_buck_bunny.mp4");
                  // or: myvideo.playlist.addItem("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
                  // or: myvideo.playlist.addItem("file:///storage/emulated/0/big_buck_bunny.mp4");
                  myvideo.play();
              }
          }
      
          Video {
              id: myvideo
              anchors.fill: parent
      
              autoPlay: true
              playlist: Playlist {}
          }
      }
      

      With `autoPlay` set to `false`, the video playback starts after calling `play()` on all platforms. With `true`, this continues to works on desktop (tested: Linux and Windows), but requires calling `stop()` first on Android.

      Attachments

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

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            mmatyas Mátyás Mustoha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes