Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.0 RC
-
None
-
-
627c0df99cd2bd5e0c66bf8b904bb9dc82f1ea98 (qt/qtmultimedia/dev) e92c867e805202defce668f170fb47526dc31305 (qt/qtmultimedia/6.2) 702dbfc7c293066a0ac4b6de9208faa7f7b81939 (qt/qtmultimedia/6.2.0)
Description
The MediaPlayer QML type documentation provides one code example using VideoOutput as a UI component to render the video that is played.
However, the VideoOutput QML component doesn't have the source property anymore, making that example incorrect.
Incorrect example:
Item {
MediaPlayer {
id: mediaplayer
source: "groovy_video.mp4"
}
VideoOutput {
anchors.fill: parent
source: mediaplayer
}
MouseArea {
id: playArea
anchors.fill: parent
onPressed: mediaplayer.play();
}
}
Here is a suggestion of revised version:
import QtQuick import QtMultimedia Window { width: 1024 height: 768 visible: true MediaPlayer { id: player source: "file:groovy_video.mp4" audioOutput: AudioOutput {} videoOutput: videoOutput } VideoOutput { id: videoOutput anchors.fill: parent } MouseArea { id: playArea anchors.fill: parent onPressed: player.play(); } }