<!--
{
  "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/AVPlayerItemLegibleOutput/init(mediaSubtypesForNativeRepresentation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItemLegibleOutput(im)initWithMediaSubtypesForNativeRepresentation:"
  },
  "title" : "init(mediaSubtypesForNativeRepresentation:)"
}
-->

# init(mediaSubtypesForNativeRepresentation:)

Creates an initialized legible-output object.

```
init(mediaSubtypesForNativeRepresentation subtypes: [NSNumber])
```

## Parameters

`subtypes`

An <doc://com.apple.documentation/documentation/Foundation/NSArray> of <doc://com.apple.documentation/documentation/Foundation/NSNumber> FourCC codes.

## Return Value

An initialized instance of `AVPlayerItemLegibleOutput`.

## Discussion

When creating an instance you add media subtype FourCC codes as `NSNumber` objects to the `subtypes` array to elect to receive that type as a <doc://com.apple.documentation/documentation/CoreMedia/CMSampleBuffer> instead of an attributed string. FourCC codes are converted to `NSNumber` objects as shown:

```objc
@[ [NSNumber numberWithUnsignedInt:'tx3g'] ]
```

Initializing an `AVPlayerItemLegibleOutput` using the `init` method (which is preferred) is equivalent to calling this method with an empty `subtypes` array, which means that all legible data, regardless of media subtype, is delivered using <doc://com.apple.documentation/documentation/Foundation/NSAttributedString> instances in a common format.

If a media subtype for which there is no legible data in the current player item is included in the media `subtypes` array, no error occurs.  An `AVPlayerItemLegibleOutput` instance doesn’t vend closed caption data as a <doc://com.apple.documentation/documentation/CoreMedia/CMSampleBuffer>, so it is an error to include `'c608'` in the media subtypes array.

> Note:
> The preferred method of creating an `AVPlayerItemLegibleOutput` object is to use the <doc://com.apple.avfoundation/documentation/AVFoundation/1805461-init> method.

---

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)