@vkontakte/calls-sdk 2.8.11-dev.aeebd796.0 → 2.8.11-dev.af7eda54.0
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/CallsSDK.d.ts +6 -10
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +1 -2
- package/calls-sdk.cjs.js +5 -5
- package/calls-sdk.esm.js +171 -178
- package/classes/Conversation.d.ts +2 -1
- package/classes/ExternalIdCache.d.ts +19 -0
- package/default/Api.d.ts +3 -11
- package/default/Signaling.d.ts +1 -2
- package/package.json +1 -1
- package/types/SignalingMessage.d.ts +3 -0
package/calls-sdk.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @vkontakte/calls-sdk v2.8.11-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/calls-sdk v2.8.11-dev.af7eda54.0
|
|
3
|
+
* Thu, 04 Jun 2026 17:09:01 GMT
|
|
4
4
|
* https://calls-sdk.cdn-vk.ru/doc/latest/index.html
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -2173,7 +2173,7 @@ var En = Tn.getInstance(), P = class e {
|
|
|
2173
2173
|
return 1.1;
|
|
2174
2174
|
}
|
|
2175
2175
|
static get sdkVersion() {
|
|
2176
|
-
return "2.8.11-dev.
|
|
2176
|
+
return "2.8.11-dev.af7eda54.0";
|
|
2177
2177
|
}
|
|
2178
2178
|
static get debug() {
|
|
2179
2179
|
return e._params.debug;
|
|
@@ -6922,16 +6922,6 @@ var Ea = /* @__PURE__ */ function(e) {
|
|
|
6922
6922
|
async publishStream(e = { roomId: null }) {
|
|
6923
6923
|
return this._send(b.RECORD_PUBLISH, e);
|
|
6924
6924
|
}
|
|
6925
|
-
async recordSetConf(e = {
|
|
6926
|
-
hideParticipantCount: !1,
|
|
6927
|
-
roomId: null
|
|
6928
|
-
}) {
|
|
6929
|
-
let t = {
|
|
6930
|
-
options: { hideParticipantCount: e.hideParticipantCount },
|
|
6931
|
-
roomId: e.roomId
|
|
6932
|
-
};
|
|
6933
|
-
return e.king && (t.king = e.king), e.pawns?.length && (t.pawns = e.pawns.join(",")), this._send(b.RECORD_SET_CONF, t);
|
|
6934
|
-
}
|
|
6935
6925
|
async getRecordStatus() {
|
|
6936
6926
|
return this._send(b.RECORD_GET_STATUS);
|
|
6937
6927
|
}
|
|
@@ -7900,7 +7890,7 @@ var uo = class {
|
|
|
7900
7890
|
}
|
|
7901
7891
|
}, Do = 1e3, Oo = 1e4, ko = 15, Q = class e extends g {
|
|
7902
7892
|
constructor(e, t) {
|
|
7903
|
-
super(), h(this, "_api", void 0), h(this, "_signaling", void 0), h(this, "_signalingActor", void 0), h(this, "_mediaSource", null), h(this, "_conversation", null), h(this, "_myLastRequestedLayouts", {}), h(this, "_state", "IDLE"), h(this, "_participantState", X.CALLED), h(this, "_participants", {}), h(this, "_pendingParticipants", /* @__PURE__ */ new Map()), h(this, "_transport", null), h(this, "_debugInfo", null), h(this, "_debugSessionId", null), h(this, "_volumesDetector", null), h(this, "_speakerDetector", null), h(this, "_localVolumeDetector", null), h(this, "_specListener", null), h(this, "_activeSpeakerId", null), h(this, "_lastSignalledActiveSpeakerId", null), h(this, "_isRealTimeAsrRequested", !1), h(this, "_serverSettings", Lr()), h(this, "_onUnload", void 0), h(this, "_audioOutput", void 0), h(this, "_lastStalled", {}), h(this, "_audioMixStalled", !1), h(this, "_audioFix", null), h(this, "_streamByStreamId", /* @__PURE__ */ new Map()), h(this, "_streamIdByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_streamWaitTimerByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_sequenceNumberByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownTimestampByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownQueueCleanupTimer", null), h(this, "_statFirstMediaReceived", void 0), h(this, "_changeMediaSettings", N.debounce(async (e) => {
|
|
7893
|
+
super(), h(this, "_api", void 0), h(this, "_signaling", void 0), h(this, "_signalingActor", void 0), h(this, "_mediaSource", null), h(this, "_conversation", null), h(this, "_myLastRequestedLayouts", {}), h(this, "_state", "IDLE"), h(this, "_participantState", X.CALLED), h(this, "_participants", {}), h(this, "_pendingParticipants", /* @__PURE__ */ new Map()), h(this, "_transport", null), h(this, "_debugInfo", null), h(this, "_debugSessionId", null), h(this, "_volumesDetector", null), h(this, "_speakerDetector", null), h(this, "_localVolumeDetector", null), h(this, "_specListener", null), h(this, "_activeSpeakerId", null), h(this, "_lastSignalledActiveSpeakerId", null), h(this, "_isRealTimeAsrRequested", !1), h(this, "_serverSettings", Lr()), h(this, "_serverTimeOffset", 0), h(this, "_onUnload", void 0), h(this, "_audioOutput", void 0), h(this, "_lastStalled", {}), h(this, "_audioMixStalled", !1), h(this, "_audioFix", null), h(this, "_streamByStreamId", /* @__PURE__ */ new Map()), h(this, "_streamIdByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_streamWaitTimerByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_sequenceNumberByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownTimestampByStreamDescription", /* @__PURE__ */ new Map()), h(this, "_cooldownQueueCleanupTimer", null), h(this, "_statFirstMediaReceived", void 0), h(this, "_changeMediaSettings", N.debounce(async (e) => {
|
|
7904
7894
|
if (this._signaling.ready) try {
|
|
7905
7895
|
await this._signaling.changeMediaSettings(e);
|
|
7906
7896
|
} catch (e) {
|
|
@@ -7926,6 +7916,9 @@ var uo = class {
|
|
|
7926
7916
|
static id() {
|
|
7927
7917
|
return e._current?._conversation?.id || null;
|
|
7928
7918
|
}
|
|
7919
|
+
static getSyncedTime() {
|
|
7920
|
+
return Date.now() + (e._current?._serverTimeOffset ?? 0);
|
|
7921
|
+
}
|
|
7929
7922
|
get debugSessionId() {
|
|
7930
7923
|
return this._debugSessionId;
|
|
7931
7924
|
}
|
|
@@ -8411,7 +8404,7 @@ var uo = class {
|
|
|
8411
8404
|
}
|
|
8412
8405
|
async _setConversation(e, t, n, r = M.USER) {
|
|
8413
8406
|
let { participants: i } = t.conversation;
|
|
8414
|
-
i.forEach((e) => {
|
|
8407
|
+
t.conversationParams?.serverTime && (this._serverTimeOffset = t.conversationParams.serverTime - Date.now()), i.forEach((e) => {
|
|
8415
8408
|
let t = N.composeId(e), n = Z.fromSignalingParticipant(e, !1);
|
|
8416
8409
|
if (n) {
|
|
8417
8410
|
this._api.cacheExternalId(t, n);
|
|
@@ -9315,15 +9308,6 @@ var uo = class {
|
|
|
9315
9308
|
async publishStream(e = null) {
|
|
9316
9309
|
if ((await this._signaling.publishStream({ roomId: e })).error) return Promise.reject();
|
|
9317
9310
|
}
|
|
9318
|
-
async recordSetConf(e, t, n = !1, r = null) {
|
|
9319
|
-
let i = await this._signaling.recordSetConf({
|
|
9320
|
-
king: e,
|
|
9321
|
-
pawns: t,
|
|
9322
|
-
hideParticipantCount: n,
|
|
9323
|
-
roomId: r
|
|
9324
|
-
});
|
|
9325
|
-
if (i.error) throw Error(i.error);
|
|
9326
|
-
}
|
|
9327
9311
|
async getStreamInfo() {
|
|
9328
9312
|
let e = await this._signaling.getRecordStatus();
|
|
9329
9313
|
return {
|
|
@@ -9518,7 +9502,7 @@ var uo = class {
|
|
|
9518
9502
|
}
|
|
9519
9503
|
async _onSignalingReconnect(e) {
|
|
9520
9504
|
if (!this._conversation) return;
|
|
9521
|
-
e.conversation.acceptTime && (this._conversation.acceptTime = e.conversation.acceptTime), e.conversation.participantsLimit && (this._conversation.participantsLimit = e.conversation.participantsLimit), e.conversation.features && (this._conversation.features = e.conversation.features, this._conversation.featuresPerRole = e.conversation.featuresPerRole, this._changeFeatureSet(), this._changeFeaturesPerRole()), await this._processPinnedParticipants(e), e.conversation.state;
|
|
9505
|
+
e.conversationParams?.serverTime && (this._serverTimeOffset = e.conversationParams.serverTime - Date.now()), e.conversation.acceptTime && (this._conversation.acceptTime = e.conversation.acceptTime), e.conversation.participantsLimit && (this._conversation.participantsLimit = e.conversation.participantsLimit), e.conversation.features && (this._conversation.features = e.conversation.features, this._conversation.featuresPerRole = e.conversation.featuresPerRole, this._changeFeatureSet(), this._changeFeaturesPerRole()), await this._processPinnedParticipants(e), e.conversation.state;
|
|
9522
9506
|
let t = null;
|
|
9523
9507
|
if (e.conversation.participants) {
|
|
9524
9508
|
let n = Object.keys(await this._getParticipants()), r = [];
|
|
@@ -10408,6 +10392,9 @@ var Ho = class {
|
|
|
10408
10392
|
getCachedOkIdByExternalId(e) {
|
|
10409
10393
|
return null;
|
|
10410
10394
|
}
|
|
10395
|
+
getCachedRawOkIdByExternalId(e) {
|
|
10396
|
+
return null;
|
|
10397
|
+
}
|
|
10411
10398
|
cacheExternalId(e, t) {}
|
|
10412
10399
|
mapDecorativeId(e, t) {}
|
|
10413
10400
|
unmapDecorativeId(e) {}
|
|
@@ -10421,9 +10408,54 @@ var Ho = class {
|
|
|
10421
10408
|
return Date.now();
|
|
10422
10409
|
}
|
|
10423
10410
|
cleanup() {}
|
|
10424
|
-
}, Uo =
|
|
10411
|
+
}, Uo = class {
|
|
10412
|
+
constructor() {
|
|
10413
|
+
h(this, "_okIdToExternalId", /* @__PURE__ */ new Map()), h(this, "_externalIdToOkId", /* @__PURE__ */ new Map()), h(this, "_decorativeIdToInitialId", /* @__PURE__ */ new Map()), h(this, "_initialIdToDecorativeId", /* @__PURE__ */ new Map());
|
|
10414
|
+
}
|
|
10415
|
+
getOkId(e) {
|
|
10416
|
+
let t = Z.toString(e), n = this._externalIdToOkId.get(t);
|
|
10417
|
+
return n == null ? null : this.replaceByInitialIdIdIfExists(n);
|
|
10418
|
+
}
|
|
10419
|
+
getExternalId(e) {
|
|
10420
|
+
let t = this.getDecorativeIdByInitialId(e) ?? e, n = this._okIdToExternalId.get(t);
|
|
10421
|
+
return n == null ? null : Z.fromString(n);
|
|
10422
|
+
}
|
|
10423
|
+
hasByExternalId(e) {
|
|
10424
|
+
return this._externalIdToOkId.has(Z.toString(e));
|
|
10425
|
+
}
|
|
10426
|
+
hasByOkId(e) {
|
|
10427
|
+
return this._okIdToExternalId.has(e);
|
|
10428
|
+
}
|
|
10429
|
+
cache(e, t) {
|
|
10430
|
+
let n = N.extractOkId(e), r = Z.toString(t);
|
|
10431
|
+
this._okIdToExternalId.set(n, r), this._externalIdToOkId.set(r, n);
|
|
10432
|
+
}
|
|
10433
|
+
mapDecorativeId(e, t) {
|
|
10434
|
+
let n = N.extractOkId(e), r = N.extractOkId(t);
|
|
10435
|
+
this._decorativeIdToInitialId.set(n, r), this._initialIdToDecorativeId.set(r, n);
|
|
10436
|
+
}
|
|
10437
|
+
unmapDecorativeId(e) {
|
|
10438
|
+
let t = N.extractOkId(e), n = this.getDecorativeIdByInitialId(t);
|
|
10439
|
+
n && this._decorativeIdToInitialId.delete(n), this._initialIdToDecorativeId.delete(t);
|
|
10440
|
+
}
|
|
10441
|
+
getDecorativeIdByInitialId(e) {
|
|
10442
|
+
let t = N.extractOkId(e);
|
|
10443
|
+
return this._initialIdToDecorativeId.get(t);
|
|
10444
|
+
}
|
|
10445
|
+
replaceByInitialIdIdIfExists(e) {
|
|
10446
|
+
let t = N.extractOkId(e);
|
|
10447
|
+
return this._decorativeIdToInitialId.get(t) ?? t;
|
|
10448
|
+
}
|
|
10449
|
+
getParticipantIdByExternalId(e) {
|
|
10450
|
+
let t = this.getOkId(e);
|
|
10451
|
+
return t == null ? null : N.composeParticipantId(t, M.USER, e.deviceIdx ?? 0);
|
|
10452
|
+
}
|
|
10453
|
+
clear() {
|
|
10454
|
+
this._okIdToExternalId.clear(), this._externalIdToOkId.clear(), this._decorativeIdToInitialId.clear(), this._initialIdToDecorativeId.clear();
|
|
10455
|
+
}
|
|
10456
|
+
}, Wo = 700, Go = 3e3, Ko = class extends Ho {
|
|
10425
10457
|
constructor(...e) {
|
|
10426
|
-
super(...e), h(this, "_userId", null), h(this, "_uuid", void 0), h(this, "
|
|
10458
|
+
super(...e), h(this, "_userId", null), h(this, "_uuid", void 0), h(this, "_idCache", new Uo());
|
|
10427
10459
|
}
|
|
10428
10460
|
async _callUnsafe(e, t = {}, n = !1) {
|
|
10429
10461
|
let r = async (i) => {
|
|
@@ -10433,7 +10465,7 @@ var Ho = class {
|
|
|
10433
10465
|
if (!Object.hasOwn(t, "error_msg")) {
|
|
10434
10466
|
i++;
|
|
10435
10467
|
let n = Object.getOwnPropertyNames(t).map((e) => `${e}: ${JSON.stringify(t[e])}`);
|
|
10436
|
-
if (B.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (B.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < P.apiMaxAttempt) return await N.delay(Math.min(i *
|
|
10468
|
+
if (B.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (B.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < P.apiMaxAttempt) return await N.delay(Math.min(i * Wo, Go), { signal: this._abortSignal }), r(i);
|
|
10437
10469
|
}
|
|
10438
10470
|
throw B.warn(e, "error", t), t;
|
|
10439
10471
|
}
|
|
@@ -10456,7 +10488,7 @@ var Ho = class {
|
|
|
10456
10488
|
code: r.error_code
|
|
10457
10489
|
};
|
|
10458
10490
|
if (r instanceof v) throw r;
|
|
10459
|
-
if (r.custom_error && (a.custom_error = r.custom_error),
|
|
10491
|
+
if (r.custom_error && (a.custom_error = r.custom_error), qo(r)) switch (r.error_code) {
|
|
10460
10492
|
case 1101:
|
|
10461
10493
|
i = _.SERVICE_DISABLED;
|
|
10462
10494
|
break;
|
|
@@ -10491,10 +10523,7 @@ var Ho = class {
|
|
|
10491
10523
|
}
|
|
10492
10524
|
async userId(e) {
|
|
10493
10525
|
let t = N.extractOkId(e);
|
|
10494
|
-
|
|
10495
|
-
this._externalUidsCache.has(t) || await this._getExternalIdsByOkIds([t]);
|
|
10496
|
-
let n = this.getDecorativeIdByInitialId(t);
|
|
10497
|
-
return n && (t = n), Z.fromString(this._externalUidsCache.get(t));
|
|
10526
|
+
return C.isEmpty() ? Z.fromId(String(t)) : (this._idCache.hasByOkId(t) || await this._getExternalIdsByOkIds([t]), this._idCache.getExternalId(t) || Z.fromId(String(t)));
|
|
10498
10527
|
}
|
|
10499
10528
|
async authorize() {
|
|
10500
10529
|
if (this._ensureUuid(), !P.apiKey) throw new v(w.API, { message: "Required argument apiAppKey not passed" });
|
|
@@ -10565,7 +10594,7 @@ var Ho = class {
|
|
|
10565
10594
|
closedConversation: s,
|
|
10566
10595
|
audienceMode: i,
|
|
10567
10596
|
audioOnly: a,
|
|
10568
|
-
|
|
10597
|
+
externalIds: c
|
|
10569
10598
|
});
|
|
10570
10599
|
return this._startConversation(l);
|
|
10571
10600
|
}
|
|
@@ -10602,13 +10631,13 @@ var Ho = class {
|
|
|
10602
10631
|
deviceId() {
|
|
10603
10632
|
return this._ensureUuid(), this._uuid;
|
|
10604
10633
|
}
|
|
10605
|
-
_preareStartConversationData({ conversationId: e, isVideo: t, payload: n = "", joiningAllowed: r = !1, requireAuthToJoin: i = !1, onlyAdminCanShareMovie: a, waitForAdmin: o, audienceMode: s = !1, audioOnly: c = !1,
|
|
10606
|
-
let
|
|
10634
|
+
_preareStartConversationData({ conversationId: e, isVideo: t, payload: n = "", joiningAllowed: r = !1, requireAuthToJoin: i = !1, onlyAdminCanShareMovie: a, waitForAdmin: o, audienceMode: s = !1, audioOnly: c = !1, closedConversation: l = !1, externalIds: u }) {
|
|
10635
|
+
let d = {
|
|
10607
10636
|
conversationId: e,
|
|
10608
10637
|
isVideo: t,
|
|
10609
10638
|
protocolVersion: P.protocolVersion
|
|
10610
10639
|
};
|
|
10611
|
-
return r && (
|
|
10640
|
+
return r && (d.createJoinLink = !0), n && (d.payload = n), P.domain && (d.domainId = P.domain), P.externalDomain && (d.externalDomain = P.externalDomain), i && (d.requireAuthToJoin = !0), a !== void 0 && (d.onlyAdminCanShareMovie = a), o !== void 0 && (d.waitForAdmin = o), s && (d.audienceMode = s), c && (d.audioOnly = c), l && (d.closed = l), u && (d.externalIds = u.map(Z.toSignaling).join(",")), d;
|
|
10612
10641
|
}
|
|
10613
10642
|
async _startConversation(e) {
|
|
10614
10643
|
return this._call("vchat.startConversation", e);
|
|
@@ -10634,65 +10663,36 @@ var Ho = class {
|
|
|
10634
10663
|
};
|
|
10635
10664
|
return n?.length && (i.observedIds = n.join(",")), P.anonymToken && (i.anonymToken = P.anonymToken), r && (i.payload = r), this._call("vchat.joinConversationByLink", i);
|
|
10636
10665
|
}
|
|
10637
|
-
async getOkIdsByExternalIds(e) {
|
|
10638
|
-
let t = [], n = [], r = /* @__PURE__ */ new Map(), i = Array.from(this._externalUidsCache.keys()), a = Array.from(this._externalUidsCache.values());
|
|
10639
|
-
for (let o of e) {
|
|
10640
|
-
let e = Z.toString(o), s = a.indexOf(e);
|
|
10641
|
-
s > -1 ? t.push(this.replaceByInitialIdIdIfExists(i[s])) : (r.set(String(o.id), e), n.push({
|
|
10642
|
-
id: o.id,
|
|
10643
|
-
ok_anonym: o.type === eo.ANONYM
|
|
10644
|
-
}));
|
|
10645
|
-
}
|
|
10646
|
-
return n.length && (await this._call("vchat.getOkIdsByExternalIds", { externalIds: n })).ids.forEach((e, n) => {
|
|
10647
|
-
let i = Number(e.ok_user_id), a = String(e.external_user_id.id);
|
|
10648
|
-
r.has(a) && (this.cacheExternalId(i, Z.fromString(r.get(a))), t.push(i));
|
|
10649
|
-
}), t;
|
|
10650
|
-
}
|
|
10651
|
-
async getParticipantIdsByExternalIds(e) {
|
|
10652
|
-
await this.getOkIdsByExternalIds(e);
|
|
10653
|
-
let t = /* @__PURE__ */ new Map(), n = Array.from(this._externalUidsCache.keys()), r = Array.from(this._externalUidsCache.values());
|
|
10654
|
-
for (let i of e) {
|
|
10655
|
-
let e = Z.toString(i), a = r.indexOf(e);
|
|
10656
|
-
if (a > -1) {
|
|
10657
|
-
let e = N.composeParticipantId(this.replaceByInitialIdIdIfExists(n[a]), M.USER, i.deviceIdx);
|
|
10658
|
-
t.set(i, e);
|
|
10659
|
-
}
|
|
10660
|
-
}
|
|
10661
|
-
return t;
|
|
10662
|
-
}
|
|
10663
10666
|
async getExternalIdsByOkIds(e) {
|
|
10664
10667
|
let t = [], n = [];
|
|
10665
|
-
for (let r of e)
|
|
10666
|
-
let e = this.
|
|
10667
|
-
t.push(
|
|
10668
|
-
}
|
|
10668
|
+
for (let r of e) {
|
|
10669
|
+
let e = this._idCache.getExternalId(r);
|
|
10670
|
+
e ? t.push(e) : n.push(r);
|
|
10671
|
+
}
|
|
10669
10672
|
if (!n.length) return t;
|
|
10670
10673
|
let r = await this._getExternalIdsByOkIds(n);
|
|
10671
10674
|
return Array.from(r.values());
|
|
10672
10675
|
}
|
|
10673
10676
|
getCachedOkIdByExternalId(e) {
|
|
10674
|
-
|
|
10675
|
-
|
|
10677
|
+
return this._idCache.getParticipantIdByExternalId(e);
|
|
10678
|
+
}
|
|
10679
|
+
getCachedRawOkIdByExternalId(e) {
|
|
10680
|
+
return this._idCache.getOkId(e);
|
|
10676
10681
|
}
|
|
10677
10682
|
cacheExternalId(e, t) {
|
|
10678
|
-
|
|
10679
|
-
this._externalUidsCache.set(n, Z.toString(t));
|
|
10683
|
+
this._idCache.cache(e, t);
|
|
10680
10684
|
}
|
|
10681
10685
|
mapDecorativeId(e, t) {
|
|
10682
|
-
|
|
10683
|
-
this._decorativeIdToInitialId.set(n, r), this._initialIdToDecorativeId.set(r, n);
|
|
10686
|
+
this._idCache.mapDecorativeId(e, t);
|
|
10684
10687
|
}
|
|
10685
10688
|
unmapDecorativeId(e) {
|
|
10686
|
-
|
|
10687
|
-
n && this._decorativeIdToInitialId.delete(n), this._initialIdToDecorativeId.delete(t);
|
|
10689
|
+
this._idCache.unmapDecorativeId(e);
|
|
10688
10690
|
}
|
|
10689
10691
|
getDecorativeIdByInitialId(e) {
|
|
10690
|
-
|
|
10691
|
-
return this._initialIdToDecorativeId.get(t);
|
|
10692
|
+
return this._idCache.getDecorativeIdByInitialId(e);
|
|
10692
10693
|
}
|
|
10693
10694
|
replaceByInitialIdIdIfExists(e) {
|
|
10694
|
-
|
|
10695
|
-
return this._decorativeIdToInitialId.get(t) ?? t;
|
|
10695
|
+
return this._idCache.replaceByInitialIdIdIfExists(e);
|
|
10696
10696
|
}
|
|
10697
10697
|
async getConversationParams(e) {
|
|
10698
10698
|
let t = {};
|
|
@@ -10715,7 +10715,7 @@ var Ho = class {
|
|
|
10715
10715
|
await this._call("vchat.removeHistoryRecords", { recordIds: e.join(",") });
|
|
10716
10716
|
}
|
|
10717
10717
|
cleanup() {
|
|
10718
|
-
this.
|
|
10718
|
+
this._idCache.clear();
|
|
10719
10719
|
}
|
|
10720
10720
|
async _getExternalIdsByOkIds(e) {
|
|
10721
10721
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -10744,16 +10744,16 @@ var Ho = class {
|
|
|
10744
10744
|
return (await this._call("system.getInfo")).serverTime;
|
|
10745
10745
|
}
|
|
10746
10746
|
};
|
|
10747
|
-
function
|
|
10747
|
+
function qo(e) {
|
|
10748
10748
|
return typeof e == "object" && !!e && "error_code" in e && "error_msg" in e;
|
|
10749
10749
|
}
|
|
10750
10750
|
//#endregion
|
|
10751
10751
|
//#region src/enums/RecordRole.ts
|
|
10752
|
-
var
|
|
10752
|
+
var Jo = /* @__PURE__ */ function(e) {
|
|
10753
10753
|
return e.KING = "KING", e.PAWN = "PAWN", e;
|
|
10754
|
-
}(
|
|
10754
|
+
}(Jo || {}), Yo = /* @__PURE__ */ function(e) {
|
|
10755
10755
|
return e.OFF = "0", e.ON = "1", e;
|
|
10756
|
-
}({}),
|
|
10756
|
+
}({}), Xo = class {
|
|
10757
10757
|
constructor(e) {
|
|
10758
10758
|
h(this, "_queue", void 0), h(this, "_readCursor", void 0), h(this, "_writeCursor", void 0), h(this, "_moveReadCursor", void 0), h(this, "_left", void 0), this._queue = Array(e).fill(null), this._readCursor = this._writeCursor = this._left = 0, this._moveReadCursor = !1;
|
|
10759
10759
|
}
|
|
@@ -10776,7 +10776,7 @@ var qo = /* @__PURE__ */ function(e) {
|
|
|
10776
10776
|
let e = this._queue[this._readCursor];
|
|
10777
10777
|
return e && (this._moveReadCursor = !1, this._queue[this._readCursor] = null, this._readCursor = this.nextCursor(this._readCursor), --this._left), e;
|
|
10778
10778
|
}
|
|
10779
|
-
},
|
|
10779
|
+
}, Zo = class {
|
|
10780
10780
|
constructor(e, t, n, r = null) {
|
|
10781
10781
|
h(this, "_uuid", void 0), h(this, "_apiKey", void 0), h(this, "_callToken", void 0), h(this, "_apiEnv", void 0), h(this, "_baseApiUrl", void 0), h(this, "_sessionKey", void 0), this._uuid = N.uuid(), this._apiKey = t, this._callToken = n, this._apiEnv = e, this._baseApiUrl = r;
|
|
10782
10782
|
}
|
|
@@ -10801,7 +10801,7 @@ var qo = /* @__PURE__ */ function(e) {
|
|
|
10801
10801
|
session_key: this._sessionKey
|
|
10802
10802
|
}, !0, await Fo(this._baseApiUrl, this._apiEnv));
|
|
10803
10803
|
}
|
|
10804
|
-
}, $,
|
|
10804
|
+
}, $, Qo = null, $o = {
|
|
10805
10805
|
getCameras: k.getCameras,
|
|
10806
10806
|
getMicrophones: k.getMicrophones,
|
|
10807
10807
|
getOutput: k.getOutput,
|
|
@@ -10827,33 +10827,33 @@ var qo = /* @__PURE__ */ function(e) {
|
|
|
10827
10827
|
baseChromeVersion: k.baseChromeVersion,
|
|
10828
10828
|
getAudioContext: k.getAudioContext,
|
|
10829
10829
|
isAudioShareSupported: k.isAudioShareSupported
|
|
10830
|
-
},
|
|
10831
|
-
function es(e) {
|
|
10832
|
-
Zo = e;
|
|
10833
|
-
}
|
|
10830
|
+
}, es = { participantMarkerCompare: N.participantMarkerCompare };
|
|
10834
10831
|
function ts(e) {
|
|
10835
|
-
|
|
10832
|
+
Qo = e;
|
|
10836
10833
|
}
|
|
10837
10834
|
function ns(e) {
|
|
10835
|
+
P.videoEffects = e;
|
|
10836
|
+
}
|
|
10837
|
+
function rs(e) {
|
|
10838
10838
|
P.audioEffects = e;
|
|
10839
10839
|
}
|
|
10840
|
-
function
|
|
10840
|
+
function is(e, t = null, n = {}, r = 1) {
|
|
10841
10841
|
P.vmoji = e, P.vmojiOptions = {
|
|
10842
10842
|
protocolVersion: r,
|
|
10843
10843
|
renderingOptions: n
|
|
10844
10844
|
}, t && e.setSDK(t);
|
|
10845
10845
|
}
|
|
10846
|
-
async function
|
|
10847
|
-
if (P.set(t), $ || ($ = new
|
|
10846
|
+
async function as(t) {
|
|
10847
|
+
if (P.set(t), $ || ($ = new Ko()), e.disableLog(!P.debug), B.toggle(P.debug), B.log(`Calls SDK ${P.sdkVersion}`, t), await k.init(), !k.isBrowserSupported()) throw new v(w.UNSUPPORTED);
|
|
10848
10848
|
B.log("UserAgent:", navigator.userAgent), B.log("Screen resolution:", `${window.screen.width}x${window.screen.height}`), B.log("Permissions:", `Camera: ${k.hasCameraPermission()}, Mic: ${k.hasMicrophonePermission()}`), B.log("Simulcast:", `${t.simulcast} => ${P.simulcast}`);
|
|
10849
10849
|
}
|
|
10850
|
-
async function
|
|
10850
|
+
async function os(e, t = [T.AUDIO], n = "", r = !1, i = !1, a, o, s) {
|
|
10851
10851
|
let c = [];
|
|
10852
|
-
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]),
|
|
10852
|
+
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]), ss([], Ha.USER, t, n, r, i, a, c, o, s);
|
|
10853
10853
|
}
|
|
10854
|
-
async function
|
|
10854
|
+
async function ss(e, t = Ha.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
10855
10855
|
if (Q.current()) throw B.error("There is already active call"), new v(_.FAILED);
|
|
10856
|
-
return new Q($,
|
|
10856
|
+
return new Q($, Qo).onStart({
|
|
10857
10857
|
opponentIds: e,
|
|
10858
10858
|
opponentType: t,
|
|
10859
10859
|
mediaOptions: n,
|
|
@@ -10866,37 +10866,37 @@ async function os(e, t = Ha.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
|
10866
10866
|
conversationId: l
|
|
10867
10867
|
});
|
|
10868
10868
|
}
|
|
10869
|
-
async function
|
|
10870
|
-
return
|
|
10869
|
+
async function cs(e, t) {
|
|
10870
|
+
return ls(e, M.USER, void 0, t);
|
|
10871
10871
|
}
|
|
10872
|
-
async function
|
|
10872
|
+
async function ls(e, t = M.USER, n, r, i, a) {
|
|
10873
10873
|
if (e === Q.id()) throw Error("Push has already been processed");
|
|
10874
|
-
return a && $.setUserId(a), new Q($,
|
|
10874
|
+
return a && $.setUserId(a), new Q($, Qo).onPush(e, t, n, r, i);
|
|
10875
10875
|
}
|
|
10876
|
-
async function
|
|
10876
|
+
async function us(e, t) {
|
|
10877
10877
|
return e && (P.authToken = e), t !== void 0 && P.apiBaseUrl !== t && (P.apiBaseUrl = t, No()), $.authorize();
|
|
10878
10878
|
}
|
|
10879
|
-
async function
|
|
10879
|
+
async function ds(e = [T.AUDIO]) {
|
|
10880
10880
|
return Pc().accept(e);
|
|
10881
10881
|
}
|
|
10882
|
-
async function
|
|
10882
|
+
async function fs() {
|
|
10883
10883
|
let e = Q.current();
|
|
10884
10884
|
if (e) return e.decline();
|
|
10885
10885
|
}
|
|
10886
|
-
async function
|
|
10887
|
-
return
|
|
10886
|
+
async function ps(e, t = [T.AUDIO]) {
|
|
10887
|
+
return ms(e, t);
|
|
10888
10888
|
}
|
|
10889
|
-
async function
|
|
10889
|
+
async function ms(e, t, n) {
|
|
10890
10890
|
if (Q.current()) throw B.error("There is already active call"), new v(_.FAILED);
|
|
10891
|
-
return new Q($,
|
|
10891
|
+
return new Q($, Qo).onJoin({
|
|
10892
10892
|
conversationId: e,
|
|
10893
10893
|
mediaOptions: t,
|
|
10894
10894
|
chatId: n
|
|
10895
10895
|
});
|
|
10896
10896
|
}
|
|
10897
|
-
async function
|
|
10897
|
+
async function hs(e, t = [T.AUDIO], n, r, i, a) {
|
|
10898
10898
|
if (Q.current()) throw B.error("There is already active call"), new v(_.FAILED);
|
|
10899
|
-
return n && (P.anonymToken = n), new Q($,
|
|
10899
|
+
return n && (P.anonymToken = n), new Q($, Qo).onJoin({
|
|
10900
10900
|
joinLink: e,
|
|
10901
10901
|
mediaOptions: t,
|
|
10902
10902
|
observedIds: r,
|
|
@@ -10904,26 +10904,26 @@ async function ms(e, t = [T.AUDIO], n, r, i, a) {
|
|
|
10904
10904
|
onFastJoin: a
|
|
10905
10905
|
});
|
|
10906
10906
|
}
|
|
10907
|
-
async function
|
|
10907
|
+
async function gs() {
|
|
10908
10908
|
let e = Q.current();
|
|
10909
10909
|
if (e) return e.hangup();
|
|
10910
10910
|
Q.hangupAfterInit();
|
|
10911
10911
|
}
|
|
10912
|
-
async function
|
|
10912
|
+
async function _s(e, t) {
|
|
10913
10913
|
let n = Array.isArray(e) ? e : [e], r = Q.current();
|
|
10914
10914
|
r && await r.addParticipant(n, t);
|
|
10915
10915
|
}
|
|
10916
|
-
async function
|
|
10916
|
+
async function vs(e, t) {
|
|
10917
10917
|
let n = Q.current();
|
|
10918
10918
|
if (n) {
|
|
10919
10919
|
let r = e.map((e) => N.composeUserId(e));
|
|
10920
10920
|
await n.addParticipantLegacy(r, t);
|
|
10921
10921
|
}
|
|
10922
10922
|
}
|
|
10923
|
-
async function vs(e, t = !1) {
|
|
10924
|
-
return ys((await $.getOkIdsByExternalIds([e]))[0], t);
|
|
10925
|
-
}
|
|
10926
10923
|
async function ys(e, t = !1) {
|
|
10924
|
+
return bs($.getCachedRawOkIdByExternalId(e), t);
|
|
10925
|
+
}
|
|
10926
|
+
async function bs(e, t = !1) {
|
|
10927
10927
|
let n = Q.current();
|
|
10928
10928
|
if (n) try {
|
|
10929
10929
|
await n.removeParticipant(N.composeUserId(e), t);
|
|
@@ -10931,13 +10931,13 @@ async function ys(e, t = !1) {
|
|
|
10931
10931
|
B.warn(`Failed to remove participant ${e}. Perhaps he is no longer on the call. ${t}`);
|
|
10932
10932
|
}
|
|
10933
10933
|
}
|
|
10934
|
-
async function
|
|
10934
|
+
async function xs(e, t) {
|
|
10935
10935
|
let n = Q.current();
|
|
10936
10936
|
if (e === "videoinput" && Ht.contains(t)) return P.videoFacingMode = t, n ? (k.isMobile() && n.stopVideoTrack(), n.changeDevice(e)) : void 0;
|
|
10937
10937
|
if (!await k._saveDeviceId(e, t)) throw Error(`Device not found: ${t}`);
|
|
10938
10938
|
if (n) return n.changeDevice(e);
|
|
10939
10939
|
}
|
|
10940
|
-
async function
|
|
10940
|
+
async function Ss(e) {
|
|
10941
10941
|
let t = typeof e == "object" ? {
|
|
10942
10942
|
...e,
|
|
10943
10943
|
fastScreenSharing: e.captureScreen && e.fastScreenSharing,
|
|
@@ -10949,63 +10949,63 @@ async function xs(e) {
|
|
|
10949
10949
|
}, n = Q.current();
|
|
10950
10950
|
return n ? n.toggleScreenCapturing(t) : Promise.reject();
|
|
10951
10951
|
}
|
|
10952
|
-
function
|
|
10952
|
+
function Cs(e) {
|
|
10953
10953
|
let t = Q.current();
|
|
10954
10954
|
t && t.toggleAnimojiCapturing(e);
|
|
10955
10955
|
}
|
|
10956
|
-
async function
|
|
10956
|
+
async function ws(e, t = !1) {
|
|
10957
10957
|
let n = Q.current();
|
|
10958
10958
|
n && await n.setVideoStream(e, t);
|
|
10959
10959
|
}
|
|
10960
|
-
async function
|
|
10960
|
+
async function Ts(e) {
|
|
10961
10961
|
let t = Q.current();
|
|
10962
10962
|
t && await t.toggleLocalVideo(e);
|
|
10963
10963
|
}
|
|
10964
|
-
async function
|
|
10964
|
+
async function Es(e) {
|
|
10965
10965
|
let t = Q.current();
|
|
10966
10966
|
t && await t.toggleLocalAudio(e);
|
|
10967
10967
|
}
|
|
10968
|
-
async function
|
|
10968
|
+
async function Ds(e) {
|
|
10969
10969
|
let t = Q.current();
|
|
10970
10970
|
if (t) return t.setLocalResolution(e);
|
|
10971
10971
|
}
|
|
10972
|
-
async function
|
|
10972
|
+
async function Os(e) {
|
|
10973
10973
|
let t = Q.current();
|
|
10974
10974
|
t && await t.changePriorities(e);
|
|
10975
10975
|
}
|
|
10976
|
-
async function
|
|
10976
|
+
async function ks(e, t) {
|
|
10977
10977
|
let n = Q.current();
|
|
10978
10978
|
if (n) {
|
|
10979
10979
|
let r;
|
|
10980
10980
|
if (t) {
|
|
10981
|
-
let
|
|
10981
|
+
let e = $.getCachedRawOkIdByExternalId(t);
|
|
10982
10982
|
r = N.composeParticipantId(e, M.USER, t.deviceIdx);
|
|
10983
10983
|
}
|
|
10984
10984
|
await n.changeParticipantState(e, r);
|
|
10985
10985
|
}
|
|
10986
10986
|
}
|
|
10987
|
-
async function
|
|
10987
|
+
async function As(e) {
|
|
10988
10988
|
let t = Q.current();
|
|
10989
10989
|
t && await t.hold(e);
|
|
10990
10990
|
}
|
|
10991
|
-
async function
|
|
10991
|
+
async function js() {
|
|
10992
10992
|
let e = Q.current();
|
|
10993
10993
|
e && await e.putHandsDown();
|
|
10994
10994
|
}
|
|
10995
|
-
async function
|
|
10995
|
+
async function Ms(e) {
|
|
10996
10996
|
let t = Q.current();
|
|
10997
10997
|
t && await t.updateDisplayLayout(e);
|
|
10998
10998
|
}
|
|
10999
|
-
async function
|
|
11000
|
-
return
|
|
10999
|
+
async function Ns(e, t, n = !1) {
|
|
11000
|
+
return Ps($.getCachedRawOkIdByExternalId(e), Z.getDeviceIdx(e), t, n);
|
|
11001
11001
|
}
|
|
11002
|
-
async function
|
|
11002
|
+
async function Ps(e, t, n, r = !1) {
|
|
11003
11003
|
let i = Q.current();
|
|
11004
11004
|
i && await i.grantRoles(N.composeParticipantId(e, M.USER, t), n, r);
|
|
11005
11005
|
}
|
|
11006
|
-
async function
|
|
11006
|
+
async function Fs({ externalId: e = null, muteStates: t, requestedMedia: n = [], roomId: r = null }) {
|
|
11007
11007
|
let i = null;
|
|
11008
|
-
return e && (i =
|
|
11008
|
+
return e && (i = $.getCachedRawOkIdByExternalId(e)), Is({
|
|
11009
11009
|
uid: i,
|
|
11010
11010
|
muteStates: t,
|
|
11011
11011
|
requestedMedia: n,
|
|
@@ -11013,117 +11013,107 @@ async function Ps({ externalId: e = null, muteStates: t, requestedMedia: n = [],
|
|
|
11013
11013
|
roomId: r
|
|
11014
11014
|
});
|
|
11015
11015
|
}
|
|
11016
|
-
async function
|
|
11016
|
+
async function Is({ uid: e = null, muteStates: t, requestedMedia: n = [], deviceIdx: r = 0, roomId: i = null }) {
|
|
11017
11017
|
let a = Q.current();
|
|
11018
11018
|
if (a) {
|
|
11019
11019
|
let o = e ? N.composeParticipantId(e, M.USER, r) : null;
|
|
11020
11020
|
await a.muteParticipant(o, t, n, i);
|
|
11021
11021
|
}
|
|
11022
11022
|
}
|
|
11023
|
-
async function
|
|
11024
|
-
return
|
|
11023
|
+
async function Ls(e, t = !1, n = null) {
|
|
11024
|
+
return Rs($.getCachedRawOkIdByExternalId(e), t, Z.getDeviceIdx(e), n);
|
|
11025
11025
|
}
|
|
11026
|
-
async function
|
|
11026
|
+
async function Rs(e, t = !1, n = 0, r = null) {
|
|
11027
11027
|
let i = Q.current();
|
|
11028
11028
|
i && await i.pinParticipant(N.composeParticipantId(e, M.USER, n), t, r);
|
|
11029
11029
|
}
|
|
11030
|
-
async function
|
|
11030
|
+
async function zs(e) {
|
|
11031
11031
|
let t = Q.current();
|
|
11032
11032
|
t && await t.updateMediaModifiers(e);
|
|
11033
11033
|
}
|
|
11034
|
-
async function
|
|
11034
|
+
async function Bs(e) {
|
|
11035
11035
|
let t = Q.current();
|
|
11036
11036
|
t && await t.enableVideoSuspend(e);
|
|
11037
11037
|
}
|
|
11038
|
-
async function
|
|
11038
|
+
async function Vs(e) {
|
|
11039
11039
|
let t = Q.current();
|
|
11040
11040
|
t && await t.enableVideoSuspendSuggest(e);
|
|
11041
11041
|
}
|
|
11042
|
-
async function
|
|
11042
|
+
async function Hs(e) {
|
|
11043
11043
|
let t = Q.current();
|
|
11044
11044
|
t && await t.changeOptions(e);
|
|
11045
11045
|
}
|
|
11046
|
-
async function
|
|
11046
|
+
async function Us(e, t = null) {
|
|
11047
11047
|
let n = null;
|
|
11048
|
-
return t && (n =
|
|
11048
|
+
return t && (n = $.getCachedRawOkIdByExternalId(t)), Ws(e, n);
|
|
11049
11049
|
}
|
|
11050
|
-
async function
|
|
11050
|
+
async function Ws(e, t = null) {
|
|
11051
11051
|
let n = Q.current();
|
|
11052
11052
|
if (n) {
|
|
11053
11053
|
let r = t ? N.composeUserId(t) : null;
|
|
11054
11054
|
await n.chatMessage(e, r);
|
|
11055
11055
|
}
|
|
11056
11056
|
}
|
|
11057
|
-
async function
|
|
11057
|
+
async function Gs(e = 10) {
|
|
11058
11058
|
let t = Q.current();
|
|
11059
11059
|
if (t) return t.chatHistory(e);
|
|
11060
11060
|
}
|
|
11061
|
-
async function
|
|
11061
|
+
async function Ks(e, t = null) {
|
|
11062
11062
|
let n = null;
|
|
11063
|
-
return t && (n =
|
|
11063
|
+
return t && (n = $.getCachedRawOkIdByExternalId(t)), qs(e, n, Z.getDeviceIdx(t));
|
|
11064
11064
|
}
|
|
11065
|
-
async function
|
|
11065
|
+
async function qs(e, t = null, n = 0) {
|
|
11066
11066
|
let r = Q.current();
|
|
11067
11067
|
if (r) {
|
|
11068
11068
|
let i = t ? N.composeParticipantId(t, M.USER, n) : null;
|
|
11069
11069
|
await r.customData(e, i);
|
|
11070
11070
|
}
|
|
11071
11071
|
}
|
|
11072
|
-
async function
|
|
11072
|
+
async function Js(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, waitForAdmin: r = !1, closedConversation: i = !1 } = {}, a) {
|
|
11073
11073
|
return (await $.createConversation(a ?? N.uuid(), e, t, {
|
|
11074
11074
|
onlyAdminCanShareMovie: n,
|
|
11075
11075
|
waitForAdmin: r,
|
|
11076
11076
|
closedConversation: i
|
|
11077
11077
|
})).join_link;
|
|
11078
11078
|
}
|
|
11079
|
-
async function
|
|
11080
|
-
let a =
|
|
11079
|
+
async function Ys(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, audioOnly: r = !1 } = {}, i) {
|
|
11080
|
+
let a = i.map((e) => Z.fromId(e));
|
|
11081
11081
|
return (await $.createConversation(N.uuid(), e, t, {
|
|
11082
11082
|
onlyAdminCanShareMovie: n,
|
|
11083
11083
|
audienceMode: !0,
|
|
11084
11084
|
audioOnly: r
|
|
11085
|
-
},
|
|
11085
|
+
}, a)).join_link;
|
|
11086
11086
|
}
|
|
11087
|
-
async function
|
|
11087
|
+
async function Xs() {
|
|
11088
11088
|
let e = Q.current();
|
|
11089
11089
|
return e ? e.createJoinLink() : Promise.reject();
|
|
11090
11090
|
}
|
|
11091
|
-
async function
|
|
11091
|
+
async function Zs() {
|
|
11092
11092
|
let e = Q.current();
|
|
11093
11093
|
return e ? e.removeJoinLink() : Promise.reject();
|
|
11094
11094
|
}
|
|
11095
|
-
async function
|
|
11095
|
+
async function Qs(e, t) {
|
|
11096
11096
|
return $.getAnonymTokenByLink(e, t);
|
|
11097
11097
|
}
|
|
11098
|
-
function
|
|
11098
|
+
function $s(e) {
|
|
11099
11099
|
let t = Q.current();
|
|
11100
11100
|
t && t.setVolume(e);
|
|
11101
11101
|
}
|
|
11102
|
-
function
|
|
11102
|
+
function ec(e) {
|
|
11103
11103
|
P.forceRelayPolicy = e;
|
|
11104
11104
|
}
|
|
11105
|
-
async function
|
|
11105
|
+
async function tc(e = !1, t = null, n = null, r = "DIRECT_LINK", i = null, a = null) {
|
|
11106
11106
|
let o = Q.current();
|
|
11107
11107
|
return o ? o.startStream(e, t, n, r, i, a) : Promise.reject();
|
|
11108
11108
|
}
|
|
11109
|
-
async function
|
|
11109
|
+
async function nc(e = null, t) {
|
|
11110
11110
|
let n = Q.current();
|
|
11111
11111
|
return n ? n.stopStream(e, t) : Promise.reject();
|
|
11112
11112
|
}
|
|
11113
|
-
async function
|
|
11113
|
+
async function rc(e = null) {
|
|
11114
11114
|
let t = Q.current();
|
|
11115
11115
|
return t ? t.publishStream(e) : Promise.reject();
|
|
11116
11116
|
}
|
|
11117
|
-
async function rc(e, t, n = !1, r = null) {
|
|
11118
|
-
let i = Q.current();
|
|
11119
|
-
if (!i) return Promise.reject();
|
|
11120
|
-
let a, o, s = [];
|
|
11121
|
-
if (t?.length && s.push(...t), e && s.push(e), s.length) {
|
|
11122
|
-
let t = await $.getParticipantIdsByExternalIds(s);
|
|
11123
|
-
e && (a = t.get(e), t.delete(e)), o = Array.from(t.values());
|
|
11124
|
-
}
|
|
11125
|
-
return i.recordSetConf(a, o, n, r);
|
|
11126
|
-
}
|
|
11127
11117
|
async function ic() {
|
|
11128
11118
|
let e = Q.current();
|
|
11129
11119
|
return e ? e.getStreamInfo() : Promise.reject();
|
|
@@ -11146,7 +11136,7 @@ async function cc(e, t) {
|
|
|
11146
11136
|
let r = [];
|
|
11147
11137
|
for (let t of e) {
|
|
11148
11138
|
let e, n;
|
|
11149
|
-
t.addParticipantIds && (e =
|
|
11139
|
+
t.addParticipantIds && (e = t.addParticipantIds.map((e) => N.composeUserId($.getCachedRawOkIdByExternalId(e)))), t.removeParticipantIds && (n = t.removeParticipantIds.map((e) => N.composeUserId($.getCachedRawOkIdByExternalId(e)))), r.push({
|
|
11150
11140
|
id: t.id,
|
|
11151
11141
|
name: t.name,
|
|
11152
11142
|
participantCount: t.participantCount,
|
|
@@ -11168,8 +11158,8 @@ async function uc(e = null, t = null) {
|
|
|
11168
11158
|
if (!n) return Promise.reject();
|
|
11169
11159
|
let r;
|
|
11170
11160
|
if (t) {
|
|
11171
|
-
let e =
|
|
11172
|
-
r = N.composeParticipantId(e
|
|
11161
|
+
let e = $.getCachedRawOkIdByExternalId(t), n = Z.getDeviceIdx(t);
|
|
11162
|
+
r = N.composeParticipantId(e, M.USER, n);
|
|
11173
11163
|
}
|
|
11174
11164
|
return n.switchRoom(e, r);
|
|
11175
11165
|
}
|
|
@@ -11242,7 +11232,7 @@ async function xc(e, t = null, n = null) {
|
|
|
11242
11232
|
if (!r) return;
|
|
11243
11233
|
let i = n ?? t?.id, a = null;
|
|
11244
11234
|
if (t) {
|
|
11245
|
-
let e =
|
|
11235
|
+
let e = $.getCachedRawOkIdByExternalId(t);
|
|
11246
11236
|
if (!e) throw Error("Could not get user id to set animoji svg");
|
|
11247
11237
|
a = N.composeParticipantId(e, M.USER, Z.getDeviceIdx(t));
|
|
11248
11238
|
}
|
|
@@ -11261,7 +11251,7 @@ async function wc() {
|
|
|
11261
11251
|
async function Tc(e, t = !1) {
|
|
11262
11252
|
let n = Pc(), r;
|
|
11263
11253
|
if (e) {
|
|
11264
|
-
let
|
|
11254
|
+
let t = $.getCachedRawOkIdByExternalId(e);
|
|
11265
11255
|
r = N.composeUserId(t);
|
|
11266
11256
|
}
|
|
11267
11257
|
return n.promoteParticipant(r, t);
|
|
@@ -11320,8 +11310,11 @@ async function Bc() {
|
|
|
11320
11310
|
return e ? e.stopUrlSharing() : Promise.reject();
|
|
11321
11311
|
}
|
|
11322
11312
|
function Vc() {
|
|
11313
|
+
return Q.getSyncedTime();
|
|
11314
|
+
}
|
|
11315
|
+
function Hc() {
|
|
11323
11316
|
return P.sdkVersion;
|
|
11324
11317
|
}
|
|
11325
11318
|
typeof window < "u" && (window.__CALLS_SDK = En);
|
|
11326
11319
|
//#endregion
|
|
11327
|
-
export {
|
|
11320
|
+
export { Ko as Api, Zo as ApiExternal, Xo as ArrayDequeue, C as AuthData, f as BaseLogger, Y as CallDirection, Ha as CallType, Ua as ChatRoomEventType, Wa as ConversationFeature, Ga as ConversationOption, kn as DebugMessageType, eo as ExternalIdType, Ht as FacingMode, w as FatalError, v as HangupReason, _ as HangupType, T as MediaOption, j as MediaTrackKind, V as MediaType, Ja as MuteState, X as ParticipantState, Yo as ParticipantStateDataValue, F as ParticipantStatus, Jo as RecordRole, Ya as RoomsEventType, Va as Signaling, b as SignalingCommandType, Ea as SignalingConnectionType, G as SignalingNotification, J as TransportTopology, Qa as UserRole, M as UserType, _o as VolumeDetector, ds as acceptCall, Dc as acceptPromotion, lc as activateRooms, ac as addMovie, _s as addParticipant, vs as addParticipantInternal, us as authorize, $o as browser, ss as callInternal, os as callTo, Ss as captureScreen, Cs as captureVmoji, yc as changeAudioEffect, Hs as changeConversationOptions, xs as changeDevice, ks as changeParticipantState, Os as changePriorities, vc as changeVideoEffect, Gs as chatHistory, Us as chatMessage, Ws as chatMessageInternal, Xs as createJoinLink, Ks as customData, qs as customDataInternal, pc as debug, hc as debugLogs, mc as debugMessage, fs as declineCall, Nc as enableFeatureForRoles, Bs as enableVideoSuspend, Vs as enableVideoSuspendSuggest, Ac as feedback, ec as forceRelayPolicy, Qs as getAnonymTokenByLink, wc as getAudienceModeHands, Oc as getParticipantListChunk, kc as getParticipants, ic as getStreamInfo, Vc as getSyncedTime, Cc as getWaitingHall, Ns as grantRoles, Ps as grantRolesInternal, gs as hangup, As as hold, as as init, ps as joinCall, hs as joinCallByLink, ms as joinCallInternal, Mc as logClientEvent, Fs as muteParticipant, Is as muteParticipantInternal, Ls as pinParticipant, Rs as pinParticipantInternal, cs as processPush, ls as processPushInternal, Tc as promoteParticipant, rc as publishStream, js as putHandsDown, Fc as removeHistoryRecords, Zs as removeJoinLink, sc as removeMovie, ys as removeParticipant, bs as removeParticipantInternal, dc as removeRooms, Rc as requestAsr, Ec as requestPromotion, rs as setAudioEffects, bc as setAudioStream, Ds as setLocalResolution, ts as setLogger, zs as setMediaModifiers, fc as setStatisticsInterval, ns as setVideoEffects, ws as setVideoStream, is as setVmoji, Sc as setVmojiFill, xc as setVmojiSvg, $s as setVolume, Ic as startAsr, Ys as startAudienceConversation, Js as startConversation, tc as startStream, zc as startUrlSharing, Lc as stopAsr, nc as stopStream, Bc as stopUrlSharing, uc as switchRoom, Es as toggleLocalAudio, Ts as toggleLocalVideo, Ms as updateDisplayLayout, oc as updateMovie, cc as updateRooms, _c as uploadDebugLogs, jc as userFeedbackStats, es as utils, Hc as version };
|