fix: Fix focus(..)
on iOS (#2220)
This commit is contained in:
parent
7047686ff9
commit
d78798ff84
@ -12,7 +12,8 @@ import Foundation
|
||||
extension CameraView {
|
||||
func focus(point: CGPoint, promise: Promise) {
|
||||
withPromise(promise) {
|
||||
try cameraSession.focus(point: point)
|
||||
let normalized = previewView.captureDevicePointConverted(fromLayerPoint: point)
|
||||
try cameraSession.focus(point: normalized)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ extension CameraSession {
|
||||
throw CameraError.device(DeviceError.focusNotSupported)
|
||||
}
|
||||
|
||||
ReactLogger.log(level: .info, message: "Focusing (\(point.x), \(point.y))...")
|
||||
|
||||
do {
|
||||
try device.lockForConfiguration()
|
||||
defer {
|
||||
|
Loading…
Reference in New Issue
Block a user