From 46e58fc261b08ebc8d6fee87a0d84eb03f5aa2d4 Mon Sep 17 00:00:00 2001 From: Grigorii Zimin Date: Sat, 4 Apr 2020 00:57:06 +0300 Subject: [videoplayer] add a warning for the empty video broadcasting screen Change-Id: I46a98aa5810b4b29390002d8da83081e9732fa0b Reviewed-by: Egor Nemtsev --- com.luxoft.videoplayer/VideoPlayerPanel.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 + } } -- cgit v1.2.3