I need to capture a video which will be maximum length of 10 seconds, and also need to upload it to server using ASIHttpRequest
,
how do I do that?
You can set the videoMaximumDuration property of image picker for this.
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.mediaTypes = @[(NSString *)kUTTypeMovie];
imagePicker.videoQuality = UIImagePickerControllerQualityTypeHigh;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.videoMaximumDuration = 10;