LiveKit LogoDocs
Real-timeEgress/IngressCloudGuidesReference

GitHub Logo

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;

On this page

ImportPropertiesReturns

Previous

Chevron IconuseEnsureRoom
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

© 2023 LiveKit. All rights reserved.

Terms of Service
|
Cookie Policy
|
Privacy Policy
GitHub LogoSlack Logo