Skip to content

Commit f0807b0

Browse files
committed
feat: add connect_timeout and single_peer_connection
also updates rust & protocol submodules
1 parent 57ae0ec commit f0807b0

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

livekit-rtc/livekit/rtc/room.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class RoomOptions:
107107
"""Options for end-to-end encryption."""
108108
rtc_config: RtcConfiguration | None = None
109109
"""WebRTC-related configuration."""
110+
connect_timeout_ms: int | None = None
111+
"""Timeout in milliseconds for each signal connection attempt. When None, uses the default (5000ms)."""
112+
single_peer_connection: bool | None = None
113+
"""Use a single peer connection for both publish and subscribe. When None, uses the default (true)."""
110114

111115

112116
@dataclass
@@ -432,6 +436,12 @@ def on_participant_connected(participant):
432436
req.connect.options.auto_subscribe = options.auto_subscribe
433437
req.connect.options.dynacast = options.dynacast
434438

439+
if options.connect_timeout_ms is not None:
440+
req.connect.options.connect_timeout_ms = options.connect_timeout_ms
441+
442+
if options.single_peer_connection is not None:
443+
req.connect.options.single_peer_connection = options.single_peer_connection
444+
435445
if options.e2ee:
436446
warnings.warn(
437447
"options.e2ee is deprecated, use options.encryption instead",

livekit-rtc/rust-sdks

Submodule rust-sdks updated 44 files

0 commit comments

Comments
 (0)