diff --git a/.changeset/upset-clowns-melt.md b/.changeset/upset-clowns-melt.md new file mode 100644 index 000000000..307d37887 --- /dev/null +++ b/.changeset/upset-clowns-melt.md @@ -0,0 +1,5 @@ +--- +'@livekit/agents': patch +--- + +add logs for tracks on participant diff --git a/agents/src/voice/room_io/_input.ts b/agents/src/voice/room_io/_input.ts index 9bd294a09..0c0562ea4 100644 --- a/agents/src/voice/room_io/_input.ts +++ b/agents/src/voice/room_io/_input.ts @@ -66,6 +66,17 @@ export class ParticipantAudioInputStream extends AudioInput { ? participant : this.room.remoteParticipants.get(participantIdentity); + // Convert Map iterator to array for Pino serialization + const trackPublicationsArray = Array.from(participantValue?.trackPublications.values() ?? []); + + this.logger.info( + { + participantValue: participantValue?.identity, + trackPublications: trackPublicationsArray, + lengthOfTrackPublications: trackPublicationsArray.length, + }, + 'participantValue.trackPublications', + ); // We need to check if the participant has a microphone track and subscribe to it // in case we miss the tracksubscribed event if (participantValue) {