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, };