---
title: "loadSamplePresentationTime(forTrackTime:completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassettrack/loadsamplepresentationtime(fortracktime:completionhandler:)"
---

# loadSamplePresentationTime(forTrackTime:completionHandler:)

Loads a sample presentation time that maps to the specified track time.

## Declaration

```swift
func loadSamplePresentationTime(forTrackTime trackTime: CMTime, completionHandler: @escaping @Sendable (CMTime, (any Error)?) -> Void)
```

```swift
func loadSamplePresentationTime(forTrackTime trackTime: CMTime) async throws -> CMTime
```

## Parameters

- `trackTime`: The track time of the presentation time 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 track segments

- [segments](avfoundation/avpartialasyncproperty/segments.md)
- [loadSegment(forTrackTime:completionHandler:)](avfoundation/avassettrack/loadsegment(fortracktime:completionhandler:).md)
- [AVAssetTrackSegment](avfoundation/avassettracksegment.md)
