| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository contains a collection of small, self-contained examples for the LiveKit C++ SDK.
The goal of these examples is to demonstrate common usage patterns of the LiveKit C++ SDK (connecting to a room, publishing tracks, RPC, data streams, etc.) without requiring users to build the SDK from source.
| Example | Description |
|---|---|
| basic_room | Connects to a room and publishes synthetic audio and video tracks. |
| frame_metadata | Publishes and consumes video frames with frame metadata such as IDs, timestamps, and user data. |
| hello_livekit/receiver | Subscribes to the sender example's video and data tracks. |
| hello_livekit/sender | Publishes synthetic video and data for a paired receiver example. |
| logging_levels/basic_usage | Demonstrates SDK log-level filtering and log callbacks. |
| logging_levels/custom_sinks | Shows custom SDK log sinks such as file, JSON, and ROS-style output. |
| ping_pong/ping | Sends ping messages over a data track and records response latency. |
| ping_pong/pong | Listens for ping messages and publishes matching pong responses. |
| platform_audio | Demonstrates microphone capture and speaker playout with platform audio devices. |
| simple_data_stream | Sends and receives text and byte streams over LiveKit data streams. |
| simple_room | Connects to a room, publishes local media, and subscribes to remote media. |
| simple_rpc | Demonstrates LiveKit RPC calls between participants. |
| token_source | Shows ways to supply connection credentials through LiveKit token sources. |
These examples automatically download a prebuilt LiveKit C++ SDK release from GitHub at CMake configure time.
This is handled by the CMake helper: LiveKitSDK.cmake.
By default, the examples download the latest released LiveKit C++ SDK.
You can pin a specific SDK version using the LIVEKIT_SDK_VERSION CMake option.
Use the latest release:
cmake -S . -B buildUse a specific version:
cmake -S . -B build -DLIVEKIT_SDK_VERSION=1.3.0Reconfigure to change versions:
rm -rf build
cmake -S . -B build -DLIVEKIT_SDK_VERSION=1.3.0Build against a local SDK:
rm -rf build
# install the SDK into $HOME/livekit-sdk-install (or any other directory)
cmake --install <sdk-build-dir> --prefix "$HOME/livekit-sdk-install"
# build the examples against the local SDK
cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR="$HOME/livekit-sdk-install"cmake -S . -B build
cmake --build buildcmake -S . -B build
cmake --build build --config ReleaseThe LiveKit Release SDK is downloaded into build/_deps/livekit-sdk/
After building, example binaries are located under:
build/<example-name>/For example:
./build/basic_room/basic_room --url <ws-url> --token <token>Prebuilt SDKs are downloaded automatically for:
If no matching SDK is available for your platform, CMake configuration will fail with a clear error.
| Back | FazBrowse Home | New Git URL |