diff --git a/README.md b/README.md index 5c645a6b..716d9030 100644 --- a/README.md +++ b/README.md @@ -177,8 +177,9 @@ public struct TLPhotosPickerConfigure { public var usedPrefetch = false public var allowedLivePhotos = true public var allowedVideo = true - public var allowedVideoRecording = true - public var maxVideoDuration:TimeInterval? = nil + public var allowedVideoRecording = true //for camera : allow this option when you want to recording video. + public var recordingVideoQuality: UIImagePickerControllerQualityType = .typeMedium //for camera : recording video quality + public var maxVideoDuration:TimeInterval? = nil //for camera : max video recording duration public var autoPlay = true public var muteAudio = true public var mediaType: PHAssetMediaType? = nil diff --git a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift index fe1e2a10..27dc6722 100644 --- a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift +++ b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift @@ -39,6 +39,7 @@ public struct TLPhotosPickerConfigure { public var allowedLivePhotos = true public var allowedVideo = true public var allowedVideoRecording = true + public var recordingVideoQuality: UIImagePickerControllerQualityType = .typeMedium public var maxVideoDuration:TimeInterval? = nil public var autoPlay = true public var muteAudio = true @@ -479,6 +480,7 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig picker.mediaTypes = [kUTTypeImage as String] if self.configure.allowedVideoRecording { picker.mediaTypes.append(kUTTypeMovie as String) + picker.videoQuality = self.configure.recordingVideoQuality if let duration = self.configure.maxVideoDuration { picker.videoMaximumDuration = duration }