Code Monkey home page Code Monkey logo

Comments (8)

lwansbrough avatar lwansbrough commented on May 16, 2024

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.

amccloud avatar amccloud commented on May 16, 2024

@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.

dhrrgn avatar dhrrgn commented on May 16, 2024

👍 For getting this fixed. I would help out, but don't have much experience in this area...

from react-native-camera.

lwansbrough avatar lwansbrough commented on May 16, 2024

Please confirm this is still an issue with the latest version of this module + React Native.

from react-native-camera.

amccloud avatar amccloud commented on May 16, 2024

@lwansbrough

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.

dhrrgn avatar dhrrgn commented on May 16, 2024

@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.

amccloud avatar amccloud commented on May 16, 2024

@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.

amccloud avatar amccloud commented on May 16, 2024

@dhrrgn @lwansbrough sorry I actually was on 0.3.7 😢

Everything works like @dhrrgn described.

from react-native-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.