Functions & Hooks

createCameraFrameSink

function createCameraFrameSink<F>(options?: CameraFrameSinkOptions<F>): CameraFrameSink<F>;

useCameraFrame with no React: an analyze/record pipeline needs no on-screen canvas. The sink owns the buffer lifecycle exactly as the hook does - mint once, setNativeBuffer per frame, re-post until acked - and its image/posture fields update as frames arrive. Call dispose() when the stream ends. Everything in the hook's remarks about frame lifetime applies to push unchanged.

Type Parameters

F

F extends FrameLike = FrameLike

Parameters

options?

CameraFrameSinkOptions<F>

Returns

CameraFrameSink<F>

On this page