I am trying to pick video by ELCImagePickerController
from photo library, but when I print this
NSLog(@\"%@\",[dict valueForKey:@\"UIImagePicker
We need to replace "allPhotos" with "allAssets" in ALAssetsFilter at
two place to show all asset (including video ) in ELCImagePickerController code
as given below
First change :
ALAssetsGroup *g = (ALAssetsGroup*)[assetGroups objectAtIndex:indexPath.row];
[g setAssetsFilter:[ALAssetsFilter **allAssets**]];
Second :
In tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
method
[picker.assetGroup setAssetsFilter:[ALAssetsFilter **allAssets**]];
But video asset thumbnail will be same as image thumbnail , to change it write custom code in ELCAsset.m
class constructor initWithAsset:(ALAsset*)_asset
For example :
check
if ([self.asset valueForProperty:ALAssetPropertyType] == ALAssetTypeVideo ){
// code for video thumbnail
}
if ([self.asset valueForProperty:ALAssetPropertyType] == ALAssetTypePhoto ){
// code for Photo thumbnail
}
Change ALAssetsGroup
filter to allAssets
in ELCAlbumPickerController.m
file:
here:
ALAssetsGroup *g = (ALAssetsGroup*)[assetGroups objectAtIndex:indexPath.row];
[g setAssetsFilter:[ALAssetsFilter allPhotos]];
and here:
[picker.assetGroup setAssetsFilter:[ALAssetsFilter allPhotos]];