<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItemLegibleOutputPushDelegate/legibleOutput(_:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVPlayerItemLegibleOutputPushDelegate(im)legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:"
  },
  "title" : "legibleOutput(_:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:)"
}
-->

# legibleOutput(_:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:)

Asks the delegate to process the delivery of new textual samples.

```
optional func legibleOutput(_ output: AVPlayerItemLegibleOutput, didOutputAttributedStrings strings: [NSAttributedString], nativeSampleBuffers nativeSamples: [Any], forItemTime itemTime: CMTime)
```

## Parameters

`output`

The [`AVPlayerItemLegibleOutput`](/documentation/AVFoundation/AVPlayerItemLegibleOutput) source instance.

`strings`

An array of <doc://com.apple.documentation/documentation/Foundation/NSAttributedString> objects, each containing both the run of text and the descriptive markup.

`nativeSamples`

An array of <doc://com.apple.documentation/documentation/CoreMedia/CMSampleBuffer> objects, for media subtypes included in the array passed to the `output` object’s [`init(mediaSubtypesForNativeRepresentation:)`](/documentation/AVFoundation/AVPlayerItemLegibleOutput/init(mediaSubtypesForNativeRepresentation:)) method.

`itemTime`

The item time at which the strings should be presented.

## Discussion

For each media subtype in the array passed in to the `output` object’s  [`init(mediaSubtypesForNativeRepresentation:)`](/documentation/AVFoundation/AVPlayerItemLegibleOutput/init(mediaSubtypesForNativeRepresentation:)) method, the delegate receives sample buffers carrying data in its native format via the `nativeSamples` parameter if there is media data of that subtype in the media resource.

For all other media subtypes present in the media resource, the delegate receives attributed strings in a common format via the `strings` parameter.  See <doc://com.apple.documentation/documentation/CoreMedia/cmtextmarkup> for the string attributes keys and values that are used in the attributed strings.

---

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)