<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetTrackPlan/init(mediaType:segmentConfigurations:assemblyTrackID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetTrackPlan(im)initWithMediaType:segmentConfigurations:assemblyTrackID:"
  },
  "title" : "init(mediaType:segmentConfigurations:assemblyTrackID:)"
}
-->

# init(mediaType:segmentConfigurations:assemblyTrackID:)

Returns an instance of AVAssetTrackPlan

```
init(mediaType: AVMediaType, segmentConfigurations: [AVPlannedSegmentConfiguration], assemblyTrackID trackID: CMPersistentTrackID)
```

## Parameters

`mediaType`

Media type of the track

`segmentConfigurations`

Segment configurations of the track

`trackID`

The trackID that identifies this track in the assemblyComposition the planner passes to the completion handler of the incremental writing session.

## Discussion

This initializer throws NSInvalidArgumentException if trackID is kCMPersistentTrackID_Invalid.

---

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)