Open smalltask opened 1 year ago
private func autoFocusModel() {
guard let device = AVCaptureDevice.default(for: .video) else { return }
guard device.hasTorch else { return }
do {
try device.lockForConfiguration();
if(device.isFocusPointOfInterestSupported && device.isFocusModeSupported(.continuousAutoFocus)) {
device.focusPointOfInterest = self.center
device.focusMode = .continuousAutoFocus
}
device.unlockForConfiguration();
} catch {
print(error);
}
}
Environment
Flutter version: 3.13.4 Plugin version:
Android version:
iOS version: 17.0 Xcode version: 15.0 Device information:** iOS XS MAX
there have no 'auto focus' feature