From 50d8aa3d2c39cf355cb109f07e9260301a01a41e Mon Sep 17 00:00:00 2001 From: Wouter Klijn <20139217+wuhkuh@users.noreply.github.com> Date: Tue, 26 Nov 2024 08:45:05 +0100 Subject: [PATCH] chore: expose reconnection types (#1328) * chore: expose reconnection types * chore: add changeset * Update expose-reconnect-types.md --------- Co-authored-by: lukasIO --- .changeset/expose-reconnect-types.md | 5 +++++ src/index.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/expose-reconnect-types.md diff --git a/.changeset/expose-reconnect-types.md b/.changeset/expose-reconnect-types.md new file mode 100644 index 0000000000..49c641ed60 --- /dev/null +++ b/.changeset/expose-reconnect-types.md @@ -0,0 +1,5 @@ +--- +'livekit-client': patch +--- + +Expose `ReconnectContext` and `ReconnectPolicy`, for use in custom reconnection implementations. diff --git a/src/index.ts b/src/index.ts index ff25e97632..870cb82b54 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import { Mutex } from '@livekit/mutex'; import { DataPacket_Kind, DisconnectReason, SubscriptionError } from '@livekit/protocol'; import { LogLevel, LoggerNames, getLogger, setLogExtension, setLogLevel } from './logger'; import DefaultReconnectPolicy from './room/DefaultReconnectPolicy'; +import type { ReconnectContext, ReconnectPolicy } from './room/ReconnectPolicy'; import Room, { ConnectionState } from './room/Room'; import LocalParticipant from './room/participant/LocalParticipant'; import Participant, { ConnectionQuality, ParticipantKind } from './room/participant/Participant'; @@ -108,4 +109,6 @@ export type { AudioSenderStats, VideoReceiverStats, VideoSenderStats, + ReconnectContext, + ReconnectPolicy, };