QML视频显示“没有内容”!

时间:2017-09-06 11:35:46

标签: qt qml

我尝试使用视频项播放.flv视频。但是,结果显示“没有内容”。代码如下:

 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);
    }

谁能告诉我原因?提前谢谢!

0 个答案:

没有答案