@spatius/avatarkit 1.3.4 → 1.3.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 +7 -0
- package/dist/assets/{OpusDecoderWorker.worker-BAd4MYA3.js → OpusDecoderWorker.worker-BTHlnzwA.js} +8890 -3
- package/dist/assets/{OpusEncoderWorker.worker-DdhFHkno.js → OpusEncoderWorker.worker-DB_Lvnzc.js} +8890 -3
- package/dist/core/AvatarController.d.ts +17 -0
- package/dist/core/sdk-ref.d.ts +1 -0
- package/dist/index.js +46299 -679
- package/dist/internal-telemetry.d.ts +20 -1
- package/dist/internal-telemetry.js +29 -5
- package/dist/{logger-B_tTFAYq.js → otel-trace-CdspSqI0.js} +5121 -120
- package/dist/{assets/rolldown-runtime-B-1-B7_t.js → rolldown-runtime-FDOR9p9I.js} +1 -10
- package/package.json +1 -1
- package/dist/AvatarDownloader-CavxMpAz.js +0 -569
- package/dist/AvatarSDK-BMjjoYiZ.js +0 -4400
- package/dist/OpusCodec-Cib3mtQ2.js +0 -41760
- package/dist/OpusDecoderProxy-Dz21UtCz.js +0 -142
- package/dist/OpusEncoderProxy-BiX90p4q.js +0 -170
- package/dist/StreamingAudioPlayer-D5_x6veD.js +0 -561
- package/dist/assets/AvatarDownloader-DkReeoUZ.js +0 -797
- package/dist/assets/AvatarSDK-DX8_-oyi.js +0 -6723
- package/dist/assets/avatar_core_wasm-wdep7Ict.js +0 -2536
- package/dist/assets/logger-__jZD7QG.js +0 -15542
- package/dist/error-utils-B76Nf6d6.js +0 -85
- package/dist/otel-trace-DmmQrXv-.js +0 -2611
- package/dist/pwa-cache-manager-BxeZI1BU.js +0 -151
- package/dist/rolldown-runtime-B-1-B7_t.js +0 -33
|
@@ -48,7 +48,26 @@ export interface SpanGroup {
|
|
|
48
48
|
* what lets the backend's spans join a round without threading state through;
|
|
49
49
|
* reproducing that separately would mean two definitions of one wire contract.
|
|
50
50
|
*/
|
|
51
|
-
export declare function startPlaybackTrace(conversationId: string, startTimeMs?: number, attrs?: Attributes): PlaybackTrace;
|
|
51
|
+
export declare function startPlaybackTrace(conversationId: string, startTimeMs?: number, attrs?: Attributes, serverTraceparent?: string): PlaybackTrace;
|
|
52
|
+
/**
|
|
53
|
+
* Read the W3C traceparent the driving service stamped on an animation
|
|
54
|
+
* message, without decoding its frames. Undefined when the message carries
|
|
55
|
+
* none, or is not parseable.
|
|
56
|
+
*
|
|
57
|
+
* For transports that hand the SDK an opaque animation payload and never see a
|
|
58
|
+
* request id — RTC being the case this exists for. There the round's id is
|
|
59
|
+
* minted locally and never travels upstream, so a trace_id derived from it has
|
|
60
|
+
* nothing to do with the server's, and one round reports as two unrelated
|
|
61
|
+
* traces. The traceparent riding the animation is what joins them; pass the
|
|
62
|
+
* result to `startPlaybackTrace`.
|
|
63
|
+
*
|
|
64
|
+
* Kept separate from decoding rather than folded into it: callers need this
|
|
65
|
+
* once per round while frames are decoded continuously.
|
|
66
|
+
*
|
|
67
|
+
* @param rawMessage the same bytes handed to the renderer — a serialized
|
|
68
|
+
* `driveningress.v2.Message`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function peekTraceparent(rawMessage: Uint8Array): string | undefined;
|
|
52
71
|
/**
|
|
53
72
|
* Record one measurement onto avatarkit's metric pipeline.
|
|
54
73
|
*
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as startPlaybackTrace$1 } from "./otel-trace-DmmQrXv-.js";
|
|
1
|
+
import { A as clockSync, I as recordMetric$1, o as startPlaybackTrace$1, u as Message, z as setSdkIdentity$1 } from "./otel-trace-CdspSqI0.js";
|
|
3
2
|
//#region internal-telemetry.ts
|
|
4
3
|
/**
|
|
5
4
|
* Internal telemetry surface for the companion RTC SDK.
|
|
@@ -50,8 +49,33 @@ function isClockCalibrated() {
|
|
|
50
49
|
* what lets the backend's spans join a round without threading state through;
|
|
51
50
|
* reproducing that separately would mean two definitions of one wire contract.
|
|
52
51
|
*/
|
|
53
|
-
function startPlaybackTrace(conversationId, startTimeMs, attrs = {}) {
|
|
54
|
-
return startPlaybackTrace$1(conversationId, startTimeMs, attrs);
|
|
52
|
+
function startPlaybackTrace(conversationId, startTimeMs, attrs = {}, serverTraceparent) {
|
|
53
|
+
return startPlaybackTrace$1(conversationId, startTimeMs, attrs, serverTraceparent);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Read the W3C traceparent the driving service stamped on an animation
|
|
57
|
+
* message, without decoding its frames. Undefined when the message carries
|
|
58
|
+
* none, or is not parseable.
|
|
59
|
+
*
|
|
60
|
+
* For transports that hand the SDK an opaque animation payload and never see a
|
|
61
|
+
* request id — RTC being the case this exists for. There the round's id is
|
|
62
|
+
* minted locally and never travels upstream, so a trace_id derived from it has
|
|
63
|
+
* nothing to do with the server's, and one round reports as two unrelated
|
|
64
|
+
* traces. The traceparent riding the animation is what joins them; pass the
|
|
65
|
+
* result to `startPlaybackTrace`.
|
|
66
|
+
*
|
|
67
|
+
* Kept separate from decoding rather than folded into it: callers need this
|
|
68
|
+
* once per round while frames are decoded continuously.
|
|
69
|
+
*
|
|
70
|
+
* @param rawMessage the same bytes handed to the renderer — a serialized
|
|
71
|
+
* `driveningress.v2.Message`.
|
|
72
|
+
*/
|
|
73
|
+
function peekTraceparent(rawMessage) {
|
|
74
|
+
try {
|
|
75
|
+
return Message.decode(rawMessage).serverResponseAnimation?.traceContext?.traceparent || void 0;
|
|
76
|
+
} catch {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
55
79
|
}
|
|
56
80
|
/**
|
|
57
81
|
* Record one measurement onto avatarkit's metric pipeline.
|
|
@@ -93,4 +117,4 @@ function setSdkIdentity(identity) {
|
|
|
93
117
|
setSdkIdentity$1(identity);
|
|
94
118
|
}
|
|
95
119
|
//#endregion
|
|
96
|
-
export { isClockCalibrated, recordMetric, resolveMonoTimestamp, setSdkIdentity, startPlaybackTrace };
|
|
120
|
+
export { isClockCalibrated, peekTraceparent, recordMetric, resolveMonoTimestamp, setSdkIdentity, startPlaybackTrace };
|