chore: Format Swift

This commit is contained in:
Marc Rousavy 2021-07-08 11:01:02 +02:00
parent 5126dd63b4
commit ba08b4dfce

View File

@ -23,7 +23,7 @@ extension AVCaptureDevice.Format {
func toDictionary() -> [String: Any] { func toDictionary() -> [String: Any] {
let videoDimensions = CMVideoFormatDescriptionGetDimensions(formatDescription) let videoDimensions = CMVideoFormatDescriptionGetDimensions(formatDescription)
var dict: [String: Any] = [ var dict: [String: Any] = [
"videoStabilizationModes": videoStabilizationModes.map(\.descriptor), "videoStabilizationModes": videoStabilizationModes.map(\.descriptor),
"autoFocusSystem": autoFocusSystem.descriptor, "autoFocusSystem": autoFocusSystem.descriptor,
@ -45,11 +45,11 @@ extension AVCaptureDevice.Format {
] ]
}, },
] ]
if #available(iOS 13.0, *) { if #available(iOS 13.0, *) {
dict["isHighestPhotoQualitySupported"] = self.isHighestPhotoQualitySupported dict["isHighestPhotoQualitySupported"] = self.isHighestPhotoQualitySupported
} }
return dict return dict
} }
} }