+import QtCamera 1.0
+import QtCameraExtras 1.0
+
+Item {
+ id: page
+
+ signal finished
+ property alias source: video.source
+
+ function play() {
+ return video.play()
+ }
+
+ function stop() {
+ return video.stop()
+ }
+
+ MouseArea {
+ anchors.top: parent.top
+ anchors.bottom: toolBar.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ onClicked: toolBar.show = !toolBar.show
+ }
+
+ Timer {
+ id: hideTimer
+ running: toolBar.show
+ interval: 3000
+ onTriggered: toolBar.show = false
+ }
+
+ VideoPlayer {
+ id: video
+ anchors.fill: parent
+ cameraConfig: camera.cameraConfig
+
+ onError: showError(qsTr("Error playing video. Please try again or restart the application"))
+
+ function toggle() {
+ if (state != VideoPlayer.StatePaused) {
+ video.pause()
+ } else {
+ page.play()
+ }
+ }