Closed itsMatoosh closed 1 year ago
Is the behavior both on Android and iOS? Were you recording a large video or just a small one is enough to reproduce the issue?
I just pushed a fix on the branch video_record_future if you want to try it.
A new example is available in the example
folder named custom_ui_example_3.dart
.
In this one, the media preview plays automatically the video when the recording is finished (and ready to be played).
I don't have an iOS device so it might have a different behavior there.
Notes:
stopRecording()
is now a Future that you can await
before showing the picture.mediaCapture$
stream emits a new event with MediaCaptureStatus.success
, the video is ready to be played (that's how it's used in the example)Hi so the problem was happening on Android but your change resolved it. Thank you! Now video works very well for this use case.
Perfect! I'll wait for the branch to be merged into master before closing. We'll also try to check and eventually correct iOS behaviour.
In our app we need to show the users a preview of the video they just recorded right after they finish recording. Currently the
cameraState.stopRecording()
future resolves before the video file is fully saved on the device so it's not possible to read it and play the preview. Is there another way to get notified when the video file is saved?