Hi,
I am using the following code to allow users to record video using their iPhone camera, and then upload it directly to my server. I would like to put a limit on the length of the video they can record (5 seconds in this example) and it looks like using videoMaximumDuration would be the obvious way of doing that, but it has no effect.
Does anyone have any ideas?
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:imagePicker animated:YES];
imagePicker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:imagePicker.sourceType];
imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
[imagePicker setVideoMaximumDuration:5];
[imagePicker release];
I've tried it with allowsEditing as YES and NO, but it made no difference.
Thanks,
Steven