DriftCapture · interface

FrameSource

Explained in DriftCapture.

interface FrameSource
import type { FrameSource } from '@driftengine/capture';

Methods

frameCount

frameCount(): number

frameAt

frameAt(index: number, out: Uint8Array): FrameSize | Promise<FrameSize>

Writes frame index as RGBA into out and answers the frame's size. A buffer too small for the frame is left untouched, so a caller may ask with an empty one to learn the size first.

ParameterTypeDescription
indexnumber
outUint8Array