@vkontakte/calls-sdk 2.8.11-dev.c08ac4e9.0 → 2.8.11-dev.d94b3aa4.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 +2 -8
- package/calls-sdk.cjs.js +5 -5
- package/calls-sdk.esm.js +200 -302
- package/classes/Conversation.d.ts +1 -3
- package/classes/stat/StatFirstMediaReceived.d.ts +2 -1
- package/package.json +1 -1
- package/static/Params.d.ts +0 -8
- package/types/ParticipantLayout.d.ts +0 -33
- package/classes/DisplayLayoutRequester.d.ts +0 -32
package/calls-sdk.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @vkontakte/calls-sdk v2.8.11-dev.
|
|
3
|
-
* Thu, 28 May 2026
|
|
2
|
+
* @vkontakte/calls-sdk v2.8.11-dev.d94b3aa4.0
|
|
3
|
+
* Thu, 28 May 2026 11:11:50 GMT
|
|
4
4
|
* https://calls-sdk.cdn-vk.ru/doc/latest/index.html
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -852,7 +852,7 @@ var be = ye.getInstance(), D = class e {
|
|
|
852
852
|
return 1.1;
|
|
853
853
|
}
|
|
854
854
|
static get sdkVersion() {
|
|
855
|
-
return "2.8.11-dev.
|
|
855
|
+
return "2.8.11-dev.d94b3aa4.0";
|
|
856
856
|
}
|
|
857
857
|
static get debug() {
|
|
858
858
|
return e._params.debug;
|
|
@@ -1125,9 +1125,6 @@ var be = ye.getInstance(), D = class e {
|
|
|
1125
1125
|
static get videoTracksCount() {
|
|
1126
1126
|
return Number(e._params.videoTracksCount);
|
|
1127
1127
|
}
|
|
1128
|
-
static get requestDisplayLayoutThrottleMs() {
|
|
1129
|
-
return Number(e._params.requestDisplayLayoutThrottleMs);
|
|
1130
|
-
}
|
|
1131
1128
|
static get breakVideoPayloadTypes() {
|
|
1132
1129
|
return e._params.breakVideoPayloadTypes;
|
|
1133
1130
|
}
|
|
@@ -1238,7 +1235,6 @@ var be = ye.getInstance(), D = class e {
|
|
|
1238
1235
|
screenShareCongestionControl: e._params.screenShareCongestionControl,
|
|
1239
1236
|
screenShareCongestionControlThreshold: e._params.screenShareCongestionControlThreshold,
|
|
1240
1237
|
videoTracksCount: e._params.videoTracksCount,
|
|
1241
|
-
requestDisplayLayoutThrottleMs: e._params.requestDisplayLayoutThrottleMs,
|
|
1242
1238
|
asrDataChannel: e._params.asrDataChannel,
|
|
1243
1239
|
videoMaxHeight: e._params.videoMaxHeight,
|
|
1244
1240
|
videoMaxWidth: e._params.videoMaxWidth,
|
|
@@ -1332,7 +1328,6 @@ h(D, "_params", {
|
|
|
1332
1328
|
preferVP9: !1,
|
|
1333
1329
|
audioNack: !0,
|
|
1334
1330
|
videoTracksCount: 30,
|
|
1335
|
-
requestDisplayLayoutThrottleMs: 250,
|
|
1336
1331
|
movieShare: !1,
|
|
1337
1332
|
useCallsToContacts: !1,
|
|
1338
1333
|
useParticipantListChunk: !1,
|
|
@@ -7545,92 +7540,7 @@ var Ta = class {
|
|
|
7545
7540
|
let t = Number((100 * e.usedJSHeapSize / e.jsHeapSizeLimit).toFixed(2)), n = Number((e.usedJSHeapSize / 1024 / 1024).toFixed(1));
|
|
7546
7541
|
t > Da ? z.warn(`High memory usage: ${t}% (${n} MiB)`) : (!this._lastMemoryStat.percent || Math.abs(t - this._lastMemoryStat.percent) >= Oa) && (z.debug(`Memory usage: ${t}% (${n} MiB)`), this._lastMemoryStat.percent = t, this._lastMemoryStat.bytes = e.usedJSHeapSize);
|
|
7547
7542
|
}
|
|
7548
|
-
}, Aa = class {
|
|
7549
|
-
constructor({ api: e, getParticipants: t, isMe: n, updateDisplayLayout: r }) {
|
|
7550
|
-
h(this, "_api", void 0), h(this, "_getParticipants", void 0), h(this, "_isMe", void 0), h(this, "_updateDisplayLayout", void 0), h(this, "_requestedLayouts", {}), h(this, "_pendingRequests", null), h(this, "_pendingPromises", []), h(this, "_timer", null), h(this, "_inFlight", !1), h(this, "_lastFlushAt", 0), h(this, "_generation", 0), this._api = e, this._getParticipants = t, this._isMe = n, this._updateDisplayLayout = r;
|
|
7551
|
-
}
|
|
7552
|
-
request(e) {
|
|
7553
|
-
this._pendingRequests = e.slice();
|
|
7554
|
-
let t = new Promise((e, t) => {
|
|
7555
|
-
this._pendingPromises.push({
|
|
7556
|
-
resolve: e,
|
|
7557
|
-
reject: t
|
|
7558
|
-
});
|
|
7559
|
-
});
|
|
7560
|
-
return this._schedule(), t;
|
|
7561
|
-
}
|
|
7562
|
-
cleanupParticipant(e) {
|
|
7563
|
-
for (let t of Object.keys(this._requestedLayouts)) Qt(t).participantId === e && delete this._requestedLayouts[t];
|
|
7564
|
-
}
|
|
7565
|
-
clear() {
|
|
7566
|
-
this._generation++, this._timer !== null && (window.clearTimeout(this._timer), this._timer = null), this._pendingPromises.forEach(({ resolve: e }) => e()), this._requestedLayouts = {}, this._pendingRequests = null, this._pendingPromises = [], this._inFlight = !1, this._lastFlushAt = 0;
|
|
7567
|
-
}
|
|
7568
|
-
_schedule() {
|
|
7569
|
-
if (this._inFlight || this._timer !== null) return;
|
|
7570
|
-
let e = Date.now() - this._lastFlushAt, t = Math.max(0, D.requestDisplayLayoutThrottleMs - e);
|
|
7571
|
-
this._timer = window.setTimeout(() => {
|
|
7572
|
-
this._timer = null, this._flush();
|
|
7573
|
-
}, t);
|
|
7574
|
-
}
|
|
7575
|
-
async _flush() {
|
|
7576
|
-
if (this._inFlight || !this._pendingRequests) return;
|
|
7577
|
-
this._inFlight = !0;
|
|
7578
|
-
let e = this._generation, t = this._pendingRequests, n = this._pendingPromises;
|
|
7579
|
-
this._pendingRequests = null, this._pendingPromises = [];
|
|
7580
|
-
try {
|
|
7581
|
-
let r = await this._getRequestLayouts(t), i = this._getDiff(r);
|
|
7582
|
-
i.length && await this._updateDisplayLayout(i), e === this._generation && (this._requestedLayouts = r), n.forEach(({ resolve: e }) => e());
|
|
7583
|
-
} catch (t) {
|
|
7584
|
-
e === this._generation ? n.forEach(({ reject: e }) => e(t)) : n.forEach(({ resolve: e }) => e());
|
|
7585
|
-
} finally {
|
|
7586
|
-
e === this._generation && (this._lastFlushAt = Date.now(), this._inFlight = !1, this._pendingRequests && this._schedule());
|
|
7587
|
-
}
|
|
7588
|
-
}
|
|
7589
|
-
async _getRequestLayouts(e) {
|
|
7590
|
-
let t = {}, n = await this._getParticipants();
|
|
7591
|
-
for (let r of e) {
|
|
7592
|
-
let e = typeof r.uid == "object" ? r.uid : Z.fromId(r.uid), i = this._api.getCachedOkIdByExternalId(e);
|
|
7593
|
-
if (!i) {
|
|
7594
|
-
z.log(`Unknown participant external ID ${typeof r.uid == "object" ? Z.toString(r.uid) : r.uid}`);
|
|
7595
|
-
continue;
|
|
7596
|
-
}
|
|
7597
|
-
if (!n[i] && !this._isMe(i)) continue;
|
|
7598
|
-
let a = Zt({
|
|
7599
|
-
participantId: i,
|
|
7600
|
-
mediaType: r.mediaType,
|
|
7601
|
-
streamName: r.streamName
|
|
7602
|
-
});
|
|
7603
|
-
t[a] = {
|
|
7604
|
-
uid: r.uid,
|
|
7605
|
-
mediaType: r.mediaType,
|
|
7606
|
-
width: r.width,
|
|
7607
|
-
height: r.height,
|
|
7608
|
-
fit: r.cover ? "cv" : "cn",
|
|
7609
|
-
...r.priority === void 0 ? {} : { priority: r.priority },
|
|
7610
|
-
...r.streamName === void 0 ? {} : { streamName: r.streamName }
|
|
7611
|
-
};
|
|
7612
|
-
}
|
|
7613
|
-
return t;
|
|
7614
|
-
}
|
|
7615
|
-
_getDiff(e) {
|
|
7616
|
-
let t = [];
|
|
7617
|
-
for (let [n, r] of Object.entries(e)) {
|
|
7618
|
-
let e = this._requestedLayouts[n];
|
|
7619
|
-
(!e || this._isChanged(e, r)) && t.push(r);
|
|
7620
|
-
}
|
|
7621
|
-
for (let [n, r] of Object.entries(this._requestedLayouts)) e[n] || t.push({
|
|
7622
|
-
uid: r.uid,
|
|
7623
|
-
mediaType: r.mediaType,
|
|
7624
|
-
stopStream: !0,
|
|
7625
|
-
...r.streamName === void 0 ? {} : { streamName: r.streamName }
|
|
7626
|
-
});
|
|
7627
|
-
return t;
|
|
7628
|
-
}
|
|
7629
|
-
_isChanged(e, t) {
|
|
7630
|
-
let n = e, r = t;
|
|
7631
|
-
return n.width !== r.width || n.height !== r.height || n.fit !== r.fit || n.priority !== r.priority;
|
|
7632
|
-
}
|
|
7633
|
-
}, ja = 44100, Ma = class {
|
|
7543
|
+
}, Aa = 44100, ja = class {
|
|
7634
7544
|
constructor(e, t) {
|
|
7635
7545
|
h(this, "_analyser", null), h(this, "_gainNode", null), h(this, "_fftBins", null), h(this, "_mediaStreamSource", null), h(this, "_lastSmoothedLevel", 0), h(this, "_trackId", void 0), h(this, "_track", void 0), h(this, "_stream", void 0), this._trackId = e, this._track = t, this._stream = new MediaStream([t]);
|
|
7636
7546
|
try {
|
|
@@ -7647,7 +7557,7 @@ var Ta = class {
|
|
|
7647
7557
|
_getBins() {
|
|
7648
7558
|
if (!this._fftBins || !this._analyser) return new Uint8Array();
|
|
7649
7559
|
this._analyser.getByteFrequencyData(this._fftBins);
|
|
7650
|
-
let e =
|
|
7560
|
+
let e = Aa / this._fftBins.length, t = Math.ceil(D.voiceParams.minFreq / e), n = Math.floor(D.voiceParams.maxFreq / e);
|
|
7651
7561
|
return this._fftBins.subarray(t, n);
|
|
7652
7562
|
}
|
|
7653
7563
|
getLevel() {
|
|
@@ -7660,7 +7570,7 @@ var Ta = class {
|
|
|
7660
7570
|
destroy() {
|
|
7661
7571
|
this._mediaStreamSource && (this._mediaStreamSource.disconnect(), this._mediaStreamSource = null), this._gainNode && (this._gainNode.disconnect(), this._gainNode = null), this._analyser && (this._analyser.disconnect(), this._analyser = null, this._fftBins = null, this._lastSmoothedLevel = 0), this._stream.removeTrack(this._track);
|
|
7662
7572
|
}
|
|
7663
|
-
},
|
|
7573
|
+
}, Ma = class extends g {
|
|
7664
7574
|
constructor(e) {
|
|
7665
7575
|
super(), h(this, "_detector", null), h(this, "_interval", null);
|
|
7666
7576
|
let t = () => {
|
|
@@ -7676,7 +7586,7 @@ var Ta = class {
|
|
|
7676
7586
|
}), this.subscribe(e, Oe.SOURCE_READY, n), n();
|
|
7677
7587
|
}
|
|
7678
7588
|
init(e) {
|
|
7679
|
-
this._stopDetector(), this._detector = new
|
|
7589
|
+
this._stopDetector(), this._detector = new ja("local", e.clone());
|
|
7680
7590
|
}
|
|
7681
7591
|
_stopDetector() {
|
|
7682
7592
|
this._detector && (this._detector.track.stop(), this._detector.destroy(), this._detector = null);
|
|
@@ -7684,7 +7594,7 @@ var Ta = class {
|
|
|
7684
7594
|
destroy() {
|
|
7685
7595
|
this.unsubscribe(), this._interval && (window.clearTimeout(this._interval), this._interval = null), this._stopDetector();
|
|
7686
7596
|
}
|
|
7687
|
-
},
|
|
7597
|
+
}, Na = class {
|
|
7688
7598
|
constructor(e) {
|
|
7689
7599
|
h(this, "processor", void 0), h(this, "queue", []), h(this, "isProcessing", !1), this.processor = e;
|
|
7690
7600
|
}
|
|
@@ -7704,9 +7614,9 @@ var Ta = class {
|
|
|
7704
7614
|
this.isProcessing = !1;
|
|
7705
7615
|
}
|
|
7706
7616
|
}
|
|
7707
|
-
},
|
|
7617
|
+
}, Pa = /* @__PURE__ */ function(e) {
|
|
7708
7618
|
return e.VOLUMES_DETECTED = "VOLUMES_DETECTED", e;
|
|
7709
|
-
}({}),
|
|
7619
|
+
}({}), Fa = class extends g {
|
|
7710
7620
|
constructor(e) {
|
|
7711
7621
|
super(), h(this, "_detectors", /* @__PURE__ */ new Map()), h(this, "_interval", null), h(this, "_activeParticipants", void 0), h(this, "_removedParticipants", void 0), h(this, "_topology", void 0), this._topology = e.getTopology(), this.subscribe(e, K.REMOTE_TRACK_ADDED, this._onRemoteTrackAdded.bind(this)), this.subscribe(e, K.REMOTE_TRACK_REMOVED, this._onRemoteTrackRemoved.bind(this)), this.subscribe(e, K.SIGNALLED_ACTIVE_PARTICIPANTS, this._onSignalledActiveParticipants.bind(this)), this.subscribe(e, K.TOPOLOGY_CHANGED, this._onTopologyChanged.bind(this));
|
|
7712
7622
|
}
|
|
@@ -7714,7 +7624,7 @@ var Ta = class {
|
|
|
7714
7624
|
this._interval && (window.clearTimeout(this._interval), this._interval = null), this.unsubscribe(), this._destroyDetectors();
|
|
7715
7625
|
}
|
|
7716
7626
|
_onRemoteTrackAdded(e, t, n) {
|
|
7717
|
-
if (n.kind === k.audio && (this._detectors.get(e)?.destroy(), this._detectors.set(e, new
|
|
7627
|
+
if (n.kind === k.audio && (this._detectors.get(e)?.destroy(), this._detectors.set(e, new ja(e, n)), !this._interval)) {
|
|
7718
7628
|
let e = () => {
|
|
7719
7629
|
this._collectVolumes(), this._interval = window.setTimeout(e, D.voiceParams.interval);
|
|
7720
7630
|
};
|
|
@@ -7772,11 +7682,11 @@ var Ta = class {
|
|
|
7772
7682
|
e.destroy();
|
|
7773
7683
|
}), this._detectors.clear();
|
|
7774
7684
|
}
|
|
7775
|
-
},
|
|
7685
|
+
}, Ia = /* @__PURE__ */ function(e) {
|
|
7776
7686
|
return e.SPEAKER_CHANGED = "SPEAKER_CHANGED", e;
|
|
7777
|
-
}({}),
|
|
7687
|
+
}({}), La = class extends g {
|
|
7778
7688
|
constructor(e, t, n) {
|
|
7779
|
-
super(), h(this, "_speakerId", null), h(this, "_serverSideSpeakerDetection", !1), this._serverSideSpeakerDetection = n === J.SERVER, this.subscribe(e,
|
|
7689
|
+
super(), h(this, "_speakerId", null), h(this, "_serverSideSpeakerDetection", !1), this._serverSideSpeakerDetection = n === J.SERVER, this.subscribe(e, Pa.VOLUMES_DETECTED, this._onVolumesDetected.bind(this)), this.subscribe(t, K.SIGNALLED_SPEAKER_CHANGED, this._onServerSpeakerChanged.bind(this)), this.subscribe(t, K.TOPOLOGY_CHANGED, this._onTopologyChanged.bind(this));
|
|
7780
7690
|
}
|
|
7781
7691
|
destroy() {
|
|
7782
7692
|
this.unsubscribe();
|
|
@@ -7798,9 +7708,9 @@ var Ta = class {
|
|
|
7798
7708
|
_onTopologyChanged(e) {
|
|
7799
7709
|
this._serverSideSpeakerDetection = e === J.SERVER;
|
|
7800
7710
|
}
|
|
7801
|
-
},
|
|
7711
|
+
}, Ra = class extends g {
|
|
7802
7712
|
constructor(e, t, n) {
|
|
7803
|
-
super(), h(this, "_transport", void 0), h(this, "_volumes", {}), h(this, "_participants", {}), h(this, "_connectionTimeout", 0), h(this, "_volumeTimeout", 0), this._transport = e, this._participants = n, this.subscribe(e, K.STATE_CHANGED, this._onTransportStateChanged.bind(this)), this.subscribe(t,
|
|
7713
|
+
super(), h(this, "_transport", void 0), h(this, "_volumes", {}), h(this, "_participants", {}), h(this, "_connectionTimeout", 0), h(this, "_volumeTimeout", 0), this._transport = e, this._participants = n, this.subscribe(e, K.STATE_CHANGED, this._onTransportStateChanged.bind(this)), this.subscribe(t, Pa.VOLUMES_DETECTED, this._onVolumesDetected.bind(this));
|
|
7804
7714
|
}
|
|
7805
7715
|
destroy() {
|
|
7806
7716
|
this.unsubscribe(), this._connectionTimeout && window.clearTimeout(this._connectionTimeout), this._volumeTimeout && window.clearTimeout(this._volumeTimeout);
|
|
@@ -7827,7 +7737,7 @@ var Ta = class {
|
|
|
7827
7737
|
r && r.platform && (n = r.platform), e.indexOf(n) < 0 && (e.push(n), y.log(C.CALL_SPEC_ERROR, `${this._transport.getTopology()}_VOLUME_TIMEOUT_${n}`));
|
|
7828
7738
|
}), e.length && z.warn("There is silent participant, send callSpecError"), this._volumeTimeout = 0;
|
|
7829
7739
|
}
|
|
7830
|
-
},
|
|
7740
|
+
}, za = class e {
|
|
7831
7741
|
static correctHangupReason(e) {
|
|
7832
7742
|
switch (e) {
|
|
7833
7743
|
case _.HUNGUP: return "hangup";
|
|
@@ -7864,7 +7774,7 @@ var Ta = class {
|
|
|
7864
7774
|
...r && { string_value: r }
|
|
7865
7775
|
});
|
|
7866
7776
|
}
|
|
7867
|
-
},
|
|
7777
|
+
}, Ba = class {
|
|
7868
7778
|
constructor() {
|
|
7869
7779
|
h(this, "_isCallMarked", !1), h(this, "_isFinished", !1), h(this, "_callType", null);
|
|
7870
7780
|
}
|
|
@@ -7874,14 +7784,14 @@ var Ta = class {
|
|
|
7874
7784
|
markAcceptedCall(e) {
|
|
7875
7785
|
e === J.DIRECT && this.mark("direct_outgoing");
|
|
7876
7786
|
}
|
|
7877
|
-
markParticipantJoined(e) {
|
|
7878
|
-
e === J.DIRECT && this.mark("server_change_topology");
|
|
7879
|
-
}
|
|
7880
7787
|
markOnJoin(e) {
|
|
7881
|
-
e === J.
|
|
7788
|
+
this.mark(e === J.DIRECT ? "direct_join" : "server_join_server", e === J.DIRECT);
|
|
7882
7789
|
}
|
|
7883
|
-
|
|
7884
|
-
this.
|
|
7790
|
+
markTopologyChanged(e) {
|
|
7791
|
+
this._isFinished || e !== J.SERVER || (this._callType = "server_change_topology");
|
|
7792
|
+
}
|
|
7793
|
+
mark(e, t = !1) {
|
|
7794
|
+
(!this._isCallMarked || t) && (this._isCallMarked = !0, this._callType = e, U.setMark(V.FIRST_MEDIA_RECEIVED));
|
|
7885
7795
|
}
|
|
7886
7796
|
measure() {
|
|
7887
7797
|
this._isFinished || (this._isFinished = !0, this._callType && Rn.logEventualStat({
|
|
@@ -7889,9 +7799,9 @@ var Ta = class {
|
|
|
7889
7799
|
call_type: this._callType
|
|
7890
7800
|
}));
|
|
7891
7801
|
}
|
|
7892
|
-
},
|
|
7802
|
+
}, Va = 1e3, Ha = 1e4, Ua = 15, Q = class e extends g {
|
|
7893
7803
|
constructor(e, t) {
|
|
7894
|
-
super(), h(this, "_api", void 0), h(this, "_signaling", void 0), h(this, "_signalingActor", void 0), h(this, "
|
|
7804
|
+
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, "_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", Qn()), 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", E.debounce(async (e) => {
|
|
7895
7805
|
if (this._signaling.ready) try {
|
|
7896
7806
|
await this._signaling.changeMediaSettings(e);
|
|
7897
7807
|
} catch (e) {
|
|
@@ -7901,17 +7811,12 @@ var Ta = class {
|
|
|
7901
7811
|
captureAudio: !1
|
|
7902
7812
|
});
|
|
7903
7813
|
}
|
|
7904
|
-
}, 100)), y.create(e, t), y.setConversationIdProvider(() => this._conversation?.id || null), Rn.create(), $n.create(() => this._transport?.getTopology()), zi.create(), Bi.create(), this._api = e, this._signaling = new na(), this._signalingActor = new
|
|
7905
|
-
api: this._api,
|
|
7906
|
-
getParticipants: () => this._getParticipants(),
|
|
7907
|
-
isMe: (e) => this._isMe(e),
|
|
7908
|
-
updateDisplayLayout: (e) => this.updateDisplayLayout(e)
|
|
7909
|
-
}), this._onUnload = () => {
|
|
7814
|
+
}, 100)), y.create(e, t), y.setConversationIdProvider(() => this._conversation?.id || null), Rn.create(), $n.create(() => this._transport?.getTopology()), zi.create(), Bi.create(), this._api = e, this._signaling = new na(), this._signalingActor = new Na(this._onSignalingNotification.bind(this)), this._onUnload = () => {
|
|
7910
7815
|
this._conversation && this._api && (this._api.hangupConversation(this._conversation.id, this._state === "IDLE" ? _.CANCELED : _.HUNGUP), D.clientEventsLoggingEnabled && y.logClientEvent({
|
|
7911
7816
|
event_type: V.CALL_DECLINED_OR_HANGED_LOCALLY,
|
|
7912
7817
|
reason: "none"
|
|
7913
7818
|
}, !0)), y.destroy(), Rn.destroy(), $n.destroy(), zi.destroy(), Bi.destroy();
|
|
7914
|
-
}, window.addEventListener("pagehide", this._onUnload), this._statFirstMediaReceived = new
|
|
7819
|
+
}, window.addEventListener("pagehide", this._onUnload), this._statFirstMediaReceived = new Ba(), this._audioOutput = new Ea(this._statFirstMediaReceived, D.transparentAudio), D.videoTracksCount > 0 && (this._cooldownQueueCleanupTimer = window.setInterval(this._cleanupCooldownQueue.bind(this), Va));
|
|
7915
7820
|
}
|
|
7916
7821
|
static current() {
|
|
7917
7822
|
return e._current;
|
|
@@ -8169,7 +8074,7 @@ var Ta = class {
|
|
|
8169
8074
|
n.length ? this._transport.open(n, null, !!this._conversation?.observer) : this._transport.getTopology() === J.SERVER && this._forceOpenTransportForAloneInCall();
|
|
8170
8075
|
}
|
|
8171
8076
|
async _close(t, n) {
|
|
8172
|
-
n && z.error(n, t), z.debug("Close conversation", t),
|
|
8077
|
+
n && z.error(n, t), z.debug("Close conversation", t), za.sendHangupEvent(t, this._transport?.getTopology()), $n.destroy(), zi.logMetrics(this._transport?.getTopology()), zi.destroy(), Bi.logMetrics(this._transport?.getTopology()), Bi.destroy(), this._signaling.readyToSend(!1), t.error ? this._signaling.ready && this._signaling.hangup(_.FAILED) : y.log(C.ERROR, t.hangup), e._activationMutex = !1;
|
|
8173
8078
|
let r = this._conversation && this._conversation.id;
|
|
8174
8079
|
if ([
|
|
8175
8080
|
_.CANCELED,
|
|
@@ -8197,14 +8102,14 @@ var Ta = class {
|
|
|
8197
8102
|
this._cleanupSignaling(), this._cleanupMediaSource();
|
|
8198
8103
|
return;
|
|
8199
8104
|
}
|
|
8200
|
-
this._state = "CLOSE", this._participantState = X.HUNGUP, this._changeFeatureSet(), this._cleanupMediaSource(), await this._cleanupParticipants(), this._cleanupParticipantAgnosticStreams(), this._cleanupTransport(), this._cleanupSpeakerDetector(), this._cleanupSpecListener(), this._cleanupSignaling(), this._api.cleanup(), this._api.setAbortSignal(void 0), this._signaling.setAbortSignal(void 0), y.destroy(), Rn.destroy(), this._conversation = null, this._myLastRequestedLayouts = {},
|
|
8105
|
+
this._state = "CLOSE", this._participantState = X.HUNGUP, this._changeFeatureSet(), this._cleanupMediaSource(), await this._cleanupParticipants(), this._cleanupParticipantAgnosticStreams(), this._cleanupTransport(), this._cleanupSpeakerDetector(), this._cleanupSpecListener(), this._cleanupSignaling(), this._api.cleanup(), this._api.setAbortSignal(void 0), this._signaling.setAbortSignal(void 0), y.destroy(), Rn.destroy(), this._conversation = null, this._myLastRequestedLayouts = {}, e._current = null, e._delayedHangup = !1, e._abortController = null, P.onHangup(t || new v(_.UNKNOWN_ERROR), r);
|
|
8201
8106
|
}
|
|
8202
8107
|
async destroy() {
|
|
8203
8108
|
let t = this._conversation && this._conversation.id;
|
|
8204
8109
|
if (z.debug("Destroy conversation", { conversationId: t }), this._cooldownQueueCleanupTimer !== null && (window.clearInterval(this._cooldownQueueCleanupTimer), this._cooldownQueueCleanupTimer = null), this._state = "CLOSE", this._participantState = X.HUNGUP, this._cleanupMediaSource(), await this._cleanupParticipants(), this._cleanupParticipantAgnosticStreams(), this._cleanupTransport(), this._cleanupSpeakerDetector(), this._cleanupSpecListener(), this._cleanupSignaling(), this._api.cleanup(), this._api.setAbortSignal(void 0), this._signaling.setAbortSignal(void 0), e._delayedHangup && t) try {
|
|
8205
8110
|
this._api.hangupConversation(t, _.CANCELED);
|
|
8206
8111
|
} catch {}
|
|
8207
|
-
this._cleanupListeners(), y.destroy(), Rn.destroy(), this._conversation = null, this._myLastRequestedLayouts = {},
|
|
8112
|
+
this._cleanupListeners(), y.destroy(), Rn.destroy(), this._conversation = null, this._myLastRequestedLayouts = {}, e._current = null, e._delayedHangup = !1, e._abortController = null;
|
|
8208
8113
|
}
|
|
8209
8114
|
async _getConversationParams(e) {
|
|
8210
8115
|
let t = await this._api.getConversationParams(e);
|
|
@@ -8620,10 +8525,10 @@ var Ta = class {
|
|
|
8620
8525
|
for (let n of Object.values(t)) (n.state === X.ACCEPTED || n.state === X.CALLED) && this._transport.allocate(n.id, e);
|
|
8621
8526
|
}
|
|
8622
8527
|
_createSpeakerDetector() {
|
|
8623
|
-
this._transport && this._conversation && (this._volumesDetector = new
|
|
8528
|
+
this._transport && this._conversation && (this._volumesDetector = new Fa(this._transport), this.subscribe(this._volumesDetector, Pa.VOLUMES_DETECTED, this._onVolumesDetected.bind(this)), this._speakerDetector = new La(this._volumesDetector, this._transport, this._conversation.topology), this.subscribe(this._speakerDetector, Ia.SPEAKER_CHANGED, this._onSpeakerChanged.bind(this)), this._localVolumeDetector = new Ma(this._mediaSource));
|
|
8624
8529
|
}
|
|
8625
8530
|
async _createSpecListener() {
|
|
8626
|
-
this._transport && this._volumesDetector && (this._specListener = new
|
|
8531
|
+
this._transport && this._volumesDetector && (this._specListener = new Ra(this._transport, this._volumesDetector, await this._getParticipants()));
|
|
8627
8532
|
}
|
|
8628
8533
|
_logDevices() {
|
|
8629
8534
|
let e = L.getCameras().length, t = L.getMicrophones().length;
|
|
@@ -8637,7 +8542,7 @@ var Ta = class {
|
|
|
8637
8542
|
e.id === this._lastSignalledActiveSpeakerId && (this._lastSignalledActiveSpeakerId = null);
|
|
8638
8543
|
let n = await this._getParticipants();
|
|
8639
8544
|
if (n[e.id]) {
|
|
8640
|
-
t === _.HUNGUP ? this._setParticipantsStatus([e], A.HANGUP) : this._setParticipantsStatus([e], A.ERROR, t), e.mediaSource?.disconnect(), this.
|
|
8545
|
+
t === _.HUNGUP ? this._setParticipantsStatus([e], A.HANGUP) : this._setParticipantsStatus([e], A.ERROR, t), e.mediaSource?.disconnect(), this._conversation && this._conversation.pinnedParticipantIdByRoom.get(null) === e.id && this._conversation.pinnedParticipantIdByRoom.delete(null), this._conversation && this._conversation.roomId && this._conversation.pinnedParticipantIdByRoom.get(this._conversation.roomId) === e.id && this._conversation.pinnedParticipantIdByRoom.delete(this._conversation.roomId);
|
|
8641
8546
|
for (let [t, n] of Object.entries(e.lastRequestedLayouts)) this._streamIdByStreamDescription.delete(t), this._sequenceNumberByStreamDescription.delete(t), this._cooldownTimestampByStreamDescription.delete(t), this._streamWaitTimerByStreamDescription.has(t) && (window.clearTimeout(this._streamWaitTimerByStreamDescription.get(t)), this._streamWaitTimerByStreamDescription.delete(t)), this._sendUpdateDisplayLayout({ [t]: { stopStream: !0 } }, !1);
|
|
8642
8547
|
this._api.unmapDecorativeId(e.id), delete n[e.id], P.onRemoteRemoved(e.externalId, e.markers);
|
|
8643
8548
|
}
|
|
@@ -8699,7 +8604,7 @@ var Ta = class {
|
|
|
8699
8604
|
async _onRemoveParticipant(e) {
|
|
8700
8605
|
z.debug(`Remove participant [${e}]`);
|
|
8701
8606
|
let t = [], n = await this._getParticipants();
|
|
8702
|
-
for (let r = 0; r <=
|
|
8607
|
+
for (let r = 0; r <= Ua; r++) {
|
|
8703
8608
|
let i = n[E.compose(e, r)];
|
|
8704
8609
|
i && t.push(i);
|
|
8705
8610
|
}
|
|
@@ -8817,9 +8722,6 @@ var Ta = class {
|
|
|
8817
8722
|
}
|
|
8818
8723
|
this._transport?.getTopology() === J.SERVER && await this._sendUpdateDisplayLayout(t);
|
|
8819
8724
|
}
|
|
8820
|
-
async requestDisplayLayout(e) {
|
|
8821
|
-
return this._displayLayoutRequester.request(e);
|
|
8822
|
-
}
|
|
8823
8725
|
async feedback(e) {
|
|
8824
8726
|
return this._signaling.feedback(e);
|
|
8825
8727
|
}
|
|
@@ -8888,7 +8790,7 @@ var Ta = class {
|
|
|
8888
8790
|
});
|
|
8889
8791
|
}
|
|
8890
8792
|
}
|
|
8891
|
-
if (r && r.length && (z.warn("Could not allocate one or more participants", r), t)) throw new
|
|
8793
|
+
if (r && r.length && (z.warn("Could not allocate one or more participants", r), t)) throw new Wa("Could not allocate one or more participants", r);
|
|
8892
8794
|
}
|
|
8893
8795
|
async _cleanupCooldownQueue() {
|
|
8894
8796
|
let e = {}, t = this._cooldownTimestampByStreamDescription.entries();
|
|
@@ -8896,7 +8798,7 @@ var Ta = class {
|
|
|
8896
8798
|
let n = t.next();
|
|
8897
8799
|
if (n.done) break;
|
|
8898
8800
|
let r = n.value;
|
|
8899
|
-
if (r[1] +
|
|
8801
|
+
if (r[1] + Ha > Date.now()) break;
|
|
8900
8802
|
let i = r[0];
|
|
8901
8803
|
await this._stopStreaming(i), e[i] = { stopStream: !0 };
|
|
8902
8804
|
} while (!0);
|
|
@@ -9618,7 +9520,7 @@ var Ta = class {
|
|
|
9618
9520
|
n.state = X.CALLED, n.mediaSettings = O(e.participant?.mediaSettings), n.participantState = E.mapParticipantState(e.participant), n.roles = e.participant?.roles || [], this._setParticipantsStatus([n], A.WAITING), this._state !== "IDLE" && this._transport && this._transport.allocate(n.id, !0), P.onParticipantAdded(n.externalId, n.markers), await this._changeRemoteMediaSettings(t, n.mediaSettings), await this._changeRemoteParticipantState(t, n.participantState), this._invokeRolesChangedCallbackIfNeeded(n);
|
|
9619
9521
|
}
|
|
9620
9522
|
async _onJoinedParticipant(e) {
|
|
9621
|
-
z.debug(`Participant joined [${e.participantId}]`), this._statFirstMediaReceived.
|
|
9523
|
+
z.debug(`Participant joined [${e.participantId}]`), this._statFirstMediaReceived.markOnJoin(this._transport?.getTopology());
|
|
9622
9524
|
let t = E.composeMessageId(e), n = await this._getParticipant(t);
|
|
9623
9525
|
if (n && n.state === X.ACCEPTED) {
|
|
9624
9526
|
z.warn(`Participant [${t}] is already in conversation and is active`);
|
|
@@ -10056,7 +9958,7 @@ var Ta = class {
|
|
|
10056
9958
|
}
|
|
10057
9959
|
_removeVideoTrack(e, t, n) {}
|
|
10058
9960
|
_onTopologyChanged(e) {
|
|
10059
|
-
e === J.DIRECT && (this._onRemoteSignalledStall([]), this._onAudioMixStall(!1)), this._conversation && (this._conversation.topology = e, this._changeFeatureSet(), this._forceOpenTransportForAloneInCall()), this._audioOutput.destroy();
|
|
9961
|
+
this._statFirstMediaReceived.markTopologyChanged(e), e === J.DIRECT && (this._onRemoteSignalledStall([]), this._onAudioMixStall(!1)), this._conversation && (this._conversation.topology = e, this._changeFeatureSet(), this._forceOpenTransportForAloneInCall()), this._audioOutput.destroy();
|
|
10060
9962
|
}
|
|
10061
9963
|
_onAudioMixStall(e) {
|
|
10062
9964
|
this._audioMixStalled !== e && (this._audioMixStalled = e, z.debug("Audio mix stalled:", e), P.onLocalStatus(e ? A.RECONNECT : A.CONNECTED));
|
|
@@ -10304,19 +10206,19 @@ var Ta = class {
|
|
|
10304
10206
|
}
|
|
10305
10207
|
};
|
|
10306
10208
|
h(Q, "_current", void 0), h(Q, "_activationMutex", void 0), h(Q, "_delayedHangup", !1), h(Q, "_abortController", null);
|
|
10307
|
-
var
|
|
10209
|
+
var Wa = class e extends Error {
|
|
10308
10210
|
constructor(t, n) {
|
|
10309
10211
|
super(t), h(this, "participantErrors", void 0), Object.setPrototypeOf(this, e.prototype), this.participantErrors = n;
|
|
10310
10212
|
}
|
|
10311
|
-
},
|
|
10312
|
-
function
|
|
10313
|
-
|
|
10213
|
+
}, Ga = null, Ka = null;
|
|
10214
|
+
function qa() {
|
|
10215
|
+
Ga = null, Ka = null;
|
|
10314
10216
|
}
|
|
10315
|
-
function
|
|
10217
|
+
function Ja(e) {
|
|
10316
10218
|
return e?.endsWith("/") ? e.slice(0, -1) : e;
|
|
10317
10219
|
}
|
|
10318
|
-
async function
|
|
10319
|
-
let n =
|
|
10220
|
+
async function Ya(e = null, t) {
|
|
10221
|
+
let n = Ja(e ?? D.apiBaseUrl);
|
|
10320
10222
|
if (n) return n;
|
|
10321
10223
|
if ((t ?? D.apiEnv) !== "AUTO") return D.apiEndpoint(t);
|
|
10322
10224
|
try {
|
|
@@ -10331,20 +10233,20 @@ async function Xa(e = null, t) {
|
|
|
10331
10233
|
return z.warn("Failed to resolve API endpoint using DNS, default is used", e), D.apiEndpoint(t);
|
|
10332
10234
|
}
|
|
10333
10235
|
}
|
|
10334
|
-
async function
|
|
10335
|
-
return
|
|
10236
|
+
async function Xa() {
|
|
10237
|
+
return Ga || Ka || (Ka = Ya(), Ga = await Ka, Ka = null, Ga);
|
|
10336
10238
|
}
|
|
10337
|
-
async function
|
|
10239
|
+
async function Za(e, t = {}, n = !1) {
|
|
10338
10240
|
if (!window.Blob || !window.navigator.sendBeacon) return;
|
|
10339
|
-
await
|
|
10340
|
-
let r =
|
|
10341
|
-
window.navigator.sendBeacon(`${
|
|
10241
|
+
await Xa();
|
|
10242
|
+
let r = to(e, t, n), i = new window.Blob([r], { type: "application/x-www-form-urlencoded" });
|
|
10243
|
+
window.navigator.sendBeacon(`${Ga}/fb.do`, i);
|
|
10342
10244
|
}
|
|
10343
|
-
async function
|
|
10344
|
-
return await
|
|
10245
|
+
async function Qa(e, t = {}, n = !1, r) {
|
|
10246
|
+
return await Xa(), $a(to(e, t, n), r);
|
|
10345
10247
|
}
|
|
10346
|
-
async function
|
|
10347
|
-
let n = `${t ??
|
|
10248
|
+
async function $a(e, t) {
|
|
10249
|
+
let n = `${t ?? Ga}/fb.do`, r = new AbortController(), i = setTimeout(() => r.abort(new v(_.NETWORK_ERROR)), D.apiTimeout), a = await fetch(n, {
|
|
10348
10250
|
method: "POST",
|
|
10349
10251
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
10350
10252
|
body: e,
|
|
@@ -10360,7 +10262,7 @@ async function eo(e, t) {
|
|
|
10360
10262
|
if (!a.ok || Object.hasOwn(s, "error_msg")) throw s;
|
|
10361
10263
|
return s;
|
|
10362
10264
|
}
|
|
10363
|
-
async function
|
|
10265
|
+
async function eo(e, t) {
|
|
10364
10266
|
try {
|
|
10365
10267
|
let n = await fetch(e, {
|
|
10366
10268
|
method: "POST",
|
|
@@ -10373,7 +10275,7 @@ async function to(e, t) {
|
|
|
10373
10275
|
throw z.warn("Failed to send form data", e), e;
|
|
10374
10276
|
}
|
|
10375
10277
|
}
|
|
10376
|
-
function
|
|
10278
|
+
function to(e, t = {}, n = !1) {
|
|
10377
10279
|
t.method = e, t.format = "JSON", t.application_key || (t.application_key = D.apiKey), n || (w.sessionKey ? t.session_key = w.sessionKey : w.accessToken && (t.access_token = w.accessToken));
|
|
10378
10280
|
for (let [e, n] of Object.entries(t)) typeof n == "object" && (t[e] = JSON.stringify(n));
|
|
10379
10281
|
let r = "";
|
|
@@ -10382,7 +10284,7 @@ function no(e, t = {}, n = !1) {
|
|
|
10382
10284
|
}
|
|
10383
10285
|
//#endregion
|
|
10384
10286
|
//#region src/abstract/BaseApi.ts
|
|
10385
|
-
var
|
|
10287
|
+
var no = class {
|
|
10386
10288
|
constructor() {
|
|
10387
10289
|
h(this, "_abortSignal", void 0);
|
|
10388
10290
|
}
|
|
@@ -10417,19 +10319,19 @@ var ro = class {
|
|
|
10417
10319
|
return Date.now();
|
|
10418
10320
|
}
|
|
10419
10321
|
cleanup() {}
|
|
10420
|
-
},
|
|
10322
|
+
}, ro = 700, io = 3e3, ao = class extends no {
|
|
10421
10323
|
constructor(...e) {
|
|
10422
10324
|
super(...e), h(this, "_userId", null), h(this, "_uuid", void 0), h(this, "_externalUidsCache", /* @__PURE__ */ new Map()), h(this, "_decorativeIdToInitialId", /* @__PURE__ */ new Map()), h(this, "_initialIdToDecorativeId", /* @__PURE__ */ new Map());
|
|
10423
10325
|
}
|
|
10424
10326
|
async _callUnsafe(e, t = {}, n = !1) {
|
|
10425
10327
|
let r = async (i) => {
|
|
10426
10328
|
try {
|
|
10427
|
-
return await
|
|
10329
|
+
return await Qa(e, t, n);
|
|
10428
10330
|
} catch (t) {
|
|
10429
10331
|
if (!Object.hasOwn(t, "error_msg")) {
|
|
10430
10332
|
i++;
|
|
10431
10333
|
let n = Object.getOwnPropertyNames(t).map((e) => `${e}: ${JSON.stringify(t[e])}`);
|
|
10432
|
-
if (z.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (z.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < D.apiMaxAttempt) return await E.delay(Math.min(i *
|
|
10334
|
+
if (z.debug(`${e} network error, attempt ${i}: ${n.join("\n ")}`), this._abortSignal?.aborted && (z.debug(`${e} aborted`), this._abortSignal.throwIfAborted()), i < D.apiMaxAttempt) return await E.delay(Math.min(i * ro, io), { signal: this._abortSignal }), r(i);
|
|
10433
10335
|
}
|
|
10434
10336
|
throw z.warn(e, "error", t), t;
|
|
10435
10337
|
}
|
|
@@ -10452,7 +10354,7 @@ var ro = class {
|
|
|
10452
10354
|
code: r.error_code
|
|
10453
10355
|
};
|
|
10454
10356
|
if (r instanceof v) throw r;
|
|
10455
|
-
if (r.custom_error && (a.custom_error = r.custom_error),
|
|
10357
|
+
if (r.custom_error && (a.custom_error = r.custom_error), oo(r)) switch (r.error_code) {
|
|
10456
10358
|
case 1101:
|
|
10457
10359
|
i = _.SERVICE_DISABLED;
|
|
10458
10360
|
break;
|
|
@@ -10517,7 +10419,7 @@ var ro = class {
|
|
|
10517
10419
|
version: 1,
|
|
10518
10420
|
items: e
|
|
10519
10421
|
};
|
|
10520
|
-
D.clientStatsPlatform && (t.platform = D.clientStatsPlatform),
|
|
10422
|
+
D.clientStatsPlatform && (t.platform = D.clientStatsPlatform), Za("vchat.clientStats", { data: JSON.stringify(t) });
|
|
10521
10423
|
}
|
|
10522
10424
|
logClientEvents(e) {
|
|
10523
10425
|
let t = {
|
|
@@ -10527,7 +10429,7 @@ var ro = class {
|
|
|
10527
10429
|
version: 1,
|
|
10528
10430
|
items: e
|
|
10529
10431
|
};
|
|
10530
|
-
D.clientStatsPlatform && (t.platform = D.clientStatsPlatform),
|
|
10432
|
+
D.clientStatsPlatform && (t.platform = D.clientStatsPlatform), Za("vchat.clientEvents", { data: JSON.stringify(t) });
|
|
10531
10433
|
}
|
|
10532
10434
|
async uploadDebugLogs(e, t, n, r) {
|
|
10533
10435
|
let i = {
|
|
@@ -10538,7 +10440,7 @@ var ro = class {
|
|
|
10538
10440
|
}, a = await this._callUnsafe("vchat.getLogUploadUrl", i), o = new FormData(), s = new Blob([r], { type: "application/json" });
|
|
10539
10441
|
o.append("file", s, "log.json");
|
|
10540
10442
|
let c = new URL(a.upload_url);
|
|
10541
|
-
return c.searchParams.append("size", s.size.toString()),
|
|
10443
|
+
return c.searchParams.append("size", s.size.toString()), eo(c.toString(), o);
|
|
10542
10444
|
}
|
|
10543
10445
|
async joinConversation(e, t = !1, n) {
|
|
10544
10446
|
let r = {
|
|
@@ -10705,7 +10607,7 @@ var ro = class {
|
|
|
10705
10607
|
conversationId: e,
|
|
10706
10608
|
reason: t
|
|
10707
10609
|
};
|
|
10708
|
-
D.anonymToken && (n.anonymToken = D.anonymToken),
|
|
10610
|
+
D.anonymToken && (n.anonymToken = D.anonymToken), Za("vchat.hangupConversation", n);
|
|
10709
10611
|
}
|
|
10710
10612
|
async removeHistoryRecords(e) {
|
|
10711
10613
|
await this._call("vchat.removeHistoryRecords", { recordIds: e.join(",") });
|
|
@@ -10740,16 +10642,16 @@ var ro = class {
|
|
|
10740
10642
|
return (await this._call("system.getInfo")).serverTime;
|
|
10741
10643
|
}
|
|
10742
10644
|
};
|
|
10743
|
-
function
|
|
10645
|
+
function oo(e) {
|
|
10744
10646
|
return typeof e == "object" && !!e && "error_code" in e && "error_msg" in e;
|
|
10745
10647
|
}
|
|
10746
10648
|
//#endregion
|
|
10747
10649
|
//#region src/enums/RecordRole.ts
|
|
10748
|
-
var
|
|
10650
|
+
var so = /* @__PURE__ */ function(e) {
|
|
10749
10651
|
return e.KING = "KING", e.PAWN = "PAWN", e;
|
|
10750
|
-
}(
|
|
10652
|
+
}(so || {}), co = /* @__PURE__ */ function(e) {
|
|
10751
10653
|
return e.OFF = "0", e.ON = "1", e;
|
|
10752
|
-
}({}),
|
|
10654
|
+
}({}), lo = class {
|
|
10753
10655
|
constructor(e) {
|
|
10754
10656
|
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;
|
|
10755
10657
|
}
|
|
@@ -10772,12 +10674,12 @@ var co = /* @__PURE__ */ function(e) {
|
|
|
10772
10674
|
let e = this._queue[this._readCursor];
|
|
10773
10675
|
return e && (this._moveReadCursor = !1, this._queue[this._readCursor] = null, this._readCursor = this.nextCursor(this._readCursor), --this._left), e;
|
|
10774
10676
|
}
|
|
10775
|
-
},
|
|
10677
|
+
}, uo = class {
|
|
10776
10678
|
constructor(e, t, n, r = null) {
|
|
10777
10679
|
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 = E.uuid(), this._apiKey = t, this._callToken = n, this._apiEnv = e, this._baseApiUrl = r;
|
|
10778
10680
|
}
|
|
10779
10681
|
async authorize() {
|
|
10780
|
-
let e = await
|
|
10682
|
+
let e = await Qa("auth.anonymLogin", {
|
|
10781
10683
|
session_data: {
|
|
10782
10684
|
device_id: this._uuid,
|
|
10783
10685
|
client_version: D.appVersion,
|
|
@@ -10786,18 +10688,18 @@ var co = /* @__PURE__ */ function(e) {
|
|
|
10786
10688
|
version: 3
|
|
10787
10689
|
},
|
|
10788
10690
|
application_key: this._apiKey
|
|
10789
|
-
}, !0, await
|
|
10691
|
+
}, !0, await Ya(this._baseApiUrl, this._apiEnv));
|
|
10790
10692
|
return E.isObject(e) && !("error_msg" in e) ? (this._sessionKey = e.session_key, !0) : !1;
|
|
10791
10693
|
}
|
|
10792
10694
|
async hangupConversation(e) {
|
|
10793
|
-
await
|
|
10695
|
+
await Qa("vchat.hangupConversation", {
|
|
10794
10696
|
conversationId: e,
|
|
10795
10697
|
reason: _.HUNGUP,
|
|
10796
10698
|
application_key: this._apiKey,
|
|
10797
10699
|
session_key: this._sessionKey
|
|
10798
|
-
}, !0, await
|
|
10700
|
+
}, !0, await Ya(this._baseApiUrl, this._apiEnv));
|
|
10799
10701
|
}
|
|
10800
|
-
}, $,
|
|
10702
|
+
}, $, fo = null, po = {
|
|
10801
10703
|
getCameras: L.getCameras,
|
|
10802
10704
|
getMicrophones: L.getMicrophones,
|
|
10803
10705
|
getOutput: L.getOutput,
|
|
@@ -10823,33 +10725,33 @@ var co = /* @__PURE__ */ function(e) {
|
|
|
10823
10725
|
baseChromeVersion: L.baseChromeVersion,
|
|
10824
10726
|
getAudioContext: L.getAudioContext,
|
|
10825
10727
|
isAudioShareSupported: L.isAudioShareSupported
|
|
10826
|
-
},
|
|
10827
|
-
function
|
|
10828
|
-
|
|
10728
|
+
}, mo = { participantMarkerCompare: E.participantMarkerCompare };
|
|
10729
|
+
function ho(e) {
|
|
10730
|
+
fo = e;
|
|
10829
10731
|
}
|
|
10830
|
-
function
|
|
10732
|
+
function go(e) {
|
|
10831
10733
|
D.videoEffects = e;
|
|
10832
10734
|
}
|
|
10833
|
-
function
|
|
10735
|
+
function _o(e) {
|
|
10834
10736
|
D.audioEffects = e;
|
|
10835
10737
|
}
|
|
10836
|
-
function
|
|
10738
|
+
function vo(e, t = null, n = {}, r = 1) {
|
|
10837
10739
|
D.vmoji = e, D.vmojiOptions = {
|
|
10838
10740
|
protocolVersion: r,
|
|
10839
10741
|
renderingOptions: n
|
|
10840
10742
|
}, t && e.setSDK(t);
|
|
10841
10743
|
}
|
|
10842
|
-
async function
|
|
10843
|
-
if (D.set(t), $ || ($ = new
|
|
10744
|
+
async function yo(t) {
|
|
10745
|
+
if (D.set(t), $ || ($ = new ao()), e.disableLog(!D.debug), z.toggle(D.debug), z.log(`Calls SDK ${D.sdkVersion}`, t), await L.init(), !L.isBrowserSupported()) throw new v(x.UNSUPPORTED);
|
|
10844
10746
|
z.log("UserAgent:", navigator.userAgent), z.log("Screen resolution:", `${window.screen.width}x${window.screen.height}`), z.log("Permissions:", `Camera: ${L.hasCameraPermission()}, Mic: ${L.hasMicrophonePermission()}`), z.log("Simulcast:", `${t.simulcast} => ${D.simulcast}`);
|
|
10845
10747
|
}
|
|
10846
|
-
async function
|
|
10748
|
+
async function bo(e, t = [S.AUDIO], n = "", r = !1, i = !1, a, o, s) {
|
|
10847
10749
|
let c = [];
|
|
10848
|
-
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]),
|
|
10750
|
+
return Array.isArray(e) ? c = e.length ? e : [] : e && (c = [e]), xo([], ra.USER, t, n, r, i, a, c, o, s);
|
|
10849
10751
|
}
|
|
10850
|
-
async function
|
|
10752
|
+
async function xo(e, t = ra.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
10851
10753
|
if (Q.current()) throw z.error("There is already active call"), new v(_.FAILED);
|
|
10852
|
-
return new Q($,
|
|
10754
|
+
return new Q($, fo).onStart({
|
|
10853
10755
|
opponentIds: e,
|
|
10854
10756
|
opponentType: t,
|
|
10855
10757
|
mediaOptions: n,
|
|
@@ -10862,37 +10764,37 @@ async function So(e, t = ra.USER, n, r = "", i = !1, a = !1, o, s, c, l) {
|
|
|
10862
10764
|
conversationId: l
|
|
10863
10765
|
});
|
|
10864
10766
|
}
|
|
10865
|
-
async function
|
|
10866
|
-
return
|
|
10767
|
+
async function So(e, t) {
|
|
10768
|
+
return Co(e, T.USER, void 0, t);
|
|
10867
10769
|
}
|
|
10868
|
-
async function
|
|
10770
|
+
async function Co(e, t = T.USER, n, r, i, a) {
|
|
10869
10771
|
if (e === Q.id()) throw Error("Push has already been processed");
|
|
10870
|
-
return a && $.setUserId(a), new Q($,
|
|
10772
|
+
return a && $.setUserId(a), new Q($, fo).onPush(e, t, n, r, i);
|
|
10871
10773
|
}
|
|
10872
|
-
async function
|
|
10873
|
-
return e && (D.authToken = e), t !== void 0 && D.apiBaseUrl !== t && (D.apiBaseUrl = t,
|
|
10774
|
+
async function wo(e, t) {
|
|
10775
|
+
return e && (D.authToken = e), t !== void 0 && D.apiBaseUrl !== t && (D.apiBaseUrl = t, qa()), $.authorize();
|
|
10874
10776
|
}
|
|
10875
|
-
async function
|
|
10876
|
-
return
|
|
10777
|
+
async function To(e = [S.AUDIO]) {
|
|
10778
|
+
return qs().accept(e);
|
|
10877
10779
|
}
|
|
10878
|
-
async function
|
|
10780
|
+
async function Eo() {
|
|
10879
10781
|
let e = Q.current();
|
|
10880
10782
|
if (e) return e.decline();
|
|
10881
10783
|
}
|
|
10882
|
-
async function
|
|
10883
|
-
return
|
|
10784
|
+
async function Do(e, t = [S.AUDIO]) {
|
|
10785
|
+
return Oo(e, t);
|
|
10884
10786
|
}
|
|
10885
|
-
async function
|
|
10787
|
+
async function Oo(e, t, n) {
|
|
10886
10788
|
if (Q.current()) throw z.error("There is already active call"), new v(_.FAILED);
|
|
10887
|
-
return new Q($,
|
|
10789
|
+
return new Q($, fo).onJoin({
|
|
10888
10790
|
conversationId: e,
|
|
10889
10791
|
mediaOptions: t,
|
|
10890
10792
|
chatId: n
|
|
10891
10793
|
});
|
|
10892
10794
|
}
|
|
10893
|
-
async function
|
|
10795
|
+
async function ko(e, t = [S.AUDIO], n, r, i, a) {
|
|
10894
10796
|
if (Q.current()) throw z.error("There is already active call"), new v(_.FAILED);
|
|
10895
|
-
return n && (D.anonymToken = n), new Q($,
|
|
10797
|
+
return n && (D.anonymToken = n), new Q($, fo).onJoin({
|
|
10896
10798
|
joinLink: e,
|
|
10897
10799
|
mediaOptions: t,
|
|
10898
10800
|
observedIds: r,
|
|
@@ -10900,26 +10802,26 @@ async function Ao(e, t = [S.AUDIO], n, r, i, a) {
|
|
|
10900
10802
|
onFastJoin: a
|
|
10901
10803
|
});
|
|
10902
10804
|
}
|
|
10903
|
-
async function
|
|
10805
|
+
async function Ao() {
|
|
10904
10806
|
let e = Q.current();
|
|
10905
10807
|
if (e) return e.hangup();
|
|
10906
10808
|
Q.hangupAfterInit();
|
|
10907
10809
|
}
|
|
10908
|
-
async function
|
|
10810
|
+
async function jo(e, t) {
|
|
10909
10811
|
let n = Array.isArray(e) ? e : [e], r = Q.current();
|
|
10910
10812
|
r && await r.addParticipant(n, t);
|
|
10911
10813
|
}
|
|
10912
|
-
async function
|
|
10814
|
+
async function Mo(e, t) {
|
|
10913
10815
|
let n = Q.current();
|
|
10914
10816
|
if (n) {
|
|
10915
10817
|
let r = e.map((e) => E.composeUserId(e));
|
|
10916
10818
|
await n.addParticipantLegacy(r, t);
|
|
10917
10819
|
}
|
|
10918
10820
|
}
|
|
10919
|
-
async function
|
|
10920
|
-
return
|
|
10821
|
+
async function No(e, t = !1) {
|
|
10822
|
+
return Po((await $.getOkIdsByExternalIds([e]))[0], t);
|
|
10921
10823
|
}
|
|
10922
|
-
async function
|
|
10824
|
+
async function Po(e, t = !1) {
|
|
10923
10825
|
let n = Q.current();
|
|
10924
10826
|
if (n) try {
|
|
10925
10827
|
await n.removeParticipant(E.composeUserId(e), t);
|
|
@@ -10927,13 +10829,13 @@ async function Fo(e, t = !1) {
|
|
|
10927
10829
|
z.warn(`Failed to remove participant ${e}. Perhaps he is no longer on the call. ${t}`);
|
|
10928
10830
|
}
|
|
10929
10831
|
}
|
|
10930
|
-
async function
|
|
10832
|
+
async function Fo(e, t) {
|
|
10931
10833
|
let n = Q.current();
|
|
10932
10834
|
if (e === "videoinput" && ut.contains(t)) return D.videoFacingMode = t, n ? (L.isMobile() && n.stopVideoTrack(), n.changeDevice(e)) : void 0;
|
|
10933
10835
|
if (!await L._saveDeviceId(e, t)) throw Error(`Device not found: ${t}`);
|
|
10934
10836
|
if (n) return n.changeDevice(e);
|
|
10935
10837
|
}
|
|
10936
|
-
async function
|
|
10838
|
+
async function Io(e) {
|
|
10937
10839
|
let t = typeof e == "object" ? {
|
|
10938
10840
|
...e,
|
|
10939
10841
|
fastScreenSharing: e.captureScreen && e.fastScreenSharing,
|
|
@@ -10945,31 +10847,31 @@ async function Lo(e) {
|
|
|
10945
10847
|
}, n = Q.current();
|
|
10946
10848
|
return n ? n.toggleScreenCapturing(t) : Promise.reject();
|
|
10947
10849
|
}
|
|
10948
|
-
function
|
|
10850
|
+
function Lo(e) {
|
|
10949
10851
|
let t = Q.current();
|
|
10950
10852
|
t && t.toggleAnimojiCapturing(e);
|
|
10951
10853
|
}
|
|
10952
|
-
async function
|
|
10854
|
+
async function Ro(e, t = !1) {
|
|
10953
10855
|
let n = Q.current();
|
|
10954
10856
|
n && await n.setVideoStream(e, t);
|
|
10955
10857
|
}
|
|
10956
|
-
async function
|
|
10858
|
+
async function zo(e) {
|
|
10957
10859
|
let t = Q.current();
|
|
10958
10860
|
t && await t.toggleLocalVideo(e);
|
|
10959
10861
|
}
|
|
10960
|
-
async function
|
|
10862
|
+
async function Bo(e) {
|
|
10961
10863
|
let t = Q.current();
|
|
10962
10864
|
t && await t.toggleLocalAudio(e);
|
|
10963
10865
|
}
|
|
10964
|
-
async function
|
|
10866
|
+
async function Vo(e) {
|
|
10965
10867
|
let t = Q.current();
|
|
10966
10868
|
if (t) return t.setLocalResolution(e);
|
|
10967
10869
|
}
|
|
10968
|
-
async function
|
|
10870
|
+
async function Ho(e) {
|
|
10969
10871
|
let t = Q.current();
|
|
10970
10872
|
t && await t.changePriorities(e);
|
|
10971
10873
|
}
|
|
10972
|
-
async function
|
|
10874
|
+
async function Uo(e, t) {
|
|
10973
10875
|
let n = Q.current();
|
|
10974
10876
|
if (n) {
|
|
10975
10877
|
let r;
|
|
@@ -10980,32 +10882,28 @@ async function Wo(e, t) {
|
|
|
10980
10882
|
await n.changeParticipantState(e, r);
|
|
10981
10883
|
}
|
|
10982
10884
|
}
|
|
10983
|
-
async function
|
|
10885
|
+
async function Wo(e) {
|
|
10984
10886
|
let t = Q.current();
|
|
10985
10887
|
t && await t.hold(e);
|
|
10986
10888
|
}
|
|
10987
|
-
async function
|
|
10889
|
+
async function Go() {
|
|
10988
10890
|
let e = Q.current();
|
|
10989
10891
|
e && await e.putHandsDown();
|
|
10990
10892
|
}
|
|
10991
|
-
async function
|
|
10893
|
+
async function Ko(e) {
|
|
10992
10894
|
let t = Q.current();
|
|
10993
10895
|
t && await t.updateDisplayLayout(e);
|
|
10994
10896
|
}
|
|
10995
|
-
async function
|
|
10996
|
-
|
|
10997
|
-
t && await t.requestDisplayLayout(e);
|
|
10998
|
-
}
|
|
10999
|
-
async function Yo(e, t, n = !1) {
|
|
11000
|
-
return Xo((await $.getOkIdsByExternalIds([e]))[0], Z.getDeviceIdx(e), t, n);
|
|
10897
|
+
async function qo(e, t, n = !1) {
|
|
10898
|
+
return Jo((await $.getOkIdsByExternalIds([e]))[0], Z.getDeviceIdx(e), t, n);
|
|
11001
10899
|
}
|
|
11002
|
-
async function
|
|
10900
|
+
async function Jo(e, t, n, r = !1) {
|
|
11003
10901
|
let i = Q.current();
|
|
11004
10902
|
i && await i.grantRoles(E.composeParticipantId(e, T.USER, t), n, r);
|
|
11005
10903
|
}
|
|
11006
|
-
async function
|
|
10904
|
+
async function Yo({ externalId: e = null, muteStates: t, requestedMedia: n = [], roomId: r = null }) {
|
|
11007
10905
|
let i = null;
|
|
11008
|
-
return e && (i = (await $.getOkIdsByExternalIds([e]))[0]),
|
|
10906
|
+
return e && (i = (await $.getOkIdsByExternalIds([e]))[0]), Xo({
|
|
11009
10907
|
uid: i,
|
|
11010
10908
|
muteStates: t,
|
|
11011
10909
|
requestedMedia: n,
|
|
@@ -11013,70 +10911,70 @@ async function Zo({ externalId: e = null, muteStates: t, requestedMedia: n = [],
|
|
|
11013
10911
|
roomId: r
|
|
11014
10912
|
});
|
|
11015
10913
|
}
|
|
11016
|
-
async function
|
|
10914
|
+
async function Xo({ uid: e = null, muteStates: t, requestedMedia: n = [], deviceIdx: r = 0, roomId: i = null }) {
|
|
11017
10915
|
let a = Q.current();
|
|
11018
10916
|
if (a) {
|
|
11019
10917
|
let o = e ? E.composeParticipantId(e, T.USER, r) : null;
|
|
11020
10918
|
await a.muteParticipant(o, t, n, i);
|
|
11021
10919
|
}
|
|
11022
10920
|
}
|
|
11023
|
-
async function
|
|
11024
|
-
return
|
|
10921
|
+
async function Zo(e, t = !1, n = null) {
|
|
10922
|
+
return Qo((await $.getOkIdsByExternalIds([e]))[0], t, Z.getDeviceIdx(e), n);
|
|
11025
10923
|
}
|
|
11026
|
-
async function
|
|
10924
|
+
async function Qo(e, t = !1, n = 0, r = null) {
|
|
11027
10925
|
let i = Q.current();
|
|
11028
10926
|
i && await i.pinParticipant(E.composeParticipantId(e, T.USER, n), t, r);
|
|
11029
10927
|
}
|
|
11030
|
-
async function
|
|
10928
|
+
async function $o(e) {
|
|
11031
10929
|
let t = Q.current();
|
|
11032
10930
|
t && await t.updateMediaModifiers(e);
|
|
11033
10931
|
}
|
|
11034
|
-
async function
|
|
10932
|
+
async function es(e) {
|
|
11035
10933
|
let t = Q.current();
|
|
11036
10934
|
t && await t.enableVideoSuspend(e);
|
|
11037
10935
|
}
|
|
11038
|
-
async function
|
|
10936
|
+
async function ts(e) {
|
|
11039
10937
|
let t = Q.current();
|
|
11040
10938
|
t && await t.enableVideoSuspendSuggest(e);
|
|
11041
10939
|
}
|
|
11042
|
-
async function
|
|
10940
|
+
async function ns(e) {
|
|
11043
10941
|
let t = Q.current();
|
|
11044
10942
|
t && await t.changeOptions(e);
|
|
11045
10943
|
}
|
|
11046
|
-
async function
|
|
10944
|
+
async function rs(e, t = null) {
|
|
11047
10945
|
let n = null;
|
|
11048
|
-
return t && (n = (await $.getOkIdsByExternalIds([t]))[0]),
|
|
10946
|
+
return t && (n = (await $.getOkIdsByExternalIds([t]))[0]), is(e, n);
|
|
11049
10947
|
}
|
|
11050
|
-
async function
|
|
10948
|
+
async function is(e, t = null) {
|
|
11051
10949
|
let n = Q.current();
|
|
11052
10950
|
if (n) {
|
|
11053
10951
|
let r = t ? E.composeUserId(t) : null;
|
|
11054
10952
|
await n.chatMessage(e, r);
|
|
11055
10953
|
}
|
|
11056
10954
|
}
|
|
11057
|
-
async function
|
|
10955
|
+
async function as(e = 10) {
|
|
11058
10956
|
let t = Q.current();
|
|
11059
10957
|
if (t) return t.chatHistory(e);
|
|
11060
10958
|
}
|
|
11061
|
-
async function
|
|
10959
|
+
async function os(e, t = null) {
|
|
11062
10960
|
let n = null;
|
|
11063
|
-
return t && (n = (await $.getOkIdsByExternalIds([t]))[0]),
|
|
10961
|
+
return t && (n = (await $.getOkIdsByExternalIds([t]))[0]), ss(e, n, Z.getDeviceIdx(t));
|
|
11064
10962
|
}
|
|
11065
|
-
async function
|
|
10963
|
+
async function ss(e, t = null, n = 0) {
|
|
11066
10964
|
let r = Q.current();
|
|
11067
10965
|
if (r) {
|
|
11068
10966
|
let i = t ? E.composeParticipantId(t, T.USER, n) : null;
|
|
11069
10967
|
await r.customData(e, i);
|
|
11070
10968
|
}
|
|
11071
10969
|
}
|
|
11072
|
-
async function
|
|
10970
|
+
async function cs(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, waitForAdmin: r = !1, closedConversation: i = !1 } = {}, a) {
|
|
11073
10971
|
return (await $.createConversation(a ?? E.uuid(), e, t, {
|
|
11074
10972
|
onlyAdminCanShareMovie: n,
|
|
11075
10973
|
waitForAdmin: r,
|
|
11076
10974
|
closedConversation: i
|
|
11077
10975
|
})).join_link;
|
|
11078
10976
|
}
|
|
11079
|
-
async function
|
|
10977
|
+
async function ls(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, audioOnly: r = !1 } = {}, i) {
|
|
11080
10978
|
let a = Z.fromIds(i), o = await $.getOkIdsByExternalIds(a);
|
|
11081
10979
|
return (await $.createConversation(E.uuid(), e, t, {
|
|
11082
10980
|
onlyAdminCanShareMovie: n,
|
|
@@ -11084,37 +10982,37 @@ async function ds(e = "", t = !1, { onlyAdminCanShareMovie: n = !1, audioOnly: r
|
|
|
11084
10982
|
audioOnly: r
|
|
11085
10983
|
}, o)).join_link;
|
|
11086
10984
|
}
|
|
11087
|
-
async function
|
|
10985
|
+
async function us() {
|
|
11088
10986
|
let e = Q.current();
|
|
11089
10987
|
return e ? e.createJoinLink() : Promise.reject();
|
|
11090
10988
|
}
|
|
11091
|
-
async function
|
|
10989
|
+
async function ds() {
|
|
11092
10990
|
let e = Q.current();
|
|
11093
10991
|
return e ? e.removeJoinLink() : Promise.reject();
|
|
11094
10992
|
}
|
|
11095
|
-
async function
|
|
10993
|
+
async function fs(e, t) {
|
|
11096
10994
|
return $.getAnonymTokenByLink(e, t);
|
|
11097
10995
|
}
|
|
11098
|
-
function
|
|
10996
|
+
function ps(e) {
|
|
11099
10997
|
let t = Q.current();
|
|
11100
10998
|
t && t.setVolume(e);
|
|
11101
10999
|
}
|
|
11102
|
-
function
|
|
11000
|
+
function ms(e) {
|
|
11103
11001
|
D.forceRelayPolicy = e;
|
|
11104
11002
|
}
|
|
11105
|
-
async function
|
|
11003
|
+
async function hs(e = !1, t = null, n = null, r = "DIRECT_LINK", i = null, a = null) {
|
|
11106
11004
|
let o = Q.current();
|
|
11107
11005
|
return o ? o.startStream(e, t, n, r, i, a) : Promise.reject();
|
|
11108
11006
|
}
|
|
11109
|
-
async function
|
|
11007
|
+
async function gs(e = null, t) {
|
|
11110
11008
|
let n = Q.current();
|
|
11111
11009
|
return n ? n.stopStream(e, t) : Promise.reject();
|
|
11112
11010
|
}
|
|
11113
|
-
async function
|
|
11011
|
+
async function _s(e = null) {
|
|
11114
11012
|
let t = Q.current();
|
|
11115
11013
|
return t ? t.publishStream(e) : Promise.reject();
|
|
11116
11014
|
}
|
|
11117
|
-
async function
|
|
11015
|
+
async function vs(e, t, n = !1, r = null) {
|
|
11118
11016
|
let i = Q.current();
|
|
11119
11017
|
if (!i) return Promise.reject();
|
|
11120
11018
|
let a, o, s = [];
|
|
@@ -11124,23 +11022,23 @@ async function bs(e, t, n = !1, r = null) {
|
|
|
11124
11022
|
}
|
|
11125
11023
|
return i.recordSetConf(a, o, n, r);
|
|
11126
11024
|
}
|
|
11127
|
-
async function
|
|
11025
|
+
async function ys() {
|
|
11128
11026
|
let e = Q.current();
|
|
11129
11027
|
return e ? e.getStreamInfo() : Promise.reject();
|
|
11130
11028
|
}
|
|
11131
|
-
async function
|
|
11029
|
+
async function bs(e) {
|
|
11132
11030
|
let t = Q.current();
|
|
11133
11031
|
return t ? t.addMovie(e) : Promise.reject();
|
|
11134
11032
|
}
|
|
11135
|
-
async function
|
|
11033
|
+
async function xs(e) {
|
|
11136
11034
|
let t = Q.current();
|
|
11137
11035
|
return t ? t.updateMovie(e) : Promise.reject();
|
|
11138
11036
|
}
|
|
11139
|
-
async function
|
|
11037
|
+
async function Ss(e) {
|
|
11140
11038
|
let t = Q.current();
|
|
11141
11039
|
return t ? t.removeMovie(e) : Promise.reject();
|
|
11142
11040
|
}
|
|
11143
|
-
async function
|
|
11041
|
+
async function Cs(e, t) {
|
|
11144
11042
|
let n = Q.current();
|
|
11145
11043
|
if (n) {
|
|
11146
11044
|
let r = [];
|
|
@@ -11159,11 +11057,11 @@ async function Ts(e, t) {
|
|
|
11159
11057
|
}
|
|
11160
11058
|
return Promise.reject();
|
|
11161
11059
|
}
|
|
11162
|
-
async function
|
|
11060
|
+
async function ws(e, t) {
|
|
11163
11061
|
let n = Q.current();
|
|
11164
11062
|
return n ? n.activateRooms(e, t) : Promise.reject();
|
|
11165
11063
|
}
|
|
11166
|
-
async function
|
|
11064
|
+
async function Ts(e = null, t = null) {
|
|
11167
11065
|
let n = Q.current();
|
|
11168
11066
|
if (!n) return Promise.reject();
|
|
11169
11067
|
let r;
|
|
@@ -11173,22 +11071,22 @@ async function Ds(e = null, t = null) {
|
|
|
11173
11071
|
}
|
|
11174
11072
|
return n.switchRoom(e, r);
|
|
11175
11073
|
}
|
|
11176
|
-
async function
|
|
11074
|
+
async function Es(e) {
|
|
11177
11075
|
let t = Q.current();
|
|
11178
11076
|
return t ? t.removeRooms(e) : Promise.reject();
|
|
11179
11077
|
}
|
|
11180
|
-
function
|
|
11078
|
+
function Ds(e) {
|
|
11181
11079
|
D.statisticsInterval = e;
|
|
11182
11080
|
let t = Q.current();
|
|
11183
11081
|
if (t) return t.updateStatisticsInterval();
|
|
11184
11082
|
}
|
|
11185
|
-
function
|
|
11083
|
+
function Os(t) {
|
|
11186
11084
|
e.disableLog(!t), z.toggle(t);
|
|
11187
11085
|
}
|
|
11188
|
-
function
|
|
11086
|
+
function ks(e, ...t) {
|
|
11189
11087
|
D.debugLog && z.send(e, "[external]", ...t);
|
|
11190
11088
|
}
|
|
11191
|
-
async function
|
|
11089
|
+
async function As() {
|
|
11192
11090
|
let e = Ct.conversationId;
|
|
11193
11091
|
if (!e) throw z.error("[uploadDebugLogs]", "No conversation id found"), Error("No conversation id found");
|
|
11194
11092
|
let t = Ct.collectLogs();
|
|
@@ -11200,19 +11098,19 @@ async function Ms() {
|
|
|
11200
11098
|
throw z.error("[uploadDebugLogs]", "Error while uploading logs", e), Error("Error while uploading logs", { cause: e });
|
|
11201
11099
|
}
|
|
11202
11100
|
}
|
|
11203
|
-
async function
|
|
11101
|
+
async function js(e) {
|
|
11204
11102
|
let t = Q.current();
|
|
11205
11103
|
if (t) return t.videoEffect(e);
|
|
11206
11104
|
}
|
|
11207
|
-
async function
|
|
11105
|
+
async function Ms(e, t) {
|
|
11208
11106
|
let n = Q.current();
|
|
11209
11107
|
if (n) return n.audioEffect(e.length > 0 ? e : null, t);
|
|
11210
11108
|
}
|
|
11211
|
-
async function
|
|
11109
|
+
async function Ns(e) {
|
|
11212
11110
|
let t = Q.current();
|
|
11213
11111
|
t && await t.setAudioStream(e);
|
|
11214
11112
|
}
|
|
11215
|
-
async function
|
|
11113
|
+
async function Ps(e, t = null, n = null) {
|
|
11216
11114
|
let r = Q.current();
|
|
11217
11115
|
if (!r) return;
|
|
11218
11116
|
let i = n ?? t?.id, a = null;
|
|
@@ -11223,80 +11121,80 @@ async function Is(e, t = null, n = null) {
|
|
|
11223
11121
|
}
|
|
11224
11122
|
r.setAnimojiSvg(e, a, i);
|
|
11225
11123
|
}
|
|
11226
|
-
function
|
|
11124
|
+
function Fs(e) {
|
|
11227
11125
|
let t = Q.current();
|
|
11228
11126
|
t && t.setAnimojiFill(e);
|
|
11229
11127
|
}
|
|
11230
|
-
async function
|
|
11231
|
-
return
|
|
11128
|
+
async function Is(e = null, t, n = !1) {
|
|
11129
|
+
return qs().getWaitingHall(e, t, n);
|
|
11232
11130
|
}
|
|
11233
|
-
async function
|
|
11234
|
-
return
|
|
11131
|
+
async function Ls() {
|
|
11132
|
+
return qs().getAudienceModeHands();
|
|
11235
11133
|
}
|
|
11236
|
-
async function
|
|
11237
|
-
let n =
|
|
11134
|
+
async function Rs(e, t = !1) {
|
|
11135
|
+
let n = qs(), r;
|
|
11238
11136
|
if (e) {
|
|
11239
11137
|
let [t] = await $.getOkIdsByExternalIds([e]);
|
|
11240
11138
|
r = E.composeUserId(t);
|
|
11241
11139
|
}
|
|
11242
11140
|
return n.promoteParticipant(r, t);
|
|
11243
11141
|
}
|
|
11244
|
-
async function
|
|
11245
|
-
return
|
|
11142
|
+
async function zs(e = !1) {
|
|
11143
|
+
return qs().requestPromotion(e);
|
|
11246
11144
|
}
|
|
11247
|
-
async function
|
|
11248
|
-
return
|
|
11145
|
+
async function Bs(e = !1) {
|
|
11146
|
+
return qs().acceptPromotion(e);
|
|
11249
11147
|
}
|
|
11250
|
-
async function
|
|
11251
|
-
return
|
|
11148
|
+
async function Vs(e) {
|
|
11149
|
+
return qs().getParticipantListChunk(e);
|
|
11252
11150
|
}
|
|
11253
|
-
async function
|
|
11254
|
-
return
|
|
11151
|
+
async function Hs(e) {
|
|
11152
|
+
return qs().getParticipants(e);
|
|
11255
11153
|
}
|
|
11256
|
-
async function
|
|
11257
|
-
return
|
|
11154
|
+
async function Us(e) {
|
|
11155
|
+
return qs().feedback(e);
|
|
11258
11156
|
}
|
|
11259
|
-
function
|
|
11260
|
-
return
|
|
11157
|
+
function Ws(e, t, n) {
|
|
11158
|
+
return qs().userFeedbackStats(e, t, n);
|
|
11261
11159
|
}
|
|
11262
|
-
function
|
|
11160
|
+
function Gs(e, t = {}, n = !1) {
|
|
11263
11161
|
let r = Q.current();
|
|
11264
11162
|
r && r.sendClientEvent(e, t, n);
|
|
11265
11163
|
}
|
|
11266
|
-
async function
|
|
11267
|
-
return
|
|
11164
|
+
async function Ks(e, t) {
|
|
11165
|
+
return qs().enableFeatureForRoles(e, t);
|
|
11268
11166
|
}
|
|
11269
|
-
function
|
|
11167
|
+
function qs() {
|
|
11270
11168
|
let e = Q.current();
|
|
11271
11169
|
if (!e) throw Error("Conversation not found");
|
|
11272
11170
|
return e;
|
|
11273
11171
|
}
|
|
11274
|
-
async function
|
|
11172
|
+
async function Js(e) {
|
|
11275
11173
|
await $.removeHistoryRecords(e);
|
|
11276
11174
|
}
|
|
11277
|
-
async function
|
|
11175
|
+
async function Ys(e) {
|
|
11278
11176
|
let t = Q.current();
|
|
11279
11177
|
t && await t.startAsr(e);
|
|
11280
11178
|
}
|
|
11281
|
-
async function
|
|
11179
|
+
async function Xs(e) {
|
|
11282
11180
|
let t = Q.current();
|
|
11283
11181
|
t && await t.stopAsr(e);
|
|
11284
11182
|
}
|
|
11285
|
-
async function
|
|
11183
|
+
async function Zs(e) {
|
|
11286
11184
|
let t = Q.current();
|
|
11287
11185
|
t && await t.requestAsr(e);
|
|
11288
11186
|
}
|
|
11289
|
-
async function
|
|
11187
|
+
async function Qs(e) {
|
|
11290
11188
|
let t = Q.current();
|
|
11291
11189
|
return t ? t.startUrlSharing(e) : Promise.reject();
|
|
11292
11190
|
}
|
|
11293
|
-
async function
|
|
11191
|
+
async function $s() {
|
|
11294
11192
|
let e = Q.current();
|
|
11295
11193
|
return e ? e.stopUrlSharing() : Promise.reject();
|
|
11296
11194
|
}
|
|
11297
|
-
function
|
|
11195
|
+
function ec() {
|
|
11298
11196
|
return D.sdkVersion;
|
|
11299
11197
|
}
|
|
11300
11198
|
typeof window < "u" && (window.__CALLS_SDK = be);
|
|
11301
11199
|
//#endregion
|
|
11302
|
-
export {
|
|
11200
|
+
export { ao as Api, uo as ApiExternal, lo as ArrayDequeue, w as AuthData, f as BaseLogger, Y as CallDirection, ra as CallType, ia as ChatRoomEventType, aa as ConversationFeature, oa as ConversationOption, Wt as DebugMessageType, ha as ExternalIdType, ut as FacingMode, x as FatalError, v as HangupReason, _ as HangupType, S as MediaOption, k as MediaTrackKind, B as MediaType, la as MuteState, X as ParticipantState, co as ParticipantStateDataValue, A as ParticipantStatus, so as RecordRole, ua as RoomsEventType, na as Signaling, b as SignalingCommandType, Vi as SignalingConnectionType, G as SignalingNotification, J as TransportTopology, pa as UserRole, T as UserType, ja as VolumeDetector, To as acceptCall, Bs as acceptPromotion, ws as activateRooms, bs as addMovie, jo as addParticipant, Mo as addParticipantInternal, wo as authorize, po as browser, xo as callInternal, bo as callTo, Io as captureScreen, Lo as captureVmoji, Ms as changeAudioEffect, ns as changeConversationOptions, Fo as changeDevice, Uo as changeParticipantState, Ho as changePriorities, js as changeVideoEffect, as as chatHistory, rs as chatMessage, is as chatMessageInternal, us as createJoinLink, os as customData, ss as customDataInternal, Os as debug, ks as debugMessage, Eo as declineCall, Ks as enableFeatureForRoles, es as enableVideoSuspend, ts as enableVideoSuspendSuggest, Us as feedback, ms as forceRelayPolicy, fs as getAnonymTokenByLink, Ls as getAudienceModeHands, Vs as getParticipantListChunk, Hs as getParticipants, ys as getStreamInfo, Is as getWaitingHall, qo as grantRoles, Jo as grantRolesInternal, Ao as hangup, Wo as hold, yo as init, Do as joinCall, ko as joinCallByLink, Oo as joinCallInternal, Gs as logClientEvent, Yo as muteParticipant, Xo as muteParticipantInternal, Zo as pinParticipant, Qo as pinParticipantInternal, So as processPush, Co as processPushInternal, Rs as promoteParticipant, _s as publishStream, Go as putHandsDown, vs as recordSetConf, Js as removeHistoryRecords, ds as removeJoinLink, Ss as removeMovie, No as removeParticipant, Po as removeParticipantInternal, Es as removeRooms, Zs as requestAsr, zs as requestPromotion, _o as setAudioEffects, Ns as setAudioStream, Vo as setLocalResolution, ho as setLogger, $o as setMediaModifiers, Ds as setStatisticsInterval, go as setVideoEffects, Ro as setVideoStream, vo as setVmoji, Fs as setVmojiFill, Ps as setVmojiSvg, ps as setVolume, Ys as startAsr, ls as startAudienceConversation, cs as startConversation, hs as startStream, Qs as startUrlSharing, Xs as stopAsr, gs as stopStream, $s as stopUrlSharing, Ts as switchRoom, Bo as toggleLocalAudio, zo as toggleLocalVideo, Ko as updateDisplayLayout, xs as updateMovie, Cs as updateRooms, As as uploadDebugLogs, Ws as userFeedbackStats, mo as utils, ec as version };
|