mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-03-25 09:05:52 +00:00
Added check for start recording video
This commit is contained in:
parent
a7474d5bcc
commit
2f4784ae39
1 changed files with 6 additions and 1 deletions
|
|
@ -482,6 +482,11 @@ open class SwiftyCamViewController: UIViewController {
|
|||
*/
|
||||
|
||||
public func startVideoRecording() {
|
||||
|
||||
guard sessionRunning == true else {
|
||||
print("[SwiftyCam]: Cannot start video recoding. Capture session is not running")
|
||||
return
|
||||
}
|
||||
guard let movieFileOutput = self.movieFileOutput else {
|
||||
return
|
||||
}
|
||||
|
|
@ -852,7 +857,7 @@ open class SwiftyCamViewController: UIViewController {
|
|||
fileprivate func capturePhotoAsyncronously(completionHandler: @escaping(Bool) -> ()) {
|
||||
|
||||
guard sessionRunning == true else {
|
||||
print("[SwiftyCam]: Cannot take photo while session isn't running")
|
||||
print("[SwiftyCam]: Cannot take photo. Capture session is not running")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue