GitHub

Source

useTrackContext

caution:

This API is deprecated:

useTrackContext has been renamed to useTrackRefContext, use this as a drop in replacement.

Ensures that a track reference is provided via context. If not inside a TrackRefContext, an error is thrown.

Import

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

Returns

TrackReferenceOrPlaceholder;