X-Git-Url: https://git.r.bdr.sh/rbdr/captura/blobdiff_plain/8e9321304ca80e9ada7ac01058a5f4603cb37fab..refs/heads/main:/Captura/Domain/CaptureSessionConfiguration.swift diff --git a/Captura/Domain/CaptureSessionConfiguration.swift b/Captura/Domain/CaptureSessionConfiguration.swift index c2ebe75..673db5f 100644 --- a/Captura/Domain/CaptureSessionConfiguration.swift +++ b/Captura/Domain/CaptureSessionConfiguration.swift @@ -14,7 +14,7 @@ struct CaptureSessionConfiguration { let preventResize: Bool let autoStart: Bool let maxLength: Int - + init( frameRate: Int? = nil, outputFormats: OutputFormatSetting? = nil, @@ -36,7 +36,7 @@ struct CaptureSessionConfiguration { autoStart = false maxLength = 300 } - + init(from action: RecordAction) { self.frameRate = action.fps ?? CapturaSettings.frameRate self.outputFormats = action.outputs ?? CapturaSettings.outputFormats @@ -56,23 +56,23 @@ struct CaptureSessionConfiguration { autoStart = action.autoStart ?? false maxLength = action.maxLength ?? 300 } - + var shouldSaveMp4: Bool { outputFormats.shouldSaveMp4() || (shouldUseBackend && shouldUploadMp4) } - + var shouldSaveGif: Bool { outputFormats.shouldSaveGif() || (shouldUseBackend && shouldUploadGif) } - + var shouldUploadGif: Bool { backendFormat.shouldSaveGif() } - + var shouldUploadMp4: Bool { backendFormat.shouldSaveMp4() } - + var shouldUseBackend: Bool { backend != nil }