Ensure custom exposure mode is supported

This commit is contained in:
Ivan Malison 2024-10-09 17:59:22 -06:00
parent 58714f9dac
commit 0faaf5d74c

View File

@ -198,8 +198,12 @@ extension CameraSession {
guard let captureDevice = AVCaptureDevice.default(for: .video) else {
print("No capture device available")
return
}
}
guard captureDevice.isExposureModeSupported(.custom) else {
ReactLogger.log(level: .info, message: "Custom exposure mode not supported")
return
}
do {
// Lock the device for configuration
try captureDevice.lockForConfiguration()