diff --git a/lib/src/views/camera/camera_preview_view.dart b/lib/src/views/camera/camera_preview_view.dart index bf99a90..2133694 100644 --- a/lib/src/views/camera/camera_preview_view.dart +++ b/lib/src/views/camera/camera_preview_view.dart @@ -365,6 +365,13 @@ class _CameraPreviewViewState extends State { sharePreviewIsShown = true; }); XFile? videoPath = await controller?.stopVideoRecording(); + if (videoPath != null) { + if (Platform.isAndroid) { + // see https://github.com/flutter/flutter/issues/148335 + await File(videoPath.path).rename("${videoPath.path}.mp4"); + videoPath = XFile("${videoPath.path}.mp4"); + } + } await controller?.pausePreview(); if (await pushMediaEditor(null, videoPath)) { return;