Reputation: 45
I’m using Flutter's camera
plugin but need more control over native camera settings like:
LENS_FOCUS_DISTANCE
)LENS_OPTICAL_STABILIZATION_MODE
)The camera
plugin doesn't expose these controls, but I need to modify them for both Android (Camera2 API) and iOS (AVFoundation). I've successfully implemented these changes on iOS, but I’m stuck on Android because the plugin creates its own CaptureRequest instance, which I can't access.
iOS
device.setFocusModeLocked(lensPosition: distance) { (time) in
device.unlockForConfiguration()
}
Android
captureRequestBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, distance);
I’m stuck on Android because the plugin creates its own CaptureRequest instance, which I can't access.
Has anyone worked on a similar solution or found a workaround for this?
Upvotes: 1
Views: 68