Myxtic
Myxtic

Reputation: 5699

URL for video selected from camera roll

I am able to launch camera roll from my app. I want to get the URL of the video when it is selected by a user, because I want to use it for asset reading/writing.

Is it possible to get the URL of the selected video from camera roll ? If yes, how ?

Thanks.

Upvotes: 0

Views: 5782

Answers (1)

Nic
Nic

Reputation: 2864

Set the UIImagePickerControllerDelegate to your class and use this code to retrieve the url.

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
     [self dismissModalViewControllerAnimated:YES];
     NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
}

This is a good resource:Accessing the Camera and Photo Library from an iOS 4 iPhone Application

Upvotes: 3

Related Questions