summary refs log tree commit diff
path: root/resources/qml/delegates
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-10-06 01:05:32 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:06:15 +0100
commit67d255a2de7ca85b35a67bff25ef9b6770b453a0 (patch)
treeb509b4a3b9abaac365c59fcad0891202dee08b0e /resources/qml/delegates
parentAdd progress bar to audio messages (diff)
downloadnheko-67d255a2de7ca85b35a67bff25ef9b6770b453a0.tar.xz
Add basic video messages
Size is fixed for now, otherwise the Video output ends up somewhere...
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml (renamed from resources/qml/delegates/AudioMessage.qml)12
1 files changed, 12 insertions, 0 deletions
diff --git a/resources/qml/delegates/AudioMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml

index f4fa8f54..7498d5b2 100644 --- a/resources/qml/delegates/AudioMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -3,6 +3,8 @@ import QtQuick.Layouts 1.6 import QtQuick.Controls 2.5 import QtMultimedia 5.6 +import com.github.nheko 1.0 + Rectangle { radius: 10 color: colors.dark @@ -14,6 +16,15 @@ Rectangle { width: parent.width - 24 anchors.centerIn: parent + VideoOutput { + visible: eventData.type == MtxEvent.VideoMessage + Layout.maximumHeight: 300 + Layout.minimumHeight: 300 + Layout.maximumWidth: 500 + fillMode: VideoOutput.PreserveAspectFit + source: media + } + RowLayout { Text { id: positionText @@ -91,6 +102,7 @@ Rectangle { id: media onError: console.log(errorString) onStatusChanged: if(status == MediaPlayer.Loaded) progress.updatePositionTexts() + autoPlay: true } Connections {