download audio and video using gomuks

This commit is contained in:
Henry Hiles 2026-07-27 15:46:08 -04:00
commit 16fdf0c420
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
6 changed files with 52 additions and 35 deletions

View file

@ -226,10 +226,25 @@ class MessageRenderer extends ConsumerWidget {
ConstrainedBox(
constraints: .loose(.square(500)),
child: switch (event.content) {
VideoMessageContent(:final info) =>
VideoPlayer(url, info),
AudioMessageContent(:final info) =>
AudioPlayer(url, info),
VideoMessageContent(
:final info,
:final file,
) =>
VideoPlayer(
url,
info,
encrypted: file != null,
),
AudioMessageContent(
:final info,
:final file,
) =>
AudioPlayer(
url,
info,
encrypted: file != null,
),
FileMessageContent(
:final info,
:final filename,