diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-10-23 20:49:43 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-10-23 20:49:43 -0400 |
commit | 769f269c83a2b9a6bcc6407380fe8c55e30b2476 (patch) | |
tree | bbf31ae431a0e95a7c7191108fa05d5c9ebff7dc /src-qt5/src-qml/test/Video.qml | |
parent | Fixed issue with setting defaults in lumina-open and cleaned up main.cpp (diff) | |
download | lumina-769f269c83a2b9a6bcc6407380fe8c55e30b2476.tar.gz lumina-769f269c83a2b9a6bcc6407380fe8c55e30b2476.tar.bz2 lumina-769f269c83a2b9a6bcc6407380fe8c55e30b2476.zip |
Added some test qml file for the video screensaver
Diffstat (limited to 'src-qt5/src-qml/test/Video.qml')
-rw-r--r-- | src-qt5/src-qml/test/Video.qml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src-qt5/src-qml/test/Video.qml b/src-qt5/src-qml/test/Video.qml new file mode 100644 index 00000000..e7d0626d --- /dev/null +++ b/src-qt5/src-qml/test/Video.qml @@ -0,0 +1,50 @@ +import QtQuick 2.0 +import QtMultimedia 5.7 +import QtQuick.Window 2.2 +import Qt.labs.folderlistmodel 2.1 + +Rectangle { + //width: Screen.width + //height: Screen.height + width: 800 + height: 600 + color: "black" + + FolderListModel { + id: folderModel + folder: "/usr/local/videos" + } + + Repeater { + model: folderModel + Component { + Item { + Component.onCompleted: { playlist.addItem(fileURL) } + } + } + } + + Playlist { + id: playlist + playbackMode: Playlist.Random + PlaylistItem { source: "/" } + onError: { console.log("ERROR") } + } + + MediaPlayer { + id: player + autoPlay: true + playlist: playlist + } + + VideoOutput { + id: videoOutput + source: player + anchors.fill: parent + } + + Component.onCompleted: { + playlist.shuffle() + console.log(playlist.itemCount) + } +} |