<!--
{
  "availability" : [
    "iOS: 11.0.0 - 27.0.0",
    "iPadOS: 11.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.15.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetDownloadDelegate/urlSession(_:aggregateAssetDownloadTask:didLoad:totalTimeRangesLoaded:timeRangeExpectedToLoad:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetDownloadDelegate(im)URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection:"
  },
  "title" : "urlSession(_:aggregateAssetDownloadTask:didLoad:totalTimeRangesLoaded:timeRangeExpectedToLoad:for:)"
}
-->

# urlSession(_:aggregateAssetDownloadTask:didLoad:totalTimeRangesLoaded:timeRangeExpectedToLoad:for:)

Tells the delegate that the aggregate download task loaded a new time range.

```
optional func urlSession(_ session: URLSession, aggregateAssetDownloadTask: AVAggregateAssetDownloadTask, didLoad timeRange: CMTimeRange, totalTimeRangesLoaded loadedTimeRanges: [NSValue], timeRangeExpectedToLoad: CMTimeRange, for mediaSelection: AVMediaSelection)
```

## Parameters

`session`

The session the asset download task is on.

`aggregateAssetDownloadTask`

The download task that loaded a new time range.

`timeRange`

A <doc://com.apple.documentation/documentation/CoreMedia/CMTimeRange> value that indicates the time range the task loaded since the last call to this method.

`loadedTimeRanges`

An array of CMTimeRange values that indicate the time ranges the task has downloaded so far.

`timeRangeExpectedToLoad`

A CMTimeRange value that indicates the expected duration of the downloaded asset.

`mediaSelection`

The media selection the task is downloading.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)