react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

❓ proper way to handle afterimage when re-enabling camera component

Open jpike88 opened this issue 3 years ago • 1 comments

Question

I have my camera component using @react-navigation/native-stack. When the recording is stopped, another view is pushed on the stack. The camera component isActive is then set to false using the useIsFocused hook. If I pop that new view and come back to the camera component, there's a short delay where the last image shows before the camera 'resets' and starts showing the current camera stream.

What's the recommended/official way of avoiding this without doing something ugly (i.e. destroying camera component, or using some sort of obscuring view with a timeout?)

What I tried

No response

VisionCamera Version

2.14.0

Additional information

jpike88 avatar Jul 20 '22 14:07 jpike88

Hey, I'm guessing that's just the delay of the camera - can't really do much about that. Maybe your screen is frozen (react-freeze)?

mrousavy avatar Jul 20 '22 14:07 mrousavy

Question

I have my camera component using @react-navigation/native-stack. When the recording is stopped, another view is pushed on the stack. The camera component isActive is then set to false using the useIsFocused hook. If I pop that new view and come back to the camera component, there's a short delay where the last image shows before the camera 'resets' and starts showing the current camera stream.

What's the recommended/official way of avoiding this without doing something ugly (i.e. destroying camera component, or using some sort of obscuring view with a timeout?)

What I tried

No response

VisionCamera Version

2.14.0

Additional information

How did you managed to get the camera, all I am getting is black screen only. Can you help?

hardikcc avatar Sep 29 '22 13:09 hardikcc

Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.

mrousavy avatar Sep 30 '23 09:09 mrousavy