---
title: "urlSession(_:aggregateAssetDownloadTask:didLoad:totalTimeRangesLoaded:timeRangeExpectedToLoad:for:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassetdownloaddelegate/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.

## Declaration

```swift
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.

## See Also

### Responding to aggregate download events

- [urlSession(_:aggregateAssetDownloadTask:willDownloadTo:)](avfoundation/avassetdownloaddelegate/urlsession(_:aggregateassetdownloadtask:willdownloadto:).md)
- [urlSession(_:aggregateAssetDownloadTask:didCompleteFor:)](avfoundation/avassetdownloaddelegate/urlsession(_:aggregateassetdownloadtask:didcompletefor:).md)
