GitHub

Source

useEnsureTrackRef

Ensures that a track reference is provided, either via context or explicitly as a parameter. If not inside a TrackRefContext and no track reference is provided, an error is thrown.

Import

import { useEnsureTrackRef } from "@livekit/components-react";

Properties

trackRef?TrackReferenceOrPlaceholder

Returns

TrackReferenceOrPlaceholder;