One Logo Pool Ball
AVFoundation · IOS API REFERENCE

AVAssetReader

class · iOS 4.1+ · SDK 27.1

class AVAssetReader

Members (18)

method · iOS 4.1+ · Deprecated in iOS 27.0

add

TypeScript
add(output: AVAssetReaderOutput): void
Swift declaration
func add(_ output: AVAssetReaderOutput)
method · iOS 4.1+

canAdd

TypeScript
canAdd(output: AVAssetReaderOutput): boolean
Swift declaration
func canAdd(_ output: AVAssetReaderOutput) -> Bool
method · iOS 4.1+

cancelReading

TypeScript
cancelReading(): void
Swift declaration
func cancelReading()
init · iOS 4.1+

init

TypeScript
static init(asset: AVAsset): AVAssetReader
Swift declaration
init(asset: AVAsset) throws
method · iOS 4.1+ · Deprecated in iOS 27.0

startReading

TypeScript
startReading(): boolean
Swift declaration
func startReading() -> Bool
get · iOS 4.1+

asset

TypeScript
get asset(): AVAsset
Swift declaration
var asset: AVAsset { get }
get · iOS 4.1+

error

TypeScript
get error(): (NativeError) | null
Swift declaration
var error: (any Error)? { get }
get · iOS 4.1+

outputs

TypeScript
get outputs(): Array<AVAssetReaderOutput>
Swift declaration
var outputs: [AVAssetReaderOutput] { get }
get · iOS 4.1+

status

TypeScript
get status(): AVAssetReader_Status
Swift declaration
var status: AVAssetReader.Status { get }
get · iOS 4.1+

timeRange

TypeScript
get timeRange(): _CoreMedia_CMTimeRange
Swift declaration
var timeRange: CMTimeRange { get set }
set · iOS 4.1+

timeRange

TypeScript
set timeRange(value: _CoreMedia_CMTimeRange)
Swift declaration
var timeRange: CMTimeRange { get set }
method · iOS 26.0+

outputProvider

TypeScript
outputProvider(output: AVAssetReaderOutput): AVAssetReaderOutput_Provider<_CoreMedia_CMReadySampleBuffer<_CoreMedia_CMSampleBuffer_DynamicContent>>
Swift declaration
func outputProvider(for output: AVAssetReaderOutput) -> sending AVAssetReaderOutput.Provider<CMReadySampleBuffer<CMSampleBuffer.DynamicContent>>

Attaches the output to the reader and returns an output provider for reading sample buffers. - Parameter output: The output to be attached to the reader. - Returns: A reader output provider with an interface for reading sample buffers.

method · iOS 26.0+

outputCaptionProvider

TypeScript
outputCaptionProvider(output: AVAssetReaderTrackOutput, validationDelegate?: (Implements<AVAssetReaderCaptionValidationHandling> | SDKHandle) | null): AVAssetReaderOutput_Provider<AVCaptionGroup>
Swift declaration
func outputCaptionProvider(for output: AVAssetReaderTrackOutput, validationDelegate: (any AVAssetReaderCaptionValidationHandling)? = nil) -> sending AVAssetReaderOutput.Provider<AVCaptionGroup>

Attaches the output to the reader and returns an output provider for reading caption groups. - Parameter output: The output to be attached to the reader. - Returns: A reader output provider with an interface for reading caption groups.

method · iOS 26.0+

outputMetadataProvider

TypeScript
outputMetadataProvider(output: AVAssetReaderTrackOutput): AVAssetReaderOutput_Provider<AVTimedMetadataGroup>
Swift declaration
func outputMetadataProvider(for output: AVAssetReaderTrackOutput) -> sending AVAssetReaderOutput.Provider<AVTimedMetadataGroup>

Attaches the output to the reader and returns an output provider for reading timed metadata groups. - Parameter output: The output to be attached to the reader. - Returns: A reader output provider with an interface for reading timed metadata groups.

method · iOS 26.0+

outputProviderWithRandomAccess

TypeScript
outputProviderWithRandomAccess(output: AVAssetReaderOutput): [AVAssetReaderOutput_Provider<_CoreMedia_CMReadySampleBuffer<_CoreMedia_CMSampleBuffer_DynamicContent>>, AVAssetReaderOutput_RandomAccessController]
Swift declaration
func outputProviderWithRandomAccess(for output: AVAssetReaderOutput) -> sending (AVAssetReaderOutput.Provider<CMReadySampleBuffer<CMSampleBuffer.DynamicContent>>, AVAssetReaderOutput.RandomAccessController)

Attaches the output to the reader and returns a tuple with an output provider for reading sample buffers, and an associated random access controller. - Parameter output: The output to be attached to the reader. - Returns: A tuple with an output provider for reading sample buffers, and an associated random access controller.

method · iOS 26.0+

outputCaptionProviderWithRandomAccess

TypeScript
outputCaptionProviderWithRandomAccess(output: AVAssetReaderTrackOutput, validationDelegate?: (Implements<AVAssetReaderCaptionValidationHandling> | SDKHandle) | null): [AVAssetReaderOutput_Provider<AVCaptionGroup>, AVAssetReaderOutput_RandomAccessController]
Swift declaration
func outputCaptionProviderWithRandomAccess(for output: AVAssetReaderTrackOutput, validationDelegate: (any AVAssetReaderCaptionValidationHandling)? = nil) -> sending (AVAssetReaderOutput.Provider<AVCaptionGroup>, AVAssetReaderOutput.RandomAccessController)

Attaches the output to the reader and returns a tuple with an output provider for reading caption groups, and an associated random access controller. - Parameter output: The output to be attached to the reader. - Returns: A tuple with an output provider for reading caption groups, and an associated random access controller.

method · iOS 26.0+

outputMetadataProviderWithRandomAccess

TypeScript
outputMetadataProviderWithRandomAccess(output: AVAssetReaderTrackOutput): [AVAssetReaderOutput_Provider<AVTimedMetadataGroup>, AVAssetReaderOutput_RandomAccessController]
Swift declaration
func outputMetadataProviderWithRandomAccess(for output: AVAssetReaderTrackOutput) -> sending (AVAssetReaderOutput.Provider<AVTimedMetadataGroup>, AVAssetReaderOutput.RandomAccessController)

Attaches the output to the reader and returns a tuple with an output provider for timed metadata groups buffers, and an associated random access controller. - Parameter output: The output to be attached to the reader. - Returns: A tuple with an output provider for reading timed metadata groups, and an associated random access controller.

method · iOS 26.0+

start

TypeScript
start(): void
Swift declaration
func start() throws

Prepares the reader to read media data from the asset. - Throws: An error if reading fails to start.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AVAssetReader.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All AVFoundation types →