"video recording stopped the maximum length for this video has been reached" Xcode iPhone

Viewed 1857

I am working on iPhone Video Capturing using ImagePickerController.I have set the property for image picker controller.I used it to have a maximum length of video to be 60 seconds.

imagePicker.videoMaximumDuration=60;

I am geting a default alert:

"video recording stopped the maximum length for this video has been reached"

I don't want to see this alert when time reaches 60 seconds, how can I make it not appear?

1 Answers

as apple states:

"The default value for this property is 10 minutes (600 seconds)"

so use:

    let picker = UIImagePickerController()
    picker.sourceType = .camera
    picker.mediaTypes = [kUTTypeMovie as String]
    picker.videoQuality = .typeMedium // .typeHigh
    picker.videoMaximumDuration = 20 * 60  // is in secs., here 20 minutes

    
Related