@spatius/avatarkit 1.3.1-beta.7 → 1.3.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 +22 -0
- package/dist/{AvatarDownloader-B1tJTnIb.js → AvatarDownloader-DyhenPKd.js} +98 -43
- package/dist/{AvatarSDK-CTprrfJk.js → AvatarSDK-DgPvHU4L.js} +162 -2560
- package/dist/{OpusCodec-PWv7ynPp.js → OpusCodec-CXU7ysrU.js} +43 -9
- package/dist/{OpusDecoderProxy-m0fVN_M2.js → OpusDecoderProxy-Cq8Z_MZY.js} +19 -6
- package/dist/{OpusEncoderProxy-DiW21sBK.js → OpusEncoderProxy-CzY-VckE.js} +42 -7
- package/dist/{StreamingAudioPlayer-C6hgkvbK.js → StreamingAudioPlayer-CIJmBp3z.js} +2 -2
- package/dist/assets/{AvatarDownloader-LO9uuYvm.js → AvatarDownloader-G5FO1bVl.js} +96 -41
- package/dist/assets/{AvatarSDK-CPEeTeLT.js → AvatarSDK-C_Anluwp.js} +149 -12
- package/dist/assets/{OpusDecoderWorker.worker-CSSWn75M.js → OpusDecoderWorker.worker-C2T0afkj.js} +21 -5
- package/dist/assets/{OpusEncoderWorker.worker-q4TdCVDZ.js → OpusEncoderWorker.worker-DLYO9vPK.js} +53 -11
- package/dist/assets/{logger-DCzHWd4N.js → logger-YPooEAbA.js} +319 -126
- package/dist/core/AvatarController.d.ts +10 -0
- package/dist/{error-utils-BCZDCrc6.js → error-utils-BogEllAd.js} +1 -1
- package/dist/index.js +274 -43
- package/dist/internal-telemetry.d.ts +45 -20
- package/dist/internal-telemetry.js +27 -2
- package/dist/{logger-DdmfSEn-.js → logger-BOpQ7u0w.js} +336 -126
- package/dist/otel-trace-Ct4T48nC.js +2565 -0
- package/dist/{pwa-cache-manager-BMKyJWXI.js → pwa-cache-manager-C7NbU52Q.js} +1 -1
- package/dist/types/index.d.ts +30 -4
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,29 @@ export declare enum DrivingServiceMode {
|
|
|
5
5
|
/** Driven by SDK directly */
|
|
6
6
|
direct = "direct",
|
|
7
7
|
/** Driven by host application */
|
|
8
|
-
backend = "backend"
|
|
8
|
+
backend = "backend",
|
|
9
|
+
/**
|
|
10
|
+
* Use this **only** when driving the avatar through the companion RTC SDK,
|
|
11
|
+
* `@spatius/avatarkit-rtc`. If you are not using that package, stay on
|
|
12
|
+
* `direct` / `backend` — do not switch to this because it looks newer.
|
|
13
|
+
*
|
|
14
|
+
* **Telemetry dimension only — it gates no behaviour.** Every session reports
|
|
15
|
+
* `dsm`; without a value of its own, RTC traffic would be indistinguishable
|
|
16
|
+
* from plain `backend` traffic on the dashboards.
|
|
17
|
+
*
|
|
18
|
+
* It deliberately does not unlock any API. RTC drives the avatar frame by
|
|
19
|
+
* frame through `AvatarView.renderFrame` / `renderFromProtobuf`, which put the
|
|
20
|
+
* view into pure-rendering mode on their own — it never calls the host-driven
|
|
21
|
+
* feeding path (`yieldAudioData` / `yieldFramesData`) that `backend` exists
|
|
22
|
+
* for. So the `=== backend` checks guarding those methods are left untouched:
|
|
23
|
+
* loosening them for `rtc` would widen the reachable API surface without
|
|
24
|
+
* enabling anything RTC actually uses.
|
|
25
|
+
*
|
|
26
|
+
* Note the two concepts sit at different levels and are not interchangeable:
|
|
27
|
+
* pure-rendering mode is a per-frame runtime state of the render loop, while
|
|
28
|
+
* this is a session-wide value declared once at `initialize`.
|
|
29
|
+
*/
|
|
30
|
+
rtc = "rtc"
|
|
9
31
|
}
|
|
10
32
|
/**
|
|
11
33
|
* Strategy for handling animation-frame starvation (animation frames can't keep up
|
|
@@ -46,13 +68,17 @@ export interface AudioFormat {
|
|
|
46
68
|
* the uplink is raw PCM unless you opt in.
|
|
47
69
|
*
|
|
48
70
|
* Opus cuts the upload to roughly an eighth, at the cost of encoding on the
|
|
49
|
-
* client.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
71
|
+
* client. **On by default** — the uplink drops to roughly 1/8 the bytes, which
|
|
72
|
+
* matters most on the mobile networks where playback stalls actually happen.
|
|
73
|
+
* Set it to `false` to keep the raw PCM uplink (e.g. on low-end devices where
|
|
74
|
+
* the encode cost is not worth the bandwidth saved).
|
|
52
75
|
*
|
|
53
76
|
* Only effective in direct mode: host mode has no uplink, and Opus input is
|
|
54
77
|
* already Opus so there is nothing to encode. Independent of
|
|
55
78
|
* `inputAudioFormat`, which describes what the host feeds in.
|
|
79
|
+
*
|
|
80
|
+
* Falls back to a raw PCM uplink (with a warning) when `sampleRate` is not one
|
|
81
|
+
* of Opus's supported rates — see `AvatarSDK.initialize`.
|
|
56
82
|
*/
|
|
57
83
|
readonly opusUplinkEnabled?: boolean;
|
|
58
84
|
/**
|
package/package.json
CHANGED