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:
[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:
@livekit/krisp-noise-filter@0.3.4
│ └── livekit-client@2.16.0 deduped
├── livekit-client@2.16.0
└── livekit-server-sdk@2.8.1