diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index ab67f519..7125a3c7 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -20,7 +20,12 @@ from ._proto import stats_pb2 as stats from ._proto.e2ee_pb2 import EncryptionState, EncryptionType, KeyDerivationFunction -from ._proto.participant_pb2 import ParticipantKind, ParticipantState, DisconnectReason +from ._proto.participant_pb2 import ( + ParticipantKind, + ParticipantKindDetail, + ParticipantState, + DisconnectReason, +) from ._proto.room_pb2 import ( ConnectionQuality, ConnectionState, @@ -146,6 +151,7 @@ "LocalParticipant", "Participant", "ParticipantKind", + "ParticipantKindDetail", "ParticipantState", "DisconnectReason", "RemoteParticipant", diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 150477d5..e8a3fcf0 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -127,6 +127,11 @@ def kind(self) -> proto_participant.ParticipantKind.ValueType: """Participant's kind (e.g., regular participant, ingress, egress, sip, agent).""" return self._info.kind + @property + def kind_details(self) -> list[proto_participant.ParticipantKindDetail.ValueType]: + """Additional details refining the participant's kind (e.g., cloud agent, forwarded, whatsapp/twilio connector, rtsp bridge).""" + return list(self._info.kind_details) + @property def state(self) -> proto_participant.ParticipantState.ValueType: """Participant's connection state (joining, joined, active, disconnected)."""