File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @livekit/agents ' : patch
3+ ---
4+
5+ bugfix: agent not recieving audio from room sometimes
Original file line number Diff line number Diff line change 11// SPDX-FileCopyrightText: 2025 LiveKit, Inc.
22//
33// SPDX-License-Identifier: Apache-2.0
4+ import type { AudioFrame } from '@livekit/rtc-node' ;
45import {
5- AudioFrame ,
66 AudioStream ,
77 type NoiseCancellationOptions ,
88 RemoteParticipant ,
@@ -66,8 +66,10 @@ export class ParticipantAudioInputStream extends AudioInput {
6666 ? participant
6767 : this . room . remoteParticipants . get ( participantIdentity ) ;
6868
69+ // We need to check if the participant has a microphone track and subscribe to it
70+ // in case we miss the tracksubscribed event
6971 if ( participantValue ) {
70- for ( const publication of Object . values ( participantValue . trackPublications ) ) {
72+ for ( const publication of participantValue . trackPublications . values ( ) ) {
7173 if ( publication . track && publication . source === TrackSource . SOURCE_MICROPHONE ) {
7274 this . onTrackSubscribed ( publication . track , publication , participantValue ) ;
7375 break ;
You can’t perform that action at this time.
0 commit comments