fix: Move minExposure/maxExposure from format into device (#2211)

* fix: Move `minExposure`/`maxExposure` into `device`

* Update docs

* chore: Remove unneeded dependency

* chore: Update code
This commit is contained in:
Marc Rousavy
2023-11-24 18:20:56 +01:00
committed by GitHub
parent bb3a42e6bc
commit cad5240420
8 changed files with 25 additions and 36 deletions

View File

@@ -10,7 +10,7 @@ import AVFoundation
extension AVCaptureDevice {
func toDictionary() -> [String: Any] {
let formats = formats.map { CameraDeviceFormat(fromFormat: $0, forDevice: self) }
let formats = formats.map { CameraDeviceFormat(fromFormat: $0) }
return [
"id": uniqueID,
@@ -20,8 +20,10 @@ extension AVCaptureDevice {
"hasFlash": hasFlash,
"hasTorch": hasTorch,
"minZoom": minAvailableVideoZoomFactor,
"neutralZoom": neutralZoomFactor,
"maxZoom": maxAvailableVideoZoomFactor,
"neutralZoom": neutralZoomFactor,
"minExposure": minExposureTargetBias,
"maxExposure": maxExposureTargetBias,
"isMultiCam": isMultiCam,
"supportsRawCapture": false, // TODO: supportsRawCapture
"supportsLowLightBoost": isLowLightBoostSupported,