Issue: Camera recordAsync call stop immediately

Hi, I need help with the expo camera to record video. when I call the recordAsync it will immediately stop recording somehow without me calling stopRecording.

Current Behavior:

  • tap on record button. start recording
  • will show error message (fail to stop error) or will call finish recording (console log show file uri and vibrate)
  • if not error, then show stop button with black screen behind?

Expected Behavior:

  • tap on record button, start recording
  • button change to stop, screen keep on recording
  • tap on stop button, console log show file uri and vibration meaning finish recording

I tried to create a snack project with my code:
https://snack.expo.io/@adhicl/camera-record-bug-test

Can anyone help with why this is happening? Maybe I missed something.
Thanks before.

hey! for some reason I can’t reproduce the error with the snack, I just got the black screen when I started recording. to fix that I just changed the view that covers most of the screen to be transparent.

<View
  style={{
    flex: 0.9,
    justifyContent: 'flex-end',
    backgroundColor: 'transparent'
  }}
>

other than that the video seemed to be recording fine, I opened it up in xde and it returned the file uri when I stopped recording. is there any unique thing that you do that causes it to error? on the first app open? interacting with other buttons?

Hi @samee. No, there is no other thing I do or change. I am testing in evercoss A65 and android v 6.0.1 . Is it affecting?
Update:
I somehow manage to make it work. What I do is adding all the view (inside the camera tag) one by one. It finally does not call stop when I make sure that the nested view is not too deep. (three layer nested view most), if more than it will generally call the stop immediately somehow.:slightly_frowning_face:
As a note, I can have many layer of nested view if not inside camera normally on other projects. :confused:

2 Likes