---
title: "loadTrack(withTrackID:completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablemovie/loadtrack(withtrackid:completionhandler:)"
---

# loadTrack(withTrackID:completionHandler:)

Loads a track that contains the specified identifier.

## Declaration

```swift
func loadTrack(withTrackID trackID: CMPersistentTrackID, completionHandler: @escaping @Sendable (AVMutableMovieTrack?, (any Error)?) -> Void)
```

```swift
func loadTrack(withTrackID trackID: CMPersistentTrackID) async throws -> AVMutableMovieTrack?
```

## Parameters

- `trackID`: The identifier of the track to load.
- `completionHandler`: A callback that the system invokes after it finishes the loading request. It passes the completion handler the following parameters:

## See Also

### Loading tracks

- [tracks](avfoundation/avpartialasyncproperty/tracks-2lj40.md)
- [loadTracks(withMediaType:completionHandler:)](avfoundation/avmutablemovie/loadtracks(withmediatype:completionhandler:).md)
- [loadTracks(withMediaCharacteristic:completionHandler:)](avfoundation/avmutablemovie/loadtracks(withmediacharacteristic:completionhandler:).md)
