Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
947 stars 234 forks source link

Video file saving inconsistent #179

Closed itsMatoosh closed 1 year ago

itsMatoosh commented 1 year ago

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?

apalala-dev commented 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?

apalala-dev commented 1 year ago

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:

itsMatoosh commented 1 year ago

Hi so the problem was happening on Android but your change resolved it. Thank you! Now video works very well for this use case.

apalala-dev commented 1 year ago

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.