Enable local echoes for media uploads on development builds. (#3514)

* Enable local echoes for media uploads on development builds.
* Use media sizes when loading timeline items so they can take advantage of the cached local echo data.
This commit is contained in:
Stefan Ceriu
2024-11-14 18:33:37 +02:00
committed by GitHub
parent 5aadf4e65b
commit 7e192b7571
14 changed files with 149 additions and 84 deletions
@@ -260,10 +260,9 @@ enum RoomTimelineItemFixtures {
content: .init(filename: "video.mp4",
duration: 100,
source: .init(url: .picturesDirectory, mimeType: nil),
thumbnailSource: .init(url: .picturesDirectory, mimeType: nil),
width: 1920,
height: 1080,
size: .init(width: 1920, height: 1080),
aspectRatio: 1.78,
thumbnailSource: .init(url: .picturesDirectory, mimeType: nil),
blurhash: "KtI~70X5V?yss9oyrYs:t6")),
ImageRoomTimelineItem(id: .randomEvent,
timestamp: "10:47 am",
@@ -274,10 +273,9 @@ enum RoomTimelineItemFixtures {
sender: .init(id: ""),
content: .init(filename: "image.jpg",
source: .init(url: .picturesDirectory, mimeType: nil),
thumbnailSource: nil,
width: 5120,
height: 3412,
size: .init(width: 5120, height: 3412),
aspectRatio: 1.5,
thumbnailSource: nil,
blurhash: "KpE4oyayR5|GbHb];3j@of"))
]
}