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