diff options
author | link2xt <link2xt@testrun.org> | 2021-05-30 06:44:02 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-05-30 06:44:11 +0300 |
commit | d44186f57dfe269d168edb5a6b3e4e29d7bb157c (patch) | |
tree | 70b718c30610261f60dcfc6852dd28ac1e5ba667 /qml/Message.qml | |
parent | 69ff191c83e5277cfe22d3735e9ac2f0256be3c5 (diff) | |
download | kdeltachat-d44186f57dfe269d168edb5a6b3e4e29d7bb157c.tar.gz kdeltachat-d44186f57dfe269d168edb5a6b3e4e29d7bb157c.zip |
Add video viewer
Diffstat (limited to 'qml/Message.qml')
-rw-r--r-- | qml/Message.qml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/qml/Message.qml b/qml/Message.qml index 68b2979..6346124 100644 --- a/qml/Message.qml +++ b/qml/Message.qml @@ -83,6 +83,29 @@ RowLayout { } Component { + id: videoMessageView + + ColumnLayout { + MediaPlayer { + id: videoplayer + source: Qt.resolvedUrl("file:" + messageObject.message.file) + } + VideoOutput { + source: videoplayer + } + Label { + font.bold: true + text: "Video" + textFormat: Text.PlainText + } + Button { + text: "play" + onPressed: videoplayer.play() + } + } + } + + Component { id: textMessageView Label { @@ -131,7 +154,9 @@ RowLayout { Loader { sourceComponent: [20, 21, 23].includes(messageObject.message.viewtype) ? imageMessageView - : [40, 41].includes(messageObject.message.viewtype) ? audioMessageView : textMessageView + : [40, 41].includes(messageObject.message.viewtype) ? audioMessageView + : [50].includes(messageObject.message.viewtype) ? videoMessageView + : textMessageView } // Quote |