feat: Enable compression and thumbnails for videos

This commit is contained in:
Christian Pauly 2021-12-27 13:01:51 +01:00
commit ab9d7fcc7d
6 changed files with 72 additions and 7 deletions

View file

@ -38,6 +38,9 @@ class _SendFileDialogState extends State<SendFileDialog> {
file.bytes.length > minSizeToCompress) {
file = await file.resizeImage();
}
if (file is MatrixVideoFile && file.bytes.length > minSizeToCompress) {
file = await file.resizeVideo();
}
await widget.room.sendFileEventWithThumbnail(file);
}