<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerVideoOutput/sample(forHostTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:So19AVPlayerVideoOutputC12AVFoundationE6sample11forHostTimeAbCE6SampleVSgSo6CMTimea_tF"
  },
  "title" : "sample(forHostTime:)"
}
-->

# sample(forHostTime:)

Retrieves a video sample along with auxiliary information for display at the specified host time.

```
func sample(forHostTime hostTime: CMTime) -> AVPlayerVideoOutput.Sample?
```

## Parameters

`hostTime`

A CMTime that expresses a desired host time.

## Return Value

A sample containing the frame, presentation timestamp, and active configuration for the specified host time, or nil if no sample was available for that host time.

---

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)