Instance Method


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)



The AVPlayerItemLegibleOutput source instance.


An array of NSAttributedString objects, each containing both the run of text and the descriptive markup.


An array of CMSampleBuffer objects, for media subtypes included in the array passed to the output object’s init(mediaSubtypesForNativeRepresentation:) method.


The item time at which the strings should be presented.


For each media subtype in the array passed in to the output object’s 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 CMTextMarkup for the string attributes keys and values that are used in the attributed strings.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software