One Logo Pool Ball
CreateMLComponents · IOS API REFERENCE

VideoReader.CameraAsyncBuffers

struct · iOS 16.0+ · SDK 27.1

struct CameraAsyncBuffers

An async sequence of video frames. This sequence allows iterating through the camera frames. Only one iterator can be created per sequence.

Members (3)

method · iOS 16.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): VideoReader_CameraAsyncBuffers_Iterator
Swift declaration
consuming func makeAsyncIterator() -> VideoReader.CameraAsyncBuffers.Iterator

Constructs an iterator.

get · iOS 18.0+

captureSession

TypeScript
get captureSession(): _AVFoundation_AVCaptureSession
Swift declaration
var captureSession: AVCaptureSession { get }

The capture session. You can use the capture session to create a preview with <doc://com.apple.documentation/documentation/avfoundation/avcapturevideopreviewlayer> and to configure the input device, for example switching the input camera. ``` let sequence = try await VideoReader.readCamera(configuration: configuration) sequence.captureSession.beginConfiguration() sequence.captureSession.removeInput(captureSession.inputs[0]) try sequence.captureSession.addInput(AVCaptureDeviceInput(device: camera)) sequence.captureSession.commitConfiguration() ```

get · iOS 16.0+

count

TypeScript
get count(): (number) | null
Swift declaration
var count: Int? { get }

The number of frames. For this sequence count is always nil.

Skipped declarations

No declarations were skipped in this snapshot.

All CreateMLComponents types →