GitHub

Source

useEnsureTrackReference

caution:

This API is deprecated:

useEnsureTrackReference has been renamed to useEnsureTrackRef, use this as a drop in replacement.

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

Import

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

Properties

track?TrackReferenceOrPlaceholder

Returns

TrackReferenceOrPlaceholder;