0
votes

I am writing a simple video uploader application on iPhone 3GS where I first direct the user to photos album, and then select the video to share or upload. I am using the UIImagePickerController in the following way:

videoPickerCtrl = [[UIImagePickerController alloc] init]; videoPickerCtrl.delegate = self; videoPickerCtrl.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; videoPickerCtrl.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:videoPickerCtrl.sourceType];

videoPickerCtrl.allowsImageEditing = NO; videoPickerCtrl.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; [window addSubview:videoPickerCtrl.view];

But I can see that once the controller is invoked, there is a disturbing video trimming interface that is presented. Once I press "choose", the video is always trimmed no matter whether I touch the trimming controls or not. Is there any way to get around this trimming interface and directly get the path of the video file ?

2

2 Answers

0
votes

You don't specify what version of the iPhone SDK that you're using.

If you're using SDK 3.0, there's no way that I'm aware of to eliminate the trimming interface.

If you're using SDK 3.1, try setting UIImagePickerController.allowsEditing to false. In 3.1 the allowsImageEditing has been deprecated for a more general allowsEditing property.

0
votes

The trimming you see is the iphone copying the video file into your apps tmp directory allowing you to access it. Look up iphone app sandboxing if you still don't get it.