---
title: "insertTimeRanges(_:of:at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablecompositiontrack/inserttimeranges(_:of:at:)"
---

# insertTimeRanges(_:of:at:)

Inserts the time ranges of multiple source tracks into a track of a composition.

## Declaration

```swift
func insertTimeRanges(_ timeRanges: [NSValue], of tracks: [AVAssetTrack], at startTime: CMTime) throws
```

## Parameters

- `timeRanges`: The time ranges of media in the source tracks to insert.
- `tracks`: The source asset tracks that contain the media to insert.
- `startTime`: A start time within composition the track to insert the time range.

## See Also

### Managing time ranges

- [segments](avfoundation/avmutablecompositiontrack/segments.md)
- [insertEmptyTimeRange(_:)](avfoundation/avmutablecompositiontrack/insertemptytimerange(_:).md)
- [insertTimeRange(_:of:at:)](avfoundation/avmutablecompositiontrack/inserttimerange(_:of:at:).md)
- [removeTimeRange(_:)](avfoundation/avmutablecompositiontrack/removetimerange(_:).md)
- [scaleTimeRange(_:toDuration:)](avfoundation/avmutablecompositiontrack/scaletimerange(_:toduration:).md)
