LiveKit ESP32 SDK
Loading...
Searching...
No Matches
Lifecycle

Create and destroy room objects. More...

Data Structures

struct  livekit_room_options_t
 Options for creating a room. More...

Typedefs

typedef void * livekit_room_handle_t
 Handle to a room object.

Functions

livekit_err_t livekit_room_create (livekit_room_handle_t *handle, const livekit_room_options_t *options)
 Creates a room.
livekit_err_t livekit_room_destroy (livekit_room_handle_t handle)
 Destroys a room.

Detailed Description

Create and destroy room objects.


Data Structure Documentation

◆ livekit_room_options_t

struct livekit_room_options_t

Options for creating a room.

This is the main way a room is configured. It is passed to livekit_room_create.

Data Fields
void * ctx User context passed to all handlers.
void(*)(const livekit_data_received_t *data, void *ctx) on_data_received Handler for data packets received from remote participants.
See also
Data Packets
void(*)(const livekit_participant_info_t *info, void *ctx) on_participant_info Handler for when participant information is received.
See also
Room & Participant Info
void(*)(const livekit_room_info_t *info, void *ctx) on_room_info Handler for when room information is received.
See also
Room & Participant Info
void(*)(const livekit_rpc_result_t *result, void *ctx) on_rpc_result Handler for when an RPC method invoked with livekit_room_rpc_invoke returns a result.
See also
Remote Method Calls (RPC)
void(*)(livekit_connection_state_t state, void *ctx) on_state_changed Handler for when the room's connection state changes.
See also
Connection
livekit_pub_options_t publish Options for publishing media.
Note
Only required if the room publishes media.
livekit_sub_options_t subscribe Options for subscribing to media.
Note
Only required if the room subscribes to media.

Typedef Documentation

◆ livekit_room_handle_t

typedef void* livekit_room_handle_t

Handle to a room object.

Function Documentation

◆ livekit_room_create()

livekit_err_t livekit_room_create ( livekit_room_handle_t * handle,
const livekit_room_options_t * options )

Creates a room.

Parameters
handle[out]Room handle.
options[in]Options for the new room.
Returns
LIVEKIT_ERR_NONE if successful, otherwise an error code.

◆ livekit_room_destroy()

livekit_err_t livekit_room_destroy ( livekit_room_handle_t handle)

Destroys a room.

Parameters
handle[in]Room handle.
Warning
For normal connection closure, disconnect the room first using livekit_room_close before destroying the room.
Returns
LIVEKIT_ERR_NONE if successful, otherwise an error code.