@spatialwalk/avatarkit 1.0.0-beta.5 → 1.0.0-beta.50

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 (99) hide show
  1. package/CHANGELOG.md +437 -3
  2. package/README.md +266 -283
  3. package/dist/StreamingAudioPlayer-DTpMpES9.js +445 -0
  4. package/dist/animation/AnimationWebSocketClient.d.ts +9 -24
  5. package/dist/animation/utils/eventEmitter.d.ts +0 -4
  6. package/dist/animation/utils/flameConverter.d.ts +3 -11
  7. package/dist/audio/AnimationPlayer.d.ts +4 -32
  8. package/dist/audio/StreamingAudioPlayer.d.ts +11 -75
  9. package/dist/avatar_core_wasm-i0Ocpx6q.js +2693 -0
  10. package/dist/avatar_core_wasm.wasm +0 -0
  11. package/dist/config/app-config.d.ts +1 -6
  12. package/dist/config/constants.d.ts +11 -25
  13. package/dist/config/sdk-config-loader.d.ts +2 -9
  14. package/dist/core/Avatar.d.ts +0 -14
  15. package/dist/core/AvatarController.d.ts +40 -116
  16. package/dist/core/AvatarDownloader.d.ts +0 -95
  17. package/dist/core/AvatarManager.d.ts +10 -18
  18. package/dist/core/AvatarSDK.d.ts +21 -0
  19. package/dist/core/AvatarView.d.ts +25 -110
  20. package/dist/core/NetworkLayer.d.ts +1 -59
  21. package/dist/generated/common/v1/models.d.ts +29 -0
  22. package/dist/generated/driveningress/v1/driveningress.d.ts +1 -12
  23. package/dist/generated/driveningress/v2/driveningress.d.ts +81 -3
  24. package/dist/generated/google/protobuf/struct.d.ts +5 -39
  25. package/dist/generated/google/protobuf/timestamp.d.ts +1 -103
  26. package/dist/index-BHk2NbFu.js +14553 -0
  27. package/dist/index.d.ts +1 -6
  28. package/dist/index.js +17 -18
  29. package/dist/renderer/RenderSystem.d.ts +1 -79
  30. package/dist/renderer/covariance.d.ts +0 -12
  31. package/dist/renderer/renderer.d.ts +6 -2
  32. package/dist/renderer/sortSplats.d.ts +0 -11
  33. package/dist/renderer/webgl/reorderData.d.ts +0 -13
  34. package/dist/renderer/webgl/webglRenderer.d.ts +19 -42
  35. package/dist/renderer/webgpu/webgpuRenderer.d.ts +18 -31
  36. package/dist/types/character-settings.d.ts +0 -5
  37. package/dist/types/character.d.ts +3 -21
  38. package/dist/types/index.d.ts +72 -36
  39. package/dist/utils/animation-interpolation.d.ts +3 -13
  40. package/dist/utils/client-id.d.ts +1 -0
  41. package/dist/utils/conversationId.d.ts +1 -0
  42. package/dist/utils/error-utils.d.ts +1 -25
  43. package/dist/utils/heartbeat-manager.d.ts +18 -0
  44. package/dist/utils/id-manager.d.ts +38 -0
  45. package/dist/utils/logger.d.ts +5 -11
  46. package/dist/utils/posthog-tracker.d.ts +11 -0
  47. package/dist/utils/pwa-cache-manager.d.ts +16 -0
  48. package/dist/utils/usage-tracker.d.ts +5 -0
  49. package/dist/vanilla/vite.config.d.ts +2 -0
  50. package/dist/wasm/avatarCoreAdapter.d.ts +11 -97
  51. package/dist/wasm/avatarCoreMemory.d.ts +5 -54
  52. package/package.json +6 -3
  53. package/dist/StreamingAudioPlayer-8Dz_aHCW.js +0 -319
  54. package/dist/StreamingAudioPlayer-8Dz_aHCW.js.map +0 -1
  55. package/dist/animation/AnimationWebSocketClient.d.ts.map +0 -1
  56. package/dist/animation/utils/eventEmitter.d.ts.map +0 -1
  57. package/dist/animation/utils/flameConverter.d.ts.map +0 -1
  58. package/dist/audio/AnimationPlayer.d.ts.map +0 -1
  59. package/dist/audio/StreamingAudioPlayer.d.ts.map +0 -1
  60. package/dist/avatar_core_wasm-D4eEi7Eh.js +0 -1666
  61. package/dist/avatar_core_wasm-D4eEi7Eh.js.map +0 -1
  62. package/dist/config/app-config.d.ts.map +0 -1
  63. package/dist/config/constants.d.ts.map +0 -1
  64. package/dist/config/sdk-config-loader.d.ts.map +0 -1
  65. package/dist/core/Avatar.d.ts.map +0 -1
  66. package/dist/core/AvatarController.d.ts.map +0 -1
  67. package/dist/core/AvatarDownloader.d.ts.map +0 -1
  68. package/dist/core/AvatarKit.d.ts +0 -66
  69. package/dist/core/AvatarKit.d.ts.map +0 -1
  70. package/dist/core/AvatarManager.d.ts.map +0 -1
  71. package/dist/core/AvatarView.d.ts.map +0 -1
  72. package/dist/core/NetworkLayer.d.ts.map +0 -1
  73. package/dist/generated/driveningress/v1/driveningress.d.ts.map +0 -1
  74. package/dist/generated/driveningress/v2/driveningress.d.ts.map +0 -1
  75. package/dist/generated/google/protobuf/struct.d.ts.map +0 -1
  76. package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
  77. package/dist/index-bbc7bE-q.js +0 -5942
  78. package/dist/index-bbc7bE-q.js.map +0 -1
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/renderer/RenderSystem.d.ts.map +0 -1
  82. package/dist/renderer/covariance.d.ts.map +0 -1
  83. package/dist/renderer/renderer.d.ts.map +0 -1
  84. package/dist/renderer/sortSplats.d.ts.map +0 -1
  85. package/dist/renderer/webgl/reorderData.d.ts.map +0 -1
  86. package/dist/renderer/webgl/webglRenderer.d.ts.map +0 -1
  87. package/dist/renderer/webgpu/webgpuRenderer.d.ts.map +0 -1
  88. package/dist/types/character-settings.d.ts.map +0 -1
  89. package/dist/types/character.d.ts.map +0 -1
  90. package/dist/types/index.d.ts.map +0 -1
  91. package/dist/utils/animation-interpolation.d.ts.map +0 -1
  92. package/dist/utils/cls-tracker.d.ts +0 -17
  93. package/dist/utils/cls-tracker.d.ts.map +0 -1
  94. package/dist/utils/error-utils.d.ts.map +0 -1
  95. package/dist/utils/logger.d.ts.map +0 -1
  96. package/dist/utils/reqId.d.ts +0 -20
  97. package/dist/utils/reqId.d.ts.map +0 -1
  98. package/dist/wasm/avatarCoreAdapter.d.ts.map +0 -1
  99. package/dist/wasm/avatarCoreMemory.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,10 +5,444 @@ 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.50] - 2025-01-05
9
+
10
+ ### 🔧 Performance Improvements
11
+ - **Removed CORS Preflight for Meta API** - Removed authentication headers (`X-App-Id` and `Authorization`) and unnecessary `Content-Type` header from character metadata API requests. This eliminates CORS preflight requests for simple GET requests, improving loading performance.
12
+
13
+ ## [1.0.0-beta.49] - 2025-01-05
14
+
15
+ ### 🐛 Bugfix
16
+ - **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.
17
+
18
+ ## [1.0.0-beta.48] - 2025-01-05
19
+
20
+ ### ✨ New Features
21
+ - **PWA Cache Management** - Added automatic PWA cache management for character and template resources to improve loading performance
22
+
23
+ ### 🔧 Performance Improvements
24
+ - **Cache Hit Rate Metrics** - Resource downloads now report cache status for analytics
25
+
26
+ ## [1.0.0-beta.47] - 2025-12-29
27
+
28
+ ### 🐛 Bugfix
29
+ - **Avatar Meta Update** - Fixed issue where cached Avatar instances would return stale character metadata even when the latest metadata was fetched. Now the character metadata is always updated to the latest version when loading an avatar, even if the version number hasn't changed.
30
+
31
+ ## [1.0.0-beta.46] - 2025-12-29
32
+
33
+ ### 🐛 Bugfix
34
+ - Expose `getCharacterMeta()` method in `Avatar` class as public API
35
+
36
+ ## [1.0.0-beta.45] - 2025-12-29
37
+
38
+ ### ✨ New Features
39
+ - **Immediate Rendering on Pause** - When playback is paused, updating post-processing parameters or camera configuration will immediately re-render the current frame:
40
+ - Post-processing parameters (rotation, neck pose, jaw pose, eye blink, etc.) now apply immediately when updated during pause
41
+ - Camera configuration (position, target, FOV, etc.) now applies immediately when updated during pause
42
+ - During normal playback, these updates still apply on the next frame as before
43
+
44
+ ### 🔄 API Changes
45
+
46
+ ### 🔄 API Changes
47
+ - **AvatarView Ready Promise Replaced with Callback** - Replaced `ready: Promise<void>` property with `onFirstRendering?: () => void` callback for better async handling:
48
+ - Removed `ready` Promise property
49
+ - Added `onFirstRendering` optional callback that is called when the first frame is rendered
50
+ - Callback-based approach is more idiomatic and easier to use than Promise-based approach
51
+
52
+ ### 🗑️ Removed
53
+ - **Removed unused `seek()` method** - Removed unused and buggy `seek()` method from `StreamingAudioPlayer`
54
+
55
+ ## [1.0.0-beta.44] - 2025-12-29
56
+
57
+ ### 🔧 Performance Improvements
58
+ - **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
59
+
60
+ ## [1.0.0-beta.43] - 2025-12-29
61
+
62
+ ### 🔧 Improvements
63
+ - Remove some unnecessary telemetry reporting
64
+
65
+ ## [1.0.0-beta.42] - 2025-12-29
66
+
67
+ ### ✨ New Features
68
+ - **PostHog Telemetry Configuration** - PostHog telemetry reporting now supports separate configuration for domestic (CN) and international (INTL) environments:
69
+ - Separate PostHog hosts and API keys for CN and INTL environments
70
+ - Compression disabled for domestic self-hosted instance, enabled for international official PostHog
71
+ - Localhost domain filtering to avoid test data pollution
72
+
73
+ ## [1.0.0-beta.41] - 2025-12-29
74
+
75
+ ### 🔄 Breaking Changes
76
+ - **Background Image Support Removed** - Removed background image functionality from `AvatarView`:
77
+ - Removed `isOpaque` getter/setter property
78
+ - Removed `setBackgroundImage()` method
79
+ - Removed background image loading from `AvatarDownloader`
80
+ - Canvas now always uses transparent background
81
+
82
+ ## [1.0.0-beta.40] - 2025-12-27
83
+
84
+ ### 🔧 API Improvements
85
+ - Extended post-processing parameter configuration interface
86
+
87
+ ## [1.0.0-beta.39] - 2025-12-27
88
+
89
+ ### 🔧 Improvements
90
+ - Filter localhost domain from telemetry reporting to avoid test data pollution
91
+
92
+ ## [1.0.0-beta.38] - 2025-12-27
93
+
94
+ ### 🔄 Breaking Changes
95
+ - Migrated telemetry reporting from Tencent Cloud CLS to PostHog
96
+
97
+ ### ✨ New Features
98
+ - Implemented download queue for character resource loading
99
+
100
+ ## [1.0.0-beta.37] - 2025-12-24
101
+
102
+ ### 🐛 Bugfix
103
+ - Various bug fixes and improvements
104
+
105
+ ## [1.0.0-beta.36] - 2025-12-20
106
+
107
+ ### ✨ New Features
108
+ - **Audio Sample Rate Configuration** - Added configurable audio sample rate support in SDK initialization
109
+ - Added `audioFormat` configuration option with `channelCount` (fixed to 1) and `sampleRate` (supports: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz, default: 16000)
110
+ - Audio recording and playback now automatically use the configured sample rate
111
+ - Vanilla demo updated with sample rate dropdown selector for easy testing
112
+
113
+ ## [1.0.0-beta.35] - 2025-12-16
114
+
115
+ ### 🔄 API Changes
116
+ - **Avatar Transform API** - Changed `setTransform` method to `transform` getter/setter property for more idiomatic JavaScript API. Now supports both reading and setting transform values.
117
+
118
+ ## [1.0.0-beta.34] - 2025-12-16
119
+
120
+ ### ✨ New Features
121
+ - **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.
122
+
123
+ ## [1.0.0-beta.32] - 2025-12-16
124
+
125
+ ### 🔄 Breaking Changes
126
+ - **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.
127
+
128
+ ## [1.0.0-beta.31] - 2025-12-16
129
+
130
+ ### 🐛 Bugfix
131
+ - **Environment CORS Issue** - Fixed CORS issues when requesting configuration and character data APIs. SDK now provides default configuration fallback when config requests fail, ensuring smooth operation across different environments.
132
+
133
+ ## [1.0.0-beta.30] - 2025-12-15
134
+
135
+ ### 🐛 Bugfix
136
+ - **Template Resources Duplicate Download** - Fixed issue where template resources were being re-downloaded for each new character load. Template resources are now only loaded once during SDK initialization and reused for all characters.
137
+
138
+ ## [1.0.0-beta.29] - 2025-12-15
139
+
140
+ ### 🔄 Breaking Changes
141
+ - **Environment Enum** - Removed `Environment.test`. Only `Environment.cn` and `Environment.intl` are now supported. Environment configuration must be explicitly provided.
142
+ - **Log Level Default** - Default log level changed from `LogLevel.all` to `LogLevel.off`. Set `logLevel: LogLevel.all` in configuration to enable all logs.
143
+
144
+ ### ✨ New Features
145
+ - **Avatar Caching** - Added avatar caching methods in `AvatarManager`:
146
+ - `retrieve(id: string): Avatar | undefined` - Get cached avatar by ID
147
+ - `clear(id: string): void` - Clear cached avatar for specific ID
148
+ - `clearAll(): void` - Clear all cached avatars
149
+ - `clearCache()` is now deprecated, use `clearAll()` instead
150
+ - **Background Image Support** - Added background image control in `AvatarView`:
151
+ - `isOpaque: boolean` - Getter/setter to control canvas background transparency
152
+ - `setBackgroundImage(image: HTMLImageElement | string | null): void` - Set or remove background image
153
+
154
+ ### 🔧 Improvements
155
+ - **Avatar Version Checking** - Avatar cache now automatically checks version and reloads if cached avatar version differs from latest metadata
156
+ - **Concurrent Loading** - Multiple concurrent `load()` calls for the same avatar ID now reuse the same loading promise
157
+
158
+ ## [1.0.0-beta.28] - 2025-12-08
159
+
160
+ ### 🔄 Breaking Changes
161
+ - **Class Renamed** - `AvatarKit` class has been renamed to `AvatarSDK` for better consistency
162
+ - Update all imports: `import { AvatarKit } from '@spatialwalk/avatarkit'` → `import { AvatarSDK } from '@spatialwalk/avatarkit'`
163
+ - Update all API calls: `AvatarKit.initialize()` → `AvatarSDK.initialize()`
164
+ - All static methods and properties remain the same, only the class name has changed
165
+
166
+ ### 🔧 Improvements
167
+ - **Rendering Optimizations** - Added fragment shader discard optimization to improve performance and edge quality
168
+ - **Shader Alignment** - Removed view matrix transpose to align with Android SDK implementation
169
+ - **Resource Cleanup** - Removed unused `frameMono` and `audioMono` resources from SDK and tests
170
+
171
+ ## [1.0.0-beta.27] - 2025-12-04
172
+
173
+ ### 🐛 Bugfix
174
+
175
+ ## [1.0.0-beta.26] - 2025-12-03
176
+
177
+ ### ✨ New Features
178
+ - **Log Level Configuration** - Added `logLevel` configuration option to control SDK logging verbosity
179
+ - `LogLevel.off` - Disable all logs
180
+ - `LogLevel.error` - Only error logs
181
+ - `LogLevel.warning` - Warning and error logs
182
+ - `LogLevel.all` - All logs (default)
183
+ - **Standardized CLS Logging Events** - All CLS logging events now use standardized field names for better querying
184
+ - 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`
185
+ - Standard fields: `req_id`, `con_id`, `avatar_id`, `description`
186
+ - **End-to-End Latency Tracking** - Added `driving_latency` event to track latency metrics for both SDK and Host modes
187
+ - Tracks: `start`, `tap2`, `tap4`, `end`, `first_frame` timestamps
188
+ - Automatically reported at key moments during audio/animation processing
189
+
190
+ ### 🔧 Improvements
191
+ - **CLS Configuration Alignment** - Updated CLS endpoints and Topic IDs to match iOS SDK configuration
192
+ - **Default API Endpoints** - Fixed default API endpoint for `intl` environment to `api.intl.spatialwalk.cloud`
193
+ - **Error Code Enum** - Added new error codes: `appIDUnrecognized`, `sessionTokenInvalid`, `sessionTokenExpired`, `failedToFetchAvatarMetadata`, `failedToDownloadAvatarAssets`
194
+
195
+ ### 🗑️ Removed
196
+ - **Redundant Log Events** - Removed unnecessary log events: `playback_paused`, `playback_resumed`, `reconnecting`, `connect_success`, `server_error`, `decode_failed`
197
+
198
+ ## [1.0.0-beta.25] - 2025-12-03
199
+
200
+ ### 🔧 Improvements
201
+ - **Removed Audio Buffer Limit** - Removed the 100 chunk limit on pending audio buffers to allow unlimited audio data buffering
202
+
203
+ ## [1.0.0-beta.24] - 2025-11-26
204
+
205
+ ### 🔧 API Changes
206
+ - **Backend Endpoints Updated** - Backend API endpoints have been updated for all environments
207
+
208
+ ## [1.0.0-beta.23] - 2025-11-26
209
+
210
+ ### 🔧 API Changes
211
+ - **Breaking Change** - `playback()` method is no longer supported and has been removed from public API
212
+
213
+ ## [1.0.0-beta.22] - 2025-11-26
214
+
215
+ ### 🔧 API Changes
216
+ - **State Callback Renamed** - `onAvatarState` has been renamed to `onConversationState` for better clarity
217
+ - The callback now uses `ConversationState` enum with states: `idle` and `playing`
218
+ - **Environment Enum Updated** - `Environment.us` has been renamed to `Environment.intl` for better internationalization support
219
+ - All references to `Environment.us` should be updated to `Environment.intl`
220
+ - Remote config endpoints now use `intl` instead of `us`
221
+
222
+ ### ✨ New Features
223
+ - **Volume Control** - Added volume control API for audio playback
224
+ - `setVolume(volume: number)` - Set audio volume (0.0 to 1.0)
225
+ - `getVolume(): number` - Get current audio volume
226
+ - Volume control only affects the avatar's audio player, not system volume
227
+ - Volume changes take effect immediately, including for currently playing audio
228
+
229
+ ## [1.0.0-beta.21] - 2025-11-25
230
+
231
+ ### ✨ New Features
232
+ - **SDK Mode Connection Timeout Fallback** - Enhanced fallback mechanism for SDK mode:
233
+ - If WebSocket connection fails to establish within 15 seconds, the SDK automatically enters fallback mode
234
+ - In fallback mode, audio data can still be sent and will play normally, even though no animation data will be received
235
+ - Connection failures also trigger this fallback mechanism
236
+ - `ConnectionState.connecting` and `ConnectionState.failed` events are emitted to notify external applications
237
+ - Concurrent connection attempts are prevented to avoid race conditions
238
+
239
+ ### 🔧 Improvements
240
+ - Improved connection state management: `isConnected` now accurately reflects actual connection status (false in fallback mode)
241
+ - Added `canSend()` method in `NetworkLayer` to check if audio can be sent (including fallback mode)
242
+ - Better separation of concerns: connection state checks are now handled by `NetworkLayer`, while playback logic remains in `AvatarController`
243
+
244
+ ## [1.0.0-beta.20] - 2025-11-25
245
+
246
+ ### 🔧 Improvements
247
+ - Removed 1-second audio buffer requirement for auto-starting playback in Host mode
248
+
249
+ ## [1.0.0-beta.19] - 2025-11-25
250
+
251
+ ### 📚 Documentation
252
+ - **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
253
+ - Removed misleading "after playback() is called" comments
254
+ - Clarified two ways to start a session: using `playback()` for existing data, or `yieldAudioData()` directly for streaming
255
+ - Updated all examples and workflow descriptions to reflect correct API usage
256
+
257
+ ## [1.0.0-beta.18] - 2025-11-25
258
+
259
+ ### 🔧 API Changes
260
+ - **Renamed `reqId` to `conversationId`** - Updated terminology for better clarity
261
+ - All methods and parameters that used `reqId` now use `conversationId`
262
+ - `getCurrentReqId()` → `getCurrentConversationId()`
263
+ - `generateReqId()` → `generateConversationId()`
264
+ - Updated all event logs and documentation to use `conversationId`
265
+ - Note: Protobuf protocol still uses `reqId` field name internally, but SDK API uses `conversationId`
266
+
267
+ ### 📚 Documentation
268
+ - Enhanced Host mode documentation to clearly emphasize the workflow: send audio data first to get conversationId, then use that conversationId to send animation data
269
+ - Updated Host Mode Example and Host Mode Flow sections with clearer step-by-step instructions
270
+
271
+ ## [1.0.0-beta.17] - 2025-11-24
272
+
273
+ ### ✨ New Features
274
+ - **Audio-Only Fallback Mechanism** - SDK now includes automatic fallback to audio-only playback when animation data is unavailable
275
+ - SDK mode: Automatically enters audio-only mode when server returns an error
276
+ - Host mode: Automatically enters audio-only mode when empty animation data is provided
277
+ - Once in audio-only mode, subsequent animation data for that session is ignored
278
+ - Fallback mode is interruptible, just like normal playback mode
279
+
280
+ ### 🔧 API Changes
281
+ - **Playback Mode Configuration** - Moved playback mode configuration from `AvatarView` constructor to `AvatarSDK.initialize()`
282
+ - Playback mode is now determined by `drivingServiceMode` in `AvatarSDK.initialize()` configuration
283
+ - `AvatarView` constructor now only requires `avatar` and `container` parameters
284
+ - Removed `AvatarViewOptions` interface
285
+ - `container` parameter is now required (no longer optional)
286
+ - **Method Renames** - Renamed methods in `AvatarController` for Host mode to better reflect their purpose
287
+ - `play()` → `playback()`: Renamed to better reflect that the method is used for playback of existing data (replay mode)
288
+ - Old API: `avatarController.play(initialAudioChunks, initialKeyframes)`
289
+ - New API: `avatarController.playback(initialAudioChunks, initialKeyframes)`
290
+ - `sendAudioChunk()` → `yieldAudioData()`: Renamed to better reflect that the method yields/streams audio data
291
+ - Old API: `avatarController.sendAudioChunk(data, isLast)`
292
+ - New API: `avatarController.yieldAudioData(data, isLast)`
293
+ - `sendKeyframes()` → `yieldFramesData()`: Renamed to better reflect that the method yields/streams animation keyframes
294
+ - Old API: `avatarController.sendKeyframes(keyframes, reqId)`
295
+ - New API: `avatarController.yieldFramesData(keyframes, conversationId)`
296
+
297
+ ### 🔧 Improvements
298
+ - Extended transition animation duration from 200ms to 400ms for smoother end-of-playback transitions
299
+
300
+ ### 📚 Documentation
301
+ - Updated README.md to use "SDK mode" and "Host mode" terminology instead of "Network mode" and "External data mode"
302
+ - Added fallback mechanism documentation
303
+ - Updated API reference to reflect new constructor signature
304
+
305
+ ## [1.0.0-beta.16] - 2025-11-21
306
+
307
+ ### ✨ New Features
308
+ - **Multi-AvatarView Support** - SDK now supports multiple `AvatarView` instances simultaneously
309
+ - Each `AvatarView` instance can manage its own character independently
310
+ - Multiple characters can be displayed and controlled at the same time
311
+ - Each instance maintains its own rendering context, playback state, and network connection
312
+ - Removed the previous limitation of "only one AvatarView instance at a time"
313
+
314
+ ### 📚 Documentation
315
+ - Updated README.md to reflect multi-character support capabilities
316
+ - Added multi-character usage examples
317
+ - Removed outdated limitation notes about single AvatarView instance
318
+
319
+ ---
320
+
321
+ ## [1.0.0-beta.15] - 2025-11-20
322
+
323
+ ### ✨ New Features
324
+ - Added authentication support for API requests
325
+ - `appId` is now automatically included in HTTP headers (`X-App-Id`) and WebSocket URL query parameters
326
+ - `sessionToken` is now automatically included in HTTP headers (`Authorization: Bearer {token}`) and WebSocket URL query parameters
327
+ - All network requests (character loading, resource downloads, WebSocket connections) now include authentication credentials
328
+
329
+ ### 🔧 Improvements
330
+ - Fixed canvas resize handling for different aspect ratios
331
+ - Projection matrix is now correctly updated when canvas aspect ratio changes
332
+ - Rendering system properly handles portrait (9:16) and landscape (16:9) aspect ratios
333
+ - Canvas automatically adapts to container size changes via ResizeObserver
334
+
335
+ ### 🐛 Bug Fixes
336
+ - Fixed `RenderSystem.handleResize()` to update projection matrix when canvas size changes
337
+ - Previously only updated aspect ratio, now also updates projection matrix for correct rendering
338
+
339
+ ---
340
+
341
+ ## [1.0.0-beta.14] - 2025-11-18
342
+
343
+ ### ✨ New Features
344
+ - Added pause and resume functionality for avatar playback
345
+ - New `pause()` method to pause audio and animation playback
346
+ - New `resume()` method to resume playback from paused state
347
+ - Added `paused` state to `AvatarState` enum
348
+ - State changes are communicated via `onAvatarState` callback
349
+ - Works in both network mode and external data mode
350
+
351
+ ### 🔧 Improvements
352
+ - Canvas now uses container's full dimensions instead of fixed 1:1 aspect ratio
353
+ - Canvas automatically adapts to container size (width and height)
354
+ - External developers can control canvas aspect ratio by setting container dimensions
355
+ - Rendering system correctly handles any aspect ratio without distortion
356
+
357
+ ---
358
+
359
+ ## [1.0.0-beta.13] - 2025-11-17
360
+
361
+ ### 🔒 API Improvements
362
+ - Reduced console noise by setting default log level to Warning
363
+ - Logger now only outputs warnings and errors by default
364
+ - Set `VITE_DEBUG_LOG=true` to enable all logs
365
+ - Simplified logger configuration using `setGlobalLogLevel(LogLevel.Warning)`
366
+
367
+ ### 🐛 Bug Fixes
368
+ - Fixed SDK config loader warning in non-debug mode
369
+ - Config loading failures are now silently handled in production
370
+ - Warnings only shown when `VITE_DEBUG_LOG=true`
371
+
372
+ ---
373
+
374
+ ## [1.0.0-beta.12] - 2025-11-17
375
+
376
+ ### 🔒 API Improvements
377
+ - Marked performance monitoring APIs as internal
378
+ - `RenderPerformanceStats` interface and `getPerformanceStats()` method are now marked with `@internal` tag
379
+ - These APIs are not exposed in the public TypeScript definitions
380
+ - Reverted performance monitoring implementation to simpler version (only `renderTime` and `sortTime`)
381
+
382
+ ---
383
+
384
+ ## [1.0.0-beta.11] - 2025-11-17
385
+
386
+ ### 📚 Documentation
387
+ - Updated demo repository link in README.md
388
+ - Changed example project link from `Avatarkit-web-demo` to `AvatarSDK-Web-Demo` to match the new repository name
389
+
390
+ ---
391
+
392
+ ## [1.0.0-beta.10] - 2025-11-16
393
+
394
+ ### 🔒 API Improvements
395
+ - Cleaned up public API to hide internal implementation details
396
+ - Marked internal methods with `@internal` JSDoc tag to exclude them from TypeScript declarations
397
+ - Removed unused environment configuration options (`realtimeApiBaseUrl`, `realtimeWsUrl`)
398
+ - Added `appId` getter to `AvatarSDK` for accessing initialized app ID
399
+ - Internal methods like `getEnvironmentConfig`, `logEvent`, `getCanvas`, `getCameraConfig`, `updateCameraConfig` are now properly hidden from public API
400
+
401
+ ### 🐛 Bug Fixes
402
+ - Fixed memory leaks when disposing AvatarView instances
403
+ - Improved resource cleanup to prevent memory leaks when switching or disposing avatar instances
404
+ - Properly clears all callbacks, event listeners, and large data buffers on disposal
405
+
406
+ ---
407
+ ## [1.0.0-beta.9] - 2025-11-15
408
+
409
+ ### 🐛 Bug Fixes
410
+ - Fixed memory leaks when disposing AvatarView instances
411
+ - Improved resource cleanup to prevent memory leaks when switching or disposing avatar instances
412
+ - Properly clears all callbacks, event listeners, and large data buffers on disposal
413
+
414
+ ---
415
+
416
+ ## [1.0.0-beta.8] - 2025-11-14
417
+
418
+ ### 🐛 Bug Fixes
419
+ - Fixed audio-animation synchronization issue after normal playback completion
420
+ - Playback state is now properly cleaned up when audio finishes normally, preventing synchronization issues in subsequent conversations
421
+
422
+ ---
423
+
424
+ ## [1.0.0-beta.7] - 2025-11-14
425
+
426
+ ### 🔄 Refactoring
427
+ - Improved rendering state management for better stability and maintainability
428
+
429
+ ### 🐛 Bug Fixes
430
+ - Fixed interrupt not generating transition animation when interrupting during playback
431
+ - Fixed transition animation being regenerated and reset in external data mode when sending keyframes after playback starts
432
+
433
+ ---
434
+
435
+ ## [1.0.0-beta.6] - 2025-11-14
436
+
437
+ ### 🐛 Bug Fixes
438
+ - Fixed transition animation being regenerated and reset in external data mode when sending keyframes after playback starts, causing the transition to play twice
439
+
440
+ ---
441
+
8
442
  ## [1.0.0-beta.5] - 2025-11-14
9
443
 
10
444
  ### 🐛 Bug Fixes
11
- - Fixed missing `AvatarPlaybackMode` enum export in published package
445
+ - Fixed missing `DrivingServiceMode` enum export in published package
12
446
 
13
447
  ---
14
448
 
@@ -37,7 +471,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
471
  - **External Data Mode**:
38
472
  - External components fully control audio and animation data acquisition
39
473
  - SDK only responsible for synchronized playback of externally provided data
40
- - Use `controller.play()`, `controller.sendAudioChunk()` and `controller.sendKeyframes()` methods
474
+ - Use `controller.playback()`, `controller.yieldAudioData()` and `controller.yieldFramesData()` methods
41
475
 
42
476
  ### ✨ New Features
43
477
 
@@ -73,7 +507,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
73
507
  // New API
74
508
  new AvatarView(avatar, {
75
509
  container: container,
76
- playbackMode: AvatarPlaybackMode.network // or AvatarPlaybackMode.external
510
+ playbackMode: DrivingServiceMode.sdk // or DrivingServiceMode.host
77
511
  })
78
512
  ```
79
513