Added default camera functionality'

This commit is contained in:
Andrew Walz 2017-01-15 17:12:21 -07:00
parent c2952e7833
commit 67ff337423
2 changed files with 11 additions and 2 deletions

View file

@ -26,9 +26,7 @@ class ViewController: SwiftyCamViewController, SwiftyCamViewControllerDelegate {
super.viewDidLoad()
cameraDelegate = self
maximumVideoDuration = 10.0
doubleTapCameraSwitch = true
addButtons()
}
override var prefersStatusBarHidden: Bool {

View file

@ -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()