LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useTrackContext

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

Import

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

Returns

TrackReferenceOrPlaceholder;

On this page

ImportReturns

Previous

Chevron IconuseToken
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo