realtime-avatar 0.24.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -0
- package/dist/browser.d.ts +2 -87
- package/dist/browser.js +6 -1
- package/dist/{chunk-EODL5S3A.js → chunk-HMESE54B.js} +46 -10
- package/dist/chunk-XJPGQMEW.js +161 -0
- package/dist/express.d.ts +1 -1
- package/dist/express.js +5 -3
- package/dist/hono.d.ts +1 -1
- package/dist/hono.js +2 -2
- package/dist/index.d.ts +24 -1
- package/dist/index.js +1 -1
- package/dist/nextjs.d.ts +1 -1
- package/dist/nextjs.js +2 -2
- package/dist/playout-delay-CtRZdtsj.d.ts +168 -0
- package/dist/{proxy-client-DlFXaXtn.d.ts → proxy-client-C8M_G_Kk.d.ts} +168 -18
- package/dist/react-native.d.ts +3 -3
- package/dist/react-native.js +385 -40
- package/dist/react.d.ts +75 -14
- package/dist/react.js +576 -97
- package/dist/server.js +1 -1
- package/dist/tanstack-start.d.ts +1 -1
- package/dist/tanstack-start.js +2 -2
- package/dist/tools.d.ts +17 -1
- package/dist/tools.js +28 -8
- package/dist/{types-CpqMHna3.d.ts → types-C7B7jOx6.d.ts} +7 -0
- package/package.json +1 -1
- package/dist/chunk-4PWWEERK.js +0 -87
- package/dist/playout-delay-DWOc8iCl.d.ts +0 -65
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turning the microphone on, and saying what went wrong when it does not.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS EXISTS. `room.localParticipant.setMicrophoneEnabled(true)` is one line, so every
|
|
5
|
+
* integration writes it inline and none of them handle its rejection — the reject path is
|
|
6
|
+
* invisible until a real user is on a real machine. When it fails there is nothing to see:
|
|
7
|
+
* the call is already connected, the page is mid-`await`, and the rejection becomes an
|
|
8
|
+
* unhandled promise nobody is looking at. The reported symptom is always the same sentence —
|
|
9
|
+
* "the mic won't start" — and it covers at least six unrelated causes with different fixes,
|
|
10
|
+
* one of which is not in the browser at all.
|
|
11
|
+
*
|
|
12
|
+
* So this returns a RESULT rather than throwing: the cause becomes a value the caller has to
|
|
13
|
+
* handle, and each one carries the sentence that names its actual fix. `message` is what the
|
|
14
|
+
* browser said; `hint` is what the person should do.
|
|
15
|
+
*
|
|
16
|
+
* It is deliberately structural — it never imports `livekit-client`, so it pins no version
|
|
17
|
+
* and adds no bytes. Anything with a `localParticipant.setMicrophoneEnabled` satisfies it.
|
|
18
|
+
*/
|
|
19
|
+
/** The sliver of livekit-client's `Room` this needs. Structural on purpose — see above. */
|
|
20
|
+
interface MicrophoneCapableRoom {
|
|
21
|
+
localParticipant: {
|
|
22
|
+
setMicrophoneEnabled(enabled: boolean): Promise<unknown>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Why the microphone did not start. Every variant has a DIFFERENT fix, which is the whole
|
|
27
|
+
* reason this is an enum and not a boolean.
|
|
28
|
+
*/
|
|
29
|
+
type MicrophoneFailureReason =
|
|
30
|
+
/** No `navigator.mediaDevices` — the page is not a secure context. */
|
|
31
|
+
"insecure-origin"
|
|
32
|
+
/** The permission prompt was never answered. getUserMedia may never settle; we time out. */
|
|
33
|
+
| "no-answer"
|
|
34
|
+
/** The BROWSER denied it — the site's own permission, resettable from the address bar. */
|
|
35
|
+
| "denied-by-browser"
|
|
36
|
+
/** The OS denied it — macOS System Settings, nothing the page or the site can change. */
|
|
37
|
+
| "denied-by-os"
|
|
38
|
+
/** No input device is connected, or none matches the constraints. */
|
|
39
|
+
| "no-device"
|
|
40
|
+
/** A device exists but something else holds it — another tab, app, or a stale call. */
|
|
41
|
+
| "device-in-use"
|
|
42
|
+
/** Anything unrecognised. `message` still carries what the browser said. */
|
|
43
|
+
| "unknown";
|
|
44
|
+
type MicrophoneResult = {
|
|
45
|
+
ok: true;
|
|
46
|
+
} | {
|
|
47
|
+
ok: false;
|
|
48
|
+
reason: MicrophoneFailureReason;
|
|
49
|
+
/** What the browser reported, verbatim. Show it — it is often exact. */
|
|
50
|
+
message: string;
|
|
51
|
+
/** What the person should actually do about it. */
|
|
52
|
+
hint: string;
|
|
53
|
+
};
|
|
54
|
+
interface EnableMicrophoneOptions {
|
|
55
|
+
/**
|
|
56
|
+
* How long to wait before calling it a no-answer. Default 15s.
|
|
57
|
+
*
|
|
58
|
+
* This is not belt-and-braces. Per the getUserMedia specification a prompt the user never
|
|
59
|
+
* dismisses may leave the promise permanently pending — "neither resolve nor reject" — and
|
|
60
|
+
* a page that awaits it in its connect path hangs on a state that has no error and no end.
|
|
61
|
+
* A deadline turns that into a reportable outcome.
|
|
62
|
+
*/
|
|
63
|
+
timeoutMs?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Why a microphone that was WORKING stopped: the device was unplugged, or access was revoked
|
|
67
|
+
* mid-call. LiveKit tries the default device first and mutes the track when that fails too.
|
|
68
|
+
* Only a live call can report this; `enableMicrophone` never does.
|
|
69
|
+
*/
|
|
70
|
+
type MicrophoneProblemReason = MicrophoneFailureReason | "device-lost";
|
|
71
|
+
/** A microphone problem as a value: the cause, what the browser said, and what to do. */
|
|
72
|
+
type MicrophoneProblem = {
|
|
73
|
+
reason: MicrophoneProblemReason;
|
|
74
|
+
message: string;
|
|
75
|
+
hint: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Describe a microphone failure, whoever caught it. The one classifier behind both
|
|
79
|
+
* {@link enableMicrophone} and the React call handle's `microphone` state, so the two can never
|
|
80
|
+
* give the same failure different advice.
|
|
81
|
+
*/
|
|
82
|
+
declare function describeMicrophoneFailure(error: unknown): MicrophoneProblem;
|
|
83
|
+
/**
|
|
84
|
+
* Publish the caller's microphone, and report WHY if it does not start.
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* const mic = await enableMicrophone(room);
|
|
88
|
+
* if (!mic.ok) {
|
|
89
|
+
* status.textContent = `Microphone: ${mic.message}`;
|
|
90
|
+
* help.textContent = mic.hint; // the sentence that names the fix
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* Never throws. A call that cannot start the microphone is an ordinary outcome of asking a
|
|
95
|
+
* person for a device, not a programmer error, so it belongs in the return type.
|
|
96
|
+
*
|
|
97
|
+
* Note it does NOT hang up on failure — the call is still live and still billing, and only
|
|
98
|
+
* the caller knows whether a text-only session is useful to them. If it is not, disconnect
|
|
99
|
+
* in the `!ok` branch; leaving a room connected against a device the user never granted is
|
|
100
|
+
* how the retry ends up contending with the call that is still holding it.
|
|
101
|
+
*/
|
|
102
|
+
declare function enableMicrophone(room: MicrophoneCapableRoom, options?: EnableMicrophoneOptions): Promise<MicrophoneResult>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Receiver-side playout delay (SECONDS) for the avatar media tracks.
|
|
106
|
+
*
|
|
107
|
+
* The avatar is published from a GPU datacenter and reaches viewers over the
|
|
108
|
+
* public internet, where a few percent of packet loss is normal. A shallow
|
|
109
|
+
* receiver buffer stalls (freezes) on every loss while it waits for a
|
|
110
|
+
* retransmit; a deeper buffer recovers the lost packets BEFORE playout, so the
|
|
111
|
+
* viewer sees smooth 25fps instead of freezing. Measured at ~5% loss this took
|
|
112
|
+
* the stream from ~11fps with multi-second freezes to a steady 25fps with zero
|
|
113
|
+
* freezes.
|
|
114
|
+
*
|
|
115
|
+
* 0.5s is applied via the native `RemoteTrack.setPlayoutDelay`, which sets the
|
|
116
|
+
* receiver's `playoutDelayHint` — the same Chromium jitter-buffer knob the old
|
|
117
|
+
* hand-rolled `jitterBufferTarget` reached into (the spec renamed
|
|
118
|
+
* playoutDelayHint→jitterBufferTarget; both influence the same buffer depth),
|
|
119
|
+
* but typed and SDK-owned so there is no cast or feature-probe. The hint is NOT
|
|
120
|
+
* free at the open: the receiver holds the FIRST video frame toward the target
|
|
121
|
+
* (~250-450ms of measured TTFF), a deliberate cost paid once for the freeze-free
|
|
122
|
+
* steady state above. The open-small-then-ramp variant that tried to dodge that
|
|
123
|
+
* cost was shipped, failed twice (the rVFC ramp trigger is throttled on the
|
|
124
|
+
* opacity:0-mounted element, stranding the shallow buffer), and was deliberately
|
|
125
|
+
* removed in 2262e4c7b — do not re-propose it. No-op on browsers that don't
|
|
126
|
+
* support the hint (the SDK warns and moves on).
|
|
127
|
+
*
|
|
128
|
+
* This lives in the vanilla browser package, not the React one, because the
|
|
129
|
+
* React surface applies it for you and a plain-DOM page has to be given it.
|
|
130
|
+
* Until this file existed the helper was only reachable through
|
|
131
|
+
* `realtime-avatar/react`, so every plain-DOM adopter — every one of this repo's
|
|
132
|
+
* own demos included — ran with the browser's default shallow buffer and froze on
|
|
133
|
+
* every lost packet. Nobody should have to know this knob exists: `prepareAvatarRoom`
|
|
134
|
+
* (and `attachRemoteAudio`, which calls it) applies it to every track the room
|
|
135
|
+
* subscribes, and `RealtimeAvatarLiveKitRoom` does the same for React. This file is
|
|
136
|
+
* the one place the number and its reasoning live.
|
|
137
|
+
* Structural like its siblings: no `livekit-client` import, no version pin.
|
|
138
|
+
*/
|
|
139
|
+
declare const DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS = 0.5;
|
|
140
|
+
/**
|
|
141
|
+
* A track that can take a native playout-delay hint — livekit-client's subscribed
|
|
142
|
+
* `RemoteTrack`. Duck-typed on the method rather than `instanceof`, so a
|
|
143
|
+
* placeholder or local track is skipped and the helper is testable with a fake.
|
|
144
|
+
*/
|
|
145
|
+
interface PlayoutDelayTarget {
|
|
146
|
+
setPlayoutDelay(delayInSeconds: number): void;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Apply the receiver playout delay to ONE subscribed track.
|
|
150
|
+
*
|
|
151
|
+
* Call it for every track `RoomEvent.TrackSubscribed` hands you, audio and video
|
|
152
|
+
* alike, before or after `attach()` — WebRTC syncs the pair to the LARGER hint,
|
|
153
|
+
* so applying it to one stream and not the other lets the lips lag the voice.
|
|
154
|
+
* Returns `true` when the hint was applied and `false` when the object cannot take
|
|
155
|
+
* one (a local track, a placeholder, a not-yet-subscribed publication), so a
|
|
156
|
+
* caller can log the miss without a try/catch. The delay is floored at 0 so a
|
|
157
|
+
* negative input can never throw.
|
|
158
|
+
*/
|
|
159
|
+
declare function applyPlayoutDelay(track: unknown, delaySeconds?: number): boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Apply the SAME native playout delay to the avatar's audio + video tracks
|
|
162
|
+
* (kept equal so the a/v sync stays lip-locked). Pure and exported so the clamp
|
|
163
|
+
* and the both-tracks-equal invariant are unit-testable without a DOM; the React
|
|
164
|
+
* hook `useAvatarPlayoutDelay` is a thin effect wrapper around this.
|
|
165
|
+
*/
|
|
166
|
+
declare function applyAvatarPlayoutDelay(videoTrack: unknown, audioTrack: unknown, delaySeconds?: number): void;
|
|
167
|
+
|
|
168
|
+
export { DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS as D, type EnableMicrophoneOptions as E, type MicrophoneCapableRoom as M, type PlayoutDelayTarget as P, type MicrophoneFailureReason as a, type MicrophoneProblem as b, type MicrophoneProblemReason as c, type MicrophoneResult as d, applyAvatarPlayoutDelay as e, applyPlayoutDelay as f, describeMicrophoneFailure as g, enableMicrophone as h };
|
|
@@ -2,6 +2,7 @@ import * as livekit_client from 'livekit-client';
|
|
|
2
2
|
import { ConnectionQuality, Room, Participant, Track, DisconnectReason, SendTextOptions } from 'livekit-client';
|
|
3
3
|
import { TrackReferenceOrPlaceholder, useTranscriptions, useConnectionState, LiveKitRoomProps } from '@livekit/components-react';
|
|
4
4
|
import { CSSProperties, ReactNode, ReactElement } from 'react';
|
|
5
|
+
import { b as MicrophoneProblem } from './playout-delay-CtRZdtsj.js';
|
|
5
6
|
import { z } from 'zod';
|
|
6
7
|
|
|
7
8
|
declare function useAvatarCamera({ allowed, active }: {
|
|
@@ -660,7 +661,7 @@ type AvatarVideoSurfaceProps = {
|
|
|
660
661
|
* the front (live) fully covers the back (idle) — no peek-through. */
|
|
661
662
|
fit?: AvatarVideoFit;
|
|
662
663
|
/**
|
|
663
|
-
* @deprecated No-op. The surface FILLS its container (
|
|
664
|
+
* @deprecated No-op. The surface FILLS its container (100% x 100%); the CONSUMER
|
|
664
665
|
* owns the aspect box. Self-pinning a native ratio INSIDE the surface could not
|
|
665
666
|
* survive an indefinite-height ancestor (it collapsed to zero height — the
|
|
666
667
|
* black-screen bug), so aspect ownership moved out to the caller: wrap the
|
|
@@ -700,11 +701,19 @@ type AvatarVideoSurfaceProps = {
|
|
|
700
701
|
* are not stalls and do not wait on this.
|
|
701
702
|
*/
|
|
702
703
|
frameStallMs?: number;
|
|
703
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* Extra className for the box (the layers fill it). The surface's own layout is inline and
|
|
706
|
+
* needs no CSS build, so a class here ADDS styling; to change a property the surface sets
|
|
707
|
+
* (its 100% size, say), use `style`.
|
|
708
|
+
*/
|
|
704
709
|
className?: string;
|
|
705
|
-
/** Extra inline style for the box. */
|
|
710
|
+
/** Extra inline style for the box, spread over the surface's own. */
|
|
706
711
|
style?: CSSProperties;
|
|
707
|
-
/**
|
|
712
|
+
/**
|
|
713
|
+
* Overlay content (controls, captions, scrims). Rendered in a layer that fills the box and
|
|
714
|
+
* stacks above both media layers and the live badge, so a positioned child places itself
|
|
715
|
+
* against the box and stays clickable while she is live.
|
|
716
|
+
*/
|
|
708
717
|
children?: ReactNode;
|
|
709
718
|
/** Surface a small "live · WxH" badge when the live layer is shown. Default true. */
|
|
710
719
|
showLiveBadge?: boolean;
|
|
@@ -730,7 +739,7 @@ type AvatarVideoSurfaceProps = {
|
|
|
730
739
|
* desyncs by up to the whole adaptive range. Fires on change only, not per frame.
|
|
731
740
|
*/
|
|
732
741
|
onPlayoutDelayChange?: (seconds: number) => void;
|
|
733
|
-
/** Test id for the box. */
|
|
742
|
+
/** Test id for the box. Default `avatar-video-surface`. */
|
|
734
743
|
"data-testid"?: string;
|
|
735
744
|
};
|
|
736
745
|
/**
|
|
@@ -751,7 +760,7 @@ type AvatarVideoSurfaceProps = {
|
|
|
751
760
|
* idle loop in the SAME box. Must be rendered inside a LiveKit `RoomContext`
|
|
752
761
|
* (e.g. under `RealtimeAvatarLiveKitRoom`).
|
|
753
762
|
*
|
|
754
|
-
* LAYOUT CONTRACT: the surface FILLS its container (
|
|
763
|
+
* LAYOUT CONTRACT: the surface FILLS its container (100% x 100%) — it does NOT pin
|
|
755
764
|
* its own aspect. The CONSUMER owns the aspect box: wrap the surface in an element
|
|
756
765
|
* with a DEFINITE size (e.g. `aspect-[9/16]` plus a height seed). Self-pinning a
|
|
757
766
|
* native ratio inside the surface (`h-full w-auto`) collapsed to zero height
|
|
@@ -893,9 +902,9 @@ interface AvatarSessionClient<TLlmProvider extends LLMProvider = LLMProvider> {
|
|
|
893
902
|
*/
|
|
894
903
|
releaseLiveKitSession(sessionId: string, reason?: LiveKitSessionReleaseReason, options?: RealtimeAvatarRequestOptions): Promise<boolean>;
|
|
895
904
|
/**
|
|
896
|
-
* The `pagehide` path
|
|
897
|
-
*
|
|
898
|
-
* back to {@link releaseLiveKitSession} when
|
|
905
|
+
* The `pagehide` path: a send that outlives a closing page (a keepalive `fetch`, or
|
|
906
|
+
* `sendBeacon`), dispatched synchronously — hence a `boolean` return and no promise, so the
|
|
907
|
+
* caller can fall back to {@link releaseLiveKitSession} when nothing could be sent.
|
|
899
908
|
*/
|
|
900
909
|
releaseLiveKitSessionBeacon(sessionId: string, reason?: LiveKitSessionReleaseReason): boolean;
|
|
901
910
|
/**
|
|
@@ -1224,6 +1233,80 @@ type BehaviorSnapshot = {
|
|
|
1224
1233
|
prevClipId: string | null;
|
|
1225
1234
|
};
|
|
1226
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* The microphone, as a call's UI needs it.
|
|
1238
|
+
*
|
|
1239
|
+
* - `off`: this call does not listen (`listen={false}`), or it is not connected — before the
|
|
1240
|
+
* room joins and after it ends. Nothing is captured.
|
|
1241
|
+
* - `pending`: the device has been asked for and has not answered. The permission prompt may be
|
|
1242
|
+
* open; per the getUserMedia spec it may never settle, so this can last.
|
|
1243
|
+
* - `on`: published and live; she can hear the user.
|
|
1244
|
+
* - `muted`: published and muted on purpose (`setMicrophoneEnabled(false)`).
|
|
1245
|
+
* - `blocked`: refused by the browser, the operating system, or an insecure origin. The user has
|
|
1246
|
+
* to change a setting; `hint` names which one. Retry afterwards.
|
|
1247
|
+
* - `unavailable`: no device, a device another app holds, one that stopped mid-call
|
|
1248
|
+
* (`device-lost`), or a failure nobody classified. `message` is what the browser said.
|
|
1249
|
+
*/
|
|
1250
|
+
type CallMicrophone = {
|
|
1251
|
+
status: "off";
|
|
1252
|
+
} | {
|
|
1253
|
+
status: "pending";
|
|
1254
|
+
} | {
|
|
1255
|
+
status: "on";
|
|
1256
|
+
} | {
|
|
1257
|
+
status: "muted";
|
|
1258
|
+
} | ({
|
|
1259
|
+
status: "blocked";
|
|
1260
|
+
} & MicrophoneProblem) | ({
|
|
1261
|
+
status: "unavailable";
|
|
1262
|
+
} & MicrophoneProblem);
|
|
1263
|
+
/** A microphone state that carries a problem: the argument of `onMicrophoneProblem`. */
|
|
1264
|
+
type CallMicrophoneProblem = Extract<CallMicrophone, {
|
|
1265
|
+
status: "blocked" | "unavailable";
|
|
1266
|
+
}>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Whether her audio can play.
|
|
1269
|
+
*
|
|
1270
|
+
* - `unknown`: not connected yet, and no playback has been attempted.
|
|
1271
|
+
* - `allowed`: no playback attempt has been refused (LiveKit's `room.canPlaybackAudio`).
|
|
1272
|
+
* - `blocked`: the browser refused playback until a user gesture. Call `startAudio()` from one —
|
|
1273
|
+
* a click or tap handler — or she stays silent.
|
|
1274
|
+
*/
|
|
1275
|
+
type CallAudioPlayback = "unknown" | "allowed" | "blocked";
|
|
1276
|
+
/** What the in-room bridge reads off LiveKit. Raw facts; {@link callMicrophoneFrom} decides. */
|
|
1277
|
+
type CallMicrophoneFacts = Readonly<{
|
|
1278
|
+
/** Whether this call publishes the microphone at all. */
|
|
1279
|
+
wanted: boolean;
|
|
1280
|
+
/** The room is connected (LiveKit acquires the microphone on its way there). */
|
|
1281
|
+
connected: boolean;
|
|
1282
|
+
/** An enable this SDK started is still in flight. */
|
|
1283
|
+
enabling: boolean;
|
|
1284
|
+
/** The local microphone publication, if one exists. */
|
|
1285
|
+
publication: Readonly<{
|
|
1286
|
+
muted: boolean;
|
|
1287
|
+
ended: boolean;
|
|
1288
|
+
}> | null;
|
|
1289
|
+
/**
|
|
1290
|
+
* `localParticipant.lastMicrophoneError`, scoped to THIS call: LiveKit keeps the last failure on
|
|
1291
|
+
* the participant until a capture succeeds, and a redial reuses the same Room, so an error that
|
|
1292
|
+
* was already there when this call's grant arrived describes an earlier call and reads as null.
|
|
1293
|
+
*/
|
|
1294
|
+
deviceError: Error | null;
|
|
1295
|
+
}>;
|
|
1296
|
+
/** The two actions, registered by the bridge so the session above the room can call them. */
|
|
1297
|
+
type CallMediaControls = Readonly<{
|
|
1298
|
+
/** `room.startAudio()`, resolving whether playback is allowed afterwards. Never rejects. */
|
|
1299
|
+
startAudio: () => Promise<boolean>;
|
|
1300
|
+
/** Mute, unmute, or retry after the user fixed a blocked or unavailable microphone. */
|
|
1301
|
+
setMicrophoneEnabled: (enabled: boolean) => Promise<void>;
|
|
1302
|
+
}>;
|
|
1303
|
+
/** The sinks the bridge fills. All optional: a bare lifecycle simply does not observe media. */
|
|
1304
|
+
type CallMediaSinks = Partial<Readonly<{
|
|
1305
|
+
setMicrophoneFacts: (facts: CallMicrophoneFacts) => void;
|
|
1306
|
+
setAudioPlayback: (playback: CallAudioPlayback) => void;
|
|
1307
|
+
registerMediaControls: (controls: CallMediaControls | null) => void;
|
|
1308
|
+
}>>;
|
|
1309
|
+
|
|
1227
1310
|
/**
|
|
1228
1311
|
* Wired up by CONSUMERS, not by this package. Nothing inside the carry calls it — checked
|
|
1229
1312
|
* 2026-08-26 by searching for `pendingTurn` and `replay`, which appear nowhere else here. The
|
|
@@ -1274,8 +1357,11 @@ type ReconnectPolicy = {
|
|
|
1274
1357
|
* frees the GPU). This is the reason the idle-warning countdown is now TRUE.
|
|
1275
1358
|
* - `disconnected`: a deliberate server/peer end or an exhausted auto-reconnect.
|
|
1276
1359
|
* - `error`: a grant failure surfaced as a terminal phase (no lease, no retry).
|
|
1360
|
+
* - `user`: the app ended it ({@link SessionLifecycleApi.end}) — from any phase, queued
|
|
1361
|
+
* included. The held session or queue ticket is released and nothing mints again until
|
|
1362
|
+
* {@link SessionLifecycleApi.reconnect}.
|
|
1277
1363
|
*/
|
|
1278
|
-
type SessionEndReason = "idle" | "disconnected" | "error";
|
|
1364
|
+
type SessionEndReason = "idle" | "disconnected" | "error" | "user";
|
|
1279
1365
|
type SessionLifecyclePhase = {
|
|
1280
1366
|
kind: "idle";
|
|
1281
1367
|
} | {
|
|
@@ -1425,8 +1511,18 @@ type SessionLifecycleApi = {
|
|
|
1425
1511
|
* resets the CLIENT idle clock (postpones the client-enforced end).
|
|
1426
1512
|
*/
|
|
1427
1513
|
markActivity: () => void;
|
|
1428
|
-
/**
|
|
1514
|
+
/**
|
|
1515
|
+
* Manual reconnect (the Reconnect button): resets the attempt budget and re-mints. After
|
|
1516
|
+
* {@link end} it is the one way to call again.
|
|
1517
|
+
*/
|
|
1429
1518
|
reconnect: () => void;
|
|
1519
|
+
/**
|
|
1520
|
+
* End the session NOW, from any phase — queued, requesting, connecting, live or recovering.
|
|
1521
|
+
* Stops the queue retry and the reconnect ladder, releases the held session or queue ticket
|
|
1522
|
+
* (`manual`), leaves the room, and parks on `ended{reason:"user"}`. Terminal: nothing mints
|
|
1523
|
+
* again until {@link reconnect}; {@link reset} does not undo it. Idempotent.
|
|
1524
|
+
*/
|
|
1525
|
+
end: () => void;
|
|
1430
1526
|
onConnected: () => void;
|
|
1431
1527
|
onDisconnected: (reason?: DisconnectReason) => void;
|
|
1432
1528
|
/**
|
|
@@ -1451,7 +1547,7 @@ type SessionLifecycleApi = {
|
|
|
1451
1547
|
* never fires. Pass null to unregister.
|
|
1452
1548
|
*/
|
|
1453
1549
|
registerLeaveRoom: (leave: (() => void) | null) => void;
|
|
1454
|
-
/** Reset to idle (mode/avatar change). */
|
|
1550
|
+
/** Reset to idle (mode/avatar change). Does not undo {@link end}: an ended call stays ended. */
|
|
1455
1551
|
reset: () => void;
|
|
1456
1552
|
};
|
|
1457
1553
|
declare function useSessionLifecycle<T extends LLMProvider = LLMProvider>(input: UseSessionLifecycleInput<T>): SessionLifecycleApi;
|
|
@@ -1476,7 +1572,7 @@ type RealtimeSessionRoomSinks = Partial<{
|
|
|
1476
1572
|
video: "live" | "stalled" | "connecting";
|
|
1477
1573
|
audio: "flowing" | "silent";
|
|
1478
1574
|
}) => void;
|
|
1479
|
-
}
|
|
1575
|
+
}> & CallMediaSinks;
|
|
1480
1576
|
type PublisherConnectionDetails = Readonly<{
|
|
1481
1577
|
publisherQuality: Participant["connectionQuality"];
|
|
1482
1578
|
streamState: Track["streamState"] | null;
|
|
@@ -1500,6 +1596,12 @@ type SessionLifecycleRoomBridgeProps = {
|
|
|
1500
1596
|
* Callback failures never affect the call; no stats polling or uploads are added.
|
|
1501
1597
|
*/
|
|
1502
1598
|
onConnectionDetailsChange?: (details: AvatarConnectionDetails | null) => void;
|
|
1599
|
+
/**
|
|
1600
|
+
* Whether the room publishes the user's microphone — pass what you passed the room's `audio`.
|
|
1601
|
+
* Default: the same rule {@link RealtimeAvatarLiveKitRoom} applies (server-transcribed calls).
|
|
1602
|
+
* Decides whether a missing microphone track is a problem or simply not wanted.
|
|
1603
|
+
*/
|
|
1604
|
+
microphone?: boolean;
|
|
1503
1605
|
lifecycle: Pick<SessionLifecycleApi, "onConnectionStateChange" | "setAgentPresent" | "registerLeaveRoom" | "markActivity"> & Partial<Pick<SessionLifecycleApi, "grant">> & RealtimeSessionRoomSinks;
|
|
1504
1606
|
};
|
|
1505
1607
|
/**
|
|
@@ -1519,7 +1621,7 @@ type SessionLifecycleRoomBridgeProps = {
|
|
|
1519
1621
|
*
|
|
1520
1622
|
* Renders nothing. Mount it once inside RealtimeAvatarLiveKitRoom.
|
|
1521
1623
|
*/
|
|
1522
|
-
declare function SessionLifecycleRoomBridge({ lifecycle, onConnectionDetailsChange, onMediaModeChange, }: SessionLifecycleRoomBridgeProps): null;
|
|
1624
|
+
declare function SessionLifecycleRoomBridge({ lifecycle, onConnectionDetailsChange, onMediaModeChange, microphone, }: SessionLifecycleRoomBridgeProps): null;
|
|
1523
1625
|
|
|
1524
1626
|
/**
|
|
1525
1627
|
* The terminal, LABELED end reason surfaced to the app via `onEnded`. This is the
|
|
@@ -1729,6 +1831,28 @@ type RealtimeSessionApi = SessionLifecycleApi & {
|
|
|
1729
1831
|
graceWindow: GraceWindowState;
|
|
1730
1832
|
/** Honest media liveness from the bound agent's tracks. */
|
|
1731
1833
|
media: RealtimeSessionMedia;
|
|
1834
|
+
/** Can she hear the user? Derived from LiveKit's microphone facts; see {@link CallMicrophone}. */
|
|
1835
|
+
microphone: CallMicrophone;
|
|
1836
|
+
/** Can the user hear her? `blocked` until `startAudio()` runs inside a user gesture. `unknown` once ended. */
|
|
1837
|
+
audioPlayback: CallAudioPlayback;
|
|
1838
|
+
/**
|
|
1839
|
+
* Unblock her audio (`room.startAudio()`). Call it from a click or tap handler. Never rejects:
|
|
1840
|
+
* resolves whether playback is allowed afterwards (`false` outside a gesture, or with no room).
|
|
1841
|
+
*/
|
|
1842
|
+
startAudio: () => Promise<boolean>;
|
|
1843
|
+
/**
|
|
1844
|
+
* Mute or unmute the user's microphone. `true` after a `blocked` or `unavailable` microphone is
|
|
1845
|
+
* the retry, once the user has fixed what the hint names. Never rejects: a failure becomes the
|
|
1846
|
+
* next `microphone` state. Before the room connects it only records the choice (nothing is
|
|
1847
|
+
* captured); after the call ended it does nothing.
|
|
1848
|
+
*/
|
|
1849
|
+
setMicrophoneEnabled: (enabled: boolean) => Promise<void>;
|
|
1850
|
+
/**
|
|
1851
|
+
* The user's mute choice, kept across the connect. If you render your own
|
|
1852
|
+
* `RealtimeAvatarLiveKitRoom`, pass `audio={listens && !microphoneMuted}` so a mute made before
|
|
1853
|
+
* the room connected is honoured when LiveKit captures at connect. `AvatarCall` does this.
|
|
1854
|
+
*/
|
|
1855
|
+
microphoneMuted: boolean;
|
|
1732
1856
|
/** The inner SSOT surface, for explicit access (it is also spread at top level). */
|
|
1733
1857
|
lifecycle: SessionLifecycleApi;
|
|
1734
1858
|
/** Speak ONE final in-character line VERBATIM, then end. Guaranteed delivered before the cut. */
|
|
@@ -1748,7 +1872,12 @@ type RealtimeSessionApi = SessionLifecycleApi & {
|
|
|
1748
1872
|
createTranscriptSender: (opts?: TranscriptSenderOptions) => TranscriptSender;
|
|
1749
1873
|
/** Re-send the last turn with its resolved provenance, a new ID, and retry_of_turn_id. */
|
|
1750
1874
|
retryTurn: () => void;
|
|
1751
|
-
/**
|
|
1875
|
+
/**
|
|
1876
|
+
* End now (the user tapped End), from any phase — queued and connecting included. Tells the
|
|
1877
|
+
* worker (best-effort), then {@link SessionLifecycleApi.end}: releases the held session or
|
|
1878
|
+
* queue ticket, leaves the room, and parks on `ended`. `onEnded` fires once, with `reason`
|
|
1879
|
+
* (default `user_ended`). Nothing mints again until `reconnect()`.
|
|
1880
|
+
*/
|
|
1752
1881
|
end: (reason?: EndReason) => void;
|
|
1753
1882
|
/** The avatar's live nonverbal behavior, or null pre-choreo (see {@link BehaviorSnapshot}). */
|
|
1754
1883
|
behavior: BehaviorSnapshot | null;
|
|
@@ -1766,6 +1895,12 @@ type RealtimeSessionApi = SessionLifecycleApi & {
|
|
|
1766
1895
|
setTurnState: (state: string | null | undefined) => void;
|
|
1767
1896
|
/** Honest media liveness from the bound agent's tracks. */
|
|
1768
1897
|
setMedia: (media: RealtimeSessionMedia) => void;
|
|
1898
|
+
/** The local microphone facts (the bridge reads them off LiveKit). */
|
|
1899
|
+
setMicrophoneFacts: (facts: CallMicrophoneFacts) => void;
|
|
1900
|
+
/** LiveKit's audio playback status. */
|
|
1901
|
+
setAudioPlayback: (playback: CallAudioPlayback) => void;
|
|
1902
|
+
/** The in-room media actions behind `startAudio` / `setMicrophoneEnabled`. */
|
|
1903
|
+
registerMediaControls: (controls: CallMediaControls | null) => void;
|
|
1769
1904
|
};
|
|
1770
1905
|
declare function useRealtimeSession<T extends LLMProvider = LLMProvider>(input: UseRealtimeSessionInput<T>): RealtimeSessionApi;
|
|
1771
1906
|
|
|
@@ -1855,10 +1990,25 @@ interface ProxyClientOptions {
|
|
|
1855
1990
|
* ABSOLUTE url there or every request resolves against nothing.
|
|
1856
1991
|
*/
|
|
1857
1992
|
proxyUrl: string;
|
|
1858
|
-
/** Swap the transport — a test double, or a fetch that
|
|
1993
|
+
/** Swap the transport — a test double, or a fetch that adds your own auth header. */
|
|
1859
1994
|
fetch?: typeof globalThis.fetch;
|
|
1860
1995
|
/**
|
|
1861
|
-
*
|
|
1996
|
+
* The `credentials` mode of EVERY request this client makes, the page-hide release included.
|
|
1997
|
+
* Unset, the client sets none, so `fetch`'s own default (`"same-origin"`) applies, or whatever
|
|
1998
|
+
* your `fetch` wrapper sets.
|
|
1999
|
+
*
|
|
2000
|
+
* Set `"include"` when your route is on another origin and authorizes on a cookie — an
|
|
2001
|
+
* `app.example.com` page calling an `api.example.com` route. The route's CORS must then answer
|
|
2002
|
+
* with `Access-Control-Allow-Credentials: true` and the page's exact origin, for the preflight
|
|
2003
|
+
* of `connect` and of the release alike.
|
|
2004
|
+
*/
|
|
2005
|
+
credentials?: RequestCredentials;
|
|
2006
|
+
/**
|
|
2007
|
+
* Per-request deadline, default 60s, `0` to disable. Keep it above your route's `timeoutMs`
|
|
2008
|
+
* (default 50s), so the route's answer arrives before the page stops listening. Running out throws a
|
|
2009
|
+
* `RealtimeAvatarApiError` with `code: "upstream_timeout"` (status 504, `response: null`).
|
|
2010
|
+
* Do not re-send a timed-out `connect` automatically: your route may still be minting it, and
|
|
2011
|
+
* this client never retries a mint — the server client inside your route owns that retry.
|
|
1862
2012
|
*
|
|
1863
2013
|
* Not optional in spirit: a proxy that accepts the connection and then never answers leaves
|
|
1864
2014
|
* a promise that never settles, which presents as a page stuck on "connecting" with no error
|
|
@@ -1868,4 +2018,4 @@ interface ProxyClientOptions {
|
|
|
1868
2018
|
}
|
|
1869
2019
|
declare function createProxyClient(options: ProxyClientOptions): AvatarSessionClient;
|
|
1870
2020
|
|
|
1871
|
-
export { type ProxyClientOptions as $, type AvatarVideoFit as A, type BehaviorSnapshot as B, type CallTranscript as C, DEFAULT_APPROACHING_END_LEAD_SECONDS as D, type EndReason as E, type FishTtsModel as F, type Governor as G, type GovernorSignal as H, type GovernorState as I, type GraceWindowClosedEvent as J, type GraceWindowOpenEvent as K, type LiveKitSessionGrant as L, type GraceWindowState as M, type IdleWarningEvent as N, type InboundRtpCursor as O, type InboundRtpReading as P, type KnownBehaviorState as Q, type LLMProvider as R, type LLMSelection as S, type LiveKitAvatarGrantState as T, type LiveKitAvatarGrantStatus as U, type LiveKitCapacityState as V, type LiveKitConnectionStatus as W, type LiveKitSessionRequest as X, type LiveKitSessionStartResult as Y, MAX_RECONNECT_ATTEMPTS as Z, MAX_SESSION_INSTRUCTIONS_CHARS as _, AdaptivePlayoutController as a,
|
|
2021
|
+
export { type ProxyClientOptions as $, type AvatarVideoFit as A, type BehaviorSnapshot as B, type CallTranscript as C, DEFAULT_APPROACHING_END_LEAD_SECONDS as D, type EndReason as E, type FishTtsModel as F, type Governor as G, type GovernorSignal as H, type GovernorState as I, type GraceWindowClosedEvent as J, type GraceWindowOpenEvent as K, type LiveKitSessionGrant as L, type GraceWindowState as M, type IdleWarningEvent as N, type InboundRtpCursor as O, type InboundRtpReading as P, type KnownBehaviorState as Q, type LLMProvider as R, type LLMSelection as S, type LiveKitAvatarGrantState as T, type LiveKitAvatarGrantStatus as U, type LiveKitCapacityState as V, type LiveKitConnectionStatus as W, type LiveKitSessionRequest as X, type LiveKitSessionStartResult as Y, MAX_RECONNECT_ATTEMPTS as Z, MAX_SESSION_INSTRUCTIONS_CHARS as _, AdaptivePlayoutController as a, RealtimeAvatarCapacityError as a$, type QualityCap as a0, RECONNECT_BACKOFF_MS as a1, type RealtimeAvatarRequestOptions as a2, type RealtimeSessionApi as a3, type RealtimeSessionMedia as a4, type RealtimeSessionRoomSinks as a5, type ReconnectPolicy as a6, type ReconnectingEvent as a7, type RecoveryState as a8, type RetryStep as a9, mapTurnState as aA, readInboundRtp as aB, sessionBehaviorSchema as aC, sessionClipSchema as aD, splitCallTranscript as aE, useAvatarAdaptivePlayoutDelay as aF, useAvatarCamera as aG, useAvatarPlayoutDelay as aH, useAvatarQualityGovernor as aI, useCallTranscript as aJ, useLiveKitAvatarGrant as aK, useLiveTrackProducing as aL, useMicLease as aM, useRealtimeSession as aN, useReleaseMicLeaseOnTrackEnded as aO, useSessionLifecycle as aP, type CallMicrophone as aQ, type CallAudioPlayback as aR, type CallMicrophoneProblem as aS, AvatarVideoSurface as aT, type AvatarVideoSurfaceProps as aU, type LivePlaybackKeeper as aV, MIC_LEASE_ENDED_TIMEOUT_MS as aW, type MicLease as aX, NETWORK_QUALITY_POLICY as aY, type NetworkQualityStatus as aZ, type PlayableVideoElement as a_, type SendTurnOptions as aa, type SessionBehavior as ab, type SessionClip as ac, type SessionClocks as ad, type SessionEndReason as ae, type SessionLifecycleApi as af, type SessionLifecyclePhase as ag, type SessionLifecyclePhaseKind as ah, SessionLifecycleRoomBridge as ai, type SessionLifecycleRoomBridgeProps as aj, type SurfaceLayers as ak, type TranscriptSender as al, type TranscriptSenderOptions as am, type TurnState as an, type TurnTimeoutEvent as ao, type UseAvatarQualityGovernorInput as ap, type UseLiveKitAvatarGrantInput as aq, type UseRealtimeSessionInput as ar, type UseSessionLifecycleInput as as, type VoiceSpec as at, type VoiceSpecInput as au, capacityErrorFromBusy as av, capacityStateFromGrant as aw, createProxyClient as ax, isNativeLiveTrackSubscribed as ay, knownBehaviorStates as az, type AdaptivePlayoutDecision as b, RealtimeAvatarLiveKitRoom as b0, type RealtimeAvatarLiveKitRoomProps as b1, shouldReplayPendingTurn as b2, type AdaptivePlayoutOptions as c, type AdaptivePlayoutSample as d, type ApproachingEndEvent as e, type ApproachingEndReason as f, type AvatarConnectionDetails as g, type AvatarSessionClient as h, type CallTranscriptSegment as i, type CartesiaTtsModel as j, type ClipResult as k, type ClosingTurnResult as l, type CreditsLowEvent as m, DEFAULT_CREDITS_LOW_LEAD_SECONDS as n, DEFAULT_GOVERNOR_CONFIG as o, DEFAULT_GRACE_CEILING_SECONDS as p, DEFAULT_GRACE_WINDOW_LEAD_SECONDS as q, DEFAULT_IDLE_SECONDS as r, DEFAULT_IDLE_WARN_LEAD_SECONDS as s, DEFAULT_TURN_TIMEOUT_SECONDS as t, type DeclaredInputSource as u, type EndedEvent as v, type ExtendResult as w, type FreezeReadingFn as x, type GovernorAction as y, type GovernorConfig as z };
|
package/dist/react-native.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LiveKitRoomProps } from '@livekit/react-native';
|
|
2
2
|
export { AudioSession, VideoTrack, VideoTrackProps, registerGlobals } from '@livekit/react-native';
|
|
3
|
-
import { L as LiveKitSessionGrant, A as AvatarVideoFit } from './proxy-client-
|
|
4
|
-
export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, h as AvatarSessionClient, B as BehaviorSnapshot, C as CallTranscript, i as CallTranscriptSegment, j as CartesiaTtsModel, k as ClipResult, l as ClosingTurnResult, m as CreditsLowEvent, D as DEFAULT_APPROACHING_END_LEAD_SECONDS, n as DEFAULT_CREDITS_LOW_LEAD_SECONDS, o as DEFAULT_GOVERNOR_CONFIG, p as DEFAULT_GRACE_CEILING_SECONDS, q as DEFAULT_GRACE_WINDOW_LEAD_SECONDS, r as DEFAULT_IDLE_SECONDS, s as DEFAULT_IDLE_WARN_LEAD_SECONDS, t as DEFAULT_TURN_TIMEOUT_SECONDS, u as DeclaredInputSource, E as EndReason, v as EndedEvent, w as ExtendResult, F as FishTtsModel, x as FreezeReadingFn, G as Governor, y as GovernorAction, z as GovernorConfig, H as GovernorSignal, I as GovernorState, J as GraceWindowClosedEvent, K as GraceWindowOpenEvent, M as GraceWindowState, N as IdleWarningEvent, O as InboundRtpCursor, P as InboundRtpReading, Q as KnownBehaviorState, R as LLMProvider, S as LLMSelection, T as LiveKitAvatarGrantState, U as LiveKitAvatarGrantStatus, V as LiveKitCapacityState, W as LiveKitConnectionStatus, X as LiveKitSessionRequest, Y as LiveKitSessionStartResult, Z as MAX_RECONNECT_ATTEMPTS, _ as MAX_SESSION_INSTRUCTIONS_CHARS, $ as ProxyClientOptions, a0 as QualityCap, a1 as RECONNECT_BACKOFF_MS, a2 as RealtimeAvatarRequestOptions, a3 as RealtimeSessionApi, a4 as RealtimeSessionMedia, a5 as RealtimeSessionRoomSinks, a6 as ReconnectPolicy, a7 as ReconnectingEvent, a8 as RecoveryState, a9 as RetryStep, aa as SendTurnOptions, ab as SessionBehavior, ac as SessionClip, ad as SessionClocks, ae as SessionEndReason, af as SessionLifecycleApi, ag as SessionLifecyclePhase, ah as SessionLifecyclePhaseKind, ai as SessionLifecycleRoomBridge, aj as SessionLifecycleRoomBridgeProps, ak as SurfaceLayers, al as TranscriptSender, am as TranscriptSenderOptions, an as TurnState, ao as TurnTimeoutEvent, ap as UseAvatarQualityGovernorInput, aq as UseLiveKitAvatarGrantInput, ar as UseRealtimeSessionInput, as as UseSessionLifecycleInput, at as VoiceSpec, au as VoiceSpecInput, av as capacityErrorFromBusy, aw as capacityStateFromGrant, ax as createProxyClient, ay as isNativeLiveTrackSubscribed, az as knownBehaviorStates, aA as mapTurnState, aB as readInboundRtp, aC as sessionBehaviorSchema, aD as sessionClipSchema, aE as splitCallTranscript, aF as useAvatarAdaptivePlayoutDelay, aG as useAvatarCamera, aH as useAvatarPlayoutDelay, aI as useAvatarQualityGovernor, aJ as useCallTranscript, aK as useLiveKitAvatarGrant, aL as useLiveTrackProducing, aM as useMicLease, aN as useRealtimeSession, aO as useReleaseMicLeaseOnTrackEnded, aP as useSessionLifecycle } from './proxy-client-
|
|
3
|
+
import { L as LiveKitSessionGrant, A as AvatarVideoFit } from './proxy-client-C8M_G_Kk.js';
|
|
4
|
+
export { a as AdaptivePlayoutController, b as AdaptivePlayoutDecision, c as AdaptivePlayoutOptions, d as AdaptivePlayoutSample, e as ApproachingEndEvent, f as ApproachingEndReason, g as AvatarConnectionDetails, h as AvatarSessionClient, B as BehaviorSnapshot, C as CallTranscript, i as CallTranscriptSegment, j as CartesiaTtsModel, k as ClipResult, l as ClosingTurnResult, m as CreditsLowEvent, D as DEFAULT_APPROACHING_END_LEAD_SECONDS, n as DEFAULT_CREDITS_LOW_LEAD_SECONDS, o as DEFAULT_GOVERNOR_CONFIG, p as DEFAULT_GRACE_CEILING_SECONDS, q as DEFAULT_GRACE_WINDOW_LEAD_SECONDS, r as DEFAULT_IDLE_SECONDS, s as DEFAULT_IDLE_WARN_LEAD_SECONDS, t as DEFAULT_TURN_TIMEOUT_SECONDS, u as DeclaredInputSource, E as EndReason, v as EndedEvent, w as ExtendResult, F as FishTtsModel, x as FreezeReadingFn, G as Governor, y as GovernorAction, z as GovernorConfig, H as GovernorSignal, I as GovernorState, J as GraceWindowClosedEvent, K as GraceWindowOpenEvent, M as GraceWindowState, N as IdleWarningEvent, O as InboundRtpCursor, P as InboundRtpReading, Q as KnownBehaviorState, R as LLMProvider, S as LLMSelection, T as LiveKitAvatarGrantState, U as LiveKitAvatarGrantStatus, V as LiveKitCapacityState, W as LiveKitConnectionStatus, X as LiveKitSessionRequest, Y as LiveKitSessionStartResult, Z as MAX_RECONNECT_ATTEMPTS, _ as MAX_SESSION_INSTRUCTIONS_CHARS, $ as ProxyClientOptions, a0 as QualityCap, a1 as RECONNECT_BACKOFF_MS, a2 as RealtimeAvatarRequestOptions, a3 as RealtimeSessionApi, a4 as RealtimeSessionMedia, a5 as RealtimeSessionRoomSinks, a6 as ReconnectPolicy, a7 as ReconnectingEvent, a8 as RecoveryState, a9 as RetryStep, aa as SendTurnOptions, ab as SessionBehavior, ac as SessionClip, ad as SessionClocks, ae as SessionEndReason, af as SessionLifecycleApi, ag as SessionLifecyclePhase, ah as SessionLifecyclePhaseKind, ai as SessionLifecycleRoomBridge, aj as SessionLifecycleRoomBridgeProps, ak as SurfaceLayers, al as TranscriptSender, am as TranscriptSenderOptions, an as TurnState, ao as TurnTimeoutEvent, ap as UseAvatarQualityGovernorInput, aq as UseLiveKitAvatarGrantInput, ar as UseRealtimeSessionInput, as as UseSessionLifecycleInput, at as VoiceSpec, au as VoiceSpecInput, av as capacityErrorFromBusy, aw as capacityStateFromGrant, ax as createProxyClient, ay as isNativeLiveTrackSubscribed, az as knownBehaviorStates, aA as mapTurnState, aB as readInboundRtp, aC as sessionBehaviorSchema, aD as sessionClipSchema, aE as splitCallTranscript, aF as useAvatarAdaptivePlayoutDelay, aG as useAvatarCamera, aH as useAvatarPlayoutDelay, aI as useAvatarQualityGovernor, aJ as useCallTranscript, aK as useLiveKitAvatarGrant, aL as useLiveTrackProducing, aM as useMicLease, aN as useRealtimeSession, aO as useReleaseMicLeaseOnTrackEnded, aP as useSessionLifecycle } from './proxy-client-C8M_G_Kk.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
6
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
7
7
|
export { useChat, useConnectionState, useLocalParticipant, useRoomContext, useTrackToggle, useTranscriptions, useVoiceAssistant } from '@livekit/components-react';
|
|
8
|
-
export { D as DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS } from './playout-delay-
|
|
8
|
+
export { D as DEFAULT_AVATAR_PLAYOUT_DELAY_SECONDS } from './playout-delay-CtRZdtsj.js';
|
|
9
9
|
export { DisconnectReason, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Room, RoomEvent, SendTextOptions, Track } from 'livekit-client';
|
|
10
10
|
import 'zod';
|
|
11
11
|
|