---
title: "samplePresentationTime(forTrackTime:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablemovietrack/samplepresentationtime(fortracktime:)"
---

# samplePresentationTime(forTrackTime:)

Maps the specified track time through the appropriate time mapping and returns the resulting sample presentation time.

## Declaration

```swift
func samplePresentationTime(forTrackTime trackTime: CMTime) -> CMTime
```

## Parameters

- `trackTime`: The track time for which to request the sample presentation time.

## Return Value

Return Value The sample presentation time corresponding to the specified time; otherwise invalid if the time is out of range.

## See Also

### Accessing temporal information

- [timeRange](avfoundation/avmutablemovietrack/timerange.md)
- [timescale](avfoundation/avmutablemovietrack/timescale.md)
- [naturalTimeScale](avfoundation/avmutablemovietrack/naturaltimescale.md)
- [estimatedDataRate](avfoundation/avmutablemovietrack/estimateddatarate.md)
