@spatius/avatarkit 1.3.8 → 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 +53 -0
- package/dist/assets/{OpusDecoderWorker.worker-DVOREuTG.js → OpusDecoderWorker.worker-6yl1qL0f.js} +1530 -11428
- package/dist/assets/{OpusEncoderWorker.worker-fkLsXEK1.js → OpusEncoderWorker.worker-BTGeizmj.js} +1530 -11428
- package/dist/core/AvatarController.d.ts +81 -2
- package/dist/core/AvatarSDK.d.ts +14 -3
- package/dist/core/AvatarView.d.ts +33 -33
- package/dist/core/avatarViewRegistry.d.ts +2 -0
- package/dist/index.js +1007 -403
- package/dist/internal-telemetry.d.ts +12 -23
- package/dist/internal-telemetry.js +16 -29
- package/dist/{otel-trace-CZJAGjGg.js → otel-trace-CjdZ3saJ.js} +8306 -18303
- package/dist/types/character.d.ts +0 -13
- package/dist/types/index.d.ts +26 -8
- package/package.json +2 -3
- package/dist/rolldown-runtime-FDOR9p9I.js +0 -24
|
@@ -11,11 +11,6 @@ import { Attributes } from '@opentelemetry/api';
|
|
|
11
11
|
* @param mono - the `performance.now()` value recorded at collection time
|
|
12
12
|
*/
|
|
13
13
|
export declare function resolveMonoTimestamp(mono: number): number;
|
|
14
|
-
/**
|
|
15
|
-
* Whether clock calibration against the backend has completed. Timestamps
|
|
16
|
-
* resolve either way; this only reports whether they are server-aligned yet.
|
|
17
|
-
*/
|
|
18
|
-
export declare function isClockCalibrated(): boolean;
|
|
19
14
|
/**
|
|
20
15
|
* Handle for one round's trace.
|
|
21
16
|
*
|
|
@@ -96,24 +91,6 @@ export declare function recordMetric(name: string, value: number, attributes?: A
|
|
|
96
91
|
* alongside, which a caller-supplied `Date.now()` cannot do.
|
|
97
92
|
*/
|
|
98
93
|
export declare function trackEvent(event: string, level?: 'debug' | 'info' | 'warning' | 'error', contents?: Record<string, unknown>): void;
|
|
99
|
-
/**
|
|
100
|
-
* The client environment fields this SDK stamps on every OTel log record —
|
|
101
|
-
* `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
|
|
102
|
-
* screen/viewport size and `timezone`.
|
|
103
|
-
*
|
|
104
|
-
* Shared with the RTC SDK rather than re-derived there. These are record-level
|
|
105
|
-
* fields, not Resource attributes: they are read from `window.location` at emit
|
|
106
|
-
* time because `url`/`pathname` change as a single-page app routes. Sharing the
|
|
107
|
-
* OTel providers therefore does not carry them across — the RTC SDK emits
|
|
108
|
-
* through its own logger and would report no `host` at all, which is what
|
|
109
|
-
* prompted this export. Re-implementing the collection on that side would let
|
|
110
|
-
* the two drift apart in field names and in how each value is read, and the
|
|
111
|
-
* backend aggregates on exactly these names.
|
|
112
|
-
*
|
|
113
|
-
* Call at emit time, once per record; spread the result before the caller's own
|
|
114
|
-
* properties so an explicit value at the call site still wins.
|
|
115
|
-
*/
|
|
116
|
-
export declare function clientContextFields(): Record<string, string | number>;
|
|
117
94
|
/**
|
|
118
95
|
* Declare which SDK these records come from, as the `sdk.package` and
|
|
119
96
|
* `sdk.version` resource attributes.
|
|
@@ -141,3 +118,15 @@ export declare function setSdkIdentity(identity: {
|
|
|
141
118
|
sdkPackage?: string;
|
|
142
119
|
sdkVersion?: string;
|
|
143
120
|
}): void;
|
|
121
|
+
/**
|
|
122
|
+
* The client environment fields this SDK stamps on every OTel log record —
|
|
123
|
+
* `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
|
|
124
|
+
* screen/viewport size and `timezone`.
|
|
125
|
+
*
|
|
126
|
+
* **Kept only for `@spatius/avatarkit-rtc` ≤ 1.1.3**, which imports it from this
|
|
127
|
+
* entry (RTC ≥ 1.1.4 routes through {@link trackEvent}, which stamps these fields
|
|
128
|
+
* itself, and no longer calls this). RTC's peer range is `>=1.3.7`, so a host
|
|
129
|
+
* still on 1.1.3 that upgrades this package would otherwise hit an undefined
|
|
130
|
+
* import. Remove once no 1.1.3 hosts remain in telemetry.
|
|
131
|
+
*/
|
|
132
|
+
export declare function clientContextFields(): Record<string, string | number>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as setSdkIdentity$1, T as clockSync, h as clientContextFields$1, j as recordMetric$1, o as startPlaybackTrace$1, u as Message, x as trackEventOtel } from "./otel-trace-CjdZ3saJ.js";
|
|
2
2
|
//#region internal-telemetry.ts
|
|
3
3
|
/**
|
|
4
4
|
* Internal telemetry surface for the companion RTC SDK.
|
|
@@ -35,13 +35,6 @@ function resolveMonoTimestamp(mono) {
|
|
|
35
35
|
return clockSync.resolveMono(mono);
|
|
36
36
|
}
|
|
37
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
|
-
/**
|
|
45
38
|
* Open one round's trace: `driven.request` → `playback` → the caller's spans.
|
|
46
39
|
*
|
|
47
40
|
* Shared with the RTC SDK rather than reimplemented there, so both packages
|
|
@@ -110,26 +103,6 @@ function trackEvent(event, level = "info", contents = {}) {
|
|
|
110
103
|
trackEventOtel(event, level, contents);
|
|
111
104
|
}
|
|
112
105
|
/**
|
|
113
|
-
* The client environment fields this SDK stamps on every OTel log record —
|
|
114
|
-
* `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
|
|
115
|
-
* screen/viewport size and `timezone`.
|
|
116
|
-
*
|
|
117
|
-
* Shared with the RTC SDK rather than re-derived there. These are record-level
|
|
118
|
-
* fields, not Resource attributes: they are read from `window.location` at emit
|
|
119
|
-
* time because `url`/`pathname` change as a single-page app routes. Sharing the
|
|
120
|
-
* OTel providers therefore does not carry them across — the RTC SDK emits
|
|
121
|
-
* through its own logger and would report no `host` at all, which is what
|
|
122
|
-
* prompted this export. Re-implementing the collection on that side would let
|
|
123
|
-
* the two drift apart in field names and in how each value is read, and the
|
|
124
|
-
* backend aggregates on exactly these names.
|
|
125
|
-
*
|
|
126
|
-
* Call at emit time, once per record; spread the result before the caller's own
|
|
127
|
-
* properties so an explicit value at the call site still wins.
|
|
128
|
-
*/
|
|
129
|
-
function clientContextFields() {
|
|
130
|
-
return clientContextFields$1();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
106
|
* Declare which SDK these records come from, as the `sdk.package` and
|
|
134
107
|
* `sdk.version` resource attributes.
|
|
135
108
|
*
|
|
@@ -155,5 +128,19 @@ function clientContextFields() {
|
|
|
155
128
|
function setSdkIdentity(identity) {
|
|
156
129
|
setSdkIdentity$1(identity);
|
|
157
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* The client environment fields this SDK stamps on every OTel log record —
|
|
133
|
+
* `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
|
|
134
|
+
* screen/viewport size and `timezone`.
|
|
135
|
+
*
|
|
136
|
+
* **Kept only for `@spatius/avatarkit-rtc` ≤ 1.1.3**, which imports it from this
|
|
137
|
+
* entry (RTC ≥ 1.1.4 routes through {@link trackEvent}, which stamps these fields
|
|
138
|
+
* itself, and no longer calls this). RTC's peer range is `>=1.3.7`, so a host
|
|
139
|
+
* still on 1.1.3 that upgrades this package would otherwise hit an undefined
|
|
140
|
+
* import. Remove once no 1.1.3 hosts remain in telemetry.
|
|
141
|
+
*/
|
|
142
|
+
function clientContextFields() {
|
|
143
|
+
return clientContextFields$1();
|
|
144
|
+
}
|
|
158
145
|
//#endregion
|
|
159
|
-
export { clientContextFields,
|
|
146
|
+
export { clientContextFields, peekTraceparent, recordMetric, resolveMonoTimestamp, setSdkIdentity, startPlaybackTrace, trackEvent };
|