LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useEnsureRoom

Ensures that a room is provided, either via context or explicitly as a parameter. If no room is provided, an error is thrown.

Import

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

Parameters

#
room?Room

Returns

Room;

On this page

ImportParametersReturns

Previous

Chevron IconuseEnsureParticipant
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo