Hello,
I am using the below code to request for video to be downloaded from iCloud. But the downloaded video size does not match with the original size of video.
PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
options.version = PHVideoRequestOptionsVersionOriginal;
options.deliveryMode = PHVideoRequestOptionsDeliveryModeHighQualityFormat;
[options setNetworkAccessAllowed:YES];
[[PHImageManager defaultManager] requestAVAssetForVideo:asset options:options resultHandler:
^(AVAsset *avAsset, AVAudioMix *audioMix, NSDictionary *info) {
}
Original size of video, getting it from below code
NSArray *resources = [PHAssetResource assetResourcesForAsset:asset];
for (PHAssetResource *resource in resources) {
if ((resource.type == PHAssetResourceTypeVideo) || (resource.type== PHAssetResourceTypePhoto)){
return resource;
}
}
[resource valueForKey:@"fileSize"]
The original Size and the downloaded size of video is not matching. Can anyone help me to debug what is the issue here