@cloudflare/realtimekit 1.5.2-staging.3 → 1.5.2-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EncryptionManager.d.ts +2 -1
- package/dist/browser.js +9 -11
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +7 -9
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +497 -470
- package/dist/index.es5.js +348 -333
- package/dist/index.rn.js +7 -9
- package/dist/ts3.4/dist/EncryptionManager.d.ts +2 -1
- package/dist/ts3.4/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -48,7 +48,7 @@ import { v4 as pa, validate as Sg } from "uuid";
|
|
|
48
48
|
import vg from "bowser";
|
|
49
49
|
import { MessageType as v, PbLong as xa, typeofJsonValue as wS } from "@protobuf-ts/runtime";
|
|
50
50
|
import * as Uc from "worker-timers";
|
|
51
|
-
import * as
|
|
51
|
+
import * as Zt from "sdp-transform";
|
|
52
52
|
function RS(s) {
|
|
53
53
|
const { length: t } = this, e = s >= 0 ? s : t + s;
|
|
54
54
|
return e < 0 || e >= t ? void 0 : this[e];
|
|
@@ -934,10 +934,10 @@ const Ng = {
|
|
|
934
934
|
PREPROD: "preprod",
|
|
935
935
|
PROD: "prod"
|
|
936
936
|
};
|
|
937
|
-
var
|
|
937
|
+
var Ut;
|
|
938
938
|
(function(s) {
|
|
939
939
|
s.AUDIO = "AUDIO", s.VIDEO = "VIDEO", s.SPEAKER = "SPEAKER", s.SCREENSHARE = "SCREENSHARE";
|
|
940
|
-
})(
|
|
940
|
+
})(Ut || (Ut = {}));
|
|
941
941
|
var Mh;
|
|
942
942
|
(function(s) {
|
|
943
943
|
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";
|
|
@@ -1535,7 +1535,7 @@ class zg extends tt {
|
|
|
1535
1535
|
}) || e[e.length - 1];
|
|
1536
1536
|
}
|
|
1537
1537
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
1538
|
-
var _, C, A, D, U, B, H, F, te, ze, ms,
|
|
1538
|
+
var _, C, A, D, U, B, H, F, te, ze, ms, Qt, Gr;
|
|
1539
1539
|
const d = e, c = new Kg(), l = r.length ? new Set(r) : void 0, h = [], g = [], S = [], T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1540
1540
|
for (const I of d.values()) {
|
|
1541
1541
|
if (l) {
|
|
@@ -1809,7 +1809,7 @@ class zg extends tt {
|
|
|
1809
1809
|
score: +(b.score * 10).toFixed(),
|
|
1810
1810
|
packetsLostPercentage: ed({
|
|
1811
1811
|
packetsLost: (b.packetsLost || 0) - (((ms = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : ms.packetsLost) || 0),
|
|
1812
|
-
packetsReceived: (b.packetsReceived || 0) - (((
|
|
1812
|
+
packetsReceived: (b.packetsReceived || 0) - (((Qt = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : Qt.packetsReceived) || 0)
|
|
1813
1813
|
}),
|
|
1814
1814
|
jitter: b.jitter || 0,
|
|
1815
1815
|
isScreenShare: this.screenShareConsumers.has(w),
|
|
@@ -2189,7 +2189,7 @@ class Yg extends zg {
|
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
2191
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
2192
|
-
var _, C, A, D, U, B, H, F, te, ze, ms,
|
|
2192
|
+
var _, C, A, D, U, B, H, F, te, ze, ms, Qt, Gr;
|
|
2193
2193
|
const d = e, c = new Kg(), l = r.length ? new Set(r) : void 0, h = [], g = [], S = [], T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2194
2194
|
for (const I of d.values()) {
|
|
2195
2195
|
if (l) {
|
|
@@ -2459,7 +2459,7 @@ class Yg extends zg {
|
|
|
2459
2459
|
score: +(b.score * 10).toFixed(),
|
|
2460
2460
|
packetsLostPercentage: ed({
|
|
2461
2461
|
packetsLost: (b.packetsLost || 0) - (((ms = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : ms.packetsLost) || 0),
|
|
2462
|
-
packetsReceived: (b.packetsReceived || 0) - (((
|
|
2462
|
+
packetsReceived: (b.packetsReceived || 0) - (((Qt = this.audioConsumerToStatsMap.get(w)) == null ? void 0 : Qt.packetsReceived) || 0)
|
|
2463
2463
|
}),
|
|
2464
2464
|
jitter: b.jitter || 0,
|
|
2465
2465
|
isScreenShare: this.screenShareConsumers.has(w),
|
|
@@ -2787,7 +2787,7 @@ let J = class extends tt {
|
|
|
2787
2787
|
}
|
|
2788
2788
|
devices(e, r, i) {
|
|
2789
2789
|
this.eventHandler.callEvent({
|
|
2790
|
-
event: e ===
|
|
2790
|
+
event: e === Ut.AUDIO && O.AUDIO_DEVICES_UPDATES || e === Ut.VIDEO && O.VIDEO_DEVICES_UPDATES || e === Ut.SPEAKER && O.SPEAKER_DEVICES_UPDATES,
|
|
2791
2791
|
metaData: {
|
|
2792
2792
|
deviceList: r
|
|
2793
2793
|
},
|
|
@@ -2796,7 +2796,7 @@ let J = class extends tt {
|
|
|
2796
2796
|
}
|
|
2797
2797
|
selectedDevice(e, r, i) {
|
|
2798
2798
|
this.eventHandler.callEvent({
|
|
2799
|
-
event: e ===
|
|
2799
|
+
event: e === Ut.AUDIO && O.SELECTED_MICROHPONE_UPDATE || e === Ut.VIDEO && O.SELECTED_CAMERA_UPDATE || e === Ut.SPEAKER && O.SELECTED_SPEAKER_UPDATE,
|
|
2800
2800
|
metaData: {
|
|
2801
2801
|
device: r
|
|
2802
2802
|
},
|
|
@@ -2815,7 +2815,7 @@ let J = class extends tt {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
mediaPlaybackFailed(e, r) {
|
|
2817
2817
|
this.eventHandler.callEvent({
|
|
2818
|
-
event: e ===
|
|
2818
|
+
event: e === Ut.AUDIO && O.AUDIO_PLAY_FAILED || e === Ut.VIDEO && O.VIDEO_PLAY_FAILED,
|
|
2819
2819
|
metaData: {
|
|
2820
2820
|
deviceType: e
|
|
2821
2821
|
},
|
|
@@ -2824,7 +2824,7 @@ let J = class extends tt {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
mediaTrackMuted(e, r) {
|
|
2826
2826
|
this.eventHandler.callEvent({
|
|
2827
|
-
event: e ===
|
|
2827
|
+
event: e === Ut.AUDIO && O.AUDIO_TRACK_MUTED || e === Ut.VIDEO && O.VIDEO_TRACK_MUTED,
|
|
2828
2828
|
metaData: {
|
|
2829
2829
|
deviceType: e
|
|
2830
2830
|
},
|
|
@@ -3750,12 +3750,12 @@ function Cv(s, t) {
|
|
|
3750
3750
|
return i;
|
|
3751
3751
|
}
|
|
3752
3752
|
var wv = Array.isArray;
|
|
3753
|
-
const
|
|
3753
|
+
const It = wv;
|
|
3754
3754
|
var Rv = 1 / 0, Vh = Cs ? Cs.prototype : void 0, xh = Vh ? Vh.toString : void 0;
|
|
3755
3755
|
function em(s) {
|
|
3756
3756
|
if (typeof s == "string")
|
|
3757
3757
|
return s;
|
|
3758
|
-
if (
|
|
3758
|
+
if (It(s))
|
|
3759
3759
|
return Cv(s, em) + "";
|
|
3760
3760
|
if (ul(s))
|
|
3761
3761
|
return xh ? xh.call(s) : "";
|
|
@@ -3772,7 +3772,7 @@ var Av = /^\s+/;
|
|
|
3772
3772
|
function Iv(s) {
|
|
3773
3773
|
return s && s.slice(0, kv(s) + 1).replace(Av, "");
|
|
3774
3774
|
}
|
|
3775
|
-
function
|
|
3775
|
+
function Yt(s) {
|
|
3776
3776
|
var t = typeof s;
|
|
3777
3777
|
return s != null && (t == "object" || t == "function");
|
|
3778
3778
|
}
|
|
@@ -3782,9 +3782,9 @@ function $h(s) {
|
|
|
3782
3782
|
return s;
|
|
3783
3783
|
if (ul(s))
|
|
3784
3784
|
return Uh;
|
|
3785
|
-
if (
|
|
3785
|
+
if (Yt(s)) {
|
|
3786
3786
|
var t = typeof s.valueOf == "function" ? s.valueOf() : s;
|
|
3787
|
-
s =
|
|
3787
|
+
s = Yt(t) ? t + "" : t;
|
|
3788
3788
|
}
|
|
3789
3789
|
if (typeof s != "string")
|
|
3790
3790
|
return s === 0 ? s : +s;
|
|
@@ -3797,7 +3797,7 @@ function Hu(s) {
|
|
|
3797
3797
|
}
|
|
3798
3798
|
var Lv = "[object AsyncFunction]", Vv = "[object Function]", xv = "[object GeneratorFunction]", Uv = "[object Proxy]";
|
|
3799
3799
|
function Fu(s) {
|
|
3800
|
-
if (!
|
|
3800
|
+
if (!Yt(s))
|
|
3801
3801
|
return !1;
|
|
3802
3802
|
var t = Gi(s);
|
|
3803
3803
|
return t == Vv || t == xv || t == Lv || t == Uv;
|
|
@@ -3829,7 +3829,7 @@ var qv = /[\\^$.*+?()[\]{}|]/g, jv = /^\[object .+?Constructor\]$/, Gv = Functio
|
|
|
3829
3829
|
"^" + Jv.call(Kv).replace(qv, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3830
3830
|
);
|
|
3831
3831
|
function Yv(s) {
|
|
3832
|
-
if (!
|
|
3832
|
+
if (!Yt(s) || Bv(s))
|
|
3833
3833
|
return !1;
|
|
3834
3834
|
var t = Fu(s) ? zv : jv;
|
|
3835
3835
|
return t.test(Wi(s));
|
|
@@ -3847,7 +3847,7 @@ var Hh = Object.create, Zv = function() {
|
|
|
3847
3847
|
function s() {
|
|
3848
3848
|
}
|
|
3849
3849
|
return function(t) {
|
|
3850
|
-
if (!
|
|
3850
|
+
if (!Yt(t))
|
|
3851
3851
|
return {};
|
|
3852
3852
|
if (Hh)
|
|
3853
3853
|
return Hh(t);
|
|
@@ -3994,7 +3994,7 @@ function vc(s) {
|
|
|
3994
3994
|
return s != null && Gu(s.length) && !Fu(s);
|
|
3995
3995
|
}
|
|
3996
3996
|
function RT(s, t, e) {
|
|
3997
|
-
if (!
|
|
3997
|
+
if (!Yt(e))
|
|
3998
3998
|
return !1;
|
|
3999
3999
|
var r = typeof t;
|
|
4000
4000
|
return (r == "number" ? vc(e) && qu(t, e.length) : r == "string" && t in e) ? fc(e[t], s) : !1;
|
|
@@ -4057,7 +4057,7 @@ var Wh = ma && ma.isTypedArray, uy = Wh ? Wu(Wh) : cy;
|
|
|
4057
4057
|
const pl = uy;
|
|
4058
4058
|
var hy = Object.prototype, py = hy.hasOwnProperty;
|
|
4059
4059
|
function am(s, t) {
|
|
4060
|
-
var e =
|
|
4060
|
+
var e = It(s), r = !e && no(s), i = !e && !r && ga(s), n = !e && !r && !i && pl(s), o = e || r || i || n, d = o ? AT(s.length, String) : [], c = d.length;
|
|
4061
4061
|
for (var l in s)
|
|
4062
4062
|
(t || py.call(s, l)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
4063
4063
|
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -4094,7 +4094,7 @@ function vy(s) {
|
|
|
4094
4094
|
}
|
|
4095
4095
|
var Ty = Object.prototype, yy = Ty.hasOwnProperty;
|
|
4096
4096
|
function Ey(s) {
|
|
4097
|
-
if (!
|
|
4097
|
+
if (!Yt(s))
|
|
4098
4098
|
return vy(s);
|
|
4099
4099
|
var t = hl(s), e = [];
|
|
4100
4100
|
for (var r in s)
|
|
@@ -4106,7 +4106,7 @@ function Tc(s) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
var Py = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _y = /^\w*$/;
|
|
4108
4108
|
function Ju(s, t) {
|
|
4109
|
-
if (
|
|
4109
|
+
if (It(s))
|
|
4110
4110
|
return !1;
|
|
4111
4111
|
var e = typeof s;
|
|
4112
4112
|
return e == "number" || e == "symbol" || e == "boolean" || s == null || ul(s) ? !0 : _y.test(s) || !Py.test(s) || t != null && s in Object(t);
|
|
@@ -4266,7 +4266,7 @@ function rE(s) {
|
|
|
4266
4266
|
return s == null ? "" : em(s);
|
|
4267
4267
|
}
|
|
4268
4268
|
function dm(s, t) {
|
|
4269
|
-
return
|
|
4269
|
+
return It(s) ? s : Ju(s, t) ? [s] : sE(rE(s));
|
|
4270
4270
|
}
|
|
4271
4271
|
var iE = 1 / 0;
|
|
4272
4272
|
function Sl(s) {
|
|
@@ -4378,7 +4378,7 @@ function AE(s, t) {
|
|
|
4378
4378
|
}
|
|
4379
4379
|
function Sm(s, t, e) {
|
|
4380
4380
|
var r = t(s);
|
|
4381
|
-
return
|
|
4381
|
+
return It(s) ? r : um(r, e(s));
|
|
4382
4382
|
}
|
|
4383
4383
|
function Kl(s) {
|
|
4384
4384
|
return Sm(s, gl, Yu);
|
|
@@ -4495,9 +4495,9 @@ function Xa(s, t, e, r, i, n) {
|
|
|
4495
4495
|
var o, d = t & PP, c = t & _P, l = t & CP;
|
|
4496
4496
|
if (e && (o = i ? e(s, r, i, n) : e(s)), o !== void 0)
|
|
4497
4497
|
return o;
|
|
4498
|
-
if (!
|
|
4498
|
+
if (!Yt(s))
|
|
4499
4499
|
return s;
|
|
4500
|
-
var h =
|
|
4500
|
+
var h = It(s);
|
|
4501
4501
|
if (h) {
|
|
4502
4502
|
if (o = FE(s), !d)
|
|
4503
4503
|
return tm(s, o);
|
|
@@ -4675,7 +4675,7 @@ function P_(s, t, e, r, i, n) {
|
|
|
4675
4675
|
}
|
|
4676
4676
|
var __ = 1, op = "[object Arguments]", cp = "[object Array]", kc = "[object Object]", C_ = Object.prototype, dp = C_.hasOwnProperty;
|
|
4677
4677
|
function w_(s, t, e, r, i, n) {
|
|
4678
|
-
var o =
|
|
4678
|
+
var o = It(s), d = It(t), c = o ? cp : fa(s), l = d ? cp : fa(t);
|
|
4679
4679
|
c = c == op ? kc : c, l = l == op ? kc : l;
|
|
4680
4680
|
var h = c == kc, g = l == kc, S = c == l;
|
|
4681
4681
|
if (S && ga(s)) {
|
|
@@ -4724,7 +4724,7 @@ function k_(s, t, e, r) {
|
|
|
4724
4724
|
return !0;
|
|
4725
4725
|
}
|
|
4726
4726
|
function wm(s) {
|
|
4727
|
-
return s === s && !
|
|
4727
|
+
return s === s && !Yt(s);
|
|
4728
4728
|
}
|
|
4729
4729
|
function A_(s) {
|
|
4730
4730
|
for (var t = gl(s), e = t.length; e--; ) {
|
|
@@ -4755,7 +4755,7 @@ function D_(s, t, e) {
|
|
|
4755
4755
|
break;
|
|
4756
4756
|
s = s[o];
|
|
4757
4757
|
}
|
|
4758
|
-
return n || ++r != i ? n : (i = s == null ? 0 : s.length, !!i && Gu(i) && qu(o, i) && (
|
|
4758
|
+
return n || ++r != i ? n : (i = s == null ? 0 : s.length, !!i && Gu(i) && qu(o, i) && (It(s) || no(s)));
|
|
4759
4759
|
}
|
|
4760
4760
|
function O_(s, t) {
|
|
4761
4761
|
return s != null && D_(s, t, M_);
|
|
@@ -4781,7 +4781,7 @@ function $_(s) {
|
|
|
4781
4781
|
return Ju(s) ? x_(Sl(s)) : U_(s);
|
|
4782
4782
|
}
|
|
4783
4783
|
function B_(s) {
|
|
4784
|
-
return typeof s == "function" ? s : s == null ? Hu : typeof s == "object" ?
|
|
4784
|
+
return typeof s == "function" ? s : s == null ? Hu : typeof s == "object" ? It(s) ? V_(s[0], s[1]) : I_(s) : $_(s);
|
|
4785
4785
|
}
|
|
4786
4786
|
function H_(s) {
|
|
4787
4787
|
return function(t, e, r) {
|
|
@@ -4804,7 +4804,7 @@ function eh(s, t, e) {
|
|
|
4804
4804
|
var r, i, n, o, d, c, l = 0, h = !1, g = !1, S = !0;
|
|
4805
4805
|
if (typeof s != "function")
|
|
4806
4806
|
throw new TypeError(G_);
|
|
4807
|
-
t = $h(t) || 0,
|
|
4807
|
+
t = $h(t) || 0, Yt(e) && (h = !!e.leading, g = "maxWait" in e, n = g ? W_($h(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
|
|
4808
4808
|
function T(F) {
|
|
4809
4809
|
var te = r, ze = i;
|
|
4810
4810
|
return r = i = void 0, l = F, o = s.apply(ze, te), o;
|
|
@@ -4868,14 +4868,14 @@ function Y_(s, t, e, r, i, n, o) {
|
|
|
4868
4868
|
}
|
|
4869
4869
|
var h = n ? n(d, c, e + "", s, t, o) : void 0, g = h === void 0;
|
|
4870
4870
|
if (g) {
|
|
4871
|
-
var S =
|
|
4872
|
-
h = c, S || T || E ?
|
|
4871
|
+
var S = It(c), T = !S && ga(c), E = !S && !T && pl(c);
|
|
4872
|
+
h = c, S || T || E ? It(d) ? h = d : K_(d) ? h = tm(d) : T ? (g = !1, h = gm(c, !0)) : E ? (g = !1, h = vm(c, !0)) : h = [] : hE(c) || no(c) ? (h = d, no(d) ? h = z_(d) : (!Yt(d) || Fu(d)) && (h = Tm(c))) : g = !1;
|
|
4873
4873
|
}
|
|
4874
4874
|
g && (o.set(c, h), i(h, c, r, n, o), o.delete(c)), Ql(s, e, h);
|
|
4875
4875
|
}
|
|
4876
4876
|
function bm(s, t, e, r, i) {
|
|
4877
4877
|
s !== t && q_(t, function(n, o) {
|
|
4878
|
-
if (i || (i = new ls()),
|
|
4878
|
+
if (i || (i = new ls()), Yt(n))
|
|
4879
4879
|
Y_(s, t, o, e, bm, r, i);
|
|
4880
4880
|
else {
|
|
4881
4881
|
var d = r ? r(Xl(s, o), n, o + "", s, t, i) : void 0;
|
|
@@ -4893,7 +4893,7 @@ var X_ = "[object Map]", Z_ = "[object Set]", eC = Object.prototype, tC = eC.has
|
|
|
4893
4893
|
function sC(s) {
|
|
4894
4894
|
if (s == null)
|
|
4895
4895
|
return !0;
|
|
4896
|
-
if (vc(s) && (
|
|
4896
|
+
if (vc(s) && (It(s) || typeof s == "string" || typeof s.splice == "function" || ga(s) || pl(s) || no(s)))
|
|
4897
4897
|
return !s.length;
|
|
4898
4898
|
var t = fa(s);
|
|
4899
4899
|
if (t == X_ || t == Z_)
|
|
@@ -6080,7 +6080,7 @@ class va extends tt.EventEmitter {
|
|
|
6080
6080
|
return super.listenerCount(e);
|
|
6081
6081
|
}
|
|
6082
6082
|
}
|
|
6083
|
-
class
|
|
6083
|
+
class Ot extends tt.EventEmitter {
|
|
6084
6084
|
constructor(e) {
|
|
6085
6085
|
super();
|
|
6086
6086
|
p(this, "logger");
|
|
@@ -6151,8 +6151,8 @@ const gp = 1080, mp = 1920, xC = (s, t, e, r, i, n) => {
|
|
|
6151
6151
|
let g = c * h, S = l * h, T, E, _, C, A = 1;
|
|
6152
6152
|
return g < e && (A = e / g), Math.abs(A - 1) < 1e-14 && S < r && (A = r / S), g *= A, S *= A, _ = c / (g / e), C = l / (S / r), T = (c - _) * o, E = (l - C) * d, T < 0 && (T = 0), E < 0 && (E = 0), _ > c && (_ = c), C > l && (C = l), [T, E, _, C, s, t, e, r];
|
|
6153
6153
|
};
|
|
6154
|
-
var
|
|
6155
|
-
const _h = class extends
|
|
6154
|
+
var $t, ei, Qe, Bt, we, es, Ds, rt, Ie, fn, Sn, Os, vn;
|
|
6155
|
+
const _h = class extends Ot {
|
|
6156
6156
|
/**
|
|
6157
6157
|
* @param {Context} context
|
|
6158
6158
|
* @param {Self} self
|
|
@@ -6162,15 +6162,15 @@ const _h = class extends Dt {
|
|
|
6162
6162
|
constructor(e, r, i, n) {
|
|
6163
6163
|
const o = e.getValue("logger");
|
|
6164
6164
|
super(o);
|
|
6165
|
-
m(this,
|
|
6165
|
+
m(this, $t, void 0);
|
|
6166
6166
|
m(this, ei, void 0);
|
|
6167
6167
|
m(this, Qe, void 0);
|
|
6168
|
-
m(this,
|
|
6168
|
+
m(this, Bt, void 0);
|
|
6169
6169
|
m(this, we, {
|
|
6170
6170
|
height: gp,
|
|
6171
6171
|
width: mp
|
|
6172
6172
|
});
|
|
6173
|
-
m(this,
|
|
6173
|
+
m(this, es, {
|
|
6174
6174
|
brand: "#2160FD",
|
|
6175
6175
|
background: "#141414",
|
|
6176
6176
|
text: "#000000",
|
|
@@ -6218,7 +6218,7 @@ const _h = class extends Dt {
|
|
|
6218
6218
|
p(this, "disable", (e = !1) => {
|
|
6219
6219
|
f(this, Os, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, Ds)), e !== !0 && document.body.removeChild(a(this, Qe)), f(this, Ds, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6220
6220
|
});
|
|
6221
|
-
f(this, ei, e), f(this, Os, "idle"), f(this, Ie, r), f(this,
|
|
6221
|
+
f(this, ei, e), f(this, Os, "idle"), f(this, Ie, r), f(this, es, {
|
|
6222
6222
|
brand: r.config.designTokens.colors.brand[500],
|
|
6223
6223
|
background: r.config.designTokens.colors.background[1e3],
|
|
6224
6224
|
text: r.config.designTokens.colors.text,
|
|
@@ -6273,14 +6273,14 @@ const _h = class extends Dt {
|
|
|
6273
6273
|
});
|
|
6274
6274
|
}
|
|
6275
6275
|
createVideoContainer() {
|
|
6276
|
-
f(this, Qe, document.createElement("div")), a(this, Qe).style.width = "0.1px", a(this, Qe).style.height = "0.1px", a(this, Qe).style.overflow = "hidden", a(this, Qe).style.position = "absolute", a(this, Qe).style.bottom = "0", a(this, Qe).style.right = "0", a(this, Qe).style.opacity = "0", a(this, Qe).appendChild(a(this,
|
|
6276
|
+
f(this, Qe, document.createElement("div")), a(this, Qe).style.width = "0.1px", a(this, Qe).style.height = "0.1px", a(this, Qe).style.overflow = "hidden", a(this, Qe).style.position = "absolute", a(this, Qe).style.bottom = "0", a(this, Qe).style.right = "0", a(this, Qe).style.opacity = "0", a(this, Qe).appendChild(a(this, Bt));
|
|
6277
6277
|
}
|
|
6278
6278
|
setupEventListeners() {
|
|
6279
6279
|
a(this, ei).subscribe("stageStatus", this.handlePipMediaControls), a(this, Ie).addListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Ie).addListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Ie).addListener("roomLeft", () => this.disable());
|
|
6280
6280
|
}
|
|
6281
6281
|
createCanvas() {
|
|
6282
6282
|
const e = document.createElement("canvas");
|
|
6283
|
-
e.height = a(this, we).height, e.width = a(this, we).width, f(this,
|
|
6283
|
+
e.height = a(this, we).height, e.width = a(this, we).width, f(this, $t, e);
|
|
6284
6284
|
}
|
|
6285
6285
|
setupMediaSessionEvents() {
|
|
6286
6286
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", () => {
|
|
@@ -6305,10 +6305,10 @@ const _h = class extends Dt {
|
|
|
6305
6305
|
return [...r.pinned, ...r.regular];
|
|
6306
6306
|
}
|
|
6307
6307
|
drawEmptyTile(e, r, i, n) {
|
|
6308
|
-
if (a(this,
|
|
6308
|
+
if (a(this, $t) === void 0)
|
|
6309
6309
|
return;
|
|
6310
|
-
const o = a(this,
|
|
6311
|
-
o.fillStyle = A || D ? a(this,
|
|
6310
|
+
const o = a(this, $t).getContext("2d"), d = a(this, $t).width, c = 0, l = 0, h = r - c * 2, g = i - c * 2, S = Math.floor(d / h), T = Math.floor(e / S), _ = e % S * (h + c) + c, C = T * (g + c) + c, { displayText: A, image: D } = n != null ? n : {};
|
|
6311
|
+
o.fillStyle = A || D ? a(this, es).videoBackground : a(this, es).background, o.strokeStyle = a(this, es).brand, o.beginPath(), o.moveTo(_ + l, C), o.arcTo(_ + h, C, _ + h, C + l, l), o.arcTo(
|
|
6312
6312
|
_ + h,
|
|
6313
6313
|
C + g,
|
|
6314
6314
|
_ + h - l,
|
|
@@ -6316,26 +6316,26 @@ const _h = class extends Dt {
|
|
|
6316
6316
|
l
|
|
6317
6317
|
), o.arcTo(_, C + g, _, C + g - l, l), o.arcTo(_, C, _ + l, C, l), o.closePath(), o.fill(), o.stroke();
|
|
6318
6318
|
const U = h / 6, B = h / 2 + _, H = g / 2 + C;
|
|
6319
|
-
o.save(), (A || D) && (o.beginPath(), o.arc(B, H, U, 0, Math.PI * 2), o.fillStyle = a(this,
|
|
6319
|
+
o.save(), (A || D) && (o.beginPath(), o.arc(B, H, U, 0, Math.PI * 2), o.fillStyle = a(this, es).brand, o.fill(), D ? (o.clip(), o.drawImage(
|
|
6320
6320
|
D,
|
|
6321
6321
|
B - U,
|
|
6322
6322
|
H - U,
|
|
6323
6323
|
U * 2,
|
|
6324
6324
|
U * 2
|
|
6325
|
-
), o.restore()) : A && (o.fillStyle = a(this,
|
|
6325
|
+
), o.restore()) : A && (o.fillStyle = a(this, es).textOnBrand, o.font = `${U / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(A, B, H)), this.drawIcons(n, _, C, Math.max(h, g)));
|
|
6326
6326
|
}
|
|
6327
6327
|
drawIcons(e, r, i, n) {
|
|
6328
6328
|
const o = Math.min(Math.max(n * 0.15, 100), 200), d = o * 0.2, c = o * 0.2;
|
|
6329
6329
|
let l = r + d;
|
|
6330
6330
|
const h = i + d, g = (S) => {
|
|
6331
|
-
const T = a(this,
|
|
6332
|
-
T.save(), T.fillStyle = a(this,
|
|
6331
|
+
const T = a(this, $t).getContext("2d");
|
|
6332
|
+
T.save(), T.fillStyle = a(this, es).background, T.beginPath(), T.moveTo(l + c, h), T.arcTo(l + o, h, l + o, h + c, c), T.arcTo(
|
|
6333
6333
|
l + o,
|
|
6334
6334
|
h + o,
|
|
6335
6335
|
l + o - c,
|
|
6336
6336
|
h + o,
|
|
6337
6337
|
c
|
|
6338
|
-
), T.arcTo(l, h + o, l, h + o - c, c), T.arcTo(l, h, l + c, h, c), T.closePath(), T.fill(), typeof S == "string" ? (T.font = `${o / 1.5}px sans-serif`, T.fillStyle = a(this,
|
|
6338
|
+
), T.arcTo(l, h + o, l, h + o - c, c), T.arcTo(l, h, l + c, h, c), T.closePath(), T.fill(), typeof S == "string" ? (T.font = `${o / 1.5}px sans-serif`, T.fillStyle = a(this, es).text, T.textAlign = "center", T.textBaseline = "top", T.fillText(S, o / 2 + l, h + d)) : T.drawImage(
|
|
6339
6339
|
S,
|
|
6340
6340
|
l + d,
|
|
6341
6341
|
h + d,
|
|
@@ -6347,9 +6347,9 @@ const _h = class extends Dt {
|
|
|
6347
6347
|
}
|
|
6348
6348
|
drawTile(e, r, i) {
|
|
6349
6349
|
var l, h;
|
|
6350
|
-
if (a(this,
|
|
6350
|
+
if (a(this, $t) === void 0)
|
|
6351
6351
|
return;
|
|
6352
|
-
const n = a(this,
|
|
6352
|
+
const n = a(this, $t).getContext("2d"), o = this.getSources();
|
|
6353
6353
|
let d = 0, c = 0;
|
|
6354
6354
|
for (; d < a(this, we).height - 5; ) {
|
|
6355
6355
|
let g = 0;
|
|
@@ -6411,7 +6411,7 @@ const _h = class extends Dt {
|
|
|
6411
6411
|
document.body.removeChild(a(this, Qe));
|
|
6412
6412
|
} catch (e) {
|
|
6413
6413
|
}
|
|
6414
|
-
this.removeAllSources(), f(this,
|
|
6414
|
+
this.removeAllSources(), f(this, $t, void 0), f(this, Bt, void 0), f(this, Ds, void 0);
|
|
6415
6415
|
}
|
|
6416
6416
|
/**
|
|
6417
6417
|
* Initialize PiP and prepare sources
|
|
@@ -6429,9 +6429,9 @@ const _h = class extends Dt {
|
|
|
6429
6429
|
f(this, we, {
|
|
6430
6430
|
height: e != null ? e : gp,
|
|
6431
6431
|
width: r != null ? r : mp
|
|
6432
|
-
}), i.height = a(this, we).height, i.width = a(this, we).width, i.autoplay = !0, i.muted = !0, i.srcObject = a(this,
|
|
6432
|
+
}), i.height = a(this, we).height, i.width = a(this, we).width, i.autoplay = !0, i.muted = !0, i.srcObject = a(this, $t).captureStream(24), f(this, Bt, i), a(this, Bt).onloadedmetadata = () => {
|
|
6433
6433
|
try {
|
|
6434
|
-
this.emit("pipStarted"), a(this,
|
|
6434
|
+
this.emit("pipStarted"), a(this, Bt).onleavepictureinpicture = () => {
|
|
6435
6435
|
this.emit("pipEnded");
|
|
6436
6436
|
};
|
|
6437
6437
|
} catch (n) {
|
|
@@ -6533,17 +6533,17 @@ const _h = class extends Dt {
|
|
|
6533
6533
|
* Enable PiP
|
|
6534
6534
|
*/
|
|
6535
6535
|
enable() {
|
|
6536
|
-
f(this, Os, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, Ie).videoEnabled), this.updateMediaSession("MIC", a(this, Ie).audioEnabled), document.body.appendChild(a(this, Qe)), f(this, Ds, requestAnimationFrame(() => this.animate())), a(this,
|
|
6537
|
-
a(this,
|
|
6536
|
+
f(this, Os, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, Ie).videoEnabled), this.updateMediaSession("MIC", a(this, Ie).audioEnabled), document.body.appendChild(a(this, Qe)), f(this, Ds, requestAnimationFrame(() => this.animate())), a(this, Bt).onloadedmetadata = () => {
|
|
6537
|
+
a(this, Bt).requestPictureInPicture().then(() => {
|
|
6538
6538
|
f(this, Os, "active");
|
|
6539
6539
|
});
|
|
6540
|
-
}, a(this,
|
|
6540
|
+
}, a(this, Bt).readyState === 4 && a(this, Bt).requestPictureInPicture().then(() => {
|
|
6541
6541
|
f(this, Os, "active");
|
|
6542
6542
|
});
|
|
6543
6543
|
}
|
|
6544
6544
|
};
|
|
6545
6545
|
let Zl = _h;
|
|
6546
|
-
|
|
6546
|
+
$t = new WeakMap(), ei = new WeakMap(), Qe = new WeakMap(), Bt = new WeakMap(), we = new WeakMap(), es = new WeakMap(), Ds = new WeakMap(), rt = new WeakMap(), Ie = new WeakMap(), fn = new WeakMap(), Sn = new WeakMap(), Os = new WeakMap(), vn = new WeakMap();
|
|
6547
6547
|
var er;
|
|
6548
6548
|
(function(s) {
|
|
6549
6549
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -11694,12 +11694,12 @@ var $I = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, Fr = (s, t
|
|
|
11694
11694
|
for (var i = r > 1 ? void 0 : r ? BI(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
11695
11695
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11696
11696
|
return r && i && $I(t, e, i), i;
|
|
11697
|
-
},
|
|
11697
|
+
}, zt = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(zt || {}), Ct, Tn;
|
|
11698
11698
|
class ir {
|
|
11699
11699
|
constructor(t, e) {
|
|
11700
|
-
m(this,
|
|
11700
|
+
m(this, Ct, void 0);
|
|
11701
11701
|
m(this, Tn, void 0);
|
|
11702
|
-
f(this,
|
|
11702
|
+
f(this, Ct, e), f(this, Tn, t);
|
|
11703
11703
|
}
|
|
11704
11704
|
/**
|
|
11705
11705
|
* @access private
|
|
@@ -11716,7 +11716,7 @@ class ir {
|
|
|
11716
11716
|
return a(this, Tn).getValue("logger");
|
|
11717
11717
|
}
|
|
11718
11718
|
getChatMessages() {
|
|
11719
|
-
return a(this,
|
|
11719
|
+
return a(this, Ct).sendMessagePromise(je.getMessages);
|
|
11720
11720
|
}
|
|
11721
11721
|
getChatMessagesPaginated(t, e, r, i) {
|
|
11722
11722
|
return u(this, null, function* () {
|
|
@@ -11726,7 +11726,7 @@ class ir {
|
|
|
11726
11726
|
from: 0,
|
|
11727
11727
|
// NOTE(ikabra): We do not need offset for timeStamp based pagination.
|
|
11728
11728
|
reversed: r
|
|
11729
|
-
}, i && { filters: { filters: i } }), o = yield a(this,
|
|
11729
|
+
}, i && { filters: { filters: i } }), o = yield a(this, Ct).sendMessagePromise(
|
|
11730
11730
|
je.getPaginatedMessages,
|
|
11731
11731
|
zk.toBinary(n)
|
|
11732
11732
|
);
|
|
@@ -11743,7 +11743,7 @@ class ir {
|
|
|
11743
11743
|
payloadType: e,
|
|
11744
11744
|
payload: t
|
|
11745
11745
|
};
|
|
11746
|
-
a(this,
|
|
11746
|
+
a(this, Ct).sendMessage(
|
|
11747
11747
|
je.sendMessageToRoom,
|
|
11748
11748
|
eA.toBinary(r)
|
|
11749
11749
|
);
|
|
@@ -11754,7 +11754,7 @@ class ir {
|
|
|
11754
11754
|
peerIds: r,
|
|
11755
11755
|
payload: t
|
|
11756
11756
|
};
|
|
11757
|
-
a(this,
|
|
11757
|
+
a(this, Ct).sendMessage(
|
|
11758
11758
|
je.sendMessageToPeers,
|
|
11759
11759
|
rA.toBinary(i)
|
|
11760
11760
|
);
|
|
@@ -11774,7 +11774,7 @@ class ir {
|
|
|
11774
11774
|
payload: e
|
|
11775
11775
|
};
|
|
11776
11776
|
i !== void 0 && (n.pinned = i);
|
|
11777
|
-
const o = yield a(this,
|
|
11777
|
+
const o = yield a(this, Ct).sendMessagePromise(
|
|
11778
11778
|
je.editMessage,
|
|
11779
11779
|
cA.toBinary(n)
|
|
11780
11780
|
);
|
|
@@ -11785,7 +11785,7 @@ class ir {
|
|
|
11785
11785
|
return u(this, null, function* () {
|
|
11786
11786
|
const e = {
|
|
11787
11787
|
chatId: t
|
|
11788
|
-
}, r = yield a(this,
|
|
11788
|
+
}, r = yield a(this, Ct).sendMessagePromise(
|
|
11789
11789
|
je.deleteMessage,
|
|
11790
11790
|
gA.toBinary(e)
|
|
11791
11791
|
);
|
|
@@ -11803,7 +11803,7 @@ class ir {
|
|
|
11803
11803
|
reversed: (d = e.reversed) != null ? d : !0
|
|
11804
11804
|
};
|
|
11805
11805
|
try {
|
|
11806
|
-
const c = yield a(this,
|
|
11806
|
+
const c = yield a(this, Ct).sendMessagePromise(
|
|
11807
11807
|
je.searchChannelMessages,
|
|
11808
11808
|
SA.toBinary(r)
|
|
11809
11809
|
);
|
|
@@ -11818,7 +11818,7 @@ class ir {
|
|
|
11818
11818
|
const r = {
|
|
11819
11819
|
chatId: t,
|
|
11820
11820
|
pinned: e
|
|
11821
|
-
}, i = yield a(this,
|
|
11821
|
+
}, i = yield a(this, Ct).sendMessagePromise(
|
|
11822
11822
|
je.pinMessage,
|
|
11823
11823
|
lA.toBinary(r)
|
|
11824
11824
|
);
|
|
@@ -11863,7 +11863,7 @@ class ir {
|
|
|
11863
11863
|
this.logger.warn(`ChatSocketHandler::Event ${t} is not recognized`);
|
|
11864
11864
|
return;
|
|
11865
11865
|
}
|
|
11866
|
-
a(this,
|
|
11866
|
+
a(this, Ct).on(t, ({ payload: n }) => {
|
|
11867
11867
|
let o = i;
|
|
11868
11868
|
try {
|
|
11869
11869
|
o = r(n);
|
|
@@ -11876,7 +11876,7 @@ class ir {
|
|
|
11876
11876
|
});
|
|
11877
11877
|
}
|
|
11878
11878
|
}
|
|
11879
|
-
|
|
11879
|
+
Ct = new WeakMap(), Tn = new WeakMap();
|
|
11880
11880
|
Fr([
|
|
11881
11881
|
P.trace("SocketService.getChatMessages")
|
|
11882
11882
|
], ir.prototype, "getChatMessages", 1);
|
|
@@ -12334,14 +12334,14 @@ let cu;
|
|
|
12334
12334
|
function zI(s, t) {
|
|
12335
12335
|
return cu = new Rs(s, t), cu;
|
|
12336
12336
|
}
|
|
12337
|
-
function
|
|
12337
|
+
function Tt() {
|
|
12338
12338
|
return cu;
|
|
12339
12339
|
}
|
|
12340
12340
|
const Ta = {
|
|
12341
12341
|
maxInvocations: 5,
|
|
12342
12342
|
period: 1
|
|
12343
12343
|
};
|
|
12344
|
-
function
|
|
12344
|
+
function Nt(s, t) {
|
|
12345
12345
|
return function(e, r, i) {
|
|
12346
12346
|
const n = i.value;
|
|
12347
12347
|
let o = 0, d = Date.now();
|
|
@@ -12360,7 +12360,7 @@ var YI = Object.defineProperty, QI = Object.getOwnPropertyDescriptor, ps = (s, t
|
|
|
12360
12360
|
};
|
|
12361
12361
|
const XI = ["text", "image", "file", "custom", "poll"], qc = { maxInvocations: 180, period: 60 };
|
|
12362
12362
|
var ee, ti, xe, yn, gd, Xm, po, du, Xp;
|
|
12363
|
-
let
|
|
12363
|
+
let Mt = (Xp = class extends Ot {
|
|
12364
12364
|
/**
|
|
12365
12365
|
* @param {Context} context
|
|
12366
12366
|
* @param {ChatSocketHandler} chatSocketHandler
|
|
@@ -12451,7 +12451,7 @@ let It = (Xp = class extends Dt {
|
|
|
12451
12451
|
let r = [];
|
|
12452
12452
|
e && e.length > 0 && (e.push(a(this, ee).id), r = a(this, ti).joined.toArray().filter((h) => e.includes(h.id)).map((h) => h.userId), r.push(a(this, ee).userId)), a(this, xe).sendMessage(
|
|
12453
12453
|
t,
|
|
12454
|
-
|
|
12454
|
+
zt.TEXT,
|
|
12455
12455
|
e
|
|
12456
12456
|
);
|
|
12457
12457
|
});
|
|
@@ -12481,12 +12481,12 @@ let It = (Xp = class extends Dt {
|
|
|
12481
12481
|
return;
|
|
12482
12482
|
}
|
|
12483
12483
|
try {
|
|
12484
|
-
const h =
|
|
12484
|
+
const h = Tt(), { getLocation: g, putLocation: S } = yield h.getPresignedUrls(t.name);
|
|
12485
12485
|
yield h.uploadFile(t, S);
|
|
12486
12486
|
let T = [];
|
|
12487
12487
|
e && e.length > 0 && (e.push(a(this, ee).id), T = a(this, ti).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), T.push(a(this, ee).userId)), a(this, xe).sendMessage(
|
|
12488
12488
|
g,
|
|
12489
|
-
|
|
12489
|
+
zt.IMAGE,
|
|
12490
12490
|
e
|
|
12491
12491
|
);
|
|
12492
12492
|
} catch (h) {
|
|
@@ -12515,7 +12515,7 @@ let It = (Xp = class extends Dt {
|
|
|
12515
12515
|
return;
|
|
12516
12516
|
}
|
|
12517
12517
|
try {
|
|
12518
|
-
const l =
|
|
12518
|
+
const l = Tt(), { getLocation: h, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12519
12519
|
yield l.uploadFile(t, g);
|
|
12520
12520
|
let S = [];
|
|
12521
12521
|
e && e.length > 0 && (e.push(a(this, ee).id), S = a(this, ti).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), S.push(a(this, ee).userId));
|
|
@@ -12526,7 +12526,7 @@ let It = (Xp = class extends Dt {
|
|
|
12526
12526
|
});
|
|
12527
12527
|
a(this, xe).sendMessage(
|
|
12528
12528
|
T,
|
|
12529
|
-
|
|
12529
|
+
zt.FILE,
|
|
12530
12530
|
e
|
|
12531
12531
|
);
|
|
12532
12532
|
} catch (l) {
|
|
@@ -12571,7 +12571,7 @@ let It = (Xp = class extends Dt {
|
|
|
12571
12571
|
try {
|
|
12572
12572
|
if (typeof B == "string")
|
|
12573
12573
|
return { link: B };
|
|
12574
|
-
const H =
|
|
12574
|
+
const H = Tt(), { getLocation: F, putLocation: te } = yield H.getPresignedUrls(B.name);
|
|
12575
12575
|
return yield H.uploadFile(B, te), {
|
|
12576
12576
|
link: F,
|
|
12577
12577
|
type: B.type,
|
|
@@ -12594,7 +12594,7 @@ let It = (Xp = class extends Dt {
|
|
|
12594
12594
|
});
|
|
12595
12595
|
a(this, xe).sendMessage(
|
|
12596
12596
|
JSON.stringify(i),
|
|
12597
|
-
|
|
12597
|
+
zt.CUSTOM,
|
|
12598
12598
|
e
|
|
12599
12599
|
);
|
|
12600
12600
|
});
|
|
@@ -12628,7 +12628,7 @@ let It = (Xp = class extends Dt {
|
|
|
12628
12628
|
a(this, xe).editMessage(
|
|
12629
12629
|
t,
|
|
12630
12630
|
e,
|
|
12631
|
-
|
|
12631
|
+
zt.TEXT
|
|
12632
12632
|
);
|
|
12633
12633
|
});
|
|
12634
12634
|
}
|
|
@@ -12650,11 +12650,11 @@ let It = (Xp = class extends Dt {
|
|
|
12650
12650
|
return;
|
|
12651
12651
|
}
|
|
12652
12652
|
try {
|
|
12653
|
-
const c =
|
|
12653
|
+
const c = Tt(), { getLocation: l, putLocation: h } = yield c.getPresignedUrls(e.name);
|
|
12654
12654
|
yield c.uploadFile(e, h), a(this, xe).editMessage(
|
|
12655
12655
|
t,
|
|
12656
12656
|
l,
|
|
12657
|
-
|
|
12657
|
+
zt.IMAGE
|
|
12658
12658
|
);
|
|
12659
12659
|
} catch (c) {
|
|
12660
12660
|
throw new k("Error editing image message.", "0500", this.logger);
|
|
@@ -12673,7 +12673,7 @@ let It = (Xp = class extends Dt {
|
|
|
12673
12673
|
return;
|
|
12674
12674
|
}
|
|
12675
12675
|
try {
|
|
12676
|
-
const d =
|
|
12676
|
+
const d = Tt(), { getLocation: c, putLocation: l } = yield d.getPresignedUrls(e.name);
|
|
12677
12677
|
yield d.uploadFile(e, l), a(this, xe).editMessage(
|
|
12678
12678
|
t,
|
|
12679
12679
|
JSON.stringify({
|
|
@@ -12681,7 +12681,7 @@ let It = (Xp = class extends Dt {
|
|
|
12681
12681
|
name: e.name,
|
|
12682
12682
|
size: "size" in e ? e.size : 0
|
|
12683
12683
|
}),
|
|
12684
|
-
|
|
12684
|
+
zt.FILE
|
|
12685
12685
|
);
|
|
12686
12686
|
} catch (d) {
|
|
12687
12687
|
throw new k("Error editing file message.", "0500", this.logger);
|
|
@@ -12864,41 +12864,41 @@ let It = (Xp = class extends Dt {
|
|
|
12864
12864
|
}, Xp);
|
|
12865
12865
|
ps([
|
|
12866
12866
|
P.trace("Chat.sendTextMessage"),
|
|
12867
|
-
|
|
12868
|
-
],
|
|
12867
|
+
Nt(qc)
|
|
12868
|
+
], Mt.prototype, "sendTextMessage", 1);
|
|
12869
12869
|
ps([
|
|
12870
12870
|
P.trace("Chat.sendImageMessage"),
|
|
12871
|
-
|
|
12872
|
-
],
|
|
12871
|
+
Nt({ maxInvocations: 20, period: 60 })
|
|
12872
|
+
], Mt.prototype, "sendImageMessage", 1);
|
|
12873
12873
|
ps([
|
|
12874
12874
|
P.trace("Chat.sendFileMessage"),
|
|
12875
|
-
|
|
12876
|
-
],
|
|
12875
|
+
Nt({ maxInvocations: 20, period: 60 })
|
|
12876
|
+
], Mt.prototype, "sendFileMessage", 1);
|
|
12877
12877
|
ps([
|
|
12878
12878
|
P.trace("Chat.sendMessage"),
|
|
12879
|
-
|
|
12880
|
-
],
|
|
12879
|
+
Nt({ maxInvocations: 180, period: 60 })
|
|
12880
|
+
], Mt.prototype, "sendMessage", 1);
|
|
12881
12881
|
ps([
|
|
12882
12882
|
P.trace("Chat.editTextMessage")
|
|
12883
|
-
],
|
|
12883
|
+
], Mt.prototype, "editTextMessage", 1);
|
|
12884
12884
|
ps([
|
|
12885
12885
|
P.trace("Chat.editImageMessage")
|
|
12886
|
-
],
|
|
12886
|
+
], Mt.prototype, "editImageMessage", 1);
|
|
12887
12887
|
ps([
|
|
12888
12888
|
P.trace("Chat.editFileMessage")
|
|
12889
|
-
],
|
|
12889
|
+
], Mt.prototype, "editFileMessage", 1);
|
|
12890
12890
|
ps([
|
|
12891
12891
|
P.trace("Chat.editMessage")
|
|
12892
|
-
],
|
|
12892
|
+
], Mt.prototype, "editMessage", 1);
|
|
12893
12893
|
ps([
|
|
12894
12894
|
P.trace("Chat.deleteMessage")
|
|
12895
|
-
],
|
|
12895
|
+
], Mt.prototype, "deleteMessage", 1);
|
|
12896
12896
|
ps([
|
|
12897
12897
|
P.trace("Chat.searchMessages")
|
|
12898
|
-
],
|
|
12899
|
-
|
|
12898
|
+
], Mt.prototype, "searchMessages", 1);
|
|
12899
|
+
Mt = ps([
|
|
12900
12900
|
st("0500")
|
|
12901
|
-
],
|
|
12901
|
+
], Mt);
|
|
12902
12902
|
var ZI = Object.defineProperty, e0 = Object.getOwnPropertyDescriptor, t0 = (s, t, e, r) => {
|
|
12903
12903
|
for (var i = r > 1 ? void 0 : r ? e0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
12904
12904
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -12910,7 +12910,7 @@ const lr = (Zp = class {
|
|
|
12910
12910
|
p(this, "chatSocketHandler");
|
|
12911
12911
|
p(this, "self");
|
|
12912
12912
|
m(this, si, void 0);
|
|
12913
|
-
f(this, si, s), this.chatSocketHandler = t, this.chat = new
|
|
12913
|
+
f(this, si, s), this.chatSocketHandler = t, this.chat = new Mt(
|
|
12914
12914
|
s,
|
|
12915
12915
|
t,
|
|
12916
12916
|
e,
|
|
@@ -12973,20 +12973,20 @@ const lr = (Zp = class {
|
|
|
12973
12973
|
pinned: s.pinned
|
|
12974
12974
|
};
|
|
12975
12975
|
switch (e.type) {
|
|
12976
|
-
case
|
|
12976
|
+
case zt.TEXT: {
|
|
12977
12977
|
e.message = s.payload;
|
|
12978
12978
|
break;
|
|
12979
12979
|
}
|
|
12980
|
-
case
|
|
12980
|
+
case zt.IMAGE: {
|
|
12981
12981
|
e.link = s.payload;
|
|
12982
12982
|
break;
|
|
12983
12983
|
}
|
|
12984
|
-
case
|
|
12984
|
+
case zt.FILE: {
|
|
12985
12985
|
const { link: r, name: i, size: n } = JSON.parse(s.payload);
|
|
12986
12986
|
e.link = r, e.name = i, e.size = n;
|
|
12987
12987
|
break;
|
|
12988
12988
|
}
|
|
12989
|
-
case
|
|
12989
|
+
case zt.CUSTOM: {
|
|
12990
12990
|
const {
|
|
12991
12991
|
html: r,
|
|
12992
12992
|
images: i,
|
|
@@ -13102,7 +13102,7 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, i0 = (s, t
|
|
|
13102
13102
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13103
13103
|
return r && i && s0(t, e, i), i;
|
|
13104
13104
|
}, md, Zm, fd, ef, En, Pn, go, eg;
|
|
13105
|
-
let lu = (eg = class extends
|
|
13105
|
+
let lu = (eg = class extends Ot {
|
|
13106
13106
|
constructor(t, e, r) {
|
|
13107
13107
|
const i = t.getValue("logger");
|
|
13108
13108
|
super(i);
|
|
@@ -13301,7 +13301,7 @@ var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor, l0 = (s, t
|
|
|
13301
13301
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13302
13302
|
return r && i && c0(t, e, i), i;
|
|
13303
13303
|
}, sf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(sf || {}), Cn, mo, hu, ii, fo, sg;
|
|
13304
|
-
let uu = (sg = class extends
|
|
13304
|
+
let uu = (sg = class extends Ot {
|
|
13305
13305
|
/**
|
|
13306
13306
|
* @param {Context} context
|
|
13307
13307
|
* @param {Self} self
|
|
@@ -13406,7 +13406,7 @@ var h0 = Object.defineProperty, p0 = Object.getOwnPropertyDescriptor, rf = (s, t
|
|
|
13406
13406
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13407
13407
|
return r && i && h0(t, e, i), i;
|
|
13408
13408
|
}, So, rg;
|
|
13409
|
-
let $r = (rg = class extends
|
|
13409
|
+
let $r = (rg = class extends Ot {
|
|
13410
13410
|
constructor(t) {
|
|
13411
13411
|
const e = t.getValue("logger");
|
|
13412
13412
|
super(e);
|
|
@@ -13470,7 +13470,7 @@ let $r = (rg = class extends Dt {
|
|
|
13470
13470
|
getActiveTranscript() {
|
|
13471
13471
|
return u(this, null, function* () {
|
|
13472
13472
|
try {
|
|
13473
|
-
const t =
|
|
13473
|
+
const t = Tt(), { transcript: e } = yield t.getActiveTranscript();
|
|
13474
13474
|
this.transcripts = $r.parseTranscripts(e);
|
|
13475
13475
|
} catch (t) {
|
|
13476
13476
|
}
|
|
@@ -13502,7 +13502,7 @@ var g0 = Object.defineProperty, m0 = Object.getOwnPropertyDescriptor, f0 = (s, t
|
|
|
13502
13502
|
for (var i = r > 1 ? void 0 : r ? m0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
13503
13503
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13504
13504
|
return r && i && g0(t, e, i), i;
|
|
13505
|
-
}, Sr, wn,
|
|
13505
|
+
}, Sr, wn, wt, ig;
|
|
13506
13506
|
const nf = (ig = class {
|
|
13507
13507
|
constructor(s, t, e, r, i, n) {
|
|
13508
13508
|
p(this, "meta");
|
|
@@ -13510,8 +13510,8 @@ const nf = (ig = class {
|
|
|
13510
13510
|
m(this, Sr, void 0);
|
|
13511
13511
|
m(this, wn, void 0);
|
|
13512
13512
|
p(this, "aiSocketHandler");
|
|
13513
|
-
m(this,
|
|
13514
|
-
f(this,
|
|
13513
|
+
m(this, wt, void 0);
|
|
13514
|
+
f(this, wt, s), this.meta = new uu(
|
|
13515
13515
|
s,
|
|
13516
13516
|
t,
|
|
13517
13517
|
t.config.viewType,
|
|
@@ -13524,14 +13524,14 @@ const nf = (ig = class {
|
|
|
13524
13524
|
* Not for external use
|
|
13525
13525
|
*/
|
|
13526
13526
|
get telemetry() {
|
|
13527
|
-
return a(this,
|
|
13527
|
+
return a(this, wt).getValue("telemetry");
|
|
13528
13528
|
}
|
|
13529
13529
|
/**
|
|
13530
13530
|
* @access private
|
|
13531
13531
|
* Not for external use
|
|
13532
13532
|
*/
|
|
13533
13533
|
get logger() {
|
|
13534
|
-
return a(this,
|
|
13534
|
+
return a(this, wt).getValue("logger");
|
|
13535
13535
|
}
|
|
13536
13536
|
/**
|
|
13537
13537
|
*
|
|
@@ -13560,17 +13560,17 @@ const nf = (ig = class {
|
|
|
13560
13560
|
));
|
|
13561
13561
|
}
|
|
13562
13562
|
setupEvents() {
|
|
13563
|
-
a(this,
|
|
13563
|
+
a(this, wt).getValue("peerSessionStore").on(
|
|
13564
13564
|
R.TRANSPORT_STATE_UPDATE,
|
|
13565
13565
|
(s) => {
|
|
13566
13566
|
this.meta.emit("mediaConnectionUpdate", s);
|
|
13567
13567
|
}
|
|
13568
|
-
), a(this,
|
|
13568
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13569
13569
|
R.SOCKET_STATE_UPDATE,
|
|
13570
13570
|
(s) => {
|
|
13571
13571
|
this.meta.emit("socketConnectionUpdate", s);
|
|
13572
13572
|
}
|
|
13573
|
-
), a(this,
|
|
13573
|
+
), a(this, wt).getValue("peerSessionStore").on(R.ROOM_STATE, ({ createdAt: s, roomUuid: t }) => {
|
|
13574
13574
|
const e = this.meta.meetingStartedTimestamp;
|
|
13575
13575
|
if (t && (this.meta.sessionId = t), s && !e) {
|
|
13576
13576
|
const r = new Date(s * 1e3);
|
|
@@ -13578,7 +13578,7 @@ const nf = (ig = class {
|
|
|
13578
13578
|
meetingStartedTimestamp: this.meta.meetingStartedTimestamp
|
|
13579
13579
|
});
|
|
13580
13580
|
}
|
|
13581
|
-
}), a(this,
|
|
13581
|
+
}), a(this, wt).getValue("peerSessionStore").on(
|
|
13582
13582
|
R.PRODUCER_SCORE_UPDATE,
|
|
13583
13583
|
({ score: s }) => {
|
|
13584
13584
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
@@ -13586,7 +13586,7 @@ const nf = (ig = class {
|
|
|
13586
13586
|
), a(this, Sr).permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this, wn).broadcastMessage("spotlight", {
|
|
13587
13587
|
userId: a(this, Sr).userId,
|
|
13588
13588
|
currentTab: this.meta.selfActiveTab
|
|
13589
|
-
})), a(this,
|
|
13589
|
+
})), a(this, wt).getValue("peerSessionStore").on(
|
|
13590
13590
|
R.PEER_JOINED_INTERNAL,
|
|
13591
13591
|
(s) => u(this, null, function* () {
|
|
13592
13592
|
a(this, Sr).permissions.canSpotlight && this.meta.selfActiveTab && a(this, wn).broadcastToPeers("spotlight", [s.id], {
|
|
@@ -13594,7 +13594,7 @@ const nf = (ig = class {
|
|
|
13594
13594
|
currentTab: this.meta.selfActiveTab
|
|
13595
13595
|
});
|
|
13596
13596
|
})
|
|
13597
|
-
), a(this,
|
|
13597
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13598
13598
|
R.ROOM_MESSAGE,
|
|
13599
13599
|
(s) => {
|
|
13600
13600
|
var e, r;
|
|
@@ -13619,7 +13619,7 @@ const nf = (ig = class {
|
|
|
13619
13619
|
}
|
|
13620
13620
|
}), this.conditionallySetActiveTab(t);
|
|
13621
13621
|
}
|
|
13622
|
-
), a(this,
|
|
13622
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13623
13623
|
R.MESSAGE,
|
|
13624
13624
|
(s) => {
|
|
13625
13625
|
var e, r;
|
|
@@ -13665,7 +13665,7 @@ const nf = (ig = class {
|
|
|
13665
13665
|
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${d}`);
|
|
13666
13666
|
});
|
|
13667
13667
|
}
|
|
13668
|
-
}, Sr = new WeakMap(), wn = new WeakMap(),
|
|
13668
|
+
}, Sr = new WeakMap(), wn = new WeakMap(), wt = new WeakMap(), ig);
|
|
13669
13669
|
let af = nf;
|
|
13670
13670
|
f0([
|
|
13671
13671
|
P.trace("MetaController.setupEvents")
|
|
@@ -13732,8 +13732,8 @@ var S0 = Object.defineProperty, v0 = Object.getOwnPropertyDescriptor, Ki = (s, t
|
|
|
13732
13732
|
for (var i = r > 1 ? void 0 : r ? v0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
13733
13733
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13734
13734
|
return r && i && S0(t, e, i), i;
|
|
13735
|
-
},
|
|
13736
|
-
class qr extends
|
|
13735
|
+
}, Ht, Sd, se, vo, fs, Ue, To, pu, Rn, jc;
|
|
13736
|
+
class qr extends Ot {
|
|
13737
13737
|
/**
|
|
13738
13738
|
* @param {Context} context
|
|
13739
13739
|
* @param {Self} self
|
|
@@ -13750,13 +13750,13 @@ class qr extends Dt {
|
|
|
13750
13750
|
* @param {StageStatus} status
|
|
13751
13751
|
*/
|
|
13752
13752
|
m(this, Rn);
|
|
13753
|
-
m(this,
|
|
13753
|
+
m(this, Ht, void 0);
|
|
13754
13754
|
m(this, Sd, void 0);
|
|
13755
13755
|
m(this, se, void 0);
|
|
13756
13756
|
m(this, vo, void 0);
|
|
13757
13757
|
m(this, fs, void 0);
|
|
13758
13758
|
m(this, Ue, void 0);
|
|
13759
|
-
f(this, Ue, e), f(this,
|
|
13759
|
+
f(this, Ue, e), f(this, Ht, n), f(this, Sd, o), f(this, se, r), f(this, vo, i), f(this, fs, []), this.setupEvents();
|
|
13760
13760
|
}
|
|
13761
13761
|
/**
|
|
13762
13762
|
* @access private
|
|
@@ -13801,7 +13801,7 @@ class qr extends Dt {
|
|
|
13801
13801
|
};
|
|
13802
13802
|
a(this, se).permissions.on("permissionsUpdate", (n) => {
|
|
13803
13803
|
const { canAcceptProductionRequests: o } = n;
|
|
13804
|
-
o !== void 0 && (a(this, se).permissions.acceptStageRequests ? (r(), a(this,
|
|
13804
|
+
o !== void 0 && (a(this, se).permissions.acceptStageRequests ? (r(), a(this, Ht).getStageRequests()) : (i(), f(this, fs, []), this.emit("stageAccessRequestUpdate", a(this, fs))));
|
|
13805
13805
|
}), a(this, se).permissions.acceptStageRequests && r();
|
|
13806
13806
|
}
|
|
13807
13807
|
getAccessRequests() {
|
|
@@ -13831,14 +13831,14 @@ class qr extends Dt {
|
|
|
13831
13831
|
V(this, Rn, jc).call(this, "ACCEPTED_TO_JOIN_STAGE");
|
|
13832
13832
|
return;
|
|
13833
13833
|
}
|
|
13834
|
-
a(this,
|
|
13834
|
+
a(this, Ht).requestAccess(), V(this, Rn, jc).call(this, "REQUESTED_TO_JOIN_STAGE");
|
|
13835
13835
|
});
|
|
13836
13836
|
}
|
|
13837
13837
|
cancelRequestAccess() {
|
|
13838
13838
|
return u(this, null, function* () {
|
|
13839
13839
|
if (!a(this, se).permissions.stageEnabled)
|
|
13840
13840
|
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
13841
|
-
a(this,
|
|
13841
|
+
a(this, Ht).cancelRequestAccess(), V(this, Rn, jc).call(this, "OFF_STAGE");
|
|
13842
13842
|
});
|
|
13843
13843
|
}
|
|
13844
13844
|
/**
|
|
@@ -13853,7 +13853,7 @@ class qr extends Dt {
|
|
|
13853
13853
|
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
13854
13854
|
if (!a(this, se).permissions.acceptStageRequests)
|
|
13855
13855
|
throw this.logger.error("Stage::grant_access::permission_denied"), new k("You do not have permission to perform this action", "2001");
|
|
13856
|
-
return a(this,
|
|
13856
|
+
return a(this, Ht).grantAccess(e);
|
|
13857
13857
|
}
|
|
13858
13858
|
/**
|
|
13859
13859
|
* @param {string[]} userIds
|
|
@@ -13868,7 +13868,7 @@ class qr extends Dt {
|
|
|
13868
13868
|
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
13869
13869
|
if (!a(this, se).permissions.acceptStageRequests)
|
|
13870
13870
|
throw this.logger.error("Stage::deny_access::permission_denied"), new k("You do not have permission to perform this action", "2001");
|
|
13871
|
-
return a(this,
|
|
13871
|
+
return a(this, Ht).denyAccess(e);
|
|
13872
13872
|
}
|
|
13873
13873
|
/**
|
|
13874
13874
|
* Returns the peerId of the current user
|
|
@@ -13883,7 +13883,7 @@ class qr extends Dt {
|
|
|
13883
13883
|
throw new k("You are already on stage.", "2006");
|
|
13884
13884
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || a(this, se).permissions.stageAccess === j.NotAllowed)
|
|
13885
13885
|
throw new k(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
13886
|
-
if (a(this, Ue).setValue("stageStatus", "ON_STAGE", !1), yield a(this,
|
|
13886
|
+
if (a(this, Ue).setValue("stageStatus", "ON_STAGE", !1), yield a(this, Ht).joinStage(), e === Qs.Livestream) {
|
|
13887
13887
|
yield a(this, Ue).getValue("selfController").joinRoom();
|
|
13888
13888
|
return;
|
|
13889
13889
|
}
|
|
@@ -13896,7 +13896,7 @@ class qr extends Dt {
|
|
|
13896
13896
|
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
13897
13897
|
if (!(this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE"))
|
|
13898
13898
|
throw new k(`Unable to leave stage you are currently ${this.status}`, "2006");
|
|
13899
|
-
a(this, se).setIsPinned(!1), a(this, Ue).setValue("stageStatus", "OFF_STAGE", !1), yield a(this,
|
|
13899
|
+
a(this, se).setIsPinned(!1), a(this, Ue).setValue("stageStatus", "OFF_STAGE", !1), yield a(this, Ht).leaveStage(a(this, se).userId);
|
|
13900
13900
|
try {
|
|
13901
13901
|
yield a(this, Ue).getValue("peerSessionStore").emitAsync(R.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
13902
13902
|
} catch (e) {
|
|
@@ -13922,11 +13922,11 @@ class qr extends Dt {
|
|
|
13922
13922
|
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
13923
13923
|
if (!a(this, se).permissions.acceptStageRequests)
|
|
13924
13924
|
throw this.logger.error("Stage::kick::permission_denied"), new k("You do not have permissions for kick", "2001");
|
|
13925
|
-
return a(this,
|
|
13925
|
+
return a(this, Ht).kick(e);
|
|
13926
13926
|
});
|
|
13927
13927
|
}
|
|
13928
13928
|
}
|
|
13929
|
-
|
|
13929
|
+
Ht = new WeakMap(), Sd = new WeakMap(), se = new WeakMap(), vo = new WeakMap(), fs = new WeakMap(), Ue = new WeakMap(), To = new WeakSet(), pu = function() {
|
|
13930
13930
|
return a(this, Ue).getValue("roomNodeClient");
|
|
13931
13931
|
}, Rn = new WeakSet(), jc = function(e) {
|
|
13932
13932
|
return u(this, null, function* () {
|
|
@@ -13982,12 +13982,12 @@ var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor, P0 = (s, t
|
|
|
13982
13982
|
for (var i = r > 1 ? void 0 : r ? E0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
13983
13983
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13984
13984
|
return r && i && y0(t, e, i), i;
|
|
13985
|
-
}, vr,
|
|
13985
|
+
}, vr, ts, Tr, yo, it;
|
|
13986
13986
|
class of {
|
|
13987
13987
|
constructor(t, e, r, i, n) {
|
|
13988
13988
|
p(this, "stage");
|
|
13989
13989
|
m(this, vr, void 0);
|
|
13990
|
-
m(this,
|
|
13990
|
+
m(this, ts, void 0);
|
|
13991
13991
|
m(this, Tr, void 0);
|
|
13992
13992
|
m(this, yo, 0);
|
|
13993
13993
|
m(this, it, void 0);
|
|
@@ -13997,7 +13997,7 @@ class of {
|
|
|
13997
13997
|
n,
|
|
13998
13998
|
e,
|
|
13999
13999
|
r
|
|
14000
|
-
), f(this, Tr, e), f(this, vr, i), f(this,
|
|
14000
|
+
), f(this, Tr, e), f(this, vr, i), f(this, ts, n), this.setupEvents();
|
|
14001
14001
|
}
|
|
14002
14002
|
/**
|
|
14003
14003
|
* @access private
|
|
@@ -14034,7 +14034,7 @@ class of {
|
|
|
14034
14034
|
);
|
|
14035
14035
|
}
|
|
14036
14036
|
getCurrentStageRequests() {
|
|
14037
|
-
return a(this,
|
|
14037
|
+
return a(this, ts).joined.toArray().filter(
|
|
14038
14038
|
(e) => e.stageStatus === "REQUESTED_TO_JOIN_STAGE"
|
|
14039
14039
|
).map((e) => ({
|
|
14040
14040
|
displayName: e.name,
|
|
@@ -14075,14 +14075,14 @@ class of {
|
|
|
14075
14075
|
*/
|
|
14076
14076
|
peerStageStatusHandler(t) {
|
|
14077
14077
|
return u(this, null, function* () {
|
|
14078
|
-
const e = a(this,
|
|
14078
|
+
const e = a(this, ts).joined.get(t.peerId), r = a(this, ts).viewMode === "ACTIVE_GRID";
|
|
14079
14079
|
if (!e) {
|
|
14080
14080
|
this.logger.warn("err::peerStageStatusUpdate: participant not found");
|
|
14081
14081
|
return;
|
|
14082
14082
|
}
|
|
14083
14083
|
switch (t.stageType) {
|
|
14084
14084
|
case 1:
|
|
14085
|
-
e.setStageStatus("ON_STAGE"), r && a(this, it).getValue("peerSessionStore").emit(R.UPDATE_ACTIVE, { viewMode: a(this,
|
|
14085
|
+
e.setStageStatus("ON_STAGE"), r && a(this, it).getValue("peerSessionStore").emit(R.UPDATE_ACTIVE, { viewMode: a(this, ts).viewMode, page: a(this, ts).currentPage });
|
|
14086
14086
|
break;
|
|
14087
14087
|
case 2:
|
|
14088
14088
|
e.setStageStatus("ACCEPTED_TO_JOIN_STAGE");
|
|
@@ -14093,7 +14093,7 @@ class of {
|
|
|
14093
14093
|
case 0:
|
|
14094
14094
|
case 4:
|
|
14095
14095
|
default:
|
|
14096
|
-
e.setStageStatus("OFF_STAGE"), r && a(this, it).getValue("peerSessionStore").emit(R.UPDATE_ACTIVE, { viewMode: a(this,
|
|
14096
|
+
e.setStageStatus("OFF_STAGE"), r && a(this, it).getValue("peerSessionStore").emit(R.UPDATE_ACTIVE, { viewMode: a(this, ts).viewMode, page: a(this, ts).currentPage });
|
|
14097
14097
|
break;
|
|
14098
14098
|
}
|
|
14099
14099
|
a(this, it).getValue("peerSessionStore").emit(R.UPDATE_PEER_STAGE_STATUS, {
|
|
@@ -14103,7 +14103,7 @@ class of {
|
|
|
14103
14103
|
});
|
|
14104
14104
|
}
|
|
14105
14105
|
}
|
|
14106
|
-
vr = new WeakMap(),
|
|
14106
|
+
vr = new WeakMap(), ts = new WeakMap(), Tr = new WeakMap(), yo = new WeakMap(), it = new WeakMap();
|
|
14107
14107
|
P0([
|
|
14108
14108
|
P.trace("Stage.setupEvents")
|
|
14109
14109
|
], of.prototype, "setupEvents", 1);
|
|
@@ -14513,7 +14513,7 @@ var D0 = Object.defineProperty, O0 = Object.getOwnPropertyDescriptor, Pc = (s, t
|
|
|
14513
14513
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14514
14514
|
return r && i && D0(t, e, i), i;
|
|
14515
14515
|
}, kn, An, In, Gc, og;
|
|
14516
|
-
let ji = (og = class extends
|
|
14516
|
+
let ji = (og = class extends Ot {
|
|
14517
14517
|
constructor(t, e) {
|
|
14518
14518
|
const r = t.getValue("logger");
|
|
14519
14519
|
super(r);
|
|
@@ -14551,7 +14551,7 @@ let ji = (og = class extends Dt {
|
|
|
14551
14551
|
"1005"
|
|
14552
14552
|
);
|
|
14553
14553
|
try {
|
|
14554
|
-
const e =
|
|
14554
|
+
const e = Tt(), { recording: r = {} } = a(this, An).getValue("defaults"), i = yield e.startRecording(r, t == null ? void 0 : t.allowMultiple);
|
|
14555
14555
|
this.updateRecordings([...this.recordings, {
|
|
14556
14556
|
id: i,
|
|
14557
14557
|
state: "STARTING",
|
|
@@ -14603,7 +14603,7 @@ let ji = (og = class extends Dt {
|
|
|
14603
14603
|
const o = n.state;
|
|
14604
14604
|
t === "stop" && (n.state = "STOPPING", this.emit("recordingUpdate", "STOPPING"));
|
|
14605
14605
|
try {
|
|
14606
|
-
yield
|
|
14606
|
+
yield Tt().updateRecording(n.id, t);
|
|
14607
14607
|
} catch (d) {
|
|
14608
14608
|
throw this.logger.error("Recording::stop::recording_failed_to_stop", {
|
|
14609
14609
|
error: d
|
|
@@ -14762,12 +14762,12 @@ class ch {
|
|
|
14762
14762
|
});
|
|
14763
14763
|
}
|
|
14764
14764
|
}
|
|
14765
|
-
var U0 = Object.defineProperty, $0 = Object.getOwnPropertyDescriptor,
|
|
14765
|
+
var U0 = Object.defineProperty, $0 = Object.getOwnPropertyDescriptor, Lt = (s, t, e, r) => {
|
|
14766
14766
|
for (var i = r > 1 ? void 0 : r ? $0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
14767
14767
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14768
14768
|
return r && i && U0(t, e, i), i;
|
|
14769
|
-
}, Le, ge, de, Ns,
|
|
14770
|
-
class
|
|
14769
|
+
}, Le, ge, de, Ns, Ft, wo, Re;
|
|
14770
|
+
class Et extends va {
|
|
14771
14771
|
constructor(e, r, i = nd, n = !0) {
|
|
14772
14772
|
const o = e.getValue("logger");
|
|
14773
14773
|
super(o);
|
|
@@ -14775,7 +14775,7 @@ class yt extends va {
|
|
|
14775
14775
|
m(this, ge, void 0);
|
|
14776
14776
|
m(this, de, void 0);
|
|
14777
14777
|
m(this, Ns, void 0);
|
|
14778
|
-
m(this,
|
|
14778
|
+
m(this, Ft, void 0);
|
|
14779
14779
|
m(this, wo, void 0);
|
|
14780
14780
|
m(this, Re, void 0);
|
|
14781
14781
|
p(this, "audioUpdateInProgress");
|
|
@@ -14790,7 +14790,7 @@ class yt extends va {
|
|
|
14790
14790
|
a(this, Le),
|
|
14791
14791
|
void 0,
|
|
14792
14792
|
i
|
|
14793
|
-
)), f(this,
|
|
14793
|
+
)), f(this, Ft, new hM(
|
|
14794
14794
|
a(this, Re),
|
|
14795
14795
|
a(this, Le)
|
|
14796
14796
|
)), f(this, Ns, new lM(
|
|
@@ -14802,7 +14802,7 @@ class yt extends va {
|
|
|
14802
14802
|
), a(this, de).on(
|
|
14803
14803
|
"trackChanged",
|
|
14804
14804
|
this.onVideoTrackChanged.bind(this)
|
|
14805
|
-
), a(this, de).on("trackEnded", this.onVideoTrackEnded.bind(this)), a(this,
|
|
14805
|
+
), a(this, de).on("trackEnded", this.onVideoTrackEnded.bind(this)), a(this, Ft).on(
|
|
14806
14806
|
"trackEnded",
|
|
14807
14807
|
this.onScreenShareEnded.bind(this)
|
|
14808
14808
|
), this.onVisibilityChange = this.onVisibilityChange.bind(this), document.addEventListener("visibilitychange", this.onVisibilityChange);
|
|
@@ -15020,26 +15020,26 @@ class yt extends va {
|
|
|
15020
15020
|
}
|
|
15021
15021
|
get screenShareTracks() {
|
|
15022
15022
|
return {
|
|
15023
|
-
audio: a(this,
|
|
15024
|
-
video: a(this,
|
|
15023
|
+
audio: a(this, Ft).audioMediaTrack,
|
|
15024
|
+
video: a(this, Ft).videoMediaTrack
|
|
15025
15025
|
};
|
|
15026
15026
|
}
|
|
15027
15027
|
get screenShareEnabled() {
|
|
15028
|
-
return a(this,
|
|
15028
|
+
return a(this, Ft).trackEnabled;
|
|
15029
15029
|
}
|
|
15030
15030
|
enableScreenShare() {
|
|
15031
15031
|
return u(this, null, function* () {
|
|
15032
|
-
yield a(this,
|
|
15032
|
+
yield a(this, Ft).enableScreenShare();
|
|
15033
15033
|
});
|
|
15034
15034
|
}
|
|
15035
15035
|
disableScreenShare() {
|
|
15036
15036
|
return u(this, null, function* () {
|
|
15037
|
-
a(this,
|
|
15037
|
+
a(this, Ft).disableScreenShare();
|
|
15038
15038
|
});
|
|
15039
15039
|
}
|
|
15040
15040
|
updateScreenshareConstraints(e) {
|
|
15041
15041
|
return u(this, null, function* () {
|
|
15042
|
-
yield a(this,
|
|
15042
|
+
yield a(this, Ft).updateConstraints(e);
|
|
15043
15043
|
});
|
|
15044
15044
|
}
|
|
15045
15045
|
getSpeakerDevices(e) {
|
|
@@ -15070,7 +15070,7 @@ class yt extends va {
|
|
|
15070
15070
|
return a(this, de).setVideoMiddlewareGlobalConfig(e);
|
|
15071
15071
|
}
|
|
15072
15072
|
destruct() {
|
|
15073
|
-
a(this, ge).disableTrack(), a(this, de).disableTrack(), a(this, de).terminateMiddlewareWebWorker(), a(this,
|
|
15073
|
+
a(this, ge).disableTrack(), a(this, de).disableTrack(), a(this, de).terminateMiddlewareWebWorker(), a(this, Ft).disableScreenShare(), a(this, Le).destruct();
|
|
15074
15074
|
}
|
|
15075
15075
|
onDeviceChange(e, r) {
|
|
15076
15076
|
return u(this, null, function* () {
|
|
@@ -15126,46 +15126,46 @@ class yt extends va {
|
|
|
15126
15126
|
});
|
|
15127
15127
|
}
|
|
15128
15128
|
}
|
|
15129
|
-
Le = new WeakMap(), ge = new WeakMap(), de = new WeakMap(), Ns = new WeakMap(),
|
|
15130
|
-
|
|
15129
|
+
Le = new WeakMap(), ge = new WeakMap(), de = new WeakMap(), Ns = new WeakMap(), Ft = new WeakMap(), wo = new WeakMap(), Re = new WeakMap();
|
|
15130
|
+
Lt([
|
|
15131
15131
|
P.trace("MediaHandler.setupStreams")
|
|
15132
|
-
],
|
|
15133
|
-
|
|
15132
|
+
], Et.prototype, "setupStreams", 1);
|
|
15133
|
+
Lt([
|
|
15134
15134
|
P.trace("MediaHandler.enableAudio")
|
|
15135
|
-
],
|
|
15136
|
-
|
|
15135
|
+
], Et.prototype, "enableAudio", 1);
|
|
15136
|
+
Lt([
|
|
15137
15137
|
P.trace("MediaHandler.disableAudio")
|
|
15138
|
-
],
|
|
15139
|
-
|
|
15138
|
+
], Et.prototype, "disableAudio", 1);
|
|
15139
|
+
Lt([
|
|
15140
15140
|
P.trace("MediaHandler.setAudioDevice")
|
|
15141
|
-
],
|
|
15142
|
-
|
|
15141
|
+
], Et.prototype, "setAudioDevice", 1);
|
|
15142
|
+
Lt([
|
|
15143
15143
|
P.trace("MediaHandler.enableVideo")
|
|
15144
|
-
],
|
|
15145
|
-
|
|
15144
|
+
], Et.prototype, "enableVideo", 1);
|
|
15145
|
+
Lt([
|
|
15146
15146
|
P.trace("MediaHandler.disableVideo")
|
|
15147
|
-
],
|
|
15148
|
-
|
|
15147
|
+
], Et.prototype, "disableVideo", 1);
|
|
15148
|
+
Lt([
|
|
15149
15149
|
P.trace("MediaHandler.setVideoDevice")
|
|
15150
|
-
],
|
|
15151
|
-
|
|
15150
|
+
], Et.prototype, "setVideoDevice", 1);
|
|
15151
|
+
Lt([
|
|
15152
15152
|
P.trace("MediaHandler.updateVideoConstraints")
|
|
15153
|
-
],
|
|
15154
|
-
|
|
15153
|
+
], Et.prototype, "updateVideoConstraints", 1);
|
|
15154
|
+
Lt([
|
|
15155
15155
|
P.trace("MediaHandler.enableScreenShare")
|
|
15156
|
-
],
|
|
15157
|
-
|
|
15156
|
+
], Et.prototype, "enableScreenShare", 1);
|
|
15157
|
+
Lt([
|
|
15158
15158
|
P.trace("MediaHandler.disableScreenShare")
|
|
15159
|
-
],
|
|
15160
|
-
|
|
15159
|
+
], Et.prototype, "disableScreenShare", 1);
|
|
15160
|
+
Lt([
|
|
15161
15161
|
P.trace("MediaHandler.updateScreenshareConstraints")
|
|
15162
|
-
],
|
|
15163
|
-
|
|
15162
|
+
], Et.prototype, "updateScreenshareConstraints", 1);
|
|
15163
|
+
Lt([
|
|
15164
15164
|
P.trace("MediaHandler.destruct")
|
|
15165
|
-
],
|
|
15166
|
-
|
|
15165
|
+
], Et.prototype, "destruct", 1);
|
|
15166
|
+
Lt([
|
|
15167
15167
|
P.trace("MediaHandler.onDeviceChange")
|
|
15168
|
-
],
|
|
15168
|
+
], Et.prototype, "onDeviceChange", 1);
|
|
15169
15169
|
function Lc(s, t, e) {
|
|
15170
15170
|
switch (!0) {
|
|
15171
15171
|
case fe.isChromiumBased():
|
|
@@ -15528,14 +15528,14 @@ var Y0 = Object.defineProperty, Q0 = Object.getOwnPropertyDescriptor, gs = (s, t
|
|
|
15528
15528
|
for (var i = r > 1 ? void 0 : r ? Q0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15529
15529
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15530
15530
|
return r && i && Y0(t, e, i), i;
|
|
15531
|
-
}, Mn,
|
|
15532
|
-
let
|
|
15531
|
+
}, Mn, qt, $e, cg;
|
|
15532
|
+
let Dt = (cg = class extends z0 {
|
|
15533
15533
|
constructor(t, e) {
|
|
15534
15534
|
super();
|
|
15535
15535
|
m(this, Mn, void 0);
|
|
15536
|
-
m(this,
|
|
15536
|
+
m(this, qt, void 0);
|
|
15537
15537
|
m(this, $e, void 0);
|
|
15538
|
-
f(this, $e, t), f(this,
|
|
15538
|
+
f(this, $e, t), f(this, qt, new K0(t, e)), f(this, Mn, new AbortController());
|
|
15539
15539
|
}
|
|
15540
15540
|
/**
|
|
15541
15541
|
* @access private
|
|
@@ -15552,7 +15552,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15552
15552
|
return a(this, $e).getValue("logger");
|
|
15553
15553
|
}
|
|
15554
15554
|
get constraintsBuilder() {
|
|
15555
|
-
return a(this,
|
|
15555
|
+
return a(this, qt);
|
|
15556
15556
|
}
|
|
15557
15557
|
destruct() {
|
|
15558
15558
|
return u(this, null, function* () {
|
|
@@ -15583,8 +15583,8 @@ let Mt = (cg = class extends z0 {
|
|
|
15583
15583
|
let S;
|
|
15584
15584
|
e && g ? S = e : c && ((n = c[0]) != null && n.deviceId) && (S = (o = c[0]) == null ? void 0 : o.deviceId);
|
|
15585
15585
|
const T = {
|
|
15586
|
-
audio: a(this,
|
|
15587
|
-
video: a(this,
|
|
15586
|
+
audio: a(this, qt).getAudioConstraints(h).audio,
|
|
15587
|
+
video: a(this, qt).getVideoConstraints(S).video
|
|
15588
15588
|
};
|
|
15589
15589
|
this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
15590
15590
|
constraints: JSON.stringify(T)
|
|
@@ -15630,7 +15630,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15630
15630
|
const o = (l) => u(this, null, function* () {
|
|
15631
15631
|
let h;
|
|
15632
15632
|
try {
|
|
15633
|
-
r = r.filter((S) => S.deviceId !== l), h = a(this,
|
|
15633
|
+
r = r.filter((S) => S.deviceId !== l), h = a(this, qt).getAudioConstraints(l), this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
15634
15634
|
constraints: JSON.stringify(h)
|
|
15635
15635
|
});
|
|
15636
15636
|
const [g] = (yield navigator.mediaDevices.getUserMedia(h)).getAudioTracks();
|
|
@@ -15651,7 +15651,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15651
15651
|
constraints: JSON.stringify(h),
|
|
15652
15652
|
error: g
|
|
15653
15653
|
});
|
|
15654
|
-
const _ = a(this,
|
|
15654
|
+
const _ = a(this, qt).getAudioConstraints(
|
|
15655
15655
|
E.deviceId
|
|
15656
15656
|
);
|
|
15657
15657
|
return this.logger.info("getAudioTrack::retrying_gum_for_next_device", {
|
|
@@ -15721,7 +15721,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15721
15721
|
constraints: JSON.stringify(h),
|
|
15722
15722
|
error: g
|
|
15723
15723
|
});
|
|
15724
|
-
const _ = a(this,
|
|
15724
|
+
const _ = a(this, qt).getVideoConstraints(
|
|
15725
15725
|
E.deviceId
|
|
15726
15726
|
);
|
|
15727
15727
|
return this.logger.info("getVideoTrack::retrying_gum_for_next_device", {
|
|
@@ -15732,7 +15732,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15732
15732
|
}
|
|
15733
15733
|
});
|
|
15734
15734
|
try {
|
|
15735
|
-
const h = a(this,
|
|
15735
|
+
const h = a(this, qt).getVideoConstraints(n), g = yield o(h);
|
|
15736
15736
|
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", a(this, $e).getValue("peerSessionStore").emit(R.MEDIA_PERMISSION_UPDATE, {
|
|
15737
15737
|
message: this.permissions.video,
|
|
15738
15738
|
kind: "video"
|
|
@@ -15769,7 +15769,7 @@ let Mt = (cg = class extends z0 {
|
|
|
15769
15769
|
}
|
|
15770
15770
|
});
|
|
15771
15771
|
try {
|
|
15772
|
-
const e = a(this,
|
|
15772
|
+
const e = a(this, qt).getScreenShareConstraints(), r = yield t(e);
|
|
15773
15773
|
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", a(this, $e).getValue("peerSessionStore").emit(R.MEDIA_PERMISSION_UPDATE, {
|
|
15774
15774
|
message: this.permissions.screenshare,
|
|
15775
15775
|
kind: "screenshare"
|
|
@@ -15892,41 +15892,41 @@ let Mt = (cg = class extends z0 {
|
|
|
15892
15892
|
}
|
|
15893
15893
|
});
|
|
15894
15894
|
}
|
|
15895
|
-
}, Mn = new WeakMap(),
|
|
15895
|
+
}, Mn = new WeakMap(), qt = new WeakMap(), $e = new WeakMap(), cg);
|
|
15896
15896
|
gs([
|
|
15897
15897
|
P.trace("WebMediaInterface.destruct")
|
|
15898
|
-
],
|
|
15898
|
+
], Dt.prototype, "destruct", 1);
|
|
15899
15899
|
gs([
|
|
15900
15900
|
P.trace("WebMediaInterface.handlePermissionErrors")
|
|
15901
|
-
],
|
|
15901
|
+
], Dt.prototype, "handlePermissionErrors", 1);
|
|
15902
15902
|
gs([
|
|
15903
15903
|
P.trace("WebMediaInterface.getAudioAndVideoTrack")
|
|
15904
|
-
],
|
|
15904
|
+
], Dt.prototype, "getAudioAndVideoTrack", 1);
|
|
15905
15905
|
gs([
|
|
15906
15906
|
P.trace("WebMediaInterface.getAudioTrack")
|
|
15907
|
-
],
|
|
15907
|
+
], Dt.prototype, "getAudioTrack", 1);
|
|
15908
15908
|
gs([
|
|
15909
15909
|
P.trace("WebMediaInterface.getVideoTrack")
|
|
15910
|
-
],
|
|
15910
|
+
], Dt.prototype, "getVideoTrack", 1);
|
|
15911
15911
|
gs([
|
|
15912
15912
|
P.trace("WebMediaInterface.getScreenShareTracks")
|
|
15913
|
-
],
|
|
15913
|
+
], Dt.prototype, "getScreenShareTracks", 1);
|
|
15914
15914
|
gs([
|
|
15915
15915
|
P.trace("WebMediaInterface.getAvailableDevices")
|
|
15916
|
-
],
|
|
15916
|
+
], Dt.prototype, "getAvailableDevices", 1);
|
|
15917
15917
|
gs([
|
|
15918
15918
|
P.trace("WebMediaInterface.getAvailableDevicesByKind")
|
|
15919
|
-
],
|
|
15919
|
+
], Dt.prototype, "getAvailableDevicesByKind", 1);
|
|
15920
15920
|
gs([
|
|
15921
15921
|
P.trace("WebMediaInterface.getDevice")
|
|
15922
|
-
],
|
|
15922
|
+
], Dt.prototype, "getDevice", 1);
|
|
15923
15923
|
gs([
|
|
15924
15924
|
P.trace("WebMediaInterface.onDeviceChange")
|
|
15925
|
-
],
|
|
15926
|
-
|
|
15925
|
+
], Dt.prototype, "onDeviceChange", 1);
|
|
15926
|
+
Dt = gs([
|
|
15927
15927
|
st("1600")
|
|
15928
|
-
],
|
|
15929
|
-
const hf =
|
|
15928
|
+
], Dt);
|
|
15929
|
+
const hf = Dt, Fi = {
|
|
15930
15930
|
setItem: (s, t, e) => {
|
|
15931
15931
|
try {
|
|
15932
15932
|
localStorage.setItem(s, t);
|
|
@@ -16852,7 +16852,7 @@ var fM = Object.defineProperty, SM = Object.getOwnPropertyDescriptor, mf = (s, t
|
|
|
16852
16852
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16853
16853
|
return r && i && fM(t, e, i), i;
|
|
16854
16854
|
}, Nn, Io;
|
|
16855
|
-
class uh extends
|
|
16855
|
+
class uh extends Ot {
|
|
16856
16856
|
/**
|
|
16857
16857
|
* @param {Context} context
|
|
16858
16858
|
* @param {Self} self
|
|
@@ -16896,7 +16896,7 @@ class uh extends Dt {
|
|
|
16896
16896
|
);
|
|
16897
16897
|
this.setLivestreamState("STARTING");
|
|
16898
16898
|
try {
|
|
16899
|
-
const r =
|
|
16899
|
+
const r = Tt(), {
|
|
16900
16900
|
playbackUrl: i,
|
|
16901
16901
|
ingestionCredentials: n
|
|
16902
16902
|
} = yield r.startLivestreaming(e);
|
|
@@ -16918,7 +16918,7 @@ class uh extends Dt {
|
|
|
16918
16918
|
if (this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")
|
|
16919
16919
|
throw this.logger.error("Livestream::stop::inconsistent_state"), new k("Livestream not started yet", "1902");
|
|
16920
16920
|
try {
|
|
16921
|
-
this.setLivestreamState("STOPPING"), yield
|
|
16921
|
+
this.setLivestreamState("STOPPING"), yield Tt().stopLivestreaming();
|
|
16922
16922
|
} catch (e) {
|
|
16923
16923
|
throw this.logger.error("Livestream::stop::livestream_failed_to_stop", {
|
|
16924
16924
|
error: e
|
|
@@ -16964,7 +16964,7 @@ class ff {
|
|
|
16964
16964
|
}
|
|
16965
16965
|
fetchInitialLivestreamingState() {
|
|
16966
16966
|
return u(this, null, function* () {
|
|
16967
|
-
const t =
|
|
16967
|
+
const t = Tt(), {
|
|
16968
16968
|
status: e,
|
|
16969
16969
|
playbackUrl: r,
|
|
16970
16970
|
manualIngest: i,
|
|
@@ -17224,21 +17224,21 @@ Je = new WeakMap(), yr = new WeakMap(), Er = new WeakMap(), Td = new WeakSet(),
|
|
|
17224
17224
|
this.set(t, i, r);
|
|
17225
17225
|
};
|
|
17226
17226
|
Cc([
|
|
17227
|
-
|
|
17227
|
+
Nt(Ta, "rateLimitConfig")
|
|
17228
17228
|
], ya.prototype, "remoteSet", 1);
|
|
17229
17229
|
Cc([
|
|
17230
|
-
|
|
17230
|
+
Nt(Ta, "bulkRateLimitConfig")
|
|
17231
17231
|
], ya.prototype, "bulkSet", 1);
|
|
17232
17232
|
Cc([
|
|
17233
|
-
|
|
17233
|
+
Nt(Ta, "rateLimitConfig")
|
|
17234
17234
|
], ya.prototype, "update", 1);
|
|
17235
17235
|
Cc([
|
|
17236
|
-
|
|
17236
|
+
Nt(Ta, "rateLimitConfig")
|
|
17237
17237
|
], ya.prototype, "delete", 1);
|
|
17238
17238
|
Cc([
|
|
17239
|
-
|
|
17239
|
+
Nt(Ta, "bulkRateLimitConfig")
|
|
17240
17240
|
], ya.prototype, "bulkDelete", 1);
|
|
17241
|
-
var Pr, _r, Mo, fu, Do,
|
|
17241
|
+
var Pr, _r, Mo, fu, Do, ss, yd, vf;
|
|
17242
17242
|
class _M {
|
|
17243
17243
|
constructor(t, e) {
|
|
17244
17244
|
m(this, Mo);
|
|
@@ -17247,7 +17247,7 @@ class _M {
|
|
|
17247
17247
|
m(this, Pr, void 0);
|
|
17248
17248
|
m(this, _r, "");
|
|
17249
17249
|
m(this, Do, void 0);
|
|
17250
|
-
m(this,
|
|
17250
|
+
m(this, ss, /* @__PURE__ */ new Map());
|
|
17251
17251
|
f(this, Pr, e), f(this, _r, t.getValue("meetingId")), f(this, Do, t), V(this, yd, vf).call(this);
|
|
17252
17252
|
}
|
|
17253
17253
|
create(t, e = !1) {
|
|
@@ -17258,24 +17258,24 @@ class _M {
|
|
|
17258
17258
|
);
|
|
17259
17259
|
return a(this, Pr).storeGetKeys(a(this, _r), t, []), new Promise((n, o) => {
|
|
17260
17260
|
const d = setTimeout(() => {
|
|
17261
|
-
a(this,
|
|
17261
|
+
a(this, ss).delete(t), o(Error("Failed"));
|
|
17262
17262
|
}, 3e3);
|
|
17263
|
-
a(this,
|
|
17263
|
+
a(this, ss).set(t, { rejectTimeout: d, resolve: n, store: r });
|
|
17264
17264
|
});
|
|
17265
17265
|
}
|
|
17266
17266
|
refresh(t) {
|
|
17267
17267
|
const e = this.stores.get(t);
|
|
17268
17268
|
return e ? (e.clear(), a(this, Pr).storeGetKeys(a(this, _r), t, []), new Promise((i, n) => {
|
|
17269
17269
|
const o = setTimeout(() => {
|
|
17270
|
-
a(this,
|
|
17270
|
+
a(this, ss).delete(t), n(Error("Store refresh timed out"));
|
|
17271
17271
|
}, 3e3);
|
|
17272
|
-
a(this,
|
|
17272
|
+
a(this, ss).set(t, { rejectTimeout: o, resolve: i, store: e });
|
|
17273
17273
|
})) : Promise.reject(Error(`Store '${t}' does not exist`));
|
|
17274
17274
|
}
|
|
17275
17275
|
}
|
|
17276
17276
|
Pr = new WeakMap(), _r = new WeakMap(), Mo = new WeakSet(), fu = function() {
|
|
17277
17277
|
return a(this, Do).getValue("peerId");
|
|
17278
|
-
}, Do = new WeakMap(),
|
|
17278
|
+
}, Do = new WeakMap(), ss = new WeakMap(), yd = new WeakSet(), vf = function() {
|
|
17279
17279
|
[
|
|
17280
17280
|
ks.storeInsertKeys,
|
|
17281
17281
|
ks.storeGetKeys,
|
|
@@ -17299,15 +17299,15 @@ Pr = new WeakMap(), _r = new WeakMap(), Mo = new WeakSet(), fu = function() {
|
|
|
17299
17299
|
};
|
|
17300
17300
|
});
|
|
17301
17301
|
if (t === ks.storeGetKeys) {
|
|
17302
|
-
const d = a(this,
|
|
17303
|
-
if (a(this,
|
|
17302
|
+
const d = a(this, ss).get(e.storeName), c = this.stores.get(e.storeName) || (d == null ? void 0 : d.store);
|
|
17303
|
+
if (a(this, ss).get(e.storeName) && (this.stores.set(e.storeName, d.store), d.resolve(c), clearTimeout(d.rejectTimeout), a(this, ss).delete(e.storeName)), !c)
|
|
17304
17304
|
return;
|
|
17305
17305
|
r.forEach((l) => {
|
|
17306
17306
|
c.set(l.key, l.payload, !1, !1);
|
|
17307
17307
|
});
|
|
17308
17308
|
return;
|
|
17309
17309
|
}
|
|
17310
|
-
const i = this.stores.get(e.storeName) || ((o = a(this,
|
|
17310
|
+
const i = this.stores.get(e.storeName) || ((o = a(this, ss).get(e.storeName)) == null ? void 0 : o.store);
|
|
17311
17311
|
i !== void 0 && (t === ks.storeInsertKeys && r.forEach(({ key: d, peerId: c, payload: l }) => {
|
|
17312
17312
|
c !== a(this, Mo, fu) && i.set(d, l, !1, !0);
|
|
17313
17313
|
}), t === ks.storeDeleteKeys && r.forEach(({ key: d, peerId: c }) => {
|
|
@@ -17352,8 +17352,8 @@ var CM = Object.defineProperty, wM = Object.getOwnPropertyDescriptor, Ea = (s, t
|
|
|
17352
17352
|
return r && i && CM(t, e, i), i;
|
|
17353
17353
|
};
|
|
17354
17354
|
const RM = 0.8, bM = 1.2;
|
|
17355
|
-
var xn, Un,
|
|
17356
|
-
let tr = (dg = class extends
|
|
17355
|
+
var xn, Un, Rt, fi, Fa, Cr, en, Si, qa, Ed, Tf, Vs, Oo, wr, vi, ja, xs, Pd, No, Su, _d, yf, Cd, Ef, dg;
|
|
17356
|
+
let tr = (dg = class extends Ot {
|
|
17357
17357
|
/**
|
|
17358
17358
|
* @param {Context} context
|
|
17359
17359
|
* @param {IParticipant} participant
|
|
@@ -17453,7 +17453,7 @@ let tr = (dg = class extends Dt {
|
|
|
17453
17453
|
* The preset of the participant.
|
|
17454
17454
|
*/
|
|
17455
17455
|
p(this, "presetName");
|
|
17456
|
-
m(this,
|
|
17456
|
+
m(this, Rt, void 0);
|
|
17457
17457
|
m(this, Vs, void 0);
|
|
17458
17458
|
m(this, Oo, void 0);
|
|
17459
17459
|
m(this, wr, /* @__PURE__ */ new Map());
|
|
@@ -17470,15 +17470,15 @@ let tr = (dg = class extends Dt {
|
|
|
17470
17470
|
if (!i || !n)
|
|
17471
17471
|
return;
|
|
17472
17472
|
const o = n / r, d = i / e, c = Math.max(o, d);
|
|
17473
|
-
c > bM && a(this, xs) === 1 ? (f(this, xs, 0), a(this,
|
|
17473
|
+
c > bM && a(this, xs) === 1 ? (f(this, xs, 0), a(this, Rt).getValue("peerSessionStore").emit(R.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17474
17474
|
peerId: this.id,
|
|
17475
17475
|
maxSpatialLayer: a(this, xs)
|
|
17476
|
-
})) : c < RM && a(this, xs) === 0 && (f(this, xs, 1), a(this,
|
|
17476
|
+
})) : c < RM && a(this, xs) === 0 && (f(this, xs, 1), a(this, Rt).getValue("peerSessionStore").emit(R.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17477
17477
|
peerId: this.id,
|
|
17478
17478
|
maxSpatialLayer: a(this, xs)
|
|
17479
17479
|
}));
|
|
17480
17480
|
}, 2e3));
|
|
17481
|
-
f(this,
|
|
17481
|
+
f(this, Rt, t);
|
|
17482
17482
|
const {
|
|
17483
17483
|
id: o,
|
|
17484
17484
|
userId: d,
|
|
@@ -17518,7 +17518,7 @@ let tr = (dg = class extends Dt {
|
|
|
17518
17518
|
* Not for external use
|
|
17519
17519
|
*/
|
|
17520
17520
|
get telemetry() {
|
|
17521
|
-
return a(this,
|
|
17521
|
+
return a(this, Rt).getValue("telemetry");
|
|
17522
17522
|
}
|
|
17523
17523
|
/**
|
|
17524
17524
|
* @param {boolean} videoEnabled
|
|
@@ -17619,7 +17619,7 @@ let tr = (dg = class extends Dt {
|
|
|
17619
17619
|
}), !a(this, Ed, Tf))
|
|
17620
17620
|
throw new k("Can`t kick participant without joining room", "1205");
|
|
17621
17621
|
if (a(this, Vs).permissions.kickParticipant) {
|
|
17622
|
-
yield a(this,
|
|
17622
|
+
yield a(this, Rt).getValue("peerSessionStore").emitAsync(R.KICK_PEER, {
|
|
17623
17623
|
peerId: t
|
|
17624
17624
|
});
|
|
17625
17625
|
return;
|
|
@@ -17716,16 +17716,16 @@ let tr = (dg = class extends Dt {
|
|
|
17716
17716
|
t.srcObject = void 0;
|
|
17717
17717
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
17718
17718
|
}
|
|
17719
|
-
}, xn = new WeakMap(), Un = new WeakMap(),
|
|
17720
|
-
return a(this,
|
|
17719
|
+
}, xn = new WeakMap(), Un = new WeakMap(), Rt = new WeakMap(), fi = new WeakSet(), Fa = function() {
|
|
17720
|
+
return a(this, Rt).getValue("roomNodeClient");
|
|
17721
17721
|
}, Cr = new WeakSet(), en = function() {
|
|
17722
|
-
return a(this,
|
|
17722
|
+
return a(this, Rt).getValue("audioPlayback");
|
|
17723
17723
|
}, Si = new WeakSet(), qa = function() {
|
|
17724
|
-
return a(this,
|
|
17724
|
+
return a(this, Rt).getValue("connectionHandler").mediaJoined;
|
|
17725
17725
|
}, Ed = new WeakSet(), Tf = function() {
|
|
17726
|
-
return a(this,
|
|
17726
|
+
return a(this, Rt).getValue("connectionHandler").socketJoined;
|
|
17727
17727
|
}, Vs = new WeakMap(), Oo = new WeakMap(), wr = new WeakMap(), vi = new WeakSet(), ja = function() {
|
|
17728
|
-
return a(this,
|
|
17728
|
+
return a(this, Rt).getValue("pip");
|
|
17729
17729
|
}, xs = new WeakMap(), Pd = new WeakMap(), No = new WeakSet(), Su = function() {
|
|
17730
17730
|
Array.from(a(this, wr).keys()).forEach(this.updateVideo);
|
|
17731
17731
|
}, _d = new WeakSet(), yf = function() {
|
|
@@ -17895,14 +17895,14 @@ class IM {
|
|
|
17895
17895
|
}
|
|
17896
17896
|
}
|
|
17897
17897
|
const Pf = new IM();
|
|
17898
|
-
var MM = Object.defineProperty, DM = Object.getOwnPropertyDescriptor,
|
|
17898
|
+
var MM = Object.defineProperty, DM = Object.getOwnPropertyDescriptor, Vt = (s, t, e, r) => {
|
|
17899
17899
|
for (var i = r > 1 ? void 0 : r ? DM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17900
17900
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17901
17901
|
return r && i && MM(t, e, i), i;
|
|
17902
17902
|
};
|
|
17903
17903
|
const OM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
17904
17904
|
var ye, Lo, vu, Ti, Ga, $n, Wc, yi, pt, lg;
|
|
17905
|
-
let ut = (lg = class extends
|
|
17905
|
+
let ut = (lg = class extends Ot {
|
|
17906
17906
|
/**
|
|
17907
17907
|
* This constructs a new Participant object and maintains
|
|
17908
17908
|
* the maps of active/joined/waitlisted/pinned/selectedPeers maps.
|
|
@@ -18337,53 +18337,53 @@ let ut = (lg = class extends Dt {
|
|
|
18337
18337
|
var t;
|
|
18338
18338
|
return ((t = a(this, ye).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
18339
18339
|
}, yi = new WeakMap(), pt = new WeakMap(), lg);
|
|
18340
|
-
|
|
18340
|
+
Vt([
|
|
18341
18341
|
P.trace("Participants.setViewMode")
|
|
18342
18342
|
], ut.prototype, "setViewMode", 1);
|
|
18343
|
-
|
|
18343
|
+
Vt([
|
|
18344
18344
|
P.trace("Participants.setPage")
|
|
18345
18345
|
], ut.prototype, "setPage", 1);
|
|
18346
|
-
|
|
18346
|
+
Vt([
|
|
18347
18347
|
P.trace("Participants.disableAllAudio")
|
|
18348
18348
|
], ut.prototype, "disableAllAudio", 1);
|
|
18349
|
-
|
|
18349
|
+
Vt([
|
|
18350
18350
|
P.trace("Participants.disableAllVideo")
|
|
18351
18351
|
], ut.prototype, "disableAllVideo", 1);
|
|
18352
|
-
|
|
18352
|
+
Vt([
|
|
18353
18353
|
P.trace("Participants.disablePeerAudio")
|
|
18354
18354
|
], ut.prototype, "disableAudio", 1);
|
|
18355
|
-
|
|
18355
|
+
Vt([
|
|
18356
18356
|
P.trace("Participants.disablePeerVideo")
|
|
18357
18357
|
], ut.prototype, "disableVideo", 1);
|
|
18358
|
-
|
|
18358
|
+
Vt([
|
|
18359
18359
|
P.trace("Participants.kickPeer")
|
|
18360
18360
|
], ut.prototype, "kick", 1);
|
|
18361
|
-
|
|
18361
|
+
Vt([
|
|
18362
18362
|
P.trace("Participants.kickAll")
|
|
18363
18363
|
], ut.prototype, "kickAll", 1);
|
|
18364
|
-
|
|
18364
|
+
Vt([
|
|
18365
18365
|
P.trace("Participants.broadcastMessage"),
|
|
18366
|
-
|
|
18366
|
+
Nt(Ta, "rateLimitConfig")
|
|
18367
18367
|
], ut.prototype, "broadcastMessage", 1);
|
|
18368
|
-
|
|
18368
|
+
Vt([
|
|
18369
18369
|
P.trace("Participants.getAllJoinedPeers"),
|
|
18370
|
-
|
|
18370
|
+
Nt({ maxInvocations: 10, period: 60 })
|
|
18371
18371
|
], ut.prototype, "getAllJoinedPeers", 1);
|
|
18372
|
-
|
|
18372
|
+
Vt([
|
|
18373
18373
|
P.trace("Participant.updatePermissions"),
|
|
18374
|
-
|
|
18374
|
+
Nt({ maxInvocations: 1e3, period: 60 })
|
|
18375
18375
|
], ut.prototype, "updatePermissions", 1);
|
|
18376
|
-
|
|
18376
|
+
Vt([
|
|
18377
18377
|
P.trace("Participants.getParticipantsInMeetingPreJoin")
|
|
18378
18378
|
], ut.prototype, "getParticipantsInMeetingPreJoin", 1);
|
|
18379
|
-
ut =
|
|
18379
|
+
ut = Vt([
|
|
18380
18380
|
st("1200")
|
|
18381
18381
|
], ut);
|
|
18382
18382
|
var NM = Object.defineProperty, LM = Object.getOwnPropertyDescriptor, zi = (s, t, e, r) => {
|
|
18383
18383
|
for (var i = r > 1 ? void 0 : r ? LM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18384
18384
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18385
18385
|
return r && i && NM(t, e, i), i;
|
|
18386
|
-
},
|
|
18386
|
+
}, jt, rs, Bn, ug;
|
|
18387
18387
|
const _f = (ug = class {
|
|
18388
18388
|
constructor(s, t, e) {
|
|
18389
18389
|
p(this, "participants");
|
|
@@ -18395,8 +18395,8 @@ const _f = (ug = class {
|
|
|
18395
18395
|
p(this, "roomSocketHandler");
|
|
18396
18396
|
p(this, "context");
|
|
18397
18397
|
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
18398
|
-
m(this,
|
|
18399
|
-
m(this,
|
|
18398
|
+
m(this, jt, { mode: "ACTIVE_GRID", page: 0 });
|
|
18399
|
+
m(this, rs, !1);
|
|
18400
18400
|
m(this, Bn, !1);
|
|
18401
18401
|
p(this, "updateConsumerSpatialLayers", eh(() => {
|
|
18402
18402
|
const s = {}, t = new Map(this.maxSpatialLayerUpdates);
|
|
@@ -18411,7 +18411,7 @@ const _f = (ug = class {
|
|
|
18411
18411
|
});
|
|
18412
18412
|
}, 2e3));
|
|
18413
18413
|
p(this, "updateConsumers", (s, t) => u(this, null, function* () {
|
|
18414
|
-
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${a(this,
|
|
18414
|
+
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${a(this, rs)}`);
|
|
18415
18415
|
try {
|
|
18416
18416
|
s.length !== 0 && (this.logger.info(`updateConsumers: Creating consumers for ${s.length} producers: [${s.map((e) => e.producerId).join(", ")}]`), yield this.roomNodeClient.createConsumers(s), this.logger.info("updateConsumers: Successfully created consumers."));
|
|
18417
18417
|
} catch (e) {
|
|
@@ -18519,7 +18519,7 @@ const _f = (ug = class {
|
|
|
18519
18519
|
appData: { screenShare: t == null ? void 0 : t.screenShare }
|
|
18520
18520
|
}
|
|
18521
18521
|
}
|
|
18522
|
-
), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${a(this,
|
|
18522
|
+
), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${a(this, rs)}, VideoSub: ${t.kind === "video" ? this.participants.videoSubscribed.has(s) : "N/A"}, AudioSub: ${t.kind === "audio" ? this.participants.audioSubscribed.has(s) : "N/A"}`), this.scheduleSyncConsumers({
|
|
18523
18523
|
source: "NEW_PRODUCER_AUTO"
|
|
18524
18524
|
})) : this.logger.info(
|
|
18525
18525
|
"ParticipantController::NEW_PRODUCER::not_consuming_producer_auto",
|
|
@@ -18580,7 +18580,7 @@ const _f = (ug = class {
|
|
|
18580
18580
|
const e = t;
|
|
18581
18581
|
this.onParticipantPinned(e);
|
|
18582
18582
|
const r = this.participants.joined.get(e);
|
|
18583
|
-
r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${a(this,
|
|
18583
|
+
r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${a(this, rs)}, ProducerIds: [${r.producers.map((i) => i.producerId).join(", ")}]`), this.scheduleSyncConsumers({
|
|
18584
18584
|
source: "GLOBAL_PEER_PIN"
|
|
18585
18585
|
}));
|
|
18586
18586
|
}
|
|
@@ -18675,8 +18675,8 @@ const _f = (ug = class {
|
|
|
18675
18675
|
* */
|
|
18676
18676
|
updateMediaSubscribedMaps(s, t) {
|
|
18677
18677
|
const { page: e } = t != null ? t : {};
|
|
18678
|
-
s && a(this,
|
|
18679
|
-
const { mode: r, page: i } = a(this,
|
|
18678
|
+
s && a(this, jt).mode !== s && (a(this, jt).mode = s), e && a(this, jt).page !== e && (a(this, jt).page = e);
|
|
18679
|
+
const { mode: r, page: i } = a(this, jt);
|
|
18680
18680
|
switch (r) {
|
|
18681
18681
|
case "PAGINATED": {
|
|
18682
18682
|
if (!i)
|
|
@@ -18708,8 +18708,8 @@ const _f = (ug = class {
|
|
|
18708
18708
|
source: s
|
|
18709
18709
|
}) {
|
|
18710
18710
|
var r, i, n;
|
|
18711
|
-
const e = ((r = a(this,
|
|
18712
|
-
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = a(this,
|
|
18711
|
+
const e = ((r = a(this, jt)) == null ? void 0 : r.mode) === "PAGINATED" && !a(this, rs) ? 200 : 0;
|
|
18712
|
+
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = a(this, jt)) == null ? void 0 : i.mode}, ConsumersSyncing: ${a(this, rs)}, Delay: ${e}, Page: ${(n = a(this, jt)) == null ? void 0 : n.page}`), setTimeout(() => this.syncConsumers(), e);
|
|
18713
18713
|
});
|
|
18714
18714
|
}
|
|
18715
18715
|
/**
|
|
@@ -18739,11 +18739,11 @@ const _f = (ug = class {
|
|
|
18739
18739
|
this.logger.info("syncConsumers: Connection not ready, exiting.");
|
|
18740
18740
|
return;
|
|
18741
18741
|
}
|
|
18742
|
-
if (a(this,
|
|
18742
|
+
if (a(this, rs)) {
|
|
18743
18743
|
f(this, Bn, !0), this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting.");
|
|
18744
18744
|
return;
|
|
18745
18745
|
}
|
|
18746
|
-
this.logger.info("syncConsumers: Starting sync operation."), f(this,
|
|
18746
|
+
this.logger.info("syncConsumers: Starting sync operation."), f(this, rs, !0), f(this, Bn, !1);
|
|
18747
18747
|
let s = [];
|
|
18748
18748
|
this.participants.videoSubscribed.forEach((g) => {
|
|
18749
18749
|
var E, _;
|
|
@@ -18789,7 +18789,7 @@ const _f = (ug = class {
|
|
|
18789
18789
|
} catch (g) {
|
|
18790
18790
|
this.logger.error("syncConsumers: updateConsumers failed with error.", { error: g });
|
|
18791
18791
|
} finally {
|
|
18792
|
-
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this,
|
|
18792
|
+
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, rs, !1);
|
|
18793
18793
|
}
|
|
18794
18794
|
a(this, Bn) && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
|
|
18795
18795
|
});
|
|
@@ -19008,7 +19008,7 @@ const _f = (ug = class {
|
|
|
19008
19008
|
const e = this.participants.joined.get(s);
|
|
19009
19009
|
this.roomNodeClient.kick(s), yield this.roomSocketHandler.kick(s), e ? e.emit("kicked") : this.participants.joined.emit("kicked", { id: s });
|
|
19010
19010
|
})), this.context.getValue("peerSessionStore").on(R.UPDATE_ACTIVE, (...r) => u(this, [...r], function* ({ viewMode: s, page: t, createAllConsumers: e } = { viewMode: "ACTIVE_GRID", page: 0, createAllConsumers: !1 }) {
|
|
19011
|
-
this.logger.info(`UPDATE_ACTIVE event received - viewMode: ${a(this,
|
|
19011
|
+
this.logger.info(`UPDATE_ACTIVE event received - viewMode: ${a(this, jt).mode}, page: ${t}, CreateAllConsumers: ${e}`), e && (this.logger.info(`UPDATE_ACTIVE viewMode: ${s}, Page: ${t}, Removing existing subscriptions.`), this.participants.videoSubscribed.clear(), this.participants.audioSubscribed.clear()), this.updateMediaSubscribedMaps(s, { page: t }), this.scheduleSyncConsumers({ source: "UPDATE_ACTIVE" });
|
|
19012
19012
|
}));
|
|
19013
19013
|
}
|
|
19014
19014
|
onParticipantPinned(s) {
|
|
@@ -19361,7 +19361,7 @@ const _f = (ug = class {
|
|
|
19361
19361
|
// priority
|
|
19362
19362
|
})), t && this.context.getValue("peerSessionStore").emit(R.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19363
19363
|
}
|
|
19364
|
-
},
|
|
19364
|
+
}, jt = new WeakMap(), rs = new WeakMap(), Bn = new WeakMap(), ug);
|
|
19365
19365
|
let or = _f;
|
|
19366
19366
|
zi([
|
|
19367
19367
|
P.trace("ParticipantController.setupEvents")
|
|
@@ -19387,8 +19387,8 @@ zi([
|
|
|
19387
19387
|
const he = _s(
|
|
19388
19388
|
th().permissions
|
|
19389
19389
|
);
|
|
19390
|
-
var q, Hn, Fn, wd, at,
|
|
19391
|
-
const on = class extends
|
|
19390
|
+
var q, Hn, Fn, wd, at, Pt;
|
|
19391
|
+
const on = class extends Ot {
|
|
19392
19392
|
constructor(e, r, i, n = !1) {
|
|
19393
19393
|
const o = e.getValue("logger");
|
|
19394
19394
|
super(o);
|
|
@@ -19637,7 +19637,7 @@ const on = class extends Dt {
|
|
|
19637
19637
|
get canProduceVideo() {
|
|
19638
19638
|
var r;
|
|
19639
19639
|
const e = (r = a(this, q).media.video.canProduce) != null ? r : he.media.video.canProduce;
|
|
19640
|
-
return this.stageEnabled && (a(this, at,
|
|
19640
|
+
return this.stageEnabled && (a(this, at, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, at, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, at, Pt) === "OFF_STAGE" || a(this, at, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19641
19641
|
}
|
|
19642
19642
|
/**
|
|
19643
19643
|
* @deprecated in favour of `canProduceScreenshare`
|
|
@@ -19654,7 +19654,7 @@ const on = class extends Dt {
|
|
|
19654
19654
|
get canProduceScreenshare() {
|
|
19655
19655
|
var r;
|
|
19656
19656
|
const e = (r = a(this, q).media.screenshare.canProduce) != null ? r : he.media.screenshare.canProduce;
|
|
19657
|
-
return this.stageEnabled && (a(this, at,
|
|
19657
|
+
return this.stageEnabled && (a(this, at, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, at, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, at, Pt) === "OFF_STAGE" || a(this, at, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19658
19658
|
}
|
|
19659
19659
|
/**
|
|
19660
19660
|
* @deprecated in favour of `canProduceAudio`
|
|
@@ -19671,7 +19671,7 @@ const on = class extends Dt {
|
|
|
19671
19671
|
get canProduceAudio() {
|
|
19672
19672
|
var r;
|
|
19673
19673
|
const e = (r = a(this, q).media.audio.canProduce) != null ? r : he.media.audio.canProduce;
|
|
19674
|
-
return this.stageEnabled && (a(this, at,
|
|
19674
|
+
return this.stageEnabled && (a(this, at, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, at, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, at, Pt) === "OFF_STAGE" || a(this, at, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19675
19675
|
}
|
|
19676
19676
|
/**
|
|
19677
19677
|
* The `chatPublic` shows permissions for public chat
|
|
@@ -19783,11 +19783,11 @@ const on = class extends Dt {
|
|
|
19783
19783
|
}
|
|
19784
19784
|
};
|
|
19785
19785
|
let Tu = on;
|
|
19786
|
-
q = new WeakMap(), Hn = new WeakMap(), Fn = new WeakMap(), wd = new WeakMap(), at = new WeakSet(),
|
|
19786
|
+
q = new WeakMap(), Hn = new WeakMap(), Fn = new WeakMap(), wd = new WeakMap(), at = new WeakSet(), Pt = function() {
|
|
19787
19787
|
return a(this, Fn).getValue("stageStatus");
|
|
19788
19788
|
};
|
|
19789
|
-
var
|
|
19790
|
-
class Cf extends
|
|
19789
|
+
var bt;
|
|
19790
|
+
class Cf extends Ot {
|
|
19791
19791
|
/**
|
|
19792
19792
|
* @param {Context} context
|
|
19793
19793
|
* @param {Logger} logger
|
|
@@ -19795,8 +19795,8 @@ class Cf extends Dt {
|
|
|
19795
19795
|
constructor(e, r) {
|
|
19796
19796
|
super(r);
|
|
19797
19797
|
p(this, "localMediaHandler");
|
|
19798
|
-
m(this,
|
|
19799
|
-
f(this,
|
|
19798
|
+
m(this, bt, void 0);
|
|
19799
|
+
f(this, bt, e);
|
|
19800
19800
|
}
|
|
19801
19801
|
updatePermission() {
|
|
19802
19802
|
return u(this, null, function* () {
|
|
@@ -19804,7 +19804,7 @@ class Cf extends Dt {
|
|
|
19804
19804
|
const e = (h, g) => {
|
|
19805
19805
|
this.mediaPermissions[h] = g;
|
|
19806
19806
|
const S = { message: this.mediaPermissions[h], kind: h };
|
|
19807
|
-
g === "DENIED" ? a(this,
|
|
19807
|
+
g === "DENIED" ? a(this, bt).getValue("peerSessionStore").emit(R.MEDIA_PERMISSION_ERROR, S) : a(this, bt).getValue("peerSessionStore").emit(R.MEDIA_PERMISSION_UPDATE, S);
|
|
19808
19808
|
};
|
|
19809
19809
|
if (fe.getName() === "firefox")
|
|
19810
19810
|
return;
|
|
@@ -19836,15 +19836,15 @@ class Cf extends Dt {
|
|
|
19836
19836
|
var n, o, d, c;
|
|
19837
19837
|
switch (r) {
|
|
19838
19838
|
case "audio": {
|
|
19839
|
-
(n = a(this,
|
|
19839
|
+
(n = a(this, bt)) == null || n.getValue("callstats").mediaPermission("AUDIO", e), (o = a(this, bt)) == null || o.getValue("callstats").mediaPermission("SPEAKER", e);
|
|
19840
19840
|
break;
|
|
19841
19841
|
}
|
|
19842
19842
|
case "video": {
|
|
19843
|
-
(d = a(this,
|
|
19843
|
+
(d = a(this, bt)) == null || d.getValue("callstats").mediaPermission("VIDEO", e);
|
|
19844
19844
|
break;
|
|
19845
19845
|
}
|
|
19846
19846
|
case "screenshare": {
|
|
19847
|
-
(c = a(this,
|
|
19847
|
+
(c = a(this, bt)) == null || c.getValue("callstats").mediaPermission("SCREENSHARE", e);
|
|
19848
19848
|
break;
|
|
19849
19849
|
}
|
|
19850
19850
|
}
|
|
@@ -19852,7 +19852,7 @@ class Cf extends Dt {
|
|
|
19852
19852
|
}
|
|
19853
19853
|
get peerId() {
|
|
19854
19854
|
var e;
|
|
19855
|
-
return (e = a(this,
|
|
19855
|
+
return (e = a(this, bt)) == null ? void 0 : e.getValue("peerId");
|
|
19856
19856
|
}
|
|
19857
19857
|
/**
|
|
19858
19858
|
* @param {Object} options
|
|
@@ -19865,7 +19865,7 @@ class Cf extends Dt {
|
|
|
19865
19865
|
init() {
|
|
19866
19866
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
19867
19867
|
var n, o, d, c, l, h, g;
|
|
19868
|
-
if (fe.init(), i && f(this,
|
|
19868
|
+
if (fe.init(), i && f(this, bt, i), !this.localMediaHandler)
|
|
19869
19869
|
try {
|
|
19870
19870
|
let S = !0;
|
|
19871
19871
|
if ((n = i == null ? void 0 : i.getValue("defaults")) != null && n.mediaHandler)
|
|
@@ -19874,7 +19874,7 @@ class Cf extends Dt {
|
|
|
19874
19874
|
const { RNLocalMediaHandlerImpl: T } = navigator;
|
|
19875
19875
|
this.localMediaHandler = yield T.init(e);
|
|
19876
19876
|
} else
|
|
19877
|
-
this.localMediaHandler = new
|
|
19877
|
+
this.localMediaHandler = new Et(
|
|
19878
19878
|
i,
|
|
19879
19879
|
e.constraints,
|
|
19880
19880
|
(o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
|
|
@@ -19931,7 +19931,7 @@ class Cf extends Dt {
|
|
|
19931
19931
|
});
|
|
19932
19932
|
}
|
|
19933
19933
|
set context(e) {
|
|
19934
|
-
f(this,
|
|
19934
|
+
f(this, bt, e), this.localMediaHandler.context = e;
|
|
19935
19935
|
}
|
|
19936
19936
|
/**
|
|
19937
19937
|
* Returns the `audioTrack`.
|
|
@@ -20194,7 +20194,7 @@ class Cf extends Dt {
|
|
|
20194
20194
|
});
|
|
20195
20195
|
}
|
|
20196
20196
|
}
|
|
20197
|
-
|
|
20197
|
+
bt = new WeakMap();
|
|
20198
20198
|
var VM = Object.defineProperty, xM = Object.getOwnPropertyDescriptor, ht = (s, t, e, r) => {
|
|
20199
20199
|
for (var i = r > 1 ? void 0 : r ? xM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20200
20200
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -20865,14 +20865,14 @@ class uo extends Error {
|
|
|
20865
20865
|
super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, uo) : this.stack = new Error(t).stack;
|
|
20866
20866
|
}
|
|
20867
20867
|
}
|
|
20868
|
-
class
|
|
20868
|
+
class yt extends Error {
|
|
20869
20869
|
constructor(t) {
|
|
20870
|
-
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
20870
|
+
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, yt) : this.stack = new Error(t).stack;
|
|
20871
20871
|
}
|
|
20872
20872
|
}
|
|
20873
20873
|
class mr extends Error {
|
|
20874
20874
|
constructor(t) {
|
|
20875
|
-
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
20875
|
+
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, yt) : this.stack = new Error(t).stack;
|
|
20876
20876
|
}
|
|
20877
20877
|
}
|
|
20878
20878
|
const Hp = (s) => new Promise((t) => setTimeout(t, s));
|
|
@@ -21569,8 +21569,8 @@ class od extends gh {
|
|
|
21569
21569
|
}
|
|
21570
21570
|
const l = (S, T) => {
|
|
21571
21571
|
var B;
|
|
21572
|
-
const E =
|
|
21573
|
-
return E.media[E.media.length - 1].rtp = C, E.media[E.media.length - 1].fmtp = A, E.media[E.media.length - 1].rtcpFb = D, E.media[E.media.length - 1].payloads = U.join(" "),
|
|
21572
|
+
const E = Zt.parse(S), _ = E.media[E.media.length - 1], C = _.rtp.filter((H) => T.some((F) => F.name === H.codec)), A = _.fmtp.filter((H) => C.some((F) => F.payload === H.payload)), D = (B = _.rtcpFb) == null ? void 0 : B.filter((H) => C.some((F) => F.payload === H.payload)), U = C.map((H) => H.payload);
|
|
21573
|
+
return E.media[E.media.length - 1].rtp = C, E.media[E.media.length - 1].fmtp = A, E.media[E.media.length - 1].rtcpFb = D, E.media[E.media.length - 1].payloads = U.join(" "), Zt.write(E);
|
|
21574
21574
|
}, h = yield this.pc.createOffer();
|
|
21575
21575
|
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") {
|
|
21576
21576
|
const { enableDtx: S, enableStereo: T } = this, E = this.enableHighBitrate ? T ? 128e3 : 64e3 : T ? 64e3 : 32e3;
|
|
@@ -21779,7 +21779,7 @@ class jM extends Pl {
|
|
|
21779
21779
|
getStats() {
|
|
21780
21780
|
return u(this, null, function* () {
|
|
21781
21781
|
if (a(this, vs))
|
|
21782
|
-
throw new
|
|
21782
|
+
throw new yt("closed");
|
|
21783
21783
|
return a(this, $o).getReceiverStats(this.localId);
|
|
21784
21784
|
});
|
|
21785
21785
|
}
|
|
@@ -21826,7 +21826,7 @@ $o = new WeakMap(), Ei = new WeakMap(), vs = new WeakMap(), Rd = new WeakMap(),
|
|
|
21826
21826
|
}));
|
|
21827
21827
|
}
|
|
21828
21828
|
};
|
|
21829
|
-
var
|
|
21829
|
+
var is, Kn, zn, Pi, Gt, Ke, br, Yn, Ad, kt, Xt;
|
|
21830
21830
|
class GM extends Pl {
|
|
21831
21831
|
/**
|
|
21832
21832
|
* @emits transportclose
|
|
@@ -21839,7 +21839,7 @@ class GM extends Pl {
|
|
|
21839
21839
|
constructor(e, r) {
|
|
21840
21840
|
var i, n;
|
|
21841
21841
|
super(e);
|
|
21842
|
-
m(this,
|
|
21842
|
+
m(this, kt);
|
|
21843
21843
|
/**
|
|
21844
21844
|
* Producer ID.
|
|
21845
21845
|
*/
|
|
@@ -21851,7 +21851,7 @@ class GM extends Pl {
|
|
|
21851
21851
|
/**
|
|
21852
21852
|
* Associated RTCRtpSender.
|
|
21853
21853
|
*/
|
|
21854
|
-
m(this,
|
|
21854
|
+
m(this, is, void 0);
|
|
21855
21855
|
/**
|
|
21856
21856
|
* Kind of media on to this producer
|
|
21857
21857
|
*/
|
|
@@ -21876,18 +21876,18 @@ class GM extends Pl {
|
|
|
21876
21876
|
* Specify if we should replace the RTCRtpSender.track with null when paused.
|
|
21877
21877
|
*/
|
|
21878
21878
|
m(this, Pi, void 0);
|
|
21879
|
-
m(this,
|
|
21879
|
+
m(this, Gt, !1);
|
|
21880
21880
|
m(this, Ke, void 0);
|
|
21881
21881
|
m(this, br, void 0);
|
|
21882
21882
|
m(this, Yn, void 0);
|
|
21883
21883
|
m(this, Ad, void 0);
|
|
21884
|
-
this.id = r.id, this.localId = r.localId, f(this, Ke, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, br, r.disableTrackOnPause ? !((n = r.track) != null && n.enabled) : !1), f(this, Yn, void 0), f(this, Kn, r.stopTracks), f(this, zn, r.disableTrackOnPause), f(this, Pi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this,
|
|
21884
|
+
this.id = r.id, this.localId = r.localId, f(this, Ke, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, br, r.disableTrackOnPause ? !((n = r.track) != null && n.enabled) : !1), f(this, Yn, void 0), f(this, Kn, r.stopTracks), f(this, zn, r.disableTrackOnPause), f(this, Pi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, is, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Ad, e);
|
|
21885
21885
|
}
|
|
21886
21886
|
/**
|
|
21887
21887
|
* Whether the Producer is closed.
|
|
21888
21888
|
*/
|
|
21889
21889
|
get closed() {
|
|
21890
|
-
return a(this,
|
|
21890
|
+
return a(this, Gt);
|
|
21891
21891
|
}
|
|
21892
21892
|
/**
|
|
21893
21893
|
* The associated track.
|
|
@@ -21914,13 +21914,13 @@ class GM extends Pl {
|
|
|
21914
21914
|
*/
|
|
21915
21915
|
close(e) {
|
|
21916
21916
|
return u(this, null, function* () {
|
|
21917
|
-
if (a(this,
|
|
21917
|
+
if (a(this, Gt))
|
|
21918
21918
|
return;
|
|
21919
|
-
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, a(this,
|
|
21919
|
+
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, a(this, kt, Xt)), f(this, Gt, !0), this._destroyTrack(), e === cd) {
|
|
21920
21920
|
this.safeEmit("close", { reason: e });
|
|
21921
21921
|
return;
|
|
21922
21922
|
}
|
|
21923
|
-
const { offerSdp: r, callback: i } = yield a(this,
|
|
21923
|
+
const { offerSdp: r, callback: i } = yield a(this, is).stopSending(this.localId), { answer: n } = yield this.safeEmitAsPromise("close", { offer: r, reason: e });
|
|
21924
21924
|
i(n);
|
|
21925
21925
|
});
|
|
21926
21926
|
}
|
|
@@ -21929,26 +21929,26 @@ class GM extends Pl {
|
|
|
21929
21929
|
*/
|
|
21930
21930
|
getStats() {
|
|
21931
21931
|
return u(this, null, function* () {
|
|
21932
|
-
if (a(this,
|
|
21933
|
-
throw new
|
|
21934
|
-
return a(this,
|
|
21932
|
+
if (a(this, Gt))
|
|
21933
|
+
throw new yt("closed");
|
|
21934
|
+
return a(this, is).getSenderStats(this.localId);
|
|
21935
21935
|
});
|
|
21936
21936
|
}
|
|
21937
21937
|
/**
|
|
21938
21938
|
* Pauses sending media.
|
|
21939
21939
|
*/
|
|
21940
21940
|
pause() {
|
|
21941
|
-
this.logger.debug("Producer::pause()", a(this,
|
|
21941
|
+
this.logger.debug("Producer::pause()", a(this, kt, Xt)), a(this, Gt) && this.logger.error("Producer::pause() | Producer closed", a(this, kt, Xt)), f(this, br, !0), a(this, Ke) && a(this, zn) && (a(this, Ke).enabled = !1), a(this, Pi) && a(this, is).replaceTrack(this.localId, null), this.emit("pause");
|
|
21942
21942
|
}
|
|
21943
21943
|
/**
|
|
21944
21944
|
* Resumes sending media.
|
|
21945
21945
|
*/
|
|
21946
21946
|
resume() {
|
|
21947
|
-
if (this.logger.debug("Producer::resume()", a(this,
|
|
21948
|
-
this.logger.error("Producer::resume() | Producer closed", a(this,
|
|
21947
|
+
if (this.logger.debug("Producer::resume()", a(this, kt, Xt)), a(this, Gt)) {
|
|
21948
|
+
this.logger.error("Producer::resume() | Producer closed", a(this, kt, Xt));
|
|
21949
21949
|
return;
|
|
21950
21950
|
}
|
|
21951
|
-
f(this, br, !1), a(this, Ke) && a(this, zn) && (a(this, Ke).enabled = !0), a(this, Pi) && a(this,
|
|
21951
|
+
f(this, br, !1), a(this, Ke) && a(this, zn) && (a(this, Ke).enabled = !0), a(this, Pi) && a(this, is).replaceTrack(this.localId, a(this, Ke)), this.emit("resume");
|
|
21952
21952
|
}
|
|
21953
21953
|
/**
|
|
21954
21954
|
* Replaces the current track with a new one or null.
|
|
@@ -21957,23 +21957,23 @@ class GM extends Pl {
|
|
|
21957
21957
|
return u(this, arguments, function* ({
|
|
21958
21958
|
track: e
|
|
21959
21959
|
}) {
|
|
21960
|
-
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this,
|
|
21960
|
+
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this, kt, Xt)), a(this, Gt)) {
|
|
21961
21961
|
if (e && a(this, Kn))
|
|
21962
21962
|
try {
|
|
21963
21963
|
e.stop();
|
|
21964
21964
|
} catch (i) {
|
|
21965
|
-
this.logger.error("Producer::replaceTrack", W(N({}, a(this,
|
|
21965
|
+
this.logger.error("Producer::replaceTrack", W(N({}, a(this, kt, Xt)), {
|
|
21966
21966
|
error: i
|
|
21967
21967
|
}));
|
|
21968
21968
|
}
|
|
21969
|
-
throw new
|
|
21969
|
+
throw new yt("closed");
|
|
21970
21970
|
} else if (e && e.readyState === "ended")
|
|
21971
|
-
throw new
|
|
21971
|
+
throw new yt("track ended");
|
|
21972
21972
|
if (e === a(this, Ke)) {
|
|
21973
|
-
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this,
|
|
21973
|
+
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this, kt, Xt));
|
|
21974
21974
|
return;
|
|
21975
21975
|
}
|
|
21976
|
-
(!a(this, Pi) || !a(this, br)) && (yield a(this,
|
|
21976
|
+
(!a(this, Pi) || !a(this, br)) && (yield a(this, is).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Ke, e), this._handleTrack();
|
|
21977
21977
|
});
|
|
21978
21978
|
}
|
|
21979
21979
|
/**
|
|
@@ -21981,13 +21981,13 @@ class GM extends Pl {
|
|
|
21981
21981
|
*/
|
|
21982
21982
|
setMaxSpatialLayer(e) {
|
|
21983
21983
|
return u(this, null, function* () {
|
|
21984
|
-
if (a(this,
|
|
21985
|
-
throw new
|
|
21984
|
+
if (a(this, Gt))
|
|
21985
|
+
throw new yt("closed");
|
|
21986
21986
|
if (this.kind !== "video")
|
|
21987
21987
|
throw new uo("not a video Producer");
|
|
21988
21988
|
if (typeof e != "number")
|
|
21989
21989
|
throw new TypeError("invalid spatialLayer");
|
|
21990
|
-
yield a(this,
|
|
21990
|
+
yield a(this, is).setMaxSpatialLayer(this.localId, e), f(this, Yn, e);
|
|
21991
21991
|
});
|
|
21992
21992
|
}
|
|
21993
21993
|
/**
|
|
@@ -21995,15 +21995,15 @@ class GM extends Pl {
|
|
|
21995
21995
|
*/
|
|
21996
21996
|
setRtpEncodingParameters(e) {
|
|
21997
21997
|
return u(this, null, function* () {
|
|
21998
|
-
if (a(this,
|
|
21999
|
-
throw new
|
|
21998
|
+
if (a(this, Gt))
|
|
21999
|
+
throw new yt("closed");
|
|
22000
22000
|
if (typeof e != "object")
|
|
22001
22001
|
throw new TypeError("invalid params");
|
|
22002
|
-
yield a(this,
|
|
22002
|
+
yield a(this, is).setRtpEncodingParameters(this.localId, e);
|
|
22003
22003
|
});
|
|
22004
22004
|
}
|
|
22005
22005
|
_onTrackEnded() {
|
|
22006
|
-
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, a(this,
|
|
22006
|
+
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, a(this, kt, Xt)), this.safeEmit("trackended", this.track.id);
|
|
22007
22007
|
}
|
|
22008
22008
|
_handleTrack() {
|
|
22009
22009
|
a(this, Ke) && a(this, Ke).addEventListener("ended", this._onTrackEnded);
|
|
@@ -22014,13 +22014,13 @@ class GM extends Pl {
|
|
|
22014
22014
|
try {
|
|
22015
22015
|
a(this, Ke).removeEventListener("ended", this._onTrackEnded), a(this, Kn) && a(this, Ke).stop();
|
|
22016
22016
|
} catch (r) {
|
|
22017
|
-
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, W(N({}, a(this,
|
|
22017
|
+
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, W(N({}, a(this, kt, Xt)), {
|
|
22018
22018
|
error: r
|
|
22019
22019
|
}));
|
|
22020
22020
|
}
|
|
22021
22021
|
}
|
|
22022
22022
|
}
|
|
22023
|
-
|
|
22023
|
+
is = new WeakMap(), Kn = new WeakMap(), zn = new WeakMap(), Pi = new WeakMap(), Gt = new WeakMap(), Ke = new WeakMap(), br = new WeakMap(), Yn = new WeakMap(), Ad = new WeakMap(), kt = new WeakSet(), Xt = function() {
|
|
22024
22024
|
return {
|
|
22025
22025
|
producer: {
|
|
22026
22026
|
id: this.id,
|
|
@@ -22345,7 +22345,7 @@ const dn = class extends Pl {
|
|
|
22345
22345
|
getStats() {
|
|
22346
22346
|
return u(this, null, function* () {
|
|
22347
22347
|
if (this.closed)
|
|
22348
|
-
throw new
|
|
22348
|
+
throw new yt("closed");
|
|
22349
22349
|
return this.handler.getTransportStats();
|
|
22350
22350
|
});
|
|
22351
22351
|
}
|
|
@@ -22371,7 +22371,7 @@ const dn = class extends Pl {
|
|
|
22371
22371
|
restartIce() {
|
|
22372
22372
|
return u(this, null, function* () {
|
|
22373
22373
|
if (this.logger.debug("restartIce()"), this.closed)
|
|
22374
|
-
throw new
|
|
22374
|
+
throw new yt("closed");
|
|
22375
22375
|
return this.handler.restartIce();
|
|
22376
22376
|
});
|
|
22377
22377
|
}
|
|
@@ -22382,7 +22382,7 @@ const dn = class extends Pl {
|
|
|
22382
22382
|
if (this.direction !== "send")
|
|
22383
22383
|
throw new uo("not a sending Transport");
|
|
22384
22384
|
if (r.readyState === "ended")
|
|
22385
|
-
throw new
|
|
22385
|
+
throw new yt("track ended");
|
|
22386
22386
|
if (i && typeof i != "object")
|
|
22387
22387
|
throw new TypeError("if given, appData must be an object");
|
|
22388
22388
|
} else
|
|
@@ -22458,7 +22458,7 @@ const dn = class extends Pl {
|
|
|
22458
22458
|
canConsume() {
|
|
22459
22459
|
return u(this, null, function* () {
|
|
22460
22460
|
if (this.closed)
|
|
22461
|
-
throw new
|
|
22461
|
+
throw new yt("closed");
|
|
22462
22462
|
if (this.direction !== "recv")
|
|
22463
22463
|
throw new uo("not a receiving transport");
|
|
22464
22464
|
if (!(yield this.transportConnectionPromise))
|
|
@@ -22492,7 +22492,7 @@ const dn = class extends Pl {
|
|
|
22492
22492
|
});
|
|
22493
22493
|
}
|
|
22494
22494
|
static parseCodecAndFmtpMappings(e, r) {
|
|
22495
|
-
const i =
|
|
22495
|
+
const i = Zt.parse(e.sdp), n = {};
|
|
22496
22496
|
return i.media.forEach((o) => {
|
|
22497
22497
|
r.includes(o.mid.toString()) && (n[o.mid.toString()] = {
|
|
22498
22498
|
rtp: o.rtp,
|
|
@@ -22503,7 +22503,7 @@ const dn = class extends Pl {
|
|
|
22503
22503
|
}), n;
|
|
22504
22504
|
}
|
|
22505
22505
|
static setCodecAndFmtpMappings(e, r, i) {
|
|
22506
|
-
const n =
|
|
22506
|
+
const n = Zt.parse(e.sdp);
|
|
22507
22507
|
return n.media = n.media.map((d) => {
|
|
22508
22508
|
if (r.includes(d.mid.toString())) {
|
|
22509
22509
|
const c = N({}, d);
|
|
@@ -22511,22 +22511,22 @@ const dn = class extends Pl {
|
|
|
22511
22511
|
}
|
|
22512
22512
|
return d;
|
|
22513
22513
|
}), W(N({}, e), {
|
|
22514
|
-
sdp:
|
|
22514
|
+
sdp: Zt.write(n)
|
|
22515
22515
|
});
|
|
22516
22516
|
}
|
|
22517
22517
|
static parseHeaderExtensionMappings(e) {
|
|
22518
|
-
const r =
|
|
22518
|
+
const r = Zt.parse(e.sdp), i = {};
|
|
22519
22519
|
return r.media.forEach((n) => {
|
|
22520
22520
|
i[n.mid] = n.ext;
|
|
22521
22521
|
}), i;
|
|
22522
22522
|
}
|
|
22523
22523
|
static setHeaderExtensionMappings(e, r) {
|
|
22524
|
-
const i =
|
|
22524
|
+
const i = Zt.parse(e.sdp);
|
|
22525
22525
|
return i.media = i.media.map((o) => {
|
|
22526
22526
|
const d = N({}, o);
|
|
22527
22527
|
return d.ext = r[o.mid], d;
|
|
22528
22528
|
}), W(N({}, e), {
|
|
22529
|
-
sdp:
|
|
22529
|
+
sdp: Zt.write(i)
|
|
22530
22530
|
});
|
|
22531
22531
|
}
|
|
22532
22532
|
closeConsumers(e, r) {
|
|
@@ -22561,7 +22561,7 @@ const dn = class extends Pl {
|
|
|
22561
22561
|
this.logger.info("[SDP] Received offer from SFU", { sdp: e.sdp }), yield this.setRemoteDescription(e);
|
|
22562
22562
|
const r = yield this.handler.pc.createAnswer();
|
|
22563
22563
|
this.logger.info("[SDP] Created answer corresponding to received offer", { sdp: r.sdp });
|
|
22564
|
-
const i =
|
|
22564
|
+
const i = Zt.parse(r.sdp);
|
|
22565
22565
|
return i.media = i.media.map((n) => {
|
|
22566
22566
|
if (n.type === "audio") {
|
|
22567
22567
|
const o = N({}, n), d = o.fmtp.find(
|
|
@@ -22575,7 +22575,7 @@ const dn = class extends Pl {
|
|
|
22575
22575
|
}), o;
|
|
22576
22576
|
}
|
|
22577
22577
|
return n;
|
|
22578
|
-
}), r.sdp =
|
|
22578
|
+
}), r.sdp = Zt.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;
|
|
22579
22579
|
} catch (r) {
|
|
22580
22580
|
throw this.logger.error("Set remote offer failed", { error: r }), r;
|
|
22581
22581
|
}
|
|
@@ -22917,7 +22917,7 @@ Qn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ho = new WeakMap(),
|
|
|
22917
22917
|
return u(this, null, function* () {
|
|
22918
22918
|
var o, d, c, l, h, g, S, T;
|
|
22919
22919
|
Sa(this.context, "forceRelay") && f(this, ys, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, ys)}`);
|
|
22920
|
-
const n = yield
|
|
22920
|
+
const n = yield Tt().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
22921
22921
|
e.send && V(this, Od, Mf).call(this, {
|
|
22922
22922
|
iceServers: n,
|
|
22923
22923
|
additionalSettings: {
|
|
@@ -23141,13 +23141,13 @@ Qn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ho = new WeakMap(),
|
|
|
23141
23141
|
}, a(this, ea, Kc).mediaState[i])
|
|
23142
23142
|
);
|
|
23143
23143
|
};
|
|
23144
|
-
var xd,
|
|
23144
|
+
var xd, Wt;
|
|
23145
23145
|
class XM {
|
|
23146
23146
|
constructor(t, e, r, i, n) {
|
|
23147
23147
|
/* eslint-disable-next-line no-useless-constructor */
|
|
23148
23148
|
m(this, xd, void 0);
|
|
23149
|
-
m(this,
|
|
23150
|
-
this.events = e, this.recvTransport = r, this.socket = i, this.socketHandler = n, f(this, xd, t), f(this,
|
|
23149
|
+
m(this, Wt, void 0);
|
|
23150
|
+
this.events = e, this.recvTransport = r, this.socket = i, this.socketHandler = n, f(this, xd, t), f(this, Wt, t.getValue("logger"));
|
|
23151
23151
|
}
|
|
23152
23152
|
create(t) {
|
|
23153
23153
|
return u(this, null, function* () {
|
|
@@ -23179,7 +23179,7 @@ class XM {
|
|
|
23179
23179
|
if (!h)
|
|
23180
23180
|
return;
|
|
23181
23181
|
if (l.errorCode) {
|
|
23182
|
-
a(this,
|
|
23182
|
+
a(this, Wt).warn(`Consumer request failed for producer ${c}`, {
|
|
23183
23183
|
error: { message: l.errorCode }
|
|
23184
23184
|
}), d.push(W(N({}, h), { errorCode: l.errorCode }));
|
|
23185
23185
|
return;
|
|
@@ -23207,7 +23207,7 @@ class XM {
|
|
|
23207
23207
|
negotiate(t) {
|
|
23208
23208
|
return u(this, null, function* () {
|
|
23209
23209
|
try {
|
|
23210
|
-
a(this,
|
|
23210
|
+
a(this, Wt).info("Negotiating socket consumer", { transport: this.recvTransport }), a(this, Wt).debug(`[SDP] setting remote offer: ${JSON.stringify(t)} on recvTransport`, {
|
|
23211
23211
|
transport: this.recvTransport
|
|
23212
23212
|
});
|
|
23213
23213
|
const e = yield this.recvTransport.setRemoteOffer(t), r = {
|
|
@@ -23218,14 +23218,14 @@ class XM {
|
|
|
23218
23218
|
target: er.SUBSCRIBER
|
|
23219
23219
|
}
|
|
23220
23220
|
};
|
|
23221
|
-
return a(this,
|
|
23221
|
+
return a(this, Wt).debug(`sending renegotiate request: ${JSON.stringify(r)} on recvTransport`, {
|
|
23222
23222
|
transport: this.recvTransport
|
|
23223
23223
|
}), yield this.socket.sendMessagePromise(
|
|
23224
23224
|
this.events.renegotiateSessionDescription,
|
|
23225
23225
|
QC.toBinary(r)
|
|
23226
|
-
), a(this,
|
|
23226
|
+
), a(this, Wt).info("Renegotiation done", { transport: this.recvTransport }), e;
|
|
23227
23227
|
} catch (e) {
|
|
23228
|
-
a(this,
|
|
23228
|
+
a(this, Wt).error("Failed to renegotiate", { error: e });
|
|
23229
23229
|
return;
|
|
23230
23230
|
}
|
|
23231
23231
|
});
|
|
@@ -23236,7 +23236,7 @@ class XM {
|
|
|
23236
23236
|
return {};
|
|
23237
23237
|
const e = (r, i) => u(this, null, function* () {
|
|
23238
23238
|
const n = r.map((l) => l.localId);
|
|
23239
|
-
a(this,
|
|
23239
|
+
a(this, Wt).info(`Closing consumers: ${JSON.stringify(n)}`);
|
|
23240
23240
|
const o = {
|
|
23241
23241
|
description: {
|
|
23242
23242
|
sdp: i.sdp,
|
|
@@ -23271,18 +23271,18 @@ class XM {
|
|
|
23271
23271
|
ridNotAvailable: "asciibetical"
|
|
23272
23272
|
}
|
|
23273
23273
|
});
|
|
23274
|
-
}), yield this.socketHandler.updateConsumersSimulcastConfig(r), a(this,
|
|
23274
|
+
}), yield this.socketHandler.updateConsumersSimulcastConfig(r), a(this, Wt).info(`Consumers switched layers to ${e}`, { consumerIds: i == null ? void 0 : i.map(({ id: n }) => n) });
|
|
23275
23275
|
});
|
|
23276
23276
|
}
|
|
23277
23277
|
}
|
|
23278
|
-
xd = new WeakMap(),
|
|
23278
|
+
xd = new WeakMap(), Wt = new WeakMap();
|
|
23279
23279
|
class Sh {
|
|
23280
23280
|
/* eslint-disable-next-line no-useless-constructor, no-empty-function */
|
|
23281
23281
|
constructor(t) {
|
|
23282
23282
|
this.socketHandler = t;
|
|
23283
23283
|
}
|
|
23284
23284
|
static getMSIDFromSDP(t, e) {
|
|
23285
|
-
return
|
|
23285
|
+
return Zt.parse(t).media.filter(
|
|
23286
23286
|
(n) => e === "video" ? n.type === "video" : n.type === "audio"
|
|
23287
23287
|
).at(-1).msid;
|
|
23288
23288
|
}
|
|
@@ -23529,7 +23529,7 @@ ki = new WeakMap(), Ar = new WeakMap(), ta = new WeakMap(), Ko = new WeakMap(),
|
|
|
23529
23529
|
peerId: e.peerId
|
|
23530
23530
|
});
|
|
23531
23531
|
};
|
|
23532
|
-
var Yo, Qo, Xo, ra, ia, na, Zo, ec, aa, gt,
|
|
23532
|
+
var Yo, Qo, Xo, ra, ia, na, Zo, ec, aa, gt, ns, as, Ai, Ii, Hs, tc, qd, $f, jd, Bf, Gd, Hf, Wd, Ff;
|
|
23533
23533
|
const Jd = class {
|
|
23534
23534
|
constructor({
|
|
23535
23535
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -23565,16 +23565,16 @@ const Jd = class {
|
|
|
23565
23565
|
m(this, aa, void 0);
|
|
23566
23566
|
// State variables
|
|
23567
23567
|
m(this, gt, void 0);
|
|
23568
|
-
m(this,
|
|
23569
|
-
m(this,
|
|
23568
|
+
m(this, ns, void 0);
|
|
23569
|
+
m(this, as, !1);
|
|
23570
23570
|
m(this, Ai, 0);
|
|
23571
23571
|
m(this, Ii, 0);
|
|
23572
23572
|
m(this, Hs, []);
|
|
23573
23573
|
m(this, tc, void 0);
|
|
23574
|
-
f(this, ra, t), f(this, gt, t), f(this, Yo, e), f(this, Qo, r), f(this, Xo, i), f(this, ia, n), f(this, na, o), f(this, Zo, d), f(this, ec, c), f(this, aa, l), f(this, tc, h), f(this,
|
|
23574
|
+
f(this, ra, t), f(this, gt, t), f(this, Yo, e), f(this, Qo, r), f(this, Xo, i), f(this, ia, n), f(this, na, o), f(this, Zo, d), f(this, ec, c), f(this, aa, l), f(this, tc, h), f(this, ns, t / 2);
|
|
23575
23575
|
}
|
|
23576
23576
|
get voiceDetected() {
|
|
23577
|
-
return a(this,
|
|
23577
|
+
return a(this, as);
|
|
23578
23578
|
}
|
|
23579
23579
|
/**
|
|
23580
23580
|
* Process an audio chunk and determine if it contains voice activity
|
|
@@ -23584,13 +23584,13 @@ const Jd = class {
|
|
|
23584
23584
|
processAudioChunk(t) {
|
|
23585
23585
|
var o, d;
|
|
23586
23586
|
const e = V(o = Jd, Gd, Hf).call(o, t), r = V(d = Jd, Wd, Ff).call(d, t);
|
|
23587
|
-
return V(this, qd, $f).call(this, e), e / a(this,
|
|
23587
|
+
return V(this, qd, $f).call(this, e), e / a(this, ns) > a(this, aa) && e > a(this, gt) && r > a(this, Yo) ? (f(this, Ai, a(this, Ai) + 1), f(this, Ii, a(this, Xo)), a(this, Ai) >= a(this, Qo) && f(this, as, !0)) : (f(this, Ai, 0), a(this, Ii) > 0 ? f(this, Ii, a(this, Ii) - 1) : a(this, as) && f(this, as, !1), a(this, as) || V(this, jd, Bf).call(this, e)), { energy: e, isVoice: a(this, as) };
|
|
23588
23588
|
}
|
|
23589
23589
|
/**
|
|
23590
23590
|
* Reset the detector state
|
|
23591
23591
|
*/
|
|
23592
23592
|
reset() {
|
|
23593
|
-
f(this,
|
|
23593
|
+
f(this, as, !1), f(this, Ai, 0), f(this, Ii, 0), f(this, gt, a(this, ra)), f(this, ns, a(this, ra) / 2), f(this, Hs, []);
|
|
23594
23594
|
}
|
|
23595
23595
|
/**
|
|
23596
23596
|
* Get current adaptive threshold values for debugging/visualization
|
|
@@ -23598,14 +23598,14 @@ const Jd = class {
|
|
|
23598
23598
|
getThresholdInfo() {
|
|
23599
23599
|
return {
|
|
23600
23600
|
currentEnergyThreshold: a(this, gt),
|
|
23601
|
-
backgroundNoiseEnergy: a(this,
|
|
23601
|
+
backgroundNoiseEnergy: a(this, ns),
|
|
23602
23602
|
energyRatioThreshold: a(this, aa)
|
|
23603
23603
|
};
|
|
23604
23604
|
}
|
|
23605
23605
|
};
|
|
23606
23606
|
let Wa = Jd;
|
|
23607
|
-
Yo = new WeakMap(), Qo = new WeakMap(), Xo = new WeakMap(), ra = new WeakMap(), ia = new WeakMap(), na = new WeakMap(), Zo = new WeakMap(), ec = new WeakMap(), aa = new WeakMap(), gt = new WeakMap(),
|
|
23608
|
-
a(this,
|
|
23607
|
+
Yo = new WeakMap(), Qo = new WeakMap(), Xo = new WeakMap(), ra = new WeakMap(), ia = new WeakMap(), na = new WeakMap(), Zo = new WeakMap(), ec = new WeakMap(), aa = new WeakMap(), gt = new WeakMap(), ns = new WeakMap(), as = new WeakMap(), Ai = new WeakMap(), Ii = new WeakMap(), Hs = new WeakMap(), tc = new WeakMap(), qd = new WeakSet(), $f = function(t) {
|
|
23608
|
+
a(this, as) ? f(this, gt, a(this, na) * a(this, gt) + (1 - a(this, na)) * t) : f(this, gt, a(this, ia) * a(this, gt) + (1 - a(this, ia)) * a(this, ns)), f(this, gt, Math.max(
|
|
23609
23609
|
a(this, Zo),
|
|
23610
23610
|
Math.min(a(this, ec), a(this, gt))
|
|
23611
23611
|
));
|
|
@@ -23613,9 +23613,9 @@ Yo = new WeakMap(), Qo = new WeakMap(), Xo = new WeakMap(), ra = new WeakMap(),
|
|
|
23613
23613
|
if (t < a(this, gt) * 1.2)
|
|
23614
23614
|
if (a(this, Hs).push(t), a(this, Hs).length > a(this, tc) && a(this, Hs).shift(), a(this, Hs).length >= 10) {
|
|
23615
23615
|
const e = [...a(this, Hs)].sort((i, n) => i - n), r = Math.floor(e.length / 2);
|
|
23616
|
-
f(this,
|
|
23616
|
+
f(this, ns, e[r]);
|
|
23617
23617
|
} else
|
|
23618
|
-
f(this,
|
|
23618
|
+
f(this, ns, 0.95 * a(this, ns) + 0.05 * t);
|
|
23619
23619
|
}, Gd = new WeakSet(), Hf = function(t) {
|
|
23620
23620
|
return Math.sqrt(
|
|
23621
23621
|
t.map((e) => e * e).reduce((e, r) => e + r) / t.length
|
|
@@ -23783,7 +23783,7 @@ var rD = Object.defineProperty, iD = Object.getOwnPropertyDescriptor, oe = (s, t
|
|
|
23783
23783
|
for (var i = r > 1 ? void 0 : r ? iD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
23784
23784
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23785
23785
|
return r && i && rD(t, e, i), i;
|
|
23786
|
-
}, ac, oc, et, G, Qd, ct, Oi, Ni, Li, cc,
|
|
23786
|
+
}, ac, oc, et, G, Qd, ct, Oi, Ni, Li, cc, Jt, Ws, dt, mt, Mr, tn, Xd, Wf, Zd, Jf, el, Kf, dc, Iu, tl, zf, sl, Yf, lt, _t, Vi, Ka, rl, Qf, il, Xf, nl, Zf;
|
|
23787
23787
|
class ie {
|
|
23788
23788
|
constructor(t, e) {
|
|
23789
23789
|
m(this, Mr);
|
|
@@ -23832,7 +23832,7 @@ class ie {
|
|
|
23832
23832
|
m(this, Ni, void 0);
|
|
23833
23833
|
m(this, Li, void 0);
|
|
23834
23834
|
m(this, cc, void 0);
|
|
23835
|
-
m(this,
|
|
23835
|
+
m(this, Jt, null);
|
|
23836
23836
|
m(this, Ws, void 0);
|
|
23837
23837
|
m(this, dt, void 0);
|
|
23838
23838
|
m(this, mt, void 0);
|
|
@@ -23884,7 +23884,7 @@ class ie {
|
|
|
23884
23884
|
a(this, Mr, tn).mediaJoined = t;
|
|
23885
23885
|
}
|
|
23886
23886
|
reset() {
|
|
23887
|
-
a(this, G).closeAllProducers(), a(this, G).closeAllConsumers(), a(this, dt).clear(), a(this, Ws).clear(), f(this,
|
|
23887
|
+
a(this, G).closeAllProducers(), a(this, G).closeAllConsumers(), a(this, dt).clear(), a(this, Ws).clear(), f(this, Jt, null), a(this, Li).stop(), a(this, G).stopAllTransports(), a(this, G).reset(), f(this, Li, new Eu());
|
|
23888
23888
|
}
|
|
23889
23889
|
joinRoom(o, d) {
|
|
23890
23890
|
return u(this, arguments, function* (t, e, r = !1, i = !1, n = {}) {
|
|
@@ -23906,13 +23906,13 @@ class ie {
|
|
|
23906
23906
|
*/
|
|
23907
23907
|
initializeConnection(n, o) {
|
|
23908
23908
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
23909
|
-
return a(this,
|
|
23909
|
+
return a(this, Jt) ? a(this, Jt) : (f(this, Jt, (() => u(this, null, function* () {
|
|
23910
23910
|
try {
|
|
23911
23911
|
yield V(this, dc, Iu).call(this, t, e, r, i);
|
|
23912
23912
|
} catch (d) {
|
|
23913
|
-
throw f(this,
|
|
23913
|
+
throw f(this, Jt, null), d;
|
|
23914
23914
|
}
|
|
23915
|
-
}))()), a(this,
|
|
23915
|
+
}))()), a(this, Jt));
|
|
23916
23916
|
});
|
|
23917
23917
|
}
|
|
23918
23918
|
getConsumers() {
|
|
@@ -23968,7 +23968,7 @@ class ie {
|
|
|
23968
23968
|
_shareWebcam(t) {
|
|
23969
23969
|
return u(this, null, function* () {
|
|
23970
23970
|
var h, g, S, T;
|
|
23971
|
-
const e = Ce.WEBCAM, r = V(this, lt,
|
|
23971
|
+
const e = Ce.WEBCAM, r = V(this, lt, _t).call(this, e);
|
|
23972
23972
|
if (r) {
|
|
23973
23973
|
const E = yield r;
|
|
23974
23974
|
if (a(this, G).producers.has(E)) {
|
|
@@ -24046,8 +24046,8 @@ class ie {
|
|
|
24046
24046
|
return u(this, null, function* () {
|
|
24047
24047
|
try {
|
|
24048
24048
|
if (t === void 0)
|
|
24049
|
-
throw new
|
|
24050
|
-
const e = V(this, lt,
|
|
24049
|
+
throw new yt("track undefined");
|
|
24050
|
+
const e = V(this, lt, _t).call(this, Ce.MIC);
|
|
24051
24051
|
if (e) {
|
|
24052
24052
|
const o = yield e;
|
|
24053
24053
|
if (a(this, G).producers.has(o)) {
|
|
@@ -24078,7 +24078,7 @@ class ie {
|
|
|
24078
24078
|
pauseMic() {
|
|
24079
24079
|
return u(this, null, function* () {
|
|
24080
24080
|
var i;
|
|
24081
|
-
const t = yield V(this, lt,
|
|
24081
|
+
const t = yield V(this, lt, _t).call(this, Ce.MIC), e = a(this, G).producers.get(t);
|
|
24082
24082
|
if (!e) {
|
|
24083
24083
|
this.logger.error("pauseMic::could_not_find_mic_producer");
|
|
24084
24084
|
return;
|
|
@@ -24100,7 +24100,7 @@ class ie {
|
|
|
24100
24100
|
}
|
|
24101
24101
|
pauseWebcam() {
|
|
24102
24102
|
return u(this, null, function* () {
|
|
24103
|
-
const t = yield V(this, lt,
|
|
24103
|
+
const t = yield V(this, lt, _t).call(this, Ce.WEBCAM), e = a(this, G).producers.get(t);
|
|
24104
24104
|
if (!e) {
|
|
24105
24105
|
this.logger.error("pauseWebcam::could_not_find_webcam_producer");
|
|
24106
24106
|
return;
|
|
@@ -24118,7 +24118,7 @@ class ie {
|
|
|
24118
24118
|
}
|
|
24119
24119
|
resumeMic() {
|
|
24120
24120
|
return u(this, null, function* () {
|
|
24121
|
-
const t = yield V(this, lt,
|
|
24121
|
+
const t = yield V(this, lt, _t).call(this, Ce.MIC), e = a(this, G).producers.get(t);
|
|
24122
24122
|
if (!e) {
|
|
24123
24123
|
this.logger.error("resumeMic::could_not_find_mic_producer");
|
|
24124
24124
|
return;
|
|
@@ -24140,7 +24140,7 @@ class ie {
|
|
|
24140
24140
|
}
|
|
24141
24141
|
resumeWebcam() {
|
|
24142
24142
|
return u(this, arguments, function* (t = Ce.WEBCAM) {
|
|
24143
|
-
const e = yield V(this, lt,
|
|
24143
|
+
const e = yield V(this, lt, _t).call(this, t), r = a(this, G).producers.get(e);
|
|
24144
24144
|
if (!r) {
|
|
24145
24145
|
this.logger.error("resumeWebcam::could_not_find_webcam_producer");
|
|
24146
24146
|
return;
|
|
@@ -24162,21 +24162,21 @@ class ie {
|
|
|
24162
24162
|
}
|
|
24163
24163
|
disableWebcam() {
|
|
24164
24164
|
return u(this, null, function* () {
|
|
24165
|
-
const t = Ce.WEBCAM, e = yield V(this, lt,
|
|
24165
|
+
const t = Ce.WEBCAM, e = yield V(this, lt, _t).call(this, t);
|
|
24166
24166
|
V(this, rl, Qf).call(this, t), e && (yield a(this, G).closeProducer(e));
|
|
24167
24167
|
});
|
|
24168
24168
|
}
|
|
24169
24169
|
disableMic() {
|
|
24170
24170
|
return u(this, null, function* () {
|
|
24171
24171
|
var e;
|
|
24172
|
-
const t = yield V(this, lt,
|
|
24172
|
+
const t = yield V(this, lt, _t).call(this, Ce.MIC);
|
|
24173
24173
|
t && (yield a(this, G).closeProducer(t)), (e = a(this, mt)) == null || e.stop(), a(this, dt).delete(Ce.MIC);
|
|
24174
24174
|
});
|
|
24175
24175
|
}
|
|
24176
24176
|
disableScreenShare() {
|
|
24177
24177
|
return u(this, null, function* () {
|
|
24178
24178
|
this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop();
|
|
24179
|
-
const t = yield V(this, lt,
|
|
24179
|
+
const t = yield V(this, lt, _t).call(this, Ce.SCREENSHARE_VIDEO), e = yield V(this, lt, _t).call(this, Ce.SCREENSHARE_AUDIO);
|
|
24180
24180
|
t && (yield a(this, G).closeProducer(t)), e && (yield a(this, G).closeProducer(e)), a(this, Ws).clear(), a(this, dt).delete(Ce.SCREENSHARE_VIDEO), a(this, dt).delete(Ce.SCREENSHARE_AUDIO);
|
|
24181
24181
|
});
|
|
24182
24182
|
}
|
|
@@ -24188,11 +24188,11 @@ class ie {
|
|
|
24188
24188
|
resetVideoProducers(t, e) {
|
|
24189
24189
|
return u(this, null, function* () {
|
|
24190
24190
|
if (t) {
|
|
24191
|
-
const r = yield V(this, lt,
|
|
24191
|
+
const r = yield V(this, lt, _t).call(this, Ce.WEBCAM);
|
|
24192
24192
|
yield a(this, G).closeProducer(r, { stopTrack: !1 }), this.shareWebcam(t);
|
|
24193
24193
|
}
|
|
24194
24194
|
if (e) {
|
|
24195
|
-
const r = yield V(this, lt,
|
|
24195
|
+
const r = yield V(this, lt, _t).call(this, Ce.SCREENSHARE_VIDEO);
|
|
24196
24196
|
yield a(this, G).closeProducer(
|
|
24197
24197
|
r,
|
|
24198
24198
|
{ stopTrack: !1 }
|
|
@@ -24430,19 +24430,19 @@ class ie {
|
|
|
24430
24430
|
});
|
|
24431
24431
|
}
|
|
24432
24432
|
}
|
|
24433
|
-
ac = new WeakMap(), oc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), Qd = new WeakMap(), ct = new WeakMap(), Oi = new WeakMap(), Ni = new WeakMap(), Li = new WeakMap(), cc = new WeakMap(),
|
|
24433
|
+
ac = new WeakMap(), oc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), Qd = new WeakMap(), ct = new WeakMap(), Oi = new WeakMap(), Ni = new WeakMap(), Li = new WeakMap(), cc = new WeakMap(), Jt = new WeakMap(), Ws = new WeakMap(), dt = new WeakMap(), mt = new WeakMap(), Mr = new WeakSet(), tn = function() {
|
|
24434
24434
|
return this.context.getValue("connectionHandler");
|
|
24435
24435
|
}, Xd = new WeakSet(), Wf = function(t, e, r, i) {
|
|
24436
24436
|
return u(this, null, function* () {
|
|
24437
24437
|
f(this, oc, t);
|
|
24438
24438
|
try {
|
|
24439
|
-
a(this,
|
|
24439
|
+
a(this, Jt) ? yield a(this, Jt) : yield V(this, dc, Iu).call(this, t, e, r, i), V(this, el, Kf).call(this, e);
|
|
24440
24440
|
const { joined: n, error: o } = yield V(this, Zd, Jf).call(this);
|
|
24441
24441
|
return { roomJoined: n, error: o };
|
|
24442
24442
|
} catch (n) {
|
|
24443
24443
|
return this.logger.error("Failed to complete room join", { error: n }), { roomJoined: !1, error: n };
|
|
24444
24444
|
} finally {
|
|
24445
|
-
f(this,
|
|
24445
|
+
f(this, Jt, null);
|
|
24446
24446
|
}
|
|
24447
24447
|
});
|
|
24448
24448
|
}, Zd = new WeakSet(), Jf = function() {
|
|
@@ -24519,7 +24519,7 @@ ac = new WeakMap(), oc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), Q
|
|
|
24519
24519
|
}
|
|
24520
24520
|
);
|
|
24521
24521
|
});
|
|
24522
|
-
}, lt = new WeakSet(),
|
|
24522
|
+
}, lt = new WeakSet(), _t = function(t) {
|
|
24523
24523
|
return a(this, dt).get(t);
|
|
24524
24524
|
}, Vi = new WeakSet(), Ka = function(t, e) {
|
|
24525
24525
|
return a(this, dt).set(t, e);
|
|
@@ -24662,7 +24662,7 @@ var aD = Object.defineProperty, oD = Object.getOwnPropertyDescriptor, Yi = (s, t
|
|
|
24662
24662
|
for (var i = r > 1 ? void 0 : r ? oD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
24663
24663
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
24664
24664
|
return r && i && aD(t, e, i), i;
|
|
24665
|
-
}, la,
|
|
24665
|
+
}, la, os, Z, ft, xt, pg;
|
|
24666
24666
|
const tS = (pg = class {
|
|
24667
24667
|
/**
|
|
24668
24668
|
* Use await SelfController.init(roomNodeClient) instead
|
|
@@ -24674,10 +24674,10 @@ const tS = (pg = class {
|
|
|
24674
24674
|
p(this, "authToken");
|
|
24675
24675
|
m(this, la, void 0);
|
|
24676
24676
|
p(this, "viewType");
|
|
24677
|
-
m(this,
|
|
24677
|
+
m(this, os, void 0);
|
|
24678
24678
|
m(this, Z, void 0);
|
|
24679
24679
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
24680
|
-
this.self = t, f(this, Z, s), this.viewType = r, this.authToken = n, f(this, la, i), f(this,
|
|
24680
|
+
this.self = t, f(this, Z, s), this.viewType = r, this.authToken = n, f(this, la, i), f(this, os, e), this.setupEvents();
|
|
24681
24681
|
}
|
|
24682
24682
|
get peerId() {
|
|
24683
24683
|
return a(this, Z).getValue("peerId");
|
|
@@ -24701,7 +24701,7 @@ const tS = (pg = class {
|
|
|
24701
24701
|
}
|
|
24702
24702
|
static init(s, t, e, r, i) {
|
|
24703
24703
|
return u(this, null, function* () {
|
|
24704
|
-
const n =
|
|
24704
|
+
const n = Tt(), o = s.getValue("peerId"), d = !!s.getValue("cachedUserDetails"), c = yield We.__init__(
|
|
24705
24705
|
s,
|
|
24706
24706
|
e,
|
|
24707
24707
|
r,
|
|
@@ -24758,19 +24758,19 @@ const tS = (pg = class {
|
|
|
24758
24758
|
} = this.self;
|
|
24759
24759
|
if (e.canProduceAudio === j.Allowed && r)
|
|
24760
24760
|
try {
|
|
24761
|
-
yield a(this, ft,
|
|
24761
|
+
yield a(this, ft, xt).shareMic(s), this.self.audioEnabled || a(this, ft, xt).pauseMic();
|
|
24762
24762
|
} catch (c) {
|
|
24763
24763
|
this.self.disableAudio();
|
|
24764
24764
|
}
|
|
24765
24765
|
if (e.canProduceVideo === j.Allowed && i)
|
|
24766
24766
|
try {
|
|
24767
|
-
yield a(this, ft,
|
|
24767
|
+
yield a(this, ft, xt).shareWebcam(t), this.self.videoEnabled || a(this, ft, xt).pauseWebcam();
|
|
24768
24768
|
} catch (c) {
|
|
24769
24769
|
this.self.disableVideo();
|
|
24770
24770
|
}
|
|
24771
24771
|
if (e.canProduceScreenshare === j.Allowed && n)
|
|
24772
24772
|
try {
|
|
24773
|
-
yield (d = a(this, ft,
|
|
24773
|
+
yield (d = a(this, ft, xt)) == null ? void 0 : d.shareScreen({
|
|
24774
24774
|
video: o.video,
|
|
24775
24775
|
audio: o.audio
|
|
24776
24776
|
});
|
|
@@ -24807,7 +24807,7 @@ const tS = (pg = class {
|
|
|
24807
24807
|
}
|
|
24808
24808
|
resetSelf(s) {
|
|
24809
24809
|
return u(this, null, function* () {
|
|
24810
|
-
a(this, Z).getValue("callstats").callEnded(), a(this, ft,
|
|
24810
|
+
a(this, Z).getValue("callstats").callEnded(), a(this, ft, xt).reset(), s && (yield this.joinRoom(s));
|
|
24811
24811
|
});
|
|
24812
24812
|
}
|
|
24813
24813
|
setupEvents() {
|
|
@@ -24825,20 +24825,20 @@ const tS = (pg = class {
|
|
|
24825
24825
|
if (this.self.roomState === "disconnected")
|
|
24826
24826
|
return;
|
|
24827
24827
|
const { peerId: t } = this;
|
|
24828
|
-
a(this, la).updateURL(t), a(this, Z).getValue("telemetry").resetPeerId(t),
|
|
24828
|
+
a(this, la).updateURL(t), a(this, Z).getValue("telemetry").resetPeerId(t), Tt().setHeader("tracing-id", t), Ur.remapContext(t, a(this, Z)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
24829
24829
|
}), a(this, Z).getValue("peerSessionStore").on(R.SOCKET_SERVICE_FAILED, () => {
|
|
24830
24830
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
24831
|
-
}), a(this,
|
|
24831
|
+
}), a(this, os).on(x.waitingRoomRequestAccepted, () => {
|
|
24832
24832
|
this.waitlistAcceptHandler();
|
|
24833
|
-
}), a(this,
|
|
24833
|
+
}), a(this, os).on(Fc.updateUserPreset, (s) => {
|
|
24834
24834
|
s.updatePeersPresets.forEach((t) => {
|
|
24835
24835
|
t.userIds === this.self.userId && a(this, Z).getValue("peerSessionStore").emit(R.UPDATE_PERMISSIONS, t.patch);
|
|
24836
24836
|
});
|
|
24837
|
-
}), a(this,
|
|
24837
|
+
}), a(this, os).on(x.waitingRoomRequestDenied, () => {
|
|
24838
24838
|
this.waitlistRejectedHandler();
|
|
24839
|
-
}), a(this,
|
|
24839
|
+
}), a(this, os).on(x.kick, () => {
|
|
24840
24840
|
this.kickHandler({ kickType: "kick" });
|
|
24841
|
-
}), a(this,
|
|
24841
|
+
}), a(this, os).on(x.kickAll, () => {
|
|
24842
24842
|
this.kickHandler({ kickType: "kickAll" });
|
|
24843
24843
|
}), a(this, Z).getValue("peerSessionStore").onAsync(R.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), a(this, Z).getValue("peerSessionStore").on(
|
|
24844
24844
|
R.PRODUCER_SCORE_UPDATE,
|
|
@@ -24873,10 +24873,10 @@ const tS = (pg = class {
|
|
|
24873
24873
|
joinRoom(s = !1) {
|
|
24874
24874
|
return u(this, null, function* () {
|
|
24875
24875
|
try {
|
|
24876
|
-
const { peer: t } = yield a(this,
|
|
24876
|
+
const { peer: t } = yield a(this, os).joinRoom(
|
|
24877
24877
|
this.self
|
|
24878
24878
|
);
|
|
24879
|
-
a(this,
|
|
24879
|
+
a(this, os).socket.flush();
|
|
24880
24880
|
const e = nh(t.stageType);
|
|
24881
24881
|
if (a(this, Z).setValue("stageStatus", e, !1), t.waitlisted) {
|
|
24882
24882
|
this.waitlistedHandler();
|
|
@@ -24925,7 +24925,7 @@ const tS = (pg = class {
|
|
|
24925
24925
|
peerId: t
|
|
24926
24926
|
});
|
|
24927
24927
|
}
|
|
24928
|
-
const { canProduceAudio: d, canProduceVideo: c, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (n = a(this, ft,
|
|
24928
|
+
const { canProduceAudio: d, canProduceVideo: c, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (n = a(this, ft, xt)) == null ? void 0 : n.joinRoom(
|
|
24929
24929
|
this.self.name,
|
|
24930
24930
|
r,
|
|
24931
24931
|
s,
|
|
@@ -24947,7 +24947,7 @@ const tS = (pg = class {
|
|
|
24947
24947
|
leaveMediaRoom(s) {
|
|
24948
24948
|
return u(this, null, function* () {
|
|
24949
24949
|
const t = a(this, Z).getValue("viewType");
|
|
24950
|
-
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === Qs.Webinar) && a(this, ft,
|
|
24950
|
+
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === Qs.Webinar) && a(this, ft, xt) && (a(this, ft, xt).mediaJoined && s !== "disconnected" && (yield a(this, ft, xt).leaveRoom()), !(s === "stageLeft" && t === Qs.Livestream) && (a(this, ft, xt).mediaJoined = !1));
|
|
24951
24951
|
});
|
|
24952
24952
|
}
|
|
24953
24953
|
cleanupSelf() {
|
|
@@ -24955,7 +24955,7 @@ const tS = (pg = class {
|
|
|
24955
24955
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
24956
24956
|
});
|
|
24957
24957
|
}
|
|
24958
|
-
}, la = new WeakMap(),
|
|
24958
|
+
}, la = new WeakMap(), os = new WeakMap(), Z = new WeakMap(), ft = new WeakSet(), xt = function() {
|
|
24959
24959
|
return a(this, Z).getValue("roomNodeClient");
|
|
24960
24960
|
}, pg);
|
|
24961
24961
|
let jr = tS;
|
|
@@ -25129,26 +25129,26 @@ var hD = Object.defineProperty, pD = Object.getOwnPropertyDescriptor, gD = (s, t
|
|
|
25129
25129
|
for (var i = r > 1 ? void 0 : r ? pD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
25130
25130
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
25131
25131
|
return r && i && hD(t, e, i), i;
|
|
25132
|
-
},
|
|
25132
|
+
}, At;
|
|
25133
25133
|
class sS {
|
|
25134
25134
|
constructor(t, e) {
|
|
25135
25135
|
p(this, "socket");
|
|
25136
|
-
m(this,
|
|
25137
|
-
f(this,
|
|
25136
|
+
m(this, At, void 0);
|
|
25137
|
+
f(this, At, t), this.socket = e, this.handleSocketEvents(), a(this, At).setValue("roomSocketHandler", this);
|
|
25138
25138
|
}
|
|
25139
25139
|
/**
|
|
25140
25140
|
* @access private
|
|
25141
25141
|
* Not for external use
|
|
25142
25142
|
*/
|
|
25143
25143
|
get telemetry() {
|
|
25144
|
-
return a(this,
|
|
25144
|
+
return a(this, At).getValue("telemetry");
|
|
25145
25145
|
}
|
|
25146
25146
|
/**
|
|
25147
25147
|
* @access private
|
|
25148
25148
|
* Not for external use
|
|
25149
25149
|
*/
|
|
25150
25150
|
get logger() {
|
|
25151
|
-
return a(this,
|
|
25151
|
+
return a(this, At).getValue("logger");
|
|
25152
25152
|
}
|
|
25153
25153
|
cleanup() {
|
|
25154
25154
|
var t;
|
|
@@ -25179,9 +25179,9 @@ class sS {
|
|
|
25179
25179
|
);
|
|
25180
25180
|
try {
|
|
25181
25181
|
const { peer: n } = Xi.fromBinary((yield r).payload);
|
|
25182
|
-
a(this,
|
|
25182
|
+
a(this, At).getValue("connectionHandler").socketJoined = !0, a(this, At).getValue("peerSessionStore").emit(R.SOCKET_SERVICE_ROOM_JOINED, { peer: n });
|
|
25183
25183
|
const o = this.getRoomState(), d = this.getRoomPeersNonPaginated(), [{ room: c }, { peers: l }] = yield Promise.all([o, d]);
|
|
25184
|
-
return a(this,
|
|
25184
|
+
return a(this, At).getValue("peerSessionStore").emit(R.ROOM_STATE, c), a(this, At).getValue("peerSessionStore").emit(R.SOCKET_PEERS, l), { peer: n };
|
|
25185
25185
|
} catch (n) {
|
|
25186
25186
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
25187
25187
|
error: n
|
|
@@ -25416,7 +25416,7 @@ class sS {
|
|
|
25416
25416
|
this.socket.on(x.broadcastMessage, ({ payload: t }) => {
|
|
25417
25417
|
try {
|
|
25418
25418
|
const e = $a.fromBinary(t);
|
|
25419
|
-
a(this,
|
|
25419
|
+
a(this, At).getValue("peerSessionStore").emit(R.ROOM_MESSAGE, {
|
|
25420
25420
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25421
25421
|
type: e.type,
|
|
25422
25422
|
timestamp: e.timestamp
|
|
@@ -25427,7 +25427,7 @@ class sS {
|
|
|
25427
25427
|
}), this.socket.on(x.broadcastToEntity, ({ payload: t }) => {
|
|
25428
25428
|
try {
|
|
25429
25429
|
const e = $a.fromBinary(t);
|
|
25430
|
-
a(this,
|
|
25430
|
+
a(this, At).getValue("peerSessionStore").emit(R.MESSAGE, {
|
|
25431
25431
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25432
25432
|
type: e.type,
|
|
25433
25433
|
timestamp: e.timestamp
|
|
@@ -25523,7 +25523,7 @@ class sS {
|
|
|
25523
25523
|
});
|
|
25524
25524
|
}
|
|
25525
25525
|
}
|
|
25526
|
-
|
|
25526
|
+
At = new WeakMap();
|
|
25527
25527
|
gD([
|
|
25528
25528
|
P.trace("RoomSocketHandler.joinRoom")
|
|
25529
25529
|
], sS.prototype, "joinRoom", 1);
|
|
@@ -26314,7 +26314,7 @@ var ND = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, wl = (s, t
|
|
|
26314
26314
|
return r && i && ND(t, e, i), i;
|
|
26315
26315
|
};
|
|
26316
26316
|
const zp = 65535, VD = 3e3;
|
|
26317
|
-
var Or, Ee, Pe, Ae,
|
|
26317
|
+
var Or, Ee, Pe, Ae, Kt, qe, pc, xu, gc, Uu, gg;
|
|
26318
26318
|
const fS = (gg = class {
|
|
26319
26319
|
constructor(s, {
|
|
26320
26320
|
peerId: t,
|
|
@@ -26330,12 +26330,12 @@ const fS = (gg = class {
|
|
|
26330
26330
|
p(this, "roomName");
|
|
26331
26331
|
p(this, "authToken");
|
|
26332
26332
|
p(this, "capabilities");
|
|
26333
|
-
m(this,
|
|
26333
|
+
m(this, Kt, void 0);
|
|
26334
26334
|
m(this, qe, void 0);
|
|
26335
26335
|
var n;
|
|
26336
26336
|
if (!t || !e || !r)
|
|
26337
26337
|
throw new k("peerId, meetingId, or authToken can not be empty", "0404");
|
|
26338
|
-
f(this,
|
|
26338
|
+
f(this, Kt, void 0), f(this, qe, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this, Or, V(this, pc, xu).call(this, t)), f(this, Ee, new OD(a(this, Or), {
|
|
26339
26339
|
autoReconnect: !0,
|
|
26340
26340
|
disconnectOnPingTimeout: (n = i.includes("PING")) != null ? n : !1,
|
|
26341
26341
|
queueOnDisconnect: !0,
|
|
@@ -26491,7 +26491,7 @@ const fS = (gg = class {
|
|
|
26491
26491
|
}
|
|
26492
26492
|
handleSocketConnectionEvents() {
|
|
26493
26493
|
this.onStateEvent("connected", () => u(this, null, function* () {
|
|
26494
|
-
this.logger.info("SocketService::Connected to socket-edge"), a(this,
|
|
26494
|
+
this.logger.info("SocketService::Connected to socket-edge"), a(this, Kt) && (clearTimeout(a(this, Kt)), f(this, Kt, void 0)), a(this, Pe, Ae).updateSocketConnectionState("connected");
|
|
26495
26495
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
26496
26496
|
var i;
|
|
26497
26497
|
this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t } });
|
|
@@ -26501,11 +26501,11 @@ const fS = (gg = class {
|
|
|
26501
26501
|
{
|
|
26502
26502
|
joinAttempted: a(this, Pe, Ae).joinAttempted
|
|
26503
26503
|
}
|
|
26504
|
-
) : f(this,
|
|
26504
|
+
) : f(this, Kt, setTimeout(() => {
|
|
26505
26505
|
a(this, qe).getValue("peerSessionStore").emit(
|
|
26506
26506
|
R.SOCKET_SERVICE_DISCONNECTED,
|
|
26507
26507
|
{ joinAttempted: a(this, Pe, Ae).joinAttempted }
|
|
26508
|
-
), f(this,
|
|
26508
|
+
), f(this, Kt, void 0);
|
|
26509
26509
|
}, VD)), a(this, Pe, Ae).updateSocketConnectionState("disconnected");
|
|
26510
26510
|
}), this.onStateEvent("reconnecting", () => u(this, null, function* () {
|
|
26511
26511
|
this.logger.info("SocketService::Reconnecting to socket-edge"), a(this, Pe, Ae).updateSocketConnectionState("reconnecting");
|
|
@@ -26522,7 +26522,7 @@ const fS = (gg = class {
|
|
|
26522
26522
|
}
|
|
26523
26523
|
}), a(this, Pe, Ae).updateSocketConnectionState("reconnectFailure", s);
|
|
26524
26524
|
}), this.onStateEvent("reconnected", () => u(this, null, function* () {
|
|
26525
|
-
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, Pe, Ae).mediaJoinAttempted } }), a(this,
|
|
26525
|
+
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, Pe, Ae).mediaJoinAttempted } }), a(this, Kt) && (clearTimeout(a(this, Kt)), f(this, Kt, void 0)), a(this, qe).getValue("peerSessionStore").emit(R.SOCKET_SERVICE_RECONNECTED, {
|
|
26526
26526
|
wasJoinAttempted: a(this, Pe, Ae).mediaJoinAttempted
|
|
26527
26527
|
}), a(this, Pe, Ae).updateSocketConnectionState("reconnected");
|
|
26528
26528
|
})), this.onStateEvent("failed", () => u(this, null, function* () {
|
|
@@ -26531,7 +26531,7 @@ const fS = (gg = class {
|
|
|
26531
26531
|
}
|
|
26532
26532
|
}, Or = new WeakMap(), Ee = new WeakMap(), Pe = new WeakSet(), Ae = function() {
|
|
26533
26533
|
return a(this, qe).getValue("connectionHandler");
|
|
26534
|
-
},
|
|
26534
|
+
}, Kt = new WeakMap(), qe = new WeakMap(), pc = new WeakSet(), xu = function(s) {
|
|
26535
26535
|
const t = a(this, qe).getValue("socketBaseURI") || a(this, qe).getValue("baseURI");
|
|
26536
26536
|
let e = fS.getSocketEdgeDomain(t);
|
|
26537
26537
|
typeof Sa(a(this, qe), "socket_server_base") == "string" && (e = Sa(a(this, qe), "socket_server_base"));
|
|
@@ -26673,8 +26673,8 @@ var UD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, BD = (s, t
|
|
|
26673
26673
|
for (var i = r > 1 ? void 0 : r ? $D(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
26674
26674
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
26675
26675
|
return r && i && UD(t, e, i), i;
|
|
26676
|
-
},
|
|
26677
|
-
class SS extends
|
|
26676
|
+
}, vt;
|
|
26677
|
+
class SS extends Ot {
|
|
26678
26678
|
/**
|
|
26679
26679
|
* @param {Context} context
|
|
26680
26680
|
*/
|
|
@@ -26683,25 +26683,55 @@ class SS extends Dt {
|
|
|
26683
26683
|
super(r);
|
|
26684
26684
|
p(this, "meetings", []);
|
|
26685
26685
|
p(this, "parentMeeting", null);
|
|
26686
|
-
m(this,
|
|
26687
|
-
f(this,
|
|
26686
|
+
m(this, vt, void 0);
|
|
26687
|
+
f(this, vt, e);
|
|
26688
26688
|
}
|
|
26689
26689
|
get supportsConnectedMeetings() {
|
|
26690
|
-
const e = a(this,
|
|
26690
|
+
const e = a(this, vt).getValue("self").permissions.connectedMeetings;
|
|
26691
26691
|
return e ? e.canAlterConnectedMeetings || e.canSwitchConnectedMeetings || e.canSwitchToParentMeeting : !1;
|
|
26692
26692
|
}
|
|
26693
26693
|
get isActive() {
|
|
26694
26694
|
return this.meetings.length !== 0;
|
|
26695
26695
|
}
|
|
26696
|
-
|
|
26697
|
-
|
|
26698
|
-
|
|
26699
|
-
|
|
26696
|
+
validateAlterAction() {
|
|
26697
|
+
const e = a(this, vt).getValue("self").permissions.connectedMeetings;
|
|
26698
|
+
if (!(e != null && e.canAlterConnectedMeetings))
|
|
26699
|
+
throw new Error(
|
|
26700
|
+
"You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset."
|
|
26701
|
+
);
|
|
26702
|
+
}
|
|
26703
|
+
validateMoveAction(e, r) {
|
|
26704
|
+
var c;
|
|
26705
|
+
if (!(r != null && r.length))
|
|
26706
|
+
throw new Error("You're trying to move participants with an empty list.");
|
|
26707
|
+
const i = a(this, vt).getValue("self").permissions.connectedMeetings;
|
|
26708
|
+
if (!i)
|
|
26709
|
+
throw new Error(
|
|
26710
|
+
"You are not allowed to perform this action. Please enable connected meetings permissions in your preset."
|
|
26711
|
+
);
|
|
26712
|
+
if (i.canAlterConnectedMeetings)
|
|
26713
|
+
return;
|
|
26714
|
+
const n = a(this, vt).getValue("peerId");
|
|
26715
|
+
if (!(r.length === 1 && r[0] === n))
|
|
26716
|
+
throw new Error(
|
|
26717
|
+
"You are not allowed to move other participants. Please enable canAlterConnectedMeetings permission in your preset."
|
|
26718
|
+
);
|
|
26719
|
+
if (e === ((c = this.parentMeeting) == null ? void 0 : c.id)) {
|
|
26720
|
+
if (!i.canSwitchToParentMeeting)
|
|
26721
|
+
throw new Error(
|
|
26722
|
+
"You are not allowed to move to the parent meeting. Please enable canSwitchToParentMeeting permission in your preset."
|
|
26723
|
+
);
|
|
26724
|
+
return;
|
|
26725
|
+
}
|
|
26726
|
+
if (!i.canSwitchConnectedMeetings)
|
|
26727
|
+
throw new Error(
|
|
26728
|
+
"You are not allowed to move to a connected meeting. Please enable canSwitchConnectedMeetings permission in your preset."
|
|
26729
|
+
);
|
|
26700
26730
|
}
|
|
26701
26731
|
getConnectedMeetings() {
|
|
26702
26732
|
return u(this, null, function* () {
|
|
26703
|
-
this.
|
|
26704
|
-
const e = yield a(this,
|
|
26733
|
+
this.logger.info("Getting connected meetings dump");
|
|
26734
|
+
const e = yield a(this, vt).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
|
|
26705
26735
|
return this.logger.info("Got connected meetings dump"), e;
|
|
26706
26736
|
});
|
|
26707
26737
|
}
|
|
@@ -26711,8 +26741,8 @@ class SS extends Dt {
|
|
|
26711
26741
|
*/
|
|
26712
26742
|
createMeetings(e) {
|
|
26713
26743
|
return u(this, null, function* () {
|
|
26714
|
-
this.
|
|
26715
|
-
const r = yield a(this,
|
|
26744
|
+
this.validateAlterAction(), this.logger.info(`Creating connected meetings ${JSON.stringify(e)}`);
|
|
26745
|
+
const r = yield a(this, vt).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
|
|
26716
26746
|
e
|
|
26717
26747
|
);
|
|
26718
26748
|
return this.logger.info(`Created connected meetings ${JSON.stringify(r)}`), r.map((i) => ({
|
|
@@ -26727,7 +26757,7 @@ class SS extends Dt {
|
|
|
26727
26757
|
*/
|
|
26728
26758
|
updateMeetings(e) {
|
|
26729
26759
|
return u(this, null, function* () {
|
|
26730
|
-
this.
|
|
26760
|
+
this.validateAlterAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield a(this, vt).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
|
|
26731
26761
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
26732
26762
|
), this.logger.info(`Updated connected meetings ${JSON.stringify(e)}`);
|
|
26733
26763
|
});
|
|
@@ -26738,14 +26768,14 @@ class SS extends Dt {
|
|
|
26738
26768
|
*/
|
|
26739
26769
|
deleteMeetings(e) {
|
|
26740
26770
|
return u(this, null, function* () {
|
|
26741
|
-
this.
|
|
26771
|
+
this.validateAlterAction(), this.logger.info(`Moving participants before deleting connected meetings ${JSON.stringify(e)}`);
|
|
26742
26772
|
const r = this.meetings.map((n) => e.includes(n.id) && n.participants.length !== 0 ? this.moveParticipants(
|
|
26743
26773
|
n.id,
|
|
26744
26774
|
this.parentMeeting.id,
|
|
26745
26775
|
n.participants.map((o) => o.id)
|
|
26746
26776
|
) : Promise.resolve());
|
|
26747
26777
|
this.logger.info(`Moved participants before deleting connected meetings ${JSON.stringify(e)}. Deleting now.`), yield Promise.all(r);
|
|
26748
|
-
const i = yield a(this,
|
|
26778
|
+
const i = yield a(this, vt).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
|
|
26749
26779
|
e
|
|
26750
26780
|
);
|
|
26751
26781
|
return this.logger.info(`Deleted connected meetings ${JSON.stringify(e)}`), i;
|
|
@@ -26760,8 +26790,8 @@ class SS extends Dt {
|
|
|
26760
26790
|
*/
|
|
26761
26791
|
moveParticipants(e, r, i) {
|
|
26762
26792
|
return u(this, null, function* () {
|
|
26763
|
-
this.
|
|
26764
|
-
const n = yield a(this,
|
|
26793
|
+
this.validateMoveAction(r, i), this.logger.info(`Moving connected meetings participants ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26794
|
+
const n = yield a(this, vt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26765
26795
|
{
|
|
26766
26796
|
sourceMeetingId: e,
|
|
26767
26797
|
destinationMeetingId: r,
|
|
@@ -26781,8 +26811,8 @@ class SS extends Dt {
|
|
|
26781
26811
|
*/
|
|
26782
26812
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
26783
26813
|
return u(this, null, function* () {
|
|
26784
|
-
this.
|
|
26785
|
-
const n = yield a(this,
|
|
26814
|
+
this.validateMoveAction(r, i.map((o) => o.id)), this.logger.info(`Moving connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26815
|
+
const n = yield a(this, vt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26786
26816
|
{
|
|
26787
26817
|
sourceMeetingId: e,
|
|
26788
26818
|
destinationMeetingId: r,
|
|
@@ -26822,9 +26852,9 @@ class SS extends Dt {
|
|
|
26822
26852
|
});
|
|
26823
26853
|
}
|
|
26824
26854
|
}
|
|
26825
|
-
|
|
26855
|
+
vt = new WeakMap();
|
|
26826
26856
|
BD([
|
|
26827
|
-
|
|
26857
|
+
Nt({ maxInvocations: 60, period: 60 })
|
|
26828
26858
|
], SS.prototype, "getConnectedMeetings", 1);
|
|
26829
26859
|
var HD = Object.defineProperty, FD = Object.getOwnPropertyDescriptor, yh = (s, t, e, r) => {
|
|
26830
26860
|
for (var i = r > 1 ? void 0 : r ? FD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
@@ -26855,10 +26885,10 @@ const vS = (mg = class {
|
|
|
26855
26885
|
const t = new vS(
|
|
26856
26886
|
s
|
|
26857
26887
|
);
|
|
26858
|
-
return
|
|
26888
|
+
return s.getValue("self").once(
|
|
26859
26889
|
"roomJoined",
|
|
26860
26890
|
() => t.getConnectedMeetings()
|
|
26861
|
-
)), t;
|
|
26891
|
+
), t.setupEvents(), t;
|
|
26862
26892
|
}
|
|
26863
26893
|
getConnectedMeetings() {
|
|
26864
26894
|
this.connectedMeetings.getConnectedMeetings();
|
|
@@ -26893,9 +26923,6 @@ const vS = (mg = class {
|
|
|
26893
26923
|
meetingId: t
|
|
26894
26924
|
}) {
|
|
26895
26925
|
var n, o, d, c;
|
|
26896
|
-
if (!this.connectedMeetings.supportsConnectedMeetings)
|
|
26897
|
-
throw new Error(`You are not allowed to perform this action.
|
|
26898
|
-
Please connect with our support team to enable connected meetings.`);
|
|
26899
26926
|
this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show switching breakout UI"), this.connectedMeetings.emit("changingMeeting", t);
|
|
26900
26927
|
const r = {
|
|
26901
26928
|
video: a(this, le).getValue("self").videoEnabled,
|
|
@@ -27103,9 +27130,9 @@ const Ya = class {
|
|
|
27103
27130
|
s
|
|
27104
27131
|
);
|
|
27105
27132
|
t.setValue("connectedMeetingsSocketHandler", F);
|
|
27106
|
-
const te = new _l(t, s), ze = new ir(t, s), ms = new mD(s),
|
|
27133
|
+
const te = new _l(t, s), ze = new ir(t, s), ms = new mD(s), Qt = new sS(t, s), Gr = new fD(t, s), I = new cD(s), y = yield jr.init(
|
|
27107
27134
|
t,
|
|
27108
|
-
|
|
27135
|
+
Qt,
|
|
27109
27136
|
d,
|
|
27110
27137
|
n,
|
|
27111
27138
|
i
|
|
@@ -27114,14 +27141,14 @@ const Ya = class {
|
|
|
27114
27141
|
const w = yield af.init(
|
|
27115
27142
|
t,
|
|
27116
27143
|
y.self,
|
|
27117
|
-
|
|
27144
|
+
Qt,
|
|
27118
27145
|
H,
|
|
27119
27146
|
r
|
|
27120
27147
|
);
|
|
27121
27148
|
o.participant && (U = new or(
|
|
27122
27149
|
t,
|
|
27123
27150
|
y.self,
|
|
27124
|
-
|
|
27151
|
+
Qt
|
|
27125
27152
|
)), (b = o.e2ee) != null && b.enabled && o.e2ee.manager.init(l, t.getValue("peerSessionStore")), o.chat && (T = yield nn.init(
|
|
27126
27153
|
t,
|
|
27127
27154
|
ze,
|
|
@@ -27138,11 +27165,11 @@ const Ya = class {
|
|
|
27138
27165
|
)), o.recording && (A = new uf(
|
|
27139
27166
|
t,
|
|
27140
27167
|
y.self,
|
|
27141
|
-
|
|
27168
|
+
Qt
|
|
27142
27169
|
)), o.stage && (E = new of(
|
|
27143
27170
|
t,
|
|
27144
27171
|
ms,
|
|
27145
|
-
|
|
27172
|
+
Qt,
|
|
27146
27173
|
y.self,
|
|
27147
27174
|
U.participants
|
|
27148
27175
|
));
|
|
@@ -27417,7 +27444,7 @@ let Br = (fg = class {
|
|
|
27417
27444
|
video: !0
|
|
27418
27445
|
};
|
|
27419
27446
|
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (c = e.overrides) != null ? c : {}), n.setValue("env", pC({ baseURI: i.baseURI })), n.setValue("defaults", d), n.setValue("onError", e.onError || (() => {
|
|
27420
|
-
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "1.5.2-staging.
|
|
27447
|
+
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "1.5.2-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new KD()), n;
|
|
27421
27448
|
}
|
|
27422
27449
|
join() {
|
|
27423
27450
|
return u(this, null, function* () {
|