mirror of
https://github.com/status-im/react-native-camera.git
synced 2025-02-24 09:48:17 +00:00
fix(focusWarning): fix focus depth warning being shown for ios.
This commit is contained in:
parent
4b8a4246dd
commit
79698b815b
@ -49,6 +49,7 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
|
|||||||
selector:@selector(orientationChanged:)
|
selector:@selector(orientationChanged:)
|
||||||
name:UIDeviceOrientationDidChangeNotification
|
name:UIDeviceOrientationDidChangeNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
|
self.autoFocus = -1;
|
||||||
// [[NSNotificationCenter defaultCenter] addObserver:self
|
// [[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
// selector:@selector(bridgeDidForeground:)
|
// selector:@selector(bridgeDidForeground:)
|
||||||
// name:EX_UNVERSIONED(@"EXKernelBridgeDidForegroundNotification")
|
// name:EX_UNVERSIONED(@"EXKernelBridgeDidForegroundNotification")
|
||||||
@ -209,7 +210,7 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
|
|||||||
AVCaptureDevice *device = [self.videoCaptureDeviceInput device];
|
AVCaptureDevice *device = [self.videoCaptureDeviceInput device];
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
|
|
||||||
if (device.focusMode != RNCameraAutoFocusOff) {
|
if (self.autoFocus < 0 || device.focusMode != RNCameraAutoFocusOff) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user