import Qt 4.7 import QtMultimediaKit 1.1 import "../components" Rectangle { id: view property alias source1: video.source property bool exiting: false function start() { video.play(); } width: 360 height: 640 color: "#1d1c3e" TextButton { id: increaseSpeed text: "Speed +" anchors { bottom: video.top; horizontalCenter: video.horizontalCenter; bottomMargin: 5 } onClicked: { video.playbackRate = video.playbackRate + 0.5 } } Video { id: video x: 50 y: 150 z: 1 width: 250 height: 250 source: "" autoLoad: false volume: 0.25 onStopped: { if (!exiting) { play() } } } Text{ id: speedLabel color: "white" font.pointSize: 8 anchors { top: video.bottom; horizontalCenter: video.horizontalCenter; topMargin: 5} text: "playbackSpeed: x" + video.playbackRate } Text{ id: positionLabel color: "white" font.pointSize: 8 anchors { top: speedLabel.bottom; horizontalCenter: video.horizontalCenter; topMargin: 5} text: "position: " + video.position } TextButton { id: decreaseSpeed text: "Speed -" anchors { top: positionLabel.bottom; horizontalCenter: video.horizontalCenter; topMargin: 5 } onClicked: { video.playbackRate = video.playbackRate - 0.5 } } TextButton { id: exitButton text: "Exit" anchors { top: parent.top; right: parent.right; margins: 10 } onClicked: { exiting = true video.stop() app.close() } } }