in the frontend, when the participant mutes his mi...
# ask-ai
b
in the frontend, when the participant mutes his mic does the frontend javascript throw track unsubscribed event (in livekit agents)?
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Muting a microphone from the frontend in LiveKit does not cause a
track unsubscribed
event to fire. Instead, when a participant mutes their microphone, the LiveKit client will trigger a
TrackMuted
event for all participants in the room. The
TrackUnsubscribed
event only occurs when the subscription to a track is fully removed, not when its mute state changes. The track remains published and subscribed even when muted—it simply stops sending data until unmuted again. For reference, the relevant event when muting is
TrackMuted
, not
TrackUnsubscribed
. Sources: src/room/track/LocalAudioTrack.ts | Publishing tracks | LiveKit Docs