fix: Expose minExposure
/maxExposure
in format
(#2179)
* fix: Expose `minExposure`/`maxExposure` in `format` I forgot to do that on iOS before * Update CameraDeviceFormat.swift
This commit is contained in:
@@ -187,14 +187,14 @@ extension CameraSession {
|
||||
|
||||
ReactLogger.log(level: .info, message: "Configuring Format (\(targetFormat))...")
|
||||
|
||||
let currentFormat = CameraDeviceFormat(fromFormat: device.activeFormat)
|
||||
let currentFormat = CameraDeviceFormat(fromFormat: device.activeFormat, forDevice: device)
|
||||
if currentFormat == targetFormat {
|
||||
ReactLogger.log(level: .info, message: "Already selected active format, no need to configure.")
|
||||
return
|
||||
}
|
||||
|
||||
// Find matching format (JS Dictionary -> strongly typed Swift class)
|
||||
let format = device.formats.first { targetFormat.isEqualTo(format: $0) }
|
||||
let format = device.formats.first { targetFormat.isEqualTo(format: $0, device: device) }
|
||||
guard let format else {
|
||||
throw CameraError.format(.invalidFormat)
|
||||
}
|
||||
|
Reference in New Issue
Block a user