Adding check for running session before switching camera

This commit is contained in:
Andrew Walz 2017-04-24 13:14:52 -06:00
parent 90e641076c
commit ab94441095

View file

@ -489,6 +489,11 @@ open class SwiftyCamViewController: UIViewController {
print("[SwiftyCam]: Switching between cameras while recording video is not supported")
return
}
guard session.isRunning == true else {
return
}
switch currentCamera {
case .front:
currentCamera = .rear