useIsMuted
function useIsMuted(_trackRef): boolean;Defined in: packages/react/src/hooks/track/useIsMuted.ts:17
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.
Parameters
| Parameter | Type |
|---|---|
_trackRef | unknown |
Returns
boolean
Example
const isMuted = useIsMuted({ source: "microphone" });
return <span>{isMuted ? "Muted" : "Unmuted"}</span>;