@cloudflare/realtimekit 2.0.3-staging.15 → 2.0.3-staging.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +9 -9
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +424 -422
- package/dist/index.es5.js +328 -325
- package/dist/index.rn.js +6 -6
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -49,7 +49,7 @@ import { v4 as on, validate as bm } from "uuid";
|
|
|
49
49
|
import km from "bowser";
|
|
50
50
|
import { MessageType as T, PbLong as Xa, typeofJsonValue as Bv } from "@protobuf-ts/runtime";
|
|
51
51
|
import * as fo from "worker-timers";
|
|
52
|
-
import * as
|
|
52
|
+
import * as ns from "sdp-transform";
|
|
53
53
|
function Fv(s) {
|
|
54
54
|
const { length: t } = this, e = s >= 0 ? s : t + s;
|
|
55
55
|
return e < 0 || e >= t ? void 0 : this[e];
|
|
@@ -935,10 +935,10 @@ const qm = {
|
|
|
935
935
|
PREPROD: "preprod",
|
|
936
936
|
PROD: "prod"
|
|
937
937
|
};
|
|
938
|
-
var
|
|
938
|
+
var qt;
|
|
939
939
|
(function(s) {
|
|
940
940
|
s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.SPEAKER = "SPEAKER", s.SCREENSHARE = "SCREENSHARE";
|
|
941
|
-
})(
|
|
941
|
+
})(qt || (qt = {}));
|
|
942
942
|
var Up;
|
|
943
943
|
(function(s) {
|
|
944
944
|
s[s.INIT = 0] = "INIT", s[s.ACCEPTED = 1] = "ACCEPTED", s[s.DENIED = 2] = "DENIED", s[s.SYS_DENIED = 3] = "SYS_DENIED", s[s.FAILED = 4] = "FAILED", s[s.NOTFOUND = 5] = "NOTFOUND", s[s.NOT_APPLICABLE = 6] = "NOT_APPLICABLE";
|
|
@@ -2788,7 +2788,7 @@ let q = class extends vt {
|
|
|
2788
2788
|
}
|
|
2789
2789
|
devices(e, r, i) {
|
|
2790
2790
|
this.eventHandler.callEvent({
|
|
2791
|
-
event: e ===
|
|
2791
|
+
event: e === qt.AUDIO && L.AUDIO_DEVICES_UPDATES || e === qt.VIDEO && L.VIDEO_DEVICES_UPDATES || e === qt.SPEAKER && L.SPEAKER_DEVICES_UPDATES,
|
|
2792
2792
|
metaData: {
|
|
2793
2793
|
deviceList: r
|
|
2794
2794
|
},
|
|
@@ -2797,7 +2797,7 @@ let q = class extends vt {
|
|
|
2797
2797
|
}
|
|
2798
2798
|
selectedDevice(e, r, i) {
|
|
2799
2799
|
this.eventHandler.callEvent({
|
|
2800
|
-
event: e ===
|
|
2800
|
+
event: e === qt.AUDIO && L.SELECTED_MICROHPONE_UPDATE || e === qt.VIDEO && L.SELECTED_CAMERA_UPDATE || e === qt.SPEAKER && L.SELECTED_SPEAKER_UPDATE,
|
|
2801
2801
|
metaData: {
|
|
2802
2802
|
device: r
|
|
2803
2803
|
},
|
|
@@ -2816,7 +2816,7 @@ let q = class extends vt {
|
|
|
2816
2816
|
}
|
|
2817
2817
|
mediaPlaybackFailed(e, r) {
|
|
2818
2818
|
this.eventHandler.callEvent({
|
|
2819
|
-
event: e ===
|
|
2819
|
+
event: e === qt.AUDIO && L.AUDIO_PLAY_FAILED || e === qt.VIDEO && L.VIDEO_PLAY_FAILED,
|
|
2820
2820
|
metaData: {
|
|
2821
2821
|
deviceType: e
|
|
2822
2822
|
},
|
|
@@ -2825,7 +2825,7 @@ let q = class extends vt {
|
|
|
2825
2825
|
}
|
|
2826
2826
|
mediaTrackMuted(e, r) {
|
|
2827
2827
|
this.eventHandler.callEvent({
|
|
2828
|
-
event: e ===
|
|
2828
|
+
event: e === qt.AUDIO && L.AUDIO_TRACK_MUTED || e === qt.VIDEO && L.VIDEO_TRACK_MUTED,
|
|
2829
2829
|
metaData: {
|
|
2830
2830
|
deviceType: e
|
|
2831
2831
|
},
|
|
@@ -3749,7 +3749,7 @@ class Da extends vt.EventEmitter {
|
|
|
3749
3749
|
return super.listenerCount(e);
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
|
-
class
|
|
3752
|
+
class Ht extends vt.EventEmitter {
|
|
3753
3753
|
constructor(e) {
|
|
3754
3754
|
super();
|
|
3755
3755
|
p(this, "logger");
|
|
@@ -3902,12 +3902,12 @@ function BT(s, t) {
|
|
|
3902
3902
|
return i;
|
|
3903
3903
|
}
|
|
3904
3904
|
var FT = Array.isArray;
|
|
3905
|
-
const
|
|
3905
|
+
const xt = FT;
|
|
3906
3906
|
var jT = 1 / 0, Gp = Ns ? Ns.prototype : void 0, Wp = Gp ? Gp.toString : void 0;
|
|
3907
3907
|
function uf(s) {
|
|
3908
3908
|
if (typeof s == "string")
|
|
3909
3909
|
return s;
|
|
3910
|
-
if (
|
|
3910
|
+
if (xt(s))
|
|
3911
3911
|
return BT(s, uf) + "";
|
|
3912
3912
|
if (ou(s))
|
|
3913
3913
|
return Wp ? Wp.call(s) : "";
|
|
@@ -3924,7 +3924,7 @@ var WT = /^\s+/;
|
|
|
3924
3924
|
function JT(s) {
|
|
3925
3925
|
return s && s.slice(0, GT(s) + 1).replace(WT, "");
|
|
3926
3926
|
}
|
|
3927
|
-
function
|
|
3927
|
+
function ts(s) {
|
|
3928
3928
|
var t = typeof s;
|
|
3929
3929
|
return s != null && (t == "object" || t == "function");
|
|
3930
3930
|
}
|
|
@@ -3934,9 +3934,9 @@ function Kp(s) {
|
|
|
3934
3934
|
return s;
|
|
3935
3935
|
if (ou(s))
|
|
3936
3936
|
return Jp;
|
|
3937
|
-
if (
|
|
3937
|
+
if (ts(s)) {
|
|
3938
3938
|
var t = typeof s.valueOf == "function" ? s.valueOf() : s;
|
|
3939
|
-
s =
|
|
3939
|
+
s = ts(t) ? t + "" : t;
|
|
3940
3940
|
}
|
|
3941
3941
|
if (typeof s != "string")
|
|
3942
3942
|
return s === 0 ? s : +s;
|
|
@@ -3949,7 +3949,7 @@ function Qh(s) {
|
|
|
3949
3949
|
}
|
|
3950
3950
|
var XT = "[object AsyncFunction]", ZT = "[object Function]", ey = "[object GeneratorFunction]", ty = "[object Proxy]";
|
|
3951
3951
|
function Xh(s) {
|
|
3952
|
-
if (!
|
|
3952
|
+
if (!ts(s))
|
|
3953
3953
|
return !1;
|
|
3954
3954
|
var t = ln(s);
|
|
3955
3955
|
return t == ZT || t == ey || t == XT || t == ty;
|
|
@@ -3981,7 +3981,7 @@ var ay = /[\\^$.*+?()[\]{}|]/g, oy = /^\[object .+?Constructor\]$/, cy = Functio
|
|
|
3981
3981
|
"^" + ly.call(uy).replace(ay, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3982
3982
|
);
|
|
3983
3983
|
function py(s) {
|
|
3984
|
-
if (!
|
|
3984
|
+
if (!ts(s) || ry(s))
|
|
3985
3985
|
return !1;
|
|
3986
3986
|
var t = Xh(s) ? hy : oy;
|
|
3987
3987
|
return t.test(un(s));
|
|
@@ -3999,7 +3999,7 @@ var Yp = Object.create, fy = function() {
|
|
|
3999
3999
|
function s() {
|
|
4000
4000
|
}
|
|
4001
4001
|
return function(t) {
|
|
4002
|
-
if (!
|
|
4002
|
+
if (!ts(t))
|
|
4003
4003
|
return {};
|
|
4004
4004
|
if (Yp)
|
|
4005
4005
|
return Yp(t);
|
|
@@ -4146,7 +4146,7 @@ function Zc(s) {
|
|
|
4146
4146
|
return s != null && tp(s.length) && !Xh(s);
|
|
4147
4147
|
}
|
|
4148
4148
|
function jy(s, t, e) {
|
|
4149
|
-
if (!
|
|
4149
|
+
if (!ts(e))
|
|
4150
4150
|
return !1;
|
|
4151
4151
|
var r = typeof t;
|
|
4152
4152
|
return (r == "number" ? Zc(e) && Zh(t, e.length) : r == "string" && t in e) ? Qc(e[t], s) : !1;
|
|
@@ -4209,7 +4209,7 @@ var tg = Aa && Aa.isTypedArray, kE = tg ? sp(tg) : CE;
|
|
|
4209
4209
|
const du = kE;
|
|
4210
4210
|
var IE = Object.prototype, AE = IE.hasOwnProperty;
|
|
4211
4211
|
function Sf(s, t) {
|
|
4212
|
-
var e =
|
|
4212
|
+
var e = xt(s), r = !e && ko(s), i = !e && !r && Ia(s), a = !e && !r && !i && du(s), o = e || r || i || a, c = o ? Wy(s.length, String) : [], d = c.length;
|
|
4213
4213
|
for (var l in s)
|
|
4214
4214
|
(t || AE.call(s, l)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
4215
4215
|
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -4246,7 +4246,7 @@ function LE(s) {
|
|
|
4246
4246
|
}
|
|
4247
4247
|
var VE = Object.prototype, $E = VE.hasOwnProperty;
|
|
4248
4248
|
function xE(s) {
|
|
4249
|
-
if (!
|
|
4249
|
+
if (!ts(s))
|
|
4250
4250
|
return LE(s);
|
|
4251
4251
|
var t = cu(s), e = [];
|
|
4252
4252
|
for (var r in s)
|
|
@@ -4258,7 +4258,7 @@ function ed(s) {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
var UE = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, HE = /^\w*$/;
|
|
4260
4260
|
function rp(s, t) {
|
|
4261
|
-
if (
|
|
4261
|
+
if (xt(s))
|
|
4262
4262
|
return !1;
|
|
4263
4263
|
var e = typeof s;
|
|
4264
4264
|
return e == "number" || e == "symbol" || e == "boolean" || s == null || ou(s) ? !0 : HE.test(s) || !UE.test(s) || t != null && s in Object(t);
|
|
@@ -4418,7 +4418,7 @@ function yP(s) {
|
|
|
4418
4418
|
return s == null ? "" : uf(s);
|
|
4419
4419
|
}
|
|
4420
4420
|
function yf(s, t) {
|
|
4421
|
-
return
|
|
4421
|
+
return xt(s) ? s : rp(s, t) ? [s] : TP(yP(s));
|
|
4422
4422
|
}
|
|
4423
4423
|
var EP = 1 / 0;
|
|
4424
4424
|
function pu(s) {
|
|
@@ -4530,7 +4530,7 @@ function WP(s, t) {
|
|
|
4530
4530
|
}
|
|
4531
4531
|
function kf(s, t, e) {
|
|
4532
4532
|
var r = t(s);
|
|
4533
|
-
return
|
|
4533
|
+
return xt(s) ? r : Pf(r, e(s));
|
|
4534
4534
|
}
|
|
4535
4535
|
function Gu(s) {
|
|
4536
4536
|
return kf(s, lu, ap);
|
|
@@ -4647,9 +4647,9 @@ function vo(s, t, e, r, i, a) {
|
|
|
4647
4647
|
var o, c = t & Uw, d = t & Hw, l = t & Bw;
|
|
4648
4648
|
if (e && (o = i ? e(s, r, i, a) : e(s)), o !== void 0)
|
|
4649
4649
|
return o;
|
|
4650
|
-
if (!
|
|
4650
|
+
if (!ts(s))
|
|
4651
4651
|
return s;
|
|
4652
|
-
var h =
|
|
4652
|
+
var h = xt(s);
|
|
4653
4653
|
if (h) {
|
|
4654
4654
|
if (o = nw(s), !c)
|
|
4655
4655
|
return hf(s, o);
|
|
@@ -4827,7 +4827,7 @@ function U_(s, t, e, r, i, a) {
|
|
|
4827
4827
|
}
|
|
4828
4828
|
var H_ = 1, fg = "[object Arguments]", Sg = "[object Array]", dd = "[object Object]", B_ = Object.prototype, vg = B_.hasOwnProperty;
|
|
4829
4829
|
function F_(s, t, e, r, i, a) {
|
|
4830
|
-
var o =
|
|
4830
|
+
var o = xt(s), c = xt(t), d = o ? Sg : Ma(s), l = c ? Sg : Ma(t);
|
|
4831
4831
|
d = d == fg ? dd : d, l = l == fg ? dd : l;
|
|
4832
4832
|
var h = d == dd, g = l == dd, S = d == l;
|
|
4833
4833
|
if (S && Ia(s)) {
|
|
@@ -4876,7 +4876,7 @@ function G_(s, t, e, r) {
|
|
|
4876
4876
|
return !0;
|
|
4877
4877
|
}
|
|
4878
4878
|
function Vf(s) {
|
|
4879
|
-
return s === s && !
|
|
4879
|
+
return s === s && !ts(s);
|
|
4880
4880
|
}
|
|
4881
4881
|
function W_(s) {
|
|
4882
4882
|
for (var t = lu(s), e = t.length; e--; ) {
|
|
@@ -4907,7 +4907,7 @@ function z_(s, t, e) {
|
|
|
4907
4907
|
break;
|
|
4908
4908
|
s = s[o];
|
|
4909
4909
|
}
|
|
4910
|
-
return a || ++r != i ? a : (i = s == null ? 0 : s.length, !!i && tp(i) && Zh(o, i) && (
|
|
4910
|
+
return a || ++r != i ? a : (i = s == null ? 0 : s.length, !!i && tp(i) && Zh(o, i) && (xt(s) || ko(s)));
|
|
4911
4911
|
}
|
|
4912
4912
|
function Y_(s, t) {
|
|
4913
4913
|
return s != null && z_(s, t, K_);
|
|
@@ -4933,7 +4933,7 @@ function sC(s) {
|
|
|
4933
4933
|
return rp(s) ? eC(pu(s)) : tC(s);
|
|
4934
4934
|
}
|
|
4935
4935
|
function rC(s) {
|
|
4936
|
-
return typeof s == "function" ? s : s == null ? Qh : typeof s == "object" ?
|
|
4936
|
+
return typeof s == "function" ? s : s == null ? Qh : typeof s == "object" ? xt(s) ? Z_(s[0], s[1]) : J_(s) : sC(s);
|
|
4937
4937
|
}
|
|
4938
4938
|
function iC(s) {
|
|
4939
4939
|
return function(t, e, r) {
|
|
@@ -4956,7 +4956,7 @@ function lp(s, t, e) {
|
|
|
4956
4956
|
var r, i, a, o, c, d, l = 0, h = !1, g = !1, S = !0;
|
|
4957
4957
|
if (typeof s != "function")
|
|
4958
4958
|
throw new TypeError(cC);
|
|
4959
|
-
t = Kp(t) || 0,
|
|
4959
|
+
t = Kp(t) || 0, ts(e) && (h = !!e.leading, g = "maxWait" in e, a = g ? dC(Kp(e.maxWait) || 0, t) : a, S = "trailing" in e ? !!e.trailing : S);
|
|
4960
4960
|
function y(J) {
|
|
4961
4961
|
var re = r, F = i;
|
|
4962
4962
|
return r = i = void 0, l = J, o = s.apply(F, re), o;
|
|
@@ -5020,14 +5020,14 @@ function pC(s, t, e, r, i, a, o) {
|
|
|
5020
5020
|
}
|
|
5021
5021
|
var h = a ? a(c, d, e + "", s, t, o) : void 0, g = h === void 0;
|
|
5022
5022
|
if (g) {
|
|
5023
|
-
var S =
|
|
5024
|
-
h = d, S || y || E ?
|
|
5023
|
+
var S = xt(d), y = !S && Ia(d), E = !S && !y && du(d);
|
|
5024
|
+
h = d, S || y || E ? xt(c) ? h = c : uC(c) ? h = hf(c) : y ? (g = !1, h = Cf(d, !0)) : E ? (g = !1, h = If(d, !0)) : h = [] : IP(d) || ko(d) ? (h = c, ko(c) ? h = hC(c) : (!ts(c) || Xh(c)) && (h = Af(d))) : g = !1;
|
|
5025
5025
|
}
|
|
5026
5026
|
g && (o.set(d, h), i(h, d, r, a, o), o.delete(d)), Ku(s, e, h);
|
|
5027
5027
|
}
|
|
5028
5028
|
function xf(s, t, e, r, i) {
|
|
5029
5029
|
s !== t && aC(t, function(a, o) {
|
|
5030
|
-
if (i || (i = new gs()),
|
|
5030
|
+
if (i || (i = new gs()), ts(a))
|
|
5031
5031
|
pC(s, t, o, e, xf, r, i);
|
|
5032
5032
|
else {
|
|
5033
5033
|
var c = r ? r(zu(s, o), a, o + "", s, t, i) : void 0;
|
|
@@ -5045,7 +5045,7 @@ var mC = "[object Map]", fC = "[object Set]", SC = Object.prototype, vC = SC.has
|
|
|
5045
5045
|
function TC(s) {
|
|
5046
5046
|
if (s == null)
|
|
5047
5047
|
return !0;
|
|
5048
|
-
if (Zc(s) && (
|
|
5048
|
+
if (Zc(s) && (xt(s) || typeof s == "string" || typeof s.splice == "function" || Ia(s) || du(s) || ko(s)))
|
|
5049
5049
|
return !s.length;
|
|
5050
5050
|
var t = Ma(s);
|
|
5051
5051
|
if (t == mC || t == fC)
|
|
@@ -6182,12 +6182,12 @@ const _g = 1080, Cg = 1920, eR = (s, t, e, r, i, a) => {
|
|
|
6182
6182
|
let g = d * h, S = l * h, y, E, k, b, O = 1;
|
|
6183
6183
|
return g < e && (O = e / g), Math.abs(O - 1) < 1e-14 && S < r && (O = r / S), g *= O, S *= O, k = d / (g / e), b = l / (S / r), y = (d - k) * o, E = (l - b) * c, y < 0 && (y = 0), E < 0 && (E = 0), k > d && (k = d), b > l && (b = l), [y, E, k, b, s, t, e, r];
|
|
6184
6184
|
};
|
|
6185
|
-
var
|
|
6186
|
-
const Op = class extends
|
|
6185
|
+
var yt, Ar, at, Gt, be, Wt, qs, $e, De, Mn, Dn, On, Gs, Nn, Qd, Vo;
|
|
6186
|
+
const Op = class extends Ht {
|
|
6187
6187
|
constructor(e, r, i, a) {
|
|
6188
6188
|
const o = e.getValue("logger");
|
|
6189
6189
|
super(o);
|
|
6190
|
-
m(this,
|
|
6190
|
+
m(this, yt, void 0);
|
|
6191
6191
|
m(this, Ar, void 0);
|
|
6192
6192
|
m(this, at, void 0);
|
|
6193
6193
|
m(this, Gt, void 0);
|
|
@@ -6195,7 +6195,7 @@ const Op = class extends Ut {
|
|
|
6195
6195
|
height: _g,
|
|
6196
6196
|
width: Cg
|
|
6197
6197
|
});
|
|
6198
|
-
m(this,
|
|
6198
|
+
m(this, Wt, {
|
|
6199
6199
|
brand: "#2160FD",
|
|
6200
6200
|
background: "#141414",
|
|
6201
6201
|
text: "#000000",
|
|
@@ -6262,7 +6262,7 @@ const Op = class extends Ut {
|
|
|
6262
6262
|
p(this, "disable", (e = !1) => {
|
|
6263
6263
|
f(this, Gs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, qs)), e !== !0 && document.body.removeChild(n(this, at)), f(this, qs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6264
6264
|
});
|
|
6265
|
-
f(this, Ar, e), f(this, Gs, "idle"), f(this, De, r), f(this, Mn, e.getValue("peerId")), n(this, Ar).subscribe("peerId", n(this, Qd)), f(this,
|
|
6265
|
+
f(this, Ar, e), f(this, Gs, "idle"), f(this, De, r), f(this, Mn, e.getValue("peerId")), n(this, Ar).subscribe("peerId", n(this, Qd)), f(this, Wt, {
|
|
6266
6266
|
brand: r.config.designTokens.colors.brand[500],
|
|
6267
6267
|
background: r.config.designTokens.colors.background[1e3],
|
|
6268
6268
|
text: r.config.designTokens.colors.text,
|
|
@@ -6331,7 +6331,7 @@ const Op = class extends Ut {
|
|
|
6331
6331
|
/** @access private */
|
|
6332
6332
|
createCanvas() {
|
|
6333
6333
|
const e = document.createElement("canvas");
|
|
6334
|
-
e.height = n(this, be).height, e.width = n(this, be).width, f(this,
|
|
6334
|
+
e.height = n(this, be).height, e.width = n(this, be).width, f(this, yt, e);
|
|
6335
6335
|
}
|
|
6336
6336
|
/** @access private */
|
|
6337
6337
|
setupMediaSessionEvents() {
|
|
@@ -6361,10 +6361,10 @@ const Op = class extends Ut {
|
|
|
6361
6361
|
}
|
|
6362
6362
|
/** @access private */
|
|
6363
6363
|
drawEmptyTile(e, r, i, a) {
|
|
6364
|
-
if (n(this,
|
|
6364
|
+
if (n(this, yt) === void 0)
|
|
6365
6365
|
return;
|
|
6366
|
-
const o = n(this,
|
|
6367
|
-
o.fillStyle = O || D ? n(this,
|
|
6366
|
+
const o = n(this, yt).getContext("2d"), c = n(this, yt).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, S = Math.floor(c / h), y = Math.floor(e / S), k = e % S * (h + d) + d, b = y * (g + d) + d, { displayText: O, image: D } = a != null ? a : {};
|
|
6367
|
+
o.fillStyle = O || D ? n(this, Wt).videoBackground : n(this, Wt).background, o.strokeStyle = n(this, Wt).brand, o.beginPath(), o.moveTo(k + l, b), o.arcTo(k + h, b, k + h, b + l, l), o.arcTo(
|
|
6368
6368
|
k + h,
|
|
6369
6369
|
b + g,
|
|
6370
6370
|
k + h - l,
|
|
@@ -6372,27 +6372,27 @@ const Op = class extends Ut {
|
|
|
6372
6372
|
l
|
|
6373
6373
|
), o.arcTo(k, b + g, k, b + g - l, l), o.arcTo(k, b, k + l, b, l), o.closePath(), o.fill(), o.stroke();
|
|
6374
6374
|
const U = h / 6, H = h / 2 + k, B = g / 2 + b;
|
|
6375
|
-
o.save(), (O || D) && (o.beginPath(), o.arc(H, B, U, 0, Math.PI * 2), o.fillStyle = n(this,
|
|
6375
|
+
o.save(), (O || D) && (o.beginPath(), o.arc(H, B, U, 0, Math.PI * 2), o.fillStyle = n(this, Wt).brand, o.fill(), D ? (o.clip(), o.drawImage(
|
|
6376
6376
|
D,
|
|
6377
6377
|
H - U,
|
|
6378
6378
|
B - U,
|
|
6379
6379
|
U * 2,
|
|
6380
6380
|
U * 2
|
|
6381
|
-
), o.restore()) : O && (o.fillStyle = n(this,
|
|
6381
|
+
), o.restore()) : O && (o.fillStyle = n(this, Wt).textOnBrand, o.font = `${U / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(O, H, B)), this.drawIcons(a, k, b, Math.max(h, g)));
|
|
6382
6382
|
}
|
|
6383
6383
|
/** @access private */
|
|
6384
6384
|
drawIcons(e, r, i, a) {
|
|
6385
6385
|
const o = Math.min(Math.max(a * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
6386
6386
|
let l = r + c;
|
|
6387
6387
|
const h = i + c, g = (S) => {
|
|
6388
|
-
const y = n(this,
|
|
6389
|
-
y.save(), y.fillStyle = n(this,
|
|
6388
|
+
const y = n(this, yt).getContext("2d");
|
|
6389
|
+
y.save(), y.fillStyle = n(this, Wt).background, y.beginPath(), y.moveTo(l + d, h), y.arcTo(l + o, h, l + o, h + d, d), y.arcTo(
|
|
6390
6390
|
l + o,
|
|
6391
6391
|
h + o,
|
|
6392
6392
|
l + o - d,
|
|
6393
6393
|
h + o,
|
|
6394
6394
|
d
|
|
6395
|
-
), y.arcTo(l, h + o, l, h + o - d, d), y.arcTo(l, h, l + d, h, d), y.closePath(), y.fill(), typeof S == "string" ? (y.font = `${o / 1.5}px sans-serif`, y.fillStyle = n(this,
|
|
6395
|
+
), y.arcTo(l, h + o, l, h + o - d, d), y.arcTo(l, h, l + d, h, d), y.closePath(), y.fill(), typeof S == "string" ? (y.font = `${o / 1.5}px sans-serif`, y.fillStyle = n(this, Wt).text, y.textAlign = "center", y.textBaseline = "top", y.fillText(S, o / 2 + l, h + c)) : y.drawImage(
|
|
6396
6396
|
S,
|
|
6397
6397
|
l + c,
|
|
6398
6398
|
h + c,
|
|
@@ -6405,9 +6405,11 @@ const Op = class extends Ut {
|
|
|
6405
6405
|
/** @access private */
|
|
6406
6406
|
drawTile(e, r, i) {
|
|
6407
6407
|
var l, h;
|
|
6408
|
-
if (n(this,
|
|
6408
|
+
if (n(this, yt) === void 0)
|
|
6409
6409
|
return;
|
|
6410
|
-
const a = n(this,
|
|
6410
|
+
const a = n(this, yt).getContext("2d");
|
|
6411
|
+
a.fillStyle = n(this, Wt).background, a.fillRect(0, 0, n(this, yt).width, n(this, yt).height);
|
|
6412
|
+
const o = this.getSources();
|
|
6411
6413
|
let c = 0, d = 0;
|
|
6412
6414
|
for (; c < n(this, be).height - 5; ) {
|
|
6413
6415
|
let g = 0;
|
|
@@ -6472,7 +6474,7 @@ const Op = class extends Ut {
|
|
|
6472
6474
|
document.body.removeChild(n(this, at));
|
|
6473
6475
|
} catch (e) {
|
|
6474
6476
|
}
|
|
6475
|
-
this.removeAllSources(), f(this,
|
|
6477
|
+
this.removeAllSources(), f(this, yt, void 0), f(this, Gt, void 0), f(this, qs, void 0);
|
|
6476
6478
|
}
|
|
6477
6479
|
/**
|
|
6478
6480
|
* Initialize PiP and prepare sources
|
|
@@ -6485,12 +6487,12 @@ const Op = class extends Ut {
|
|
|
6485
6487
|
throw this.logger.error("Pip.unsupported"), new Error("Picture-in-picture is not available in this environment");
|
|
6486
6488
|
if (n(this, Nn))
|
|
6487
6489
|
return;
|
|
6488
|
-
f(this, Nn, !0), this.createCanvas()
|
|
6490
|
+
f(this, Nn, !0), this.createCanvas();
|
|
6489
6491
|
const i = document.createElement("video");
|
|
6490
6492
|
f(this, be, {
|
|
6491
6493
|
height: e != null ? e : _g,
|
|
6492
6494
|
width: r != null ? r : Cg
|
|
6493
|
-
}), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this,
|
|
6495
|
+
}), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this, yt).captureStream(24), f(this, Gt, i), n(this, Gt).onloadedmetadata = () => {
|
|
6494
6496
|
try {
|
|
6495
6497
|
this.emit("pipStarted"), n(this, Gt).onleavepictureinpicture = () => {
|
|
6496
6498
|
this.emit("pipEnded");
|
|
@@ -6596,7 +6598,7 @@ const Op = class extends Ut {
|
|
|
6596
6598
|
* Enable PiP
|
|
6597
6599
|
*/
|
|
6598
6600
|
enable() {
|
|
6599
|
-
f(this, Gs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", n(this, De).videoEnabled), this.updateMediaSession("MIC", n(this, De).audioEnabled), document.body.appendChild(n(this, at)), f(this, qs, requestAnimationFrame(() => this.animate())), n(this, Gt).onloadedmetadata = () => {
|
|
6601
|
+
f(this, Gs, "activating"), this.setupEventListeners(), this.setupMediaSessionEvents(), this.updateMediaSession("CAMERA", n(this, De).videoEnabled), this.updateMediaSession("MIC", n(this, De).audioEnabled), document.body.appendChild(n(this, at)), f(this, qs, requestAnimationFrame(() => this.animate())), n(this, Gt).onloadedmetadata = () => {
|
|
6600
6602
|
n(this, Gt).requestPictureInPicture().then(() => {
|
|
6601
6603
|
f(this, Gs, "active");
|
|
6602
6604
|
});
|
|
@@ -6606,7 +6608,7 @@ const Op = class extends Ut {
|
|
|
6606
6608
|
}
|
|
6607
6609
|
};
|
|
6608
6610
|
let Qu = Op;
|
|
6609
|
-
|
|
6611
|
+
yt = new WeakMap(), Ar = new WeakMap(), at = new WeakMap(), Gt = new WeakMap(), be = new WeakMap(), Wt = new WeakMap(), qs = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Mn = new WeakMap(), Dn = new WeakMap(), On = new WeakMap(), Gs = new WeakMap(), Nn = new WeakMap(), Qd = new WeakMap(), Vo = new WeakMap();
|
|
6610
6612
|
var pr;
|
|
6611
6613
|
(function(s) {
|
|
6612
6614
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -11839,12 +11841,12 @@ var rM = Object.defineProperty, iM = Object.getOwnPropertyDescriptor, ai = (s, t
|
|
|
11839
11841
|
for (var i = r > 1 ? void 0 : r ? iM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
11840
11842
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11841
11843
|
return r && i && rM(t, e, i), i;
|
|
11842
|
-
},
|
|
11844
|
+
}, es = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(es || {}), It, Ln;
|
|
11843
11845
|
class Sr {
|
|
11844
11846
|
constructor(t, e) {
|
|
11845
|
-
m(this,
|
|
11847
|
+
m(this, It, void 0);
|
|
11846
11848
|
m(this, Ln, void 0);
|
|
11847
|
-
f(this,
|
|
11849
|
+
f(this, It, e), f(this, Ln, t);
|
|
11848
11850
|
}
|
|
11849
11851
|
/**
|
|
11850
11852
|
* @access private
|
|
@@ -11861,7 +11863,7 @@ class Sr {
|
|
|
11861
11863
|
return n(this, Ln).getValue("logger");
|
|
11862
11864
|
}
|
|
11863
11865
|
getChatMessages() {
|
|
11864
|
-
return n(this,
|
|
11866
|
+
return n(this, It).sendMessagePromise(Ye.getMessages);
|
|
11865
11867
|
}
|
|
11866
11868
|
getChatMessagesPaginated(t, e, r, i) {
|
|
11867
11869
|
return u(this, null, function* () {
|
|
@@ -11871,7 +11873,7 @@ class Sr {
|
|
|
11871
11873
|
from: 0,
|
|
11872
11874
|
// NOTE(ikabra): We do not need offset for timeStamp based pagination.
|
|
11873
11875
|
reversed: r
|
|
11874
|
-
}, i && { filters: { filters: i } }), o = yield n(this,
|
|
11876
|
+
}, i && { filters: { filters: i } }), o = yield n(this, It).sendMessagePromise(
|
|
11875
11877
|
Ye.getPaginatedMessages,
|
|
11876
11878
|
pA.toBinary(a)
|
|
11877
11879
|
);
|
|
@@ -11888,7 +11890,7 @@ class Sr {
|
|
|
11888
11890
|
payloadType: e,
|
|
11889
11891
|
payload: t
|
|
11890
11892
|
};
|
|
11891
|
-
n(this,
|
|
11893
|
+
n(this, It).sendMessage(
|
|
11892
11894
|
Ye.sendMessageToRoom,
|
|
11893
11895
|
vA.toBinary(r)
|
|
11894
11896
|
);
|
|
@@ -11899,7 +11901,7 @@ class Sr {
|
|
|
11899
11901
|
peerIds: r,
|
|
11900
11902
|
payload: t
|
|
11901
11903
|
};
|
|
11902
|
-
n(this,
|
|
11904
|
+
n(this, It).sendMessage(
|
|
11903
11905
|
Ye.sendMessageToPeers,
|
|
11904
11906
|
EA.toBinary(i)
|
|
11905
11907
|
);
|
|
@@ -11919,7 +11921,7 @@ class Sr {
|
|
|
11919
11921
|
payload: e
|
|
11920
11922
|
};
|
|
11921
11923
|
i !== void 0 && (a.pinned = i);
|
|
11922
|
-
const o = yield n(this,
|
|
11924
|
+
const o = yield n(this, It).sendMessagePromise(
|
|
11923
11925
|
Ye.editMessage,
|
|
11924
11926
|
RA.toBinary(a)
|
|
11925
11927
|
);
|
|
@@ -11930,7 +11932,7 @@ class Sr {
|
|
|
11930
11932
|
return u(this, null, function* () {
|
|
11931
11933
|
const e = {
|
|
11932
11934
|
chatId: t
|
|
11933
|
-
}, r = yield n(this,
|
|
11935
|
+
}, r = yield n(this, It).sendMessagePromise(
|
|
11934
11936
|
Ye.deleteMessage,
|
|
11935
11937
|
DA.toBinary(e)
|
|
11936
11938
|
);
|
|
@@ -11948,7 +11950,7 @@ class Sr {
|
|
|
11948
11950
|
reversed: (c = e.reversed) != null ? c : !0
|
|
11949
11951
|
};
|
|
11950
11952
|
try {
|
|
11951
|
-
const d = yield n(this,
|
|
11953
|
+
const d = yield n(this, It).sendMessagePromise(
|
|
11952
11954
|
Ye.searchChannelMessages,
|
|
11953
11955
|
LA.toBinary(r)
|
|
11954
11956
|
);
|
|
@@ -11963,7 +11965,7 @@ class Sr {
|
|
|
11963
11965
|
const r = {
|
|
11964
11966
|
chatId: t,
|
|
11965
11967
|
pinned: e
|
|
11966
|
-
}, i = yield n(this,
|
|
11968
|
+
}, i = yield n(this, It).sendMessagePromise(
|
|
11967
11969
|
Ye.pinMessage,
|
|
11968
11970
|
kA.toBinary(r)
|
|
11969
11971
|
);
|
|
@@ -12008,7 +12010,7 @@ class Sr {
|
|
|
12008
12010
|
this.logger.warn(`ChatSocketHandler::Event ${t} is not recognized`);
|
|
12009
12011
|
return;
|
|
12010
12012
|
}
|
|
12011
|
-
n(this,
|
|
12013
|
+
n(this, It).on(t, ({ payload: a }) => {
|
|
12012
12014
|
let o = i;
|
|
12013
12015
|
try {
|
|
12014
12016
|
o = r(a);
|
|
@@ -12021,7 +12023,7 @@ class Sr {
|
|
|
12021
12023
|
});
|
|
12022
12024
|
}
|
|
12023
12025
|
}
|
|
12024
|
-
|
|
12026
|
+
It = new WeakMap(), Ln = new WeakMap();
|
|
12025
12027
|
ai([
|
|
12026
12028
|
P.trace("SocketService.getChatMessages")
|
|
12027
12029
|
], Sr.prototype, "getChatMessages", 1);
|
|
@@ -12478,14 +12480,14 @@ let nh;
|
|
|
12478
12480
|
function pM(s, t) {
|
|
12479
12481
|
return nh = new Vs(s, t), nh;
|
|
12480
12482
|
}
|
|
12481
|
-
function
|
|
12483
|
+
function $t() {
|
|
12482
12484
|
return nh;
|
|
12483
12485
|
}
|
|
12484
12486
|
const Oa = {
|
|
12485
12487
|
maxInvocations: 5,
|
|
12486
12488
|
period: 1
|
|
12487
12489
|
};
|
|
12488
|
-
function
|
|
12490
|
+
function Bt(s, t) {
|
|
12489
12491
|
return function(e, r, i) {
|
|
12490
12492
|
const a = i.value;
|
|
12491
12493
|
let o = 0, c = Date.now();
|
|
@@ -12504,7 +12506,7 @@ var gM = Object.defineProperty, mM = Object.getOwnPropertyDescriptor, $s = (s, t
|
|
|
12504
12506
|
};
|
|
12505
12507
|
const fM = ["text", "image", "file", "custom", "poll"], Pd = { maxInvocations: 180, period: 60 };
|
|
12506
12508
|
var se, fi, Ze, Vn, Xd, oS, $o, ah, dm;
|
|
12507
|
-
let
|
|
12509
|
+
let ss = (dm = class extends Ht {
|
|
12508
12510
|
constructor(t, e, r, i) {
|
|
12509
12511
|
const a = t.getValue("logger");
|
|
12510
12512
|
super(a);
|
|
@@ -12591,7 +12593,7 @@ let ts = (dm = class extends Ut {
|
|
|
12591
12593
|
let r = [];
|
|
12592
12594
|
e && e.length > 0 && (e.push(n(this, se).id), r = n(this, fi).joined.toArray().filter((h) => e.includes(h.id)).map((h) => h.userId), r.push(n(this, se).userId)), n(this, Ze).sendMessage(
|
|
12593
12595
|
t,
|
|
12594
|
-
|
|
12596
|
+
es.TEXT,
|
|
12595
12597
|
e
|
|
12596
12598
|
);
|
|
12597
12599
|
});
|
|
@@ -12622,12 +12624,12 @@ let ts = (dm = class extends Ut {
|
|
|
12622
12624
|
return;
|
|
12623
12625
|
}
|
|
12624
12626
|
try {
|
|
12625
|
-
const h =
|
|
12627
|
+
const h = $t(), { getLocation: g, putLocation: S } = yield h.getPresignedUrls(t.name);
|
|
12626
12628
|
yield h.uploadFile(t, S);
|
|
12627
12629
|
let y = [];
|
|
12628
12630
|
e && e.length > 0 && (e.push(n(this, se).id), y = n(this, fi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), y.push(n(this, se).userId)), n(this, Ze).sendMessage(
|
|
12629
12631
|
g,
|
|
12630
|
-
|
|
12632
|
+
es.IMAGE,
|
|
12631
12633
|
e
|
|
12632
12634
|
);
|
|
12633
12635
|
} catch (h) {
|
|
@@ -12657,7 +12659,7 @@ let ts = (dm = class extends Ut {
|
|
|
12657
12659
|
return;
|
|
12658
12660
|
}
|
|
12659
12661
|
try {
|
|
12660
|
-
const l =
|
|
12662
|
+
const l = $t(), { getLocation: h, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12661
12663
|
yield l.uploadFile(t, g);
|
|
12662
12664
|
let S = [];
|
|
12663
12665
|
e && e.length > 0 && (e.push(n(this, se).id), S = n(this, fi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), S.push(n(this, se).userId));
|
|
@@ -12668,7 +12670,7 @@ let ts = (dm = class extends Ut {
|
|
|
12668
12670
|
});
|
|
12669
12671
|
n(this, Ze).sendMessage(
|
|
12670
12672
|
y,
|
|
12671
|
-
|
|
12673
|
+
es.FILE,
|
|
12672
12674
|
e
|
|
12673
12675
|
);
|
|
12674
12676
|
} catch (l) {
|
|
@@ -12713,7 +12715,7 @@ let ts = (dm = class extends Ut {
|
|
|
12713
12715
|
try {
|
|
12714
12716
|
if (typeof H == "string")
|
|
12715
12717
|
return { link: H };
|
|
12716
|
-
const B =
|
|
12718
|
+
const B = $t(), { getLocation: J, putLocation: re } = yield B.getPresignedUrls(H.name);
|
|
12717
12719
|
return yield B.uploadFile(H, re), {
|
|
12718
12720
|
link: J,
|
|
12719
12721
|
type: H.type,
|
|
@@ -12736,7 +12738,7 @@ let ts = (dm = class extends Ut {
|
|
|
12736
12738
|
});
|
|
12737
12739
|
n(this, Ze).sendMessage(
|
|
12738
12740
|
JSON.stringify(i),
|
|
12739
|
-
|
|
12741
|
+
es.CUSTOM,
|
|
12740
12742
|
e
|
|
12741
12743
|
);
|
|
12742
12744
|
});
|
|
@@ -12770,7 +12772,7 @@ let ts = (dm = class extends Ut {
|
|
|
12770
12772
|
n(this, Ze).editMessage(
|
|
12771
12773
|
t,
|
|
12772
12774
|
e,
|
|
12773
|
-
|
|
12775
|
+
es.TEXT
|
|
12774
12776
|
);
|
|
12775
12777
|
});
|
|
12776
12778
|
}
|
|
@@ -12792,11 +12794,11 @@ let ts = (dm = class extends Ut {
|
|
|
12792
12794
|
return;
|
|
12793
12795
|
}
|
|
12794
12796
|
try {
|
|
12795
|
-
const d =
|
|
12797
|
+
const d = $t(), { getLocation: l, putLocation: h } = yield d.getPresignedUrls(e.name);
|
|
12796
12798
|
yield d.uploadFile(e, h), n(this, Ze).editMessage(
|
|
12797
12799
|
t,
|
|
12798
12800
|
l,
|
|
12799
|
-
|
|
12801
|
+
es.IMAGE
|
|
12800
12802
|
);
|
|
12801
12803
|
} catch (d) {
|
|
12802
12804
|
throw new R("Error editing image message.", "0500", this.logger);
|
|
@@ -12815,7 +12817,7 @@ let ts = (dm = class extends Ut {
|
|
|
12815
12817
|
return;
|
|
12816
12818
|
}
|
|
12817
12819
|
try {
|
|
12818
|
-
const c =
|
|
12820
|
+
const c = $t(), { getLocation: d, putLocation: l } = yield c.getPresignedUrls(e.name);
|
|
12819
12821
|
yield c.uploadFile(e, l), n(this, Ze).editMessage(
|
|
12820
12822
|
t,
|
|
12821
12823
|
JSON.stringify({
|
|
@@ -12823,7 +12825,7 @@ let ts = (dm = class extends Ut {
|
|
|
12823
12825
|
name: e.name,
|
|
12824
12826
|
size: "size" in e ? e.size : 0
|
|
12825
12827
|
}),
|
|
12826
|
-
|
|
12828
|
+
es.FILE
|
|
12827
12829
|
);
|
|
12828
12830
|
} catch (c) {
|
|
12829
12831
|
throw new R("Error editing file message.", "0500", this.logger);
|
|
@@ -12952,38 +12954,38 @@ let ts = (dm = class extends Ut {
|
|
|
12952
12954
|
}, dm);
|
|
12953
12955
|
$s([
|
|
12954
12956
|
P.trace("Chat.sendTextMessage"),
|
|
12955
|
-
|
|
12956
|
-
],
|
|
12957
|
+
Bt(Pd)
|
|
12958
|
+
], ss.prototype, "sendTextMessage", 1);
|
|
12957
12959
|
$s([
|
|
12958
12960
|
P.trace("Chat.sendImageMessage"),
|
|
12959
|
-
|
|
12960
|
-
],
|
|
12961
|
+
Bt({ maxInvocations: 20, period: 60 })
|
|
12962
|
+
], ss.prototype, "sendImageMessage", 1);
|
|
12961
12963
|
$s([
|
|
12962
12964
|
P.trace("Chat.sendFileMessage"),
|
|
12963
|
-
|
|
12964
|
-
],
|
|
12965
|
+
Bt({ maxInvocations: 20, period: 60 })
|
|
12966
|
+
], ss.prototype, "sendFileMessage", 1);
|
|
12965
12967
|
$s([
|
|
12966
12968
|
P.trace("Chat.sendMessage"),
|
|
12967
|
-
|
|
12968
|
-
],
|
|
12969
|
+
Bt({ maxInvocations: 180, period: 60 })
|
|
12970
|
+
], ss.prototype, "sendMessage", 1);
|
|
12969
12971
|
$s([
|
|
12970
12972
|
P.trace("Chat.editTextMessage")
|
|
12971
|
-
],
|
|
12973
|
+
], ss.prototype, "editTextMessage", 1);
|
|
12972
12974
|
$s([
|
|
12973
12975
|
P.trace("Chat.editImageMessage")
|
|
12974
|
-
],
|
|
12976
|
+
], ss.prototype, "editImageMessage", 1);
|
|
12975
12977
|
$s([
|
|
12976
12978
|
P.trace("Chat.editFileMessage")
|
|
12977
|
-
],
|
|
12979
|
+
], ss.prototype, "editFileMessage", 1);
|
|
12978
12980
|
$s([
|
|
12979
12981
|
P.trace("Chat.editMessage")
|
|
12980
|
-
],
|
|
12982
|
+
], ss.prototype, "editMessage", 1);
|
|
12981
12983
|
$s([
|
|
12982
12984
|
P.trace("Chat.deleteMessage")
|
|
12983
|
-
],
|
|
12984
|
-
|
|
12985
|
+
], ss.prototype, "deleteMessage", 1);
|
|
12986
|
+
ss = $s([
|
|
12985
12987
|
ot("0500")
|
|
12986
|
-
],
|
|
12988
|
+
], ss);
|
|
12987
12989
|
var SM = Object.defineProperty, vM = Object.getOwnPropertyDescriptor, TM = (s, t, e, r) => {
|
|
12988
12990
|
for (var i = r > 1 ? void 0 : r ? vM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
12989
12991
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -12995,7 +12997,7 @@ const wr = (lm = class {
|
|
|
12995
12997
|
p(this, "chatSocketHandler");
|
|
12996
12998
|
p(this, "self");
|
|
12997
12999
|
m(this, Si, void 0);
|
|
12998
|
-
f(this, Si, s), this.chatSocketHandler = t, this.chat = new
|
|
13000
|
+
f(this, Si, s), this.chatSocketHandler = t, this.chat = new ss(
|
|
12999
13001
|
s,
|
|
13000
13002
|
t,
|
|
13001
13003
|
e,
|
|
@@ -13058,20 +13060,20 @@ const wr = (lm = class {
|
|
|
13058
13060
|
pinned: s.pinned
|
|
13059
13061
|
};
|
|
13060
13062
|
switch (e.type) {
|
|
13061
|
-
case
|
|
13063
|
+
case es.TEXT: {
|
|
13062
13064
|
e.message = s.payload;
|
|
13063
13065
|
break;
|
|
13064
13066
|
}
|
|
13065
|
-
case
|
|
13067
|
+
case es.IMAGE: {
|
|
13066
13068
|
e.link = s.payload;
|
|
13067
13069
|
break;
|
|
13068
13070
|
}
|
|
13069
|
-
case
|
|
13071
|
+
case es.FILE: {
|
|
13070
13072
|
const { link: r, name: i, size: a } = JSON.parse(s.payload);
|
|
13071
13073
|
e.link = r, e.name = i, e.size = a;
|
|
13072
13074
|
break;
|
|
13073
13075
|
}
|
|
13074
|
-
case
|
|
13076
|
+
case es.CUSTOM: {
|
|
13075
13077
|
const {
|
|
13076
13078
|
html: r,
|
|
13077
13079
|
images: i,
|
|
@@ -13187,7 +13189,7 @@ var yM = Object.defineProperty, EM = Object.getOwnPropertyDescriptor, PM = (s, t
|
|
|
13187
13189
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13188
13190
|
return r && i && yM(t, e, i), i;
|
|
13189
13191
|
}, Zd, cS, el, dS, $n, xn, xo, um;
|
|
13190
|
-
let oh = (um = class extends
|
|
13192
|
+
let oh = (um = class extends Ht {
|
|
13191
13193
|
constructor(t, e, r) {
|
|
13192
13194
|
const i = t.getValue("logger");
|
|
13193
13195
|
super(i);
|
|
@@ -13386,7 +13388,7 @@ var RM = Object.defineProperty, bM = Object.getOwnPropertyDescriptor, kM = (s, t
|
|
|
13386
13388
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13387
13389
|
return r && i && RM(t, e, i), i;
|
|
13388
13390
|
}, uS = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(uS || {}), Hn, Uo, dh, Ti, Ho, pm;
|
|
13389
|
-
let ch = (pm = class extends
|
|
13391
|
+
let ch = (pm = class extends Ht {
|
|
13390
13392
|
constructor(t, e, r, i, a) {
|
|
13391
13393
|
const o = t.getValue("logger");
|
|
13392
13394
|
super(o);
|
|
@@ -13485,7 +13487,7 @@ var AM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, hS = (s, t
|
|
|
13485
13487
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13486
13488
|
return r && i && AM(t, e, i), i;
|
|
13487
13489
|
}, Bo, gm;
|
|
13488
|
-
let nn = (gm = class extends
|
|
13490
|
+
let nn = (gm = class extends Ht {
|
|
13489
13491
|
constructor(t) {
|
|
13490
13492
|
const e = t.getValue("logger");
|
|
13491
13493
|
super(e);
|
|
@@ -13549,7 +13551,7 @@ let nn = (gm = class extends Ut {
|
|
|
13549
13551
|
getActiveTranscript() {
|
|
13550
13552
|
return u(this, null, function* () {
|
|
13551
13553
|
try {
|
|
13552
|
-
const t =
|
|
13554
|
+
const t = $t(), { transcript: e } = yield t.getActiveTranscript();
|
|
13553
13555
|
this.transcripts = nn.parseTranscripts(e);
|
|
13554
13556
|
} catch (t) {
|
|
13555
13557
|
}
|
|
@@ -13581,7 +13583,7 @@ var DM = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, NM = (s, t
|
|
|
13581
13583
|
for (var i = r > 1 ? void 0 : r ? OM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13582
13584
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13583
13585
|
return r && i && DM(t, e, i), i;
|
|
13584
|
-
}, Dr, Bn,
|
|
13586
|
+
}, Dr, Bn, At, mm;
|
|
13585
13587
|
const lh = (mm = class {
|
|
13586
13588
|
constructor(s, t, e, r, i, a) {
|
|
13587
13589
|
p(this, "meta");
|
|
@@ -13589,8 +13591,8 @@ const lh = (mm = class {
|
|
|
13589
13591
|
m(this, Dr, void 0);
|
|
13590
13592
|
m(this, Bn, void 0);
|
|
13591
13593
|
p(this, "aiSocketHandler");
|
|
13592
|
-
m(this,
|
|
13593
|
-
f(this,
|
|
13594
|
+
m(this, At, void 0);
|
|
13595
|
+
f(this, At, s), this.meta = new ch(
|
|
13594
13596
|
s,
|
|
13595
13597
|
t,
|
|
13596
13598
|
t.config.viewType,
|
|
@@ -13603,14 +13605,14 @@ const lh = (mm = class {
|
|
|
13603
13605
|
* Not for external use
|
|
13604
13606
|
*/
|
|
13605
13607
|
get telemetry() {
|
|
13606
|
-
return n(this,
|
|
13608
|
+
return n(this, At).getValue("telemetry");
|
|
13607
13609
|
}
|
|
13608
13610
|
/**
|
|
13609
13611
|
* @access private
|
|
13610
13612
|
* Not for external use
|
|
13611
13613
|
*/
|
|
13612
13614
|
get logger() {
|
|
13613
|
-
return n(this,
|
|
13615
|
+
return n(this, At).getValue("logger");
|
|
13614
13616
|
}
|
|
13615
13617
|
/**
|
|
13616
13618
|
*
|
|
@@ -13639,17 +13641,17 @@ const lh = (mm = class {
|
|
|
13639
13641
|
));
|
|
13640
13642
|
}
|
|
13641
13643
|
setupEvents() {
|
|
13642
|
-
n(this,
|
|
13644
|
+
n(this, At).getValue("peerSessionStore").on(
|
|
13643
13645
|
_.TRANSPORT_STATE_UPDATE,
|
|
13644
13646
|
(s) => {
|
|
13645
13647
|
this.meta.emit("mediaConnectionUpdate", s);
|
|
13646
13648
|
}
|
|
13647
|
-
), n(this,
|
|
13649
|
+
), n(this, At).getValue("peerSessionStore").on(
|
|
13648
13650
|
_.SOCKET_STATE_UPDATE,
|
|
13649
13651
|
(s) => {
|
|
13650
13652
|
this.meta.emit("socketConnectionUpdate", s);
|
|
13651
13653
|
}
|
|
13652
|
-
), n(this,
|
|
13654
|
+
), n(this, At).getValue("peerSessionStore").on(_.ROOM_STATE, ({ createdAt: s, roomUuid: t }) => {
|
|
13653
13655
|
const e = this.meta.meetingStartedTimestamp;
|
|
13654
13656
|
if (t && (this.meta.sessionId = t), s && !e) {
|
|
13655
13657
|
const r = new Date(s * 1e3);
|
|
@@ -13657,7 +13659,7 @@ const lh = (mm = class {
|
|
|
13657
13659
|
meetingStartedTimestamp: this.meta.meetingStartedTimestamp
|
|
13658
13660
|
});
|
|
13659
13661
|
}
|
|
13660
|
-
}), n(this,
|
|
13662
|
+
}), n(this, At).getValue("peerSessionStore").on(
|
|
13661
13663
|
_.PRODUCER_SCORE_UPDATE,
|
|
13662
13664
|
({ score: s }) => {
|
|
13663
13665
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
@@ -13665,7 +13667,7 @@ const lh = (mm = class {
|
|
|
13665
13667
|
), n(this, Dr).permissions.canSpotlight && this.meta.selfActiveTab && (this.logger.info("Asserting Spotlight status to other peers."), n(this, Bn).broadcastMessage("spotlight", {
|
|
13666
13668
|
userId: n(this, Dr).userId,
|
|
13667
13669
|
currentTab: this.meta.selfActiveTab
|
|
13668
|
-
})), n(this,
|
|
13670
|
+
})), n(this, At).getValue("peerSessionStore").on(
|
|
13669
13671
|
_.PEER_JOINED_INTERNAL,
|
|
13670
13672
|
(s) => u(this, null, function* () {
|
|
13671
13673
|
n(this, Dr).permissions.canSpotlight && this.meta.selfActiveTab && n(this, Bn).broadcastToPeers("spotlight", [s.id], {
|
|
@@ -13673,7 +13675,7 @@ const lh = (mm = class {
|
|
|
13673
13675
|
currentTab: this.meta.selfActiveTab
|
|
13674
13676
|
});
|
|
13675
13677
|
})
|
|
13676
|
-
), n(this,
|
|
13678
|
+
), n(this, At).getValue("peerSessionStore").on(
|
|
13677
13679
|
_.ROOM_MESSAGE,
|
|
13678
13680
|
(s) => {
|
|
13679
13681
|
var e, r;
|
|
@@ -13698,7 +13700,7 @@ const lh = (mm = class {
|
|
|
13698
13700
|
}
|
|
13699
13701
|
}), this.conditionallySetActiveTab(t);
|
|
13700
13702
|
}
|
|
13701
|
-
), n(this,
|
|
13703
|
+
), n(this, At).getValue("peerSessionStore").on(
|
|
13702
13704
|
_.MESSAGE,
|
|
13703
13705
|
(s) => {
|
|
13704
13706
|
var e, r;
|
|
@@ -13750,7 +13752,7 @@ const lh = (mm = class {
|
|
|
13750
13752
|
date: new Date(s.startedAt * 1e3)
|
|
13751
13753
|
} : void 0;
|
|
13752
13754
|
}
|
|
13753
|
-
}, Dr = new WeakMap(), Bn = new WeakMap(),
|
|
13755
|
+
}, Dr = new WeakMap(), Bn = new WeakMap(), At = new WeakMap(), mm);
|
|
13754
13756
|
let pS = lh;
|
|
13755
13757
|
NM([
|
|
13756
13758
|
P.trace("MetaController.setupEvents")
|
|
@@ -13817,8 +13819,8 @@ var LM = Object.defineProperty, VM = Object.getOwnPropertyDescriptor, pn = (s, t
|
|
|
13817
13819
|
for (var i = r > 1 ? void 0 : r ? VM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13818
13820
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13819
13821
|
return r && i && LM(t, e, i), i;
|
|
13820
|
-
},
|
|
13821
|
-
class oi extends
|
|
13822
|
+
}, Jt, tl, oe, Fo, vs, He, jo, uh, Fn, wd;
|
|
13823
|
+
class oi extends Ht {
|
|
13822
13824
|
constructor(e, r, i, a, o) {
|
|
13823
13825
|
const c = e.getValue("logger");
|
|
13824
13826
|
super(c);
|
|
@@ -13828,13 +13830,13 @@ class oi extends Ut {
|
|
|
13828
13830
|
* @param {StageStatus} status
|
|
13829
13831
|
*/
|
|
13830
13832
|
m(this, Fn);
|
|
13831
|
-
m(this,
|
|
13833
|
+
m(this, Jt, void 0);
|
|
13832
13834
|
m(this, tl, void 0);
|
|
13833
13835
|
m(this, oe, void 0);
|
|
13834
13836
|
m(this, Fo, void 0);
|
|
13835
13837
|
m(this, vs, void 0);
|
|
13836
13838
|
m(this, He, void 0);
|
|
13837
|
-
f(this, He, e), f(this,
|
|
13839
|
+
f(this, He, e), f(this, Jt, a), f(this, tl, o), f(this, oe, r), f(this, Fo, i), f(this, vs, []), this.setupEvents();
|
|
13838
13840
|
}
|
|
13839
13841
|
/**
|
|
13840
13842
|
* @private
|
|
@@ -13880,7 +13882,7 @@ class oi extends Ut {
|
|
|
13880
13882
|
};
|
|
13881
13883
|
n(this, oe).permissions.on("permissionsUpdate", (a) => {
|
|
13882
13884
|
const { canAcceptProductionRequests: o } = a;
|
|
13883
|
-
o !== void 0 && (n(this, oe).permissions.acceptStageRequests ? (r(), n(this,
|
|
13885
|
+
o !== void 0 && (n(this, oe).permissions.acceptStageRequests ? (r(), n(this, Jt).getStageRequests()) : (i(), f(this, vs, []), this.emit("stageAccessRequestUpdate", n(this, vs))));
|
|
13884
13886
|
}), n(this, oe).permissions.acceptStageRequests && r();
|
|
13885
13887
|
}
|
|
13886
13888
|
getAccessRequests() {
|
|
@@ -13910,14 +13912,14 @@ class oi extends Ut {
|
|
|
13910
13912
|
A(this, Fn, wd).call(this, "ACCEPTED_TO_JOIN_STAGE");
|
|
13911
13913
|
return;
|
|
13912
13914
|
}
|
|
13913
|
-
n(this,
|
|
13915
|
+
n(this, Jt).requestAccess(), A(this, Fn, wd).call(this, "REQUESTED_TO_JOIN_STAGE");
|
|
13914
13916
|
});
|
|
13915
13917
|
}
|
|
13916
13918
|
cancelRequestAccess() {
|
|
13917
13919
|
return u(this, null, function* () {
|
|
13918
13920
|
if (!n(this, oe).permissions.stageEnabled)
|
|
13919
13921
|
throw this.logger.error("Stage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
13920
|
-
n(this,
|
|
13922
|
+
n(this, Jt).cancelRequestAccess(), A(this, Fn, wd).call(this, "OFF_STAGE");
|
|
13921
13923
|
});
|
|
13922
13924
|
}
|
|
13923
13925
|
/**
|
|
@@ -13932,7 +13934,7 @@ class oi extends Ut {
|
|
|
13932
13934
|
throw this.logger.error("Stage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
13933
13935
|
if (!n(this, oe).permissions.acceptStageRequests)
|
|
13934
13936
|
throw this.logger.error("Stage::grant_access::permission_denied"), new R("You do not have permission to perform this action", "2001");
|
|
13935
|
-
return n(this,
|
|
13937
|
+
return n(this, Jt).grantAccess(e);
|
|
13936
13938
|
}
|
|
13937
13939
|
/**
|
|
13938
13940
|
* @param {string[]} userIds
|
|
@@ -13947,7 +13949,7 @@ class oi extends Ut {
|
|
|
13947
13949
|
throw this.logger.error("Stage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
13948
13950
|
if (!n(this, oe).permissions.acceptStageRequests)
|
|
13949
13951
|
throw this.logger.error("Stage::deny_access::permission_denied"), new R("You do not have permission to perform this action", "2001");
|
|
13950
|
-
return n(this,
|
|
13952
|
+
return n(this, Jt).denyAccess(e);
|
|
13951
13953
|
}
|
|
13952
13954
|
/**
|
|
13953
13955
|
* Returns the peerId of the current user
|
|
@@ -13962,7 +13964,7 @@ class oi extends Ut {
|
|
|
13962
13964
|
throw new R("You are already on stage.", "2006");
|
|
13963
13965
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || n(this, oe).permissions.stageAccess === W.NotAllowed)
|
|
13964
13966
|
throw new R(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
13965
|
-
if (n(this, He).setValue("stageStatus", "ON_STAGE", !1), yield n(this,
|
|
13967
|
+
if (n(this, He).setValue("stageStatus", "ON_STAGE", !1), yield n(this, Jt).joinStage(), e === Ds.Livestream) {
|
|
13966
13968
|
yield n(this, He).getValue("selfController").joinRoom();
|
|
13967
13969
|
return;
|
|
13968
13970
|
}
|
|
@@ -13975,7 +13977,7 @@ class oi extends Ut {
|
|
|
13975
13977
|
throw this.logger.error("Stage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
13976
13978
|
if (!(this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE"))
|
|
13977
13979
|
throw new R(`Unable to leave stage you are currently ${this.status}`, "2006");
|
|
13978
|
-
n(this, oe).setIsPinned(!1), n(this, He).setValue("stageStatus", "OFF_STAGE", !1), yield n(this,
|
|
13980
|
+
n(this, oe).setIsPinned(!1), n(this, He).setValue("stageStatus", "OFF_STAGE", !1), yield n(this, Jt).leaveStage(n(this, oe).userId);
|
|
13979
13981
|
try {
|
|
13980
13982
|
yield n(this, He).getValue("peerSessionStore").emitAsync(_.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
13981
13983
|
} catch (e) {
|
|
@@ -14001,11 +14003,11 @@ class oi extends Ut {
|
|
|
14001
14003
|
throw this.logger.error("Stage::stage_disabled"), new R("Stage is disabled", "2003");
|
|
14002
14004
|
if (!n(this, oe).permissions.acceptStageRequests)
|
|
14003
14005
|
throw this.logger.error("Stage::kick::permission_denied"), new R("You do not have permissions for kick", "2001");
|
|
14004
|
-
return n(this,
|
|
14006
|
+
return n(this, Jt).kick(e);
|
|
14005
14007
|
});
|
|
14006
14008
|
}
|
|
14007
14009
|
}
|
|
14008
|
-
|
|
14010
|
+
Jt = new WeakMap(), tl = new WeakMap(), oe = new WeakMap(), Fo = new WeakMap(), vs = new WeakMap(), He = new WeakMap(), jo = new WeakSet(), uh = function() {
|
|
14009
14011
|
return n(this, He).getValue("roomNodeClient");
|
|
14010
14012
|
}, Fn = new WeakSet(), wd = function(e) {
|
|
14011
14013
|
return u(this, null, function* () {
|
|
@@ -14631,7 +14633,7 @@ var YM = Object.defineProperty, QM = Object.getOwnPropertyDescriptor, rd = (s, t
|
|
|
14631
14633
|
};
|
|
14632
14634
|
const Kg = "Cannot start recording: another recording is already in progress.";
|
|
14633
14635
|
var qn, Gn, Wn, _d, vm;
|
|
14634
|
-
let dn = (vm = class extends
|
|
14636
|
+
let dn = (vm = class extends Ht {
|
|
14635
14637
|
constructor(t, e) {
|
|
14636
14638
|
const r = t.getValue("logger");
|
|
14637
14639
|
super(r);
|
|
@@ -14666,7 +14668,7 @@ let dn = (vm = class extends Ut {
|
|
|
14666
14668
|
}
|
|
14667
14669
|
}), new R(Kg, "1005");
|
|
14668
14670
|
try {
|
|
14669
|
-
const e =
|
|
14671
|
+
const e = $t(), { recording: r = {} } = n(this, Gn).getValue("defaults"), i = yield e.startRecording(r, t == null ? void 0 : t.allowMultiple);
|
|
14670
14672
|
this.updateRecordings([...this.recordings, {
|
|
14671
14673
|
id: i,
|
|
14672
14674
|
state: "STARTING",
|
|
@@ -14718,7 +14720,7 @@ let dn = (vm = class extends Ut {
|
|
|
14718
14720
|
const o = a.state;
|
|
14719
14721
|
t === "stop" && (a.state = "STOPPING", this.emit("recordingUpdate", "STOPPING"));
|
|
14720
14722
|
try {
|
|
14721
|
-
yield
|
|
14723
|
+
yield $t().updateRecording(a.id, t);
|
|
14722
14724
|
} catch (c) {
|
|
14723
14725
|
throw this.logger.error("Recording::stop::recording_failed_to_stop", {
|
|
14724
14726
|
error: c
|
|
@@ -14877,12 +14879,12 @@ class Tp {
|
|
|
14877
14879
|
});
|
|
14878
14880
|
}
|
|
14879
14881
|
}
|
|
14880
|
-
var sD = Object.defineProperty, rD = Object.getOwnPropertyDescriptor,
|
|
14882
|
+
var sD = Object.defineProperty, rD = Object.getOwnPropertyDescriptor, Ft = (s, t, e, r) => {
|
|
14881
14883
|
for (var i = r > 1 ? void 0 : r ? rD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14882
14884
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14883
14885
|
return r && i && sD(t, e, i), i;
|
|
14884
|
-
}, xe, ye, Se, Js,
|
|
14885
|
-
class
|
|
14886
|
+
}, xe, ye, Se, Js, Kt, Qo, ke;
|
|
14887
|
+
class bt extends Da {
|
|
14886
14888
|
constructor(e, r, i = Fd, a = !0) {
|
|
14887
14889
|
const o = e.getValue("logger");
|
|
14888
14890
|
super(o);
|
|
@@ -14890,7 +14892,7 @@ class Rt extends Da {
|
|
|
14890
14892
|
m(this, ye, void 0);
|
|
14891
14893
|
m(this, Se, void 0);
|
|
14892
14894
|
m(this, Js, void 0);
|
|
14893
|
-
m(this,
|
|
14895
|
+
m(this, Kt, void 0);
|
|
14894
14896
|
m(this, Qo, void 0);
|
|
14895
14897
|
m(this, ke, void 0);
|
|
14896
14898
|
p(this, "audioUpdateInProgress");
|
|
@@ -14905,7 +14907,7 @@ class Rt extends Da {
|
|
|
14905
14907
|
n(this, xe),
|
|
14906
14908
|
void 0,
|
|
14907
14909
|
i
|
|
14908
|
-
)), f(this,
|
|
14910
|
+
)), f(this, Kt, new AD(
|
|
14909
14911
|
n(this, ke),
|
|
14910
14912
|
n(this, xe)
|
|
14911
14913
|
)), f(this, Js, new kD(
|
|
@@ -14917,7 +14919,7 @@ class Rt extends Da {
|
|
|
14917
14919
|
), n(this, Se).on(
|
|
14918
14920
|
"trackChanged",
|
|
14919
14921
|
this.onVideoTrackChanged.bind(this)
|
|
14920
|
-
), n(this, Se).on("trackEnded", this.onVideoTrackEnded.bind(this)), n(this,
|
|
14922
|
+
), n(this, Se).on("trackEnded", this.onVideoTrackEnded.bind(this)), n(this, Kt).on(
|
|
14921
14923
|
"trackEnded",
|
|
14922
14924
|
this.onScreenShareEnded.bind(this)
|
|
14923
14925
|
), this.onVisibilityChange = this.onVisibilityChange.bind(this), document.addEventListener("visibilitychange", this.onVisibilityChange);
|
|
@@ -15135,26 +15137,26 @@ class Rt extends Da {
|
|
|
15135
15137
|
}
|
|
15136
15138
|
get screenShareTracks() {
|
|
15137
15139
|
return {
|
|
15138
|
-
audio: n(this,
|
|
15139
|
-
video: n(this,
|
|
15140
|
+
audio: n(this, Kt).audioMediaTrack,
|
|
15141
|
+
video: n(this, Kt).videoMediaTrack
|
|
15140
15142
|
};
|
|
15141
15143
|
}
|
|
15142
15144
|
get screenShareEnabled() {
|
|
15143
|
-
return n(this,
|
|
15145
|
+
return n(this, Kt).trackEnabled;
|
|
15144
15146
|
}
|
|
15145
15147
|
enableScreenShare() {
|
|
15146
15148
|
return u(this, null, function* () {
|
|
15147
|
-
yield n(this,
|
|
15149
|
+
yield n(this, Kt).enableScreenShare();
|
|
15148
15150
|
});
|
|
15149
15151
|
}
|
|
15150
15152
|
disableScreenShare() {
|
|
15151
15153
|
return u(this, null, function* () {
|
|
15152
|
-
n(this,
|
|
15154
|
+
n(this, Kt).disableScreenShare();
|
|
15153
15155
|
});
|
|
15154
15156
|
}
|
|
15155
15157
|
updateScreenshareConstraints(e) {
|
|
15156
15158
|
return u(this, null, function* () {
|
|
15157
|
-
yield n(this,
|
|
15159
|
+
yield n(this, Kt).updateConstraints(e);
|
|
15158
15160
|
});
|
|
15159
15161
|
}
|
|
15160
15162
|
getSpeakerDevices(e) {
|
|
@@ -15185,7 +15187,7 @@ class Rt extends Da {
|
|
|
15185
15187
|
return n(this, Se).setVideoMiddlewareGlobalConfig(e);
|
|
15186
15188
|
}
|
|
15187
15189
|
destruct() {
|
|
15188
|
-
n(this, ye).disableTrack(), n(this, Se).disableTrack(), n(this, Se).terminateMiddlewareWebWorker(), n(this,
|
|
15190
|
+
n(this, ye).disableTrack(), n(this, Se).disableTrack(), n(this, Se).terminateMiddlewareWebWorker(), n(this, Kt).disableScreenShare(), n(this, xe).destruct();
|
|
15189
15191
|
}
|
|
15190
15192
|
onDeviceChange(e, r) {
|
|
15191
15193
|
return u(this, null, function* () {
|
|
@@ -15241,46 +15243,46 @@ class Rt extends Da {
|
|
|
15241
15243
|
});
|
|
15242
15244
|
}
|
|
15243
15245
|
}
|
|
15244
|
-
xe = new WeakMap(), ye = new WeakMap(), Se = new WeakMap(), Js = new WeakMap(),
|
|
15245
|
-
|
|
15246
|
+
xe = new WeakMap(), ye = new WeakMap(), Se = new WeakMap(), Js = new WeakMap(), Kt = new WeakMap(), Qo = new WeakMap(), ke = new WeakMap();
|
|
15247
|
+
Ft([
|
|
15246
15248
|
P.trace("MediaHandler.setupStreams")
|
|
15247
|
-
],
|
|
15248
|
-
|
|
15249
|
+
], bt.prototype, "setupStreams", 1);
|
|
15250
|
+
Ft([
|
|
15249
15251
|
P.trace("MediaHandler.enableAudio")
|
|
15250
|
-
],
|
|
15251
|
-
|
|
15252
|
+
], bt.prototype, "enableAudio", 1);
|
|
15253
|
+
Ft([
|
|
15252
15254
|
P.trace("MediaHandler.disableAudio")
|
|
15253
|
-
],
|
|
15254
|
-
|
|
15255
|
+
], bt.prototype, "disableAudio", 1);
|
|
15256
|
+
Ft([
|
|
15255
15257
|
P.trace("MediaHandler.setAudioDevice")
|
|
15256
|
-
],
|
|
15257
|
-
|
|
15258
|
+
], bt.prototype, "setAudioDevice", 1);
|
|
15259
|
+
Ft([
|
|
15258
15260
|
P.trace("MediaHandler.enableVideo")
|
|
15259
|
-
],
|
|
15260
|
-
|
|
15261
|
+
], bt.prototype, "enableVideo", 1);
|
|
15262
|
+
Ft([
|
|
15261
15263
|
P.trace("MediaHandler.disableVideo")
|
|
15262
|
-
],
|
|
15263
|
-
|
|
15264
|
+
], bt.prototype, "disableVideo", 1);
|
|
15265
|
+
Ft([
|
|
15264
15266
|
P.trace("MediaHandler.setVideoDevice")
|
|
15265
|
-
],
|
|
15266
|
-
|
|
15267
|
+
], bt.prototype, "setVideoDevice", 1);
|
|
15268
|
+
Ft([
|
|
15267
15269
|
P.trace("MediaHandler.updateVideoConstraints")
|
|
15268
|
-
],
|
|
15269
|
-
|
|
15270
|
+
], bt.prototype, "updateVideoConstraints", 1);
|
|
15271
|
+
Ft([
|
|
15270
15272
|
P.trace("MediaHandler.enableScreenShare")
|
|
15271
|
-
],
|
|
15272
|
-
|
|
15273
|
+
], bt.prototype, "enableScreenShare", 1);
|
|
15274
|
+
Ft([
|
|
15273
15275
|
P.trace("MediaHandler.disableScreenShare")
|
|
15274
|
-
],
|
|
15275
|
-
|
|
15276
|
+
], bt.prototype, "disableScreenShare", 1);
|
|
15277
|
+
Ft([
|
|
15276
15278
|
P.trace("MediaHandler.updateScreenshareConstraints")
|
|
15277
|
-
],
|
|
15278
|
-
|
|
15279
|
+
], bt.prototype, "updateScreenshareConstraints", 1);
|
|
15280
|
+
Ft([
|
|
15279
15281
|
P.trace("MediaHandler.destruct")
|
|
15280
|
-
],
|
|
15281
|
-
|
|
15282
|
+
], bt.prototype, "destruct", 1);
|
|
15283
|
+
Ft([
|
|
15282
15284
|
P.trace("MediaHandler.onDeviceChange")
|
|
15283
|
-
],
|
|
15285
|
+
], bt.prototype, "onDeviceChange", 1);
|
|
15284
15286
|
function fd(s, t, e) {
|
|
15285
15287
|
switch (!0) {
|
|
15286
15288
|
case Pe.isChromiumBased():
|
|
@@ -15643,14 +15645,14 @@ var gD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Ss = (s, t
|
|
|
15643
15645
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
15644
15646
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15645
15647
|
return r && i && gD(t, e, i), i;
|
|
15646
|
-
}, Jn,
|
|
15647
|
-
let
|
|
15648
|
+
}, Jn, zt, Be, Tm;
|
|
15649
|
+
let Ut = (Tm = class extends pD {
|
|
15648
15650
|
constructor(t, e) {
|
|
15649
15651
|
super();
|
|
15650
15652
|
m(this, Jn, void 0);
|
|
15651
|
-
m(this,
|
|
15653
|
+
m(this, zt, void 0);
|
|
15652
15654
|
m(this, Be, void 0);
|
|
15653
|
-
f(this, Be, t), f(this,
|
|
15655
|
+
f(this, Be, t), f(this, zt, new hD(t, e)), f(this, Jn, new AbortController());
|
|
15654
15656
|
}
|
|
15655
15657
|
/**
|
|
15656
15658
|
* @access private
|
|
@@ -15667,7 +15669,7 @@ let xt = (Tm = class extends pD {
|
|
|
15667
15669
|
return n(this, Be).getValue("logger");
|
|
15668
15670
|
}
|
|
15669
15671
|
get constraintsBuilder() {
|
|
15670
|
-
return n(this,
|
|
15672
|
+
return n(this, zt);
|
|
15671
15673
|
}
|
|
15672
15674
|
destruct() {
|
|
15673
15675
|
return u(this, null, function* () {
|
|
@@ -15698,8 +15700,8 @@ let xt = (Tm = class extends pD {
|
|
|
15698
15700
|
let S;
|
|
15699
15701
|
e && g ? S = e : d && ((a = d[0]) != null && a.deviceId) && (S = (o = d[0]) == null ? void 0 : o.deviceId);
|
|
15700
15702
|
const y = {
|
|
15701
|
-
audio: n(this,
|
|
15702
|
-
video: n(this,
|
|
15703
|
+
audio: n(this, zt).getAudioConstraints(h).audio,
|
|
15704
|
+
video: n(this, zt).getVideoConstraints(S).video
|
|
15703
15705
|
};
|
|
15704
15706
|
this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
15705
15707
|
constraints: JSON.stringify(y)
|
|
@@ -15745,7 +15747,7 @@ let xt = (Tm = class extends pD {
|
|
|
15745
15747
|
const o = (l) => u(this, null, function* () {
|
|
15746
15748
|
let h;
|
|
15747
15749
|
try {
|
|
15748
|
-
r = r.filter((S) => S.deviceId !== l), h = n(this,
|
|
15750
|
+
r = r.filter((S) => S.deviceId !== l), h = n(this, zt).getAudioConstraints(l), this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
15749
15751
|
constraints: JSON.stringify(h)
|
|
15750
15752
|
});
|
|
15751
15753
|
const [g] = (yield navigator.mediaDevices.getUserMedia(h)).getAudioTracks();
|
|
@@ -15766,7 +15768,7 @@ let xt = (Tm = class extends pD {
|
|
|
15766
15768
|
constraints: JSON.stringify(h),
|
|
15767
15769
|
error: g
|
|
15768
15770
|
});
|
|
15769
|
-
const k = n(this,
|
|
15771
|
+
const k = n(this, zt).getAudioConstraints(
|
|
15770
15772
|
E.deviceId
|
|
15771
15773
|
);
|
|
15772
15774
|
return this.logger.info("getAudioTrack::retrying_gum_for_next_device", {
|
|
@@ -15836,7 +15838,7 @@ let xt = (Tm = class extends pD {
|
|
|
15836
15838
|
constraints: JSON.stringify(h),
|
|
15837
15839
|
error: g
|
|
15838
15840
|
});
|
|
15839
|
-
const k = n(this,
|
|
15841
|
+
const k = n(this, zt).getVideoConstraints(
|
|
15840
15842
|
E.deviceId
|
|
15841
15843
|
);
|
|
15842
15844
|
return this.logger.info("getVideoTrack::retrying_gum_for_next_device", {
|
|
@@ -15847,7 +15849,7 @@ let xt = (Tm = class extends pD {
|
|
|
15847
15849
|
}
|
|
15848
15850
|
});
|
|
15849
15851
|
try {
|
|
15850
|
-
const h = n(this,
|
|
15852
|
+
const h = n(this, zt).getVideoConstraints(a), g = yield o(h);
|
|
15851
15853
|
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Be).getValue("peerSessionStore").emit(_.MEDIA_PERMISSION_UPDATE, {
|
|
15852
15854
|
message: this.permissions.video,
|
|
15853
15855
|
kind: "video"
|
|
@@ -15884,7 +15886,7 @@ let xt = (Tm = class extends pD {
|
|
|
15884
15886
|
}
|
|
15885
15887
|
});
|
|
15886
15888
|
try {
|
|
15887
|
-
const e = n(this,
|
|
15889
|
+
const e = n(this, zt).getScreenShareConstraints(), r = yield t(e);
|
|
15888
15890
|
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Be).getValue("peerSessionStore").emit(_.MEDIA_PERMISSION_UPDATE, {
|
|
15889
15891
|
message: this.permissions.screenshare,
|
|
15890
15892
|
kind: "screenshare"
|
|
@@ -16007,41 +16009,41 @@ let xt = (Tm = class extends pD {
|
|
|
16007
16009
|
}
|
|
16008
16010
|
});
|
|
16009
16011
|
}
|
|
16010
|
-
}, Jn = new WeakMap(),
|
|
16012
|
+
}, Jn = new WeakMap(), zt = new WeakMap(), Be = new WeakMap(), Tm);
|
|
16011
16013
|
Ss([
|
|
16012
16014
|
P.trace("WebMediaInterface.destruct")
|
|
16013
|
-
],
|
|
16015
|
+
], Ut.prototype, "destruct", 1);
|
|
16014
16016
|
Ss([
|
|
16015
16017
|
P.trace("WebMediaInterface.handlePermissionErrors")
|
|
16016
|
-
],
|
|
16018
|
+
], Ut.prototype, "handlePermissionErrors", 1);
|
|
16017
16019
|
Ss([
|
|
16018
16020
|
P.trace("WebMediaInterface.getAudioAndVideoTrack")
|
|
16019
|
-
],
|
|
16021
|
+
], Ut.prototype, "getAudioAndVideoTrack", 1);
|
|
16020
16022
|
Ss([
|
|
16021
16023
|
P.trace("WebMediaInterface.getAudioTrack")
|
|
16022
|
-
],
|
|
16024
|
+
], Ut.prototype, "getAudioTrack", 1);
|
|
16023
16025
|
Ss([
|
|
16024
16026
|
P.trace("WebMediaInterface.getVideoTrack")
|
|
16025
|
-
],
|
|
16027
|
+
], Ut.prototype, "getVideoTrack", 1);
|
|
16026
16028
|
Ss([
|
|
16027
16029
|
P.trace("WebMediaInterface.getScreenShareTracks")
|
|
16028
|
-
],
|
|
16030
|
+
], Ut.prototype, "getScreenShareTracks", 1);
|
|
16029
16031
|
Ss([
|
|
16030
16032
|
P.trace("WebMediaInterface.getAvailableDevices")
|
|
16031
|
-
],
|
|
16033
|
+
], Ut.prototype, "getAvailableDevices", 1);
|
|
16032
16034
|
Ss([
|
|
16033
16035
|
P.trace("WebMediaInterface.getAvailableDevicesByKind")
|
|
16034
|
-
],
|
|
16036
|
+
], Ut.prototype, "getAvailableDevicesByKind", 1);
|
|
16035
16037
|
Ss([
|
|
16036
16038
|
P.trace("WebMediaInterface.getDevice")
|
|
16037
|
-
],
|
|
16039
|
+
], Ut.prototype, "getDevice", 1);
|
|
16038
16040
|
Ss([
|
|
16039
16041
|
P.trace("WebMediaInterface.onDeviceChange")
|
|
16040
|
-
],
|
|
16041
|
-
|
|
16042
|
+
], Ut.prototype, "onDeviceChange", 1);
|
|
16043
|
+
Ut = Ss([
|
|
16042
16044
|
ot("1600")
|
|
16043
|
-
],
|
|
16044
|
-
const yS =
|
|
16045
|
+
], Ut);
|
|
16046
|
+
const yS = Ut, an = {
|
|
16045
16047
|
setItem: (s, t, e) => {
|
|
16046
16048
|
try {
|
|
16047
16049
|
localStorage.setItem(s, t);
|
|
@@ -16966,7 +16968,7 @@ var ND = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, wS = (s, t
|
|
|
16966
16968
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16967
16969
|
return r && i && ND(t, e, i), i;
|
|
16968
16970
|
}, Yn, sc;
|
|
16969
|
-
class Pp extends
|
|
16971
|
+
class Pp extends Ht {
|
|
16970
16972
|
constructor(e, r) {
|
|
16971
16973
|
const i = e.getValue("logger");
|
|
16972
16974
|
super(i);
|
|
@@ -17008,7 +17010,7 @@ class Pp extends Ut {
|
|
|
17008
17010
|
);
|
|
17009
17011
|
this.setLivestreamState("STARTING");
|
|
17010
17012
|
try {
|
|
17011
|
-
const r =
|
|
17013
|
+
const r = $t(), {
|
|
17012
17014
|
playbackUrl: i,
|
|
17013
17015
|
ingestionCredentials: a
|
|
17014
17016
|
} = yield r.startLivestreaming(e);
|
|
@@ -17030,7 +17032,7 @@ class Pp extends Ut {
|
|
|
17030
17032
|
if (this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")
|
|
17031
17033
|
throw this.logger.error("Livestream::stop::inconsistent_state"), new R("Livestream not started yet", "1902");
|
|
17032
17034
|
try {
|
|
17033
|
-
this.setLivestreamState("STOPPING"), yield
|
|
17035
|
+
this.setLivestreamState("STOPPING"), yield $t().stopLivestreaming();
|
|
17034
17036
|
} catch (e) {
|
|
17035
17037
|
throw this.logger.error("Livestream::stop::livestream_failed_to_stop", {
|
|
17036
17038
|
error: e
|
|
@@ -17076,7 +17078,7 @@ class _S {
|
|
|
17076
17078
|
}
|
|
17077
17079
|
fetchInitialLivestreamingState() {
|
|
17078
17080
|
return u(this, null, function* () {
|
|
17079
|
-
const t =
|
|
17081
|
+
const t = $t(), {
|
|
17080
17082
|
status: e,
|
|
17081
17083
|
playbackUrl: r,
|
|
17082
17084
|
manualIngest: i,
|
|
@@ -17331,19 +17333,19 @@ et = new WeakMap(), Vr = new WeakMap(), $r = new WeakMap(), il = new WeakSet(),
|
|
|
17331
17333
|
this.set(t, i, r);
|
|
17332
17334
|
};
|
|
17333
17335
|
nd([
|
|
17334
|
-
|
|
17336
|
+
Bt(Oa, "rateLimitConfig")
|
|
17335
17337
|
], Na.prototype, "remoteSet", 1);
|
|
17336
17338
|
nd([
|
|
17337
|
-
|
|
17339
|
+
Bt(Oa, "bulkRateLimitConfig")
|
|
17338
17340
|
], Na.prototype, "bulkSet", 1);
|
|
17339
17341
|
nd([
|
|
17340
|
-
|
|
17342
|
+
Bt(Oa, "rateLimitConfig")
|
|
17341
17343
|
], Na.prototype, "update", 1);
|
|
17342
17344
|
nd([
|
|
17343
|
-
|
|
17345
|
+
Bt(Oa, "rateLimitConfig")
|
|
17344
17346
|
], Na.prototype, "delete", 1);
|
|
17345
17347
|
nd([
|
|
17346
|
-
|
|
17348
|
+
Bt(Oa, "bulkRateLimitConfig")
|
|
17347
17349
|
], Na.prototype, "bulkDelete", 1);
|
|
17348
17350
|
var xr, Ur, rc, Sh, ic, cs, nl, RS;
|
|
17349
17351
|
class BD {
|
|
@@ -17459,8 +17461,8 @@ var FD = Object.defineProperty, jD = Object.getOwnPropertyDescriptor, La = (s, t
|
|
|
17459
17461
|
return r && i && FD(t, e, i), i;
|
|
17460
17462
|
};
|
|
17461
17463
|
const qD = 0.8, GD = 1.2;
|
|
17462
|
-
var Zn, ea,
|
|
17463
|
-
let gr = (ym = class extends
|
|
17464
|
+
var Zn, ea, Mt, Ai, ro, Hr, Tn, Mi, io, al, bS, ut, nc, Br, Di, no, zs, ol, ac, vh, cl, kS, dl, IS, ym;
|
|
17465
|
+
let gr = (ym = class extends Ht {
|
|
17464
17466
|
constructor(t, e, r, i) {
|
|
17465
17467
|
const a = t.getValue("logger");
|
|
17466
17468
|
super(a);
|
|
@@ -17554,7 +17556,7 @@ let gr = (ym = class extends Ut {
|
|
|
17554
17556
|
* The preset of the participant.
|
|
17555
17557
|
*/
|
|
17556
17558
|
p(this, "presetName");
|
|
17557
|
-
m(this,
|
|
17559
|
+
m(this, Mt, void 0);
|
|
17558
17560
|
m(this, ut, void 0);
|
|
17559
17561
|
m(this, nc, void 0);
|
|
17560
17562
|
m(this, Br, /* @__PURE__ */ new Map());
|
|
@@ -17571,15 +17573,15 @@ let gr = (ym = class extends Ut {
|
|
|
17571
17573
|
if (!i || !a)
|
|
17572
17574
|
return;
|
|
17573
17575
|
const o = a / r, c = i / e, d = Math.max(o, c);
|
|
17574
|
-
d > GD && n(this, zs) === 1 ? (f(this, zs, 0), n(this,
|
|
17576
|
+
d > GD && n(this, zs) === 1 ? (f(this, zs, 0), n(this, Mt).getValue("peerSessionStore").emit(_.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17575
17577
|
peerId: this.id,
|
|
17576
17578
|
maxSpatialLayer: n(this, zs)
|
|
17577
|
-
})) : d < qD && n(this, zs) === 0 && (f(this, zs, 1), n(this,
|
|
17579
|
+
})) : d < qD && n(this, zs) === 0 && (f(this, zs, 1), n(this, Mt).getValue("peerSessionStore").emit(_.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17578
17580
|
peerId: this.id,
|
|
17579
17581
|
maxSpatialLayer: n(this, zs)
|
|
17580
17582
|
}));
|
|
17581
17583
|
}, 2e3));
|
|
17582
|
-
f(this,
|
|
17584
|
+
f(this, Mt, t);
|
|
17583
17585
|
const {
|
|
17584
17586
|
id: o,
|
|
17585
17587
|
userId: c,
|
|
@@ -17611,7 +17613,7 @@ let gr = (ym = class extends Ut {
|
|
|
17611
17613
|
* Not for external use
|
|
17612
17614
|
*/
|
|
17613
17615
|
get telemetry() {
|
|
17614
|
-
return n(this,
|
|
17616
|
+
return n(this, Mt).getValue("telemetry");
|
|
17615
17617
|
}
|
|
17616
17618
|
/**
|
|
17617
17619
|
* @access private
|
|
@@ -17710,7 +17712,7 @@ let gr = (ym = class extends Ut {
|
|
|
17710
17712
|
if (this.logger.info(`Local peer ${n(this, ut).id} is kicking a remote peer ${t} out of the meeting.`), !n(this, al, bS))
|
|
17711
17713
|
throw new R("Can`t kick participant without joining room", "1205");
|
|
17712
17714
|
if (n(this, ut).permissions.kickParticipant) {
|
|
17713
|
-
yield n(this,
|
|
17715
|
+
yield n(this, Mt).getValue("peerSessionStore").emitAsync(_.KICK_PEER, {
|
|
17714
17716
|
peerId: t
|
|
17715
17717
|
});
|
|
17716
17718
|
return;
|
|
@@ -17802,16 +17804,16 @@ let gr = (ym = class extends Ut {
|
|
|
17802
17804
|
t.srcObject = void 0;
|
|
17803
17805
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
17804
17806
|
}
|
|
17805
|
-
}, Zn = new WeakMap(), ea = new WeakMap(),
|
|
17806
|
-
return n(this,
|
|
17807
|
+
}, Zn = new WeakMap(), ea = new WeakMap(), Mt = new WeakMap(), Ai = new WeakSet(), ro = function() {
|
|
17808
|
+
return n(this, Mt).getValue("roomNodeClient");
|
|
17807
17809
|
}, Hr = new WeakSet(), Tn = function() {
|
|
17808
|
-
return n(this,
|
|
17810
|
+
return n(this, Mt).getValue("audioPlayback");
|
|
17809
17811
|
}, Mi = new WeakSet(), io = function() {
|
|
17810
|
-
return n(this,
|
|
17812
|
+
return n(this, Mt).getValue("connectionHandler").mediaJoined;
|
|
17811
17813
|
}, al = new WeakSet(), bS = function() {
|
|
17812
|
-
return n(this,
|
|
17814
|
+
return n(this, Mt).getValue("connectionHandler").socketJoined;
|
|
17813
17815
|
}, ut = new WeakMap(), nc = new WeakMap(), Br = new WeakMap(), Di = new WeakSet(), no = function() {
|
|
17814
|
-
return n(this,
|
|
17816
|
+
return n(this, Mt).getValue("pip");
|
|
17815
17817
|
}, zs = new WeakMap(), ol = new WeakMap(), ac = new WeakSet(), vh = function() {
|
|
17816
17818
|
Array.from(n(this, Br).keys()).forEach(this.updateVideo);
|
|
17817
17819
|
}, cl = new WeakSet(), kS = function() {
|
|
@@ -17988,8 +17990,8 @@ var zD = Object.defineProperty, YD = Object.getOwnPropertyDescriptor, xs = (s, t
|
|
|
17988
17990
|
return r && i && zD(t, e, i), i;
|
|
17989
17991
|
};
|
|
17990
17992
|
const QD = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
17991
|
-
var Ie, oc, Th, Oi, ao, ta, Cd, Ni,
|
|
17992
|
-
let
|
|
17993
|
+
var Ie, oc, Th, Oi, ao, ta, Cd, Ni, Et, Em;
|
|
17994
|
+
let rs = (Em = class extends Ht {
|
|
17993
17995
|
constructor(t, e, r) {
|
|
17994
17996
|
const i = t.getValue("logger");
|
|
17995
17997
|
super(i);
|
|
@@ -18038,7 +18040,7 @@ let ss = (Em = class extends Ut {
|
|
|
18038
18040
|
p(this, "all");
|
|
18039
18041
|
m(this, Ie, void 0);
|
|
18040
18042
|
m(this, Ni, void 0);
|
|
18041
|
-
m(this,
|
|
18043
|
+
m(this, Et, void 0);
|
|
18042
18044
|
p(this, "rateLimitConfig", {
|
|
18043
18045
|
maxInvocations: 5,
|
|
18044
18046
|
period: 1
|
|
@@ -18068,7 +18070,7 @@ let ss = (Em = class extends Ut {
|
|
|
18068
18070
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18069
18071
|
*/
|
|
18070
18072
|
p(this, "selectedPeers", AS);
|
|
18071
|
-
f(this, Ie, t), f(this, Ni, e), f(this,
|
|
18073
|
+
f(this, Ie, t), f(this, Ni, e), f(this, Et, r), this.waitlisted = new so(i), this.joined = new so(i), this.videoSubscribed = new so(i), this.audioSubscribed = new so(i), this.active = this.videoSubscribed, this.pinned = new so(i), this.all = new WD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18072
18074
|
}
|
|
18073
18075
|
/**
|
|
18074
18076
|
* Return the controls for Picture-in-Picture
|
|
@@ -18153,7 +18155,7 @@ let ss = (Em = class extends Ut {
|
|
|
18153
18155
|
"1205"
|
|
18154
18156
|
);
|
|
18155
18157
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
18156
|
-
return n(this,
|
|
18158
|
+
return n(this, Et).acceptWaitingRoomRequest([e]);
|
|
18157
18159
|
}
|
|
18158
18160
|
/**
|
|
18159
18161
|
* We need a new event for socket service events
|
|
@@ -18167,7 +18169,7 @@ let ss = (Em = class extends Ut {
|
|
|
18167
18169
|
var i, a;
|
|
18168
18170
|
return (a = (i = this.waitlisted.get(r)) == null ? void 0 : i.userId) != null ? a : r;
|
|
18169
18171
|
});
|
|
18170
|
-
return n(this,
|
|
18172
|
+
return n(this, Et).acceptWaitingRoomRequest(e);
|
|
18171
18173
|
});
|
|
18172
18174
|
}
|
|
18173
18175
|
/**
|
|
@@ -18184,7 +18186,7 @@ let ss = (Em = class extends Ut {
|
|
|
18184
18186
|
"1205"
|
|
18185
18187
|
);
|
|
18186
18188
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
18187
|
-
n(this,
|
|
18189
|
+
n(this, Et).rejectWaitingRoomRequest([e]);
|
|
18188
18190
|
});
|
|
18189
18191
|
}
|
|
18190
18192
|
setViewMode(t) {
|
|
@@ -18342,7 +18344,7 @@ let ss = (Em = class extends Ut {
|
|
|
18342
18344
|
"1201"
|
|
18343
18345
|
);
|
|
18344
18346
|
const e = !0;
|
|
18345
|
-
n(this,
|
|
18347
|
+
n(this, Et).kickAll(e);
|
|
18346
18348
|
});
|
|
18347
18349
|
}
|
|
18348
18350
|
broadcastMessage(t, e, r) {
|
|
@@ -18353,7 +18355,7 @@ let ss = (Em = class extends Ut {
|
|
|
18353
18355
|
throw new R("`type` must be a non-empty string.", "1209");
|
|
18354
18356
|
if (r)
|
|
18355
18357
|
if ("meetingIds" in r)
|
|
18356
|
-
yield n(this,
|
|
18358
|
+
yield n(this, Et).broadcastToMeetings(t, r.meetingIds, e);
|
|
18357
18359
|
else {
|
|
18358
18360
|
let i = [];
|
|
18359
18361
|
"participantIds" in r ? i = r.participantIds : i = this.joined.toArray().filter(
|
|
@@ -18361,15 +18363,15 @@ let ss = (Em = class extends Ut {
|
|
|
18361
18363
|
var o;
|
|
18362
18364
|
return (o = r.presetNames) == null ? void 0 : o.includes(a.presetName);
|
|
18363
18365
|
}
|
|
18364
|
-
).map((a) => a.id), yield n(this,
|
|
18366
|
+
).map((a) => a.id), yield n(this, Et).broadcastToPeers(t, i, e);
|
|
18365
18367
|
}
|
|
18366
18368
|
else
|
|
18367
|
-
yield n(this,
|
|
18369
|
+
yield n(this, Et).broadcastMessage(t, e);
|
|
18368
18370
|
});
|
|
18369
18371
|
}
|
|
18370
18372
|
getAllJoinedPeers(t, e, r) {
|
|
18371
18373
|
return u(this, null, function* () {
|
|
18372
|
-
return (yield n(this,
|
|
18374
|
+
return (yield n(this, Et).getRoomPeers(t, e, r)).peers.map(yr.formatSocketPeerMessage);
|
|
18373
18375
|
});
|
|
18374
18376
|
}
|
|
18375
18377
|
/**
|
|
@@ -18381,12 +18383,12 @@ let ss = (Em = class extends Ut {
|
|
|
18381
18383
|
const r = this.joined.toArray().filter((a) => t.includes(a.id)).map((a) => a.userId), i = [...new Set(r)];
|
|
18382
18384
|
if (!i.length)
|
|
18383
18385
|
throw new R("Cannot update permissions, no valid userIDs found", "1204");
|
|
18384
|
-
n(this,
|
|
18386
|
+
n(this, Et).updatePermissions(i, e);
|
|
18385
18387
|
});
|
|
18386
18388
|
}
|
|
18387
18389
|
getParticipantsInMeetingPreJoin() {
|
|
18388
18390
|
return u(this, null, function* () {
|
|
18389
|
-
return n(this,
|
|
18391
|
+
return n(this, Et).getRoomPeersNonPaginated();
|
|
18390
18392
|
});
|
|
18391
18393
|
}
|
|
18392
18394
|
}, Ie = new WeakMap(), oc = new WeakSet(), Th = function() {
|
|
@@ -18397,47 +18399,47 @@ let ss = (Em = class extends Ut {
|
|
|
18397
18399
|
}, ta = new WeakSet(), Cd = function() {
|
|
18398
18400
|
var t;
|
|
18399
18401
|
return ((t = n(this, Ie).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
18400
|
-
}, Ni = new WeakMap(),
|
|
18402
|
+
}, Ni = new WeakMap(), Et = new WeakMap(), Em);
|
|
18401
18403
|
xs([
|
|
18402
18404
|
P.trace("Participants.setViewMode")
|
|
18403
|
-
],
|
|
18405
|
+
], rs.prototype, "setViewMode", 1);
|
|
18404
18406
|
xs([
|
|
18405
18407
|
P.trace("Participants.setPage")
|
|
18406
|
-
],
|
|
18408
|
+
], rs.prototype, "setPage", 1);
|
|
18407
18409
|
xs([
|
|
18408
18410
|
P.trace("Participants.disableAllAudio")
|
|
18409
|
-
],
|
|
18411
|
+
], rs.prototype, "disableAllAudio", 1);
|
|
18410
18412
|
xs([
|
|
18411
18413
|
P.trace("Participants.disableAllVideo")
|
|
18412
|
-
],
|
|
18414
|
+
], rs.prototype, "disableAllVideo", 1);
|
|
18413
18415
|
xs([
|
|
18414
18416
|
P.trace("Participants.kickAll")
|
|
18415
|
-
],
|
|
18417
|
+
], rs.prototype, "kickAll", 1);
|
|
18416
18418
|
xs([
|
|
18417
18419
|
P.trace("Participants.broadcastMessage"),
|
|
18418
|
-
|
|
18419
|
-
],
|
|
18420
|
+
Bt(Oa, "rateLimitConfig")
|
|
18421
|
+
], rs.prototype, "broadcastMessage", 1);
|
|
18420
18422
|
xs([
|
|
18421
18423
|
P.trace("Participants.getAllJoinedPeers"),
|
|
18422
|
-
|
|
18423
|
-
],
|
|
18424
|
+
Bt({ maxInvocations: 10, period: 60 })
|
|
18425
|
+
], rs.prototype, "getAllJoinedPeers", 1);
|
|
18424
18426
|
xs([
|
|
18425
18427
|
P.trace("Participant.updatePermissions"),
|
|
18426
|
-
|
|
18427
|
-
],
|
|
18428
|
+
Bt({ maxInvocations: 1e3, period: 60 })
|
|
18429
|
+
], rs.prototype, "updatePermissions", 1);
|
|
18428
18430
|
xs([
|
|
18429
18431
|
P.trace("Participants.getParticipantsInMeetingPreJoin")
|
|
18430
|
-
],
|
|
18431
|
-
|
|
18432
|
+
], rs.prototype, "getParticipantsInMeetingPreJoin", 1);
|
|
18433
|
+
rs = xs([
|
|
18432
18434
|
ot("1200")
|
|
18433
|
-
],
|
|
18435
|
+
], rs);
|
|
18434
18436
|
var XD = Object.defineProperty, ZD = Object.getOwnPropertyDescriptor, gn = (s, t, e, r) => {
|
|
18435
18437
|
for (var i = r > 1 ? void 0 : r ? ZD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
18436
18438
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18437
18439
|
return r && i && XD(t, e, i), i;
|
|
18438
18440
|
};
|
|
18439
18441
|
const eO = 5e3, tO = 1e4;
|
|
18440
|
-
var
|
|
18442
|
+
var Yt, ys, jr, Fe, Ys, Li, Vi, co, ll, MS, ul, DS, cc, yh, hl, OS, pl, NS, gl, Pm;
|
|
18441
18443
|
const oo = (Pm = class {
|
|
18442
18444
|
constructor(s, t, e) {
|
|
18443
18445
|
m(this, Vi);
|
|
@@ -18455,7 +18457,7 @@ const oo = (Pm = class {
|
|
|
18455
18457
|
p(this, "roomSocketHandler");
|
|
18456
18458
|
p(this, "context");
|
|
18457
18459
|
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
18458
|
-
m(this,
|
|
18460
|
+
m(this, Yt, { mode: "ACTIVE_GRID", page: 0 });
|
|
18459
18461
|
m(this, ys, !1);
|
|
18460
18462
|
m(this, jr, !1);
|
|
18461
18463
|
/** Keeps the old visible maps on screen until fresh socket and media snapshots are ready. */
|
|
@@ -18498,7 +18500,7 @@ const oo = (Pm = class {
|
|
|
18498
18500
|
}
|
|
18499
18501
|
this.logger.info("updateConsumers: Completed consumer updates.");
|
|
18500
18502
|
}));
|
|
18501
|
-
this.context = s, this.roomSocketHandler = e, this.participants = new
|
|
18503
|
+
this.context = s, this.roomSocketHandler = e, this.participants = new rs(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = ps, t.config.viewType !== "CHAT" && (this.setupEventsGlobal(), A(this, hl, OS).call(this)), this.setupEvents(), this.self.on("roomLeft", n(this, gl));
|
|
18502
18504
|
}
|
|
18503
18505
|
get roomNodeClient() {
|
|
18504
18506
|
return this.context.getValue("roomNodeClient");
|
|
@@ -18778,8 +18780,8 @@ const oo = (Pm = class {
|
|
|
18778
18780
|
* */
|
|
18779
18781
|
updateMediaSubscribedMaps(s, t) {
|
|
18780
18782
|
const { page: e } = t != null ? t : {};
|
|
18781
|
-
s && n(this,
|
|
18782
|
-
const { mode: r, page: i } = n(this,
|
|
18783
|
+
s && n(this, Yt).mode !== s && (n(this, Yt).mode = s), e && n(this, Yt).page !== e && (n(this, Yt).page = e);
|
|
18784
|
+
const { mode: r, page: i } = n(this, Yt);
|
|
18783
18785
|
switch (r) {
|
|
18784
18786
|
case "PAGINATED": {
|
|
18785
18787
|
if (!i)
|
|
@@ -18813,8 +18815,8 @@ const oo = (Pm = class {
|
|
|
18813
18815
|
source: s
|
|
18814
18816
|
}) {
|
|
18815
18817
|
var r, i, a;
|
|
18816
|
-
const e = ((r = n(this,
|
|
18817
|
-
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this,
|
|
18818
|
+
const e = ((r = n(this, Yt)) == null ? void 0 : r.mode) === "PAGINATED" && !n(this, ys) ? 200 : 0;
|
|
18819
|
+
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this, Yt)) == null ? void 0 : i.mode}, ConsumersSyncing: ${n(this, ys)}, Delay: ${e}, Page: ${(a = n(this, Yt)) == null ? void 0 : a.page}`), setTimeout(() => this.syncConsumers(), e);
|
|
18818
18820
|
});
|
|
18819
18821
|
}
|
|
18820
18822
|
/**
|
|
@@ -19285,7 +19287,7 @@ const oo = (Pm = class {
|
|
|
19285
19287
|
const e = this.participants.joined.get(s);
|
|
19286
19288
|
this.roomNodeClient.kick(s), yield this.roomSocketHandler.kick(s), e ? e.emit("kicked") : this.participants.joined.emit("kicked", { id: s });
|
|
19287
19289
|
})), this.context.getValue("peerSessionStore").on(_.UPDATE_ACTIVE, ({ viewMode: s, page: t } = {}) => {
|
|
19288
|
-
this.isRebuildingReconnectSnapshot || (this.logger.info(`UPDATE_ACTIVE event received - viewMode: ${n(this,
|
|
19290
|
+
this.isRebuildingReconnectSnapshot || (this.logger.info(`UPDATE_ACTIVE event received - viewMode: ${n(this, Yt).mode}, page: ${t}`), this.updateMediaSubscribedMaps(s, { page: t }), this.scheduleSyncConsumers({ source: "UPDATE_ACTIVE" }));
|
|
19289
19291
|
});
|
|
19290
19292
|
}
|
|
19291
19293
|
onParticipantPinned(s) {
|
|
@@ -19641,7 +19643,7 @@ const oo = (Pm = class {
|
|
|
19641
19643
|
// priority
|
|
19642
19644
|
})), t && this.context.getValue("peerSessionStore").emit(_.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19643
19645
|
}
|
|
19644
|
-
},
|
|
19646
|
+
}, Yt = new WeakMap(), ys = new WeakMap(), jr = new WeakMap(), Fe = new WeakMap(), Ys = new WeakMap(), Li = new WeakMap(), Vi = new WeakSet(), co = function(s) {
|
|
19645
19647
|
n(this, Ys) === void 0 && (f(this, Ys, Date.now()), this.logger.info(
|
|
19646
19648
|
`Consumer deletion aging paused: reason="${s}", consumerIds=[${Array.from(n(this, Fe).keys()).join(",")}].`
|
|
19647
19649
|
));
|
|
@@ -19695,8 +19697,8 @@ gn([
|
|
|
19695
19697
|
const Re = Os(
|
|
19696
19698
|
hp().permissions
|
|
19697
19699
|
);
|
|
19698
|
-
var Q, sa, ra, ml, ht,
|
|
19699
|
-
const fl = class extends
|
|
19700
|
+
var Q, sa, ra, ml, ht, kt;
|
|
19701
|
+
const fl = class extends Ht {
|
|
19700
19702
|
constructor(e, r, i, a = !1) {
|
|
19701
19703
|
const o = e.getValue("logger");
|
|
19702
19704
|
super(o);
|
|
@@ -19911,7 +19913,7 @@ const fl = class extends Ut {
|
|
|
19911
19913
|
get canProduceVideo() {
|
|
19912
19914
|
var r;
|
|
19913
19915
|
const e = (r = n(this, Q).media.video.canProduce) != null ? r : Re.media.video.canProduce;
|
|
19914
|
-
return this.stageEnabled && (n(this, ht,
|
|
19916
|
+
return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
|
|
19915
19917
|
}
|
|
19916
19918
|
/**
|
|
19917
19919
|
* The `canProduceScreenshare` shows permissions for sharing screen.
|
|
@@ -19920,7 +19922,7 @@ const fl = class extends Ut {
|
|
|
19920
19922
|
get canProduceScreenshare() {
|
|
19921
19923
|
var r;
|
|
19922
19924
|
const e = (r = n(this, Q).media.screenshare.canProduce) != null ? r : Re.media.screenshare.canProduce;
|
|
19923
|
-
return this.stageEnabled && (n(this, ht,
|
|
19925
|
+
return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
|
|
19924
19926
|
}
|
|
19925
19927
|
/**
|
|
19926
19928
|
* The `canProduceAudio` shows permissions for enabling audio.
|
|
@@ -19929,7 +19931,7 @@ const fl = class extends Ut {
|
|
|
19929
19931
|
get canProduceAudio() {
|
|
19930
19932
|
var r;
|
|
19931
19933
|
const e = (r = n(this, Q).media.audio.canProduce) != null ? r : Re.media.audio.canProduce;
|
|
19932
|
-
return this.stageEnabled && (n(this, ht,
|
|
19934
|
+
return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
|
|
19933
19935
|
}
|
|
19934
19936
|
/**
|
|
19935
19937
|
* The `chatPublic` shows permissions for public chat
|
|
@@ -20002,16 +20004,16 @@ const fl = class extends Ut {
|
|
|
20002
20004
|
}
|
|
20003
20005
|
};
|
|
20004
20006
|
let Eh = fl;
|
|
20005
|
-
Q = new WeakMap(), sa = new WeakMap(), ra = new WeakMap(), ml = new WeakMap(), ht = new WeakSet(),
|
|
20007
|
+
Q = new WeakMap(), sa = new WeakMap(), ra = new WeakMap(), ml = new WeakMap(), ht = new WeakSet(), kt = function() {
|
|
20006
20008
|
return n(this, ra).getValue("stageStatus");
|
|
20007
20009
|
};
|
|
20008
|
-
var
|
|
20009
|
-
class LS extends
|
|
20010
|
+
var Dt;
|
|
20011
|
+
class LS extends Ht {
|
|
20010
20012
|
constructor(e, r) {
|
|
20011
20013
|
super(r);
|
|
20012
20014
|
p(this, "localMediaHandler");
|
|
20013
|
-
m(this,
|
|
20014
|
-
f(this,
|
|
20015
|
+
m(this, Dt, void 0);
|
|
20016
|
+
f(this, Dt, e);
|
|
20015
20017
|
}
|
|
20016
20018
|
updatePermission() {
|
|
20017
20019
|
return u(this, null, function* () {
|
|
@@ -20019,7 +20021,7 @@ class LS extends Ut {
|
|
|
20019
20021
|
const e = (h, g) => {
|
|
20020
20022
|
this.mediaPermissions[h] = g;
|
|
20021
20023
|
const S = { message: this.mediaPermissions[h], kind: h };
|
|
20022
|
-
g === "DENIED" ? n(this,
|
|
20024
|
+
g === "DENIED" ? n(this, Dt).getValue("peerSessionStore").emit(_.MEDIA_PERMISSION_ERROR, S) : n(this, Dt).getValue("peerSessionStore").emit(_.MEDIA_PERMISSION_UPDATE, S);
|
|
20023
20025
|
};
|
|
20024
20026
|
if (Pe.getName() === "firefox")
|
|
20025
20027
|
return;
|
|
@@ -20051,15 +20053,15 @@ class LS extends Ut {
|
|
|
20051
20053
|
var a, o, c, d;
|
|
20052
20054
|
switch (r) {
|
|
20053
20055
|
case "audio": {
|
|
20054
|
-
(a = n(this,
|
|
20056
|
+
(a = n(this, Dt)) == null || a.getValue("callstats").mediaPermission("AUDIO", e), (o = n(this, Dt)) == null || o.getValue("callstats").mediaPermission("SPEAKER", e);
|
|
20055
20057
|
break;
|
|
20056
20058
|
}
|
|
20057
20059
|
case "video": {
|
|
20058
|
-
(c = n(this,
|
|
20060
|
+
(c = n(this, Dt)) == null || c.getValue("callstats").mediaPermission("VIDEO", e);
|
|
20059
20061
|
break;
|
|
20060
20062
|
}
|
|
20061
20063
|
case "screenshare": {
|
|
20062
|
-
(d = n(this,
|
|
20064
|
+
(d = n(this, Dt)) == null || d.getValue("callstats").mediaPermission("SCREENSHARE", e);
|
|
20063
20065
|
break;
|
|
20064
20066
|
}
|
|
20065
20067
|
}
|
|
@@ -20067,13 +20069,13 @@ class LS extends Ut {
|
|
|
20067
20069
|
}
|
|
20068
20070
|
get peerId() {
|
|
20069
20071
|
var e;
|
|
20070
|
-
return (e = n(this,
|
|
20072
|
+
return (e = n(this, Dt)) == null ? void 0 : e.getValue("peerId");
|
|
20071
20073
|
}
|
|
20072
20074
|
/** @access private */
|
|
20073
20075
|
init() {
|
|
20074
20076
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
20075
20077
|
var a, o, c, d, l, h, g;
|
|
20076
|
-
if (Pe.init(), i && f(this,
|
|
20078
|
+
if (Pe.init(), i && f(this, Dt, i), !this.localMediaHandler)
|
|
20077
20079
|
try {
|
|
20078
20080
|
let S = !0;
|
|
20079
20081
|
if ((a = i == null ? void 0 : i.getValue("defaults")) != null && a.mediaHandler)
|
|
@@ -20082,7 +20084,7 @@ class LS extends Ut {
|
|
|
20082
20084
|
const { RNLocalMediaHandlerImpl: y } = navigator;
|
|
20083
20085
|
this.localMediaHandler = yield y.init(e);
|
|
20084
20086
|
} else
|
|
20085
|
-
this.localMediaHandler = new
|
|
20087
|
+
this.localMediaHandler = new bt(
|
|
20086
20088
|
i,
|
|
20087
20089
|
e.constraints,
|
|
20088
20090
|
(o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
|
|
@@ -20139,7 +20141,7 @@ class LS extends Ut {
|
|
|
20139
20141
|
});
|
|
20140
20142
|
}
|
|
20141
20143
|
set context(e) {
|
|
20142
|
-
f(this,
|
|
20144
|
+
f(this, Dt, e), this.localMediaHandler.context = e;
|
|
20143
20145
|
}
|
|
20144
20146
|
/**
|
|
20145
20147
|
* Returns the `audioTrack`.
|
|
@@ -20402,7 +20404,7 @@ class LS extends Ut {
|
|
|
20402
20404
|
});
|
|
20403
20405
|
}
|
|
20404
20406
|
}
|
|
20405
|
-
|
|
20407
|
+
Dt = new WeakMap();
|
|
20406
20408
|
var sO = Object.defineProperty, rO = Object.getOwnPropertyDescriptor, Tt = (s, t, e, r) => {
|
|
20407
20409
|
for (var i = r > 1 ? void 0 : r ? rO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
20408
20410
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -21072,14 +21074,14 @@ class No extends Error {
|
|
|
21072
21074
|
super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, No) : this.stack = new Error(t).stack;
|
|
21073
21075
|
}
|
|
21074
21076
|
}
|
|
21075
|
-
class
|
|
21077
|
+
class Rt extends Error {
|
|
21076
21078
|
constructor(t) {
|
|
21077
|
-
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
21079
|
+
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Rt) : this.stack = new Error(t).stack;
|
|
21078
21080
|
}
|
|
21079
21081
|
}
|
|
21080
21082
|
class kr extends Error {
|
|
21081
21083
|
constructor(t) {
|
|
21082
|
-
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
21084
|
+
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Rt) : this.stack = new Error(t).stack;
|
|
21083
21085
|
}
|
|
21084
21086
|
}
|
|
21085
21087
|
const Xg = (s) => new Promise((t) => setTimeout(t, s));
|
|
@@ -21286,7 +21288,7 @@ class cO extends vu {
|
|
|
21286
21288
|
getStats() {
|
|
21287
21289
|
return u(this, null, function* () {
|
|
21288
21290
|
if (n(this, Es))
|
|
21289
|
-
throw new
|
|
21291
|
+
throw new Rt("closed");
|
|
21290
21292
|
return n(this, hc).getReceiverStats(this.localId);
|
|
21291
21293
|
});
|
|
21292
21294
|
}
|
|
@@ -21333,7 +21335,7 @@ hc = new WeakMap(), $i = new WeakMap(), Es = new WeakMap(), Sl = new WeakMap(),
|
|
|
21333
21335
|
}));
|
|
21334
21336
|
}
|
|
21335
21337
|
};
|
|
21336
|
-
var ds, da, la, xi,
|
|
21338
|
+
var ds, da, la, xi, Qt, tt, qr, ua, yl, Ot, is;
|
|
21337
21339
|
class dO extends vu {
|
|
21338
21340
|
/**
|
|
21339
21341
|
* @emits transportclose
|
|
@@ -21346,7 +21348,7 @@ class dO extends vu {
|
|
|
21346
21348
|
constructor(e, r) {
|
|
21347
21349
|
var i, a;
|
|
21348
21350
|
super(e);
|
|
21349
|
-
m(this,
|
|
21351
|
+
m(this, Ot);
|
|
21350
21352
|
/**
|
|
21351
21353
|
* Producer ID.
|
|
21352
21354
|
*/
|
|
@@ -21383,7 +21385,7 @@ class dO extends vu {
|
|
|
21383
21385
|
* Specify if we should replace the RTCRtpSender.track with null when paused.
|
|
21384
21386
|
*/
|
|
21385
21387
|
m(this, xi, void 0);
|
|
21386
|
-
m(this,
|
|
21388
|
+
m(this, Qt, !1);
|
|
21387
21389
|
m(this, tt, void 0);
|
|
21388
21390
|
m(this, qr, void 0);
|
|
21389
21391
|
m(this, ua, void 0);
|
|
@@ -21394,7 +21396,7 @@ class dO extends vu {
|
|
|
21394
21396
|
* Whether the Producer is closed.
|
|
21395
21397
|
*/
|
|
21396
21398
|
get closed() {
|
|
21397
|
-
return n(this,
|
|
21399
|
+
return n(this, Qt);
|
|
21398
21400
|
}
|
|
21399
21401
|
/**
|
|
21400
21402
|
* The associated track.
|
|
@@ -21421,9 +21423,9 @@ class dO extends vu {
|
|
|
21421
21423
|
*/
|
|
21422
21424
|
close(e) {
|
|
21423
21425
|
return u(this, null, function* () {
|
|
21424
|
-
if (n(this,
|
|
21426
|
+
if (n(this, Qt))
|
|
21425
21427
|
return;
|
|
21426
|
-
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this,
|
|
21428
|
+
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this, Ot, is)), f(this, Qt, !0), this._destroyTrack(), e === Gd) {
|
|
21427
21429
|
this.safeEmit("close", { reason: e });
|
|
21428
21430
|
return;
|
|
21429
21431
|
}
|
|
@@ -21436,8 +21438,8 @@ class dO extends vu {
|
|
|
21436
21438
|
*/
|
|
21437
21439
|
getStats() {
|
|
21438
21440
|
return u(this, null, function* () {
|
|
21439
|
-
if (n(this,
|
|
21440
|
-
throw new
|
|
21441
|
+
if (n(this, Qt))
|
|
21442
|
+
throw new Rt("closed");
|
|
21441
21443
|
return n(this, ds).getSenderStats(this.localId);
|
|
21442
21444
|
});
|
|
21443
21445
|
}
|
|
@@ -21445,14 +21447,14 @@ class dO extends vu {
|
|
|
21445
21447
|
* Pauses sending media.
|
|
21446
21448
|
*/
|
|
21447
21449
|
pause() {
|
|
21448
|
-
this.logger.debug("Producer::pause()", n(this,
|
|
21450
|
+
this.logger.debug("Producer::pause()", n(this, Ot, is)), n(this, Qt) && this.logger.error("Producer::pause() | Producer closed", n(this, Ot, is)), f(this, qr, !0), n(this, tt) && n(this, la) && (n(this, tt).enabled = !1), n(this, xi) && n(this, ds).replaceTrack(this.localId, null), this.emit("pause");
|
|
21449
21451
|
}
|
|
21450
21452
|
/**
|
|
21451
21453
|
* Resumes sending media.
|
|
21452
21454
|
*/
|
|
21453
21455
|
resume() {
|
|
21454
|
-
if (this.logger.debug("Producer::resume()", n(this,
|
|
21455
|
-
this.logger.error("Producer::resume() | Producer closed", n(this,
|
|
21456
|
+
if (this.logger.debug("Producer::resume()", n(this, Ot, is)), n(this, Qt)) {
|
|
21457
|
+
this.logger.error("Producer::resume() | Producer closed", n(this, Ot, is));
|
|
21456
21458
|
return;
|
|
21457
21459
|
}
|
|
21458
21460
|
f(this, qr, !1), n(this, tt) && n(this, la) && (n(this, tt).enabled = !0), n(this, xi) && n(this, ds).replaceTrack(this.localId, n(this, tt)), this.emit("resume");
|
|
@@ -21464,20 +21466,20 @@ class dO extends vu {
|
|
|
21464
21466
|
return u(this, arguments, function* ({
|
|
21465
21467
|
track: e
|
|
21466
21468
|
}) {
|
|
21467
|
-
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this,
|
|
21469
|
+
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this, Ot, is)), n(this, Qt)) {
|
|
21468
21470
|
if (e && n(this, da))
|
|
21469
21471
|
try {
|
|
21470
21472
|
e.stop();
|
|
21471
21473
|
} catch (i) {
|
|
21472
|
-
this.logger.error("Producer::replaceTrack", G(N({}, n(this,
|
|
21474
|
+
this.logger.error("Producer::replaceTrack", G(N({}, n(this, Ot, is)), {
|
|
21473
21475
|
error: i
|
|
21474
21476
|
}));
|
|
21475
21477
|
}
|
|
21476
|
-
throw new
|
|
21478
|
+
throw new Rt("closed");
|
|
21477
21479
|
} else if (e && e.readyState === "ended")
|
|
21478
|
-
throw new
|
|
21480
|
+
throw new Rt("track ended");
|
|
21479
21481
|
if (e === n(this, tt)) {
|
|
21480
|
-
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this,
|
|
21482
|
+
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ot, is));
|
|
21481
21483
|
return;
|
|
21482
21484
|
}
|
|
21483
21485
|
(!n(this, xi) || !n(this, qr)) && (yield n(this, ds).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, tt, e), this._handleTrack();
|
|
@@ -21488,8 +21490,8 @@ class dO extends vu {
|
|
|
21488
21490
|
*/
|
|
21489
21491
|
setMaxSpatialLayer(e) {
|
|
21490
21492
|
return u(this, null, function* () {
|
|
21491
|
-
if (n(this,
|
|
21492
|
-
throw new
|
|
21493
|
+
if (n(this, Qt))
|
|
21494
|
+
throw new Rt("closed");
|
|
21493
21495
|
if (this.kind !== "video")
|
|
21494
21496
|
throw new No("not a video Producer");
|
|
21495
21497
|
if (typeof e != "number")
|
|
@@ -21502,15 +21504,15 @@ class dO extends vu {
|
|
|
21502
21504
|
*/
|
|
21503
21505
|
setRtpEncodingParameters(e) {
|
|
21504
21506
|
return u(this, null, function* () {
|
|
21505
|
-
if (n(this,
|
|
21506
|
-
throw new
|
|
21507
|
+
if (n(this, Qt))
|
|
21508
|
+
throw new Rt("closed");
|
|
21507
21509
|
if (typeof e != "object")
|
|
21508
21510
|
throw new TypeError("invalid params");
|
|
21509
21511
|
yield n(this, ds).setRtpEncodingParameters(this.localId, e);
|
|
21510
21512
|
});
|
|
21511
21513
|
}
|
|
21512
21514
|
_onTrackEnded() {
|
|
21513
|
-
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this,
|
|
21515
|
+
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this, Ot, is)), this.safeEmit("trackended", this.track.id);
|
|
21514
21516
|
}
|
|
21515
21517
|
_handleTrack() {
|
|
21516
21518
|
n(this, tt) && n(this, tt).addEventListener("ended", this._onTrackEnded);
|
|
@@ -21521,13 +21523,13 @@ class dO extends vu {
|
|
|
21521
21523
|
try {
|
|
21522
21524
|
n(this, tt).removeEventListener("ended", this._onTrackEnded), n(this, da) && n(this, tt).stop();
|
|
21523
21525
|
} catch (r) {
|
|
21524
|
-
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, G(N({}, n(this,
|
|
21526
|
+
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, G(N({}, n(this, Ot, is)), {
|
|
21525
21527
|
error: r
|
|
21526
21528
|
}));
|
|
21527
21529
|
}
|
|
21528
21530
|
}
|
|
21529
21531
|
}
|
|
21530
|
-
ds = new WeakMap(), da = new WeakMap(), la = new WeakMap(), xi = new WeakMap(),
|
|
21532
|
+
ds = new WeakMap(), da = new WeakMap(), la = new WeakMap(), xi = new WeakMap(), Qt = new WeakMap(), tt = new WeakMap(), qr = new WeakMap(), ua = new WeakMap(), yl = new WeakMap(), Ot = new WeakSet(), is = function() {
|
|
21531
21533
|
return {
|
|
21532
21534
|
producer: {
|
|
21533
21535
|
id: this.id,
|
|
@@ -21641,7 +21643,7 @@ const Cn = class extends vu {
|
|
|
21641
21643
|
getStats() {
|
|
21642
21644
|
return u(this, null, function* () {
|
|
21643
21645
|
if (this.closed)
|
|
21644
|
-
throw new
|
|
21646
|
+
throw new Rt("closed");
|
|
21645
21647
|
return this.handler.getTransportStats();
|
|
21646
21648
|
});
|
|
21647
21649
|
}
|
|
@@ -21667,7 +21669,7 @@ const Cn = class extends vu {
|
|
|
21667
21669
|
restartIce() {
|
|
21668
21670
|
return u(this, null, function* () {
|
|
21669
21671
|
if (this.logger.debug("restartIce()"), this.closed)
|
|
21670
|
-
throw new
|
|
21672
|
+
throw new Rt("closed");
|
|
21671
21673
|
return this.handler.restartIce();
|
|
21672
21674
|
});
|
|
21673
21675
|
}
|
|
@@ -21678,7 +21680,7 @@ const Cn = class extends vu {
|
|
|
21678
21680
|
if (this.direction !== "send")
|
|
21679
21681
|
throw new No("not a sending Transport");
|
|
21680
21682
|
if (r.readyState === "ended")
|
|
21681
|
-
throw new
|
|
21683
|
+
throw new Rt("track ended");
|
|
21682
21684
|
if (i && typeof i != "object")
|
|
21683
21685
|
throw new TypeError("if given, appData must be an object");
|
|
21684
21686
|
} else
|
|
@@ -21754,7 +21756,7 @@ const Cn = class extends vu {
|
|
|
21754
21756
|
canConsume() {
|
|
21755
21757
|
return u(this, null, function* () {
|
|
21756
21758
|
if (this.closed)
|
|
21757
|
-
throw new
|
|
21759
|
+
throw new Rt("closed");
|
|
21758
21760
|
if (this.direction !== "recv")
|
|
21759
21761
|
throw new No("not a receiving transport");
|
|
21760
21762
|
if (!(yield this.transportConnectionPromise))
|
|
@@ -21788,7 +21790,7 @@ const Cn = class extends vu {
|
|
|
21788
21790
|
});
|
|
21789
21791
|
}
|
|
21790
21792
|
static parseCodecAndFmtpMappings(e, r) {
|
|
21791
|
-
const i =
|
|
21793
|
+
const i = ns.parse(e.sdp), a = {};
|
|
21792
21794
|
return i.media.forEach((o) => {
|
|
21793
21795
|
r.includes(o.mid.toString()) && (a[o.mid.toString()] = {
|
|
21794
21796
|
rtp: o.rtp,
|
|
@@ -21799,7 +21801,7 @@ const Cn = class extends vu {
|
|
|
21799
21801
|
}), a;
|
|
21800
21802
|
}
|
|
21801
21803
|
static setCodecAndFmtpMappings(e, r, i) {
|
|
21802
|
-
const a =
|
|
21804
|
+
const a = ns.parse(e.sdp);
|
|
21803
21805
|
return a.media = a.media.map((c) => {
|
|
21804
21806
|
if (r.includes(c.mid.toString())) {
|
|
21805
21807
|
const d = N({}, c);
|
|
@@ -21807,22 +21809,22 @@ const Cn = class extends vu {
|
|
|
21807
21809
|
}
|
|
21808
21810
|
return c;
|
|
21809
21811
|
}), G(N({}, e), {
|
|
21810
|
-
sdp:
|
|
21812
|
+
sdp: ns.write(a)
|
|
21811
21813
|
});
|
|
21812
21814
|
}
|
|
21813
21815
|
static parseHeaderExtensionMappings(e) {
|
|
21814
|
-
const r =
|
|
21816
|
+
const r = ns.parse(e.sdp), i = {};
|
|
21815
21817
|
return r.media.forEach((a) => {
|
|
21816
21818
|
i[a.mid] = a.ext;
|
|
21817
21819
|
}), i;
|
|
21818
21820
|
}
|
|
21819
21821
|
static setHeaderExtensionMappings(e, r) {
|
|
21820
|
-
const i =
|
|
21822
|
+
const i = ns.parse(e.sdp);
|
|
21821
21823
|
return i.media = i.media.map((o) => {
|
|
21822
21824
|
const c = N({}, o);
|
|
21823
21825
|
return c.ext = r[o.mid], c;
|
|
21824
21826
|
}), G(N({}, e), {
|
|
21825
|
-
sdp:
|
|
21827
|
+
sdp: ns.write(i)
|
|
21826
21828
|
});
|
|
21827
21829
|
}
|
|
21828
21830
|
closeConsumers(e, r) {
|
|
@@ -21857,7 +21859,7 @@ const Cn = class extends vu {
|
|
|
21857
21859
|
this.logger.info("[SDP] Received offer from SFU", { sdp: e.sdp }), yield this.setRemoteDescription(e);
|
|
21858
21860
|
const r = yield this.handler.pc.createAnswer();
|
|
21859
21861
|
this.logger.info("[SDP] Created answer corresponding to received offer", { sdp: r.sdp });
|
|
21860
|
-
const i =
|
|
21862
|
+
const i = ns.parse(r.sdp);
|
|
21861
21863
|
return i.media = i.media.map((a) => {
|
|
21862
21864
|
if (a.type === "audio") {
|
|
21863
21865
|
const o = N({}, a), c = o.fmtp.find(
|
|
@@ -21871,7 +21873,7 @@ const Cn = class extends vu {
|
|
|
21871
21873
|
}), o;
|
|
21872
21874
|
}
|
|
21873
21875
|
return a;
|
|
21874
|
-
}), r.sdp =
|
|
21876
|
+
}), r.sdp = ns.write(i), this.logger.info("[SDP] Setting munged SDP", { sdp: r.sdp }), yield this.setLocalDescription(r), this.logger.info("[SDP] Successfully set local description", { sdp: r.sdp }), r;
|
|
21875
21877
|
} catch (r) {
|
|
21876
21878
|
throw this.logger.error("Set remote offer failed", { error: r }), r;
|
|
21877
21879
|
}
|
|
@@ -22493,8 +22495,8 @@ class Wd extends Cp {
|
|
|
22493
22495
|
}
|
|
22494
22496
|
const l = (S, y) => {
|
|
22495
22497
|
var H;
|
|
22496
|
-
const E =
|
|
22497
|
-
return E.media[E.media.length - 1].rtp = b, E.media[E.media.length - 1].fmtp = O, E.media[E.media.length - 1].rtcpFb = D, E.media[E.media.length - 1].payloads = U.join(" "),
|
|
22498
|
+
const E = ns.parse(S), k = E.media[E.media.length - 1], b = k.rtp.filter((B) => y.some((J) => J.name === B.codec)), O = k.fmtp.filter((B) => b.some((J) => J.payload === B.payload)), D = (H = k.rtcpFb) == null ? void 0 : H.filter((B) => b.some((J) => J.payload === B.payload)), U = b.map((B) => B.payload);
|
|
22499
|
+
return E.media[E.media.length - 1].rtp = b, E.media[E.media.length - 1].fmtp = O, E.media[E.media.length - 1].rtcpFb = D, E.media[E.media.length - 1].payloads = U.join(" "), ns.write(E);
|
|
22498
22500
|
}, h = yield this.pc.createOffer();
|
|
22499
22501
|
if (h.sdp = l(h.sdp, i), this.logger.debug(`[SDP] send() | calling pc.setLocalDescription() [offer:${JSON.stringify(h)}]`), yield this.pc.setLocalDescription(h), e === "audio" || e.kind === "audio") {
|
|
22500
22502
|
const { enableDtx: S, enableStereo: y } = this, E = this.enableHighBitrate ? y ? 128e3 : 64e3 : y ? 64e3 : 32e3;
|
|
@@ -22816,7 +22818,7 @@ pa = new WeakMap(), We = new WeakMap(), Je = new WeakMap(), gc = new WeakMap(),
|
|
|
22816
22818
|
return u(this, null, function* () {
|
|
22817
22819
|
var o, c, d, l, h, g, S, y;
|
|
22818
22820
|
Do(this.context, "forceRelay") && f(this, ws, "relay"), this.logger.info(`ICE Transport Policy set to ${n(this, ws)}`);
|
|
22819
|
-
const a = yield
|
|
22821
|
+
const a = yield $t().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
22820
22822
|
e.send && A(this, wl, HS).call(this, {
|
|
22821
22823
|
iceServers: a,
|
|
22822
22824
|
additionalSettings: {
|
|
@@ -23028,13 +23030,13 @@ pa = new WeakMap(), We = new WeakMap(), Je = new WeakMap(), gc = new WeakMap(),
|
|
|
23028
23030
|
}, n(this, fa, bd).mediaState[i])
|
|
23029
23031
|
);
|
|
23030
23032
|
};
|
|
23031
|
-
var bl,
|
|
23033
|
+
var bl, Xt;
|
|
23032
23034
|
class fO {
|
|
23033
23035
|
constructor(t, e, r, i, a) {
|
|
23034
23036
|
/* eslint-disable-next-line no-useless-constructor */
|
|
23035
23037
|
m(this, bl, void 0);
|
|
23036
|
-
m(this,
|
|
23037
|
-
this.events = e, this.recvTransport = r, this.socket = i, this.socketHandler = a, f(this, bl, t), f(this,
|
|
23038
|
+
m(this, Xt, void 0);
|
|
23039
|
+
this.events = e, this.recvTransport = r, this.socket = i, this.socketHandler = a, f(this, bl, t), f(this, Xt, t.getValue("logger"));
|
|
23038
23040
|
}
|
|
23039
23041
|
create(t) {
|
|
23040
23042
|
return u(this, null, function* () {
|
|
@@ -23066,7 +23068,7 @@ class fO {
|
|
|
23066
23068
|
if (!h)
|
|
23067
23069
|
return;
|
|
23068
23070
|
if (l.errorCode) {
|
|
23069
|
-
n(this,
|
|
23071
|
+
n(this, Xt).warn(`Consumer request failed for producer ${d}`, {
|
|
23070
23072
|
error: { message: l.errorCode }
|
|
23071
23073
|
}), c.push(G(N({}, h), { errorCode: l.errorCode }));
|
|
23072
23074
|
return;
|
|
@@ -23094,7 +23096,7 @@ class fO {
|
|
|
23094
23096
|
negotiate(t) {
|
|
23095
23097
|
return u(this, null, function* () {
|
|
23096
23098
|
try {
|
|
23097
|
-
n(this,
|
|
23099
|
+
n(this, Xt).info("Negotiating socket consumer", { transport: this.recvTransport }), n(this, Xt).debug(`[SDP] setting remote offer: ${JSON.stringify(t)} on recvTransport`, {
|
|
23098
23100
|
transport: this.recvTransport
|
|
23099
23101
|
});
|
|
23100
23102
|
const e = yield this.recvTransport.setRemoteOffer(t), r = {
|
|
@@ -23105,14 +23107,14 @@ class fO {
|
|
|
23105
23107
|
target: pr.SUBSCRIBER
|
|
23106
23108
|
}
|
|
23107
23109
|
};
|
|
23108
|
-
return n(this,
|
|
23110
|
+
return n(this, Xt).debug(`sending renegotiate request: ${JSON.stringify(r)} on recvTransport`, {
|
|
23109
23111
|
transport: this.recvTransport
|
|
23110
23112
|
}), yield this.socket.sendMessagePromise(
|
|
23111
23113
|
this.events.renegotiateSessionDescription,
|
|
23112
23114
|
gR.toBinary(r)
|
|
23113
|
-
), n(this,
|
|
23115
|
+
), n(this, Xt).info("Renegotiation done", { transport: this.recvTransport }), e;
|
|
23114
23116
|
} catch (e) {
|
|
23115
|
-
n(this,
|
|
23117
|
+
n(this, Xt).error("Failed to renegotiate", { error: e });
|
|
23116
23118
|
return;
|
|
23117
23119
|
}
|
|
23118
23120
|
});
|
|
@@ -23123,7 +23125,7 @@ class fO {
|
|
|
23123
23125
|
return;
|
|
23124
23126
|
const e = (r, i) => u(this, null, function* () {
|
|
23125
23127
|
const a = r.map((l) => l.localId);
|
|
23126
|
-
n(this,
|
|
23128
|
+
n(this, Xt).info(`Closing consumers: ${JSON.stringify(a)}`);
|
|
23127
23129
|
const o = {
|
|
23128
23130
|
description: {
|
|
23129
23131
|
sdp: i.sdp,
|
|
@@ -23158,18 +23160,18 @@ class fO {
|
|
|
23158
23160
|
ridNotAvailable: "asciibetical"
|
|
23159
23161
|
}
|
|
23160
23162
|
});
|
|
23161
|
-
}), yield this.socketHandler.updateConsumersSimulcastConfig(r), n(this,
|
|
23163
|
+
}), yield this.socketHandler.updateConsumersSimulcastConfig(r), n(this, Xt).info(`Consumers switched layers to ${e}`, { consumerIds: i == null ? void 0 : i.map(({ id: a }) => a) });
|
|
23162
23164
|
});
|
|
23163
23165
|
}
|
|
23164
23166
|
}
|
|
23165
|
-
bl = new WeakMap(),
|
|
23167
|
+
bl = new WeakMap(), Xt = new WeakMap();
|
|
23166
23168
|
class kp {
|
|
23167
23169
|
/* eslint-disable-next-line no-useless-constructor, no-empty-function */
|
|
23168
23170
|
constructor(t) {
|
|
23169
23171
|
this.socketHandler = t;
|
|
23170
23172
|
}
|
|
23171
23173
|
static getMSIDFromSDP(t, e) {
|
|
23172
|
-
return
|
|
23174
|
+
return ns.parse(t).media.filter(
|
|
23173
23175
|
(a) => e === "video" ? a.type === "video" : a.type === "audio"
|
|
23174
23176
|
).at(-1).msid;
|
|
23175
23177
|
}
|
|
@@ -23426,7 +23428,7 @@ Fi = new WeakMap(), _s = new WeakMap(), yc = new WeakMap(), Cs = new WeakMap(),
|
|
|
23426
23428
|
peerId: e.peerId
|
|
23427
23429
|
});
|
|
23428
23430
|
};
|
|
23429
|
-
var Pc, wc, _c, va, Ta, ya, Cc, Rc, Ea,
|
|
23431
|
+
var Pc, wc, _c, va, Ta, ya, Cc, Rc, Ea, Pt, ls, us, ji, qi, er, bc, Ol, KS, Nl, zS, Ll, YS, Vl, QS;
|
|
23430
23432
|
const $l = class {
|
|
23431
23433
|
constructor({
|
|
23432
23434
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -23461,14 +23463,14 @@ const $l = class {
|
|
|
23461
23463
|
m(this, Rc, void 0);
|
|
23462
23464
|
m(this, Ea, void 0);
|
|
23463
23465
|
// State variables
|
|
23464
|
-
m(this,
|
|
23466
|
+
m(this, Pt, void 0);
|
|
23465
23467
|
m(this, ls, void 0);
|
|
23466
23468
|
m(this, us, !1);
|
|
23467
23469
|
m(this, ji, 0);
|
|
23468
23470
|
m(this, qi, 0);
|
|
23469
23471
|
m(this, er, []);
|
|
23470
23472
|
m(this, bc, void 0);
|
|
23471
|
-
f(this, va, t), f(this,
|
|
23473
|
+
f(this, va, t), f(this, Pt, t), f(this, Pc, e), f(this, wc, r), f(this, _c, i), f(this, Ta, a), f(this, ya, o), f(this, Cc, c), f(this, Rc, d), f(this, Ea, l), f(this, bc, h), f(this, ls, t / 2);
|
|
23472
23474
|
}
|
|
23473
23475
|
get voiceDetected() {
|
|
23474
23476
|
return n(this, us);
|
|
@@ -23481,33 +23483,33 @@ const $l = class {
|
|
|
23481
23483
|
processAudioChunk(t) {
|
|
23482
23484
|
var o, c;
|
|
23483
23485
|
const e = A(o = $l, Ll, YS).call(o, t), r = A(c = $l, Vl, QS).call(c, t);
|
|
23484
|
-
return A(this, Ol, KS).call(this, e), e / n(this, ls) > n(this, Ea) && e > n(this,
|
|
23486
|
+
return A(this, Ol, KS).call(this, e), e / n(this, ls) > n(this, Ea) && e > n(this, Pt) && r > n(this, Pc) ? (f(this, ji, n(this, ji) + 1), f(this, qi, n(this, _c)), n(this, ji) >= n(this, wc) && f(this, us, !0)) : (f(this, ji, 0), n(this, qi) > 0 ? f(this, qi, n(this, qi) - 1) : n(this, us) && f(this, us, !1), n(this, us) || A(this, Nl, zS).call(this, e)), { energy: e, isVoice: n(this, us) };
|
|
23485
23487
|
}
|
|
23486
23488
|
/**
|
|
23487
23489
|
* Reset the detector state
|
|
23488
23490
|
*/
|
|
23489
23491
|
reset() {
|
|
23490
|
-
f(this, us, !1), f(this, ji, 0), f(this, qi, 0), f(this,
|
|
23492
|
+
f(this, us, !1), f(this, ji, 0), f(this, qi, 0), f(this, Pt, n(this, va)), f(this, ls, n(this, va) / 2), f(this, er, []);
|
|
23491
23493
|
}
|
|
23492
23494
|
/**
|
|
23493
23495
|
* Get current adaptive threshold values for debugging/visualization
|
|
23494
23496
|
*/
|
|
23495
23497
|
getThresholdInfo() {
|
|
23496
23498
|
return {
|
|
23497
|
-
currentEnergyThreshold: n(this,
|
|
23499
|
+
currentEnergyThreshold: n(this, Pt),
|
|
23498
23500
|
backgroundNoiseEnergy: n(this, ls),
|
|
23499
23501
|
energyRatioThreshold: n(this, Ea)
|
|
23500
23502
|
};
|
|
23501
23503
|
}
|
|
23502
23504
|
};
|
|
23503
23505
|
let lo = $l;
|
|
23504
|
-
Pc = new WeakMap(), wc = new WeakMap(), _c = new WeakMap(), va = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Cc = new WeakMap(), Rc = new WeakMap(), Ea = new WeakMap(),
|
|
23505
|
-
n(this, us) ? f(this,
|
|
23506
|
+
Pc = new WeakMap(), wc = new WeakMap(), _c = new WeakMap(), va = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Cc = new WeakMap(), Rc = new WeakMap(), Ea = new WeakMap(), Pt = new WeakMap(), ls = new WeakMap(), us = new WeakMap(), ji = new WeakMap(), qi = new WeakMap(), er = new WeakMap(), bc = new WeakMap(), Ol = new WeakSet(), KS = function(t) {
|
|
23507
|
+
n(this, us) ? f(this, Pt, n(this, ya) * n(this, Pt) + (1 - n(this, ya)) * t) : f(this, Pt, n(this, Ta) * n(this, Pt) + (1 - n(this, Ta)) * n(this, ls)), f(this, Pt, Math.max(
|
|
23506
23508
|
n(this, Cc),
|
|
23507
|
-
Math.min(n(this, Rc), n(this,
|
|
23509
|
+
Math.min(n(this, Rc), n(this, Pt))
|
|
23508
23510
|
));
|
|
23509
23511
|
}, Nl = new WeakSet(), zS = function(t) {
|
|
23510
|
-
if (t < n(this,
|
|
23512
|
+
if (t < n(this, Pt) * 1.2)
|
|
23511
23513
|
if (n(this, er).push(t), n(this, er).length > n(this, bc) && n(this, er).shift(), n(this, er).length >= 10) {
|
|
23512
23514
|
const e = [...n(this, er)].sort((i, a) => i - a), r = Math.floor(e.length / 2);
|
|
23513
23515
|
f(this, ls, e[r]);
|
|
@@ -23684,7 +23686,7 @@ var EO = Object.defineProperty, PO = Object.getOwnPropertyDescriptor, ge = (s, t
|
|
|
23684
23686
|
for (var i = r > 1 ? void 0 : r ? PO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
23685
23687
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23686
23688
|
return r && i && EO(t, e, i), i;
|
|
23687
|
-
}, Nc, Lc, Ke, j, Hl, gt, nr, Ji, Ki, Vc,
|
|
23689
|
+
}, Nc, Lc, Ke, j, Hl, gt, nr, Ji, Ki, Vc, Nt, ar, mt, wt, or, ui, $c, Oh, Bl, tv, Fl, sv, jl, rv, xc, Nh, ql, iv, Gl, nv, st, ct, zi, ho, Wl, av, Jl, ov, Kl, cv, zl, dv;
|
|
23688
23690
|
class ce {
|
|
23689
23691
|
constructor(t, e) {
|
|
23690
23692
|
m(this, or);
|
|
@@ -23735,16 +23737,16 @@ class ce {
|
|
|
23735
23737
|
m(this, Ji, void 0);
|
|
23736
23738
|
m(this, Ki, void 0);
|
|
23737
23739
|
m(this, Vc, void 0);
|
|
23738
|
-
m(this,
|
|
23740
|
+
m(this, Nt, null);
|
|
23739
23741
|
m(this, ar, void 0);
|
|
23740
23742
|
m(this, mt, void 0);
|
|
23741
|
-
m(this,
|
|
23743
|
+
m(this, wt, void 0);
|
|
23742
23744
|
var i, a;
|
|
23743
23745
|
this.context = t;
|
|
23744
23746
|
const {
|
|
23745
23747
|
socket: r
|
|
23746
23748
|
} = e;
|
|
23747
|
-
this.mediaJoined = !1, f(this, Ke, r), f(this, nr, !1), f(this, j, new vO(t, r)), f(this, gt, n(this, j).events), f(this, ar, /* @__PURE__ */ new Set()), f(this, mt, /* @__PURE__ */ new Map()), f(this, Ji, !1), f(this, Ki, new wh(t.getValue("logger"))), f(this,
|
|
23749
|
+
this.mediaJoined = !1, f(this, Ke, r), f(this, nr, !1), f(this, j, new vO(t, r)), f(this, gt, n(this, j).events), f(this, ar, /* @__PURE__ */ new Set()), f(this, mt, /* @__PURE__ */ new Map()), f(this, Ji, !1), f(this, Ki, new wh(t.getValue("logger"))), f(this, wt, new uo(
|
|
23748
23750
|
this.context,
|
|
23749
23751
|
n(this, j).socketHandler.audioActivity.bind(n(this, j).socketHandler)
|
|
23750
23752
|
)), this.e2ee = (a = (i = t.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? a : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, Vc, lp(
|
|
@@ -23786,7 +23788,7 @@ class ce {
|
|
|
23786
23788
|
n(this, or, ui).mediaJoined = t;
|
|
23787
23789
|
}
|
|
23788
23790
|
reset({ resetTransportQueue: t }) {
|
|
23789
|
-
this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, j).closeAllProducers(), n(this, j).closeAllConsumers(), n(this, mt).clear(), n(this, ar).clear(), f(this,
|
|
23791
|
+
this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, j).closeAllProducers(), n(this, j).closeAllConsumers(), n(this, mt).clear(), n(this, ar).clear(), f(this, Nt, null), t && n(this, Ki).stop(), n(this, j).stopAllTransports(), n(this, j).reset(), t && f(this, Ki, new wh());
|
|
23790
23792
|
}
|
|
23791
23793
|
joinRoom(a, o) {
|
|
23792
23794
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
@@ -23810,13 +23812,13 @@ class ce {
|
|
|
23810
23812
|
*/
|
|
23811
23813
|
initializeConnection(a, o) {
|
|
23812
23814
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
23813
|
-
return n(this,
|
|
23815
|
+
return n(this, Nt) ? n(this, Nt) : (f(this, Nt, (() => u(this, null, function* () {
|
|
23814
23816
|
try {
|
|
23815
23817
|
yield A(this, xc, Nh).call(this, t, e, r, i);
|
|
23816
23818
|
} catch (c) {
|
|
23817
|
-
throw f(this,
|
|
23819
|
+
throw f(this, Nt, null), c;
|
|
23818
23820
|
}
|
|
23819
|
-
}))()), n(this,
|
|
23821
|
+
}))()), n(this, Nt));
|
|
23820
23822
|
});
|
|
23821
23823
|
}
|
|
23822
23824
|
getConsumers() {
|
|
@@ -23950,14 +23952,14 @@ class ce {
|
|
|
23950
23952
|
return u(this, null, function* () {
|
|
23951
23953
|
try {
|
|
23952
23954
|
if (t === void 0)
|
|
23953
|
-
throw new
|
|
23955
|
+
throw new Rt("track undefined");
|
|
23954
23956
|
const e = A(this, st, ct).call(this, we.MIC);
|
|
23955
23957
|
if (e) {
|
|
23956
23958
|
const o = yield e;
|
|
23957
23959
|
if (n(this, j).producers.has(o)) {
|
|
23958
23960
|
const c = n(this, j).producers.get(o);
|
|
23959
23961
|
if (!c.closed) {
|
|
23960
|
-
yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this,
|
|
23962
|
+
yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this, wt) && (n(this, wt).audioTrack = t, n(this, wt).producerId = o, n(this, wt).start(!0));
|
|
23961
23963
|
return;
|
|
23962
23964
|
}
|
|
23963
23965
|
yield n(this, j).closeProducer(o, { stopTrack: !1 });
|
|
@@ -23972,7 +23974,7 @@ class ce {
|
|
|
23972
23974
|
i
|
|
23973
23975
|
);
|
|
23974
23976
|
A(this, zi, ho).call(this, we.MIC, a.then((o) => o.id)), yield a.then((o) => {
|
|
23975
|
-
n(this,
|
|
23977
|
+
n(this, wt) && (n(this, wt).audioTrack = o.track, n(this, wt).producerId = o.id, n(this, wt).start());
|
|
23976
23978
|
});
|
|
23977
23979
|
} catch (e) {
|
|
23978
23980
|
throw new R(e);
|
|
@@ -23991,7 +23993,7 @@ class ce {
|
|
|
23991
23993
|
this.logger.info("pauseMic::mic_producer_already_paused");
|
|
23992
23994
|
return;
|
|
23993
23995
|
}
|
|
23994
|
-
e.pause(), (i = n(this,
|
|
23996
|
+
e.pause(), (i = n(this, wt)) == null || i.stop();
|
|
23995
23997
|
const r = {
|
|
23996
23998
|
producerId: e.id,
|
|
23997
23999
|
pause: !0
|
|
@@ -24074,7 +24076,7 @@ class ce {
|
|
|
24074
24076
|
return u(this, null, function* () {
|
|
24075
24077
|
var e;
|
|
24076
24078
|
const t = yield A(this, st, ct).call(this, we.MIC);
|
|
24077
|
-
t && (yield n(this, j).closeProducer(t)), (e = n(this,
|
|
24079
|
+
t && (yield n(this, j).closeProducer(t)), (e = n(this, wt)) == null || e.stop(), n(this, mt).delete(we.MIC);
|
|
24078
24080
|
});
|
|
24079
24081
|
}
|
|
24080
24082
|
disableScreenShare() {
|
|
@@ -24303,7 +24305,7 @@ class ce {
|
|
|
24303
24305
|
});
|
|
24304
24306
|
}
|
|
24305
24307
|
}
|
|
24306
|
-
Nc = new WeakMap(), Lc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), gt = new WeakMap(), nr = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), Vc = new WeakMap(),
|
|
24308
|
+
Nc = new WeakMap(), Lc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), gt = new WeakMap(), nr = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), Vc = new WeakMap(), Nt = new WeakMap(), ar = new WeakMap(), mt = new WeakMap(), wt = new WeakMap(), or = new WeakSet(), ui = function() {
|
|
24307
24309
|
return this.context.getValue("connectionHandler");
|
|
24308
24310
|
}, $c = new WeakSet(), Oh = function(t) {
|
|
24309
24311
|
this.mediaJoined = !1, f(this, nr, !1), n(this, Ke).isConnected && this.peerId === t && this.context.getValue("peerSessionStore").emit(_.MEDIA_ROOM_JOIN_FAILED);
|
|
@@ -24314,16 +24316,16 @@ Nc = new WeakMap(), Lc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), H
|
|
|
24314
24316
|
let a = !1;
|
|
24315
24317
|
if (r) {
|
|
24316
24318
|
const { recv: c, send: d } = (o = n(this, or, ui).mediaState) != null ? o : {};
|
|
24317
|
-
(d == null ? void 0 : d.state) === Ir.CONNECTED && (c == null ? void 0 : c.state) === Ir.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), f(this,
|
|
24319
|
+
(d == null ? void 0 : d.state) === Ir.CONNECTED && (c == null ? void 0 : c.state) === Ir.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), f(this, Nt, null), a = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }));
|
|
24318
24320
|
}
|
|
24319
24321
|
try {
|
|
24320
|
-
n(this,
|
|
24322
|
+
n(this, Nt) ? yield n(this, Nt) : yield A(this, xc, Nh).call(this, t, e, r, i, a), A(this, jl, rv).call(this, e);
|
|
24321
24323
|
const { joined: c, error: d } = yield A(this, Fl, sv).call(this);
|
|
24322
24324
|
return { roomJoined: c, error: d };
|
|
24323
24325
|
} catch (c) {
|
|
24324
24326
|
return this.logger.error("Failed to complete room join", { error: c }), { roomJoined: !1, error: c };
|
|
24325
24327
|
} finally {
|
|
24326
|
-
f(this,
|
|
24328
|
+
f(this, Nt, null);
|
|
24327
24329
|
}
|
|
24328
24330
|
});
|
|
24329
24331
|
}, Fl = new WeakSet(), sv = function() {
|
|
@@ -24576,22 +24578,22 @@ var _O = Object.defineProperty, CO = Object.getOwnPropertyDescriptor, mn = (s, t
|
|
|
24576
24578
|
for (var i = r > 1 ? void 0 : r ? CO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
24577
24579
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
24578
24580
|
return r && i && _O(t, e, i), i;
|
|
24579
|
-
}, Ca,
|
|
24581
|
+
}, Ca, Zt, ee, _t, jt, _m;
|
|
24580
24582
|
const uv = (_m = class {
|
|
24581
24583
|
/**
|
|
24582
24584
|
* Use await SelfController.init(roomNodeClient) instead
|
|
24583
24585
|
*/
|
|
24584
24586
|
constructor(s, t, e, r) {
|
|
24585
24587
|
// eslint-disable-next-line class-methods-use-this
|
|
24586
|
-
m(this,
|
|
24588
|
+
m(this, _t);
|
|
24587
24589
|
p(this, "self");
|
|
24588
24590
|
p(this, "authToken");
|
|
24589
24591
|
m(this, Ca, void 0);
|
|
24590
24592
|
p(this, "viewType");
|
|
24591
|
-
m(this,
|
|
24593
|
+
m(this, Zt, void 0);
|
|
24592
24594
|
m(this, ee, void 0);
|
|
24593
24595
|
const { socket: i } = e, a = s.getValue("authToken");
|
|
24594
|
-
this.self = t, f(this, ee, s), this.viewType = r, this.authToken = a, f(this, Ca, i), f(this,
|
|
24596
|
+
this.self = t, f(this, ee, s), this.viewType = r, this.authToken = a, f(this, Ca, i), f(this, Zt, e), this.setupEvents();
|
|
24595
24597
|
}
|
|
24596
24598
|
get peerId() {
|
|
24597
24599
|
return n(this, ee).getValue("peerId");
|
|
@@ -24615,7 +24617,7 @@ const uv = (_m = class {
|
|
|
24615
24617
|
}
|
|
24616
24618
|
static init(s, t, e, r, i) {
|
|
24617
24619
|
return u(this, null, function* () {
|
|
24618
|
-
const a =
|
|
24620
|
+
const a = $t(), o = !!s.getValue("cachedUserDetails"), c = yield Xe.__init__(
|
|
24619
24621
|
s,
|
|
24620
24622
|
e,
|
|
24621
24623
|
r,
|
|
@@ -24673,7 +24675,7 @@ const uv = (_m = class {
|
|
|
24673
24675
|
if (e.canProduceAudio === W.Allowed && r)
|
|
24674
24676
|
if ((s == null ? void 0 : s.readyState) === "live")
|
|
24675
24677
|
try {
|
|
24676
|
-
yield n(this,
|
|
24678
|
+
yield n(this, _t, jt).shareMic(s), this.self.audioEnabled || n(this, _t, jt).pauseMic();
|
|
24677
24679
|
} catch (d) {
|
|
24678
24680
|
this.self.disableAudio();
|
|
24679
24681
|
}
|
|
@@ -24682,7 +24684,7 @@ const uv = (_m = class {
|
|
|
24682
24684
|
if (e.canProduceVideo === W.Allowed && i)
|
|
24683
24685
|
if ((t == null ? void 0 : t.readyState) === "live")
|
|
24684
24686
|
try {
|
|
24685
|
-
yield n(this,
|
|
24687
|
+
yield n(this, _t, jt).shareWebcam(t), this.self.videoEnabled || n(this, _t, jt).pauseWebcam();
|
|
24686
24688
|
} catch (d) {
|
|
24687
24689
|
this.self.disableVideo();
|
|
24688
24690
|
}
|
|
@@ -24692,7 +24694,7 @@ const uv = (_m = class {
|
|
|
24692
24694
|
const d = o.video, l = o.audio;
|
|
24693
24695
|
if ((d == null ? void 0 : d.readyState) === "live")
|
|
24694
24696
|
try {
|
|
24695
|
-
yield (c = n(this,
|
|
24697
|
+
yield (c = n(this, _t, jt)) == null ? void 0 : c.shareScreen({
|
|
24696
24698
|
video: d,
|
|
24697
24699
|
audio: (l == null ? void 0 : l.readyState) === "live" ? l : void 0
|
|
24698
24700
|
});
|
|
@@ -24732,7 +24734,7 @@ const uv = (_m = class {
|
|
|
24732
24734
|
}
|
|
24733
24735
|
resetSelf(s) {
|
|
24734
24736
|
return u(this, null, function* () {
|
|
24735
|
-
n(this, ee).getValue("callstats").callEnded(), s ? (this.logger.info("Resetting Self post reconnect. Peer has earlier tried joining the meeting. State cleanup will be done during room rejoin."), yield this.joinRoom(s)) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), n(this,
|
|
24737
|
+
n(this, ee).getValue("callstats").callEnded(), s ? (this.logger.info("Resetting Self post reconnect. Peer has earlier tried joining the meeting. State cleanup will be done during room rejoin."), yield this.joinRoom(s)) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), n(this, _t, jt).reset({ resetTransportQueue: !0 }));
|
|
24736
24738
|
});
|
|
24737
24739
|
}
|
|
24738
24740
|
setupEvents() {
|
|
@@ -24752,17 +24754,17 @@ const uv = (_m = class {
|
|
|
24752
24754
|
this.self.roomState !== "disconnected" && (this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" }));
|
|
24753
24755
|
}), n(this, ee).getValue("peerSessionStore").on(_.SOCKET_SERVICE_FAILED, () => {
|
|
24754
24756
|
this.logger.error("Socket reconnection failed after exhausting all attempts. SDK re-initialization is required."), this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
24755
|
-
}), n(this,
|
|
24757
|
+
}), n(this, Zt).on(x.waitingRoomRequestAccepted, () => {
|
|
24756
24758
|
this.waitlistAcceptHandler();
|
|
24757
|
-
}), n(this,
|
|
24759
|
+
}), n(this, Zt).on(Ed.updateUserPreset, (s) => {
|
|
24758
24760
|
s.updatePeersPresets.forEach((t) => {
|
|
24759
24761
|
t.userIds === this.self.userId && n(this, ee).getValue("peerSessionStore").emit(_.UPDATE_PERMISSIONS, t.patch);
|
|
24760
24762
|
});
|
|
24761
|
-
}), n(this,
|
|
24763
|
+
}), n(this, Zt).on(x.waitingRoomRequestDenied, () => {
|
|
24762
24764
|
this.waitlistRejectedHandler();
|
|
24763
|
-
}), n(this,
|
|
24765
|
+
}), n(this, Zt).on(x.kick, () => {
|
|
24764
24766
|
this.kickHandler({ kickType: "kick" });
|
|
24765
|
-
}), n(this,
|
|
24767
|
+
}), n(this, Zt).on(x.kickAll, () => {
|
|
24766
24768
|
this.kickHandler({ kickType: "kickAll" });
|
|
24767
24769
|
}), n(this, ee).getValue("peerSessionStore").onAsync(_.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), n(this, ee).getValue("peerSessionStore").on(
|
|
24768
24770
|
_.PRODUCER_SCORE_UPDATE,
|
|
@@ -24804,7 +24806,7 @@ const uv = (_m = class {
|
|
|
24804
24806
|
throw e(i), i;
|
|
24805
24807
|
}
|
|
24806
24808
|
t > 0 && this.logger.warn(`Retrying socket room join for peer ${s}: attempt=${t + 1}`);
|
|
24807
|
-
const r = yield n(this,
|
|
24809
|
+
const r = yield n(this, Zt).joinRoom(this.self);
|
|
24808
24810
|
if (this.self.id !== s) {
|
|
24809
24811
|
const i = new Error("Socket room join completed for a superseded peer ID");
|
|
24810
24812
|
throw e(i), i;
|
|
@@ -24824,7 +24826,7 @@ const uv = (_m = class {
|
|
|
24824
24826
|
try {
|
|
24825
24827
|
this.logger.info("Local peer is joining socket room.");
|
|
24826
24828
|
const { peer: t } = yield this.joinSocketRoomWithRetry();
|
|
24827
|
-
this.logger.info("Local peer has joined socket room."), n(this,
|
|
24829
|
+
this.logger.info("Local peer has joined socket room."), n(this, Zt).socket.flush();
|
|
24828
24830
|
const e = fp(t.stageType);
|
|
24829
24831
|
if (n(this, ee).setValue("stageStatus", e, !1), t.waitlisted) {
|
|
24830
24832
|
this.logger.info("Peer was waitlisted. Skipped joining media room."), this.waitlistedHandler();
|
|
@@ -24852,7 +24854,7 @@ const uv = (_m = class {
|
|
|
24852
24854
|
}
|
|
24853
24855
|
if (this.self.setIsPinned(!1), n(this, ee).setValue("stageStatus", "OFF_STAGE", !1), yield this.leaveMediaRoom(s), n(this, ee).setValue("roomNodeClient", void 0), n(this, ee).notify("stageStatus"), n(this, ee).getValue("connectionHandler").socketJoined)
|
|
24854
24856
|
try {
|
|
24855
|
-
n(this,
|
|
24857
|
+
n(this, Zt).leaveRoom(this.self) || this.logger.warn("SelfController.leaveRoom: socket leave was not sent");
|
|
24856
24858
|
} catch (r) {
|
|
24857
24859
|
this.logger.error("SelfController.leaveRoom: socket leave failed", { error: r });
|
|
24858
24860
|
}
|
|
@@ -24879,7 +24881,7 @@ const uv = (_m = class {
|
|
|
24879
24881
|
peerId: t
|
|
24880
24882
|
});
|
|
24881
24883
|
}
|
|
24882
|
-
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this,
|
|
24884
|
+
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this, _t, jt)) == null ? void 0 : a.joinRoom(
|
|
24883
24885
|
this.self.name,
|
|
24884
24886
|
r,
|
|
24885
24887
|
s,
|
|
@@ -24900,7 +24902,7 @@ const uv = (_m = class {
|
|
|
24900
24902
|
leaveMediaRoom(s) {
|
|
24901
24903
|
return u(this, null, function* () {
|
|
24902
24904
|
const t = n(this, ee).getValue("viewType");
|
|
24903
|
-
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === Ds.Webinar) && n(this,
|
|
24905
|
+
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === Ds.Webinar) && n(this, _t, jt) && (n(this, _t, jt).mediaJoined && s !== "disconnected" && (yield n(this, _t, jt).leaveRoom()), !(s === "stageLeft" && t === Ds.Livestream) && (n(this, _t, jt).mediaJoined = !1));
|
|
24904
24906
|
});
|
|
24905
24907
|
}
|
|
24906
24908
|
cleanupSelf() {
|
|
@@ -24908,7 +24910,7 @@ const uv = (_m = class {
|
|
|
24908
24910
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
24909
24911
|
});
|
|
24910
24912
|
}
|
|
24911
|
-
}, Ca = new WeakMap(),
|
|
24913
|
+
}, Ca = new WeakMap(), Zt = new WeakMap(), ee = new WeakMap(), _t = new WeakSet(), jt = function() {
|
|
24912
24914
|
return n(this, ee).getValue("roomNodeClient");
|
|
24913
24915
|
}, _m);
|
|
24914
24916
|
let ci = uv;
|
|
@@ -25082,26 +25084,26 @@ var AO = Object.defineProperty, MO = Object.getOwnPropertyDescriptor, DO = (s, t
|
|
|
25082
25084
|
for (var i = r > 1 ? void 0 : r ? MO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
25083
25085
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
25084
25086
|
return r && i && AO(t, e, i), i;
|
|
25085
|
-
},
|
|
25087
|
+
}, Lt;
|
|
25086
25088
|
class hv {
|
|
25087
25089
|
constructor(t, e) {
|
|
25088
25090
|
p(this, "socket");
|
|
25089
|
-
m(this,
|
|
25090
|
-
f(this,
|
|
25091
|
+
m(this, Lt, void 0);
|
|
25092
|
+
f(this, Lt, t), this.socket = e, this.handleSocketEvents(), n(this, Lt).setValue("roomSocketHandler", this);
|
|
25091
25093
|
}
|
|
25092
25094
|
/**
|
|
25093
25095
|
* @access private
|
|
25094
25096
|
* Not for external use
|
|
25095
25097
|
*/
|
|
25096
25098
|
get telemetry() {
|
|
25097
|
-
return n(this,
|
|
25099
|
+
return n(this, Lt).getValue("telemetry");
|
|
25098
25100
|
}
|
|
25099
25101
|
/**
|
|
25100
25102
|
* @access private
|
|
25101
25103
|
* Not for external use
|
|
25102
25104
|
*/
|
|
25103
25105
|
get logger() {
|
|
25104
|
-
return n(this,
|
|
25106
|
+
return n(this, Lt).getValue("logger");
|
|
25105
25107
|
}
|
|
25106
25108
|
cleanup() {
|
|
25107
25109
|
var t;
|
|
@@ -25132,9 +25134,9 @@ class hv {
|
|
|
25132
25134
|
);
|
|
25133
25135
|
try {
|
|
25134
25136
|
const { peer: a } = Sn.fromBinary((yield r).payload);
|
|
25135
|
-
n(this,
|
|
25137
|
+
n(this, Lt).getValue("connectionHandler").socketJoined = !0, n(this, Lt).getValue("peerSessionStore").emit(_.SOCKET_SERVICE_ROOM_JOINED, { peer: a });
|
|
25136
25138
|
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
|
|
25137
|
-
return n(this,
|
|
25139
|
+
return n(this, Lt).getValue("peerSessionStore").emit(_.ROOM_STATE, d), n(this, Lt).getValue("peerSessionStore").emit(_.SOCKET_PEERS, l), { peer: a };
|
|
25138
25140
|
} catch (a) {
|
|
25139
25141
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
25140
25142
|
error: a
|
|
@@ -25376,7 +25378,7 @@ class hv {
|
|
|
25376
25378
|
this.socket.on(x.broadcastMessage, ({ payload: t }) => {
|
|
25377
25379
|
try {
|
|
25378
25380
|
const e = eo.fromBinary(t);
|
|
25379
|
-
n(this,
|
|
25381
|
+
n(this, Lt).getValue("peerSessionStore").emit(_.ROOM_MESSAGE, {
|
|
25380
25382
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25381
25383
|
type: e.type,
|
|
25382
25384
|
timestamp: e.timestamp
|
|
@@ -25387,7 +25389,7 @@ class hv {
|
|
|
25387
25389
|
}), this.socket.on(x.broadcastToEntity, ({ payload: t }) => {
|
|
25388
25390
|
try {
|
|
25389
25391
|
const e = eo.fromBinary(t);
|
|
25390
|
-
n(this,
|
|
25392
|
+
n(this, Lt).getValue("peerSessionStore").emit(_.MESSAGE, {
|
|
25391
25393
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25392
25394
|
type: e.type,
|
|
25393
25395
|
timestamp: e.timestamp
|
|
@@ -25483,36 +25485,36 @@ class hv {
|
|
|
25483
25485
|
});
|
|
25484
25486
|
}
|
|
25485
25487
|
}
|
|
25486
|
-
|
|
25488
|
+
Lt = new WeakMap();
|
|
25487
25489
|
DO([
|
|
25488
25490
|
P.trace("RoomSocketHandler.joinRoom")
|
|
25489
25491
|
], hv.prototype, "joinRoom", 1);
|
|
25490
|
-
var
|
|
25492
|
+
var Ct;
|
|
25491
25493
|
class OO {
|
|
25492
25494
|
constructor(t) {
|
|
25493
|
-
m(this,
|
|
25494
|
-
f(this,
|
|
25495
|
+
m(this, Ct, void 0);
|
|
25496
|
+
f(this, Ct, t);
|
|
25495
25497
|
}
|
|
25496
25498
|
getStageRequests() {
|
|
25497
25499
|
return u(this, null, function* () {
|
|
25498
|
-
const { payload: t } = yield n(this,
|
|
25500
|
+
const { payload: t } = yield n(this, Ct).sendMessagePromise(
|
|
25499
25501
|
x.getStageRequests
|
|
25500
25502
|
);
|
|
25501
25503
|
return t ? xu.fromBinary(t) : { stageRequests: [] };
|
|
25502
25504
|
});
|
|
25503
25505
|
}
|
|
25504
25506
|
requestAccess() {
|
|
25505
|
-
n(this,
|
|
25507
|
+
n(this, Ct).sendMessage(x.requestStageAccess);
|
|
25506
25508
|
}
|
|
25507
25509
|
cancelRequestAccess() {
|
|
25508
|
-
n(this,
|
|
25510
|
+
n(this, Ct).sendMessage(x.cancelStageRequest);
|
|
25509
25511
|
}
|
|
25510
25512
|
grantAccess(t) {
|
|
25511
25513
|
return u(this, null, function* () {
|
|
25512
25514
|
const e = {
|
|
25513
25515
|
userIds: t
|
|
25514
25516
|
};
|
|
25515
|
-
n(this,
|
|
25517
|
+
n(this, Ct).sendMessage(
|
|
25516
25518
|
x.grantStageAccess,
|
|
25517
25519
|
R0.toBinary(e)
|
|
25518
25520
|
);
|
|
@@ -25523,14 +25525,14 @@ class OO {
|
|
|
25523
25525
|
const e = {
|
|
25524
25526
|
userIds: t
|
|
25525
25527
|
};
|
|
25526
|
-
n(this,
|
|
25528
|
+
n(this, Ct).sendMessage(
|
|
25527
25529
|
x.denyStageAccess,
|
|
25528
25530
|
k0.toBinary(e)
|
|
25529
25531
|
);
|
|
25530
25532
|
});
|
|
25531
25533
|
}
|
|
25532
25534
|
joinStage() {
|
|
25533
|
-
return n(this,
|
|
25535
|
+
return n(this, Ct).sendMessagePromise(
|
|
25534
25536
|
x.joinStage,
|
|
25535
25537
|
void 0,
|
|
25536
25538
|
void 0,
|
|
@@ -25541,7 +25543,7 @@ class OO {
|
|
|
25541
25543
|
const e = {
|
|
25542
25544
|
userIds: [t]
|
|
25543
25545
|
};
|
|
25544
|
-
return n(this,
|
|
25546
|
+
return n(this, Ct).sendMessagePromise(
|
|
25545
25547
|
x.leaveStage,
|
|
25546
25548
|
qg.toBinary(e),
|
|
25547
25549
|
void 0,
|
|
@@ -25552,7 +25554,7 @@ class OO {
|
|
|
25552
25554
|
const e = {
|
|
25553
25555
|
userIds: t
|
|
25554
25556
|
};
|
|
25555
|
-
return n(this,
|
|
25557
|
+
return n(this, Ct).sendMessagePromise(
|
|
25556
25558
|
x.leaveStage,
|
|
25557
25559
|
qg.toBinary(e)
|
|
25558
25560
|
);
|
|
@@ -25584,7 +25586,7 @@ class OO {
|
|
|
25584
25586
|
break;
|
|
25585
25587
|
}
|
|
25586
25588
|
}
|
|
25587
|
-
n(this,
|
|
25589
|
+
n(this, Ct).on(t, ({ payload: i, id: a }) => {
|
|
25588
25590
|
if (!i || !r)
|
|
25589
25591
|
return e(void 0, a);
|
|
25590
25592
|
const o = r(i);
|
|
@@ -25593,7 +25595,7 @@ class OO {
|
|
|
25593
25595
|
}
|
|
25594
25596
|
getPeerInfo(t) {
|
|
25595
25597
|
return u(this, null, function* () {
|
|
25596
|
-
const e = yield n(this,
|
|
25598
|
+
const e = yield n(this, Ct).sendMessagePromise(
|
|
25597
25599
|
x.getPeerInfo,
|
|
25598
25600
|
Xf.toBinary({ peerId: t })
|
|
25599
25601
|
);
|
|
@@ -25601,7 +25603,7 @@ class OO {
|
|
|
25601
25603
|
});
|
|
25602
25604
|
}
|
|
25603
25605
|
}
|
|
25604
|
-
|
|
25606
|
+
Ct = new WeakMap();
|
|
25605
25607
|
var Jr, ba;
|
|
25606
25608
|
class NO {
|
|
25607
25609
|
constructor(t, e) {
|
|
@@ -26805,22 +26807,22 @@ var a1 = Object.defineProperty, o1 = Object.getOwnPropertyDescriptor, c1 = (s, t
|
|
|
26805
26807
|
for (var i = r > 1 ? void 0 : r ? o1(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
26806
26808
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
26807
26809
|
return r && i && a1(t, e, i), i;
|
|
26808
|
-
},
|
|
26809
|
-
class Lv extends
|
|
26810
|
+
}, Vt;
|
|
26811
|
+
class Lv extends Ht {
|
|
26810
26812
|
constructor(e) {
|
|
26811
26813
|
const r = e.getValue("logger");
|
|
26812
26814
|
super(r);
|
|
26813
26815
|
p(this, "meetings", []);
|
|
26814
26816
|
p(this, "parentMeeting", null);
|
|
26815
|
-
m(this,
|
|
26816
|
-
f(this,
|
|
26817
|
+
m(this, Vt, void 0);
|
|
26818
|
+
f(this, Vt, e);
|
|
26817
26819
|
}
|
|
26818
26820
|
get isActive() {
|
|
26819
26821
|
return this.meetings.length !== 0;
|
|
26820
26822
|
}
|
|
26821
26823
|
/** @access private */
|
|
26822
26824
|
validateAlterAction() {
|
|
26823
|
-
const e = n(this,
|
|
26825
|
+
const e = n(this, Vt).getValue("self").permissions.connectedMeetings;
|
|
26824
26826
|
if (!(e != null && e.canAlterConnectedMeetings))
|
|
26825
26827
|
throw new Error(
|
|
26826
26828
|
"You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset."
|
|
@@ -26831,14 +26833,14 @@ class Lv extends Ut {
|
|
|
26831
26833
|
var d;
|
|
26832
26834
|
if (!(r != null && r.length))
|
|
26833
26835
|
throw new Error("You're trying to move participants with an empty list.");
|
|
26834
|
-
const i = n(this,
|
|
26836
|
+
const i = n(this, Vt).getValue("self").permissions.connectedMeetings;
|
|
26835
26837
|
if (!i)
|
|
26836
26838
|
throw new Error(
|
|
26837
26839
|
"You are not allowed to perform this action. Please enable connected meetings permissions in your preset."
|
|
26838
26840
|
);
|
|
26839
26841
|
if (i.canAlterConnectedMeetings)
|
|
26840
26842
|
return;
|
|
26841
|
-
const a = n(this,
|
|
26843
|
+
const a = n(this, Vt).getValue("userId");
|
|
26842
26844
|
if (!(r.length === 1 && r[0] === a))
|
|
26843
26845
|
throw new Error(
|
|
26844
26846
|
"You are not allowed to move other participants. Please enable canAlterConnectedMeetings permission in your preset."
|
|
@@ -26858,7 +26860,7 @@ class Lv extends Ut {
|
|
|
26858
26860
|
getConnectedMeetings() {
|
|
26859
26861
|
return u(this, null, function* () {
|
|
26860
26862
|
this.logger.info("Getting connected meetings dump");
|
|
26861
|
-
const e = yield n(this,
|
|
26863
|
+
const e = yield n(this, Vt).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
|
|
26862
26864
|
return this.logger.info("Got connected meetings dump"), e;
|
|
26863
26865
|
});
|
|
26864
26866
|
}
|
|
@@ -26869,7 +26871,7 @@ class Lv extends Ut {
|
|
|
26869
26871
|
createMeetings(e) {
|
|
26870
26872
|
return u(this, null, function* () {
|
|
26871
26873
|
this.validateAlterAction(), this.logger.info(`Creating connected meetings ${JSON.stringify(e)}`);
|
|
26872
|
-
const r = yield n(this,
|
|
26874
|
+
const r = yield n(this, Vt).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
|
|
26873
26875
|
e
|
|
26874
26876
|
);
|
|
26875
26877
|
return this.logger.info(`Created connected meetings ${JSON.stringify(r)}`), r.map((i) => ({
|
|
@@ -26884,7 +26886,7 @@ class Lv extends Ut {
|
|
|
26884
26886
|
*/
|
|
26885
26887
|
updateMeetings(e) {
|
|
26886
26888
|
return u(this, null, function* () {
|
|
26887
|
-
this.validateAlterAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this,
|
|
26889
|
+
this.validateAlterAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this, Vt).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
|
|
26888
26890
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
26889
26891
|
), this.logger.info(`Updated connected meetings ${JSON.stringify(e)}`);
|
|
26890
26892
|
});
|
|
@@ -26902,7 +26904,7 @@ class Lv extends Ut {
|
|
|
26902
26904
|
a.participants.map((o) => o.id)
|
|
26903
26905
|
) : Promise.resolve());
|
|
26904
26906
|
this.logger.info(`Moved participants before deleting connected meetings ${JSON.stringify(e)}. Deleting now.`), yield Promise.all(r);
|
|
26905
|
-
const i = yield n(this,
|
|
26907
|
+
const i = yield n(this, Vt).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
|
|
26906
26908
|
e
|
|
26907
26909
|
);
|
|
26908
26910
|
return this.logger.info(`Deleted connected meetings ${JSON.stringify(e)}`), i;
|
|
@@ -26918,7 +26920,7 @@ class Lv extends Ut {
|
|
|
26918
26920
|
moveParticipants(e, r, i) {
|
|
26919
26921
|
return u(this, null, function* () {
|
|
26920
26922
|
this.validateMoveAction(r, i), this.logger.info(`Moving connected meetings participants ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26921
|
-
const a = yield n(this,
|
|
26923
|
+
const a = yield n(this, Vt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26922
26924
|
{
|
|
26923
26925
|
sourceMeetingId: e,
|
|
26924
26926
|
destinationMeetingId: r,
|
|
@@ -26939,7 +26941,7 @@ class Lv extends Ut {
|
|
|
26939
26941
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
26940
26942
|
return u(this, null, function* () {
|
|
26941
26943
|
this.validateMoveAction(r, i.map((o) => o.id)), this.logger.info(`Moving connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26942
|
-
const a = yield n(this,
|
|
26944
|
+
const a = yield n(this, Vt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26943
26945
|
{
|
|
26944
26946
|
sourceMeetingId: e,
|
|
26945
26947
|
destinationMeetingId: r,
|
|
@@ -26980,9 +26982,9 @@ class Lv extends Ut {
|
|
|
26980
26982
|
});
|
|
26981
26983
|
}
|
|
26982
26984
|
}
|
|
26983
|
-
|
|
26985
|
+
Vt = new WeakMap();
|
|
26984
26986
|
c1([
|
|
26985
|
-
|
|
26987
|
+
Bt({ maxInvocations: 60, period: 60 })
|
|
26986
26988
|
], Lv.prototype, "getConnectedMeetings", 1);
|
|
26987
26989
|
var d1 = Object.defineProperty, l1 = Object.getOwnPropertyDescriptor, Mp = (s, t, e, r) => {
|
|
26988
26990
|
for (var i = r > 1 ? void 0 : r ? l1(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
@@ -27553,7 +27555,7 @@ let ii = (Rm = class {
|
|
|
27553
27555
|
video: !0
|
|
27554
27556
|
};
|
|
27555
27557
|
return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", AC({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
27556
|
-
})), a.setValue("cachedUserDetails", Os(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.3-staging.
|
|
27558
|
+
})), a.setValue("cachedUserDetails", Os(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.3-staging.16"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new m1()), a;
|
|
27557
27559
|
}
|
|
27558
27560
|
join() {
|
|
27559
27561
|
return u(this, null, function* () {
|