@spatius/avatarkit 1.3.1-beta.3 → 1.3.1-beta.5
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 +24 -0
- package/dist/AvatarDownloader-DqxFbPSb.js +525 -0
- package/dist/AvatarSDK-BRDgRJ_Z.js +6798 -0
- package/dist/OpusCodec-Bo1tty8H.js +41726 -0
- package/dist/OpusDecoderProxy-9hC5C8o1.js +129 -0
- package/dist/OpusEncoderProxy-DyX-nL6Q.js +135 -0
- package/dist/StreamingAudioPlayer-BRmZO9aV.js +561 -0
- package/dist/assets/AvatarDownloader-C85m5uos.js +753 -0
- package/dist/assets/AvatarSDK-dtQsJHmr.js +6586 -0
- package/dist/assets/OpusDecoderWorker.worker-DkBuCaO8.js +41373 -0
- package/dist/assets/OpusEncoderWorker.worker-ZqEypyPc.js +41567 -0
- package/dist/assets/avatar_core_wasm-wdep7Ict.js +2536 -0
- package/dist/assets/logger-Dxe0Iw4R.js +15202 -0
- package/dist/assets/rolldown-runtime-B-1-B7_t.js +33 -0
- package/dist/avatar_core_wasm-BvVa8lO4.js +2532 -0
- package/dist/core/AvatarController.d.ts +53 -2
- package/dist/core/AvatarView.d.ts +0 -2
- package/dist/error-utils-Ct04L0Ek.js +85 -0
- package/dist/index.js +7185 -24
- package/dist/internal-telemetry.d.ts +37 -0
- package/dist/internal-telemetry.js +45 -0
- package/dist/logger-C61wOfFi.js +15288 -0
- package/dist/pwa-cache-manager-0wrNgZ7C.js +151 -0
- package/dist/rolldown-runtime-B-1-B7_t.js +33 -0
- package/dist/types/character.d.ts +4 -4
- package/dist/types/index.d.ts +60 -0
- package/package.json +12 -3
- package/dist/StreamingAudioPlayer-CF0Yrsmz.js +0 -656
- package/dist/avatar_core_wasm-BIbE25D3.js +0 -2697
- package/dist/index-CFPt9NwR.js +0 -22241
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal telemetry surface for the companion RTC SDK.
|
|
3
|
+
*
|
|
4
|
+
* `@spatius/avatarkit-rtc` reports into the same OpenObserve backend and shares
|
|
5
|
+
* this SDK's OTel providers, so its spans must sit on the same calibrated
|
|
6
|
+
* timeline. Without that, a client whose wall clock is off puts RTC spans at a
|
|
7
|
+
* time that does not line up with the server-side records they need to be read
|
|
8
|
+
* against.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately NOT re-exported from the package root: this is a bridge between
|
|
11
|
+
* two first-party packages, not API for integrators. It exposes conversion only
|
|
12
|
+
* — nothing here can alter the clock baseline.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: nothing in this file may be tagged `@internal`. The dts plugin runs with
|
|
15
|
+
* `stripInternal: true`, which erases such declarations from the emitted `.d.ts`
|
|
16
|
+
* — the entry would still export both functions at runtime while shipping an
|
|
17
|
+
* empty `export {}` type file, leaving the RTC package with no types.
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Convert a `performance.now()` reading taken earlier into a timeline
|
|
23
|
+
* timestamp (epoch ms), preferring the server-calibrated baseline and falling
|
|
24
|
+
* back to the local clock until calibration completes.
|
|
25
|
+
*
|
|
26
|
+
* Collect marks on the monotonic clock and convert at report time: the wall
|
|
27
|
+
* clock and `performance.now()` drift apart while the main thread is blocked,
|
|
28
|
+
* and calibration may not have finished when the mark was taken.
|
|
29
|
+
*
|
|
30
|
+
* @param mono - the `performance.now()` value recorded at collection time
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveMonoTimestamp(mono: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether clock calibration against the backend has completed. Timestamps
|
|
35
|
+
* resolve either way; this only reports whether they are server-aligned yet.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isClockCalibrated(): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { h as clockSync } from "./logger-C61wOfFi.js";
|
|
2
|
+
//#region internal-telemetry.ts
|
|
3
|
+
/**
|
|
4
|
+
* Internal telemetry surface for the companion RTC SDK.
|
|
5
|
+
*
|
|
6
|
+
* `@spatius/avatarkit-rtc` reports into the same OpenObserve backend and shares
|
|
7
|
+
* this SDK's OTel providers, so its spans must sit on the same calibrated
|
|
8
|
+
* timeline. Without that, a client whose wall clock is off puts RTC spans at a
|
|
9
|
+
* time that does not line up with the server-side records they need to be read
|
|
10
|
+
* against.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately NOT re-exported from the package root: this is a bridge between
|
|
13
|
+
* two first-party packages, not API for integrators. It exposes conversion only
|
|
14
|
+
* — nothing here can alter the clock baseline.
|
|
15
|
+
*
|
|
16
|
+
* NOTE: nothing in this file may be tagged `@internal`. The dts plugin runs with
|
|
17
|
+
* `stripInternal: true`, which erases such declarations from the emitted `.d.ts`
|
|
18
|
+
* — the entry would still export both functions at runtime while shipping an
|
|
19
|
+
* empty `export {}` type file, leaving the RTC package with no types.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Convert a `performance.now()` reading taken earlier into a timeline
|
|
25
|
+
* timestamp (epoch ms), preferring the server-calibrated baseline and falling
|
|
26
|
+
* back to the local clock until calibration completes.
|
|
27
|
+
*
|
|
28
|
+
* Collect marks on the monotonic clock and convert at report time: the wall
|
|
29
|
+
* clock and `performance.now()` drift apart while the main thread is blocked,
|
|
30
|
+
* and calibration may not have finished when the mark was taken.
|
|
31
|
+
*
|
|
32
|
+
* @param mono - the `performance.now()` value recorded at collection time
|
|
33
|
+
*/
|
|
34
|
+
function resolveMonoTimestamp(mono) {
|
|
35
|
+
return clockSync.resolveMono(mono);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether clock calibration against the backend has completed. Timestamps
|
|
39
|
+
* resolve either way; this only reports whether they are server-aligned yet.
|
|
40
|
+
*/
|
|
41
|
+
function isClockCalibrated() {
|
|
42
|
+
return clockSync.isReady();
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { isClockCalibrated, resolveMonoTimestamp };
|