Video shows "no content"!
Solved
QML and Qt Quick
-
Hello, I try to use video item to play .flv video. However, the result shows "no content". The code is as following:
Video { id: video1; anchors.fill: parent; source: "rafael.flv"; MouseArea { anchors.fill: parent; onClicked: { if(video1.hasVideo){ video1.play(); } else{ console.log("no content"); } } } focus: true; Keys.onSpacePressed: video1.playbackState == MediaPlayer.PlayingState ? video1.pause() : video1.play(); Keys.onLeftPressed: video1.seek(video1.position - 5000); Keys.onRightPressed: video1.seek(video1.position + 5000); }
Could anyone tell me the reason? Thanks in advance!
-
Hi,
That's a relative path, are you sure it's in the same folder as the executable ?
-
@small_bird I have knowed that I have to install DirectShow on my OS!!