summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml')
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml
new file mode 100644
index 000000000..5e2584fb6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml
@@ -0,0 +1,36 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property string contentType: "video"
+ contentWidth: parent.width
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: "video"
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ SeekControl {
+ anchors {
+ left: parent.left
+ right: parent.right
+ margins: 10
+ bottom: parent.bottom
+ }
+ // qmllint disable
+ duration: content.contentItem?.duration ?? 0
+ playPosition: content.contentItem?.position ?? 0
+ onSeekPositionChanged: content.contentItem?.seek(seekPosition);
+ // qmllint enable
+ }
+
+ Component.onCompleted: root.content = content
+}