react-native-camera-kit/ios/ReactNativeCameraKit/CameraProtocol.swift
Seph Soliman ace123eefa Added maxPhotoQualityPrioritization for iOS
Allows a massive capture speed-up of 60-80%
2024-11-14 13:34:07 -08:00

37 lines
1.3 KiB
Swift

//
// CameraProtocol.swift
// ReactNativeCameraKit
//
import AVFoundation
protocol CameraProtocol: AnyObject, FocusInterfaceViewDelegate {
var previewView: UIView { get }
func setup(cameraType: CameraType, supportedBarcodeType: [CodeFormat])
func cameraRemovedFromSuperview()
func update(torchMode: TorchMode)
func update(flashMode: FlashMode)
func update(cameraType: CameraType)
func update(onOrientationChange: RCTDirectEventBlock?)
func update(onZoom: RCTDirectEventBlock?)
func update(zoom: Double?)
func update(maxZoom: Double?)
func update(resizeMode: ResizeMode)
func update(maxPhotoQualityPrioritization: MaxPhotoQualityPrioritization?)
func zoomPinchStart()
func zoomPinchChange(pinchScale: CGFloat)
func isBarcodeScannerEnabled(_ isEnabled: Bool,
supportedBarcodeTypes: [CodeFormat],
onBarcodeRead: ((_ barcode: String, _ codeFormat: CodeFormat) -> Void)?)
func update(scannerFrameSize: CGRect?)
func capturePicture(onWillCapture: @escaping () -> Void,
onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?, _ dimensions: CMVideoDimensions) -> Void,
onError: @escaping (_ message: String) -> Void)
}