@cloudflare/realtimekit 1.1.4-staging.2 → 1.1.4
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/browser.js +13 -13
- package/dist/index.cjs.js +14 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +497 -489
- package/dist/index.rn.js +14 -14
- package/dist/ts3.4/dist/index.d.ts +1 -0
- package/package.json +3 -2
package/dist/index.es.js
CHANGED
|
@@ -5170,7 +5170,7 @@ var rp;
|
|
|
5170
5170
|
(function(s) {
|
|
5171
5171
|
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";
|
|
5172
5172
|
})(rp || (rp = {}));
|
|
5173
|
-
function
|
|
5173
|
+
function Zr(s) {
|
|
5174
5174
|
return s ? s.split(".").slice(0, 2).concat(["0", "0"]).join(".") : "";
|
|
5175
5175
|
}
|
|
5176
5176
|
function Rd({ packetsLost: s, packetsSent: t }) {
|
|
@@ -5553,7 +5553,7 @@ class Mv {
|
|
|
5553
5553
|
try {
|
|
5554
5554
|
const d = `https://${e.location}`, p = yield (yield fetch(d)).json();
|
|
5555
5555
|
if (((n = p.loc) == null ? void 0 : n.length) > 5)
|
|
5556
|
-
return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip =
|
|
5556
|
+
return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Zr(this.ipInformation.ip)), p;
|
|
5557
5557
|
throw Error("Insufficient data");
|
|
5558
5558
|
} catch (d) {
|
|
5559
5559
|
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
@@ -5562,7 +5562,7 @@ class Mv {
|
|
|
5562
5562
|
const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
|
|
5563
5563
|
method: "POST"
|
|
5564
5564
|
});
|
|
5565
|
-
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip =
|
|
5565
|
+
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Zr(this.ipInformation.ip));
|
|
5566
5566
|
} catch (d) {
|
|
5567
5567
|
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
|
|
5568
5568
|
}
|
|
@@ -5758,7 +5758,7 @@ class ym extends ut {
|
|
|
5758
5758
|
}) || e[e.length - 1];
|
|
5759
5759
|
}
|
|
5760
5760
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
5761
|
-
var P, k, A, N, H, $, F, K, re, Je, Is,
|
|
5761
|
+
var P, k, A, N, H, $, F, K, re, Je, Is, yr, ni;
|
|
5762
5762
|
const c = e, d = new vm(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
5763
5763
|
for (const I of c.values()) {
|
|
5764
5764
|
if (u) {
|
|
@@ -6023,7 +6023,7 @@ class ym extends ut {
|
|
|
6023
6023
|
score: +(w.score * 10).toFixed(),
|
|
6024
6024
|
packetsLostPercentage: wd({
|
|
6025
6025
|
packetsLost: (w.packetsLost || 0) - (((Is = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Is.packetsLost) || 0),
|
|
6026
|
-
packetsReceived: (w.packetsReceived || 0) - (((
|
|
6026
|
+
packetsReceived: (w.packetsReceived || 0) - (((yr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : yr.packetsReceived) || 0)
|
|
6027
6027
|
}),
|
|
6028
6028
|
jitter: w.jitter || 0,
|
|
6029
6029
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
@@ -6037,7 +6037,7 @@ class ym extends ut {
|
|
|
6037
6037
|
}
|
|
6038
6038
|
}
|
|
6039
6039
|
if (d.producerStreamMap.forEach((I, y) => {
|
|
6040
|
-
var C, U, ie, Me, L, w, $e,
|
|
6040
|
+
var C, U, ie, Me, L, w, $e, Tr, Er, $s, Zn, eo, to, so, ro, io, ao, no, oo, co, lo, uo, ho;
|
|
6041
6041
|
if (I.outboundVideoRtpId.length > 0) {
|
|
6042
6042
|
const ue = [];
|
|
6043
6043
|
I.outboundVideoRtpId.forEach((tu) => {
|
|
@@ -6060,8 +6060,8 @@ class ym extends ut {
|
|
|
6060
6060
|
jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
|
|
6061
6061
|
isScreenShare: this.screenShareProducers.has(y),
|
|
6062
6062
|
packetsLostPercentage: Rd({
|
|
6063
|
-
packetsSent: (se.packetsSent || 0) - (((
|
|
6064
|
-
packetsLost: (((
|
|
6063
|
+
packetsSent: (se.packetsSent || 0) - (((Tr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Tr.packetsSent) || 0),
|
|
6064
|
+
packetsLost: (((Er = se.remoteData) == null ? void 0 : Er.packetsLost) || 0) - (((Zn = ($s = this.videoProducerToStatsMap.get(y)) == null ? void 0 : $s.remoteData) == null ? void 0 : Zn.packetsLost) || 0)
|
|
6065
6065
|
}),
|
|
6066
6066
|
bitrate: ((se.bytesSent || 0) - (((eo = this.videoProducerToStatsMap.get(y)) == null ? void 0 : eo.bytesSent) || 0)) * 8 / 7,
|
|
6067
6067
|
cpuLimitations: se.qualityLimitationReason === "cpu",
|
|
@@ -6086,7 +6086,7 @@ class ym extends ut {
|
|
|
6086
6086
|
}
|
|
6087
6087
|
}), S.forEach((I) => {
|
|
6088
6088
|
const y = p.find((U) => U.id === I.localCandidateId ? (I.localCandidateId = U.id, U) : null), C = f.find((U) => U.id === I.remoteCandidateId ? (I.remoteCandidateId = U.id, U) : null);
|
|
6089
|
-
y && (I.localCandidateType = y.type, I.localCandidateAddress =
|
|
6089
|
+
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), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Zr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
6090
6090
|
}), 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 = {
|
|
6091
6091
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
6092
6092
|
bytesSent: d.candidatePair.bytesSent,
|
|
@@ -6391,7 +6391,7 @@ class Tm extends ym {
|
|
|
6391
6391
|
};
|
|
6392
6392
|
}
|
|
6393
6393
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
6394
|
-
var P, k, A, N, H, $, F, K, re, Je, Is,
|
|
6394
|
+
var P, k, A, N, H, $, F, K, re, Je, Is, yr, ni;
|
|
6395
6395
|
const c = e, d = new vm(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
6396
6396
|
for (const I of c.values()) {
|
|
6397
6397
|
if (u) {
|
|
@@ -6656,7 +6656,7 @@ class Tm extends ym {
|
|
|
6656
6656
|
score: +(w.score * 10).toFixed(),
|
|
6657
6657
|
packetsLostPercentage: wd({
|
|
6658
6658
|
packetsLost: (w.packetsLost || 0) - (((Is = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Is.packetsLost) || 0),
|
|
6659
|
-
packetsReceived: (w.packetsReceived || 0) - (((
|
|
6659
|
+
packetsReceived: (w.packetsReceived || 0) - (((yr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : yr.packetsReceived) || 0)
|
|
6660
6660
|
}),
|
|
6661
6661
|
jitter: w.jitter || 0,
|
|
6662
6662
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
@@ -6670,7 +6670,7 @@ class Tm extends ym {
|
|
|
6670
6670
|
}
|
|
6671
6671
|
}
|
|
6672
6672
|
if (d.producerStreamMap.forEach((I, y) => {
|
|
6673
|
-
var C, U, ie, Me, L, w, $e,
|
|
6673
|
+
var C, U, ie, Me, L, w, $e, Tr, Er, $s, Zn, eo, to, so, ro, io, ao, no, oo, co, lo, uo, ho;
|
|
6674
6674
|
if (I.outboundVideoRtpId.length > 0) {
|
|
6675
6675
|
const ue = [];
|
|
6676
6676
|
I.outboundVideoRtpId.forEach((tu) => {
|
|
@@ -6693,8 +6693,8 @@ class Tm extends ym {
|
|
|
6693
6693
|
jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
|
|
6694
6694
|
isScreenShare: this.screenShareProducers.has(y),
|
|
6695
6695
|
packetsLostPercentage: Rd({
|
|
6696
|
-
packetsSent: (se.packetsSent || 0) - (((
|
|
6697
|
-
packetsLost: (((
|
|
6696
|
+
packetsSent: (se.packetsSent || 0) - (((Tr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Tr.packetsSent) || 0),
|
|
6697
|
+
packetsLost: (((Er = se.remoteData) == null ? void 0 : Er.packetsLost) || 0) - (((Zn = ($s = this.videoProducerToStatsMap.get(y)) == null ? void 0 : $s.remoteData) == null ? void 0 : Zn.packetsLost) || 0)
|
|
6698
6698
|
}),
|
|
6699
6699
|
bitrate: ((se.bytesSent || 0) - (((eo = this.videoProducerToStatsMap.get(y)) == null ? void 0 : eo.bytesSent) || 0)) * 8 / 7,
|
|
6700
6700
|
cpuLimitations: se.qualityLimitationReason === "cpu",
|
|
@@ -6719,7 +6719,7 @@ class Tm extends ym {
|
|
|
6719
6719
|
}
|
|
6720
6720
|
}), S.forEach((I) => {
|
|
6721
6721
|
const y = p.find((U) => U.id === I.localCandidateId ? (I.localCandidateId = U.id, U) : null), C = f.find((U) => U.id === I.remoteCandidateId ? (I.remoteCandidateId = U.id, U) : null);
|
|
6722
|
-
y && (I.localCandidateType = y.type, I.localCandidateAddress =
|
|
6722
|
+
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), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Zr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
6723
6723
|
}), 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 = {
|
|
6724
6724
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
6725
6725
|
bytesSent: d.candidatePair.bytesSent,
|
|
@@ -7835,8 +7835,8 @@ const _m = Kv;
|
|
|
7835
7835
|
var zv = typeof self == "object" && self && self.Object === Object && self, Yv = _m || zv || Function("return this")();
|
|
7836
7836
|
const Rs = Yv;
|
|
7837
7837
|
var Qv = Rs.Symbol;
|
|
7838
|
-
const
|
|
7839
|
-
var Pm = Object.prototype, Xv = Pm.hasOwnProperty, Zv = Pm.toString, mo =
|
|
7838
|
+
const ti = Qv;
|
|
7839
|
+
var Pm = Object.prototype, Xv = Pm.hasOwnProperty, Zv = Pm.toString, mo = ti ? ti.toStringTag : void 0;
|
|
7840
7840
|
function ey(s) {
|
|
7841
7841
|
var t = Xv.call(s, mo), e = s[mo];
|
|
7842
7842
|
try {
|
|
@@ -7851,7 +7851,7 @@ var ty = Object.prototype, sy = ty.toString;
|
|
|
7851
7851
|
function ry(s) {
|
|
7852
7852
|
return sy.call(s);
|
|
7853
7853
|
}
|
|
7854
|
-
var iy = "[object Null]", ay = "[object Undefined]", op =
|
|
7854
|
+
var iy = "[object Null]", ay = "[object Undefined]", op = ti ? ti.toStringTag : void 0;
|
|
7855
7855
|
function fa(s) {
|
|
7856
7856
|
return s == null ? s === void 0 ? ay : iy : op && op in Object(s) ? ey(s) : ry(s);
|
|
7857
7857
|
}
|
|
@@ -8062,7 +8062,7 @@ var Rm = Object.prototype, Yy = Rm.hasOwnProperty, Qy = Rm.propertyIsEnumerable,
|
|
|
8062
8062
|
};
|
|
8063
8063
|
const Id = Xy;
|
|
8064
8064
|
var Zy = Array.isArray;
|
|
8065
|
-
const
|
|
8065
|
+
const si = Zy;
|
|
8066
8066
|
function eT() {
|
|
8067
8067
|
return false;
|
|
8068
8068
|
}
|
|
@@ -8100,7 +8100,7 @@ var hp = jn && jn.isTypedArray, NT = hp ? Th(hp) : MT;
|
|
|
8100
8100
|
const Hl = NT;
|
|
8101
8101
|
var LT = Object.prototype, VT = LT.hasOwnProperty;
|
|
8102
8102
|
function Am(s, t) {
|
|
8103
|
-
var e =
|
|
8103
|
+
var e = si(s), r = !e && Id(s), i = !e && !r && qn(s), n = !e && !r && !i && Hl(s), o = e || r || i || n, c = o ? Ky(s.length, String) : [], d = c.length;
|
|
8104
8104
|
for (var u in s)
|
|
8105
8105
|
(t || VT.call(s, u)) && !(o && (u == "length" || i && (u == "offset" || u == "parent") || n && (u == "buffer" || u == "byteLength" || u == "byteOffset") || bm(u, d))) && c.push(u);
|
|
8106
8106
|
return c;
|
|
@@ -8207,7 +8207,7 @@ function rE(s, t) {
|
|
|
8207
8207
|
}
|
|
8208
8208
|
function $m(s, t, e) {
|
|
8209
8209
|
var r = t(s);
|
|
8210
|
-
return
|
|
8210
|
+
return si(s) ? r : xm(r, e(s));
|
|
8211
8211
|
}
|
|
8212
8212
|
function yu(s) {
|
|
8213
8213
|
return $m(s, Eh, _h);
|
|
@@ -8262,7 +8262,7 @@ function EE(s) {
|
|
|
8262
8262
|
var t = new s.constructor(s.source, TE.exec(s));
|
|
8263
8263
|
return t.lastIndex = s.lastIndex, t;
|
|
8264
8264
|
}
|
|
8265
|
-
var _p =
|
|
8265
|
+
var _p = ti ? ti.prototype : void 0, Pp = _p ? _p.valueOf : void 0;
|
|
8266
8266
|
function _E(s) {
|
|
8267
8267
|
return Pp ? Object(Pp.call(s)) : {};
|
|
8268
8268
|
}
|
|
@@ -8342,7 +8342,7 @@ function ld(s, t, e, r, i, n) {
|
|
|
8342
8342
|
return o;
|
|
8343
8343
|
if (!Cs(s))
|
|
8344
8344
|
return s;
|
|
8345
|
-
var p =
|
|
8345
|
+
var p = si(s);
|
|
8346
8346
|
if (p) {
|
|
8347
8347
|
if (o = SE(s), !c)
|
|
8348
8348
|
return Lm(s, o);
|
|
@@ -9253,7 +9253,7 @@ function AP(s) {
|
|
|
9253
9253
|
e[++t] = r;
|
|
9254
9254
|
}), e;
|
|
9255
9255
|
}
|
|
9256
|
-
var MP = 1, DP = 2, OP = "[object Boolean]", NP = "[object Date]", LP = "[object Error]", VP = "[object Map]", xP = "[object Number]", UP = "[object RegExp]", $P = "[object Set]", FP = "[object String]", HP = "[object Symbol]", BP = "[object ArrayBuffer]", qP = "[object DataView]", Mp =
|
|
9256
|
+
var MP = 1, DP = 2, OP = "[object Boolean]", NP = "[object Date]", LP = "[object Error]", VP = "[object Map]", xP = "[object Number]", UP = "[object RegExp]", $P = "[object Set]", FP = "[object String]", HP = "[object Symbol]", BP = "[object ArrayBuffer]", qP = "[object DataView]", Mp = ti ? ti.prototype : void 0, nu = Mp ? Mp.valueOf : void 0;
|
|
9257
9257
|
function jP(s, t, e, r, i, n, o) {
|
|
9258
9258
|
switch (e) {
|
|
9259
9259
|
case qP:
|
|
@@ -9323,7 +9323,7 @@ function KP(s, t, e, r, i, n) {
|
|
|
9323
9323
|
}
|
|
9324
9324
|
var zP = 1, Dp = "[object Arguments]", Op = "[object Array]", Zc = "[object Object]", YP = Object.prototype, Np = YP.hasOwnProperty;
|
|
9325
9325
|
function QP(s, t, e, r, i, n) {
|
|
9326
|
-
var o =
|
|
9326
|
+
var o = si(s), c = si(t), d = o ? Op : Gn(s), u = c ? Op : Gn(t);
|
|
9327
9327
|
d = d == Dp ? Zc : d, u = u == Dp ? Zc : u;
|
|
9328
9328
|
var p = d == Zc, f = u == Zc, S = d == u;
|
|
9329
9329
|
if (S && qn(s)) {
|
|
@@ -9430,8 +9430,8 @@ function oC(s, t, e, r, i, n, o) {
|
|
|
9430
9430
|
}
|
|
9431
9431
|
var p = n ? n(c, d, e + "", s, t, o) : void 0, f = p === void 0;
|
|
9432
9432
|
if (f) {
|
|
9433
|
-
var S =
|
|
9434
|
-
p = d, S || E || _ ?
|
|
9433
|
+
var S = si(d), E = !S && qn(d), _ = !S && !E && Hl(d);
|
|
9434
|
+
p = d, S || E || _ ? si(c) ? p = c : aC(c) ? p = Lm(c) : E ? (f = false, p = Nm(d, true)) : _ ? (f = false, p = Fm(d, true)) : p = [] : EP(d) || Id(d) ? (p = c, Id(c) ? p = nC(c) : (!Cs(c) || vh(c)) && (p = Hm(d))) : f = false;
|
|
9435
9435
|
}
|
|
9436
9436
|
f && (o.set(d, p), i(p, d, r, n, o), o.delete(d)), Ru(s, e, p);
|
|
9437
9437
|
}
|
|
@@ -9449,7 +9449,7 @@ var cC = "[object Map]", dC = "[object Set]", lC = Object.prototype, uC = lC.has
|
|
|
9449
9449
|
function hC(s) {
|
|
9450
9450
|
if (s == null)
|
|
9451
9451
|
return true;
|
|
9452
|
-
if (qc(s) && (
|
|
9452
|
+
if (qc(s) && (si(s) || typeof s == "string" || typeof s.splice == "function" || qn(s) || Hl(s) || Id(s)))
|
|
9453
9453
|
return !s.length;
|
|
9454
9454
|
var t = Gn(s);
|
|
9455
9455
|
if (t == cC || t == dC)
|
|
@@ -9467,7 +9467,7 @@ function pC(s, t) {
|
|
|
9467
9467
|
var gC = mP(function(s, t, e) {
|
|
9468
9468
|
tf(s, t, e);
|
|
9469
9469
|
});
|
|
9470
|
-
const
|
|
9470
|
+
const Pr = gC;
|
|
9471
9471
|
var bu = /* @__PURE__ */ ((s) => (s.PARTICIPANT = "PARTICIPANT", s.PEER = "PEER", s.CLIENT = "CLIENT", s))(bu || {});
|
|
9472
9472
|
const Z = {
|
|
9473
9473
|
PROPAGATE_KICK_ALL: "propagate_kick_across_rooms",
|
|
@@ -10232,14 +10232,14 @@ const xp = 1080, Up = 1920, IC = (s, t, e, r, i, n) => {
|
|
|
10232
10232
|
let f = d * p, S = u * p, E, _, P, k, A = 1;
|
|
10233
10233
|
return f < e && (A = e / f), Math.abs(A - 1) < 1e-14 && S < r && (A = r / S), f *= A, S *= A, P = d / (f / e), k = u / (S / r), E = (d - P) * o, _ = (u - k) * c, E < 0 && (E = 0), _ < 0 && (_ = 0), P > d && (P = d), k > u && (k = u), [E, _, P, k, s, t, e, r];
|
|
10234
10234
|
};
|
|
10235
|
-
var Kt, Si,
|
|
10235
|
+
var Kt, Si, rt, zt, be, ds, Ws, mt, Oe, Fa, Ha, Js, Ba;
|
|
10236
10236
|
const zh = class extends qt {
|
|
10237
10237
|
constructor(e, r, i, n) {
|
|
10238
10238
|
const o = e.getValue("logger");
|
|
10239
10239
|
super(o);
|
|
10240
10240
|
g(this, Kt, void 0);
|
|
10241
10241
|
g(this, Si, void 0);
|
|
10242
|
-
g(this,
|
|
10242
|
+
g(this, rt, void 0);
|
|
10243
10243
|
g(this, zt, void 0);
|
|
10244
10244
|
g(this, be, {
|
|
10245
10245
|
height: xp,
|
|
@@ -10288,7 +10288,7 @@ const zh = class extends qt {
|
|
|
10288
10288
|
a(this, mt) !== void 0 && this.paintCanvas(), a(this, Ws) !== void 0 && m(this, Ws, requestAnimationFrame(() => this.animate()));
|
|
10289
10289
|
});
|
|
10290
10290
|
h(this, "disable", (e2 = false) => {
|
|
10291
|
-
m(this, Js, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, Ws)), e2 !== true && document.body.removeChild(a(this,
|
|
10291
|
+
m(this, Js, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, Ws)), e2 !== true && document.body.removeChild(a(this, rt)), m(this, Ws, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
10292
10292
|
});
|
|
10293
10293
|
m(this, Si, e), m(this, Js, "idle"), m(this, Oe, r), m(this, ds, {
|
|
10294
10294
|
brand: r.config.designTokens.colors.brand[500],
|
|
@@ -10341,7 +10341,7 @@ const zh = class extends qt {
|
|
|
10341
10341
|
});
|
|
10342
10342
|
}
|
|
10343
10343
|
createVideoContainer() {
|
|
10344
|
-
m(this,
|
|
10344
|
+
m(this, rt, document.createElement("div")), a(this, rt).style.width = "0.1px", a(this, rt).style.height = "0.1px", a(this, rt).style.overflow = "hidden", a(this, rt).style.position = "absolute", a(this, rt).style.bottom = "0", a(this, rt).style.right = "0", a(this, rt).style.opacity = "0", a(this, rt).appendChild(a(this, zt));
|
|
10345
10345
|
}
|
|
10346
10346
|
setupEventListeners() {
|
|
10347
10347
|
a(this, Si).subscribe("stageStatus", this.handlePipMediaControls), a(this, Oe).addListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Oe).addListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Oe).addListener("roomLeft", () => this.disable());
|
|
@@ -10474,9 +10474,9 @@ const zh = class extends qt {
|
|
|
10474
10474
|
return document.pictureInPictureElement !== null;
|
|
10475
10475
|
}
|
|
10476
10476
|
cleanup() {
|
|
10477
|
-
if (m(this, Ba, false), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), a(this,
|
|
10477
|
+
if (m(this, Ba, false), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), a(this, rt))
|
|
10478
10478
|
try {
|
|
10479
|
-
document.body.removeChild(a(this,
|
|
10479
|
+
document.body.removeChild(a(this, rt));
|
|
10480
10480
|
} catch (e) {
|
|
10481
10481
|
}
|
|
10482
10482
|
this.removeAllSources(), m(this, Kt, void 0), m(this, zt, void 0), m(this, Ws, void 0);
|
|
@@ -10565,7 +10565,7 @@ const zh = class extends qt {
|
|
|
10565
10565
|
m(this, mt, {});
|
|
10566
10566
|
}
|
|
10567
10567
|
enable() {
|
|
10568
|
-
m(this, Js, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, Oe).videoEnabled), this.updateMediaSession("MIC", a(this, Oe).audioEnabled), document.body.appendChild(a(this,
|
|
10568
|
+
m(this, Js, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, Oe).videoEnabled), this.updateMediaSession("MIC", a(this, Oe).audioEnabled), document.body.appendChild(a(this, rt)), m(this, Ws, requestAnimationFrame(() => this.animate())), a(this, zt).onloadedmetadata = () => {
|
|
10569
10569
|
a(this, zt).requestPictureInPicture().then(() => {
|
|
10570
10570
|
m(this, Js, "active");
|
|
10571
10571
|
});
|
|
@@ -10575,7 +10575,7 @@ const zh = class extends qt {
|
|
|
10575
10575
|
}
|
|
10576
10576
|
};
|
|
10577
10577
|
let ku = zh;
|
|
10578
|
-
Kt = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(),
|
|
10578
|
+
Kt = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), Ws = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Fa = /* @__PURE__ */ new WeakMap(), Ha = /* @__PURE__ */ new WeakMap(), Js = /* @__PURE__ */ new WeakMap(), Ba = /* @__PURE__ */ new WeakMap();
|
|
10579
10579
|
var gr;
|
|
10580
10580
|
(function(s) {
|
|
10581
10581
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -13128,10 +13128,10 @@ var Nu;
|
|
|
13128
13128
|
(function(s) {
|
|
13129
13129
|
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";
|
|
13130
13130
|
})(Nu || (Nu = {}));
|
|
13131
|
-
var
|
|
13131
|
+
var Qr;
|
|
13132
13132
|
(function(s) {
|
|
13133
13133
|
s[s.NONE = 0] = "NONE", s[s.ALLOWED = 1] = "ALLOWED", s[s.NOT_ALLOWED = 2] = "NOT_ALLOWED", s[s.CAN_REQUEST = 3] = "CAN_REQUEST";
|
|
13134
|
-
})(
|
|
13134
|
+
})(Qr || (Qr = {}));
|
|
13135
13135
|
class ok extends MessageType {
|
|
13136
13136
|
constructor() {
|
|
13137
13137
|
super("socket.preset.PollsPermissionUpdate", [
|
|
@@ -13284,8 +13284,8 @@ const vk = new Sk();
|
|
|
13284
13284
|
class yk extends MessageType {
|
|
13285
13285
|
constructor() {
|
|
13286
13286
|
super("socket.preset.StreamPermission", [
|
|
13287
|
-
{ no: 1, name: "can_produce", kind: "enum", opt: true, T: () => ["socket.preset.StreamPermissionType",
|
|
13288
|
-
{ no: 2, name: "can_consume", kind: "enum", opt: true, T: () => ["socket.preset.StreamPermissionType",
|
|
13287
|
+
{ no: 1, name: "can_produce", kind: "enum", opt: true, T: () => ["socket.preset.StreamPermissionType", Qr, "STREAM_PERMISSION_TYPE_"] },
|
|
13288
|
+
{ no: 2, name: "can_consume", kind: "enum", opt: true, T: () => ["socket.preset.StreamPermissionType", Qr, "STREAM_PERMISSION_TYPE_"] }
|
|
13289
13289
|
]);
|
|
13290
13290
|
}
|
|
13291
13291
|
}
|
|
@@ -15240,12 +15240,12 @@ var WA = Object.defineProperty, JA = Object.getOwnPropertyDescriptor, Mh = (s, t
|
|
|
15240
15240
|
for (var i = r > 1 ? void 0 : r ? JA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15241
15241
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15242
15242
|
return r && i && WA(t, e, i), i;
|
|
15243
|
-
},
|
|
15243
|
+
}, br, qa, Pg;
|
|
15244
15244
|
const xu = (Pg = class {
|
|
15245
15245
|
constructor(s, t) {
|
|
15246
|
-
g(this,
|
|
15246
|
+
g(this, br, void 0);
|
|
15247
15247
|
g(this, qa, void 0);
|
|
15248
|
-
m(this,
|
|
15248
|
+
m(this, br, t), m(this, qa, s);
|
|
15249
15249
|
}
|
|
15250
15250
|
get telemetry() {
|
|
15251
15251
|
return a(this, qa).getValue("telemetry");
|
|
@@ -15263,7 +15263,7 @@ const xu = (Pg = class {
|
|
|
15263
15263
|
isDirectMessage: i
|
|
15264
15264
|
};
|
|
15265
15265
|
i && (n.visibility = "private");
|
|
15266
|
-
const o = yield a(this,
|
|
15266
|
+
const o = yield a(this, br).sendMessagePromise(
|
|
15267
15267
|
pi.createChatChannel,
|
|
15268
15268
|
gI.toBinary(n)
|
|
15269
15269
|
), c = Fs.fromBinary(
|
|
@@ -15274,7 +15274,7 @@ const xu = (Pg = class {
|
|
|
15274
15274
|
}
|
|
15275
15275
|
updateChannel(s, t) {
|
|
15276
15276
|
return l(this, null, function* () {
|
|
15277
|
-
const e = yield a(this,
|
|
15277
|
+
const e = yield a(this, br).sendMessagePromise(
|
|
15278
15278
|
pi.updateChatChannel,
|
|
15279
15279
|
fI.toBinary({
|
|
15280
15280
|
chatChannelId: s,
|
|
@@ -15303,7 +15303,7 @@ const xu = (Pg = class {
|
|
|
15303
15303
|
getChannelMembers(s) {
|
|
15304
15304
|
return l(this, null, function* () {
|
|
15305
15305
|
try {
|
|
15306
|
-
const t = yield a(this,
|
|
15306
|
+
const t = yield a(this, br).sendMessagePromise(
|
|
15307
15307
|
pi.getChannelMembers,
|
|
15308
15308
|
yI.toBinary({ chatChannelId: s })
|
|
15309
15309
|
);
|
|
@@ -15338,7 +15338,7 @@ const xu = (Pg = class {
|
|
|
15338
15338
|
);
|
|
15339
15339
|
return;
|
|
15340
15340
|
}
|
|
15341
|
-
a(this,
|
|
15341
|
+
a(this, br).on(s, ({ payload: i }) => {
|
|
15342
15342
|
let n = r;
|
|
15343
15343
|
try {
|
|
15344
15344
|
n = e(i);
|
|
@@ -15350,7 +15350,7 @@ const xu = (Pg = class {
|
|
|
15350
15350
|
return t(n);
|
|
15351
15351
|
});
|
|
15352
15352
|
}
|
|
15353
|
-
},
|
|
15353
|
+
}, br = /* @__PURE__ */ new WeakMap(), qa = /* @__PURE__ */ new WeakMap(), Pg);
|
|
15354
15354
|
let ga = xu;
|
|
15355
15355
|
Mh([
|
|
15356
15356
|
T.trace("ChatChannelHandler.createChannel")
|
|
@@ -15365,12 +15365,12 @@ var KA = Object.defineProperty, zA = Object.getOwnPropertyDescriptor, bs = (s, t
|
|
|
15365
15365
|
for (var i = r > 1 ? void 0 : r ? zA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15366
15366
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15367
15367
|
return r && i && KA(t, e, i), i;
|
|
15368
|
-
}, _t = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(_t || {}),
|
|
15368
|
+
}, _t = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(_t || {}), it, ja;
|
|
15369
15369
|
class as {
|
|
15370
15370
|
constructor(t, e) {
|
|
15371
|
-
g(this,
|
|
15371
|
+
g(this, it, void 0);
|
|
15372
15372
|
g(this, ja, void 0);
|
|
15373
|
-
m(this,
|
|
15373
|
+
m(this, it, e), m(this, ja, t);
|
|
15374
15374
|
}
|
|
15375
15375
|
get telemetry() {
|
|
15376
15376
|
return a(this, ja).getValue("telemetry");
|
|
@@ -15379,7 +15379,7 @@ class as {
|
|
|
15379
15379
|
return a(this, ja).getValue("logger");
|
|
15380
15380
|
}
|
|
15381
15381
|
getChatMessages() {
|
|
15382
|
-
return a(this,
|
|
15382
|
+
return a(this, it).sendMessagePromise(we.getMessages);
|
|
15383
15383
|
}
|
|
15384
15384
|
getChatMessagesPaginated(t, e, r, i = 0, n = "") {
|
|
15385
15385
|
return l(this, null, function* () {
|
|
@@ -15389,7 +15389,7 @@ class as {
|
|
|
15389
15389
|
from: i,
|
|
15390
15390
|
reversed: r,
|
|
15391
15391
|
channelId: n
|
|
15392
|
-
}, c = yield a(this,
|
|
15392
|
+
}, c = yield a(this, it).sendMessagePromise(
|
|
15393
15393
|
we.getPaginatedMessages,
|
|
15394
15394
|
$k.toBinary(o)
|
|
15395
15395
|
);
|
|
@@ -15406,7 +15406,7 @@ class as {
|
|
|
15406
15406
|
payloadType: e,
|
|
15407
15407
|
payload: t
|
|
15408
15408
|
};
|
|
15409
|
-
a(this,
|
|
15409
|
+
a(this, it).sendMessage(
|
|
15410
15410
|
we.sendMessageToRoom,
|
|
15411
15411
|
jk.toBinary(r)
|
|
15412
15412
|
);
|
|
@@ -15417,7 +15417,7 @@ class as {
|
|
|
15417
15417
|
peerIds: r,
|
|
15418
15418
|
payload: t
|
|
15419
15419
|
};
|
|
15420
|
-
a(this,
|
|
15420
|
+
a(this, it).sendMessage(
|
|
15421
15421
|
we.sendMessageToPeers,
|
|
15422
15422
|
Jk.toBinary(i)
|
|
15423
15423
|
);
|
|
@@ -15428,7 +15428,7 @@ class as {
|
|
|
15428
15428
|
channelId: r,
|
|
15429
15429
|
payload: t
|
|
15430
15430
|
};
|
|
15431
|
-
a(this,
|
|
15431
|
+
a(this, it).sendMessage(
|
|
15432
15432
|
we.sendMessageToChannel,
|
|
15433
15433
|
Yk.toBinary(i)
|
|
15434
15434
|
);
|
|
@@ -15448,7 +15448,7 @@ class as {
|
|
|
15448
15448
|
payload: e
|
|
15449
15449
|
};
|
|
15450
15450
|
i && (o.channelId = i), n !== void 0 && (o.pinned = n);
|
|
15451
|
-
const c = yield a(this,
|
|
15451
|
+
const c = yield a(this, it).sendMessagePromise(
|
|
15452
15452
|
we.editMessage,
|
|
15453
15453
|
Zk.toBinary(o)
|
|
15454
15454
|
);
|
|
@@ -15461,7 +15461,7 @@ class as {
|
|
|
15461
15461
|
chatId: t
|
|
15462
15462
|
};
|
|
15463
15463
|
e && (r.channelId = e);
|
|
15464
|
-
const i = yield a(this,
|
|
15464
|
+
const i = yield a(this, it).sendMessagePromise(
|
|
15465
15465
|
we.deleteMessage,
|
|
15466
15466
|
aI.toBinary(r)
|
|
15467
15467
|
), n = ad.fromBinary(i.payload);
|
|
@@ -15482,7 +15482,7 @@ class as {
|
|
|
15482
15482
|
};
|
|
15483
15483
|
e.channelId && (r.channelId = e.channelId);
|
|
15484
15484
|
try {
|
|
15485
|
-
const c = yield a(this,
|
|
15485
|
+
const c = yield a(this, it).sendMessagePromise(
|
|
15486
15486
|
we.searchChannelMessages,
|
|
15487
15487
|
cI.toBinary(r)
|
|
15488
15488
|
);
|
|
@@ -15495,7 +15495,7 @@ class as {
|
|
|
15495
15495
|
getAllChannels() {
|
|
15496
15496
|
return l(this, null, function* () {
|
|
15497
15497
|
try {
|
|
15498
|
-
const t = yield a(this,
|
|
15498
|
+
const t = yield a(this, it).sendMessagePromise(
|
|
15499
15499
|
we.getAllChatChannels
|
|
15500
15500
|
);
|
|
15501
15501
|
return Fs.fromBinary(t.payload).chatChannels.map(ga.formatChannel);
|
|
@@ -15506,7 +15506,7 @@ class as {
|
|
|
15506
15506
|
}
|
|
15507
15507
|
markLastReadMessage(t, e) {
|
|
15508
15508
|
return l(this, null, function* () {
|
|
15509
|
-
const r = yield a(this,
|
|
15509
|
+
const r = yield a(this, it).sendMessagePromise(
|
|
15510
15510
|
we.markChannelIndexAsRead,
|
|
15511
15511
|
lI.toBinary({
|
|
15512
15512
|
channelId: t,
|
|
@@ -15523,7 +15523,7 @@ class as {
|
|
|
15523
15523
|
chatId: t.id,
|
|
15524
15524
|
pinned: e,
|
|
15525
15525
|
channelId: t.channelId
|
|
15526
|
-
}, i = yield a(this,
|
|
15526
|
+
}, i = yield a(this, it).sendMessagePromise(
|
|
15527
15527
|
we.pinMessage,
|
|
15528
15528
|
tI.toBinary(r)
|
|
15529
15529
|
);
|
|
@@ -15568,7 +15568,7 @@ class as {
|
|
|
15568
15568
|
this.logger.warn(`ChatSocketHandler::Event ${t} is not recognized`);
|
|
15569
15569
|
return;
|
|
15570
15570
|
}
|
|
15571
|
-
a(this,
|
|
15571
|
+
a(this, it).on(t, ({ payload: n }) => {
|
|
15572
15572
|
let o = i;
|
|
15573
15573
|
try {
|
|
15574
15574
|
o = r(n);
|
|
@@ -15581,7 +15581,7 @@ class as {
|
|
|
15581
15581
|
});
|
|
15582
15582
|
}
|
|
15583
15583
|
}
|
|
15584
|
-
|
|
15584
|
+
it = /* @__PURE__ */ new WeakMap(), ja = /* @__PURE__ */ new WeakMap();
|
|
15585
15585
|
bs([
|
|
15586
15586
|
T.trace("SocketService.getChatMessages")
|
|
15587
15587
|
], as.prototype, "getChatMessages", 1);
|
|
@@ -16159,7 +16159,7 @@ var nM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, pt = (s, t
|
|
|
16159
16159
|
};
|
|
16160
16160
|
const cM = ["text", "image", "file", "custom", "poll"], gd = { maxInvocations: 180, period: 60 };
|
|
16161
16161
|
var ee, vi, Fe, yi, Ti, Bd, _f, Ho, $u, Cg;
|
|
16162
|
-
let
|
|
16162
|
+
let Qe = (Cg = class extends qt {
|
|
16163
16163
|
constructor(t, e, r, i, n) {
|
|
16164
16164
|
const o = t.getValue("logger");
|
|
16165
16165
|
super(o);
|
|
@@ -16634,68 +16634,68 @@ let Ye = (Cg = class extends qt {
|
|
|
16634
16634
|
pt([
|
|
16635
16635
|
T.trace("DyteChat.sendTextMessage"),
|
|
16636
16636
|
Dt(gd)
|
|
16637
|
-
],
|
|
16637
|
+
], Qe.prototype, "sendTextMessage", 1);
|
|
16638
16638
|
pt([
|
|
16639
16639
|
T.trace("DyteChat.sendImageMessage"),
|
|
16640
16640
|
Dt({ maxInvocations: 20, period: 60 })
|
|
16641
|
-
],
|
|
16641
|
+
], Qe.prototype, "sendImageMessage", 1);
|
|
16642
16642
|
pt([
|
|
16643
16643
|
T.trace("DyteChat.sendFileMessage"),
|
|
16644
16644
|
Dt({ maxInvocations: 20, period: 60 })
|
|
16645
|
-
],
|
|
16645
|
+
], Qe.prototype, "sendFileMessage", 1);
|
|
16646
16646
|
pt([
|
|
16647
16647
|
T.trace("DyteChat.sendMessage"),
|
|
16648
16648
|
Dt({ maxInvocations: 180, period: 60 })
|
|
16649
|
-
],
|
|
16649
|
+
], Qe.prototype, "sendMessage", 1);
|
|
16650
16650
|
pt([
|
|
16651
16651
|
T.trace("DyteChat.editTextMessage")
|
|
16652
|
-
],
|
|
16652
|
+
], Qe.prototype, "editTextMessage", 1);
|
|
16653
16653
|
pt([
|
|
16654
16654
|
T.trace("DyteChat.editImageMessage")
|
|
16655
|
-
],
|
|
16655
|
+
], Qe.prototype, "editImageMessage", 1);
|
|
16656
16656
|
pt([
|
|
16657
16657
|
T.trace("DyteChat.editFileMessage")
|
|
16658
|
-
],
|
|
16658
|
+
], Qe.prototype, "editFileMessage", 1);
|
|
16659
16659
|
pt([
|
|
16660
16660
|
T.trace("DyteChat.editMessage")
|
|
16661
|
-
],
|
|
16661
|
+
], Qe.prototype, "editMessage", 1);
|
|
16662
16662
|
pt([
|
|
16663
16663
|
T.trace("DyteChat.deleteMessage")
|
|
16664
|
-
],
|
|
16664
|
+
], Qe.prototype, "deleteMessage", 1);
|
|
16665
16665
|
pt([
|
|
16666
16666
|
T.trace("DyteChat.createChannel")
|
|
16667
|
-
],
|
|
16667
|
+
], Qe.prototype, "createChannel", 1);
|
|
16668
16668
|
pt([
|
|
16669
16669
|
T.trace("DyteChat.updateChannel")
|
|
16670
|
-
],
|
|
16670
|
+
], Qe.prototype, "updateChannel", 1);
|
|
16671
16671
|
pt([
|
|
16672
16672
|
T.trace("DyteChat.sendMessageToChannel")
|
|
16673
|
-
],
|
|
16673
|
+
], Qe.prototype, "sendMessageToChannel", 1);
|
|
16674
16674
|
pt([
|
|
16675
16675
|
T.trace("DyteChat.getChannelMembers")
|
|
16676
|
-
],
|
|
16676
|
+
], Qe.prototype, "getChannelMembers", 1);
|
|
16677
16677
|
pt([
|
|
16678
16678
|
T.trace("DyteChat.searchMessages")
|
|
16679
|
-
],
|
|
16679
|
+
], Qe.prototype, "searchMessages", 1);
|
|
16680
16680
|
pt([
|
|
16681
16681
|
T.trace("DyteChat.markLastReadMessage")
|
|
16682
|
-
],
|
|
16683
|
-
|
|
16682
|
+
], Qe.prototype, "markLastReadMessage", 1);
|
|
16683
|
+
Qe = pt([
|
|
16684
16684
|
ht("0500")
|
|
16685
|
-
],
|
|
16685
|
+
], Qe);
|
|
16686
16686
|
var dM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, uM = (s, t, e, r) => {
|
|
16687
16687
|
for (var i = r > 1 ? void 0 : r ? lM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16688
16688
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16689
16689
|
return r && i && dM(t, e, i), i;
|
|
16690
|
-
},
|
|
16690
|
+
}, kr, Rg;
|
|
16691
16691
|
const ci = (Rg = class {
|
|
16692
16692
|
constructor(s, t, e, r, i) {
|
|
16693
16693
|
h(this, "chat");
|
|
16694
16694
|
h(this, "chatSocketHandler");
|
|
16695
16695
|
h(this, "chatChannelSocketHandler");
|
|
16696
16696
|
h(this, "self");
|
|
16697
|
-
g(this,
|
|
16698
|
-
m(this,
|
|
16697
|
+
g(this, kr, void 0);
|
|
16698
|
+
m(this, kr, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new Qe(
|
|
16699
16699
|
s,
|
|
16700
16700
|
t,
|
|
16701
16701
|
e,
|
|
@@ -16704,10 +16704,10 @@ const ci = (Rg = class {
|
|
|
16704
16704
|
), this.self = r, this.setupEvents();
|
|
16705
16705
|
}
|
|
16706
16706
|
get telemetry() {
|
|
16707
|
-
return a(this,
|
|
16707
|
+
return a(this, kr).getValue("telemetry");
|
|
16708
16708
|
}
|
|
16709
16709
|
get logger() {
|
|
16710
|
-
return a(this,
|
|
16710
|
+
return a(this, kr).getValue("logger");
|
|
16711
16711
|
}
|
|
16712
16712
|
static init(s, t, e, r, i) {
|
|
16713
16713
|
return l(this, null, function* () {
|
|
@@ -16778,7 +16778,7 @@ const ci = (Rg = class {
|
|
|
16778
16778
|
}
|
|
16779
16779
|
getChatMessages() {
|
|
16780
16780
|
return l(this, null, function* () {
|
|
16781
|
-
if (this.self.config.viewType === "LIVESTREAM" || this.self.config.viewType === "CHAT" || a(this,
|
|
16781
|
+
if (this.self.config.viewType === "LIVESTREAM" || this.self.config.viewType === "CHAT" || a(this, kr).getValue("flagsmith").hasFeature(Z.FEAT_PAGINATED_CHAT))
|
|
16782
16782
|
return;
|
|
16783
16783
|
const s = yield this.chatSocketHandler.getChatMessages();
|
|
16784
16784
|
if (!(s != null && s.payload))
|
|
@@ -16792,7 +16792,7 @@ const ci = (Rg = class {
|
|
|
16792
16792
|
});
|
|
16793
16793
|
}
|
|
16794
16794
|
setupEvents() {
|
|
16795
|
-
a(this,
|
|
16795
|
+
a(this, kr).getValue("peerSessionStore").on(
|
|
16796
16796
|
b.SOCKET_SERVICE_ROOM_JOINED,
|
|
16797
16797
|
() => l(this, null, function* () {
|
|
16798
16798
|
this.getChatMessages();
|
|
@@ -16896,7 +16896,7 @@ const ci = (Rg = class {
|
|
|
16896
16896
|
}
|
|
16897
16897
|
);
|
|
16898
16898
|
}
|
|
16899
|
-
},
|
|
16899
|
+
}, kr = /* @__PURE__ */ new WeakMap(), Rg);
|
|
16900
16900
|
let _s = ci;
|
|
16901
16901
|
uM([
|
|
16902
16902
|
T.trace("ChatController.setupEvents")
|
|
@@ -16971,20 +16971,20 @@ var mM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, SM = (s, t
|
|
|
16971
16971
|
for (var i = r > 1 ? void 0 : r ? fM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16972
16972
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16973
16973
|
return r && i && mM(t, e, i), i;
|
|
16974
|
-
},
|
|
16974
|
+
}, Ir, Ja, Ei, bg;
|
|
16975
16975
|
const wa = (bg = class {
|
|
16976
16976
|
constructor(s, t, e) {
|
|
16977
16977
|
h(this, "polls");
|
|
16978
|
-
g(this,
|
|
16978
|
+
g(this, Ir, void 0);
|
|
16979
16979
|
g(this, Ja, void 0);
|
|
16980
16980
|
g(this, Ei, void 0);
|
|
16981
|
-
this.polls = new Fu(s, t, e), m(this, Ja, t), m(this,
|
|
16981
|
+
this.polls = new Fu(s, t, e), m(this, Ja, t), m(this, Ir, s), m(this, Ei, e), this.setupEvents();
|
|
16982
16982
|
}
|
|
16983
16983
|
get telemetry() {
|
|
16984
|
-
return a(this,
|
|
16984
|
+
return a(this, Ir).getValue("telemetry");
|
|
16985
16985
|
}
|
|
16986
16986
|
get logger() {
|
|
16987
|
-
return a(this,
|
|
16987
|
+
return a(this, Ir).getValue("logger");
|
|
16988
16988
|
}
|
|
16989
16989
|
static init(s, t, e) {
|
|
16990
16990
|
return l(this, null, function* () {
|
|
@@ -17006,13 +17006,13 @@ const wa = (bg = class {
|
|
|
17006
17006
|
r.poll && this.updatePoll(wa.formatSocketServicePoll(r.poll));
|
|
17007
17007
|
}
|
|
17008
17008
|
}, t = () => {
|
|
17009
|
-
a(this,
|
|
17009
|
+
a(this, Ir).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
17010
17010
|
this.getPolls();
|
|
17011
17011
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
17012
17012
|
a(this, Ei).on(r, s[r]);
|
|
17013
17013
|
});
|
|
17014
17014
|
}, e = () => {
|
|
17015
|
-
a(this,
|
|
17015
|
+
a(this, Ir).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
17016
17016
|
this.getPolls();
|
|
17017
17017
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
17018
17018
|
a(this, Ei).removeListeners(r);
|
|
@@ -17068,7 +17068,7 @@ const wa = (bg = class {
|
|
|
17068
17068
|
voted: s.votes
|
|
17069
17069
|
};
|
|
17070
17070
|
}
|
|
17071
|
-
},
|
|
17071
|
+
}, Ir = /* @__PURE__ */ new WeakMap(), Ja = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), bg);
|
|
17072
17072
|
let Rf = wa;
|
|
17073
17073
|
SM([
|
|
17074
17074
|
T.trace("PollController.setupEvents")
|
|
@@ -17145,7 +17145,7 @@ var _M = Object.defineProperty, PM = Object.getOwnPropertyDescriptor, bf = (s, t
|
|
|
17145
17145
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17146
17146
|
return r && i && _M(t, e, i), i;
|
|
17147
17147
|
}, Go, Ig;
|
|
17148
|
-
let
|
|
17148
|
+
let ei = (Ig = class extends qt {
|
|
17149
17149
|
constructor(t) {
|
|
17150
17150
|
const e = t.getValue("logger");
|
|
17151
17151
|
super(e);
|
|
@@ -17158,7 +17158,7 @@ let Zr = (Ig = class extends qt {
|
|
|
17158
17158
|
}
|
|
17159
17159
|
static init(t, e) {
|
|
17160
17160
|
return l(this, null, function* () {
|
|
17161
|
-
const r = new
|
|
17161
|
+
const r = new ei(t), i = t.getValue("logger");
|
|
17162
17162
|
try {
|
|
17163
17163
|
e && r.getActiveTranscript();
|
|
17164
17164
|
} catch (n) {
|
|
@@ -17191,13 +17191,13 @@ let Zr = (Ig = class extends qt {
|
|
|
17191
17191
|
}
|
|
17192
17192
|
static parseTranscripts(t) {
|
|
17193
17193
|
return t ? t.split(`
|
|
17194
|
-
`).map((e) =>
|
|
17194
|
+
`).map((e) => ei.parseTranscript(e, false)).filter(Boolean) : [];
|
|
17195
17195
|
}
|
|
17196
17196
|
getActiveTranscript() {
|
|
17197
17197
|
return l(this, null, function* () {
|
|
17198
17198
|
try {
|
|
17199
17199
|
const t = lt(), { transcript: e } = yield t.getActiveTranscript();
|
|
17200
|
-
this.transcripts =
|
|
17200
|
+
this.transcripts = ei.parseTranscripts(e);
|
|
17201
17201
|
} catch (t) {
|
|
17202
17202
|
}
|
|
17203
17203
|
});
|
|
@@ -17217,20 +17217,20 @@ let Zr = (Ig = class extends qt {
|
|
|
17217
17217
|
}, Go = /* @__PURE__ */ new WeakMap(), Ig);
|
|
17218
17218
|
bf([
|
|
17219
17219
|
T.trace("DyteAi.getActiveTranscript")
|
|
17220
|
-
],
|
|
17221
|
-
|
|
17220
|
+
], ei.prototype, "getActiveTranscript", 1);
|
|
17221
|
+
ei = bf([
|
|
17222
17222
|
ht("0000")
|
|
17223
|
-
],
|
|
17223
|
+
], ei);
|
|
17224
17224
|
var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, wM = (s, t, e, r) => {
|
|
17225
17225
|
for (var i = r > 1 ? void 0 : r ? RM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17226
17226
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17227
17227
|
return r && i && CM(t, e, i), i;
|
|
17228
|
-
},
|
|
17228
|
+
}, Ar, za, xt, Ag;
|
|
17229
17229
|
const kf = (Ag = class {
|
|
17230
17230
|
constructor(s, t, e, r, i, n) {
|
|
17231
17231
|
h(this, "meta");
|
|
17232
17232
|
h(this, "ai");
|
|
17233
|
-
g(this,
|
|
17233
|
+
g(this, Ar, void 0);
|
|
17234
17234
|
g(this, za, void 0);
|
|
17235
17235
|
h(this, "aiSocketHandler");
|
|
17236
17236
|
g(this, xt, void 0);
|
|
@@ -17240,7 +17240,7 @@ const kf = (Ag = class {
|
|
|
17240
17240
|
t.config.viewType,
|
|
17241
17241
|
e,
|
|
17242
17242
|
n
|
|
17243
|
-
), this.ai = r, m(this,
|
|
17243
|
+
), this.ai = r, m(this, Ar, t), m(this, za, e), this.aiSocketHandler = i, t.config.viewType !== Mt.Chat && this.setupEvents();
|
|
17244
17244
|
}
|
|
17245
17245
|
get telemetry() {
|
|
17246
17246
|
return a(this, xt).getValue("telemetry");
|
|
@@ -17250,7 +17250,7 @@ const kf = (Ag = class {
|
|
|
17250
17250
|
}
|
|
17251
17251
|
static init(s, t, e, r, i) {
|
|
17252
17252
|
return l(this, null, function* () {
|
|
17253
|
-
const n = yield
|
|
17253
|
+
const n = yield ei.init(s, t.permissions.transcriptionEnabled);
|
|
17254
17254
|
return new kf(
|
|
17255
17255
|
s,
|
|
17256
17256
|
t,
|
|
@@ -17295,14 +17295,14 @@ const kf = (Ag = class {
|
|
|
17295
17295
|
({ score: s }) => {
|
|
17296
17296
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
17297
17297
|
}
|
|
17298
|
-
), a(this,
|
|
17299
|
-
userId: a(this,
|
|
17298
|
+
), a(this, Ar).permissions.canSpotlight && (this.logger.info("DyteMetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this, za).broadcastMessage("spotlight", {
|
|
17299
|
+
userId: a(this, Ar).userId,
|
|
17300
17300
|
currentTab: this.meta.selfActiveTab
|
|
17301
17301
|
})), a(this, xt).getValue("peerSessionStore").on(
|
|
17302
17302
|
b.PEER_JOINED_INTERNAL,
|
|
17303
17303
|
(s) => l(this, null, function* () {
|
|
17304
|
-
a(this,
|
|
17305
|
-
userId: a(this,
|
|
17304
|
+
a(this, Ar).permissions.canSpotlight && this.meta.selfActiveTab && a(this, za).broadcastToPeers("spotlight", [s.id], {
|
|
17305
|
+
userId: a(this, Ar).userId,
|
|
17306
17306
|
currentTab: this.meta.selfActiveTab
|
|
17307
17307
|
});
|
|
17308
17308
|
})
|
|
@@ -17364,7 +17364,7 @@ const kf = (Ag = class {
|
|
|
17364
17364
|
} = s;
|
|
17365
17365
|
let i;
|
|
17366
17366
|
try {
|
|
17367
|
-
i =
|
|
17367
|
+
i = ei.parseTranscript(e, r);
|
|
17368
17368
|
} catch (d) {
|
|
17369
17369
|
this.logger.error(`Failed to parse transcript: ${e}`, d);
|
|
17370
17370
|
}
|
|
@@ -17377,17 +17377,56 @@ const kf = (Ag = class {
|
|
|
17377
17377
|
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
17378
17378
|
});
|
|
17379
17379
|
}
|
|
17380
|
-
},
|
|
17380
|
+
}, Ar = /* @__PURE__ */ new WeakMap(), za = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Ag);
|
|
17381
17381
|
let If = kf;
|
|
17382
17382
|
wM([
|
|
17383
17383
|
T.trace("MetaController.setupEvents")
|
|
17384
17384
|
], If.prototype, "setupEvents", 1);
|
|
17385
|
+
const vo = {}, Sr = {
|
|
17386
|
+
executeWithLock({
|
|
17387
|
+
methodName: s,
|
|
17388
|
+
lockName: t,
|
|
17389
|
+
timeout: e
|
|
17390
|
+
}) {
|
|
17391
|
+
return (r, i, n) => {
|
|
17392
|
+
const o = n.value;
|
|
17393
|
+
return n.value = function(...d) {
|
|
17394
|
+
var _, P;
|
|
17395
|
+
const u = (P = (this == null ? void 0 : this.peerId) || ((_ = d[0]) == null ? void 0 : _.authToken)) != null ? P : "", p = `${t}-${u}`, f = this == null ? void 0 : this.logger;
|
|
17396
|
+
if (vo[p]) {
|
|
17397
|
+
const k = new Error(
|
|
17398
|
+
`Unsupported concurrent calls on Dyte method: ${s}.`
|
|
17399
|
+
);
|
|
17400
|
+
throw k.name = "UnsupportedConcurrentMethodExecution", f == null || f.error("DyteLocker::UnsupportedConcurrentMethodExecution", {
|
|
17401
|
+
error: {
|
|
17402
|
+
stack: k.stack
|
|
17403
|
+
},
|
|
17404
|
+
dyteLocker: {
|
|
17405
|
+
methodName: s,
|
|
17406
|
+
lockName: p
|
|
17407
|
+
}
|
|
17408
|
+
}), k;
|
|
17409
|
+
}
|
|
17410
|
+
vo[p] = true;
|
|
17411
|
+
const S = setTimeout(
|
|
17412
|
+
() => delete vo[p],
|
|
17413
|
+
e
|
|
17414
|
+
), E = o.apply(this, d);
|
|
17415
|
+
return Promise.resolve(E).then(() => {
|
|
17416
|
+
delete vo[p], clearTimeout(S);
|
|
17417
|
+
}).catch(() => {
|
|
17418
|
+
delete vo[p], clearTimeout(S);
|
|
17419
|
+
}), E;
|
|
17420
|
+
}, n;
|
|
17421
|
+
};
|
|
17422
|
+
}
|
|
17423
|
+
};
|
|
17385
17424
|
var bM = Object.defineProperty, kM = Object.getOwnPropertyDescriptor, Ea = (s, t, e, r) => {
|
|
17386
17425
|
for (var i = r > 1 ? void 0 : r ? kM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17387
17426
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17388
17427
|
return r && i && bM(t, e, i), i;
|
|
17389
|
-
}, Yt, Gd, ae, Wo, As,
|
|
17390
|
-
class
|
|
17428
|
+
}, Yt, Gd, ae, Wo, As, Ke, Jo, qu, Ya, md;
|
|
17429
|
+
class ii extends qt {
|
|
17391
17430
|
constructor(e, r, i, n, o) {
|
|
17392
17431
|
const c = e.getValue("logger");
|
|
17393
17432
|
super(c);
|
|
@@ -17398,14 +17437,14 @@ class ri extends qt {
|
|
|
17398
17437
|
g(this, ae, void 0);
|
|
17399
17438
|
g(this, Wo, void 0);
|
|
17400
17439
|
g(this, As, void 0);
|
|
17401
|
-
g(this,
|
|
17402
|
-
m(this,
|
|
17440
|
+
g(this, Ke, void 0);
|
|
17441
|
+
m(this, Ke, e), m(this, Yt, n), m(this, Gd, o), m(this, ae, r), m(this, Wo, i), m(this, As, []), this.setupEvents();
|
|
17403
17442
|
}
|
|
17404
17443
|
get telemetry() {
|
|
17405
|
-
return a(this,
|
|
17444
|
+
return a(this, Ke).getValue("telemetry");
|
|
17406
17445
|
}
|
|
17407
17446
|
get status() {
|
|
17408
|
-
return a(this,
|
|
17447
|
+
return a(this, Ke).getValue("stageStatus");
|
|
17409
17448
|
}
|
|
17410
17449
|
setupEvents() {
|
|
17411
17450
|
const e = {
|
|
@@ -17418,14 +17457,14 @@ class ri extends qt {
|
|
|
17418
17457
|
})
|
|
17419
17458
|
}, r = () => {
|
|
17420
17459
|
Object.entries(e).forEach(([n, o]) => {
|
|
17421
|
-
a(this,
|
|
17460
|
+
a(this, Ke).getValue("peerSessionStore").onAsync(
|
|
17422
17461
|
n,
|
|
17423
17462
|
o
|
|
17424
17463
|
);
|
|
17425
17464
|
});
|
|
17426
17465
|
}, i = () => {
|
|
17427
17466
|
Object.entries(e).forEach(([n, o]) => {
|
|
17428
|
-
a(this,
|
|
17467
|
+
a(this, Ke).getValue("peerSessionStore").removeListener(
|
|
17429
17468
|
n,
|
|
17430
17469
|
o
|
|
17431
17470
|
);
|
|
@@ -17496,18 +17535,21 @@ class ri extends qt {
|
|
|
17496
17535
|
throw this.logger.error("DyteStage::deny_access::permission_denied"), new R("You do not have permission to perform this action", "2001");
|
|
17497
17536
|
return a(this, Yt).denyAccess(e);
|
|
17498
17537
|
}
|
|
17538
|
+
get peerId() {
|
|
17539
|
+
return a(this, Ke).getValue("peerId");
|
|
17540
|
+
}
|
|
17499
17541
|
join() {
|
|
17500
17542
|
return l(this, null, function* () {
|
|
17501
|
-
const e = a(this,
|
|
17543
|
+
const e = a(this, Ke).getValue("viewType");
|
|
17502
17544
|
if (this.status === "ON_STAGE")
|
|
17503
17545
|
throw new R("You are already on stage.", "2006");
|
|
17504
17546
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || a(this, ae).permissions.stageAccess === j.NotAllowed)
|
|
17505
17547
|
throw new R(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
17506
|
-
if (yield a(this, Yt).joinStage(), e === Mt.Livestream) {
|
|
17507
|
-
yield a(this,
|
|
17548
|
+
if (a(this, Ke).setValue("stageStatus", "ON_STAGE", false), yield a(this, Yt).joinStage(), e === Mt.Livestream) {
|
|
17549
|
+
yield a(this, Ke).getValue("selfController").joinRoom();
|
|
17508
17550
|
return;
|
|
17509
17551
|
}
|
|
17510
|
-
a(this,
|
|
17552
|
+
a(this, Ke).notify("stageStatus"), a(this, ae).audioEnabled && a(this, Jo, qu).shareMic(a(this, ae).audioTrack), a(this, ae).videoEnabled && a(this, Jo, qu).shareWebcam(a(this, ae).videoTrack);
|
|
17511
17553
|
});
|
|
17512
17554
|
}
|
|
17513
17555
|
leave() {
|
|
@@ -17516,13 +17558,13 @@ class ri extends qt {
|
|
|
17516
17558
|
throw this.logger.error("DyteStage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
17517
17559
|
if (!(this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE"))
|
|
17518
17560
|
throw new R(`Unable to leave stage you are currently ${this.status}`, "2006");
|
|
17519
|
-
a(this, ae).setIsPinned(false), a(this,
|
|
17561
|
+
a(this, ae).setIsPinned(false), a(this, Ke).setValue("stageStatus", "OFF_STAGE", false), yield a(this, Yt).leaveStage(a(this, ae).userId);
|
|
17520
17562
|
try {
|
|
17521
|
-
yield a(this,
|
|
17563
|
+
yield a(this, Ke).getValue("peerSessionStore").emitAsync(b.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
17522
17564
|
} catch (e) {
|
|
17523
17565
|
this.logger.error("DyteStage::leave::emitAsync::failed", { error: e });
|
|
17524
17566
|
}
|
|
17525
|
-
a(this,
|
|
17567
|
+
a(this, Ke).notify("stageStatus");
|
|
17526
17568
|
});
|
|
17527
17569
|
}
|
|
17528
17570
|
kick(e) {
|
|
@@ -17540,34 +17582,39 @@ class ri extends qt {
|
|
|
17540
17582
|
});
|
|
17541
17583
|
}
|
|
17542
17584
|
}
|
|
17543
|
-
Yt = /* @__PURE__ */ new WeakMap(), Gd = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(),
|
|
17544
|
-
return a(this,
|
|
17585
|
+
Yt = /* @__PURE__ */ new WeakMap(), Gd = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Jo = /* @__PURE__ */ new WeakSet(), qu = function() {
|
|
17586
|
+
return a(this, Ke).getValue("roomNodeClient");
|
|
17545
17587
|
}, Ya = /* @__PURE__ */ new WeakSet(), md = function(e) {
|
|
17546
17588
|
return l(this, null, function* () {
|
|
17547
|
-
this.status !== e && a(this,
|
|
17589
|
+
this.status !== e && a(this, Ke).setValue("stageStatus", e);
|
|
17548
17590
|
});
|
|
17549
17591
|
};
|
|
17550
17592
|
Ea([
|
|
17551
17593
|
T.trace("DyteStage.getStageRequests")
|
|
17552
|
-
],
|
|
17594
|
+
], ii.prototype, "getAccessRequests", 1);
|
|
17553
17595
|
Ea([
|
|
17554
17596
|
T.trace("DyteStage.requestAccess")
|
|
17555
|
-
],
|
|
17597
|
+
], ii.prototype, "requestAccess", 1);
|
|
17556
17598
|
Ea([
|
|
17557
17599
|
T.trace("DyteStage.cancelRequestAccess")
|
|
17558
|
-
],
|
|
17600
|
+
], ii.prototype, "cancelRequestAccess", 1);
|
|
17559
17601
|
Ea([
|
|
17560
17602
|
T.trace("DyteStage.grantAccess")
|
|
17561
|
-
],
|
|
17603
|
+
], ii.prototype, "grantAccess", 1);
|
|
17562
17604
|
Ea([
|
|
17563
17605
|
T.trace("DyteStage.denyAccess")
|
|
17564
|
-
],
|
|
17606
|
+
], ii.prototype, "denyAccess", 1);
|
|
17565
17607
|
Ea([
|
|
17608
|
+
Sr.executeWithLock({
|
|
17609
|
+
methodName: "joinStage",
|
|
17610
|
+
lockName: "DyteStage.join",
|
|
17611
|
+
timeout: 5e3
|
|
17612
|
+
}),
|
|
17566
17613
|
T.trace("DyteStage.joinStage")
|
|
17567
|
-
],
|
|
17614
|
+
], ii.prototype, "join", 1);
|
|
17568
17615
|
Ea([
|
|
17569
17616
|
T.trace("DyteStage.leaveStage")
|
|
17570
|
-
],
|
|
17617
|
+
], ii.prototype, "leave", 1);
|
|
17571
17618
|
function IM(s) {
|
|
17572
17619
|
return !(s.viewType === "LIVESTREAM" || s.viewType === "CHAT");
|
|
17573
17620
|
}
|
|
@@ -17591,22 +17638,22 @@ var AM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, DM = (s, t
|
|
|
17591
17638
|
for (var i = r > 1 ? void 0 : r ? MM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17592
17639
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17593
17640
|
return r && i && AM(t, e, i), i;
|
|
17594
|
-
},
|
|
17641
|
+
}, Mr, Pi, Dr, Ko, ft;
|
|
17595
17642
|
class Af {
|
|
17596
17643
|
constructor(t, e, r, i, n) {
|
|
17597
17644
|
h(this, "stage");
|
|
17598
|
-
g(this, Ar, void 0);
|
|
17599
|
-
g(this, Pi, void 0);
|
|
17600
17645
|
g(this, Mr, void 0);
|
|
17646
|
+
g(this, Pi, void 0);
|
|
17647
|
+
g(this, Dr, void 0);
|
|
17601
17648
|
g(this, Ko, 0);
|
|
17602
17649
|
g(this, ft, void 0);
|
|
17603
|
-
m(this, ft, t), this.stage = new
|
|
17650
|
+
m(this, ft, t), this.stage = new ii(
|
|
17604
17651
|
t,
|
|
17605
17652
|
i,
|
|
17606
17653
|
n,
|
|
17607
17654
|
e,
|
|
17608
17655
|
r
|
|
17609
|
-
), m(this,
|
|
17656
|
+
), m(this, Dr, e), m(this, Mr, i), m(this, Pi, n), this.setupEvents();
|
|
17610
17657
|
}
|
|
17611
17658
|
get telemetry() {
|
|
17612
17659
|
return a(this, ft).getValue("telemetry");
|
|
@@ -17617,17 +17664,17 @@ class Af {
|
|
|
17617
17664
|
setupEvents() {
|
|
17618
17665
|
a(this, ft).subscribe("stageStatus", (t) => {
|
|
17619
17666
|
this.stage.emit("stageStatusUpdate", t);
|
|
17620
|
-
}), a(this,
|
|
17621
|
-
a(this,
|
|
17622
|
-
}), a(this,
|
|
17623
|
-
t !== void 0 && (t.peerId === a(this,
|
|
17624
|
-
}), a(this,
|
|
17625
|
-
a(this,
|
|
17626
|
-
}), a(this,
|
|
17667
|
+
}), a(this, Dr).on(x.grantStageAccess, () => {
|
|
17668
|
+
a(this, Mr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
|
|
17669
|
+
}), a(this, Dr).on(x.peerStageStatusUpdate, (t) => {
|
|
17670
|
+
t !== void 0 && (t.peerId === a(this, Mr).id ? this.selfStageStatusHandler(t) : this.peerStageStatusHandler(t));
|
|
17671
|
+
}), a(this, Dr).on(x.denyStageAccess, () => {
|
|
17672
|
+
a(this, Mr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestRejected"), this.setStageStatus("OFF_STAGE"));
|
|
17673
|
+
}), a(this, Dr).on(
|
|
17627
17674
|
x.getStageRequests,
|
|
17628
17675
|
(t) => l(this, null, function* () {
|
|
17629
17676
|
var r;
|
|
17630
|
-
if (a(this,
|
|
17677
|
+
if (a(this, Mr).permissions.stageAccess !== j.Allowed)
|
|
17631
17678
|
return;
|
|
17632
17679
|
const e = (r = t == null ? void 0 : t.stageRequests) != null ? r : [];
|
|
17633
17680
|
yield a(this, ft).getValue("peerSessionStore").emitAsync(b.GET_STAGE_REQUESTS, e), a(this, Ko) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), m(this, Ko, e.length), this.stage.emit("stageAccessRequestUpdate", e);
|
|
@@ -17696,7 +17743,7 @@ class Af {
|
|
|
17696
17743
|
});
|
|
17697
17744
|
}
|
|
17698
17745
|
}
|
|
17699
|
-
|
|
17746
|
+
Mr = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Ko = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap();
|
|
17700
17747
|
DM([
|
|
17701
17748
|
T.trace("DyteStage.setupEvents")
|
|
17702
17749
|
], Af.prototype, "setupEvents", 1);
|
|
@@ -17719,7 +17766,7 @@ const Ie = {
|
|
|
17719
17766
|
stageStatusUpdate: 25,
|
|
17720
17767
|
peerStageStatusUpdate: 26
|
|
17721
17768
|
};
|
|
17722
|
-
var at, Ut, Qa, Xa, Ks, Za,
|
|
17769
|
+
var at, Ut, Qa, Xa, Ks, Za, Or, en, Mg;
|
|
17723
17770
|
let Jn = (Mg = class extends Kn {
|
|
17724
17771
|
constructor(t, {
|
|
17725
17772
|
baseURL: e,
|
|
@@ -17761,12 +17808,12 @@ let Jn = (Mg = class extends Kn {
|
|
|
17761
17808
|
h(this, "active");
|
|
17762
17809
|
h(this, "iframes");
|
|
17763
17810
|
h(this, "enabledBy");
|
|
17764
|
-
g(this,
|
|
17811
|
+
g(this, Or, void 0);
|
|
17765
17812
|
g(this, en, void 0);
|
|
17766
|
-
m(this,
|
|
17813
|
+
m(this, Or, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, m(this, Ut, k), this.organizationId = c, this.picture = d, this.private = u, this.published = p, this.staggered = f, this.tags = S, this.type = E, this.updatedAt = new Date(_), this.active = false, this.iframes = /* @__PURE__ */ new Map(), m(this, at, P), m(this, Qa, A), m(this, Xa, N), this.enabledBy = "", m(this, en, H);
|
|
17767
17814
|
}
|
|
17768
17815
|
get telemetry() {
|
|
17769
|
-
return a(this,
|
|
17816
|
+
return a(this, Or).getValue("telemetry");
|
|
17770
17817
|
}
|
|
17771
17818
|
sendIframeEvent(t) {
|
|
17772
17819
|
this.iframes.size && this.iframes.forEach((e) => {
|
|
@@ -17926,7 +17973,7 @@ let Jn = (Mg = class extends Kn {
|
|
|
17926
17973
|
case Ie.getRoomName: {
|
|
17927
17974
|
this.sendIframeEvent({
|
|
17928
17975
|
type: Ie.getRoomName,
|
|
17929
|
-
payload: { roomName: a(this,
|
|
17976
|
+
payload: { roomName: a(this, Or).getValue("meetingId") },
|
|
17930
17977
|
uuid: e.uuid
|
|
17931
17978
|
});
|
|
17932
17979
|
break;
|
|
@@ -17970,9 +18017,9 @@ let Jn = (Mg = class extends Kn {
|
|
|
17970
18017
|
const r = t, i = new URL(this.baseURL), n = {
|
|
17971
18018
|
auth: a(this, Za),
|
|
17972
18019
|
parent: navigator.isReactNative ? this.baseURL : window.location.origin,
|
|
17973
|
-
backend: a(this,
|
|
18020
|
+
backend: a(this, Or).getValue("apiBase"),
|
|
17974
18021
|
pluginId: this.id,
|
|
17975
|
-
roomName: (o = a(this,
|
|
18022
|
+
roomName: (o = a(this, Or).getValue("meetingId")) != null ? o : "",
|
|
17976
18023
|
displayTitle: a(this, en)
|
|
17977
18024
|
};
|
|
17978
18025
|
if (Object.keys(n).forEach((c) => {
|
|
@@ -18055,7 +18102,7 @@ let Jn = (Mg = class extends Kn {
|
|
|
18055
18102
|
}), m(this, Ks, void 0)));
|
|
18056
18103
|
});
|
|
18057
18104
|
}
|
|
18058
|
-
}, at = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Qa = /* @__PURE__ */ new WeakMap(), Xa = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakMap(), Za = /* @__PURE__ */ new WeakMap(),
|
|
18105
|
+
}, at = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Qa = /* @__PURE__ */ new WeakMap(), Xa = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakMap(), Za = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), Mg);
|
|
18059
18106
|
jl([
|
|
18060
18107
|
Dt({ maxInvocations: 5, period: 1 })
|
|
18061
18108
|
], Jn.prototype, "sendData", 1);
|
|
@@ -20726,14 +20773,14 @@ var I0 = Object.defineProperty, A0 = Object.getOwnPropertyDescriptor, zc = (s, t
|
|
|
20726
20773
|
for (var i = r > 1 ? void 0 : r ? A0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20727
20774
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20728
20775
|
return r && i && I0(t, e, i), i;
|
|
20729
|
-
}, nt,
|
|
20776
|
+
}, nt, Nr, Lr, Wd, $f;
|
|
20730
20777
|
class Qn {
|
|
20731
20778
|
constructor({ name: t, socketHandler: e, meetingId: r }) {
|
|
20732
20779
|
g(this, Wd);
|
|
20733
20780
|
h(this, "name", "");
|
|
20734
20781
|
g(this, nt, {});
|
|
20735
|
-
g(this,
|
|
20736
|
-
g(this,
|
|
20782
|
+
g(this, Nr, "");
|
|
20783
|
+
g(this, Lr, void 0);
|
|
20737
20784
|
h(this, "rateLimitConfig", {
|
|
20738
20785
|
maxInvocations: 5,
|
|
20739
20786
|
period: 1
|
|
@@ -20743,7 +20790,7 @@ class Qn {
|
|
|
20743
20790
|
period: 1
|
|
20744
20791
|
});
|
|
20745
20792
|
h(this, "listeners", {});
|
|
20746
|
-
this.name = t, m(this,
|
|
20793
|
+
this.name = t, m(this, Lr, e), m(this, Nr, r);
|
|
20747
20794
|
}
|
|
20748
20795
|
set(t, e, r = true, i = false) {
|
|
20749
20796
|
return l(this, null, function* () {
|
|
@@ -20755,13 +20802,13 @@ class Qn {
|
|
|
20755
20802
|
});
|
|
20756
20803
|
}
|
|
20757
20804
|
remoteSet(t, e) {
|
|
20758
|
-
a(this,
|
|
20805
|
+
a(this, Lr).storeInsertKeys(a(this, Nr), this.name, [{ key: t, payload: e }]);
|
|
20759
20806
|
}
|
|
20760
20807
|
bulkSet(t) {
|
|
20761
20808
|
return l(this, null, function* () {
|
|
20762
20809
|
t.forEach(({ key: e, payload: r }) => {
|
|
20763
20810
|
a(this, nt)[e] = r;
|
|
20764
|
-
}), a(this,
|
|
20811
|
+
}), a(this, Lr).storeInsertKeys(a(this, Nr), this.name, t);
|
|
20765
20812
|
});
|
|
20766
20813
|
}
|
|
20767
20814
|
update(t, e, r = true) {
|
|
@@ -20772,8 +20819,8 @@ class Qn {
|
|
|
20772
20819
|
delete(t, e = true, r = false) {
|
|
20773
20820
|
return l(this, null, function* () {
|
|
20774
20821
|
if (a(this, nt)[t] && delete a(this, nt)[t], e)
|
|
20775
|
-
return a(this,
|
|
20776
|
-
a(this,
|
|
20822
|
+
return a(this, Lr).storeDeleteKeys(
|
|
20823
|
+
a(this, Nr),
|
|
20777
20824
|
this.name,
|
|
20778
20825
|
[{ key: t }]
|
|
20779
20826
|
);
|
|
@@ -20784,8 +20831,8 @@ class Qn {
|
|
|
20784
20831
|
return l(this, null, function* () {
|
|
20785
20832
|
return t.forEach(({ key: e }) => {
|
|
20786
20833
|
a(this, nt)[e] && delete a(this, nt)[e];
|
|
20787
|
-
}), a(this,
|
|
20788
|
-
a(this,
|
|
20834
|
+
}), a(this, Lr).storeDeleteKeys(
|
|
20835
|
+
a(this, Nr),
|
|
20789
20836
|
this.name,
|
|
20790
20837
|
t
|
|
20791
20838
|
);
|
|
@@ -20829,7 +20876,7 @@ class Qn {
|
|
|
20829
20876
|
m(this, nt, t);
|
|
20830
20877
|
}
|
|
20831
20878
|
}
|
|
20832
|
-
nt = /* @__PURE__ */ new WeakMap(),
|
|
20879
|
+
nt = /* @__PURE__ */ new WeakMap(), Nr = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), Wd = /* @__PURE__ */ new WeakSet(), $f = function(t, e, r = true) {
|
|
20833
20880
|
let i;
|
|
20834
20881
|
const n = a(this, nt)[t], o = Object.prototype.toString.call(e), c = Object.prototype.toString.call(n);
|
|
20835
20882
|
if (o !== c) {
|
|
@@ -20870,7 +20917,7 @@ zc([
|
|
|
20870
20917
|
zc([
|
|
20871
20918
|
Dt(Yn, "bulkRateLimitConfig")
|
|
20872
20919
|
], Qn.prototype, "bulkDelete", 1);
|
|
20873
|
-
var Ai, Mi, sc, Ju, rc,
|
|
20920
|
+
var Ai, Mi, sc, Ju, rc, Vr, Jd, Ff;
|
|
20874
20921
|
class M0 {
|
|
20875
20922
|
constructor(t, e) {
|
|
20876
20923
|
g(this, sc);
|
|
@@ -20879,7 +20926,7 @@ class M0 {
|
|
|
20879
20926
|
g(this, Ai, void 0);
|
|
20880
20927
|
g(this, Mi, "");
|
|
20881
20928
|
g(this, rc, void 0);
|
|
20882
|
-
g(this,
|
|
20929
|
+
g(this, Vr, /* @__PURE__ */ new Map());
|
|
20883
20930
|
m(this, Ai, e), m(this, Mi, t.getValue("meetingId")), m(this, rc, t), V(this, Jd, Ff).call(this);
|
|
20884
20931
|
}
|
|
20885
20932
|
create(t) {
|
|
@@ -20888,13 +20935,13 @@ class M0 {
|
|
|
20888
20935
|
);
|
|
20889
20936
|
return a(this, Ai).storeGetKeys(a(this, Mi), t, []), new Promise((i, n) => {
|
|
20890
20937
|
const o = setTimeout(() => n(Error("Failed")), 3e3);
|
|
20891
|
-
a(this,
|
|
20938
|
+
a(this, Vr).set(t, { rejectTimeout: o, resolve: i, store: e });
|
|
20892
20939
|
});
|
|
20893
20940
|
}
|
|
20894
20941
|
}
|
|
20895
20942
|
Ai = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakSet(), Ju = function() {
|
|
20896
20943
|
return a(this, rc).getValue("peerId");
|
|
20897
|
-
}, rc = /* @__PURE__ */ new WeakMap(),
|
|
20944
|
+
}, rc = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Jd = /* @__PURE__ */ new WeakSet(), Ff = function() {
|
|
20898
20945
|
[
|
|
20899
20946
|
W.storeInsertKeys,
|
|
20900
20947
|
W.storeGetKeys,
|
|
@@ -20918,13 +20965,13 @@ Ai = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), sc = /*
|
|
|
20918
20965
|
};
|
|
20919
20966
|
});
|
|
20920
20967
|
if (t === W.storeGetKeys) {
|
|
20921
|
-
const c = a(this,
|
|
20922
|
-
a(this,
|
|
20968
|
+
const c = a(this, Vr).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
|
|
20969
|
+
a(this, Vr).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), a(this, Vr).delete(e.storeName)), r.forEach((u) => {
|
|
20923
20970
|
d.set(u.key, u.payload, false, false);
|
|
20924
20971
|
});
|
|
20925
20972
|
return;
|
|
20926
20973
|
}
|
|
20927
|
-
const i = this.stores.get(e.storeName) || ((o = a(this,
|
|
20974
|
+
const i = this.stores.get(e.storeName) || ((o = a(this, Vr).get(e.storeName)) == null ? void 0 : o.store);
|
|
20928
20975
|
i !== void 0 && (t === W.storeInsertKeys && r.forEach(({ key: c, peerId: d, payload: u }) => {
|
|
20929
20976
|
d !== a(this, sc, Ju) && i.set(c, u, false, true);
|
|
20930
20977
|
}), t === W.storeDeleteKeys && r.forEach(({ key: c, peerId: d }) => {
|
|
@@ -20969,13 +21016,13 @@ var D0 = Object.defineProperty, O0 = Object.getOwnPropertyDescriptor, Xn = (s, t
|
|
|
20969
21016
|
return r && i && D0(t, e, i), i;
|
|
20970
21017
|
};
|
|
20971
21018
|
const N0 = 0.8, L0 = 1.2;
|
|
20972
|
-
var pn, gn, $t, Di, yo,
|
|
21019
|
+
var pn, gn, $t, Di, yo, xr, ba, Oi, To, Kd, Hf, Qs, ic, Ur, Ni, Eo, Xs, zd, ac, Ku, Yd, Bf, Qd, qf, Lg;
|
|
20973
21020
|
let mr = (Lg = class extends qt {
|
|
20974
21021
|
constructor(t, e, r, i) {
|
|
20975
21022
|
const n = t.getValue("logger");
|
|
20976
21023
|
super(n);
|
|
20977
21024
|
g(this, Di);
|
|
20978
|
-
g(this,
|
|
21025
|
+
g(this, xr);
|
|
20979
21026
|
g(this, Oi);
|
|
20980
21027
|
g(this, Kd);
|
|
20981
21028
|
g(this, Ni);
|
|
@@ -21005,7 +21052,7 @@ let mr = (Lg = class extends qt {
|
|
|
21005
21052
|
g(this, $t, void 0);
|
|
21006
21053
|
g(this, Qs, void 0);
|
|
21007
21054
|
g(this, ic, void 0);
|
|
21008
|
-
g(this,
|
|
21055
|
+
g(this, Ur, /* @__PURE__ */ new Map());
|
|
21009
21056
|
g(this, Xs, 1);
|
|
21010
21057
|
g(this, zd, bh((t2) => {
|
|
21011
21058
|
if (!this.videoTrack)
|
|
@@ -21074,7 +21121,7 @@ let mr = (Lg = class extends qt {
|
|
|
21074
21121
|
});
|
|
21075
21122
|
}
|
|
21076
21123
|
setupEvents() {
|
|
21077
|
-
this.on("videoUpdate", V(this, ac, Ku)), a(this,
|
|
21124
|
+
this.on("videoUpdate", V(this, ac, Ku)), a(this, xr, ba) && (this.on("audioUpdate", V(this, Yd, Bf)), this.on("screenShareUpdate", V(this, Qd, qf)));
|
|
21078
21125
|
}
|
|
21079
21126
|
pin() {
|
|
21080
21127
|
return l(this, null, function* () {
|
|
@@ -21177,7 +21224,7 @@ let mr = (Lg = class extends qt {
|
|
|
21177
21224
|
if (!t)
|
|
21178
21225
|
return;
|
|
21179
21226
|
let e;
|
|
21180
|
-
(i = (r = a(this,
|
|
21227
|
+
(i = (r = a(this, Ur).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => a(this, zd).call(this, t)), e.observe(t)), a(this, Ur).set(t, { observer: e }), this.updateVideo(t), (o = a(this, Ni, Eo)) == null || o.addSource(
|
|
21181
21228
|
this.id,
|
|
21182
21229
|
t,
|
|
21183
21230
|
this.videoEnabled,
|
|
@@ -21193,7 +21240,7 @@ let mr = (Lg = class extends qt {
|
|
|
21193
21240
|
(e = a(this, Ni, Eo)) == null || e.removeSource(this.id);
|
|
21194
21241
|
return;
|
|
21195
21242
|
}
|
|
21196
|
-
t.srcObject = void 0, (i = (r = a(this,
|
|
21243
|
+
t.srcObject = void 0, (i = (r = a(this, Ur).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), a(this, Ur).delete(t), (n = a(this, Ni, Eo)) == null || n.removeSource(this.id);
|
|
21197
21244
|
}
|
|
21198
21245
|
updateVideo(t) {
|
|
21199
21246
|
var e;
|
|
@@ -21211,22 +21258,22 @@ let mr = (Lg = class extends qt {
|
|
|
21211
21258
|
}
|
|
21212
21259
|
}, pn = /* @__PURE__ */ new WeakMap(), gn = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakSet(), yo = function() {
|
|
21213
21260
|
return a(this, $t).getValue("roomNodeClient");
|
|
21214
|
-
},
|
|
21261
|
+
}, xr = /* @__PURE__ */ new WeakSet(), ba = function() {
|
|
21215
21262
|
return a(this, $t).getValue("audioPlayback");
|
|
21216
21263
|
}, Oi = /* @__PURE__ */ new WeakSet(), To = function() {
|
|
21217
21264
|
return a(this, $t).getValue("connectionHandler").mediaJoined;
|
|
21218
21265
|
}, Kd = /* @__PURE__ */ new WeakSet(), Hf = function() {
|
|
21219
21266
|
return a(this, $t).getValue("connectionHandler").socketJoined;
|
|
21220
|
-
}, Qs = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(),
|
|
21267
|
+
}, Qs = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakSet(), Eo = function() {
|
|
21221
21268
|
return a(this, $t).getValue("pip");
|
|
21222
21269
|
}, Xs = /* @__PURE__ */ new WeakMap(), zd = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakSet(), Ku = function() {
|
|
21223
|
-
Array.from(a(this,
|
|
21270
|
+
Array.from(a(this, Ur).keys()).forEach(this.updateVideo);
|
|
21224
21271
|
}, Yd = /* @__PURE__ */ new WeakSet(), Bf = function() {
|
|
21225
21272
|
var t, e;
|
|
21226
|
-
this.audioEnabled && this.audioTrack ? (t = a(this,
|
|
21273
|
+
this.audioEnabled && this.audioTrack ? (t = a(this, xr, ba)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = a(this, xr, ba)) == null || e.removeParticipantTrack(this.id);
|
|
21227
21274
|
}, Qd = /* @__PURE__ */ new WeakSet(), qf = function() {
|
|
21228
21275
|
var t, e;
|
|
21229
|
-
this.screenShareEnabled && this.screenShareTracks.audio ? (t = a(this,
|
|
21276
|
+
this.screenShareEnabled && this.screenShareTracks.audio ? (t = a(this, xr, ba)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = a(this, xr, ba)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
|
|
21230
21277
|
}, Lg);
|
|
21231
21278
|
Xn([
|
|
21232
21279
|
T.trace("DyteParticipant.disableAudio")
|
|
@@ -21269,27 +21316,27 @@ class mi extends Mf {
|
|
|
21269
21316
|
return super.delete(t, e, r);
|
|
21270
21317
|
}
|
|
21271
21318
|
}
|
|
21272
|
-
var
|
|
21319
|
+
var $r;
|
|
21273
21320
|
class V0 extends Kn {
|
|
21274
21321
|
constructor(e) {
|
|
21275
21322
|
super(e);
|
|
21276
|
-
g(this,
|
|
21277
|
-
m(this,
|
|
21323
|
+
g(this, $r, void 0);
|
|
21324
|
+
m(this, $r, /* @__PURE__ */ new Map());
|
|
21278
21325
|
}
|
|
21279
21326
|
__set(e, r) {
|
|
21280
|
-
return a(this,
|
|
21327
|
+
return a(this, $r).set(e, r);
|
|
21281
21328
|
}
|
|
21282
21329
|
__clear() {
|
|
21283
|
-
return a(this,
|
|
21330
|
+
return a(this, $r).clear();
|
|
21284
21331
|
}
|
|
21285
21332
|
get(e) {
|
|
21286
|
-
return a(this,
|
|
21333
|
+
return a(this, $r).get(e);
|
|
21287
21334
|
}
|
|
21288
21335
|
toArray() {
|
|
21289
|
-
return Array.from(a(this,
|
|
21336
|
+
return Array.from(a(this, $r).values());
|
|
21290
21337
|
}
|
|
21291
21338
|
}
|
|
21292
|
-
|
|
21339
|
+
$r = /* @__PURE__ */ new WeakMap();
|
|
21293
21340
|
class x0 {
|
|
21294
21341
|
constructor() {
|
|
21295
21342
|
h(this, "_orderedArray");
|
|
@@ -21724,7 +21771,7 @@ let Pt = (Vg = class extends qt {
|
|
|
21724
21771
|
}
|
|
21725
21772
|
getAllJoinedPeers(t, e, r) {
|
|
21726
21773
|
return l(this, null, function* () {
|
|
21727
|
-
return (yield a(this, wt).getRoomPeers(t, e, r)).peers.map(
|
|
21774
|
+
return (yield a(this, wt).getRoomPeers(t, e, r)).peers.map(vr.formatSocketServiceMessage);
|
|
21728
21775
|
});
|
|
21729
21776
|
}
|
|
21730
21777
|
updatePermissions(t, e) {
|
|
@@ -22681,28 +22728,28 @@ const vd = (xg = class {
|
|
|
22681
22728
|
})), t && this.updateSubscriptions(this.participants.viewMode);
|
|
22682
22729
|
}
|
|
22683
22730
|
}, Zs = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), xg);
|
|
22684
|
-
let
|
|
22731
|
+
let vr = vd;
|
|
22685
22732
|
_a([
|
|
22686
22733
|
T.trace("ParticipantController.setupEvents")
|
|
22687
|
-
],
|
|
22734
|
+
], vr.prototype, "setupEvents", 1);
|
|
22688
22735
|
_a([
|
|
22689
22736
|
T.trace("ParticipantController.setupEvents")
|
|
22690
|
-
],
|
|
22737
|
+
], vr.prototype, "setupEventsGlobal", 1);
|
|
22691
22738
|
_a([
|
|
22692
22739
|
T.trace("ParticipantController.processMedia")
|
|
22693
|
-
],
|
|
22740
|
+
], vr.prototype, "processMedia", 1);
|
|
22694
22741
|
_a([
|
|
22695
22742
|
T.trace("ParticipantController.processConsumerClosed")
|
|
22696
|
-
],
|
|
22743
|
+
], vr.prototype, "processConsumerClosed", 1);
|
|
22697
22744
|
_a([
|
|
22698
22745
|
T.trace("ParticipantController.processConsumerResumed")
|
|
22699
|
-
],
|
|
22746
|
+
], vr.prototype, "processConsumerResumed", 1);
|
|
22700
22747
|
_a([
|
|
22701
22748
|
T.trace("ParticipantController.processConsumerPaused")
|
|
22702
|
-
],
|
|
22749
|
+
], vr.prototype, "processConsumerPaused", 1);
|
|
22703
22750
|
_a([
|
|
22704
22751
|
T.trace("ParticipantController.processNewConsumer")
|
|
22705
|
-
],
|
|
22752
|
+
], vr.prototype, "processNewConsumer", 1);
|
|
22706
22753
|
const he = Ps(
|
|
22707
22754
|
wh().permissions
|
|
22708
22755
|
);
|
|
@@ -22730,16 +22777,16 @@ const Oa = class extends qt {
|
|
|
22730
22777
|
"polls",
|
|
22731
22778
|
"media"
|
|
22732
22779
|
]);
|
|
22733
|
-
if (r2 && (r2.private &&
|
|
22780
|
+
if (r2 && (r2.private && Pr(a(this, q).chat.private, r2.private), r2.public && Pr(a(this, q).chat.public, r2.public), this.emit("chatUpdate")), i2 && Pr(a(this, q).connectedMeetings, i2), c) {
|
|
22734
22781
|
const E = (P) => {
|
|
22735
22782
|
switch (P) {
|
|
22736
|
-
case
|
|
22783
|
+
case Qr.NONE:
|
|
22737
22784
|
return j.Allowed;
|
|
22738
|
-
case
|
|
22785
|
+
case Qr.ALLOWED:
|
|
22739
22786
|
return j.Allowed;
|
|
22740
|
-
case
|
|
22787
|
+
case Qr.NOT_ALLOWED:
|
|
22741
22788
|
return j.NotAllowed;
|
|
22742
|
-
case
|
|
22789
|
+
case Qr.CAN_REQUEST:
|
|
22743
22790
|
return j.CanRequest;
|
|
22744
22791
|
default:
|
|
22745
22792
|
return;
|
|
@@ -22755,9 +22802,9 @@ const Oa = class extends qt {
|
|
|
22755
22802
|
canProduce: E(c.video.canProduce)
|
|
22756
22803
|
}), (S = c.screenshare) != null && S.canProduce && (_.screenshare = {
|
|
22757
22804
|
canProduce: E(c.screenshare.canProduce)
|
|
22758
|
-
}),
|
|
22805
|
+
}), Pr(a(this, q).media, _);
|
|
22759
22806
|
}
|
|
22760
|
-
n2 && (
|
|
22807
|
+
n2 && (Pr(a(this, q).plugins, n2), this.emit("pluginsUpdate")), o2 && (Pr(a(this, q).polls, o2), this.emit("pollsUpdate")), Object.keys(d).length !== 0 && Pr(a(this, q), d), this.emit("permissionsUpdate", e2);
|
|
22761
22808
|
});
|
|
22762
22809
|
if (!r)
|
|
22763
22810
|
throw this.logger.error("DytePermissionsPreset::load_preset_permissions_failed"), new R("Could not load preset permissions.", "0904");
|
|
@@ -23253,51 +23300,12 @@ class Gf extends qt {
|
|
|
23253
23300
|
}
|
|
23254
23301
|
}
|
|
23255
23302
|
us = /* @__PURE__ */ new WeakMap();
|
|
23256
|
-
const vo = {}, ii = {
|
|
23257
|
-
executeWithLock({
|
|
23258
|
-
methodName: s,
|
|
23259
|
-
lockName: t,
|
|
23260
|
-
timeout: e
|
|
23261
|
-
}) {
|
|
23262
|
-
return (r, i, n) => {
|
|
23263
|
-
const o = n.value;
|
|
23264
|
-
return n.value = function(...d) {
|
|
23265
|
-
var _, P;
|
|
23266
|
-
const u = (P = (this == null ? void 0 : this.peerId) || ((_ = d[0]) == null ? void 0 : _.authToken)) != null ? P : "", p = `${t}-${u}`, f = this == null ? void 0 : this.logger;
|
|
23267
|
-
if (vo[p]) {
|
|
23268
|
-
const k = new Error(
|
|
23269
|
-
`Unsupported concurrent calls on Dyte method: ${s}.`
|
|
23270
|
-
);
|
|
23271
|
-
throw k.name = "UnsupportedConcurrentMethodExecution", f == null || f.error("DyteLocker::UnsupportedConcurrentMethodExecution", {
|
|
23272
|
-
error: {
|
|
23273
|
-
stack: k.stack
|
|
23274
|
-
},
|
|
23275
|
-
dyteLocker: {
|
|
23276
|
-
methodName: s,
|
|
23277
|
-
lockName: p
|
|
23278
|
-
}
|
|
23279
|
-
}), k;
|
|
23280
|
-
}
|
|
23281
|
-
vo[p] = true;
|
|
23282
|
-
const S = setTimeout(
|
|
23283
|
-
() => delete vo[p],
|
|
23284
|
-
e
|
|
23285
|
-
), E = o.apply(this, d);
|
|
23286
|
-
return Promise.resolve(E).then(() => {
|
|
23287
|
-
delete vo[p], clearTimeout(S);
|
|
23288
|
-
}).catch(() => {
|
|
23289
|
-
delete vo[p], clearTimeout(S);
|
|
23290
|
-
}), E;
|
|
23291
|
-
}, n;
|
|
23292
|
-
};
|
|
23293
|
-
}
|
|
23294
|
-
};
|
|
23295
23303
|
var j0 = Object.defineProperty, G0 = Object.getOwnPropertyDescriptor, Ct = (s, t, e, r) => {
|
|
23296
23304
|
for (var i = r > 1 ? void 0 : r ? G0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
23297
23305
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23298
23306
|
return r && i && j0(t, e, i), i;
|
|
23299
|
-
}, vn, vt, yn, He, er, di, je,
|
|
23300
|
-
let
|
|
23307
|
+
}, vn, vt, yn, He, er, di, je, Ze, Tn, yd, xe, Be, En, _n, nc, Yu, Ug;
|
|
23308
|
+
let Xe = (Ug = class extends Gf {
|
|
23301
23309
|
constructor(t, e, r, i, n) {
|
|
23302
23310
|
var c;
|
|
23303
23311
|
const o = t.getValue("logger");
|
|
@@ -23344,11 +23352,11 @@ let Qe = (Ug = class extends Gf {
|
|
|
23344
23352
|
var S, E, _, P, k, A;
|
|
23345
23353
|
let c = (E = (S = t.getValue("defaults")) == null ? void 0 : S.audio) != null ? E : true, d = (P = (_ = t.getValue("defaults")) == null ? void 0 : _.video) != null ? P : true;
|
|
23346
23354
|
r.canProduceAudio !== "ALLOWED" && (c = false), r.canProduceVideo !== "ALLOWED" && (d = false);
|
|
23347
|
-
const u = new
|
|
23355
|
+
const u = new Xe(t, e, r, i, n);
|
|
23348
23356
|
if (i.viewType === Mt.Chat)
|
|
23349
23357
|
return u;
|
|
23350
23358
|
const p = t0(i.mediaConstraints);
|
|
23351
|
-
|
|
23359
|
+
Pr(p, (k = t.getValue("defaults")) == null ? void 0 : k.mediaConfiguration);
|
|
23352
23360
|
const f = (A = t.getValue("defaults")) == null ? void 0 : A.mediaHandler;
|
|
23353
23361
|
return f && (f.context = t), yield u.init({
|
|
23354
23362
|
audio: c,
|
|
@@ -23368,7 +23376,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23368
23376
|
}), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => l(this, null, function* () {
|
|
23369
23377
|
if (this.logger.info("DyteSelf::setupEvents::AUDIO_TRACK_CHANGE", D({}, gi(this))), a(this, xe, Be) && this.audioEnabled)
|
|
23370
23378
|
try {
|
|
23371
|
-
yield a(this, je,
|
|
23379
|
+
yield a(this, je, Ze).shareMic(this.audioTrack);
|
|
23372
23380
|
} catch (e) {
|
|
23373
23381
|
this.logger.error("DyteSelf::setupEvents::Error while sharing mic", {
|
|
23374
23382
|
error: e
|
|
@@ -23383,8 +23391,8 @@ let Qe = (Ug = class extends Gf {
|
|
|
23383
23391
|
this.logger.info("DyteSelf::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
23384
23392
|
else if (this.videoEnabled && a(this, xe, Be))
|
|
23385
23393
|
try {
|
|
23386
|
-
const e = yield a(this, je,
|
|
23387
|
-
e && e.id !== this.videoTrack.id && a(this, He).getValue("flagsmith").hasFeature(Z.EXP_RESHARE) && (yield a(this, je,
|
|
23394
|
+
const e = yield a(this, je, Ze).shareWebcam(this.videoTrack);
|
|
23395
|
+
e && e.id !== this.videoTrack.id && a(this, He).getValue("flagsmith").hasFeature(Z.EXP_RESHARE) && (yield a(this, je, Ze).shareWebcam(this.videoTrack));
|
|
23388
23396
|
} catch (e) {
|
|
23389
23397
|
this.logger.error("DyteSelf::setupEvents::failed shareWebcam", {
|
|
23390
23398
|
error: e
|
|
@@ -23413,7 +23421,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23413
23421
|
}
|
|
23414
23422
|
if (this.screenShareEnabled)
|
|
23415
23423
|
try {
|
|
23416
|
-
yield a(this, je,
|
|
23424
|
+
yield a(this, je, Ze).shareScreen(this.screenShareTracks);
|
|
23417
23425
|
} catch (e) {
|
|
23418
23426
|
this.logger.error(
|
|
23419
23427
|
"DyteSelf::setupEvents::Error while sharing screen",
|
|
@@ -23435,7 +23443,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23435
23443
|
this.disableAudio();
|
|
23436
23444
|
}), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => l(this, null, function* () {
|
|
23437
23445
|
var e;
|
|
23438
|
-
a(this, xe, Be) && (yield a(this, je,
|
|
23446
|
+
a(this, xe, Be) && (yield a(this, je, Ze).pauseWebcam()), this.emit("videoUpdate", {
|
|
23439
23447
|
videoEnabled: this.videoEnabled,
|
|
23440
23448
|
videoTrack: this.videoTrack
|
|
23441
23449
|
}), (e = a(this, He)) == null || e.getValue("callstats").videoOff();
|
|
@@ -23481,7 +23489,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23481
23489
|
if ((e = a(this, He)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), a(this, xe, Be) && this.stageStatus === "ON_STAGE") {
|
|
23482
23490
|
if (this.audioTrack)
|
|
23483
23491
|
try {
|
|
23484
|
-
yield a(this, je,
|
|
23492
|
+
yield a(this, je, Ze).shareMic(this.audioTrack);
|
|
23485
23493
|
} catch (r) {
|
|
23486
23494
|
this.logger.error("DyteSelf::enableAudio::Error while sharing mic", {
|
|
23487
23495
|
error: r
|
|
@@ -23489,7 +23497,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23489
23497
|
}
|
|
23490
23498
|
if (!this.audioEnabled)
|
|
23491
23499
|
return;
|
|
23492
|
-
a(this, je,
|
|
23500
|
+
a(this, je, Ze).unmuteSelf();
|
|
23493
23501
|
}
|
|
23494
23502
|
this.emit("audioUpdate", {
|
|
23495
23503
|
audioEnabled: this.audioEnabled,
|
|
@@ -23504,7 +23512,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23504
23512
|
if (a(this, vt).canProduceVideo !== j.NotAllowed && !(a(this, vt).canProduceVideo === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
|
|
23505
23513
|
if ((e = a(this, He)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), a(this, xe, Be) && this.stageStatus === "ON_STAGE")
|
|
23506
23514
|
try {
|
|
23507
|
-
yield a(this, je,
|
|
23515
|
+
yield a(this, je, Ze).shareWebcam(this.videoTrack);
|
|
23508
23516
|
} catch (r) {
|
|
23509
23517
|
this.logger.error("DyteSelf::enableVideo::Error while sharing video", {
|
|
23510
23518
|
error: r
|
|
@@ -23530,7 +23538,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23530
23538
|
throw new R("Can`t enable screenshare without joining room", "1105");
|
|
23531
23539
|
if (a(this, vt).canProduceScreenshare !== j.NotAllowed && !(a(this, vt).canProduceScreenshare === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
|
|
23532
23540
|
try {
|
|
23533
|
-
yield a(this, je,
|
|
23541
|
+
yield a(this, je, Ze).shareScreen(this.screenShareTracks);
|
|
23534
23542
|
} catch (t) {
|
|
23535
23543
|
this.logger.error(
|
|
23536
23544
|
"DyteSelf::enableScreenShare::Error while sharing screen",
|
|
@@ -23556,7 +23564,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23556
23564
|
disableAudio() {
|
|
23557
23565
|
return l(this, null, function* () {
|
|
23558
23566
|
var t;
|
|
23559
|
-
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this, xe, Be) && a(this, je,
|
|
23567
|
+
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this, xe, Be) && a(this, je, Ze).muteSelf(), this.emit("audioUpdate", {
|
|
23560
23568
|
audioEnabled: this.audioEnabled,
|
|
23561
23569
|
audioTrack: this.audioTrack
|
|
23562
23570
|
}), (t = a(this, He)) == null || t.getValue("callstats").audioOff());
|
|
@@ -23565,7 +23573,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23565
23573
|
disableVideo() {
|
|
23566
23574
|
return l(this, null, function* () {
|
|
23567
23575
|
var t;
|
|
23568
|
-
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this, xe, Be) && (yield a(this, je,
|
|
23576
|
+
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this, xe, Be) && (yield a(this, je, Ze).pauseWebcam()), this.emit("videoUpdate", {
|
|
23569
23577
|
videoEnabled: this.videoEnabled,
|
|
23570
23578
|
videoTrack: this.videoTrack
|
|
23571
23579
|
}), (t = a(this, He)) == null || t.getValue("callstats").videoOff());
|
|
@@ -23573,7 +23581,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23573
23581
|
}
|
|
23574
23582
|
disableScreenShare() {
|
|
23575
23583
|
return l(this, null, function* () {
|
|
23576
|
-
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this, xe, Be) && (yield a(this, je,
|
|
23584
|
+
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this, xe, Be) && (yield a(this, je, Ze).disableScreenShare()), this.emit("screenShareUpdate", {
|
|
23577
23585
|
screenShareEnabled: this.screenShareEnabled,
|
|
23578
23586
|
screenShareTracks: this.screenShareTracks
|
|
23579
23587
|
}));
|
|
@@ -23595,14 +23603,14 @@ let Qe = (Ug = class extends Gf {
|
|
|
23595
23603
|
return l(this, null, function* () {
|
|
23596
23604
|
if (!a(this, xe, Be))
|
|
23597
23605
|
throw new R("Can`t pin participants without joining room", "1105");
|
|
23598
|
-
return this.show(), a(this, je,
|
|
23606
|
+
return this.show(), a(this, je, Ze).pinPeer(this.id);
|
|
23599
23607
|
});
|
|
23600
23608
|
}
|
|
23601
23609
|
unpin() {
|
|
23602
23610
|
return l(this, null, function* () {
|
|
23603
23611
|
if (!a(this, xe, Be))
|
|
23604
23612
|
throw new R("Can`t unpin participants without joining room", "1105");
|
|
23605
|
-
return a(this, je,
|
|
23613
|
+
return a(this, je, Ze).pinPeer(null);
|
|
23606
23614
|
});
|
|
23607
23615
|
}
|
|
23608
23616
|
hide() {
|
|
@@ -23630,7 +23638,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23630
23638
|
try {
|
|
23631
23639
|
yield this.localMediaHandler.setAudioDevice(t);
|
|
23632
23640
|
} catch (o) {
|
|
23633
|
-
a(this, xe, Be) && (yield a(this, je,
|
|
23641
|
+
a(this, xe, Be) && (yield a(this, je, Ze).muteSelf()), this.emit("audioUpdate", {
|
|
23634
23642
|
audioEnabled: this.audioEnabled,
|
|
23635
23643
|
audioTrack: this.audioTrack
|
|
23636
23644
|
});
|
|
@@ -23643,7 +23651,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23643
23651
|
try {
|
|
23644
23652
|
yield this.localMediaHandler.setVideoDevice(t);
|
|
23645
23653
|
} catch (o) {
|
|
23646
|
-
a(this, xe, Be) && (yield a(this, je,
|
|
23654
|
+
a(this, xe, Be) && (yield a(this, je, Ze).pauseWebcam()), this.emit("videoUpdate", {
|
|
23647
23655
|
videoEnabled: this.videoEnabled,
|
|
23648
23656
|
videoTrack: this.videoTrack
|
|
23649
23657
|
});
|
|
@@ -23695,7 +23703,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23695
23703
|
}
|
|
23696
23704
|
}, vn = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakSet(), di = function() {
|
|
23697
23705
|
return a(this, He).getValue("pip");
|
|
23698
|
-
}, je = /* @__PURE__ */ new WeakSet(),
|
|
23706
|
+
}, je = /* @__PURE__ */ new WeakSet(), Ze = function() {
|
|
23699
23707
|
return a(this, He).getValue("roomNodeClient");
|
|
23700
23708
|
}, Tn = /* @__PURE__ */ new WeakSet(), yd = function() {
|
|
23701
23709
|
return a(this, He).getValue("audioPlayback");
|
|
@@ -23707,79 +23715,79 @@ let Qe = (Ug = class extends Gf {
|
|
|
23707
23715
|
}, Ug);
|
|
23708
23716
|
Ct([
|
|
23709
23717
|
T.trace("DyteSelf.cleanupEvents")
|
|
23710
|
-
],
|
|
23718
|
+
], Xe.prototype, "cleanupEvents", 1);
|
|
23711
23719
|
Ct([
|
|
23712
23720
|
T.trace("DyteSelf.setupEvents")
|
|
23713
|
-
],
|
|
23721
|
+
], Xe.prototype, "setupEvents", 1);
|
|
23714
23722
|
Ct([
|
|
23715
23723
|
T.trace("DyteSelf.setupTracks")
|
|
23716
|
-
],
|
|
23724
|
+
], Xe.prototype, "setupTracks", 1);
|
|
23717
23725
|
Ct([
|
|
23718
23726
|
T.trace("DyteSelf.destructMediaHandler")
|
|
23719
|
-
],
|
|
23727
|
+
], Xe.prototype, "destructMediaHandler", 1);
|
|
23720
23728
|
Ct([
|
|
23721
23729
|
T.trace("DyteSelf.removeDocumentEventListeners")
|
|
23722
|
-
],
|
|
23730
|
+
], Xe.prototype, "removeDocumentEventListeners", 1);
|
|
23723
23731
|
Ct([
|
|
23724
|
-
|
|
23732
|
+
Sr.executeWithLock({
|
|
23725
23733
|
methodName: "meeting.self.enableAudio",
|
|
23726
23734
|
lockName: "DyteSelf.toggleAudio",
|
|
23727
23735
|
timeout: 3e3
|
|
23728
23736
|
}),
|
|
23729
23737
|
T.trace("DyteSelf.enableAudio")
|
|
23730
|
-
],
|
|
23738
|
+
], Xe.prototype, "enableAudio", 1);
|
|
23731
23739
|
Ct([
|
|
23732
|
-
|
|
23740
|
+
Sr.executeWithLock({
|
|
23733
23741
|
methodName: "meeting.self.enableVideo",
|
|
23734
23742
|
lockName: "DyteSelf.toggleVideo",
|
|
23735
23743
|
timeout: 3e3
|
|
23736
23744
|
}),
|
|
23737
23745
|
T.trace("DyteSelf.enableVideo")
|
|
23738
|
-
],
|
|
23746
|
+
], Xe.prototype, "enableVideo", 1);
|
|
23739
23747
|
Ct([
|
|
23740
23748
|
T.trace("DyteSelf.updateVideoConstraints")
|
|
23741
|
-
],
|
|
23749
|
+
], Xe.prototype, "updateVideoConstraints", 1);
|
|
23742
23750
|
Ct([
|
|
23743
23751
|
T.trace("DyteSelf.enableScreenShare"),
|
|
23744
|
-
|
|
23752
|
+
Sr.executeWithLock({
|
|
23745
23753
|
methodName: "meeting.self.enableScreenShare",
|
|
23746
23754
|
lockName: "DyteSelf.toggleScreenShare",
|
|
23747
23755
|
timeout: 3e3
|
|
23748
23756
|
})
|
|
23749
|
-
],
|
|
23757
|
+
], Xe.prototype, "enableScreenShare", 1);
|
|
23750
23758
|
Ct([
|
|
23751
23759
|
T.trace("DyteSelf.updateScreenshareConstraints")
|
|
23752
|
-
],
|
|
23760
|
+
], Xe.prototype, "updateScreenshareConstraints", 1);
|
|
23753
23761
|
Ct([
|
|
23754
|
-
|
|
23762
|
+
Sr.executeWithLock({
|
|
23755
23763
|
methodName: "meeting.self.disableAudio",
|
|
23756
23764
|
lockName: "DyteSelf.toggleAudio",
|
|
23757
23765
|
timeout: 3e3
|
|
23758
23766
|
}),
|
|
23759
23767
|
T.trace("DyteSelf.disableAudio")
|
|
23760
|
-
],
|
|
23768
|
+
], Xe.prototype, "disableAudio", 1);
|
|
23761
23769
|
Ct([
|
|
23762
|
-
|
|
23770
|
+
Sr.executeWithLock({
|
|
23763
23771
|
methodName: "meeting.self.disableVideo",
|
|
23764
23772
|
lockName: "DyteSelf.toggleVideo",
|
|
23765
23773
|
timeout: 3e3
|
|
23766
23774
|
}),
|
|
23767
23775
|
T.trace("DyteSelf.disableVideo")
|
|
23768
|
-
],
|
|
23776
|
+
], Xe.prototype, "disableVideo", 1);
|
|
23769
23777
|
Ct([
|
|
23770
|
-
|
|
23778
|
+
Sr.executeWithLock({
|
|
23771
23779
|
methodName: "meeting.self.disableScreenShare",
|
|
23772
23780
|
lockName: "DyteSelf.toggleScreenShare",
|
|
23773
23781
|
timeout: 3e3
|
|
23774
23782
|
}),
|
|
23775
23783
|
T.trace("DyteSelf.disableScreenShare")
|
|
23776
|
-
],
|
|
23784
|
+
], Xe.prototype, "disableScreenShare", 1);
|
|
23777
23785
|
Ct([
|
|
23778
23786
|
T.trace("DyteSelf.setDevice")
|
|
23779
|
-
],
|
|
23780
|
-
|
|
23787
|
+
], Xe.prototype, "setDevice", 1);
|
|
23788
|
+
Xe = Ct([
|
|
23781
23789
|
ht("1100")
|
|
23782
|
-
],
|
|
23790
|
+
], Xe);
|
|
23783
23791
|
class Uh extends Error {
|
|
23784
23792
|
constructor(t) {
|
|
23785
23793
|
super(t != null ? t : "AwaitQueue stopped"), this.name = "AwaitQueueStoppedError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Uh);
|
|
@@ -23973,13 +23981,13 @@ function z0(s) {
|
|
|
23973
23981
|
receiver: n
|
|
23974
23982
|
};
|
|
23975
23983
|
}
|
|
23976
|
-
var
|
|
23984
|
+
var ze;
|
|
23977
23985
|
class Y0 {
|
|
23978
23986
|
constructor(t, e) {
|
|
23979
|
-
g(this,
|
|
23987
|
+
g(this, ze, void 0);
|
|
23980
23988
|
h(this, "events");
|
|
23981
23989
|
h(this, "sfuType");
|
|
23982
|
-
m(this,
|
|
23990
|
+
m(this, ze, t), this.sfuType = e, this.events = e === Pe.CF ? Es : is;
|
|
23983
23991
|
}
|
|
23984
23992
|
joinRoom(t, e, r, i = false, n = null) {
|
|
23985
23993
|
return l(this, null, function* () {
|
|
@@ -23989,7 +23997,7 @@ class Y0 {
|
|
|
23989
23997
|
prejoined: i,
|
|
23990
23998
|
capabilities: r
|
|
23991
23999
|
};
|
|
23992
|
-
return n && (o.location = n), (yield a(this,
|
|
24000
|
+
return n && (o.location = n), (yield a(this, ze).sendMessagePromiseWithTimeout({
|
|
23993
24001
|
event: this.events.joinRoom,
|
|
23994
24002
|
protobuf: lR.toBinary(o),
|
|
23995
24003
|
timeout: 5e3
|
|
@@ -23998,7 +24006,7 @@ class Y0 {
|
|
|
23998
24006
|
}
|
|
23999
24007
|
connectTransport(t) {
|
|
24000
24008
|
return l(this, null, function* () {
|
|
24001
|
-
const e = (yield a(this,
|
|
24009
|
+
const e = (yield a(this, ze).sendMessagePromise(
|
|
24002
24010
|
this.events.createWebRTCTransport,
|
|
24003
24011
|
UC.toBinary(t)
|
|
24004
24012
|
)).payload, { transportId: r, description: i, producerIds: n } = nf.fromBinary(e), o = {
|
|
@@ -24015,7 +24023,7 @@ class Y0 {
|
|
|
24015
24023
|
produce(t) {
|
|
24016
24024
|
return l(this, null, function* () {
|
|
24017
24025
|
var n, o;
|
|
24018
|
-
const e = (yield a(this,
|
|
24026
|
+
const e = (yield a(this, ze).sendMessagePromise(
|
|
24019
24027
|
this.events.produce,
|
|
24020
24028
|
RR.toBinary(t)
|
|
24021
24029
|
)).payload, r = ow.fromBinary(e);
|
|
@@ -24032,7 +24040,7 @@ class Y0 {
|
|
|
24032
24040
|
return l(this, null, function* () {
|
|
24033
24041
|
if (this.sfuType === Pe.HIVE)
|
|
24034
24042
|
throw new Error("Hive does not support socket consumer operations");
|
|
24035
|
-
const e = (yield a(this,
|
|
24043
|
+
const e = (yield a(this, ze).sendMessagePromise(
|
|
24036
24044
|
this.events.consume,
|
|
24037
24045
|
yR.toBinary(t)
|
|
24038
24046
|
)).payload, {
|
|
@@ -24044,7 +24052,7 @@ class Y0 {
|
|
|
24044
24052
|
}
|
|
24045
24053
|
closeProducer(t) {
|
|
24046
24054
|
return l(this, null, function* () {
|
|
24047
|
-
const e = (yield a(this,
|
|
24055
|
+
const e = (yield a(this, ze).sendMessagePromise(
|
|
24048
24056
|
this.events.closeProducer,
|
|
24049
24057
|
DR.toBinary(t)
|
|
24050
24058
|
)).payload, { description: r } = gw.fromBinary(e);
|
|
@@ -24055,7 +24063,7 @@ class Y0 {
|
|
|
24055
24063
|
return l(this, null, function* () {
|
|
24056
24064
|
if (this.sfuType === Pe.HIVE)
|
|
24057
24065
|
throw new Error("Hive does not support socket consumer operations");
|
|
24058
|
-
return (yield a(this,
|
|
24066
|
+
return (yield a(this, ze).sendMessagePromise(
|
|
24059
24067
|
this.events.closeConsumer,
|
|
24060
24068
|
NR.toBinary(t)
|
|
24061
24069
|
)).payload;
|
|
@@ -24065,7 +24073,7 @@ class Y0 {
|
|
|
24065
24073
|
return l(this, null, function* () {
|
|
24066
24074
|
if (this.sfuType === Pe.HIVE)
|
|
24067
24075
|
throw new Error("Method not implemented");
|
|
24068
|
-
return (yield a(this,
|
|
24076
|
+
return (yield a(this, ze).sendMessagePromise(
|
|
24069
24077
|
this.events.updateConsumersSimulcastConfig,
|
|
24070
24078
|
PR.toBinary(t)
|
|
24071
24079
|
)).payload;
|
|
@@ -24078,7 +24086,7 @@ class Y0 {
|
|
|
24078
24086
|
screeShare: false,
|
|
24079
24087
|
video: e === "video",
|
|
24080
24088
|
participantId: t
|
|
24081
|
-
}, i = (yield a(this,
|
|
24089
|
+
}, i = (yield a(this, ze).sendMessagePromise(
|
|
24082
24090
|
this.events.hostControlPeer,
|
|
24083
24091
|
FR.toBinary(r)
|
|
24084
24092
|
)).payload;
|
|
@@ -24094,7 +24102,7 @@ class Y0 {
|
|
|
24094
24102
|
audio: t === "audio",
|
|
24095
24103
|
screenShare: false,
|
|
24096
24104
|
video: t === "video"
|
|
24097
|
-
}, r = (yield a(this,
|
|
24105
|
+
}, r = (yield a(this, ze).sendMessagePromise(
|
|
24098
24106
|
this.events.hostControlAllPeers,
|
|
24099
24107
|
BR.toBinary(e)
|
|
24100
24108
|
)).payload;
|
|
@@ -24109,7 +24117,7 @@ class Y0 {
|
|
|
24109
24117
|
const t = {
|
|
24110
24118
|
propagateKickAcrossRooms: false
|
|
24111
24119
|
};
|
|
24112
|
-
a(this,
|
|
24120
|
+
a(this, ze).sendMessagePromise(
|
|
24113
24121
|
x.kickAll,
|
|
24114
24122
|
lf.toBinary(t)
|
|
24115
24123
|
);
|
|
@@ -24117,7 +24125,7 @@ class Y0 {
|
|
|
24117
24125
|
}
|
|
24118
24126
|
kickPeer(t) {
|
|
24119
24127
|
return l(this, null, function* () {
|
|
24120
|
-
a(this,
|
|
24128
|
+
a(this, ze).sendMessagePromise(
|
|
24121
24129
|
x.kick,
|
|
24122
24130
|
mf.toBinary(t)
|
|
24123
24131
|
);
|
|
@@ -24125,7 +24133,7 @@ class Y0 {
|
|
|
24125
24133
|
}
|
|
24126
24134
|
changeDisplayName(t) {
|
|
24127
24135
|
return l(this, null, function* () {
|
|
24128
|
-
const e = (yield a(this,
|
|
24136
|
+
const e = (yield a(this, ze).sendMessagePromise(
|
|
24129
24137
|
this.events.changeDisplayName,
|
|
24130
24138
|
UR.toBinary(t)
|
|
24131
24139
|
)).payload;
|
|
@@ -24137,7 +24145,7 @@ class Y0 {
|
|
|
24137
24145
|
}
|
|
24138
24146
|
notifySelfJoinComplete() {
|
|
24139
24147
|
return l(this, null, function* () {
|
|
24140
|
-
const t = {}, e = (yield a(this,
|
|
24148
|
+
const t = {}, e = (yield a(this, ze).sendMessagePromise(
|
|
24141
24149
|
this.events.selfJoinComplete,
|
|
24142
24150
|
hR.toBinary(t)
|
|
24143
24151
|
)).payload;
|
|
@@ -24146,11 +24154,11 @@ class Y0 {
|
|
|
24146
24154
|
}
|
|
24147
24155
|
audioActivity(t) {
|
|
24148
24156
|
return l(this, null, function* () {
|
|
24149
|
-
a(this,
|
|
24157
|
+
a(this, ze).sendMessage(this.events.audioActivity, FC.toBinary(t));
|
|
24150
24158
|
});
|
|
24151
24159
|
}
|
|
24152
24160
|
}
|
|
24153
|
-
|
|
24161
|
+
ze = /* @__PURE__ */ new WeakMap();
|
|
24154
24162
|
var cc;
|
|
24155
24163
|
class Kl extends ut.EventEmitter {
|
|
24156
24164
|
constructor(e) {
|
|
@@ -24691,7 +24699,7 @@ class Bh extends Fh {
|
|
|
24691
24699
|
function Q0(s, t) {
|
|
24692
24700
|
return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
|
|
24693
24701
|
}
|
|
24694
|
-
var dc, Bi, Os, Zd, Ns,
|
|
24702
|
+
var dc, Bi, Os, Zd, Ns, Cr, lc, Xu, el, Jf, tl, Kf;
|
|
24695
24703
|
class X0 extends Kl {
|
|
24696
24704
|
constructor(e, r) {
|
|
24697
24705
|
var i;
|
|
@@ -24726,7 +24734,7 @@ class X0 extends Kl {
|
|
|
24726
24734
|
return a(this, Bi);
|
|
24727
24735
|
}
|
|
24728
24736
|
close(e, r) {
|
|
24729
|
-
a(this, Os) || (this.logger.debug(`Consumer::close() ${e ? `with reason ${e}` : ""}`, a(this, Ns,
|
|
24737
|
+
a(this, Os) || (this.logger.debug(`Consumer::close() ${e ? `with reason ${e}` : ""}`, a(this, Ns, Cr)), m(this, Os, true), r && (V(this, tl, Kf).call(this), this.transceiver.stop()), this.safeEmit("close", e));
|
|
24730
24738
|
}
|
|
24731
24739
|
getStats() {
|
|
24732
24740
|
return l(this, null, function* () {
|
|
@@ -24736,21 +24744,21 @@ class X0 extends Kl {
|
|
|
24736
24744
|
});
|
|
24737
24745
|
}
|
|
24738
24746
|
pause() {
|
|
24739
|
-
if (this.logger.debug("consumer::pause()", a(this, Ns,
|
|
24740
|
-
this.logger.error("consumer::pause() | Consumer closed", a(this, Ns,
|
|
24747
|
+
if (this.logger.debug("consumer::pause()", a(this, Ns, Cr)), a(this, Os)) {
|
|
24748
|
+
this.logger.error("consumer::pause() | Consumer closed", a(this, Ns, Cr));
|
|
24741
24749
|
return;
|
|
24742
24750
|
}
|
|
24743
24751
|
m(this, Bi, true), this.track.enabled = false, this.safeEmit("pause");
|
|
24744
24752
|
}
|
|
24745
24753
|
resume() {
|
|
24746
|
-
if (this.logger.debug("consumer::resume()", a(this, Ns,
|
|
24747
|
-
this.logger.error("Consumer::resume() | Consumer closed", a(this, Ns,
|
|
24754
|
+
if (this.logger.debug("consumer::resume()", a(this, Ns, Cr)), a(this, Os)) {
|
|
24755
|
+
this.logger.error("Consumer::resume() | Consumer closed", a(this, Ns, Cr));
|
|
24748
24756
|
return;
|
|
24749
24757
|
}
|
|
24750
24758
|
m(this, Bi, false), this.track.enabled = true, this.safeEmit("resume");
|
|
24751
24759
|
}
|
|
24752
24760
|
}
|
|
24753
|
-
dc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), Zd = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakSet(),
|
|
24761
|
+
dc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), Zd = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakSet(), Cr = function() {
|
|
24754
24762
|
return {
|
|
24755
24763
|
consumer: {
|
|
24756
24764
|
id: this.id,
|
|
@@ -24760,19 +24768,19 @@ dc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Os = /*
|
|
|
24760
24768
|
}
|
|
24761
24769
|
};
|
|
24762
24770
|
}, lc = /* @__PURE__ */ new WeakSet(), Xu = function() {
|
|
24763
|
-
this.logger.debug('Consumer::track "ended" event', a(this, Ns,
|
|
24771
|
+
this.logger.debug('Consumer::track "ended" event', a(this, Ns, Cr)), this.safeEmit("trackended");
|
|
24764
24772
|
}, el = /* @__PURE__ */ new WeakSet(), Jf = function() {
|
|
24765
24773
|
this.track.addEventListener("ended", V(this, lc, Xu).bind(this));
|
|
24766
24774
|
}, tl = /* @__PURE__ */ new WeakSet(), Kf = function() {
|
|
24767
24775
|
try {
|
|
24768
24776
|
this.track.removeEventListener("ended", V(this, lc, Xu)), this.track.stop();
|
|
24769
24777
|
} catch (e) {
|
|
24770
|
-
this.logger.error("Consumer::destroyTrack()", B(D({}, a(this, Ns,
|
|
24778
|
+
this.logger.error("Consumer::destroyTrack()", B(D({}, a(this, Ns, Cr)), {
|
|
24771
24779
|
error: e
|
|
24772
24780
|
}));
|
|
24773
24781
|
}
|
|
24774
24782
|
};
|
|
24775
|
-
var hs, Pn, Cn, qi, es,
|
|
24783
|
+
var hs, Pn, Cn, qi, es, et, Fr, Rn, sl, Ft, os;
|
|
24776
24784
|
class Z0 extends Kl {
|
|
24777
24785
|
constructor(e, r) {
|
|
24778
24786
|
var i, n;
|
|
@@ -24788,20 +24796,20 @@ class Z0 extends Kl {
|
|
|
24788
24796
|
g(this, Cn, void 0);
|
|
24789
24797
|
g(this, qi, void 0);
|
|
24790
24798
|
g(this, es, false);
|
|
24791
|
-
g(this,
|
|
24792
|
-
g(this,
|
|
24799
|
+
g(this, et, void 0);
|
|
24800
|
+
g(this, Fr, void 0);
|
|
24793
24801
|
g(this, Rn, void 0);
|
|
24794
24802
|
g(this, sl, void 0);
|
|
24795
|
-
this.id = r.id, this.localId = r.localId, m(this,
|
|
24803
|
+
this.id = r.id, this.localId = r.localId, m(this, et, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, m(this, Fr, r.disableTrackOnPause ? !((n = r.track) != null && n.enabled) : false), m(this, Rn, void 0), m(this, Pn, r.stopTracks), m(this, Cn, r.disableTrackOnPause), m(this, qi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), m(this, hs, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), m(this, sl, e);
|
|
24796
24804
|
}
|
|
24797
24805
|
get closed() {
|
|
24798
24806
|
return a(this, es);
|
|
24799
24807
|
}
|
|
24800
24808
|
get track() {
|
|
24801
|
-
return a(this,
|
|
24809
|
+
return a(this, et);
|
|
24802
24810
|
}
|
|
24803
24811
|
get paused() {
|
|
24804
|
-
return a(this,
|
|
24812
|
+
return a(this, Fr);
|
|
24805
24813
|
}
|
|
24806
24814
|
get maxSpatialLayer() {
|
|
24807
24815
|
return a(this, Rn);
|
|
@@ -24826,14 +24834,14 @@ class Z0 extends Kl {
|
|
|
24826
24834
|
});
|
|
24827
24835
|
}
|
|
24828
24836
|
pause() {
|
|
24829
|
-
this.logger.debug("Producer::pause()", a(this, Ft, os)), a(this, es) && this.logger.error("Producer::pause() | Producer closed", a(this, Ft, os)), m(this,
|
|
24837
|
+
this.logger.debug("Producer::pause()", a(this, Ft, os)), a(this, es) && this.logger.error("Producer::pause() | Producer closed", a(this, Ft, os)), m(this, Fr, true), a(this, et) && a(this, Cn) && (a(this, et).enabled = false), a(this, qi) && a(this, hs).replaceTrack(this.localId, null), this.emit("pause");
|
|
24830
24838
|
}
|
|
24831
24839
|
resume() {
|
|
24832
24840
|
if (this.logger.debug("Producer::resume()", a(this, Ft, os)), a(this, es)) {
|
|
24833
24841
|
this.logger.error("Producer::resume() | Producer closed", a(this, Ft, os));
|
|
24834
24842
|
return;
|
|
24835
24843
|
}
|
|
24836
|
-
m(this,
|
|
24844
|
+
m(this, Fr, false), a(this, et) && a(this, Cn) && (a(this, et).enabled = true), a(this, qi) && a(this, hs).replaceTrack(this.localId, a(this, et)), this.emit("resume");
|
|
24837
24845
|
}
|
|
24838
24846
|
replaceTrack(r) {
|
|
24839
24847
|
return l(this, arguments, function* ({
|
|
@@ -24851,11 +24859,11 @@ class Z0 extends Kl {
|
|
|
24851
24859
|
throw new At("closed");
|
|
24852
24860
|
} else if (e && e.readyState === "ended")
|
|
24853
24861
|
throw new At("track ended");
|
|
24854
|
-
if (e === a(this,
|
|
24862
|
+
if (e === a(this, et)) {
|
|
24855
24863
|
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this, Ft, os));
|
|
24856
24864
|
return;
|
|
24857
24865
|
}
|
|
24858
|
-
(!a(this, qi) || !a(this,
|
|
24866
|
+
(!a(this, qi) || !a(this, Fr)) && (yield a(this, hs).replaceTrack(this.localId, e)), this._destroyTrack(), m(this, et, e), this._handleTrack();
|
|
24859
24867
|
});
|
|
24860
24868
|
}
|
|
24861
24869
|
setMaxSpatialLayer(e) {
|
|
@@ -24882,13 +24890,13 @@ class Z0 extends Kl {
|
|
|
24882
24890
|
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, a(this, Ft, os)), this.safeEmit("trackended", this.track.id);
|
|
24883
24891
|
}
|
|
24884
24892
|
_handleTrack() {
|
|
24885
|
-
a(this,
|
|
24893
|
+
a(this, et) && a(this, et).addEventListener("ended", this._onTrackEnded);
|
|
24886
24894
|
}
|
|
24887
24895
|
_destroyTrack() {
|
|
24888
24896
|
var e;
|
|
24889
|
-
if (a(this,
|
|
24897
|
+
if (a(this, et))
|
|
24890
24898
|
try {
|
|
24891
|
-
a(this,
|
|
24899
|
+
a(this, et).removeEventListener("ended", this._onTrackEnded), a(this, Pn) && a(this, et).stop();
|
|
24892
24900
|
} catch (r) {
|
|
24893
24901
|
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, B(D({}, a(this, Ft, os)), {
|
|
24894
24902
|
error: r
|
|
@@ -24896,7 +24904,7 @@ class Z0 extends Kl {
|
|
|
24896
24904
|
}
|
|
24897
24905
|
}
|
|
24898
24906
|
}
|
|
24899
|
-
hs = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(),
|
|
24907
|
+
hs = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Fr = /* @__PURE__ */ new WeakMap(), Rn = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakSet(), os = function() {
|
|
24900
24908
|
return {
|
|
24901
24909
|
producer: {
|
|
24902
24910
|
id: this.id,
|
|
@@ -24923,14 +24931,14 @@ function Yf(s) {
|
|
|
24923
24931
|
var t, e;
|
|
24924
24932
|
return eD(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
|
|
24925
24933
|
}
|
|
24926
|
-
var
|
|
24934
|
+
var Hr, rl, ji;
|
|
24927
24935
|
const Na = class extends ut.EventEmitter {
|
|
24928
24936
|
constructor(e, r, i, n) {
|
|
24929
24937
|
super();
|
|
24930
24938
|
h(this, "channel");
|
|
24931
24939
|
h(this, "queue");
|
|
24932
24940
|
h(this, "serverProtocolVersion");
|
|
24933
|
-
g(this,
|
|
24941
|
+
g(this, Hr, /* @__PURE__ */ new Map());
|
|
24934
24942
|
g(this, rl, void 0);
|
|
24935
24943
|
g(this, ji, void 0);
|
|
24936
24944
|
h(this, "respond", (e2, r2, i2 = false) => {
|
|
@@ -24983,11 +24991,11 @@ const Na = class extends ut.EventEmitter {
|
|
|
24983
24991
|
});
|
|
24984
24992
|
h(this, "processMessage", (e2) => {
|
|
24985
24993
|
var i2;
|
|
24986
|
-
a(this,
|
|
24987
|
-
const r2 = a(this,
|
|
24994
|
+
a(this, Hr).has(e2.id) || a(this, Hr).set(e2.id, []);
|
|
24995
|
+
const r2 = a(this, Hr).get(e2.id);
|
|
24988
24996
|
if (r2[e2.chunkIndex] = e2, (r2 == null ? void 0 : r2.length) === e2.count && !r2.some((n2) => n2 === void 0)) {
|
|
24989
|
-
const n2 = a(this,
|
|
24990
|
-
a(this,
|
|
24997
|
+
const n2 = a(this, Hr).get(e2.id), o = n2 == null ? void 0 : n2.reduce((d, u) => d + u.chunk, "");
|
|
24998
|
+
a(this, Hr).delete(e2.id);
|
|
24991
24999
|
const c = JSON.parse(o);
|
|
24992
25000
|
if (!c.payload || !zf(c.payload))
|
|
24993
25001
|
throw new Error("corrupted incoming message over dc", {
|
|
@@ -25011,7 +25019,7 @@ const Na = class extends ut.EventEmitter {
|
|
|
25011
25019
|
}
|
|
25012
25020
|
};
|
|
25013
25021
|
let li = Na;
|
|
25014
|
-
|
|
25022
|
+
Hr = /* @__PURE__ */ new WeakMap(), rl = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), h(li, "createRequest", (e) => {
|
|
25015
25023
|
var r;
|
|
25016
25024
|
if ((r = e.payload) != null && r._bolt)
|
|
25017
25025
|
throw new Error("rpc fields are internal values");
|
|
@@ -25905,13 +25913,13 @@ wn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25905
25913
|
break;
|
|
25906
25914
|
case "disconnected":
|
|
25907
25915
|
a(this, zi)[r] = setTimeout(() => l(this, null, function* () {
|
|
25908
|
-
yield V(this, fc, sh).call(this, e.direction);
|
|
25916
|
+
this.logger.warn(`${r} transport is in disconnected state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield V(this, fc, sh).call(this, e.direction);
|
|
25909
25917
|
}), rD);
|
|
25910
25918
|
break;
|
|
25911
25919
|
case "failed":
|
|
25912
25920
|
if (e.closed)
|
|
25913
25921
|
return;
|
|
25914
|
-
o(), yield V(this, fc, sh).call(this, e.direction);
|
|
25922
|
+
o(), this.logger.warn(`${r} transport is in failed state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield V(this, fc, sh).call(this, e.direction);
|
|
25915
25923
|
break;
|
|
25916
25924
|
}
|
|
25917
25925
|
})), e.on("icecandidate", (n) => l(this, null, function* () {
|
|
@@ -26295,7 +26303,7 @@ class qh {
|
|
|
26295
26303
|
});
|
|
26296
26304
|
}
|
|
26297
26305
|
}
|
|
26298
|
-
var Yi,
|
|
26306
|
+
var Yi, Br, Dn, Tc, ps, ul, sr, On, Ec, ih, hl, iS, pl, aS, gl, nS, ml, oS;
|
|
26299
26307
|
class oD extends iD {
|
|
26300
26308
|
constructor(e, r, i) {
|
|
26301
26309
|
super(e, r, i);
|
|
@@ -26305,7 +26313,7 @@ class oD extends iD {
|
|
|
26305
26313
|
g(this, gl);
|
|
26306
26314
|
g(this, ml);
|
|
26307
26315
|
g(this, Yi, void 0);
|
|
26308
|
-
g(this,
|
|
26316
|
+
g(this, Br, void 0);
|
|
26309
26317
|
g(this, Dn, void 0);
|
|
26310
26318
|
g(this, Tc, void 0);
|
|
26311
26319
|
g(this, ps, void 0);
|
|
@@ -26343,7 +26351,7 @@ class oD extends iD {
|
|
|
26343
26351
|
return a(this, Yi);
|
|
26344
26352
|
}
|
|
26345
26353
|
get consumers() {
|
|
26346
|
-
return a(this,
|
|
26354
|
+
return a(this, Br);
|
|
26347
26355
|
}
|
|
26348
26356
|
get producerIdToConsumerIdMap() {
|
|
26349
26357
|
return a(this, Dn);
|
|
@@ -26352,7 +26360,7 @@ class oD extends iD {
|
|
|
26352
26360
|
return this.context.getValue("logger");
|
|
26353
26361
|
}
|
|
26354
26362
|
reset() {
|
|
26355
|
-
m(this, Yi, /* @__PURE__ */ new Map()), m(this,
|
|
26363
|
+
m(this, Yi, /* @__PURE__ */ new Map()), m(this, Br, /* @__PURE__ */ new Map()), m(this, Dn, /* @__PURE__ */ new Map());
|
|
26356
26364
|
}
|
|
26357
26365
|
createProducer(e, r) {
|
|
26358
26366
|
return l(this, null, function* () {
|
|
@@ -26412,7 +26420,7 @@ class oD extends iD {
|
|
|
26412
26420
|
});
|
|
26413
26421
|
}
|
|
26414
26422
|
closeAllConsumers() {
|
|
26415
|
-
return this.closeConsumers(Array.from(a(this,
|
|
26423
|
+
return this.closeConsumers(Array.from(a(this, Br).keys()));
|
|
26416
26424
|
}
|
|
26417
26425
|
switchConsumersToLayer(e, r) {
|
|
26418
26426
|
return l(this, null, function* () {
|
|
@@ -26420,7 +26428,7 @@ class oD extends iD {
|
|
|
26420
26428
|
});
|
|
26421
26429
|
}
|
|
26422
26430
|
}
|
|
26423
|
-
Yi = /* @__PURE__ */ new WeakMap(),
|
|
26431
|
+
Yi = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), ps = /* @__PURE__ */ new WeakMap(), ul = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), Ec = /* @__PURE__ */ new WeakSet(), ih = function() {
|
|
26424
26432
|
return l(this, null, function* () {
|
|
26425
26433
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
26426
26434
|
throw new Error("Recv transport is closed");
|
|
@@ -26507,8 +26515,8 @@ Yi = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), Dn = /*
|
|
|
26507
26515
|
kind: e.kind,
|
|
26508
26516
|
appData: e.appData
|
|
26509
26517
|
}
|
|
26510
|
-
}), a(this,
|
|
26511
|
-
})), a(this,
|
|
26518
|
+
}), a(this, Br).delete(e.id), this.context.getValue("peerSessionStore").emit(b.CONSUMER_CLOSED, { id: e.id });
|
|
26519
|
+
})), a(this, Br).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(b.NEW_CONSUMER, {
|
|
26512
26520
|
id: e.id,
|
|
26513
26521
|
appData: e.appData,
|
|
26514
26522
|
peerId: e.peerId
|
|
@@ -26591,7 +26599,7 @@ _c = /* @__PURE__ */ new WeakMap(), Pc = /* @__PURE__ */ new WeakMap(), Cc = /*
|
|
|
26591
26599
|
return e;
|
|
26592
26600
|
}, g(Co, vl), g(Co, yl);
|
|
26593
26601
|
const cD = 60, dD = 400;
|
|
26594
|
-
var ir, ar, fs,
|
|
26602
|
+
var ir, ar, fs, qr, jr, Un, Zi, $n, nr, Gr, Fn, ea, El, hS, kc, ah, _l, pS, Pl, gS;
|
|
26595
26603
|
const Lo = class {
|
|
26596
26604
|
constructor(t, e) {
|
|
26597
26605
|
g(this, El);
|
|
@@ -26599,16 +26607,16 @@ const Lo = class {
|
|
|
26599
26607
|
g(this, ir, void 0);
|
|
26600
26608
|
g(this, ar, void 0);
|
|
26601
26609
|
g(this, fs, void 0);
|
|
26602
|
-
g(this, Br, void 0);
|
|
26603
26610
|
g(this, qr, void 0);
|
|
26611
|
+
g(this, jr, void 0);
|
|
26604
26612
|
g(this, Un, void 0);
|
|
26605
26613
|
g(this, Zi, void 0);
|
|
26606
26614
|
g(this, $n, void 0);
|
|
26607
26615
|
g(this, nr, void 0);
|
|
26608
|
-
g(this,
|
|
26616
|
+
g(this, Gr, void 0);
|
|
26609
26617
|
g(this, Fn, void 0);
|
|
26610
26618
|
g(this, ea, void 0);
|
|
26611
|
-
this.reportRequest = e, m(this,
|
|
26619
|
+
this.reportRequest = e, m(this, qr, new AudioContext()), m(this, jr, a(this, qr).createAnalyser()), a(this, jr).fftSize = 2048, m(this, $n, new Co()), m(this, ea, t);
|
|
26612
26620
|
}
|
|
26613
26621
|
get logger() {
|
|
26614
26622
|
return a(this, ea).getValue("logger");
|
|
@@ -26619,7 +26627,7 @@ const Lo = class {
|
|
|
26619
26627
|
set audioTrack(t) {
|
|
26620
26628
|
m(this, Un, t);
|
|
26621
26629
|
const e = new MediaStream();
|
|
26622
|
-
e.addTrack(a(this, Un)), a(this,
|
|
26630
|
+
e.addTrack(a(this, Un)), a(this, qr).createMediaStreamSource(e).connect(a(this, jr));
|
|
26623
26631
|
}
|
|
26624
26632
|
start() {
|
|
26625
26633
|
this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${a(this, fs)}`), a(this, ir) && clearInterval$1(a(this, ir)), m(this, ir, setInterval$1(() => l(this, null, function* () {
|
|
@@ -26643,21 +26651,21 @@ const Lo = class {
|
|
|
26643
26651
|
}
|
|
26644
26652
|
};
|
|
26645
26653
|
let Ro = Lo;
|
|
26646
|
-
ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(),
|
|
26654
|
+
ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), jr = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), El = /* @__PURE__ */ new WeakSet(), hS = function() {
|
|
26647
26655
|
var o;
|
|
26648
|
-
a(this,
|
|
26656
|
+
a(this, qr).state === "suspended" && a(this, qr).resume().then(() => {
|
|
26649
26657
|
this.logger.debug("AudioActivityReporter: AudioContext forced resumed");
|
|
26650
26658
|
}).catch((c) => {
|
|
26651
26659
|
this.logger.error("AudioActivityReporter: Error resuming AudioContext", c);
|
|
26652
26660
|
});
|
|
26653
|
-
const t = new Float32Array(a(this,
|
|
26654
|
-
a(this,
|
|
26661
|
+
const t = new Float32Array(a(this, jr).frequencyBinCount);
|
|
26662
|
+
a(this, jr).getFloatTimeDomainData(t);
|
|
26655
26663
|
const { energy: e, isVoice: r } = a(this, $n).processAudioChunk(t), i = V(o = Lo, Pl, gS).call(o, e);
|
|
26656
26664
|
return a(this, ea).getValue("flagsmith").hasFeature(Z.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
|
|
26657
26665
|
`AudioActivityReporter: producer: ${a(this, fs)}, energy: ${a(this, Zi)},
|
|
26658
26666
|
slogScale: ${i}, isVoice: ${r}, minEnergy: ${a(this, nr)},
|
|
26659
|
-
maxEnergy: ${a(this,
|
|
26660
|
-
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: false } : ((!a(this, nr) || i < a(this, nr)) && m(this, nr, i), (!a(this,
|
|
26667
|
+
maxEnergy: ${a(this, Gr)}`
|
|
26668
|
+
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: false } : ((!a(this, nr) || i < a(this, nr)) && m(this, nr, i), (!a(this, Gr) || i > a(this, Gr)) && m(this, Gr, i), { energy: (i - a(this, nr)) / (a(this, Gr) - a(this, nr)) * 10 || 0, isVoice: r });
|
|
26661
26669
|
}, kc = /* @__PURE__ */ new WeakSet(), ah = function(t) {
|
|
26662
26670
|
return t < 5;
|
|
26663
26671
|
}, _l = /* @__PURE__ */ new WeakSet(), pS = function(t = a(this, Zi)) {
|
|
@@ -26737,10 +26745,10 @@ var hD = Object.defineProperty, pD = Object.getOwnPropertyDescriptor, le = (s, t
|
|
|
26737
26745
|
return r && i && hD(t, e, i), i;
|
|
26738
26746
|
};
|
|
26739
26747
|
const Nt = ["video/VP9", "video/VP8"];
|
|
26740
|
-
var Ic, Ac, dt, G, Hn, Ss, yt, ta, sa, ra, Mc, ss, or, Dc, ia, aa, Tt, kt,
|
|
26748
|
+
var Ic, Ac, dt, G, Hn, Ss, yt, ta, sa, ra, Mc, ss, or, Dc, ia, aa, Tt, kt, Wr, ka, Cl, fS, Rl, SS, wl, vS, Oc, nh, bl, vu, yS, kl, TS, Il, ES, Al, _S, tt, gt, na, wo, Ml, PS, Dl, CS, Ol, RS;
|
|
26741
26749
|
const mS = (vu = class {
|
|
26742
26750
|
constructor(s, t, e) {
|
|
26743
|
-
g(this,
|
|
26751
|
+
g(this, Wr);
|
|
26744
26752
|
g(this, Cl);
|
|
26745
26753
|
g(this, Rl);
|
|
26746
26754
|
g(this, wl);
|
|
@@ -26748,7 +26756,7 @@ const mS = (vu = class {
|
|
|
26748
26756
|
g(this, kl);
|
|
26749
26757
|
g(this, Il);
|
|
26750
26758
|
g(this, Al);
|
|
26751
|
-
g(this,
|
|
26759
|
+
g(this, tt);
|
|
26752
26760
|
g(this, na);
|
|
26753
26761
|
g(this, Ml);
|
|
26754
26762
|
g(this, Dl);
|
|
@@ -26790,7 +26798,7 @@ const mS = (vu = class {
|
|
|
26790
26798
|
a(this, G).socketHandler.audioActivity.bind(a(this, G).socketHandler)
|
|
26791
26799
|
)), this.e2ee = (n = (i = s.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : false, this.handleSocketEvents(), this.handleCallstatsEvents(), m(this, Mc, bh(
|
|
26792
26800
|
() => l(this, null, function* () {
|
|
26793
|
-
if (!a(this,
|
|
26801
|
+
if (!a(this, Wr, ka).mediaJoinAttempted)
|
|
26794
26802
|
return;
|
|
26795
26803
|
const { roomJoined: o } = yield this.joinRoom(
|
|
26796
26804
|
a(this, Ac),
|
|
@@ -26814,17 +26822,17 @@ const mS = (vu = class {
|
|
|
26814
26822
|
return this.context.getValue("logger");
|
|
26815
26823
|
}
|
|
26816
26824
|
get mediaJoined() {
|
|
26817
|
-
return a(this,
|
|
26825
|
+
return a(this, Wr, ka).mediaJoined;
|
|
26818
26826
|
}
|
|
26819
26827
|
set mediaJoined(s) {
|
|
26820
|
-
a(this,
|
|
26828
|
+
a(this, Wr, ka).mediaJoined = s;
|
|
26821
26829
|
}
|
|
26822
26830
|
reset() {
|
|
26823
26831
|
a(this, G).closeAllProducers(), a(this, G).closeAllConsumers(), a(this, Tt).clear(), a(this, or).clear(), m(this, ss, null), a(this, ra).stop(), a(this, G).stopAllTransports(), a(this, G).reset(), m(this, ra, new Qu());
|
|
26824
26832
|
}
|
|
26825
26833
|
joinRoom(n, o) {
|
|
26826
26834
|
return l(this, arguments, function* (s, t, e = false, r = false, i = {}) {
|
|
26827
|
-
a(this,
|
|
26835
|
+
a(this, Wr, ka).mediaJoinAttempted = true, m(this, ta, true), e && this.reset();
|
|
26828
26836
|
try {
|
|
26829
26837
|
return yield a(this, ra).push(
|
|
26830
26838
|
() => V(this, Cl, fS).call(this, s, t, r, i),
|
|
@@ -26852,7 +26860,7 @@ const mS = (vu = class {
|
|
|
26852
26860
|
leaveRoom() {
|
|
26853
26861
|
return l(this, null, function* () {
|
|
26854
26862
|
var t;
|
|
26855
|
-
a(this, G).stopAllTransports(), m(this, sa, false), a(this,
|
|
26863
|
+
a(this, G).stopAllTransports(), m(this, sa, false), a(this, Wr, ka).mediaJoinAttempted = false;
|
|
26856
26864
|
const s = {
|
|
26857
26865
|
closeRoom: false
|
|
26858
26866
|
};
|
|
@@ -26897,7 +26905,7 @@ const mS = (vu = class {
|
|
|
26897
26905
|
}
|
|
26898
26906
|
_shareWebcam(s, t) {
|
|
26899
26907
|
return l(this, null, function* () {
|
|
26900
|
-
const e = t === "video/VP9" ? pe.WEBCAM : pe.WEBCAM_BACKUP, r = V(this,
|
|
26908
|
+
const e = t === "video/VP9" ? pe.WEBCAM : pe.WEBCAM_BACKUP, r = V(this, tt, gt).call(this, e);
|
|
26901
26909
|
if (r) {
|
|
26902
26910
|
const p = yield r;
|
|
26903
26911
|
if (a(this, G).producers.has(p)) {
|
|
@@ -26990,7 +26998,7 @@ const mS = (vu = class {
|
|
|
26990
26998
|
try {
|
|
26991
26999
|
if (s === void 0)
|
|
26992
27000
|
throw new At("track undefined");
|
|
26993
|
-
const t = V(this,
|
|
27001
|
+
const t = V(this, tt, gt).call(this, pe.MIC);
|
|
26994
27002
|
if (t) {
|
|
26995
27003
|
const n = yield t;
|
|
26996
27004
|
if (a(this, G).producers.has(n)) {
|
|
@@ -27021,7 +27029,7 @@ const mS = (vu = class {
|
|
|
27021
27029
|
pauseMic() {
|
|
27022
27030
|
return l(this, null, function* () {
|
|
27023
27031
|
var r;
|
|
27024
|
-
const s = yield V(this,
|
|
27032
|
+
const s = yield V(this, tt, gt).call(this, pe.MIC), t = a(this, G).producers.get(s);
|
|
27025
27033
|
if (!t) {
|
|
27026
27034
|
this.logger.error("pauseMic::could_not_find_mic_producer");
|
|
27027
27035
|
return;
|
|
@@ -27043,7 +27051,7 @@ const mS = (vu = class {
|
|
|
27043
27051
|
}
|
|
27044
27052
|
pauseWebcam() {
|
|
27045
27053
|
return l(this, null, function* () {
|
|
27046
|
-
const s = yield V(this,
|
|
27054
|
+
const s = yield V(this, tt, gt).call(this, pe.WEBCAM), t = yield V(this, tt, gt).call(this, pe.WEBCAM_BACKUP), e = a(this, G).producers.get(s), r = a(this, G).producers.get(t);
|
|
27047
27055
|
if (!e && !r) {
|
|
27048
27056
|
this.logger.error("pauseWebcam::could_not_find_webcam_producer");
|
|
27049
27057
|
return;
|
|
@@ -27063,7 +27071,7 @@ const mS = (vu = class {
|
|
|
27063
27071
|
}
|
|
27064
27072
|
resumeMic() {
|
|
27065
27073
|
return l(this, null, function* () {
|
|
27066
|
-
const s = yield V(this,
|
|
27074
|
+
const s = yield V(this, tt, gt).call(this, pe.MIC), t = a(this, G).producers.get(s);
|
|
27067
27075
|
if (!t) {
|
|
27068
27076
|
this.logger.error("resumeMic::could_not_find_mic_producer");
|
|
27069
27077
|
return;
|
|
@@ -27085,7 +27093,7 @@ const mS = (vu = class {
|
|
|
27085
27093
|
}
|
|
27086
27094
|
resumeWebcam() {
|
|
27087
27095
|
return l(this, arguments, function* (s = pe.WEBCAM) {
|
|
27088
|
-
const t = yield V(this,
|
|
27096
|
+
const t = yield V(this, tt, gt).call(this, s), e = a(this, G).producers.get(t);
|
|
27089
27097
|
if (!e) {
|
|
27090
27098
|
this.logger.error("resumeWebcam::could_not_find_webcam_producer");
|
|
27091
27099
|
return;
|
|
@@ -27107,21 +27115,21 @@ const mS = (vu = class {
|
|
|
27107
27115
|
}
|
|
27108
27116
|
disableWebcam(s) {
|
|
27109
27117
|
return l(this, null, function* () {
|
|
27110
|
-
const t = s === "video/VP9" ? pe.WEBCAM : pe.WEBCAM_BACKUP, e = yield V(this,
|
|
27118
|
+
const t = s === "video/VP9" ? pe.WEBCAM : pe.WEBCAM_BACKUP, e = yield V(this, tt, gt).call(this, t);
|
|
27111
27119
|
V(this, Ml, PS).call(this, t), e && (yield a(this, G).closeProducer(e));
|
|
27112
27120
|
});
|
|
27113
27121
|
}
|
|
27114
27122
|
disableMic() {
|
|
27115
27123
|
return l(this, null, function* () {
|
|
27116
27124
|
var t;
|
|
27117
|
-
const s = yield V(this,
|
|
27125
|
+
const s = yield V(this, tt, gt).call(this, pe.MIC);
|
|
27118
27126
|
s && (yield a(this, G).closeProducer(s)), (t = a(this, kt)) == null || t.stop(), a(this, Tt).delete(pe.MIC);
|
|
27119
27127
|
});
|
|
27120
27128
|
}
|
|
27121
27129
|
disableScreenShare() {
|
|
27122
27130
|
return l(this, null, function* () {
|
|
27123
27131
|
this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop();
|
|
27124
|
-
const s = yield V(this,
|
|
27132
|
+
const s = yield V(this, tt, gt).call(this, pe.SCREENSHARE_VIDEO), t = yield V(this, tt, gt).call(this, pe.SCREENSHARE_AUDIO);
|
|
27125
27133
|
s && (yield a(this, G).closeProducer(s)), t && (yield a(this, G).closeProducer(t)), a(this, or).clear(), a(this, Tt).delete(pe.SCREENSHARE_VIDEO), a(this, Tt).delete(pe.SCREENSHARE_AUDIO);
|
|
27126
27134
|
});
|
|
27127
27135
|
}
|
|
@@ -27137,11 +27145,11 @@ const mS = (vu = class {
|
|
|
27137
27145
|
resetVideoProducers(s, t) {
|
|
27138
27146
|
return l(this, null, function* () {
|
|
27139
27147
|
if (s) {
|
|
27140
|
-
const e = yield V(this,
|
|
27148
|
+
const e = yield V(this, tt, gt).call(this, pe.WEBCAM), r = yield V(this, tt, gt).call(this, pe.WEBCAM_BACKUP);
|
|
27141
27149
|
yield a(this, G).closeProducer(e, { stopTrack: false }), yield a(this, G).closeProducer(r, { stopTrack: false }), this.shareWebcam(s);
|
|
27142
27150
|
}
|
|
27143
27151
|
if (t) {
|
|
27144
|
-
const e = yield V(this,
|
|
27152
|
+
const e = yield V(this, tt, gt).call(this, pe.SCREENSHARE_VIDEO);
|
|
27145
27153
|
yield a(this, G).closeProducer(
|
|
27146
27154
|
e,
|
|
27147
27155
|
{ stopTrack: false }
|
|
@@ -27402,7 +27410,7 @@ const mS = (vu = class {
|
|
|
27402
27410
|
t.delete(s), !(t.size !== 0 || e === Nt[0]) && this.disableWebcam(e);
|
|
27403
27411
|
}));
|
|
27404
27412
|
}
|
|
27405
|
-
}, Ic = /* @__PURE__ */ new WeakMap(), Ac = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(),
|
|
27413
|
+
}, Ic = /* @__PURE__ */ new WeakMap(), Ac = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakSet(), ka = function() {
|
|
27406
27414
|
return this.context.getValue("connectionHandler");
|
|
27407
27415
|
}, Cl = /* @__PURE__ */ new WeakSet(), fS = function(s, t, e, r) {
|
|
27408
27416
|
return l(this, null, function* () {
|
|
@@ -27515,7 +27523,7 @@ const mS = (vu = class {
|
|
|
27515
27523
|
this.logger.warn("Failed to precreate producers", { error: e });
|
|
27516
27524
|
}
|
|
27517
27525
|
});
|
|
27518
|
-
},
|
|
27526
|
+
}, tt = /* @__PURE__ */ new WeakSet(), gt = function(s) {
|
|
27519
27527
|
return a(this, Tt).get(s);
|
|
27520
27528
|
}, na = /* @__PURE__ */ new WeakSet(), wo = function(s, t) {
|
|
27521
27529
|
return a(this, Tt).set(s, t);
|
|
@@ -27661,18 +27669,18 @@ var gD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Pa = (s, t
|
|
|
27661
27669
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
27662
27670
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27663
27671
|
return r && i && gD(t, e, i), i;
|
|
27664
|
-
},
|
|
27672
|
+
}, Jr, vs, te, Et, Vt, $g;
|
|
27665
27673
|
const kS = ($g = class {
|
|
27666
27674
|
constructor(s, t, e, r) {
|
|
27667
27675
|
g(this, Et);
|
|
27668
27676
|
h(this, "self");
|
|
27669
27677
|
h(this, "authToken");
|
|
27670
|
-
g(this,
|
|
27678
|
+
g(this, Jr, void 0);
|
|
27671
27679
|
h(this, "viewType");
|
|
27672
27680
|
g(this, vs, void 0);
|
|
27673
27681
|
g(this, te, void 0);
|
|
27674
27682
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
27675
|
-
this.self = t, m(this, te, s), this.viewType = r, this.authToken = n, m(this,
|
|
27683
|
+
this.self = t, m(this, te, s), this.viewType = r, this.authToken = n, m(this, Jr, i), m(this, vs, e), t.config.viewType !== Mt.Chat && this.setupEvents();
|
|
27676
27684
|
}
|
|
27677
27685
|
get peerId() {
|
|
27678
27686
|
return a(this, te).getValue("peerId");
|
|
@@ -27688,7 +27696,7 @@ const kS = ($g = class {
|
|
|
27688
27696
|
}
|
|
27689
27697
|
static init(s, t, e, r, i) {
|
|
27690
27698
|
return l(this, null, function* () {
|
|
27691
|
-
const n = lt(), o = s.getValue("peerId"), c = !!s.getValue("cachedUserDetails"), d = yield
|
|
27699
|
+
const n = lt(), o = s.getValue("peerId"), c = !!s.getValue("cachedUserDetails"), d = yield Xe.__init__(
|
|
27692
27700
|
s,
|
|
27693
27701
|
e,
|
|
27694
27702
|
r,
|
|
@@ -27805,7 +27813,7 @@ const kS = ($g = class {
|
|
|
27805
27813
|
if (this.self.roomState === "disconnected")
|
|
27806
27814
|
return;
|
|
27807
27815
|
let { peerId: t } = this;
|
|
27808
|
-
s && a(this, te).getValue("flagsmith").hasFeature(Z.REFRESH_ID_ON_DISCONNECTION) && (t = v4()), a(this,
|
|
27816
|
+
s && a(this, te).getValue("flagsmith").hasFeature(Z.REFRESH_ID_ON_DISCONNECTION) && (t = v4()), a(this, Jr).updateURL(t), a(this, te).getValue("telemetry").resetPeerId(t), lt().setHeader("dyte-tracing-id", t), ur.remapContext(t, a(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
27809
27817
|
}), a(this, te).getValue("peerSessionStore").on(b.SOCKET_SERVICE_FAILED, () => {
|
|
27810
27818
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
27811
27819
|
}), a(this, vs).on(x.waitingRoomRequestAccepted, () => {
|
|
@@ -27873,7 +27881,7 @@ const kS = ($g = class {
|
|
|
27873
27881
|
var t, e;
|
|
27874
27882
|
if (s === "rejected") {
|
|
27875
27883
|
try {
|
|
27876
|
-
(t = a(this,
|
|
27884
|
+
(t = a(this, Jr)) == null || t.disconnect();
|
|
27877
27885
|
} catch (r) {
|
|
27878
27886
|
this.logger.error("SelfController::leaveRoom::socketDisconnect");
|
|
27879
27887
|
}
|
|
@@ -27882,7 +27890,7 @@ const kS = ($g = class {
|
|
|
27882
27890
|
}
|
|
27883
27891
|
this.self.setIsPinned(false), a(this, te).setValue("stageStatus", "OFF_STAGE", false), yield this.leaveMediaRoom(s), a(this, te).notify("stageStatus");
|
|
27884
27892
|
try {
|
|
27885
|
-
(e = a(this,
|
|
27893
|
+
(e = a(this, Jr)) == null || e.disconnect();
|
|
27886
27894
|
} catch (r) {
|
|
27887
27895
|
this.logger.error("SelfController::leaveRoom::socketDisconnect");
|
|
27888
27896
|
}
|
|
@@ -27906,7 +27914,7 @@ const kS = ($g = class {
|
|
|
27906
27914
|
return;
|
|
27907
27915
|
}
|
|
27908
27916
|
wS(a(this, te), o, {
|
|
27909
|
-
socket: a(this,
|
|
27917
|
+
socket: a(this, Jr),
|
|
27910
27918
|
peerId: t
|
|
27911
27919
|
});
|
|
27912
27920
|
}
|
|
@@ -27940,7 +27948,7 @@ const kS = ($g = class {
|
|
|
27940
27948
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
27941
27949
|
});
|
|
27942
27950
|
}
|
|
27943
|
-
},
|
|
27951
|
+
}, Jr = /* @__PURE__ */ new WeakMap(), vs = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakSet(), Vt = function() {
|
|
27944
27952
|
return a(this, te).getValue("roomNodeClient");
|
|
27945
27953
|
}, $g);
|
|
27946
27954
|
let ai = kS;
|
|
@@ -29072,33 +29080,33 @@ class US {
|
|
|
29072
29080
|
function VD(s, t) {
|
|
29073
29081
|
return Math.floor(Math.random() * (t - s + 1) + s);
|
|
29074
29082
|
}
|
|
29075
|
-
var
|
|
29083
|
+
var Rr;
|
|
29076
29084
|
class xD {
|
|
29077
29085
|
constructor(t = {}) {
|
|
29078
|
-
bD(this, "opts"), Se(this,
|
|
29086
|
+
bD(this, "opts"), Se(this, Rr, void 0), this.opts = {
|
|
29079
29087
|
initialTimeout: t.initialTimeout || 1e3,
|
|
29080
29088
|
maxTimeout: t.maxTimeout || 1e4,
|
|
29081
29089
|
factor: t.factor || 2
|
|
29082
|
-
}, ne(this,
|
|
29090
|
+
}, ne(this, Rr, 0);
|
|
29083
29091
|
}
|
|
29084
29092
|
wait() {
|
|
29085
29093
|
return l(this, null, function* () {
|
|
29086
|
-
ne(this,
|
|
29087
|
-
const t = VD(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Xh(2, M(this,
|
|
29094
|
+
ne(this, Rr, M(this, Rr) + 1);
|
|
29095
|
+
const t = VD(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Xh(2, M(this, Rr))));
|
|
29088
29096
|
yield new Promise((e) => {
|
|
29089
29097
|
setTimeout(e, t);
|
|
29090
29098
|
});
|
|
29091
29099
|
});
|
|
29092
29100
|
}
|
|
29093
29101
|
getAttempts() {
|
|
29094
|
-
return M(this,
|
|
29102
|
+
return M(this, Rr);
|
|
29095
29103
|
}
|
|
29096
29104
|
reset() {
|
|
29097
|
-
ne(this,
|
|
29105
|
+
ne(this, Rr, 0);
|
|
29098
29106
|
}
|
|
29099
29107
|
}
|
|
29100
|
-
|
|
29101
|
-
const
|
|
29108
|
+
Rr = /* @__PURE__ */ new WeakMap();
|
|
29109
|
+
const _r = {
|
|
29102
29110
|
debug: 0,
|
|
29103
29111
|
info: 1,
|
|
29104
29112
|
warn: 2,
|
|
@@ -29110,28 +29118,28 @@ class UD {
|
|
|
29110
29118
|
Se(this, ui, void 0), Se(this, hi, void 0), ne(this, ui, console), ne(this, hi, t);
|
|
29111
29119
|
}
|
|
29112
29120
|
debug(...t) {
|
|
29113
|
-
|
|
29121
|
+
_r[M(this, hi)] > _r.debug || M(this, ui).debug("[Sockrates]:", ...t);
|
|
29114
29122
|
}
|
|
29115
29123
|
info(...t) {
|
|
29116
|
-
|
|
29124
|
+
_r[M(this, hi)] > _r.info || M(this, ui).info("[Sockrates]:", ...t);
|
|
29117
29125
|
}
|
|
29118
29126
|
warn(...t) {
|
|
29119
|
-
|
|
29127
|
+
_r[M(this, hi)] > _r.warn || M(this, ui).warn("[Sockrates]:", ...t);
|
|
29120
29128
|
}
|
|
29121
29129
|
error(...t) {
|
|
29122
|
-
|
|
29130
|
+
_r[M(this, hi)] > _r.error || M(this, ui).error("[Sockrates]:", ...t);
|
|
29123
29131
|
}
|
|
29124
29132
|
}
|
|
29125
29133
|
ui = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap();
|
|
29126
29134
|
var $S = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))($S || {});
|
|
29127
29135
|
const $D = "2", FD = "3";
|
|
29128
|
-
var Ae, Ia, Ee, Ue,
|
|
29136
|
+
var Ae, Ia, Ee, Ue, wr, Ye, lr, Xr, Ts, Aa, Hs, oh, FS, bo, _d, ch, HS, dh, yg, Ud, lh, uh, BS, Mo, Pd, Do, $d, Fd, hh, $a, Oo, No, Hd;
|
|
29129
29137
|
class HD {
|
|
29130
29138
|
constructor(t, e) {
|
|
29131
29139
|
var F;
|
|
29132
|
-
Se(this, oh), Se(this, bo), Se(this, ch), Se(this, dh), Se(this, Ud), Se(this, uh), Se(this, Mo), Se(this, Do), Se(this, Fd), Se(this, $a), Se(this, No), Se(this, Ae, void 0), Se(this, Ia, void 0), Se(this, Ee, void 0), Se(this, Ue, void 0), Se(this,
|
|
29140
|
+
Se(this, oh), Se(this, bo), Se(this, ch), Se(this, dh), Se(this, Ud), Se(this, uh), Se(this, Mo), Se(this, Do), Se(this, Fd), Se(this, $a), Se(this, No), Se(this, Ae, void 0), Se(this, Ia, void 0), Se(this, Ee, void 0), Se(this, Ue, void 0), Se(this, wr, void 0), Se(this, Ye, void 0), Se(this, lr, void 0), Se(this, Xr, void 0), Se(this, Ts, void 0), Se(this, Aa, void 0), Se(this, Hs, void 0);
|
|
29133
29141
|
var r, i, n, o, c, d, u, p, f;
|
|
29134
|
-
ne(this, Ia, t), ne(this,
|
|
29142
|
+
ne(this, Ia, t), ne(this, wr, []), ne(this, Ye, new xd()), ne(this, lr, true), ne(this, Ts, false), ne(this, Ee, e != null ? e : {}), (r = M(this, Ee)).autoReconnect != null || (r.autoReconnect = true), (i = M(this, Ee)).retryConnectionInterval != null || (i.retryConnectionInterval = 1e3), (n = M(this, Ee)).pingTimeout != null || (n.pingTimeout = 3e4), (o = M(this, Ee)).connectionTimeout != null || (o.connectionTimeout = 5e3), (c = M(this, Ee)).debug != null || (c.debug = true), (d = M(this, Ee)).maxReconnectionAttempts != null || (d.maxReconnectionAttempts = 10), (u = M(this, Ee)).disconnectOnPingTimeout != null || (u.disconnectOnPingTimeout = true), (p = M(this, Ee)).queueOnDisconnect != null || (p.queueOnDisconnect = false), (f = M(this, Ee)).flushOnReconnect != null || (f.flushOnReconnect = false), ne(this, Xr, {
|
|
29135
29143
|
code: void 0,
|
|
29136
29144
|
reason: void 0
|
|
29137
29145
|
}), ne(this, Ue, (F = M(this, Ee).logger) != null ? F : new UD(M(this, Ee).debug ? "debug" : "info")), ne(this, Hs, new xD());
|
|
@@ -29150,15 +29158,15 @@ class HD {
|
|
|
29150
29158
|
return M(this, Ee);
|
|
29151
29159
|
}
|
|
29152
29160
|
get sendQueue() {
|
|
29153
|
-
return M(this,
|
|
29161
|
+
return M(this, wr);
|
|
29154
29162
|
}
|
|
29155
29163
|
flush() {
|
|
29156
29164
|
if (!M(this, Ee).queueOnDisconnect)
|
|
29157
29165
|
return false;
|
|
29158
29166
|
const t = [];
|
|
29159
|
-
return M(this,
|
|
29167
|
+
return M(this, wr).forEach((e) => {
|
|
29160
29168
|
this.send(e.event, e.id, e.payload, e.metadata) || t.push(e);
|
|
29161
|
-
}), ne(this,
|
|
29169
|
+
}), ne(this, wr, t), M(this, wr);
|
|
29162
29170
|
}
|
|
29163
29171
|
connect(t = false) {
|
|
29164
29172
|
return l(this, null, function* () {
|
|
@@ -29175,15 +29183,15 @@ class HD {
|
|
|
29175
29183
|
try {
|
|
29176
29184
|
ne(this, Ae, new WebSocket(_e(this, oh, FS).call(this, M(this, Ia)))), M(this, Ae).binaryType = "arraybuffer", M(this, Ue).debug("Connecting");
|
|
29177
29185
|
const i = setTimeout(() => {
|
|
29178
|
-
M(this, Ue).debug("Connection timeout. Closing socket"), ne(this, lr, true), _e(this, No, Hd).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Ee).autoReconnect && !M(this, Ts) && (M(this,
|
|
29186
|
+
M(this, Ue).debug("Connection timeout. Closing socket"), ne(this, lr, true), _e(this, No, Hd).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Ee).autoReconnect && !M(this, Ts) && (M(this, Ye).emit(
|
|
29179
29187
|
"reconnecting"
|
|
29180
29188
|
), _e(this, Mo, Pd).call(this)), r(new Error("Connection timed out!"));
|
|
29181
29189
|
}, M(this, Ee).connectionTimeout);
|
|
29182
29190
|
M(this, Ae).onopen = () => {
|
|
29183
|
-
M(this, Ue).debug(`Ready State: ${$S[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Fd, hh).call(this), ne(this,
|
|
29191
|
+
M(this, Ue).debug(`Ready State: ${$S[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Fd, hh).call(this), ne(this, Xr, {
|
|
29184
29192
|
code: void 0,
|
|
29185
29193
|
reason: void 0
|
|
29186
|
-
}), M(this,
|
|
29194
|
+
}), M(this, Ye).emit(
|
|
29187
29195
|
"connected"
|
|
29188
29196
|
), M(this, Ee).flushOnReconnect && this.flush(), e();
|
|
29189
29197
|
}, M(this, Ae).onclose = (n) => {
|
|
@@ -29206,7 +29214,7 @@ class HD {
|
|
|
29206
29214
|
send(t, e, r, i) {
|
|
29207
29215
|
const n = { event: t, id: e, payload: r, metadata: i };
|
|
29208
29216
|
if (M(this, Ee).queueOnDisconnect && (!M(this, Ae) || M(this, Ae).readyState !== 1))
|
|
29209
|
-
return M(this, Ue).debug("Queuing message since socket is not connected!", n), M(this,
|
|
29217
|
+
return M(this, Ue).debug("Queuing message since socket is not connected!", n), M(this, wr).push(n), false;
|
|
29210
29218
|
const o = US.encode(n);
|
|
29211
29219
|
return _e(this, Do, $d).call(this, o);
|
|
29212
29220
|
}
|
|
@@ -29217,40 +29225,40 @@ class HD {
|
|
|
29217
29225
|
return _e(this, Do, $d).call(this, t);
|
|
29218
29226
|
}
|
|
29219
29227
|
receive(t, e) {
|
|
29220
|
-
return M(this,
|
|
29228
|
+
return M(this, Ye).on(t.toString(), e);
|
|
29221
29229
|
}
|
|
29222
29230
|
on(t, e) {
|
|
29223
29231
|
if (typeof t == "string" && (t === "connected" || t === "disconnected" || t === "errored" || t === "reconnected" || t === "reconnecting" || t === "reconnectAttempt" || t === "reconnectFailure" || t === "failed")) {
|
|
29224
|
-
M(this,
|
|
29232
|
+
M(this, Ye).on(t, e);
|
|
29225
29233
|
return;
|
|
29226
29234
|
}
|
|
29227
29235
|
this.receive(t, e);
|
|
29228
29236
|
}
|
|
29229
29237
|
removeAllListeners() {
|
|
29230
|
-
M(this,
|
|
29238
|
+
M(this, Ye).removeAllListeners();
|
|
29231
29239
|
}
|
|
29232
29240
|
removeReceiver(t, e) {
|
|
29233
29241
|
this.removeListener(t, e);
|
|
29234
29242
|
}
|
|
29235
29243
|
removeListener(t, e) {
|
|
29236
|
-
M(this,
|
|
29244
|
+
M(this, Ye).removeListener(t.toString(), e);
|
|
29237
29245
|
}
|
|
29238
29246
|
removeReceivers(t) {
|
|
29239
29247
|
this.removeListeners(t);
|
|
29240
29248
|
}
|
|
29241
29249
|
removeListeners(t) {
|
|
29242
|
-
M(this,
|
|
29250
|
+
M(this, Ye).listeners(t.toString()).map(
|
|
29243
29251
|
(e) => this.removeListener(t, e)
|
|
29244
29252
|
);
|
|
29245
29253
|
}
|
|
29246
29254
|
disconnect() {
|
|
29247
|
-
ne(this, lr, false), _e(this, $a, Oo).call(this), this.removeAllListeners(), ne(this,
|
|
29255
|
+
ne(this, lr, false), _e(this, $a, Oo).call(this), this.removeAllListeners(), ne(this, Xr, {
|
|
29248
29256
|
code: 1e3,
|
|
29249
29257
|
reason: "Sockrates disconnect method called"
|
|
29250
29258
|
}), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
|
|
29251
29259
|
}
|
|
29252
29260
|
}
|
|
29253
|
-
Ae = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(),
|
|
29261
|
+
Ae = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Aa = /* @__PURE__ */ new WeakMap(), Hs = /* @__PURE__ */ new WeakMap(), oh = /* @__PURE__ */ new WeakSet(), FS = function(s) {
|
|
29254
29262
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
29255
29263
|
return s;
|
|
29256
29264
|
if (s.startsWith("https://"))
|
|
@@ -29259,21 +29267,21 @@ Ae = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Ee = /*
|
|
|
29259
29267
|
return `ws://${s.substring(7)}`;
|
|
29260
29268
|
throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
|
|
29261
29269
|
}, bo = /* @__PURE__ */ new WeakSet(), _d = function(s, t) {
|
|
29262
|
-
M(this, Ue).error("Error:", { error: s }), M(this,
|
|
29270
|
+
M(this, Ue).error("Error:", { error: s }), M(this, Ye).emit("errored", { error: s }), t == null || t(s);
|
|
29263
29271
|
}, ch = /* @__PURE__ */ new WeakSet(), HS = function(s) {
|
|
29264
29272
|
if (_e(this, Fd, hh).call(this), s.data === $D) {
|
|
29265
29273
|
M(this, Ue).debug("Received ping from server"), _e(this, Do, $d).call(this, FD);
|
|
29266
29274
|
return;
|
|
29267
29275
|
}
|
|
29268
29276
|
const t = US.decode(s.data), { id: e, payload: r } = t;
|
|
29269
|
-
M(this, Ue).debug("Received message", { event: t.event, messageID: e }), M(this,
|
|
29277
|
+
M(this, Ue).debug("Received message", { event: t.event, messageID: e }), M(this, Ye).emit(t.event.toString(), { id: e, payload: r });
|
|
29270
29278
|
}, dh = /* @__PURE__ */ new WeakSet(), yg = function() {
|
|
29271
29279
|
return M(this, Ae).readyState === 1;
|
|
29272
29280
|
}, Ud = /* @__PURE__ */ new WeakSet(), lh = function(s, t) {
|
|
29273
|
-
ne(this,
|
|
29281
|
+
ne(this, Xr, { reason: t, code: s }), M(this, Ye).emit("disconnected", { code: s, reason: t });
|
|
29274
29282
|
}, uh = /* @__PURE__ */ new WeakSet(), BS = function() {
|
|
29275
|
-
const { reason: s, code: t } = M(this,
|
|
29276
|
-
t && t !== 1e3 && M(this, lr) && M(this, Ee).autoReconnect && !M(this, Ts) && (M(this, Ue).debug(`Triggering reconnection due to ${s}.`), M(this,
|
|
29283
|
+
const { reason: s, code: t } = M(this, Xr);
|
|
29284
|
+
t && t !== 1e3 && M(this, lr) && M(this, Ee).autoReconnect && !M(this, Ts) && (M(this, Ue).debug(`Triggering reconnection due to ${s}.`), M(this, Ye).emit(
|
|
29277
29285
|
"reconnecting"
|
|
29278
29286
|
), _e(this, Mo, Pd).call(this));
|
|
29279
29287
|
}, Mo = /* @__PURE__ */ new WeakSet(), Pd = function(s = true) {
|
|
@@ -29283,7 +29291,7 @@ Ae = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Ee = /*
|
|
|
29283
29291
|
return;
|
|
29284
29292
|
}
|
|
29285
29293
|
if (M(this, Ts) || M(this, Hs).reset(), M(this, Ee).maxReconnectionAttempts !== null && M(this, Hs).getAttempts() >= M(this, Ee).maxReconnectionAttempts) {
|
|
29286
|
-
M(this,
|
|
29294
|
+
M(this, Ye).emit(
|
|
29287
29295
|
"failed"
|
|
29288
29296
|
), ne(this, Ts, false);
|
|
29289
29297
|
return;
|
|
@@ -29292,16 +29300,16 @@ Ae = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Ee = /*
|
|
|
29292
29300
|
try {
|
|
29293
29301
|
if (yield M(this, Hs).wait(), M(this, lr) === false)
|
|
29294
29302
|
return;
|
|
29295
|
-
if (M(this, Ue).debug(`Reconnection attempt ${M(this, Hs).getAttempts()}`), M(this,
|
|
29303
|
+
if (M(this, Ue).debug(`Reconnection attempt ${M(this, Hs).getAttempts()}`), M(this, Ye).emit("reconnectAttempt", { attempt: M(this, Hs).getAttempts() }), yield this.connect(), !_e(this, dh, yg).call(this))
|
|
29296
29304
|
throw Error("Reconnect Failed");
|
|
29297
|
-
ne(this, Ts, false), ne(this,
|
|
29305
|
+
ne(this, Ts, false), ne(this, Xr, {
|
|
29298
29306
|
code: void 0,
|
|
29299
29307
|
reason: void 0
|
|
29300
|
-
}), M(this,
|
|
29308
|
+
}), M(this, Ye).emit(
|
|
29301
29309
|
"reconnected"
|
|
29302
29310
|
);
|
|
29303
29311
|
} catch (t) {
|
|
29304
|
-
M(this, Ue).debug("Failed to reconnect."), M(this,
|
|
29312
|
+
M(this, Ue).debug("Failed to reconnect."), M(this, Ye).emit("reconnectFailure", { attempt: M(this, Hs).getAttempts() }), _e(this, Mo, Pd).call(this, false);
|
|
29305
29313
|
}
|
|
29306
29314
|
});
|
|
29307
29315
|
}, Do = /* @__PURE__ */ new WeakSet(), $d = function(s) {
|
|
@@ -29328,7 +29336,7 @@ var BD = Object.defineProperty, qD = Object.getOwnPropertyDescriptor, Ql = (s, t
|
|
|
29328
29336
|
return r && i && BD(t, e, i), i;
|
|
29329
29337
|
};
|
|
29330
29338
|
const Tg = 65535, jD = 3e3;
|
|
29331
|
-
var
|
|
29339
|
+
var Kr, Ce, Re, De, rs, st, Uc, ph, $c, gh, Fg;
|
|
29332
29340
|
const qS = (Fg = class {
|
|
29333
29341
|
constructor(s, {
|
|
29334
29342
|
peerId: t,
|
|
@@ -29339,17 +29347,17 @@ const qS = (Fg = class {
|
|
|
29339
29347
|
g(this, Re);
|
|
29340
29348
|
g(this, Uc);
|
|
29341
29349
|
g(this, $c);
|
|
29342
|
-
g(this,
|
|
29350
|
+
g(this, Kr, void 0);
|
|
29343
29351
|
g(this, Ce, void 0);
|
|
29344
29352
|
h(this, "roomName");
|
|
29345
29353
|
h(this, "authToken");
|
|
29346
29354
|
h(this, "capabilities");
|
|
29347
29355
|
g(this, rs, void 0);
|
|
29348
|
-
g(this,
|
|
29356
|
+
g(this, st, void 0);
|
|
29349
29357
|
var n;
|
|
29350
29358
|
if (!t || !e || !r)
|
|
29351
29359
|
throw new R("peerId, meetingId, or authToken can not be empty", "0404");
|
|
29352
|
-
m(this, rs, void 0), m(this,
|
|
29360
|
+
m(this, rs, void 0), m(this, st, s), this.capabilities = i, this.roomName = e, this.authToken = r, m(this, Kr, V(this, Uc, ph).call(this, t)), m(this, Ce, new HD(a(this, Kr), {
|
|
29353
29361
|
autoReconnect: true,
|
|
29354
29362
|
disconnectOnPingTimeout: (n = i.includes("PING")) != null ? n : false,
|
|
29355
29363
|
queueOnDisconnect: true,
|
|
@@ -29364,22 +29372,22 @@ const qS = (Fg = class {
|
|
|
29364
29372
|
a(this, Re, De).socketJoinAttempted = s;
|
|
29365
29373
|
}
|
|
29366
29374
|
get telemetry() {
|
|
29367
|
-
return a(this,
|
|
29375
|
+
return a(this, st).getValue("telemetry");
|
|
29368
29376
|
}
|
|
29369
29377
|
get logger() {
|
|
29370
|
-
return a(this,
|
|
29378
|
+
return a(this, st).getValue("logger");
|
|
29371
29379
|
}
|
|
29372
29380
|
get peerId() {
|
|
29373
|
-
return a(this,
|
|
29381
|
+
return a(this, st).getValue("peerId");
|
|
29374
29382
|
}
|
|
29375
29383
|
updateURL(s) {
|
|
29376
|
-
s !== this.peerId && (m(this,
|
|
29384
|
+
s !== this.peerId && (m(this, Kr, V(this, Uc, ph).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), a(this, Ce).updateURL(a(this, Kr));
|
|
29377
29385
|
}
|
|
29378
29386
|
static getSocketEdgeDomain(s) {
|
|
29379
29387
|
return la({ servicePrefix: "socket-edge", baseURI: s });
|
|
29380
29388
|
}
|
|
29381
29389
|
get url() {
|
|
29382
|
-
return a(this,
|
|
29390
|
+
return a(this, Kr);
|
|
29383
29391
|
}
|
|
29384
29392
|
connect() {
|
|
29385
29393
|
return l(this, null, function* () {
|
|
@@ -29408,7 +29416,7 @@ const qS = (Fg = class {
|
|
|
29408
29416
|
}
|
|
29409
29417
|
sendMessage(s, t, e) {
|
|
29410
29418
|
const r = {};
|
|
29411
|
-
return a(this,
|
|
29419
|
+
return a(this, st).getValue("telemetry").injectContext(r), a(this, Ce).send(
|
|
29412
29420
|
s,
|
|
29413
29421
|
e != null ? e : V(this, $c, gh).call(this),
|
|
29414
29422
|
t,
|
|
@@ -29444,7 +29452,7 @@ const qS = (Fg = class {
|
|
|
29444
29452
|
P
|
|
29445
29453
|
);
|
|
29446
29454
|
}, u = r != null ? r : V(this, $c, gh).call(this), p = {};
|
|
29447
|
-
a(this,
|
|
29455
|
+
a(this, st).getValue("telemetry").injectContext(p);
|
|
29448
29456
|
const S = ({
|
|
29449
29457
|
id: _,
|
|
29450
29458
|
payload: P
|
|
@@ -29504,13 +29512,13 @@ const qS = (Fg = class {
|
|
|
29504
29512
|
var i;
|
|
29505
29513
|
this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: T.location.country });
|
|
29506
29514
|
const { recv: e, send: r } = (i = a(this, Re, De).mediaState) != null ? i : {};
|
|
29507
|
-
e != null && e.state && (e == null ? void 0 : e.state) !== xa.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== xa.CONNECTED ? a(this,
|
|
29515
|
+
e != null && e.state && (e == null ? void 0 : e.state) !== xa.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== xa.CONNECTED ? a(this, st).getValue("peerSessionStore").emit(
|
|
29508
29516
|
b.SOCKET_SERVICE_DISCONNECTED,
|
|
29509
29517
|
{
|
|
29510
29518
|
joinAttempted: a(this, Re, De).joinAttempted
|
|
29511
29519
|
}
|
|
29512
29520
|
) : m(this, rs, setTimeout(() => {
|
|
29513
|
-
a(this,
|
|
29521
|
+
a(this, st).getValue("peerSessionStore").emit(
|
|
29514
29522
|
b.SOCKET_SERVICE_DISCONNECTED,
|
|
29515
29523
|
{ joinAttempted: a(this, Re, De).joinAttempted }
|
|
29516
29524
|
), m(this, rs, void 0);
|
|
@@ -29530,18 +29538,18 @@ const qS = (Fg = class {
|
|
|
29530
29538
|
}
|
|
29531
29539
|
}), a(this, Re, De).updateSocketConnectionState("reconnectFailure", s);
|
|
29532
29540
|
}), this.onStateEvent("reconnected", () => l(this, null, function* () {
|
|
29533
|
-
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, Re, De).mediaJoinAttempted } }), a(this, rs) && (clearTimeout(a(this, rs)), m(this, rs, void 0)), a(this,
|
|
29541
|
+
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, Re, De).mediaJoinAttempted } }), a(this, rs) && (clearTimeout(a(this, rs)), m(this, rs, void 0)), a(this, st).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_RECONNECTED, {
|
|
29534
29542
|
wasJoinAttempted: a(this, Re, De).mediaJoinAttempted
|
|
29535
29543
|
}), a(this, Re, De).updateSocketConnectionState("reconnected");
|
|
29536
29544
|
})), this.onStateEvent("failed", () => l(this, null, function* () {
|
|
29537
|
-
this.logger.info("SocketService::Failed to connect to socket-edge", { country: T.location.country }), a(this,
|
|
29545
|
+
this.logger.info("SocketService::Failed to connect to socket-edge", { country: T.location.country }), a(this, st).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_FAILED), a(this, Re, De).updateSocketConnectionState("failed");
|
|
29538
29546
|
}));
|
|
29539
29547
|
}
|
|
29540
|
-
},
|
|
29541
|
-
return a(this,
|
|
29542
|
-
}, rs = /* @__PURE__ */ new WeakMap(),
|
|
29543
|
-
let t = qS.getSocketEdgeDomain(a(this,
|
|
29544
|
-
typeof Wn(a(this,
|
|
29548
|
+
}, Kr = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakSet(), De = function() {
|
|
29549
|
+
return a(this, st).getValue("connectionHandler");
|
|
29550
|
+
}, rs = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Uc = /* @__PURE__ */ new WeakSet(), ph = function(s) {
|
|
29551
|
+
let t = qS.getSocketEdgeDomain(a(this, st).getValue("baseURI"));
|
|
29552
|
+
typeof Wn(a(this, st), "socket_server_base") == "string" && (t = Wn(a(this, st), "socket_server_base"));
|
|
29545
29553
|
const e = `wss://${t}`, r = new URL(`${e}/ws`), i = this.peerId, n = B(D({
|
|
29546
29554
|
roomID: this.roomName,
|
|
29547
29555
|
peerID: s,
|
|
@@ -30065,13 +30073,13 @@ const Ma = class {
|
|
|
30065
30073
|
}
|
|
30066
30074
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
30067
30075
|
return l(this, null, function* () {
|
|
30068
|
-
var $e,
|
|
30076
|
+
var $e, Tr, Er;
|
|
30069
30077
|
const c = t.getValue("modules"), { participant: d } = e, u = t.getValue("defaults"), p = t.getValue("logger"), { sfu: f } = t.getValue("roomNodeOptions"), { viewType: S, mediaConstraints: { audio: E } } = n;
|
|
30070
30078
|
t.setValue("viewType", S), t.setValue("defaults", D({
|
|
30071
30079
|
mediaConfiguration: {
|
|
30072
30080
|
audio: {
|
|
30073
30081
|
enableHighBitrate: ($e = E.enableHighBitrate) != null ? $e : false,
|
|
30074
|
-
enableStereo: (
|
|
30082
|
+
enableStereo: (Tr = E.enableStereo) != null ? Tr : false
|
|
30075
30083
|
}
|
|
30076
30084
|
}
|
|
30077
30085
|
}, u)), t.setValue("maxPreferredStreams", Te.isMobile() ? n.maxVideoStreams.mobile : n.maxVideoStreams.desktop);
|
|
@@ -30080,7 +30088,7 @@ const Ma = class {
|
|
|
30080
30088
|
s
|
|
30081
30089
|
);
|
|
30082
30090
|
t.setValue("connectedMeetingsSocketHandler", Je);
|
|
30083
|
-
const Is = new zl(t, s),
|
|
30091
|
+
const Is = new zl(t, s), yr = new as(t, s), ni = new PD(s), I = new IS(t, s), y = new CD(t, s), C = new fD(s), U = new ga(t, s), ie = yield ai.init(
|
|
30084
30092
|
t,
|
|
30085
30093
|
I,
|
|
30086
30094
|
d,
|
|
@@ -30095,14 +30103,14 @@ const Ma = class {
|
|
|
30095
30103
|
re,
|
|
30096
30104
|
i
|
|
30097
30105
|
);
|
|
30098
|
-
if (c.participant && (F = new
|
|
30106
|
+
if (c.participant && (F = new vr(
|
|
30099
30107
|
t,
|
|
30100
30108
|
ie.self,
|
|
30101
30109
|
I,
|
|
30102
30110
|
f
|
|
30103
|
-
)), (
|
|
30111
|
+
)), (Er = c.e2ee) != null && Er.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield _s.init(
|
|
30104
30112
|
t,
|
|
30105
|
-
|
|
30113
|
+
yr,
|
|
30106
30114
|
U,
|
|
30107
30115
|
ie.self,
|
|
30108
30116
|
F.participants
|
|
@@ -30136,7 +30144,7 @@ const Ma = class {
|
|
|
30136
30144
|
t,
|
|
30137
30145
|
$s,
|
|
30138
30146
|
y,
|
|
30139
|
-
|
|
30147
|
+
yr,
|
|
30140
30148
|
P == null ? void 0 : P.chat,
|
|
30141
30149
|
ie.self,
|
|
30142
30150
|
F.participants,
|
|
@@ -30263,15 +30271,15 @@ function eO(s, t) {
|
|
|
30263
30271
|
throw new R("Invalid auth token", "0004");
|
|
30264
30272
|
}
|
|
30265
30273
|
}
|
|
30266
|
-
var
|
|
30274
|
+
var zr, oa, ca, Fc, Nl, WS;
|
|
30267
30275
|
class tO {
|
|
30268
30276
|
constructor() {
|
|
30269
30277
|
g(this, Nl);
|
|
30270
|
-
g(this,
|
|
30278
|
+
g(this, zr, new Audio());
|
|
30271
30279
|
g(this, oa, new MediaStream());
|
|
30272
30280
|
g(this, ca, /* @__PURE__ */ new Map());
|
|
30273
30281
|
g(this, Fc, void 0);
|
|
30274
|
-
a(this,
|
|
30282
|
+
a(this, zr).srcObject = a(this, oa), a(this, zr).autoplay = true;
|
|
30275
30283
|
}
|
|
30276
30284
|
playTracks(t) {
|
|
30277
30285
|
return l(this, null, function* () {
|
|
@@ -30281,7 +30289,7 @@ class tO {
|
|
|
30281
30289
|
});
|
|
30282
30290
|
}
|
|
30283
30291
|
setSpeakerDevice(t) {
|
|
30284
|
-
typeof HTMLAudioElement.prototype.setSinkId == "function" && a(this,
|
|
30292
|
+
typeof HTMLAudioElement.prototype.setSinkId == "function" && a(this, zr).setSinkId(t);
|
|
30285
30293
|
}
|
|
30286
30294
|
removeTrack(t) {
|
|
30287
30295
|
const e = a(this, ca).get(t);
|
|
@@ -30289,7 +30297,7 @@ class tO {
|
|
|
30289
30297
|
}
|
|
30290
30298
|
play() {
|
|
30291
30299
|
return l(this, null, function* () {
|
|
30292
|
-
return a(this,
|
|
30300
|
+
return a(this, zr).srcObject = a(this, oa), a(this, zr).play().catch((t) => {
|
|
30293
30301
|
V(this, Nl, WS).call(this, t);
|
|
30294
30302
|
});
|
|
30295
30303
|
});
|
|
@@ -30298,7 +30306,7 @@ class tO {
|
|
|
30298
30306
|
m(this, Fc, t);
|
|
30299
30307
|
}
|
|
30300
30308
|
}
|
|
30301
|
-
|
|
30309
|
+
zr = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), Fc = /* @__PURE__ */ new WeakMap(), Nl = /* @__PURE__ */ new WeakSet(), WS = function(t) {
|
|
30302
30310
|
var e;
|
|
30303
30311
|
(e = a(this, Fc)) == null || e.call(this, t);
|
|
30304
30312
|
};
|
|
@@ -30322,15 +30330,15 @@ var rO = Object.defineProperty, iO = Object.getOwnPropertyDescriptor, eu = (s, t
|
|
|
30322
30330
|
for (var i = r > 1 ? void 0 : r ? iO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
30323
30331
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
30324
30332
|
return r && i && rO(t, e, i), i;
|
|
30325
|
-
}, We,
|
|
30326
|
-
let
|
|
30333
|
+
}, We, Yr, Bg;
|
|
30334
|
+
let ri = (Bg = class {
|
|
30327
30335
|
constructor(t, e) {
|
|
30328
30336
|
g(this, We, void 0);
|
|
30329
|
-
g(this,
|
|
30330
|
-
m(this,
|
|
30337
|
+
g(this, Yr, void 0);
|
|
30338
|
+
m(this, Yr, t), m(this, We, e);
|
|
30331
30339
|
}
|
|
30332
30340
|
get peerId() {
|
|
30333
|
-
return a(this,
|
|
30341
|
+
return a(this, Yr).getValue("peerId");
|
|
30334
30342
|
}
|
|
30335
30343
|
static initMedia(t = {}, e = false, r = void 0) {
|
|
30336
30344
|
var d;
|
|
@@ -30347,7 +30355,7 @@ let si = (Bg = class {
|
|
|
30347
30355
|
Te.init();
|
|
30348
30356
|
const { mediaHandler: e } = (E = t.defaults) != null ? E : {}, r = (e == null ? void 0 : e.peerId) || ((P = (_ = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : _.peerId) != null ? P : v4()), { authToken: i, baseURI: n } = t, k = eO(i, n), { meetingId: o } = k, c = po(k, ["meetingId"]);
|
|
30349
30357
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = true;
|
|
30350
|
-
const d =
|
|
30358
|
+
const d = ri.setupContext(
|
|
30351
30359
|
r,
|
|
30352
30360
|
t,
|
|
30353
30361
|
o,
|
|
@@ -30364,7 +30372,7 @@ let si = (Bg = class {
|
|
|
30364
30372
|
${($ = t.authToken) == null ? void 0 : $.slice(-10)}`
|
|
30365
30373
|
})
|
|
30366
30374
|
});
|
|
30367
|
-
const f = yield Qc.init(d), S = new
|
|
30375
|
+
const f = yield Qc.init(d), S = new ri(d, f);
|
|
30368
30376
|
return d.setValue("meeting", S), S;
|
|
30369
30377
|
});
|
|
30370
30378
|
}
|
|
@@ -30375,7 +30383,7 @@ let si = (Bg = class {
|
|
|
30375
30383
|
video: true
|
|
30376
30384
|
};
|
|
30377
30385
|
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", yC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
30378
|
-
})), n.setValue("cachedUserDetails", Ps(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.4
|
|
30386
|
+
})), n.setValue("cachedUserDetails", Ps(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.4"), (u = e.modules) != null && u.experimentalAudioPlayback && n.setValue("audioPlayback", new sO()), n;
|
|
30379
30387
|
}
|
|
30380
30388
|
join() {
|
|
30381
30389
|
return l(this, null, function* () {
|
|
@@ -30386,7 +30394,7 @@ let si = (Bg = class {
|
|
|
30386
30394
|
leave(t) {
|
|
30387
30395
|
return l(this, null, function* () {
|
|
30388
30396
|
var r;
|
|
30389
|
-
Eg.cleanup(), a(this,
|
|
30397
|
+
Eg.cleanup(), a(this, Yr).getValue("peerSessionStore").reset(), (r = a(this, Yr).getValue("roomSocketHandler")) == null || r.cleanup();
|
|
30390
30398
|
const { selfController: e } = a(this, We);
|
|
30391
30399
|
return e.leaveRoom(t);
|
|
30392
30400
|
});
|
|
@@ -30439,7 +30447,7 @@ let si = (Bg = class {
|
|
|
30439
30447
|
return a(this, We).storesManager;
|
|
30440
30448
|
}
|
|
30441
30449
|
get audio() {
|
|
30442
|
-
return a(this,
|
|
30450
|
+
return a(this, Yr).getValue("audioPlayback");
|
|
30443
30451
|
}
|
|
30444
30452
|
get __internals__() {
|
|
30445
30453
|
var t;
|
|
@@ -30455,28 +30463,28 @@ let si = (Bg = class {
|
|
|
30455
30463
|
return this.leave(t);
|
|
30456
30464
|
});
|
|
30457
30465
|
}
|
|
30458
|
-
}, We = /* @__PURE__ */ new WeakMap(),
|
|
30466
|
+
}, We = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Bg);
|
|
30459
30467
|
eu([
|
|
30460
30468
|
ht("0002"),
|
|
30461
|
-
|
|
30469
|
+
Sr.executeWithLock({
|
|
30462
30470
|
methodName: "meeting.join",
|
|
30463
30471
|
lockName: "DyteClient.join",
|
|
30464
30472
|
timeout: 3e3
|
|
30465
30473
|
})
|
|
30466
|
-
],
|
|
30474
|
+
], ri.prototype, "join", 1);
|
|
30467
30475
|
eu([
|
|
30468
30476
|
ht("0003")
|
|
30469
|
-
],
|
|
30477
|
+
], ri.prototype, "leave", 1);
|
|
30470
30478
|
eu([
|
|
30471
30479
|
ht("0001"),
|
|
30472
|
-
|
|
30480
|
+
Sr.executeWithLock({
|
|
30473
30481
|
methodName: "DyteClient.init",
|
|
30474
30482
|
lockName: "DyteClient.init",
|
|
30475
30483
|
timeout: 3e3
|
|
30476
30484
|
})
|
|
30477
|
-
],
|
|
30478
|
-
|
|
30485
|
+
], ri, "init", 1);
|
|
30486
|
+
ri = eu([
|
|
30479
30487
|
ht("0000")
|
|
30480
|
-
],
|
|
30481
|
-
const aO =
|
|
30488
|
+
], ri);
|
|
30489
|
+
const aO = ri;
|
|
30482
30490
|
export { aO as default };
|