@spatialwalk/avatarkit 1.0.0-beta.10 → 1.0.0-beta.100

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.
Files changed (97) hide show
  1. package/CHANGELOG.md +765 -4
  2. package/README.md +676 -365
  3. package/dist/StreamingAudioPlayer-CY6WeP2p.js +643 -0
  4. package/dist/{avatar_core_wasm.wasm → avatar_core_wasm-6656456a.wasm} +0 -0
  5. package/dist/avatar_core_wasm-Dci9E9jF.js +2696 -0
  6. package/dist/core/Avatar.d.ts +5 -7
  7. package/dist/core/AvatarController.d.ts +99 -60
  8. package/dist/core/AvatarManager.d.ts +32 -12
  9. package/dist/core/AvatarSDK.d.ts +58 -0
  10. package/dist/core/AvatarView.d.ts +136 -128
  11. package/dist/index-DADGbRoo.js +18392 -0
  12. package/dist/index.d.ts +2 -4
  13. package/dist/index.js +17 -17
  14. package/dist/next.d.ts +2 -0
  15. package/dist/performance/FrameRateMonitor.d.ts +85 -0
  16. package/dist/types/character-settings.d.ts +7 -1
  17. package/dist/types/character.d.ts +42 -16
  18. package/dist/types/index.d.ts +165 -45
  19. package/dist/vite.d.ts +19 -0
  20. package/next.d.ts +3 -0
  21. package/next.js +187 -0
  22. package/package.json +38 -8
  23. package/vite.d.ts +20 -0
  24. package/vite.js +126 -0
  25. package/dist/StreamingAudioPlayer-Bq2-bQiT.js +0 -319
  26. package/dist/StreamingAudioPlayer-Bq2-bQiT.js.map +0 -1
  27. package/dist/animation/AnimationWebSocketClient.d.ts +0 -50
  28. package/dist/animation/AnimationWebSocketClient.d.ts.map +0 -1
  29. package/dist/animation/utils/eventEmitter.d.ts +0 -13
  30. package/dist/animation/utils/eventEmitter.d.ts.map +0 -1
  31. package/dist/animation/utils/flameConverter.d.ts +0 -26
  32. package/dist/animation/utils/flameConverter.d.ts.map +0 -1
  33. package/dist/audio/AnimationPlayer.d.ts +0 -57
  34. package/dist/audio/AnimationPlayer.d.ts.map +0 -1
  35. package/dist/audio/StreamingAudioPlayer.d.ts +0 -123
  36. package/dist/audio/StreamingAudioPlayer.d.ts.map +0 -1
  37. package/dist/avatar_core_wasm-D4eEi7Eh.js +0 -1666
  38. package/dist/avatar_core_wasm-D4eEi7Eh.js.map +0 -1
  39. package/dist/config/app-config.d.ts +0 -44
  40. package/dist/config/app-config.d.ts.map +0 -1
  41. package/dist/config/constants.d.ts +0 -29
  42. package/dist/config/constants.d.ts.map +0 -1
  43. package/dist/config/sdk-config-loader.d.ts +0 -12
  44. package/dist/config/sdk-config-loader.d.ts.map +0 -1
  45. package/dist/core/Avatar.d.ts.map +0 -1
  46. package/dist/core/AvatarController.d.ts.map +0 -1
  47. package/dist/core/AvatarDownloader.d.ts +0 -95
  48. package/dist/core/AvatarDownloader.d.ts.map +0 -1
  49. package/dist/core/AvatarKit.d.ts +0 -48
  50. package/dist/core/AvatarKit.d.ts.map +0 -1
  51. package/dist/core/AvatarManager.d.ts.map +0 -1
  52. package/dist/core/AvatarView.d.ts.map +0 -1
  53. package/dist/core/NetworkLayer.d.ts +0 -59
  54. package/dist/core/NetworkLayer.d.ts.map +0 -1
  55. package/dist/generated/driveningress/v1/driveningress.d.ts +0 -80
  56. package/dist/generated/driveningress/v1/driveningress.d.ts.map +0 -1
  57. package/dist/generated/driveningress/v2/driveningress.d.ts +0 -81
  58. package/dist/generated/driveningress/v2/driveningress.d.ts.map +0 -1
  59. package/dist/generated/google/protobuf/struct.d.ts +0 -108
  60. package/dist/generated/google/protobuf/struct.d.ts.map +0 -1
  61. package/dist/generated/google/protobuf/timestamp.d.ts +0 -129
  62. package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
  63. package/dist/index-bQnEVIkT.js +0 -5999
  64. package/dist/index-bQnEVIkT.js.map +0 -1
  65. package/dist/index.d.ts.map +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/renderer/RenderSystem.d.ts +0 -79
  68. package/dist/renderer/RenderSystem.d.ts.map +0 -1
  69. package/dist/renderer/covariance.d.ts +0 -13
  70. package/dist/renderer/covariance.d.ts.map +0 -1
  71. package/dist/renderer/renderer.d.ts +0 -8
  72. package/dist/renderer/renderer.d.ts.map +0 -1
  73. package/dist/renderer/sortSplats.d.ts +0 -12
  74. package/dist/renderer/sortSplats.d.ts.map +0 -1
  75. package/dist/renderer/webgl/reorderData.d.ts +0 -14
  76. package/dist/renderer/webgl/reorderData.d.ts.map +0 -1
  77. package/dist/renderer/webgl/webglRenderer.d.ts +0 -66
  78. package/dist/renderer/webgl/webglRenderer.d.ts.map +0 -1
  79. package/dist/renderer/webgpu/webgpuRenderer.d.ts +0 -54
  80. package/dist/renderer/webgpu/webgpuRenderer.d.ts.map +0 -1
  81. package/dist/types/character-settings.d.ts.map +0 -1
  82. package/dist/types/character.d.ts.map +0 -1
  83. package/dist/types/index.d.ts.map +0 -1
  84. package/dist/utils/animation-interpolation.d.ts +0 -17
  85. package/dist/utils/animation-interpolation.d.ts.map +0 -1
  86. package/dist/utils/cls-tracker.d.ts +0 -17
  87. package/dist/utils/cls-tracker.d.ts.map +0 -1
  88. package/dist/utils/error-utils.d.ts +0 -27
  89. package/dist/utils/error-utils.d.ts.map +0 -1
  90. package/dist/utils/logger.d.ts +0 -35
  91. package/dist/utils/logger.d.ts.map +0 -1
  92. package/dist/utils/reqId.d.ts +0 -20
  93. package/dist/utils/reqId.d.ts.map +0 -1
  94. package/dist/wasm/avatarCoreAdapter.d.ts +0 -188
  95. package/dist/wasm/avatarCoreAdapter.d.ts.map +0 -1
  96. package/dist/wasm/avatarCoreMemory.d.ts +0 -141
  97. package/dist/wasm/avatarCoreMemory.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,13 +5,774 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.0-beta.100]
9
+
10
+ ### ✨ Features
11
+
12
+ - **RTC rendering support** — Added protobuf-based rendering methods to `AvatarView` for RTC mode integration.
13
+
14
+ ### 🐛 Bugfixes
15
+
16
+ - **Transform Y-axis direction** — Fixed `avatarTransform.y` direction being inverted compared to iOS/Android. Positive Y now moves avatar upward on all platforms.
17
+
18
+ ## [1.0.0-beta.99]
19
+
20
+ ### ✨ Features
21
+
22
+ - **Playback diagnostics** — Added telemetry events for audio buffer stall and frame starvation detection, improving visibility into playback interruption issues.
23
+
24
+ ## [1.0.0-beta.98]
25
+
26
+ ### 🐛 Bugfixes
27
+
28
+ - **Build artifact fix** — beta.97 npm package contained stale build artifacts. This release contains the correct build with all beta.97 changes.
29
+
30
+ ### ⚡ Breaking Changes
31
+
32
+ - **`setVolume()` / `getVolume()` replaced by `volume` property** — `controller.setVolume(0.5)` is now `controller.volume = 0.5`. Aligned with Android and iOS SDKs.
33
+
34
+ ## [1.0.0-beta.97]
35
+
36
+ ### ⚡ Breaking Changes
37
+
38
+ - **`transform` renamed to `avatarTransform`** — `avatarView.transform` is now `avatarView.avatarTransform`. Aligned naming across Web, Android, and iOS SDKs.
39
+
40
+ ### ✨ Features
41
+
42
+ - **Avatar transform from character settings** — Avatar automatically applies position and scale from character settings. User-set `avatarTransform` stacks on top of the base values.
43
+
44
+ ### 🐛 Bugfixes
45
+
46
+ - **Rendering quality improvement** — Improved color accuracy for avatar rendering.
47
+
48
+ ### 📝 Documentation
49
+
50
+ - **send() byte alignment** — Documented PCM S16LE byte alignment requirement for `send()`.
51
+
52
+ ## [1.0.0-beta.96]
53
+
54
+ ### 🐛 Bugfixes
55
+
56
+ - **WASM Loading in Vite Dev Mode** — Fixed WASM pre-validation failing when consumed via Vite dev server. The WASM URL was mangled by the bundler, causing HTTP 431 errors. Now skips pre-validation when the resolved URL is not a valid `.wasm` path, falling back to Emscripten's built-in loader.
57
+
58
+ ## [1.0.0-beta.95]
59
+
60
+ ### 🐛 Bugfixes
61
+
62
+ - **WebGPU Jacobian Matrix Fix** — Fixed incorrect Jacobian matrix column order in `calcCovariance2D` (WebGPU renderer). The `mat3x3f` constructor takes column vectors, but values were passed in row order, causing transposed 2D covariance and blurry splat edges (especially visible on arms/hands). Android (Vulkan GLSL) and iOS (Metal) were not affected.
63
+
64
+ ### ⚡ Performance
65
+
66
+ - **WASM Download Integrity & Retry** — Added binary integrity validation (magic number + Content-Length check) and automatic retry (up to 3 attempts) for WASM module loading. Also added Content-Length validation for all resource downloads. Prevents cryptic `CompileError` from truncated or corrupted downloads (e.g. in WeChat browser).
67
+
68
+ ## [1.0.0-beta.94]
69
+
70
+ ### 🐛 Bugfixes
71
+
72
+ - **WebGPU Tab Switch Rendering Fix** — Fixed avatar rendering corruption (split/misaligned) when switching back to a tab. Root cause: WebGPU context was not reconfigured after canvas resize, causing surface size and screenSize mismatch in the shader.
73
+
74
+ ### ✨ Features
75
+
76
+ - **WebSocket Close Code Handling** — Server-defined custom close codes (4010 auth failure, 4001 insufficient balance, 4002 session timeout, 4003 concurrent limit) are now properly recognized and mapped to `ErrorCode`. Non-recoverable errors (4010/4001/4003) no longer trigger reconnection attempts.
77
+ - **Error Transparency** — All non-normal WebSocket close events are now propagated to `onError` callback and reported to PostHog telemetry. Previously, some close codes (e.g. 1006) were only logged internally without notifying the application.
78
+ - **New ErrorCode Values** — Added `insufficientBalance`, `sessionTimeout`, `concurrentLimitExceeded` to the `ErrorCode` enum.
79
+
80
+ ## [1.0.0-beta.92]
81
+
82
+ ### ✨ Features
83
+
84
+ - **Host Mode Animation End Signal** — `yieldFramesData()` now returns a `boolean` indicating whether the server has sent all animation data for the current conversation (`end` flag from protobuf). Non-breaking: callers that ignore the return value are unaffected.
85
+
86
+ ## [1.0.0-beta.91] - 2026-03-19
87
+
88
+ ### 🐛 Bugfixes
89
+
90
+ - **Inline CPU Benchmark Worker** — Consumers using Vite could not build: `Could not resolve entry module "public/assets/cpu-benchmark-worker-*.js"`. Root cause: `new URL()` worker pattern in Vite library mode compiles to absolute path that downstream bundlers cannot resolve. Fixed by replacing with inline Blob URL worker.
91
+
92
+ ## [1.0.0-beta.90] - 2026-03-18
93
+
94
+ ### 🐛 Bugfixes
95
+
96
+ - **WASM Core Update** — Updated WASM binary to include CSPLAT v4 compressed point cloud decoder; `useCompressedModel` previously failed with `avatar_core_load_character returned NULL` because the WASM build predated the CSPLAT decoder addition
97
+
98
+ ## [Unreleased]
99
+
100
+ ### ⚡ Breaking Changes
101
+
102
+ - **Enum Rename** — `ConversationState.pausing` renamed to `ConversationState.paused` for cross-SDK consistency
103
+ - **FrameRateInfo** — Unified as pre-computed fields; sub-stage data (decode/render/present) now available via `FrameRenderInfo`
104
+
105
+ ### ✨ Features
106
+
107
+ - **FrameRateMonitor** — Unified public API for frame rate monitoring with enable/disable switch
108
+ - **Device Benchmark** — `deviceScore` and `isDeviceSupported` APIs for runtime device capability assessment
109
+ - **Telemetry Enhancements** — `avatar_playback_fps` now reports `cpu_score`, `gpu_score`, and `renderer_backend` (webgl/webgpu)
110
+ - **Deprecation Reset** — Deprecation warnings reset on `initialize()` to avoid stale state across re-init cycles
111
+ - **Compressed Model (Beta)** — `load()` accepts optional `useCompressedModel` parameter (default `false`); when `true`, prefers compressed model resource (~30% of original size, minor quality degradation), falls back to standard resource if unavailable。此功能目前为 Beta,请务必验证渲染效果后再用于生产环境
112
+
113
+ ### ⚡ Performance
114
+
115
+ - **Audio-Clock-Driven Scheduling** — Speaking playback now uses audio clock for tick scheduling, replacing RAF-based timing for more accurate frame pacing
116
+ - **Idle Present Frame Resubmission** — Idle state uses `presentFrameOnly()` to resubmit the current frame, reducing GPU re-computation
117
+
118
+ ### 🐛 Bugfixes
119
+
120
+ - **Build Packaging** — WASM binary missing from dist in beta.87; added benchmark-demo and marble-test to dts exclude
121
+ - **Deprecation State** — Fixed stale deprecation warnings persisting across SDK re-initialization
122
+
123
+ ## [1.0.0-beta.88] - 2026-03-10
124
+
125
+ ### 🐛 Bugfixes
126
+
127
+ - **Build Packaging Fix** - WASM binary was missing from dist in beta.87 npm package; added `benchmark-demo` and `marble-test` to dts exclude to prevent type declaration leakage
128
+ - **Release Workflow** - Added build artifact verification step (WASM presence + no leaked directories)
129
+
130
+ ## [1.0.0-beta.87] - 2026-03-09
131
+
132
+ ### 🔧 Performance
133
+
134
+ - **Playback Cadence Stabilization** - Replaced RAF + `Math.floor(audioTime*25)` frame dispatch with fixed 25fps tick scheduler and bounded async queue, eliminating bursty frame production
135
+ - **Display Decoupling** - Speaking state uses RAF-driven `presentFrameOnly()` to present latest computed frame (WebGPU only), reducing display-side pacing jitter
136
+ - **WebGL Speaking-State Loop Suspension** - WebGL backend pauses realtime animation loop during Speaking state to avoid redundant `reorderPackedData` CPU work and RAF callback competition
137
+
138
+ ### 🐛 Bugfixes
139
+
140
+ - **Frame Index Floating-Point Precision** - Added epsilon tolerance (`+1e-6`) to `Math.floor(audioTime * fps)` to prevent IEEE 754 precision errors from producing duplicate frame indices at frame boundaries
141
+ - **WebGL Regression Fix** - Fixed severe WebGL performance regression (jank 9.47%→0.16%) caused by WebGPU-only optimization that triggered 60fps `reorderPackedData` calls on WebGL path
142
+ - **SDK Duplicate Initialize** - Deduplicated SDK initialization to prevent repeated setup when `initialize()` is called multiple times
143
+
144
+ ### ✅ Tests
145
+
146
+ - **Android Init Coverage** - Added Android duplicate-initialize regression coverage
147
+
148
+ ### 📊 Benchmark
149
+
150
+ - **beta.86 vs beta.87 Baseline** - Full cross-backend performance comparison (WebGPU + WebGL), 1 warmup + 10 measure rounds, 10s/round. Jank rate reduced 94.6% (WebGPU) and 93.9% (WebGL); frame interval stability improved 64-67%
151
+
152
+ ## [1.0.0-beta.86] - 2026-03-03
153
+
154
+ ### 🐛 Bugfixes
155
+ - **Transition Continuity** - Fixed start transition source frame selection to use the currently displayed idle frame, reducing first-frame jump.
156
+ - **Transition Robustness** - Added frame index clamping for realtime callback and speaking->idle transition source lookup, preventing end-transition fallback jumps caused by out-of-range indices.
157
+
158
+ ### ✅ Tests
159
+ - **State Machine Coverage** - Updated `AvatarView` rendering state tests to align with current dual-transition flow, and added boundary tests for start/end transition frame selection.
160
+
161
+ ## [1.0.0-beta.82] - 2026-02-12
162
+
163
+ ### 🔧 Improvements
164
+ - **Proto V2 协议更新** - 更新解码协议
165
+
166
+ ## [1.0.0-beta.80] - 2026-02-08
167
+
168
+ ### ✨ New Features
169
+ - **Next.js Plugin** - Added `@spatialwalk/avatarkit/next` plugin for Next.js (webpack) projects, automatically handles WASM file configuration, Emscripten scriptDirectory fix, and Content-Type headers
170
+
171
+ ## [1.0.0-beta.79] - 2026-02-08
172
+
173
+ ### ✨ New Features
174
+ - **Camera API** - Exposed `getCameraConfig()` and `updateCameraConfig()` on AvatarView for external real-time camera control
175
+
176
+ ## [1.0.0-beta.78] - 2026-02-04
177
+
178
+ ### 🐛 Bugfixes
179
+ - **Telemetry Accuracy** - Fixed environment field reporting issue in analytics events
180
+
181
+ ### ✨ New Features
182
+ - **Performance Monitoring** - Added loading performance metrics for avatar resources
183
+ - `fetch_avatar_latency` - Total loading time
184
+ - `fetch_avatar_metadata_latency` - Metadata fetch time
185
+ - `download_avatar_assets_latency` - Asset download time
186
+
187
+ ### 🔧 Improvements
188
+ - **Internal Architecture** - Unified configuration constants across platforms for better maintainability
189
+
190
+ ## [1.0.0-beta.74] - 2026-01-22
191
+
192
+ ### 🔧 Improvements
193
+ - **Transition API** - Replaced `generateTransitionFromIdle` with `generateTransition` (options-based API: `from`, `to`, `frameCount`, `useLinear`)
194
+
195
+ ## [1.0.0-beta.73] - 2026-01-22
196
+
197
+ ### ✨ New Features
198
+ - **Local Log Upload** - Automatic local log upload functionality
199
+
200
+ ## [1.0.0-beta.72] - 2026-01-17
201
+
202
+ ### 📚 Documentation
203
+ - **README Optimization** - Enhanced README with authentication section and improved API documentation
204
+
205
+ ## [1.0.0-beta.71] - 2026-01-17
206
+
207
+ ### 🔧 Improvements
208
+ - **Internal API** - Marked all audio and animation internal classes with `@internal` to prevent public API exposure
209
+ - **Type Safety** - Hidden `AnimationPlayer`, `StreamingAudioPlayer`, `AnimationWebSocketClient`, and related utilities from public API
210
+ - **Internal Documentation** - Fixed missing English translations in `AnimationWebSocketClient.ts`
211
+
212
+ ## [1.0.0-beta.70] - 2026-01-17
213
+
214
+ ### 🔧 Improvements
215
+ - **Code Cleanup** - Removed unused `FlatSplatData` interface from public API
216
+ - **Internal Documentation** - Translated all internal code comments to English for consistency
217
+
218
+ ## [1.0.0-beta.69] - 2026-01-17
219
+
220
+ ### 🔧 Improvements
221
+ - **API Documentation** - All public API comments are now in English with JSDoc support for better IDE IntelliSense
222
+ - **Type Safety** - Removed internal types from public API exports
223
+ - **Build Configuration** - JSDoc comments are now preserved in generated `.d.ts` files
224
+
225
+ ### 📚 Documentation
226
+ - Enhanced audio data format documentation with WAV and MP3 processing examples
227
+
228
+ ## [1.0.0-beta.68] - 2026-01-17
229
+
230
+ ### 🐛 Bugfixes
231
+ - **Vite Plugin WASM File Detection** - Fixed Vite plugin not finding WASM files with hash in consuming projects
232
+ - Plugin now reads JS glue file to extract referenced WASM filename (including hash)
233
+ - Ensures correct WASM file is copied to match JS glue file references
234
+ - Prevents 404 errors when WASM files have content-based hashes
235
+ - Fixes issue where `avatar_core_wasm.wasm` was not found after adding hash support
236
+
237
+ ## [1.0.0-beta.67] - 2026-01-17
238
+
239
+ ### 🐛 Bugfixes
240
+ - **WASM File Hash Support** - Fixed critical issue where WASM files were not being hashed during SDK build
241
+ - WASM files now automatically get content-based hash (e.g., `avatar_core_wasm-{hash}.wasm`)
242
+ - JS glue files are automatically updated to reference the hashed WASM filename
243
+ - Prevents browser cache issues when WASM files are updated
244
+ - Ensures proper version management and cache invalidation
245
+
246
+ ### 🔧 Improvements
247
+ - **Build Process** - Enhanced SDK build process to automatically handle WASM file hashing
248
+ - Hash is calculated based on WASM file content (SHA256, first 8 characters)
249
+ - Build logs now show hash generation progress
250
+ - Compatible with existing Vite plugin for consuming projects
251
+
252
+ ## [1.0.0-beta.65] - 2026-01-14
253
+
254
+ ### 🐛 Bugfixes
255
+ - **Transition Frame Reset Logic** - Fixed issue where `currentPlayingFrame` was not reset after generating transitions, causing jump artifacts on second conversation
256
+ - Reset `currentPlayingFrame` to `null` after generating idle->speaking transitions
257
+ - Reset `currentPlayingFrame` to `null` after generating speaking->idle transitions
258
+ - Reset `currentPlayingFrame` to `null` when entering Idle state
259
+ - Ensures each transition starts from the correct current frame by re-fetching the current state frame when needed
260
+
261
+ ## [1.0.0-beta.64] - 2026-01-14
262
+
263
+ ### ✨ New Features
264
+ - **Vite Plugin for WASM Configuration** - Added `avatarkitVitePlugin` to automate WASM file configuration
265
+ - Automatically handles WASM MIME types in dev server
266
+ - Copies WASM files to dist/assets/ during build
267
+ - Generates `_headers` file for Cloudflare Pages deployment
268
+ - Configures Vite's optimizeDeps, assetsInclude, and assetsInlineLimit
269
+
270
+ ### 🔧 Improvements
271
+ - **Unified Transition Logic** - All transitions now start from the current playing frame, ensuring smooth transitions from any state (Idle, Speaking, or Transitioning)
272
+ - **Idle State Performance** - Optimized idle state to avoid unnecessary frame parameter fetching on every frame
273
+ - **Transition Animation** - Idle->Speaking uses linear interpolation, Speaking->Idle uses Bezier curve easing
274
+
275
+ ### 🐛 Bugfixes
276
+ - Fixed vanilla demo audio context initialization issue
277
+ - Fixed recording button only working once in vanilla demo
278
+ - Fixed host mode data loading to use local files instead of API endpoint
279
+
280
+ ### 📚 Documentation
281
+ - Added transition animation technical specification document for cross-platform alignment
282
+
283
+ ## [1.0.0-beta.63] - 2026-01-14
284
+
285
+ ### ✨ New Features
286
+ - **Audio Context Initialization API** - Added `initializeAudioContext()` method to `AvatarController`
287
+ - Must be called in a user gesture context (click, touchstart, etc.) before any audio operations
288
+ - Ensures AudioContext is created and initialized in a user gesture context, preventing browser security policy issues
289
+ - All audio operations (`send()`, `yieldAudioData()`, `start()`, `playback()`, etc.) now require prior initialization
290
+
291
+ ### 🔧 Improvements
292
+ - **Initialization Flow** - Removed all lazy initialization logic for audio context
293
+ - Audio context initialization is now centralized in `initializeAudioContext()` method
294
+ - All audio operations check for initialization before proceeding
295
+ - Clear error messages when audio operations are attempted without initialization
296
+
297
+ ### 🐛 Bugfixes
298
+ - **Audio Context User Gesture Requirement** - Fixed issue where AudioContext could not be properly initialized when external applications request recording permissions
299
+ - Audio context must now be initialized in user gesture context, ensuring browser security policies are satisfied
300
+
301
+ ## [1.0.0-beta.62] - 2026-01-14
302
+
303
+ ### ✨ New Features
304
+ - **Bezier Curve Transition Animation** - Implemented Bezier curve easing functions for smoother transitions
305
+ - Added Bezier curve interpolation with different curves for different facial components (jaw, expression, eye, neck, global)
306
+ - Replaced linear interpolation with Bezier curve interpolation for more natural animation
307
+ - Split transition duration into start (200ms) and end (1600ms) for different transition types
308
+
309
+ ### 🔧 Improvements
310
+ - **Transition API Enhancement** - Updated `generateTransitionFromIdle()` to support both start and end transitions
311
+ - Added `transitionType` parameter: `'start'` for idle-to-speaking, `'end'` for speaking-to-idle
312
+ - Removed deprecated linear interpolation code and unused easing functions
313
+
314
+ ## [1.0.0-beta.61] - 2026-01-14
315
+
316
+ ### 🔧 Improvements
317
+ - **Telemetry Events Update** - Updated telemetry events with new parameters and structure
318
+ - `sdk_initialized`: Added `env` and `dsm` parameters
319
+ - `driving_service_latency`: Replaced `driving_latency`, now tracks `tap_0`, `tap_1`, `tap_2`, `tap_f` timestamps (Number type, milliseconds)
320
+ - `avatar_active`: New event for avatar view activity tracking with `env` and `dsm` parameters, reported on first render and every 10 minutes
321
+ - **Heartbeat Refactoring** - Removed `HeartbeatManager`, integrated heartbeat functionality into `NetworkLayer` (driving service heartbeat) and `AvatarView` (avatar active heartbeat)
322
+
323
+ ## [1.0.0-beta.60] - 2026-01-14
324
+
325
+ ### 🔧 Configuration Changes
326
+ - **PostHog Configuration** - PostHog telemetry now always uses the international site regardless of environment configuration
327
+
328
+ ## [1.0.0-beta.59] - 2026-01-14
329
+
330
+ ### 🐛 Bugfixes
331
+ - **AudioContext Auto-Resume** - Fixed issue where audio playback would get stuck after external applications request recording permissions. AudioContext now automatically resumes when suspended during playback
332
+ - **PostHog Instance Initialization** - Fixed PostHog named instance initialization to avoid conflicts with external PostHog instances
333
+
334
+ ## [1.0.0-beta.58] - 2026-01-14
335
+
336
+ ### ✨ New Features
337
+ - **Pure Rendering Mode APIs** - Added `renderFrame()` and `generateTransitionFromIdle()` methods to `AvatarView` for external-controlled rendering without audio synchronization
338
+
339
+ ## [1.0.0-beta.57] - 2026-01-09
340
+
341
+ ### 🐛 Bugfixes
342
+ - **Idle Animation Jiggle Fix** - Fixed issue where idle animation would "jiggle" before transitioning to speaking when external audio and animation data were sent. The `handleInterrupt()` method now correctly skips processing when already in `Idle` state, preventing unnecessary idle loop restarts.
343
+
344
+ ## [1.0.0-beta.56] - 2026-01-09
345
+
346
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
347
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
348
+
349
+ ## [1.0.0-beta.56] - 2025-01-05
350
+
351
+ ### ✨ New Features
352
+ - **Eye Tracking Config API** - Changed `eyeTrackingEnabled` to complete `eyefocus` configuration object in `PostProcessingConfig`. External callers must provide full `eyefocus` configuration (enabled, auto_eyelid_adjustment, eyelid_threshold, targets) instead of just a boolean flag.
353
+
354
+ ## [1.0.0-beta.55] - 2025-01-05
355
+
356
+ ### ✨ New Features
357
+ - **Eye Tracking Control** - Added `eyeTrackingEnabled` parameter to `PostProcessingConfig`, allowing external control of eye tracking enable/disable state in real-time
358
+ - **Point Count API** - Added `getPointCount()` method to `AvatarController` to get the point cloud count of the current avatar
359
+
360
+ ## [1.0.0-beta.54] - 2025-01-05
361
+
362
+ ### 🐛 Bugfix
363
+ - **Transition Animation Completion** - Fixed issue where `onTransitionComplete()` was not called when `transitionKeyframes` was empty, causing audio playback to freeze after transition animations. Now, when there are no transition frames, the state correctly transitions to `Speaking` and `onTransitionComplete()` is called to start audio playback.
364
+
365
+ ## [1.0.0-beta.53] - 2025-01-05
366
+
367
+ ### 🐛 Bugfix
368
+ - **Race Condition Fix** - Fixed race condition where `startStreamingPlaybackInternal()` could be called multiple times when `yieldKeyframes` received data rapidly, causing audio chunks to be cleared and playback to freeze after transition animations. Added `isStartingPlayback` flag to prevent concurrent execution.
369
+
370
+ ## [1.0.0-beta.52] - 2025-01-05
371
+
372
+ ### 🔧 Performance Improvements
373
+ - **Telemetry Optimization** - Consolidated resource download telemetry: removed individual `resource_download` events and added cache information (`cache_hit`, `cache_type`) to total duration metrics (`template_resources_load_measure` and `download_avatar_assets_total_measure`). This enables analysis of download times for cache misses while reducing telemetry overhead.
374
+
375
+ ## [1.0.0-beta.51] - 2025-01-05
376
+
377
+ ### 🐛 Bugfix
378
+ - **Character Settings Update** - Fixed issue where cached Avatar instances would not update `characterSettings` in resources when `characterMeta` was updated. Now `resources.characterSettings` is synchronized when `characterMeta` changes, ensuring new `AvatarView` instances use the latest configuration.
379
+
380
+ ### ✨ New Features
381
+ - **Post-Processing Config Enhancement** - Added `translation` and `eyePose` fields to `PostProcessingConfig` interface:
382
+ - `translation`: Position offset (x, y, z)
383
+ - `eyePose`: Eye pose offset with bias and weights (x, y, z, weightX, weightY, weightZ), applied to both left and right eyes
384
+
385
+ ## [1.0.0-beta.50] - 2025-01-05
386
+
387
+ ### 🔧 Performance Improvements
388
+ - **Removed CORS Preflight for Meta API** - Removed authentication headers (`X-App-Id` and `Authorization`) and unnecessary `Content-Type` header from avatar metadata API requests. This eliminates CORS preflight requests for simple GET requests, improving loading performance.
389
+
390
+ ## [1.0.0-beta.49] - 2025-01-05
391
+
392
+ ### 🐛 Bugfix
393
+ - **Template Cache Version** - Fixed issue where template cache would be incorrectly cleared when switching between different SDK versions. Now uses independent template resource version (1.0.0) instead of SDK version, allowing different SDK versions to share the same template cache when template resources are identical.
394
+
395
+ ## [1.0.0-beta.48] - 2025-01-05
396
+
397
+ ### ✨ New Features
398
+ - **PWA Cache Management** - Added automatic PWA cache management for avatar and template resources to improve loading performance
399
+
400
+ ### 🔧 Performance Improvements
401
+ - **Cache Hit Rate Metrics** - Resource downloads now report cache status for analytics
402
+
403
+ ## [1.0.0-beta.47] - 2025-12-29
404
+
405
+ ### 🐛 Bugfix
406
+ - **Avatar Meta Update** - Fixed issue where cached Avatar instances would return stale avatar metadata even when the latest metadata was fetched. Now the avatar metadata is always updated to the latest version when loading an avatar, even if the version number hasn't changed.
407
+
408
+ ## [1.0.0-beta.46] - 2025-12-29
409
+
410
+ ### 🐛 Bugfix
411
+ - Expose `getCharacterMeta()` method in `Avatar` class as public API
412
+
413
+ ## [1.0.0-beta.45] - 2025-12-29
414
+
415
+ ### ✨ New Features
416
+ - **Immediate Rendering on Pause** - When playback is paused, updating post-processing parameters or camera configuration will immediately re-render the current frame:
417
+ - Post-processing parameters (rotation, neck pose, jaw pose, eye blink, etc.) now apply immediately when updated during pause
418
+ - Camera configuration (position, target, FOV, etc.) now applies immediately when updated during pause
419
+ - During normal playback, these updates still apply on the next frame as before
420
+
421
+ ### 🔄 API Changes
422
+
423
+ ### 🔄 API Changes
424
+ - **AvatarView Ready Promise Replaced with Callback** - Replaced `ready: Promise<void>` property with `onFirstRendering?: () => void` callback for better async handling:
425
+ - Removed `ready` Promise property
426
+ - Added `onFirstRendering` optional callback that is called when the first frame is rendered
427
+ - Callback-based approach is more idiomatic and easier to use than Promise-based approach
428
+
429
+ ### 🗑️ Removed
430
+ - **Removed unused `seek()` method** - Removed unused and buggy `seek()` method from `StreamingAudioPlayer`
431
+
432
+ ## [1.0.0-beta.44] - 2025-12-29
433
+
434
+ ### 🔧 Performance Improvements
435
+ - **Removed unnecessary headers from static resource requests** - Removed `X-App-Id` and `Authorization` headers from static resource downloads (shape.pb, point_cloud.ply, camera.json, etc.) to avoid CORS preflight requests and improve loading performance
436
+
437
+ ## [1.0.0-beta.43] - 2025-12-29
438
+
439
+ ### 🔧 Improvements
440
+ - Remove some unnecessary telemetry reporting
441
+
442
+ ## [1.0.0-beta.42] - 2025-12-29
443
+
444
+ ### ✨ New Features
445
+ - **PostHog Telemetry Configuration** - PostHog telemetry reporting now supports separate configuration for domestic (CN) and international (INTL) environments:
446
+ - Separate PostHog hosts and API keys for CN and INTL environments
447
+ - Compression disabled for domestic self-hosted instance, enabled for international official PostHog
448
+ - Localhost domain filtering to avoid test data pollution
449
+
450
+ ## [1.0.0-beta.41] - 2025-12-29
451
+
452
+ ### 🔄 Breaking Changes
453
+ - **Background Image Support Removed** - Removed background image functionality from `AvatarView`:
454
+ - Removed `isOpaque` getter/setter property
455
+ - Removed `setBackgroundImage()` method
456
+ - Removed background image loading from `AvatarDownloader`
457
+ - Canvas now always uses transparent background
458
+
459
+ ## [1.0.0-beta.40] - 2025-12-27
460
+
461
+ ### 🔧 API Improvements
462
+ - Extended post-processing parameter configuration interface
463
+
464
+ ## [1.0.0-beta.39] - 2025-12-27
465
+
466
+ ### 🔧 Improvements
467
+ - Filter localhost domain from telemetry reporting to avoid test data pollution
468
+
469
+ ## [1.0.0-beta.38] - 2025-12-27
470
+
471
+ ### 🔄 Breaking Changes
472
+ - Migrated telemetry reporting from Tencent Cloud CLS to PostHog
473
+
474
+ ### ✨ New Features
475
+ - Implemented download queue for character resource loading
476
+
477
+ ## [1.0.0-beta.37] - 2025-12-24
478
+
479
+ ### 🐛 Bugfix
480
+ - Various bug fixes and improvements
481
+
482
+ ## [1.0.0-beta.36] - 2025-12-20
483
+
484
+ ### ✨ New Features
485
+ - **Audio Sample Rate Configuration** - Added configurable audio sample rate support in SDK initialization
486
+ - Added `audioFormat` configuration option with `channelCount` (fixed to 1) and `sampleRate` (supports: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz, default: 16000)
487
+ - Audio recording and playback now automatically use the configured sample rate
488
+ - Vanilla demo updated with sample rate dropdown selector for easy testing
489
+
490
+ ## [1.0.0-beta.35] - 2025-12-16
491
+
492
+ ### 🔄 API Changes
493
+ - **Avatar Transform API** - Changed `setTransform` method to `transform` getter/setter property for more idiomatic JavaScript API. Now supports both reading and setting transform values.
494
+
495
+ ## [1.0.0-beta.34] - 2025-12-16
496
+
497
+ ### ✨ New Features
498
+ - **Avatar Transform API** - Added `setTransform` method to `AvatarView` for controlling avatar position and scale within the canvas. Supports normalized coordinates (-1 to 1) for position and scale factor.
499
+
500
+ ## [1.0.0-beta.32] - 2025-12-16
501
+
502
+ ### 🔄 Breaking Changes
503
+ - **Host Mode Interface** - Updated `yieldFramesData` method to accept binary data array instead of single binary data. The method now processes multiple protobuf-encoded Message objects in a single call.
504
+
505
+ ## [1.0.0-beta.31] - 2025-12-16
506
+
507
+ ### 🐛 Bugfix
508
+ - **Environment CORS Issue** - Fixed CORS issues when requesting configuration and avatar data APIs. SDK now provides default configuration fallback when config requests fail, ensuring smooth operation across different environments.
509
+
510
+ ## [1.0.0-beta.30] - 2025-12-15
511
+
512
+ ### 🐛 Bugfix
513
+ - **Template Resources Duplicate Download** - Fixed issue where template resources were being re-downloaded for each new avatar load. Template resources are now only loaded once during SDK initialization and reused for all avatars.
514
+
515
+ ## [1.0.0-beta.29] - 2025-12-15
516
+
517
+ ### 🔄 Breaking Changes
518
+ - **Environment Enum** - Removed `Environment.test`. Only `Environment.cn` and `Environment.intl` are now supported. Environment configuration must be explicitly provided.
519
+ - **Log Level Default** - Default log level changed from `LogLevel.all` to `LogLevel.off`. Set `logLevel: LogLevel.all` in configuration to enable all logs.
520
+
521
+ ### ✨ New Features
522
+ - **Avatar Caching** - Added avatar caching methods in `AvatarManager`:
523
+ - `retrieve(id: string): Avatar | undefined` - Get cached avatar by ID
524
+ - `clear(id: string): void` - Clear cached avatar for specific ID
525
+ - `clearAll(): void` - Clear all cached avatars
526
+ - `clearCache()` is now deprecated, use `clearAll()` instead
527
+ - **Background Image Support** - Added background image control in `AvatarView`:
528
+ - `isOpaque: boolean` - Getter/setter to control canvas background transparency
529
+ - `setBackgroundImage(image: HTMLImageElement | string | null): void` - Set or remove background image
530
+
531
+ ### 🔧 Improvements
532
+ - **Avatar Version Checking** - Avatar cache now automatically checks version and reloads if cached avatar version differs from latest metadata
533
+ - **Concurrent Loading** - Multiple concurrent `load()` calls for the same avatar ID now reuse the same loading promise
534
+
535
+ ## [1.0.0-beta.28] - 2025-12-08
536
+
537
+ ### 🔄 Breaking Changes
538
+ - **Class Renamed** - `AvatarKit` class has been renamed to `AvatarSDK` for better consistency
539
+ - Update all imports: `import { AvatarKit } from '@spatialwalk/avatarkit'` → `import { AvatarSDK } from '@spatialwalk/avatarkit'`
540
+ - Update all API calls: `AvatarKit.initialize()` → `AvatarSDK.initialize()`
541
+ - All static methods and properties remain the same, only the class name has changed
542
+
543
+ ### 🔧 Improvements
544
+ - **Rendering Optimizations** - Added fragment shader discard optimization to improve performance and edge quality
545
+ - **Shader Alignment** - Removed view matrix transpose to align with Android SDK implementation
546
+ - **Resource Cleanup** - Removed unused `frameMono` and `audioMono` resources from SDK and tests
547
+
548
+ ## [1.0.0-beta.27] - 2025-12-04
549
+
550
+ ### 🐛 Bugfix
551
+
552
+ ## [1.0.0-beta.26] - 2025-12-03
553
+
554
+ ### ✨ New Features
555
+ - **Log Level Configuration** - Added `logLevel` configuration option to control SDK logging verbosity
556
+ - `LogLevel.off` - Disable all logs
557
+ - `LogLevel.error` - Only error logs
558
+ - `LogLevel.warning` - Warning and error logs
559
+ - `LogLevel.all` - All logs (default)
560
+ - **Standardized CLS Logging Events** - All CLS logging events now use standardized field names for better querying
561
+ - Standard events: `sdk_initialized`, `send_audio_failed`, `message_error`, `heartbeat_failed`, `service_restarted`, `session_token_invalid`, `session_token_expired`, `yield_animation_failed`, `fetch_avatar_metadata_failed`, `download_avatar_assets_failed`, `avatar_active`
562
+ - Standard fields: `req_id`, `con_id`, `avatar_id`, `description`
563
+ - **End-to-End Latency Tracking** - Added `driving_service_latency` event to track latency metrics for both SDK and Host modes
564
+ - Tracks: `tap_0`, `tap_1`, `tap_2`, `tap_f` timestamps (Number type, milliseconds)
565
+ - Automatically reported once per conversation when first frame is received
566
+
567
+ ### 🔧 Improvements
568
+ - **CLS Configuration Alignment** - Updated CLS endpoints and Topic IDs to match iOS SDK configuration
569
+ - **Default API Endpoints** - Fixed default API endpoint for `intl` environment to `api.intl.spatialwalk.cloud`
570
+ - **Error Code Enum** - Added new error codes: `appIDUnrecognized`, `sessionTokenInvalid`, `sessionTokenExpired`, `failedToFetchAvatarMetadata`, `failedToDownloadAvatarAssets`
571
+
572
+ ### 🗑️ Removed
573
+ - **Redundant Log Events** - Removed unnecessary log events: `playback_paused`, `playback_resumed`, `reconnecting`, `connect_success`, `server_error`, `decode_failed`
574
+
575
+ ## [1.0.0-beta.25] - 2025-12-03
576
+
577
+ ### 🔧 Improvements
578
+ - **Removed Audio Buffer Limit** - Removed the 100 chunk limit on pending audio buffers to allow unlimited audio data buffering
579
+
580
+ ## [1.0.0-beta.24] - 2025-11-26
581
+
582
+ ### 🔧 API Changes
583
+ - **Backend Endpoints Updated** - Backend API endpoints have been updated for all environments
584
+
585
+ ## [1.0.0-beta.23] - 2025-11-26
586
+
587
+ ### 🔧 API Changes
588
+ - **Breaking Change** - `playback()` method is no longer supported and has been removed from public API
589
+
590
+ ## [1.0.0-beta.22] - 2025-11-26
591
+
592
+ ### 🔧 API Changes
593
+ - **State Callback Renamed** - `onAvatarState` has been renamed to `onConversationState` for better clarity
594
+ - The callback now uses `ConversationState` enum with states: `idle` and `playing`
595
+ - **Environment Enum Updated** - `Environment.us` has been renamed to `Environment.intl` for better internationalization support
596
+ - All references to `Environment.us` should be updated to `Environment.intl`
597
+ - Remote config endpoints now use `intl` instead of `us`
598
+
599
+ ### ✨ New Features
600
+ - **Volume Control** - Added volume control API for audio playback
601
+ - `setVolume(volume: number)` - Set audio volume (0.0 to 1.0)
602
+ - `getVolume(): number` - Get current audio volume
603
+ - Volume control only affects the avatar's audio player, not system volume
604
+ - Volume changes take effect immediately, including for currently playing audio
605
+
606
+ ## [1.0.0-beta.21] - 2025-11-25
607
+
608
+ ### ✨ New Features
609
+ - **SDK Mode Connection Timeout Fallback** - Enhanced fallback mechanism for SDK mode:
610
+ - If WebSocket connection fails to establish within 15 seconds, the SDK automatically enters fallback mode
611
+ - In fallback mode, audio data can still be sent and will play normally, even though no animation data will be received
612
+ - Connection failures also trigger this fallback mechanism
613
+ - `ConnectionState.connecting` and `ConnectionState.failed` events are emitted to notify external applications
614
+ - Concurrent connection attempts are prevented to avoid race conditions
615
+
616
+ ### 🔧 Improvements
617
+ - Improved connection state management: `isConnected` now accurately reflects actual connection status (false in fallback mode)
618
+ - Added `canSend()` method in `NetworkLayer` to check if audio can be sent (including fallback mode)
619
+ - Better separation of concerns: connection state checks are now handled by `NetworkLayer`, while playback logic remains in `AvatarController`
620
+
621
+ ## [1.0.0-beta.20] - 2025-11-25
622
+
623
+ ### 🔧 Improvements
624
+ - Removed 1-second audio buffer requirement for auto-starting playback in Host mode
625
+
626
+ ## [1.0.0-beta.19] - 2025-11-25
627
+
628
+ ### 📚 Documentation
629
+ - **Fixed misleading documentation** - Corrected Host mode API documentation to accurately reflect that `yieldAudioData()` can be called directly to start a new session without requiring `playback()` first
630
+ - Removed misleading "after playback() is called" comments
631
+ - Clarified two ways to start a session: using `playback()` for existing data, or `yieldAudioData()` directly for streaming
632
+ - Updated all examples and workflow descriptions to reflect correct API usage
633
+
634
+ ## [1.0.0-beta.18] - 2025-11-25
635
+
636
+ ### 🔧 API Changes
637
+ - **Renamed `reqId` to `conversationId`** - Updated terminology for better clarity
638
+ - All methods and parameters that used `reqId` now use `conversationId`
639
+ - `getCurrentReqId()` → `getCurrentConversationId()`
640
+ - `generateReqId()` → `generateConversationId()`
641
+ - Updated all event logs and documentation to use `conversationId`
642
+ - Note: Protobuf protocol still uses `reqId` field name internally, but SDK API uses `conversationId`
643
+
644
+ ### 📚 Documentation
645
+ - Enhanced Host mode documentation to clearly emphasize the workflow: send audio data first to get conversationId, then use that conversationId to send animation data
646
+ - Updated Host Mode Example and Host Mode Flow sections with clearer step-by-step instructions
647
+
648
+ ## [1.0.0-beta.17] - 2025-11-24
649
+
650
+ ### ✨ New Features
651
+ - **Audio-Only Fallback Mechanism** - SDK now includes automatic fallback to audio-only playback when animation data is unavailable
652
+ - SDK mode: Automatically enters audio-only mode when server returns an error
653
+ - Host mode: Automatically enters audio-only mode when empty animation data is provided
654
+ - Once in audio-only mode, subsequent animation data for that session is ignored
655
+ - Fallback mode is interruptible, just like normal playback mode
656
+
657
+ ### 🔧 API Changes
658
+ - **Playback Mode Configuration** - Moved playback mode configuration from `AvatarView` constructor to `AvatarSDK.initialize()`
659
+ - Playback mode is now determined by `drivingServiceMode` in `AvatarSDK.initialize()` configuration
660
+ - `AvatarView` constructor now only requires `avatar` and `container` parameters
661
+ - Removed `AvatarViewOptions` interface
662
+ - `container` parameter is now required (no longer optional)
663
+ - **Method Renames** - Renamed methods in `AvatarController` for Host mode to better reflect their purpose
664
+ - `play()` → `playback()`: Renamed to better reflect that the method is used for playback of existing data (replay mode)
665
+ - Old API: `avatarController.play(initialAudioChunks, initialKeyframes)`
666
+ - New API: `avatarController.playback(initialAudioChunks, initialKeyframes)`
667
+ - `sendAudioChunk()` → `yieldAudioData()`: Renamed to better reflect that the method yields/streams audio data
668
+ - Old API: `avatarController.sendAudioChunk(data, isLast)`
669
+ - New API: `avatarController.yieldAudioData(data, isLast)`
670
+ - `sendKeyframes()` → `yieldFramesData()`: Renamed to better reflect that the method yields/streams animation keyframes
671
+ - Old API: `avatarController.sendKeyframes(keyframes, reqId)`
672
+ - New API: `avatarController.yieldFramesData(keyframes, conversationId)`
673
+
674
+ ### 🔧 Improvements
675
+ - Extended transition animation duration from 200ms to 400ms for smoother end-of-playback transitions
676
+
677
+ ### 📚 Documentation
678
+ - Updated README.md to use "SDK mode" and "Host mode" terminology instead of "Network mode" and "External data mode"
679
+ - Added fallback mechanism documentation
680
+ - Updated API reference to reflect new constructor signature
681
+
682
+ ## [1.0.0-beta.16] - 2025-11-21
683
+
684
+ ### ✨ New Features
685
+ - **Multi-AvatarView Support** - SDK now supports multiple `AvatarView` instances simultaneously
686
+ - Each `AvatarView` instance can manage its own avatar independently
687
+ - Multiple avatars can be displayed and controlled at the same time
688
+ - Each instance maintains its own rendering context, playback state, and network connection
689
+ - Removed the previous limitation of "only one AvatarView instance at a time"
690
+
691
+ ### 📚 Documentation
692
+ - Updated README.md to reflect multi-avatar support capabilities
693
+ - Added multi-avatar usage examples
694
+ - Removed outdated limitation notes about single AvatarView instance
695
+
696
+ ---
697
+
698
+ ## [1.0.0-beta.15] - 2025-11-20
699
+
700
+ ### ✨ New Features
701
+ - Added authentication support for API requests
702
+ - `appId` is now automatically included in HTTP headers (`X-App-Id`) and WebSocket URL query parameters
703
+ - `sessionToken` is now automatically included in HTTP headers (`Authorization: Bearer {token}`) and WebSocket URL query parameters
704
+ - All network requests (avatar loading, resource downloads, WebSocket connections) now include authentication credentials
705
+
706
+ ### 🔧 Improvements
707
+ - Fixed canvas resize handling for different aspect ratios
708
+ - Projection matrix is now correctly updated when canvas aspect ratio changes
709
+ - Rendering system properly handles portrait (9:16) and landscape (16:9) aspect ratios
710
+ - Canvas automatically adapts to container size changes via ResizeObserver
711
+
712
+ ### 🐛 Bug Fixes
713
+ - Fixed `RenderSystem.handleResize()` to update projection matrix when canvas size changes
714
+ - Previously only updated aspect ratio, now also updates projection matrix for correct rendering
715
+
716
+ ---
717
+
718
+ ## [1.0.0-beta.14] - 2025-11-18
719
+
720
+ ### ✨ New Features
721
+ - Added pause and resume functionality for avatar playback
722
+ - New `pause()` method to pause audio and animation playback
723
+ - New `resume()` method to resume playback from paused state
724
+ - Added `paused` state to `AvatarState` enum
725
+ - State changes are communicated via `onAvatarState` callback
726
+ - Works in both network mode and external data mode
727
+
728
+ ### 🔧 Improvements
729
+ - Canvas now uses container's full dimensions instead of fixed 1:1 aspect ratio
730
+ - Canvas automatically adapts to container size (width and height)
731
+ - External developers can control canvas aspect ratio by setting container dimensions
732
+ - Rendering system correctly handles any aspect ratio without distortion
733
+
734
+ ---
735
+
736
+ ## [1.0.0-beta.13] - 2025-11-17
737
+
738
+ ### 🔒 API Improvements
739
+ - Reduced console noise by setting default log level to Warning
740
+ - Logger now only outputs warnings and errors by default
741
+ - Set `VITE_DEBUG_LOG=true` to enable all logs
742
+ - Simplified logger configuration using `setGlobalLogLevel(LogLevel.Warning)`
743
+
744
+ ### 🐛 Bug Fixes
745
+ - Fixed SDK config loader warning in non-debug mode
746
+ - Config loading failures are now silently handled in production
747
+ - Warnings only shown when `VITE_DEBUG_LOG=true`
748
+
749
+ ---
750
+
751
+ ## [1.0.0-beta.12] - 2025-11-17
752
+
753
+ ### 🔒 API Improvements
754
+ - Marked performance monitoring APIs as internal
755
+ - `RenderPerformanceStats` interface and `getPerformanceStats()` method are now marked with `@internal` tag
756
+ - These APIs are not exposed in the public TypeScript definitions
757
+ - Reverted performance monitoring implementation to simpler version (only `renderTime` and `sortTime`)
758
+
759
+ ---
760
+
761
+ ## [1.0.0-beta.11] - 2025-11-17
762
+
763
+ ### 📚 Documentation
764
+ - Updated demo repository link in README.md
765
+ - Changed example project link from `Avatarkit-web-demo` to `AvatarSDK-Web-Demo` to match the new repository name
766
+
767
+ ---
768
+
8
769
  ## [1.0.0-beta.10] - 2025-11-16
9
770
 
10
771
  ### 🔒 API Improvements
11
772
  - Cleaned up public API to hide internal implementation details
12
773
  - Marked internal methods with `@internal` JSDoc tag to exclude them from TypeScript declarations
13
774
  - Removed unused environment configuration options (`realtimeApiBaseUrl`, `realtimeWsUrl`)
14
- - Added `appId` getter to `AvatarKit` for accessing initialized app ID
775
+ - Added `appId` getter to `AvatarSDK` for accessing initialized app ID
15
776
  - Internal methods like `getEnvironmentConfig`, `logEvent`, `getCanvas`, `getCameraConfig`, `updateCameraConfig` are now properly hidden from public API
16
777
 
17
778
  ### 🐛 Bug Fixes
@@ -58,7 +819,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
819
  ## [1.0.0-beta.5] - 2025-11-14
59
820
 
60
821
  ### 🐛 Bug Fixes
61
- - Fixed missing `AvatarPlaybackMode` enum export in published package
822
+ - Fixed missing `DrivingServiceMode` enum export in published package
62
823
 
63
824
  ---
64
825
 
@@ -87,7 +848,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
87
848
  - **External Data Mode**:
88
849
  - External components fully control audio and animation data acquisition
89
850
  - SDK only responsible for synchronized playback of externally provided data
90
- - Use `controller.play()`, `controller.sendAudioChunk()` and `controller.sendKeyframes()` methods
851
+ - Use `controller.playback()`, `controller.yieldAudioData()` and `controller.yieldFramesData()` methods
91
852
 
92
853
  ### ✨ New Features
93
854
 
@@ -123,7 +884,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
123
884
  // New API
124
885
  new AvatarView(avatar, {
125
886
  container: container,
126
- playbackMode: AvatarPlaybackMode.network // or AvatarPlaybackMode.external
887
+ playbackMode: DrivingServiceMode.sdk // or DrivingServiceMode.host
127
888
  })
128
889
  ```
129
890