react-native-vision-camera/package/ios/Parsers/AVCaptureDevice.Position+descriptor.swift

26 lines
503 B
Swift
Raw Permalink Normal View History

2021-02-19 08:28:05 -07:00
//
// AVCaptureDevice.Position+descriptor.swift
// mrousavy
2021-02-19 08:28:05 -07:00
//
// Created by Marc Rousavy on 15.12.20.
// Copyright © 2020 mrousavy. All rights reserved.
2021-02-19 08:28:05 -07:00
//
import AVFoundation
import Foundation
extension AVCaptureDevice.Position {
var descriptor: String {
switch self {
case .back:
return "back"
case .front:
return "front"
case .unspecified:
return "external"
2021-02-19 08:28:05 -07:00
@unknown default:
fatalError("AVCaptureDevice.Position has unknown state.")
}
}
}