LiveKit ESP32 SDK
|
Get information about a room and its participants. More...
Data Structures | |
struct | livekit_room_info_t |
Information about a room. More... | |
struct | livekit_participant_info_t |
Information about a participant in a room. More... |
Enumerations | |
enum | livekit_participant_kind_t { LIVEKIT_PARTICIPANT_KIND_STANDARD = 0 , LIVEKIT_PARTICIPANT_KIND_INGRESS = 1 , LIVEKIT_PARTICIPANT_KIND_EGRESS = 2 , LIVEKIT_PARTICIPANT_KIND_SIP = 3 , LIVEKIT_PARTICIPANT_KIND_AGENT = 4 } |
Participant kind. More... | |
enum | livekit_participant_state_t { LIVEKIT_PARTICIPANT_STATE_JOINING = 0 , LIVEKIT_PARTICIPANT_STATE_JOINED = 1 , LIVEKIT_PARTICIPANT_STATE_ACTIVE = 2 , LIVEKIT_PARTICIPANT_STATE_DISCONNECTED = 3 } |
Participant state. More... |
Get information about a room and its participants.
If you have worked with LiveKit before on other platforms, you will be familiar with the accessors on the room object and participant objects for getting information about them (e.g. sid, name, etc.). In this SDK, to avoid unnecessary persistent memory allocations that aren't needed for all applications, this information is instead provided through the following handlers which are invoked when the corresponding information is first received or subsequently updated:
In your implementation, you are free to examine the fields in the provided info struct and copy any information you need to keep for later use; the pointer to this struct is only valid until the handler returns.
The following example demonstrates how you can define an on_participant_info handler to perform some action when a participant named "Jon" joins the room:
struct livekit_room_info_t |
Information about a room.
struct livekit_participant_info_t |
Information about a participant in a room.
Data Fields | ||
---|---|---|
char * | identity | Unique identity of the participant, as specified when connecting. |
livekit_participant_kind_t | kind | The participant's kind (e.g. standard, agent, etc.). |
char * | metadata | Optional arbitrary metadata in string format. |
char * | name | Optional display name. |
char * | sid | Unique identifier generated by LiveKit server. |
livekit_participant_state_t | state | The current state of the participant. |
Participant kind.
Enumerator | |
---|---|
LIVEKIT_PARTICIPANT_KIND_STANDARD | A regular participant, typically an end-user in your application. |
LIVEKIT_PARTICIPANT_KIND_INGRESS | A server-side process that is ingesting media into the session using LiveKit Ingress. |
LIVEKIT_PARTICIPANT_KIND_EGRESS | A server-side process that is recording the session using LiveKit Egress. |
LIVEKIT_PARTICIPANT_KIND_SIP | A telephony user connected via SIP. |
LIVEKIT_PARTICIPANT_KIND_AGENT | An agent spawned with the Agents Framework. |
Participant state.