1

I have the following code that provides me access to metadata of a Video File that maybe saved locally or in iCloud. I am not sure if this is the best way to get access to only the metadata without downloading the Video file.

PHVideoRequestOptions *options = [PHVideoRequestOptions new];
options.networkAccessAllowed = YES;
options.deliveryMode = PHVideoRequestOptionsVersionOriginal;

[[PHImageManager defaultManager] requestAVAssetForVideo:currentAsset
                                                options:options
                                          resultHandler:^(AVAsset * _Nullable avAsset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {

    // gather the metadata that interests you.    
}];

This code works, but the problem is my test device has all the Photo Library backed up to iCloud and this moves along very slowly for Videos. So I suspect that this code is downloading the Video from iCloud and then I am getting access to the Metadata.

Any advice on how to speed it along ? Thanks in advance.

Curious101
  • 1,538
  • 2
  • 18
  • 36
  • +1: `asset.requestContentEditingInput` also tries to fully download the assets from iCloud if `options.isNetworkAccessAllowed = true`. Would be nice to know of a way of sampling the meta-data without committing to the download. – Albert Bori Oct 15 '18 at 23:58

0 Answers0