File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public final class CameraViewController: UIViewController {
1919
2020 /// Focus view type.
2121 public var barCodeFocusViewType : FocusViewType = . animated
22+ public var initialCameraPosition : AVCaptureDevice . Position = . back
2223 public var showsCameraButton : Bool = false {
2324 didSet {
2425 cameraButton. isHidden = showsCameraButton
@@ -213,7 +214,7 @@ public final class CameraViewController: UIViewController {
213214 }
214215
215216 if error == nil {
216- strongSelf. setupSessionInput ( for: . back )
217+ strongSelf. setupSessionInput ( for: strongSelf . initialCameraPosition )
217218 strongSelf. setupSessionOutput ( )
218219 strongSelf. delegate? . cameraViewControllerDidSetupCaptureSession ( strongSelf)
219220 } else {
You can’t perform that action at this time.
0 commit comments