Skip to main content
Version: Next

Function: useManagedPooledTrack()

useManagedPooledTrack(enabled, width, height, poolSize): ManagedPooledTrack

Defined in: src/internal/useManagedPooledTrack.ts:77

Owns the async lifecycle of a surface pool + pooled custom video track: allocates both while enabled (re-allocates when the dimensions change), exposes worklet-ready descriptors, and tears down in the correct order (stop tracks, then dispose the pool) on disable/unmount.

Parameters​

ParameterType
enabledboolean
widthnumber
heightnumber
poolSizenumber

Returns​

ManagedPooledTrack