<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetReader/outputCaptionProviderWithRandomAccess(for:validationDelegate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:So13AVAssetReaderC12AVFoundationE37outputCaptionProviderWithRandomAccess3for18validationDelegateSo0aB6OutputCACE0F0Cy_So14AVCaptionGroupCG_AhCE0hI10ControllerCtSo0ab5TrackM0C_So0abE18ValidationHandling_pSgtF"
  },
  "title" : "outputCaptionProviderWithRandomAccess(for:validationDelegate:)"
}
-->

# outputCaptionProviderWithRandomAccess(for:validationDelegate:)

Attaches the output to the reader and returns a tuple with an output provider for reading caption groups, and an associated random access controller.

```
func outputCaptionProviderWithRandomAccess(for output: AVAssetReaderTrackOutput, validationDelegate: (any AVAssetReaderCaptionValidationHandling)? = nil) -> sending (AVAssetReaderOutput.Provider<AVCaptionGroup>, AVAssetReaderOutput.RandomAccessController)
```

## Parameters

`output`

The output to be attached to the reader.

## Return Value

A tuple with an output provider for reading caption groups, and an associated random access controller.

---

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)