Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112467
D147.1732319219.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D147.1732319219.diff
View Options
diff --git a/src/contents/ui/event-types/Video.qml b/src/contents/ui/event-types/Video.qml
--- a/src/contents/ui/event-types/Video.qml
+++ b/src/contents/ui/event-types/Video.qml
@@ -7,10 +7,9 @@
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
+import QtMultimedia
import moe.kazv.mxc.kazv 0.0 as MK
-import QtMultimedia 5.15
-
import org.kde.kirigami 2.13 as Kirigami
import '.' as Types
@@ -25,9 +24,10 @@
property var videoUri: matrixSdk.mxcUriToHttp(mxcUri)
property var videoInfo: event.content.info || {}
- property var videoResolution: video.metaData.resolution
+ property var videoResolution: video.metaData.value(MediaMetaData.Resolution)
property var videoWidth: videoResolution && videoResolution.width || (videoInfo.w || 1)
property var videoHeight: videoResolution && videoResolution.height || (videoInfo.h || 1)
+ property var videoMaxHeight: compactMode ? Kirigami.Units.gridUnit * 5 : Infinity
property var thumbnailInfo: videoInfo.thumbnail_info || {}
property var thumbnailMxcUri: videoInfo.thumbnail_url
property var thumbnailUri: matrixSdk.mxcUriToHttp(thumbnailMxcUri)
@@ -53,12 +53,13 @@
source: videoUri
loops: MediaPlayer.Infinite
-
- Layout.minimumHeight: Kirigami.Units.gridUnit * 10
- Layout.minimumWidth: Kirigami.Units.gridUnit * 10
- Layout.maximumWidth: innerContentWidth
- Layout.preferredWidth: videoWidth
- Layout.preferredHeight: videoHeight / videoWidth * width
+ Layout.fillWidth: true
+ property double videoWidth: upper.thumbnailWidth || upper.videoWidth || video.implicitWidth || 1
+ property double videoHeight: upper.thumbnailHeight || upper.videoHeight || video.implicitHeight || 1
+ property double privHeight: Math.min(videoMaxHeight, videoHeight)
+ property double privWidth: privHeight / videoHeight * videoWidth
+ Layout.preferredWidth: privWidth
+ Layout.preferredHeight: width < privWidth ? privHeight / privWidth * width : privHeight
fillMode: VideoOutput.PreserveAspectFit
TapHandler {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 3:46 PM (3 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39011
Default Alt Text
D147.1732319219.diff (2 KB)
Attached To
Mode
D147: Make video playable
Attached
Detach File
Event Timeline
Log In to Comment