diff --git a/lib/src/controllers/chat/ds_video_message_bubble.controller.dart b/lib/src/controllers/chat/ds_video_message_bubble.controller.dart index 1d9af3c6..ec9b65a5 100644 --- a/lib/src/controllers/chat/ds_video_message_bubble.controller.dart +++ b/lib/src/controllers/chat/ds_video_message_bubble.controller.dart @@ -87,13 +87,14 @@ class DSVideoMessageBubbleController { final inputFilePath = await DSFileService.download( url, fileName, - path: mediaPath, httpHeaders: httpHeaders, ); final session = await FFmpegKit.execute( '-hide_banner -y -i "$inputFilePath" "${outputFile.path}"'); + File(inputFilePath!).delete(); + final returnCode = await session.getReturnCode(); if (!ReturnCode.isSuccess(returnCode)) { diff --git a/lib/src/widgets/chat/video/ds_video_player.widget.dart b/lib/src/widgets/chat/video/ds_video_player.widget.dart index e251ab32..6270c36a 100644 --- a/lib/src/widgets/chat/video/ds_video_player.widget.dart +++ b/lib/src/widgets/chat/video/ds_video_player.widget.dart @@ -4,6 +4,8 @@ import 'package:flutter/services.dart'; import 'package:get/get.dart'; import '../../../controllers/ds_video_player.controller.dart'; +import '../../../themes/colors/ds_colors.theme.dart'; +import '../../../themes/icons/ds_icons.dart'; import '../../../themes/system_overlay/ds_system_overlay.style.dart'; import '../../utils/ds_header.widget.dart'; @@ -73,9 +75,15 @@ class DSVideoPlayer extends StatelessWidget { 8.0, 8.0 + MediaQuery.of(context).padding.bottom, ), - child: Chewie( - controller: controller.chewieController!, - ), + child: controller.chewieController == null + ? const Icon( + DSIcons.video_broken_outline, + size: 80.0, + color: DSColors.neutralDarkRooftop, + ) + : Chewie( + controller: controller.chewieController!, + ), ), ), ),