I am trying to pick a video from the photo library. In principle I know how to do it you set the mediaType of the image picker to an NSArray with kUTTypeMovie as its only ob
I got the imagepicker working on a 3g and a 3gs to pick videos.
NSArray *mediaTypesAllowed = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imgPicker setMediaTypes:mediaTypesAllowed];
And to get the picked video
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
NSString *mediaType = [info valueForKey:UIImagePickerControllerMediaType];
if([mediaType isEqualToString:@"public.movie"]){...}
}
Hey, I am also unable to get movie objects on 3G using the above mentioned code. It crashes on my 3G. It however works on my 3GS, but the issue is it shows a mix of both images and movies in photo library. I tried the following code:
videoPickerCtrl.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
NSArray *mediaTypesAllowed = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
and on my 3GS running OS 3.1.2, it shows me videos cum images stored in my photo library.
Whereas if I try doing the following:
videoPickerCtrl.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
NSArray *mediaTypesAllowed = [NSArray arrayWithObject:@"public.movie"];
[videoPickerCtrl setMediaTypes:mediaTypesAllowed];
Then all it shows me is videos stored in Camera Roll, and nothing else. Can somebody help ?