LiveKit C++ Client SDK v1.2.0
Real-time audio/video/data SDK for C++
Loading...
Searching...
No Matches
livekit::RoomOptions Struct Reference

Top-level room connection options. More...

#include <room.h>

Public Attributes

bool auto_subscribe = true
 If true (default), automatically subscribe to all remote tracks.
 
std::optional< bool > adaptive_stream
 Enable adaptive stream for subscribed video tracks.
 
bool dynacast = false
 Enable dynacast (server sends optimal layers depending on subscribers).
 
std::optional< E2EEOptionsencryption
 Optional end-to-end encryption settings.
 
std::optional< RtcConfigrtc_config
 Optional WebRTC configuration (ICE policy, servers, etc.)
 
std::optional< std::uint32_t > join_retries
 Number of retries for the initial room join after the first attempt.
 
bool single_peer_connection = true
 Enable single peer connection mode.
 
std::optional< std::chrono::milliseconds > connect_timeout
 Timeout for each individual signal connection attempt.
 

Detailed Description

Top-level room connection options.

Member Data Documentation

◆ adaptive_stream

std::optional<bool> livekit::RoomOptions::adaptive_stream

Enable adaptive stream for subscribed video tracks.

When enabled, the SDK tells the server it may adjust the video layers sent to this client based on what the application is currently rendering. This lets the server pause or downscale subscribed video that is off-screen, hidden, or only needed at a smaller size, reducing downstream bandwidth and decode work. This affects media received by this room; use dynacast to control how this client publishes layers to others.

See also
https://docs.livekit.io/transport/media/subscribe/#adaptive-stream

If unset, the Rust SDK default is used.

◆ auto_subscribe

bool livekit::RoomOptions::auto_subscribe = true

If true (default), automatically subscribe to all remote tracks.

This is CRITICAL. Without auto_subscribe, you will never receive:

  • track_subscribed events
  • remote audio/video frames
See also
https://docs.livekit.io/transport/media/subscribe/#selective-subscription

◆ connect_timeout

std::optional<std::chrono::milliseconds> livekit::RoomOptions::connect_timeout

Timeout for each individual signal connection attempt.

If unset, the Rust SDK default is used.

◆ dynacast

bool livekit::RoomOptions::dynacast = false

Enable dynacast (server sends optimal layers depending on subscribers).

See also
https://docs.livekit.io/transport/media/publish/#dynacast

◆ encryption

std::optional<E2EEOptions> livekit::RoomOptions::encryption

Optional end-to-end encryption settings.

See also
https://docs.livekit.io/transport/encryption/

◆ join_retries

std::optional<std::uint32_t> livekit::RoomOptions::join_retries

Number of retries for the initial room join after the first attempt.

If unset, the Rust SDK default is used.

◆ rtc_config

std::optional<RtcConfig> livekit::RoomOptions::rtc_config

Optional WebRTC configuration (ICE policy, servers, etc.)

See also
https://docs.livekit.io/intro/basics/connect/#connection-reliability

◆ single_peer_connection

bool livekit::RoomOptions::single_peer_connection = true

Enable single peer connection mode.

When true, uses one RTCPeerConnection for both publishing and subscribing instead of two separate connections. Falls back to dual peer connection if the server doesn't support single PC.


The documentation for this struct was generated from the following file: