<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableCompositionTrack/insertTimeRanges(_:of:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableCompositionTrack(im)insertTimeRanges:ofTracks:atTime:error:"
  },
  "title" : "insertTimeRanges(_:of:at:)"
}
-->

# insertTimeRanges(_:of:at:)

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

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

## 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)