summaryrefslogtreecommitdiffstats
path: root/resources/qml/delegates/PlayableMediaMessage.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-10-08 20:55:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:06:15 +0100
commitb9076c5c4d1beb7ff4cb4a2db8e6eb4e7f5b0dcd (patch)
tree8634fb6e105b083aef4339ad96f8f3ada2deb660 /resources/qml/delegates/PlayableMediaMessage.qml
parent7f4175216538fab6d08a0d44b280a3a70f465734 (diff)
Try out DelegateChooser
requires Qt5.12+
Diffstat (limited to 'resources/qml/delegates/PlayableMediaMessage.qml')
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 2385c750..c716d21d 100644
--- a/resources/qml/delegates/PlayableMediaMessage.qml
+++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -17,7 +17,7 @@ Rectangle {
anchors.centerIn: parent
VideoOutput {
- visible: eventData.type == MtxEvent.VideoMessage
+ visible: model.type == MtxEvent.VideoMessage
Layout.maximumHeight: 300
Layout.minimumHeight: 300
Layout.maximumWidth: 500
@@ -85,7 +85,7 @@ Rectangle {
anchors.fill: parent
onClicked: {
switch (button.state) {
- case "": timelineManager.cacheMedia(eventData.url, eventData.mimetype); break;
+ case "": timelineManager.cacheMedia(model.url, model.mimetype); break;
case "stopped":
media.play(); console.log("play");
button.state = "playing"
@@ -107,7 +107,7 @@ Rectangle {
Connections {
target: timelineManager
onMediaCached: {
- if (mxcUrl == eventData.url) {
+ if (mxcUrl == model.url) {
media.source = "file://" + cacheUrl
button.state = "stopped"
console.log("media loaded: " + mxcUrl + " at " + cacheUrl)
@@ -132,14 +132,14 @@ Rectangle {
Text {
Layout.fillWidth: true
- text: eventData.body
+ text: model.body
textFormat: Text.PlainText
elide: Text.ElideRight
color: colors.text
}
Text {
Layout.fillWidth: true
- text: eventData.filesize
+ text: model.filesize
textFormat: Text.PlainText
elide: Text.ElideRight
color: colors.text