@vkontakte/calls-sdk 2.8.12-beta.12 → 2.8.12-beta.14
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/abstract/BaseApi.d.ts +2 -1
- package/calls-sdk.cjs.js +6 -6
- package/calls-sdk.esm.js +275 -231
- package/classes/conversation/Conversation.d.ts +2 -0
- package/default/Api.d.ts +4 -1
- package/default/ApiExternal.d.ts +2 -1
- package/package.json +2 -2
- package/static/ApiTransport.d.ts +3 -0
- package/types/Api.d.ts +9 -0
- package/types/SignalingMessage.d.ts +1 -0
package/calls-sdk.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @vkontakte/calls-sdk v2.8.12-beta.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/calls-sdk v2.8.12-beta.14
|
|
3
|
+
* Fri, 28 Aug 2026 11:40:32 GMT
|
|
4
4
|
* https://calls-sdk.cdn-vk.ru/doc/latest/index.html
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -1268,7 +1268,8 @@ var D = /* @__PURE__ */ function(e) {
|
|
|
1268
1268
|
return this._sendVideoTrack && !e ? this._sendVideoTrack : this._stream ? this._stream.getVideoTracks()[0] : null;
|
|
1269
1269
|
}
|
|
1270
1270
|
getSendAudioTrack() {
|
|
1271
|
-
|
|
1271
|
+
let e = this._stream?.getAudioTracks().filter((e) => !e.contentHint) ?? [];
|
|
1272
|
+
return e.find((e) => e.enabled) ?? e[0] ?? null;
|
|
1272
1273
|
}
|
|
1273
1274
|
get isAnimojiRequested() {
|
|
1274
1275
|
return this._animojiEnabled && !this._mediaSettings.isVideoEnabled;
|
|
@@ -1453,11 +1454,11 @@ var D = /* @__PURE__ */ function(e) {
|
|
|
1453
1454
|
};
|
|
1454
1455
|
if (e) try {
|
|
1455
1456
|
let e = await T.getUserAudio(void 0, this._debug, this._logger);
|
|
1456
|
-
this._micAudioTrack = e.getAudioTracks()[0], t(await this._applyAudioEffect(), !0);
|
|
1457
|
+
this._micAudioTrack = e.getAudioTracks()[0], await t(await this._applyAudioEffect(), !0);
|
|
1457
1458
|
} catch (e) {
|
|
1458
|
-
throw M.audioEffects?.pause(), t(T.getSilentMediaTrack(), !1), typeof e == "string" ? Error(e) : e;
|
|
1459
|
+
throw M.audioEffects?.pause(), await t(T.getSilentMediaTrack(), !1), typeof e == "string" ? Error(e) : e;
|
|
1459
1460
|
}
|
|
1460
|
-
else M.audioEffects?.pause(), t(T.getSilentMediaTrack(), !1);
|
|
1461
|
+
else M.audioEffects?.pause(), await t(T.getSilentMediaTrack(), !1);
|
|
1461
1462
|
}
|
|
1462
1463
|
toggleAnimojiCapturing(e) {
|
|
1463
1464
|
this._animojiEnabled = e, this._mediaSettings.isVideoEnabled || this._triggerEvent("ANIMOJI_STATUS", e);
|
|
@@ -2167,7 +2168,7 @@ var hn = mn.getInstance(), M = class e {
|
|
|
2167
2168
|
return 1.1;
|
|
2168
2169
|
}
|
|
2169
2170
|
static get sdkVersion() {
|
|
2170
|
-
return "2.8.12-beta.
|
|
2171
|
+
return "2.8.12-beta.14";
|
|
2171
2172
|
}
|
|
2172
2173
|
static get debug() {
|
|
2173
2174
|
return e._params.debug;
|
|
@@ -7509,7 +7510,15 @@ var Ma = new Set([
|
|
|
7509
7510
|
}
|
|
7510
7511
|
}
|
|
7511
7512
|
_handleCommandResponse(t, n) {
|
|
7512
|
-
if (!Object.hasOwn(this.responseHandlers, n.sequence))
|
|
7513
|
+
if (!Object.hasOwn(this.responseHandlers, n.sequence)) {
|
|
7514
|
+
if (n.participants) for (let e of n.participants) this._triggerEvent(G.NOTIFICATION, {
|
|
7515
|
+
...n,
|
|
7516
|
+
notification: K.PARTICIPANT_ADDED,
|
|
7517
|
+
type: "notification",
|
|
7518
|
+
participant: e
|
|
7519
|
+
});
|
|
7520
|
+
return;
|
|
7521
|
+
}
|
|
7513
7522
|
let r = this.responseHandlers[n.sequence];
|
|
7514
7523
|
window.clearTimeout(r.responseTimer);
|
|
7515
7524
|
let i = W.measureMark(r.statMarkName);
|
|
@@ -7942,7 +7951,7 @@ var so = class {
|
|
|
7942
7951
|
this._fixNoPacketsChecked = !0, this._logger?.log(C.ERROR, `audio_device_recover_${e.bandwidth ? "success" : "fail"}`);
|
|
7943
7952
|
return;
|
|
7944
7953
|
}
|
|
7945
|
-
!this._fixNoPacketsApplied && !e.bandwidth && (this._fixNoPacketsApplied = !0, this._logger?.log(C.ERROR, "audio_device_recover"), this._debug.log("[AudioFix] Trying to fix RV (no packets)"), this._toggleAudioPromise = this._mediaSource.toggleAudio(T.getMicrophonePermissionState() !== "denied"), this._toggleAudioPromise.catch(() => void 0));
|
|
7954
|
+
!this._fixNoPacketsApplied && !e.bandwidth && e.packetsSent > 0 && (this._fixNoPacketsApplied = !0, this._logger?.log(C.ERROR, "audio_device_recover"), this._debug.log("[AudioFix] Trying to fix RV (no packets)"), this._toggleAudioPromise = this._mediaSource.toggleAudio(T.getMicrophonePermissionState() !== "denied"), this._toggleAudioPromise.catch(() => void 0));
|
|
7946
7955
|
}
|
|
7947
7956
|
}
|
|
7948
7957
|
_fixAudioDeviceTooManyPackets(e) {
|
|
@@ -9201,7 +9210,7 @@ var ns = 15, $ = class e extends b {
|
|
|
9201
9210
|
isMe: (e) => this._isMe(e),
|
|
9202
9211
|
updateDisplayLayout: (e) => this.updateDisplayLayout(e)
|
|
9203
9212
|
}), this._onUnload = () => {
|
|
9204
|
-
this._stopFirstMediaSentProbe(), this._conversation && this._api && this.
|
|
9213
|
+
this._stopFirstMediaSentProbe(), this._conversation && this._api && this._sendHangupApi(this._conversation.id, this._state === "IDLE" ? D.CANCELED : D.HUNGUP), this._stats.destroy();
|
|
9205
9214
|
}, window.addEventListener("pagehide", this._onUnload), this._statFirstMediaReceived = new Qo(this._stats.statAggregator), this._audioOutput = new co(this._statFirstMediaReceived, M.transparentAudio, this._debug, this._stats.logger), M.videoTracksCount > 0 && (this._cooldownQueueCleanupTimer = window.setInterval(this._cleanupCooldownQueue.bind(this), $o));
|
|
9206
9215
|
}
|
|
9207
9216
|
static current() {
|
|
@@ -9481,7 +9490,7 @@ var ns = 15, $ = class e extends b {
|
|
|
9481
9490
|
let t = e ?? (this._state === "ACTIVE" || this._state === "HELD" ? D.HUNGUP : D.CANCELED), n = new O(t), r = this._conversation?.id ?? null;
|
|
9482
9491
|
return this._stats.logger.log(C.HANGUP, t), this._finishLifecycle(n), this._hangupPromise = this._signaling.hangup(t).then(() => void 0).catch((e) => {
|
|
9483
9492
|
if (!(e instanceof bn)) throw e;
|
|
9484
|
-
}).finally(() => this._close(n)), this._emitHangupOnce(n, r), this._cleanupTransport(), this._cleanupMediaSource(), this._hangupPromise;
|
|
9493
|
+
}).finally(() => (r != null && this._sendHangupApi(r, t), this._close(n))), this._emitHangupOnce(n, r), this._cleanupTransport(), this._cleanupMediaSource(), this._hangupPromise;
|
|
9485
9494
|
}
|
|
9486
9495
|
async addParticipant(e, t) {
|
|
9487
9496
|
if (!this._signaling.ready) {
|
|
@@ -9530,12 +9539,20 @@ var ns = 15, $ = class e extends b {
|
|
|
9530
9539
|
_allocateParticipantTransport(e, t) {
|
|
9531
9540
|
this._transport && (this._transport.getTopology() === J.DIRECT && (t = this._directTransportIsMaster ?? (this._directTransportIsMaster = t)), this._transport.allocate(e, t));
|
|
9532
9541
|
}
|
|
9542
|
+
_closeParticipantTransport(e) {
|
|
9543
|
+
let t = this._transport?.getTopology() === J.DIRECT && this._transport.opened().includes(e);
|
|
9544
|
+
this._transport?.close(e), t && (this._directTransportIsMaster = void 0);
|
|
9545
|
+
}
|
|
9533
9546
|
_cleanupRegistry() {
|
|
9534
9547
|
z.remove(this._reservedId), z.remove(this.id), this._reservedId = null;
|
|
9535
9548
|
}
|
|
9536
9549
|
_emitHangupOnce(e, t) {
|
|
9537
9550
|
this._hangupEmitted || (this._hangupEmitted = !0, L.onHangup(e, t));
|
|
9538
9551
|
}
|
|
9552
|
+
_sendHangupApi(e, t) {
|
|
9553
|
+
let n = this._signaling.getPeerId(), r = {};
|
|
9554
|
+
n != null && (r.peerId = String(n)), this._api.hangupConversation(e, t, r);
|
|
9555
|
+
}
|
|
9539
9556
|
_close(e, t = {}) {
|
|
9540
9557
|
this._clearCalleeUnavailableWatchdog(), t.errorText && this._debug.error(t.errorText, e), this._debug.debug("Close conversation", e), this._finishLifecycle(e), this._stats.flushCallMetrics();
|
|
9541
9558
|
let n = t.signalingReason ?? (e.error ? D.FAILED : void 0), r = n && this._signaling.ready ? this._signaling.hangup(n) : void 0;
|
|
@@ -9577,7 +9594,7 @@ var ns = 15, $ = class e extends b {
|
|
|
9577
9594
|
this._clearCalleeUnavailableWatchdog();
|
|
9578
9595
|
let t = this._conversation && this._conversation.id;
|
|
9579
9596
|
if (this._debug.debug("Destroy conversation", { conversationId: t }), this._stopFirstMediaSentProbe(), this._cooldownQueueCleanupTimer !== null && (window.clearInterval(this._cooldownQueueCleanupTimer), this._cooldownQueueCleanupTimer = null), this._state = "CLOSE", this._participantState = Z.HUNGUP, this._cleanupMediaSource(), this._cleanupParticipants(), this._cleanupParticipantAgnosticStreams(), this._cleanupTransport(), this._cleanupSpeakerDetector(), this._cleanupSpecListener(), this._disposeSignaling(e), this._api.cleanup(), this._api.setAbortSignal(void 0), this._delayedHangup && t) try {
|
|
9580
|
-
this.
|
|
9597
|
+
this._sendHangupApi(t, D.CANCELED);
|
|
9581
9598
|
} catch {}
|
|
9582
9599
|
this._cleanupListeners(), this._stats.destroy(), this._cleanupRegistry(), this._conversation = null, this._myLastRequestedLayouts = {}, this._displayLayoutRequester.clear(), this._delayedHangup = !1, this._abortController = null;
|
|
9583
9600
|
}
|
|
@@ -10199,7 +10216,7 @@ var ns = 15, $ = class e extends b {
|
|
|
10199
10216
|
this._warnParticipantNotInConversation(e);
|
|
10200
10217
|
return;
|
|
10201
10218
|
}
|
|
10202
|
-
|
|
10219
|
+
for (let e of t) this._closeParticipantTransport(e.id);
|
|
10203
10220
|
this._stats.logger.log(C.REMOVE_PARTICIPANT);
|
|
10204
10221
|
}
|
|
10205
10222
|
async changeDevice(e) {
|
|
@@ -10278,13 +10295,13 @@ var ns = 15, $ = class e extends b {
|
|
|
10278
10295
|
return;
|
|
10279
10296
|
}
|
|
10280
10297
|
if (this._isWaitingForPromotion()) {
|
|
10281
|
-
this._waitingHallHoldPending = !1, this.
|
|
10298
|
+
this._waitingHallHoldPending = !1, await this._resumeLocalMedia(t, this._getWaitingForPromotionStatus()), this._allocateTransport(), this._createSpeakerDetector(), this._createSpecListener();
|
|
10282
10299
|
return;
|
|
10283
10300
|
}
|
|
10284
10301
|
let n = pa.get();
|
|
10285
10302
|
await this._signaling.hold(!1, n), this._restoreStateAfterHold();
|
|
10286
10303
|
let r = null;
|
|
10287
|
-
if (this._state === "IDLE" && this._participantState === Z.ACCEPTED && (r = Object.values(this._participants), r.some((e) => e.state === Z.ACCEPTED) && (this._state = "ACTIVE", this._changeFeatureSet())), this.
|
|
10304
|
+
if (this._state === "IDLE" && this._participantState === Z.ACCEPTED && (r = Object.values(this._participants), r.some((e) => e.state === Z.ACCEPTED) && (this._state = "ACTIVE", this._changeFeatureSet())), await this._resumeLocalMedia(t, N.WAITING), this._allocateTransport(), this._createSpeakerDetector(), this._createSpecListener(), this._state === "ACTIVE") {
|
|
10288
10305
|
let e = this._conversation?.direction === Pa.OUTGOING && !this._conversation.concurrent;
|
|
10289
10306
|
this._openTransport(r ?? Object.values(this._participants), e);
|
|
10290
10307
|
}
|
|
@@ -11069,8 +11086,12 @@ var ns = 15, $ = class e extends b {
|
|
|
11069
11086
|
let n = this._api.getDecorativeIdByInitialId(t), i = n ? j.composeUserId(n, e.participantType) : void 0;
|
|
11070
11087
|
r = this._registerParticipantInCache(this._createParticipant({
|
|
11071
11088
|
id: t,
|
|
11089
|
+
externalId: e.externalId ? Q.fromSignaling(e.externalId, e.deviceIdx) : void 0,
|
|
11072
11090
|
mediaSettings: E(e.mediaSettings)
|
|
11073
11091
|
}, i));
|
|
11092
|
+
} else if (e.externalId) {
|
|
11093
|
+
let t = Q.fromSignaling(e.externalId, e.deviceIdx);
|
|
11094
|
+
r.externalId = t, this._api.cacheExternalId(r.id, t);
|
|
11074
11095
|
}
|
|
11075
11096
|
r.state = Z.ACCEPTED, r.mediaSettings = E(e.mediaSettings), this._logWithMediaSettings(C.ACCEPTED_OUTGOING, r.mediaSettings), this._conversation && this._conversation.direction === Pa.OUTGOING && (this._state === "IDLE" || this._state === "PROCESSING") && (this._state = "ACTIVE", this._changeFeatureSet()), this._state === "ACTIVE" && this._transport && this._transport.open([r.id], n), this._changeRemoteMediaSettings(t, r.mediaSettings), await this._changeRemoteParticipantState(t);
|
|
11076
11097
|
let i = Object.keys(r.muteStates);
|
|
@@ -11099,7 +11120,7 @@ var ns = 15, $ = class e extends b {
|
|
|
11099
11120
|
this._warnParticipantNotInConversation(t);
|
|
11100
11121
|
return;
|
|
11101
11122
|
}
|
|
11102
|
-
if (this.
|
|
11123
|
+
if (this._closeParticipantTransport(t), n.state = e.reason === D.REJECTED ? Z.REJECTED : Z.HUNGUP, this._state !== "CLOSE") {
|
|
11103
11124
|
let t = e.reason === D.OBSOLETE_CLIENT ? D.OBSOLETE_CLIENT : D.HUNGUP;
|
|
11104
11125
|
this._removeParticipant(n, t);
|
|
11105
11126
|
}
|
|
@@ -11237,7 +11258,7 @@ var ns = 15, $ = class e extends b {
|
|
|
11237
11258
|
this._conversation && (this._conversation.chatId = e.chatId, this._toggleJoinAvailability(), L.onMultipartyChatCreated(this._conversation));
|
|
11238
11259
|
}
|
|
11239
11260
|
async _onForceMediaSettingsChange(e) {
|
|
11240
|
-
if (!this._mediaSource) return;
|
|
11261
|
+
if (!this._mediaSource || this._state === "HELD") return;
|
|
11241
11262
|
let t = this._mediaSource.mediaSettings, n = E(e.mediaSettings);
|
|
11242
11263
|
t.isAudioEnabled !== n.isAudioEnabled && await this._mediaSource.toggleAudio(n.isAudioEnabled), t.isVideoEnabled !== n.isVideoEnabled && await this._mediaSource.toggleVideo(n.isVideoEnabled), t.isScreenSharingEnabled !== n.isScreenSharingEnabled && await this._mediaSource.toggleScreenCapturing({
|
|
11243
11264
|
captureScreen: n.isScreenSharingEnabled,
|
|
@@ -11273,7 +11294,7 @@ var ns = 15, $ = class e extends b {
|
|
|
11273
11294
|
async _onPeerRegistered(e) {
|
|
11274
11295
|
this._registeredPeerReceived = !0, this._clearCalleeUnavailableWatchdog();
|
|
11275
11296
|
let t = j.composeMessageId(e), n = this._getParticipant(t);
|
|
11276
|
-
n && (n.clientType = e.clientType, n.platform = e.platform
|
|
11297
|
+
n && (n.clientType = e.clientType, n.platform = e.platform, L.onPeerRegistered(this.id, [n.externalId]));
|
|
11277
11298
|
}
|
|
11278
11299
|
async _onMicSwitched(e) {
|
|
11279
11300
|
L.onDeviceSwitched(S.AUDIO, !e.mute, this.id), await this.toggleLocalAudio(!e.mute);
|
|
@@ -11911,15 +11932,15 @@ var ns = 15, $ = class e extends b {
|
|
|
11911
11932
|
constructor(t, n) {
|
|
11912
11933
|
super(t), h(this, "participantErrors", void 0), Object.setPrototypeOf(this, e.prototype), this.participantErrors = n;
|
|
11913
11934
|
}
|
|
11914
|
-
}, as = null, os = null;
|
|
11915
|
-
function
|
|
11935
|
+
}, as = null, os = null, ss = 64 * 1024;
|
|
11936
|
+
function cs() {
|
|
11916
11937
|
as = null, os = null;
|
|
11917
11938
|
}
|
|
11918
|
-
function
|
|
11939
|
+
function ls(e) {
|
|
11919
11940
|
return e?.endsWith("/") ? e.slice(0, -1) : e;
|
|
11920
11941
|
}
|
|
11921
|
-
async function
|
|
11922
|
-
let n =
|
|
11942
|
+
async function us(e = null, t) {
|
|
11943
|
+
let n = ls(e ?? M.apiBaseUrl);
|
|
11923
11944
|
if (n) return n;
|
|
11924
11945
|
if ((t ?? M.apiEnv) !== "AUTO") return M.apiEndpoint(t);
|
|
11925
11946
|
try {
|
|
@@ -11934,62 +11955,68 @@ async function ls(e = null, t) {
|
|
|
11934
11955
|
return R.warn("Failed to resolve API endpoint using DNS, default is used", e), M.apiEndpoint(t);
|
|
11935
11956
|
}
|
|
11936
11957
|
}
|
|
11937
|
-
async function
|
|
11938
|
-
return as || os || (os =
|
|
11958
|
+
async function ds() {
|
|
11959
|
+
return as || os || (os = us(), as = await os, os = null, as);
|
|
11939
11960
|
}
|
|
11940
|
-
async function
|
|
11961
|
+
async function fs(e, t = {}, n = !1) {
|
|
11941
11962
|
if (!window.Blob || !window.navigator.sendBeacon) return;
|
|
11942
|
-
await
|
|
11943
|
-
let r =
|
|
11963
|
+
await ds();
|
|
11964
|
+
let r = vs(e, t, n), i = new window.Blob([r], { type: "application/x-www-form-urlencoded" });
|
|
11944
11965
|
window.navigator.sendBeacon(`${as}/fb.do`, i);
|
|
11945
11966
|
}
|
|
11946
|
-
async function
|
|
11947
|
-
return await
|
|
11967
|
+
async function ps(e, t = {}, n = !1, r) {
|
|
11968
|
+
return await ds(), hs(vs(e, t, n), r);
|
|
11969
|
+
}
|
|
11970
|
+
async function ms(e, t = {}, n = !1) {
|
|
11971
|
+
await ds();
|
|
11972
|
+
let r = vs(e, t, n);
|
|
11973
|
+
return hs(r, void 0, new Blob([r]).size <= ss);
|
|
11948
11974
|
}
|
|
11949
|
-
async function
|
|
11950
|
-
let
|
|
11975
|
+
async function hs(e, t, n = !1) {
|
|
11976
|
+
let r = `${t ?? as}/fb.do`, i = new AbortController(), a = new O(x.NETWORK, { callError: {
|
|
11951
11977
|
scope: "network",
|
|
11952
11978
|
source: "api",
|
|
11953
11979
|
code: "timeout",
|
|
11954
11980
|
description: "request-timeout"
|
|
11955
|
-
} }),
|
|
11981
|
+
} }), o = setTimeout(() => i.abort(a), M.apiTimeout);
|
|
11956
11982
|
try {
|
|
11957
|
-
let t = await fetch(
|
|
11983
|
+
let t = await fetch(r, {
|
|
11958
11984
|
method: "POST",
|
|
11959
11985
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
11960
11986
|
body: e,
|
|
11961
|
-
signal:
|
|
11962
|
-
|
|
11987
|
+
signal: i.signal,
|
|
11988
|
+
...n && { keepalive: !0 }
|
|
11989
|
+
}), a = await t.text(), o;
|
|
11963
11990
|
try {
|
|
11964
|
-
|
|
11991
|
+
o = JSON.parse(a);
|
|
11965
11992
|
} catch {
|
|
11966
|
-
|
|
11993
|
+
o = { result: a };
|
|
11967
11994
|
}
|
|
11968
|
-
if (!t.ok && !
|
|
11995
|
+
if (!t.ok && !gs(o)) throw new O(x.API, { callError: {
|
|
11969
11996
|
scope: "server",
|
|
11970
11997
|
source: "api",
|
|
11971
11998
|
code: `http-${t.status}`,
|
|
11972
11999
|
description: "http-error"
|
|
11973
12000
|
} });
|
|
11974
|
-
if (
|
|
11975
|
-
return
|
|
12001
|
+
if (gs(o)) throw o;
|
|
12002
|
+
return o;
|
|
11976
12003
|
} catch (e) {
|
|
11977
|
-
throw e instanceof O ? e :
|
|
12004
|
+
throw e instanceof O ? e : i.signal.aborted ? a : gs(e) ? e : new O(x.NETWORK, { callError: {
|
|
11978
12005
|
scope: "network",
|
|
11979
12006
|
source: "api",
|
|
11980
12007
|
code: "fetch-failed",
|
|
11981
12008
|
description: "request-failed"
|
|
11982
12009
|
} });
|
|
11983
12010
|
} finally {
|
|
11984
|
-
clearTimeout(
|
|
12011
|
+
clearTimeout(o);
|
|
11985
12012
|
}
|
|
11986
12013
|
}
|
|
11987
|
-
function
|
|
12014
|
+
function gs(e) {
|
|
11988
12015
|
if (typeof e != "object" || !e) return !1;
|
|
11989
12016
|
let t = e;
|
|
11990
12017
|
return typeof t.error_code == "number" && typeof t.error_msg == "string";
|
|
11991
12018
|
}
|
|
11992
|
-
async function
|
|
12019
|
+
async function _s(e, t) {
|
|
11993
12020
|
try {
|
|
11994
12021
|
let n = await fetch(e, {
|
|
11995
12022
|
method: "POST",
|
|
@@ -12002,7 +12029,7 @@ async function hs(e, t) {
|
|
|
12002
12029
|
throw R.warn("Failed to send form data", e), e;
|
|
12003
12030
|
}
|
|
12004
12031
|
}
|
|
12005
|
-
function
|
|
12032
|
+
function vs(e, t = {}, n = !1) {
|
|
12006
12033
|
t.method = e, t.format = "JSON", t.application_key || (t.application_key = M.apiKey), n || (y.sessionKey ? t.session_key = y.sessionKey : y.accessToken && (t.access_token = y.accessToken));
|
|
12007
12034
|
for (let [e, n] of Object.entries(t)) typeof n == "object" && (t[e] = JSON.stringify(n));
|
|
12008
12035
|
let r = "";
|
|
@@ -12011,7 +12038,7 @@ function gs(e, t = {}, n = !1) {
|
|
|
12011
12038
|
}
|
|
12012
12039
|
//#endregion
|
|
12013
12040
|
//#region src/abstract/BaseApi.ts
|
|
12014
|
-
var
|
|
12041
|
+
var ys = class {
|
|
12015
12042
|
constructor() {
|
|
12016
12043
|
h(this, "_abortSignal", void 0);
|
|
12017
12044
|
}
|
|
@@ -12045,7 +12072,7 @@ var _s = class {
|
|
|
12045
12072
|
replaceByInitialIdIdIfExists(e) {
|
|
12046
12073
|
return typeof e == "string" ? parseInt(e, 10) : e;
|
|
12047
12074
|
}
|
|
12048
|
-
hangupConversation(e, t = D.HUNGUP) {}
|
|
12075
|
+
hangupConversation(e, t = D.HUNGUP, n) {}
|
|
12049
12076
|
async removeHistoryRecords(e) {}
|
|
12050
12077
|
async getServerTime() {
|
|
12051
12078
|
return Date.now();
|
|
@@ -12054,7 +12081,7 @@ var _s = class {
|
|
|
12054
12081
|
async getInbounds() {
|
|
12055
12082
|
return [];
|
|
12056
12083
|
}
|
|
12057
|
-
},
|
|
12084
|
+
}, bs = class e {
|
|
12058
12085
|
constructor() {
|
|
12059
12086
|
h(this, "_okIdToExternalId", /* @__PURE__ */ new Map()), h(this, "_externalIdToOkId", /* @__PURE__ */ new Map()), h(this, "_decorativeIdToInitialId", /* @__PURE__ */ new Map()), h(this, "_initialIdToDecorativeId", /* @__PURE__ */ new Map());
|
|
12060
12087
|
}
|
|
@@ -12105,27 +12132,27 @@ var _s = class {
|
|
|
12105
12132
|
clear() {
|
|
12106
12133
|
this._okIdToExternalId.clear(), this._externalIdToOkId.clear(), this._decorativeIdToInitialId.clear(), this._initialIdToDecorativeId.clear();
|
|
12107
12134
|
}
|
|
12108
|
-
},
|
|
12109
|
-
function
|
|
12135
|
+
}, xs = "anonymLogin:", Ss = 700, Cs = 3e3;
|
|
12136
|
+
function ws(e) {
|
|
12110
12137
|
let t = e.error_code;
|
|
12111
12138
|
switch (t) {
|
|
12112
|
-
case 2: return
|
|
12113
|
-
case 4: return e.error_msg.includes("participants.limit.exceeded") ?
|
|
12114
|
-
case 300: return
|
|
12115
|
-
case 1101: return
|
|
12116
|
-
case 1102: return
|
|
12117
|
-
case 1103: return
|
|
12118
|
-
case 1104: return
|
|
12119
|
-
case 1106: return
|
|
12120
|
-
case 1113: return
|
|
12139
|
+
case 2: return Ts(D.SERVICE_UNAVAILABLE, t, "service-unavailable");
|
|
12140
|
+
case 4: return e.error_msg.includes("participants.limit.exceeded") ? Ts(D.PARTICIPANT_LIMIT_REACHED, t, "participants-limit-exceeded") : Ts(x.API, t, "request-error");
|
|
12141
|
+
case 300: return Ts(D.NOT_FOUND, t, "not-found");
|
|
12142
|
+
case 1101: return Ts(D.SERVICE_DISABLED, t, "vchat-service-disabled");
|
|
12143
|
+
case 1102: return Ts(D.CALLEE_IS_OFFLINE, t, "target-user-unavailable");
|
|
12144
|
+
case 1103: return Ts(D.NOT_FRIENDS, t, "friendship-required");
|
|
12145
|
+
case 1104: return Es(t, "youla-api-error");
|
|
12146
|
+
case 1106: return Es(t, "vk-api-error");
|
|
12147
|
+
case 1113: return Ts(D.CALLER_IS_REJECTED, t, "caller-is-rejected");
|
|
12121
12148
|
case 1114: {
|
|
12122
12149
|
let n = e.custom_error?.vchat_detailed_api_error?.code, r = n?.startsWith("obsolete_client");
|
|
12123
|
-
return
|
|
12150
|
+
return Ts(r ? D.OBSOLETE_CLIENT : D.VCHAT_DETAILED_ERROR, t, n ?? "detailed-error", r ? n : void 0);
|
|
12124
12151
|
}
|
|
12125
|
-
default: return
|
|
12152
|
+
default: return Ts(x.API, t, "api-error");
|
|
12126
12153
|
}
|
|
12127
12154
|
}
|
|
12128
|
-
function
|
|
12155
|
+
function Ts(e, t, n, r) {
|
|
12129
12156
|
return {
|
|
12130
12157
|
type: e,
|
|
12131
12158
|
callError: {
|
|
@@ -12137,7 +12164,7 @@ function Cs(e, t, n, r) {
|
|
|
12137
12164
|
message: r
|
|
12138
12165
|
};
|
|
12139
12166
|
}
|
|
12140
|
-
function
|
|
12167
|
+
function Es(e, t) {
|
|
12141
12168
|
return {
|
|
12142
12169
|
type: D.EXTERNAL_API_ERROR,
|
|
12143
12170
|
callError: {
|
|
@@ -12148,19 +12175,19 @@ function ws(e, t) {
|
|
|
12148
12175
|
}
|
|
12149
12176
|
};
|
|
12150
12177
|
}
|
|
12151
|
-
var
|
|
12178
|
+
var Ds = class extends ys {
|
|
12152
12179
|
constructor(...e) {
|
|
12153
|
-
super(...e), h(this, "_uuid", void 0), h(this, "_idCache", new
|
|
12180
|
+
super(...e), h(this, "_uuid", void 0), h(this, "_idCache", new bs());
|
|
12154
12181
|
}
|
|
12155
12182
|
async _callUnsafe(e, t = {}, n = !1) {
|
|
12156
12183
|
let r = async (i) => {
|
|
12157
12184
|
try {
|
|
12158
|
-
return await
|
|
12185
|
+
return await ps(e, t, n);
|
|
12159
12186
|
} catch (t) {
|
|
12160
12187
|
if (!t || typeof t != "object" || !Object.hasOwn(t, "error_msg")) {
|
|
12161
12188
|
i++;
|
|
12162
12189
|
let n = t && (typeof t == "object" || typeof t == "function") ? Object.getOwnPropertyNames(t).map((e) => `${e}: ${JSON.stringify(t[e])}`) : [String(t)];
|
|
12163
|
-
if (R.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (R.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < M.apiMaxAttempt) return await j.delay(Math.min(i *
|
|
12190
|
+
if (R.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (R.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < M.apiMaxAttempt) return await j.delay(Math.min(i * Ss, Cs), { signal: this._abortSignal }), r(i);
|
|
12164
12191
|
}
|
|
12165
12192
|
throw R.warn(e, "error", t), t;
|
|
12166
12193
|
}
|
|
@@ -12177,14 +12204,14 @@ var Ts = class extends _s {
|
|
|
12177
12204
|
case 103:
|
|
12178
12205
|
case 104:
|
|
12179
12206
|
if (!r) break;
|
|
12180
|
-
return
|
|
12207
|
+
return await this._reauthorize(), this._call(e, t, n, !1);
|
|
12181
12208
|
}
|
|
12182
12209
|
let a = {
|
|
12183
12210
|
message: i?.error_msg,
|
|
12184
12211
|
code: i?.error_code
|
|
12185
12212
|
};
|
|
12186
|
-
if (i.custom_error && (a.custom_error = i.custom_error),
|
|
12187
|
-
let e =
|
|
12213
|
+
if (i.custom_error && (a.custom_error = i.custom_error), Os(i)) {
|
|
12214
|
+
let e = ws(i);
|
|
12188
12215
|
throw a.callError = e.callError, a.message = e.message ?? a.message, new O(e.type, a);
|
|
12189
12216
|
}
|
|
12190
12217
|
throw new O(x.API, a);
|
|
@@ -12230,17 +12257,17 @@ var Ts = class extends _s {
|
|
|
12230
12257
|
});
|
|
12231
12258
|
}
|
|
12232
12259
|
_getAnonymLoginCacheKey() {
|
|
12233
|
-
return M.authToken ? `${
|
|
12260
|
+
return M.authToken ? `${xs}${M.authToken}` : null;
|
|
12234
12261
|
}
|
|
12235
12262
|
_getCachedAnonymLogin() {
|
|
12236
12263
|
let e = this._getAnonymLoginCacheKey();
|
|
12237
12264
|
if (!e) return null;
|
|
12238
12265
|
let t = at.get(e);
|
|
12239
|
-
return
|
|
12266
|
+
return ks(t) ? t : (t && at.remove(e), null);
|
|
12240
12267
|
}
|
|
12241
12268
|
_setCachedAnonymLogin(e) {
|
|
12242
12269
|
let t = this._getAnonymLoginCacheKey();
|
|
12243
|
-
!t || !
|
|
12270
|
+
!t || !ks(e) || at.set(t, {
|
|
12244
12271
|
session_key: e.session_key,
|
|
12245
12272
|
session_secret_key: e.session_secret_key,
|
|
12246
12273
|
uid: e.uid
|
|
@@ -12250,9 +12277,23 @@ var Ts = class extends _s {
|
|
|
12250
12277
|
let e = this._getAnonymLoginCacheKey();
|
|
12251
12278
|
e && at.remove(e);
|
|
12252
12279
|
}
|
|
12280
|
+
_reauthorize() {
|
|
12281
|
+
return this._removeCachedAnonymLogin(), y.reauthorize(() => this.authorize());
|
|
12282
|
+
}
|
|
12253
12283
|
_applyAnonymLogin(e) {
|
|
12254
12284
|
e.uid && (y.userId = Number(e.uid)), y.sessionKey = e.session_key, y.sessionSecretKey = e.session_secret_key;
|
|
12255
12285
|
}
|
|
12286
|
+
async _sendClientStats(e, t = !0) {
|
|
12287
|
+
try {
|
|
12288
|
+
(await ms("vchat.clientStats", e))?.items_responses?.forEach((e) => {
|
|
12289
|
+
e.errors && R.error("[vchat.clientStats]", e);
|
|
12290
|
+
});
|
|
12291
|
+
} catch (n) {
|
|
12292
|
+
let r = n?.error_code === 102 || n?.error_code === 103 || n?.error_code === 104;
|
|
12293
|
+
if (!t || !r) throw n;
|
|
12294
|
+
await this._reauthorize(), await this._sendClientStats(e, !1);
|
|
12295
|
+
}
|
|
12296
|
+
}
|
|
12256
12297
|
logClientStats(e) {
|
|
12257
12298
|
let t = {
|
|
12258
12299
|
app_version: String(M.appVersion),
|
|
@@ -12261,7 +12302,9 @@ var Ts = class extends _s {
|
|
|
12261
12302
|
version: 1,
|
|
12262
12303
|
items: e
|
|
12263
12304
|
};
|
|
12264
|
-
M.clientStatsPlatform && (t.platform = M.clientStatsPlatform)
|
|
12305
|
+
M.clientStatsPlatform && (t.platform = M.clientStatsPlatform);
|
|
12306
|
+
let n = { data: JSON.stringify(t) };
|
|
12307
|
+
this._sendClientStats(n).catch((e) => R.error("[vchat.clientStats]", e));
|
|
12265
12308
|
}
|
|
12266
12309
|
async uploadDebugLogs(e, t, n, r) {
|
|
12267
12310
|
let i = {
|
|
@@ -12272,7 +12315,7 @@ var Ts = class extends _s {
|
|
|
12272
12315
|
}, a = await this._callUnsafe("vchat.getLogUploadUrl", i), o = new FormData(), s = new Blob([r], { type: "application/json" });
|
|
12273
12316
|
o.append("file", s, "log.json");
|
|
12274
12317
|
let c = new URL(a.upload_url);
|
|
12275
|
-
return c.searchParams.append("size", s.size.toString()),
|
|
12318
|
+
return c.searchParams.append("size", s.size.toString()), _s(c.toString(), o);
|
|
12276
12319
|
}
|
|
12277
12320
|
async joinConversation(e, t = !1, n) {
|
|
12278
12321
|
let r = {
|
|
@@ -12398,12 +12441,12 @@ var Ts = class extends _s {
|
|
|
12398
12441
|
setUserId(e) {
|
|
12399
12442
|
y.userId = e;
|
|
12400
12443
|
}
|
|
12401
|
-
hangupConversation(e, t = D.HUNGUP) {
|
|
12402
|
-
let
|
|
12444
|
+
hangupConversation(e, t = D.HUNGUP, n) {
|
|
12445
|
+
let r = {
|
|
12403
12446
|
conversationId: e,
|
|
12404
12447
|
reason: t
|
|
12405
12448
|
};
|
|
12406
|
-
M.anonymToken && (
|
|
12449
|
+
M.anonymToken && (r.anonymToken = M.anonymToken), n?.peerId && (r.peerId = n.peerId), fs("vchat.hangupConversation", r);
|
|
12407
12450
|
}
|
|
12408
12451
|
async removeHistoryRecords(e) {
|
|
12409
12452
|
await this._call("vchat.removeHistoryRecords", { recordIds: e.join(",") });
|
|
@@ -12419,19 +12462,19 @@ var Ts = class extends _s {
|
|
|
12419
12462
|
return Array.isArray(e?.inbounds) ? e.inbounds : [];
|
|
12420
12463
|
}
|
|
12421
12464
|
};
|
|
12422
|
-
function
|
|
12465
|
+
function Os(e) {
|
|
12423
12466
|
return typeof e == "object" && !!e && "error_code" in e && "error_msg" in e;
|
|
12424
12467
|
}
|
|
12425
|
-
function
|
|
12468
|
+
function ks(e) {
|
|
12426
12469
|
return typeof e == "object" && !!e && "session_key" in e && "session_secret_key" in e && typeof e.session_key == "string" && e.session_key.length > 0 && typeof e.session_secret_key == "string" && e.session_secret_key.length > 0;
|
|
12427
12470
|
}
|
|
12428
12471
|
//#endregion
|
|
12429
12472
|
//#region src/enums/RecordRole.ts
|
|
12430
|
-
var
|
|
12473
|
+
var As = /* @__PURE__ */ function(e) {
|
|
12431
12474
|
return e.KING = "KING", e.PAWN = "PAWN", e;
|
|
12432
|
-
}(
|
|
12475
|
+
}(As || {}), js = /* @__PURE__ */ function(e) {
|
|
12433
12476
|
return e.OFF = "0", e.ON = "1", e;
|
|
12434
|
-
}({}),
|
|
12477
|
+
}({}), Ms = class {
|
|
12435
12478
|
constructor(e) {
|
|
12436
12479
|
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;
|
|
12437
12480
|
}
|
|
@@ -12454,12 +12497,12 @@ var Os = /* @__PURE__ */ function(e) {
|
|
|
12454
12497
|
let e = this._queue[this._readCursor];
|
|
12455
12498
|
return e && (this._moveReadCursor = !1, this._queue[this._readCursor] = null, this._readCursor = this.nextCursor(this._readCursor), --this._left), e;
|
|
12456
12499
|
}
|
|
12457
|
-
},
|
|
12500
|
+
}, Ns = class {
|
|
12458
12501
|
constructor(e, t, n, r = null) {
|
|
12459
12502
|
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 = j.uuid(), this._apiKey = t, this._callToken = n, this._apiEnv = e, this._baseApiUrl = r;
|
|
12460
12503
|
}
|
|
12461
12504
|
async authorize() {
|
|
12462
|
-
let e = await
|
|
12505
|
+
let e = await ps("auth.anonymLogin", {
|
|
12463
12506
|
session_data: {
|
|
12464
12507
|
device_id: this._uuid,
|
|
12465
12508
|
client_version: M.appVersion,
|
|
@@ -12468,18 +12511,19 @@ var Os = /* @__PURE__ */ function(e) {
|
|
|
12468
12511
|
version: 3
|
|
12469
12512
|
},
|
|
12470
12513
|
application_key: this._apiKey
|
|
12471
|
-
}, !0, await
|
|
12514
|
+
}, !0, await us(this._baseApiUrl, this._apiEnv));
|
|
12472
12515
|
return j.isObject(e) && !("error_msg" in e) ? (this._sessionKey = e.session_key, !0) : !1;
|
|
12473
12516
|
}
|
|
12474
|
-
async hangupConversation(e) {
|
|
12475
|
-
|
|
12517
|
+
async hangupConversation(e, t) {
|
|
12518
|
+
let n = {
|
|
12476
12519
|
conversationId: e,
|
|
12477
12520
|
reason: D.HUNGUP,
|
|
12478
12521
|
application_key: this._apiKey,
|
|
12479
12522
|
session_key: this._sessionKey
|
|
12480
|
-
}
|
|
12523
|
+
};
|
|
12524
|
+
t?.peerId && (n.peerId = t.peerId), await ps("vchat.hangupConversation", n, !0, await us(this._baseApiUrl, this._apiEnv));
|
|
12481
12525
|
}
|
|
12482
|
-
},
|
|
12526
|
+
}, Ps, Fs = null, Is = {
|
|
12483
12527
|
getCameras: T.getCameras,
|
|
12484
12528
|
getMicrophones: T.getMicrophones,
|
|
12485
12529
|
getOutput: T.getOutput,
|
|
@@ -12505,27 +12549,27 @@ var Os = /* @__PURE__ */ function(e) {
|
|
|
12505
12549
|
baseChromeVersion: T.baseChromeVersion,
|
|
12506
12550
|
getAudioContext: T.getAudioContext,
|
|
12507
12551
|
isAudioShareSupported: T.isAudioShareSupported
|
|
12508
|
-
},
|
|
12509
|
-
function
|
|
12510
|
-
|
|
12552
|
+
}, Ls = { participantMarkerCompare: j.participantMarkerCompare };
|
|
12553
|
+
function Rs(e) {
|
|
12554
|
+
Fs = e;
|
|
12511
12555
|
}
|
|
12512
|
-
function
|
|
12556
|
+
function zs(e) {
|
|
12513
12557
|
M.videoEffects = e;
|
|
12514
12558
|
}
|
|
12515
|
-
function
|
|
12559
|
+
function Bs(e) {
|
|
12516
12560
|
M.audioEffects = e;
|
|
12517
12561
|
}
|
|
12518
|
-
function
|
|
12562
|
+
function Vs(e, t = {}) {
|
|
12519
12563
|
M.vad = e, M.vadOptions = t;
|
|
12520
12564
|
}
|
|
12521
|
-
function
|
|
12565
|
+
function Hs(e, t = null, n = {}, r = 1) {
|
|
12522
12566
|
M.vmoji = e, M.vmojiOptions = {
|
|
12523
12567
|
protocolVersion: r,
|
|
12524
12568
|
renderingOptions: n
|
|
12525
12569
|
}, t && e.setSDK(t);
|
|
12526
12570
|
}
|
|
12527
|
-
async function
|
|
12528
|
-
M.set(t),
|
|
12571
|
+
async function Us(t) {
|
|
12572
|
+
M.set(t), Ps || (Ps = new Ds()), e.disableLog(!M.debug), R.toggle(M.debug), R.log(`Calls SDK ${M.sdkVersion}`, t), await T.init();
|
|
12529
12573
|
let n = T.getBrowserSupportFailure();
|
|
12530
12574
|
if (n) throw new O(x.UNSUPPORTED, { callError: {
|
|
12531
12575
|
scope: "internal",
|
|
@@ -12534,13 +12578,13 @@ async function Vs(t) {
|
|
|
12534
12578
|
} });
|
|
12535
12579
|
R.log("UserAgent:", navigator.userAgent), R.log("Screen resolution:", `${window.screen.width}x${window.screen.height}`), R.log("Permissions:", `Camera: ${T.hasCameraPermission()}, Mic: ${T.hasMicrophonePermission()}`), R.log("Simulcast:", `${t.simulcast} => ${M.simulcast}`);
|
|
12536
12580
|
}
|
|
12537
|
-
async function
|
|
12581
|
+
async function Ws(e, t = [S.AUDIO], n = "", r = !1, i = !1, a, o, s) {
|
|
12538
12582
|
let c = [];
|
|
12539
|
-
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]),
|
|
12583
|
+
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]), Gs([], Fa.USER, t, n, r, i, a, c, o, s);
|
|
12540
12584
|
}
|
|
12541
|
-
async function
|
|
12585
|
+
async function Gs(e, t = Fa.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
12542
12586
|
if (!M.hold && z.callsLength > 0) throw R.error("There is already active call"), new O(D.HAS_ACTIVE_CALL);
|
|
12543
|
-
return new $(new
|
|
12587
|
+
return new $(new Ds(), Fs).onStart({
|
|
12544
12588
|
opponentIds: e,
|
|
12545
12589
|
opponentType: t,
|
|
12546
12590
|
mediaOptions: n,
|
|
@@ -12553,40 +12597,40 @@ async function Us(e, t = Fa.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
|
12553
12597
|
conversationId: l
|
|
12554
12598
|
});
|
|
12555
12599
|
}
|
|
12556
|
-
async function
|
|
12557
|
-
return
|
|
12600
|
+
async function Ks(e, t) {
|
|
12601
|
+
return qs(e, A.USER, void 0, t);
|
|
12558
12602
|
}
|
|
12559
|
-
async function
|
|
12603
|
+
async function qs(e, t = A.USER, n, r, i, a) {
|
|
12560
12604
|
if (e === $.id()) throw Error("Push has already been processed");
|
|
12561
|
-
return new $(new
|
|
12605
|
+
return new $(new Ds(), Fs).onPush(e, t, n, r, i, a);
|
|
12562
12606
|
}
|
|
12563
|
-
async function
|
|
12564
|
-
return
|
|
12607
|
+
async function Js() {
|
|
12608
|
+
return Ps.getInbounds();
|
|
12565
12609
|
}
|
|
12566
|
-
async function
|
|
12567
|
-
return e && (M.authToken = e), t !== void 0 && M.apiBaseUrl !== t && (M.apiBaseUrl = t,
|
|
12610
|
+
async function Ys(e, t) {
|
|
12611
|
+
return e && (M.authToken = e), t !== void 0 && M.apiBaseUrl !== t && (M.apiBaseUrl = t, cs()), Ps.authorize();
|
|
12568
12612
|
}
|
|
12569
|
-
async function
|
|
12570
|
-
return
|
|
12613
|
+
async function Xs(e = [S.AUDIO], t) {
|
|
12614
|
+
return yl(t).accept(e);
|
|
12571
12615
|
}
|
|
12572
|
-
async function
|
|
12573
|
-
let n =
|
|
12616
|
+
async function Zs(e, t) {
|
|
12617
|
+
let n = vl(e);
|
|
12574
12618
|
if (n) return n.decline(t?.reason);
|
|
12575
12619
|
}
|
|
12576
|
-
async function
|
|
12577
|
-
return
|
|
12620
|
+
async function Qs(e, t = [S.AUDIO]) {
|
|
12621
|
+
return $s(e, t);
|
|
12578
12622
|
}
|
|
12579
|
-
async function
|
|
12623
|
+
async function $s(e, t, n) {
|
|
12580
12624
|
if (!M.hold && z.callsLength > 0) throw R.error("There is already active call"), new O(D.HAS_ACTIVE_CALL);
|
|
12581
|
-
return new $(new
|
|
12625
|
+
return new $(new Ds(), Fs).onJoin({
|
|
12582
12626
|
conversationId: e,
|
|
12583
12627
|
mediaOptions: t,
|
|
12584
12628
|
chatId: n
|
|
12585
12629
|
});
|
|
12586
12630
|
}
|
|
12587
|
-
async function
|
|
12631
|
+
async function ec(e, t = [S.AUDIO], n, r, i, a) {
|
|
12588
12632
|
if (!M.hold && z.callsLength > 0) throw R.error("There is already active call"), new O(D.HAS_ACTIVE_CALL);
|
|
12589
|
-
return n && (M.anonymToken = n), new $(new
|
|
12633
|
+
return n && (M.anonymToken = n), new $(new Ds(), Fs).onJoin({
|
|
12590
12634
|
joinLink: e,
|
|
12591
12635
|
mediaOptions: t,
|
|
12592
12636
|
observedIds: r,
|
|
@@ -12595,30 +12639,30 @@ async function Qs(e, t = [S.AUDIO], n, r, i, a) {
|
|
|
12595
12639
|
anonymous: !!M.anonymToken
|
|
12596
12640
|
});
|
|
12597
12641
|
}
|
|
12598
|
-
function
|
|
12599
|
-
let n =
|
|
12642
|
+
function tc(e, t) {
|
|
12643
|
+
let n = vl(e);
|
|
12600
12644
|
return n ? n.hangup(t?.reason) : ($.hangupAfterInit(), Promise.resolve());
|
|
12601
12645
|
}
|
|
12602
|
-
async function
|
|
12646
|
+
async function nc(e, t) {
|
|
12603
12647
|
let n = Array.isArray(e) ? e : [e], r = $.current();
|
|
12604
12648
|
r && await r.addParticipant(n, t);
|
|
12605
12649
|
}
|
|
12606
|
-
async function
|
|
12650
|
+
async function rc(e, t) {
|
|
12607
12651
|
let n = $.current();
|
|
12608
12652
|
if (n) {
|
|
12609
12653
|
let r = e.map((e) => j.composeUserId(e));
|
|
12610
12654
|
await n.addParticipantLegacy(r, t);
|
|
12611
12655
|
}
|
|
12612
12656
|
}
|
|
12613
|
-
async function
|
|
12657
|
+
async function ic(e, t = !1) {
|
|
12614
12658
|
let n = $.current()?.getCachedRawOkIdByExternalId(e) ?? null;
|
|
12615
12659
|
if (!n) {
|
|
12616
12660
|
R.warn("removeParticipant: externalId not found in cache", e);
|
|
12617
12661
|
return;
|
|
12618
12662
|
}
|
|
12619
|
-
return
|
|
12663
|
+
return ac(n, t);
|
|
12620
12664
|
}
|
|
12621
|
-
async function
|
|
12665
|
+
async function ac(e, t = !1) {
|
|
12622
12666
|
let n = $.current();
|
|
12623
12667
|
if (n) try {
|
|
12624
12668
|
await n.removeParticipant(j.composeUserId(e), t);
|
|
@@ -12626,13 +12670,13 @@ async function rc(e, t = !1) {
|
|
|
12626
12670
|
R.warn(`Failed to remove participant ${e}. Perhaps he is no longer on the call. ${t}`);
|
|
12627
12671
|
}
|
|
12628
12672
|
}
|
|
12629
|
-
async function
|
|
12673
|
+
async function oc(e, t) {
|
|
12630
12674
|
let n = $.current();
|
|
12631
12675
|
if (e === "videoinput" && jt.contains(t)) return M.videoFacingMode = t, n ? (T.isMobile() && n.stopVideoTrack(), n.changeDevice(e)) : void 0;
|
|
12632
12676
|
if (!await T._saveDeviceId(e, t)) throw Error(`Device not found: ${t}`);
|
|
12633
12677
|
if (n) return n.changeDevice(e);
|
|
12634
12678
|
}
|
|
12635
|
-
async function
|
|
12679
|
+
async function sc(e, t) {
|
|
12636
12680
|
let n = typeof e == "object" ? {
|
|
12637
12681
|
...e,
|
|
12638
12682
|
fastScreenSharing: e.captureScreen && e.fastScreenSharing,
|
|
@@ -12641,34 +12685,34 @@ async function ac(e, t) {
|
|
|
12641
12685
|
captureScreen: e,
|
|
12642
12686
|
fastScreenSharing: !1,
|
|
12643
12687
|
captureAudio: !1
|
|
12644
|
-
}, r =
|
|
12688
|
+
}, r = vl(t);
|
|
12645
12689
|
return r ? r.toggleScreenCapturing(n) : Promise.reject();
|
|
12646
12690
|
}
|
|
12647
|
-
function
|
|
12691
|
+
function cc(e) {
|
|
12648
12692
|
let t = $.current();
|
|
12649
12693
|
t && t.toggleAnimojiCapturing(e);
|
|
12650
12694
|
}
|
|
12651
|
-
async function
|
|
12695
|
+
async function lc(e, t = !1) {
|
|
12652
12696
|
let n = $.current();
|
|
12653
12697
|
n && await n.setVideoStream(e, t);
|
|
12654
12698
|
}
|
|
12655
|
-
async function
|
|
12656
|
-
let n =
|
|
12699
|
+
async function uc(e, t) {
|
|
12700
|
+
let n = vl(t);
|
|
12657
12701
|
n && await n.toggleLocalVideo(e);
|
|
12658
12702
|
}
|
|
12659
|
-
async function
|
|
12660
|
-
let n =
|
|
12703
|
+
async function dc(e, t) {
|
|
12704
|
+
let n = vl(t);
|
|
12661
12705
|
n && await n.toggleLocalAudio(e);
|
|
12662
12706
|
}
|
|
12663
|
-
async function
|
|
12707
|
+
async function fc(e) {
|
|
12664
12708
|
let t = $.current();
|
|
12665
12709
|
if (t) return t.setLocalResolution(e);
|
|
12666
12710
|
}
|
|
12667
|
-
async function
|
|
12711
|
+
async function pc(e) {
|
|
12668
12712
|
let t = $.current();
|
|
12669
12713
|
t && await t.changePriorities(e);
|
|
12670
12714
|
}
|
|
12671
|
-
async function
|
|
12715
|
+
async function mc(e, t) {
|
|
12672
12716
|
let n = $.current();
|
|
12673
12717
|
if (n) {
|
|
12674
12718
|
let r;
|
|
@@ -12683,33 +12727,33 @@ async function fc(e, t) {
|
|
|
12683
12727
|
await n.changeParticipantState(e, r);
|
|
12684
12728
|
}
|
|
12685
12729
|
}
|
|
12686
|
-
async function
|
|
12730
|
+
async function hc() {
|
|
12687
12731
|
let e = $.current();
|
|
12688
12732
|
e && await e.putHandsDown();
|
|
12689
12733
|
}
|
|
12690
|
-
async function
|
|
12734
|
+
async function gc(e) {
|
|
12691
12735
|
let t = $.current();
|
|
12692
12736
|
t && await t.updateDisplayLayout(e);
|
|
12693
12737
|
}
|
|
12694
|
-
async function
|
|
12738
|
+
async function _c(e) {
|
|
12695
12739
|
let t = $.current();
|
|
12696
12740
|
t && await t.requestDisplayLayout(e);
|
|
12697
12741
|
}
|
|
12698
|
-
async function
|
|
12742
|
+
async function vc(e, t, n = !1) {
|
|
12699
12743
|
let r = $.current()?.getCachedRawOkIdByExternalId(e) ?? null;
|
|
12700
12744
|
if (!r) {
|
|
12701
12745
|
R.warn("grantRoles: externalId not found in cache", e);
|
|
12702
12746
|
return;
|
|
12703
12747
|
}
|
|
12704
|
-
return
|
|
12748
|
+
return yc(r, Q.getDeviceIdx(e), t, n);
|
|
12705
12749
|
}
|
|
12706
|
-
async function
|
|
12750
|
+
async function yc(e, t, n, r = !1) {
|
|
12707
12751
|
let i = $.current();
|
|
12708
12752
|
i && await i.grantRoles(j.composeParticipantId(e, A.USER, t), n, r);
|
|
12709
12753
|
}
|
|
12710
|
-
async function
|
|
12754
|
+
async function bc({ externalId: e = null, muteStates: t, requestedMedia: n = [], roomId: r = null }) {
|
|
12711
12755
|
let i = null;
|
|
12712
|
-
return e && (i = $.current()?.getCachedRawOkIdByExternalId(e) ?? null, i || R.warn("muteParticipant: externalId not found in cache", e)),
|
|
12756
|
+
return e && (i = $.current()?.getCachedRawOkIdByExternalId(e) ?? null, i || R.warn("muteParticipant: externalId not found in cache", e)), xc({
|
|
12713
12757
|
uid: i,
|
|
12714
12758
|
muteStates: t,
|
|
12715
12759
|
requestedMedia: n,
|
|
@@ -12717,129 +12761,129 @@ async function vc({ externalId: e = null, muteStates: t, requestedMedia: n = [],
|
|
|
12717
12761
|
roomId: r
|
|
12718
12762
|
});
|
|
12719
12763
|
}
|
|
12720
|
-
async function
|
|
12764
|
+
async function xc({ uid: e = null, muteStates: t, requestedMedia: n = [], deviceIdx: r = 0, roomId: i = null }) {
|
|
12721
12765
|
let a = $.current();
|
|
12722
12766
|
if (a) {
|
|
12723
12767
|
let o = e ? j.composeParticipantId(e, A.USER, r) : null;
|
|
12724
12768
|
await a.muteParticipant(o, t, n, i);
|
|
12725
12769
|
}
|
|
12726
12770
|
}
|
|
12727
|
-
async function
|
|
12771
|
+
async function Sc(e, t = !1, n = null) {
|
|
12728
12772
|
let r = $.current()?.getCachedRawOkIdByExternalId(e) ?? null;
|
|
12729
12773
|
if (!r) {
|
|
12730
12774
|
R.warn("pinParticipant: externalId not found in cache", e);
|
|
12731
12775
|
return;
|
|
12732
12776
|
}
|
|
12733
|
-
return
|
|
12777
|
+
return Cc(r, t, Q.getDeviceIdx(e), n);
|
|
12734
12778
|
}
|
|
12735
|
-
async function
|
|
12779
|
+
async function Cc(e, t = !1, n = 0, r = null) {
|
|
12736
12780
|
let i = $.current();
|
|
12737
12781
|
i && await i.pinParticipant(j.composeParticipantId(e, A.USER, n), t, r);
|
|
12738
12782
|
}
|
|
12739
|
-
async function
|
|
12783
|
+
async function wc(e) {
|
|
12740
12784
|
let t = $.current();
|
|
12741
12785
|
t && await t.updateMediaModifiers(e);
|
|
12742
12786
|
}
|
|
12743
|
-
async function
|
|
12787
|
+
async function Tc(e) {
|
|
12744
12788
|
let t = $.current();
|
|
12745
12789
|
t && await t.enableVideoSuspend(e);
|
|
12746
12790
|
}
|
|
12747
|
-
async function
|
|
12791
|
+
async function Ec(e) {
|
|
12748
12792
|
let t = $.current();
|
|
12749
12793
|
t && await t.enableVideoSuspendSuggest(e);
|
|
12750
12794
|
}
|
|
12751
|
-
async function
|
|
12795
|
+
async function Dc(e) {
|
|
12752
12796
|
let t = $.current();
|
|
12753
12797
|
t && await t.changeOptions(e);
|
|
12754
12798
|
}
|
|
12755
|
-
async function
|
|
12799
|
+
async function Oc(e, t = null) {
|
|
12756
12800
|
let n = null;
|
|
12757
|
-
return t && (n = $.current()?.getCachedRawOkIdByExternalId(t) ?? null, n || R.warn("chatMessage: externalId not found in cache", t)),
|
|
12801
|
+
return t && (n = $.current()?.getCachedRawOkIdByExternalId(t) ?? null, n || R.warn("chatMessage: externalId not found in cache", t)), kc(e, n);
|
|
12758
12802
|
}
|
|
12759
|
-
async function
|
|
12803
|
+
async function kc(e, t = null) {
|
|
12760
12804
|
let n = $.current();
|
|
12761
12805
|
if (n) {
|
|
12762
12806
|
let r = t ? j.composeUserId(t) : null;
|
|
12763
12807
|
await n.chatMessage(e, r);
|
|
12764
12808
|
}
|
|
12765
12809
|
}
|
|
12766
|
-
async function
|
|
12810
|
+
async function Ac(e = 10) {
|
|
12767
12811
|
let t = $.current();
|
|
12768
12812
|
if (t) return t.chatHistory(e);
|
|
12769
12813
|
}
|
|
12770
|
-
async function
|
|
12814
|
+
async function jc(e, t = null) {
|
|
12771
12815
|
let n = null;
|
|
12772
|
-
return t && (n = $.current()?.getCachedRawOkIdByExternalId(t) ?? null, n || R.warn("customData: externalId not found in cache", t)),
|
|
12816
|
+
return t && (n = $.current()?.getCachedRawOkIdByExternalId(t) ?? null, n || R.warn("customData: externalId not found in cache", t)), Mc(e, n, Q.getDeviceIdx(t));
|
|
12773
12817
|
}
|
|
12774
|
-
async function
|
|
12818
|
+
async function Mc(e, t = null, n = 0) {
|
|
12775
12819
|
let r = $.current();
|
|
12776
12820
|
if (r) {
|
|
12777
12821
|
let i = t ? j.composeParticipantId(t, A.USER, n) : null;
|
|
12778
12822
|
await r.customData(e, i);
|
|
12779
12823
|
}
|
|
12780
12824
|
}
|
|
12781
|
-
async function
|
|
12782
|
-
return (await
|
|
12825
|
+
async function Nc(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, waitForAdmin: r = !1, closedConversation: i = !1 } = {}, a) {
|
|
12826
|
+
return (await Ps.createConversation(a ?? j.uuid(), e, t, {
|
|
12783
12827
|
onlyAdminCanShareMovie: n,
|
|
12784
12828
|
waitForAdmin: r,
|
|
12785
12829
|
closedConversation: i
|
|
12786
12830
|
})).join_link;
|
|
12787
12831
|
}
|
|
12788
|
-
async function
|
|
12832
|
+
async function Pc(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, audioOnly: r = !1 } = {}, i) {
|
|
12789
12833
|
let a = i.map((e) => Q.fromId(e));
|
|
12790
|
-
return (await
|
|
12834
|
+
return (await Ps.createConversation(j.uuid(), e, t, {
|
|
12791
12835
|
onlyAdminCanShareMovie: n,
|
|
12792
12836
|
audienceMode: !0,
|
|
12793
12837
|
audioOnly: r
|
|
12794
12838
|
}, a)).join_link;
|
|
12795
12839
|
}
|
|
12796
|
-
async function
|
|
12840
|
+
async function Fc() {
|
|
12797
12841
|
let e = $.current();
|
|
12798
12842
|
return e ? e.createJoinLink() : Promise.reject();
|
|
12799
12843
|
}
|
|
12800
|
-
async function
|
|
12844
|
+
async function Ic() {
|
|
12801
12845
|
let e = $.current();
|
|
12802
12846
|
return e ? e.removeJoinLink() : Promise.reject();
|
|
12803
12847
|
}
|
|
12804
|
-
async function
|
|
12805
|
-
return
|
|
12848
|
+
async function Lc(e, t) {
|
|
12849
|
+
return Ps.getAnonymTokenByLink(e, t);
|
|
12806
12850
|
}
|
|
12807
|
-
function
|
|
12851
|
+
function Rc(e) {
|
|
12808
12852
|
let t = $.current();
|
|
12809
12853
|
t && t.setVolume(e);
|
|
12810
12854
|
}
|
|
12811
|
-
function
|
|
12855
|
+
function zc(e) {
|
|
12812
12856
|
M.forceRelayPolicy = e;
|
|
12813
12857
|
}
|
|
12814
|
-
async function
|
|
12858
|
+
async function Bc(e = !1, t = null, n = null, r = "DIRECT_LINK", i = null, a = null) {
|
|
12815
12859
|
let o = $.current();
|
|
12816
12860
|
return o ? o.startStream(e, t, n, r, i, a) : Promise.reject();
|
|
12817
12861
|
}
|
|
12818
|
-
async function
|
|
12862
|
+
async function Vc(e = null, t) {
|
|
12819
12863
|
let n = $.current();
|
|
12820
12864
|
return n ? n.stopStream(e, t) : Promise.reject();
|
|
12821
12865
|
}
|
|
12822
|
-
async function
|
|
12866
|
+
async function Hc(e = null) {
|
|
12823
12867
|
let t = $.current();
|
|
12824
12868
|
return t ? t.publishStream(e) : Promise.reject();
|
|
12825
12869
|
}
|
|
12826
|
-
async function
|
|
12870
|
+
async function Uc() {
|
|
12827
12871
|
let e = $.current();
|
|
12828
12872
|
return e ? e.getStreamInfo() : Promise.reject();
|
|
12829
12873
|
}
|
|
12830
|
-
async function
|
|
12874
|
+
async function Wc(e) {
|
|
12831
12875
|
let t = $.current();
|
|
12832
12876
|
return t ? t.addMovie(e) : Promise.reject();
|
|
12833
12877
|
}
|
|
12834
|
-
async function
|
|
12878
|
+
async function Gc(e) {
|
|
12835
12879
|
let t = $.current();
|
|
12836
12880
|
return t ? t.updateMovie(e) : Promise.reject();
|
|
12837
12881
|
}
|
|
12838
|
-
async function
|
|
12882
|
+
async function Kc(e) {
|
|
12839
12883
|
let t = $.current();
|
|
12840
12884
|
return t ? t.removeMovie(e) : Promise.reject();
|
|
12841
12885
|
}
|
|
12842
|
-
async function
|
|
12886
|
+
async function qc(e, t) {
|
|
12843
12887
|
let n = $.current();
|
|
12844
12888
|
if (n) {
|
|
12845
12889
|
let r = [];
|
|
@@ -12864,11 +12908,11 @@ async function Gc(e, t) {
|
|
|
12864
12908
|
}
|
|
12865
12909
|
return Promise.reject();
|
|
12866
12910
|
}
|
|
12867
|
-
async function
|
|
12911
|
+
async function Jc(e, t) {
|
|
12868
12912
|
let n = $.current();
|
|
12869
12913
|
return n ? n.activateRooms(e, t) : Promise.reject();
|
|
12870
12914
|
}
|
|
12871
|
-
async function
|
|
12915
|
+
async function Yc(e = null, t = null) {
|
|
12872
12916
|
let n = $.current();
|
|
12873
12917
|
if (!n) return Promise.reject();
|
|
12874
12918
|
let r;
|
|
@@ -12883,25 +12927,25 @@ async function qc(e = null, t = null) {
|
|
|
12883
12927
|
}
|
|
12884
12928
|
return n.switchRoom(e, r);
|
|
12885
12929
|
}
|
|
12886
|
-
async function
|
|
12930
|
+
async function Xc(e) {
|
|
12887
12931
|
let t = $.current();
|
|
12888
12932
|
return t ? t.removeRooms(e) : Promise.reject();
|
|
12889
12933
|
}
|
|
12890
|
-
function
|
|
12934
|
+
function Zc(e) {
|
|
12891
12935
|
M.statisticsInterval = e;
|
|
12892
12936
|
let t = $.current();
|
|
12893
12937
|
if (t) return t.updateStatisticsInterval();
|
|
12894
12938
|
}
|
|
12895
|
-
function
|
|
12939
|
+
function Qc(t) {
|
|
12896
12940
|
e.disableLog(!t), R.toggle(t);
|
|
12897
12941
|
}
|
|
12898
|
-
function
|
|
12942
|
+
function $c(e, ...t) {
|
|
12899
12943
|
M.debugLog && ($.debugMessage(e, "[external]", ...t) || R.send(e, "[external]", ...t));
|
|
12900
12944
|
}
|
|
12901
|
-
function
|
|
12945
|
+
function el(e, t, ...n) {
|
|
12902
12946
|
M.debugLog && ($.debugMessageWithContext(e, t, "[external]", ...n) || R.send(e, "[external]", ...n));
|
|
12903
12947
|
}
|
|
12904
|
-
var
|
|
12948
|
+
var tl = {
|
|
12905
12949
|
list: Ne,
|
|
12906
12950
|
get: Pe,
|
|
12907
12951
|
getJson: Fe,
|
|
@@ -12909,7 +12953,7 @@ var $c = {
|
|
|
12909
12953
|
clear: Le,
|
|
12910
12954
|
stats: Re
|
|
12911
12955
|
};
|
|
12912
|
-
function
|
|
12956
|
+
function nl() {
|
|
12913
12957
|
let e = [
|
|
12914
12958
|
[`Calls SDK ${M.sdkVersion}`, M.toJSON()],
|
|
12915
12959
|
["UserAgent:", navigator.userAgent],
|
|
@@ -12926,31 +12970,31 @@ function el() {
|
|
|
12926
12970
|
d: e
|
|
12927
12971
|
}));
|
|
12928
12972
|
}
|
|
12929
|
-
async function
|
|
12973
|
+
async function rl() {
|
|
12930
12974
|
let e = $.id(), t = $.debugSessionId();
|
|
12931
12975
|
if (!t || !e) throw R.error("[uploadDebugLogs]", "No conversation id found"), Error("No conversation id found");
|
|
12932
12976
|
let n = await Pe({ sessionId: t });
|
|
12933
12977
|
if (n.length === 0) throw R.error("[uploadDebugLogs]", "No logs found"), Error("No logs found");
|
|
12934
12978
|
let r = n[0].t, i = n[n.length - 1].t;
|
|
12935
12979
|
try {
|
|
12936
|
-
return
|
|
12980
|
+
return Ps?.uploadDebugLogs(e, r, i, JSON.stringify([...nl(), ...n]));
|
|
12937
12981
|
} catch (e) {
|
|
12938
12982
|
throw R.error("[uploadDebugLogs]", "Error while uploading logs", e), Error("Error while uploading logs", { cause: e });
|
|
12939
12983
|
}
|
|
12940
12984
|
}
|
|
12941
|
-
async function
|
|
12985
|
+
async function il(e) {
|
|
12942
12986
|
let t = $.current();
|
|
12943
12987
|
if (t) return t.videoEffect(e);
|
|
12944
12988
|
}
|
|
12945
|
-
async function
|
|
12989
|
+
async function al(e, t) {
|
|
12946
12990
|
let n = $.current();
|
|
12947
12991
|
if (n) return n.audioEffect(e.length > 0 ? e : null, t);
|
|
12948
12992
|
}
|
|
12949
|
-
async function
|
|
12993
|
+
async function ol(e) {
|
|
12950
12994
|
let t = $.current();
|
|
12951
12995
|
t && await t.setAudioStream(e);
|
|
12952
12996
|
}
|
|
12953
|
-
async function
|
|
12997
|
+
async function sl(e, t = null, n = null) {
|
|
12954
12998
|
let r = $.current();
|
|
12955
12999
|
if (!r) return;
|
|
12956
13000
|
let i = n ?? t?.id, a = null;
|
|
@@ -12961,18 +13005,18 @@ async function al(e, t = null, n = null) {
|
|
|
12961
13005
|
}
|
|
12962
13006
|
r.setAnimojiSvg(e, a, i);
|
|
12963
13007
|
}
|
|
12964
|
-
function
|
|
13008
|
+
function cl(e) {
|
|
12965
13009
|
let t = $.current();
|
|
12966
13010
|
t && t.setAnimojiFill(e);
|
|
12967
13011
|
}
|
|
12968
|
-
async function
|
|
12969
|
-
return
|
|
13012
|
+
async function ll(e = null, t, n = !1) {
|
|
13013
|
+
return yl().getWaitingHall(e, t, n);
|
|
12970
13014
|
}
|
|
12971
|
-
async function
|
|
12972
|
-
return
|
|
13015
|
+
async function ul() {
|
|
13016
|
+
return yl().getAudienceModeHands();
|
|
12973
13017
|
}
|
|
12974
|
-
async function
|
|
12975
|
-
let n =
|
|
13018
|
+
async function dl(e, t = !1) {
|
|
13019
|
+
let n = yl(), r;
|
|
12976
13020
|
if (e) {
|
|
12977
13021
|
let t = n.getCachedRawOkIdByExternalId(e);
|
|
12978
13022
|
if (!t) {
|
|
@@ -12983,67 +13027,67 @@ async function ll(e, t = !1) {
|
|
|
12983
13027
|
}
|
|
12984
13028
|
return n.promoteParticipant(r, t);
|
|
12985
13029
|
}
|
|
12986
|
-
async function
|
|
12987
|
-
return
|
|
13030
|
+
async function fl(e = !1) {
|
|
13031
|
+
return yl().requestPromotion(e);
|
|
12988
13032
|
}
|
|
12989
|
-
async function
|
|
12990
|
-
return
|
|
13033
|
+
async function pl(e = !1) {
|
|
13034
|
+
return yl().acceptPromotion(e);
|
|
12991
13035
|
}
|
|
12992
|
-
async function
|
|
12993
|
-
return
|
|
13036
|
+
async function ml(e) {
|
|
13037
|
+
return yl().getParticipantListChunk(e);
|
|
12994
13038
|
}
|
|
12995
|
-
async function
|
|
12996
|
-
return
|
|
13039
|
+
async function hl(e) {
|
|
13040
|
+
return yl().getParticipants(e);
|
|
12997
13041
|
}
|
|
12998
|
-
async function
|
|
12999
|
-
return
|
|
13042
|
+
async function gl(e) {
|
|
13043
|
+
return yl().feedback(e);
|
|
13000
13044
|
}
|
|
13001
|
-
async function
|
|
13002
|
-
return
|
|
13045
|
+
async function _l(e, t, n) {
|
|
13046
|
+
return yl(n).enableFeatureForRoles(e, t);
|
|
13003
13047
|
}
|
|
13004
|
-
function
|
|
13048
|
+
function vl(e) {
|
|
13005
13049
|
return e ? z.get(e) ?? null : $.current() ?? z.getFirst();
|
|
13006
13050
|
}
|
|
13007
|
-
function
|
|
13008
|
-
let t =
|
|
13051
|
+
function yl(e) {
|
|
13052
|
+
let t = vl(e);
|
|
13009
13053
|
if (!t) throw Error("Conversation not found");
|
|
13010
13054
|
return t;
|
|
13011
13055
|
}
|
|
13012
|
-
async function
|
|
13013
|
-
await
|
|
13056
|
+
async function bl(e) {
|
|
13057
|
+
await Ps.removeHistoryRecords(e);
|
|
13014
13058
|
}
|
|
13015
|
-
async function
|
|
13059
|
+
async function xl(e) {
|
|
13016
13060
|
let t = $.current() ?? z.getFirst();
|
|
13017
13061
|
t && await t.startAsr(e);
|
|
13018
13062
|
}
|
|
13019
|
-
async function
|
|
13063
|
+
async function Sl(e) {
|
|
13020
13064
|
let t = $.current() ?? z.getFirst();
|
|
13021
13065
|
t && await t.stopAsr(e);
|
|
13022
13066
|
}
|
|
13023
|
-
async function
|
|
13067
|
+
async function Cl(e) {
|
|
13024
13068
|
let t = $.current() ?? z.getFirst();
|
|
13025
13069
|
t && await t.requestAsr(e);
|
|
13026
13070
|
}
|
|
13027
|
-
async function
|
|
13071
|
+
async function wl(e) {
|
|
13028
13072
|
let t = $.current();
|
|
13029
13073
|
return t ? t.startUrlSharing(e) : Promise.reject();
|
|
13030
13074
|
}
|
|
13031
|
-
async function
|
|
13075
|
+
async function Tl() {
|
|
13032
13076
|
let e = $.current();
|
|
13033
13077
|
return e ? e.stopUrlSharing() : Promise.reject();
|
|
13034
13078
|
}
|
|
13035
|
-
async function
|
|
13079
|
+
async function El(e) {
|
|
13036
13080
|
await z.switchCall(e);
|
|
13037
13081
|
}
|
|
13038
|
-
function
|
|
13082
|
+
function Dl() {
|
|
13039
13083
|
return z.getActiveId();
|
|
13040
13084
|
}
|
|
13041
|
-
function
|
|
13085
|
+
function Ol() {
|
|
13042
13086
|
return $.getSyncedTime();
|
|
13043
13087
|
}
|
|
13044
|
-
function
|
|
13088
|
+
function kl() {
|
|
13045
13089
|
return M.sdkVersion;
|
|
13046
13090
|
}
|
|
13047
13091
|
typeof window < "u" && (window.__CALLS_SDK = hn);
|
|
13048
13092
|
//#endregion
|
|
13049
|
-
export {
|
|
13093
|
+
export { Ds as Api, Ns as ApiExternal, Ms as ArrayDequeue, y as AuthData, f as BaseLogger, Pa as CallDirection, Fa as CallType, Ia as ChatRoomEventType, La as ConversationFeature, Ra as ConversationOption, vn as DebugMessageType, Ya as ExternalIdType, jt as FacingMode, x as FatalError, O as HangupReason, D as HangupType, S as MediaOption, k as MediaTrackKind, V as MediaType, Va as MuteState, Z as ParticipantState, js as ParticipantStateDataValue, N as ParticipantStatus, As as RecordRole, Ha as RoomsEventType, Na as Signaling, B as SignalingCommandType, pr as SignalingConnectionType, K as SignalingNotification, J as TransportTopology, Ga as UserRole, A as UserType, vo as VolumeDetector, Xs as acceptCall, pl as acceptPromotion, Jc as activateRooms, Wc as addMovie, nc as addParticipant, rc as addParticipantInternal, Ys as authorize, Is as browser, Gs as callInternal, Ws as callTo, sc as captureScreen, cc as captureVmoji, al as changeAudioEffect, Dc as changeConversationOptions, oc as changeDevice, mc as changeParticipantState, pc as changePriorities, il as changeVideoEffect, Ac as chatHistory, Oc as chatMessage, kc as chatMessageInternal, Fc as createJoinLink, jc as customData, Mc as customDataInternal, Qc as debug, tl as debugLogs, $c as debugMessage, el as debugMessageWithContext, Zs as declineCall, _l as enableFeatureForRoles, Tc as enableVideoSuspend, Ec as enableVideoSuspendSuggest, gl as feedback, zc as forceRelayPolicy, Dl as getActiveCallId, Lc as getAnonymTokenByLink, ul as getAudienceModeHands, Js as getInbounds, ml as getParticipantListChunk, hl as getParticipants, Uc as getStreamInfo, Ol as getSyncedTime, ll as getWaitingHall, vc as grantRoles, yc as grantRolesInternal, tc as hangup, Us as init, Qs as joinCall, ec as joinCallByLink, $s as joinCallInternal, bc as muteParticipant, xc as muteParticipantInternal, Sc as pinParticipant, Cc as pinParticipantInternal, Ks as processPush, qs as processPushInternal, dl as promoteParticipant, Hc as publishStream, hc as putHandsDown, bl as removeHistoryRecords, Ic as removeJoinLink, Kc as removeMovie, ic as removeParticipant, ac as removeParticipantInternal, Xc as removeRooms, Cl as requestAsr, _c as requestDisplayLayout, fl as requestPromotion, Bs as setAudioEffects, ol as setAudioStream, fc as setLocalResolution, Rs as setLogger, wc as setMediaModifiers, Zc as setStatisticsInterval, Vs as setVad, zs as setVideoEffects, lc as setVideoStream, Hs as setVmoji, cl as setVmojiFill, sl as setVmojiSvg, Rc as setVolume, xl as startAsr, Pc as startAudienceConversation, Nc as startConversation, Bc as startStream, wl as startUrlSharing, Sl as stopAsr, Vc as stopStream, Tl as stopUrlSharing, El as switchCall, Yc as switchRoom, dc as toggleLocalAudio, uc as toggleLocalVideo, gc as updateDisplayLayout, Gc as updateMovie, qc as updateRooms, rl as uploadDebugLogs, Ls as utils, kl as version };
|