LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useMediaTrack

Import

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

Parameters

#
sourceVideoSource | AudioSource

#
options?UseMediaTrackOptions

#
participant?Participant

Returns

{
publication: import('livekit-client').TrackPublication | undefined;
isMuted: boolean | undefined;
isSubscribed: boolean | undefined;
track: import('livekit-client').Track | undefined;
elementProps: React.HTMLAttributes<HTMLElement>;
}

On this page

ImportParametersReturns

Previous

Chevron IconuseMediaDeviceSelect
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo