2

I want to open photoLibrary and select one video file from that. I cant open library successfully, but when I select one video from library first video compressed and then UIImagePickerControllerDelegate method call. I don't need compressing video, how can solve this problem. there is my code for loading photo library:

 fileprivate func openGalleryWithVideoType() {
    let imagePicker = UIImagePickerController()
    imagePicker.navigationBar.barTintColor = UIColor.black
    imagePicker.navigationBar.tintColor = UIColor.white
    imagePicker.sourceType = .savedPhotosAlbum
    imagePicker.mediaTypes = [kUTTypeMovie as String]
    imagePicker.allowsEditing = false
    imagePicker.delegate = self
    self.present(imagePicker, animated: true, completion: nil)
  }

this image showing my problem with compressing bar in top UP view and compressing process bar in bottom side.

enter image description here

ava
  • 1,148
  • 5
  • 15
  • 44
  • Possible duplicate of [Avoid Video Compression when Selecting Movie with UIImagePickerController?](https://stackoverflow.com/questions/3159061/avoid-video-compression-when-selecting-movie-with-uiimagepickercontroller) – V D Purohit Oct 31 '18 at 06:26

1 Answers1

0

There is currently no way to control how UIImagePickerController compresses the picked video.

But if you want original video then you can get from below code:-

let videoUrl = info[UIImagePickerControllerReferenceURL] as? URL
V D Purohit
  • 1,179
  • 1
  • 10
  • 23