@d-id/client-sdk 2.0.7-staging.404 → 2.0.8-staging.406
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-BIUmlXCc.js → index-DUjMi4Bk.js} +9 -4
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/{livekit-manager-CyKx_r7E.js → livekit-manager-6LqByuLV.js} +84 -76
- package/dist/src/services/streaming-manager/stats/poll.d.ts +1 -1
- package/dist/src/services/streaming-manager/stats/report.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Qe, C as J, S as l, a as We, b as qe, A as
|
|
1
|
+
import { c as Qe, C as J, S as l, a as We, b as qe, A as C, d as Ge, l as pe, e as He, t as Xe, f as A, g as U, h as Ze, D as me, i as Ye, j as b, n as en } from "./index-DUjMi4Bk.js";
|
|
2
2
|
function nn() {
|
|
3
3
|
try {
|
|
4
4
|
return Intl.DateTimeFormat().resolvedOptions().timeZone ?? "";
|
|
@@ -9,20 +9,20 @@ function nn() {
|
|
|
9
9
|
function tn() {
|
|
10
10
|
if (typeof navigator > "u")
|
|
11
11
|
return "";
|
|
12
|
-
const f = navigator.userAgent ?? "",
|
|
12
|
+
const f = navigator.userAgent ?? "", S = (navigator.platform ?? "").toLowerCase();
|
|
13
13
|
let u = "Unknown";
|
|
14
|
-
/android/i.test(f) ? u = "Android" : /iphone|ipad|ipod/i.test(f) ? u = "iOS" :
|
|
14
|
+
/android/i.test(f) ? u = "Android" : /iphone|ipad|ipod/i.test(f) ? u = "iOS" : S.includes("win") ? u = "Windows" : S.includes("mac") ? u = "Mac OS X" : S.includes("linux") && (u = "Linux");
|
|
15
15
|
const i = u === "Android" || u === "iOS" || /Mobi/i.test(f);
|
|
16
16
|
return `${u}, ${i ? "Mobile" : "Desktop"}`;
|
|
17
17
|
}
|
|
18
18
|
function on() {
|
|
19
|
-
const f = {},
|
|
20
|
-
|
|
19
|
+
const f = {}, S = nn();
|
|
20
|
+
S && (f.timezone = S);
|
|
21
21
|
const u = tn();
|
|
22
22
|
return u && (f.device = u), f;
|
|
23
23
|
}
|
|
24
|
-
function rn(f,
|
|
25
|
-
const k = Qe(f, `${
|
|
24
|
+
function rn(f, S, u, i) {
|
|
25
|
+
const k = Qe(f, `${S}/v2/agents/${u}`, i);
|
|
26
26
|
return {
|
|
27
27
|
async createStream(g) {
|
|
28
28
|
return k.post("/sessions", g);
|
|
@@ -35,7 +35,7 @@ const an = {
|
|
|
35
35
|
}, Ce = 2e4, cn = [];
|
|
36
36
|
async function sn() {
|
|
37
37
|
try {
|
|
38
|
-
return await import("./index-
|
|
38
|
+
return await import("./index-DUjMi4Bk.js").then((f) => f.G);
|
|
39
39
|
} catch {
|
|
40
40
|
throw new Error(
|
|
41
41
|
"LiveKit client is required for this streaming manager. Please install it using: npm install livekit-client"
|
|
@@ -49,18 +49,18 @@ const un = {
|
|
|
49
49
|
lost: U.Unknown,
|
|
50
50
|
unknown: U.Unknown
|
|
51
51
|
}, j = (f = "Stream Error") => new He(f);
|
|
52
|
-
function Se(f,
|
|
52
|
+
function Se(f, S, u) {
|
|
53
53
|
var i, k;
|
|
54
|
-
throw
|
|
54
|
+
throw S("Failed to connect to LiveKit room:", f), (i = u.onConnectionStateChange) == null || i.call(u, A.Fail, "internal:init-error"), (k = u.onError) == null || k.call(u, f, { sessionId: "" }), f;
|
|
55
55
|
}
|
|
56
|
-
async function ln(f,
|
|
56
|
+
async function ln(f, S, u) {
|
|
57
57
|
var de;
|
|
58
|
-
const i = We(u.debug || !1, "LiveKitStreamingManager"), { Room: k, RoomEvent: g, ConnectionState: I, Track: ee } = await sn(), { callbacks: n, auth: Te, baseURL:
|
|
58
|
+
const i = We(u.debug || !1, "LiveKitStreamingManager"), { Room: k, RoomEvent: g, ConnectionState: I, Track: ee } = await sn(), { callbacks: n, auth: Te, baseURL: ve, analytics: ne } = u;
|
|
59
59
|
let a = null, E = !1;
|
|
60
60
|
const te = qe.Fluent;
|
|
61
61
|
let L = null;
|
|
62
62
|
const P = { isPublishing: !1, publication: null }, Q = { isPublishing: !1, publication: null };
|
|
63
|
-
let
|
|
63
|
+
let p = null, T = null, O = null, K = !1;
|
|
64
64
|
a = new k({
|
|
65
65
|
adaptiveStream: !1,
|
|
66
66
|
// Must be false to use mediaStreamTrack directly
|
|
@@ -68,26 +68,26 @@ async function ln(f, C, u) {
|
|
|
68
68
|
});
|
|
69
69
|
for (const [e, t] of u.rpcMethods ?? [])
|
|
70
70
|
a.registerRpcMethod(e, t);
|
|
71
|
-
let R = null, M =
|
|
72
|
-
const
|
|
71
|
+
let R = null, M = C.Idle, W = !0;
|
|
72
|
+
const v = /* @__PURE__ */ new Map();
|
|
73
73
|
let x = null, q = null;
|
|
74
|
-
const
|
|
75
|
-
let
|
|
74
|
+
const ye = rn(Te, ve || Ge, f, n.onError);
|
|
75
|
+
let y, _, $, ie = !0;
|
|
76
76
|
try {
|
|
77
|
-
const e = await
|
|
78
|
-
transport:
|
|
79
|
-
chat_persist:
|
|
77
|
+
const e = await ye.createStream({
|
|
78
|
+
transport: S.transport,
|
|
79
|
+
chat_persist: S.chat_persist ?? !0,
|
|
80
80
|
verbose: u.verbose ?? !1
|
|
81
81
|
}), { id: t, session_token: o, session_url: r, interrupt_enabled: c } = e;
|
|
82
|
-
(de = n.onStreamCreated) == null || de.call(n, { session_id: t, stream_id: t, agent_id: f }),
|
|
82
|
+
(de = n.onStreamCreated) == null || de.call(n, { session_id: t, stream_id: t, agent_id: f }), y = t, _ = o, $ = r, ie = c ?? !0, await a.prepareConnection($, _);
|
|
83
83
|
} catch (e) {
|
|
84
84
|
Se(e, i, n);
|
|
85
85
|
}
|
|
86
|
-
if (!$ || !_ || !
|
|
86
|
+
if (!$ || !_ || !y)
|
|
87
87
|
return Promise.reject(new Error("Failed to initialize LiveKit stream"));
|
|
88
88
|
a.on(g.ConnectionStateChanged, Ee).on(g.ConnectionQualityChanged, Re).on(g.ParticipantConnected, be).on(g.ParticipantDisconnected, Le).on(g.TrackSubscribed, Me).on(g.TrackUnsubscribed, ke).on(g.DataReceived, Ve).on(g.MediaDevicesError, Fe).on(g.TranscriptionReceived, we).on(g.EncryptionError, Ue).on(g.TrackSubscriptionFailed, je);
|
|
89
89
|
function we(e, t) {
|
|
90
|
-
t != null && t.isLocal &&
|
|
90
|
+
t != null && t.isLocal && pe.update();
|
|
91
91
|
}
|
|
92
92
|
async function Ae() {
|
|
93
93
|
const e = on();
|
|
@@ -107,8 +107,8 @@ async function ln(f, C, u) {
|
|
|
107
107
|
const e = j("Track subscription timeout");
|
|
108
108
|
ne.track("connectivity-error", {
|
|
109
109
|
error: Xe(e),
|
|
110
|
-
sessionId:
|
|
111
|
-
}), (t = n.onError) == null || t.call(n, e, { sessionId:
|
|
110
|
+
sessionId: y
|
|
111
|
+
}), (t = n.onError) == null || t.call(n, e, { sessionId: y }), Y("internal:track-subscription-timeout");
|
|
112
112
|
}, Ce);
|
|
113
113
|
} catch (e) {
|
|
114
114
|
Se(e, i, n);
|
|
@@ -166,30 +166,30 @@ async function ln(f, C, u) {
|
|
|
166
166
|
i(`No mediaStreamTrack available for ${e.kind}`);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
-
L ? (L.addTrack(r), i(`Added ${e.kind} track to shared MediaStream`)) : (L = new MediaStream([r]), i(`Created shared MediaStream with ${e.kind} track`)), e.kind === "audio" && (
|
|
169
|
+
L ? (L.addTrack(r), i(`Added ${e.kind} track to shared MediaStream`)) : (L = new MediaStream([r]), i(`Created shared MediaStream with ${e.kind} track`)), e.kind === "audio" && (T = Ye(
|
|
170
170
|
() => e.getRTCStatsReport(),
|
|
171
|
-
({ sttLatency:
|
|
172
|
-
var le, fe,
|
|
173
|
-
const V =
|
|
171
|
+
({ sttLatency: h, serviceLatency: m }) => {
|
|
172
|
+
var le, fe, he;
|
|
173
|
+
const V = pe.get(!0);
|
|
174
174
|
let F = 0;
|
|
175
|
-
if (
|
|
176
|
-
const ge = ((fe = (le =
|
|
175
|
+
if (h) {
|
|
176
|
+
const ge = ((fe = (le = p == null ? void 0 : p.getReport()) == null ? void 0 : le.webRTCStats) == null ? void 0 : fe.avgRtt) ?? 0;
|
|
177
177
|
F = ge > 0 ? Math.round(ge * 1e3) : 0;
|
|
178
178
|
}
|
|
179
|
-
const D = V > 0 ? V + (
|
|
180
|
-
(
|
|
179
|
+
const D = V > 0 ? V + (h ?? 0) + F : void 0, w = D !== void 0 && m !== void 0 ? D - m : void 0;
|
|
180
|
+
(he = n.onFirstAudioDetected) == null || he.call(n, { latency: D, networkLatency: w });
|
|
181
181
|
}
|
|
182
|
-
)), e.kind === "video" && ((c = n.onStreamReady) == null || c.call(n), i("CALLBACK: onSrcObjectReady"), (d = n.onSrcObjectReady) == null || d.call(n, L), K || (K = !0, i("CALLBACK: onConnectionStateChange(Connected)"), (s = n.onConnectionStateChange) == null || s.call(n, A.Connected, "livekit:track-subscribed")),
|
|
182
|
+
)), e.kind === "video" && ((c = n.onStreamReady) == null || c.call(n), i("CALLBACK: onSrcObjectReady"), (d = n.onSrcObjectReady) == null || d.call(n, L), K || (K = !0, i("CALLBACK: onConnectionStateChange(Connected)"), (s = n.onConnectionStateChange) == null || s.call(n, A.Connected, "livekit:track-subscribed")), p = Ze(
|
|
183
183
|
() => e.getRTCStatsReport(),
|
|
184
184
|
() => E,
|
|
185
185
|
en,
|
|
186
|
-
(
|
|
187
|
-
i(`Video state change: ${
|
|
186
|
+
(h, m) => {
|
|
187
|
+
i(`Video state change: ${h}`), h === b.Start ? (R && (clearTimeout(R), R = null, i("Track subscription timeout cleared")), Pe()) : h === b.Stop && oe(m);
|
|
188
188
|
}
|
|
189
|
-
),
|
|
189
|
+
), p.start());
|
|
190
190
|
}
|
|
191
191
|
function ke(e, t, o) {
|
|
192
|
-
i(`Track unsubscribed: ${e.kind} from ${o.identity}`), e.kind === "audio" && (
|
|
192
|
+
i(`Track unsubscribed: ${e.kind} from ${o.identity}`), e.kind === "audio" && (T == null || T.destroy(), T = null), e.kind === "video" && (oe((p == null ? void 0 : p.getReport()) ?? void 0), p == null || p.stop(), p = null);
|
|
193
193
|
}
|
|
194
194
|
function re(e, t) {
|
|
195
195
|
var r;
|
|
@@ -200,7 +200,7 @@ async function ln(f, C, u) {
|
|
|
200
200
|
var o, r, c, d;
|
|
201
201
|
if (e === l.ToolCallStarted) {
|
|
202
202
|
const s = t;
|
|
203
|
-
|
|
203
|
+
v.set(s.call_id, {
|
|
204
204
|
call: {
|
|
205
205
|
callId: s.call_id,
|
|
206
206
|
name: s.name,
|
|
@@ -208,7 +208,7 @@ async function ln(f, C, u) {
|
|
|
208
208
|
},
|
|
209
209
|
interruptible: s.interruptible === !0,
|
|
210
210
|
turnId: s.turn_id ?? x
|
|
211
|
-
}), N(), z(), M =
|
|
211
|
+
}), N(), z(), M = C.ToolActive, (o = n.onAgentActivityStateChange) == null || o.call(n, C.ToolActive), (r = n.onToolEvent) == null || r.call(n, l.ToolCallStarted, s);
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
if (e === l.ToolCallDone) {
|
|
@@ -222,63 +222,63 @@ async function ln(f, C, u) {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
function ae(e) {
|
|
225
|
-
|
|
225
|
+
v.delete(e) && (N(), z());
|
|
226
226
|
}
|
|
227
227
|
function Ie(e) {
|
|
228
228
|
let t = !1;
|
|
229
|
-
for (const [o, r] of
|
|
230
|
-
r.call.executionMode === "blocking" && (e !== null && r.turnId !== null && r.turnId !== e || (
|
|
229
|
+
for (const [o, r] of v)
|
|
230
|
+
r.call.executionMode === "blocking" && (e !== null && r.turnId !== null && r.turnId !== e || (v.delete(o), t = !0));
|
|
231
231
|
t && (N(), z());
|
|
232
232
|
}
|
|
233
233
|
function N() {
|
|
234
234
|
var t;
|
|
235
|
-
const e = ![...
|
|
235
|
+
const e = ![...v.values()].some(({ call: o }) => o.executionMode === "blocking");
|
|
236
236
|
e !== W && (W = e, (t = n.onInterruptibleChange) == null || t.call(n, e));
|
|
237
237
|
}
|
|
238
238
|
function z() {
|
|
239
239
|
var e;
|
|
240
240
|
(e = n.onRunningToolCallsChange) == null || e.call(
|
|
241
241
|
n,
|
|
242
|
-
|
|
242
|
+
v.size === 0 ? cn : [...v.values()].map(({ call: t }) => t)
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
245
|
function _e(e, t) {
|
|
246
246
|
var o, r, c;
|
|
247
247
|
if (e === l.StreamVideoCreated) {
|
|
248
|
-
M =
|
|
248
|
+
M = C.Talking, (o = n.onAgentActivityStateChange) == null || o.call(n, C.Talking), T == null || T.arm({
|
|
249
249
|
sttLatency: (r = t == null ? void 0 : t.stt) == null ? void 0 : r.latency,
|
|
250
250
|
serviceLatency: t == null ? void 0 : t.serviceLatency
|
|
251
251
|
});
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
if (
|
|
255
|
-
M !==
|
|
254
|
+
if (v.size > 0) {
|
|
255
|
+
M !== C.ToolActive && (M = C.ToolActive, (c = n.onAgentActivityStateChange) == null || c.call(n, C.ToolActive));
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
function B(e, t) {
|
|
260
|
-
var d, s,
|
|
261
|
-
const o = ((s = (d =
|
|
262
|
-
u.debug && ((
|
|
260
|
+
var d, s, h, m;
|
|
261
|
+
const o = ((s = (d = p == null ? void 0 : p.getReport()) == null ? void 0 : d.webRTCStats) == null ? void 0 : s.avgRtt) ?? 0, r = o > 0 ? Math.round(o / 2 * 1e3) : 0, c = { ...t, downstreamNetworkLatency: r };
|
|
262
|
+
u.debug && ((h = t == null ? void 0 : t.metadata) != null && h.sentiment) && (c.sentiment = {
|
|
263
263
|
id: t.metadata.sentiment.id,
|
|
264
264
|
name: t.metadata.sentiment.sentiment
|
|
265
|
-
}), (
|
|
265
|
+
}), (m = n.onMessage) == null || m.call(n, e, c), _e(e, t);
|
|
266
266
|
}
|
|
267
267
|
function $e(e, t) {
|
|
268
268
|
var o;
|
|
269
269
|
(o = n.onMessage) == null || o.call(n, J.Transcribe, { event: J.Transcribe, ...t }), queueMicrotask(() => {
|
|
270
270
|
var r;
|
|
271
|
-
(r = n.onAgentActivityStateChange) == null || r.call(n,
|
|
271
|
+
(r = n.onAgentActivityStateChange) == null || r.call(n, C.Loading);
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
function De(e, t) {
|
|
275
275
|
var o;
|
|
276
|
-
x = (t == null ? void 0 : t.turn_id) ?? null, M =
|
|
276
|
+
x = (t == null ? void 0 : t.turn_id) ?? null, M = C.Loading, (o = n.onAgentActivityStateChange) == null || o.call(n, C.Loading);
|
|
277
277
|
}
|
|
278
278
|
function Ke(e, t) {
|
|
279
279
|
var r;
|
|
280
280
|
const o = (t == null ? void 0 : t.turn_id) ?? null;
|
|
281
|
-
x !== null && o !== null && o < x || (Ie(o), M =
|
|
281
|
+
x !== null && o !== null && o < x || (Ie(o), M = C.Idle, (r = n.onAgentActivityStateChange) == null || r.call(n, C.Idle));
|
|
282
282
|
}
|
|
283
283
|
function ce(e, t) {
|
|
284
284
|
q = (t == null ? void 0 : t.reason) ?? null;
|
|
@@ -301,22 +301,30 @@ async function ln(f, C, u) {
|
|
|
301
301
|
};
|
|
302
302
|
function Ve(e, t, o, r) {
|
|
303
303
|
const c = new TextDecoder().decode(e);
|
|
304
|
+
let d;
|
|
304
305
|
try {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
} catch (d) {
|
|
310
|
-
i("Failed to parse data channel message:", d);
|
|
306
|
+
d = JSON.parse(c);
|
|
307
|
+
} catch (m) {
|
|
308
|
+
i("Failed to parse data channel message:", m);
|
|
309
|
+
return;
|
|
311
310
|
}
|
|
311
|
+
const s = r || d.subject;
|
|
312
|
+
if (i("Data received:", { subject: s, data: d }), !s) return;
|
|
313
|
+
const h = xe[s];
|
|
314
|
+
if (h)
|
|
315
|
+
try {
|
|
316
|
+
h(s, d);
|
|
317
|
+
} catch (m) {
|
|
318
|
+
console.warn("[LiveKitStreamingManager] Data channel handler failed", { subject: s, error: m });
|
|
319
|
+
}
|
|
312
320
|
}
|
|
313
321
|
function Fe(e) {
|
|
314
322
|
var t;
|
|
315
|
-
i("Media devices error:", e), (t = n.onError) == null || t.call(n, j(), { sessionId:
|
|
323
|
+
i("Media devices error:", e), (t = n.onError) == null || t.call(n, j(), { sessionId: y });
|
|
316
324
|
}
|
|
317
325
|
function Ue(e) {
|
|
318
326
|
var t;
|
|
319
|
-
i("Encryption error:", e), (t = n.onError) == null || t.call(n, j(), { sessionId:
|
|
327
|
+
i("Encryption error:", e), (t = n.onError) == null || t.call(n, j(), { sessionId: y });
|
|
320
328
|
}
|
|
321
329
|
function je(e, t, o) {
|
|
322
330
|
i("Track subscription failed:", { trackSid: e, participant: t, reason: o });
|
|
@@ -341,21 +349,21 @@ async function ln(f, C, u) {
|
|
|
341
349
|
const s = o(t);
|
|
342
350
|
if (s.length === 0)
|
|
343
351
|
throw new Error(`No ${r} track found in the provided MediaStream`);
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
352
|
+
const h = s[0], m = Oe(h, r, c());
|
|
353
|
+
if (m) {
|
|
346
354
|
i(`${r} track is already published, skipping`, {
|
|
347
|
-
trackId:
|
|
348
|
-
publishedTrackId: (F = (V =
|
|
349
|
-
}), e.publication =
|
|
355
|
+
trackId: h.id,
|
|
356
|
+
publishedTrackId: (F = (V = m.track) == null ? void 0 : V.mediaStreamTrack) == null ? void 0 : F.id
|
|
357
|
+
}), e.publication = m;
|
|
350
358
|
return;
|
|
351
359
|
}
|
|
352
360
|
if ((D = e.publication) != null && D.track) {
|
|
353
361
|
const w = e.publication.track.mediaStreamTrack;
|
|
354
|
-
w !==
|
|
362
|
+
w !== h && (w == null ? void 0 : w.id) !== h.id && (i(`Unpublishing existing ${r} track before publishing new one`), await d());
|
|
355
363
|
}
|
|
356
|
-
i(`Publishing ${r} track from provided MediaStream`, { trackId:
|
|
364
|
+
i(`Publishing ${r} track from provided MediaStream`, { trackId: h.id }), e.isPublishing = !0;
|
|
357
365
|
try {
|
|
358
|
-
e.publication = await a.localParticipant.publishTrack(
|
|
366
|
+
e.publication = await a.localParticipant.publishTrack(h, { source: r }), i(`${r} track published successfully`, { trackSid: e.publication.trackSid });
|
|
359
367
|
} catch (w) {
|
|
360
368
|
throw i(`Failed to publish ${r} track:`, w), w;
|
|
361
369
|
} finally {
|
|
@@ -421,19 +429,19 @@ async function ln(f, C, u) {
|
|
|
421
429
|
var o, r;
|
|
422
430
|
if (!E || !a) {
|
|
423
431
|
i("Room is not connected for sending messages"), (o = n.onError) == null || o.call(n, j(), {
|
|
424
|
-
sessionId:
|
|
432
|
+
sessionId: y
|
|
425
433
|
});
|
|
426
434
|
return;
|
|
427
435
|
}
|
|
428
436
|
try {
|
|
429
437
|
await a.localParticipant.sendText(t, { topic: e }), i("Message sent successfully:", t);
|
|
430
438
|
} catch (c) {
|
|
431
|
-
i("Failed to send message:", c), (r = n.onError) == null || r.call(n, j(), { sessionId:
|
|
439
|
+
i("Failed to send message:", c), (r = n.onError) == null || r.call(n, j(), { sessionId: y });
|
|
432
440
|
}
|
|
433
441
|
}
|
|
434
442
|
async function Y(e) {
|
|
435
443
|
var t, o;
|
|
436
|
-
R && (clearTimeout(R), R = null),
|
|
444
|
+
R && (clearTimeout(R), R = null), T == null || T.destroy(), T = null, a && ((t = n.onConnectionStateChange) == null || t.call(n, A.Disconnecting, e), await Promise.all([H(), X()]), await a.disconnect()), Je(), E = !1, K = !1, v.size > 0 && (v.clear(), N(), z()), x = null, (o = n.onAgentActivityStateChange) == null || o.call(n, C.Idle), M = C.Idle;
|
|
437
445
|
}
|
|
438
446
|
return {
|
|
439
447
|
speak(e) {
|
|
@@ -482,8 +490,8 @@ async function ln(f, C, u) {
|
|
|
482
490
|
unregisterRpcMethod(e) {
|
|
483
491
|
a == null || a.unregisterRpcMethod(e);
|
|
484
492
|
},
|
|
485
|
-
sessionId:
|
|
486
|
-
streamId:
|
|
493
|
+
sessionId: y,
|
|
494
|
+
streamId: y,
|
|
487
495
|
streamType: te,
|
|
488
496
|
interruptAvailable: ie,
|
|
489
497
|
isInterruptible: W
|
|
@@ -12,5 +12,5 @@ export declare function createAudioStatsDetector(getStats: () => Promise<RTCStat
|
|
|
12
12
|
export declare function createVideoStatsMonitor(getStats: () => Promise<RTCStatsReport | undefined>, getIsConnected: () => boolean, onConnected: () => void, onVideoStateChange?: (state: StreamingState, statsReport?: VideoRTCStatsReport) => void, onConnectivityStateChange?: (state: ConnectivityState) => void): {
|
|
13
13
|
start: () => void;
|
|
14
14
|
stop: () => void;
|
|
15
|
-
getReport: () => VideoRTCStatsReport;
|
|
15
|
+
getReport: () => VideoRTCStatsReport | null;
|
|
16
16
|
};
|
|
@@ -16,4 +16,4 @@ export interface VideoRTCStatsReport {
|
|
|
16
16
|
resolution: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function formatStats(stats: RTCStatsReport): SlimRTCStatsReport;
|
|
19
|
-
export declare function createVideoStatsReport(stats: SlimRTCStatsReport[], interval: number, previousStats?: SlimRTCStatsReport): VideoRTCStatsReport;
|
|
19
|
+
export declare function createVideoStatsReport(stats: SlimRTCStatsReport[], interval: number, previousStats?: SlimRTCStatsReport): VideoRTCStatsReport | null;
|