X-Git-Url: https://git.r.bdr.sh/rbdr/captura/blobdiff_plain/5802c153cae64142d84e3cd5f762939501ee7e53..505c1e620497828ffb914e05dd76d9ab124f144a:/Captura/Domain/CaptureSessionConfiguration.swift?ds=inline 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 }