LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

TrackToggle

With the TrackToggle component it is possible to mute and unmute your camera and microphone. The component uses an html button element under the hood so you can treat it like a button.

Import

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

Usage

<LiveKitRoom>
<TrackToggle source={Track.Source.Microphone} />
<TrackToggle source={Track.Source.Camera} />
</LiveKitRoom>

Properties

#
sourceT

#
captureOptions?CaptureOptionsBySource<T>

(Optional)

(Optional)

#
onChange?(enabled: boolean) => void

(Optional)

#
showIcon?boolean

(Optional)

On this page

ImportUsageProperties

Previous

Chevron IconTrackMutedIndicator
LiveKit logo

Product

SFU

SDKs

Performance

Deployment

GitHub Logo