captureSession
The capture session.
Declaration
var captureSession: AVCaptureSession { get }Discussion
You can use the capture session to create a preview with 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()