/// Triggers the initial AVAssetDownloadTask for a given Asset. public void DownloadAsset(MusicAsset asset) { Track.Download(asset.Music); // For the initial download, we ask the URLSession for an AVAssetDownloadTask // with a minimum bitrate corresponding with one of the lower bitrate variants in the asset. var taskOptions = new AVAssetDownloadOptions { MinimumRequiredMediaBitrate = 265000 }; var task = assetDownloadURLSession.GetAssetDownloadTask(asset.UrlAsset, asset.Id, null, taskOptions); // To better track the AVAssetDownloadTask we set the taskDescription to something unique for our sample. task.TaskDescription = asset.Id; activeDownloadsMap [task] = asset; task.Resume(); AssetDownloadStateChanged?.Invoke(this, new MusicAssetDownloadStateChangeArgs(asset.Music, MusicAssetDownloadState.Downloading)); }
public AVAssetDownloadTask GetAssetDownloadTask(AVUrlAsset urlAsset, string title, NSData artworkData, AVAssetDownloadOptions options) { throw new NotImplementedException(); }
public AVAssetDownloadTask GetAssetDownloadTask(AVUrlAsset urlAsset, NSUrl destinationUrl, AVAssetDownloadOptions options) { throw new NotImplementedException(); }