@spatius/avatarkit 1.3.9 → 1.3.10-beta.1
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 +18 -0
- package/dist/assets/{OpusDecoderWorker.worker-DWI3dYQC.js → OpusDecoderWorker.worker-6yl1qL0f.js} +217 -10170
- package/dist/assets/{OpusEncoderWorker.worker-BlkaRHli.js → OpusEncoderWorker.worker-BTGeizmj.js} +217 -10170
- package/dist/core/AvatarController.d.ts +68 -2
- package/dist/core/AvatarSDK.d.ts +2 -1
- package/dist/core/AvatarView.d.ts +3 -2
- package/dist/index.js +314 -127
- package/dist/internal-telemetry.js +1 -1
- package/dist/{otel-trace-DqXSWBaw.js → otel-trace-CjdZ3saJ.js} +155 -10247
- package/dist/types/index.d.ts +17 -2
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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.3.10-beta.1] - 2026-09-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `AvatarViewOptions.audioFormat`: the audio format is now set per view, `new AvatarView(avatar, container, { audioFormat })`, instead of once for the whole page in `AvatarSDK.initialize()`. Two views on one page can run different sample rates. Defaults to `{ channelCount: 1, sampleRate: 16000 }` as before; `inputAudioFormat`, `opusBitrate` and `opusUplinkEnabled` move with it and keep their meaning.
|
|
12
|
+
- `controller.setAudioFormat(patch)`: change the audio format of a live view without tearing the SDK down. It is a partial update — `{ sampleRate?, opusBitrate?, opusUplinkEnabled?, inputAudioFormat? }`, fields left out keep their current value. Until now the only way to change any of these was `AvatarSDK.cleanup()` followed by `initialize()`, which also released the avatar, cleared the asset cache and rebuilt the rendering runtime, so the avatar disappeared from the page. Whatever field changes, the call interrupts whatever is playing, discards the audio context and, in Direct Mode, disconnects (reported through `onConnectionState` as `disconnected`); the host must then call `controller.initializeAudioContext()` again from a user gesture before the next `send()` (browsers require a gesture to create an audio context, and its sample rate cannot be changed once created), and audio fed after the call is interpreted in the new format. Switching `inputAudioFormat` to `'opus'` pins the sample rate at 48000; switching back to `'pcm'` keeps the current rate unless a `sampleRate` is passed in the same call. Accepted sample rates are 8000, 16000, 22050, 24000, 32000, 44100 and 48000; an unsupported rate, or a `sampleRate` paired with Opus input, logs an error and leaves the format untouched. `controller.audioFormat` reads the format currently in effect. Same API on the Android and iOS SDKs.
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
- **Breaking**: `Configuration.audioFormat` (the field passed to `AvatarSDK.initialize()`) and `AvatarSDK.getAudioFormat()`. Pass the format to `new AvatarView(...)` instead (see Added above). The field no longer exists on the `Configuration` type, so TypeScript hosts get a compile error pointing at the line to move. No deprecation shim is kept: this is a reorganisation of the initialization options rather than a renamed method, and `getAudioFormat()` was marked internal. See ADR-0008.
|
|
16
|
+
- The SDK no longer reports telemetry to PostHog. The `posthog-js` dependency is gone, and the SDK no longer opens a connection to `i.spatialwalk.ai` from the host page. Internal events continue to be reported through the existing OpenTelemetry channel. No change to public API.
|
|
17
|
+
- The SDK no longer uploads its locally stored diagnostic logs to `hogtool.spatialwalk.ai`. That upload was only ever triggered by a PostHog feature flag, which no longer exists. Logs are still kept locally in IndexedDB (`avatarkit_logs`) for offline diagnosis.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- With Opus uplink enabled (the default in Direct Mode), a round whose connection dropped *while* a chunk was still being encoded went silent: no sound, no motion, and no fallback. The disconnect check happened before encoding, so a chunk that entered the encoder while connected was simply never sent once the socket closed, and the round waited forever for animation that would not come. The SDK now notices the failed send and falls back the same way it does when the connection is already down at `send()` time: the round plays through as audio only with locally generated animation. PCM uplink was not affected.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- `AvatarView.dispose()` now reports `disconnected` through `onConnectionState` when the driving connection was still open at that moment, as `controller.close()` already did and as the Android SDK does. A host that keys UI off the connection state no longer sees it stuck at `connected` after disposing the view.
|
|
24
|
+
- Internal telemetry only, no change to public API or runtime behaviour: the per-round playback report now includes how many uplink writes were attempted and how many failed, so the Direct Mode uplink success rate can be computed. Rounds in Backend Mode, or with no uplink at all, do not report these.
|
|
25
|
+
|
|
8
26
|
## [1.3.9] - 2026-09-16
|
|
9
27
|
|
|
10
28
|
### Added
|