BookmarkHow to use PHImageManager.DefaultManager.RequestAvAsset correctly? AvAsset is always null

136 views Asked by At

asset is not null but avAsset always comes up as null. That's why I can't get video url. How can I fix this?

var vOptions = new PHVideoRequestOptions();
vOptions.NetworkAccessAllowed = true;
vOptions.Version = PHVideoRequestOptionsVersion.Original;
vOptions.DeliveryMode = PHVideoRequestOptionsDeliveryMode.FastFormat;

PHImageManager.DefaultManager.RequestAvAsset(asset, vOptions, (avAsset, audioMix, vInfo) =>
{
   if (avAsset != null)
   {
      videoUrl = ((AVFoundation.AVUrlAsset)avAsset).Url.Path;
   }
});

await Task.Delay(5000);
0

There are 0 answers