LiveKit ESP32 SDK
|
Connect and disconnect from a room. More...
Enumerations | |
enum | livekit_connection_state_t { LIVEKIT_CONNECTION_STATE_DISCONNECTED = 0 , LIVEKIT_CONNECTION_STATE_CONNECTING = 1 , LIVEKIT_CONNECTION_STATE_CONNECTED = 2 , LIVEKIT_CONNECTION_STATE_RECONNECTING = 3 , LIVEKIT_CONNECTION_STATE_FAILED = 4 } |
Connection state of a room. More... |
Functions | |
livekit_err_t | livekit_room_connect (livekit_room_handle_t handle, const char *server_url, const char *token) |
Connects to a room asynchronously. | |
livekit_err_t | livekit_room_close (livekit_room_handle_t handle) |
Disconnects from a room asynchronously. | |
livekit_connection_state_t | livekit_room_get_state (livekit_room_handle_t handle) |
Gets the current connection state of a room. | |
const char * | livekit_connection_state_str (livekit_connection_state_t state) |
Gets a string representation of a connection state. |
Connect and disconnect from a room.
The connection state of a room can be monitored by setting a handler for livekit_room_options_t::on_state_changed.
Connection state of a room.
const char * livekit_connection_state_str | ( | livekit_connection_state_t | state | ) |
Gets a string representation of a connection state.
state[in] | Connection state. |
livekit_err_t livekit_room_close | ( | livekit_room_handle_t | handle | ) |
Disconnects from a room asynchronously.
handle[in] | Room handle. |
livekit_err_t livekit_room_connect | ( | livekit_room_handle_t | handle, |
const char * | server_url, | ||
const char * | token ) |
Connects to a room asynchronously.
handle[in] | Room handle. |
server_url[in] | URL of the LiveKit server beginning with "wss://" or "ws://". |
token[in] | Server-generated token for authentication. |
livekit_connection_state_t livekit_room_get_state | ( | livekit_room_handle_t | handle | ) |
Gets the current connection state of a room.
handle[in] | Room handle. |