Merge pull request #874 from GetStream/fix/860
fix(ui): fix cast error while compressing video.
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
- SVG rendering fixes
|
- SVG rendering fixes.
|
||||||
- Use file extension instead of mimeType for downloading files
|
- Use file extension instead of mimeType for downloading files.
|
||||||
|
- [[#860]](https://github.com/GetStream/stream-chat-flutter/issues/860) CastError while compressing Videos.
|
||||||
|
|
||||||
✅ Added
|
✅ Added
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
- [[#766]]`AttachmentActionsModal` now has customisation options for actions.
|
- [[#766]](https://github.com/GetStream/stream-chat-flutter/issues/766) `AttachmentActionsModal` now has customisation options for actions.
|
||||||
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
|
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
|
||||||
- Fixed adding attachments on web.
|
- Fixed adding attachments on web.
|
||||||
- [[#767]](https://github.com/GetStream/stream-chat-flutter/issues/767): Fix `MessageInput` focus behaviour when sending messages.
|
- [[#767]](https://github.com/GetStream/stream-chat-flutter/issues/767): Fix `MessageInput` focus behaviour when sending messages.
|
||||||
|
|||||||
@@ -1129,13 +1129,14 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
|
|
||||||
if (file.size! > widget.maxAttachmentSize) {
|
if (file.size! > widget.maxAttachmentSize) {
|
||||||
if (medium.type == AssetType.video && file.path != null) {
|
if (medium.type == AssetType.video && file.path != null) {
|
||||||
final mediaInfo = await (VideoService.compressVideo(
|
final mediaInfo = await VideoService.compressVideo(
|
||||||
file.path!,
|
file.path!,
|
||||||
frameRate: widget.compressedVideoFrameRate,
|
frameRate: widget.compressedVideoFrameRate,
|
||||||
quality: widget.compressedVideoQuality,
|
quality: widget.compressedVideoQuality,
|
||||||
) as FutureOr<MediaInfo>);
|
);
|
||||||
|
|
||||||
if (mediaInfo.filesize! > widget.maxAttachmentSize) {
|
if (mediaInfo == null ||
|
||||||
|
mediaInfo.filesize! > widget.maxAttachmentSize) {
|
||||||
_showErrorAlert(
|
_showErrorAlert(
|
||||||
context.translations.fileTooLargeAfterCompressionError(
|
context.translations.fileTooLargeAfterCompressionError(
|
||||||
widget.maxAttachmentSize / (1024 * 1024),
|
widget.maxAttachmentSize / (1024 * 1024),
|
||||||
|
|||||||
Reference in New Issue
Block a user