@cloudflare/realtimekit-react 1.1.5-staging.2 → 1.1.5
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/index.cjs.js +10 -10
- package/dist/index.es.js +282 -286
- package/package.json +4 -3
package/dist/index.es.js
CHANGED
|
@@ -5765,7 +5765,7 @@ class Pm extends ut {
|
|
|
5765
5765
|
}) || e[e.length - 1];
|
|
5766
5766
|
}
|
|
5767
5767
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
5768
|
-
var P, k, A, N, H, $, F, K, re, Je,
|
|
5768
|
+
var P, k, A, N, H, $, F, K, re, Je, ks, Er, ni;
|
|
5769
5769
|
const c = e, d = new _m(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
5770
5770
|
for (const I of c.values()) {
|
|
5771
5771
|
if (u) {
|
|
@@ -6029,7 +6029,7 @@ class Pm extends ut {
|
|
|
6029
6029
|
}), _.set(C, {
|
|
6030
6030
|
score: +(w.score * 10).toFixed(),
|
|
6031
6031
|
packetsLostPercentage: kd({
|
|
6032
|
-
packetsLost: (w.packetsLost || 0) - (((
|
|
6032
|
+
packetsLost: (w.packetsLost || 0) - (((ks = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ks.packetsLost) || 0),
|
|
6033
6033
|
packetsReceived: (w.packetsReceived || 0) - (((Er = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Er.packetsReceived) || 0)
|
|
6034
6034
|
}),
|
|
6035
6035
|
jitter: w.jitter || 0,
|
|
@@ -6398,7 +6398,7 @@ class Cm extends Pm {
|
|
|
6398
6398
|
};
|
|
6399
6399
|
}
|
|
6400
6400
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
6401
|
-
var P, k, A, N, H, $, F, K, re, Je,
|
|
6401
|
+
var P, k, A, N, H, $, F, K, re, Je, ks, Er, ni;
|
|
6402
6402
|
const c = e, d = new _m(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
6403
6403
|
for (const I of c.values()) {
|
|
6404
6404
|
if (u) {
|
|
@@ -6662,7 +6662,7 @@ class Cm extends Pm {
|
|
|
6662
6662
|
}), _.set(C, {
|
|
6663
6663
|
score: +(w.score * 10).toFixed(),
|
|
6664
6664
|
packetsLostPercentage: kd({
|
|
6665
|
-
packetsLost: (w.packetsLost || 0) - (((
|
|
6665
|
+
packetsLost: (w.packetsLost || 0) - (((ks = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ks.packetsLost) || 0),
|
|
6666
6666
|
packetsReceived: (w.packetsReceived || 0) - (((Er = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Er.packetsReceived) || 0)
|
|
6667
6667
|
}),
|
|
6668
6668
|
jitter: w.jitter || 0,
|
|
@@ -7840,8 +7840,8 @@ function Qv(s) {
|
|
|
7840
7840
|
var Xv = typeof global == "object" && global && global.Object === Object && global;
|
|
7841
7841
|
const wm = Xv;
|
|
7842
7842
|
var Zv = typeof self == "object" && self && self.Object === Object && self, ey = wm || Zv || Function("return this")();
|
|
7843
|
-
const
|
|
7844
|
-
var ty =
|
|
7843
|
+
const Cs = ey;
|
|
7844
|
+
var ty = Cs.Symbol;
|
|
7845
7845
|
const ti = ty;
|
|
7846
7846
|
var bm = Object.prototype, sy = bm.hasOwnProperty, ry = bm.toString, po = ti ? ti.toStringTag : void 0;
|
|
7847
7847
|
function iy(s) {
|
|
@@ -7862,18 +7862,18 @@ var cy = "[object Null]", dy = "[object Undefined]", dp = ti ? ti.toStringTag :
|
|
|
7862
7862
|
function ma(s) {
|
|
7863
7863
|
return s == null ? s === void 0 ? dy : cy : dp && dp in Object(s) ? iy(s) : oy(s);
|
|
7864
7864
|
}
|
|
7865
|
-
function
|
|
7865
|
+
function Ps(s) {
|
|
7866
7866
|
var t = typeof s;
|
|
7867
7867
|
return s != null && (t == "object" || t == "function");
|
|
7868
7868
|
}
|
|
7869
7869
|
var ly = "[object AsyncFunction]", uy = "[object Function]", hy = "[object GeneratorFunction]", py = "[object Proxy]";
|
|
7870
7870
|
function Th(s) {
|
|
7871
|
-
if (!
|
|
7871
|
+
if (!Ps(s))
|
|
7872
7872
|
return false;
|
|
7873
7873
|
var t = ma(s);
|
|
7874
7874
|
return t == uy || t == hy || t == ly || t == py;
|
|
7875
7875
|
}
|
|
7876
|
-
var gy =
|
|
7876
|
+
var gy = Cs["__core-js_shared__"];
|
|
7877
7877
|
const nu = gy;
|
|
7878
7878
|
var lp = function() {
|
|
7879
7879
|
var s = /[^.]+$/.exec(nu && nu.keys && nu.keys.IE_PROTO || "");
|
|
@@ -7900,7 +7900,7 @@ var vy = /[\\^$.*+?()[\]{}|]/g, yy = /^\[object .+?Constructor\]$/, Ty = Functio
|
|
|
7900
7900
|
"^" + _y.call(Py).replace(vy, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
7901
7901
|
);
|
|
7902
7902
|
function Ry(s) {
|
|
7903
|
-
if (!
|
|
7903
|
+
if (!Ps(s) || my(s))
|
|
7904
7904
|
return false;
|
|
7905
7905
|
var t = Th(s) ? Cy : yy;
|
|
7906
7906
|
return t.test(fa(s));
|
|
@@ -7912,7 +7912,7 @@ function Sa(s, t) {
|
|
|
7912
7912
|
var e = wy(s, t);
|
|
7913
7913
|
return Ry(e) ? e : void 0;
|
|
7914
7914
|
}
|
|
7915
|
-
var by = Sa(
|
|
7915
|
+
var by = Sa(Cs, "Map");
|
|
7916
7916
|
const Vo = by;
|
|
7917
7917
|
var ky = Sa(Object, "create");
|
|
7918
7918
|
const Lo = ky;
|
|
@@ -8073,7 +8073,7 @@ const si = rT;
|
|
|
8073
8073
|
function iT() {
|
|
8074
8074
|
return false;
|
|
8075
8075
|
}
|
|
8076
|
-
var Am = typeof exports == "object" && exports && !exports.nodeType && exports, hp = Am && typeof module == "object" && module && !module.nodeType && module, aT = hp && hp.exports === Am, pp = aT ?
|
|
8076
|
+
var Am = typeof exports == "object" && exports && !exports.nodeType && exports, hp = Am && typeof module == "object" && module && !module.nodeType && module, aT = hp && hp.exports === Am, pp = aT ? Cs.Buffer : void 0, nT = pp ? pp.isBuffer : void 0, oT = nT || iT;
|
|
8077
8077
|
const Hn = oT;
|
|
8078
8078
|
var cT = 9007199254740991, dT = /^(?:0|[1-9]\d*)$/;
|
|
8079
8079
|
function Mm(s, t) {
|
|
@@ -8151,7 +8151,7 @@ function JT(s) {
|
|
|
8151
8151
|
}
|
|
8152
8152
|
var KT = Object.prototype, zT = KT.hasOwnProperty;
|
|
8153
8153
|
function YT(s) {
|
|
8154
|
-
if (!
|
|
8154
|
+
if (!Ps(s))
|
|
8155
8155
|
return JT(s);
|
|
8156
8156
|
var t = jl(s), e = [];
|
|
8157
8157
|
for (var r in s)
|
|
@@ -8164,7 +8164,7 @@ function Gc(s) {
|
|
|
8164
8164
|
function QT(s, t) {
|
|
8165
8165
|
return s && qc(t, Gc(t), s);
|
|
8166
8166
|
}
|
|
8167
|
-
var xm = typeof exports == "object" && exports && !exports.nodeType && exports, mp = xm && typeof module == "object" && module && !module.nodeType && module, XT = mp && mp.exports === xm, fp = XT ?
|
|
8167
|
+
var xm = typeof exports == "object" && exports && !exports.nodeType && exports, mp = xm && typeof module == "object" && module && !module.nodeType && module, XT = mp && mp.exports === xm, fp = XT ? Cs.Buffer : void 0, Sp = fp ? fp.allocUnsafe : void 0;
|
|
8168
8168
|
function Um(s, t) {
|
|
8169
8169
|
if (t)
|
|
8170
8170
|
return s.slice();
|
|
@@ -8222,13 +8222,13 @@ function Eu(s) {
|
|
|
8222
8222
|
function cE(s) {
|
|
8223
8223
|
return qm(s, Gc, Bm);
|
|
8224
8224
|
}
|
|
8225
|
-
var dE = Sa(
|
|
8225
|
+
var dE = Sa(Cs, "DataView");
|
|
8226
8226
|
const _u = dE;
|
|
8227
|
-
var lE = Sa(
|
|
8227
|
+
var lE = Sa(Cs, "Promise");
|
|
8228
8228
|
const Pu = lE;
|
|
8229
|
-
var uE = Sa(
|
|
8229
|
+
var uE = Sa(Cs, "Set");
|
|
8230
8230
|
const Cu = uE;
|
|
8231
|
-
var hE = Sa(
|
|
8231
|
+
var hE = Sa(Cs, "WeakMap");
|
|
8232
8232
|
const Ru = hE;
|
|
8233
8233
|
var yp = "[object Map]", pE = "[object Object]", Tp = "[object Promise]", Ep = "[object Set]", _p = "[object WeakMap]", Pp = "[object DataView]", gE = fa(_u), mE = fa(Vo), fE = fa(Pu), SE = fa(Cu), vE = fa(Ru), oi = ma;
|
|
8234
8234
|
(_u && oi(new _u(new ArrayBuffer(1))) != Pp || Vo && oi(new Vo()) != yp || Pu && oi(Pu.resolve()) != Tp || Cu && oi(new Cu()) != Ep || Ru && oi(new Ru()) != _p) && (oi = function(s) {
|
|
@@ -8254,7 +8254,7 @@ function EE(s) {
|
|
|
8254
8254
|
var t = s.length, e = new s.constructor(t);
|
|
8255
8255
|
return t && typeof s[0] == "string" && TE.call(s, "index") && (e.index = s.index, e.input = s.input), e;
|
|
8256
8256
|
}
|
|
8257
|
-
var _E =
|
|
8257
|
+
var _E = Cs.Uint8Array;
|
|
8258
8258
|
const Dd = _E;
|
|
8259
8259
|
function wh(s) {
|
|
8260
8260
|
var t = new s.constructor(s.byteLength);
|
|
@@ -8315,7 +8315,7 @@ var wp = Object.create, JE = function() {
|
|
|
8315
8315
|
function s() {
|
|
8316
8316
|
}
|
|
8317
8317
|
return function(t) {
|
|
8318
|
-
if (!
|
|
8318
|
+
if (!Ps(t))
|
|
8319
8319
|
return {};
|
|
8320
8320
|
if (wp)
|
|
8321
8321
|
return wp(t);
|
|
@@ -8347,7 +8347,7 @@ function hd(s, t, e, r, i, n) {
|
|
|
8347
8347
|
var o, c = t & r_, d = t & i_, u = t & a_;
|
|
8348
8348
|
if (e && (o = i ? e(s, r, i, n) : e(s)), o !== void 0)
|
|
8349
8349
|
return o;
|
|
8350
|
-
if (!
|
|
8350
|
+
if (!Ps(s))
|
|
8351
8351
|
return s;
|
|
8352
8352
|
var p = si(s);
|
|
8353
8353
|
if (p) {
|
|
@@ -9096,9 +9096,9 @@ function Mp(s) {
|
|
|
9096
9096
|
return s;
|
|
9097
9097
|
if (D_(s))
|
|
9098
9098
|
return Ap;
|
|
9099
|
-
if (
|
|
9099
|
+
if (Ps(s)) {
|
|
9100
9100
|
var t = typeof s.valueOf == "function" ? s.valueOf() : s;
|
|
9101
|
-
s =
|
|
9101
|
+
s = Ps(t) ? t + "" : t;
|
|
9102
9102
|
}
|
|
9103
9103
|
if (typeof s != "string")
|
|
9104
9104
|
return s === 0 ? s : +s;
|
|
@@ -9166,7 +9166,7 @@ function SP(s, t) {
|
|
|
9166
9166
|
return mP(fP(s, t, tf), s + "");
|
|
9167
9167
|
}
|
|
9168
9168
|
function vP(s, t, e) {
|
|
9169
|
-
if (!
|
|
9169
|
+
if (!Ps(e))
|
|
9170
9170
|
return false;
|
|
9171
9171
|
var r = typeof t;
|
|
9172
9172
|
return (r == "number" ? jc(e) && Mm(t, e.length) : r == "string" && t in e) ? Bc(e[t], s) : false;
|
|
@@ -9365,7 +9365,7 @@ function sC(s) {
|
|
|
9365
9365
|
var rC = sC();
|
|
9366
9366
|
const iC = rC;
|
|
9367
9367
|
var aC = function() {
|
|
9368
|
-
return
|
|
9368
|
+
return Cs.Date.now();
|
|
9369
9369
|
};
|
|
9370
9370
|
const du = aC;
|
|
9371
9371
|
var nC = "Expected a function", oC = Math.max, cC = Math.min;
|
|
@@ -9373,7 +9373,7 @@ function Ih(s, t, e) {
|
|
|
9373
9373
|
var r, i, n, o, c, d, u = 0, p = false, f = false, S = true;
|
|
9374
9374
|
if (typeof s != "function")
|
|
9375
9375
|
throw new TypeError(nC);
|
|
9376
|
-
t = Mp(t) || 0,
|
|
9376
|
+
t = Mp(t) || 0, Ps(e) && (p = !!e.leading, f = "maxWait" in e, n = f ? oC(Mp(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
|
|
9377
9377
|
function E(K) {
|
|
9378
9378
|
var re = r, Je = i;
|
|
9379
9379
|
return r = i = void 0, u = K, o = s.apply(Je, re), o;
|
|
@@ -9382,8 +9382,8 @@ function Ih(s, t, e) {
|
|
|
9382
9382
|
return u = K, c = setTimeout(A, t), p ? E(K) : o;
|
|
9383
9383
|
}
|
|
9384
9384
|
function P(K) {
|
|
9385
|
-
var re = K - d, Je = K - u,
|
|
9386
|
-
return f ? cC(
|
|
9385
|
+
var re = K - d, Je = K - u, ks = t - re;
|
|
9386
|
+
return f ? cC(ks, n - Je) : ks;
|
|
9387
9387
|
}
|
|
9388
9388
|
function k(K) {
|
|
9389
9389
|
var re = K - d, Je = K - u;
|
|
@@ -9438,13 +9438,13 @@ function uC(s, t, e, r, i, n, o) {
|
|
|
9438
9438
|
var p = n ? n(c, d, e + "", s, t, o) : void 0, f = p === void 0;
|
|
9439
9439
|
if (f) {
|
|
9440
9440
|
var S = si(d), E = !S && Hn(d), _ = !S && !E && ql(d);
|
|
9441
|
-
p = d, S || E || _ ? si(c) ? p = c : dC(c) ? p = $m(c) : E ? (f = false, p = Um(d, true)) : _ ? (f = false, p = jm(d, true)) : p = [] : RP(d) || Md(d) ? (p = c, Md(c) ? p = lC(c) : (!
|
|
9441
|
+
p = d, S || E || _ ? si(c) ? p = c : dC(c) ? p = $m(c) : E ? (f = false, p = Um(d, true)) : _ ? (f = false, p = jm(d, true)) : p = [] : RP(d) || Md(d) ? (p = c, Md(c) ? p = lC(c) : (!Ps(c) || Th(c)) && (p = Gm(d))) : f = false;
|
|
9442
9442
|
}
|
|
9443
9443
|
f && (o.set(d, p), i(p, d, r, n, o), o.delete(d)), bu(s, e, p);
|
|
9444
9444
|
}
|
|
9445
9445
|
function nf(s, t, e, r, i) {
|
|
9446
9446
|
s !== t && iC(t, function(n, o) {
|
|
9447
|
-
if (i || (i = new Us()),
|
|
9447
|
+
if (i || (i = new Us()), Ps(n))
|
|
9448
9448
|
uC(s, t, o, e, nf, r, i);
|
|
9449
9449
|
else {
|
|
9450
9450
|
var c = r ? r(ku(s, o), n, o + "", s, t, i) : void 0;
|
|
@@ -10689,7 +10689,7 @@ class UC extends MessageType {
|
|
|
10689
10689
|
]);
|
|
10690
10690
|
}
|
|
10691
10691
|
}
|
|
10692
|
-
const
|
|
10692
|
+
const Rs = new UC();
|
|
10693
10693
|
class $C extends MessageType {
|
|
10694
10694
|
constructor() {
|
|
10695
10695
|
super("media.ProducerPayload", [
|
|
@@ -10751,7 +10751,7 @@ class HC extends MessageType {
|
|
|
10751
10751
|
opt: true,
|
|
10752
10752
|
T: 8
|
|
10753
10753
|
},
|
|
10754
|
-
{ no: 3, name: "description", kind: "message", T: () =>
|
|
10754
|
+
{ no: 3, name: "description", kind: "message", T: () => Rs },
|
|
10755
10755
|
{
|
|
10756
10756
|
no: 4,
|
|
10757
10757
|
name: "private_ice",
|
|
@@ -10798,7 +10798,7 @@ class GC extends MessageType {
|
|
|
10798
10798
|
kind: "scalar",
|
|
10799
10799
|
T: 9
|
|
10800
10800
|
},
|
|
10801
|
-
{ no: 2, name: "description", kind: "message", T: () =>
|
|
10801
|
+
{ no: 2, name: "description", kind: "message", T: () => Rs },
|
|
10802
10802
|
{
|
|
10803
10803
|
no: 3,
|
|
10804
10804
|
name: "transcription_enabled",
|
|
@@ -10826,7 +10826,7 @@ class WC extends MessageType {
|
|
|
10826
10826
|
kind: "scalar",
|
|
10827
10827
|
T: 9
|
|
10828
10828
|
},
|
|
10829
|
-
{ no: 2, name: "description", kind: "message", T: () =>
|
|
10829
|
+
{ no: 2, name: "description", kind: "message", T: () => Rs }
|
|
10830
10830
|
]);
|
|
10831
10831
|
}
|
|
10832
10832
|
}
|
|
@@ -10840,7 +10840,7 @@ class KC extends MessageType {
|
|
|
10840
10840
|
kind: "scalar",
|
|
10841
10841
|
T: 9
|
|
10842
10842
|
},
|
|
10843
|
-
{ no: 2, name: "description", kind: "message", T: () =>
|
|
10843
|
+
{ no: 2, name: "description", kind: "message", T: () => Rs }
|
|
10844
10844
|
]);
|
|
10845
10845
|
}
|
|
10846
10846
|
}
|
|
@@ -11329,7 +11329,7 @@ class kR extends MessageType {
|
|
|
11329
11329
|
kind: "scalar",
|
|
11330
11330
|
T: 8
|
|
11331
11331
|
},
|
|
11332
|
-
{ no: 4, name: "description", kind: "message", T: () =>
|
|
11332
|
+
{ no: 4, name: "description", kind: "message", T: () => Rs },
|
|
11333
11333
|
{
|
|
11334
11334
|
no: 5,
|
|
11335
11335
|
name: "msid",
|
|
@@ -11427,7 +11427,7 @@ class VR extends MessageType {
|
|
|
11427
11427
|
kind: "scalar",
|
|
11428
11428
|
T: 9
|
|
11429
11429
|
},
|
|
11430
|
-
{ no: 2, name: "description", kind: "message", T: () =>
|
|
11430
|
+
{ no: 2, name: "description", kind: "message", T: () => Rs },
|
|
11431
11431
|
{
|
|
11432
11432
|
no: 3,
|
|
11433
11433
|
name: "producing_transport_id",
|
|
@@ -11449,7 +11449,7 @@ class xR extends MessageType {
|
|
|
11449
11449
|
repeat: 2,
|
|
11450
11450
|
T: 9
|
|
11451
11451
|
},
|
|
11452
|
-
{ no: 2, name: "description", kind: "message", T: () =>
|
|
11452
|
+
{ no: 2, name: "description", kind: "message", T: () => Rs },
|
|
11453
11453
|
{
|
|
11454
11454
|
no: 3,
|
|
11455
11455
|
name: "consuming_transport_id",
|
|
@@ -11780,7 +11780,7 @@ class cw extends MessageType {
|
|
|
11780
11780
|
T: 8
|
|
11781
11781
|
},
|
|
11782
11782
|
{ no: 2, name: "consumer_ids_map", kind: "message", T: () => uf },
|
|
11783
|
-
{ no: 3, name: "description", kind: "message", T: () =>
|
|
11783
|
+
{ no: 3, name: "description", kind: "message", T: () => Rs }
|
|
11784
11784
|
]);
|
|
11785
11785
|
}
|
|
11786
11786
|
}
|
|
@@ -11800,7 +11800,7 @@ class lw extends MessageType {
|
|
|
11800
11800
|
kind: "scalar",
|
|
11801
11801
|
T: 9
|
|
11802
11802
|
},
|
|
11803
|
-
{ no: 4, name: "description", kind: "message", T: () =>
|
|
11803
|
+
{ no: 4, name: "description", kind: "message", T: () => Rs }
|
|
11804
11804
|
]);
|
|
11805
11805
|
}
|
|
11806
11806
|
}
|
|
@@ -11859,7 +11859,7 @@ new fw();
|
|
|
11859
11859
|
class Sw extends MessageType {
|
|
11860
11860
|
constructor() {
|
|
11861
11861
|
super("media.edge.ProducerClosingResponse", [
|
|
11862
|
-
{ no: 1, name: "description", kind: "message", T: () =>
|
|
11862
|
+
{ no: 1, name: "description", kind: "message", T: () => Rs }
|
|
11863
11863
|
]);
|
|
11864
11864
|
}
|
|
11865
11865
|
}
|
|
@@ -11867,7 +11867,7 @@ const vw = new Sw();
|
|
|
11867
11867
|
class yw extends MessageType {
|
|
11868
11868
|
constructor() {
|
|
11869
11869
|
super("media.edge.ConsumerClosingResponse", [
|
|
11870
|
-
{ no: 1, name: "description", kind: "message", T: () =>
|
|
11870
|
+
{ no: 1, name: "description", kind: "message", T: () => Rs }
|
|
11871
11871
|
]);
|
|
11872
11872
|
}
|
|
11873
11873
|
}
|
|
@@ -15233,13 +15233,13 @@ function Jn(s, t) {
|
|
|
15233
15233
|
function Cf(s, t) {
|
|
15234
15234
|
return Object.keys(s).reduce((e, r) => (e[r] = t | s[r], e), {});
|
|
15235
15235
|
}
|
|
15236
|
-
const x = Jn(UA, jA),
|
|
15236
|
+
const x = Jn(UA, jA), Re = Jn($A, GA), W = Jn(
|
|
15237
15237
|
FA,
|
|
15238
15238
|
WA
|
|
15239
15239
|
), qs = Jn(HA, JA), pi = Jn(
|
|
15240
15240
|
BA,
|
|
15241
15241
|
KA
|
|
15242
|
-
), is = Cf(Pf, 16777216),
|
|
15242
|
+
), is = Cf(Pf, 16777216), Ts = Cf(Pf, 50331648), md = Jn(
|
|
15243
15243
|
qA,
|
|
15244
15244
|
zA
|
|
15245
15245
|
);
|
|
@@ -15303,7 +15303,7 @@ const $u = (bg = class {
|
|
|
15303
15303
|
memberIds: s.targetUserIds,
|
|
15304
15304
|
unreadCount: (r = t == null ? void 0 : t.unreadCount) != null ? r : 0
|
|
15305
15305
|
});
|
|
15306
|
-
return t != null && t.message && (e.latestMessage =
|
|
15306
|
+
return t != null && t.message && (e.latestMessage = Es.formatSocketServiceMessage(
|
|
15307
15307
|
t.message
|
|
15308
15308
|
)), delete e.chatChannelId, delete e.targetUserIds, delete e.latestMessageAndUnreadCount, e;
|
|
15309
15309
|
}
|
|
@@ -15368,7 +15368,7 @@ Oh([
|
|
|
15368
15368
|
Oh([
|
|
15369
15369
|
T.trace("ChatChannelHandler.getChannelMembers")
|
|
15370
15370
|
], pa.prototype, "getChannelMembers", 1);
|
|
15371
|
-
var XA = Object.defineProperty, ZA = Object.getOwnPropertyDescriptor,
|
|
15371
|
+
var XA = Object.defineProperty, ZA = Object.getOwnPropertyDescriptor, ws = (s, t, e, r) => {
|
|
15372
15372
|
for (var i = r > 1 ? void 0 : r ? ZA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15373
15373
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15374
15374
|
return r && i && XA(t, e, i), i;
|
|
@@ -15386,7 +15386,7 @@ class as {
|
|
|
15386
15386
|
return a(this, qa).getValue("logger");
|
|
15387
15387
|
}
|
|
15388
15388
|
getChatMessages() {
|
|
15389
|
-
return a(this, it).sendMessagePromise(
|
|
15389
|
+
return a(this, it).sendMessagePromise(Re.getMessages);
|
|
15390
15390
|
}
|
|
15391
15391
|
getChatMessagesPaginated(t, e, r, i = 0, n = "") {
|
|
15392
15392
|
return l(this, null, function* () {
|
|
@@ -15397,7 +15397,7 @@ class as {
|
|
|
15397
15397
|
reversed: r,
|
|
15398
15398
|
channelId: n
|
|
15399
15399
|
}, c = yield a(this, it).sendMessagePromise(
|
|
15400
|
-
|
|
15400
|
+
Re.getPaginatedMessages,
|
|
15401
15401
|
qk.toBinary(o)
|
|
15402
15402
|
);
|
|
15403
15403
|
return c.payload ? Gk.fromBinary(
|
|
@@ -15414,7 +15414,7 @@ class as {
|
|
|
15414
15414
|
payload: t
|
|
15415
15415
|
};
|
|
15416
15416
|
a(this, it).sendMessage(
|
|
15417
|
-
|
|
15417
|
+
Re.sendMessageToRoom,
|
|
15418
15418
|
Kk.toBinary(r)
|
|
15419
15419
|
);
|
|
15420
15420
|
}
|
|
@@ -15425,7 +15425,7 @@ class as {
|
|
|
15425
15425
|
payload: t
|
|
15426
15426
|
};
|
|
15427
15427
|
a(this, it).sendMessage(
|
|
15428
|
-
|
|
15428
|
+
Re.sendMessageToPeers,
|
|
15429
15429
|
Qk.toBinary(i)
|
|
15430
15430
|
);
|
|
15431
15431
|
}
|
|
@@ -15436,7 +15436,7 @@ class as {
|
|
|
15436
15436
|
payload: t
|
|
15437
15437
|
};
|
|
15438
15438
|
a(this, it).sendMessage(
|
|
15439
|
-
|
|
15439
|
+
Re.sendMessageToChannel,
|
|
15440
15440
|
eI.toBinary(i)
|
|
15441
15441
|
);
|
|
15442
15442
|
}
|
|
@@ -15456,7 +15456,7 @@ class as {
|
|
|
15456
15456
|
};
|
|
15457
15457
|
i && (o.channelId = i), n !== void 0 && (o.pinned = n);
|
|
15458
15458
|
const c = yield a(this, it).sendMessagePromise(
|
|
15459
|
-
|
|
15459
|
+
Re.editMessage,
|
|
15460
15460
|
rI.toBinary(o)
|
|
15461
15461
|
);
|
|
15462
15462
|
return ad.fromBinary(c.payload).message;
|
|
@@ -15469,7 +15469,7 @@ class as {
|
|
|
15469
15469
|
};
|
|
15470
15470
|
e && (r.channelId = e);
|
|
15471
15471
|
const i = yield a(this, it).sendMessagePromise(
|
|
15472
|
-
|
|
15472
|
+
Re.deleteMessage,
|
|
15473
15473
|
dI.toBinary(r)
|
|
15474
15474
|
), n = nd.fromBinary(i.payload);
|
|
15475
15475
|
return D({
|
|
@@ -15490,7 +15490,7 @@ class as {
|
|
|
15490
15490
|
e.channelId && (r.channelId = e.channelId);
|
|
15491
15491
|
try {
|
|
15492
15492
|
const c = yield a(this, it).sendMessagePromise(
|
|
15493
|
-
|
|
15493
|
+
Re.searchChannelMessages,
|
|
15494
15494
|
hI.toBinary(r)
|
|
15495
15495
|
);
|
|
15496
15496
|
return Ef.fromBinary(c.payload).messages;
|
|
@@ -15503,7 +15503,7 @@ class as {
|
|
|
15503
15503
|
return l(this, null, function* () {
|
|
15504
15504
|
try {
|
|
15505
15505
|
const t = yield a(this, it).sendMessagePromise(
|
|
15506
|
-
|
|
15506
|
+
Re.getAllChatChannels
|
|
15507
15507
|
);
|
|
15508
15508
|
return Hs.fromBinary(t.payload).chatChannels.map(pa.formatChannel);
|
|
15509
15509
|
} catch (t) {
|
|
@@ -15514,7 +15514,7 @@ class as {
|
|
|
15514
15514
|
markLastReadMessage(t, e) {
|
|
15515
15515
|
return l(this, null, function* () {
|
|
15516
15516
|
const r = yield a(this, it).sendMessagePromise(
|
|
15517
|
-
|
|
15517
|
+
Re.markChannelIndexAsRead,
|
|
15518
15518
|
gI.toBinary({
|
|
15519
15519
|
channelId: t,
|
|
15520
15520
|
userId: e.userId,
|
|
@@ -15531,7 +15531,7 @@ class as {
|
|
|
15531
15531
|
pinned: e,
|
|
15532
15532
|
channelId: t.channelId
|
|
15533
15533
|
}, i = yield a(this, it).sendMessagePromise(
|
|
15534
|
-
|
|
15534
|
+
Re.pinMessage,
|
|
15535
15535
|
aI.toBinary(r)
|
|
15536
15536
|
);
|
|
15537
15537
|
return id.fromBinary(i.payload);
|
|
@@ -15540,31 +15540,31 @@ class as {
|
|
|
15540
15540
|
on(t, e) {
|
|
15541
15541
|
let r, i;
|
|
15542
15542
|
switch (t) {
|
|
15543
|
-
case
|
|
15543
|
+
case Re.sendMessageToRoom: {
|
|
15544
15544
|
r = pu.fromBinary.bind(
|
|
15545
15545
|
pu
|
|
15546
15546
|
), i = pu.create();
|
|
15547
15547
|
break;
|
|
15548
15548
|
}
|
|
15549
|
-
case
|
|
15549
|
+
case Re.sendMessageToPeers: {
|
|
15550
15550
|
r = gu.fromBinary.bind(
|
|
15551
15551
|
gu
|
|
15552
15552
|
), i = gu.create();
|
|
15553
15553
|
break;
|
|
15554
15554
|
}
|
|
15555
|
-
case
|
|
15555
|
+
case Re.editMessage: {
|
|
15556
15556
|
r = ad.fromBinary.bind(
|
|
15557
15557
|
ad
|
|
15558
15558
|
), i = ad.create();
|
|
15559
15559
|
break;
|
|
15560
15560
|
}
|
|
15561
|
-
case
|
|
15561
|
+
case Re.pinMessage: {
|
|
15562
15562
|
r = id.fromBinary.bind(
|
|
15563
15563
|
id
|
|
15564
15564
|
), i = id.create();
|
|
15565
15565
|
break;
|
|
15566
15566
|
}
|
|
15567
|
-
case
|
|
15567
|
+
case Re.deleteMessage: {
|
|
15568
15568
|
r = nd.fromBinary.bind(
|
|
15569
15569
|
nd
|
|
15570
15570
|
), i = nd.create();
|
|
@@ -15589,37 +15589,37 @@ class as {
|
|
|
15589
15589
|
}
|
|
15590
15590
|
}
|
|
15591
15591
|
it = /* @__PURE__ */ new WeakMap(), qa = /* @__PURE__ */ new WeakMap();
|
|
15592
|
-
|
|
15592
|
+
ws([
|
|
15593
15593
|
T.trace("SocketService.getChatMessages")
|
|
15594
15594
|
], as.prototype, "getChatMessages", 1);
|
|
15595
|
-
|
|
15595
|
+
ws([
|
|
15596
15596
|
T.trace("SocketService.getChatMessagesPaginated")
|
|
15597
15597
|
], as.prototype, "getChatMessagesPaginated", 1);
|
|
15598
|
-
|
|
15598
|
+
ws([
|
|
15599
15599
|
T.trace("SocketService.sendMessageToRoom")
|
|
15600
15600
|
], as.prototype, "sendMessageToRoom", 1);
|
|
15601
|
-
|
|
15601
|
+
ws([
|
|
15602
15602
|
T.trace("SocketService.sendMessageToPeers")
|
|
15603
15603
|
], as.prototype, "sendMessageToPeers", 1);
|
|
15604
|
-
|
|
15604
|
+
ws([
|
|
15605
15605
|
T.trace("SocketService.sendMessageToChannel")
|
|
15606
15606
|
], as.prototype, "sendMessageToChannel", 1);
|
|
15607
|
-
|
|
15607
|
+
ws([
|
|
15608
15608
|
T.trace("SocketService.sendMessage")
|
|
15609
15609
|
], as.prototype, "sendMessage", 1);
|
|
15610
|
-
|
|
15610
|
+
ws([
|
|
15611
15611
|
T.trace("SocketService.editMessage")
|
|
15612
15612
|
], as.prototype, "editMessage", 1);
|
|
15613
|
-
|
|
15613
|
+
ws([
|
|
15614
15614
|
T.trace("SocketService.deleteMessage")
|
|
15615
15615
|
], as.prototype, "deleteMessage", 1);
|
|
15616
|
-
|
|
15616
|
+
ws([
|
|
15617
15617
|
T.trace("SocketService.searchMessages")
|
|
15618
15618
|
], as.prototype, "searchMessages", 1);
|
|
15619
|
-
|
|
15619
|
+
ws([
|
|
15620
15620
|
T.trace("SocketService.getAllChannels")
|
|
15621
15621
|
], as.prototype, "getAllChannels", 1);
|
|
15622
|
-
|
|
15622
|
+
ws([
|
|
15623
15623
|
T.trace("SocketService.markLastReadMessage")
|
|
15624
15624
|
], as.prototype, "markLastReadMessage", 1);
|
|
15625
15625
|
function eM(s) {
|
|
@@ -15628,17 +15628,17 @@ function eM(s) {
|
|
|
15628
15628
|
(t) => t[1].toUpperCase()
|
|
15629
15629
|
);
|
|
15630
15630
|
}
|
|
15631
|
-
function
|
|
15631
|
+
function _s(s) {
|
|
15632
15632
|
if (!s || typeof s != "object")
|
|
15633
15633
|
return s;
|
|
15634
15634
|
if (Array.isArray(s))
|
|
15635
15635
|
return s.map(
|
|
15636
|
-
(e) =>
|
|
15636
|
+
(e) => _s(e)
|
|
15637
15637
|
);
|
|
15638
15638
|
const t = {};
|
|
15639
15639
|
return Object.keys(s).forEach((e) => {
|
|
15640
15640
|
const r = validate(e) ? e : eM(e);
|
|
15641
|
-
t[r] =
|
|
15641
|
+
t[r] = _s(s[e]);
|
|
15642
15642
|
}), t;
|
|
15643
15643
|
}
|
|
15644
15644
|
function tM(s) {
|
|
@@ -15984,7 +15984,7 @@ class jt extends aM {
|
|
|
15984
15984
|
return l(this, arguments, function* ({
|
|
15985
15985
|
manualIngestion: e
|
|
15986
15986
|
}) {
|
|
15987
|
-
const i =
|
|
15987
|
+
const i = _s(
|
|
15988
15988
|
yield this.requests.post(
|
|
15989
15989
|
`/v2/meetings/${this.context.getValue("meetingId")}/livestreams`,
|
|
15990
15990
|
{
|
|
@@ -16012,7 +16012,7 @@ class jt extends aM {
|
|
|
16012
16012
|
}
|
|
16013
16013
|
getActiveLivestream() {
|
|
16014
16014
|
return l(this, null, function* () {
|
|
16015
|
-
const e =
|
|
16015
|
+
const e = _s(
|
|
16016
16016
|
(yield this.requests.get(
|
|
16017
16017
|
`/v2/meetings/${this.context.getValue("meetingId")}/active-livestream`
|
|
16018
16018
|
)).data.data
|
|
@@ -16033,7 +16033,7 @@ class jt extends aM {
|
|
|
16033
16033
|
if (this.userDetails)
|
|
16034
16034
|
return this.userDetails;
|
|
16035
16035
|
const e = (yield this.requests.get("v2/internals/participant-details")).data.data;
|
|
16036
|
-
return
|
|
16036
|
+
return _s(e);
|
|
16037
16037
|
});
|
|
16038
16038
|
}
|
|
16039
16039
|
startRecording(e, r) {
|
|
@@ -16081,7 +16081,7 @@ class jt extends aM {
|
|
|
16081
16081
|
title: i,
|
|
16082
16082
|
useHiveMedia: n,
|
|
16083
16083
|
sfu: o
|
|
16084
|
-
} =
|
|
16084
|
+
} = _s(
|
|
16085
16085
|
(yield this.requests.post("v2/internals/rooms", {
|
|
16086
16086
|
ip_information: e
|
|
16087
16087
|
})).data.data
|
|
@@ -16554,7 +16554,7 @@ let Qe = (kg = class extends qt {
|
|
|
16554
16554
|
const o = yield a(this, Fe).getChatMessagesPaginated(t, e, r, i, n);
|
|
16555
16555
|
return {
|
|
16556
16556
|
messages: o.messages.map(
|
|
16557
|
-
(c) =>
|
|
16557
|
+
(c) => Es.formatSocketServiceMessage(c)
|
|
16558
16558
|
),
|
|
16559
16559
|
next: o.next
|
|
16560
16560
|
};
|
|
@@ -16617,7 +16617,7 @@ let Qe = (kg = class extends qt {
|
|
|
16617
16617
|
return l(this, arguments, function* (t, e = {}) {
|
|
16618
16618
|
if (!a(this, Ti).getValue("flagsmith").hasFeature(Z.FEAT_CHAT_SDK_SEARCH))
|
|
16619
16619
|
throw new R("searchMessages is temporarily disabled!", "0506");
|
|
16620
|
-
return (yield a(this, Fe).searchMessages(t, e)).map(
|
|
16620
|
+
return (yield a(this, Fe).searchMessages(t, e)).map(Es.formatSocketServiceMessage);
|
|
16621
16621
|
});
|
|
16622
16622
|
}
|
|
16623
16623
|
markLastReadMessage(t, e) {
|
|
@@ -16805,7 +16805,7 @@ const ci = (Ig = class {
|
|
|
16805
16805
|
this.getChatMessages();
|
|
16806
16806
|
})
|
|
16807
16807
|
), this.chatSocketHandler.on(
|
|
16808
|
-
|
|
16808
|
+
Re.sendMessageToRoom,
|
|
16809
16809
|
(s) => {
|
|
16810
16810
|
const t = ci.formatSocketServiceMessage(
|
|
16811
16811
|
s.message
|
|
@@ -16823,7 +16823,7 @@ const ci = (Ig = class {
|
|
|
16823
16823
|
});
|
|
16824
16824
|
}
|
|
16825
16825
|
), this.chatSocketHandler.on(
|
|
16826
|
-
|
|
16826
|
+
Re.sendMessageToPeers,
|
|
16827
16827
|
(s) => {
|
|
16828
16828
|
const t = ci.formatSocketServiceMessage(
|
|
16829
16829
|
s.message
|
|
@@ -16835,7 +16835,7 @@ const ci = (Ig = class {
|
|
|
16835
16835
|
});
|
|
16836
16836
|
}
|
|
16837
16837
|
), this.chatSocketHandler.on(
|
|
16838
|
-
|
|
16838
|
+
Re.editMessage,
|
|
16839
16839
|
(s) => {
|
|
16840
16840
|
const t = ci.formatSocketServiceMessage(
|
|
16841
16841
|
s.message
|
|
@@ -16856,7 +16856,7 @@ const ci = (Ig = class {
|
|
|
16856
16856
|
}));
|
|
16857
16857
|
}
|
|
16858
16858
|
), this.chatSocketHandler.on(
|
|
16859
|
-
|
|
16859
|
+
Re.deleteMessage,
|
|
16860
16860
|
(s) => {
|
|
16861
16861
|
if (s.channelId) {
|
|
16862
16862
|
this.chat.emit("chatUpdate", {
|
|
@@ -16883,7 +16883,7 @@ const ci = (Ig = class {
|
|
|
16883
16883
|
this.chat.channels.push(e), this.chat.emit("channelCreate", e);
|
|
16884
16884
|
}
|
|
16885
16885
|
), this.chatSocketHandler.on(
|
|
16886
|
-
|
|
16886
|
+
Re.pinMessage,
|
|
16887
16887
|
(s) => {
|
|
16888
16888
|
const t = this.chat.messages.findIndex((r) => r.id === s.chatId);
|
|
16889
16889
|
if (t === -1)
|
|
@@ -16904,10 +16904,10 @@ const ci = (Ig = class {
|
|
|
16904
16904
|
);
|
|
16905
16905
|
}
|
|
16906
16906
|
}, Ar = /* @__PURE__ */ new WeakMap(), Ig);
|
|
16907
|
-
let
|
|
16907
|
+
let Es = ci;
|
|
16908
16908
|
mM([
|
|
16909
16909
|
T.trace("ChatController.setupEvents")
|
|
16910
|
-
],
|
|
16910
|
+
], Es.prototype, "setupEvents", 1);
|
|
16911
16911
|
var fM = Object.defineProperty, SM = Object.getOwnPropertyDescriptor, vM = (s, t, e, r) => {
|
|
16912
16912
|
for (var i = r > 1 ? void 0 : r ? SM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16913
16913
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -17432,7 +17432,7 @@ var MM = Object.defineProperty, DM = Object.getOwnPropertyDescriptor, Ta = (s, t
|
|
|
17432
17432
|
for (var i = r > 1 ? void 0 : r ? DM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17433
17433
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17434
17434
|
return r && i && MM(t, e, i), i;
|
|
17435
|
-
}, Yt, Jd, ae, jo,
|
|
17435
|
+
}, Yt, Jd, ae, jo, Is, Ke, Go, Gu, za, Sd;
|
|
17436
17436
|
class ii extends qt {
|
|
17437
17437
|
constructor(e, r, i, n, o) {
|
|
17438
17438
|
const c = e.getValue("logger");
|
|
@@ -17443,9 +17443,9 @@ class ii extends qt {
|
|
|
17443
17443
|
g(this, Jd, void 0);
|
|
17444
17444
|
g(this, ae, void 0);
|
|
17445
17445
|
g(this, jo, void 0);
|
|
17446
|
-
g(this,
|
|
17446
|
+
g(this, Is, void 0);
|
|
17447
17447
|
g(this, Ke, void 0);
|
|
17448
|
-
m(this, Ke, e), m(this, Yt, n), m(this, Jd, o), m(this, ae, r), m(this, jo, i), m(this,
|
|
17448
|
+
m(this, Ke, e), m(this, Yt, n), m(this, Jd, o), m(this, ae, r), m(this, jo, i), m(this, Is, []), this.setupEvents();
|
|
17449
17449
|
}
|
|
17450
17450
|
get telemetry() {
|
|
17451
17451
|
return a(this, Ke).getValue("telemetry");
|
|
@@ -17456,10 +17456,10 @@ class ii extends qt {
|
|
|
17456
17456
|
setupEvents() {
|
|
17457
17457
|
const e = {
|
|
17458
17458
|
[b.GET_STAGE_REQUESTS]: (n) => l(this, null, function* () {
|
|
17459
|
-
m(this,
|
|
17459
|
+
m(this, Is, n);
|
|
17460
17460
|
}),
|
|
17461
17461
|
[b.UPDATE_STAGE_REQUESTS]: (o) => l(this, [o], function* ({ add: n }) {
|
|
17462
|
-
const c = a(this,
|
|
17462
|
+
const c = a(this, Is).length, { stageRequests: d } = this.getAccessRequests();
|
|
17463
17463
|
(n || d.length > c) && this.emit("newStageRequest", { count: d.length }), this.emit("stageAccessRequestUpdate", d);
|
|
17464
17464
|
})
|
|
17465
17465
|
}, r = () => {
|
|
@@ -17479,7 +17479,7 @@ class ii extends qt {
|
|
|
17479
17479
|
};
|
|
17480
17480
|
a(this, ae).permissions.on("permissionsUpdate", (n) => {
|
|
17481
17481
|
const { canAcceptProductionRequests: o } = n;
|
|
17482
|
-
o !== void 0 && (a(this, ae).permissions.acceptStageRequests ? (r(), a(this, Yt).getStageRequests()) : (i(), m(this,
|
|
17482
|
+
o !== void 0 && (a(this, ae).permissions.acceptStageRequests ? (r(), a(this, Yt).getStageRequests()) : (i(), m(this, Is, []), this.emit("stageAccessRequestUpdate", a(this, Is))));
|
|
17483
17483
|
}), a(this, ae).permissions.acceptStageRequests && r();
|
|
17484
17484
|
}
|
|
17485
17485
|
getAccessRequests() {
|
|
@@ -17494,7 +17494,7 @@ class ii extends qt {
|
|
|
17494
17494
|
userId: r.userId,
|
|
17495
17495
|
peerId: r.id
|
|
17496
17496
|
}));
|
|
17497
|
-
return m(this,
|
|
17497
|
+
return m(this, Is, e), { stageRequests: a(this, Is) };
|
|
17498
17498
|
}
|
|
17499
17499
|
requestAccess() {
|
|
17500
17500
|
return l(this, null, function* () {
|
|
@@ -17589,7 +17589,7 @@ class ii extends qt {
|
|
|
17589
17589
|
});
|
|
17590
17590
|
}
|
|
17591
17591
|
}
|
|
17592
|
-
Yt = /* @__PURE__ */ new WeakMap(), Jd = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(),
|
|
17592
|
+
Yt = /* @__PURE__ */ new WeakMap(), Jd = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Go = /* @__PURE__ */ new WeakSet(), Gu = function() {
|
|
17593
17593
|
return a(this, Ke).getValue("roomNodeClient");
|
|
17594
17594
|
}, za = /* @__PURE__ */ new WeakSet(), Sd = function(e) {
|
|
17595
17595
|
return l(this, null, function* () {
|
|
@@ -18417,17 +18417,17 @@ const Lf = (Lg = class {
|
|
|
18417
18417
|
});
|
|
18418
18418
|
})
|
|
18419
18419
|
), a(this, en).on(
|
|
18420
|
-
|
|
18420
|
+
Re.sendMessageToPeers,
|
|
18421
18421
|
(s) => {
|
|
18422
|
-
const t =
|
|
18422
|
+
const t = Es == null ? void 0 : Es.formatSocketServiceMessage(
|
|
18423
18423
|
s.message
|
|
18424
18424
|
);
|
|
18425
18425
|
this.broadcastIframeEvent(Ie.chatMessage, { message: t });
|
|
18426
18426
|
}
|
|
18427
18427
|
), a(this, en).on(
|
|
18428
|
-
|
|
18428
|
+
Re.sendMessageToRoom,
|
|
18429
18429
|
(s) => {
|
|
18430
|
-
const t =
|
|
18430
|
+
const t = Es == null ? void 0 : Es.formatSocketServiceMessage(
|
|
18431
18431
|
s.message
|
|
18432
18432
|
);
|
|
18433
18433
|
this.broadcastIframeEvent(Ie.chatMessage, { message: t });
|
|
@@ -19355,7 +19355,7 @@ const hg = {
|
|
|
19355
19355
|
}), r[o][1];
|
|
19356
19356
|
};
|
|
19357
19357
|
var pe = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(pe || {});
|
|
19358
|
-
const i0 = Y_(), Pa =
|
|
19358
|
+
const i0 = Y_(), Pa = _s(
|
|
19359
19359
|
i0.config.media
|
|
19360
19360
|
);
|
|
19361
19361
|
function a0(s) {
|
|
@@ -19366,18 +19366,18 @@ function a0(s) {
|
|
|
19366
19366
|
enableHighBitrate: (r = s.audio.enableHighBitrate) != null ? r : false
|
|
19367
19367
|
}), t.video = s.video.quality, t;
|
|
19368
19368
|
}
|
|
19369
|
-
var ki,
|
|
19369
|
+
var ki, As;
|
|
19370
19370
|
class n0 {
|
|
19371
19371
|
constructor(t, e) {
|
|
19372
19372
|
g(this, ki, void 0);
|
|
19373
|
-
g(this,
|
|
19373
|
+
g(this, As, void 0);
|
|
19374
19374
|
h(this, "getScreenShareConstraints", () => {
|
|
19375
19375
|
var u, p, f, S, E, _, P, k, A, N, H;
|
|
19376
19376
|
const t2 = (u = a(this, ki)) == null ? void 0 : u.screenshare, e2 = (f = (p = t2 == null ? void 0 : t2.width) == null ? void 0 : p.max) != null ? f : 1920, r = (E = (S = t2 == null ? void 0 : t2.height) == null ? void 0 : S.max) != null ? E : 1080, i = (P = (_ = t2 == null ? void 0 : t2.frameRate) == null ? void 0 : _.max) != null ? P : 5;
|
|
19377
19377
|
let n = (A = (k = t2 == null ? void 0 : t2.frameRate) == null ? void 0 : k.ideal) != null ? A : 5;
|
|
19378
19378
|
const o = t2 == null ? void 0 : t2.displaySurface, c = t2 == null ? void 0 : t2.selfBrowserSurface;
|
|
19379
|
-
a(this,
|
|
19380
|
-
(N = a(this,
|
|
19379
|
+
a(this, As).getValue("flagsmith").getValue(Z.VAL_MIN_FRAMERATE) && (n = parseInt(
|
|
19380
|
+
(N = a(this, As).getValue("flagsmith").getValue(Z.VAL_MIN_FRAMERATE)) == null ? void 0 : N.toString(),
|
|
19381
19381
|
10
|
|
19382
19382
|
));
|
|
19383
19383
|
let d = {
|
|
@@ -19388,8 +19388,8 @@ class n0 {
|
|
|
19388
19388
|
max: i
|
|
19389
19389
|
}
|
|
19390
19390
|
};
|
|
19391
|
-
if (a(this,
|
|
19392
|
-
const $ = (H = a(this,
|
|
19391
|
+
if (a(this, As).getValue("flagsmith").hasFeature(Z.SCREENSHARE_CONSTRAINTS)) {
|
|
19392
|
+
const $ = (H = a(this, As).getValue("flagsmith").getValue(
|
|
19393
19393
|
Z.SCREENSHARE_CONSTRAINTS
|
|
19394
19394
|
)) == null ? void 0 : H.toString();
|
|
19395
19395
|
d = JSON.parse($);
|
|
@@ -19424,21 +19424,21 @@ class n0 {
|
|
|
19424
19424
|
let i = hg.vga;
|
|
19425
19425
|
if (typeof r == "string" ? i = hg[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
|
|
19426
19426
|
ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
|
|
19427
|
-
}, Te.isChromiumBased() && (i.frameRate.max = 30), a(this,
|
|
19428
|
-
const u = (d = a(this,
|
|
19427
|
+
}, Te.isChromiumBased() && (i.frameRate.max = 30), a(this, As).getValue("flagsmith").hasFeature(Z.VIDEO_CONSTRAINTS)) {
|
|
19428
|
+
const u = (d = a(this, As).getValue("flagsmith").getValue(
|
|
19429
19429
|
Z.VIDEO_CONSTRAINTS
|
|
19430
19430
|
)) == null ? void 0 : d.toString();
|
|
19431
19431
|
i = JSON.parse(u);
|
|
19432
19432
|
}
|
|
19433
19433
|
return e2.video = i, typeof e2.video == "boolean" || (t2 ? e2.video.deviceId = { exact: t2 } : e2.video.facingMode = "user"), e2;
|
|
19434
19434
|
});
|
|
19435
|
-
m(this,
|
|
19435
|
+
m(this, As, t), m(this, ki, e);
|
|
19436
19436
|
}
|
|
19437
19437
|
getUpdatedVideoConstraints(t) {
|
|
19438
19438
|
return t;
|
|
19439
19439
|
}
|
|
19440
19440
|
}
|
|
19441
|
-
ki = /* @__PURE__ */ new WeakMap(),
|
|
19441
|
+
ki = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap();
|
|
19442
19442
|
class Su extends Error {
|
|
19443
19443
|
constructor(e, r, i) {
|
|
19444
19444
|
super(r);
|
|
@@ -19475,7 +19475,7 @@ class o0 {
|
|
|
19475
19475
|
});
|
|
19476
19476
|
}
|
|
19477
19477
|
}
|
|
19478
|
-
var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor,
|
|
19478
|
+
var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor, bs = (s, t, e, r) => {
|
|
19479
19479
|
for (var i = r > 1 ? void 0 : r ? d0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
19480
19480
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
19481
19481
|
return r && i && c0(t, e, i), i;
|
|
@@ -19778,37 +19778,37 @@ let Bt = (Ug = class extends o0 {
|
|
|
19778
19778
|
});
|
|
19779
19779
|
}
|
|
19780
19780
|
}, an = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Ug);
|
|
19781
|
-
|
|
19781
|
+
bs([
|
|
19782
19782
|
T.trace("WebMediaInterface.destruct")
|
|
19783
19783
|
], Bt.prototype, "destruct", 1);
|
|
19784
|
-
|
|
19784
|
+
bs([
|
|
19785
19785
|
T.trace("WebMediaInterface.handlePermissionErrors")
|
|
19786
19786
|
], Bt.prototype, "handlePermissionErrors", 1);
|
|
19787
|
-
|
|
19787
|
+
bs([
|
|
19788
19788
|
T.trace("WebMediaInterface.getAudioAndVideoTrack")
|
|
19789
19789
|
], Bt.prototype, "getAudioAndVideoTrack", 1);
|
|
19790
|
-
|
|
19790
|
+
bs([
|
|
19791
19791
|
T.trace("WebMediaInterface.getAudioTrack")
|
|
19792
19792
|
], Bt.prototype, "getAudioTrack", 1);
|
|
19793
|
-
|
|
19793
|
+
bs([
|
|
19794
19794
|
T.trace("WebMediaInterface.getVideoTrack")
|
|
19795
19795
|
], Bt.prototype, "getVideoTrack", 1);
|
|
19796
|
-
|
|
19796
|
+
bs([
|
|
19797
19797
|
T.trace("WebMediaInterface.getScreenShareTracks")
|
|
19798
19798
|
], Bt.prototype, "getScreenShareTracks", 1);
|
|
19799
|
-
|
|
19799
|
+
bs([
|
|
19800
19800
|
T.trace("WebMediaInterface.getAvailableDevices")
|
|
19801
19801
|
], Bt.prototype, "getAvailableDevices", 1);
|
|
19802
|
-
|
|
19802
|
+
bs([
|
|
19803
19803
|
T.trace("WebMediaInterface.getAvailableDevicesByKind")
|
|
19804
19804
|
], Bt.prototype, "getAvailableDevicesByKind", 1);
|
|
19805
|
-
|
|
19805
|
+
bs([
|
|
19806
19806
|
T.trace("WebMediaInterface.getDevice")
|
|
19807
19807
|
], Bt.prototype, "getDevice", 1);
|
|
19808
|
-
|
|
19808
|
+
bs([
|
|
19809
19809
|
T.trace("WebMediaInterface.onDeviceChange")
|
|
19810
19810
|
], Bt.prototype, "onDeviceChange", 1);
|
|
19811
|
-
Bt =
|
|
19811
|
+
Bt = bs([
|
|
19812
19812
|
ht("1600")
|
|
19813
19813
|
], Bt);
|
|
19814
19814
|
const Uf = Bt, ko = {
|
|
@@ -20496,7 +20496,7 @@ zl([
|
|
|
20496
20496
|
zl([
|
|
20497
20497
|
T.trace("VideoMediaHandler.conditionallyChangeTrack")
|
|
20498
20498
|
], zc.prototype, "conditionallyChangeTrack", 1);
|
|
20499
|
-
const b0 = zc, mg =
|
|
20499
|
+
const b0 = zc, mg = _s(
|
|
20500
20500
|
kh()
|
|
20501
20501
|
);
|
|
20502
20502
|
var Rt, Ii, Xo, cn;
|
|
@@ -20508,7 +20508,7 @@ const Ma = class {
|
|
|
20508
20508
|
g(this, cn, void 0);
|
|
20509
20509
|
if (!t)
|
|
20510
20510
|
throw new R("Could not load preset.", "0904");
|
|
20511
|
-
m(this, Rt, t.config), m(this, Xo, t.name), m(this, Ii, t.ui ||
|
|
20511
|
+
m(this, Rt, t.config), m(this, Xo, t.name), m(this, Ii, t.ui || _s(kh().ui)), m(this, cn, t.permissions.plugins.config);
|
|
20512
20512
|
}
|
|
20513
20513
|
static fromResponse(t) {
|
|
20514
20514
|
return new Ma(t);
|
|
@@ -20687,21 +20687,21 @@ var A0 = Object.defineProperty, M0 = Object.getOwnPropertyDescriptor, D0 = (s, t
|
|
|
20687
20687
|
for (var i = r > 1 ? void 0 : r ? M0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20688
20688
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20689
20689
|
return r && i && A0(t, e, i), i;
|
|
20690
|
-
}, ln, un, Ys,
|
|
20690
|
+
}, ln, un, Ys, Ms;
|
|
20691
20691
|
class Bf {
|
|
20692
20692
|
constructor(t, e, r) {
|
|
20693
20693
|
h(this, "livestream");
|
|
20694
20694
|
g(this, ln, void 0);
|
|
20695
20695
|
g(this, un, void 0);
|
|
20696
20696
|
g(this, Ys, void 0);
|
|
20697
|
-
g(this,
|
|
20698
|
-
m(this,
|
|
20697
|
+
g(this, Ms, void 0);
|
|
20698
|
+
m(this, Ms, t), m(this, un, e), this.livestream = new $h(t, e), m(this, Ys, r), this.setupEvents();
|
|
20699
20699
|
}
|
|
20700
20700
|
get logger() {
|
|
20701
|
-
return a(this,
|
|
20701
|
+
return a(this, Ms).getValue("logger");
|
|
20702
20702
|
}
|
|
20703
20703
|
get telemetry() {
|
|
20704
|
-
return a(this,
|
|
20704
|
+
return a(this, Ms).getValue("telemetry");
|
|
20705
20705
|
}
|
|
20706
20706
|
fetchInitialLivestreamingState() {
|
|
20707
20707
|
return l(this, null, function* () {
|
|
@@ -20746,15 +20746,15 @@ class Bf {
|
|
|
20746
20746
|
(t) => {
|
|
20747
20747
|
this.livestream.viewerCount = t.count, this.livestream.emit("viewerCountUpdate", t.count);
|
|
20748
20748
|
}
|
|
20749
|
-
), a(this,
|
|
20749
|
+
), a(this, Ms).getValue("peerSessionStore").on(
|
|
20750
20750
|
b.PEER_JOINED_INTERNAL,
|
|
20751
20751
|
(t) => l(this, null, function* () {
|
|
20752
20752
|
var e;
|
|
20753
20753
|
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === true && t.recorderType === "LIVESTREAMER" && (m(this, ln, t.id), this.livestream.setLivestreamState("LIVESTREAMING"));
|
|
20754
20754
|
})
|
|
20755
|
-
), a(this,
|
|
20755
|
+
), a(this, Ms).getValue("peerSessionStore").on(b.PEER_CLOSED, (t) => {
|
|
20756
20756
|
t.id === a(this, ln) && (m(this, ln, void 0), this.livestream.setLivestreamState("IDLE"));
|
|
20757
|
-
}), a(this,
|
|
20757
|
+
}), a(this, Ms).getValue("peerSessionStore").onAsync(b.LEAVE_MEDIA_ROOM, () => l(this, null, function* () {
|
|
20758
20758
|
if (!this.livestream.playbackUrl) {
|
|
20759
20759
|
this.logger.info("Fetching livestreaming state on leave stage");
|
|
20760
20760
|
try {
|
|
@@ -20763,7 +20763,7 @@ class Bf {
|
|
|
20763
20763
|
this.logger.error("Failed to fetch livestreaming state on leave stage", { error: t });
|
|
20764
20764
|
}
|
|
20765
20765
|
}
|
|
20766
|
-
})), a(this,
|
|
20766
|
+
})), a(this, Ms).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => l(this, null, function* () {
|
|
20767
20767
|
try {
|
|
20768
20768
|
yield this.fetchInitialLivestreamingState();
|
|
20769
20769
|
} catch (t) {
|
|
@@ -20772,7 +20772,7 @@ class Bf {
|
|
|
20772
20772
|
}));
|
|
20773
20773
|
}
|
|
20774
20774
|
}
|
|
20775
|
-
ln = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(),
|
|
20775
|
+
ln = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap();
|
|
20776
20776
|
D0([
|
|
20777
20777
|
T.trace("LivestreamController.setupEvents")
|
|
20778
20778
|
], Bf.prototype, "setupEvents", 1);
|
|
@@ -21845,7 +21845,7 @@ Wt([
|
|
|
21845
21845
|
Pt = Wt([
|
|
21846
21846
|
ht("1200")
|
|
21847
21847
|
], Pt);
|
|
21848
|
-
var La = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(La || {}),
|
|
21848
|
+
var La = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(La || {}), we = /* @__PURE__ */ ((s) => (s[s.HIVE = 1] = "HIVE", s[s.ROOM_NODE = 2] = "ROOM_NODE", s[s.CF = 3] = "CF", s))(we || {}), W0 = Object.defineProperty, J0 = Object.getOwnPropertyDescriptor, Ea = (s, t, e, r) => {
|
|
21849
21849
|
for (var i = r > 1 ? void 0 : r ? J0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
21850
21850
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
21851
21851
|
return r && i && W0(t, e, i), i;
|
|
@@ -21893,12 +21893,12 @@ const Td = (Hg = class {
|
|
|
21893
21893
|
this.context = s;
|
|
21894
21894
|
const i = s.getValue("logger");
|
|
21895
21895
|
switch (m(this, Ui, new mi(i)), m(this, $i, new mi(i)), this.roomSocketHandler = e, this.participants = new Pt(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), r) {
|
|
21896
|
-
case
|
|
21896
|
+
case we.HIVE: {
|
|
21897
21897
|
this.events = is;
|
|
21898
21898
|
break;
|
|
21899
21899
|
}
|
|
21900
|
-
case
|
|
21901
|
-
this.events =
|
|
21900
|
+
case we.CF: {
|
|
21901
|
+
this.events = Ts;
|
|
21902
21902
|
break;
|
|
21903
21903
|
}
|
|
21904
21904
|
default:
|
|
@@ -22757,7 +22757,7 @@ Ea([
|
|
|
22757
22757
|
Ea([
|
|
22758
22758
|
T.trace("ParticipantController.processNewConsumer")
|
|
22759
22759
|
], Tr.prototype, "processNewConsumer", 1);
|
|
22760
|
-
const he =
|
|
22760
|
+
const he = _s(
|
|
22761
22761
|
kh().permissions
|
|
22762
22762
|
);
|
|
22763
22763
|
var q, fn, Hi, el, St, Vt;
|
|
@@ -22832,7 +22832,7 @@ const Da = class extends qt {
|
|
|
22832
22832
|
}
|
|
22833
22833
|
get mediaRoomType() {
|
|
22834
22834
|
const { sfu: e } = a(this, Hi).getValue("roomNodeOptions");
|
|
22835
|
-
return e ===
|
|
22835
|
+
return e === we.CF ? "CF" : "HIVE";
|
|
22836
22836
|
}
|
|
22837
22837
|
get stageEnabled() {
|
|
22838
22838
|
var e;
|
|
@@ -23994,7 +23994,7 @@ class eD {
|
|
|
23994
23994
|
g(this, ze, void 0);
|
|
23995
23995
|
h(this, "events");
|
|
23996
23996
|
h(this, "sfuType");
|
|
23997
|
-
m(this, ze, t), this.sfuType = e, this.events = e ===
|
|
23997
|
+
m(this, ze, t), this.sfuType = e, this.events = e === we.CF ? Ts : is;
|
|
23998
23998
|
}
|
|
23999
23999
|
joinRoom(t, e, r, i = false, n = null) {
|
|
24000
24000
|
return l(this, null, function* () {
|
|
@@ -24045,7 +24045,7 @@ class eD {
|
|
|
24045
24045
|
}
|
|
24046
24046
|
consume(t) {
|
|
24047
24047
|
return l(this, null, function* () {
|
|
24048
|
-
if (this.sfuType ===
|
|
24048
|
+
if (this.sfuType === we.HIVE)
|
|
24049
24049
|
throw new Error("Hive does not support socket consumer operations");
|
|
24050
24050
|
const e = (yield a(this, ze).sendMessagePromise(
|
|
24051
24051
|
this.events.consume,
|
|
@@ -24068,7 +24068,7 @@ class eD {
|
|
|
24068
24068
|
}
|
|
24069
24069
|
closeConsumer(t) {
|
|
24070
24070
|
return l(this, null, function* () {
|
|
24071
|
-
if (this.sfuType ===
|
|
24071
|
+
if (this.sfuType === we.HIVE)
|
|
24072
24072
|
throw new Error("Hive does not support socket consumer operations");
|
|
24073
24073
|
return (yield a(this, ze).sendMessagePromise(
|
|
24074
24074
|
this.events.closeConsumer,
|
|
@@ -24078,7 +24078,7 @@ class eD {
|
|
|
24078
24078
|
}
|
|
24079
24079
|
updateConsumersSimulcastConfig(t) {
|
|
24080
24080
|
return l(this, null, function* () {
|
|
24081
|
-
if (this.sfuType ===
|
|
24081
|
+
if (this.sfuType === we.HIVE)
|
|
24082
24082
|
throw new Error("Method not implemented");
|
|
24083
24083
|
return (yield a(this, ze).sendMessagePromise(
|
|
24084
24084
|
this.events.updateConsumersSimulcastConfig,
|
|
@@ -24226,7 +24226,7 @@ class Bh extends Yl {
|
|
|
24226
24226
|
h(this, "enableHighBitrate", false);
|
|
24227
24227
|
h(this, "enableStereo", false);
|
|
24228
24228
|
h(this, "enableDtx", true);
|
|
24229
|
-
h(this, "sfu",
|
|
24229
|
+
h(this, "sfu", we.HIVE);
|
|
24230
24230
|
}
|
|
24231
24231
|
get midTransceiverMap() {
|
|
24232
24232
|
return this._mapMidTransceiver;
|
|
@@ -24276,7 +24276,7 @@ class Bh extends Yl {
|
|
|
24276
24276
|
connect() {
|
|
24277
24277
|
return l(this, null, function* () {
|
|
24278
24278
|
let e;
|
|
24279
|
-
this.sfu ===
|
|
24279
|
+
this.sfu === we.CF ? this.pc.addTransceiver("video", { direction: "sendonly" }) : e = this.pc.createDataChannel("dyte");
|
|
24280
24280
|
const r = yield this.pc.createOffer();
|
|
24281
24281
|
return yield this.pc.setLocalDescription(r), this.logger.info(`connect offer: ${JSON.stringify(r)}`), {
|
|
24282
24282
|
offerSdp: r,
|
|
@@ -24706,12 +24706,12 @@ class jh extends Bh {
|
|
|
24706
24706
|
function tD(s, t) {
|
|
24707
24707
|
return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
|
|
24708
24708
|
}
|
|
24709
|
-
var oc, Bi,
|
|
24709
|
+
var oc, Bi, Ds, tl, Os, wr, cc, eh, sl, Qf, rl, Xf;
|
|
24710
24710
|
class sD extends Yl {
|
|
24711
24711
|
constructor(e, r) {
|
|
24712
24712
|
var i;
|
|
24713
24713
|
super(e);
|
|
24714
|
-
g(this,
|
|
24714
|
+
g(this, Os);
|
|
24715
24715
|
g(this, cc);
|
|
24716
24716
|
g(this, sl);
|
|
24717
24717
|
g(this, rl);
|
|
@@ -24727,12 +24727,12 @@ class sD extends Yl {
|
|
|
24727
24727
|
h(this, "transceiver");
|
|
24728
24728
|
g(this, oc, void 0);
|
|
24729
24729
|
g(this, Bi, void 0);
|
|
24730
|
-
g(this,
|
|
24730
|
+
g(this, Ds, void 0);
|
|
24731
24731
|
g(this, tl, void 0);
|
|
24732
|
-
this.id = r.id, this.localId = r.localId, m(this, oc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, m(this,
|
|
24732
|
+
this.id = r.id, this.localId = r.localId, m(this, oc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, m(this, Ds, false), this.producerId = r.producerId, this.track = r.track, m(this, Bi, (i = r.paused) != null ? i : false), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, L(this, sl, Qf).call(this), m(this, tl, e);
|
|
24733
24733
|
}
|
|
24734
24734
|
get closed() {
|
|
24735
|
-
return a(this,
|
|
24735
|
+
return a(this, Ds);
|
|
24736
24736
|
}
|
|
24737
24737
|
get kind() {
|
|
24738
24738
|
return this.track.kind;
|
|
@@ -24741,31 +24741,31 @@ class sD extends Yl {
|
|
|
24741
24741
|
return a(this, Bi);
|
|
24742
24742
|
}
|
|
24743
24743
|
close(e, r) {
|
|
24744
|
-
a(this,
|
|
24744
|
+
a(this, Ds) || (this.logger.debug(`Consumer::close() ${e ? `with reason ${e}` : ""}`, a(this, Os, wr)), m(this, Ds, true), r && (L(this, rl, Xf).call(this), this.transceiver.stop()), this.safeEmit("close", e));
|
|
24745
24745
|
}
|
|
24746
24746
|
getStats() {
|
|
24747
24747
|
return l(this, null, function* () {
|
|
24748
|
-
if (a(this,
|
|
24748
|
+
if (a(this, Ds))
|
|
24749
24749
|
throw new At("closed");
|
|
24750
24750
|
return a(this, oc).getReceiverStats(this.localId);
|
|
24751
24751
|
});
|
|
24752
24752
|
}
|
|
24753
24753
|
pause() {
|
|
24754
|
-
if (this.logger.debug("consumer::pause()", a(this,
|
|
24755
|
-
this.logger.error("consumer::pause() | Consumer closed", a(this,
|
|
24754
|
+
if (this.logger.debug("consumer::pause()", a(this, Os, wr)), a(this, Ds)) {
|
|
24755
|
+
this.logger.error("consumer::pause() | Consumer closed", a(this, Os, wr));
|
|
24756
24756
|
return;
|
|
24757
24757
|
}
|
|
24758
24758
|
m(this, Bi, true), this.track.enabled = false, this.safeEmit("pause");
|
|
24759
24759
|
}
|
|
24760
24760
|
resume() {
|
|
24761
|
-
if (this.logger.debug("consumer::resume()", a(this,
|
|
24762
|
-
this.logger.error("Consumer::resume() | Consumer closed", a(this,
|
|
24761
|
+
if (this.logger.debug("consumer::resume()", a(this, Os, wr)), a(this, Ds)) {
|
|
24762
|
+
this.logger.error("Consumer::resume() | Consumer closed", a(this, Os, wr));
|
|
24763
24763
|
return;
|
|
24764
24764
|
}
|
|
24765
24765
|
m(this, Bi, false), this.track.enabled = true, this.safeEmit("resume");
|
|
24766
24766
|
}
|
|
24767
24767
|
}
|
|
24768
|
-
oc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(),
|
|
24768
|
+
oc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakSet(), wr = function() {
|
|
24769
24769
|
return {
|
|
24770
24770
|
consumer: {
|
|
24771
24771
|
id: this.id,
|
|
@@ -24775,14 +24775,14 @@ oc = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Os = /*
|
|
|
24775
24775
|
}
|
|
24776
24776
|
};
|
|
24777
24777
|
}, cc = /* @__PURE__ */ new WeakSet(), eh = function() {
|
|
24778
|
-
this.logger.debug('Consumer::track "ended" event', a(this,
|
|
24778
|
+
this.logger.debug('Consumer::track "ended" event', a(this, Os, wr)), this.safeEmit("trackended");
|
|
24779
24779
|
}, sl = /* @__PURE__ */ new WeakSet(), Qf = function() {
|
|
24780
24780
|
this.track.addEventListener("ended", L(this, cc, eh).bind(this));
|
|
24781
24781
|
}, rl = /* @__PURE__ */ new WeakSet(), Xf = function() {
|
|
24782
24782
|
try {
|
|
24783
24783
|
this.track.removeEventListener("ended", L(this, cc, eh)), this.track.stop();
|
|
24784
24784
|
} catch (e) {
|
|
24785
|
-
this.logger.error("Consumer::destroyTrack()", B(D({}, a(this,
|
|
24785
|
+
this.logger.error("Consumer::destroyTrack()", B(D({}, a(this, Os, wr)), {
|
|
24786
24786
|
error: e
|
|
24787
24787
|
}));
|
|
24788
24788
|
}
|
|
@@ -25228,7 +25228,7 @@ const Na = class extends Yl {
|
|
|
25228
25228
|
this.setServerId(n), yield i(o);
|
|
25229
25229
|
})), !(yield this.transportConnectionPromise))
|
|
25230
25230
|
throw new Error("ice connection failed");
|
|
25231
|
-
if (a(this, Gi) ===
|
|
25231
|
+
if (a(this, Gi) === we.HIVE && !(yield this.isEventsDCReady))
|
|
25232
25232
|
throw new Error("events datachannel not open");
|
|
25233
25233
|
} catch (r) {
|
|
25234
25234
|
throw this.logger.error("transport failed to connect:", { error: r }), r;
|
|
@@ -25452,7 +25452,7 @@ const Na = class extends Yl {
|
|
|
25452
25452
|
const { track: r, transceiver: i, streams: n } = e;
|
|
25453
25453
|
this.logger.info(`track event received [trackId: ${r.id}] [mid: ${i.mid}]`);
|
|
25454
25454
|
let o;
|
|
25455
|
-
a(this, Gi) ===
|
|
25455
|
+
a(this, Gi) === we.HIVE ? o = `${n[0].id}:${r.kind}` : o = `${i.mid}:${r.kind}`, r.addEventListener("ended", () => {
|
|
25456
25456
|
this.logger.info(`rtc consumer track ended [trackId: ${r.id}]`), this.unknownTracksMap.delete(o);
|
|
25457
25457
|
});
|
|
25458
25458
|
const c = this.consumerTrackEvents.get(o);
|
|
@@ -25654,7 +25654,7 @@ class nD {
|
|
|
25654
25654
|
}
|
|
25655
25655
|
dc = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap();
|
|
25656
25656
|
const oD = 2e3;
|
|
25657
|
-
var Rn, ot, ct, lc, uc, Ki, wn, bn, kn, zi,
|
|
25657
|
+
var Rn, ot, ct, lc, uc, Ki, wn, bn, kn, zi, Ns, In, An, _d, hc, sh, nl, tS, pc, rh, ol, sS, cl, rS, dl, iS, ll, aS, ul, nS, gc, ih, mc, ah;
|
|
25658
25658
|
class cD extends ut.EventEmitter {
|
|
25659
25659
|
constructor(e, r, i) {
|
|
25660
25660
|
super();
|
|
@@ -25686,14 +25686,14 @@ class cD extends ut.EventEmitter {
|
|
|
25686
25686
|
lastConnectionTime: 0
|
|
25687
25687
|
});
|
|
25688
25688
|
g(this, zi, void 0);
|
|
25689
|
-
g(this,
|
|
25689
|
+
g(this, Ns, "all");
|
|
25690
25690
|
g(this, In, void 0);
|
|
25691
25691
|
switch (this.context = e, m(this, Ki, r), m(this, In, i), m(this, Rn, new nD(e, i)), m(this, wn, new eD(r, i)), i) {
|
|
25692
|
-
case
|
|
25693
|
-
m(this, bn,
|
|
25692
|
+
case we.CF: {
|
|
25693
|
+
m(this, bn, Ts);
|
|
25694
25694
|
break;
|
|
25695
25695
|
}
|
|
25696
|
-
case
|
|
25696
|
+
case we.HIVE:
|
|
25697
25697
|
default: {
|
|
25698
25698
|
m(this, bn, is);
|
|
25699
25699
|
break;
|
|
@@ -25702,7 +25702,7 @@ class cD extends ut.EventEmitter {
|
|
|
25702
25702
|
a(this, An, _d).mediaState = {
|
|
25703
25703
|
send: { state: La.NEW },
|
|
25704
25704
|
recv: { state: La.NEW }
|
|
25705
|
-
}, (jn(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && m(this,
|
|
25705
|
+
}, (jn(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && m(this, Ns, "relay"), this.logger.info(`ICE Transport Policy initially set to ${a(this, Ns)}`), L(this, hc, sh).call(this);
|
|
25706
25706
|
}
|
|
25707
25707
|
get telemetry() {
|
|
25708
25708
|
return this.context.getValue("telemetry");
|
|
@@ -25772,7 +25772,7 @@ class cD extends ut.EventEmitter {
|
|
|
25772
25772
|
throw new Error("Method not implemented.");
|
|
25773
25773
|
}
|
|
25774
25774
|
}
|
|
25775
|
-
Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(),
|
|
25775
|
+
Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakSet(), _d = function() {
|
|
25776
25776
|
return this.context.getValue("connectionHandler");
|
|
25777
25777
|
}, hc = /* @__PURE__ */ new WeakSet(), sh = function() {
|
|
25778
25778
|
m(this, zi, {
|
|
@@ -25782,7 +25782,7 @@ Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25782
25782
|
}, nl = /* @__PURE__ */ new WeakSet(), tS = function(e) {
|
|
25783
25783
|
return l(this, null, function* () {
|
|
25784
25784
|
var o, c, d, u, p, f, S, E;
|
|
25785
|
-
(jn(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && m(this,
|
|
25785
|
+
(jn(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && m(this, Ns, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, Ns)}`);
|
|
25786
25786
|
const n = yield lt().getICEServers().catch((_) => (this.logger.warn(`failed to get iceservers from server: ${_.message}`), []));
|
|
25787
25787
|
if (e.send) {
|
|
25788
25788
|
const _ = this.context.getValue("flagsmith").hasFeature(
|
|
@@ -25796,9 +25796,9 @@ Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25796
25796
|
config: {
|
|
25797
25797
|
enableHighBitrate: (u = (d = (c = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? u : false,
|
|
25798
25798
|
enableStereo: (S = (f = (p = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : p.audio) == null ? void 0 : f.enableStereo) != null ? S : false,
|
|
25799
|
-
enableDtx: a(this, In) ===
|
|
25799
|
+
enableDtx: a(this, In) === we.HIVE ? true : !!_
|
|
25800
25800
|
},
|
|
25801
|
-
iceTransportPolicy: a(this,
|
|
25801
|
+
iceTransportPolicy: a(this, Ns)
|
|
25802
25802
|
});
|
|
25803
25803
|
}
|
|
25804
25804
|
e.recv && L(this, dl, iS).call(this, {
|
|
@@ -25806,7 +25806,7 @@ Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25806
25806
|
additionalSettings: {
|
|
25807
25807
|
encodedInsertableStreams: (E = this.context.getValue("modules").e2ee) == null ? void 0 : E.enabled
|
|
25808
25808
|
},
|
|
25809
|
-
iceTransportPolicy: a(this,
|
|
25809
|
+
iceTransportPolicy: a(this, Ns)
|
|
25810
25810
|
});
|
|
25811
25811
|
});
|
|
25812
25812
|
}, pc = /* @__PURE__ */ new WeakSet(), rh = function(e) {
|
|
@@ -25990,7 +25990,7 @@ Rn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25990
25990
|
return l(this, null, function* () {
|
|
25991
25991
|
switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: true }), this.context.getValue("flagsmith").hasFeature(
|
|
25992
25992
|
Z.HIVE_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
25993
|
-
) && a(this, Ki).isConnected && a(this, kn).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), m(this,
|
|
25993
|
+
) && a(this, Ki).isConnected && a(this, kn).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), m(this, Ns, "relay")), yield this.setupTransports({ [e]: true }), e) {
|
|
25994
25994
|
case "send": {
|
|
25995
25995
|
this.logger.info("Transport reconnected", { transport: a(this, ot) }), this.context.getValue("peerSessionStore").emit(b.RESET_PRODUCER_STATE);
|
|
25996
25996
|
break;
|
|
@@ -26335,7 +26335,7 @@ class uD extends cD {
|
|
|
26335
26335
|
m(this, vc, new Gh(this.socketHandler));
|
|
26336
26336
|
}), this.recvTransportConnectedCallback = (n) => l(this, null, function* () {
|
|
26337
26337
|
switch (a(this, Mn).clear(), this.nodeType) {
|
|
26338
|
-
case
|
|
26338
|
+
case we.CF: {
|
|
26339
26339
|
m(this, ps, new lD(
|
|
26340
26340
|
this.context,
|
|
26341
26341
|
this.events,
|
|
@@ -26345,7 +26345,7 @@ class uD extends cD {
|
|
|
26345
26345
|
));
|
|
26346
26346
|
break;
|
|
26347
26347
|
}
|
|
26348
|
-
case
|
|
26348
|
+
case we.HIVE:
|
|
26349
26349
|
default:
|
|
26350
26350
|
m(this, ps, new dD(this.context, n));
|
|
26351
26351
|
}
|
|
@@ -26674,7 +26674,7 @@ class hD {
|
|
|
26674
26674
|
}
|
|
26675
26675
|
}
|
|
26676
26676
|
const pD = 60, gD = 400;
|
|
26677
|
-
var ir, ar, fs, kc, Zi, xn, nr, Gr, Un, or, cr,
|
|
26677
|
+
var ir, ar, fs, kc, Zi, xn, nr, Gr, Un, or, cr, Vs, Pl, fS, Ic, oh, Cl, SS, Rl, vS;
|
|
26678
26678
|
const Oo = class {
|
|
26679
26679
|
constructor(t, e) {
|
|
26680
26680
|
g(this, Pl);
|
|
@@ -26690,10 +26690,10 @@ const Oo = class {
|
|
|
26690
26690
|
g(this, Un, void 0);
|
|
26691
26691
|
g(this, or, void 0);
|
|
26692
26692
|
g(this, cr, void 0);
|
|
26693
|
-
g(this,
|
|
26693
|
+
g(this, Vs, void 0);
|
|
26694
26694
|
this.reportRequest = e, m(this, or, t), m(this, xn, new _o());
|
|
26695
26695
|
const { isReactNative: r } = navigator;
|
|
26696
|
-
m(this, cr, r ? new vg(a(this, or)) : new yg(a(this, or))), m(this,
|
|
26696
|
+
m(this, cr, r ? new vg(a(this, or)) : new yg(a(this, or))), m(this, Vs, r ? hD : ld);
|
|
26697
26697
|
}
|
|
26698
26698
|
get logger() {
|
|
26699
26699
|
return a(this, or).getValue("logger");
|
|
@@ -26705,28 +26705,28 @@ const Oo = class {
|
|
|
26705
26705
|
m(this, kc, t), a(this, cr) instanceof yg && (a(this, cr).audioTrack = t);
|
|
26706
26706
|
}
|
|
26707
26707
|
start() {
|
|
26708
|
-
this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${a(this, fs)}`), a(this, ir) && a(this,
|
|
26708
|
+
this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${a(this, fs)}`), a(this, ir) && a(this, Vs).clearInterval(a(this, ir)), m(this, ir, a(this, Vs).setInterval(() => l(this, null, function* () {
|
|
26709
26709
|
var i;
|
|
26710
26710
|
if (!a(this, kc) || !a(this, fs))
|
|
26711
26711
|
return;
|
|
26712
26712
|
const { energy: t } = L(this, Pl, fS).call(this), e = L(i = Oo, Ic, oh).call(i, t);
|
|
26713
26713
|
let r = 0.9;
|
|
26714
26714
|
a(this, Un) !== e && a(this, Un) ? r = 0.9 : e ? r = 0.3 : r = 0.5, m(this, Zi, (a(this, Zi) || 0) * (1 - r) + t * r);
|
|
26715
|
-
}), pD)), a(this, ar) && a(this,
|
|
26715
|
+
}), pD)), a(this, ar) && a(this, Vs).clearInterval(a(this, ar)), m(this, ar, a(this, Vs).setInterval(
|
|
26716
26716
|
L(this, Cl, SS).bind(this),
|
|
26717
26717
|
gD
|
|
26718
26718
|
));
|
|
26719
26719
|
}
|
|
26720
26720
|
stop() {
|
|
26721
26721
|
try {
|
|
26722
|
-
this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${a(this, fs)}`), a(this, ir) && (a(this,
|
|
26722
|
+
this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${a(this, fs)}`), a(this, ir) && (a(this, Vs).clearInterval(a(this, ir)), m(this, ir, void 0)), a(this, ar) && (a(this, Vs).clearInterval(a(this, ar)), m(this, ar, void 0));
|
|
26723
26723
|
} catch (t) {
|
|
26724
26724
|
}
|
|
26725
26725
|
a(this, xn).reset(), a(this, cr) instanceof vg && a(this, cr).stop();
|
|
26726
26726
|
}
|
|
26727
26727
|
};
|
|
26728
26728
|
let Po = Oo;
|
|
26729
|
-
ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(),
|
|
26729
|
+
ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Vs = /* @__PURE__ */ new WeakMap(), Pl = /* @__PURE__ */ new WeakSet(), fS = function() {
|
|
26730
26730
|
var o;
|
|
26731
26731
|
const { samples: t } = a(this, cr), { energy: e, isVoice: r } = a(this, xn).processAudioChunk(t), i = L(o = Oo, Rl, vS).call(o, e);
|
|
26732
26732
|
return a(this, or).getValue("flagsmith").hasFeature(Z.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
|
|
@@ -26813,7 +26813,7 @@ var SD = Object.defineProperty, vD = Object.getOwnPropertyDescriptor, le = (s, t
|
|
|
26813
26813
|
return r && i && SD(t, e, i), i;
|
|
26814
26814
|
};
|
|
26815
26815
|
const Nt = ["video/VP9", "video/VP8"];
|
|
26816
|
-
var Ac, Mc, dt, G, $n,
|
|
26816
|
+
var Ac, Mc, dt, G, $n, Ls, yt, ea, ta, sa, Dc, ss, dr, Oc, ra, ia, Tt, kt, Wr, ba, wl, TS, bl, ES, kl, _S, Nc, ch, Il, Tu, PS, Al, CS, Ml, RS, Dl, wS, tt, gt, aa, Co, Ol, bS, Nl, kS, Vl, IS;
|
|
26817
26817
|
const yS = (Tu = class {
|
|
26818
26818
|
constructor(s, t, e) {
|
|
26819
26819
|
g(this, Wr);
|
|
@@ -26837,7 +26837,7 @@ const yS = (Tu = class {
|
|
|
26837
26837
|
g(this, dt, void 0);
|
|
26838
26838
|
g(this, G, void 0);
|
|
26839
26839
|
g(this, $n, void 0);
|
|
26840
|
-
g(this,
|
|
26840
|
+
g(this, Ls, void 0);
|
|
26841
26841
|
g(this, yt, void 0);
|
|
26842
26842
|
g(this, ea, void 0);
|
|
26843
26843
|
g(this, ta, void 0);
|
|
@@ -26861,7 +26861,7 @@ const yS = (Tu = class {
|
|
|
26861
26861
|
])), m(this, ia, /* @__PURE__ */ new Map([
|
|
26862
26862
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26863
26863
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26864
|
-
])), m(this,
|
|
26864
|
+
])), m(this, Ls, t), m(this, dt, r), m(this, ea, false), m(this, G, new uD(s, r, t)), m(this, yt, a(this, G).events), m(this, dr, /* @__PURE__ */ new Set()), m(this, Tt, /* @__PURE__ */ new Map()), m(this, ta, false), m(this, sa, new Zu(s.getValue("logger"))), t === we.CF && m(this, kt, new Po(
|
|
26865
26865
|
this.context,
|
|
26866
26866
|
a(this, G).socketHandler.audioActivity.bind(a(this, G).socketHandler)
|
|
26867
26867
|
)), this.e2ee = (n = (i = s.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : false, this.handleSocketEvents(), this.handleCallstatsEvents(), m(this, Dc, Ih(
|
|
@@ -26927,23 +26927,19 @@ const yS = (Tu = class {
|
|
|
26927
26927
|
}
|
|
26928
26928
|
leaveRoom() {
|
|
26929
26929
|
return l(this, null, function* () {
|
|
26930
|
-
var t;
|
|
26931
26930
|
a(this, G).stopAllTransports(), m(this, ta, false), a(this, Wr, ba).mediaJoinAttempted = false;
|
|
26932
26931
|
const s = {
|
|
26933
26932
|
closeRoom: false
|
|
26934
26933
|
};
|
|
26935
|
-
|
|
26936
|
-
|
|
26937
|
-
|
|
26938
|
-
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
}
|
|
26945
|
-
this.context.getValue("callstats").callEnded(), this.context.getValue("telemetry").destruct();
|
|
26946
|
-
}
|
|
26934
|
+
a(this, dt).sendMessagePromise(
|
|
26935
|
+
a(this, yt).leaveRoom,
|
|
26936
|
+
vR.toBinary(s)
|
|
26937
|
+
).then((e) => {
|
|
26938
|
+
var r;
|
|
26939
|
+
(r = nw.fromBinary(e.payload)) != null && r.closed && this.logger.warn("Weird state on peer closed and should not happen");
|
|
26940
|
+
}).catch((e) => {
|
|
26941
|
+
this.logger.error("error on sending leave room request", { error: e });
|
|
26942
|
+
}), this.context.getValue("callstats").callEnded(), this.context.getValue("telemetry").destruct();
|
|
26947
26943
|
});
|
|
26948
26944
|
}
|
|
26949
26945
|
activatePeers(s) {
|
|
@@ -26984,8 +26980,8 @@ const yS = (Tu = class {
|
|
|
26984
26980
|
}
|
|
26985
26981
|
return this._shareWebcam(s, t);
|
|
26986
26982
|
}
|
|
26987
|
-
const i = [t].concat(Nt.filter((p) => p !== t)), n = L(this, Vl, IS).call(this, s, i), o = jn(this.context, "disableSimulcast"), c = a(this,
|
|
26988
|
-
!o && this.context.getValue("flagsmith").hasFeature(c) ? (this.logger.info(`Simulcast enabled for SFU: ${a(this,
|
|
26983
|
+
const i = [t].concat(Nt.filter((p) => p !== t)), n = L(this, Vl, IS).call(this, s, i), o = jn(this.context, "disableSimulcast"), c = a(this, Ls) === we.CF ? Z.ENABLE_CF_SIMULCAST : Z.ENABLE_HIVE_SIMULCAST;
|
|
26984
|
+
!o && this.context.getValue("flagsmith").hasFeature(c) ? (this.logger.info(`Simulcast enabled for SFU: ${a(this, Ls)}`), n.encodings = r0(this.context, s)) : this.logger.info(`Simulcast disabled for webcam producer, SFU: ${a(this, Ls)}`), this.context.getValue("flagsmith").hasFeature(Z.TRACK_HINT) && (n.track.contentHint = this.context.getValue("flagsmith").getValue(
|
|
26989
26985
|
Z.TRACK_HINT
|
|
26990
26986
|
));
|
|
26991
26987
|
const d = () => {
|
|
@@ -27050,7 +27046,7 @@ const yS = (Tu = class {
|
|
|
27050
27046
|
supportsRemoteControl: Te.isElectron()
|
|
27051
27047
|
},
|
|
27052
27048
|
stopTracks: false,
|
|
27053
|
-
zeroRtpOnPause: a(this,
|
|
27049
|
+
zeroRtpOnPause: a(this, Ls) !== we.CF
|
|
27054
27050
|
}, d = () => {
|
|
27055
27051
|
};
|
|
27056
27052
|
o = a(this, G).createProducer(
|
|
@@ -27478,7 +27474,7 @@ const yS = (Tu = class {
|
|
|
27478
27474
|
t.delete(s), !(t.size !== 0 || e === Nt[0]) && this.disableWebcam(e);
|
|
27479
27475
|
}));
|
|
27480
27476
|
}
|
|
27481
|
-
}, Ac = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(),
|
|
27477
|
+
}, Ac = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), Oc = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakSet(), ba = function() {
|
|
27482
27478
|
return this.context.getValue("connectionHandler");
|
|
27483
27479
|
}, wl = /* @__PURE__ */ new WeakSet(), TS = function(s, t, e, r) {
|
|
27484
27480
|
return l(this, null, function* () {
|
|
@@ -27577,7 +27573,7 @@ const yS = (Tu = class {
|
|
|
27577
27573
|
});
|
|
27578
27574
|
}, Dl = /* @__PURE__ */ new WeakSet(), wS = function(s) {
|
|
27579
27575
|
return l(this, null, function* () {
|
|
27580
|
-
if (!(a(this,
|
|
27576
|
+
if (!(a(this, Ls) === we.HIVE || !this.context.getValue("flagsmith").hasFeature(
|
|
27581
27577
|
Z.PRECREATE_PRODUCERS
|
|
27582
27578
|
) || !s))
|
|
27583
27579
|
try {
|
|
@@ -27614,7 +27610,7 @@ const yS = (Tu = class {
|
|
|
27614
27610
|
e2ee: this.e2ee
|
|
27615
27611
|
},
|
|
27616
27612
|
stopTracks: false,
|
|
27617
|
-
zeroRtpOnPause: a(this,
|
|
27613
|
+
zeroRtpOnPause: a(this, Ls) !== we.CF
|
|
27618
27614
|
};
|
|
27619
27615
|
}, Vl = /* @__PURE__ */ new WeakSet(), IS = function(s, t) {
|
|
27620
27616
|
return {
|
|
@@ -27737,7 +27733,7 @@ var yD = Object.defineProperty, TD = Object.getOwnPropertyDescriptor, _a = (s, t
|
|
|
27737
27733
|
for (var i = r > 1 ? void 0 : r ? TD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
27738
27734
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27739
27735
|
return r && i && yD(t, e, i), i;
|
|
27740
|
-
}, Jr,
|
|
27736
|
+
}, Jr, Ss, te, Et, Lt, qg;
|
|
27741
27737
|
const DS = (qg = class {
|
|
27742
27738
|
constructor(s, t, e, r) {
|
|
27743
27739
|
g(this, Et);
|
|
@@ -27745,10 +27741,10 @@ const DS = (qg = class {
|
|
|
27745
27741
|
h(this, "authToken");
|
|
27746
27742
|
g(this, Jr, void 0);
|
|
27747
27743
|
h(this, "viewType");
|
|
27748
|
-
g(this,
|
|
27744
|
+
g(this, Ss, void 0);
|
|
27749
27745
|
g(this, te, void 0);
|
|
27750
27746
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
27751
|
-
this.self = t, m(this, te, s), this.viewType = r, this.authToken = n, m(this, Jr, i), m(this,
|
|
27747
|
+
this.self = t, m(this, te, s), this.viewType = r, this.authToken = n, m(this, Jr, i), m(this, Ss, e), t.config.viewType !== Mt.Chat && this.setupEvents();
|
|
27752
27748
|
}
|
|
27753
27749
|
get peerId() {
|
|
27754
27750
|
return a(this, te).getValue("peerId");
|
|
@@ -27884,17 +27880,17 @@ const DS = (qg = class {
|
|
|
27884
27880
|
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), pr.remapContext(t, a(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
27885
27881
|
}), a(this, te).getValue("peerSessionStore").on(b.SOCKET_SERVICE_FAILED, () => {
|
|
27886
27882
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
27887
|
-
}), a(this,
|
|
27883
|
+
}), a(this, Ss).on(x.waitingRoomRequestAccepted, () => {
|
|
27888
27884
|
this.waitlistAcceptHandler();
|
|
27889
|
-
}), a(this,
|
|
27885
|
+
}), a(this, Ss).on(md.updateUserPreset, (s) => {
|
|
27890
27886
|
s.updatePeersPresets.forEach((t) => {
|
|
27891
27887
|
t.userIds === this.self.userId && a(this, te).getValue("peerSessionStore").emit(b.UPDATE_PERMISSIONS, t.patch);
|
|
27892
27888
|
});
|
|
27893
|
-
}), a(this,
|
|
27889
|
+
}), a(this, Ss).on(x.waitingRoomRequestDenied, () => {
|
|
27894
27890
|
this.waitlistRejectedHandler();
|
|
27895
|
-
}), a(this,
|
|
27891
|
+
}), a(this, Ss).on(x.kick, () => {
|
|
27896
27892
|
this.kickHandler({ kickType: "kick" });
|
|
27897
|
-
}), a(this,
|
|
27893
|
+
}), a(this, Ss).on(x.kickAll, () => {
|
|
27898
27894
|
this.kickHandler({ kickType: "kickAll" });
|
|
27899
27895
|
}), a(this, te).getValue("peerSessionStore").onAsync(b.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), a(this, te).getValue("peerSessionStore").on(
|
|
27900
27896
|
b.PRODUCER_SCORE_UPDATE,
|
|
@@ -27929,10 +27925,10 @@ const DS = (qg = class {
|
|
|
27929
27925
|
joinRoom(s = false) {
|
|
27930
27926
|
return l(this, null, function* () {
|
|
27931
27927
|
try {
|
|
27932
|
-
const { peer: t } = yield a(this,
|
|
27928
|
+
const { peer: t } = yield a(this, Ss).joinRoom(
|
|
27933
27929
|
this.self
|
|
27934
27930
|
);
|
|
27935
|
-
a(this,
|
|
27931
|
+
a(this, Ss).socket.flush();
|
|
27936
27932
|
const e = Nh(t.stageType);
|
|
27937
27933
|
if (a(this, te).setValue("stageStatus", e, false), t.waitlisted) {
|
|
27938
27934
|
this.waitlistedHandler();
|
|
@@ -28016,7 +28012,7 @@ const DS = (qg = class {
|
|
|
28016
28012
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
28017
28013
|
});
|
|
28018
28014
|
}
|
|
28019
|
-
}, Jr = /* @__PURE__ */ new WeakMap(),
|
|
28015
|
+
}, Jr = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakSet(), Lt = function() {
|
|
28020
28016
|
return a(this, te).getValue("roomNodeClient");
|
|
28021
28017
|
}, qg);
|
|
28022
28018
|
let ai = DS;
|
|
@@ -28499,32 +28495,32 @@ class OS {
|
|
|
28499
28495
|
r = tg.fromBinary.bind(tg);
|
|
28500
28496
|
break;
|
|
28501
28497
|
}
|
|
28502
|
-
case
|
|
28498
|
+
case Ts.peerJoinedBroadcast:
|
|
28503
28499
|
case is.peerJoinedBroadcast: {
|
|
28504
28500
|
r = jp.fromBinary.bind(jp);
|
|
28505
28501
|
break;
|
|
28506
28502
|
}
|
|
28507
|
-
case
|
|
28503
|
+
case Ts.selfJoinComplete:
|
|
28508
28504
|
case is.selfJoinComplete: {
|
|
28509
28505
|
r = Du.fromBinary.bind(Du);
|
|
28510
28506
|
break;
|
|
28511
28507
|
}
|
|
28512
|
-
case
|
|
28508
|
+
case Ts.globalPeerPinBroadcast:
|
|
28513
28509
|
case is.globalPeerPinBroadcast: {
|
|
28514
28510
|
r = Jp.fromBinary.bind(Jp);
|
|
28515
28511
|
break;
|
|
28516
28512
|
}
|
|
28517
|
-
case
|
|
28513
|
+
case Ts.selectedPeer:
|
|
28518
28514
|
case is.selectedPeer: {
|
|
28519
28515
|
r = Mu.fromBinary.bind(Mu);
|
|
28520
28516
|
break;
|
|
28521
28517
|
}
|
|
28522
|
-
case
|
|
28518
|
+
case Ts.selectedPeerDiff:
|
|
28523
28519
|
case is.selectedPeerDiff: {
|
|
28524
28520
|
r = qp.fromBinary.bind(qp);
|
|
28525
28521
|
break;
|
|
28526
28522
|
}
|
|
28527
|
-
case
|
|
28523
|
+
case Ts.leaveRoom:
|
|
28528
28524
|
case is.leaveRoom: {
|
|
28529
28525
|
r = Ou.fromBinary.bind(Ou);
|
|
28530
28526
|
break;
|
|
@@ -29201,13 +29197,13 @@ class qD {
|
|
|
29201
29197
|
ui = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap();
|
|
29202
29198
|
var qS = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(qS || {});
|
|
29203
29199
|
const jD = "2", GD = "3";
|
|
29204
|
-
var Ae, ka, Ee, Ue, kr, Ye, hr, Xr,
|
|
29200
|
+
var Ae, ka, Ee, Ue, kr, Ye, hr, Xr, ys, Ia, Bs, dh, jS, Ro, Cd, lh, GS, uh, Pg, Fd, hh, ph, WS, Io, Rd, Ao, Hd, Bd, gh, Ua, Mo, Do, qd;
|
|
29205
29201
|
class WD {
|
|
29206
29202
|
constructor(t, e) {
|
|
29207
29203
|
var F;
|
|
29208
|
-
Se(this, dh), Se(this, Ro), Se(this, lh), Se(this, uh), Se(this, Fd), Se(this, ph), Se(this, Io), Se(this, Ao), Se(this, Bd), Se(this, Ua), Se(this, Do), Se(this, Ae, void 0), Se(this, ka, void 0), Se(this, Ee, void 0), Se(this, Ue, void 0), Se(this, kr, void 0), Se(this, Ye, void 0), Se(this, hr, void 0), Se(this, Xr, void 0), Se(this,
|
|
29204
|
+
Se(this, dh), Se(this, Ro), Se(this, lh), Se(this, uh), Se(this, Fd), Se(this, ph), Se(this, Io), Se(this, Ao), Se(this, Bd), Se(this, Ua), Se(this, Do), Se(this, Ae, void 0), Se(this, ka, void 0), Se(this, Ee, void 0), Se(this, Ue, void 0), Se(this, kr, void 0), Se(this, Ye, void 0), Se(this, hr, void 0), Se(this, Xr, void 0), Se(this, ys, void 0), Se(this, Ia, void 0), Se(this, Bs, void 0);
|
|
29209
29205
|
var r, i, n, o, c, d, u, p, f;
|
|
29210
|
-
ne(this, ka, t), ne(this, kr, []), ne(this, Ye, new $d()), ne(this, hr, true), ne(this,
|
|
29206
|
+
ne(this, ka, t), ne(this, kr, []), ne(this, Ye, new $d()), ne(this, hr, true), ne(this, ys, 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, {
|
|
29211
29207
|
code: void 0,
|
|
29212
29208
|
reason: void 0
|
|
29213
29209
|
}), ne(this, Ue, (F = M(this, Ee).logger) != null ? F : new qD(M(this, Ee).debug ? "debug" : "info")), ne(this, Bs, new BD());
|
|
@@ -29251,7 +29247,7 @@ class WD {
|
|
|
29251
29247
|
try {
|
|
29252
29248
|
ne(this, Ae, new WebSocket(_e(this, dh, jS).call(this, M(this, ka)))), M(this, Ae).binaryType = "arraybuffer", M(this, Ue).debug("Connecting");
|
|
29253
29249
|
const i = setTimeout(() => {
|
|
29254
|
-
M(this, Ue).debug("Connection timeout. Closing socket"), ne(this, hr, true), _e(this, Do, qd).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Ee).autoReconnect && !M(this,
|
|
29250
|
+
M(this, Ue).debug("Connection timeout. Closing socket"), ne(this, hr, true), _e(this, Do, qd).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Ee).autoReconnect && !M(this, ys) && (M(this, Ye).emit(
|
|
29255
29251
|
"reconnecting"
|
|
29256
29252
|
), _e(this, Io, Rd).call(this)), r(new Error("Connection timed out!"));
|
|
29257
29253
|
}, M(this, Ee).connectionTimeout);
|
|
@@ -29266,7 +29262,7 @@ class WD {
|
|
|
29266
29262
|
try {
|
|
29267
29263
|
i && clearTimeout(i);
|
|
29268
29264
|
const { code: o, reason: c } = n;
|
|
29269
|
-
r(c), M(this, Ue).debug("Socket closed. Close event:", { event: n }), M(this, Ue).debug(`Connection closed code: ${o}`), M(this, Ue).debug(`Connection closed reason: ${c}`), M(this,
|
|
29265
|
+
r(c), M(this, Ue).debug("Socket closed. Close event:", { event: n }), M(this, Ue).debug(`Connection closed code: ${o}`), M(this, Ue).debug(`Connection closed reason: ${c}`), M(this, ys) || _e(this, Fd, hh).call(this, o, c);
|
|
29270
29266
|
} catch (o) {
|
|
29271
29267
|
_e(this, Ro, Cd).call(this, o);
|
|
29272
29268
|
}
|
|
@@ -29326,7 +29322,7 @@ class WD {
|
|
|
29326
29322
|
}), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
|
|
29327
29323
|
}
|
|
29328
29324
|
}
|
|
29329
|
-
Ae = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(),
|
|
29325
|
+
Ae = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), ys = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), Bs = /* @__PURE__ */ new WeakMap(), dh = /* @__PURE__ */ new WeakSet(), jS = function(s) {
|
|
29330
29326
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
29331
29327
|
return s;
|
|
29332
29328
|
if (s.startsWith("https://"))
|
|
@@ -29349,28 +29345,28 @@ Ae = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Ee = /*
|
|
|
29349
29345
|
ne(this, Xr, { reason: t, code: s }), M(this, Ye).emit("disconnected", { code: s, reason: t });
|
|
29350
29346
|
}, ph = /* @__PURE__ */ new WeakSet(), WS = function() {
|
|
29351
29347
|
const { reason: s, code: t } = M(this, Xr);
|
|
29352
|
-
t && t !== 1e3 && M(this, hr) && M(this, Ee).autoReconnect && !M(this,
|
|
29348
|
+
t && t !== 1e3 && M(this, hr) && M(this, Ee).autoReconnect && !M(this, ys) && (M(this, Ue).debug(`Triggering reconnection due to ${s}.`), M(this, Ye).emit(
|
|
29353
29349
|
"reconnecting"
|
|
29354
29350
|
), _e(this, Io, Rd).call(this));
|
|
29355
29351
|
}, Io = /* @__PURE__ */ new WeakSet(), Rd = function(s = true) {
|
|
29356
29352
|
return l(this, null, function* () {
|
|
29357
|
-
if (s && M(this,
|
|
29353
|
+
if (s && M(this, ys)) {
|
|
29358
29354
|
M(this, Ue).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
29359
29355
|
return;
|
|
29360
29356
|
}
|
|
29361
|
-
if (M(this,
|
|
29357
|
+
if (M(this, ys) || M(this, Bs).reset(), M(this, Ee).maxReconnectionAttempts !== null && M(this, Bs).getAttempts() >= M(this, Ee).maxReconnectionAttempts) {
|
|
29362
29358
|
M(this, Ye).emit(
|
|
29363
29359
|
"failed"
|
|
29364
|
-
), ne(this,
|
|
29360
|
+
), ne(this, ys, false);
|
|
29365
29361
|
return;
|
|
29366
29362
|
}
|
|
29367
|
-
ne(this,
|
|
29363
|
+
ne(this, ys, true), _e(this, Do, qd).call(this), _e(this, Ua, Mo).call(this);
|
|
29368
29364
|
try {
|
|
29369
29365
|
if (yield M(this, Bs).wait(), M(this, hr) === false)
|
|
29370
29366
|
return;
|
|
29371
29367
|
if (M(this, Ue).debug(`Reconnection attempt ${M(this, Bs).getAttempts()}`), M(this, Ye).emit("reconnectAttempt", { attempt: M(this, Bs).getAttempts() }), yield this.connect(), !_e(this, uh, Pg).call(this))
|
|
29372
29368
|
throw Error("Reconnect Failed");
|
|
29373
|
-
ne(this,
|
|
29369
|
+
ne(this, ys, false), ne(this, Xr, {
|
|
29374
29370
|
code: void 0,
|
|
29375
29371
|
reason: void 0
|
|
29376
29372
|
}), M(this, Ye).emit(
|
|
@@ -29404,7 +29400,7 @@ var JD = Object.defineProperty, KD = Object.getOwnPropertyDescriptor, Zl = (s, t
|
|
|
29404
29400
|
return r && i && JD(t, e, i), i;
|
|
29405
29401
|
};
|
|
29406
29402
|
const Cg = 65535, zD = 3e3;
|
|
29407
|
-
var Kr,
|
|
29403
|
+
var Kr, Pe, Ce, De, rs, st, $c, mh, Fc, fh, jg;
|
|
29408
29404
|
const JS = (jg = class {
|
|
29409
29405
|
constructor(s, {
|
|
29410
29406
|
peerId: t,
|
|
@@ -29412,11 +29408,11 @@ const JS = (jg = class {
|
|
|
29412
29408
|
authToken: r,
|
|
29413
29409
|
capabilities: i
|
|
29414
29410
|
}) {
|
|
29415
|
-
g(this,
|
|
29411
|
+
g(this, Ce);
|
|
29416
29412
|
g(this, $c);
|
|
29417
29413
|
g(this, Fc);
|
|
29418
29414
|
g(this, Kr, void 0);
|
|
29419
|
-
g(this,
|
|
29415
|
+
g(this, Pe, void 0);
|
|
29420
29416
|
h(this, "roomName");
|
|
29421
29417
|
h(this, "authToken");
|
|
29422
29418
|
h(this, "capabilities");
|
|
@@ -29425,7 +29421,7 @@ const JS = (jg = class {
|
|
|
29425
29421
|
var n;
|
|
29426
29422
|
if (!t || !e || !r)
|
|
29427
29423
|
throw new R("peerId, meetingId, or authToken can not be empty", "0404");
|
|
29428
|
-
m(this, rs, void 0), m(this, st, s), this.capabilities = i, this.roomName = e, this.authToken = r, m(this, Kr, L(this, $c, mh).call(this, t)), m(this,
|
|
29424
|
+
m(this, rs, void 0), m(this, st, s), this.capabilities = i, this.roomName = e, this.authToken = r, m(this, Kr, L(this, $c, mh).call(this, t)), m(this, Pe, new WD(a(this, Kr), {
|
|
29429
29425
|
autoReconnect: true,
|
|
29430
29426
|
disconnectOnPingTimeout: (n = i.includes("PING")) != null ? n : false,
|
|
29431
29427
|
queueOnDisconnect: true,
|
|
@@ -29434,10 +29430,10 @@ const JS = (jg = class {
|
|
|
29434
29430
|
})), this.handleSocketConnectionEvents();
|
|
29435
29431
|
}
|
|
29436
29432
|
get joinAttempted() {
|
|
29437
|
-
return a(this,
|
|
29433
|
+
return a(this, Ce, De).socketJoinAttempted;
|
|
29438
29434
|
}
|
|
29439
29435
|
set joinAttempted(s) {
|
|
29440
|
-
a(this,
|
|
29436
|
+
a(this, Ce, De).socketJoinAttempted = s;
|
|
29441
29437
|
}
|
|
29442
29438
|
get telemetry() {
|
|
29443
29439
|
return a(this, st).getValue("telemetry");
|
|
@@ -29449,7 +29445,7 @@ const JS = (jg = class {
|
|
|
29449
29445
|
return a(this, st).getValue("peerId");
|
|
29450
29446
|
}
|
|
29451
29447
|
updateURL(s) {
|
|
29452
|
-
s !== this.peerId && (m(this, Kr, L(this, $c, mh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), a(this,
|
|
29448
|
+
s !== this.peerId && (m(this, Kr, L(this, $c, mh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), a(this, Pe).updateURL(a(this, Kr));
|
|
29453
29449
|
}
|
|
29454
29450
|
static getSocketEdgeDomain(s) {
|
|
29455
29451
|
return da({ servicePrefix: "socket-edge", baseURI: s });
|
|
@@ -29459,7 +29455,7 @@ const JS = (jg = class {
|
|
|
29459
29455
|
}
|
|
29460
29456
|
connect() {
|
|
29461
29457
|
return l(this, null, function* () {
|
|
29462
|
-
a(this,
|
|
29458
|
+
a(this, Ce, De).socketJoinAttempted = true, yield a(this, Pe).connect(), a(this, Ce, De).socketJoinAttempted = true, a(this, Ce, De).socketState = {
|
|
29463
29459
|
state: "connected",
|
|
29464
29460
|
reconnected: false,
|
|
29465
29461
|
reconnectionAttempt: void 0
|
|
@@ -29468,7 +29464,7 @@ const JS = (jg = class {
|
|
|
29468
29464
|
}
|
|
29469
29465
|
disconnect() {
|
|
29470
29466
|
return l(this, null, function* () {
|
|
29471
|
-
a(this,
|
|
29467
|
+
a(this, Ce, De).socketJoinAttempted = false, a(this, Pe).disconnect(), a(this, Ce, De).socketJoinAttempted = true, a(this, Ce, De).socketState = {
|
|
29472
29468
|
state: "disconnected",
|
|
29473
29469
|
reconnected: false,
|
|
29474
29470
|
reconnectionAttempt: void 0
|
|
@@ -29477,14 +29473,14 @@ const JS = (jg = class {
|
|
|
29477
29473
|
}
|
|
29478
29474
|
get isConnected() {
|
|
29479
29475
|
try {
|
|
29480
|
-
return a(this,
|
|
29476
|
+
return a(this, Pe).readyState === 1;
|
|
29481
29477
|
} catch (s) {
|
|
29482
29478
|
return false;
|
|
29483
29479
|
}
|
|
29484
29480
|
}
|
|
29485
29481
|
sendMessage(s, t, e) {
|
|
29486
29482
|
const r = {};
|
|
29487
|
-
return a(this, st).getValue("telemetry").injectContext(r), a(this,
|
|
29483
|
+
return a(this, st).getValue("telemetry").injectContext(r), a(this, Pe).send(
|
|
29488
29484
|
s,
|
|
29489
29485
|
e != null ? e : L(this, Fc, fh).call(this),
|
|
29490
29486
|
t,
|
|
@@ -29512,11 +29508,11 @@ const JS = (jg = class {
|
|
|
29512
29508
|
return new Promise(
|
|
29513
29509
|
(o, c) => {
|
|
29514
29510
|
const d = (_, P) => {
|
|
29515
|
-
a(this,
|
|
29511
|
+
a(this, Pe).removeListener(n, _), a(this, Pe).removeListener(Cg, P), a(this, Pe).removeListener(
|
|
29516
29512
|
is.errorResponse,
|
|
29517
29513
|
P
|
|
29518
|
-
), a(this,
|
|
29519
|
-
|
|
29514
|
+
), a(this, Pe).removeListener(
|
|
29515
|
+
Ts.errorResponse,
|
|
29520
29516
|
P
|
|
29521
29517
|
);
|
|
29522
29518
|
}, u = r != null ? r : L(this, Fc, fh).call(this), p = {};
|
|
@@ -29547,9 +29543,9 @@ const JS = (jg = class {
|
|
|
29547
29543
|
}) => {
|
|
29548
29544
|
u === _ && (o({ id: _, payload: P }), d(E, S));
|
|
29549
29545
|
};
|
|
29550
|
-
a(this,
|
|
29546
|
+
a(this, Pe).on(n, E), a(this, Pe).on(Cg, S), a(this, Pe).on(is.errorResponse, S), a(this, Pe).on(Ts.errorResponse, S), setTimeout(() => {
|
|
29551
29547
|
d(E, S), c(new Error(`request timeout for callback eventId:${s}`));
|
|
29552
|
-
}, t), a(this,
|
|
29548
|
+
}, t), a(this, Pe).send(
|
|
29553
29549
|
s,
|
|
29554
29550
|
u,
|
|
29555
29551
|
e,
|
|
@@ -29559,61 +29555,61 @@ const JS = (jg = class {
|
|
|
29559
29555
|
);
|
|
29560
29556
|
}
|
|
29561
29557
|
on(s, t) {
|
|
29562
|
-
a(this,
|
|
29558
|
+
a(this, Pe).on(s, t);
|
|
29563
29559
|
}
|
|
29564
29560
|
onStateEvent(s, t) {
|
|
29565
|
-
a(this,
|
|
29561
|
+
a(this, Pe).on(s, t);
|
|
29566
29562
|
}
|
|
29567
29563
|
removeListener(s, t) {
|
|
29568
|
-
a(this,
|
|
29564
|
+
a(this, Pe).removeListener(s, t);
|
|
29569
29565
|
}
|
|
29570
29566
|
removeListeners(s) {
|
|
29571
|
-
a(this,
|
|
29567
|
+
a(this, Pe).removeListeners(s);
|
|
29572
29568
|
}
|
|
29573
29569
|
flush() {
|
|
29574
|
-
return a(this,
|
|
29570
|
+
return a(this, Pe).flush();
|
|
29575
29571
|
}
|
|
29576
29572
|
handleSocketConnectionEvents() {
|
|
29577
29573
|
this.onStateEvent("connected", () => l(this, null, function* () {
|
|
29578
|
-
this.logger.info("SocketService::Connected to socket-edge"), a(this, rs) && (clearTimeout(a(this, rs)), m(this, rs, void 0)), a(this,
|
|
29574
|
+
this.logger.info("SocketService::Connected to socket-edge"), a(this, rs) && (clearTimeout(a(this, rs)), m(this, rs, void 0)), a(this, Ce, De).updateSocketConnectionState("connected");
|
|
29579
29575
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
29580
29576
|
var i;
|
|
29581
29577
|
this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: T.location.country });
|
|
29582
|
-
const { recv: e, send: r } = (i = a(this,
|
|
29578
|
+
const { recv: e, send: r } = (i = a(this, Ce, De).mediaState) != null ? i : {};
|
|
29583
29579
|
e != null && e.state && (e == null ? void 0 : e.state) !== La.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== La.CONNECTED ? a(this, st).getValue("peerSessionStore").emit(
|
|
29584
29580
|
b.SOCKET_SERVICE_DISCONNECTED,
|
|
29585
29581
|
{
|
|
29586
|
-
joinAttempted: a(this,
|
|
29582
|
+
joinAttempted: a(this, Ce, De).joinAttempted
|
|
29587
29583
|
}
|
|
29588
29584
|
) : m(this, rs, setTimeout(() => {
|
|
29589
29585
|
a(this, st).getValue("peerSessionStore").emit(
|
|
29590
29586
|
b.SOCKET_SERVICE_DISCONNECTED,
|
|
29591
|
-
{ joinAttempted: a(this,
|
|
29587
|
+
{ joinAttempted: a(this, Ce, De).joinAttempted }
|
|
29592
29588
|
), m(this, rs, void 0);
|
|
29593
|
-
}, zD)), a(this,
|
|
29589
|
+
}, zD)), a(this, Ce, De).updateSocketConnectionState("disconnected");
|
|
29594
29590
|
}), this.onStateEvent("reconnecting", () => l(this, null, function* () {
|
|
29595
|
-
this.logger.info("SocketService::Reconnecting to socket-edge", { country: T.location.country }), a(this,
|
|
29591
|
+
this.logger.info("SocketService::Reconnecting to socket-edge", { country: T.location.country }), a(this, Ce, De).updateSocketConnectionState("reconnecting");
|
|
29596
29592
|
})), this.onStateEvent("reconnectAttempt", (t) => l(this, [t], function* ({ attempt: s }) {
|
|
29597
29593
|
this.logger.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
29598
29594
|
socket: {
|
|
29599
29595
|
retryAttempt: s
|
|
29600
29596
|
}
|
|
29601
|
-
}), a(this,
|
|
29597
|
+
}), a(this, Ce, De).updateSocketConnectionState("reconnectAttempt", s);
|
|
29602
29598
|
})), this.onStateEvent("reconnectFailure", ({ attempt: s }) => {
|
|
29603
29599
|
this.logger.info("SocketService::Reconnect attempt to socket-edge failed", {
|
|
29604
29600
|
socket: {
|
|
29605
29601
|
retryAttempt: s
|
|
29606
29602
|
}
|
|
29607
|
-
}), a(this,
|
|
29603
|
+
}), a(this, Ce, De).updateSocketConnectionState("reconnectFailure", s);
|
|
29608
29604
|
}), this.onStateEvent("reconnected", () => l(this, null, function* () {
|
|
29609
|
-
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this,
|
|
29610
|
-
wasJoinAttempted: a(this,
|
|
29611
|
-
}), a(this,
|
|
29605
|
+
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, Ce, De).mediaJoinAttempted } }), a(this, rs) && (clearTimeout(a(this, rs)), m(this, rs, void 0)), a(this, st).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_RECONNECTED, {
|
|
29606
|
+
wasJoinAttempted: a(this, Ce, De).mediaJoinAttempted
|
|
29607
|
+
}), a(this, Ce, De).updateSocketConnectionState("reconnected");
|
|
29612
29608
|
})), this.onStateEvent("failed", () => l(this, null, function* () {
|
|
29613
|
-
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,
|
|
29609
|
+
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, Ce, De).updateSocketConnectionState("failed");
|
|
29614
29610
|
}));
|
|
29615
29611
|
}
|
|
29616
|
-
}, Kr = /* @__PURE__ */ new WeakMap(),
|
|
29612
|
+
}, Kr = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakSet(), De = function() {
|
|
29617
29613
|
return a(this, st).getValue("connectionHandler");
|
|
29618
29614
|
}, rs = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), $c = /* @__PURE__ */ new WeakSet(), mh = function(s) {
|
|
29619
29615
|
let t = JS.getSocketEdgeDomain(a(this, st).getValue("baseURI"));
|
|
@@ -29750,18 +29746,18 @@ var QD = Object.defineProperty, XD = Object.getOwnPropertyDescriptor, ZD = (s, t
|
|
|
29750
29746
|
for (var i = r > 1 ? void 0 : r ? XD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
29751
29747
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
29752
29748
|
return r && i && QD(t, e, i), i;
|
|
29753
|
-
},
|
|
29749
|
+
}, vs;
|
|
29754
29750
|
class KS extends qt {
|
|
29755
29751
|
constructor(e) {
|
|
29756
29752
|
const r = e.getValue("logger");
|
|
29757
29753
|
super(r);
|
|
29758
29754
|
h(this, "meetings", []);
|
|
29759
29755
|
h(this, "parentMeeting", null);
|
|
29760
|
-
g(this,
|
|
29761
|
-
m(this,
|
|
29756
|
+
g(this, vs, void 0);
|
|
29757
|
+
m(this, vs, e);
|
|
29762
29758
|
}
|
|
29763
29759
|
get supportsConnectedMeetings() {
|
|
29764
|
-
return a(this,
|
|
29760
|
+
return a(this, vs).getValue("self").id !== "";
|
|
29765
29761
|
}
|
|
29766
29762
|
get isActive() {
|
|
29767
29763
|
return this.meetings.length !== 0;
|
|
@@ -29773,12 +29769,12 @@ class KS extends qt {
|
|
|
29773
29769
|
}
|
|
29774
29770
|
getConnectedMeetings() {
|
|
29775
29771
|
return l(this, null, function* () {
|
|
29776
|
-
return this.validateConnectedMeetingsAction(), yield a(this,
|
|
29772
|
+
return this.validateConnectedMeetingsAction(), yield a(this, vs).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
|
|
29777
29773
|
});
|
|
29778
29774
|
}
|
|
29779
29775
|
createMeetings(e) {
|
|
29780
29776
|
return l(this, null, function* () {
|
|
29781
|
-
return this.validateConnectedMeetingsAction(), (yield a(this,
|
|
29777
|
+
return this.validateConnectedMeetingsAction(), (yield a(this, vs).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
|
|
29782
29778
|
e
|
|
29783
29779
|
)).map((i) => ({
|
|
29784
29780
|
id: i.id,
|
|
@@ -29788,7 +29784,7 @@ class KS extends qt {
|
|
|
29788
29784
|
}
|
|
29789
29785
|
updateMeetings(e) {
|
|
29790
29786
|
return l(this, null, function* () {
|
|
29791
|
-
this.validateConnectedMeetingsAction(), yield a(this,
|
|
29787
|
+
this.validateConnectedMeetingsAction(), yield a(this, vs).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
|
|
29792
29788
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
29793
29789
|
);
|
|
29794
29790
|
});
|
|
@@ -29801,7 +29797,7 @@ class KS extends qt {
|
|
|
29801
29797
|
this.parentMeeting.id,
|
|
29802
29798
|
n.participants.map((o) => o.id)
|
|
29803
29799
|
) : Promise.resolve());
|
|
29804
|
-
return yield Promise.all(r), yield a(this,
|
|
29800
|
+
return yield Promise.all(r), yield a(this, vs).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
|
|
29805
29801
|
e
|
|
29806
29802
|
);
|
|
29807
29803
|
});
|
|
@@ -29809,7 +29805,7 @@ class KS extends qt {
|
|
|
29809
29805
|
moveParticipants(e, r, i) {
|
|
29810
29806
|
return l(this, null, function* () {
|
|
29811
29807
|
this.validateConnectedMeetingsAction();
|
|
29812
|
-
const n = yield a(this,
|
|
29808
|
+
const n = yield a(this, vs).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
29813
29809
|
{
|
|
29814
29810
|
sourceMeetingId: e,
|
|
29815
29811
|
destinationMeetingId: r,
|
|
@@ -29824,7 +29820,7 @@ class KS extends qt {
|
|
|
29824
29820
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
29825
29821
|
return l(this, null, function* () {
|
|
29826
29822
|
this.validateConnectedMeetingsAction();
|
|
29827
|
-
const n = yield a(this,
|
|
29823
|
+
const n = yield a(this, vs).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
29828
29824
|
{
|
|
29829
29825
|
sourceMeetingId: e,
|
|
29830
29826
|
destinationMeetingId: r,
|
|
@@ -29864,7 +29860,7 @@ class KS extends qt {
|
|
|
29864
29860
|
});
|
|
29865
29861
|
}
|
|
29866
29862
|
}
|
|
29867
|
-
|
|
29863
|
+
vs = /* @__PURE__ */ new WeakMap();
|
|
29868
29864
|
ZD([
|
|
29869
29865
|
Dt({ maxInvocations: 60, period: 60 })
|
|
29870
29866
|
], KS.prototype, "getConnectedMeetings", 1);
|
|
@@ -30052,7 +30048,7 @@ const Aa = class {
|
|
|
30052
30048
|
const u = new jM(s);
|
|
30053
30049
|
s.setValue("connectionHandler", u);
|
|
30054
30050
|
const p = Aa.createSocketService(s), f = p.connect(), S = d.getUserDetails(), E = d.getPlugins();
|
|
30055
|
-
let _ =
|
|
30051
|
+
let _ = we.HIVE, P, k = "";
|
|
30056
30052
|
try {
|
|
30057
30053
|
yield Aa.setupFlagsmith(s);
|
|
30058
30054
|
} catch (re) {
|
|
@@ -30156,7 +30152,7 @@ const Aa = class {
|
|
|
30156
30152
|
s
|
|
30157
30153
|
);
|
|
30158
30154
|
t.setValue("connectedMeetingsSocketHandler", Je);
|
|
30159
|
-
const
|
|
30155
|
+
const ks = new Ql(t, s), Er = new as(t, s), ni = new kD(s), I = new OS(t, s), y = new ID(t, s), C = new ED(s), U = new pa(t, s), ie = yield ai.init(
|
|
30160
30156
|
t,
|
|
30161
30157
|
I,
|
|
30162
30158
|
d,
|
|
@@ -30176,7 +30172,7 @@ const Aa = class {
|
|
|
30176
30172
|
ie.self,
|
|
30177
30173
|
I,
|
|
30178
30174
|
f
|
|
30179
|
-
)), (Pr = c.e2ee) != null && Pr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield
|
|
30175
|
+
)), (Pr = c.e2ee) != null && Pr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield Es.init(
|
|
30180
30176
|
t,
|
|
30181
30177
|
Er,
|
|
30182
30178
|
U,
|
|
@@ -30190,7 +30186,7 @@ const Aa = class {
|
|
|
30190
30186
|
if (c.poll && (_ = yield If.init(
|
|
30191
30187
|
t,
|
|
30192
30188
|
ie.self,
|
|
30193
|
-
|
|
30189
|
+
ks
|
|
30194
30190
|
)), c.recording && (H = new xf(
|
|
30195
30191
|
t,
|
|
30196
30192
|
ie.self,
|
|
@@ -30451,7 +30447,7 @@ let ri = (Wg = class {
|
|
|
30451
30447
|
video: true
|
|
30452
30448
|
};
|
|
30453
30449
|
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", PC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
30454
|
-
})), n.setValue("cachedUserDetails",
|
|
30450
|
+
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.5"), (u = e.modules) != null && u.experimentalAudioPlayback && n.setValue("audioPlayback", new oO()), n;
|
|
30455
30451
|
}
|
|
30456
30452
|
join() {
|
|
30457
30453
|
return l(this, null, function* () {
|