mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-03-25 09:05:52 +00:00
Expose outputFolder as a variable
This commit is contained in:
parent
582efb4b5a
commit
c55732d9e8
1 changed files with 4 additions and 1 deletions
|
|
@ -166,6 +166,9 @@ open class SwiftyCamViewController: UIViewController {
|
|||
/// If set to false, delegate function will be called to handle exception
|
||||
public var shouldPrompToAppSettings = true
|
||||
|
||||
/// Video will be recorded to this folder
|
||||
public var outputFolder: String = NSTemporaryDirectory()
|
||||
|
||||
/// Public access to Pinch Gesture
|
||||
fileprivate(set) public var pinchGesture : UIPinchGestureRecognizer!
|
||||
|
||||
|
|
@ -531,7 +534,7 @@ open class SwiftyCamViewController: UIViewController {
|
|||
|
||||
// Start recording to a temporary file.
|
||||
let outputFileName = UUID().uuidString
|
||||
let outputFilePath = (NSTemporaryDirectory() as NSString).appendingPathComponent((outputFileName as NSString).appendingPathExtension("mov")!)
|
||||
let outputFilePath = (self.outputFolder as NSString).appendingPathComponent((outputFileName as NSString).appendingPathExtension("mov")!)
|
||||
movieFileOutput.startRecording(to: URL(fileURLWithPath: outputFilePath), recordingDelegate: self)
|
||||
self.isVideoRecording = true
|
||||
DispatchQueue.main.async {
|
||||
|
|
|
|||
Loading…
Reference in a new issue