@spatialwalk/avatarkit 1.0.0-beta.31 → 1.0.0-beta.32
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/CHANGELOG.md +5 -0
- package/README.md +5 -5
- package/dist/{StreamingAudioPlayer-B07iPxK4.js → StreamingAudioPlayer-TiKq7LEP.js} +1 -1
- package/dist/core/AvatarController.d.ts +1 -1
- package/dist/{index-CCBBCJi2.js → index-CFQb9r1N.js} +4085 -4045
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ 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.32] - 2025-12-16
|
|
9
|
+
|
|
10
|
+
### 🔄 Breaking Changes
|
|
11
|
+
- **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.
|
|
12
|
+
|
|
8
13
|
## [1.0.0-beta.31] - 2025-12-16
|
|
9
14
|
|
|
10
15
|
### 🐛 Bugfix
|
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ const avatarView = new AvatarView(avatar, container)
|
|
|
87
87
|
// 4. Host Mode Workflow:
|
|
88
88
|
// Send audio data first to get conversationId, then use it to send animation data
|
|
89
89
|
const conversationId = avatarView.avatarController.yieldAudioData(audioData, false)
|
|
90
|
-
avatarView.avatarController.yieldFramesData(
|
|
90
|
+
avatarView.avatarController.yieldFramesData(animationDataArray, conversationId) // animationDataArray: (Uint8Array | ArrayBuffer)[]
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
### Complete Examples
|
|
@@ -177,7 +177,7 @@ External data source (audio + animation)
|
|
|
177
177
|
↓
|
|
178
178
|
AvatarController.yieldAudioData(audioChunk) // Returns conversationId
|
|
179
179
|
↓
|
|
180
|
-
AvatarController.yieldFramesData(
|
|
180
|
+
AvatarController.yieldFramesData(keyframesDataArray, conversationId) // keyframesDataArray: (Uint8Array | ArrayBuffer)[] - each element is a protobuf encoded Message
|
|
181
181
|
↓
|
|
182
182
|
AvatarController → AnimationPlayer (synchronized playback)
|
|
183
183
|
↓
|
|
@@ -348,8 +348,8 @@ const conversationId = avatarView.avatarController.yieldAudioData(
|
|
|
348
348
|
|
|
349
349
|
// Stream animation keyframes (requires conversationId from audio data)
|
|
350
350
|
avatarView.avatarController.yieldFramesData(
|
|
351
|
-
|
|
352
|
-
conversationId: string
|
|
351
|
+
keyframesDataArray: (Uint8Array | ArrayBuffer)[], // Animation keyframes binary data array (each element is a protobuf encoded Message)
|
|
352
|
+
conversationId: string // Conversation ID (required)
|
|
353
353
|
)
|
|
354
354
|
```
|
|
355
355
|
|
|
@@ -552,7 +552,7 @@ const avatarView = new AvatarView(avatar, container)
|
|
|
552
552
|
|
|
553
553
|
// Use
|
|
554
554
|
const conversationId = avatarView.avatarController.yieldAudioData(audioChunk, false)
|
|
555
|
-
avatarView.avatarController.yieldFramesData(
|
|
555
|
+
avatarView.avatarController.yieldFramesData(keyframesDataArray, conversationId) // keyframesDataArray: (Uint8Array | ArrayBuffer)[]
|
|
556
556
|
|
|
557
557
|
// Cleanup
|
|
558
558
|
avatarView.avatarController.clear() // Clear all data and resources
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-
|
|
4
|
+
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-CFQb9r1N.js";
|
|
5
5
|
class StreamingAudioPlayer {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
__publicField(this, "audioContext", null);
|
|
@@ -39,7 +39,7 @@ export declare class AvatarController {
|
|
|
39
39
|
send(audioData: ArrayBuffer, end?: boolean): string | null;
|
|
40
40
|
close(): void;
|
|
41
41
|
yieldAudioData(data: Uint8Array, isLast?: boolean): string | null;
|
|
42
|
-
yieldFramesData(
|
|
42
|
+
yieldFramesData(keyframesDataArray: (Uint8Array | ArrayBuffer)[], conversationId: string): void;
|
|
43
43
|
pause(): void;
|
|
44
44
|
resume(): Promise<void>;
|
|
45
45
|
interrupt(): void;
|