MijickCamera/Sources/Internal/Extensions/CameraUtilities++.swift

22 lines
521 B
Swift
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// CameraUtilities++.swift of MijickCamera
//
// Created by Tomasz Kurylik. Sending from Kraków!
// - Mail: tomasz.kurylik@mijick.com
// - GitHub: https://github.com/FulcrumOne
// - Medium: https://medium.com/@mijick
//
// Copyright ©2024 Mijick. All rights reserved.
import AVKit
// MARK: To Device Flash Mode
extension CameraFlashMode {
func toDeviceFlashMode() -> AVCaptureDevice.FlashMode { switch self {
case .off: .off
case .on: .on
case .auto: .auto
}}
}