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

Add exposure (Android) and ISO+shootingTime (Ios)

Open ktarasenkowow opened this issue 3 years ago • 7 comments

What

Changes

/**

  • Add exposure -100 .. 100 range (It will be cast to posible range)
  • https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setexposurecompensationindex */ exposure?: number;

/**

  • Only IOS
  • Release param ISO. Out of range casting IOS to value = 400
  • https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624646-setexposuremodecustom */ iso?: number;

/**

  • Only IOS
  • Release param shooting time.
  • https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624646-setexposuremodecustom */ shootingTime?: number;

Tested on

Related issues

ktarasenkowow avatar Jul 15 '22 15:07 ktarasenkowow

Hi, thanks for your PR! Is the prop required or not? In your code you provide a default value of 0, what happens if the user doesn't pass one? Is the exposure fixed to 0 then?

mrousavy avatar Jul 18 '22 08:07 mrousavy

Hi, thanks for your PR! Is the prop required or not? In your code you provide a default value of 0, what happens if the user doesn't pass one? Is the exposure fixed to 0 then?

Hi. All new props is not required. For Android 0 exposure will set middle exposure, I thought it is default value but no=). I will add exposureState?.getExposureCompensationStep() for empty exposure with other changes ASAP. Thanks for theme updating =)

ktarasenkowow avatar Jul 18 '22 08:07 ktarasenkowow

I'd just add if (exposure != null) to the if so the exposure will not be set if it's null, no?

mrousavy avatar Jul 18 '22 10:07 mrousavy

Hmm actually what happens if the user passes an exposure value and then passes null again? Will it be updated to default or will it remain to the last one ...

mrousavy avatar Jul 18 '22 10:07 mrousavy

I'd just add if (exposure != null) to the if so the exposure will not be set if it's null, no?

yeah, will do

ktarasenkowow avatar Jul 18 '22 10:07 ktarasenkowow

Hmm actually what happens if the user passes an exposure value and then passes null again? Will it be updated to default or will it remain to the last one ...

Im not sure what it works with dynamically props =(

ktarasenkowow avatar Jul 18 '22 10:07 ktarasenkowow

I have little practice with swift... I have not resolve for some swiftlint errors=)

ktarasenkowow avatar Jul 18 '22 10:07 ktarasenkowow

Hey, are there any plans to finish development of this feature, and is there anything that could be done to contribute?

sohcah avatar Jan 30 '23 22:01 sohcah