Git Product home page Git Product logo

Comments (16)

philolo1 avatar philolo1 commented on September 21, 2024 1

@gran33 sorry wrong issue.

from react-native-camera-kit.

philolo1 avatar philolo1 commented on September 21, 2024 1

@gran33 so you can do something like that:

<CameraKitCamera
      ref={(cam) => {
        window.camera = cam;
      }}
      style={{
        width: Dimensions.get('window').width,
        height: Dimensions.get('window').width
      }}
      cameraOptions={{
        flashMode: 'off',             // on/off/auto(default)
        focusMode: 'on',               // off/on(default)
        zoomMode: 'on',                // off/on(default)
        ratioOverlay: '1:1',            // optional, ratio overlay on the camera and crop the image seamlessly
        ratioOverlayColor: '#00000077' // optional
      }}
    />

if you on your iphone try to make a photo on very black background (put your phone on a desk for example), it uses the flash.

I think a fix could be the following:

In CKCamera.m you are using

            [CKCamera setFlashMode:AVCaptureFlashModeAuto forDevice:self.videoDeviceInput.device];

instead you should be using

            [CKCamera setFlashMode:self.flashMode forDevice:self.videoDeviceInput.device];

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

@faisalkanji did u try on a real device?

from react-native-camera-kit.

faisalkanji avatar faisalkanji commented on September 21, 2024

Hi @gran33 yes I tried it on a real device

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

And? I tried it as well, and seems to work fine.
U r trying to take a photo without flash, right?

from react-native-camera-kit.

faisalkanji avatar faisalkanji commented on September 21, 2024

from react-native-camera-kit.

philolo1 avatar philolo1 commented on September 21, 2024

I have the same issue even on ios

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

@philolo1 Can u please explain how to reproduce?

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

Good news, thanks.
Did u check on Android or iOS?

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

@philolo1 Does it reproduce after u flip from back camera -> front -> back?

from react-native-camera-kit.

philolo1 avatar philolo1 commented on September 21, 2024

@gran33 you mean in the not modified code? Yes its the same issue, because there is also some code that sets it to automode, instead of the mode it is currently in. I would also expect it to be be the same mode as the other camera.

from react-native-camera-kit.

gran33 avatar gran33 commented on September 21, 2024

@philolo1 Thanks for everything! I fixed that and published to npm (fixed iOS only). See here:
f7260eb

@yedidyak can u please take a look on Android?

from react-native-camera-kit.

FlaviooLima avatar FlaviooLima commented on September 21, 2024

[Android Only] Can confirm this happening in react-native-camera-kit V6.2.4

from react-native-camera-kit.

semreh84 avatar semreh84 commented on September 21, 2024

Hi, i am having the same issue in react-native-camera-kit V8.0.4, in android i have the code below
<CameraKitCamera
ref={cam => this.camera = cam}
style={styles.camera}
cameraOptions={{
flashMode: 'off',
focusMode: 'off',
zoomMode: 'off',
}}
/>

and the flash is in mode 'auto' when use the camera.

from react-native-camera-kit.

linoleum00 avatar linoleum00 commented on September 21, 2024

Hello, any update on this ?? also using react-native-camera-kit V8.0.4

from react-native-camera-kit.

scarlac avatar scarlac commented on September 21, 2024

The android part of the library will be rewritten using Google's new CameraX library. This should solve some of the issues, or at least have a capable party finding bugs :)

from react-native-camera-kit.

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.