aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigorii Zimin <gzimin@luxoft.com>2020-04-04 00:57:06 +0300
committerGrigorii Zimin <gzimin@luxoft.com>2020-04-06 13:24:08 +0000
commit46e58fc261b08ebc8d6fee87a0d84eb03f5aa2d4 (patch)
tree835a521fa8bf3c99f3b0781cf0fb981489bcf5a8
parent19b32961720cd5b8116a060019888eb7bfcf3855 (diff)
[videoplayer] add a warning for the empty video broadcasting screen
Change-Id: I46a98aa5810b4b29390002d8da83081e9732fa0b Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
-rw-r--r--com.luxoft.videoplayer/VideoPlayerPanel.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/com.luxoft.videoplayer/VideoPlayerPanel.qml b/com.luxoft.videoplayer/VideoPlayerPanel.qml
index 71be88f..86e1d6a 100644
--- a/com.luxoft.videoplayer/VideoPlayerPanel.qml
+++ b/com.luxoft.videoplayer/VideoPlayerPanel.qml
@@ -33,13 +33,21 @@ import QtQuick 2.12
import QtQuick.Controls 2.12
import QtMultimedia 5.12
+import shared.Sizes 1.0
+import shared.com.pelagicore.systeminfo 1.0
+
import "utils.js" as Utils
Rectangle {
+ id: root
+
implicitWidth: 800
implicitHeight: 600
color: "black"
+ readonly property SystemInfo systemInfo: SystemInfo {}
+ readonly property bool showWarning: systemInfo.allowOpenGLContent
+
Video {
id: videoplayer
anchors.fill: parent
@@ -96,4 +104,13 @@ Rectangle {
onFileOpenRequested: videoplayer.source = fileURL
}
}
+
+ Label {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.verticalCenterOffset: -Sizes.dp(50)
+ text: qsTr("Video is not shown in this runtime environment")
+ font.pixelSize: Sizes.fontSizeL
+ visible: !root.showWarning
+ }
}