# setMuted not working on first try

**URL:** https://community.livekit.io/t/setmuted-not-working-on-first-try/413
**Category:** Agents
**Tags:** agent-frontend, tts
**Created:** [February 27, 2026, 2:12pm UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413 "2026-02-27T14:12:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Brian](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/brian/32/521_2.png) [@Brian](https://community.livekit.io/u/Brian)
#### Post date: [February 27, 2026, 2:12pm UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/1 "2026-02-27T14:12:00Z")

</div>

Hello, we are experiencing a bug that the frontend cannot mute agent audio tracks with RemoteAudioTrack.`setMuted` on the first try.

We are logging some things to the console:

```auto
[LiveKit][TrackPublished] participant=agent-AJ_Txnh5KNwBb5u role=agent trackKind=audio kind=audio source=microphone name=roomio_audio pubTrackSid=TR_AMExKuRAayDHE6 subscribed=false hasTrack=false liveTrackSid=no-live-track-sid liveTrackMuted=false no-track

[LiveKit][TrackSubscribed] participant=agent-AJ_Txnh5KNwBb5u role=agent trackKind=audio kind=audio source=microphone name=roomio_audio pubTrackSid=TR_AMExKuRAayDHE6 subscribed=true hasTrack=true liveTrackSid=TR_AMExKuRAayDHE6 liveTrackMuted=false trackSid=TR_AMExKuRAayDHE6 trackMuted=false

[LiveKit][toggleTTSAudio][before] {sid: 'TR_AMExKuRAayDHE6', kind: 'audio', isMuted: false}
[LiveKit][toggleTTSAudio][after] {sid: 'TR_AMExKuRAayDHE6', kind: 'audio', isMuted: true}

```

→ this is on the first try, shortly after the agent joined the room.  
Then when we press our “mute” button two times (to unmute and then mute), it works. I am not sure what the problem is here.  
We temporarily switched to the RemoteAudioTrack.`setVolume` method for now.  
**Frontend package versions:**

```auto
@livekit/krisp-noise-filter@0.3.4
│ └── livekit-client@2.16.0 deduped
├── livekit-client@2.16.0
└── livekit-server-sdk@2.8.1

```

---

<div class="post-metadata">

### Author: ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)
#### Post date: [March 1, 2026, 11:52pm UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/2 "2026-03-01T23:52:55Z")

</div>

I think you want to call `setEnabled`, here is an example: [dev-day-demos/exa-deep-researcher/frontend/src/app/page.tsx at main · livekit-examples/dev-day-demos · GitHub](https://github.com/livekit-examples/dev-day-demos/blob/main/exa-deep-researcher/frontend/src/app/page.tsx#L189)

---

<div class="post-metadata">

### Author: ![Brian](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/brian/32/521_2.png) [@Brian](https://community.livekit.io/u/Brian)
#### Post date: [March 16, 2026, 4:15pm UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/3 "2026-03-16T16:15:31Z")

</div>

Hey, thanks this worked.  
Though now I am curious what the purpose of “setMuted” is 🤔

---

<div class="post-metadata">

### Author: ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)
#### Post date: [March 17, 2026, 8:51am UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/4 "2026-03-17T08:51:19Z")

</div>

I’m sure I must be looking at the wrong thing but I can’t see a setMuted in the RemoteAudioTrack, [RemoteAudioTrack | LiveKit JS Client SDK - v2.17.3](https://docs.livekit.io/reference/client-sdk-js/classes/RemoteAudioTrack.html).

---

<div class="post-metadata">

### Author: ![Brian](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/brian/32/521_2.png) [@Brian](https://community.livekit.io/u/Brian)
#### Post date: [March 17, 2026, 9:57am UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/5 "2026-03-17T09:57:53Z")

</div>

I found this:

 ![Screenshot 2026-03-17 at 10.57.25](https://us1.discourse-cdn.com/flex001/uploads/livekit2/original/1X/b8865c8bbb11c41550e330e380df3a62941a6450.png)

---

<div class="post-metadata">

### Author: ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)
#### Post date: [March 17, 2026, 10:10am UTC](https://community.livekit.io/t/setmuted-not-working-on-first-try/413/6 "2026-03-17T10:10:05Z")

</div>

That API is marked as `internal`: [client-sdk-js/src/room/track/RemoteTrack.ts at main · livekit/client-sdk-js · GitHub](https://github.com/livekit/client-sdk-js/blob/main/src/room/track/RemoteTrack.ts#L31)

Still doesn’t answer your question why it doesn’t work on the first try 🙂 but that wouldn’t be supported.
