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

# outputProviderWithRandomAccess(for:)

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

```
func outputProviderWithRandomAccess(for output: AVAssetReaderOutput) -> sending (AVAssetReaderOutput.Provider<CMReadySampleBuffer<CMSampleBuffer.DynamicContent>>, AVAssetReaderOutput.RandomAccessController)
```

## Parameters

`output`

The output to be attached to the reader.

## Return Value

A tuple with an output provider for reading sample buffers, 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)