---
title: "loadTrackInfo(completionHandler:)"
framework: MediaExtension
role: symbol
role_heading: Instance Method
platforms: [macOS 14.0+]
path: "mediaextension/metrackreader/loadtrackinfo(completionhandler:)"
---

# loadTrackInfo(completionHandler:)

Loads the track info object with the properties of the media asset track.

## Declaration

```swift
func loadTrackInfo(completionHandler: @escaping @Sendable (METrackInfo?, (any Error)?) -> Void)
```

```swift
func trackInfo() async throws -> METrackInfo
```

## Parameters

- `completionHandler`: The completion block to execute when the load operation finishes.

## Discussion

Discussion If this method fails to create a track info object, it returns nil and the error contains information about the failure.

## See Also

### Getting track information

- [generateSampleCursor(atPresentationTimeStamp:completionHandler:)](mediaextension/metrackreader/generatesamplecursor(atpresentationtimestamp:completionhandler:).md)
- [generateSampleCursorAtFirstSampleInDecodeOrder(completionHandler:)](mediaextension/metrackreader/generatesamplecursoratfirstsampleindecodeorder(completionhandler:).md)
- [generateSampleCursorAtLastSampleInDecodeOrder(completionHandler:)](mediaextension/metrackreader/generatesamplecursoratlastsampleindecodeorder(completionhandler:).md)
- [loadUneditedDuration(completionHandler:)](mediaextension/metrackreader/loaduneditedduration(completionhandler:).md)
- [loadTotalSampleDataLength(completionHandler:)](mediaextension/metrackreader/loadtotalsampledatalength(completionhandler:).md)
- [loadEstimatedDataRate(completionHandler:)](mediaextension/metrackreader/loadestimateddatarate(completionhandler:).md)
- [loadMetadata(completionHandler:)](mediaextension/metrackreader/loadmetadata(completionhandler:).md)
