Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.3.2, 6.5.0, dev
-
None
-
-
9830f6593 (dev), 1d326406c (6.5)
Description
Changes of properties 'error', 'errorString' of MediaPlayer and Video controls are not notified. So they can't be normally used in QML bindings.
Sample code:
import QtQuick import QtQuick.Window import QtQuick.Layouts import QtQuick.Controls import QtQuick.Dialogs import QtMultimedia Window { width: 640 height: 480 visible: true FileDialog { id: fileDialog onAccepted: { console.log('Error before play: ' + video.error + ' (' + video.errorString + ')' ) video.source = fileDialog.selectedFile video.play() console.log('Error after play: ' + video.error + ' (' + video.errorString + ')' ) } } ColumnLayout { anchors.fill: parent Button { text: 'Open video' onClicked: fileDialog.open() } Video { id: video Layout.fillWidth: true Layout.fillHeight: true source: 'file:some_not_existent_video.mp4' onErrorChanged: console.log('Error changed: ' + error + ' (' + errorString + ')' ) } Text { Layout.fillWidth: true text: 'Playback error: ' + video.error + ' (' + video.errorString + ')' } } }
See full example VideoIssue.zip
Steps to reproduce:
1. Build and run attached project
2. Observe output and the error displayed at the bottom of window
3. Open any valid video, observe output and the error displayed at the bottom of window
Actual results: after opening valid video file, the error is still displayed at the bottom of the window
Expected results: after opening valid video file, no error is displayed at the bottom of the window
The issue seems cross-platform, i.e. it's reproduced no matter which actually multimedia backend is used.
Tested on macOS and Windows.