@d-id/client-sdk 1.2.3 → 1.2.4-staging.353
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/dist/index-CRiHH3dL.js +1803 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +5 -5
- package/dist/{livekit-manager-BRwfE8at.js → livekit-manager-CQ-HE9cP.js} +3 -2
- package/dist/src/services/analytics/mixpanel.d.ts +1 -0
- package/dist/src/services/analytics/mixpanel.test.d.ts +1 -0
- package/dist/src/services/streaming-manager/stats/av-sync.d.ts +3 -0
- package/dist/src/services/streaming-manager/stats/av-sync.test.d.ts +1 -0
- package/dist/src/services/streaming-manager/stats/report.d.ts +2 -1
- package/dist/src/types/entities/agents/manager.d.ts +1 -0
- package/dist/src/types/stream/stream.d.ts +22 -0
- package/dist/src/types/stream/streams-v2.d.ts +1 -0
- package/dist/src/utils/analytics.d.ts +7 -0
- package/package.json +1 -1
- package/dist/index-DDkjAtAc.js +0 -1751
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as De, C as O, S as l, a as Fe, b as Ne, A as m, d as Ue, l as de, e as je, t as xe, f as v, g as U, h as Oe, i as Be, j as A, n as Je } from "./index-
|
|
1
|
+
import { c as De, C as O, S as l, a as Fe, b as Ne, A as m, d as Ue, l as de, e as je, t as xe, f as v, g as U, h as Oe, i as Be, j as A, n as Je } from "./index-CRiHH3dL.js";
|
|
2
2
|
function Qe(C, L, g, i) {
|
|
3
3
|
const M = De(C, `${L}/v2/agents/${g}`, i);
|
|
4
4
|
return {
|
|
@@ -50,7 +50,8 @@ async function Ge(C, L, g) {
|
|
|
50
50
|
try {
|
|
51
51
|
const e = await ge.createStream({
|
|
52
52
|
transport: L.transport,
|
|
53
|
-
chat_persist: L.chat_persist ?? !0
|
|
53
|
+
chat_persist: L.chat_persist ?? !0,
|
|
54
|
+
verbose: g.verbose ?? !1
|
|
54
55
|
}), { id: t, session_token: r, session_url: o, interrupt_enabled: c } = e;
|
|
55
56
|
(re = n.onStreamCreated) == null || re.call(n, { session_id: t, stream_id: t, agent_id: C }), S = t, $ = r, K = o, Y = c ?? !0, await a.prepareConnection(K, $);
|
|
56
57
|
} catch (e) {
|
|
@@ -18,4 +18,5 @@ export interface Analytics {
|
|
|
18
18
|
enrich(props: Record<string, any>): void;
|
|
19
19
|
additionalProperties: Record<string, any>;
|
|
20
20
|
}
|
|
21
|
+
export declare function _resetOfflineBufferForTests(): void;
|
|
21
22
|
export declare function initializeAnalytics(config: AnalyticsOptions): Analytics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AnalyticsRTCStatsReport, SlimRTCStatsReport } from '../../../types';
|
|
1
|
+
import { AnalyticsRTCStatsReport, AvSyncReport, SlimRTCStatsReport } from '../../../types';
|
|
2
2
|
|
|
3
3
|
export interface VideoRTCStatsReport {
|
|
4
4
|
webRTCStats: {
|
|
5
5
|
anomalies: AnalyticsRTCStatsReport[];
|
|
6
|
+
avSync: AvSyncReport | null;
|
|
6
7
|
aggregateReport: AnalyticsRTCStatsReport;
|
|
7
8
|
minRtt: number;
|
|
8
9
|
maxRtt: number;
|
|
@@ -101,6 +101,7 @@ export interface StreamingManagerOptions {
|
|
|
101
101
|
callbacks: ManagerCallbacks;
|
|
102
102
|
baseURL?: string;
|
|
103
103
|
debug?: boolean;
|
|
104
|
+
verbose?: boolean;
|
|
104
105
|
auth: Auth;
|
|
105
106
|
analytics: Analytics;
|
|
106
107
|
/**
|
|
@@ -131,6 +132,27 @@ export interface SlimRTCStatsReport {
|
|
|
131
132
|
framesPerSecond: any;
|
|
132
133
|
freezeCount: number;
|
|
133
134
|
freezeDuration: number;
|
|
135
|
+
av?: AvSyncSample;
|
|
136
|
+
}
|
|
137
|
+
export interface AvSyncSample {
|
|
138
|
+
/** Audio estimatedPlayoutTimestamp (ms, NTP) — playout time of the audio sample currently being rendered. */
|
|
139
|
+
audioPlayout: number;
|
|
140
|
+
/** Video estimatedPlayoutTimestamp (ms, NTP) — playout time of the video frame currently being rendered. */
|
|
141
|
+
videoPlayout: number;
|
|
142
|
+
/** Local timestamp of this sample (ms) — the video inbound-rtp report timestamp; the utterance time axis. */
|
|
143
|
+
localTs: number;
|
|
144
|
+
}
|
|
145
|
+
export interface AvSyncReport {
|
|
146
|
+
/** Measurable samples in this utterance (both audio and video playout present). Report is null if fewer than 2. */
|
|
147
|
+
sampleCount: number;
|
|
148
|
+
/** Measurement window in milliseconds (first to last sample). */
|
|
149
|
+
durationMs: number;
|
|
150
|
+
/** How long the A/V offset was perceptibly off (audio ahead > 45ms or behind > 100ms) — the "was there a lip-sync issue, and for how long" signal. */
|
|
151
|
+
desyncDurationMs: number;
|
|
152
|
+
/** The single worst offset (largest magnitude), signed. Positive = audio ahead of video, negative = video ahead. */
|
|
153
|
+
maxOffsetMs: number;
|
|
154
|
+
/** Settled offset after startup (signed median over the back half). ~0 = recovered; non-zero = persistent lip-sync error. */
|
|
155
|
+
residualOffsetMs: number;
|
|
134
156
|
}
|
|
135
157
|
export interface AnalyticsRTCStatsReport {
|
|
136
158
|
timestamp?: number;
|
|
@@ -35,4 +35,11 @@ export declare function getAgentInfo(agent: Agent): {
|
|
|
35
35
|
export declare const getErrorMessage: (error: unknown) => string;
|
|
36
36
|
export declare const sumFunc: (numbers: number[]) => number;
|
|
37
37
|
export declare const average: (numbers: number[]) => number;
|
|
38
|
+
export declare const min: (numbers: number[]) => number;
|
|
39
|
+
export declare const max: (numbers: number[]) => number;
|
|
40
|
+
export declare const round: (value: number, decimals?: number) => number;
|
|
41
|
+
export declare const percentile: (numbers: number[], p: number) => number;
|
|
42
|
+
export declare const median: (numbers: number[]) => number;
|
|
43
|
+
/** Run fn, returning fallback instead of throwing — so a telemetry failure can never break the caller. */
|
|
44
|
+
export declare const safe: <T>(fn: () => T, fallback: T) => T;
|
|
38
45
|
export declare function getStreamAnalyticsProps(data: any, agent: Agent, additionalProps: Record<string, any>): any;
|