Valora
API Reference@valora-ai/reactindexFunctions

useTrackMutedIndicator

function useTrackMutedIndicator(trackRef?): TrackMutedIndicatorReturnType;

Defined in: packages/react/src/hooks/track/useTrackMutedIndicator.ts:48

The useTrackMutedIndicator hook is used to implement the TrackMutedIndicator component and returns the muted state of the given track.

Parameters

ParameterType
trackRef?unknown

Returns

TrackMutedIndicatorReturnType

Example

// Basic — read whether one track is muted.
const { isMuted } = useTrackMutedIndicator(trackRef);

// Advanced — show mute state for each camera tile.
function MuteBadge() {
  const trackRef = useTrackRefContext();
  const { isMuted } = useTrackMutedIndicator(trackRef);
  return <span>{isMuted ? "Muted" : "Live"}</span>;
}

<TrackLoop tracks={tracks}>
  <ParticipantTile />
  <MuteBadge />
</TrackLoop>;

On this page

Valora is local-first

No API key, no server — everything in this doc runs on-device.

Star on GitHub