You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- AvatarCall now handles all loading states internally
- No need for <Suspense> wrappers - just render AvatarCall
- useCredentials uses regular state instead of throwing promises
- Added LoadingSessionProvider for seamless context during credential fetch
- Added default loading spinner to AvatarVideo
- onError callback triggered imperatively instead of via useEffect
- Removed suspense-resource.ts utility
- Updated all documentation to reflect new API
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.6.0] - 2026-02-10
11
+
12
+
### Changed
13
+
14
+
-**Breaking:**`AvatarCall` no longer uses React Suspense. Loading states are now handled internally for a seamless experience. Remove any `<Suspense>` wrappers around `AvatarCall`.
15
+
16
+
### Removed
17
+
18
+
- Removed Suspense-based credential fetching from `AvatarCall` — loading is now handled internally
19
+
- Removed `suspense-resource.ts` utility (no longer needed)
20
+
21
+
### Fixed
22
+
23
+
- Fixed "Requested device not found" error when connecting or toggling mic/camera on devices without those peripherals
24
+
- Fixed awkward loading state gap between Suspense resolution and video becoming ready
25
+
- Added default loading spinner to AvatarVideo during connecting/waiting states
26
+
- Fixed loading spinner positioning — now properly centered with absolute positioning
27
+
- Fixed hooks (`useLocalMedia`, `useAvatar`) crashing when called outside LiveKitRoom context during credential loading
28
+
10
29
## [0.5.0] - 2026-02-10
11
30
12
31
### Changed
@@ -30,7 +49,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
49
- Added missing `data-avatar-enabled` attribute to screen-share and end-call control buttons
31
50
- Added missing `toggleScreenShare` function to ControlBar render prop state
32
51
- Blurred background now fades out smoothly when video becomes ready
33
-
- Fixed "Requested device not found" error when connecting or toggling mic/camera on devices without those peripherals
Copy file name to clipboardExpand all lines: docs/api/components.md
+30-35Lines changed: 30 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
19
19
High-level component that handles the complete session lifecycle. **Recommended for most use cases.**
20
20
21
-
**Suspends during credential fetching** — wrap in `<Suspense>` to show loading UI while the server creates the session. See the [Loading States guide](../guides/loading-states.md) for details.
21
+
Handles credential fetching and loading states internally — just render it and the SDK manages the rest. See the [Loading States guide](../guides/loading-states.md) for details.
22
22
23
23
### Props
24
24
@@ -30,60 +30,55 @@ High-level component that handles the complete session lifecycle. **Recommended
30
30
|`sessionId`|`string`| ✓*| Session ID (use with `sessionKey`) |
31
31
|`sessionKey`|`string`| ✓*| Session key (use with `sessionId`) |
<Suspensefallback={<p>Setting up avatar session...</p>}>
37
-
<AvatarCall
38
-
avatarId="game-host"
39
-
connectUrl="/api/avatar/connect"
40
-
/>
41
-
</Suspense>
35
+
<AvatarCall
36
+
avatarId="game-host"
37
+
connectUrl="/api/avatar/connect"
38
+
/>
42
39
);
43
40
}
44
41
```
@@ -102,7 +99,7 @@ export async function POST(req: Request) {
102
99
4.`AvatarCall` establishes a real-time video connection (~1–5 seconds)
103
100
5. User sees and talks to the AI avatar
104
101
105
-
> **Note:** Session creation (step 2) can take 10–30 seconds. `AvatarCall`**suspends** during this wait — wrap it in `<Suspense>` to show a loading fallback. See the [Loading States guide](guides/loading-states.md) for details.
102
+
> **Note:** Session creation (step 2) can take 10–30 seconds. `AvatarCall`handles loading states internally — use `avatarImageUrl` and the default styles for a polished loading experience. See the [Loading States guide](guides/loading-states.md) for details.
0 commit comments