chore: Follow up fix Play audio and video messages

This commit is contained in:
Krille Fear 2022-01-28 18:41:24 +01:00
commit 130b58b24a
2 changed files with 4 additions and 3 deletions

View file

@ -41,7 +41,7 @@ class _EventVideoPlayerState extends State<EventVideoPlayer> {
_networkUri = html.Url.createObjectUrlFromBlob(blob);
} else {
final tempDir = await getTemporaryDirectory();
final fileName = widget.event.content.tryGet<String>('url')!;
final fileName = widget.event.attachmentOrThumbnailMxcUrl()!.toString();
final file = File('${tempDir.path}/$fileName');
if (await file.exists() == false) {
await file.writeAsBytes(videoFile.bytes);