Elixir server SDK for LiveKit.
This module is intentionally thin: it only builds LiveKit.Client structs.
Token creation lives in LiveKit.AccessToken, and the shared Twirp transport
used by service modules lives in LiveKit.Twirp.
iex> {:ok, client} = LiveKit.client(
...> url: "https://example.livekit.cloud",
...> api_key: "api-key",
...> api_secret: "api-secret"
...> )
iex> client.config.api_key
"api-key"Milestone status
Milestones 1–4 are implemented: shared foundation, RoomService,
EgressService, IngressService, TokenVerifier, and WebhookReceiver.
Remaining modules (SIPService, agent dispatch, and connectors) are not yet
available.
Summary
Functions
Builds a LiveKit.Client. See LiveKit.Client.new/1 for the options.
Same as client/1 but raises LiveKit.Error on invalid options.
Functions
@spec client(keyword()) :: {:ok, LiveKit.Client.t()} | {:error, LiveKit.Error.t()}
Builds a LiveKit.Client. See LiveKit.Client.new/1 for the options.
Examples
iex> {:ok, client} = LiveKit.client(url: "http://localhost:7880", api_key: "k", api_secret: "s")
iex> client.config.url
"http://localhost:7880"
@spec client!(keyword()) :: LiveKit.Client.t()
Same as client/1 but raises LiveKit.Error on invalid options.
Examples
iex> LiveKit.client!(url: "http://localhost:7880", api_key: "k", api_secret: "s").config.api_secret
"s"