remove shouldSaveToPhotoLibrary #272

This commit is contained in:
shogo4405 2017-08-01 00:56:47 +09:00
parent d218954044
commit f4947ee395
2 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,7 @@ let sampleRate:Double = 44_100
class ExampleRecorderDelegate: DefaultAVMixerRecorderDelegate {
override func didFinishWriting(_ recorder: AVMixerRecorder) {
guard let writer:AVAssetWriter = recorder.writer, shouldSaveToPhotoLibrary else { return }
guard let writer:AVAssetWriter = recorder.writer else { return }
PHPhotoLibrary.shared().performChanges({() -> Void in
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: writer.outputURL)
}, completionHandler: { (isSuccess, error) -> Void in

View File

@ -156,7 +156,6 @@ open class DefaultAVMixerRecorderDelegate: NSObject {
fileprivate var clockReference:String = AVMediaTypeVideo
#if os(iOS)
open var shouldSaveToPhotoLibrary:Bool = true
open lazy var moviesDirectory:URL = {
return URL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0])
}()