简体   繁体   English

使用UIImagePickerController从iPhone复制视频?

[英]copy video from iphone using the UIImagePickerController?

嘿,我知道当用户选择一个视频时,我确实会获得该视频的URL ....但是您可以将我引向适当的实现方式,因为当我在模拟器中单击“选择”时,我的应用程序就会停留在该位置,并且无法导航在视频播放器页面上。

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. 具体看一下“ UISaveVideoAtPathToSavedPhotosAlbum ”。 This allows saving to the camera roll. 这样可以保存到相机胶卷中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iPhone:除了使用UIImagePickerController以外,还可以使用其他方式进行视频录制吗? - iPhone: Video recording using any other way apart from UIImagePickerController? iPhone UIImagePickerController视频模式 - iPhone UIImagePickerController video mode iPhone使用UIImagePickerController录制视频时播放声音片段......可能吗? - iPhone Playing a sound clip while recording a video using UIImagePickerController … possible? UIImagePickerController:“选择/播放”库中的视频在iPhone Simulator上不起作用 - UIImagePickerController: “choose/play” a video from the library does not work on iPhone Simulator iPhone使用UIImagePickerController捕获视频中的选择性帧 - iPhone Use UIImagePickerController to capture selective frames from a video 将视频从UIImagePickerController保存到iPhone OS上的Core Data - Saving video from UIImagePickerController to Core Data on iPhone OS 使用UIImagePickerController记录视频 - recored video using UIImagePickerController 使用UIImagePickerController从iPhone相机获取图像路径return nil - Getting image path from the iPhone camera Using UIImagePickerController return nil 如何在iPhone的UIImagePickerController中捕获视频的缩略图 - how to capture the thumnail of the video in UIImagePickerController in iphone 从iPhone中的UIImagePickerController存储图像? - Store image from UIImagePickerController in iPhone?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM