@cloudflare/realtimekit 1.2.4-staging.8 → 1.2.4-staging.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ClientMock.cjs.js +2 -2
- package/dist/ClientMock.es.js +22 -21
- package/dist/EncryptionManager.d.ts +5 -2
- package/dist/browser.js +9 -9
- package/dist/dependencies.txt +2 -2
- package/dist/index.cjs.js +9 -9
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +592 -590
- package/dist/index.es5.js +3978 -3986
- package/dist/index.rn.js +9 -9
- package/dist/ts3.4/dist/EncryptionManager.d.ts +5 -2
- package/dist/ts3.4/dist/index.d.ts +5 -2
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -44,7 +44,7 @@ var u = (s, t, e) => new Promise((r, i) => {
|
|
|
44
44
|
}, c = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(a, o);
|
|
45
45
|
c((e = e.apply(s, t)).next());
|
|
46
46
|
});
|
|
47
|
-
import { v4 as
|
|
47
|
+
import { v4 as tn, validate as Fg } from "uuid";
|
|
48
48
|
import Bg from "bowser";
|
|
49
49
|
import { MessageType as T, PbLong as Qa, typeofJsonValue as Qv } from "@protobuf-ts/runtime";
|
|
50
50
|
import * as Zc from "worker-timers";
|
|
@@ -926,7 +926,7 @@ var Qh;
|
|
|
926
926
|
(function(s) {
|
|
927
927
|
s[s.INIT = 0] = "INIT", s[s.ACCEPTED = 1] = "ACCEPTED", s[s.DENIED = 2] = "DENIED", s[s.SYS_DENIED = 3] = "SYS_DENIED", s[s.FAILED = 4] = "FAILED", s[s.NOTFOUND = 5] = "NOTFOUND", s[s.NOT_APPLICABLE = 6] = "NOT_APPLICABLE";
|
|
928
928
|
})(Qh || (Qh = {}));
|
|
929
|
-
function
|
|
929
|
+
function zr(s) {
|
|
930
930
|
return s ? s.split(".").slice(0, 2).concat(["0", "0"]).join(".") : "";
|
|
931
931
|
}
|
|
932
932
|
function md({ packetsLost: s, packetsSent: t }) {
|
|
@@ -1312,7 +1312,7 @@ class IS {
|
|
|
1312
1312
|
try {
|
|
1313
1313
|
const d = `https://${e.location}`, p = yield (yield fetch(d)).json();
|
|
1314
1314
|
if (((a = p.loc) == null ? void 0 : a.length) > 5)
|
|
1315
|
-
return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip =
|
|
1315
|
+
return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = zr(this.ipInformation.ip)), p;
|
|
1316
1316
|
throw Error("Insufficient data");
|
|
1317
1317
|
} catch (d) {
|
|
1318
1318
|
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
@@ -1321,7 +1321,7 @@ class IS {
|
|
|
1321
1321
|
const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
|
|
1322
1322
|
method: "POST"
|
|
1323
1323
|
});
|
|
1324
|
-
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip =
|
|
1324
|
+
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = zr(this.ipInformation.ip));
|
|
1325
1325
|
} catch (d) {
|
|
1326
1326
|
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
|
|
1327
1327
|
}
|
|
@@ -1519,7 +1519,7 @@ class fm extends ct {
|
|
|
1519
1519
|
}) || e[e.length - 1];
|
|
1520
1520
|
}
|
|
1521
1521
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
1522
|
-
var _, C, R, L, F, N, B, j, re, et, os,
|
|
1522
|
+
var _, C, R, L, F, N, B, j, re, et, os, si, cs;
|
|
1523
1523
|
const c = e, d = new mm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1524
1524
|
for (const I of c.values()) {
|
|
1525
1525
|
if (l) {
|
|
@@ -1793,7 +1793,7 @@ class fm extends ct {
|
|
|
1793
1793
|
score: +(k.score * 10).toFixed(),
|
|
1794
1794
|
packetsLostPercentage: fd({
|
|
1795
1795
|
packetsLost: (k.packetsLost || 0) - (((os = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : os.packetsLost) || 0),
|
|
1796
|
-
packetsReceived: (k.packetsReceived || 0) - (((
|
|
1796
|
+
packetsReceived: (k.packetsReceived || 0) - (((si = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : si.packetsReceived) || 0)
|
|
1797
1797
|
}),
|
|
1798
1798
|
jitter: k.jitter || 0,
|
|
1799
1799
|
isScreenShare: this.screenShareConsumers.has(w),
|
|
@@ -1857,7 +1857,7 @@ class fm extends ct {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}), v.forEach((I) => {
|
|
1859
1859
|
const y = p.find(($) => $.id === I.localCandidateId ? (I.localCandidateId = $.id, $) : null), w = g.find(($) => $.id === I.remoteCandidateId ? (I.remoteCandidateId = $.id, $) : null);
|
|
1860
|
-
y && (I.localCandidateType = y.type, I.localCandidateAddress =
|
|
1860
|
+
y && (I.localCandidateType = y.type, I.localCandidateAddress = zr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = zr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), w && (I.remoteCandidateType = w.type, I.remoteCandidateAddress = zr(w.address), I.remoteCandidatePort = w.port, I.remoteCandidateProtocol = w.protocol, I.remoteCandidateUrl = w.url);
|
|
1861
1861
|
}), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
1862
1862
|
// candidateStats: result.candidatePair,
|
|
1863
1863
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
@@ -2170,7 +2170,7 @@ class vm extends fm {
|
|
|
2170
2170
|
};
|
|
2171
2171
|
}
|
|
2172
2172
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
2173
|
-
var _, C, R, L, F, N, B, j, re, et, os,
|
|
2173
|
+
var _, C, R, L, F, N, B, j, re, et, os, si, cs;
|
|
2174
2174
|
const c = e, d = new mm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2175
2175
|
for (const I of c.values()) {
|
|
2176
2176
|
if (l) {
|
|
@@ -2440,7 +2440,7 @@ class vm extends fm {
|
|
|
2440
2440
|
score: +(k.score * 10).toFixed(),
|
|
2441
2441
|
packetsLostPercentage: fd({
|
|
2442
2442
|
packetsLost: (k.packetsLost || 0) - (((os = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : os.packetsLost) || 0),
|
|
2443
|
-
packetsReceived: (k.packetsReceived || 0) - (((
|
|
2443
|
+
packetsReceived: (k.packetsReceived || 0) - (((si = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : si.packetsReceived) || 0)
|
|
2444
2444
|
}),
|
|
2445
2445
|
jitter: k.jitter || 0,
|
|
2446
2446
|
isScreenShare: this.screenShareConsumers.has(w),
|
|
@@ -2504,7 +2504,7 @@ class vm extends fm {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
}), v.forEach((I) => {
|
|
2506
2506
|
const y = p.find(($) => $.id === I.localCandidateId ? (I.localCandidateId = $.id, $) : null), w = g.find(($) => $.id === I.remoteCandidateId ? (I.remoteCandidateId = $.id, $) : null);
|
|
2507
|
-
y && (I.localCandidateType = y.type, I.localCandidateAddress =
|
|
2507
|
+
y && (I.localCandidateType = y.type, I.localCandidateAddress = zr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = zr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), w && (I.remoteCandidateType = w.type, I.remoteCandidateAddress = zr(w.address), I.remoteCandidatePort = w.port, I.remoteCandidateProtocol = w.protocol, I.remoteCandidateUrl = w.url);
|
|
2508
2508
|
}), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
2509
2509
|
// candidateStats: result.candidatePair,
|
|
2510
2510
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
@@ -3641,7 +3641,7 @@ function sT(s) {
|
|
|
3641
3641
|
return tT.call(s);
|
|
3642
3642
|
}
|
|
3643
3643
|
var rT = "[object Null]", iT = "[object Undefined]", tp = Us ? Us.toStringTag : void 0;
|
|
3644
|
-
function
|
|
3644
|
+
function nn(s) {
|
|
3645
3645
|
return s == null ? s === void 0 ? iT : rT : tp && tp in Object(s) ? ZS(s) : sT(s);
|
|
3646
3646
|
}
|
|
3647
3647
|
function ns(s) {
|
|
@@ -3652,7 +3652,7 @@ var nT = "[object AsyncFunction]", aT = "[object Function]", oT = "[object Gener
|
|
|
3652
3652
|
function ch(s) {
|
|
3653
3653
|
if (!ns(s))
|
|
3654
3654
|
return !1;
|
|
3655
|
-
var t =
|
|
3655
|
+
var t = nn(s);
|
|
3656
3656
|
return t == aT || t == oT || t == nT || t == cT;
|
|
3657
3657
|
}
|
|
3658
3658
|
var dT = ws["__core-js_shared__"];
|
|
@@ -3665,7 +3665,7 @@ function lT(s) {
|
|
|
3665
3665
|
return !!sp && sp in s;
|
|
3666
3666
|
}
|
|
3667
3667
|
var uT = Function.prototype, hT = uT.toString;
|
|
3668
|
-
function
|
|
3668
|
+
function an(s) {
|
|
3669
3669
|
if (s != null) {
|
|
3670
3670
|
try {
|
|
3671
3671
|
return hT.call(s);
|
|
@@ -3685,18 +3685,18 @@ function yT(s) {
|
|
|
3685
3685
|
if (!ns(s) || lT(s))
|
|
3686
3686
|
return !1;
|
|
3687
3687
|
var t = ch(s) ? TT : gT;
|
|
3688
|
-
return t.test(
|
|
3688
|
+
return t.test(an(s));
|
|
3689
3689
|
}
|
|
3690
3690
|
function ET(s, t) {
|
|
3691
3691
|
return s == null ? void 0 : s[t];
|
|
3692
3692
|
}
|
|
3693
|
-
function
|
|
3693
|
+
function on(s, t) {
|
|
3694
3694
|
var e = ET(s, t);
|
|
3695
3695
|
return yT(e) ? e : void 0;
|
|
3696
3696
|
}
|
|
3697
|
-
var PT =
|
|
3697
|
+
var PT = on(ws, "Map");
|
|
3698
3698
|
const yo = PT;
|
|
3699
|
-
var _T =
|
|
3699
|
+
var _T = on(Object, "create");
|
|
3700
3700
|
const Eo = _T;
|
|
3701
3701
|
function CT() {
|
|
3702
3702
|
this.__data__ = Eo ? Eo(null) : {}, this.size = 0;
|
|
@@ -3724,23 +3724,23 @@ function NT(s, t) {
|
|
|
3724
3724
|
var e = this.__data__;
|
|
3725
3725
|
return this.size += this.has(s) ? 0 : 1, e[s] = Eo && t === void 0 ? OT : t, this;
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3727
|
+
function sn(s) {
|
|
3728
3728
|
var t = -1, e = s == null ? 0 : s.length;
|
|
3729
3729
|
for (this.clear(); ++t < e; ) {
|
|
3730
3730
|
var r = s[t];
|
|
3731
3731
|
this.set(r[0], r[1]);
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3734
|
+
sn.prototype.clear = CT;
|
|
3735
|
+
sn.prototype.delete = wT;
|
|
3736
|
+
sn.prototype.get = AT;
|
|
3737
|
+
sn.prototype.has = DT;
|
|
3738
|
+
sn.prototype.set = NT;
|
|
3739
3739
|
function VT() {
|
|
3740
3740
|
this.size = 0, this.__data__ = {
|
|
3741
|
-
hash: new
|
|
3741
|
+
hash: new sn(),
|
|
3742
3742
|
map: new (yo || vr)(),
|
|
3743
|
-
string: new
|
|
3743
|
+
string: new sn()
|
|
3744
3744
|
};
|
|
3745
3745
|
}
|
|
3746
3746
|
function LT(s) {
|
|
@@ -3804,7 +3804,7 @@ function qT(s, t) {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
var jT = function() {
|
|
3806
3806
|
try {
|
|
3807
|
-
var s =
|
|
3807
|
+
var s = on(Object, "defineProperty");
|
|
3808
3808
|
return s({}, "", {}), s;
|
|
3809
3809
|
} catch (t) {
|
|
3810
3810
|
}
|
|
@@ -3842,7 +3842,7 @@ function $s(s) {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
var KT = "[object Arguments]";
|
|
3844
3844
|
function rp(s) {
|
|
3845
|
-
return $s(s) &&
|
|
3845
|
+
return $s(s) && nn(s) == KT;
|
|
3846
3846
|
}
|
|
3847
3847
|
var Pm = Object.prototype, zT = Pm.hasOwnProperty, YT = Pm.propertyIsEnumerable, QT = rp(function() {
|
|
3848
3848
|
return arguments;
|
|
@@ -3870,7 +3870,7 @@ var ay = "[object Arguments]", oy = "[object Array]", cy = "[object Boolean]", d
|
|
|
3870
3870
|
Se[Ey] = Se[Py] = Se[_y] = Se[Cy] = Se[wy] = Se[Ry] = Se[by] = Se[ky] = Se[Ay] = !0;
|
|
3871
3871
|
Se[ay] = Se[oy] = Se[Ty] = Se[cy] = Se[yy] = Se[dy] = Se[ly] = Se[uy] = Se[hy] = Se[py] = Se[gy] = Se[my] = Se[fy] = Se[vy] = Se[Sy] = !1;
|
|
3872
3872
|
function Iy(s) {
|
|
3873
|
-
return $s(s) && uh(s.length) && !!Se[
|
|
3873
|
+
return $s(s) && uh(s.length) && !!Se[nn(s)];
|
|
3874
3874
|
}
|
|
3875
3875
|
function hh(s) {
|
|
3876
3876
|
return function(t) {
|
|
@@ -4008,17 +4008,17 @@ function uu(s) {
|
|
|
4008
4008
|
function rE(s) {
|
|
4009
4009
|
return Nm(s, Dc, Om);
|
|
4010
4010
|
}
|
|
4011
|
-
var iE =
|
|
4011
|
+
var iE = on(ws, "DataView");
|
|
4012
4012
|
const hu = iE;
|
|
4013
|
-
var nE =
|
|
4013
|
+
var nE = on(ws, "Promise");
|
|
4014
4014
|
const pu = nE;
|
|
4015
|
-
var aE =
|
|
4015
|
+
var aE = on(ws, "Set");
|
|
4016
4016
|
const Cn = aE;
|
|
4017
|
-
var oE =
|
|
4017
|
+
var oE = on(ws, "WeakMap");
|
|
4018
4018
|
const gu = oE;
|
|
4019
|
-
var up = "[object Map]", cE = "[object Object]", hp = "[object Promise]", pp = "[object Set]", gp = "[object WeakMap]", mp = "[object DataView]", dE =
|
|
4020
|
-
(hu &&
|
|
4021
|
-
var t =
|
|
4019
|
+
var up = "[object Map]", cE = "[object Object]", hp = "[object Promise]", pp = "[object Set]", gp = "[object WeakMap]", mp = "[object DataView]", dE = an(hu), lE = an(yo), uE = an(pu), hE = an(Cn), pE = an(gu), ri = nn;
|
|
4020
|
+
(hu && ri(new hu(new ArrayBuffer(1))) != mp || yo && ri(new yo()) != up || pu && ri(pu.resolve()) != hp || Cn && ri(new Cn()) != pp || gu && ri(new gu()) != gp) && (ri = function(s) {
|
|
4021
|
+
var t = nn(s), e = t == cE ? s.constructor : void 0, r = e ? an(e) : "";
|
|
4022
4022
|
if (r)
|
|
4023
4023
|
switch (r) {
|
|
4024
4024
|
case dE:
|
|
@@ -4034,7 +4034,7 @@ var up = "[object Map]", cE = "[object Object]", hp = "[object Promise]", pp = "
|
|
|
4034
4034
|
}
|
|
4035
4035
|
return t;
|
|
4036
4036
|
});
|
|
4037
|
-
const Aa =
|
|
4037
|
+
const Aa = ri;
|
|
4038
4038
|
var gE = Object.prototype, mE = gE.hasOwnProperty;
|
|
4039
4039
|
function fE(s) {
|
|
4040
4040
|
var t = s.length, e = new s.constructor(t);
|
|
@@ -4172,7 +4172,7 @@ function fh(s) {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
var RP = "[object Symbol]";
|
|
4174
4174
|
function Dl(s) {
|
|
4175
|
-
return typeof s == "symbol" || $s(s) &&
|
|
4175
|
+
return typeof s == "symbol" || $s(s) && nn(s) == RP;
|
|
4176
4176
|
}
|
|
4177
4177
|
var bP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, kP = /^\w*$/;
|
|
4178
4178
|
function vh(s, t) {
|
|
@@ -5097,7 +5097,7 @@ function N_(s) {
|
|
|
5097
5097
|
}
|
|
5098
5098
|
var V_ = "[object Object]", L_ = Function.prototype, x_ = Object.prototype, zm = L_.toString, U_ = x_.hasOwnProperty, $_ = zm.call(Object);
|
|
5099
5099
|
function F_(s) {
|
|
5100
|
-
if (!$s(s) ||
|
|
5100
|
+
if (!$s(s) || nn(s) != V_)
|
|
5101
5101
|
return !1;
|
|
5102
5102
|
var t = gh(s);
|
|
5103
5103
|
if (t === null)
|
|
@@ -5583,21 +5583,21 @@ function Ia(s, t) {
|
|
|
5583
5583
|
function tw({ baseURI: s }) {
|
|
5584
5584
|
return s.includes("preprod.dyte") || s.includes("preprod.realtime") ? ho.PREPROD : s.includes("devel.dyte") || s.includes("devel.realtime") ? ho.DEVEL : ho.PROD;
|
|
5585
5585
|
}
|
|
5586
|
-
function
|
|
5586
|
+
function Xi({ servicePrefix: s, baseURI: t }) {
|
|
5587
5587
|
return `${s}.${t}`;
|
|
5588
5588
|
}
|
|
5589
5589
|
function sf(s) {
|
|
5590
5590
|
const t = s.getValue("baseURI");
|
|
5591
5591
|
return {
|
|
5592
|
-
location:
|
|
5592
|
+
location: Xi({
|
|
5593
5593
|
servicePrefix: "location",
|
|
5594
5594
|
baseURI: t
|
|
5595
5595
|
}),
|
|
5596
|
-
locationLegacy:
|
|
5596
|
+
locationLegacy: Xi({
|
|
5597
5597
|
servicePrefix: "location-legacy",
|
|
5598
5598
|
baseURI: t
|
|
5599
5599
|
}),
|
|
5600
|
-
daCollector:
|
|
5600
|
+
daCollector: Xi({
|
|
5601
5601
|
servicePrefix: "da-collector",
|
|
5602
5602
|
/**
|
|
5603
5603
|
* FIXME(ravindra-cloudflare): Need to port da-collector to CF.
|
|
@@ -5622,7 +5622,7 @@ const sw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
5622
5622
|
o(), window.URL.revokeObjectURL(i);
|
|
5623
5623
|
}, r.src = i;
|
|
5624
5624
|
});
|
|
5625
|
-
},
|
|
5625
|
+
}, li = {
|
|
5626
5626
|
logs: "https://api-silos.dyte.io/otel/logs",
|
|
5627
5627
|
mock: {
|
|
5628
5628
|
url: "https://mock.dyte.io",
|
|
@@ -5642,7 +5642,7 @@ const sw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
5642
5642
|
};
|
|
5643
5643
|
function iw(s) {
|
|
5644
5644
|
var r, i, a;
|
|
5645
|
-
const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(
|
|
5645
|
+
const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(li.baseURI.staging)), e = !!((a = (i = s == null ? void 0 : s.getValue("modules")) == null ? void 0 : i.devTools) != null && a.logs);
|
|
5646
5646
|
return t || e;
|
|
5647
5647
|
}
|
|
5648
5648
|
function nw(s, t) {
|
|
@@ -5718,7 +5718,7 @@ const Hh = class {
|
|
|
5718
5718
|
}
|
|
5719
5719
|
get logsEndpoint() {
|
|
5720
5720
|
const t = ur.getContext(this.meetingMetadata.peerId);
|
|
5721
|
-
return `https://${
|
|
5721
|
+
return `https://${Xi({
|
|
5722
5722
|
servicePrefix: "api-silos",
|
|
5723
5723
|
baseURI: t.getValue("baseURI")
|
|
5724
5724
|
})}/otel/logs`;
|
|
@@ -5763,7 +5763,7 @@ const Hh = class {
|
|
|
5763
5763
|
}
|
|
5764
5764
|
injectContext(t) {
|
|
5765
5765
|
var i;
|
|
5766
|
-
const e =
|
|
5766
|
+
const e = tn().replace(/-/g, "").substring(0, 16), r = (i = this.meetingMetadata.peerId) == null ? void 0 : i.replace(/-/g, "");
|
|
5767
5767
|
t.TRACEPARENT = `00-${r}-${e}-01`;
|
|
5768
5768
|
}
|
|
5769
5769
|
/**
|
|
@@ -6289,7 +6289,7 @@ const Op = 1080, Np = 1920, pw = (s, t, e, r, i, a) => {
|
|
|
6289
6289
|
let g = d * p, v = l * p, S, E, _, C, R = 1;
|
|
6290
6290
|
return g < e && (R = e / g), Math.abs(R - 1) < 1e-14 && v < r && (R = r / v), g *= R, v *= R, _ = d / (g / e), C = l / (v / r), S = (d - _) * o, E = (l - C) * c, S < 0 && (S = 0), E < 0 && (E = 0), _ > d && (_ = d), C > l && (C = l), [S, E, _, C, s, t, e, r];
|
|
6291
6291
|
};
|
|
6292
|
-
var Wt,
|
|
6292
|
+
var Wt, ui, tt, Jt, Re, us, Gs, ut, De, kn, An, Ws, In;
|
|
6293
6293
|
const qh = class extends Bt {
|
|
6294
6294
|
/**
|
|
6295
6295
|
* @param {Context} context
|
|
@@ -6301,7 +6301,7 @@ const qh = class extends Bt {
|
|
|
6301
6301
|
const o = e.getValue("logger");
|
|
6302
6302
|
super(o);
|
|
6303
6303
|
m(this, Wt, void 0);
|
|
6304
|
-
m(this,
|
|
6304
|
+
m(this, ui, void 0);
|
|
6305
6305
|
m(this, tt, void 0);
|
|
6306
6306
|
m(this, Jt, void 0);
|
|
6307
6307
|
m(this, Re, {
|
|
@@ -6323,7 +6323,7 @@ const qh = class extends Bt {
|
|
|
6323
6323
|
m(this, Ws, void 0);
|
|
6324
6324
|
m(this, In, !1);
|
|
6325
6325
|
h(this, "cleanupEventListeners", () => {
|
|
6326
|
-
n(this,
|
|
6326
|
+
n(this, ui).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).removeListener("roomLeft", () => this.disable());
|
|
6327
6327
|
});
|
|
6328
6328
|
h(this, "enablePipMediaControls", () => {
|
|
6329
6329
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
@@ -6338,7 +6338,7 @@ const qh = class extends Bt {
|
|
|
6338
6338
|
e === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
6339
6339
|
});
|
|
6340
6340
|
h(this, "eventCallback", (e) => {
|
|
6341
|
-
e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this,
|
|
6341
|
+
e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, ui).getValue("peerSessionStore").emit(b.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
6342
6342
|
});
|
|
6343
6343
|
h(this, "unmountEvents", () => {
|
|
6344
6344
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
@@ -6356,7 +6356,7 @@ const qh = class extends Bt {
|
|
|
6356
6356
|
h(this, "disable", (e = !1) => {
|
|
6357
6357
|
f(this, Ws, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, Gs)), e !== !0 && document.body.removeChild(n(this, tt)), f(this, Gs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6358
6358
|
});
|
|
6359
|
-
f(this,
|
|
6359
|
+
f(this, ui, e), f(this, Ws, "idle"), f(this, De, r), f(this, us, {
|
|
6360
6360
|
brand: r.config.designTokens.colors.brand[500],
|
|
6361
6361
|
background: r.config.designTokens.colors.background[1e3],
|
|
6362
6362
|
text: r.config.designTokens.colors.text,
|
|
@@ -6414,7 +6414,7 @@ const qh = class extends Bt {
|
|
|
6414
6414
|
f(this, tt, document.createElement("div")), n(this, tt).style.width = "0.1px", n(this, tt).style.height = "0.1px", n(this, tt).style.overflow = "hidden", n(this, tt).style.position = "absolute", n(this, tt).style.bottom = "0", n(this, tt).style.right = "0", n(this, tt).style.opacity = "0", n(this, tt).appendChild(n(this, Jt));
|
|
6415
6415
|
}
|
|
6416
6416
|
setupEventListeners() {
|
|
6417
|
-
n(this,
|
|
6417
|
+
n(this, ui).subscribe("stageStatus", this.handlePipMediaControls), n(this, De).addListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).addListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).addListener("roomLeft", () => this.disable());
|
|
6418
6418
|
}
|
|
6419
6419
|
createCanvas() {
|
|
6420
6420
|
const e = document.createElement("canvas");
|
|
@@ -6681,7 +6681,7 @@ const qh = class extends Bt {
|
|
|
6681
6681
|
}
|
|
6682
6682
|
};
|
|
6683
6683
|
let Tu = qh;
|
|
6684
|
-
Wt = new WeakMap(),
|
|
6684
|
+
Wt = new WeakMap(), ui = new WeakMap(), tt = new WeakMap(), Jt = new WeakMap(), Re = new WeakMap(), us = new WeakMap(), Gs = new WeakMap(), ut = new WeakMap(), De = new WeakMap(), kn = new WeakMap(), An = new WeakMap(), Ws = new WeakMap(), In = new WeakMap();
|
|
6685
6685
|
var mr;
|
|
6686
6686
|
(function(s) {
|
|
6687
6687
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -8522,10 +8522,10 @@ class Ib extends T {
|
|
|
8522
8522
|
}
|
|
8523
8523
|
}
|
|
8524
8524
|
const Mb = new Ib();
|
|
8525
|
-
var
|
|
8525
|
+
var Zi;
|
|
8526
8526
|
(function(s) {
|
|
8527
8527
|
s[s.BROWSER = 0] = "BROWSER", s[s.TRACK = 1] = "TRACK", s[s.COMPOSITE = 2] = "COMPOSITE";
|
|
8528
|
-
})(
|
|
8528
|
+
})(Zi || (Zi = {}));
|
|
8529
8529
|
var dr;
|
|
8530
8530
|
(function(s) {
|
|
8531
8531
|
s[s.UNSPECIFIED = 0] = "UNSPECIFIED", s[s.ON_STAGE = 1] = "ON_STAGE", s[s.APPROVED_STAGE = 2] = "APPROVED_STAGE", s[s.REQUESTED_STAGE = 3] = "REQUESTED_STAGE", s[s.OFF_STAGE = 4] = "OFF_STAGE";
|
|
@@ -8760,7 +8760,7 @@ class Hb extends T {
|
|
|
8760
8760
|
T: 9
|
|
8761
8761
|
/*ScalarType.STRING*/
|
|
8762
8762
|
},
|
|
8763
|
-
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
8763
|
+
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Zi] },
|
|
8764
8764
|
{
|
|
8765
8765
|
no: 3,
|
|
8766
8766
|
name: "recording_status",
|
|
@@ -9473,10 +9473,10 @@ var wu;
|
|
|
9473
9473
|
(function(s) {
|
|
9474
9474
|
s[s.NONE = 0] = "NONE", s[s.SKIP = 1] = "SKIP", s[s.ON_PRIVILEGED_USER_ENTRY = 2] = "ON_PRIVILEGED_USER_ENTRY", s[s.SKIP_ON_ACCEPT = 3] = "SKIP_ON_ACCEPT";
|
|
9475
9475
|
})(wu || (wu = {}));
|
|
9476
|
-
var
|
|
9476
|
+
var Jr;
|
|
9477
9477
|
(function(s) {
|
|
9478
9478
|
s[s.NONE = 0] = "NONE", s[s.ALLOWED = 1] = "ALLOWED", s[s.NOT_ALLOWED = 2] = "NOT_ALLOWED", s[s.CAN_REQUEST = 3] = "CAN_REQUEST";
|
|
9479
|
-
})(
|
|
9479
|
+
})(Jr || (Jr = {}));
|
|
9480
9480
|
class Gk extends T {
|
|
9481
9481
|
constructor() {
|
|
9482
9482
|
super("socket.preset.PollsPermissionUpdate", [
|
|
@@ -9644,8 +9644,8 @@ const sA = new tA();
|
|
|
9644
9644
|
class rA extends T {
|
|
9645
9645
|
constructor() {
|
|
9646
9646
|
super("socket.preset.StreamPermission", [
|
|
9647
|
-
{ no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType",
|
|
9648
|
-
{ no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType",
|
|
9647
|
+
{ no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Jr, "STREAM_PERMISSION_TYPE_"] },
|
|
9648
|
+
{ no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Jr, "STREAM_PERMISSION_TYPE_"] }
|
|
9649
9649
|
]);
|
|
9650
9650
|
}
|
|
9651
9651
|
}
|
|
@@ -10025,7 +10025,7 @@ class EA extends T {
|
|
|
10025
10025
|
]);
|
|
10026
10026
|
}
|
|
10027
10027
|
}
|
|
10028
|
-
const
|
|
10028
|
+
const Xr = new EA();
|
|
10029
10029
|
class PA extends T {
|
|
10030
10030
|
constructor() {
|
|
10031
10031
|
super("socket.chat.GetPaginatedChatMessageFilters", [
|
|
@@ -10097,7 +10097,7 @@ const wA = new CA();
|
|
|
10097
10097
|
class RA extends T {
|
|
10098
10098
|
constructor() {
|
|
10099
10099
|
super("socket.chat.GetPaginatedChatMessageRoomResponse", [
|
|
10100
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10100
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => Xr },
|
|
10101
10101
|
{
|
|
10102
10102
|
no: 2,
|
|
10103
10103
|
name: "next",
|
|
@@ -10112,7 +10112,7 @@ const bA = new RA();
|
|
|
10112
10112
|
class kA extends T {
|
|
10113
10113
|
constructor() {
|
|
10114
10114
|
super("socket.chat.GetChatMessagesResponse", [
|
|
10115
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10115
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => Xr }
|
|
10116
10116
|
]);
|
|
10117
10117
|
}
|
|
10118
10118
|
}
|
|
@@ -10141,7 +10141,7 @@ const IA = new AA();
|
|
|
10141
10141
|
class MA extends T {
|
|
10142
10142
|
constructor() {
|
|
10143
10143
|
super("socket.chat.SendChatMessageToRoomResponse", [
|
|
10144
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10144
|
+
{ no: 1, name: "message", kind: "message", T: () => Xr }
|
|
10145
10145
|
]);
|
|
10146
10146
|
}
|
|
10147
10147
|
}
|
|
@@ -10178,7 +10178,7 @@ const OA = new DA();
|
|
|
10178
10178
|
class NA extends T {
|
|
10179
10179
|
constructor() {
|
|
10180
10180
|
super("socket.chat.SendChatMessageToPeersResponse", [
|
|
10181
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10181
|
+
{ no: 1, name: "message", kind: "message", T: () => Xr }
|
|
10182
10182
|
]);
|
|
10183
10183
|
}
|
|
10184
10184
|
}
|
|
@@ -10214,7 +10214,7 @@ new VA();
|
|
|
10214
10214
|
class LA extends T {
|
|
10215
10215
|
constructor() {
|
|
10216
10216
|
super("socket.chat.SendChatMessageToChannelResponse", [
|
|
10217
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10217
|
+
{ no: 1, name: "message", kind: "message", T: () => Xr }
|
|
10218
10218
|
]);
|
|
10219
10219
|
}
|
|
10220
10220
|
}
|
|
@@ -10318,7 +10318,8 @@ class BA extends T {
|
|
|
10318
10318
|
opt: !0,
|
|
10319
10319
|
T: 9
|
|
10320
10320
|
/*ScalarType.STRING*/
|
|
10321
|
-
}
|
|
10321
|
+
},
|
|
10322
|
+
{ no: 4, name: "message", kind: "message", T: () => Xr }
|
|
10322
10323
|
]);
|
|
10323
10324
|
}
|
|
10324
10325
|
}
|
|
@@ -10326,7 +10327,7 @@ const Jc = new BA();
|
|
|
10326
10327
|
class HA extends T {
|
|
10327
10328
|
constructor() {
|
|
10328
10329
|
super("socket.chat.EditChatMessageResponse", [
|
|
10329
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10330
|
+
{ no: 1, name: "message", kind: "message", T: () => Xr }
|
|
10330
10331
|
]);
|
|
10331
10332
|
}
|
|
10332
10333
|
}
|
|
@@ -10597,7 +10598,7 @@ new ZA();
|
|
|
10597
10598
|
class eI extends T {
|
|
10598
10599
|
constructor() {
|
|
10599
10600
|
super("socket.chat.LatestMessageAndUnreadCount", [
|
|
10600
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10601
|
+
{ no: 1, name: "message", kind: "message", T: () => Xr },
|
|
10601
10602
|
{
|
|
10602
10603
|
no: 2,
|
|
10603
10604
|
name: "unread_count",
|
|
@@ -11500,7 +11501,7 @@ class cM extends T {
|
|
|
11500
11501
|
T: 9
|
|
11501
11502
|
/*ScalarType.STRING*/
|
|
11502
11503
|
},
|
|
11503
|
-
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
11504
|
+
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Zi] }
|
|
11504
11505
|
]);
|
|
11505
11506
|
}
|
|
11506
11507
|
}
|
|
@@ -11823,11 +11824,11 @@ function yf(s, t) {
|
|
|
11823
11824
|
const U = Nc(pM, SM), $e = Nc(gM, TM), J = Nc(
|
|
11824
11825
|
mM,
|
|
11825
11826
|
yM
|
|
11826
|
-
), Hs = Nc(fM, EM),
|
|
11827
|
+
), Hs = Nc(fM, EM), kr = yf(Tf, 16777216), Ps = yf(Tf, 50331648), id = Nc(
|
|
11827
11828
|
vM,
|
|
11828
11829
|
PM
|
|
11829
11830
|
);
|
|
11830
|
-
var _M = Object.defineProperty, CM = Object.getOwnPropertyDescriptor,
|
|
11831
|
+
var _M = Object.defineProperty, CM = Object.getOwnPropertyDescriptor, Zr = (s, t, e, r) => {
|
|
11831
11832
|
for (var i = r > 1 ? void 0 : r ? CM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
11832
11833
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11833
11834
|
return r && i && _M(t, e, i), i;
|
|
@@ -11855,21 +11856,20 @@ class Tr {
|
|
|
11855
11856
|
getChatMessages() {
|
|
11856
11857
|
return n(this, Mt).sendMessagePromise($e.getMessages);
|
|
11857
11858
|
}
|
|
11858
|
-
getChatMessagesPaginated(
|
|
11859
|
-
return u(this,
|
|
11860
|
-
const
|
|
11859
|
+
getChatMessagesPaginated(t, e, r, i) {
|
|
11860
|
+
return u(this, null, function* () {
|
|
11861
|
+
const a = D({
|
|
11861
11862
|
timeStamp: t,
|
|
11862
11863
|
size: e,
|
|
11863
11864
|
from: 0,
|
|
11864
11865
|
// NOTE(ikabra): We do not need offset for timeStamp based pagination.
|
|
11865
|
-
reversed: r
|
|
11866
|
-
|
|
11867
|
-
}, l = yield n(this, Mt).sendMessagePromise(
|
|
11866
|
+
reversed: r
|
|
11867
|
+
}, i && { filters: { filters: i } }), o = yield n(this, Mt).sendMessagePromise(
|
|
11868
11868
|
$e.getPaginatedMessages,
|
|
11869
|
-
wA.toBinary(
|
|
11869
|
+
wA.toBinary(a)
|
|
11870
11870
|
);
|
|
11871
|
-
return
|
|
11872
|
-
|
|
11871
|
+
return o.payload ? bA.fromBinary(
|
|
11872
|
+
o.payload
|
|
11873
11873
|
) : {
|
|
11874
11874
|
messages: [],
|
|
11875
11875
|
next: !1
|
|
@@ -11954,7 +11954,7 @@ class Tr {
|
|
|
11954
11954
|
setPinState(t, e) {
|
|
11955
11955
|
return u(this, null, function* () {
|
|
11956
11956
|
const r = {
|
|
11957
|
-
chatId: t
|
|
11957
|
+
chatId: t,
|
|
11958
11958
|
pinned: e
|
|
11959
11959
|
}, i = yield n(this, Mt).sendMessagePromise(
|
|
11960
11960
|
$e.pinMessage,
|
|
@@ -12015,28 +12015,28 @@ class Tr {
|
|
|
12015
12015
|
}
|
|
12016
12016
|
}
|
|
12017
12017
|
Mt = new WeakMap(), Mn = new WeakMap();
|
|
12018
|
-
|
|
12018
|
+
Zr([
|
|
12019
12019
|
P.trace("SocketService.getChatMessages")
|
|
12020
12020
|
], Tr.prototype, "getChatMessages", 1);
|
|
12021
|
-
|
|
12021
|
+
Zr([
|
|
12022
12022
|
P.trace("SocketService.getChatMessagesPaginated")
|
|
12023
12023
|
], Tr.prototype, "getChatMessagesPaginated", 1);
|
|
12024
|
-
|
|
12024
|
+
Zr([
|
|
12025
12025
|
P.trace("SocketService.sendMessageToRoom")
|
|
12026
12026
|
], Tr.prototype, "sendMessageToRoom", 1);
|
|
12027
|
-
|
|
12027
|
+
Zr([
|
|
12028
12028
|
P.trace("SocketService.sendMessageToPeers")
|
|
12029
12029
|
], Tr.prototype, "sendMessageToPeers", 1);
|
|
12030
|
-
|
|
12030
|
+
Zr([
|
|
12031
12031
|
P.trace("SocketService.sendMessage")
|
|
12032
12032
|
], Tr.prototype, "sendMessage", 1);
|
|
12033
|
-
|
|
12033
|
+
Zr([
|
|
12034
12034
|
P.trace("SocketService.editMessage")
|
|
12035
12035
|
], Tr.prototype, "editMessage", 1);
|
|
12036
|
-
|
|
12036
|
+
Zr([
|
|
12037
12037
|
P.trace("SocketService.deleteMessage")
|
|
12038
12038
|
], Tr.prototype, "deleteMessage", 1);
|
|
12039
|
-
|
|
12039
|
+
Zr([
|
|
12040
12040
|
P.trace("SocketService.searchMessages")
|
|
12041
12041
|
], Tr.prototype, "searchMessages", 1);
|
|
12042
12042
|
function wM(s) {
|
|
@@ -12143,7 +12143,7 @@ class ig {
|
|
|
12143
12143
|
return L;
|
|
12144
12144
|
} catch (v) {
|
|
12145
12145
|
if (v instanceof Error && l > 0)
|
|
12146
|
-
return yield new Promise((S) => setTimeout(S, p)), this.defaults.baseURL ===
|
|
12146
|
+
return yield new Promise((S) => setTimeout(S, p)), this.defaults.baseURL === li.apiBase.prod ? this.defaults.baseURL = li.apiBase.prodAlternate : this.defaults.baseURL === li.apiBase.prodAlternate && (this.defaults.baseURL = li.apiBase.prod), this.request(G(D({}, t), {
|
|
12147
12147
|
retry: l - 1
|
|
12148
12148
|
}));
|
|
12149
12149
|
throw v;
|
|
@@ -12197,7 +12197,7 @@ class IM {
|
|
|
12197
12197
|
timeout: r = AM,
|
|
12198
12198
|
retry: i = bM,
|
|
12199
12199
|
retryDelay: a = kM,
|
|
12200
|
-
baseURL: o =
|
|
12200
|
+
baseURL: o = li.apiBase.prod,
|
|
12201
12201
|
authToken: c,
|
|
12202
12202
|
cachedUserDetails: d
|
|
12203
12203
|
} = e || {};
|
|
@@ -12574,7 +12574,7 @@ var NM = Object.defineProperty, VM = Object.getOwnPropertyDescriptor, bs = (s, t
|
|
|
12574
12574
|
return r && i && NM(t, e, i), i;
|
|
12575
12575
|
};
|
|
12576
12576
|
const LM = ["text", "image", "file", "custom", "poll"], nd = { maxInvocations: 180, period: 60 };
|
|
12577
|
-
var se,
|
|
12577
|
+
var se, hi, Ge, Dn, Md, Pf, Ro, Au, Eg;
|
|
12578
12578
|
let $t = (Eg = class extends Bt {
|
|
12579
12579
|
/**
|
|
12580
12580
|
* @param {Context} context
|
|
@@ -12602,11 +12602,11 @@ let $t = (Eg = class extends Bt {
|
|
|
12602
12602
|
*/
|
|
12603
12603
|
h(this, "messages");
|
|
12604
12604
|
m(this, se, void 0);
|
|
12605
|
-
m(this,
|
|
12605
|
+
m(this, hi, void 0);
|
|
12606
12606
|
m(this, Ge, void 0);
|
|
12607
12607
|
m(this, Dn, void 0);
|
|
12608
12608
|
h(this, "maxTextLimit", 2e3);
|
|
12609
|
-
f(this, Dn, t), f(this, Ge, e), f(this, se, r), f(this,
|
|
12609
|
+
f(this, Dn, t), f(this, Ge, e), f(this, se, r), f(this, hi, i), this.messages = [];
|
|
12610
12610
|
}
|
|
12611
12611
|
/**
|
|
12612
12612
|
* @access private
|
|
@@ -12664,7 +12664,7 @@ let $t = (Eg = class extends Bt {
|
|
|
12664
12664
|
if (!t)
|
|
12665
12665
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new A("Message can not be empty.", "0502");
|
|
12666
12666
|
let r = [];
|
|
12667
|
-
e && e.length > 0 && (e.push(n(this, se).id), r = n(this,
|
|
12667
|
+
e && e.length > 0 && (e.push(n(this, se).id), r = n(this, hi).joined.toArray().filter((p) => e.includes(p.id)).map((p) => p.userId), r.push(n(this, se).userId)), n(this, Ge).sendMessage(
|
|
12668
12668
|
t,
|
|
12669
12669
|
rs.TEXT,
|
|
12670
12670
|
e
|
|
@@ -12699,7 +12699,7 @@ let $t = (Eg = class extends Bt {
|
|
|
12699
12699
|
const p = ot(), { getLocation: g, putLocation: v } = yield p.getPresignedUrls(t.name);
|
|
12700
12700
|
yield p.uploadFile(t, v);
|
|
12701
12701
|
let S = [];
|
|
12702
|
-
e && e.length > 0 && (e.push(n(this, se).id), S = n(this,
|
|
12702
|
+
e && e.length > 0 && (e.push(n(this, se).id), S = n(this, hi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), S.push(n(this, se).userId)), n(this, Ge).sendMessage(
|
|
12703
12703
|
g,
|
|
12704
12704
|
rs.IMAGE,
|
|
12705
12705
|
e
|
|
@@ -12733,7 +12733,7 @@ let $t = (Eg = class extends Bt {
|
|
|
12733
12733
|
const l = ot(), { getLocation: p, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12734
12734
|
yield l.uploadFile(t, g);
|
|
12735
12735
|
let v = [];
|
|
12736
|
-
e && e.length > 0 && (e.push(n(this, se).id), v = n(this,
|
|
12736
|
+
e && e.length > 0 && (e.push(n(this, se).id), v = n(this, hi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), v.push(n(this, se).userId));
|
|
12737
12737
|
const S = JSON.stringify({
|
|
12738
12738
|
link: p,
|
|
12739
12739
|
name: t.name,
|
|
@@ -12962,12 +12962,11 @@ let $t = (Eg = class extends Bt {
|
|
|
12962
12962
|
return u(this, null, function* () {
|
|
12963
12963
|
if (!n(this, Ro, Au))
|
|
12964
12964
|
throw new A("Can`t pin message without joining room", "0505");
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12965
|
+
try {
|
|
12966
|
+
yield n(this, Ge).setPinState(t, !0);
|
|
12967
|
+
} catch (e) {
|
|
12968
|
+
throw new A(`No message found with id: ${t}`, "0504");
|
|
12969
12969
|
}
|
|
12970
|
-
throw new A(`No message found with id: ${t}`, "0504");
|
|
12971
12970
|
});
|
|
12972
12971
|
}
|
|
12973
12972
|
/**
|
|
@@ -12978,12 +12977,11 @@ let $t = (Eg = class extends Bt {
|
|
|
12978
12977
|
return u(this, null, function* () {
|
|
12979
12978
|
if (!n(this, Ro, Au))
|
|
12980
12979
|
throw new A("Can`t unpin message without joining room", "0505");
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12980
|
+
try {
|
|
12981
|
+
yield n(this, Ge).setPinState(t, !1);
|
|
12982
|
+
} catch (e) {
|
|
12983
|
+
throw new A(`No message found with id: ${t}`, "0504");
|
|
12985
12984
|
}
|
|
12986
|
-
throw new A(`No message found with id: ${t}`, "0504");
|
|
12987
12985
|
});
|
|
12988
12986
|
}
|
|
12989
12987
|
/**
|
|
@@ -13068,12 +13066,13 @@ let $t = (Eg = class extends Bt {
|
|
|
13068
13066
|
});
|
|
13069
13067
|
}
|
|
13070
13068
|
/**
|
|
13069
|
+
* @deprecated. This property is deprectated. Please use `fetchPinnedMessages()` instead.
|
|
13071
13070
|
* Returns an array of pinned messages.
|
|
13072
13071
|
*/
|
|
13073
13072
|
get pinned() {
|
|
13074
13073
|
return this.messages.filter((t) => t.pinned);
|
|
13075
13074
|
}
|
|
13076
|
-
}, se = new WeakMap(),
|
|
13075
|
+
}, se = new WeakMap(), hi = new WeakMap(), Ge = new WeakMap(), Dn = new WeakMap(), Md = new WeakSet(), Pf = function() {
|
|
13077
13076
|
return n(this, Dn).getValue("connectionHandler");
|
|
13078
13077
|
}, Ro = new WeakSet(), Au = function() {
|
|
13079
13078
|
return n(this, Md, Pf).socketJoined === !0;
|
|
@@ -13119,14 +13118,14 @@ var xM = Object.defineProperty, UM = Object.getOwnPropertyDescriptor, $M = (s, t
|
|
|
13119
13118
|
for (var i = r > 1 ? void 0 : r ? UM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13120
13119
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13121
13120
|
return r && i && xM(t, e, i), i;
|
|
13122
|
-
},
|
|
13123
|
-
const
|
|
13121
|
+
}, pi, Pg;
|
|
13122
|
+
const Cr = (Pg = class {
|
|
13124
13123
|
constructor(s, t, e, r) {
|
|
13125
13124
|
h(this, "chat");
|
|
13126
13125
|
h(this, "chatSocketHandler");
|
|
13127
13126
|
h(this, "self");
|
|
13128
|
-
m(this,
|
|
13129
|
-
f(this,
|
|
13127
|
+
m(this, pi, void 0);
|
|
13128
|
+
f(this, pi, s), this.chatSocketHandler = t, this.chat = new $t(
|
|
13130
13129
|
s,
|
|
13131
13130
|
t,
|
|
13132
13131
|
e,
|
|
@@ -13138,18 +13137,18 @@ const si = (Pg = class {
|
|
|
13138
13137
|
* Not for external use
|
|
13139
13138
|
*/
|
|
13140
13139
|
get telemetry() {
|
|
13141
|
-
return n(this,
|
|
13140
|
+
return n(this, pi).getValue("telemetry");
|
|
13142
13141
|
}
|
|
13143
13142
|
/**
|
|
13144
13143
|
* @access private
|
|
13145
13144
|
* Not for external use
|
|
13146
13145
|
*/
|
|
13147
13146
|
get logger() {
|
|
13148
|
-
return n(this,
|
|
13147
|
+
return n(this, pi).getValue("logger");
|
|
13149
13148
|
}
|
|
13150
13149
|
static init(s, t, e, r) {
|
|
13151
13150
|
return u(this, null, function* () {
|
|
13152
|
-
return new
|
|
13151
|
+
return new Cr(
|
|
13153
13152
|
s,
|
|
13154
13153
|
t,
|
|
13155
13154
|
e,
|
|
@@ -13214,7 +13213,7 @@ const si = (Pg = class {
|
|
|
13214
13213
|
break;
|
|
13215
13214
|
}
|
|
13216
13215
|
}
|
|
13217
|
-
return
|
|
13216
|
+
return Cr.formatMessage(e);
|
|
13218
13217
|
}
|
|
13219
13218
|
getChatMessages() {
|
|
13220
13219
|
return u(this, null, function* () {
|
|
@@ -13227,12 +13226,12 @@ const si = (Pg = class {
|
|
|
13227
13226
|
s.payload
|
|
13228
13227
|
).messages;
|
|
13229
13228
|
this.chat.messages = t.map(
|
|
13230
|
-
(e) =>
|
|
13229
|
+
(e) => Cr.formatSocketPeerMessage(e)
|
|
13231
13230
|
);
|
|
13232
13231
|
});
|
|
13233
13232
|
}
|
|
13234
13233
|
setupEvents() {
|
|
13235
|
-
n(this,
|
|
13234
|
+
n(this, pi).getValue("peerSessionStore").on(
|
|
13236
13235
|
b.SOCKET_SERVICE_ROOM_JOINED,
|
|
13237
13236
|
() => u(this, null, function* () {
|
|
13238
13237
|
this.getChatMessages();
|
|
@@ -13242,7 +13241,7 @@ const si = (Pg = class {
|
|
|
13242
13241
|
(s) => {
|
|
13243
13242
|
if (!s.message)
|
|
13244
13243
|
return;
|
|
13245
|
-
const t =
|
|
13244
|
+
const t = Cr.formatSocketPeerMessage(
|
|
13246
13245
|
s.message
|
|
13247
13246
|
);
|
|
13248
13247
|
this.chat.messages = [...this.chat.messages, t], this.chat.emit("chatUpdate", {
|
|
@@ -13254,7 +13253,7 @@ const si = (Pg = class {
|
|
|
13254
13253
|
), this.chatSocketHandler.on(
|
|
13255
13254
|
$e.sendMessageToPeers,
|
|
13256
13255
|
(s) => {
|
|
13257
|
-
const t =
|
|
13256
|
+
const t = Cr.formatSocketPeerMessage(
|
|
13258
13257
|
s.message
|
|
13259
13258
|
);
|
|
13260
13259
|
this.chat.messages = [...this.chat.messages, t], this.chat.emit("chatUpdate", {
|
|
@@ -13268,23 +13267,21 @@ const si = (Pg = class {
|
|
|
13268
13267
|
(s) => {
|
|
13269
13268
|
if (!s.message)
|
|
13270
13269
|
return;
|
|
13271
|
-
const t =
|
|
13270
|
+
const t = Cr.formatSocketPeerMessage(
|
|
13272
13271
|
s.message
|
|
13273
13272
|
), e = this.chat.messages.findIndex((r) => r.id === t.id);
|
|
13274
|
-
e !== -1 && (this.chat.messages[e] = t, this.chat.emit("chatUpdate", {
|
|
13273
|
+
e !== -1 && (this.chat.messages[e] = t), this.chat.emit("chatUpdate", {
|
|
13275
13274
|
action: "edit",
|
|
13276
13275
|
message: t,
|
|
13277
13276
|
messages: this.chat.messages
|
|
13278
|
-
})
|
|
13277
|
+
});
|
|
13279
13278
|
}
|
|
13280
13279
|
), this.chatSocketHandler.on(
|
|
13281
13280
|
$e.deleteMessage,
|
|
13282
13281
|
(s) => {
|
|
13283
13282
|
const t = this.chat.messages.findIndex((r) => r.id === s.chatId);
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
const [e] = this.chat.messages.splice(t, 1);
|
|
13287
|
-
this.chat.emit("chatUpdate", {
|
|
13283
|
+
let e = { id: s.chatId };
|
|
13284
|
+
t !== -1 && ([e] = this.chat.messages.splice(t, 1)), this.chat.emit("chatUpdate", {
|
|
13288
13285
|
action: "delete",
|
|
13289
13286
|
message: e,
|
|
13290
13287
|
messages: this.chat.messages
|
|
@@ -13293,20 +13290,25 @@ const si = (Pg = class {
|
|
|
13293
13290
|
), this.chatSocketHandler.on(
|
|
13294
13291
|
$e.pinMessage,
|
|
13295
13292
|
(s) => {
|
|
13296
|
-
const t = this.chat.messages.findIndex((r) => r.id === s.chatId)
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
e.pinned = s.pinned, this.chat.messages[t] = e, this.chat.emit("chatUpdate", {
|
|
13293
|
+
const t = this.chat.messages.findIndex((r) => r.id === s.chatId), e = Cr.formatSocketPeerMessage(
|
|
13294
|
+
s.message
|
|
13295
|
+
);
|
|
13296
|
+
t !== -1 && (this.chat.messages[t] = e), this.chat.emit("chatUpdate", {
|
|
13301
13297
|
action: "edit",
|
|
13302
13298
|
message: e,
|
|
13303
13299
|
messages: this.chat.messages
|
|
13300
|
+
}), s.pinned ? this.chat.emit("pinMessage", {
|
|
13301
|
+
message: e,
|
|
13302
|
+
messages: this.chat.messages
|
|
13303
|
+
}) : this.chat.emit("unpinMessage", {
|
|
13304
|
+
message: e,
|
|
13305
|
+
messages: this.chat.messages
|
|
13304
13306
|
});
|
|
13305
13307
|
}
|
|
13306
13308
|
);
|
|
13307
13309
|
}
|
|
13308
|
-
},
|
|
13309
|
-
let is =
|
|
13310
|
+
}, pi = new WeakMap(), Pg);
|
|
13311
|
+
let is = Cr;
|
|
13310
13312
|
$M([
|
|
13311
13313
|
P.trace("ChatController.setupEvents")
|
|
13312
13314
|
], is.prototype, "setupEvents", 1);
|
|
@@ -13399,28 +13401,28 @@ var qM = Object.defineProperty, jM = Object.getOwnPropertyDescriptor, GM = (s, t
|
|
|
13399
13401
|
for (var i = r > 1 ? void 0 : r ? jM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13400
13402
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13401
13403
|
return r && i && qM(t, e, i), i;
|
|
13402
|
-
},
|
|
13404
|
+
}, Ar, Vn, gi, Cg;
|
|
13403
13405
|
const pn = (Cg = class {
|
|
13404
13406
|
constructor(s, t, e) {
|
|
13405
13407
|
h(this, "polls");
|
|
13406
|
-
m(this,
|
|
13408
|
+
m(this, Ar, void 0);
|
|
13407
13409
|
m(this, Vn, void 0);
|
|
13408
|
-
m(this,
|
|
13409
|
-
this.polls = new Iu(s, t, e), f(this, Vn, t), f(this,
|
|
13410
|
+
m(this, gi, void 0);
|
|
13411
|
+
this.polls = new Iu(s, t, e), f(this, Vn, t), f(this, Ar, s), f(this, gi, e), this.setupEvents();
|
|
13410
13412
|
}
|
|
13411
13413
|
/**
|
|
13412
13414
|
* @access private
|
|
13413
13415
|
* Not for external use
|
|
13414
13416
|
*/
|
|
13415
13417
|
get telemetry() {
|
|
13416
|
-
return n(this,
|
|
13418
|
+
return n(this, Ar).getValue("telemetry");
|
|
13417
13419
|
}
|
|
13418
13420
|
/**
|
|
13419
13421
|
* @access private
|
|
13420
13422
|
* Not for external use
|
|
13421
13423
|
*/
|
|
13422
13424
|
get logger() {
|
|
13423
|
-
return n(this,
|
|
13425
|
+
return n(this, Ar).getValue("logger");
|
|
13424
13426
|
}
|
|
13425
13427
|
static init(s, t, e) {
|
|
13426
13428
|
return u(this, null, function* () {
|
|
@@ -13442,16 +13444,16 @@ const pn = (Cg = class {
|
|
|
13442
13444
|
r.poll && this.updatePoll(pn.formatSocketServicePoll(r.poll));
|
|
13443
13445
|
}
|
|
13444
13446
|
}, t = () => {
|
|
13445
|
-
n(this,
|
|
13447
|
+
n(this, Ar).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13446
13448
|
this.getPolls();
|
|
13447
13449
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13448
|
-
n(this,
|
|
13450
|
+
n(this, gi).on(r, s[r]);
|
|
13449
13451
|
});
|
|
13450
13452
|
}, e = () => {
|
|
13451
|
-
n(this,
|
|
13453
|
+
n(this, Ar).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13452
13454
|
this.getPolls();
|
|
13453
13455
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13454
|
-
n(this,
|
|
13456
|
+
n(this, gi).removeListeners(r);
|
|
13455
13457
|
});
|
|
13456
13458
|
};
|
|
13457
13459
|
n(this, Vn).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
|
|
@@ -13475,7 +13477,7 @@ const pn = (Cg = class {
|
|
|
13475
13477
|
}
|
|
13476
13478
|
getPolls() {
|
|
13477
13479
|
return u(this, null, function* () {
|
|
13478
|
-
const s = yield n(this,
|
|
13480
|
+
const s = yield n(this, gi).getPolls();
|
|
13479
13481
|
if (!(s != null && s.payload))
|
|
13480
13482
|
return;
|
|
13481
13483
|
const { polls: t } = oM.fromBinary(s.payload);
|
|
@@ -13504,7 +13506,7 @@ const pn = (Cg = class {
|
|
|
13504
13506
|
voted: s.votes
|
|
13505
13507
|
};
|
|
13506
13508
|
}
|
|
13507
|
-
},
|
|
13509
|
+
}, Ar = new WeakMap(), Vn = new WeakMap(), gi = new WeakMap(), Cg);
|
|
13508
13510
|
let wf = pn;
|
|
13509
13511
|
GM([
|
|
13510
13512
|
P.trace("PollController.setupEvents")
|
|
@@ -13513,7 +13515,7 @@ var WM = Object.defineProperty, JM = Object.getOwnPropertyDescriptor, KM = (s, t
|
|
|
13513
13515
|
for (var i = r > 1 ? void 0 : r ? JM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13514
13516
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13515
13517
|
return r && i && WM(t, e, i), i;
|
|
13516
|
-
}, Rf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Rf || {}), Ln, ko, Du,
|
|
13518
|
+
}, Rf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Rf || {}), Ln, ko, Du, mi, Ao, wg;
|
|
13517
13519
|
let Mu = (wg = class extends Bt {
|
|
13518
13520
|
/**
|
|
13519
13521
|
* @param {Context} context
|
|
@@ -13535,7 +13537,7 @@ let Mu = (wg = class extends Bt {
|
|
|
13535
13537
|
*/
|
|
13536
13538
|
h(this, "broadcastTabChanges");
|
|
13537
13539
|
m(this, Ln, void 0);
|
|
13538
|
-
m(this,
|
|
13540
|
+
m(this, mi, void 0);
|
|
13539
13541
|
m(this, Ao, void 0);
|
|
13540
13542
|
/**
|
|
13541
13543
|
* The `viewType` tells the type of the meeting
|
|
@@ -13554,7 +13556,7 @@ let Mu = (wg = class extends Bt {
|
|
|
13554
13556
|
* (Experimental) The sessionId this meeting object is part of.
|
|
13555
13557
|
*/
|
|
13556
13558
|
h(this, "sessionId");
|
|
13557
|
-
f(this, Ln, t), f(this,
|
|
13559
|
+
f(this, Ln, t), f(this, mi, e), this.viewType = r, f(this, Ao, i), this.meetingTitle = a, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
13558
13560
|
}
|
|
13559
13561
|
get socketState() {
|
|
13560
13562
|
return n(this, ko, Du).socketState;
|
|
@@ -13573,7 +13575,7 @@ let Mu = (wg = class extends Bt {
|
|
|
13573
13575
|
* @param {boolean} broadcastTabChanges
|
|
13574
13576
|
*/
|
|
13575
13577
|
setBroadcastTabChanges(t) {
|
|
13576
|
-
if (!n(this,
|
|
13578
|
+
if (!n(this, mi).permissions.canSpotlight)
|
|
13577
13579
|
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new A("User does not have permission to toggle spotlight", "0801");
|
|
13578
13580
|
this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
|
|
13579
13581
|
}
|
|
@@ -13591,17 +13593,17 @@ let Mu = (wg = class extends Bt {
|
|
|
13591
13593
|
type: t.type
|
|
13592
13594
|
}
|
|
13593
13595
|
}
|
|
13594
|
-
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this,
|
|
13596
|
+
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this, mi).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
|
|
13595
13597
|
}
|
|
13596
13598
|
assertActiveTabToRoom() {
|
|
13597
13599
|
n(this, Ao).broadcastMessage("spotlight", {
|
|
13598
|
-
userId: n(this,
|
|
13600
|
+
userId: n(this, mi).userId,
|
|
13599
13601
|
currentTab: this.selfActiveTab
|
|
13600
13602
|
});
|
|
13601
13603
|
}
|
|
13602
13604
|
}, Ln = new WeakMap(), ko = new WeakSet(), Du = function() {
|
|
13603
13605
|
return n(this, Ln).getValue("connectionHandler");
|
|
13604
|
-
},
|
|
13606
|
+
}, mi = new WeakMap(), Ao = new WeakMap(), wg);
|
|
13605
13607
|
Mu = KM([
|
|
13606
13608
|
dt("0800")
|
|
13607
13609
|
], Mu);
|
|
@@ -13619,7 +13621,7 @@ var YM = Object.defineProperty, QM = Object.getOwnPropertyDescriptor, bf = (s, t
|
|
|
13619
13621
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13620
13622
|
return r && i && YM(t, e, i), i;
|
|
13621
13623
|
}, Io, Rg;
|
|
13622
|
-
let
|
|
13624
|
+
let Yr = (Rg = class extends Bt {
|
|
13623
13625
|
constructor(t) {
|
|
13624
13626
|
const e = t.getValue("logger");
|
|
13625
13627
|
super(e);
|
|
@@ -13636,7 +13638,7 @@ let zr = (Rg = class extends Bt {
|
|
|
13636
13638
|
}
|
|
13637
13639
|
static init(t, e) {
|
|
13638
13640
|
return u(this, null, function* () {
|
|
13639
|
-
const r = new
|
|
13641
|
+
const r = new Yr(t), i = t.getValue("logger");
|
|
13640
13642
|
try {
|
|
13641
13643
|
e && r.getActiveTranscript();
|
|
13642
13644
|
} catch (a) {
|
|
@@ -13662,7 +13664,7 @@ let zr = (Rg = class extends Bt {
|
|
|
13662
13664
|
d
|
|
13663
13665
|
]] = zM(t);
|
|
13664
13666
|
return {
|
|
13665
|
-
id:
|
|
13667
|
+
id: tn(),
|
|
13666
13668
|
name: c,
|
|
13667
13669
|
peerId: i,
|
|
13668
13670
|
userId: a,
|
|
@@ -13678,13 +13680,13 @@ let zr = (Rg = class extends Bt {
|
|
|
13678
13680
|
*/
|
|
13679
13681
|
static parseTranscripts(t) {
|
|
13680
13682
|
return t ? t.split(`
|
|
13681
|
-
`).map((e) =>
|
|
13683
|
+
`).map((e) => Yr.parseTranscript(e, !1)).filter(Boolean) : [];
|
|
13682
13684
|
}
|
|
13683
13685
|
getActiveTranscript() {
|
|
13684
13686
|
return u(this, null, function* () {
|
|
13685
13687
|
try {
|
|
13686
13688
|
const t = ot(), { transcript: e } = yield t.getActiveTranscript();
|
|
13687
|
-
this.transcripts =
|
|
13689
|
+
this.transcripts = Yr.parseTranscripts(e);
|
|
13688
13690
|
} catch (t) {
|
|
13689
13691
|
}
|
|
13690
13692
|
});
|
|
@@ -13707,20 +13709,20 @@ let zr = (Rg = class extends Bt {
|
|
|
13707
13709
|
}, Io = new WeakMap(), Rg);
|
|
13708
13710
|
bf([
|
|
13709
13711
|
P.trace("Ai.getActiveTranscript")
|
|
13710
|
-
],
|
|
13711
|
-
|
|
13712
|
+
], Yr.prototype, "getActiveTranscript", 1);
|
|
13713
|
+
Yr = bf([
|
|
13712
13714
|
dt("0000")
|
|
13713
|
-
],
|
|
13715
|
+
], Yr);
|
|
13714
13716
|
var XM = Object.defineProperty, ZM = Object.getOwnPropertyDescriptor, e0 = (s, t, e, r) => {
|
|
13715
13717
|
for (var i = r > 1 ? void 0 : r ? ZM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13716
13718
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13717
13719
|
return r && i && XM(t, e, i), i;
|
|
13718
|
-
},
|
|
13720
|
+
}, Ir, xn, Dt, bg;
|
|
13719
13721
|
const kf = (bg = class {
|
|
13720
13722
|
constructor(s, t, e, r, i, a) {
|
|
13721
13723
|
h(this, "meta");
|
|
13722
13724
|
h(this, "ai");
|
|
13723
|
-
m(this,
|
|
13725
|
+
m(this, Ir, void 0);
|
|
13724
13726
|
m(this, xn, void 0);
|
|
13725
13727
|
h(this, "aiSocketHandler");
|
|
13726
13728
|
m(this, Dt, void 0);
|
|
@@ -13730,7 +13732,7 @@ const kf = (bg = class {
|
|
|
13730
13732
|
t.config.viewType,
|
|
13731
13733
|
e,
|
|
13732
13734
|
a
|
|
13733
|
-
), this.ai = r, f(this,
|
|
13735
|
+
), this.ai = r, f(this, Ir, t), f(this, xn, e), this.aiSocketHandler = i, this.setupEvents();
|
|
13734
13736
|
}
|
|
13735
13737
|
/**
|
|
13736
13738
|
* @access private
|
|
@@ -13751,7 +13753,7 @@ const kf = (bg = class {
|
|
|
13751
13753
|
*/
|
|
13752
13754
|
static init(s, t, e, r, i) {
|
|
13753
13755
|
return u(this, null, function* () {
|
|
13754
|
-
const a = yield
|
|
13756
|
+
const a = yield Yr.init(s, t.permissions.transcriptionEnabled);
|
|
13755
13757
|
return new kf(
|
|
13756
13758
|
s,
|
|
13757
13759
|
t,
|
|
@@ -13796,14 +13798,14 @@ const kf = (bg = class {
|
|
|
13796
13798
|
({ score: s }) => {
|
|
13797
13799
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
13798
13800
|
}
|
|
13799
|
-
), n(this,
|
|
13800
|
-
userId: n(this,
|
|
13801
|
+
), n(this, Ir).permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && n(this, xn).broadcastMessage("spotlight", {
|
|
13802
|
+
userId: n(this, Ir).userId,
|
|
13801
13803
|
currentTab: this.meta.selfActiveTab
|
|
13802
13804
|
})), n(this, Dt).getValue("peerSessionStore").on(
|
|
13803
13805
|
b.PEER_JOINED_INTERNAL,
|
|
13804
13806
|
(s) => u(this, null, function* () {
|
|
13805
|
-
n(this,
|
|
13806
|
-
userId: n(this,
|
|
13807
|
+
n(this, Ir).permissions.canSpotlight && this.meta.selfActiveTab && n(this, xn).broadcastToPeers("spotlight", [s.id], {
|
|
13808
|
+
userId: n(this, Ir).userId,
|
|
13807
13809
|
currentTab: this.meta.selfActiveTab
|
|
13808
13810
|
});
|
|
13809
13811
|
})
|
|
@@ -13865,7 +13867,7 @@ const kf = (bg = class {
|
|
|
13865
13867
|
} = s;
|
|
13866
13868
|
let i;
|
|
13867
13869
|
try {
|
|
13868
|
-
i =
|
|
13870
|
+
i = Yr.parseTranscript(e, r);
|
|
13869
13871
|
} catch (d) {
|
|
13870
13872
|
this.logger.error(`Failed to parse transcript: ${e}`, d);
|
|
13871
13873
|
}
|
|
@@ -13878,7 +13880,7 @@ const kf = (bg = class {
|
|
|
13878
13880
|
this.logger.debug(`${t} Received transcript for peer ${a} - ${o}: ${c}`);
|
|
13879
13881
|
});
|
|
13880
13882
|
}
|
|
13881
|
-
},
|
|
13883
|
+
}, Ir = new WeakMap(), xn = new WeakMap(), Dt = new WeakMap(), bg);
|
|
13882
13884
|
let Af = kf;
|
|
13883
13885
|
e0([
|
|
13884
13886
|
P.trace("MetaController.setupEvents")
|
|
@@ -13946,7 +13948,7 @@ var t0 = Object.defineProperty, s0 = Object.getOwnPropertyDescriptor, cn = (s, t
|
|
|
13946
13948
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13947
13949
|
return r && i && t0(t, e, i), i;
|
|
13948
13950
|
}, Kt, Nd, ie, Mo, As, We, Do, Ou, Un, ad;
|
|
13949
|
-
class
|
|
13951
|
+
class ei extends Bt {
|
|
13950
13952
|
/**
|
|
13951
13953
|
* @param {Context} context
|
|
13952
13954
|
* @param {Self} self
|
|
@@ -14148,19 +14150,19 @@ Kt = new WeakMap(), Nd = new WeakMap(), ie = new WeakMap(), Mo = new WeakMap(),
|
|
|
14148
14150
|
};
|
|
14149
14151
|
cn([
|
|
14150
14152
|
P.trace("Stage.getStageRequests")
|
|
14151
|
-
],
|
|
14153
|
+
], ei.prototype, "getAccessRequests", 1);
|
|
14152
14154
|
cn([
|
|
14153
14155
|
P.trace("Stage.requestAccess")
|
|
14154
|
-
],
|
|
14156
|
+
], ei.prototype, "requestAccess", 1);
|
|
14155
14157
|
cn([
|
|
14156
14158
|
P.trace("Stage.cancelRequestAccess")
|
|
14157
|
-
],
|
|
14159
|
+
], ei.prototype, "cancelRequestAccess", 1);
|
|
14158
14160
|
cn([
|
|
14159
14161
|
P.trace("Stage.grantAccess")
|
|
14160
|
-
],
|
|
14162
|
+
], ei.prototype, "grantAccess", 1);
|
|
14161
14163
|
cn([
|
|
14162
14164
|
P.trace("Stage.denyAccess")
|
|
14163
|
-
],
|
|
14165
|
+
], ei.prototype, "denyAccess", 1);
|
|
14164
14166
|
cn([
|
|
14165
14167
|
yr.executeWithLock({
|
|
14166
14168
|
methodName: "joinStage",
|
|
@@ -14168,10 +14170,10 @@ cn([
|
|
|
14168
14170
|
timeout: 5e3
|
|
14169
14171
|
}),
|
|
14170
14172
|
P.trace("Stage.joinStage")
|
|
14171
|
-
],
|
|
14173
|
+
], ei.prototype, "join", 1);
|
|
14172
14174
|
cn([
|
|
14173
14175
|
P.trace("Stage.leaveStage")
|
|
14174
|
-
],
|
|
14176
|
+
], ei.prototype, "leave", 1);
|
|
14175
14177
|
function r0(s) {
|
|
14176
14178
|
return !(s.viewType === "LIVESTREAM" || s.viewType === "CHAT");
|
|
14177
14179
|
}
|
|
@@ -14195,22 +14197,22 @@ var i0 = Object.defineProperty, n0 = Object.getOwnPropertyDescriptor, a0 = (s, t
|
|
|
14195
14197
|
for (var i = r > 1 ? void 0 : r ? n0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14196
14198
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14197
14199
|
return r && i && i0(t, e, i), i;
|
|
14198
|
-
},
|
|
14200
|
+
}, Mr, hs, Dr, Oo, ht;
|
|
14199
14201
|
class If {
|
|
14200
14202
|
constructor(t, e, r, i, a) {
|
|
14201
14203
|
h(this, "stage");
|
|
14202
|
-
m(this, Ir, void 0);
|
|
14203
|
-
m(this, hs, void 0);
|
|
14204
14204
|
m(this, Mr, void 0);
|
|
14205
|
+
m(this, hs, void 0);
|
|
14206
|
+
m(this, Dr, void 0);
|
|
14205
14207
|
m(this, Oo, 0);
|
|
14206
14208
|
m(this, ht, void 0);
|
|
14207
|
-
f(this, ht, t), this.stage = new
|
|
14209
|
+
f(this, ht, t), this.stage = new ei(
|
|
14208
14210
|
t,
|
|
14209
14211
|
i,
|
|
14210
14212
|
a,
|
|
14211
14213
|
e,
|
|
14212
14214
|
r
|
|
14213
|
-
), f(this,
|
|
14215
|
+
), f(this, Dr, e), f(this, Mr, i), f(this, hs, a), this.setupEvents();
|
|
14214
14216
|
}
|
|
14215
14217
|
/**
|
|
14216
14218
|
* @access private
|
|
@@ -14229,17 +14231,17 @@ class If {
|
|
|
14229
14231
|
setupEvents() {
|
|
14230
14232
|
n(this, ht).subscribe("stageStatus", (t) => {
|
|
14231
14233
|
this.stage.emit("stageStatusUpdate", t);
|
|
14232
|
-
}), n(this,
|
|
14233
|
-
n(this,
|
|
14234
|
-
}), n(this,
|
|
14235
|
-
t !== void 0 && (t.peerId === n(this,
|
|
14236
|
-
}), n(this,
|
|
14237
|
-
n(this,
|
|
14238
|
-
}), n(this,
|
|
14234
|
+
}), n(this, Dr).on(U.grantStageAccess, () => {
|
|
14235
|
+
n(this, Mr).permissions.stageAccess !== H.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
|
|
14236
|
+
}), n(this, Dr).on(U.peerStageStatusUpdate, (t) => {
|
|
14237
|
+
t !== void 0 && (t.peerId === n(this, Mr).id ? this.selfStageStatusHandler(t) : this.peerStageStatusHandler(t));
|
|
14238
|
+
}), n(this, Dr).on(U.denyStageAccess, () => {
|
|
14239
|
+
n(this, Mr).permissions.stageAccess !== H.Allowed && (this.stage.emit("stageRequestRejected"), this.setStageStatus("OFF_STAGE"));
|
|
14240
|
+
}), n(this, Dr).on(
|
|
14239
14241
|
U.getStageRequests,
|
|
14240
14242
|
(t) => u(this, null, function* () {
|
|
14241
14243
|
var r;
|
|
14242
|
-
if (n(this,
|
|
14244
|
+
if (n(this, Mr).permissions.stageAccess !== H.Allowed)
|
|
14243
14245
|
return;
|
|
14244
14246
|
const e = (r = t == null ? void 0 : t.stageRequests) != null ? r : [];
|
|
14245
14247
|
yield n(this, ht).getValue("peerSessionStore").emitAsync(b.GET_STAGE_REQUESTS, e), n(this, Oo) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), f(this, Oo, e.length), this.stage.emit("stageAccessRequestUpdate", e);
|
|
@@ -14316,7 +14318,7 @@ class If {
|
|
|
14316
14318
|
});
|
|
14317
14319
|
}
|
|
14318
14320
|
}
|
|
14319
|
-
|
|
14321
|
+
Mr = new WeakMap(), hs = new WeakMap(), Dr = new WeakMap(), Oo = new WeakMap(), ht = new WeakMap();
|
|
14320
14322
|
a0([
|
|
14321
14323
|
P.trace("Stage.setupEvents")
|
|
14322
14324
|
], If.prototype, "setupEvents", 1);
|
|
@@ -14339,7 +14341,7 @@ const ke = {
|
|
|
14339
14341
|
stageStatusUpdate: 25,
|
|
14340
14342
|
peerStageStatusUpdate: 26
|
|
14341
14343
|
};
|
|
14342
|
-
var st, Ot, $n, Fn, Js, Bn,
|
|
14344
|
+
var st, Ot, $n, Fn, Js, Bn, Or, Hn, kg;
|
|
14343
14345
|
let Ma = (kg = class extends Da {
|
|
14344
14346
|
/**
|
|
14345
14347
|
* @param {Context} context
|
|
@@ -14390,16 +14392,16 @@ let Ma = (kg = class extends Da {
|
|
|
14390
14392
|
h(this, "active");
|
|
14391
14393
|
h(this, "iframes");
|
|
14392
14394
|
h(this, "enabledBy");
|
|
14393
|
-
m(this,
|
|
14395
|
+
m(this, Or, void 0);
|
|
14394
14396
|
m(this, Hn, void 0);
|
|
14395
|
-
f(this,
|
|
14397
|
+
f(this, Or, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = a, this.name = o, f(this, Ot, C), this.organizationId = c, this.picture = d, this.private = l, this.published = p, this.staggered = g, this.tags = v, this.type = S, this.updatedAt = new Date(E), this.active = !1, this.iframes = /* @__PURE__ */ new Map(), f(this, st, _), f(this, $n, R), f(this, Fn, L), this.enabledBy = "", f(this, Hn, F);
|
|
14396
14398
|
}
|
|
14397
14399
|
/**
|
|
14398
14400
|
* @access private
|
|
14399
14401
|
* Not for external use
|
|
14400
14402
|
*/
|
|
14401
14403
|
get telemetry() {
|
|
14402
|
-
return n(this,
|
|
14404
|
+
return n(this, Or).getValue("telemetry");
|
|
14403
14405
|
}
|
|
14404
14406
|
/**
|
|
14405
14407
|
* @access private
|
|
@@ -14567,7 +14569,7 @@ let Ma = (kg = class extends Da {
|
|
|
14567
14569
|
case ke.getRoomName: {
|
|
14568
14570
|
this.sendIframeEvent({
|
|
14569
14571
|
type: ke.getRoomName,
|
|
14570
|
-
payload: { roomName: n(this,
|
|
14572
|
+
payload: { roomName: n(this, Or).getValue("meetingId") },
|
|
14571
14573
|
uuid: e.uuid
|
|
14572
14574
|
});
|
|
14573
14575
|
break;
|
|
@@ -14622,9 +14624,9 @@ let Ma = (kg = class extends Da {
|
|
|
14622
14624
|
const r = t, i = new URL(this.baseURL), a = {
|
|
14623
14625
|
auth: n(this, Bn),
|
|
14624
14626
|
parent: navigator.isReactNative ? this.baseURL : window.location.origin,
|
|
14625
|
-
backend: n(this,
|
|
14627
|
+
backend: n(this, Or).getValue("apiBase"),
|
|
14626
14628
|
pluginId: this.id,
|
|
14627
|
-
roomName: (o = n(this,
|
|
14629
|
+
roomName: (o = n(this, Or).getValue("meetingId")) != null ? o : "",
|
|
14628
14630
|
displayTitle: n(this, Hn)
|
|
14629
14631
|
};
|
|
14630
14632
|
if (Object.keys(a).forEach((c) => {
|
|
@@ -14726,7 +14728,7 @@ let Ma = (kg = class extends Da {
|
|
|
14726
14728
|
}), f(this, Js, void 0)));
|
|
14727
14729
|
});
|
|
14728
14730
|
}
|
|
14729
|
-
}, st = new WeakMap(), Ot = new WeakMap(), $n = new WeakMap(), Fn = new WeakMap(), Js = new WeakMap(), Bn = new WeakMap(),
|
|
14731
|
+
}, st = new WeakMap(), Ot = new WeakMap(), $n = new WeakMap(), Fn = new WeakMap(), Js = new WeakMap(), Bn = new WeakMap(), Or = new WeakMap(), Hn = new WeakMap(), kg);
|
|
14730
14732
|
Ll([
|
|
14731
14733
|
Rt({ maxInvocations: 5, period: 1 })
|
|
14732
14734
|
], Ma.prototype, "sendData", 1);
|
|
@@ -14739,7 +14741,7 @@ Ll([
|
|
|
14739
14741
|
Ma = Ll([
|
|
14740
14742
|
dt("0600")
|
|
14741
14743
|
], Ma);
|
|
14742
|
-
var Oe,
|
|
14744
|
+
var Oe, fi;
|
|
14743
14745
|
class Mf extends Map {
|
|
14744
14746
|
constructor(e, r = void 0) {
|
|
14745
14747
|
const {
|
|
@@ -14749,11 +14751,11 @@ class Mf extends Map {
|
|
|
14749
14751
|
} = e;
|
|
14750
14752
|
super();
|
|
14751
14753
|
m(this, Oe, void 0);
|
|
14752
|
-
m(this,
|
|
14754
|
+
m(this, fi, void 0);
|
|
14753
14755
|
h(this, "onAddEvent");
|
|
14754
14756
|
h(this, "onDeleteEvent");
|
|
14755
14757
|
h(this, "onClearEvent");
|
|
14756
|
-
f(this, Oe, new Da(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this,
|
|
14758
|
+
f(this, Oe, new Da(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this, fi, /* @__PURE__ */ new Map());
|
|
14757
14759
|
}
|
|
14758
14760
|
emit(e, ...r) {
|
|
14759
14761
|
return n(this, Oe).emit(e, ...r);
|
|
@@ -14804,19 +14806,19 @@ class Mf extends Map {
|
|
|
14804
14806
|
const a = super.set(e, r), o = (c, ...d) => {
|
|
14805
14807
|
this.emit(c, r, ...d);
|
|
14806
14808
|
};
|
|
14807
|
-
return n(this,
|
|
14809
|
+
return n(this, fi).set(e, o), r.on("*", o), i && n(this, Oe).emit(this.onAddEvent, r), a;
|
|
14808
14810
|
}
|
|
14809
14811
|
delete(e, r = !0, i = !1) {
|
|
14810
14812
|
const a = this.get(e);
|
|
14811
14813
|
if (!a)
|
|
14812
14814
|
return !1;
|
|
14813
|
-
a.removeListener("*", n(this,
|
|
14815
|
+
a.removeListener("*", n(this, fi).get(e));
|
|
14814
14816
|
const o = super.delete(e);
|
|
14815
14817
|
return i && a.removeAllListeners(), r && n(this, Oe).emit(this.onDeleteEvent, a), o;
|
|
14816
14818
|
}
|
|
14817
14819
|
clear(e = !0, r = !1) {
|
|
14818
14820
|
this.forEach((a) => {
|
|
14819
|
-
a.removeListener("*", n(this,
|
|
14821
|
+
a.removeListener("*", n(this, fi).get(a.id)), r && a.removeAllListeners();
|
|
14820
14822
|
});
|
|
14821
14823
|
const i = super.clear();
|
|
14822
14824
|
return e && n(this, Oe).emit(this.onClearEvent), i;
|
|
@@ -14825,7 +14827,7 @@ class Mf extends Map {
|
|
|
14825
14827
|
return Array.from(this.values());
|
|
14826
14828
|
}
|
|
14827
14829
|
}
|
|
14828
|
-
Oe = new WeakMap(),
|
|
14830
|
+
Oe = new WeakMap(), fi = new WeakMap();
|
|
14829
14831
|
class ng extends Mf {
|
|
14830
14832
|
constructor(t) {
|
|
14831
14833
|
super({
|
|
@@ -15172,7 +15174,7 @@ var m0 = Object.defineProperty, f0 = Object.getOwnPropertyDescriptor, Lc = (s, t
|
|
|
15172
15174
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15173
15175
|
return r && i && m0(t, e, i), i;
|
|
15174
15176
|
}, jn, Gn, Wn, od, Ig;
|
|
15175
|
-
let
|
|
15177
|
+
let rn = (Ig = class extends Bt {
|
|
15176
15178
|
constructor(t, e) {
|
|
15177
15179
|
const r = t.getValue("logger");
|
|
15178
15180
|
super(r);
|
|
@@ -15273,56 +15275,56 @@ let sn = (Ig = class extends Bt {
|
|
|
15273
15275
|
}, Ig);
|
|
15274
15276
|
Lc([
|
|
15275
15277
|
P.trace("Recording.start")
|
|
15276
|
-
],
|
|
15278
|
+
], rn.prototype, "start", 1);
|
|
15277
15279
|
Lc([
|
|
15278
15280
|
P.trace("Recording.stop")
|
|
15279
|
-
],
|
|
15281
|
+
], rn.prototype, "stop", 1);
|
|
15280
15282
|
Lc([
|
|
15281
15283
|
P.trace("Recording.stop")
|
|
15282
|
-
],
|
|
15284
|
+
], rn.prototype, "pause", 1);
|
|
15283
15285
|
Lc([
|
|
15284
15286
|
P.trace("Recording.stop")
|
|
15285
|
-
],
|
|
15286
|
-
|
|
15287
|
+
], rn.prototype, "resume", 1);
|
|
15288
|
+
rn = Lc([
|
|
15287
15289
|
dt("1000")
|
|
15288
|
-
],
|
|
15290
|
+
], rn);
|
|
15289
15291
|
var v0 = Object.defineProperty, S0 = Object.getOwnPropertyDescriptor, T0 = (s, t, e, r) => {
|
|
15290
15292
|
for (var i = r > 1 ? void 0 : r ? S0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
15291
15293
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15292
15294
|
return r && i && v0(t, e, i), i;
|
|
15293
|
-
},
|
|
15295
|
+
}, vi;
|
|
15294
15296
|
class Of {
|
|
15295
15297
|
constructor(t, e, r) {
|
|
15296
15298
|
h(this, "recording");
|
|
15297
15299
|
h(this, "room");
|
|
15298
|
-
m(this,
|
|
15299
|
-
f(this,
|
|
15300
|
+
m(this, vi, void 0);
|
|
15301
|
+
f(this, vi, t), this.recording = new rn(t, e), this.room = r, this.setupEvents();
|
|
15300
15302
|
}
|
|
15301
15303
|
/**
|
|
15302
15304
|
* @access private
|
|
15303
15305
|
* Not for external use
|
|
15304
15306
|
*/
|
|
15305
15307
|
get telemetry() {
|
|
15306
|
-
return n(this,
|
|
15308
|
+
return n(this, vi).getValue("telemetry");
|
|
15307
15309
|
}
|
|
15308
15310
|
/**
|
|
15309
15311
|
* @access private
|
|
15310
15312
|
* Not for external use
|
|
15311
15313
|
*/
|
|
15312
15314
|
get logger() {
|
|
15313
|
-
return n(this,
|
|
15315
|
+
return n(this, vi).getValue("logger");
|
|
15314
15316
|
}
|
|
15315
15317
|
// eslint-disable-next-line class-methods-use-this
|
|
15316
15318
|
getRecordingTypeFromProtoType(t) {
|
|
15317
15319
|
let e;
|
|
15318
15320
|
switch (t) {
|
|
15319
|
-
case
|
|
15321
|
+
case Zi.BROWSER:
|
|
15320
15322
|
e = "BROWSER";
|
|
15321
15323
|
break;
|
|
15322
|
-
case
|
|
15324
|
+
case Zi.COMPOSITE:
|
|
15323
15325
|
e = "COMPOSITE";
|
|
15324
15326
|
break;
|
|
15325
|
-
case
|
|
15327
|
+
case Zi.TRACK:
|
|
15326
15328
|
e = "TRACK";
|
|
15327
15329
|
break;
|
|
15328
15330
|
default:
|
|
@@ -15331,7 +15333,7 @@ class Of {
|
|
|
15331
15333
|
return e;
|
|
15332
15334
|
}
|
|
15333
15335
|
setupEvents() {
|
|
15334
|
-
n(this,
|
|
15336
|
+
n(this, vi).getValue("peerSessionStore").on(b.ROOM_STATE, (t) => {
|
|
15335
15337
|
t.activeRecordings.length !== 0 ? this.recording.updateRecordings(
|
|
15336
15338
|
t.activeRecordings.map((e) => {
|
|
15337
15339
|
const r = this.getRecordingTypeFromProtoType(e.recordingType);
|
|
@@ -15363,28 +15365,28 @@ class Of {
|
|
|
15363
15365
|
});
|
|
15364
15366
|
}
|
|
15365
15367
|
}
|
|
15366
|
-
|
|
15368
|
+
vi = new WeakMap();
|
|
15367
15369
|
T0([
|
|
15368
15370
|
P.trace("RecordingController.setupEvents")
|
|
15369
15371
|
], Of.prototype, "setupEvents", 1);
|
|
15370
|
-
var
|
|
15372
|
+
var Si;
|
|
15371
15373
|
class y0 {
|
|
15372
15374
|
constructor(t) {
|
|
15373
|
-
m(this,
|
|
15374
|
-
f(this,
|
|
15375
|
+
m(this, Si, void 0);
|
|
15376
|
+
f(this, Si, t);
|
|
15375
15377
|
}
|
|
15376
15378
|
hasFeature(t) {
|
|
15377
15379
|
var e;
|
|
15378
|
-
return (e = n(this,
|
|
15380
|
+
return (e = n(this, Si).getValue("flagsmith").hasFeature(t)) != null ? e : !1;
|
|
15379
15381
|
}
|
|
15380
15382
|
getFeatureValue(t) {
|
|
15381
|
-
return n(this,
|
|
15383
|
+
return n(this, Si).getValue("flagsmith").getValue(t);
|
|
15382
15384
|
}
|
|
15383
15385
|
getAllFeatures() {
|
|
15384
|
-
return n(this,
|
|
15386
|
+
return n(this, Si).getValue("flagsmith").getAllFlags();
|
|
15385
15387
|
}
|
|
15386
15388
|
}
|
|
15387
|
-
|
|
15389
|
+
Si = new WeakMap();
|
|
15388
15390
|
class bh {
|
|
15389
15391
|
constructor(t, e, r) {
|
|
15390
15392
|
h(this, "logger");
|
|
@@ -15902,10 +15904,10 @@ function C0(s, t, e) {
|
|
|
15902
15904
|
return c.stream.getAudioTracks()[0];
|
|
15903
15905
|
});
|
|
15904
15906
|
}
|
|
15905
|
-
var
|
|
15907
|
+
var Ti, Lo;
|
|
15906
15908
|
class w0 {
|
|
15907
15909
|
constructor(t) {
|
|
15908
|
-
m(this,
|
|
15910
|
+
m(this, Ti, void 0);
|
|
15909
15911
|
m(this, Lo, void 0);
|
|
15910
15912
|
f(this, Lo, t);
|
|
15911
15913
|
}
|
|
@@ -15917,9 +15919,9 @@ class w0 {
|
|
|
15917
15919
|
return n(this, Lo).getValue("logger");
|
|
15918
15920
|
}
|
|
15919
15921
|
terminateMiddlewareWebWorker() {
|
|
15920
|
-
if (n(this,
|
|
15922
|
+
if (n(this, Ti))
|
|
15921
15923
|
try {
|
|
15922
|
-
Zc.clearInterval(n(this,
|
|
15924
|
+
Zc.clearInterval(n(this, Ti)), f(this, Ti, void 0);
|
|
15923
15925
|
} catch (t) {
|
|
15924
15926
|
this.logger.debug("WorkerTimers::terminateMiddlewareWebWorker::failed");
|
|
15925
15927
|
}
|
|
@@ -15970,7 +15972,7 @@ class w0 {
|
|
|
15970
15972
|
o.addEventListener(
|
|
15971
15973
|
"play",
|
|
15972
15974
|
() => {
|
|
15973
|
-
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this,
|
|
15975
|
+
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this, Ti, Zc.setInterval(
|
|
15974
15976
|
l,
|
|
15975
15977
|
50
|
|
15976
15978
|
));
|
|
@@ -15984,7 +15986,7 @@ class w0 {
|
|
|
15984
15986
|
});
|
|
15985
15987
|
}
|
|
15986
15988
|
}
|
|
15987
|
-
|
|
15989
|
+
Ti = new WeakMap(), Lo = new WeakMap();
|
|
15988
15990
|
const ag = {
|
|
15989
15991
|
gross: { width: { ideal: 192 }, height: { ideal: 144 } },
|
|
15990
15992
|
qvga: { width: { ideal: 384 }, height: { ideal: 288 } },
|
|
@@ -16075,15 +16077,15 @@ function A0(s) {
|
|
|
16075
16077
|
enableHighBitrate: (r = s.audio.enableHighBitrate) != null ? r : !1
|
|
16076
16078
|
}), t.video = s.video.quality, t;
|
|
16077
16079
|
}
|
|
16078
|
-
var
|
|
16080
|
+
var yi, Is;
|
|
16079
16081
|
class I0 {
|
|
16080
16082
|
constructor(t, e) {
|
|
16081
|
-
m(this,
|
|
16083
|
+
m(this, yi, void 0);
|
|
16082
16084
|
m(this, Is, void 0);
|
|
16083
16085
|
// eslint-disable-next-line class-methods-use-this
|
|
16084
16086
|
h(this, "getScreenShareConstraints", () => {
|
|
16085
16087
|
var l, p, g, v, S, E, _, C, R, L, F;
|
|
16086
|
-
const t = (l = n(this,
|
|
16088
|
+
const t = (l = n(this, yi)) == null ? void 0 : l.screenshare, e = (g = (p = t == null ? void 0 : t.width) == null ? void 0 : p.max) != null ? g : 1920, r = (S = (v = t == null ? void 0 : t.height) == null ? void 0 : v.max) != null ? S : 1080, i = (_ = (E = t == null ? void 0 : t.frameRate) == null ? void 0 : E.max) != null ? _ : 5;
|
|
16087
16089
|
let a = (R = (C = t == null ? void 0 : t.frameRate) == null ? void 0 : C.ideal) != null ? R : 5;
|
|
16088
16090
|
const o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
16089
16091
|
n(this, Is).getValue("flagsmith").getValue(Z.VAL_MIN_FRAMERATE) && (a = parseInt(
|
|
@@ -16112,7 +16114,7 @@ class I0 {
|
|
|
16112
16114
|
// eslint-disable-next-line class-methods-use-this
|
|
16113
16115
|
h(this, "getAudioConstraints", (t) => {
|
|
16114
16116
|
var a, o, c, d, l, p, g;
|
|
16115
|
-
const e = {}, r = (a = n(this,
|
|
16117
|
+
const e = {}, r = (a = n(this, yi)) == null ? void 0 : a.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
16116
16118
|
return Te.isFirefox() || Te.isWebKitBased() ? (e.audio = {
|
|
16117
16119
|
deviceId: t,
|
|
16118
16120
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : !0,
|
|
@@ -16128,7 +16130,7 @@ class I0 {
|
|
|
16128
16130
|
});
|
|
16129
16131
|
h(this, "getVideoConstraints", (t) => {
|
|
16130
16132
|
var a, o, c, d;
|
|
16131
|
-
const e = {}, r = (a = n(this,
|
|
16133
|
+
const e = {}, r = (a = n(this, yi)) == null ? void 0 : a.video;
|
|
16132
16134
|
let i = ag.vga;
|
|
16133
16135
|
if (typeof r == "string" ? i = ag[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
|
|
16134
16136
|
ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
|
|
@@ -16140,14 +16142,14 @@ class I0 {
|
|
|
16140
16142
|
}
|
|
16141
16143
|
return e.video = i, typeof e.video == "boolean" || (t ? e.video.deviceId = { exact: t } : e.video.facingMode = "user"), e;
|
|
16142
16144
|
});
|
|
16143
|
-
f(this, Is, t), f(this,
|
|
16145
|
+
f(this, Is, t), f(this, yi, e);
|
|
16144
16146
|
}
|
|
16145
16147
|
// eslint-disable-next-line class-methods-use-this
|
|
16146
16148
|
getUpdatedVideoConstraints(t) {
|
|
16147
16149
|
return t;
|
|
16148
16150
|
}
|
|
16149
16151
|
}
|
|
16150
|
-
|
|
16152
|
+
yi = new WeakMap(), Is = new WeakMap();
|
|
16151
16153
|
class ou extends Error {
|
|
16152
16154
|
constructor(e, r, i) {
|
|
16153
16155
|
super(r);
|
|
@@ -16586,7 +16588,7 @@ ks([
|
|
|
16586
16588
|
Ft = ks([
|
|
16587
16589
|
dt("1600")
|
|
16588
16590
|
], Ft);
|
|
16589
|
-
const Nf = Ft,
|
|
16591
|
+
const Nf = Ft, en = {
|
|
16590
16592
|
setItem: (s, t, e) => {
|
|
16591
16593
|
try {
|
|
16592
16594
|
localStorage.setItem(s, t);
|
|
@@ -16721,12 +16723,12 @@ let _d = class extends Da {
|
|
|
16721
16723
|
h(this, "middlewares", []);
|
|
16722
16724
|
h(this, "currentDevice");
|
|
16723
16725
|
h(this, "userPreferredDeviceKey", `Realtimekit::${this.constructorName}::UserDeviceID`);
|
|
16724
|
-
h(this, "setUserPreferredDevice", (t) =>
|
|
16726
|
+
h(this, "setUserPreferredDevice", (t) => en.setItem(
|
|
16725
16727
|
this.userPreferredDeviceKey,
|
|
16726
16728
|
t,
|
|
16727
16729
|
this.logger
|
|
16728
16730
|
));
|
|
16729
|
-
h(this, "getUserPreferredDevice", () =>
|
|
16731
|
+
h(this, "getUserPreferredDevice", () => en.getItem(
|
|
16730
16732
|
this.userPreferredDeviceKey,
|
|
16731
16733
|
this.logger
|
|
16732
16734
|
));
|
|
@@ -17016,7 +17018,7 @@ class Ul extends Lf {
|
|
|
17016
17018
|
a[0].deviceId
|
|
17017
17019
|
));
|
|
17018
17020
|
const o = JSON.parse(
|
|
17019
|
-
|
|
17021
|
+
en.getItem(cu, this.logger)
|
|
17020
17022
|
);
|
|
17021
17023
|
if (o != null && o.devices.some(
|
|
17022
17024
|
(l) => l.label === r.label
|
|
@@ -17026,7 +17028,7 @@ class Ul extends Lf {
|
|
|
17026
17028
|
const l = (d = o == null ? void 0 : o.devices.concat({
|
|
17027
17029
|
label: r.label
|
|
17028
17030
|
})) != null ? d : [{ label: r.label }];
|
|
17029
|
-
return
|
|
17031
|
+
return en.setItem(cu, JSON.stringify({
|
|
17030
17032
|
devices: l
|
|
17031
17033
|
}), this.logger), r;
|
|
17032
17034
|
}
|
|
@@ -17041,7 +17043,7 @@ class Ul extends Lf {
|
|
|
17041
17043
|
const g = (p = o == null ? void 0 : o.devices.concat({
|
|
17042
17044
|
label: r.label
|
|
17043
17045
|
})) != null ? p : [{ label: r.label }];
|
|
17044
|
-
return
|
|
17046
|
+
return en.setItem(cu, JSON.stringify({
|
|
17045
17047
|
devices: g
|
|
17046
17048
|
}), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), !0;
|
|
17047
17049
|
}
|
|
@@ -17060,37 +17062,37 @@ Ih([
|
|
|
17060
17062
|
P.trace("AudioMediaHandler.conditionallyChangeTrack")
|
|
17061
17063
|
], Ul.prototype, "conditionallyChangeTrack", 1);
|
|
17062
17064
|
const j0 = Ul;
|
|
17063
|
-
var
|
|
17065
|
+
var Ei;
|
|
17064
17066
|
class G0 {
|
|
17065
17067
|
constructor(t, e) {
|
|
17066
|
-
m(this,
|
|
17068
|
+
m(this, Ei, void 0);
|
|
17067
17069
|
h(this, "currentDevice");
|
|
17068
17070
|
h(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
|
|
17069
17071
|
h(this, "logger");
|
|
17070
|
-
h(this, "setUserPreferredDevice", (t) =>
|
|
17072
|
+
h(this, "setUserPreferredDevice", (t) => en.setItem(
|
|
17071
17073
|
this.userPreferredDeviceKey,
|
|
17072
17074
|
t,
|
|
17073
17075
|
this.logger
|
|
17074
17076
|
));
|
|
17075
|
-
h(this, "getUserPreferredDevice", () =>
|
|
17077
|
+
h(this, "getUserPreferredDevice", () => en.getItem(
|
|
17076
17078
|
this.userPreferredDeviceKey,
|
|
17077
17079
|
this.logger
|
|
17078
17080
|
));
|
|
17079
|
-
f(this,
|
|
17081
|
+
f(this, Ei, e), this.logger = t.getValue("logger");
|
|
17080
17082
|
}
|
|
17081
17083
|
setPreferredSpeaker() {
|
|
17082
17084
|
return u(this, null, function* () {
|
|
17083
|
-
const t = this.getUserPreferredDevice(), e = yield n(this,
|
|
17085
|
+
const t = this.getUserPreferredDevice(), e = yield n(this, Ei).getAudioOutputDevices(), r = e == null ? void 0 : e.find((i) => i.deviceId === t);
|
|
17084
17086
|
yield this.setupSpeaker(r, { saveDevicePreference: !1 });
|
|
17085
17087
|
});
|
|
17086
17088
|
}
|
|
17087
17089
|
setupSpeaker(r, i) {
|
|
17088
17090
|
return u(this, arguments, function* (t, { saveDevicePreference: e }) {
|
|
17089
17091
|
var c, d;
|
|
17090
|
-
if (!(n(this,
|
|
17092
|
+
if (!(n(this, Ei) instanceof Nf))
|
|
17091
17093
|
return;
|
|
17092
17094
|
let a = t;
|
|
17093
|
-
if (t || ([a] = (yield n(this,
|
|
17095
|
+
if (t || ([a] = (yield n(this, Ei).getAvailableDevicesByKind(
|
|
17094
17096
|
"audiooutput"
|
|
17095
17097
|
)).filter((p) => !Pd(p))), !a)
|
|
17096
17098
|
throw new A("No speaker found", "1608");
|
|
@@ -17108,7 +17110,7 @@ class G0 {
|
|
|
17108
17110
|
});
|
|
17109
17111
|
}
|
|
17110
17112
|
}
|
|
17111
|
-
|
|
17113
|
+
Ei = new WeakMap();
|
|
17112
17114
|
const W0 = G0;
|
|
17113
17115
|
var xo;
|
|
17114
17116
|
class J0 extends Da {
|
|
@@ -17329,19 +17331,19 @@ $l([
|
|
|
17329
17331
|
const Q0 = xc, dg = _s(
|
|
17330
17332
|
Th()
|
|
17331
17333
|
);
|
|
17332
|
-
var yt,
|
|
17334
|
+
var yt, Pi, $o, zn;
|
|
17333
17335
|
const Tn = class {
|
|
17334
17336
|
/**
|
|
17335
17337
|
* @param {PresetV2CamelCased} preset
|
|
17336
17338
|
*/
|
|
17337
17339
|
constructor(t) {
|
|
17338
17340
|
m(this, yt, void 0);
|
|
17339
|
-
m(this,
|
|
17341
|
+
m(this, Pi, void 0);
|
|
17340
17342
|
m(this, $o, void 0);
|
|
17341
17343
|
m(this, zn, void 0);
|
|
17342
17344
|
if (!t)
|
|
17343
17345
|
throw new A("Could not load preset.", "0904");
|
|
17344
|
-
f(this, yt, t.config), f(this, $o, t.name), f(this,
|
|
17346
|
+
f(this, yt, t.config), f(this, $o, t.name), f(this, Pi, t.ui || _s(Th().ui)), f(this, zn, t.permissions.plugins.config);
|
|
17345
17347
|
}
|
|
17346
17348
|
/**
|
|
17347
17349
|
* @deprecated. Use init()
|
|
@@ -17416,7 +17418,7 @@ const Tn = class {
|
|
|
17416
17418
|
return {
|
|
17417
17419
|
isEnabled: !0,
|
|
17418
17420
|
elements: {
|
|
17419
|
-
logo: n(this,
|
|
17421
|
+
logo: n(this, Pi).designTokens.logo,
|
|
17420
17422
|
timer: !0,
|
|
17421
17423
|
title: !0,
|
|
17422
17424
|
participantCount: !0,
|
|
@@ -17473,10 +17475,10 @@ const Tn = class {
|
|
|
17473
17475
|
return Object.keys(n(this, zn)).filter((t) => n(this, zn)[t].disabled);
|
|
17474
17476
|
}
|
|
17475
17477
|
get designTokens() {
|
|
17476
|
-
return n(this,
|
|
17478
|
+
return n(this, Pi).designTokens;
|
|
17477
17479
|
}
|
|
17478
17480
|
get configDiff() {
|
|
17479
|
-
return n(this,
|
|
17481
|
+
return n(this, Pi).configDiff;
|
|
17480
17482
|
}
|
|
17481
17483
|
get mediaConstraints() {
|
|
17482
17484
|
var t, e, r, i, a, o, c, d, l, p, g, v, S, E, _, C, R, L, F, N, B, j, re, et;
|
|
@@ -17500,7 +17502,7 @@ const Tn = class {
|
|
|
17500
17502
|
}
|
|
17501
17503
|
};
|
|
17502
17504
|
let Vu = Tn;
|
|
17503
|
-
yt = new WeakMap(),
|
|
17505
|
+
yt = new WeakMap(), Pi = new WeakMap(), $o = new WeakMap(), zn = new WeakMap();
|
|
17504
17506
|
var X0 = Object.defineProperty, Z0 = Object.getOwnPropertyDescriptor, xf = (s, t, e, r) => {
|
|
17505
17507
|
for (var i = r > 1 ? void 0 : r ? Z0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
17506
17508
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -17693,7 +17695,7 @@ var rD = Object.defineProperty, iD = Object.getOwnPropertyDescriptor, Uc = (s, t
|
|
|
17693
17695
|
for (var i = r > 1 ? void 0 : r ? iD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
17694
17696
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17695
17697
|
return r && i && rD(t, e, i), i;
|
|
17696
|
-
}, rt,
|
|
17698
|
+
}, rt, Nr, Vr, Vd, $f;
|
|
17697
17699
|
class Na {
|
|
17698
17700
|
/**
|
|
17699
17701
|
* @param {Object} args
|
|
@@ -17705,8 +17707,8 @@ class Na {
|
|
|
17705
17707
|
m(this, Vd);
|
|
17706
17708
|
h(this, "name", "");
|
|
17707
17709
|
m(this, rt, {});
|
|
17708
|
-
m(this,
|
|
17709
|
-
m(this,
|
|
17710
|
+
m(this, Nr, "");
|
|
17711
|
+
m(this, Vr, void 0);
|
|
17710
17712
|
h(this, "rateLimitConfig", {
|
|
17711
17713
|
maxInvocations: 5,
|
|
17712
17714
|
period: 1
|
|
@@ -17716,7 +17718,7 @@ class Na {
|
|
|
17716
17718
|
period: 1
|
|
17717
17719
|
});
|
|
17718
17720
|
h(this, "listeners", {});
|
|
17719
|
-
this.name = t, f(this,
|
|
17721
|
+
this.name = t, f(this, Vr, e), f(this, Nr, r);
|
|
17720
17722
|
}
|
|
17721
17723
|
/**
|
|
17722
17724
|
* @description Sets a value in the store.
|
|
@@ -17736,13 +17738,13 @@ class Na {
|
|
|
17736
17738
|
});
|
|
17737
17739
|
}
|
|
17738
17740
|
remoteSet(t, e) {
|
|
17739
|
-
n(this,
|
|
17741
|
+
n(this, Vr).storeInsertKeys(n(this, Nr), this.name, [{ key: t, payload: e }]);
|
|
17740
17742
|
}
|
|
17741
17743
|
bulkSet(t) {
|
|
17742
17744
|
return u(this, null, function* () {
|
|
17743
17745
|
t.forEach(({ key: e, payload: r }) => {
|
|
17744
17746
|
n(this, rt)[e] = r;
|
|
17745
|
-
}), n(this,
|
|
17747
|
+
}), n(this, Vr).storeInsertKeys(n(this, Nr), this.name, t);
|
|
17746
17748
|
});
|
|
17747
17749
|
}
|
|
17748
17750
|
update(t, e, r = !0) {
|
|
@@ -17754,8 +17756,8 @@ class Na {
|
|
|
17754
17756
|
delete(t, e = !0, r = !1) {
|
|
17755
17757
|
return u(this, null, function* () {
|
|
17756
17758
|
if (n(this, rt)[t] && delete n(this, rt)[t], e)
|
|
17757
|
-
return n(this,
|
|
17758
|
-
n(this,
|
|
17759
|
+
return n(this, Vr).storeDeleteKeys(
|
|
17760
|
+
n(this, Nr),
|
|
17759
17761
|
this.name,
|
|
17760
17762
|
[{ key: t }]
|
|
17761
17763
|
);
|
|
@@ -17766,8 +17768,8 @@ class Na {
|
|
|
17766
17768
|
return u(this, null, function* () {
|
|
17767
17769
|
return t.forEach(({ key: e }) => {
|
|
17768
17770
|
n(this, rt)[e] && delete n(this, rt)[e];
|
|
17769
|
-
}), n(this,
|
|
17770
|
-
n(this,
|
|
17771
|
+
}), n(this, Vr).storeDeleteKeys(
|
|
17772
|
+
n(this, Nr),
|
|
17771
17773
|
this.name,
|
|
17772
17774
|
t
|
|
17773
17775
|
);
|
|
@@ -17845,7 +17847,7 @@ class Na {
|
|
|
17845
17847
|
f(this, rt, t);
|
|
17846
17848
|
}
|
|
17847
17849
|
}
|
|
17848
|
-
rt = new WeakMap(),
|
|
17850
|
+
rt = new WeakMap(), Nr = new WeakMap(), Vr = new WeakMap(), Vd = new WeakSet(), $f = function(t, e, r = !0) {
|
|
17849
17851
|
let i;
|
|
17850
17852
|
const a = n(this, rt)[t], o = Object.prototype.toString.call(e), c = Object.prototype.toString.call(a);
|
|
17851
17853
|
if (o !== c) {
|
|
@@ -17886,41 +17888,41 @@ Uc([
|
|
|
17886
17888
|
Uc([
|
|
17887
17889
|
Rt(Oa, "bulkRateLimitConfig")
|
|
17888
17890
|
], Na.prototype, "bulkDelete", 1);
|
|
17889
|
-
var
|
|
17891
|
+
var _i, Ci, Bo, Lu, Ho, Lr, Ld, Ff;
|
|
17890
17892
|
class nD {
|
|
17891
17893
|
constructor(t, e) {
|
|
17892
17894
|
m(this, Bo);
|
|
17893
17895
|
m(this, Ld);
|
|
17894
17896
|
h(this, "stores", /* @__PURE__ */ new Map());
|
|
17895
|
-
m(this,
|
|
17896
|
-
m(this,
|
|
17897
|
+
m(this, _i, void 0);
|
|
17898
|
+
m(this, Ci, "");
|
|
17897
17899
|
m(this, Ho, void 0);
|
|
17898
|
-
m(this,
|
|
17899
|
-
f(this,
|
|
17900
|
+
m(this, Lr, /* @__PURE__ */ new Map());
|
|
17901
|
+
f(this, _i, e), f(this, Ci, t.getValue("meetingId")), f(this, Ho, t), x(this, Ld, Ff).call(this);
|
|
17900
17902
|
}
|
|
17901
17903
|
create(t) {
|
|
17902
17904
|
const e = new Na(
|
|
17903
|
-
{ name: t, socketHandler: n(this,
|
|
17905
|
+
{ name: t, socketHandler: n(this, _i), meetingId: n(this, Ci) }
|
|
17904
17906
|
);
|
|
17905
|
-
return n(this,
|
|
17907
|
+
return n(this, _i).storeGetKeys(n(this, Ci), t, []), new Promise((i, a) => {
|
|
17906
17908
|
const o = setTimeout(() => a(Error("Failed")), 3e3);
|
|
17907
|
-
n(this,
|
|
17909
|
+
n(this, Lr).set(t, { rejectTimeout: o, resolve: i, store: e });
|
|
17908
17910
|
});
|
|
17909
17911
|
}
|
|
17910
17912
|
}
|
|
17911
|
-
|
|
17913
|
+
_i = new WeakMap(), Ci = new WeakMap(), Bo = new WeakSet(), Lu = function() {
|
|
17912
17914
|
return n(this, Ho).getValue("peerId");
|
|
17913
|
-
}, Ho = new WeakMap(),
|
|
17915
|
+
}, Ho = new WeakMap(), Lr = new WeakMap(), Ld = new WeakSet(), Ff = function() {
|
|
17914
17916
|
[
|
|
17915
17917
|
J.storeInsertKeys,
|
|
17916
17918
|
J.storeGetKeys,
|
|
17917
17919
|
J.storeDeleteKeys
|
|
17918
17920
|
].forEach((t) => {
|
|
17919
|
-
n(this,
|
|
17921
|
+
n(this, _i).on(
|
|
17920
17922
|
t,
|
|
17921
17923
|
(e) => u(this, null, function* () {
|
|
17922
17924
|
var a, o;
|
|
17923
|
-
if (e.pluginId !== n(this,
|
|
17925
|
+
if (e.pluginId !== n(this, Ci))
|
|
17924
17926
|
return;
|
|
17925
17927
|
const r = (a = e.storeItems) == null ? void 0 : a.map((c) => {
|
|
17926
17928
|
var d;
|
|
@@ -17934,13 +17936,13 @@ Pi = new WeakMap(), _i = new WeakMap(), Bo = new WeakSet(), Lu = function() {
|
|
|
17934
17936
|
};
|
|
17935
17937
|
});
|
|
17936
17938
|
if (t === J.storeGetKeys) {
|
|
17937
|
-
const c = n(this,
|
|
17938
|
-
n(this,
|
|
17939
|
+
const c = n(this, Lr).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
|
|
17940
|
+
n(this, Lr).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), n(this, Lr).delete(e.storeName)), r.forEach((l) => {
|
|
17939
17941
|
d.set(l.key, l.payload, !1, !1);
|
|
17940
17942
|
});
|
|
17941
17943
|
return;
|
|
17942
17944
|
}
|
|
17943
|
-
const i = this.stores.get(e.storeName) || ((o = n(this,
|
|
17945
|
+
const i = this.stores.get(e.storeName) || ((o = n(this, Lr).get(e.storeName)) == null ? void 0 : o.store);
|
|
17944
17946
|
i !== void 0 && (t === J.storeInsertKeys && r.forEach(({ key: c, peerId: d, payload: l }) => {
|
|
17945
17947
|
d !== n(this, Bo, Lu) && i.set(c, l, !1, !0);
|
|
17946
17948
|
}), t === J.storeDeleteKeys && r.forEach(({ key: c, peerId: d }) => {
|
|
@@ -17950,7 +17952,7 @@ Pi = new WeakMap(), _i = new WeakMap(), Bo = new WeakSet(), Lu = function() {
|
|
|
17950
17952
|
);
|
|
17951
17953
|
});
|
|
17952
17954
|
};
|
|
17953
|
-
function
|
|
17955
|
+
function ci(s) {
|
|
17954
17956
|
var t, e, r, i, a, o, c, d, l, p, g, v, S;
|
|
17955
17957
|
return s ? {
|
|
17956
17958
|
media: {
|
|
@@ -17985,7 +17987,7 @@ var aD = Object.defineProperty, oD = Object.getOwnPropertyDescriptor, Va = (s, t
|
|
|
17985
17987
|
return r && i && aD(t, e, i), i;
|
|
17986
17988
|
};
|
|
17987
17989
|
const cD = 0.8, dD = 1.2;
|
|
17988
|
-
var Zn, ea, Nt,
|
|
17990
|
+
var Zn, ea, Nt, wi, ro, xr, gn, Ri, io, xd, Bf, Ys, qo, Ur, bi, no, Qs, Ud, jo, xu, $d, Hf, Fd, qf, Dg;
|
|
17989
17991
|
let fr = (Dg = class extends Bt {
|
|
17990
17992
|
/**
|
|
17991
17993
|
* @param {Context} context
|
|
@@ -17997,17 +17999,17 @@ let fr = (Dg = class extends Bt {
|
|
|
17997
17999
|
const a = t.getValue("logger");
|
|
17998
18000
|
super(a);
|
|
17999
18001
|
// eslint-disable-next-line class-methods-use-this
|
|
18000
|
-
m(this,
|
|
18001
|
-
m(this,
|
|
18002
|
+
m(this, wi);
|
|
18003
|
+
m(this, xr);
|
|
18002
18004
|
/**
|
|
18003
18005
|
* Returns true if the local participant has joined the meeting.
|
|
18004
18006
|
*/
|
|
18005
|
-
m(this,
|
|
18007
|
+
m(this, Ri);
|
|
18006
18008
|
/**
|
|
18007
18009
|
* Returns true if the local participant has joined the meeting.
|
|
18008
18010
|
*/
|
|
18009
18011
|
m(this, xd);
|
|
18010
|
-
m(this,
|
|
18012
|
+
m(this, bi);
|
|
18011
18013
|
m(this, jo);
|
|
18012
18014
|
m(this, $d);
|
|
18013
18015
|
m(this, Fd);
|
|
@@ -18089,7 +18091,7 @@ let fr = (Dg = class extends Bt {
|
|
|
18089
18091
|
m(this, Nt, void 0);
|
|
18090
18092
|
m(this, Ys, void 0);
|
|
18091
18093
|
m(this, qo, void 0);
|
|
18092
|
-
m(this,
|
|
18094
|
+
m(this, Ur, /* @__PURE__ */ new Map());
|
|
18093
18095
|
/*
|
|
18094
18096
|
* Specifies the currently set max spatial layer
|
|
18095
18097
|
* Assuming a two layer simulcast, 0 being the lower layer
|
|
@@ -18158,7 +18160,7 @@ let fr = (Dg = class extends Bt {
|
|
|
18158
18160
|
* @param {boolean} [emitEvent=true]
|
|
18159
18161
|
*/
|
|
18160
18162
|
setVideoEnabled(t, e = !0) {
|
|
18161
|
-
this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", D({},
|
|
18163
|
+
this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", D({}, ci(this))), this.emit("videoUpdate", {
|
|
18162
18164
|
videoEnabled: this.videoEnabled,
|
|
18163
18165
|
videoTrack: this.videoTrack
|
|
18164
18166
|
}));
|
|
@@ -18168,7 +18170,7 @@ let fr = (Dg = class extends Bt {
|
|
|
18168
18170
|
* @param {boolean} [emitEvent=true]
|
|
18169
18171
|
*/
|
|
18170
18172
|
setAudioEnabled(t, e = !0) {
|
|
18171
|
-
this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", D({},
|
|
18173
|
+
this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", D({}, ci(this))), this.emit("audioUpdate", {
|
|
18172
18174
|
audioEnabled: this.audioEnabled,
|
|
18173
18175
|
audioTrack: this.audioTrack
|
|
18174
18176
|
}));
|
|
@@ -18184,7 +18186,7 @@ let fr = (Dg = class extends Bt {
|
|
|
18184
18186
|
});
|
|
18185
18187
|
}
|
|
18186
18188
|
setupEvents() {
|
|
18187
|
-
this.on("videoUpdate", x(this, jo, xu)), n(this,
|
|
18189
|
+
this.on("videoUpdate", x(this, jo, xu)), n(this, xr, gn) && (this.on("audioUpdate", x(this, $d, Hf)), this.on("screenShareUpdate", x(this, Fd, qf)));
|
|
18188
18190
|
}
|
|
18189
18191
|
/**
|
|
18190
18192
|
* Returns `participant.id` if user has permission
|
|
@@ -18192,11 +18194,11 @@ let fr = (Dg = class extends Bt {
|
|
|
18192
18194
|
*/
|
|
18193
18195
|
pin() {
|
|
18194
18196
|
return u(this, null, function* () {
|
|
18195
|
-
if (!n(this,
|
|
18197
|
+
if (!n(this, Ri, io))
|
|
18196
18198
|
throw new A("Can`t pin participant without joining room", "1205");
|
|
18197
18199
|
if (!n(this, Ys).permissions.pinParticipant)
|
|
18198
18200
|
throw new A("You do not have permission to pin participants.", "1201");
|
|
18199
|
-
return n(this,
|
|
18201
|
+
return n(this, wi, ro).pinPeer(this.id);
|
|
18200
18202
|
});
|
|
18201
18203
|
}
|
|
18202
18204
|
/**
|
|
@@ -18205,11 +18207,11 @@ let fr = (Dg = class extends Bt {
|
|
|
18205
18207
|
*/
|
|
18206
18208
|
unpin() {
|
|
18207
18209
|
return u(this, null, function* () {
|
|
18208
|
-
if (!n(this,
|
|
18210
|
+
if (!n(this, Ri, io))
|
|
18209
18211
|
throw new A("Can`t unpin participant without joining room", "1205");
|
|
18210
18212
|
if (!n(this, Ys).permissions.pinParticipant)
|
|
18211
18213
|
throw new A("You do not have permission to unpin participants.", "1201");
|
|
18212
|
-
return n(this,
|
|
18214
|
+
return n(this, wi, ro).pinPeer(null);
|
|
18213
18215
|
});
|
|
18214
18216
|
}
|
|
18215
18217
|
/**
|
|
@@ -18222,20 +18224,20 @@ let fr = (Dg = class extends Bt {
|
|
|
18222
18224
|
var i;
|
|
18223
18225
|
f(this, Zn, t);
|
|
18224
18226
|
const r = t ? "pinned" : "unpinned";
|
|
18225
|
-
(i = n(this,
|
|
18227
|
+
(i = n(this, bi, no)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
18226
18228
|
}
|
|
18227
18229
|
disableAudio() {
|
|
18228
18230
|
return u(this, null, function* () {
|
|
18229
18231
|
const t = this.id;
|
|
18230
18232
|
if (this.logger.info("Participant::disable_audio", {
|
|
18231
18233
|
participant: { id: t }
|
|
18232
|
-
}), !n(this,
|
|
18234
|
+
}), !n(this, Ri, io))
|
|
18233
18235
|
throw new A(
|
|
18234
18236
|
"Can`t disable participant audio without joining room",
|
|
18235
18237
|
"1205"
|
|
18236
18238
|
);
|
|
18237
18239
|
if (n(this, Ys).permissions.canDisableParticipantAudio)
|
|
18238
|
-
return n(this,
|
|
18240
|
+
return n(this, wi, ro).disableAudio(t);
|
|
18239
18241
|
throw this.logger.error("Participant::unauthorized_disable_audio", {
|
|
18240
18242
|
participant: { id: t }
|
|
18241
18243
|
}), new A(
|
|
@@ -18270,13 +18272,13 @@ let fr = (Dg = class extends Bt {
|
|
|
18270
18272
|
const t = this.id;
|
|
18271
18273
|
if (this.logger.info("Participant::disable_video", {
|
|
18272
18274
|
participant: { id: t }
|
|
18273
|
-
}), !n(this,
|
|
18275
|
+
}), !n(this, Ri, io))
|
|
18274
18276
|
throw new A(
|
|
18275
18277
|
"Can`t disable participant video without joining room",
|
|
18276
18278
|
"1205"
|
|
18277
18279
|
);
|
|
18278
18280
|
if (n(this, Ys).permissions.canDisableParticipantVideo)
|
|
18279
|
-
return n(this,
|
|
18281
|
+
return n(this, wi, ro).disableVideo(t);
|
|
18280
18282
|
throw this.logger.error("Participant::unauthorized_disable_video", {
|
|
18281
18283
|
participant: { id: t }
|
|
18282
18284
|
}), new A(
|
|
@@ -18310,7 +18312,7 @@ let fr = (Dg = class extends Bt {
|
|
|
18310
18312
|
if (!t)
|
|
18311
18313
|
return;
|
|
18312
18314
|
let e;
|
|
18313
|
-
(i = (r = n(this,
|
|
18315
|
+
(i = (r = n(this, Ur).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, Ud).call(this, t)), e.observe(t)), n(this, Ur).set(t, { observer: e }), this.updateVideo(t), (o = n(this, bi, no)) == null || o.addSource(
|
|
18314
18316
|
this.id,
|
|
18315
18317
|
t,
|
|
18316
18318
|
this.videoEnabled,
|
|
@@ -18326,10 +18328,10 @@ let fr = (Dg = class extends Bt {
|
|
|
18326
18328
|
deregisterVideoElement(t) {
|
|
18327
18329
|
var e, r, i, a;
|
|
18328
18330
|
if (!t) {
|
|
18329
|
-
(e = n(this,
|
|
18331
|
+
(e = n(this, bi, no)) == null || e.removeSource(this.id);
|
|
18330
18332
|
return;
|
|
18331
18333
|
}
|
|
18332
|
-
t.srcObject = void 0, (i = (r = n(this,
|
|
18334
|
+
t.srcObject = void 0, (i = (r = n(this, Ur).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Ur).delete(t), (a = n(this, bi, no)) == null || a.removeSource(this.id);
|
|
18333
18335
|
}
|
|
18334
18336
|
/**
|
|
18335
18337
|
* Internal method, do not use
|
|
@@ -18349,24 +18351,24 @@ let fr = (Dg = class extends Bt {
|
|
|
18349
18351
|
t.srcObject = void 0;
|
|
18350
18352
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
18351
18353
|
}
|
|
18352
|
-
}, Zn = new WeakMap(), ea = new WeakMap(), Nt = new WeakMap(),
|
|
18354
|
+
}, Zn = new WeakMap(), ea = new WeakMap(), Nt = new WeakMap(), wi = new WeakSet(), ro = function() {
|
|
18353
18355
|
return n(this, Nt).getValue("roomNodeClient");
|
|
18354
|
-
},
|
|
18356
|
+
}, xr = new WeakSet(), gn = function() {
|
|
18355
18357
|
return n(this, Nt).getValue("audioPlayback");
|
|
18356
|
-
},
|
|
18358
|
+
}, Ri = new WeakSet(), io = function() {
|
|
18357
18359
|
return n(this, Nt).getValue("connectionHandler").mediaJoined;
|
|
18358
18360
|
}, xd = new WeakSet(), Bf = function() {
|
|
18359
18361
|
return n(this, Nt).getValue("connectionHandler").socketJoined;
|
|
18360
|
-
}, Ys = new WeakMap(), qo = new WeakMap(),
|
|
18362
|
+
}, Ys = new WeakMap(), qo = new WeakMap(), Ur = new WeakMap(), bi = new WeakSet(), no = function() {
|
|
18361
18363
|
return n(this, Nt).getValue("pip");
|
|
18362
18364
|
}, Qs = new WeakMap(), Ud = new WeakMap(), jo = new WeakSet(), xu = function() {
|
|
18363
|
-
Array.from(n(this,
|
|
18365
|
+
Array.from(n(this, Ur).keys()).forEach(this.updateVideo);
|
|
18364
18366
|
}, $d = new WeakSet(), Hf = function() {
|
|
18365
18367
|
var t, e;
|
|
18366
|
-
this.audioEnabled && this.audioTrack ? (t = n(this,
|
|
18368
|
+
this.audioEnabled && this.audioTrack ? (t = n(this, xr, gn)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, xr, gn)) == null || e.removeParticipantTrack(this.id);
|
|
18367
18369
|
}, Fd = new WeakSet(), qf = function() {
|
|
18368
18370
|
var t, e;
|
|
18369
|
-
this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this,
|
|
18371
|
+
this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, xr, gn)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, xr, gn)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
|
|
18370
18372
|
}, Dg);
|
|
18371
18373
|
Va([
|
|
18372
18374
|
P.trace("Participant.disableAudio")
|
|
@@ -18426,33 +18428,33 @@ class so extends Mf {
|
|
|
18426
18428
|
return super.delete(t, e, r);
|
|
18427
18429
|
}
|
|
18428
18430
|
}
|
|
18429
|
-
var
|
|
18431
|
+
var $r;
|
|
18430
18432
|
class lD extends Da {
|
|
18431
18433
|
constructor(e) {
|
|
18432
18434
|
super(e);
|
|
18433
|
-
m(this,
|
|
18434
|
-
f(this,
|
|
18435
|
+
m(this, $r, void 0);
|
|
18436
|
+
f(this, $r, /* @__PURE__ */ new Map());
|
|
18435
18437
|
}
|
|
18436
18438
|
/**
|
|
18437
18439
|
* @private
|
|
18438
18440
|
*/
|
|
18439
18441
|
__set(e, r) {
|
|
18440
|
-
return n(this,
|
|
18442
|
+
return n(this, $r).set(e, r);
|
|
18441
18443
|
}
|
|
18442
18444
|
/**
|
|
18443
18445
|
* @private
|
|
18444
18446
|
*/
|
|
18445
18447
|
__clear() {
|
|
18446
|
-
return n(this,
|
|
18448
|
+
return n(this, $r).clear();
|
|
18447
18449
|
}
|
|
18448
18450
|
get(e) {
|
|
18449
|
-
return n(this,
|
|
18451
|
+
return n(this, $r).get(e);
|
|
18450
18452
|
}
|
|
18451
18453
|
toArray() {
|
|
18452
|
-
return Array.from(n(this,
|
|
18454
|
+
return Array.from(n(this, $r).values());
|
|
18453
18455
|
}
|
|
18454
18456
|
}
|
|
18455
|
-
|
|
18457
|
+
$r = new WeakMap();
|
|
18456
18458
|
class uD {
|
|
18457
18459
|
constructor() {
|
|
18458
18460
|
h(this, "_orderedArray");
|
|
@@ -18534,7 +18536,7 @@ var pD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, jt = (s, t
|
|
|
18534
18536
|
return r && i && pD(t, e, i), i;
|
|
18535
18537
|
};
|
|
18536
18538
|
const mD = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
18537
|
-
var Ee, Go, Uu,
|
|
18539
|
+
var Ee, Go, Uu, ki, ao, ta, cd, Ai, Et, Og;
|
|
18538
18540
|
let St = (Og = class extends Bt {
|
|
18539
18541
|
/**
|
|
18540
18542
|
* This constructs a new Participant object and maintains
|
|
@@ -18556,7 +18558,7 @@ let St = (Og = class extends Bt {
|
|
|
18556
18558
|
/**
|
|
18557
18559
|
* Returns true if the local participant has joined the meeting.
|
|
18558
18560
|
*/
|
|
18559
|
-
m(this,
|
|
18561
|
+
m(this, ki);
|
|
18560
18562
|
/**
|
|
18561
18563
|
* Returns true if the local participant has joined the meeting.
|
|
18562
18564
|
*/
|
|
@@ -18592,7 +18594,7 @@ let St = (Og = class extends Bt {
|
|
|
18592
18594
|
*/
|
|
18593
18595
|
h(this, "all");
|
|
18594
18596
|
m(this, Ee, void 0);
|
|
18595
|
-
m(this,
|
|
18597
|
+
m(this, Ai, void 0);
|
|
18596
18598
|
m(this, Et, void 0);
|
|
18597
18599
|
h(this, "rateLimitConfig", {
|
|
18598
18600
|
maxInvocations: 5,
|
|
@@ -18623,7 +18625,7 @@ let St = (Og = class extends Bt {
|
|
|
18623
18625
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18624
18626
|
*/
|
|
18625
18627
|
h(this, "selectedPeers", jf);
|
|
18626
|
-
f(this, Ee, t), f(this,
|
|
18628
|
+
f(this, Ee, t), f(this, Ai, e), f(this, Et, r), this.waitlisted = new so(i), this.joined = new so(i), this.videoSubscribed = new so(i), this.audioSubscribed = new so(i), this.active = this.videoSubscribed, this.pinned = new so(i), this.all = new lD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18627
18629
|
}
|
|
18628
18630
|
/**
|
|
18629
18631
|
* Return the controls for Picture-in-Picture
|
|
@@ -18702,7 +18704,7 @@ let St = (Og = class extends Bt {
|
|
|
18702
18704
|
*/
|
|
18703
18705
|
acceptWaitingRoomRequest(t) {
|
|
18704
18706
|
var r, i;
|
|
18705
|
-
if (!n(this,
|
|
18707
|
+
if (!n(this, ki, ao))
|
|
18706
18708
|
throw new A(
|
|
18707
18709
|
"Can`t accept waiting room request without joining room",
|
|
18708
18710
|
"1205"
|
|
@@ -18733,7 +18735,7 @@ let St = (Og = class extends Bt {
|
|
|
18733
18735
|
rejectWaitingRoomRequest(t) {
|
|
18734
18736
|
return u(this, null, function* () {
|
|
18735
18737
|
var r, i;
|
|
18736
|
-
if (!n(this,
|
|
18738
|
+
if (!n(this, ki, ao))
|
|
18737
18739
|
throw new A(
|
|
18738
18740
|
"Can`t reject waiting room request without joining room",
|
|
18739
18741
|
"1205"
|
|
@@ -18865,7 +18867,7 @@ let St = (Og = class extends Bt {
|
|
|
18865
18867
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
18866
18868
|
}), !n(this, ta, cd))
|
|
18867
18869
|
throw new A("Can`t disable all audio without joining room", "1205");
|
|
18868
|
-
if (n(this,
|
|
18870
|
+
if (n(this, Ai).permissions.canAllowParticipantAudio)
|
|
18869
18871
|
return n(this, Go, Uu).muteAll(t);
|
|
18870
18872
|
throw this.logger.error("Participants::unauthorized_disable_all_audio", {
|
|
18871
18873
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
@@ -18879,7 +18881,7 @@ let St = (Og = class extends Bt {
|
|
|
18879
18881
|
return u(this, null, function* () {
|
|
18880
18882
|
if (this.logger.info("Participants::disable_all_video"), !n(this, ta, cd))
|
|
18881
18883
|
throw new A("Can`t disable all video without joining room", "1205");
|
|
18882
|
-
if (n(this,
|
|
18884
|
+
if (n(this, Ai).permissions.canAllowParticipantVideo)
|
|
18883
18885
|
return n(this, Go, Uu).muteAllVideo();
|
|
18884
18886
|
throw this.logger.error("Participants::unauthorized_disable_all_video"), new A(
|
|
18885
18887
|
"Unauthorized: User does not have permission to disable peer video.",
|
|
@@ -18906,9 +18908,9 @@ let St = (Og = class extends Bt {
|
|
|
18906
18908
|
}
|
|
18907
18909
|
kickAll() {
|
|
18908
18910
|
return u(this, null, function* () {
|
|
18909
|
-
if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this,
|
|
18911
|
+
if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this, ki, ao))
|
|
18910
18912
|
throw new A("Can`t kick all without joining room", "1205");
|
|
18911
|
-
if (!n(this,
|
|
18913
|
+
if (!n(this, Ai).permissions.kickParticipant)
|
|
18912
18914
|
throw this.logger.error("Participants::unauthorized_kick_all"), new A(
|
|
18913
18915
|
"Unauthorized: User does not have permission to kick peers.",
|
|
18914
18916
|
"1201"
|
|
@@ -18919,7 +18921,7 @@ let St = (Og = class extends Bt {
|
|
|
18919
18921
|
}
|
|
18920
18922
|
broadcastMessage(t, e, r) {
|
|
18921
18923
|
return u(this, null, function* () {
|
|
18922
|
-
if (this.logger.info("Participants::broadcastMessage"), !n(this,
|
|
18924
|
+
if (this.logger.info("Participants::broadcastMessage"), !n(this, ki, ao))
|
|
18923
18925
|
throw new A("Can`t broadcast message without joining room", "1205");
|
|
18924
18926
|
if (!(t != null && t.trim()))
|
|
18925
18927
|
throw new A("`type` must be a non-empty string.", "1209");
|
|
@@ -18963,13 +18965,13 @@ let St = (Og = class extends Bt {
|
|
|
18963
18965
|
}
|
|
18964
18966
|
}, Ee = new WeakMap(), Go = new WeakSet(), Uu = function() {
|
|
18965
18967
|
return n(this, Ee).getValue("roomNodeClient");
|
|
18966
|
-
},
|
|
18968
|
+
}, ki = new WeakSet(), ao = function() {
|
|
18967
18969
|
var t;
|
|
18968
18970
|
return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0;
|
|
18969
18971
|
}, ta = new WeakSet(), cd = function() {
|
|
18970
18972
|
var t;
|
|
18971
18973
|
return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
18972
|
-
},
|
|
18974
|
+
}, Ai = new WeakMap(), Et = new WeakMap(), Og);
|
|
18973
18975
|
jt([
|
|
18974
18976
|
P.trace("Participants.setViewMode")
|
|
18975
18977
|
], St.prototype, "setViewMode", 1);
|
|
@@ -20065,13 +20067,13 @@ const yn = class extends Bt {
|
|
|
20065
20067
|
if (r && (r.private && _r(n(this, q).chat.private, r.private), r.public && _r(n(this, q).chat.public, r.public), this.emit("chatUpdate")), i && _r(n(this, q).connectedMeetings, i), c) {
|
|
20066
20068
|
const S = (_) => {
|
|
20067
20069
|
switch (_) {
|
|
20068
|
-
case
|
|
20070
|
+
case Jr.NONE:
|
|
20069
20071
|
return H.Allowed;
|
|
20070
|
-
case
|
|
20072
|
+
case Jr.ALLOWED:
|
|
20071
20073
|
return H.Allowed;
|
|
20072
|
-
case
|
|
20074
|
+
case Jr.NOT_ALLOWED:
|
|
20073
20075
|
return H.NotAllowed;
|
|
20074
|
-
case
|
|
20076
|
+
case Jr.CAN_REQUEST:
|
|
20075
20077
|
return H.CanRequest;
|
|
20076
20078
|
default:
|
|
20077
20079
|
return;
|
|
@@ -20850,7 +20852,7 @@ var SD = Object.defineProperty, TD = Object.getOwnPropertyDescriptor, Tt = (s, t
|
|
|
20850
20852
|
for (var i = r > 1 ? void 0 : r ? TD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
20851
20853
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20852
20854
|
return r && i && SD(t, e, i), i;
|
|
20853
|
-
}, na, gt, aa, Ue, Xs,
|
|
20855
|
+
}, na, gt, aa, Ue, Xs, ii, He, Ye, oa, dd, Ve, Fe, ca, da, Wo, Fu, Vg;
|
|
20854
20856
|
let ze = (Vg = class extends Wf {
|
|
20855
20857
|
constructor(t, e, r, i, a) {
|
|
20856
20858
|
var c;
|
|
@@ -20943,7 +20945,7 @@ let ze = (Vg = class extends Wf {
|
|
|
20943
20945
|
t && t.onError((e) => {
|
|
20944
20946
|
this.emit("autoplayError", e);
|
|
20945
20947
|
}), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
20946
|
-
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({},
|
|
20948
|
+
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ci(this))), n(this, Ve, Fe) && this.audioEnabled)
|
|
20947
20949
|
try {
|
|
20948
20950
|
yield n(this, He, Ye).shareMic(this.audioTrack);
|
|
20949
20951
|
} catch (e) {
|
|
@@ -20956,7 +20958,7 @@ let ze = (Vg = class extends Wf {
|
|
|
20956
20958
|
audioTrack: this.audioTrack
|
|
20957
20959
|
});
|
|
20958
20960
|
})), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
20959
|
-
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({},
|
|
20961
|
+
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ci(this))), n(this, Ve, Fe) && this.rawVideoTrack === void 0)
|
|
20960
20962
|
this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
20961
20963
|
else if (this.videoEnabled && n(this, Ve, Fe))
|
|
20962
20964
|
try {
|
|
@@ -20999,12 +21001,12 @@ let ze = (Vg = class extends Wf {
|
|
|
20999
21001
|
}
|
|
21000
21002
|
), this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare());
|
|
21001
21003
|
}
|
|
21002
|
-
this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", D({},
|
|
21004
|
+
this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", D({}, ci(this))), this.emit("screenShareUpdate", {
|
|
21003
21005
|
screenShareEnabled: this.screenShareEnabled,
|
|
21004
21006
|
screenShareTracks: this.screenShareTracks
|
|
21005
21007
|
});
|
|
21006
21008
|
})), this.localMediaHandler.on("SCREENSHARE_ENDED", () => u(this, null, function* () {
|
|
21007
|
-
this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", D({},
|
|
21009
|
+
this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", D({}, ci(this)));
|
|
21008
21010
|
})), this.localMediaHandler.on("AUDIO_TRACK_SILENT", () => {
|
|
21009
21011
|
var e;
|
|
21010
21012
|
(e = n(this, Ue)) == null || e.getValue("callstats").mediaTrackMuted("AUDIO");
|
|
@@ -21104,7 +21106,7 @@ let ze = (Vg = class extends Wf {
|
|
|
21104
21106
|
this.emit("videoUpdate", {
|
|
21105
21107
|
videoEnabled: this.videoEnabled,
|
|
21106
21108
|
videoTrack: this.videoTrack
|
|
21107
|
-
}), this.logger.info("Self.enableVideo", D({},
|
|
21109
|
+
}), this.logger.info("Self.enableVideo", D({}, ci(this)));
|
|
21108
21110
|
}
|
|
21109
21111
|
});
|
|
21110
21112
|
}
|
|
@@ -21184,7 +21186,7 @@ let ze = (Vg = class extends Wf {
|
|
|
21184
21186
|
var i;
|
|
21185
21187
|
f(this, aa, t);
|
|
21186
21188
|
const r = t ? "pinned" : "unpinned";
|
|
21187
|
-
(i = n(this, Xs,
|
|
21189
|
+
(i = n(this, Xs, ii)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
21188
21190
|
}
|
|
21189
21191
|
/**
|
|
21190
21192
|
* Returns true if the current user is pinned.
|
|
@@ -21277,7 +21279,7 @@ let ze = (Vg = class extends Wf {
|
|
|
21277
21279
|
}
|
|
21278
21280
|
registerVideoElement(t, e = !1) {
|
|
21279
21281
|
var r, i;
|
|
21280
|
-
t && (e ? n(this, ca).add(t) : n(this, da).add(t), this.updateVideo(t), e || (i = n(this, Xs,
|
|
21282
|
+
t && (e ? n(this, ca).add(t) : n(this, da).add(t), this.updateVideo(t), e || (i = n(this, Xs, ii)) == null || i.addSource(
|
|
21281
21283
|
this.id,
|
|
21282
21284
|
t,
|
|
21283
21285
|
this.videoEnabled,
|
|
@@ -21289,10 +21291,10 @@ let ze = (Vg = class extends Wf {
|
|
|
21289
21291
|
}
|
|
21290
21292
|
deregisterVideoElement(t, e = !1) {
|
|
21291
21293
|
if (!t) {
|
|
21292
|
-
n(this, Xs,
|
|
21294
|
+
n(this, Xs, ii).removeSource(this.id);
|
|
21293
21295
|
return;
|
|
21294
21296
|
}
|
|
21295
|
-
t.srcObject = void 0, e ? n(this, ca).delete(t) : (n(this, da).delete(t), n(this, Xs,
|
|
21297
|
+
t.srcObject = void 0, e ? n(this, ca).delete(t) : (n(this, da).delete(t), n(this, Xs, ii).removeSource(this.id));
|
|
21296
21298
|
}
|
|
21297
21299
|
/**
|
|
21298
21300
|
* Internal method, do not use
|
|
@@ -21306,12 +21308,12 @@ let ze = (Vg = class extends Wf {
|
|
|
21306
21308
|
if ((o == null ? void 0 : o.id) === this.videoTrack.id)
|
|
21307
21309
|
return;
|
|
21308
21310
|
const c = new MediaStream();
|
|
21309
|
-
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, Xs,
|
|
21311
|
+
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, Xs, ii)) == null || i.enableSource(this.id);
|
|
21310
21312
|
} else
|
|
21311
|
-
t.srcObject = void 0, e || (a = n(this, Xs,
|
|
21313
|
+
t.srcObject = void 0, e || (a = n(this, Xs, ii)) == null || a.disableSource(this.id);
|
|
21312
21314
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
21313
21315
|
}
|
|
21314
|
-
}, na = new WeakMap(), gt = new WeakMap(), aa = new WeakMap(), Ue = new WeakMap(), Xs = new WeakSet(),
|
|
21316
|
+
}, na = new WeakMap(), gt = new WeakMap(), aa = new WeakMap(), Ue = new WeakMap(), Xs = new WeakSet(), ii = function() {
|
|
21315
21317
|
return n(this, Ue).getValue("pip");
|
|
21316
21318
|
}, He = new WeakSet(), Ye = function() {
|
|
21317
21319
|
return n(this, Ue).getValue("roomNodeClient");
|
|
@@ -21524,7 +21526,7 @@ class wt extends A {
|
|
|
21524
21526
|
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, wt) : this.stack = new Error(t).stack;
|
|
21525
21527
|
}
|
|
21526
21528
|
}
|
|
21527
|
-
class
|
|
21529
|
+
class di extends A {
|
|
21528
21530
|
constructor(t) {
|
|
21529
21531
|
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, wt) : this.stack = new Error(t).stack;
|
|
21530
21532
|
}
|
|
@@ -22340,7 +22342,7 @@ class Lh extends Nh {
|
|
|
22340
22342
|
function wD(s, t) {
|
|
22341
22343
|
return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
|
|
22342
22344
|
}
|
|
22343
|
-
var zo,
|
|
22345
|
+
var zo, Ii, Ds, Hd, Os, wr, Yo, Hu, qd, Kf, jd, zf;
|
|
22344
22346
|
class RD extends Fl {
|
|
22345
22347
|
constructor(e, r) {
|
|
22346
22348
|
var i;
|
|
@@ -22390,10 +22392,10 @@ class RD extends Fl {
|
|
|
22390
22392
|
* RTCRtpReceiver associated with the consumer
|
|
22391
22393
|
*/
|
|
22392
22394
|
m(this, zo, void 0);
|
|
22393
|
-
m(this,
|
|
22395
|
+
m(this, Ii, void 0);
|
|
22394
22396
|
m(this, Ds, void 0);
|
|
22395
22397
|
m(this, Hd, void 0);
|
|
22396
|
-
this.id = r.id, this.localId = r.localId, f(this, zo, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Ds, !1), this.producerId = r.producerId, this.track = r.track, f(this,
|
|
22398
|
+
this.id = r.id, this.localId = r.localId, f(this, zo, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Ds, !1), this.producerId = r.producerId, this.track = r.track, f(this, Ii, (i = r.paused) != null ? i : !1), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, x(this, qd, Kf).call(this), f(this, Hd, e);
|
|
22397
22399
|
}
|
|
22398
22400
|
/**
|
|
22399
22401
|
* Indicates whether this consumer is closed
|
|
@@ -22411,13 +22413,13 @@ class RD extends Fl {
|
|
|
22411
22413
|
* Indicates whether the consumer is paused
|
|
22412
22414
|
*/
|
|
22413
22415
|
get paused() {
|
|
22414
|
-
return n(this,
|
|
22416
|
+
return n(this, Ii);
|
|
22415
22417
|
}
|
|
22416
22418
|
/**
|
|
22417
22419
|
* Closes the Consumer.
|
|
22418
22420
|
*/
|
|
22419
22421
|
close(e, r) {
|
|
22420
|
-
n(this, Ds) || (this.logger.debug(`Consumer::close() ${e ? `with reason ${e}` : ""}`, n(this, Os,
|
|
22422
|
+
n(this, Ds) || (this.logger.debug(`Consumer::close() ${e ? `with reason ${e}` : ""}`, n(this, Os, wr)), f(this, Ds, !0), r && (x(this, jd, zf).call(this), this.transceiver.stop()), this.safeEmit("close", e));
|
|
22421
22423
|
}
|
|
22422
22424
|
/**
|
|
22423
22425
|
* Get associated RTCRtpReceiver stats.
|
|
@@ -22433,24 +22435,24 @@ class RD extends Fl {
|
|
|
22433
22435
|
* Pauses receiving media.
|
|
22434
22436
|
*/
|
|
22435
22437
|
pause() {
|
|
22436
|
-
if (this.logger.debug("consumer::pause()", n(this, Os,
|
|
22437
|
-
this.logger.error("consumer::pause() | Consumer closed", n(this, Os,
|
|
22438
|
+
if (this.logger.debug("consumer::pause()", n(this, Os, wr)), n(this, Ds)) {
|
|
22439
|
+
this.logger.error("consumer::pause() | Consumer closed", n(this, Os, wr));
|
|
22438
22440
|
return;
|
|
22439
22441
|
}
|
|
22440
|
-
f(this,
|
|
22442
|
+
f(this, Ii, !0), this.track.enabled = !1, this.safeEmit("pause");
|
|
22441
22443
|
}
|
|
22442
22444
|
/**
|
|
22443
22445
|
* Resumes receiving media.
|
|
22444
22446
|
*/
|
|
22445
22447
|
resume() {
|
|
22446
|
-
if (this.logger.debug("consumer::resume()", n(this, Os,
|
|
22447
|
-
this.logger.error("Consumer::resume() | Consumer closed", n(this, Os,
|
|
22448
|
+
if (this.logger.debug("consumer::resume()", n(this, Os, wr)), n(this, Ds)) {
|
|
22449
|
+
this.logger.error("Consumer::resume() | Consumer closed", n(this, Os, wr));
|
|
22448
22450
|
return;
|
|
22449
22451
|
}
|
|
22450
|
-
f(this,
|
|
22452
|
+
f(this, Ii, !1), this.track.enabled = !0, this.safeEmit("resume");
|
|
22451
22453
|
}
|
|
22452
22454
|
}
|
|
22453
|
-
zo = new WeakMap(),
|
|
22455
|
+
zo = new WeakMap(), Ii = new WeakMap(), Ds = new WeakMap(), Hd = new WeakMap(), Os = new WeakSet(), wr = function() {
|
|
22454
22456
|
return {
|
|
22455
22457
|
consumer: {
|
|
22456
22458
|
id: this.id,
|
|
@@ -22460,19 +22462,19 @@ zo = new WeakMap(), Ai = new WeakMap(), Ds = new WeakMap(), Hd = new WeakMap(),
|
|
|
22460
22462
|
}
|
|
22461
22463
|
};
|
|
22462
22464
|
}, Yo = new WeakSet(), Hu = function() {
|
|
22463
|
-
this.logger.debug('Consumer::track "ended" event', n(this, Os,
|
|
22465
|
+
this.logger.debug('Consumer::track "ended" event', n(this, Os, wr)), this.safeEmit("trackended");
|
|
22464
22466
|
}, qd = new WeakSet(), Kf = function() {
|
|
22465
22467
|
this.track.addEventListener("ended", x(this, Yo, Hu).bind(this));
|
|
22466
22468
|
}, jd = new WeakSet(), zf = function() {
|
|
22467
22469
|
try {
|
|
22468
22470
|
this.track.removeEventListener("ended", x(this, Yo, Hu)), this.track.stop();
|
|
22469
22471
|
} catch (e) {
|
|
22470
|
-
this.logger.error("Consumer::destroyTrack()", G(D({}, n(this, Os,
|
|
22472
|
+
this.logger.error("Consumer::destroyTrack()", G(D({}, n(this, Os, wr)), {
|
|
22471
22473
|
error: e
|
|
22472
22474
|
}));
|
|
22473
22475
|
}
|
|
22474
22476
|
};
|
|
22475
|
-
var ms, la, ua,
|
|
22477
|
+
var ms, la, ua, Mi, Zt, Qe, Fr, ha, Gd, Lt, ds;
|
|
22476
22478
|
class bD extends Fl {
|
|
22477
22479
|
/**
|
|
22478
22480
|
* @emits transportclose
|
|
@@ -22521,13 +22523,13 @@ class bD extends Fl {
|
|
|
22521
22523
|
/**
|
|
22522
22524
|
* Specify if we should replace the RTCRtpSender.track with null when paused.
|
|
22523
22525
|
*/
|
|
22524
|
-
m(this,
|
|
22526
|
+
m(this, Mi, void 0);
|
|
22525
22527
|
m(this, Zt, !1);
|
|
22526
22528
|
m(this, Qe, void 0);
|
|
22527
|
-
m(this,
|
|
22529
|
+
m(this, Fr, void 0);
|
|
22528
22530
|
m(this, ha, void 0);
|
|
22529
22531
|
m(this, Gd, void 0);
|
|
22530
|
-
this.id = r.id, this.localId = r.localId, f(this, Qe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this,
|
|
22532
|
+
this.id = r.id, this.localId = r.localId, f(this, Qe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, Fr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, ha, void 0), f(this, la, r.stopTracks), f(this, ua, r.disableTrackOnPause), f(this, Mi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, ms, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Gd, e);
|
|
22531
22533
|
}
|
|
22532
22534
|
/**
|
|
22533
22535
|
* Whether the Producer is closed.
|
|
@@ -22545,7 +22547,7 @@ class bD extends Fl {
|
|
|
22545
22547
|
* Whether the Producer is paused.
|
|
22546
22548
|
*/
|
|
22547
22549
|
get paused() {
|
|
22548
|
-
return n(this,
|
|
22550
|
+
return n(this, Fr);
|
|
22549
22551
|
}
|
|
22550
22552
|
/**
|
|
22551
22553
|
* Max spatial layer.
|
|
@@ -22584,7 +22586,7 @@ class bD extends Fl {
|
|
|
22584
22586
|
* Pauses sending media.
|
|
22585
22587
|
*/
|
|
22586
22588
|
pause() {
|
|
22587
|
-
this.logger.debug("Producer::pause()", n(this, Lt, ds)), n(this, Zt) && this.logger.error("Producer::pause() | Producer closed", n(this, Lt, ds)), f(this,
|
|
22589
|
+
this.logger.debug("Producer::pause()", n(this, Lt, ds)), n(this, Zt) && this.logger.error("Producer::pause() | Producer closed", n(this, Lt, ds)), f(this, Fr, !0), n(this, Qe) && n(this, ua) && (n(this, Qe).enabled = !1), n(this, Mi) && n(this, ms).replaceTrack(this.localId, null), this.emit("pause");
|
|
22588
22590
|
}
|
|
22589
22591
|
/**
|
|
22590
22592
|
* Resumes sending media.
|
|
@@ -22594,7 +22596,7 @@ class bD extends Fl {
|
|
|
22594
22596
|
this.logger.error("Producer::resume() | Producer closed", n(this, Lt, ds));
|
|
22595
22597
|
return;
|
|
22596
22598
|
}
|
|
22597
|
-
f(this,
|
|
22599
|
+
f(this, Fr, !1), n(this, Qe) && n(this, ua) && (n(this, Qe).enabled = !0), n(this, Mi) && n(this, ms).replaceTrack(this.localId, n(this, Qe)), this.emit("resume");
|
|
22598
22600
|
}
|
|
22599
22601
|
/**
|
|
22600
22602
|
* Replaces the current track with a new one or null.
|
|
@@ -22619,7 +22621,7 @@ class bD extends Fl {
|
|
|
22619
22621
|
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Lt, ds));
|
|
22620
22622
|
return;
|
|
22621
22623
|
}
|
|
22622
|
-
(!n(this,
|
|
22624
|
+
(!n(this, Mi) || !n(this, Fr)) && (yield n(this, ms).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Qe, e), this._handleTrack();
|
|
22623
22625
|
});
|
|
22624
22626
|
}
|
|
22625
22627
|
/**
|
|
@@ -22666,7 +22668,7 @@ class bD extends Fl {
|
|
|
22666
22668
|
}
|
|
22667
22669
|
}
|
|
22668
22670
|
}
|
|
22669
|
-
ms = new WeakMap(), la = new WeakMap(), ua = new WeakMap(),
|
|
22671
|
+
ms = new WeakMap(), la = new WeakMap(), ua = new WeakMap(), Mi = new WeakMap(), Zt = new WeakMap(), Qe = new WeakMap(), Fr = new WeakMap(), ha = new WeakMap(), Gd = new WeakMap(), Lt = new WeakSet(), ds = function() {
|
|
22670
22672
|
return {
|
|
22671
22673
|
producer: {
|
|
22672
22674
|
id: this.id,
|
|
@@ -22693,16 +22695,16 @@ function AD(s) {
|
|
|
22693
22695
|
var t, e;
|
|
22694
22696
|
return kD(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
|
|
22695
22697
|
}
|
|
22696
|
-
var
|
|
22698
|
+
var Br, Wd, Di;
|
|
22697
22699
|
const En = class extends ct.EventEmitter {
|
|
22698
22700
|
constructor(e, r, i, a) {
|
|
22699
22701
|
super();
|
|
22700
22702
|
h(this, "channel");
|
|
22701
22703
|
h(this, "queue");
|
|
22702
22704
|
h(this, "serverProtocolVersion");
|
|
22703
|
-
m(this,
|
|
22705
|
+
m(this, Br, /* @__PURE__ */ new Map());
|
|
22704
22706
|
m(this, Wd, void 0);
|
|
22705
|
-
m(this,
|
|
22707
|
+
m(this, Di, void 0);
|
|
22706
22708
|
h(this, "respond", (e, r, i = !1) => {
|
|
22707
22709
|
let a;
|
|
22708
22710
|
i ? a = En.createErrorResponse(e, r) : a = En.createResponse(e, r), this.channel.send(JSON.stringify(a));
|
|
@@ -22738,7 +22740,7 @@ const En = class extends ct.EventEmitter {
|
|
|
22738
22740
|
const p = l * a, g = (l + 1) * a;
|
|
22739
22741
|
c.push(r.slice(p, g));
|
|
22740
22742
|
}
|
|
22741
|
-
const d =
|
|
22743
|
+
const d = tn();
|
|
22742
22744
|
for (let l = 0; l < o; l += 1) {
|
|
22743
22745
|
const p = c[l], v = JSON.stringify({
|
|
22744
22746
|
id: d,
|
|
@@ -22746,18 +22748,18 @@ const En = class extends ct.EventEmitter {
|
|
|
22746
22748
|
chunkIndex: l,
|
|
22747
22749
|
chunk: p
|
|
22748
22750
|
});
|
|
22749
|
-
n(this,
|
|
22751
|
+
n(this, Di).debug(`Sending message chunk over dc: ${v}`), this.channel.send(v);
|
|
22750
22752
|
}
|
|
22751
22753
|
} else
|
|
22752
|
-
n(this,
|
|
22754
|
+
n(this, Di).debug(`Sending message over dc: ${r}`), this.channel.send(r);
|
|
22753
22755
|
});
|
|
22754
22756
|
h(this, "processMessage", (e) => {
|
|
22755
22757
|
var i;
|
|
22756
|
-
n(this,
|
|
22757
|
-
const r = n(this,
|
|
22758
|
+
n(this, Br).has(e.id) || n(this, Br).set(e.id, []);
|
|
22759
|
+
const r = n(this, Br).get(e.id);
|
|
22758
22760
|
if (r[e.chunkIndex] = e, (r == null ? void 0 : r.length) === e.count && !r.some((a) => a === void 0)) {
|
|
22759
|
-
const a = n(this,
|
|
22760
|
-
n(this,
|
|
22761
|
+
const a = n(this, Br).get(e.id), o = a == null ? void 0 : a.reduce((d, l) => d + l.chunk, "");
|
|
22762
|
+
n(this, Br).delete(e.id);
|
|
22761
22763
|
const c = JSON.parse(o);
|
|
22762
22764
|
if (!c.payload || !Yf(c.payload))
|
|
22763
22765
|
throw new Error("corrupted incoming message over dc", {
|
|
@@ -22771,17 +22773,17 @@ const En = class extends ct.EventEmitter {
|
|
|
22771
22773
|
});
|
|
22772
22774
|
h(this, "processResponseMsg", (e) => {
|
|
22773
22775
|
const { id: r } = e.payload._bolt, i = this.queue.get(r);
|
|
22774
|
-
return i ? (n(this,
|
|
22776
|
+
return i ? (n(this, Di).debug(`resolving pending request with id: ${r}, complete response: ${JSON.stringify(e)}`), e.type === "error" ? i.cancel(ug(e)) : i.resolve(ug(e)), !0) : !1;
|
|
22775
22777
|
});
|
|
22776
22778
|
h(this, "processBoltHandshake", (e) => {
|
|
22777
22779
|
var r, i;
|
|
22778
22780
|
return e.type === "_bolt" || e.type === "handshake" ? (this.respond((i = (r = e.payload._bolt) == null ? void 0 : r.id) != null ? i : du(8), { type: "_bolt", payload: { message: "pong" } }), !0) : !1;
|
|
22779
22781
|
});
|
|
22780
|
-
this.label = i, this.transportId = a, f(this, Wd, e), f(this,
|
|
22782
|
+
this.label = i, this.transportId = a, f(this, Wd, e), f(this, Di, e.getValue("logger")), this.channel = r, this.queue = /* @__PURE__ */ new Map();
|
|
22781
22783
|
}
|
|
22782
22784
|
};
|
|
22783
|
-
let
|
|
22784
|
-
|
|
22785
|
+
let ni = En;
|
|
22786
|
+
Br = new WeakMap(), Wd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest", (e) => {
|
|
22785
22787
|
var r;
|
|
22786
22788
|
if ((r = e.payload) != null && r._bolt)
|
|
22787
22789
|
throw new Error("rpc fields are internal values");
|
|
@@ -22795,7 +22797,7 @@ Fr = new WeakMap(), Wd = new WeakMap(), Mi = new WeakMap(), h(ii, "createRequest
|
|
|
22795
22797
|
}
|
|
22796
22798
|
})
|
|
22797
22799
|
};
|
|
22798
|
-
}), h(
|
|
22800
|
+
}), h(ni, "createResponse", (e, r) => {
|
|
22799
22801
|
var i;
|
|
22800
22802
|
if ((i = r.payload) != null && i._bolt)
|
|
22801
22803
|
throw new Error("rpc fields are internal values");
|
|
@@ -22809,7 +22811,7 @@ Fr = new WeakMap(), Wd = new WeakMap(), Mi = new WeakMap(), h(ii, "createRequest
|
|
|
22809
22811
|
}
|
|
22810
22812
|
})
|
|
22811
22813
|
};
|
|
22812
|
-
}), h(
|
|
22814
|
+
}), h(ni, "createNotification", (e) => {
|
|
22813
22815
|
var r;
|
|
22814
22816
|
if ((r = e.payload) != null && r._bolt)
|
|
22815
22817
|
throw new Error("rpc fields are internal values");
|
|
@@ -22823,7 +22825,7 @@ Fr = new WeakMap(), Wd = new WeakMap(), Mi = new WeakMap(), h(ii, "createRequest
|
|
|
22823
22825
|
}
|
|
22824
22826
|
})
|
|
22825
22827
|
};
|
|
22826
|
-
}), h(
|
|
22828
|
+
}), h(ni, "createErrorResponse", (e, r) => ({
|
|
22827
22829
|
type: "error",
|
|
22828
22830
|
payload: {
|
|
22829
22831
|
error: r.message,
|
|
@@ -22835,7 +22837,7 @@ Fr = new WeakMap(), Wd = new WeakMap(), Mi = new WeakMap(), h(ii, "createRequest
|
|
|
22835
22837
|
}
|
|
22836
22838
|
}));
|
|
22837
22839
|
const wd = "transport closed";
|
|
22838
|
-
var
|
|
22840
|
+
var Oi;
|
|
22839
22841
|
const Pn = class extends Fl {
|
|
22840
22842
|
constructor(e, {
|
|
22841
22843
|
id: r,
|
|
@@ -22878,8 +22880,8 @@ const Pn = class extends Fl {
|
|
|
22878
22880
|
h(this, "unknownTracksMap");
|
|
22879
22881
|
// App custom data.
|
|
22880
22882
|
h(this, "appData");
|
|
22881
|
-
m(this,
|
|
22882
|
-
f(this,
|
|
22883
|
+
m(this, Oi, void 0);
|
|
22884
|
+
f(this, Oi, e);
|
|
22883
22885
|
const v = e.getValue("logger");
|
|
22884
22886
|
v.debug(`constructor() [id: ${r}, direction: ${i}]`), this.id = r, this.direction = i;
|
|
22885
22887
|
const S = wD(l, {});
|
|
@@ -22912,7 +22914,7 @@ const Pn = class extends Fl {
|
|
|
22912
22914
|
}
|
|
22913
22915
|
), this.handler.on("dc_open", (R) => {
|
|
22914
22916
|
let L = this.datachannels.get(R.label);
|
|
22915
|
-
L || (L || (L = new
|
|
22917
|
+
L || (L || (L = new ni(n(this, Oi), R, R.label, this.serverId), this.datachannels.set(R.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
|
|
22916
22918
|
R.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", R.label));
|
|
22917
22919
|
}, 5e3));
|
|
22918
22920
|
}), this.handler.on("datachannel", (R, L) => {
|
|
@@ -23027,7 +23029,7 @@ const Pn = class extends Fl {
|
|
|
23027
23029
|
} else
|
|
23028
23030
|
throw new TypeError("missing track");
|
|
23029
23031
|
if (!(yield this.transportConnectionPromise))
|
|
23030
|
-
throw new
|
|
23032
|
+
throw new di("transport not connected");
|
|
23031
23033
|
return !0;
|
|
23032
23034
|
});
|
|
23033
23035
|
}
|
|
@@ -23083,7 +23085,7 @@ const Pn = class extends Fl {
|
|
|
23083
23085
|
}
|
|
23084
23086
|
createProducerObject(e) {
|
|
23085
23087
|
return u(this, null, function* () {
|
|
23086
|
-
const r = new bD(n(this,
|
|
23088
|
+
const r = new bD(n(this, Oi), e);
|
|
23087
23089
|
return this.producers.set(r.id, r), r.once("close", () => {
|
|
23088
23090
|
this.producers.delete(r.id);
|
|
23089
23091
|
}), this.emit("newproducer", r), r;
|
|
@@ -23101,7 +23103,7 @@ const Pn = class extends Fl {
|
|
|
23101
23103
|
if (this.direction !== "recv")
|
|
23102
23104
|
throw new Co("not a receiving transport");
|
|
23103
23105
|
if (!(yield this.transportConnectionPromise))
|
|
23104
|
-
throw new
|
|
23106
|
+
throw new di("transport not connected");
|
|
23105
23107
|
return !0;
|
|
23106
23108
|
});
|
|
23107
23109
|
}
|
|
@@ -23273,7 +23275,7 @@ const Pn = class extends Fl {
|
|
|
23273
23275
|
else {
|
|
23274
23276
|
const j = N;
|
|
23275
23277
|
j.enabled = !0, this.handler.midTransceiverMap.set(B.mid, B);
|
|
23276
|
-
const re = new RD(n(this,
|
|
23278
|
+
const re = new RD(n(this, Oi), {
|
|
23277
23279
|
id: r,
|
|
23278
23280
|
localId: B.mid,
|
|
23279
23281
|
transceiver: B,
|
|
@@ -23330,7 +23332,7 @@ const Pn = class extends Fl {
|
|
|
23330
23332
|
}
|
|
23331
23333
|
};
|
|
23332
23334
|
let qu = Pn;
|
|
23333
|
-
|
|
23335
|
+
Oi = new WeakMap();
|
|
23334
23336
|
function ID(s) {
|
|
23335
23337
|
if (typeof navigator == "object" && navigator.product === "ReactNative") {
|
|
23336
23338
|
if (typeof RTCPeerConnection == "undefined") {
|
|
@@ -23370,15 +23372,15 @@ function ID(s) {
|
|
|
23370
23372
|
}
|
|
23371
23373
|
s.warn("Device::this._detectDevice() | unknown device");
|
|
23372
23374
|
}
|
|
23373
|
-
var Zs,
|
|
23375
|
+
var Zs, Ni;
|
|
23374
23376
|
class MD {
|
|
23375
23377
|
constructor(t, { handlerName: e, handlerFactory: r } = {}) {
|
|
23376
23378
|
// RTC handler factory.
|
|
23377
23379
|
h(this, "handlerFactory");
|
|
23378
23380
|
m(this, Zs, void 0);
|
|
23379
|
-
m(this,
|
|
23381
|
+
m(this, Ni, void 0);
|
|
23380
23382
|
const i = t.getValue("logger");
|
|
23381
|
-
if (i.debug("constructor()"), f(this, Zs, t), f(this,
|
|
23383
|
+
if (i.debug("constructor()"), f(this, Zs, t), f(this, Ni, i), e && r)
|
|
23382
23384
|
throw new TypeError(
|
|
23383
23385
|
"just one of handlerName or handlerInterface can be given"
|
|
23384
23386
|
);
|
|
@@ -23386,9 +23388,9 @@ class MD {
|
|
|
23386
23388
|
this.handlerFactory = r;
|
|
23387
23389
|
else {
|
|
23388
23390
|
if (e)
|
|
23389
|
-
n(this,
|
|
23390
|
-
else if (e = ID(n(this,
|
|
23391
|
-
n(this,
|
|
23391
|
+
n(this, Ni).debug(`Device::constructor() | handler given: ${e}`);
|
|
23392
|
+
else if (e = ID(n(this, Ni)), e)
|
|
23393
|
+
n(this, Ni).debug(`Device::constructor() | detected handler: ${e}`);
|
|
23392
23394
|
else
|
|
23393
23395
|
throw new Error("device not supported");
|
|
23394
23396
|
switch (e) {
|
|
@@ -23422,7 +23424,7 @@ class MD {
|
|
|
23422
23424
|
* @throws {TypeError} if wrong arguments.
|
|
23423
23425
|
*/
|
|
23424
23426
|
createTransport(t) {
|
|
23425
|
-
const e =
|
|
23427
|
+
const e = tn();
|
|
23426
23428
|
return new qu(n(this, Zs), G(D({
|
|
23427
23429
|
id: e
|
|
23428
23430
|
}, t), {
|
|
@@ -23430,9 +23432,9 @@ class MD {
|
|
|
23430
23432
|
}));
|
|
23431
23433
|
}
|
|
23432
23434
|
}
|
|
23433
|
-
Zs = new WeakMap(),
|
|
23435
|
+
Zs = new WeakMap(), Ni = new WeakMap();
|
|
23434
23436
|
const DD = 2e3;
|
|
23435
|
-
var pa, it, nt, Qo, Xo,
|
|
23437
|
+
var pa, it, nt, Qo, Xo, Vi, ga, Zo, ma, Li, Ns, fa, ld, ec, ju, Jd, Qf, tc, Gu, Kd, Xf, zd, Zf, Yd, ev, Qd, tv, Xd, sv, sc, Wu, rc, Ju;
|
|
23436
23438
|
class OD extends ct.EventEmitter {
|
|
23437
23439
|
constructor(e, r) {
|
|
23438
23440
|
super();
|
|
@@ -23453,7 +23455,7 @@ class OD extends ct.EventEmitter {
|
|
|
23453
23455
|
m(this, nt, void 0);
|
|
23454
23456
|
m(this, Qo, void 0);
|
|
23455
23457
|
m(this, Xo, void 0);
|
|
23456
|
-
m(this,
|
|
23458
|
+
m(this, Vi, void 0);
|
|
23457
23459
|
m(this, ga, void 0);
|
|
23458
23460
|
m(this, Zo, void 0);
|
|
23459
23461
|
m(this, ma, {
|
|
@@ -23463,9 +23465,9 @@ class OD extends ct.EventEmitter {
|
|
|
23463
23465
|
},
|
|
23464
23466
|
lastConnectionTime: 0
|
|
23465
23467
|
});
|
|
23466
|
-
m(this,
|
|
23468
|
+
m(this, Li, void 0);
|
|
23467
23469
|
m(this, Ns, "all");
|
|
23468
|
-
this.context = e, f(this,
|
|
23470
|
+
this.context = e, f(this, Vi, r), f(this, pa, new MD(e)), f(this, ga, new CD(r)), f(this, Zo, Ps), n(this, fa, ld).mediaState = {
|
|
23469
23471
|
send: { state: wn.NEW },
|
|
23470
23472
|
recv: { state: wn.NEW }
|
|
23471
23473
|
}, (Ia(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && f(this, Ns, "relay"), this.logger.info(`ICE Transport Policy initially set to ${n(this, Ns)}`), x(this, ec, ju).call(this);
|
|
@@ -23485,7 +23487,7 @@ class OD extends ct.EventEmitter {
|
|
|
23485
23487
|
return this.context.getValue("logger");
|
|
23486
23488
|
}
|
|
23487
23489
|
get socket() {
|
|
23488
|
-
return n(this,
|
|
23490
|
+
return n(this, Vi);
|
|
23489
23491
|
}
|
|
23490
23492
|
get socketHandler() {
|
|
23491
23493
|
return n(this, ga);
|
|
@@ -23544,10 +23546,10 @@ class OD extends ct.EventEmitter {
|
|
|
23544
23546
|
throw new Error("Method not implemented.");
|
|
23545
23547
|
}
|
|
23546
23548
|
}
|
|
23547
|
-
pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(), Xo = new WeakMap(),
|
|
23549
|
+
pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(), Xo = new WeakMap(), Vi = new WeakMap(), ga = new WeakMap(), Zo = new WeakMap(), ma = new WeakMap(), Li = new WeakMap(), Ns = new WeakMap(), fa = new WeakSet(), ld = function() {
|
|
23548
23550
|
return this.context.getValue("connectionHandler");
|
|
23549
23551
|
}, ec = new WeakSet(), ju = function() {
|
|
23550
|
-
f(this,
|
|
23552
|
+
f(this, Li, {
|
|
23551
23553
|
send: void 0,
|
|
23552
23554
|
recv: void 0
|
|
23553
23555
|
});
|
|
@@ -23592,10 +23594,10 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(),
|
|
|
23592
23594
|
});
|
|
23593
23595
|
try {
|
|
23594
23596
|
if (e.closed)
|
|
23595
|
-
throw new
|
|
23597
|
+
throw new di("Cannot reconnect closed transport");
|
|
23596
23598
|
yield x(this, Kd, Xf).call(this, e);
|
|
23597
23599
|
} catch (l) {
|
|
23598
|
-
if (l instanceof
|
|
23600
|
+
if (l instanceof di) {
|
|
23599
23601
|
d(l);
|
|
23600
23602
|
return;
|
|
23601
23603
|
}
|
|
@@ -23621,10 +23623,10 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(),
|
|
|
23621
23623
|
const { id: r, direction: i } = e;
|
|
23622
23624
|
if (this.logger.info(`Connecting ${i} transport`, {
|
|
23623
23625
|
transport: { id: r, type: i }
|
|
23624
|
-
}), !n(this,
|
|
23625
|
-
throw new
|
|
23626
|
+
}), !n(this, Vi).isConnected)
|
|
23627
|
+
throw new di("Socket is not connected");
|
|
23626
23628
|
if (e.connectionState === "closed")
|
|
23627
|
-
throw new
|
|
23629
|
+
throw new di("Transport is closed");
|
|
23628
23630
|
try {
|
|
23629
23631
|
yield e.connect(
|
|
23630
23632
|
(a) => x(this, Xd, sv).call(this, i, a)
|
|
@@ -23632,7 +23634,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(),
|
|
|
23632
23634
|
transport: { id: r, serverId: e.serverId, type: i }
|
|
23633
23635
|
});
|
|
23634
23636
|
} catch (a) {
|
|
23635
|
-
throw n(this, ma).transportFailureCount[i] += 1, a.message === "ice connection failed" ? new
|
|
23637
|
+
throw n(this, ma).transportFailureCount[i] += 1, a.message === "ice connection failed" ? new di(a.message) : a;
|
|
23636
23638
|
}
|
|
23637
23639
|
});
|
|
23638
23640
|
}, zd = new WeakSet(), Zf = function(e) {
|
|
@@ -23680,15 +23682,15 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(),
|
|
|
23680
23682
|
}
|
|
23681
23683
|
);
|
|
23682
23684
|
const o = () => {
|
|
23683
|
-
const c = n(this,
|
|
23684
|
-
c !== void 0 && (clearTimeout(c), n(this,
|
|
23685
|
+
const c = n(this, Li)[r];
|
|
23686
|
+
c !== void 0 && (clearTimeout(c), n(this, Li)[r] = void 0);
|
|
23685
23687
|
};
|
|
23686
23688
|
switch (a) {
|
|
23687
23689
|
case "connected":
|
|
23688
23690
|
o(), n(this, ma).lastConnectionTime = performance.now();
|
|
23689
23691
|
break;
|
|
23690
23692
|
case "disconnected":
|
|
23691
|
-
n(this,
|
|
23693
|
+
n(this, Li)[r] = setTimeout(() => u(this, null, function* () {
|
|
23692
23694
|
this.logger.warn(`${r} transport is in disconnected state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield x(this, sc, Wu).call(this, e.direction);
|
|
23693
23695
|
}), DD);
|
|
23694
23696
|
break;
|
|
@@ -23759,7 +23761,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Qo = new WeakMap(),
|
|
|
23759
23761
|
return u(this, null, function* () {
|
|
23760
23762
|
switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: !0 }), this.context.getValue("flagsmith").hasFeature(
|
|
23761
23763
|
Z.CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
23762
|
-
) && n(this,
|
|
23764
|
+
) && n(this, Vi).isConnected && n(this, ma).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, Ns, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
|
|
23763
23765
|
case "send": {
|
|
23764
23766
|
this.logger.info("Transport reconnected", { transport: n(this, it) }), this.context.getValue("peerSessionStore").emit(b.RESET_PRODUCER_STATE);
|
|
23765
23767
|
break;
|
|
@@ -23960,7 +23962,7 @@ class xh {
|
|
|
23960
23962
|
});
|
|
23961
23963
|
}
|
|
23962
23964
|
}
|
|
23963
|
-
var
|
|
23965
|
+
var xi, Hr, va, nc, Vs, Zd, er, Sa, ac, Ku, el, rv, tl, iv, sl, nv, rl, av;
|
|
23964
23966
|
class VD extends OD {
|
|
23965
23967
|
constructor(e, r) {
|
|
23966
23968
|
super(e, r);
|
|
@@ -23969,8 +23971,8 @@ class VD extends OD {
|
|
|
23969
23971
|
m(this, tl);
|
|
23970
23972
|
m(this, sl);
|
|
23971
23973
|
m(this, rl);
|
|
23972
|
-
m(this,
|
|
23973
|
-
m(this,
|
|
23974
|
+
m(this, xi, void 0);
|
|
23975
|
+
m(this, Hr, void 0);
|
|
23974
23976
|
m(this, va, void 0);
|
|
23975
23977
|
m(this, nc, void 0);
|
|
23976
23978
|
m(this, Vs, void 0);
|
|
@@ -23997,10 +23999,10 @@ class VD extends OD {
|
|
|
23997
23999
|
return super.socketHandler;
|
|
23998
24000
|
}
|
|
23999
24001
|
get producers() {
|
|
24000
|
-
return n(this,
|
|
24002
|
+
return n(this, xi);
|
|
24001
24003
|
}
|
|
24002
24004
|
get consumers() {
|
|
24003
|
-
return n(this,
|
|
24005
|
+
return n(this, Hr);
|
|
24004
24006
|
}
|
|
24005
24007
|
get producerIdToConsumerIdMap() {
|
|
24006
24008
|
return n(this, va);
|
|
@@ -24013,7 +24015,7 @@ class VD extends OD {
|
|
|
24013
24015
|
return this.context.getValue("logger");
|
|
24014
24016
|
}
|
|
24015
24017
|
reset() {
|
|
24016
|
-
f(this,
|
|
24018
|
+
f(this, xi, /* @__PURE__ */ new Map()), f(this, Hr, /* @__PURE__ */ new Map()), f(this, va, /* @__PURE__ */ new Map());
|
|
24017
24019
|
}
|
|
24018
24020
|
createProducer(e, r) {
|
|
24019
24021
|
return u(this, null, function* () {
|
|
@@ -24048,7 +24050,7 @@ class VD extends OD {
|
|
|
24048
24050
|
});
|
|
24049
24051
|
}
|
|
24050
24052
|
closeAllProducers() {
|
|
24051
|
-
return Promise.all(Array.from(n(this,
|
|
24053
|
+
return Promise.all(Array.from(n(this, xi).entries()).map(([, e]) => e.close()));
|
|
24052
24054
|
}
|
|
24053
24055
|
createConsumer(e) {
|
|
24054
24056
|
return this.createConsumers([e]);
|
|
@@ -24073,7 +24075,7 @@ class VD extends OD {
|
|
|
24073
24075
|
});
|
|
24074
24076
|
}
|
|
24075
24077
|
closeAllConsumers() {
|
|
24076
|
-
return this.closeConsumers(Array.from(n(this,
|
|
24078
|
+
return this.closeConsumers(Array.from(n(this, Hr).keys()));
|
|
24077
24079
|
}
|
|
24078
24080
|
switchConsumersToLayer(e, r) {
|
|
24079
24081
|
return u(this, null, function* () {
|
|
@@ -24081,7 +24083,7 @@ class VD extends OD {
|
|
|
24081
24083
|
});
|
|
24082
24084
|
}
|
|
24083
24085
|
}
|
|
24084
|
-
|
|
24086
|
+
xi = new WeakMap(), Hr = new WeakMap(), va = new WeakMap(), nc = new WeakMap(), Vs = new WeakMap(), Zd = new WeakMap(), er = new WeakMap(), Sa = new WeakMap(), ac = new WeakSet(), Ku = function() {
|
|
24085
24087
|
return u(this, null, function* () {
|
|
24086
24088
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
24087
24089
|
throw new Error("Recv transport is closed");
|
|
@@ -24150,7 +24152,7 @@ Li = new WeakMap(), Br = new WeakMap(), va = new WeakMap(), nc = new WeakMap(),
|
|
|
24150
24152
|
this.producers.delete(e.id), r();
|
|
24151
24153
|
})), e.on("trackended", () => {
|
|
24152
24154
|
this.logger.info("producer::trackended", { producer: G(D({}, e), { status: "UNKNOWN" }) });
|
|
24153
|
-
}), n(this,
|
|
24155
|
+
}), n(this, xi).set(e.id, e);
|
|
24154
24156
|
}, sl = new WeakSet(), nv = function(e) {
|
|
24155
24157
|
return u(this, null, function* () {
|
|
24156
24158
|
try {
|
|
@@ -24168,14 +24170,14 @@ Li = new WeakMap(), Br = new WeakMap(), va = new WeakMap(), nc = new WeakMap(),
|
|
|
24168
24170
|
kind: e.kind,
|
|
24169
24171
|
appData: e.appData
|
|
24170
24172
|
}
|
|
24171
|
-
}), n(this,
|
|
24172
|
-
})), n(this,
|
|
24173
|
+
}), n(this, Hr).delete(e.id), this.context.getValue("peerSessionStore").emit(b.CONSUMER_CLOSED, { id: e.id });
|
|
24174
|
+
})), n(this, Hr).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(b.NEW_CONSUMER, {
|
|
24173
24175
|
id: e.id,
|
|
24174
24176
|
appData: e.appData,
|
|
24175
24177
|
peerId: e.peerId
|
|
24176
24178
|
});
|
|
24177
24179
|
};
|
|
24178
|
-
var oc, cc, dc, Ta, ya, Ea, lc, uc, Pa, Pt, fs, vs,
|
|
24180
|
+
var oc, cc, dc, Ta, ya, Ea, lc, uc, Pa, Pt, fs, vs, Ui, $i, tr, hc, il, ov, nl, cv, al, dv, ol, lv;
|
|
24179
24181
|
const cl = class {
|
|
24180
24182
|
constructor({
|
|
24181
24183
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -24213,8 +24215,8 @@ const cl = class {
|
|
|
24213
24215
|
m(this, Pt, void 0);
|
|
24214
24216
|
m(this, fs, void 0);
|
|
24215
24217
|
m(this, vs, !1);
|
|
24216
|
-
m(this, xi, 0);
|
|
24217
24218
|
m(this, Ui, 0);
|
|
24219
|
+
m(this, $i, 0);
|
|
24218
24220
|
m(this, tr, []);
|
|
24219
24221
|
m(this, hc, void 0);
|
|
24220
24222
|
f(this, Ta, t), f(this, Pt, t), f(this, oc, e), f(this, cc, r), f(this, dc, i), f(this, ya, a), f(this, Ea, o), f(this, lc, c), f(this, uc, d), f(this, Pa, l), f(this, hc, p), f(this, fs, t / 2);
|
|
@@ -24230,13 +24232,13 @@ const cl = class {
|
|
|
24230
24232
|
processAudioChunk(t) {
|
|
24231
24233
|
var o, c;
|
|
24232
24234
|
const e = x(o = cl, al, dv).call(o, t), r = x(c = cl, ol, lv).call(c, t);
|
|
24233
|
-
return x(this, il, ov).call(this, e), e / n(this, fs) > n(this, Pa) && e > n(this, Pt) && r > n(this, oc) ? (f(this,
|
|
24235
|
+
return x(this, il, ov).call(this, e), e / n(this, fs) > n(this, Pa) && e > n(this, Pt) && r > n(this, oc) ? (f(this, Ui, n(this, Ui) + 1), f(this, $i, n(this, dc)), n(this, Ui) >= n(this, cc) && f(this, vs, !0)) : (f(this, Ui, 0), n(this, $i) > 0 ? f(this, $i, n(this, $i) - 1) : n(this, vs) && f(this, vs, !1), n(this, vs) || x(this, nl, cv).call(this, e)), { energy: e, isVoice: n(this, vs) };
|
|
24234
24236
|
}
|
|
24235
24237
|
/**
|
|
24236
24238
|
* Reset the detector state
|
|
24237
24239
|
*/
|
|
24238
24240
|
reset() {
|
|
24239
|
-
f(this, vs, !1), f(this,
|
|
24241
|
+
f(this, vs, !1), f(this, Ui, 0), f(this, $i, 0), f(this, Pt, n(this, Ta)), f(this, fs, n(this, Ta) / 2), f(this, tr, []);
|
|
24240
24242
|
}
|
|
24241
24243
|
/**
|
|
24242
24244
|
* Get current adaptive threshold values for debugging/visualization
|
|
@@ -24250,7 +24252,7 @@ const cl = class {
|
|
|
24250
24252
|
}
|
|
24251
24253
|
};
|
|
24252
24254
|
let oo = cl;
|
|
24253
|
-
oc = new WeakMap(), cc = new WeakMap(), dc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), lc = new WeakMap(), uc = new WeakMap(), Pa = new WeakMap(), Pt = new WeakMap(), fs = new WeakMap(), vs = new WeakMap(),
|
|
24255
|
+
oc = new WeakMap(), cc = new WeakMap(), dc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), lc = new WeakMap(), uc = new WeakMap(), Pa = new WeakMap(), Pt = new WeakMap(), fs = new WeakMap(), vs = new WeakMap(), Ui = new WeakMap(), $i = new WeakMap(), tr = new WeakMap(), hc = new WeakMap(), il = new WeakSet(), ov = function(t) {
|
|
24254
24256
|
n(this, vs) ? f(this, Pt, n(this, Ea) * n(this, Pt) + (1 - n(this, Ea)) * t) : f(this, Pt, n(this, ya) * n(this, Pt) + (1 - n(this, ya)) * n(this, fs)), f(this, Pt, Math.max(
|
|
24255
24257
|
n(this, lc),
|
|
24256
24258
|
Math.min(n(this, uc), n(this, Pt))
|
|
@@ -24349,7 +24351,7 @@ class LD {
|
|
|
24349
24351
|
}
|
|
24350
24352
|
}
|
|
24351
24353
|
const xD = 60, UD = 400;
|
|
24352
|
-
var sr, rr, Ss, mc,
|
|
24354
|
+
var sr, rr, Ss, mc, Fi, _a, ir, qr, Ca, nr, ar, Ls, dl, uv, fc, zu, ll, hv, ul, pv;
|
|
24353
24355
|
const So = class {
|
|
24354
24356
|
constructor(t, e) {
|
|
24355
24357
|
m(this, dl);
|
|
@@ -24358,10 +24360,10 @@ const So = class {
|
|
|
24358
24360
|
m(this, rr, void 0);
|
|
24359
24361
|
m(this, Ss, void 0);
|
|
24360
24362
|
m(this, mc, void 0);
|
|
24361
|
-
m(this,
|
|
24363
|
+
m(this, Fi, void 0);
|
|
24362
24364
|
m(this, _a, void 0);
|
|
24363
24365
|
m(this, ir, void 0);
|
|
24364
|
-
m(this,
|
|
24366
|
+
m(this, qr, void 0);
|
|
24365
24367
|
m(this, Ca, void 0);
|
|
24366
24368
|
m(this, nr, void 0);
|
|
24367
24369
|
m(this, ar, void 0);
|
|
@@ -24390,7 +24392,7 @@ const So = class {
|
|
|
24390
24392
|
return;
|
|
24391
24393
|
const { energy: t } = x(this, dl, uv).call(this), e = x(i = So, fc, zu).call(i, t);
|
|
24392
24394
|
let r = 0.9;
|
|
24393
|
-
n(this, Ca) !== e && n(this, Ca) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this,
|
|
24395
|
+
n(this, Ca) !== e && n(this, Ca) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this, Fi, (n(this, Fi) || 0) * (1 - r) + t * r);
|
|
24394
24396
|
}), xD)), n(this, rr) && n(this, Ls).clearInterval(n(this, rr)), f(this, rr, n(this, Ls).setInterval(
|
|
24395
24397
|
x(this, ll, hv).bind(this),
|
|
24396
24398
|
UD
|
|
@@ -24405,17 +24407,17 @@ const So = class {
|
|
|
24405
24407
|
}
|
|
24406
24408
|
};
|
|
24407
24409
|
let co = So;
|
|
24408
|
-
sr = new WeakMap(), rr = new WeakMap(), Ss = new WeakMap(), mc = new WeakMap(),
|
|
24410
|
+
sr = new WeakMap(), rr = new WeakMap(), Ss = new WeakMap(), mc = new WeakMap(), Fi = new WeakMap(), _a = new WeakMap(), ir = new WeakMap(), qr = new WeakMap(), Ca = new WeakMap(), nr = new WeakMap(), ar = new WeakMap(), Ls = new WeakMap(), dl = new WeakSet(), uv = function() {
|
|
24409
24411
|
var o;
|
|
24410
24412
|
const { samples: t } = n(this, ar), { energy: e, isVoice: r } = n(this, _a).processAudioChunk(t), i = x(o = So, ul, pv).call(o, e);
|
|
24411
24413
|
return n(this, nr).getValue("flagsmith").hasFeature(Z.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
|
|
24412
|
-
`AudioActivityReporter: producer: ${n(this, Ss)}, energy: ${n(this,
|
|
24414
|
+
`AudioActivityReporter: producer: ${n(this, Ss)}, energy: ${n(this, Fi)},
|
|
24413
24415
|
slogScale: ${i}, isVoice: ${r}, minEnergy: ${n(this, ir)},
|
|
24414
|
-
maxEnergy: ${n(this,
|
|
24415
|
-
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, ir) || i < n(this, ir)) && f(this, ir, i), (!n(this,
|
|
24416
|
+
maxEnergy: ${n(this, qr)}`
|
|
24417
|
+
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, ir) || i < n(this, ir)) && f(this, ir, i), (!n(this, qr) || i > n(this, qr)) && f(this, qr, i), { energy: (i - n(this, ir)) / (n(this, qr) - n(this, ir)) * 10 || 0, isVoice: r });
|
|
24416
24418
|
}, fc = new WeakSet(), zu = function(t) {
|
|
24417
24419
|
return t < 5;
|
|
24418
|
-
}, ll = new WeakSet(), hv = function(t = n(this,
|
|
24420
|
+
}, ll = new WeakSet(), hv = function(t = n(this, Fi)) {
|
|
24419
24421
|
var r;
|
|
24420
24422
|
if (!n(this, Ss) || !t) {
|
|
24421
24423
|
n(this, nr).getValue("flagsmith").hasFeature(Z.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(`AudioActivityReporter: No producerId or energy to report: ${n(this, Ss)}`);
|
|
@@ -24492,10 +24494,10 @@ var BD = Object.defineProperty, HD = Object.getOwnPropertyDescriptor, de = (s, t
|
|
|
24492
24494
|
return r && i && BD(t, e, i), i;
|
|
24493
24495
|
};
|
|
24494
24496
|
const kt = ["video/VP9", "video/VP8"];
|
|
24495
|
-
var vc, Sc, at, W, wa, mt,
|
|
24497
|
+
var vc, Sc, at, W, wa, mt, Bi, Hi, qi, Tc, ts, or, yc, ji, Gi, ft, _t, jr, mn, hl, mv, pl, fv, gl, vv, Ec, Yu, ml, lu, Sv, fl, Tv, vl, yv, Sl, Ev, Xe, lt, Wi, lo, Tl, Pv, yl, _v, El, Cv;
|
|
24496
24498
|
const gv = (lu = class {
|
|
24497
24499
|
constructor(s, t) {
|
|
24498
|
-
m(this,
|
|
24500
|
+
m(this, jr);
|
|
24499
24501
|
/**
|
|
24500
24502
|
* Wait for the transports to be established and notify join room completion
|
|
24501
24503
|
*/
|
|
@@ -24515,7 +24517,7 @@ const gv = (lu = class {
|
|
|
24515
24517
|
m(this, vl);
|
|
24516
24518
|
m(this, Sl);
|
|
24517
24519
|
m(this, Xe);
|
|
24518
|
-
m(this,
|
|
24520
|
+
m(this, Wi);
|
|
24519
24521
|
m(this, Tl);
|
|
24520
24522
|
m(this, yl);
|
|
24521
24523
|
m(this, El);
|
|
@@ -24528,9 +24530,9 @@ const gv = (lu = class {
|
|
|
24528
24530
|
m(this, W, void 0);
|
|
24529
24531
|
m(this, wa, void 0);
|
|
24530
24532
|
m(this, mt, void 0);
|
|
24531
|
-
m(this, Fi, void 0);
|
|
24532
24533
|
m(this, Bi, void 0);
|
|
24533
24534
|
m(this, Hi, void 0);
|
|
24535
|
+
m(this, qi, void 0);
|
|
24534
24536
|
m(this, Tc, void 0);
|
|
24535
24537
|
m(this, ts, null);
|
|
24536
24538
|
m(this, or, void 0);
|
|
@@ -24538,8 +24540,8 @@ const gv = (lu = class {
|
|
|
24538
24540
|
// NOTE(roerohan): If a peer ID is present in a set corresponding
|
|
24539
24541
|
// to a video codec, it implies that the video codec is the best
|
|
24540
24542
|
// codec that the peer can send
|
|
24541
|
-
m(this, qi, void 0);
|
|
24542
24543
|
m(this, ji, void 0);
|
|
24544
|
+
m(this, Gi, void 0);
|
|
24543
24545
|
m(this, ft, void 0);
|
|
24544
24546
|
m(this, _t, void 0);
|
|
24545
24547
|
var r, i;
|
|
@@ -24547,18 +24549,18 @@ const gv = (lu = class {
|
|
|
24547
24549
|
const {
|
|
24548
24550
|
socket: e
|
|
24549
24551
|
} = t;
|
|
24550
|
-
this.mediaJoined = !1, f(this,
|
|
24552
|
+
this.mediaJoined = !1, f(this, ji, /* @__PURE__ */ new Map([
|
|
24551
24553
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
24552
24554
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
24553
|
-
])), f(this,
|
|
24555
|
+
])), f(this, Gi, /* @__PURE__ */ new Map([
|
|
24554
24556
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
24555
24557
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
24556
|
-
])), f(this, at, e), f(this,
|
|
24558
|
+
])), f(this, at, e), f(this, Bi, !1), f(this, W, new VD(s, e)), f(this, mt, n(this, W).events), f(this, or, /* @__PURE__ */ new Set()), f(this, ft, /* @__PURE__ */ new Map()), f(this, Hi, !1), f(this, qi, new Bu(s.getValue("logger"))), f(this, _t, new co(
|
|
24557
24559
|
this.context,
|
|
24558
24560
|
n(this, W).socketHandler.audioActivity.bind(n(this, W).socketHandler)
|
|
24559
24561
|
)), this.e2ee = (i = (r = s.getValue("modules").e2ee) == null ? void 0 : r.enabled) != null ? i : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, Tc, Ph(
|
|
24560
24562
|
() => u(this, null, function* () {
|
|
24561
|
-
if (!n(this,
|
|
24563
|
+
if (!n(this, jr, mn).mediaJoinAttempted)
|
|
24562
24564
|
return;
|
|
24563
24565
|
const { roomJoined: a } = yield this.joinRoom(
|
|
24564
24566
|
n(this, Sc),
|
|
@@ -24590,19 +24592,19 @@ const gv = (lu = class {
|
|
|
24590
24592
|
return this.context.getValue("logger");
|
|
24591
24593
|
}
|
|
24592
24594
|
get mediaJoined() {
|
|
24593
|
-
return n(this,
|
|
24595
|
+
return n(this, jr, mn).mediaJoined;
|
|
24594
24596
|
}
|
|
24595
24597
|
set mediaJoined(s) {
|
|
24596
|
-
n(this,
|
|
24598
|
+
n(this, jr, mn).mediaJoined = s;
|
|
24597
24599
|
}
|
|
24598
24600
|
reset() {
|
|
24599
|
-
n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, ft).clear(), n(this, or).clear(), f(this, ts, null), n(this,
|
|
24601
|
+
n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, ft).clear(), n(this, or).clear(), f(this, ts, null), n(this, qi).stop(), n(this, W).stopAllTransports(), n(this, W).reset(), f(this, qi, new Bu());
|
|
24600
24602
|
}
|
|
24601
24603
|
joinRoom(a, o) {
|
|
24602
24604
|
return u(this, arguments, function* (s, t, e = !1, r = !1, i = {}) {
|
|
24603
|
-
n(this,
|
|
24605
|
+
n(this, jr, mn).mediaJoinAttempted = !0, f(this, Bi, !0), e && this.reset();
|
|
24604
24606
|
try {
|
|
24605
|
-
return yield n(this,
|
|
24607
|
+
return yield n(this, qi).push(
|
|
24606
24608
|
() => x(this, hl, mv).call(this, s, t, r, i),
|
|
24607
24609
|
"joinRoom"
|
|
24608
24610
|
);
|
|
@@ -24635,7 +24637,7 @@ const gv = (lu = class {
|
|
|
24635
24637
|
}
|
|
24636
24638
|
leaveRoom() {
|
|
24637
24639
|
return u(this, null, function* () {
|
|
24638
|
-
n(this, W).stopAllTransports(), f(this,
|
|
24640
|
+
n(this, W).stopAllTransports(), f(this, Hi, !1), n(this, jr, mn).mediaJoinAttempted = !1;
|
|
24639
24641
|
const s = {
|
|
24640
24642
|
closeRoom: !1
|
|
24641
24643
|
};
|
|
@@ -24699,7 +24701,7 @@ const gv = (lu = class {
|
|
|
24699
24701
|
a,
|
|
24700
24702
|
l
|
|
24701
24703
|
);
|
|
24702
|
-
return x(this,
|
|
24704
|
+
return x(this, Wi, lo).call(this, e, p.then((S) => S.id)), p.then((S) => S.track);
|
|
24703
24705
|
});
|
|
24704
24706
|
}
|
|
24705
24707
|
shareWebcam(s) {
|
|
@@ -24716,7 +24718,7 @@ const gv = (lu = class {
|
|
|
24716
24718
|
// NOTE(roerohan): If the codec is supported
|
|
24717
24719
|
((o = (a = n(this, wa).sender) == null ? void 0 : a.video) == null ? void 0 : o.codecs.findIndex(
|
|
24718
24720
|
(c) => c.mimeType === i
|
|
24719
|
-
)) >= 0 && n(this,
|
|
24721
|
+
)) >= 0 && n(this, Gi).get(i).size > 0
|
|
24720
24722
|
);
|
|
24721
24723
|
});
|
|
24722
24724
|
return e.length === 0 && e.push(kt[0]), yield Promise.all(e.map((i) => (this.logger.debug(`Calling _shareWebcam with video codec: ${i}`), this._shareWebcam(s, i)))), s;
|
|
@@ -24746,7 +24748,7 @@ const gv = (lu = class {
|
|
|
24746
24748
|
r,
|
|
24747
24749
|
i
|
|
24748
24750
|
);
|
|
24749
|
-
x(this,
|
|
24751
|
+
x(this, Wi, lo).call(this, ue.SCREENSHARE_VIDEO, a.then((c) => c.id));
|
|
24750
24752
|
let o;
|
|
24751
24753
|
if (e) {
|
|
24752
24754
|
const c = {
|
|
@@ -24764,7 +24766,7 @@ const gv = (lu = class {
|
|
|
24764
24766
|
o = n(this, W).createProducer(
|
|
24765
24767
|
c,
|
|
24766
24768
|
d
|
|
24767
|
-
), x(this,
|
|
24769
|
+
), x(this, Wi, lo).call(this, ue.SCREENSHARE_AUDIO, o.then((l) => l.id));
|
|
24768
24770
|
}
|
|
24769
24771
|
yield Promise.all([a, o || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
24770
24772
|
});
|
|
@@ -24794,7 +24796,7 @@ const gv = (lu = class {
|
|
|
24794
24796
|
e,
|
|
24795
24797
|
r
|
|
24796
24798
|
);
|
|
24797
|
-
x(this,
|
|
24799
|
+
x(this, Wi, lo).call(this, ue.MIC, i.then((a) => a.id)), yield i.then((a) => {
|
|
24798
24800
|
n(this, _t) && (n(this, _t).audioTrack = a.track, n(this, _t).producerId = a.id, n(this, _t).start());
|
|
24799
24801
|
});
|
|
24800
24802
|
} catch (t) {
|
|
@@ -25017,7 +25019,7 @@ const gv = (lu = class {
|
|
|
25017
25019
|
if (i != null && i.mimeType || (i.mimeType = i.kind === xs.AUDIO ? "audio/opus" : "video/VP8"), i.kind === xs.VIDEO && !i.screenShare && // Can receive vp9
|
|
25018
25020
|
((e = (t = n(this, wa).receiver) == null ? void 0 : t.video) == null ? void 0 : e.codecs.findIndex(
|
|
25019
25021
|
(a) => a.mimeType === kt[0]
|
|
25020
|
-
)) >= 0 && n(this,
|
|
25022
|
+
)) >= 0 && n(this, ji).get(kt[0]).has(r) && i.mimeType !== kt[0]) {
|
|
25021
25023
|
this.logger.warn(`Ignoring producer: ${i.producerId}`);
|
|
25022
25024
|
return;
|
|
25023
25025
|
}
|
|
@@ -25132,7 +25134,7 @@ const gv = (lu = class {
|
|
|
25132
25134
|
), n(this, at).on(
|
|
25133
25135
|
n(this, mt).mediaRoomTerminationBroadcastResponse,
|
|
25134
25136
|
() => {
|
|
25135
|
-
!this.mediaJoined && !n(this,
|
|
25137
|
+
!this.mediaJoined && !n(this, Bi) && !n(this, Hi) || (this.logger.warn(
|
|
25136
25138
|
"media hub termination broadcast received, rejoining room"
|
|
25137
25139
|
), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_DISCONNECTED), n(this, Tc).call(this));
|
|
25138
25140
|
}
|
|
@@ -25176,7 +25178,7 @@ const gv = (lu = class {
|
|
|
25176
25178
|
(d) => d.mimeType === c
|
|
25177
25179
|
)) >= 0 || o === kt.length - 1
|
|
25178
25180
|
) {
|
|
25179
|
-
n(this,
|
|
25181
|
+
n(this, Gi).get(c).add(s);
|
|
25180
25182
|
break;
|
|
25181
25183
|
}
|
|
25182
25184
|
}
|
|
@@ -25188,17 +25190,17 @@ const gv = (lu = class {
|
|
|
25188
25190
|
(d) => d.mimeType === c
|
|
25189
25191
|
)) >= 0 || o === kt.length - 1
|
|
25190
25192
|
) {
|
|
25191
|
-
n(this,
|
|
25193
|
+
n(this, ji).get(c).add(s);
|
|
25192
25194
|
break;
|
|
25193
25195
|
}
|
|
25194
25196
|
}
|
|
25195
25197
|
}
|
|
25196
25198
|
handlePeerLeaving(s) {
|
|
25197
|
-
this.context.getValue("flagsmith").hasFeature(Z.FORCE_VIDEO_CODEC) || (n(this,
|
|
25199
|
+
this.context.getValue("flagsmith").hasFeature(Z.FORCE_VIDEO_CODEC) || (n(this, ji).forEach((t) => t.delete(s)), n(this, Gi).forEach((t, e) => {
|
|
25198
25200
|
t.delete(s), !(t.size !== 0 || e === kt[0]) && this.disableWebcam(e);
|
|
25199
25201
|
}));
|
|
25200
25202
|
}
|
|
25201
|
-
}, vc = new WeakMap(), Sc = new WeakMap(), at = new WeakMap(), W = new WeakMap(), wa = new WeakMap(), mt = new WeakMap(),
|
|
25203
|
+
}, vc = new WeakMap(), Sc = new WeakMap(), at = new WeakMap(), W = new WeakMap(), wa = new WeakMap(), mt = new WeakMap(), Bi = new WeakMap(), Hi = new WeakMap(), qi = new WeakMap(), Tc = new WeakMap(), ts = new WeakMap(), or = new WeakMap(), yc = new WeakMap(), ji = new WeakMap(), Gi = new WeakMap(), ft = new WeakMap(), _t = new WeakMap(), jr = new WeakSet(), mn = function() {
|
|
25202
25204
|
return this.context.getValue("connectionHandler");
|
|
25203
25205
|
}, hl = new WeakSet(), mv = function(s, t, e, r) {
|
|
25204
25206
|
return u(this, null, function* () {
|
|
@@ -25216,7 +25218,7 @@ const gv = (lu = class {
|
|
|
25216
25218
|
try {
|
|
25217
25219
|
this.mediaJoined = !0;
|
|
25218
25220
|
const { roomState: s } = yield n(this, W).socketHandler.notifySelfJoinComplete();
|
|
25219
|
-
return f(this, vc, s.roomUuid), f(this,
|
|
25221
|
+
return f(this, vc, s.roomUuid), f(this, Hi, !0), f(this, Bi, !1), !0;
|
|
25220
25222
|
} catch (s) {
|
|
25221
25223
|
return this.logger.error("Error completing room join", { error: s }), this.mediaJoined = !1, !1;
|
|
25222
25224
|
}
|
|
@@ -25313,7 +25315,7 @@ const gv = (lu = class {
|
|
|
25313
25315
|
});
|
|
25314
25316
|
}, Xe = new WeakSet(), lt = function(s) {
|
|
25315
25317
|
return n(this, ft).get(s);
|
|
25316
|
-
},
|
|
25318
|
+
}, Wi = new WeakSet(), lo = function(s, t) {
|
|
25317
25319
|
return n(this, ft).set(s, t);
|
|
25318
25320
|
}, Tl = new WeakSet(), Pv = function(s) {
|
|
25319
25321
|
return n(this, ft).delete(s);
|
|
@@ -25457,7 +25459,7 @@ var qD = Object.defineProperty, jD = Object.getOwnPropertyDescriptor, ln = (s, t
|
|
|
25457
25459
|
for (var i = r > 1 ? void 0 : r ? jD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
25458
25460
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
25459
25461
|
return r && i && qD(t, e, i), i;
|
|
25460
|
-
},
|
|
25462
|
+
}, Ji, Ts, ee, vt, It, Lg;
|
|
25461
25463
|
const bv = (Lg = class {
|
|
25462
25464
|
/**
|
|
25463
25465
|
* Use await SelfController.init(roomNodeClient) instead
|
|
@@ -25467,12 +25469,12 @@ const bv = (Lg = class {
|
|
|
25467
25469
|
m(this, vt);
|
|
25468
25470
|
h(this, "self");
|
|
25469
25471
|
h(this, "authToken");
|
|
25470
|
-
m(this,
|
|
25472
|
+
m(this, Ji, void 0);
|
|
25471
25473
|
h(this, "viewType");
|
|
25472
25474
|
m(this, Ts, void 0);
|
|
25473
25475
|
m(this, ee, void 0);
|
|
25474
25476
|
const { socket: i } = e, a = s.getValue("authToken");
|
|
25475
|
-
this.self = t, f(this, ee, s), this.viewType = r, this.authToken = a, f(this,
|
|
25477
|
+
this.self = t, f(this, ee, s), this.viewType = r, this.authToken = a, f(this, Ji, i), f(this, Ts, e), this.setupEvents();
|
|
25476
25478
|
}
|
|
25477
25479
|
get peerId() {
|
|
25478
25480
|
return n(this, ee).getValue("peerId");
|
|
@@ -25616,7 +25618,7 @@ const bv = (Lg = class {
|
|
|
25616
25618
|
if (this.self.roomState === "disconnected")
|
|
25617
25619
|
return;
|
|
25618
25620
|
let { peerId: t } = this;
|
|
25619
|
-
s && n(this, ee).getValue("flagsmith").hasFeature(Z.REFRESH_ID_ON_DISCONNECTION) && (t =
|
|
25621
|
+
s && n(this, ee).getValue("flagsmith").hasFeature(Z.REFRESH_ID_ON_DISCONNECTION) && (t = tn()), n(this, Ji).updateURL(t), n(this, ee).getValue("telemetry").resetPeerId(t), ot().setHeader("tracing-id", t), ur.remapContext(t, n(this, ee)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
25620
25622
|
}), n(this, ee).getValue("peerSessionStore").on(b.SOCKET_SERVICE_FAILED, () => {
|
|
25621
25623
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
25622
25624
|
}), n(this, Ts).on(U.waitingRoomRequestAccepted, () => {
|
|
@@ -25688,7 +25690,7 @@ const bv = (Lg = class {
|
|
|
25688
25690
|
}
|
|
25689
25691
|
this.self.setIsPinned(!1), n(this, ee).setValue("stageStatus", "OFF_STAGE", !1), yield this.leaveMediaRoom(s), n(this, ee).notify("stageStatus");
|
|
25690
25692
|
try {
|
|
25691
|
-
(e = n(this,
|
|
25693
|
+
(e = n(this, Ji)) == null || e.disconnect();
|
|
25692
25694
|
} catch (r) {
|
|
25693
25695
|
this.logger.error("SelfController::leaveRoom::socketDisconnect");
|
|
25694
25696
|
}
|
|
@@ -25711,7 +25713,7 @@ const bv = (Lg = class {
|
|
|
25711
25713
|
return;
|
|
25712
25714
|
}
|
|
25713
25715
|
wv(n(this, ee), {
|
|
25714
|
-
socket: n(this,
|
|
25716
|
+
socket: n(this, Ji),
|
|
25715
25717
|
peerId: t
|
|
25716
25718
|
});
|
|
25717
25719
|
}
|
|
@@ -25745,31 +25747,31 @@ const bv = (Lg = class {
|
|
|
25745
25747
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
25746
25748
|
});
|
|
25747
25749
|
}
|
|
25748
|
-
},
|
|
25750
|
+
}, Ji = new WeakMap(), Ts = new WeakMap(), ee = new WeakMap(), vt = new WeakSet(), It = function() {
|
|
25749
25751
|
return n(this, ee).getValue("roomNodeClient");
|
|
25750
25752
|
}, Lg);
|
|
25751
|
-
let
|
|
25753
|
+
let ti = bv;
|
|
25752
25754
|
ln([
|
|
25753
25755
|
P.trace("SelfController.resetSelf")
|
|
25754
|
-
],
|
|
25756
|
+
], ti.prototype, "resetSelf", 1);
|
|
25755
25757
|
ln([
|
|
25756
25758
|
P.trace("SelfController.setupEvents")
|
|
25757
|
-
],
|
|
25759
|
+
], ti.prototype, "setupEvents", 1);
|
|
25758
25760
|
ln([
|
|
25759
25761
|
P.trace("SelfController.joinRoom")
|
|
25760
|
-
],
|
|
25762
|
+
], ti.prototype, "joinRoom", 1);
|
|
25761
25763
|
ln([
|
|
25762
25764
|
P.trace("SelfController.leaveRoom")
|
|
25763
|
-
],
|
|
25765
|
+
], ti.prototype, "leaveRoom", 1);
|
|
25764
25766
|
ln([
|
|
25765
25767
|
P.trace("SelfController.joinMediaRoom")
|
|
25766
|
-
],
|
|
25768
|
+
], ti.prototype, "joinMediaRoom", 1);
|
|
25767
25769
|
ln([
|
|
25768
25770
|
P.trace("SelfController.leaveMediaRoom")
|
|
25769
|
-
],
|
|
25771
|
+
], ti.prototype, "leaveMediaRoom", 1);
|
|
25770
25772
|
ln([
|
|
25771
25773
|
P.trace("SelfController.init")
|
|
25772
|
-
],
|
|
25774
|
+
], ti, "init", 1);
|
|
25773
25775
|
var Pc;
|
|
25774
25776
|
class GD {
|
|
25775
25777
|
constructor(t) {
|
|
@@ -26257,32 +26259,32 @@ class kv {
|
|
|
26257
26259
|
break;
|
|
26258
26260
|
}
|
|
26259
26261
|
case Ps.peerJoinedBroadcast:
|
|
26260
|
-
case
|
|
26262
|
+
case kr.peerJoinedBroadcast: {
|
|
26261
26263
|
r = Up.fromBinary.bind(Up);
|
|
26262
26264
|
break;
|
|
26263
26265
|
}
|
|
26264
26266
|
case Ps.selfJoinComplete:
|
|
26265
|
-
case
|
|
26267
|
+
case kr.selfJoinComplete: {
|
|
26266
26268
|
r = Eu.fromBinary.bind(Eu);
|
|
26267
26269
|
break;
|
|
26268
26270
|
}
|
|
26269
26271
|
case Ps.globalPeerPinBroadcast:
|
|
26270
|
-
case
|
|
26272
|
+
case kr.globalPeerPinBroadcast: {
|
|
26271
26273
|
r = Bp.fromBinary.bind(Bp);
|
|
26272
26274
|
break;
|
|
26273
26275
|
}
|
|
26274
26276
|
case Ps.selectedPeer:
|
|
26275
|
-
case
|
|
26277
|
+
case kr.selectedPeer: {
|
|
26276
26278
|
r = yu.fromBinary.bind(yu);
|
|
26277
26279
|
break;
|
|
26278
26280
|
}
|
|
26279
26281
|
case Ps.selectedPeerDiff:
|
|
26280
|
-
case
|
|
26282
|
+
case kr.selectedPeerDiff: {
|
|
26281
26283
|
r = xp.fromBinary.bind(xp);
|
|
26282
26284
|
break;
|
|
26283
26285
|
}
|
|
26284
26286
|
case Ps.leaveRoom:
|
|
26285
|
-
case
|
|
26287
|
+
case kr.leaveRoom: {
|
|
26286
26288
|
r = Pu.fromBinary.bind(Pu);
|
|
26287
26289
|
break;
|
|
26288
26290
|
}
|
|
@@ -26920,66 +26922,66 @@ class xv {
|
|
|
26920
26922
|
function uO(s, t) {
|
|
26921
26923
|
return Math.floor(Math.random() * (t - s + 1) + s);
|
|
26922
26924
|
}
|
|
26923
|
-
var
|
|
26925
|
+
var Rr;
|
|
26924
26926
|
class hO {
|
|
26925
26927
|
constructor(t = {}) {
|
|
26926
|
-
sO(this, "opts"), fe(this,
|
|
26928
|
+
sO(this, "opts"), fe(this, Rr, void 0), this.opts = {
|
|
26927
26929
|
initialTimeout: t.initialTimeout || 1e3,
|
|
26928
26930
|
maxTimeout: t.maxTimeout || 1e4,
|
|
26929
26931
|
factor: t.factor || 2
|
|
26930
|
-
}, ne(this,
|
|
26932
|
+
}, ne(this, Rr, 0);
|
|
26931
26933
|
}
|
|
26932
26934
|
wait() {
|
|
26933
26935
|
return u(this, null, function* () {
|
|
26934
|
-
ne(this,
|
|
26935
|
-
const t = uO(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Wh(2, M(this,
|
|
26936
|
+
ne(this, Rr, M(this, Rr) + 1);
|
|
26937
|
+
const t = uO(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Wh(2, M(this, Rr))));
|
|
26936
26938
|
yield new Promise((e) => {
|
|
26937
26939
|
setTimeout(e, t);
|
|
26938
26940
|
});
|
|
26939
26941
|
});
|
|
26940
26942
|
}
|
|
26941
26943
|
getAttempts() {
|
|
26942
|
-
return M(this,
|
|
26944
|
+
return M(this, Rr);
|
|
26943
26945
|
}
|
|
26944
26946
|
reset() {
|
|
26945
|
-
ne(this,
|
|
26947
|
+
ne(this, Rr, 0);
|
|
26946
26948
|
}
|
|
26947
26949
|
}
|
|
26948
|
-
|
|
26950
|
+
Rr = /* @__PURE__ */ new WeakMap();
|
|
26949
26951
|
const Pr = {
|
|
26950
26952
|
debug: 0,
|
|
26951
26953
|
info: 1,
|
|
26952
26954
|
warn: 2,
|
|
26953
26955
|
error: 3
|
|
26954
26956
|
};
|
|
26955
|
-
var
|
|
26957
|
+
var ai, oi;
|
|
26956
26958
|
class pO {
|
|
26957
26959
|
constructor(t) {
|
|
26958
|
-
fe(this,
|
|
26960
|
+
fe(this, ai, void 0), fe(this, oi, void 0), ne(this, ai, console), ne(this, oi, t);
|
|
26959
26961
|
}
|
|
26960
26962
|
debug(...t) {
|
|
26961
|
-
Pr[M(this,
|
|
26963
|
+
Pr[M(this, oi)] > Pr.debug || M(this, ai).debug("[Sockrates]:", ...t);
|
|
26962
26964
|
}
|
|
26963
26965
|
info(...t) {
|
|
26964
|
-
Pr[M(this,
|
|
26966
|
+
Pr[M(this, oi)] > Pr.info || M(this, ai).info("[Sockrates]:", ...t);
|
|
26965
26967
|
}
|
|
26966
26968
|
warn(...t) {
|
|
26967
|
-
Pr[M(this,
|
|
26969
|
+
Pr[M(this, oi)] > Pr.warn || M(this, ai).warn("[Sockrates]:", ...t);
|
|
26968
26970
|
}
|
|
26969
26971
|
error(...t) {
|
|
26970
|
-
Pr[M(this,
|
|
26972
|
+
Pr[M(this, oi)] > Pr.error || M(this, ai).error("[Sockrates]:", ...t);
|
|
26971
26973
|
}
|
|
26972
26974
|
}
|
|
26973
|
-
|
|
26975
|
+
ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap();
|
|
26974
26976
|
var Uv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(Uv || {});
|
|
26975
26977
|
const gO = "2", mO = "3";
|
|
26976
|
-
var Ae, fn, Pe, Le,
|
|
26978
|
+
var Ae, fn, Pe, Le, br, Ke, lr, Kr, Es, vn, Bs, Qu, $v, uo, hd, Xu, Fv, Zu, vg, bd, eh, th, Bv, go, pd, mo, kd, Ad, sh, bn, fo, vo, Id;
|
|
26977
26979
|
class fO {
|
|
26978
26980
|
constructor(t, e) {
|
|
26979
26981
|
var v, S, E, _, C, R, L, F, N, B;
|
|
26980
|
-
fe(this, Qu), fe(this, uo), fe(this, Xu), fe(this, Zu), fe(this, bd), fe(this, th), fe(this, go), fe(this, mo), fe(this, Ad), fe(this, bn), fe(this, vo), fe(this, Ae, void 0), fe(this, fn, void 0), fe(this, Pe, void 0), fe(this, Le, void 0), fe(this,
|
|
26982
|
+
fe(this, Qu), fe(this, uo), fe(this, Xu), fe(this, Zu), fe(this, bd), fe(this, th), fe(this, go), fe(this, mo), fe(this, Ad), fe(this, bn), fe(this, vo), fe(this, Ae, void 0), fe(this, fn, void 0), fe(this, Pe, void 0), fe(this, Le, void 0), fe(this, br, void 0), fe(this, Ke, void 0), fe(this, lr, void 0), fe(this, Kr, void 0), fe(this, Es, void 0), fe(this, vn, void 0), fe(this, Bs, void 0);
|
|
26981
26983
|
var r, i, a, o, c, d, l, p, g;
|
|
26982
|
-
ne(this, fn, t), ne(this,
|
|
26984
|
+
ne(this, fn, t), ne(this, br, []), ne(this, Ke, new Rd()), ne(this, lr, !0), ne(this, Es, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (E = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (R = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Kr, {
|
|
26983
26985
|
code: void 0,
|
|
26984
26986
|
reason: void 0
|
|
26985
26987
|
}), ne(this, Le, (B = M(this, Pe).logger) != null ? B : new pO(M(this, Pe).debug ? "debug" : "info")), ne(this, Bs, new hO());
|
|
@@ -27014,7 +27016,7 @@ class fO {
|
|
|
27014
27016
|
* socket not being connected.
|
|
27015
27017
|
*/
|
|
27016
27018
|
get sendQueue() {
|
|
27017
|
-
return M(this,
|
|
27019
|
+
return M(this, br);
|
|
27018
27020
|
}
|
|
27019
27021
|
/**
|
|
27020
27022
|
* Flushes all messages that were queued
|
|
@@ -27024,9 +27026,9 @@ class fO {
|
|
|
27024
27026
|
if (!M(this, Pe).queueOnDisconnect)
|
|
27025
27027
|
return !1;
|
|
27026
27028
|
const t = [];
|
|
27027
|
-
return M(this,
|
|
27029
|
+
return M(this, br).forEach((e) => {
|
|
27028
27030
|
this.send(e.event, e.id, e.payload, e.metadata) || t.push(e);
|
|
27029
|
-
}), ne(this,
|
|
27031
|
+
}), ne(this, br, t), M(this, br);
|
|
27030
27032
|
}
|
|
27031
27033
|
connect(t = !1) {
|
|
27032
27034
|
return u(this, null, function* () {
|
|
@@ -27050,7 +27052,7 @@ class fO {
|
|
|
27050
27052
|
), _e(this, go, pd).call(this)), r(new Error("Connection timed out!"));
|
|
27051
27053
|
}, M(this, Pe).connectionTimeout);
|
|
27052
27054
|
M(this, Ae).onopen = () => {
|
|
27053
|
-
M(this, Le).debug(`Ready State: ${Uv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Ad, sh).call(this), ne(this,
|
|
27055
|
+
M(this, Le).debug(`Ready State: ${Uv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Ad, sh).call(this), ne(this, Kr, {
|
|
27054
27056
|
code: void 0,
|
|
27055
27057
|
reason: void 0
|
|
27056
27058
|
}), M(this, Ke).emit(
|
|
@@ -27081,7 +27083,7 @@ class fO {
|
|
|
27081
27083
|
send(t, e, r, i) {
|
|
27082
27084
|
const a = { event: t, id: e, payload: r, metadata: i };
|
|
27083
27085
|
if (M(this, Pe).queueOnDisconnect && (!M(this, Ae) || M(this, Ae).readyState !== 1))
|
|
27084
|
-
return M(this, Le).debug("Queuing message since socket is not connected!", a), M(this,
|
|
27086
|
+
return M(this, Le).debug("Queuing message since socket is not connected!", a), M(this, br).push(a), !1;
|
|
27085
27087
|
const o = xv.encode(a);
|
|
27086
27088
|
return _e(this, mo, kd).call(this, o);
|
|
27087
27089
|
}
|
|
@@ -27149,13 +27151,13 @@ class fO {
|
|
|
27149
27151
|
* Disconnect the socket.
|
|
27150
27152
|
*/
|
|
27151
27153
|
disconnect() {
|
|
27152
|
-
ne(this, lr, !1), _e(this, bn, fo).call(this), this.removeAllListeners(), ne(this,
|
|
27154
|
+
ne(this, lr, !1), _e(this, bn, fo).call(this), this.removeAllListeners(), ne(this, Kr, {
|
|
27153
27155
|
code: 1e3,
|
|
27154
27156
|
reason: "Sockrates disconnect method called"
|
|
27155
27157
|
}), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
|
|
27156
27158
|
}
|
|
27157
27159
|
}
|
|
27158
|
-
Ae = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(),
|
|
27160
|
+
Ae = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), Bs = /* @__PURE__ */ new WeakMap(), Qu = /* @__PURE__ */ new WeakSet(), $v = function(s) {
|
|
27159
27161
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
27160
27162
|
return s;
|
|
27161
27163
|
if (s.startsWith("https://"))
|
|
@@ -27175,9 +27177,9 @@ Ae = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Pe = /*
|
|
|
27175
27177
|
}, Zu = /* @__PURE__ */ new WeakSet(), vg = function() {
|
|
27176
27178
|
return M(this, Ae).readyState === 1;
|
|
27177
27179
|
}, bd = /* @__PURE__ */ new WeakSet(), eh = function(s, t) {
|
|
27178
|
-
ne(this,
|
|
27180
|
+
ne(this, Kr, { reason: t, code: s }), M(this, Ke).emit("disconnected", { code: s, reason: t });
|
|
27179
27181
|
}, th = /* @__PURE__ */ new WeakSet(), Bv = function() {
|
|
27180
|
-
const { reason: s, code: t } = M(this,
|
|
27182
|
+
const { reason: s, code: t } = M(this, Kr);
|
|
27181
27183
|
t && t !== 1e3 && M(this, lr) && M(this, Pe).autoReconnect && !M(this, Es) && (M(this, Le).debug(`Triggering reconnection due to ${s}.`), M(this, Ke).emit(
|
|
27182
27184
|
"reconnecting"
|
|
27183
27185
|
/* reconnecting */
|
|
@@ -27201,7 +27203,7 @@ Ae = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Pe = /*
|
|
|
27201
27203
|
return;
|
|
27202
27204
|
if (M(this, Le).debug(`Reconnection attempt ${M(this, Bs).getAttempts()}`), M(this, Ke).emit("reconnectAttempt", { attempt: M(this, Bs).getAttempts() }), yield this.connect(), !_e(this, Zu, vg).call(this))
|
|
27203
27205
|
throw Error("Reconnect Failed");
|
|
27204
|
-
ne(this, Es, !1), ne(this,
|
|
27206
|
+
ne(this, Es, !1), ne(this, Kr, {
|
|
27205
27207
|
code: void 0,
|
|
27206
27208
|
reason: void 0
|
|
27207
27209
|
}), M(this, Ke).emit(
|
|
@@ -27236,7 +27238,7 @@ var vO = Object.defineProperty, SO = Object.getOwnPropertyDescriptor, ql = (s, t
|
|
|
27236
27238
|
return r && i && vO(t, e, i), i;
|
|
27237
27239
|
};
|
|
27238
27240
|
const Sg = 65535, TO = 3e3;
|
|
27239
|
-
var
|
|
27241
|
+
var Gr, Ce, we, Me, ss, Ze, Rc, rh, bc, ih, xg;
|
|
27240
27242
|
const Hv = (xg = class {
|
|
27241
27243
|
constructor(s, {
|
|
27242
27244
|
peerId: t,
|
|
@@ -27247,7 +27249,7 @@ const Hv = (xg = class {
|
|
|
27247
27249
|
m(this, we);
|
|
27248
27250
|
m(this, Rc);
|
|
27249
27251
|
m(this, bc);
|
|
27250
|
-
m(this,
|
|
27252
|
+
m(this, Gr, void 0);
|
|
27251
27253
|
m(this, Ce, void 0);
|
|
27252
27254
|
h(this, "roomName");
|
|
27253
27255
|
h(this, "authToken");
|
|
@@ -27257,7 +27259,7 @@ const Hv = (xg = class {
|
|
|
27257
27259
|
var a;
|
|
27258
27260
|
if (!t || !e || !r)
|
|
27259
27261
|
throw new A("peerId, meetingId, or authToken can not be empty", "0404");
|
|
27260
|
-
f(this, ss, void 0), f(this, Ze, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this,
|
|
27262
|
+
f(this, ss, void 0), f(this, Ze, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this, Gr, x(this, Rc, rh).call(this, t)), f(this, Ce, new fO(n(this, Gr), {
|
|
27261
27263
|
autoReconnect: !0,
|
|
27262
27264
|
disconnectOnPingTimeout: (a = i.includes("PING")) != null ? a : !1,
|
|
27263
27265
|
queueOnDisconnect: !0,
|
|
@@ -27289,13 +27291,13 @@ const Hv = (xg = class {
|
|
|
27289
27291
|
return n(this, Ze).getValue("peerId");
|
|
27290
27292
|
}
|
|
27291
27293
|
updateURL(s) {
|
|
27292
|
-
s !== this.peerId && (f(this,
|
|
27294
|
+
s !== this.peerId && (f(this, Gr, x(this, Rc, rh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), n(this, Ce).updateURL(n(this, Gr));
|
|
27293
27295
|
}
|
|
27294
27296
|
static getSocketEdgeDomain(s) {
|
|
27295
|
-
return
|
|
27297
|
+
return Xi({ servicePrefix: "socket-edge", baseURI: s });
|
|
27296
27298
|
}
|
|
27297
27299
|
get url() {
|
|
27298
|
-
return n(this,
|
|
27300
|
+
return n(this, Gr);
|
|
27299
27301
|
}
|
|
27300
27302
|
connect() {
|
|
27301
27303
|
return u(this, null, function* () {
|
|
@@ -27351,7 +27353,7 @@ const Hv = (xg = class {
|
|
|
27351
27353
|
(o, c) => {
|
|
27352
27354
|
const d = (E, _) => {
|
|
27353
27355
|
n(this, Ce).removeListener(a, E), n(this, Ce).removeListener(Sg, _), n(this, Ce).removeListener(
|
|
27354
|
-
|
|
27356
|
+
kr.errorResponse,
|
|
27355
27357
|
_
|
|
27356
27358
|
), n(this, Ce).removeListener(
|
|
27357
27359
|
Ps.errorResponse,
|
|
@@ -27385,7 +27387,7 @@ const Hv = (xg = class {
|
|
|
27385
27387
|
}) => {
|
|
27386
27388
|
l === E && (o({ id: E, payload: _ }), d(S, v));
|
|
27387
27389
|
};
|
|
27388
|
-
n(this, Ce).on(a, S), n(this, Ce).on(Sg, v), n(this, Ce).on(
|
|
27390
|
+
n(this, Ce).on(a, S), n(this, Ce).on(Sg, v), n(this, Ce).on(kr.errorResponse, v), n(this, Ce).on(Ps.errorResponse, v), setTimeout(() => {
|
|
27389
27391
|
d(S, v), c(new Error(`request timeout for callback eventId:${s}`));
|
|
27390
27392
|
}, t), n(this, Ce).send(
|
|
27391
27393
|
s,
|
|
@@ -27451,7 +27453,7 @@ const Hv = (xg = class {
|
|
|
27451
27453
|
this.logger.info("SocketService::Failed to connect to socket-edge", { country: P.location.country }), n(this, Ze).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_FAILED), n(this, we, Me).updateSocketConnectionState("failed");
|
|
27452
27454
|
}));
|
|
27453
27455
|
}
|
|
27454
|
-
},
|
|
27456
|
+
}, Gr = new WeakMap(), Ce = new WeakMap(), we = new WeakSet(), Me = function() {
|
|
27455
27457
|
return n(this, Ze).getValue("connectionHandler");
|
|
27456
27458
|
}, ss = new WeakMap(), Ze = new WeakMap(), Rc = new WeakSet(), rh = function(s) {
|
|
27457
27459
|
let t = Hv.getSocketEdgeDomain(n(this, Ze).getValue("baseURI"));
|
|
@@ -28028,7 +28030,7 @@ const Sn = class {
|
|
|
28028
28030
|
isReactNative: navigator.isReactNative
|
|
28029
28031
|
});
|
|
28030
28032
|
try {
|
|
28031
|
-
const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ?
|
|
28033
|
+
const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? Xi({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
28032
28034
|
yield s.getValue("flagsmith").identify(
|
|
28033
28035
|
`${Su.PEER}_${t}`,
|
|
28034
28036
|
JSON.parse(JSON.stringify(d)),
|
|
@@ -28065,7 +28067,7 @@ const Sn = class {
|
|
|
28065
28067
|
s
|
|
28066
28068
|
);
|
|
28067
28069
|
t.setValue("connectedMeetingsSocketHandler", re);
|
|
28068
|
-
const et = new Bl(t, s), os = new Tr(t, s),
|
|
28070
|
+
const et = new Bl(t, s), os = new Tr(t, s), si = new XD(s), cs = new kv(t, s), I = new ZD(t, s), y = new GD(s), w = yield ti.init(
|
|
28069
28071
|
t,
|
|
28070
28072
|
cs,
|
|
28071
28073
|
d,
|
|
@@ -28103,7 +28105,7 @@ const Sn = class {
|
|
|
28103
28105
|
cs
|
|
28104
28106
|
)), c.stage && (_ = new If(
|
|
28105
28107
|
t,
|
|
28106
|
-
|
|
28108
|
+
si,
|
|
28107
28109
|
cs,
|
|
28108
28110
|
w.self,
|
|
28109
28111
|
N.participants
|
|
@@ -28229,9 +28231,9 @@ function AO(s, t) {
|
|
|
28229
28231
|
const { meetingId: e, orgId: r, participantId: i } = JSON.parse(atob(s.split(".")[1]));
|
|
28230
28232
|
if (!e)
|
|
28231
28233
|
throw Error(`Received V1 auth token ${s}`);
|
|
28232
|
-
let a =
|
|
28234
|
+
let a = li.baseURI.prod;
|
|
28233
28235
|
t && (a = t);
|
|
28234
|
-
const o = `https://${
|
|
28236
|
+
const o = `https://${Xi({ servicePrefix: "api", baseURI: a })}`;
|
|
28235
28237
|
return {
|
|
28236
28238
|
meetingId: e,
|
|
28237
28239
|
orgId: r,
|
|
@@ -28243,33 +28245,33 @@ function AO(s, t) {
|
|
|
28243
28245
|
throw new A("Invalid auth token", "0004");
|
|
28244
28246
|
}
|
|
28245
28247
|
}
|
|
28246
|
-
var
|
|
28248
|
+
var Wr, Ki, zi, kc, Pl, Gv;
|
|
28247
28249
|
class IO {
|
|
28248
28250
|
constructor() {
|
|
28249
28251
|
m(this, Pl);
|
|
28250
|
-
m(this,
|
|
28251
|
-
m(this,
|
|
28252
|
-
m(this,
|
|
28252
|
+
m(this, Wr, new Audio());
|
|
28253
|
+
m(this, Ki, new MediaStream());
|
|
28254
|
+
m(this, zi, /* @__PURE__ */ new Map());
|
|
28253
28255
|
m(this, kc, void 0);
|
|
28254
|
-
n(this,
|
|
28256
|
+
n(this, Wr).srcObject = n(this, Ki), n(this, Wr).autoplay = !0;
|
|
28255
28257
|
}
|
|
28256
28258
|
playTracks(t) {
|
|
28257
28259
|
return u(this, null, function* () {
|
|
28258
28260
|
return t.forEach((e) => {
|
|
28259
|
-
n(this,
|
|
28261
|
+
n(this, zi).has(e.id) || (n(this, Ki).addTrack(e), n(this, zi).set(e.id, e));
|
|
28260
28262
|
}), this.play();
|
|
28261
28263
|
});
|
|
28262
28264
|
}
|
|
28263
28265
|
setSpeakerDevice(t) {
|
|
28264
|
-
typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this,
|
|
28266
|
+
typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, Wr).setSinkId(t);
|
|
28265
28267
|
}
|
|
28266
28268
|
removeTrack(t) {
|
|
28267
|
-
const e = n(this,
|
|
28268
|
-
e && (n(this,
|
|
28269
|
+
const e = n(this, zi).get(t);
|
|
28270
|
+
e && (n(this, Ki).removeTrack(e), n(this, zi).delete(t));
|
|
28269
28271
|
}
|
|
28270
28272
|
play() {
|
|
28271
28273
|
return u(this, null, function* () {
|
|
28272
|
-
return n(this,
|
|
28274
|
+
return n(this, Wr).srcObject = n(this, Ki), n(this, Wr).play().catch((t) => {
|
|
28273
28275
|
x(this, Pl, Gv).call(this, t);
|
|
28274
28276
|
});
|
|
28275
28277
|
});
|
|
@@ -28278,44 +28280,44 @@ class IO {
|
|
|
28278
28280
|
f(this, kc, t);
|
|
28279
28281
|
}
|
|
28280
28282
|
}
|
|
28281
|
-
|
|
28283
|
+
Wr = new WeakMap(), Ki = new WeakMap(), zi = new WeakMap(), kc = new WeakMap(), Pl = new WeakSet(), Gv = function(t) {
|
|
28282
28284
|
var e;
|
|
28283
28285
|
(e = n(this, kc)) == null || e.call(this, t);
|
|
28284
28286
|
};
|
|
28285
|
-
var
|
|
28287
|
+
var Yi;
|
|
28286
28288
|
class MO extends IO {
|
|
28287
28289
|
constructor() {
|
|
28288
28290
|
super();
|
|
28289
28291
|
/** Maps participantId to trackId */
|
|
28290
|
-
m(this,
|
|
28291
|
-
f(this,
|
|
28292
|
+
m(this, Yi, void 0);
|
|
28293
|
+
f(this, Yi, /* @__PURE__ */ new Map());
|
|
28292
28294
|
}
|
|
28293
28295
|
addParticipantTrack(e, r) {
|
|
28294
|
-
n(this,
|
|
28296
|
+
n(this, Yi).set(e, r.id), this.playTracks([r]);
|
|
28295
28297
|
}
|
|
28296
28298
|
removeParticipantTrack(e) {
|
|
28297
|
-
const r = n(this,
|
|
28298
|
-
r && this.removeTrack(r), n(this,
|
|
28299
|
+
const r = n(this, Yi).get(e);
|
|
28300
|
+
r && this.removeTrack(r), n(this, Yi).delete(e);
|
|
28299
28301
|
}
|
|
28300
28302
|
}
|
|
28301
|
-
|
|
28303
|
+
Yi = new WeakMap();
|
|
28302
28304
|
var DO = Object.defineProperty, OO = Object.getOwnPropertyDescriptor, Wl = (s, t, e, r) => {
|
|
28303
28305
|
for (var i = r > 1 ? void 0 : r ? OO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
28304
28306
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
28305
28307
|
return r && i && DO(t, e, i), i;
|
|
28306
|
-
}, je,
|
|
28307
|
-
let
|
|
28308
|
+
}, je, Qi, $g;
|
|
28309
|
+
let Qr = ($g = class {
|
|
28308
28310
|
/**
|
|
28309
28311
|
* @param {IContext} context
|
|
28310
28312
|
* @param {Controller} controller
|
|
28311
28313
|
*/
|
|
28312
28314
|
constructor(t, e) {
|
|
28313
28315
|
m(this, je, void 0);
|
|
28314
|
-
m(this,
|
|
28315
|
-
f(this,
|
|
28316
|
+
m(this, Qi, void 0);
|
|
28317
|
+
f(this, Qi, t), f(this, je, e);
|
|
28316
28318
|
}
|
|
28317
28319
|
get peerId() {
|
|
28318
|
-
return n(this,
|
|
28320
|
+
return n(this, Qi).getValue("peerId");
|
|
28319
28321
|
}
|
|
28320
28322
|
/**
|
|
28321
28323
|
* @param {Object} [options]
|
|
@@ -28328,7 +28330,7 @@ let Yr = ($g = class {
|
|
|
28328
28330
|
static initMedia() {
|
|
28329
28331
|
return u(this, arguments, function* (t = {}, e = !1, r = void 0) {
|
|
28330
28332
|
var d;
|
|
28331
|
-
const i = (d = r == null ? void 0 : r.peerId) != null ? d :
|
|
28333
|
+
const i = (d = r == null ? void 0 : r.peerId) != null ? d : tn(), a = ur.createContext(i, {
|
|
28332
28334
|
peerId: i
|
|
28333
28335
|
}), o = a.getValue("logger");
|
|
28334
28336
|
o.init(a);
|
|
@@ -28340,9 +28342,9 @@ let Yr = ($g = class {
|
|
|
28340
28342
|
return u(this, null, function* () {
|
|
28341
28343
|
var S, E, _, R, L, F, N;
|
|
28342
28344
|
Te.init();
|
|
28343
|
-
const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (E = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : E.peerId) != null ? _ :
|
|
28345
|
+
const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (E = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : E.peerId) != null ? _ : tn()), { authToken: i, baseURI: a } = t, C = AO(i, a), { meetingId: o } = C, c = Hc(C, ["meetingId"]);
|
|
28344
28346
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
|
|
28345
|
-
const d =
|
|
28347
|
+
const d = Qr.setupContext(
|
|
28346
28348
|
r,
|
|
28347
28349
|
t,
|
|
28348
28350
|
o,
|
|
@@ -28359,7 +28361,7 @@ let Yr = ($g = class {
|
|
|
28359
28361
|
${(N = t.authToken) == null ? void 0 : N.slice(-10)}`
|
|
28360
28362
|
})
|
|
28361
28363
|
});
|
|
28362
|
-
const g = yield Fc.init(d), v = new
|
|
28364
|
+
const g = yield Fc.init(d), v = new Qr(d, g);
|
|
28363
28365
|
return d.setValue("meeting", v), v;
|
|
28364
28366
|
});
|
|
28365
28367
|
}
|
|
@@ -28376,7 +28378,7 @@ let Yr = ($g = class {
|
|
|
28376
28378
|
video: !0
|
|
28377
28379
|
};
|
|
28378
28380
|
return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", tw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
28379
|
-
})), a.setValue("cachedUserDetails", _s(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.
|
|
28381
|
+
})), a.setValue("cachedUserDetails", _s(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.9"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new MO()), a;
|
|
28380
28382
|
}
|
|
28381
28383
|
join() {
|
|
28382
28384
|
return u(this, null, function* () {
|
|
@@ -28389,7 +28391,7 @@ let Yr = ($g = class {
|
|
|
28389
28391
|
*/
|
|
28390
28392
|
leave(t) {
|
|
28391
28393
|
return u(this, null, function* () {
|
|
28392
|
-
Tg.cleanup(), n(this,
|
|
28394
|
+
Tg.cleanup(), n(this, Qi).getValue("peerSessionStore").reset();
|
|
28393
28395
|
const { selfController: e } = n(this, je);
|
|
28394
28396
|
return e.leaveRoom(t);
|
|
28395
28397
|
});
|
|
@@ -28481,7 +28483,7 @@ let Yr = ($g = class {
|
|
|
28481
28483
|
return n(this, je).storesManager;
|
|
28482
28484
|
}
|
|
28483
28485
|
get audio() {
|
|
28484
|
-
return n(this,
|
|
28486
|
+
return n(this, Qi).getValue("audioPlayback");
|
|
28485
28487
|
}
|
|
28486
28488
|
/**
|
|
28487
28489
|
* The __internals__ object exposes the internal tools & utilities such as features and logger
|
|
@@ -28508,7 +28510,7 @@ let Yr = ($g = class {
|
|
|
28508
28510
|
return this.leave(t);
|
|
28509
28511
|
});
|
|
28510
28512
|
}
|
|
28511
|
-
}, je = new WeakMap(),
|
|
28513
|
+
}, je = new WeakMap(), Qi = new WeakMap(), $g);
|
|
28512
28514
|
Wl([
|
|
28513
28515
|
dt("0002"),
|
|
28514
28516
|
yr.executeWithLock({
|
|
@@ -28516,10 +28518,10 @@ Wl([
|
|
|
28516
28518
|
lockName: "Client.join",
|
|
28517
28519
|
timeout: 3e3
|
|
28518
28520
|
})
|
|
28519
|
-
],
|
|
28521
|
+
], Qr.prototype, "join", 1);
|
|
28520
28522
|
Wl([
|
|
28521
28523
|
dt("0003")
|
|
28522
|
-
],
|
|
28524
|
+
], Qr.prototype, "leave", 1);
|
|
28523
28525
|
Wl([
|
|
28524
28526
|
dt("0001"),
|
|
28525
28527
|
yr.executeWithLock({
|
|
@@ -28527,11 +28529,11 @@ Wl([
|
|
|
28527
28529
|
lockName: "Client.init",
|
|
28528
28530
|
timeout: 3e3
|
|
28529
28531
|
})
|
|
28530
|
-
],
|
|
28531
|
-
|
|
28532
|
+
], Qr, "init", 1);
|
|
28533
|
+
Qr = Wl([
|
|
28532
28534
|
dt("0000")
|
|
28533
|
-
],
|
|
28534
|
-
const NO =
|
|
28535
|
+
], Qr);
|
|
28536
|
+
const NO = Qr;
|
|
28535
28537
|
export {
|
|
28536
28538
|
NO as default
|
|
28537
28539
|
};
|