mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-03-25 09:05:52 +00:00
Added default camera functionality'
This commit is contained in:
parent
c2952e7833
commit
67ff337423
2 changed files with 11 additions and 2 deletions
|
|
@ -26,9 +26,7 @@ class ViewController: SwiftyCamViewController, SwiftyCamViewControllerDelegate {
|
|||
super.viewDidLoad()
|
||||
cameraDelegate = self
|
||||
maximumVideoDuration = 10.0
|
||||
doubleTapCameraSwitch = true
|
||||
addButtons()
|
||||
|
||||
}
|
||||
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,11 @@ open class SwiftyCamViewController: UIViewController {
|
|||
|
||||
public var doubleTapCameraSwitch = true
|
||||
|
||||
/// Set default launch camera
|
||||
|
||||
public var defaultCamera = CameraSelection.rear
|
||||
|
||||
|
||||
// MARK: Public Get-only Variable Declarations
|
||||
|
||||
/// Returns true if video is currently being recorded
|
||||
|
|
@ -482,6 +486,13 @@ open class SwiftyCamViewController: UIViewController {
|
|||
guard setupResult == .success else {
|
||||
return
|
||||
}
|
||||
|
||||
// Set default camera
|
||||
|
||||
currentCamera = defaultCamera
|
||||
|
||||
// begin configuring session
|
||||
|
||||
session.beginConfiguration()
|
||||
configureVideoPreset()
|
||||
addVideoInput()
|
||||
|
|
|
|||
Loading…
Reference in a new issue