mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-04-27 15:07:43 +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
|
/// If set to false, delegate function will be called to handle exception
|
||||||
public var shouldPrompToAppSettings = true
|
public var shouldPrompToAppSettings = true
|
||||||
|
|
||||||
|
/// Video will be recorded to this folder
|
||||||
|
public var outputFolder: String = NSTemporaryDirectory()
|
||||||
|
|
||||||
/// Public access to Pinch Gesture
|
/// Public access to Pinch Gesture
|
||||||
fileprivate(set) public var pinchGesture : UIPinchGestureRecognizer!
|
fileprivate(set) public var pinchGesture : UIPinchGestureRecognizer!
|
||||||
|
|
||||||
|
|
@ -531,7 +534,7 @@ open class SwiftyCamViewController: UIViewController {
|
||||||
|
|
||||||
// Start recording to a temporary file.
|
// Start recording to a temporary file.
|
||||||
let outputFileName = UUID().uuidString
|
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)
|
movieFileOutput.startRecording(to: URL(fileURLWithPath: outputFilePath), recordingDelegate: self)
|
||||||
self.isVideoRecording = true
|
self.isVideoRecording = true
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue