I need to check if the chosen video file had not been chosen before
Actually the scenario looks like:
The problem is the time of compression (if the chose file is large) can take several minutes.
So the questions is:
Is there a way to check the chosen video file from UIImagePickerController before the compression starts?
Add Framework- CoreMedia.Framework
import "MobileCoreServices/UTCoreTypes.h"
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSString *type = [info objectForKey:UIImagePickerControllerMediaType];
if ([type isEqualToString:(NSString *)kUTTypeVideo] ||
[type isEqualToString:(NSString *)kUTTypeMovie]) {
}
}
It will show only videos in the Album.
This is not possible as far as I can tell with UIImagePickerController. You may want to look into the ALAssetsLibrary.framework for another way to achieve the result you're looking for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.