feat(ios): check if white balance mode locked is supported

This commit is contained in:
René Fischer 2020-03-23 12:38:07 +01:00
parent 8c2100dd63
commit f4965cfc3d

View File

@ -612,9 +612,8 @@ BOOL _sessionInterrupted = NO;
return;
}
if (self.whiteBalance == RNCameraWhiteBalanceAuto) {
if (self.whiteBalance == RNCameraWhiteBalanceAuto || ![device isWhiteBalanceModeSupported:AVCaptureWhiteBalanceModeLocked]) {
[device setWhiteBalanceMode:AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance];
[device unlockForConfiguration];
} else {
AVCaptureWhiteBalanceGains rgbGains;
if (self.whiteBalance == RNCameraWhiteBalanceCustom