<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCompositionTrack/samplePresentationTime(forTrackTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCompositionTrack(im)samplePresentationTimeForTrackTime:"
  },
  "title" : "samplePresentationTime(forTrackTime:)"
}
-->

# samplePresentationTime(forTrackTime:)

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

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

## Parameters

`trackTime`

The track time for which to request the sample presentation time.

## Return Value

The sample presentation time corresponding to the specified time; otherwise <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid> if the time is out of range.

## Discussion

---

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)