useIsMuted
The useIsMuted
hook is used to implement the TrackMutedIndicator
or your custom implementation of it. It returns a boolean
that indicates if the track is muted or not.
Import
import { useIsMuted } from "@livekit/components-react";
Usage
With a track reference
const isMuted = useIsMuted(track);
With a track source / participant
const isMuted = useIsMuted("camera", { participant });
Properties
Returns
boolean indicating if the track is muted
boolean;