mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-04-27 15:07:43 +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")
|
print("[SwiftyCam]: Switching between cameras while recording video is not supported")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard session.isRunning == true else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch currentCamera {
|
switch currentCamera {
|
||||||
case .front:
|
case .front:
|
||||||
currentCamera = .rear
|
currentCamera = .rear
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue