Comments (8)
Not sure we're gonna fix this Jehan, it's pretty difficult to manage the camera in such a way taking into consideration how the views are managed by React Native. I'd support your effort to try, but I did a number of optimizations and they didn't seem to help substantially with this particular issue.
from react-native-camera.
@lwansbrough I'd like to try to tackle this. Do you happen to know why it isn't playing nice with react?
I'm observing two behaviors. One for first-open and for re-open.
First-open
- Shows first frame of live feed dim (~150ms)
- Switches to another frame of live feed dim (~100ms)
- Switches to live feed no longer dim
Re-open
- Shows last frame when the camera was last opened (~150ms)
- Switches to live feed dim (~150ms)
- Switches to live feed no longer dim
from react-native-camera.
👍 For getting this fixed. I would help out, but don't have much experience in this area...
from react-native-camera.
Please confirm this is still an issue with the latest version of this module + React Native.
from react-native-camera.
On [email protected]
and [email protected]
First-open
- Shows first frame of live feed dim (~200ms)
- Switches to live feed no longer dim
Re-open
- Shows last frame from first-open and never switches to live feed
- SIGABRT at the line below when capture is called
[self.stillImageOutput captureStillImageAsynchronouslyFromConnection:[self.stillImageOutput connectionWithMediaType:AVMediaTypeVideo] completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {
from react-native-camera.
@lwansbrough Upgraded to both [email protected] and [email protected]
Same as @amccloud above on first open. It is better than it was however (only shows 1 dim frame instead of multiple "stutters").
On re-open, I also see the last frame from first open, however it is only for a few milliseconds (maybe 100-200), then it switches to live feed, and I am able to capture another image and/or video.
from react-native-camera.
@dhrrgn that's weird the re-open doesn't behave the same. I think i've identified the issue.
https://github.com/lwansbrough/react-native-camera/blob/master/ios/RCTCameraManager.m#L19
Prevents RCTCamera from initializing and starting any new sessions. Setting self.camera
to nil when the session stops fixes the issue but i'm not sure that is the intention. Could also call [self.camera.manager startSession];
in #RCTCameraManager.view
from react-native-camera.
@dhrrgn @lwansbrough sorry I actually was on 0.3.7 😢
Everything works like @dhrrgn described.
from react-native-camera.
Related Issues (20)
- android:Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference HOT 1
- Can't Build APK HOT 2
- This package should be archive/remove, as it is not being maintained anymore.
- iPhone 14 Face Detection not Working HOT 6
- Cannot run android with react-native-camera HOT 2
- ViewPropTypes Issue resolved HOT 1
- without mic permission camera does not work
- _$$_REQUIRE(_dependencyMap[17], "react-native-camera").RNCamera
- Chunked recording 3
- Change import to avoid ViewPropTypes error on build
- Camera capturing failed
- minimumFocusDistance HOT 1
- deprecated proptypes
- How to recognize EAN_13+5 barcode?
- Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'., js engine: hermes
- Gradle issue HOT 2
- Create Panoramic Mode React Native
- react-native-camera video is not recording in ios
- react-native-camera not running with updated react-native version HOT 3
- Face comapare
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-camera.