我正在使用UIImagePickerController从我的视频库中选择一个视频。 然后我按下选择按钮,设备开始“压缩视频”
它转到
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
然后我用视频做我的东西,当我完成它在后台播放视频的音频。 当然,当我结束时,我使用了dissmiss方法:
[picker dismissModalViewControllerAnimated:YES];
这就是我调用UIImagePickerController的方式:
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
NSArray *mediaTypesAllowed = [NSArray arrayWithObject:@"public.movie"];
[imagePicker setMediaTypes:mediaTypesAllowed];
[self presentModalViewController:imagePicker animated:YES];