Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0, 5.9.6
-
None
-
B801, Android 7.0, armeabi-v7a
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.