mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-23 20:49:26 +01:00
chore: fix Video audio filename
This commit is contained in:
parent
89f32bd4c3
commit
c535e6fe41
@ -66,7 +66,7 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
await widget.event.downloadAndDecryptAttachmentCached();
|
||||
if (matrixFile == null) throw ('Download failed');
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final fileName = widget.event.infoMap['url'] as String;
|
||||
final fileName = widget.event.content.tryGet<String>('url')!;
|
||||
final file = File('${tempDir.path}/$fileName');
|
||||
await file.writeAsBytes(matrixFile.bytes);
|
||||
|
||||
|
@ -41,7 +41,7 @@ class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
_networkUri = html.Url.createObjectUrlFromBlob(blob);
|
||||
} else {
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final fileName = widget.event.infoMap['url'] as String;
|
||||
final fileName = widget.event.content.tryGet<String>('url')!;
|
||||
final file = File('${tempDir.path}/$fileName');
|
||||
if (await file.exists() == false) {
|
||||
await file.writeAsBytes(videoFile.bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user