ライブラリを使用ALAssert
してiPhoneライブラリからビデオを選択しており、そのビデオファイルのプロパティを次のように設定しています。
(void)selectedAssets:(NSArray*)_assets {
NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];
for(ALAsset *asset in _assets) {
NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init];
[workingDictionary setObject:[asset valueForProperty:ALAssetPropertyType] forKey:@"UIImagePickerControllerMediaType"];
[workingDictionary setObject:[UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]] forKey:@"UIImagePickerControllerOriginalImage"];
[workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];
[workingDictionary setObject:[[asset defaultRepresentation]url] forKey:@"UIImagePickerControllerMediaURL"];
[returnArray addObject:workingDictionary];
[workingDictionary release];
}
[self popToRootViewControllerAnimated:NO];
[[self parentViewController] dismissModalViewControllerAnimated:YES];
if([delegate respondsToSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:)]) {
[delegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:[NSArray arrayWithArray:returnArray]];
}
}
ここで設定していますが、すべてを行っUIImagePickerControllerMediaURL
たので、設定する権利はないと思いますUIImagePickerControllerMediaURL
。
UIImagePickerControllerMediaURL
選択したビデオにプロパティを与える方法を教えてください。そのビデオMediaURL
をデータ型に変換します。