copy video from iphone using the UIImagePickerController?
Hey, I know that when a user selects a Video I do ge开发者_如何转开发t a URL for the video.... but can you direct me to a proper implementation because my App just sticks there when I click choose in the simulator and I cannot navigate away from the Video Player page.... Any good tutorial on this?
Once you select the video - execution flows to the following function:
(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
.... code here .....
//get the videoURL
NSString* videoURL= [info objectForKey:UIImagePickerControllerMediaURL];
//IMPORTANT: remember to test that the video is compatible for saving to the photos album
UISaveVideoAtPathToSavedPhotosAlbum(videoURL, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
.... code here .....
}
Take a look into 'UISaveVideoAtPathToSavedPhotosAlbum' specifically. This allows saving to the camera roll.
精彩评论