Skip to content

Commit

Permalink
add configure options : recordingVideoQuality
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Mar 9, 2018
1 parent 650dce5 commit ce1cace
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit ce1cace

Please sign in to comment.