mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-04-05 10:55:51 +00:00
Adding check for running session before switching camera
This commit is contained in:
parent
90e641076c
commit
ab94441095
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue