big-controller-60015
10/30/2025, 11:00 AMtall-airline-16756
10/30/2025, 11:00 AMtall-airline-16756
10/30/2025, 11:01 AMListParticipants API to get all participants in a room. Just keep in mind, this needs the roomList grant. Then, you can easily see if a specific participant identity is in that list.
• Get Participant Details: Another option is the GetParticipant API, which lets you fetch info about a particular participant. This requires the roomAdmin grant. If the participant isn’t currently in the room, the request will let you know by failing.
Using Client-Side SDKs:
• The Room object has a remoteParticipants array that includes all other participants in the room. You can go through this array to find the participant you’re looking for.
• The localParticipant object represents you, the current user, in the room.
Also, each participant has a state field that tells you their connection status, like JOINING, JOINED, ACTIVE, or DISCONNECTED.
If you’d like, I’m here to help you with any part of implementing this—just let me know!
Sources: Connecting to LiveKit | LiveKit docs | Rooms, participants, and tracks | LiveKit docs | livekit-rtc/livekit/rtc/room.py | Managing participants | LiveKit docsbig-controller-60015
10/30/2025, 12:06 PMtall-airline-16756
10/30/2025, 12:06 PMtrack_subscribed event. Here’s a simple way to do it:
Using the track_subscribed Event:
@ctx.room.on("track_subscribed")
def on_track_subscribed(track, publication, participant):
participant_id = participant.sid # Server-generated unique ID
participant_identity = participant.identity # Developer-defined unique identifier
participant_name = participant.name # Optional display name
print(f"Participant ID: {participant_id}")
print(f"Participant Identity: {participant_identity}")
print(f"Participant Name: {participant_name}")
Another Option:
You can also tap into the participant_connected event to get participant details right when they join the room:
@ctx.room.on("participant_connected")
def on_participant_connected(participant):
print(f"Participant connected: {participant.identity} ({participant.name})")
print(f"Participant SID: {participant.sid}")
If you have any questions or want me to walk you through this further, just let me know—I’m here to help!
Sources: stream_audio.py | livekit-rtc/livekit/rtc/_proto/room_pb2.pyi | packages/livekit-rtc/src/proto/room_pb.ts | Rooms, participants, and tracks | LiveKit docs | Node.js Agents Architecture | livekit/livekit_composite | DeepWiki