Camera not stoping recording. promise not resolved

#1

Hello,
I’m having some problems handling the camera object:

I have a camera object that I start recording (recordAsync) at componentDidMount and I stop it (stopRecording) at componentWillUnmount. however the promise is never resolved (neither the then, catch no finally are called)

am I doing something wrong?

thanks in advance

#2

Hey @ggaspar,

Can you share your code in a Snack so we can try and debug it?

Cheers,

Adam

#3

thanks for your reply.
here you go, a simplified version of it. I’m testing it using an iPhone 6.
In this example I used a maxDuration:2. But I get the same outcome if I use the stopRecording

cheers

[EDIT] : this code is quite different form the one described in the original post, but it’s simpler, and the problem is still happening

#4

my current suspicion is that we can’t start recording directly when a component is rendered. An by ‘directly’ I mean without any further action from the user.

If I do it in two steps (p.e. waiting for the user to click somewhere), if works perfectly. But I don’t see any reference to this behaviour / limitation in the documentation.

closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.