Contents

legibleOutput(_:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:)

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

Declaration

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

Parameters

Discussion

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.