@cloudflare/realtimekit 1.2.3 → 1.2.4-staging.2
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.cjs.js +1 -1
- package/dist/EncryptionManager.d.ts +4 -4
- package/dist/EncryptionManager.es.js +13 -13
- package/dist/browser.js +12 -12
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +10 -10
- package/dist/index.d.ts +4 -4
- package/dist/index.es.js +574 -312
- package/dist/index.es5.js +892 -710
- package/dist/index.rn.js +10 -10
- package/dist/ts3.4/dist/EncryptionManager.d.ts +4 -4
- package/dist/ts3.4/dist/index.d.ts +4 -4
- package/package.json +2 -3
package/dist/index.es5.js
CHANGED
|
@@ -2,8 +2,8 @@ import { v4 as Ks, validate as Mv } from "uuid";
|
|
|
2
2
|
import _v from "bowser";
|
|
3
3
|
import { MessageType as M, PbLong as Ko, typeofJsonValue as mm } from "@protobuf-ts/runtime";
|
|
4
4
|
import * as Ml from "worker-timers";
|
|
5
|
-
import * as
|
|
6
|
-
var Zg = ["id"], xg = ["chat", "connectedMeetings", "plugins", "polls", "media"], em = ["id"], rm = ["meetingId"], cn, Za, z,
|
|
5
|
+
import * as On from "sdp-transform";
|
|
6
|
+
var Zg = ["id"], xg = ["chat", "connectedMeetings", "plugins", "polls", "media"], em = ["id"], rm = ["meetingId"], cn, Za, z, Wn, $e, Jn, oa, Fl, so, Kn, Hl, pl, xa, ei, Eo, dn, ri, zn, wi, oo, Yn, uo, lo, pn, ti, Or, Qe, Dr, ni, ai, It, ii, hn, si, qr, oi, et, Pi, ui, li, ci, Gr, Ae, di, pi, Nr, Qn, kn, Xn, hl, Mt, co, gn, Zn, _t, vl, po, fl, gl, ye, ho, xn, hi, ea, wr, Wr, rt, vi, fi, ur, gi, Ne, Ot, Ve, mi, Ie, Si, Ei, vo, kp, Uc, Co, Ro, Xe, W, Ci, lr, ua, la, ra, fo, Kr, Dt, js, ta, na, hr, Pr, vn, ml, Bl, ql, Ao, Gl, Wl, Jl, Kl, We, aa, yl, kl, bl, ia, tt, Z, cr, fn, be, Te, Jr, Je, go, mo, he, Ue, sa;
|
|
7
7
|
function cc(o, t) {
|
|
8
8
|
if (o == null)
|
|
9
9
|
return {};
|
|
@@ -108,7 +108,7 @@ function N(o) {
|
|
|
108
108
|
function lm(o, t, e) {
|
|
109
109
|
return (t = Iv(t)) in o ? Object.defineProperty(o, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : o[t] = e, o;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function jn(o, t) {
|
|
112
112
|
var e = typeof Symbol != "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
113
113
|
if (!e) {
|
|
114
114
|
if (Array.isArray(o) || (e = bp(o)) || t && o && typeof o.length == "number") {
|
|
@@ -1446,10 +1446,10 @@ var $m = /* @__PURE__ */ new Map([
|
|
|
1446
1446
|
(function(o) {
|
|
1447
1447
|
o.CHROMIUM = "chromum", o.FIREFOX = "firefox", o.SAFARI = "safari";
|
|
1448
1448
|
})(ah || (ah = {}));
|
|
1449
|
-
var Ou = { DEVEL: "devel", PREPROD: "preprod", PROD: "prod" },
|
|
1449
|
+
var Ou = { DEVEL: "devel", PREPROD: "preprod", PROD: "prod" }, mn;
|
|
1450
1450
|
(function(o) {
|
|
1451
1451
|
o.AUDIO = "AUDIO", o.VIDEO = "VIDEO", o.SPEAKER = "SPEAKER", o.SCREENSHARE = "SCREENSHARE";
|
|
1452
|
-
})(
|
|
1452
|
+
})(mn || (mn = {}));
|
|
1453
1453
|
var ih;
|
|
1454
1454
|
(function(o) {
|
|
1455
1455
|
o[o.INIT = 0] = "INIT", o[o.ACCEPTED = 1] = "ACCEPTED", o[o.DENIED = 2] = "DENIED", o[o.SYS_DENIED = 3] = "SYS_DENIED", o[o.FAILED = 4] = "FAILED", o[o.NOTFOUND = 5] = "NOTFOUND", o[o.NOT_APPLICABLE = 6] = "NOT_APPLICABLE";
|
|
@@ -1848,7 +1848,7 @@ var sf = /* @__PURE__ */ P(function o() {
|
|
|
1848
1848
|
case 0:
|
|
1849
1849
|
return i = v.length > 1 && v[1] !== void 0 ? v[1] : !1, g.next = 3, a.getStats();
|
|
1850
1850
|
case 3:
|
|
1851
|
-
s = g.sent, u = i ? this.getProducerStatsFromReport(this.parseRTCReport(s, ["outbound-rtp", "remote-inbound-rtp"], !1, a.id))[0] : void 0, c =
|
|
1851
|
+
s = g.sent, u = i ? this.getProducerStatsFromReport(this.parseRTCReport(s, ["outbound-rtp", "remote-inbound-rtp"], !1, a.id))[0] : void 0, c = jn(s.values()), g.prev = 6, c.s();
|
|
1852
1852
|
case 8:
|
|
1853
1853
|
if ((d = c.n()).done) {
|
|
1854
1854
|
g.next = 17;
|
|
@@ -1889,7 +1889,7 @@ var sf = /* @__PURE__ */ P(function o() {
|
|
|
1889
1889
|
case 0:
|
|
1890
1890
|
return i = v.length > 1 && v[1] !== void 0 ? v[1] : !1, g.next = 3, a.getStats();
|
|
1891
1891
|
case 3:
|
|
1892
|
-
s = g.sent, u = i ? this.getConsumerStatsFromReport(this.parseRTCReport(s, ["inbound-rtp"], !1, a.id))[0] : void 0, c =
|
|
1892
|
+
s = g.sent, u = i ? this.getConsumerStatsFromReport(this.parseRTCReport(s, ["inbound-rtp"], !1, a.id))[0] : void 0, c = jn(s.values()), g.prev = 6, c.s();
|
|
1893
1893
|
case 8:
|
|
1894
1894
|
if ((d = c.n()).done) {
|
|
1895
1895
|
g.next = 17;
|
|
@@ -1949,7 +1949,7 @@ var sf = /* @__PURE__ */ P(function o() {
|
|
|
1949
1949
|
});
|
|
1950
1950
|
return n || r[r.length - 1];
|
|
1951
1951
|
} }, { key: "parseRTCReport", value: function(r) {
|
|
1952
|
-
var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b =
|
|
1952
|
+
var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = jn(c.values()), E;
|
|
1953
1953
|
try {
|
|
1954
1954
|
for (b.s(); !(E = b.n()).done; ) {
|
|
1955
1955
|
var T = E.value;
|
|
@@ -2540,7 +2540,7 @@ var sf = /* @__PURE__ */ P(function o() {
|
|
|
2540
2540
|
case 0:
|
|
2541
2541
|
return i = g.length > 1 && g[1] !== void 0 ? g[1] : !1, y.next = 3, a.getStats();
|
|
2542
2542
|
case 3:
|
|
2543
|
-
s = y.sent, u = this.parseRTCReport(s, ["inbound-rtp"], !1, a.id), c = Pe(u.consumerStreamMap.values())[0], d = i ? this.getConsumerStatsFromParsedConsumerStats(u, c, a.id) : void 0, p =
|
|
2543
|
+
s = y.sent, u = this.parseRTCReport(s, ["inbound-rtp"], !1, a.id), c = Pe(u.consumerStreamMap.values())[0], d = i ? this.getConsumerStatsFromParsedConsumerStats(u, c, a.id) : void 0, p = jn(s.values()), y.prev = 8, p.s();
|
|
2544
2544
|
case 10:
|
|
2545
2545
|
if ((v = p.n()).done) {
|
|
2546
2546
|
y.next = 19;
|
|
@@ -2590,7 +2590,7 @@ var sf = /* @__PURE__ */ P(function o() {
|
|
|
2590
2590
|
var n;
|
|
2591
2591
|
return { id: r.id, type: r.candidateType || r.type, address: r.address, port: r.port, url: r.url, protocol: (n = r.relayProtocol) !== null && n !== void 0 ? n : r.protocol, networkType: r.networkType, relatedAddress: r.relatedAddress, relatedPort: r.relatedPort };
|
|
2592
2592
|
} }, { key: "parseRTCReport", value: function(r) {
|
|
2593
|
-
var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b =
|
|
2593
|
+
var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = jn(c.values()), E;
|
|
2594
2594
|
try {
|
|
2595
2595
|
for (b.s(); !(E = b.n()).done; ) {
|
|
2596
2596
|
var T = E.value;
|
|
@@ -2861,7 +2861,7 @@ var pe = function(t, e) {
|
|
|
2861
2861
|
return function(r, n, a) {
|
|
2862
2862
|
if (a)
|
|
2863
2863
|
return uh(a, t, e);
|
|
2864
|
-
var i =
|
|
2864
|
+
var i = jn(Reflect.ownKeys(r.prototype).filter(function(p) {
|
|
2865
2865
|
return p !== "constructor";
|
|
2866
2866
|
})), s;
|
|
2867
2867
|
try {
|
|
@@ -2961,15 +2961,15 @@ var pe = function(t, e) {
|
|
|
2961
2961
|
} }, { key: "sendActiveSpeakerEvent", value: function(r, n) {
|
|
2962
2962
|
this.eventHandler.callEvent({ event: K.DOMINANT_SPEAKER, metaData: { peerId: r }, timestamp: n });
|
|
2963
2963
|
} }, { key: "devices", value: function(r, n, a) {
|
|
2964
|
-
this.eventHandler.callEvent({ event: r ===
|
|
2964
|
+
this.eventHandler.callEvent({ event: r === mn.AUDIO && K.AUDIO_DEVICES_UPDATES || r === mn.VIDEO && K.VIDEO_DEVICES_UPDATES || r === mn.SPEAKER && K.SPEAKER_DEVICES_UPDATES, metaData: { deviceList: n }, timestamp: a });
|
|
2965
2965
|
} }, { key: "selectedDevice", value: function(r, n, a) {
|
|
2966
|
-
this.eventHandler.callEvent({ event: r ===
|
|
2966
|
+
this.eventHandler.callEvent({ event: r === mn.AUDIO && K.SELECTED_MICROHPONE_UPDATE || r === mn.VIDEO && K.SELECTED_CAMERA_UPDATE || r === mn.SPEAKER && K.SELECTED_SPEAKER_UPDATE, metaData: { device: n }, timestamp: a });
|
|
2967
2967
|
} }, { key: "mediaPermission", value: function(r, n, a) {
|
|
2968
2968
|
this.eventHandler.callEvent({ event: K.MEDIA_PERMISSION, metaData: { deviceType: r, permission: n }, timestamp: a });
|
|
2969
2969
|
} }, { key: "mediaPlaybackFailed", value: function(r, n) {
|
|
2970
|
-
this.eventHandler.callEvent({ event: r ===
|
|
2970
|
+
this.eventHandler.callEvent({ event: r === mn.AUDIO && K.AUDIO_PLAY_FAILED || r === mn.VIDEO && K.VIDEO_PLAY_FAILED, metaData: { deviceType: r }, timestamp: n });
|
|
2971
2971
|
} }, { key: "mediaTrackMuted", value: function(r, n) {
|
|
2972
|
-
this.eventHandler.callEvent({ event: r ===
|
|
2972
|
+
this.eventHandler.callEvent({ event: r === mn.AUDIO && K.AUDIO_TRACK_MUTED || r === mn.VIDEO && K.VIDEO_TRACK_MUTED, metaData: { deviceType: r }, timestamp: n });
|
|
2973
2973
|
} }, { key: "tabChanged", value: function(r, n) {
|
|
2974
2974
|
this.eventHandler.callEvent({ event: K.TAB_CHANGE, metaData: { isMeetingsTabActive: r }, timestamp: n });
|
|
2975
2975
|
} }, { key: "browserBackgrounded", value: function(r) {
|
|
@@ -3007,7 +3007,7 @@ var pe = function(t, e) {
|
|
|
3007
3007
|
for (; ; )
|
|
3008
3008
|
switch (b.prev = b.next) {
|
|
3009
3009
|
case 0:
|
|
3010
|
-
p = [], b.prev = 1, v =
|
|
3010
|
+
p = [], b.prev = 1, v = jn(r), b.prev = 3, v.s();
|
|
3011
3011
|
case 5:
|
|
3012
3012
|
if ((f = v.n()).done) {
|
|
3013
3013
|
b.next = 20;
|
|
@@ -3745,7 +3745,7 @@ function dy(o) {
|
|
|
3745
3745
|
function py(o) {
|
|
3746
3746
|
return this.__data__.has(o);
|
|
3747
3747
|
}
|
|
3748
|
-
var hy = (typeof global == "undefined" ? "undefined" : ke(global)) == "object" && global && global.Object === Object && global, cf = hy, vy = (typeof self == "undefined" ? "undefined" : ke(self)) == "object" && self && self.Object === Object && self, fy = cf || vy || Function("return this")(),
|
|
3748
|
+
var hy = (typeof global == "undefined" ? "undefined" : ke(global)) == "object" && global && global.Object === Object && global, cf = hy, vy = (typeof self == "undefined" ? "undefined" : ke(self)) == "object" && self && self.Object === Object && self, fy = cf || vy || Function("return this")(), Hn = fy, gy = Hn.Symbol, da = gy, df = Object.prototype, my = df.hasOwnProperty, yy = df.toString, zo = da ? da.toStringTag : void 0;
|
|
3749
3749
|
function ky(o) {
|
|
3750
3750
|
var t = my.call(o, zo), e = o[zo];
|
|
3751
3751
|
try {
|
|
@@ -3764,18 +3764,18 @@ var Py = "[object Null]", Sy = "[object Undefined]", lh = da ? da.toStringTag :
|
|
|
3764
3764
|
function Zs(o) {
|
|
3765
3765
|
return o == null ? o === void 0 ? Sy : Py : lh && lh in Object(o) ? ky(o) : wy(o);
|
|
3766
3766
|
}
|
|
3767
|
-
function
|
|
3767
|
+
function bn(o) {
|
|
3768
3768
|
var t = ke(o);
|
|
3769
3769
|
return o != null && (t == "object" || t == "function");
|
|
3770
3770
|
}
|
|
3771
3771
|
var Ey = "[object AsyncFunction]", Cy = "[object Function]", Ry = "[object GeneratorFunction]", Ay = "[object Proxy]";
|
|
3772
3772
|
function Ep(o) {
|
|
3773
|
-
if (!
|
|
3773
|
+
if (!bn(o))
|
|
3774
3774
|
return !1;
|
|
3775
3775
|
var t = Zs(o);
|
|
3776
3776
|
return t == Cy || t == Ry || t == Ey || t == Ay;
|
|
3777
3777
|
}
|
|
3778
|
-
var Iy =
|
|
3778
|
+
var Iy = Hn["__core-js_shared__"], jc = Iy, ch = function() {
|
|
3779
3779
|
var o = /[^.]+$/.exec(jc && jc.keys && jc.keys.IE_PROTO || "");
|
|
3780
3780
|
return o ? "Symbol(src)_1." + o : "";
|
|
3781
3781
|
}();
|
|
@@ -3798,7 +3798,7 @@ function xs(o) {
|
|
|
3798
3798
|
}
|
|
3799
3799
|
var Dy = /[\\^$.*+?()[\]{}|]/g, Ly = /^\[object .+?Constructor\]$/, $y = Function.prototype, Ny = Object.prototype, Vy = $y.toString, Uy = Ny.hasOwnProperty, jy = RegExp("^" + Vy.call(Uy).replace(Dy, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
3800
3800
|
function Fy(o) {
|
|
3801
|
-
if (!
|
|
3801
|
+
if (!bn(o) || My(o))
|
|
3802
3802
|
return !1;
|
|
3803
3803
|
var t = Ep(o) ? jy : Ly;
|
|
3804
3804
|
return t.test(xs(o));
|
|
@@ -3810,7 +3810,7 @@ function eo(o, t) {
|
|
|
3810
3810
|
var e = Hy(o, t);
|
|
3811
3811
|
return Fy(e) ? e : void 0;
|
|
3812
3812
|
}
|
|
3813
|
-
var By = eo(
|
|
3813
|
+
var By = eo(Hn, "Map"), Ku = By, qy = eo(Object, "create"), zu = qy;
|
|
3814
3814
|
function Gy() {
|
|
3815
3815
|
this.__data__ = zu ? zu(null) : {}, this.size = 0;
|
|
3816
3816
|
}
|
|
@@ -3897,15 +3897,15 @@ function uk(o, t) {
|
|
|
3897
3897
|
}
|
|
3898
3898
|
return e.set(o, t), this.size = e.size, this;
|
|
3899
3899
|
}
|
|
3900
|
-
function
|
|
3900
|
+
function Fn(o) {
|
|
3901
3901
|
var t = this.__data__ = new Ja(o);
|
|
3902
3902
|
this.size = t.size;
|
|
3903
3903
|
}
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3904
|
+
Fn.prototype.clear = ly;
|
|
3905
|
+
Fn.prototype.delete = cy;
|
|
3906
|
+
Fn.prototype.get = dy;
|
|
3907
|
+
Fn.prototype.has = py;
|
|
3908
|
+
Fn.prototype.set = uk;
|
|
3909
3909
|
function lk(o, t) {
|
|
3910
3910
|
for (var e = -1, r = o == null ? 0 : o.length; ++e < r && t(o[e], e, o) !== !1; )
|
|
3911
3911
|
;
|
|
@@ -3955,7 +3955,7 @@ var hf = Object.prototype, fk = hf.hasOwnProperty, gk = hf.propertyIsEnumerable,
|
|
|
3955
3955
|
function kk() {
|
|
3956
3956
|
return !1;
|
|
3957
3957
|
}
|
|
3958
|
-
var vf = (typeof exports == "undefined" ? "undefined" : ke(exports)) == "object" && exports && !exports.nodeType && exports, ph = vf && (typeof module == "undefined" ? "undefined" : ke(module)) == "object" && module && !module.nodeType && module, bk = ph && ph.exports === vf, hh = bk ?
|
|
3958
|
+
var vf = (typeof exports == "undefined" ? "undefined" : ke(exports)) == "object" && exports && !exports.nodeType && exports, ph = vf && (typeof module == "undefined" ? "undefined" : ke(module)) == "object" && module && !module.nodeType && module, bk = ph && ph.exports === vf, hh = bk ? Hn.Buffer : void 0, Tk = hh ? hh.isBuffer : void 0, wk = Tk || kk, Do = wk, Pk = 9007199254740991, Sk = /^(?:0|[1-9]\d*)$/;
|
|
3959
3959
|
function Rp(o, t) {
|
|
3960
3960
|
var e = ke(o);
|
|
3961
3961
|
return t = t == null ? Pk : t, !!t && (e == "number" || e != "symbol" && Sk.test(o)) && o > -1 && o % 1 == 0 && o < t;
|
|
@@ -4029,7 +4029,7 @@ function u0(o) {
|
|
|
4029
4029
|
}
|
|
4030
4030
|
var l0 = Object.prototype, c0 = l0.hasOwnProperty;
|
|
4031
4031
|
function d0(o) {
|
|
4032
|
-
if (!
|
|
4032
|
+
if (!bn(o))
|
|
4033
4033
|
return u0(o);
|
|
4034
4034
|
var t = yc(o), e = [];
|
|
4035
4035
|
for (var r in o)
|
|
@@ -4042,7 +4042,7 @@ function nl(o) {
|
|
|
4042
4042
|
function p0(o, t) {
|
|
4043
4043
|
return o && rl(t, nl(t), o);
|
|
4044
4044
|
}
|
|
4045
|
-
var kf = (typeof exports == "undefined" ? "undefined" : ke(exports)) == "object" && exports && !exports.nodeType && exports, fh = kf && (typeof module == "undefined" ? "undefined" : ke(module)) == "object" && module && !module.nodeType && module, h0 = fh && fh.exports === kf, gh = h0 ?
|
|
4045
|
+
var kf = (typeof exports == "undefined" ? "undefined" : ke(exports)) == "object" && exports && !exports.nodeType && exports, fh = kf && (typeof module == "undefined" ? "undefined" : ke(module)) == "object" && module && !module.nodeType && module, h0 = fh && fh.exports === kf, gh = h0 ? Hn.Buffer : void 0, mh = gh ? gh.allocUnsafe : void 0;
|
|
4046
4046
|
function bf(o, t) {
|
|
4047
4047
|
if (t)
|
|
4048
4048
|
return o.slice();
|
|
@@ -4096,7 +4096,7 @@ function yd(o) {
|
|
|
4096
4096
|
function P0(o) {
|
|
4097
4097
|
return Ef(o, nl, Sf);
|
|
4098
4098
|
}
|
|
4099
|
-
var S0 = eo(
|
|
4099
|
+
var S0 = eo(Hn, "DataView"), kd = S0, E0 = eo(Hn, "Promise"), bd = E0, C0 = eo(Hn, "Set"), Mo = C0, R0 = eo(Hn, "WeakMap"), Td = R0, kh = "[object Map]", A0 = "[object Object]", bh = "[object Promise]", Th = "[object Set]", wh = "[object WeakMap]", Ph = "[object DataView]", I0 = xs(kd), M0 = xs(Ku), _0 = xs(bd), O0 = xs(Mo), D0 = xs(Td), Ss = Zs;
|
|
4100
4100
|
(kd && Ss(new kd(new ArrayBuffer(1))) != Ph || Ku && Ss(new Ku()) != kh || bd && Ss(bd.resolve()) != bh || Mo && Ss(new Mo()) != Th || Td && Ss(new Td()) != wh) && (Ss = function(t) {
|
|
4101
4101
|
var e = Zs(t), r = e == A0 ? t.constructor : void 0, n = r ? xs(r) : "";
|
|
4102
4102
|
if (n)
|
|
@@ -4119,7 +4119,7 @@ function N0(o) {
|
|
|
4119
4119
|
var t = o.length, e = new o.constructor(t);
|
|
4120
4120
|
return t && typeof o[0] == "string" && $0.call(o, "index") && (e.index = o.index, e.input = o.input), e;
|
|
4121
4121
|
}
|
|
4122
|
-
var V0 =
|
|
4122
|
+
var V0 = Hn.Uint8Array, xl = V0;
|
|
4123
4123
|
function Op(o) {
|
|
4124
4124
|
var t = new o.constructor(o.byteLength);
|
|
4125
4125
|
return new xl(t).set(new xl(o)), t;
|
|
@@ -4179,7 +4179,7 @@ var Ch = Object.create, ub = function() {
|
|
|
4179
4179
|
function o() {
|
|
4180
4180
|
}
|
|
4181
4181
|
return function(t) {
|
|
4182
|
-
if (!
|
|
4182
|
+
if (!bn(t))
|
|
4183
4183
|
return {};
|
|
4184
4184
|
if (Ch)
|
|
4185
4185
|
return Ch(t);
|
|
@@ -4206,7 +4206,7 @@ function Ol(o, t, e, r, n, a) {
|
|
|
4206
4206
|
var i, s = t & yb, u = t & kb, c = t & bb;
|
|
4207
4207
|
if (e && (i = n ? e(o, r, n, a) : e(o)), i !== void 0)
|
|
4208
4208
|
return i;
|
|
4209
|
-
if (!
|
|
4209
|
+
if (!bn(o))
|
|
4210
4210
|
return o;
|
|
4211
4211
|
var d = nn(o);
|
|
4212
4212
|
if (d) {
|
|
@@ -4225,7 +4225,7 @@ function Ol(o, t, e, r, n, a) {
|
|
|
4225
4225
|
i = ob(o, p, s);
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
|
-
a || (a = new
|
|
4228
|
+
a || (a = new Fn());
|
|
4229
4229
|
var f = a.get(o);
|
|
4230
4230
|
if (f)
|
|
4231
4231
|
return f;
|
|
@@ -4510,7 +4510,7 @@ var yT = function(t, e, r) {
|
|
|
4510
4510
|
});
|
|
4511
4511
|
if (y === -1)
|
|
4512
4512
|
throw new Error("Invalid reducer provided, it must contain atleast one zero");
|
|
4513
|
-
var b = 5 - y, E = y + 1, T = (100 - k) / b, S = k / E, D =
|
|
4513
|
+
var b = 5 - y, E = y + 1, T = (100 - k) / b, S = k / E, D = jn(e), I;
|
|
4514
4514
|
try {
|
|
4515
4515
|
for (D.s(); !(I = D.n()).done; ) {
|
|
4516
4516
|
var _ = I.value, V = void 0;
|
|
@@ -4754,9 +4754,9 @@ function Dh(o) {
|
|
|
4754
4754
|
return o;
|
|
4755
4755
|
if (bc(o))
|
|
4756
4756
|
return Oh;
|
|
4757
|
-
if (
|
|
4757
|
+
if (bn(o)) {
|
|
4758
4758
|
var t = typeof o.valueOf == "function" ? o.valueOf() : o;
|
|
4759
|
-
o =
|
|
4759
|
+
o = bn(t) ? t + "" : t;
|
|
4760
4760
|
}
|
|
4761
4761
|
if (typeof o != "string")
|
|
4762
4762
|
return o === 0 ? o : +o;
|
|
@@ -4840,7 +4840,7 @@ function xT(o, t) {
|
|
|
4840
4840
|
return JT(ZT(o, t, Vp), o + "");
|
|
4841
4841
|
}
|
|
4842
4842
|
function ew(o, t, e) {
|
|
4843
|
-
if (!
|
|
4843
|
+
if (!bn(e))
|
|
4844
4844
|
return !1;
|
|
4845
4845
|
var r = ke(t);
|
|
4846
4846
|
return (r == "number" ? tl(e) && Rp(t, e.length) : r == "string" && t in e) ? el(e[t], o) : !1;
|
|
@@ -5013,15 +5013,15 @@ function $w(o, t, e, r, n, a) {
|
|
|
5013
5013
|
i = !0, d = !1;
|
|
5014
5014
|
}
|
|
5015
5015
|
if (v && !d)
|
|
5016
|
-
return a || (a = new
|
|
5016
|
+
return a || (a = new Fn()), i || mc(o) ? Bf(o, t, e, r, n, a) : Aw(o, t, u, e, r, n, a);
|
|
5017
5017
|
if (!(e & Dw)) {
|
|
5018
5018
|
var f = d && Uh.call(o, "__wrapped__"), g = p && Uh.call(t, "__wrapped__");
|
|
5019
5019
|
if (f || g) {
|
|
5020
5020
|
var k = f ? o.value() : o, y = g ? t.value() : t;
|
|
5021
|
-
return a || (a = new
|
|
5021
|
+
return a || (a = new Fn()), n(k, y, e, r, a);
|
|
5022
5022
|
}
|
|
5023
5023
|
}
|
|
5024
|
-
return v ? (a || (a = new
|
|
5024
|
+
return v ? (a || (a = new Fn()), Ow(o, t, e, r, n, a)) : !1;
|
|
5025
5025
|
}
|
|
5026
5026
|
function wc(o, t, e, r, n) {
|
|
5027
5027
|
return o === t ? !0 : o == null || t == null || !pa(o) && !pa(t) ? o !== o && t !== t : $w(o, t, e, r, wc, n);
|
|
@@ -5043,7 +5043,7 @@ function Uw(o, t, e, r) {
|
|
|
5043
5043
|
if (c === void 0 && !(u in o))
|
|
5044
5044
|
return !1;
|
|
5045
5045
|
} else {
|
|
5046
|
-
var p = new
|
|
5046
|
+
var p = new Fn();
|
|
5047
5047
|
if (r)
|
|
5048
5048
|
var v = r(c, d, u, o, t, p);
|
|
5049
5049
|
if (!(v === void 0 ? wc(d, c, Nw | Vw, r, p) : v))
|
|
@@ -5053,7 +5053,7 @@ function Uw(o, t, e, r) {
|
|
|
5053
5053
|
return !0;
|
|
5054
5054
|
}
|
|
5055
5055
|
function qf(o) {
|
|
5056
|
-
return o === o && !
|
|
5056
|
+
return o === o && !bn(o);
|
|
5057
5057
|
}
|
|
5058
5058
|
function jw(o) {
|
|
5059
5059
|
for (var t = kc(o), e = t.length; e--; ) {
|
|
@@ -5113,13 +5113,13 @@ function Qw(o) {
|
|
|
5113
5113
|
};
|
|
5114
5114
|
}
|
|
5115
5115
|
var Xw = Qw(), Zw = Xw, xw = function() {
|
|
5116
|
-
return
|
|
5116
|
+
return Hn.Date.now();
|
|
5117
5117
|
}, Bc = xw, eP = "Expected a function", rP = Math.max, tP = Math.min;
|
|
5118
5118
|
function jp(o, t, e) {
|
|
5119
5119
|
var r, n, a, i, s, u, c = 0, d = !1, p = !1, v = !0;
|
|
5120
5120
|
if (typeof o != "function")
|
|
5121
5121
|
throw new TypeError(eP);
|
|
5122
|
-
t = Dh(t) || 0,
|
|
5122
|
+
t = Dh(t) || 0, bn(e) && (d = !!e.leading, p = "maxWait" in e, a = p ? rP(Dh(e.maxWait) || 0, t) : a, v = "trailing" in e ? !!e.trailing : v);
|
|
5123
5123
|
function f(I) {
|
|
5124
5124
|
var _ = r, V = n;
|
|
5125
5125
|
return r = n = void 0, c = I, i = o.apply(V, _), i;
|
|
@@ -5184,13 +5184,13 @@ function iP(o, t, e, r, n, a, i) {
|
|
|
5184
5184
|
var d = a ? a(s, u, e + "", o, t, i) : void 0, p = d === void 0;
|
|
5185
5185
|
if (p) {
|
|
5186
5186
|
var v = nn(u), f = !v && Do(u), g = !v && !f && mc(u);
|
|
5187
|
-
d = u, v || f || g ? nn(s) ? d = s : nP(s) ? d = Tf(s) : f ? (p = !1, d = bf(u, !0)) : g ? (p = !1, d = Cf(u, !0)) : d = [] : ow(u) || Yu(u) ? (d = s, Yu(s) ? d = aP(s) : (!
|
|
5187
|
+
d = u, v || f || g ? nn(s) ? d = s : nP(s) ? d = Tf(s) : f ? (p = !1, d = bf(u, !0)) : g ? (p = !1, d = Cf(u, !0)) : d = [] : ow(u) || Yu(u) ? (d = s, Yu(s) ? d = aP(s) : (!bn(s) || Ep(s)) && (d = Rf(u))) : p = !1;
|
|
5188
5188
|
}
|
|
5189
5189
|
p && (i.set(u, d), n(d, u, r, a, i), i.delete(u)), wd(o, e, d);
|
|
5190
5190
|
}
|
|
5191
5191
|
function Wf(o, t, e, r, n) {
|
|
5192
5192
|
o !== t && Zw(t, function(a, i) {
|
|
5193
|
-
if (n || (n = new
|
|
5193
|
+
if (n || (n = new Fn()), bn(a))
|
|
5194
5194
|
iP(o, t, i, e, Wf, r, n);
|
|
5195
5195
|
else {
|
|
5196
5196
|
var s = r ? r(Pd(o, i), a, i + "", o, t, n) : void 0;
|
|
@@ -5260,7 +5260,7 @@ function kP(o, t) {
|
|
|
5260
5260
|
}
|
|
5261
5261
|
var Sd = /* @__PURE__ */ function(o) {
|
|
5262
5262
|
return o.PARTICIPANT = "PARTICIPANT", o.PEER = "PEER", o.CLIENT = "CLIENT", o;
|
|
5263
|
-
}(Sd || {}),
|
|
5263
|
+
}(Sd || {}), me = { PROPAGATE_KICK_ALL: "propagate_kick_across_rooms", REFRESH_ID_ON_DISCONNECTION: "refresh_id_on_disconnection", SKIP_OTEL_TRACES: "skip_otel_traces", USE_USERIDS_IN_CHAT: "use_userids_in_chat", ENABLE_CF_SIMULCAST: "enable_cf_simulcast", CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED: "cf_transport_force_relay_on_ice_failed", LOG_LEVEL: "log_level", V1_PLUGINS: "v1_plugins", LIVESTREAM: "feat_livestream", VAL_MIN_FRAMERATE: "val_min_framerate", SCREEENSHARE_ERR_HACK: "screenshare_err_hack", SCREEENSHARE_CONSTRAINTS_RETRY: "screenshare_constraints_retry", VIDEO_CONSTRAINTS: "video_constraints", SCREENSHARE_CONSTRAINTS: "screenshare_constraints", FEAT_CHAT_SDK: "feat_chat_sdk", FEAT_CHAT_SDK_SEARCH: "chat_search", OBS_QUALITY: "obs_quality", ALLOW_SAFARI_MEDIA_MIDDLEWARES: "allow_safari_media_middlewares", EXP_RESHARE: "exp_reshare", SKIP_SETTING_IN_USE_DEVICE: "skip_setting_in_use_device", PRECALL_BANDWIDTH_TEST: "precall_bandwidth_test", DEBUG_SOCKET_JOIN: "debug_socket_join", FORCE_RELAY: "force_relay", FORCE_VIDEO_CODEC: "force_video_codec", TRACK_HINT: "track_hint", OVERRIDE_SIMULCAST_DYNAMIC: "override_simulcast_dynamic", PRECREATE_PRODUCERS: "precreate_producers", DISABLE_OPUS_DTX_CF: "disable_opus_dtx_cf", ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS: "enable_audio_activity_debug_logs", DISABLE_LAYER_SWITCH: "disable_layer_switch" };
|
|
5264
5264
|
function Dl(o) {
|
|
5265
5265
|
var t = {};
|
|
5266
5266
|
return typeof (o == null ? void 0 : o.code) == "number" && (t.code = o.code), typeof (o == null ? void 0 : o.code) == "string" && (t.code = o.code.substring(0, 100)), typeof (o == null ? void 0 : o.name) == "string" && (t.name = o.name.substring(0, 500)), typeof (o == null ? void 0 : o.message) == "string" && (t.message = o.message.substring(0, 500)), typeof (o == null ? void 0 : o.reason) == "string" && (t.reason = o.reason.substring(0, 500)), typeof (o == null ? void 0 : o.stack) == "string" && (t.stack = o.stack.substring(0, 500)), t;
|
|
@@ -5311,8 +5311,8 @@ function EP(o) {
|
|
|
5311
5311
|
return r || n;
|
|
5312
5312
|
}
|
|
5313
5313
|
function CP(o, t) {
|
|
5314
|
-
if (o != null && o.getValue("flagsmith").hasFeature(
|
|
5315
|
-
var e, r = ((e = o.getValue("flagsmith").getValue(
|
|
5314
|
+
if (o != null && o.getValue("flagsmith").hasFeature(me.LOG_LEVEL)) {
|
|
5315
|
+
var e, r = ((e = o.getValue("flagsmith").getValue(me.LOG_LEVEL)) === null || e === void 0 ? void 0 : e.toString()) || "all";
|
|
5316
5316
|
if (r = r.toLowerCase().trim(), r === "off")
|
|
5317
5317
|
return !1;
|
|
5318
5318
|
if (r !== "all") {
|
|
@@ -5408,7 +5408,7 @@ var O = /* @__PURE__ */ function() {
|
|
|
5408
5408
|
return i.value = function() {
|
|
5409
5409
|
for (var c, d = this === null || this === void 0 ? void 0 : this.telemetry, p = arguments.length, v = new Array(p), f = 0; f < p; f++)
|
|
5410
5410
|
v[f] = arguments[f];
|
|
5411
|
-
if (!d || !d.initialized || navigator.isReactNative || !d.tracingEnabled || (c = Ba.getContext(d.meetingMetadata.peerId)) !== null && c !== void 0 && c.getValue("flagsmith").hasFeature(
|
|
5411
|
+
if (!d || !d.initialized || navigator.isReactNative || !d.tracingEnabled || (c = Ba.getContext(d.meetingMetadata.peerId)) !== null && c !== void 0 && c.getValue("flagsmith").hasFeature(me.SKIP_OTEL_TRACES))
|
|
5412
5412
|
return s.apply(this, v);
|
|
5413
5413
|
d.addLogInCurrentSpan("info", e, r);
|
|
5414
5414
|
var g = performance.now(), k = s.apply(this, v);
|
|
@@ -5672,7 +5672,7 @@ function MP(o, t) {
|
|
|
5672
5672
|
return function(e, r, n) {
|
|
5673
5673
|
if (n)
|
|
5674
5674
|
return Fh(n, o, t);
|
|
5675
|
-
var a =
|
|
5675
|
+
var a = jn(Reflect.ownKeys(e.prototype).filter(function(d) {
|
|
5676
5676
|
return d !== "constructor";
|
|
5677
5677
|
})), i;
|
|
5678
5678
|
try {
|
|
@@ -6020,6 +6020,9 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
|
|
|
6020
6020
|
}
|
|
6021
6021
|
/**
|
|
6022
6022
|
* Initialize PiP and prepare sources
|
|
6023
|
+
* @param {Object} [options]
|
|
6024
|
+
* @param {number} [options.height]
|
|
6025
|
+
* @param {number} [options.width]
|
|
6023
6026
|
*/
|
|
6024
6027
|
}, { key: "init", value: function() {
|
|
6025
6028
|
var r = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = n.height, i = n.width;
|
|
@@ -6040,9 +6043,15 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
|
|
|
6040
6043
|
}
|
|
6041
6044
|
} }, { key: "updateMediaSession", value: function(r, n) {
|
|
6042
6045
|
navigator.mediaSession !== void 0 && (r === "CAMERA" && navigator.mediaSession.setCameraActive !== void 0 && navigator.mediaSession.setCameraActive(n), r === "MIC" && navigator.mediaSession.setMicrophoneActive !== void 0 && navigator.mediaSession.setMicrophoneActive(n));
|
|
6043
|
-
} }, {
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
+
} }, {
|
|
6047
|
+
key: "enableSource",
|
|
6048
|
+
value: function(r) {
|
|
6049
|
+
l(this, fr)[fr][r] !== void 0 && (l(this, fr)[fr][r].enabled = !0);
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* @param {string} source
|
|
6053
|
+
*/
|
|
6054
|
+
}, { key: "disableSource", value: function(r) {
|
|
6046
6055
|
l(this, fr)[fr][r] !== void 0 && (l(this, fr)[fr][r].enabled = !1);
|
|
6047
6056
|
} }, {
|
|
6048
6057
|
key: "generateAvatar",
|
|
@@ -6093,7 +6102,11 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
|
|
|
6093
6102
|
var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : void 0, c = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : !1;
|
|
6094
6103
|
this.logger.debug("Pip::AddSource", { pip: { id: r, handRaised: c } }), l(this, fr)[fr][r] = { id: r, element: n, enabled: a, pinned: i, displayText: s ? DP(s) : void 0, imageUrl: u, handRaised: c }, u && this.generateAvatar(r, u);
|
|
6095
6104
|
}
|
|
6096
|
-
/**
|
|
6105
|
+
/**
|
|
6106
|
+
* Update a video source
|
|
6107
|
+
* @param {string} id
|
|
6108
|
+
* @param {any} source
|
|
6109
|
+
*/
|
|
6097
6110
|
}, {
|
|
6098
6111
|
key: "updateSource",
|
|
6099
6112
|
value: function(r, n) {
|
|
@@ -6274,7 +6287,7 @@ var FP = /* @__PURE__ */ function(o) {
|
|
|
6274
6287
|
}]]);
|
|
6275
6288
|
}
|
|
6276
6289
|
return A(t, o), P(t);
|
|
6277
|
-
}(M),
|
|
6290
|
+
}(M), Bn = new FP(), HP = /* @__PURE__ */ function(o) {
|
|
6278
6291
|
function t() {
|
|
6279
6292
|
return w(this, t), R(this, t, ["media.ProducerPayload", [{
|
|
6280
6293
|
no: 1,
|
|
@@ -6333,7 +6346,7 @@ var FP = /* @__PURE__ */ function(o) {
|
|
|
6333
6346
|
T: 8
|
|
6334
6347
|
/*ScalarType.BOOL*/
|
|
6335
6348
|
}, { no: 3, name: "description", kind: "message", T: function() {
|
|
6336
|
-
return
|
|
6349
|
+
return Bn;
|
|
6337
6350
|
} }, {
|
|
6338
6351
|
no: 4,
|
|
6339
6352
|
name: "private_ice",
|
|
@@ -6378,7 +6391,7 @@ var FP = /* @__PURE__ */ function(o) {
|
|
|
6378
6391
|
T: 9
|
|
6379
6392
|
/*ScalarType.STRING*/
|
|
6380
6393
|
}, { no: 2, name: "description", kind: "message", T: function() {
|
|
6381
|
-
return
|
|
6394
|
+
return Bn;
|
|
6382
6395
|
} }, {
|
|
6383
6396
|
no: 3,
|
|
6384
6397
|
name: "transcription_enabled",
|
|
@@ -6405,7 +6418,7 @@ var FP = /* @__PURE__ */ function(o) {
|
|
|
6405
6418
|
T: 9
|
|
6406
6419
|
/*ScalarType.STRING*/
|
|
6407
6420
|
}, { no: 2, name: "description", kind: "message", T: function() {
|
|
6408
|
-
return
|
|
6421
|
+
return Bn;
|
|
6409
6422
|
} }]]);
|
|
6410
6423
|
}
|
|
6411
6424
|
return A(t, o), P(t);
|
|
@@ -6418,7 +6431,7 @@ var FP = /* @__PURE__ */ function(o) {
|
|
|
6418
6431
|
T: 9
|
|
6419
6432
|
/*ScalarType.STRING*/
|
|
6420
6433
|
}, { no: 2, name: "description", kind: "message", T: function() {
|
|
6421
|
-
return
|
|
6434
|
+
return Bn;
|
|
6422
6435
|
} }]]);
|
|
6423
6436
|
}
|
|
6424
6437
|
return A(t, o), P(t);
|
|
@@ -6891,7 +6904,7 @@ var wS = /* @__PURE__ */ function(o) {
|
|
|
6891
6904
|
T: 8
|
|
6892
6905
|
/*ScalarType.BOOL*/
|
|
6893
6906
|
}, { no: 4, name: "description", kind: "message", T: function() {
|
|
6894
|
-
return
|
|
6907
|
+
return Bn;
|
|
6895
6908
|
} }, {
|
|
6896
6909
|
no: 5,
|
|
6897
6910
|
name: "msid",
|
|
@@ -6985,7 +6998,7 @@ var VS = /* @__PURE__ */ function(o) {
|
|
|
6985
6998
|
T: 9
|
|
6986
6999
|
/*ScalarType.STRING*/
|
|
6987
7000
|
}, { no: 2, name: "description", kind: "message", T: function() {
|
|
6988
|
-
return
|
|
7001
|
+
return Bn;
|
|
6989
7002
|
} }, {
|
|
6990
7003
|
no: 3,
|
|
6991
7004
|
name: "producing_transport_id",
|
|
@@ -7006,7 +7019,7 @@ var VS = /* @__PURE__ */ function(o) {
|
|
|
7006
7019
|
T: 9
|
|
7007
7020
|
/*ScalarType.STRING*/
|
|
7008
7021
|
}, { no: 2, name: "description", kind: "message", T: function() {
|
|
7009
|
-
return
|
|
7022
|
+
return Bn;
|
|
7010
7023
|
} }, {
|
|
7011
7024
|
no: 3,
|
|
7012
7025
|
name: "consuming_transport_id",
|
|
@@ -7322,7 +7335,7 @@ var cE = /* @__PURE__ */ function(o) {
|
|
|
7322
7335
|
}, { no: 2, name: "consumer_ids_map", kind: "message", T: function() {
|
|
7323
7336
|
return Xf;
|
|
7324
7337
|
} }, { no: 3, name: "description", kind: "message", T: function() {
|
|
7325
|
-
return
|
|
7338
|
+
return Bn;
|
|
7326
7339
|
} }]]);
|
|
7327
7340
|
}
|
|
7328
7341
|
return A(t, o), P(t);
|
|
@@ -7341,7 +7354,7 @@ var cE = /* @__PURE__ */ function(o) {
|
|
|
7341
7354
|
T: 9
|
|
7342
7355
|
/*ScalarType.STRING*/
|
|
7343
7356
|
}, { no: 4, name: "description", kind: "message", T: function() {
|
|
7344
|
-
return
|
|
7357
|
+
return Bn;
|
|
7345
7358
|
} }]]);
|
|
7346
7359
|
}
|
|
7347
7360
|
return A(t, o), P(t);
|
|
@@ -7403,14 +7416,14 @@ new yE();
|
|
|
7403
7416
|
var kE = /* @__PURE__ */ function(o) {
|
|
7404
7417
|
function t() {
|
|
7405
7418
|
return w(this, t), R(this, t, ["media.edge.ProducerClosingResponse", [{ no: 1, name: "description", kind: "message", T: function() {
|
|
7406
|
-
return
|
|
7419
|
+
return Bn;
|
|
7407
7420
|
} }]]);
|
|
7408
7421
|
}
|
|
7409
7422
|
return A(t, o), P(t);
|
|
7410
7423
|
}(M), bE = new kE(), TE = /* @__PURE__ */ function(o) {
|
|
7411
7424
|
function t() {
|
|
7412
7425
|
return w(this, t), R(this, t, ["media.edge.ConsumerClosingResponse", [{ no: 1, name: "description", kind: "message", T: function() {
|
|
7413
|
-
return
|
|
7426
|
+
return Bn;
|
|
7414
7427
|
} }]]);
|
|
7415
7428
|
}
|
|
7416
7429
|
return A(t, o), P(t);
|
|
@@ -10600,7 +10613,7 @@ function cg(o, t) {
|
|
|
10600
10613
|
return e[r] = t | o[r], e;
|
|
10601
10614
|
}, {});
|
|
10602
10615
|
}
|
|
10603
|
-
var Q = Ho(FA, JA), Ir = Ho(HA, KA), se = Ho(BA, zA), Na = Ho(qA, YA), As = Ho(GA, QA), Ri = cg(lg, 16777216),
|
|
10616
|
+
var Q = Ho(FA, JA), Ir = Ho(HA, KA), se = Ho(BA, zA), Na = Ho(qA, YA), As = Ho(GA, QA), Ri = cg(lg, 16777216), Nn = cg(lg, 50331648), $l = Ho(WA, XA), ZA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, qp = function(t, e, r, n) {
|
|
10604
10617
|
for (var a = n > 1 ? void 0 : n ? xA(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
10605
10618
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
10606
10619
|
return n && a && ZA(e, r, a), a;
|
|
@@ -10717,19 +10730,19 @@ var Q = Ho(FA, JA), Ir = Ho(HA, KA), se = Ho(BA, zA), Na = Ho(qA, YA), As = Ho(G
|
|
|
10717
10730
|
});
|
|
10718
10731
|
} }], [{ key: "formatChannel", value: function(e) {
|
|
10719
10732
|
var r, n = e.latestMessageAndUnreadCount, a = N(N({}, e), {}, { id: e.chatChannelId, memberIds: e.targetUserIds, unreadCount: (r = n == null ? void 0 : n.unreadCount) !== null && r !== void 0 ? r : 0 });
|
|
10720
|
-
return n != null && n.message && (a.latestMessage =
|
|
10733
|
+
return n != null && n.message && (a.latestMessage = Vn.formatSocketPeerMessage(n.message)), delete a.chatChannelId, delete a.targetUserIds, delete a.latestMessageAndUnreadCount, a;
|
|
10721
10734
|
} }]);
|
|
10722
10735
|
}()), Ys = Dd;
|
|
10723
10736
|
qp([O.trace("ChatChannelHandler.createChannel")], Ys.prototype, "createChannel", 1);
|
|
10724
10737
|
qp([O.trace("ChatChannelHandler.updateChannel")], Ys.prototype, "updateChannel", 1);
|
|
10725
10738
|
qp([O.trace("ChatChannelHandler.getChannelMembers")], Ys.prototype, "getChannelMembers", 1);
|
|
10726
|
-
var eI = Object.defineProperty, rI = Object.getOwnPropertyDescriptor,
|
|
10739
|
+
var eI = Object.defineProperty, rI = Object.getOwnPropertyDescriptor, qn = function(t, e, r, n) {
|
|
10727
10740
|
for (var a = n > 1 ? void 0 : n ? rI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
10728
10741
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
10729
10742
|
return n && a && eI(e, r, a), a;
|
|
10730
10743
|
}, St = /* @__PURE__ */ function(o) {
|
|
10731
10744
|
return o[o.TEXT = 0] = "TEXT", o[o.IMAGE = 1] = "IMAGE", o[o.FILE = 2] = "FILE", o[o.CUSTOM = 3] = "CUSTOM", o;
|
|
10732
|
-
}(St || {}), nr = /* @__PURE__ */ C("socket"), ls = /* @__PURE__ */ C("context"),
|
|
10745
|
+
}(St || {}), nr = /* @__PURE__ */ C("socket"), ls = /* @__PURE__ */ C("context"), Tn = /* @__PURE__ */ function() {
|
|
10733
10746
|
function o(t, e) {
|
|
10734
10747
|
w(this, o), Object.defineProperty(this, nr, { writable: !0, value: void 0 }), Object.defineProperty(this, ls, { writable: !0, value: void 0 }), l(this, nr)[nr] = e, l(this, ls)[ls] = t;
|
|
10735
10748
|
}
|
|
@@ -10956,33 +10969,33 @@ var eI = Object.defineProperty, rI = Object.getOwnPropertyDescriptor, Gn = funct
|
|
|
10956
10969
|
});
|
|
10957
10970
|
} }]);
|
|
10958
10971
|
}();
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10972
|
+
qn([O.trace("SocketService.getChatMessages")], Tn.prototype, "getChatMessages", 1);
|
|
10973
|
+
qn([O.trace("SocketService.getChatMessagesPaginated")], Tn.prototype, "getChatMessagesPaginated", 1);
|
|
10974
|
+
qn([O.trace("SocketService.sendMessageToRoom")], Tn.prototype, "sendMessageToRoom", 1);
|
|
10975
|
+
qn([O.trace("SocketService.sendMessageToPeers")], Tn.prototype, "sendMessageToPeers", 1);
|
|
10976
|
+
qn([O.trace("SocketService.sendMessageToChannel")], Tn.prototype, "sendMessageToChannel", 1);
|
|
10977
|
+
qn([O.trace("SocketService.sendMessage")], Tn.prototype, "sendMessage", 1);
|
|
10978
|
+
qn([O.trace("SocketService.editMessage")], Tn.prototype, "editMessage", 1);
|
|
10979
|
+
qn([O.trace("SocketService.deleteMessage")], Tn.prototype, "deleteMessage", 1);
|
|
10980
|
+
qn([O.trace("SocketService.searchMessages")], Tn.prototype, "searchMessages", 1);
|
|
10981
|
+
qn([O.trace("SocketService.getAllChannels")], Tn.prototype, "getAllChannels", 1);
|
|
10982
|
+
qn([O.trace("SocketService.markLastReadMessage")], Tn.prototype, "markLastReadMessage", 1);
|
|
10970
10983
|
function tI(o) {
|
|
10971
10984
|
return o.replace(/([-_]\w)/g, function(t) {
|
|
10972
10985
|
return t[1].toUpperCase();
|
|
10973
10986
|
});
|
|
10974
10987
|
}
|
|
10975
|
-
function
|
|
10988
|
+
function Un(o) {
|
|
10976
10989
|
if (!o || ke(o) !== "object")
|
|
10977
10990
|
return o;
|
|
10978
10991
|
if (Array.isArray(o))
|
|
10979
10992
|
return o.map(function(e) {
|
|
10980
|
-
return
|
|
10993
|
+
return Un(e);
|
|
10981
10994
|
});
|
|
10982
10995
|
var t = {};
|
|
10983
10996
|
return Object.keys(o).forEach(function(e) {
|
|
10984
10997
|
var r = Mv(e) ? e : tI(e);
|
|
10985
|
-
t[r] =
|
|
10998
|
+
t[r] = Un(o[e]);
|
|
10986
10999
|
}), t;
|
|
10987
11000
|
}
|
|
10988
11001
|
function nI(o) {
|
|
@@ -11198,7 +11211,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11198
11211
|
} }, { key: "setOrganizationId", value: function(e) {
|
|
11199
11212
|
this.organizationId = e;
|
|
11200
11213
|
} }]);
|
|
11201
|
-
}(), uI = Object.defineProperty, lI = Object.getOwnPropertyDescriptor,
|
|
11214
|
+
}(), uI = Object.defineProperty, lI = Object.getOwnPropertyDescriptor, wn = function(t, e, r, n) {
|
|
11202
11215
|
for (var a = n > 1 ? void 0 : n ? lI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
11203
11216
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
11204
11217
|
return n && a && uI(e, r, a), a;
|
|
@@ -11282,7 +11295,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11282
11295
|
case 2:
|
|
11283
11296
|
return f.next = 4, this.requests.get("/v2/plugins/user");
|
|
11284
11297
|
case 4:
|
|
11285
|
-
return u = f.sent.data.data.plugins, c = ((a = this.context.getValue("flagsmith").getValue(
|
|
11298
|
+
return u = f.sent.data.data.plugins, c = ((a = this.context.getValue("flagsmith").getValue(me.V1_PLUGINS)) === null || a === void 0 || (a = a.toString()) === null || a === void 0 ? void 0 : a.split(",")) || [], d = u.reduce(function(g, k) {
|
|
11286
11299
|
return g[c.includes(k.id) ? "v1" : "v2"].push(N(N({}, k), {}, { name: k.name.replace("v2", "") })), g;
|
|
11287
11300
|
}, { v1: [], v2: [] }), (i = this.context.getValue("modules")) !== null && i !== void 0 && (i = i.devTools) !== null && i !== void 0 && (i = i.plugins) !== null && i !== void 0 && i.length && ((p = this.context.getValue("modules")) === null || p === void 0 || (p = p.devTools) === null || p === void 0 || p.plugins.forEach(function(g) {
|
|
11288
11301
|
var k, y, b, E = N(N({}, Qo), {}, { tags: Pe(Qo.tags), baseUrl: "http://localhost:".concat(g.port), name: g.name, picture: (k = g.picture) !== null && k !== void 0 ? k : Qo.picture, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), id: g.id, organizationId: s.organizationId, description: (y = g.description) !== null && y !== void 0 ? y : Qo.description, staggered: (b = g.staggered) !== null && b !== void 0 ? b : Qo.staggered });
|
|
@@ -11365,7 +11378,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11365
11378
|
for (; ; )
|
|
11366
11379
|
switch (f.prev = f.next) {
|
|
11367
11380
|
case 0:
|
|
11368
|
-
return s = No(this.context, "chat_upload_expiry"), u = { roomUUID: this.roomUUID, filename: a, expiry: typeof s == "number" ? s : void 0 }, this.context.getValue("flagsmith").hasFeature(
|
|
11381
|
+
return s = No(this.context, "chat_upload_expiry"), u = { roomUUID: this.roomUUID, filename: a, expiry: typeof s == "number" ? s : void 0 }, this.context.getValue("flagsmith").hasFeature(me.FEAT_CHAT_SDK) && (u.viewType = i), f.next = 5, this.requests.post("/v1/meetings/genPreSignedUploadUrl", u);
|
|
11369
11382
|
case 5:
|
|
11370
11383
|
return c = f.sent.data.data, d = c.getLocation, p = c.putLocation, f.abrupt("return", { getLocation: d, putLocation: p });
|
|
11371
11384
|
case 9:
|
|
@@ -11422,7 +11435,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11422
11435
|
for (; ; )
|
|
11423
11436
|
switch (c.prev = c.next) {
|
|
11424
11437
|
case 0:
|
|
11425
|
-
return i = a.manualIngestion, c.t0 =
|
|
11438
|
+
return i = a.manualIngestion, c.t0 = Un, c.next = 4, this.requests.post("/v2/meetings/".concat(this.context.getValue("meetingId"), "/livestreams"), { manual_ingest: !!i });
|
|
11426
11439
|
case 4:
|
|
11427
11440
|
return c.t1 = c.sent, s = (0, c.t0)(c.t1).data.data, c.abrupt("return", { playbackUrl: s.playbackUrl, status: s.status, manualIngest: s.manualIngest, ingestionCredentials: s.streamKey ? { ingestionServer: s.ingestServer, streamKey: s.streamKey } : null });
|
|
11428
11441
|
case 7:
|
|
@@ -11461,7 +11474,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11461
11474
|
for (; ; )
|
|
11462
11475
|
switch (s.prev = s.next) {
|
|
11463
11476
|
case 0:
|
|
11464
|
-
return s.t0 =
|
|
11477
|
+
return s.t0 = Un, s.next = 3, this.requests.get("/v2/meetings/".concat(this.context.getValue("meetingId"), "/active-livestream"));
|
|
11465
11478
|
case 3:
|
|
11466
11479
|
return s.t1 = s.sent.data.data, a = (0, s.t0)(s.t1), s.abrupt("return", { playbackUrl: a.playbackUrl, status: a.status, manualIngest: a.manualIngest, ingestionCredentials: a.streamKey ? { ingestionServer: a.ingestServer, streamKey: a.streamKey } : null });
|
|
11467
11480
|
case 6:
|
|
@@ -11489,7 +11502,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11489
11502
|
case 2:
|
|
11490
11503
|
return s.next = 4, this.requests.get("v2/internals/participant-details");
|
|
11491
11504
|
case 4:
|
|
11492
|
-
return a = s.sent.data.data, s.abrupt("return",
|
|
11505
|
+
return a = s.sent.data.data, s.abrupt("return", Un(a));
|
|
11493
11506
|
case 6:
|
|
11494
11507
|
case "end":
|
|
11495
11508
|
return s.stop();
|
|
@@ -11596,7 +11609,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11596
11609
|
}
|
|
11597
11610
|
return c.abrupt("return", this.roomDetails);
|
|
11598
11611
|
case 6:
|
|
11599
|
-
return c.t0 =
|
|
11612
|
+
return c.t0 = Un, c.next = 9, this.requests.post("v2/internals/rooms", { ip_information: a });
|
|
11600
11613
|
case 9:
|
|
11601
11614
|
return c.t1 = c.sent.data.data, i = (0, c.t0)(c.t1), s = i.title, c.abrupt("return", { meetingTitle: s });
|
|
11602
11615
|
case 13:
|
|
@@ -11611,18 +11624,18 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11611
11624
|
return r;
|
|
11612
11625
|
}() }]);
|
|
11613
11626
|
}(oI);
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11627
|
+
wn([O.trace("APIClient.getIPDetails")], on.prototype, "getIPDetails", 1);
|
|
11628
|
+
wn([O.trace("APIClient.getICEServers")], on.prototype, "getICEServers", 1);
|
|
11629
|
+
wn([O.trace("APIClient.getPlugins")], on.prototype, "getPlugins", 1);
|
|
11630
|
+
wn([O.trace("APIClient.startLivestreaming")], on.prototype, "startLivestreaming", 1);
|
|
11631
|
+
wn([O.trace("APIClient.stopLivestreaming")], on.prototype, "stopLivestreaming", 1);
|
|
11632
|
+
wn([O.trace("APIClient.getActiveLivestream")], on.prototype, "getActiveLivestream", 1);
|
|
11633
|
+
wn([O.trace("APIClient.getUserDetails")], on.prototype, "getUserDetails", 1);
|
|
11634
|
+
wn([O.trace("APIClient.startRecording")], on.prototype, "startRecording", 1);
|
|
11635
|
+
wn([O.trace("APIClient.stopRecording")], on.prototype, "updateRecording", 1);
|
|
11636
|
+
wn([O.trace("APIClient.getActiveRecording")], on.prototype, "getActiveRecording", 1);
|
|
11637
|
+
wn([O.trace("APIClient.getActiveTranscript")], on.prototype, "getActiveTranscript", 1);
|
|
11638
|
+
wn([O.trace("APIClient.getRoomNodeData")], on.prototype, "getRoomNodeData", 1);
|
|
11626
11639
|
var Ld;
|
|
11627
11640
|
function cI(o, t) {
|
|
11628
11641
|
return Ld = new on(o, t), Ld;
|
|
@@ -11655,12 +11668,12 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11655
11668
|
for (var a = n > 1 ? void 0 : n ? hI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
11656
11669
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
11657
11670
|
return n && a && pI(e, r, a), a;
|
|
11658
|
-
}, vI = ["text", "image", "file", "custom", "poll"], Nl = { maxInvocations: 180, period: 60 }, at = (z = /* @__PURE__ */ C("self"),
|
|
11671
|
+
}, vI = ["text", "image", "file", "custom", "poll"], Nl = { maxInvocations: 180, period: 60 }, at = (z = /* @__PURE__ */ C("self"), Wn = /* @__PURE__ */ C("participants"), $e = /* @__PURE__ */ C("chatSocketHandler"), Jn = /* @__PURE__ */ C("chatChannelSocketHandler"), oa = /* @__PURE__ */ C("context"), Fl = /* @__PURE__ */ C("connectionHandler"), so = /* @__PURE__ */ C("socketJoined"), /* @__PURE__ */ function(o) {
|
|
11659
11672
|
function t(e, r, n, a, i) {
|
|
11660
11673
|
var s;
|
|
11661
11674
|
w(this, t);
|
|
11662
11675
|
var u = e.getValue("logger");
|
|
11663
|
-
return s = R(this, t, [u]), Object.defineProperty(s, so, { get: gI, set: void 0 }), Object.defineProperty(s, Fl, { get: fI, set: void 0 }), s.messages = void 0, s.channels = [], Object.defineProperty(s, z, { writable: !0, value: void 0 }), Object.defineProperty(s,
|
|
11676
|
+
return s = R(this, t, [u]), Object.defineProperty(s, so, { get: gI, set: void 0 }), Object.defineProperty(s, Fl, { get: fI, set: void 0 }), s.messages = void 0, s.channels = [], Object.defineProperty(s, z, { writable: !0, value: void 0 }), Object.defineProperty(s, Wn, { writable: !0, value: void 0 }), Object.defineProperty(s, $e, { writable: !0, value: void 0 }), Object.defineProperty(s, Jn, { writable: !0, value: void 0 }), Object.defineProperty(s, oa, { writable: !0, value: void 0 }), s.maxTextLimit = 2e3, l(s, oa)[oa] = e, l(s, $e)[$e] = r, l(s, Jn)[Jn] = n, l(s, z)[z] = a, l(s, Wn)[Wn] = i, s.messages = [], s;
|
|
11664
11677
|
}
|
|
11665
11678
|
return A(t, o), P(t, [{
|
|
11666
11679
|
key: "telemetry",
|
|
@@ -11674,7 +11687,8 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11674
11687
|
}
|
|
11675
11688
|
)
|
|
11676
11689
|
/**
|
|
11677
|
-
|
|
11690
|
+
* Set the max character limit of a text message
|
|
11691
|
+
* @param {number} limit - Max character limit for a text message.
|
|
11678
11692
|
*/
|
|
11679
11693
|
}, { key: "setMaxTextLimit", value: function(r) {
|
|
11680
11694
|
this.maxTextLimit = r;
|
|
@@ -11755,7 +11769,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11755
11769
|
}
|
|
11756
11770
|
return l(this, $e)[$e].sendMessageToChannel(a, St.TEXT, s), g.abrupt("return");
|
|
11757
11771
|
case 17:
|
|
11758
|
-
v = [], i && i.length > 0 && (i.push(l(this, z)[z].id), v = l(this,
|
|
11772
|
+
v = [], i && i.length > 0 && (i.push(l(this, z)[z].id), v = l(this, Wn)[Wn].joined.toArray().filter(function(k) {
|
|
11759
11773
|
return i.includes(k.id);
|
|
11760
11774
|
}).map(function(k) {
|
|
11761
11775
|
return k.userId;
|
|
@@ -11818,7 +11832,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11818
11832
|
}
|
|
11819
11833
|
return l(this, $e)[$e].sendMessageToChannel(k, St.IMAGE, s), T.abrupt("return");
|
|
11820
11834
|
case 28:
|
|
11821
|
-
b = [], i && i.length > 0 && (i.push(l(this, z)[z].id), b = l(this,
|
|
11835
|
+
b = [], i && i.length > 0 && (i.push(l(this, z)[z].id), b = l(this, Wn)[Wn].joined.toArray().filter(function(S) {
|
|
11822
11836
|
return i.includes(S.id);
|
|
11823
11837
|
}).map(function(S) {
|
|
11824
11838
|
return S.userId;
|
|
@@ -11836,96 +11850,103 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11836
11850
|
return e.apply(this, arguments);
|
|
11837
11851
|
}
|
|
11838
11852
|
return r;
|
|
11853
|
+
}() }, { key: "sendFileMessageInternal", value: function() {
|
|
11854
|
+
var e = m(/* @__PURE__ */ h().mark(function n(a, i, s) {
|
|
11855
|
+
var u, c, d, p, v, f, g, k, y, b;
|
|
11856
|
+
return h().wrap(function(T) {
|
|
11857
|
+
for (; ; )
|
|
11858
|
+
switch (T.prev = T.next) {
|
|
11859
|
+
case 0:
|
|
11860
|
+
if (!(i && i.length > 0)) {
|
|
11861
|
+
T.next = 6;
|
|
11862
|
+
break;
|
|
11863
|
+
}
|
|
11864
|
+
if (!(!((d = l(this, z)[z].permissions) !== null && d !== void 0 && d.chatPrivate.canSend) || !((p = l(this, z)[z].permissions) !== null && p !== void 0 && p.chatPrivate.files))) {
|
|
11865
|
+
T.next = 4;
|
|
11866
|
+
break;
|
|
11867
|
+
}
|
|
11868
|
+
return this.logger.error("sendFileMessage::private_chat_permission_denied"), T.abrupt("return");
|
|
11869
|
+
case 4:
|
|
11870
|
+
T.next = 9;
|
|
11871
|
+
break;
|
|
11872
|
+
case 6:
|
|
11873
|
+
if (!(!((u = l(this, z)[z].permissions) !== null && u !== void 0 && (u = u.chatPublic) !== null && u !== void 0 && u.canSend) || !((c = l(this, z)[z].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.files))) {
|
|
11874
|
+
T.next = 9;
|
|
11875
|
+
break;
|
|
11876
|
+
}
|
|
11877
|
+
return this.logger.error("sendFileMessage::permission_denied"), T.abrupt("return");
|
|
11878
|
+
case 9:
|
|
11879
|
+
if (a) {
|
|
11880
|
+
T.next = 12;
|
|
11881
|
+
break;
|
|
11882
|
+
}
|
|
11883
|
+
return this.logger.error("sendFileMessage::required_argument_file_can_not_be_empty"), T.abrupt("return");
|
|
11884
|
+
case 12:
|
|
11885
|
+
return T.prev = 12, v = ht(), T.next = 16, v.getPresignedUrls(a.name, l(this, z)[z].config.viewType);
|
|
11886
|
+
case 16:
|
|
11887
|
+
return f = T.sent, g = f.getLocation, k = f.putLocation, T.next = 21, v.uploadFile(a, k);
|
|
11888
|
+
case 21:
|
|
11889
|
+
if (!s) {
|
|
11890
|
+
T.next = 24;
|
|
11891
|
+
break;
|
|
11892
|
+
}
|
|
11893
|
+
return l(this, $e)[$e].sendMessageToChannel(JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), St.FILE, s), T.abrupt("return");
|
|
11894
|
+
case 24:
|
|
11895
|
+
y = [], i && i.length > 0 && (i.push(l(this, z)[z].id), y = l(this, Wn)[Wn].joined.toArray().filter(function(S) {
|
|
11896
|
+
return i.includes(S.id);
|
|
11897
|
+
}).map(function(S) {
|
|
11898
|
+
return S.userId;
|
|
11899
|
+
}), y.push(l(this, z)[z].userId)), b = JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), l(this, $e)[$e].sendMessage(b, St.FILE, i), T.next = 33;
|
|
11900
|
+
break;
|
|
11901
|
+
case 30:
|
|
11902
|
+
throw T.prev = 30, T.t0 = T.catch(12), new j("Error sending file message.", "0500", this.logger);
|
|
11903
|
+
case 33:
|
|
11904
|
+
case "end":
|
|
11905
|
+
return T.stop();
|
|
11906
|
+
}
|
|
11907
|
+
}, n, this, [[12, 30]]);
|
|
11908
|
+
}));
|
|
11909
|
+
function r(n, a, i) {
|
|
11910
|
+
return e.apply(this, arguments);
|
|
11911
|
+
}
|
|
11912
|
+
return r;
|
|
11839
11913
|
}() }, {
|
|
11840
|
-
key: "
|
|
11914
|
+
key: "rateLimits",
|
|
11915
|
+
get: function() {
|
|
11916
|
+
return Nl;
|
|
11917
|
+
}
|
|
11918
|
+
/**
|
|
11919
|
+
* @param {number} num
|
|
11920
|
+
* @param {number} period
|
|
11921
|
+
*/
|
|
11922
|
+
// eslint-disable-next-line class-methods-use-this
|
|
11923
|
+
}, { key: "updateRateLimits", value: function(r, n) {
|
|
11924
|
+
Nl.maxInvocations = r, Nl.period = n;
|
|
11925
|
+
} }, {
|
|
11926
|
+
key: "sendTextMessage",
|
|
11841
11927
|
value: function() {
|
|
11842
|
-
var e = m(/* @__PURE__ */ h().mark(function n(a, i
|
|
11843
|
-
|
|
11844
|
-
return h().wrap(function(T) {
|
|
11928
|
+
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
11929
|
+
return h().wrap(function(u) {
|
|
11845
11930
|
for (; ; )
|
|
11846
|
-
switch (
|
|
11931
|
+
switch (u.prev = u.next) {
|
|
11847
11932
|
case 0:
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
break;
|
|
11851
|
-
}
|
|
11852
|
-
if (!(!((d = l(this, z)[z].permissions) !== null && d !== void 0 && d.chatPrivate.canSend) || !((p = l(this, z)[z].permissions) !== null && p !== void 0 && p.chatPrivate.files))) {
|
|
11853
|
-
T.next = 4;
|
|
11854
|
-
break;
|
|
11855
|
-
}
|
|
11856
|
-
return this.logger.error("sendFileMessage::private_chat_permission_denied"), T.abrupt("return");
|
|
11857
|
-
case 4:
|
|
11858
|
-
T.next = 9;
|
|
11859
|
-
break;
|
|
11860
|
-
case 6:
|
|
11861
|
-
if (!(!((u = l(this, z)[z].permissions) !== null && u !== void 0 && (u = u.chatPublic) !== null && u !== void 0 && u.canSend) || !((c = l(this, z)[z].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.files))) {
|
|
11862
|
-
T.next = 9;
|
|
11863
|
-
break;
|
|
11864
|
-
}
|
|
11865
|
-
return this.logger.error("sendFileMessage::permission_denied"), T.abrupt("return");
|
|
11866
|
-
case 9:
|
|
11867
|
-
if (a) {
|
|
11868
|
-
T.next = 12;
|
|
11869
|
-
break;
|
|
11870
|
-
}
|
|
11871
|
-
return this.logger.error("sendFileMessage::required_argument_file_can_not_be_empty"), T.abrupt("return");
|
|
11872
|
-
case 12:
|
|
11873
|
-
return T.prev = 12, v = ht(), T.next = 16, v.getPresignedUrls(a.name, l(this, z)[z].config.viewType);
|
|
11874
|
-
case 16:
|
|
11875
|
-
return f = T.sent, g = f.getLocation, k = f.putLocation, T.next = 21, v.uploadFile(a, k);
|
|
11876
|
-
case 21:
|
|
11877
|
-
if (!s) {
|
|
11878
|
-
T.next = 24;
|
|
11879
|
-
break;
|
|
11880
|
-
}
|
|
11881
|
-
return l(this, $e)[$e].sendMessageToChannel(JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), St.FILE, s), T.abrupt("return");
|
|
11882
|
-
case 24:
|
|
11883
|
-
y = [], i && i.length > 0 && (i.push(l(this, z)[z].id), y = l(this, Jn)[Jn].joined.toArray().filter(function(S) {
|
|
11884
|
-
return i.includes(S.id);
|
|
11885
|
-
}).map(function(S) {
|
|
11886
|
-
return S.userId;
|
|
11887
|
-
}), y.push(l(this, z)[z].userId)), b = JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), l(this, $e)[$e].sendMessage(b, St.FILE, i), T.next = 33;
|
|
11888
|
-
break;
|
|
11889
|
-
case 30:
|
|
11890
|
-
throw T.prev = 30, T.t0 = T.catch(12), new j("Error sending file message.", "0500", this.logger);
|
|
11891
|
-
case 33:
|
|
11933
|
+
return u.abrupt("return", this.sendTextMessageInternal(a, i));
|
|
11934
|
+
case 1:
|
|
11892
11935
|
case "end":
|
|
11893
|
-
return
|
|
11936
|
+
return u.stop();
|
|
11894
11937
|
}
|
|
11895
|
-
}, n, this
|
|
11938
|
+
}, n, this);
|
|
11896
11939
|
}));
|
|
11897
|
-
function r(n, a
|
|
11940
|
+
function r(n, a) {
|
|
11898
11941
|
return e.apply(this, arguments);
|
|
11899
11942
|
}
|
|
11900
11943
|
return r;
|
|
11901
11944
|
}()
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
}
|
|
11908
|
-
// eslint-disable-next-line class-methods-use-this
|
|
11909
|
-
}, { key: "updateRateLimits", value: function(r, n) {
|
|
11910
|
-
Nl.maxInvocations = r, Nl.period = n;
|
|
11911
|
-
} }, { key: "sendTextMessage", value: function() {
|
|
11912
|
-
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
11913
|
-
return h().wrap(function(u) {
|
|
11914
|
-
for (; ; )
|
|
11915
|
-
switch (u.prev = u.next) {
|
|
11916
|
-
case 0:
|
|
11917
|
-
return u.abrupt("return", this.sendTextMessageInternal(a, i));
|
|
11918
|
-
case 1:
|
|
11919
|
-
case "end":
|
|
11920
|
-
return u.stop();
|
|
11921
|
-
}
|
|
11922
|
-
}, n, this);
|
|
11923
|
-
}));
|
|
11924
|
-
function r(n, a) {
|
|
11925
|
-
return e.apply(this, arguments);
|
|
11926
|
-
}
|
|
11927
|
-
return r;
|
|
11928
|
-
}() }, { key: "sendCustomMessage", value: function() {
|
|
11945
|
+
/**
|
|
11946
|
+
* @param {CustomMessagePayload} message - Custom message payload.
|
|
11947
|
+
* @param {string[]} [peerIds] - Peer ids to send the message to.
|
|
11948
|
+
*/
|
|
11949
|
+
}, { key: "sendCustomMessage", value: function() {
|
|
11929
11950
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
11930
11951
|
var s, u, c, d = this, p, v, f, g, k, y, b, E, T, S, D;
|
|
11931
11952
|
return h().wrap(function(_) {
|
|
@@ -12267,7 +12288,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12267
12288
|
}()
|
|
12268
12289
|
/**
|
|
12269
12290
|
* Returns an array of messages sent by a specific userId.
|
|
12270
|
-
* @param userId The user id of the user that sent the message.
|
|
12291
|
+
* @param {string} userId The user id of the user that sent the message.
|
|
12271
12292
|
*/
|
|
12272
12293
|
}, {
|
|
12273
12294
|
key: "getMessagesByUser",
|
|
@@ -12278,7 +12299,9 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12278
12299
|
}
|
|
12279
12300
|
/**
|
|
12280
12301
|
* Returns an array of 'text', 'image' or 'file' messages.
|
|
12281
|
-
* @param
|
|
12302
|
+
* @param {(
|
|
12303
|
+
* 'text'|'image'|'file'|'custom'|'poll'
|
|
12304
|
+
* )} type 'text', 'image', 'file', 'custom', or 'poll'.
|
|
12282
12305
|
*/
|
|
12283
12306
|
}, {
|
|
12284
12307
|
key: "getMessagesByType",
|
|
@@ -12289,7 +12312,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12289
12312
|
}
|
|
12290
12313
|
/**
|
|
12291
12314
|
* Pins a chat message
|
|
12292
|
-
* @param id ID of the message to be pinned
|
|
12315
|
+
* @param {string} id ID of the message to be pinned
|
|
12293
12316
|
*/
|
|
12294
12317
|
}, { key: "pin", value: function() {
|
|
12295
12318
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -12377,7 +12400,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12377
12400
|
return u = p.length > 3 && p[3] !== void 0 ? p[3] : 0, c = p.length > 4 && p[4] !== void 0 ? p[4] : void 0, f.next = 4, l(this, $e)[$e].getChatMessagesPaginated(a, i, s, u, c);
|
|
12378
12401
|
case 4:
|
|
12379
12402
|
return d = f.sent, f.abrupt("return", { messages: d.messages.map(function(g) {
|
|
12380
|
-
return
|
|
12403
|
+
return Vn.formatSocketPeerMessage(g);
|
|
12381
12404
|
}), next: d.next });
|
|
12382
12405
|
case 6:
|
|
12383
12406
|
case "end":
|
|
@@ -12424,7 +12447,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12424
12447
|
}
|
|
12425
12448
|
throw new j("channel name cannot be empty.", "0510");
|
|
12426
12449
|
case 11:
|
|
12427
|
-
return d = Pe(/* @__PURE__ */ new Set([].concat(Pe(i), [l(this, z)[z].userId]))), g.next = 14, l(this,
|
|
12450
|
+
return d = Pe(/* @__PURE__ */ new Set([].concat(Pe(i), [l(this, z)[z].userId]))), g.next = 14, l(this, Jn)[Jn].createChannel(a.trim(), d, u.displayPictureUrl, u.visibility, u.isDirectMessage);
|
|
12428
12451
|
case 14:
|
|
12429
12452
|
return p = g.sent, g.abrupt("return", p);
|
|
12430
12453
|
case 16:
|
|
@@ -12450,7 +12473,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12450
12473
|
throw new j("Not permitted to update private channels", "0501");
|
|
12451
12474
|
}
|
|
12452
12475
|
var v = { memberIds: (i = n.memberIds) !== null && i !== void 0 ? i : d.memberIds, displayName: (s = n.displayName) !== null && s !== void 0 ? s : d.displayName, displayPictureUrl: (u = n.displayPictureUrl) !== null && u !== void 0 ? u : d.displayPictureUrl, visibility: (c = n.visibility) !== null && c !== void 0 ? c : d.visibility };
|
|
12453
|
-
return l(this,
|
|
12476
|
+
return l(this, Jn)[Jn].updateChannel(r, v);
|
|
12454
12477
|
} }, { key: "sendMessageToChannel", value: function() {
|
|
12455
12478
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
12456
12479
|
var s, u = arguments;
|
|
@@ -12475,7 +12498,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12475
12498
|
for (; ; )
|
|
12476
12499
|
switch (s.prev = s.next) {
|
|
12477
12500
|
case 0:
|
|
12478
|
-
return s.abrupt("return", l(this,
|
|
12501
|
+
return s.abrupt("return", l(this, Jn)[Jn].getChannelMembers(a));
|
|
12479
12502
|
case 1:
|
|
12480
12503
|
case "end":
|
|
12481
12504
|
return s.stop();
|
|
@@ -12493,7 +12516,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12493
12516
|
for (; ; )
|
|
12494
12517
|
switch (d.prev = d.next) {
|
|
12495
12518
|
case 0:
|
|
12496
|
-
if (i = u.length > 1 && u[1] !== void 0 ? u[1] : {}, l(this, oa)[oa].getValue("flagsmith").hasFeature(
|
|
12519
|
+
if (i = u.length > 1 && u[1] !== void 0 ? u[1] : {}, l(this, oa)[oa].getValue("flagsmith").hasFeature(me.FEAT_CHAT_SDK_SEARCH)) {
|
|
12497
12520
|
d.next = 3;
|
|
12498
12521
|
break;
|
|
12499
12522
|
}
|
|
@@ -12501,7 +12524,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12501
12524
|
case 3:
|
|
12502
12525
|
return d.next = 5, l(this, $e)[$e].searchMessages(a, i);
|
|
12503
12526
|
case 5:
|
|
12504
|
-
return s = d.sent, d.abrupt("return", s.map(
|
|
12527
|
+
return s = d.sent, d.abrupt("return", s.map(Vn.formatSocketPeerMessage));
|
|
12505
12528
|
case 7:
|
|
12506
12529
|
case "end":
|
|
12507
12530
|
return d.stop();
|
|
@@ -12574,9 +12597,9 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12574
12597
|
for (var a = n > 1 ? void 0 : n ? yI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
12575
12598
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
12576
12599
|
return n && a && mI(e, r, a), a;
|
|
12577
|
-
}, Es = (
|
|
12600
|
+
}, Es = (Kn = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
|
|
12578
12601
|
function o(t, e, r, n, a) {
|
|
12579
|
-
w(this, o), this.chat = void 0, this.chatSocketHandler = void 0, this.chatChannelSocketHandler = void 0, this.self = void 0, Object.defineProperty(this,
|
|
12602
|
+
w(this, o), this.chat = void 0, this.chatSocketHandler = void 0, this.chatChannelSocketHandler = void 0, this.self = void 0, Object.defineProperty(this, Kn, { writable: !0, value: void 0 }), l(this, Kn)[Kn] = t, this.chatSocketHandler = e, this.chatChannelSocketHandler = r, this.chat = new at(t, e, r, n, a), this.self = n, this.setupEvents();
|
|
12580
12603
|
}
|
|
12581
12604
|
return P(o, [{
|
|
12582
12605
|
key: "telemetry",
|
|
@@ -12586,7 +12609,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12586
12609
|
* Not for external use
|
|
12587
12610
|
*/
|
|
12588
12611
|
function() {
|
|
12589
|
-
return l(this,
|
|
12612
|
+
return l(this, Kn)[Kn].getValue("telemetry");
|
|
12590
12613
|
}
|
|
12591
12614
|
)
|
|
12592
12615
|
/**
|
|
@@ -12594,7 +12617,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12594
12617
|
* Not for external use
|
|
12595
12618
|
*/
|
|
12596
12619
|
}, { key: "logger", get: function() {
|
|
12597
|
-
return l(this,
|
|
12620
|
+
return l(this, Kn)[Kn].getValue("logger");
|
|
12598
12621
|
} }, { key: "getChatMessages", value: function() {
|
|
12599
12622
|
var t = m(/* @__PURE__ */ h().mark(function r() {
|
|
12600
12623
|
var n, a;
|
|
@@ -12602,7 +12625,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12602
12625
|
for (; ; )
|
|
12603
12626
|
switch (s.prev = s.next) {
|
|
12604
12627
|
case 0:
|
|
12605
|
-
if (
|
|
12628
|
+
if (this.self.config.viewType !== "LIVESTREAM") {
|
|
12606
12629
|
s.next = 2;
|
|
12607
12630
|
break;
|
|
12608
12631
|
}
|
|
@@ -12631,7 +12654,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12631
12654
|
return e;
|
|
12632
12655
|
}() }, { key: "setupEvents", value: function() {
|
|
12633
12656
|
var e = this;
|
|
12634
|
-
l(this,
|
|
12657
|
+
l(this, Kn)[Kn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
12635
12658
|
return h().wrap(function(a) {
|
|
12636
12659
|
for (; ; )
|
|
12637
12660
|
switch (a.prev = a.next) {
|
|
@@ -12746,8 +12769,8 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12746
12769
|
}
|
|
12747
12770
|
return Es.formatMessage(n);
|
|
12748
12771
|
} }]);
|
|
12749
|
-
}()),
|
|
12750
|
-
kI([O.trace("ChatController.setupEvents")],
|
|
12772
|
+
}()), Vn = Es;
|
|
12773
|
+
kI([O.trace("ChatController.setupEvents")], Vn.prototype, "setupEvents", 1);
|
|
12751
12774
|
var bI = Object.defineProperty, TI = Object.getOwnPropertyDescriptor, wI = function(t, e, r, n) {
|
|
12752
12775
|
for (var a = n > 1 ? void 0 : n ? TI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
12753
12776
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
@@ -12838,9 +12861,9 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
|
|
|
12838
12861
|
for (var a = n > 1 ? void 0 : n ? CI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
12839
12862
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
12840
12863
|
return n && a && EI(e, r, a), a;
|
|
12841
|
-
}, To = (
|
|
12864
|
+
}, To = (dn = /* @__PURE__ */ C("context"), ri = /* @__PURE__ */ C("self"), zn = /* @__PURE__ */ C("pollSocketHandler"), /* @__PURE__ */ function() {
|
|
12842
12865
|
function o(t, e, r) {
|
|
12843
|
-
w(this, o), this.polls = void 0, Object.defineProperty(this,
|
|
12866
|
+
w(this, o), this.polls = void 0, Object.defineProperty(this, dn, { writable: !0, value: void 0 }), Object.defineProperty(this, ri, { writable: !0, value: void 0 }), Object.defineProperty(this, zn, { writable: !0, value: void 0 }), this.polls = new $d(t, e, r), l(this, ri)[ri] = e, l(this, dn)[dn] = t, l(this, zn)[zn] = r, this.setupEvents();
|
|
12844
12867
|
}
|
|
12845
12868
|
return P(o, [{
|
|
12846
12869
|
key: "telemetry",
|
|
@@ -12850,7 +12873,7 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
|
|
|
12850
12873
|
* Not for external use
|
|
12851
12874
|
*/
|
|
12852
12875
|
function() {
|
|
12853
|
-
return l(this,
|
|
12876
|
+
return l(this, dn)[dn].getValue("telemetry");
|
|
12854
12877
|
}
|
|
12855
12878
|
)
|
|
12856
12879
|
/**
|
|
@@ -12858,7 +12881,7 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
|
|
|
12858
12881
|
* Not for external use
|
|
12859
12882
|
*/
|
|
12860
12883
|
}, { key: "logger", get: function() {
|
|
12861
|
-
return l(this,
|
|
12884
|
+
return l(this, dn)[dn].getValue("logger");
|
|
12862
12885
|
} }, { key: "canViewPolls", value: function() {
|
|
12863
12886
|
return l(this, ri)[ri].permissions.polls.canView;
|
|
12864
12887
|
} }, { key: "setupEvents", value: function() {
|
|
@@ -12869,13 +12892,13 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
|
|
|
12869
12892
|
}, [Na.votePoll]: function(i) {
|
|
12870
12893
|
i.poll && e.updatePoll(To.formatSocketServicePoll(i.poll));
|
|
12871
12894
|
} }, n = function() {
|
|
12872
|
-
l(e,
|
|
12895
|
+
l(e, dn)[dn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, function() {
|
|
12873
12896
|
e.getPolls();
|
|
12874
12897
|
}), Object.keys(r).map(Number).forEach(function(s) {
|
|
12875
12898
|
l(e, zn)[zn].on(s, r[s]);
|
|
12876
12899
|
});
|
|
12877
12900
|
}, a = function() {
|
|
12878
|
-
l(e,
|
|
12901
|
+
l(e, dn)[dn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, function() {
|
|
12879
12902
|
e.getPolls();
|
|
12880
12903
|
}), Object.keys(r).map(Number).forEach(function(s) {
|
|
12881
12904
|
l(e, zn)[zn].removeListeners(s);
|
|
@@ -13005,7 +13028,7 @@ var AI = Object.defineProperty, II = Object.getOwnPropertyDescriptor, MI = funct
|
|
|
13005
13028
|
}
|
|
13006
13029
|
/**
|
|
13007
13030
|
* Sets current user as broadcasting tab changes
|
|
13008
|
-
* @param broadcastTabChanges
|
|
13031
|
+
* @param {boolean} broadcastTabChanges
|
|
13009
13032
|
*/
|
|
13010
13033
|
}, {
|
|
13011
13034
|
key: "setBroadcastTabChanges",
|
|
@@ -13016,7 +13039,8 @@ var AI = Object.defineProperty, II = Object.getOwnPropertyDescriptor, MI = funct
|
|
|
13016
13039
|
}
|
|
13017
13040
|
/**
|
|
13018
13041
|
* Sets current active tab for user
|
|
13019
|
-
* @param spotlightTab
|
|
13042
|
+
* @param {ActiveTab} spotlightTab
|
|
13043
|
+
* @param {TabChangeSource} tabChangeSource
|
|
13020
13044
|
*/
|
|
13021
13045
|
}, { key: "setSelfActiveTab", value: function(r, n) {
|
|
13022
13046
|
var a;
|
|
@@ -13030,7 +13054,7 @@ function _I() {
|
|
|
13030
13054
|
}
|
|
13031
13055
|
Nd = MI([ft("0800")], Nd);
|
|
13032
13056
|
function OI(o) {
|
|
13033
|
-
var t = "", e = [""], r = [e], n = 0, a = 0, i = !0, s, u =
|
|
13057
|
+
var t = "", e = [""], r = [e], n = 0, a = 0, i = !0, s, u = jn(o), c;
|
|
13034
13058
|
try {
|
|
13035
13059
|
for (u.s(); !(c = u.n()).done; )
|
|
13036
13060
|
s = c.value, s === '"' ? (i && s === t && (e[n] += s), i = !i) : s === "," && i ? s = e[++n] = "" : s === `
|
|
@@ -13061,30 +13085,36 @@ var DI = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, vg = funct
|
|
|
13061
13085
|
function() {
|
|
13062
13086
|
return l(this, lo)[lo].getValue("telemetry");
|
|
13063
13087
|
}
|
|
13064
|
-
) }, {
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
+
) }, {
|
|
13089
|
+
key: "getActiveTranscript",
|
|
13090
|
+
value: function() {
|
|
13091
|
+
var e = m(/* @__PURE__ */ h().mark(function n() {
|
|
13092
|
+
var a, i, s;
|
|
13093
|
+
return h().wrap(function(c) {
|
|
13094
|
+
for (; ; )
|
|
13095
|
+
switch (c.prev = c.next) {
|
|
13096
|
+
case 0:
|
|
13097
|
+
return c.prev = 0, a = ht(), c.next = 4, a.getActiveTranscript();
|
|
13098
|
+
case 4:
|
|
13099
|
+
i = c.sent, s = i.transcript, this.transcripts = _i.parseTranscripts(s), c.next = 11;
|
|
13100
|
+
break;
|
|
13101
|
+
case 9:
|
|
13102
|
+
c.prev = 9, c.t0 = c.catch(0);
|
|
13103
|
+
case 11:
|
|
13104
|
+
case "end":
|
|
13105
|
+
return c.stop();
|
|
13106
|
+
}
|
|
13107
|
+
}, n, this, [[0, 9]]);
|
|
13108
|
+
}));
|
|
13109
|
+
function r() {
|
|
13110
|
+
return e.apply(this, arguments);
|
|
13111
|
+
}
|
|
13112
|
+
return r;
|
|
13113
|
+
}()
|
|
13114
|
+
/**
|
|
13115
|
+
* @param {TranscriptionData} transcript - Transcript data received for a participant.
|
|
13116
|
+
*/
|
|
13117
|
+
}, { key: "onTranscript", value: function() {
|
|
13088
13118
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
13089
13119
|
var i, s, u;
|
|
13090
13120
|
return h().wrap(function(d) {
|
|
@@ -13140,6 +13170,8 @@ var DI = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, vg = funct
|
|
|
13140
13170
|
}()
|
|
13141
13171
|
/**
|
|
13142
13172
|
* Parse a single line transcript
|
|
13173
|
+
* @param {string} transcriptData - The transcript data to parse
|
|
13174
|
+
* @param {boolean} [isPartialTranscript=false] - Whether the transcript is partial
|
|
13143
13175
|
*/
|
|
13144
13176
|
}, {
|
|
13145
13177
|
key: "parseTranscript",
|
|
@@ -13152,6 +13184,7 @@ var DI = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, vg = funct
|
|
|
13152
13184
|
}
|
|
13153
13185
|
/**
|
|
13154
13186
|
* Parse a multi-line transcript
|
|
13187
|
+
* @param {string} transcriptData - The transcript data to parse
|
|
13155
13188
|
*/
|
|
13156
13189
|
}, { key: "parseTranscripts", value: function(r) {
|
|
13157
13190
|
return r ? r.split(`
|
|
@@ -13166,9 +13199,9 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
|
|
|
13166
13199
|
for (var a = n > 1 ? void 0 : n ? NI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
13167
13200
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
13168
13201
|
return n && a && $I(e, r, a), a;
|
|
13169
|
-
}, fg = (
|
|
13202
|
+
}, fg = (pn = /* @__PURE__ */ C("self"), ti = /* @__PURE__ */ C("roomSocketHandler"), Or = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
|
|
13170
13203
|
function o(t, e, r, n, a, i) {
|
|
13171
|
-
w(this, o), this.meta = void 0, this.ai = void 0, Object.defineProperty(this,
|
|
13204
|
+
w(this, o), this.meta = void 0, this.ai = void 0, Object.defineProperty(this, pn, { writable: !0, value: void 0 }), Object.defineProperty(this, ti, { writable: !0, value: void 0 }), this.aiSocketHandler = void 0, Object.defineProperty(this, Or, { writable: !0, value: void 0 }), l(this, Or)[Or] = t, this.meta = new Nd(t, e, e.config.viewType, r, i), this.ai = n, l(this, pn)[pn] = e, l(this, ti)[ti] = r, this.aiSocketHandler = a, e.config.viewType !== Lt.Chat && this.setupEvents();
|
|
13172
13205
|
}
|
|
13173
13206
|
return P(o, [{
|
|
13174
13207
|
key: "telemetry",
|
|
@@ -13205,13 +13238,13 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
|
|
|
13205
13238
|
}), l(this, Or)[Or].getValue("peerSessionStore").on(F.PRODUCER_SCORE_UPDATE, function(r) {
|
|
13206
13239
|
var n = r.score;
|
|
13207
13240
|
n < 5 && e.meta.emit("poorConnection", { score: n });
|
|
13208
|
-
}), l(this,
|
|
13241
|
+
}), l(this, pn)[pn].permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && l(this, ti)[ti].broadcastMessage("spotlight", { userId: l(this, pn)[pn].userId, currentTab: this.meta.selfActiveTab })), l(this, Or)[Or].getValue("peerSessionStore").on(F.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
|
|
13209
13242
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
13210
13243
|
return h().wrap(function(s) {
|
|
13211
13244
|
for (; ; )
|
|
13212
13245
|
switch (s.prev = s.next) {
|
|
13213
13246
|
case 0:
|
|
13214
|
-
l(e,
|
|
13247
|
+
l(e, pn)[pn].permissions.canSpotlight && e.meta.selfActiveTab && l(e, ti)[ti].broadcastToPeers("spotlight", [a.id], { userId: l(e, pn)[pn].userId, currentTab: e.meta.selfActiveTab });
|
|
13215
13248
|
case 1:
|
|
13216
13249
|
case "end":
|
|
13217
13250
|
return s.stop();
|
|
@@ -13455,38 +13488,50 @@ var Zo = {}, za = {
|
|
|
13455
13488
|
return e.apply(this, arguments);
|
|
13456
13489
|
}
|
|
13457
13490
|
return r;
|
|
13458
|
-
}() }, {
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13491
|
+
}() }, {
|
|
13492
|
+
key: "cancelRequestAccess",
|
|
13493
|
+
value: function() {
|
|
13494
|
+
var e = m(/* @__PURE__ */ h().mark(function n() {
|
|
13495
|
+
return h().wrap(function(i) {
|
|
13496
|
+
for (; ; )
|
|
13497
|
+
switch (i.prev = i.next) {
|
|
13498
|
+
case 0:
|
|
13499
|
+
if (l(this, oe)[oe].permissions.stageEnabled) {
|
|
13500
|
+
i.next = 3;
|
|
13501
|
+
break;
|
|
13502
|
+
}
|
|
13503
|
+
throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
|
|
13504
|
+
case 3:
|
|
13505
|
+
l(this, Qr)[Qr].cancelRequestAccess(), l(this, cs)[cs]("OFF_STAGE");
|
|
13506
|
+
case 5:
|
|
13507
|
+
case "end":
|
|
13508
|
+
return i.stop();
|
|
13509
|
+
}
|
|
13510
|
+
}, n, this);
|
|
13511
|
+
}));
|
|
13512
|
+
function r() {
|
|
13513
|
+
return e.apply(this, arguments);
|
|
13514
|
+
}
|
|
13515
|
+
return r;
|
|
13516
|
+
}()
|
|
13517
|
+
/**
|
|
13518
|
+
* @param {string[]} userIds
|
|
13519
|
+
*/
|
|
13520
|
+
}, {
|
|
13521
|
+
key: "grantAccess",
|
|
13522
|
+
value: function(r) {
|
|
13523
|
+
if (!l(this, oe)[oe].roomJoined)
|
|
13524
|
+
throw new j("Can`t grant for participant without joining room");
|
|
13525
|
+
if (!l(this, oe)[oe].permissions.stageEnabled)
|
|
13526
|
+
throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
|
|
13527
|
+
if (!l(this, oe)[oe].permissions.acceptStageRequests)
|
|
13528
|
+
throw this.logger.error("Stage::grant_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
|
|
13529
|
+
return l(this, Qr)[Qr].grantAccess(r);
|
|
13479
13530
|
}
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
if (!l(this, oe)[oe].permissions.stageEnabled)
|
|
13485
|
-
throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
|
|
13486
|
-
if (!l(this, oe)[oe].permissions.acceptStageRequests)
|
|
13487
|
-
throw this.logger.error("Stage::grant_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
|
|
13488
|
-
return l(this, Qr)[Qr].grantAccess(r);
|
|
13489
|
-
} }, {
|
|
13531
|
+
/**
|
|
13532
|
+
* @param {string[]} userIds
|
|
13533
|
+
*/
|
|
13534
|
+
}, {
|
|
13490
13535
|
key: "denyAccess",
|
|
13491
13536
|
value: function(r) {
|
|
13492
13537
|
if (!l(this, oe)[oe].roomJoined)
|
|
@@ -13587,6 +13632,7 @@ var Zo = {}, za = {
|
|
|
13587
13632
|
* Method to kick a user off the stage
|
|
13588
13633
|
*
|
|
13589
13634
|
* `permissions.acceptStageRequests` privilege required
|
|
13635
|
+
* @param {string[]} userIds
|
|
13590
13636
|
*/
|
|
13591
13637
|
}, { key: "kick", value: function() {
|
|
13592
13638
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -13681,9 +13727,9 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
|
|
|
13681
13727
|
for (var a = n > 1 ? void 0 : n ? GI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
13682
13728
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
13683
13729
|
return n && a && qI(e, r, a), a;
|
|
13684
|
-
},
|
|
13730
|
+
}, Pn = /* @__PURE__ */ C("self"), ot = /* @__PURE__ */ C("participants"), Sn = /* @__PURE__ */ C("stageSocketHandler"), ru = /* @__PURE__ */ C("stageRequestCount"), gr = /* @__PURE__ */ C("context"), mg = /* @__PURE__ */ function() {
|
|
13685
13731
|
function o(t, e, r, n, a) {
|
|
13686
|
-
w(this, o), this.stage = void 0, Object.defineProperty(this,
|
|
13732
|
+
w(this, o), this.stage = void 0, Object.defineProperty(this, Pn, { writable: !0, value: void 0 }), Object.defineProperty(this, ot, { writable: !0, value: void 0 }), Object.defineProperty(this, Sn, { writable: !0, value: void 0 }), Object.defineProperty(this, ru, { writable: !0, value: 0 }), Object.defineProperty(this, gr, { writable: !0, value: void 0 }), l(this, gr)[gr] = t, this.stage = new Di(t, n, a, e, r), l(this, Sn)[Sn] = e, l(this, Pn)[Pn] = n, l(this, ot)[ot] = a, this.setupEvents();
|
|
13687
13733
|
}
|
|
13688
13734
|
return P(o, [{
|
|
13689
13735
|
key: "telemetry",
|
|
@@ -13706,20 +13752,20 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
|
|
|
13706
13752
|
var e = this;
|
|
13707
13753
|
l(this, gr)[gr].subscribe("stageStatus", function(r) {
|
|
13708
13754
|
e.stage.emit("stageStatusUpdate", r);
|
|
13709
|
-
}), l(this,
|
|
13710
|
-
l(e,
|
|
13711
|
-
}), l(this,
|
|
13712
|
-
r !== void 0 && (r.peerId === l(e,
|
|
13713
|
-
}), l(this,
|
|
13714
|
-
l(e,
|
|
13715
|
-
}), l(this,
|
|
13755
|
+
}), l(this, Sn)[Sn].on(Q.grantStageAccess, function() {
|
|
13756
|
+
l(e, Pn)[Pn].permissions.stageAccess !== te.Allowed && (e.stage.emit("stageRequestApproved"), e.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
|
|
13757
|
+
}), l(this, Sn)[Sn].on(Q.peerStageStatusUpdate, function(r) {
|
|
13758
|
+
r !== void 0 && (r.peerId === l(e, Pn)[Pn].id ? e.selfStageStatusHandler(r) : e.peerStageStatusHandler(r));
|
|
13759
|
+
}), l(this, Sn)[Sn].on(Q.denyStageAccess, function() {
|
|
13760
|
+
l(e, Pn)[Pn].permissions.stageAccess !== te.Allowed && (e.stage.emit("stageRequestRejected"), e.setStageStatus("OFF_STAGE"));
|
|
13761
|
+
}), l(this, Sn)[Sn].on(Q.getStageRequests, /* @__PURE__ */ function() {
|
|
13716
13762
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
13717
13763
|
var i, s;
|
|
13718
13764
|
return h().wrap(function(c) {
|
|
13719
13765
|
for (; ; )
|
|
13720
13766
|
switch (c.prev = c.next) {
|
|
13721
13767
|
case 0:
|
|
13722
|
-
if (l(e,
|
|
13768
|
+
if (l(e, Pn)[Pn].permissions.stageAccess === te.Allowed) {
|
|
13723
13769
|
c.next = 2;
|
|
13724
13770
|
break;
|
|
13725
13771
|
}
|
|
@@ -13841,12 +13887,12 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
13841
13887
|
for (var a = n > 1 ? void 0 : n ? KI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
13842
13888
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
13843
13889
|
return n && a && JI(e, r, a), a;
|
|
13844
|
-
}, Lr = { getPeer: 14, getPeers: 15, chatMessage: 16, getRoomName: 17, getDisplayTitle: 18, getPluginInitiator: 19, customPluginEventToParent: 20, peerJoined: 22, peerLeft: 23, sendData: 24, stageStatusUpdate: 25, peerStageStatusUpdate: 26 }, Vo = (Qe = /* @__PURE__ */ C("pluginSocketHandler"), Dr = /* @__PURE__ */ C("self"), ni = /* @__PURE__ */ C("participants"), ai = /* @__PURE__ */ C("chat"), It = /* @__PURE__ */ C("startedAt"), ii = /* @__PURE__ */ C("authToken"),
|
|
13890
|
+
}, Lr = { getPeer: 14, getPeers: 15, chatMessage: 16, getRoomName: 17, getDisplayTitle: 18, getPluginInitiator: 19, customPluginEventToParent: 20, peerJoined: 22, peerLeft: 23, sendData: 24, stageStatusUpdate: 25, peerStageStatusUpdate: 26 }, Vo = (Qe = /* @__PURE__ */ C("pluginSocketHandler"), Dr = /* @__PURE__ */ C("self"), ni = /* @__PURE__ */ C("participants"), ai = /* @__PURE__ */ C("chat"), It = /* @__PURE__ */ C("startedAt"), ii = /* @__PURE__ */ C("authToken"), hn = /* @__PURE__ */ C("context"), si = /* @__PURE__ */ C("meetingTitle"), /* @__PURE__ */ function(o) {
|
|
13845
13891
|
function t(e, r, n, a, i, s, u) {
|
|
13846
13892
|
var c, d = r.baseURL, p = r.createdAt, v = r.description, f = r.id, g = r.name, k = r.organizationId, y = r.picture, b = r.private, E = r.published, T = r.staggered, S = r.tags, D = r.type, I = r.updatedAt;
|
|
13847
13893
|
w(this, t);
|
|
13848
13894
|
var _ = e.getValue("logger");
|
|
13849
|
-
return c = R(this, t, [_]), Object.defineProperty(c, Qe, { writable: !0, value: void 0 }), c.baseURL = void 0, c.createdAt = void 0, c.description = void 0, c.id = void 0, c.name = void 0, Object.defineProperty(c, Dr, { writable: !0, value: void 0 }), Object.defineProperty(c, ni, { writable: !0, value: void 0 }), Object.defineProperty(c, ai, { writable: !0, value: void 0 }), c.organizationId = void 0, c.picture = void 0, c.private = void 0, c.published = void 0, c.staggered = void 0, c.tags = void 0, c.type = void 0, c.updatedAt = void 0, Object.defineProperty(c, It, { writable: !0, value: void 0 }), c.config = void 0, Object.defineProperty(c, ii, { writable: !0, value: void 0 }), c.active = void 0, c.iframes = void 0, c.enabledBy = void 0, Object.defineProperty(c,
|
|
13895
|
+
return c = R(this, t, [_]), Object.defineProperty(c, Qe, { writable: !0, value: void 0 }), c.baseURL = void 0, c.createdAt = void 0, c.description = void 0, c.id = void 0, c.name = void 0, Object.defineProperty(c, Dr, { writable: !0, value: void 0 }), Object.defineProperty(c, ni, { writable: !0, value: void 0 }), Object.defineProperty(c, ai, { writable: !0, value: void 0 }), c.organizationId = void 0, c.picture = void 0, c.private = void 0, c.published = void 0, c.staggered = void 0, c.tags = void 0, c.type = void 0, c.updatedAt = void 0, Object.defineProperty(c, It, { writable: !0, value: void 0 }), c.config = void 0, Object.defineProperty(c, ii, { writable: !0, value: void 0 }), c.active = void 0, c.iframes = void 0, c.enabledBy = void 0, Object.defineProperty(c, hn, { writable: !0, value: void 0 }), Object.defineProperty(c, si, { writable: !0, value: void 0 }), l(c, hn)[hn] = e, c.baseURL = d, c.createdAt = new Date(p), c.description = v, c.id = f, c.name = g, l(c, Dr)[Dr] = a, c.organizationId = k, c.picture = y, c.private = b, c.published = E, c.staggered = T, c.tags = S, c.type = D, c.updatedAt = new Date(I), c.active = !1, c.iframes = /* @__PURE__ */ new Map(), l(c, Qe)[Qe] = n, l(c, ni)[ni] = i, l(c, ai)[ai] = s, c.enabledBy = "", l(c, si)[si] = u, c;
|
|
13850
13896
|
}
|
|
13851
13897
|
return A(t, o), P(t, [{ key: "telemetry", get: (
|
|
13852
13898
|
/**
|
|
@@ -13854,14 +13900,20 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
13854
13900
|
* Not for external use
|
|
13855
13901
|
*/
|
|
13856
13902
|
function() {
|
|
13857
|
-
return l(this,
|
|
13903
|
+
return l(this, hn)[hn].getValue("telemetry");
|
|
13858
13904
|
}
|
|
13859
|
-
) }, {
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
|
|
13905
|
+
) }, {
|
|
13906
|
+
key: "sendIframeEvent",
|
|
13907
|
+
value: function(r) {
|
|
13908
|
+
this.iframes.size && this.iframes.forEach(function(n) {
|
|
13909
|
+
var a = n.iframe;
|
|
13910
|
+
a && (navigator.isReactNative ? a.postMessage(JSON.stringify(r)) : a.contentWindow.postMessage(r, "*"));
|
|
13911
|
+
});
|
|
13912
|
+
}
|
|
13913
|
+
/**
|
|
13914
|
+
* @param {PluginIframeMessage} iframeMessage
|
|
13915
|
+
*/
|
|
13916
|
+
}, { key: "handleIframeMessage", value: function() {
|
|
13865
13917
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
13866
13918
|
var i, s, u, c, d, p, v, f, g, k, y;
|
|
13867
13919
|
return h().wrap(function(E) {
|
|
@@ -13922,7 +13974,7 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
13922
13974
|
case 51:
|
|
13923
13975
|
return this.sendIframeEvent({ type: Lr.getDisplayTitle, payload: { displayTitle: l(this, si)[si] }, uuid: i.uuid }), E.abrupt("break", 57);
|
|
13924
13976
|
case 53:
|
|
13925
|
-
return this.sendIframeEvent({ type: Lr.getRoomName, payload: { roomName: l(this,
|
|
13977
|
+
return this.sendIframeEvent({ type: Lr.getRoomName, payload: { roomName: l(this, hn)[hn].getValue("meetingId") }, uuid: i.uuid }), E.abrupt("break", 57);
|
|
13926
13978
|
case 55:
|
|
13927
13979
|
return this.emit(i.payload.eventName, i.payload.data), E.abrupt("break", 57);
|
|
13928
13980
|
case 57:
|
|
@@ -13943,7 +13995,7 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
13943
13995
|
/**
|
|
13944
13996
|
* This method is used for cleaning up event listeners attached to an iframe. It must
|
|
13945
13997
|
* be used before the iframe is removed from the DOM.
|
|
13946
|
-
* @param viewId ID of the view corresponding to this iframe. Default is 'default'.
|
|
13998
|
+
* @param {string} viewId ID of the view corresponding to this iframe. Default is 'default'.
|
|
13947
13999
|
*/
|
|
13948
14000
|
}, {
|
|
13949
14001
|
key: "removePluginView",
|
|
@@ -13954,48 +14006,54 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
13954
14006
|
/**
|
|
13955
14007
|
* This method adds the communcation layer between the plugin inside the iframe
|
|
13956
14008
|
* and the core application (meeting object) in the main window.
|
|
13957
|
-
* @param iframe Iframe element to display this plugin.
|
|
13958
|
-
* @param viewId ID of the view corresponding to this iframe. Default is 'default'.
|
|
14009
|
+
* @param {(HTMLIFrameElement|ReactNativeWebView)} iframe Iframe element to display this plugin.
|
|
14010
|
+
* @param {string} viewId ID of the view corresponding to this iframe. Default is 'default'.
|
|
13959
14011
|
*/
|
|
13960
|
-
}, {
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
u.
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
|
|
13989
|
-
|
|
13990
|
-
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
13996
|
-
|
|
14012
|
+
}, {
|
|
14013
|
+
key: "addPluginView",
|
|
14014
|
+
value: function(r) {
|
|
14015
|
+
var n, a = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default";
|
|
14016
|
+
if (!l(this, ii)[ii])
|
|
14017
|
+
throw this.logger.error("Plugin::addPluginView::no_auth_token_set_for_plugin"), new j("No auth token set for plugin.", "0602");
|
|
14018
|
+
if (!r)
|
|
14019
|
+
throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new j("Iframe was not provided.", "0603");
|
|
14020
|
+
this.removePluginView(i);
|
|
14021
|
+
var s = r, u = new URL(this.baseURL), c = { auth: l(this, ii)[ii], parent: navigator.isReactNative ? this.baseURL : window.location.origin, backend: l(this, hn)[hn].getValue("apiBase"), pluginId: this.id, roomName: (n = l(this, hn)[hn].getValue("meetingId")) !== null && n !== void 0 ? n : "", displayTitle: l(this, si)[si] };
|
|
14022
|
+
if (Object.keys(c).forEach(function(p) {
|
|
14023
|
+
u.searchParams.set(p, c[p]);
|
|
14024
|
+
}), s.src = u.href, s.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", s.title = i, navigator.isReactNative)
|
|
14025
|
+
s.props.onMessage = function(p) {
|
|
14026
|
+
a.handleIframeMessage(JSON.parse(p.nativeEvent.data));
|
|
14027
|
+
}, this.iframes.set(i, { iframe: s });
|
|
14028
|
+
else {
|
|
14029
|
+
var d = /* @__PURE__ */ function() {
|
|
14030
|
+
var p = m(/* @__PURE__ */ h().mark(function v(f) {
|
|
14031
|
+
return h().wrap(function(k) {
|
|
14032
|
+
for (; ; )
|
|
14033
|
+
switch (k.prev = k.next) {
|
|
14034
|
+
case 0:
|
|
14035
|
+
if (f.source !== r.contentWindow) {
|
|
14036
|
+
k.next = 3;
|
|
14037
|
+
break;
|
|
14038
|
+
}
|
|
14039
|
+
return k.next = 3, a.handleIframeMessage(f.data);
|
|
14040
|
+
case 3:
|
|
14041
|
+
case "end":
|
|
14042
|
+
return k.stop();
|
|
14043
|
+
}
|
|
14044
|
+
}, v);
|
|
14045
|
+
}));
|
|
14046
|
+
return function(f) {
|
|
14047
|
+
return p.apply(this, arguments);
|
|
14048
|
+
};
|
|
14049
|
+
}();
|
|
14050
|
+
window.addEventListener("message", d), this.iframes.set(i, { iframe: s, listener: d });
|
|
14051
|
+
}
|
|
13997
14052
|
}
|
|
13998
|
-
|
|
14053
|
+
/**
|
|
14054
|
+
* @param {boolean} active
|
|
14055
|
+
*/
|
|
14056
|
+
}, {
|
|
13999
14057
|
key: "setActive",
|
|
14000
14058
|
value: function(r) {
|
|
14001
14059
|
var n;
|
|
@@ -14213,9 +14271,14 @@ var De = /* @__PURE__ */ C("eventEmitter"), va = /* @__PURE__ */ C("listeners"),
|
|
|
14213
14271
|
for (var a = n > 1 ? void 0 : n ? YI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
14214
14272
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
14215
14273
|
return n && a && zI(e, r, a), a;
|
|
14216
|
-
}, Ud = /* @__PURE__ */ P(
|
|
14217
|
-
|
|
14218
|
-
}
|
|
14274
|
+
}, Ud = /* @__PURE__ */ P(
|
|
14275
|
+
/**
|
|
14276
|
+
* @param {Logger} logger
|
|
14277
|
+
*/
|
|
14278
|
+
function o(t) {
|
|
14279
|
+
w(this, o), this.all = void 0, this.active = void 0, this.all = new hv(t), this.active = new hv(t);
|
|
14280
|
+
}
|
|
14281
|
+
);
|
|
14219
14282
|
Ud = QI([ft("0600")], Ud);
|
|
14220
14283
|
var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = function(t, e, r, n) {
|
|
14221
14284
|
for (var a = n > 1 ? void 0 : n ? ZI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
@@ -14485,10 +14548,10 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
|
|
|
14485
14548
|
return r.apply(this, arguments);
|
|
14486
14549
|
};
|
|
14487
14550
|
}()), l(this, oi)[oi].on(Ir.sendMessageToPeers, function(r) {
|
|
14488
|
-
var n =
|
|
14551
|
+
var n = Vn == null ? void 0 : Vn.formatSocketPeerMessage(r.message);
|
|
14489
14552
|
e.broadcastIframeEvent(Lr.chatMessage, { message: n });
|
|
14490
14553
|
}), l(this, oi)[oi].on(Ir.sendMessageToRoom, function(r) {
|
|
14491
|
-
var n =
|
|
14554
|
+
var n = Vn == null ? void 0 : Vn.formatSocketPeerMessage(r.message);
|
|
14492
14555
|
e.broadcastIframeEvent(Lr.chatMessage, { message: n });
|
|
14493
14556
|
}), l(this, et)[et].getValue("peerSessionStore").on(F.PEER_JOINED_INTERNAL, function(r) {
|
|
14494
14557
|
var n = rc(r);
|
|
@@ -14865,12 +14928,12 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
14865
14928
|
for (var a = n > 1 ? void 0 : n ? cM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
14866
14929
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
14867
14930
|
return n && a && lM(e, r, a), a;
|
|
14868
|
-
}, je = /* @__PURE__ */ C("mediaInterface"),
|
|
14931
|
+
}, je = /* @__PURE__ */ C("mediaInterface"), ge = /* @__PURE__ */ C("audioMediaHandler"), fe = /* @__PURE__ */ C("videoMediaHandler"), Wt = /* @__PURE__ */ C("audioOutputMediaHandler"), Xr = /* @__PURE__ */ C("screenShareMediaHandler"), nu = /* @__PURE__ */ C("autoSwitchDevice"), Ee = /* @__PURE__ */ C("context"), Nt = /* @__PURE__ */ function(o) {
|
|
14869
14932
|
function t(e, r) {
|
|
14870
14933
|
var n, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : tc, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0;
|
|
14871
14934
|
w(this, t);
|
|
14872
14935
|
var s = e.getValue("logger");
|
|
14873
|
-
return n = R(this, t, [s]), Object.defineProperty(n, je, { writable: !0, value: void 0 }), Object.defineProperty(n,
|
|
14936
|
+
return n = R(this, t, [s]), Object.defineProperty(n, je, { writable: !0, value: void 0 }), Object.defineProperty(n, ge, { writable: !0, value: void 0 }), Object.defineProperty(n, fe, { writable: !0, value: void 0 }), Object.defineProperty(n, Wt, { writable: !0, value: void 0 }), Object.defineProperty(n, Xr, { writable: !0, value: void 0 }), Object.defineProperty(n, nu, { writable: !0, value: void 0 }), Object.defineProperty(n, Ee, { writable: !0, value: void 0 }), n.audioUpdateInProgress = void 0, n.videoUpdateInProgress = void 0, l(n, Ee)[Ee] = e, n.audioUpdateInProgress = !1, n.videoUpdateInProgress = !1, l(n, je)[je] = new Tg(e, r), l(n, ge)[ge] = new DM(e, l(n, je)[je], void 0, a), l(n, fe)[fe] = new FM(e, l(n, je)[je], void 0, a), l(n, Xr)[Xr] = new VM(l(n, Ee)[Ee], l(n, je)[je]), l(n, Wt)[Wt] = new $M(e, l(n, je)[je]), l(n, nu)[nu] = i, l(n, ge)[ge].on("trackMuted", n.onAudioTrackMuted.bind(n)), l(n, ge)[ge].on("trackChanged", n.onAudioTrackChanged.bind(n)), l(n, fe)[fe].on("trackChanged", n.onVideoTrackChanged.bind(n)), l(n, fe)[fe].on("trackEnded", n.onVideoTrackEnded.bind(n)), l(n, Xr)[Xr].on("trackEnded", n.onScreenShareEnded.bind(n)), n.onVisibilityChange = n.onVisibilityChange.bind(n), document.addEventListener("visibilitychange", n.onVisibilityChange), n;
|
|
14874
14937
|
}
|
|
14875
14938
|
return A(t, o), P(t, [{ key: "telemetry", get: (
|
|
14876
14939
|
/**
|
|
@@ -14942,7 +15005,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
14942
15005
|
y.next = 15;
|
|
14943
15006
|
break;
|
|
14944
15007
|
}
|
|
14945
|
-
return y.prev = 4, y.next = 7, l(this, je)[je].getAudioAndVideoTrack(l(this,
|
|
15008
|
+
return y.prev = 4, y.next = 7, l(this, je)[je].getAudioAndVideoTrack(l(this, ge)[ge].userSelectedDevice, l(this, fe)[fe].userSelectedDevice);
|
|
14946
15009
|
case 7:
|
|
14947
15010
|
v = y.sent, d = v.audioTrack, p = v.videoTrack, y.next = 15;
|
|
14948
15011
|
break;
|
|
@@ -14953,7 +15016,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
14953
15016
|
y.next = 25;
|
|
14954
15017
|
break;
|
|
14955
15018
|
}
|
|
14956
|
-
return y.prev = 16, y.next = 19, l(this, je)[je].getAudioTrack(!1, l(this,
|
|
15019
|
+
return y.prev = 16, y.next = 19, l(this, je)[je].getAudioTrack(!1, l(this, ge)[ge].userSelectedDevice);
|
|
14957
15020
|
case 19:
|
|
14958
15021
|
d = y.sent, y.next = 25;
|
|
14959
15022
|
break;
|
|
@@ -14971,7 +15034,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
14971
15034
|
case 32:
|
|
14972
15035
|
y.prev = 32, y.t2 = y.catch(26), this.logger.error("LocalMediaHandler::init::Failed to get video track", { error: y.t2 });
|
|
14973
15036
|
case 35:
|
|
14974
|
-
return u && !d && l(this, Ee)[Ee].getValue("callstats").audioOff(), c && !p && l(this, Ee)[Ee].getValue("callstats").videoOff(), y.next = 39, l(this,
|
|
15037
|
+
return u && !d && l(this, Ee)[Ee].getValue("callstats").audioOff(), c && !p && l(this, Ee)[Ee].getValue("callstats").videoOff(), y.next = 39, l(this, ge)[ge].setMediaTrack(d);
|
|
14975
15038
|
case 39:
|
|
14976
15039
|
return y.next = 41, l(this, fe)[fe].setMediaTrack(p);
|
|
14977
15040
|
case 41:
|
|
@@ -15012,7 +15075,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15012
15075
|
}
|
|
15013
15076
|
return r;
|
|
15014
15077
|
}() }, { key: "getCurrentDevices", value: function() {
|
|
15015
|
-
return { audio: l(this,
|
|
15078
|
+
return { audio: l(this, ge)[ge].currentDevice, video: l(this, fe)[fe].currentDevice, speaker: l(this, Wt)[Wt].currentDevice };
|
|
15016
15079
|
} }, { key: "permissions", get: function() {
|
|
15017
15080
|
return l(this, je)[je].permissions;
|
|
15018
15081
|
} }, { key: "getAllDevices", value: function() {
|
|
@@ -15030,11 +15093,11 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15030
15093
|
} }, { key: "onAudioTrackChanged", value: function() {
|
|
15031
15094
|
this.emit("AUDIO_TRACK_CHANGE");
|
|
15032
15095
|
} }, { key: "rawAudioTrack", get: function() {
|
|
15033
|
-
return l(this,
|
|
15096
|
+
return l(this, ge)[ge].mediaTrack;
|
|
15034
15097
|
} }, { key: "audioTrack", get: function() {
|
|
15035
|
-
return l(this,
|
|
15098
|
+
return l(this, ge)[ge].transformedMediaTrack;
|
|
15036
15099
|
} }, { key: "audioEnabled", get: function() {
|
|
15037
|
-
return l(this,
|
|
15100
|
+
return l(this, ge)[ge].trackEnabled;
|
|
15038
15101
|
} }, { key: "enableAudio", value: function() {
|
|
15039
15102
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
15040
15103
|
return h().wrap(function(s) {
|
|
@@ -15051,12 +15114,12 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15051
15114
|
s.next = 9;
|
|
15052
15115
|
break;
|
|
15053
15116
|
}
|
|
15054
|
-
return s.next = 7, l(this,
|
|
15117
|
+
return s.next = 7, l(this, ge)[ge].enableTrack(!1, a);
|
|
15055
15118
|
case 7:
|
|
15056
15119
|
s.next = 11;
|
|
15057
15120
|
break;
|
|
15058
15121
|
case 9:
|
|
15059
|
-
return s.next = 11, l(this,
|
|
15122
|
+
return s.next = 11, l(this, ge)[ge].unmuteTrack();
|
|
15060
15123
|
case 11:
|
|
15061
15124
|
s.next = 15;
|
|
15062
15125
|
break;
|
|
@@ -15075,7 +15138,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15075
15138
|
}
|
|
15076
15139
|
return r;
|
|
15077
15140
|
}() }, { key: "disableAudio", value: function() {
|
|
15078
|
-
l(this,
|
|
15141
|
+
l(this, ge)[ge].mediaTrack && !l(this, ge)[ge].isCustomTrack ? l(this, ge)[ge].muteTrack() : l(this, ge)[ge].disableTrack();
|
|
15079
15142
|
} }, { key: "getAudioDevices", value: function(r) {
|
|
15080
15143
|
return l(this, je)[je].getAudioInputDevices(r);
|
|
15081
15144
|
} }, {
|
|
@@ -15087,7 +15150,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15087
15150
|
for (; ; )
|
|
15088
15151
|
switch (c.prev = c.next) {
|
|
15089
15152
|
case 0:
|
|
15090
|
-
return s = i.saveDevicePreference, c.next = 3, l(this,
|
|
15153
|
+
return s = i.saveDevicePreference, c.next = 3, l(this, ge)[ge].setDevice(a, { saveDevicePreference: s });
|
|
15091
15154
|
case 3:
|
|
15092
15155
|
a != null && a.deviceId && l(this, Ee)[Ee].getValue("callstats").selectedDevice("AUDIO", a), this.emit("AUDIO_TRACK_CHANGE"), this.emit("DEVICE_CHANGE", { device: a });
|
|
15093
15156
|
case 6:
|
|
@@ -15318,11 +15381,11 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15318
15381
|
* Middleware Utility
|
|
15319
15382
|
*/
|
|
15320
15383
|
}, { key: "addAudioMiddleware", value: function(r) {
|
|
15321
|
-
return l(this,
|
|
15384
|
+
return l(this, ge)[ge].addMiddleware(r);
|
|
15322
15385
|
} }, { key: "removeAudioMiddleware", value: function(r) {
|
|
15323
|
-
return l(this,
|
|
15386
|
+
return l(this, ge)[ge].removeMiddleware(r);
|
|
15324
15387
|
} }, { key: "removeAllAudioMiddlewares", value: function() {
|
|
15325
|
-
return l(this,
|
|
15388
|
+
return l(this, ge)[ge].removeAllMiddlewares();
|
|
15326
15389
|
} }, { key: "addVideoMiddleware", value: function(r) {
|
|
15327
15390
|
return l(this, fe)[fe].addMiddleware(r);
|
|
15328
15391
|
} }, { key: "removeVideoMiddleware", value: function(r) {
|
|
@@ -15332,7 +15395,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15332
15395
|
} }, { key: "setVideoMiddlewareGlobalConfig", value: function(r) {
|
|
15333
15396
|
return l(this, fe)[fe].setVideoMiddlewareGlobalConfig(r);
|
|
15334
15397
|
} }, { key: "destruct", value: function() {
|
|
15335
|
-
l(this,
|
|
15398
|
+
l(this, ge)[ge].disableTrack(), l(this, fe)[fe].disableTrack(), l(this, fe)[fe].terminateMiddlewareWebWorker(), l(this, Xr)[Xr].disableScreenShare(), l(this, je)[je].destruct();
|
|
15336
15399
|
} }, {
|
|
15337
15400
|
key: "onDeviceChange",
|
|
15338
15401
|
value: function() {
|
|
@@ -15441,7 +15504,7 @@ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
|
|
|
15441
15504
|
}, {
|
|
15442
15505
|
key: "removeAudioTrack",
|
|
15443
15506
|
value: function() {
|
|
15444
|
-
l(this,
|
|
15507
|
+
l(this, ge)[ge].disableTrack();
|
|
15445
15508
|
}
|
|
15446
15509
|
/**
|
|
15447
15510
|
* NOTE(ravindra-cloudflare):
|
|
@@ -15688,7 +15751,7 @@ var ma = /* @__PURE__ */ C("middlewareWebWorkerInterval"), au = /* @__PURE__ */
|
|
|
15688
15751
|
if (i != null && (n = i.encodings) !== null && n !== void 0 && n.length)
|
|
15689
15752
|
return i.encodings;
|
|
15690
15753
|
var s = "getSettings" in e && e.getSettings().width || "getConstraints" in e && e.getConstraints().width || "originalSettings" in e && ((a = e.originalSettings) === null || a === void 0 ? void 0 : a.width), u = vM;
|
|
15691
|
-
t.getValue("flagsmith").hasFeature(
|
|
15754
|
+
t.getValue("flagsmith").hasFeature(me.OVERRIDE_SIMULCAST_DYNAMIC) && (u = JSON.parse(t.getValue("flagsmith").getValue(me.OVERRIDE_SIMULCAST_DYNAMIC)));
|
|
15692
15755
|
var c = u.map(function(v) {
|
|
15693
15756
|
var f = He(v, 1), g = f[0];
|
|
15694
15757
|
return g;
|
|
@@ -15700,7 +15763,7 @@ var ma = /* @__PURE__ */ C("middlewareWebWorkerInterval"), au = /* @__PURE__ */
|
|
|
15700
15763
|
}), u[p][1];
|
|
15701
15764
|
}, dr = /* @__PURE__ */ function(o) {
|
|
15702
15765
|
return o.WEBCAM = "webcam", o.WEBCAM_BACKUP = "webcam_backup", o.MIC = "mic", o.SCREENSHARE_VIDEO = "screenshare_video", o.SCREENSHARE_AUDIO = "screenshare_audio", o;
|
|
15703
|
-
}(dr || {}), gM = ET(), ko =
|
|
15766
|
+
}(dr || {}), gM = ET(), ko = Un(gM.config.media);
|
|
15704
15767
|
function mM(o) {
|
|
15705
15768
|
var t = {};
|
|
15706
15769
|
if (o.audio) {
|
|
@@ -15714,13 +15777,13 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
15714
15777
|
var r = this;
|
|
15715
15778
|
w(this, o), Object.defineProperty(this, ya, { writable: !0, value: void 0 }), Object.defineProperty(this, kt, { writable: !0, value: void 0 }), this.getScreenShareConstraints = function() {
|
|
15716
15779
|
var n, a, i, s, u, c, d, p, v, f = (n = l(r, ya)[ya]) === null || n === void 0 ? void 0 : n.screenshare, g = (a = f == null || (i = f.width) === null || i === void 0 ? void 0 : i.max) !== null && a !== void 0 ? a : 1920, k = (s = f == null || (u = f.height) === null || u === void 0 ? void 0 : u.max) !== null && s !== void 0 ? s : 1080, y = (c = f == null || (d = f.frameRate) === null || d === void 0 ? void 0 : d.max) !== null && c !== void 0 ? c : 5, b = (p = f == null || (v = f.frameRate) === null || v === void 0 ? void 0 : v.ideal) !== null && p !== void 0 ? p : 5, E = f == null ? void 0 : f.displaySurface, T = f == null ? void 0 : f.selfBrowserSurface;
|
|
15717
|
-
if (l(r, kt)[kt].getValue("flagsmith").getValue(
|
|
15780
|
+
if (l(r, kt)[kt].getValue("flagsmith").getValue(me.VAL_MIN_FRAMERATE)) {
|
|
15718
15781
|
var S;
|
|
15719
|
-
b = parseInt((S = l(r, kt)[kt].getValue("flagsmith").getValue(
|
|
15782
|
+
b = parseInt((S = l(r, kt)[kt].getValue("flagsmith").getValue(me.VAL_MIN_FRAMERATE)) === null || S === void 0 ? void 0 : S.toString(), 10);
|
|
15720
15783
|
}
|
|
15721
15784
|
var D = { width: { max: g }, height: { max: k }, frameRate: { ideal: b, max: y } };
|
|
15722
|
-
if (l(r, kt)[kt].getValue("flagsmith").hasFeature(
|
|
15723
|
-
var I, _ = (I = l(r, kt)[kt].getValue("flagsmith").getValue(
|
|
15785
|
+
if (l(r, kt)[kt].getValue("flagsmith").hasFeature(me.SCREENSHARE_CONSTRAINTS)) {
|
|
15786
|
+
var I, _ = (I = l(r, kt)[kt].getValue("flagsmith").getValue(me.SCREENSHARE_CONSTRAINTS)) === null || I === void 0 ? void 0 : I.toString();
|
|
15724
15787
|
D = JSON.parse(_);
|
|
15725
15788
|
}
|
|
15726
15789
|
return E !== void 0 && ["monitor", "browser", "window"].includes(E) && (D = N(N({}, D), {}, { displaySurface: E })), T !== void 0 && (D = N(N({}, D), {}, { selfBrowserSurface: T })), { audio: !0, video: D };
|
|
@@ -15733,8 +15796,8 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
15733
15796
|
return c.audio = { autoGainControl: (i = d == null ? void 0 : d.autoGainControl) !== null && i !== void 0 ? i : !0, echoCancellation: (s = d == null ? void 0 : d.echoCancellation) !== null && s !== void 0 ? s : !0, noiseSuppression: (u = d == null ? void 0 : d.noiseSupression) !== null && u !== void 0 ? u : !0, channelCount: p }, n && (c.audio.deviceId = { exact: n }), c;
|
|
15734
15797
|
}, this.getVideoConstraints = function(n) {
|
|
15735
15798
|
var a, i, s, u = {}, c = (a = l(r, ya)[ya]) === null || a === void 0 ? void 0 : a.video, d = vv.vga;
|
|
15736
|
-
if (typeof c == "string" ? d = vv[c] : c !== void 0 && (d.height.ideal = c.height.ideal, d.width.ideal = c.width.ideal), d.frameRate = { ideal: (i = (s = d.frameRate) === null || s === void 0 ? void 0 : s.ideal) !== null && i !== void 0 ? i : 24 }, br.isChromiumBased() && (d.frameRate.max = 30), l(r, kt)[kt].getValue("flagsmith").hasFeature(
|
|
15737
|
-
var p, v = (p = l(r, kt)[kt].getValue("flagsmith").getValue(
|
|
15799
|
+
if (typeof c == "string" ? d = vv[c] : c !== void 0 && (d.height.ideal = c.height.ideal, d.width.ideal = c.width.ideal), d.frameRate = { ideal: (i = (s = d.frameRate) === null || s === void 0 ? void 0 : s.ideal) !== null && i !== void 0 ? i : 24 }, br.isChromiumBased() && (d.frameRate.max = 30), l(r, kt)[kt].getValue("flagsmith").hasFeature(me.VIDEO_CONSTRAINTS)) {
|
|
15800
|
+
var p, v = (p = l(r, kt)[kt].getValue("flagsmith").getValue(me.VIDEO_CONSTRAINTS)) === null || p === void 0 ? void 0 : p.toString();
|
|
15738
15801
|
d = JSON.parse(v);
|
|
15739
15802
|
}
|
|
15740
15803
|
return u.video = d, typeof u.video == "boolean" || (n ? u.video.deviceId = { exact: n } : u.video.facingMode = "user"), u;
|
|
@@ -15842,7 +15905,7 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
15842
15905
|
}
|
|
15843
15906
|
return e;
|
|
15844
15907
|
}() }]);
|
|
15845
|
-
}(), bM = Object.defineProperty, TM = Object.getOwnPropertyDescriptor,
|
|
15908
|
+
}(), bM = Object.defineProperty, TM = Object.getOwnPropertyDescriptor, Gn = function(t, e, r, n) {
|
|
15846
15909
|
for (var a = n > 1 ? void 0 : n ? TM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
15847
15910
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
15848
15911
|
return n && a && bM(e, r, a), a;
|
|
@@ -15908,7 +15971,7 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
15908
15971
|
return $.deviceId === i;
|
|
15909
15972
|
})), i && g ? k = i : d && (u = d[0]) !== null && u !== void 0 && u.deviceId && (k = (y = d[0]) === null || y === void 0 ? void 0 : y.deviceId), b = { audio: l(this, Gr)[Gr].getAudioConstraints(v).audio, video: l(this, Gr)[Gr].getVideoConstraints(k).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(b) }), U.next = 15, navigator.mediaDevices.getUserMedia(b);
|
|
15910
15973
|
case 15:
|
|
15911
|
-
if (E = U.sent, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(b) }), T = E.getAudioTracks()[0], S = E.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", D = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(
|
|
15974
|
+
if (E = U.sent, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(b) }), T = E.getAudioTracks()[0], S = E.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", D = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(me.OBS_QUALITY), !(D && S.label.includes("OBS Virtual"))) {
|
|
15912
15975
|
U.next = 30;
|
|
15913
15976
|
break;
|
|
15914
15977
|
}
|
|
@@ -16007,7 +16070,7 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16007
16070
|
for (; ; )
|
|
16008
16071
|
switch (S.prev = S.next) {
|
|
16009
16072
|
case 0:
|
|
16010
|
-
return c = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(
|
|
16073
|
+
return c = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(me.OBS_QUALITY), S.next = 3, this.getCurrentDeviceLabel(a);
|
|
16011
16074
|
case 3:
|
|
16012
16075
|
if (S.t1 = i = S.sent, S.t0 = S.t1 === null, S.t0) {
|
|
16013
16076
|
S.next = 7;
|
|
@@ -16100,7 +16163,7 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16100
16163
|
case 5:
|
|
16101
16164
|
return g = T.sent, a.logger.info("getDisplayMediaWithoutTimeout::received_display_media", { constraints: JSON.stringify(f) }), T.abrupt("return", g);
|
|
16102
16165
|
case 10:
|
|
16103
|
-
if (T.prev = 10, T.t0 = T.catch(0), k = Al("video", T.t0.name, T.t0.message), y = new Xc(T.t0.name, T.t0.message, f), b = { video: !0 }, !(pP(f, b) || !l(a, Ae)[Ae].getValue("flagsmith").hasFeature(
|
|
16166
|
+
if (T.prev = 10, T.t0 = T.catch(0), k = Al("video", T.t0.name, T.t0.message), y = new Xc(T.t0.name, T.t0.message, f), b = { video: !0 }, !(pP(f, b) || !l(a, Ae)[Ae].getValue("flagsmith").hasFeature(me.SCREEENSHARE_CONSTRAINTS_RETRY))) {
|
|
16104
16167
|
T.next = 17;
|
|
16105
16168
|
break;
|
|
16106
16169
|
}
|
|
@@ -16344,17 +16407,17 @@ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16344
16407
|
return r;
|
|
16345
16408
|
}() }]);
|
|
16346
16409
|
}(kM));
|
|
16347
|
-
|
|
16348
|
-
|
|
16349
|
-
|
|
16350
|
-
|
|
16351
|
-
|
|
16352
|
-
|
|
16353
|
-
|
|
16354
|
-
|
|
16355
|
-
|
|
16356
|
-
|
|
16357
|
-
an =
|
|
16410
|
+
Gn([O.trace("WebMediaInterface.destruct")], an.prototype, "destruct", 1);
|
|
16411
|
+
Gn([O.trace("WebMediaInterface.handlePermissionErrors")], an.prototype, "handlePermissionErrors", 1);
|
|
16412
|
+
Gn([O.trace("WebMediaInterface.getAudioAndVideoTrack")], an.prototype, "getAudioAndVideoTrack", 1);
|
|
16413
|
+
Gn([O.trace("WebMediaInterface.getAudioTrack")], an.prototype, "getAudioTrack", 1);
|
|
16414
|
+
Gn([O.trace("WebMediaInterface.getVideoTrack")], an.prototype, "getVideoTrack", 1);
|
|
16415
|
+
Gn([O.trace("WebMediaInterface.getScreenShareTracks")], an.prototype, "getScreenShareTracks", 1);
|
|
16416
|
+
Gn([O.trace("WebMediaInterface.getAvailableDevices")], an.prototype, "getAvailableDevices", 1);
|
|
16417
|
+
Gn([O.trace("WebMediaInterface.getAvailableDevicesByKind")], an.prototype, "getAvailableDevicesByKind", 1);
|
|
16418
|
+
Gn([O.trace("WebMediaInterface.getDevice")], an.prototype, "getDevice", 1);
|
|
16419
|
+
Gn([O.trace("WebMediaInterface.onDeviceChange")], an.prototype, "onDeviceChange", 1);
|
|
16420
|
+
an = Gn([ft("1600")], an);
|
|
16358
16421
|
var Tg = an, Bs = { setItem: function(t, e, r) {
|
|
16359
16422
|
try {
|
|
16360
16423
|
localStorage.setItem(t, e);
|
|
@@ -16664,7 +16727,7 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, wg = funct
|
|
|
16664
16727
|
for (; ; )
|
|
16665
16728
|
switch (s.prev = s.next) {
|
|
16666
16729
|
case 0:
|
|
16667
|
-
if (!(br.isWebKitBased() && !vT.hasFeature(
|
|
16730
|
+
if (!(br.isWebKitBased() && !vT.hasFeature(me.ALLOW_SAFARI_MEDIA_MIDDLEWARES))) {
|
|
16668
16731
|
s.next = 2;
|
|
16669
16732
|
break;
|
|
16670
16733
|
}
|
|
@@ -17440,11 +17503,11 @@ Rc([O.trace("VideoMediaHandler.setTransformedTrack")], ol.prototype, "setTransfo
|
|
|
17440
17503
|
Rc([O.trace("VideoMediaHandler.setVideoMiddlewareGlobalConfig")], ol.prototype, "setVideoMiddlewareGlobalConfig", 1);
|
|
17441
17504
|
Rc([O.trace("VideoMediaHandler.onTrackEnded")], ol.prototype, "onTrackEnded", 1);
|
|
17442
17505
|
Rc([O.trace("VideoMediaHandler.conditionallyChangeTrack")], ol.prototype, "conditionallyChangeTrack", 1);
|
|
17443
|
-
var FM = ol, mv =
|
|
17506
|
+
var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ba = /* @__PURE__ */ C("theme"), ou = /* @__PURE__ */ C("name"), ps = /* @__PURE__ */ C("pluginsConfig"), HM = /* @__PURE__ */ function() {
|
|
17444
17507
|
function o(t) {
|
|
17445
17508
|
if (w(this, o), Object.defineProperty(this, Rr, { writable: !0, value: void 0 }), Object.defineProperty(this, ba, { writable: !0, value: void 0 }), Object.defineProperty(this, ou, { writable: !0, value: void 0 }), Object.defineProperty(this, ps, { writable: !0, value: void 0 }), !t)
|
|
17446
17509
|
throw new j("Could not load preset.", "0904");
|
|
17447
|
-
l(this, Rr)[Rr] = t.config, l(this, ou)[ou] = t.name, l(this, ba)[ba] = t.ui ||
|
|
17510
|
+
l(this, Rr)[Rr] = t.config, l(this, ou)[ou] = t.name, l(this, ba)[ba] = t.ui || Un(Np().ui), l(this, ps)[ps] = t.permissions.plugins.config;
|
|
17448
17511
|
}
|
|
17449
17512
|
return P(o, [{
|
|
17450
17513
|
key: "setupScreen",
|
|
@@ -17571,9 +17634,16 @@ var FM = ol, mv = jn(Np()), Rr = /* @__PURE__ */ C("config"), ba = /* @__PURE__
|
|
|
17571
17634
|
return new o(e);
|
|
17572
17635
|
}
|
|
17573
17636
|
/** @deprecated. Use init() */
|
|
17574
|
-
}, {
|
|
17575
|
-
|
|
17576
|
-
|
|
17637
|
+
}, {
|
|
17638
|
+
key: "default",
|
|
17639
|
+
value: function() {
|
|
17640
|
+
return new o(mv);
|
|
17641
|
+
}
|
|
17642
|
+
/**
|
|
17643
|
+
* @param {PresetV2CamelCased} [preset]
|
|
17644
|
+
* @param {boolean} [useDefault=true]
|
|
17645
|
+
*/
|
|
17646
|
+
}, { key: "init", value: function(e) {
|
|
17577
17647
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
17578
17648
|
return !e || r ? new o(mv) : new o(e);
|
|
17579
17649
|
} }]);
|
|
@@ -17843,10 +17913,10 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17843
17913
|
for (var a = n > 1 ? void 0 : n ? zM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
17844
17914
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
17845
17915
|
return n && a && KM(e, r, a), a;
|
|
17846
|
-
}, ir = /* @__PURE__ */ C("data"),
|
|
17916
|
+
}, ir = /* @__PURE__ */ C("data"), En = /* @__PURE__ */ C("meetingId"), Cn = /* @__PURE__ */ C("socketHandler"), xc = /* @__PURE__ */ C("update"), qo = /* @__PURE__ */ function() {
|
|
17847
17917
|
function o(t) {
|
|
17848
17918
|
var e = t.name, r = t.socketHandler, n = t.meetingId;
|
|
17849
|
-
w(this, o), Object.defineProperty(this, xc, { value: YM }), this.name = "", Object.defineProperty(this, ir, { writable: !0, value: {} }), Object.defineProperty(this,
|
|
17919
|
+
w(this, o), Object.defineProperty(this, xc, { value: YM }), this.name = "", Object.defineProperty(this, ir, { writable: !0, value: {} }), Object.defineProperty(this, En, { writable: !0, value: "" }), Object.defineProperty(this, Cn, { writable: !0, value: void 0 }), this.rateLimitConfig = { maxInvocations: 5, period: 1 }, this.bulkRateLimitConfig = { maxInvocations: 5, period: 1 }, this.listeners = {}, this.name = e, l(this, Cn)[Cn] = r, l(this, En)[En] = n;
|
|
17850
17920
|
}
|
|
17851
17921
|
return P(o, [{ key: "set", value: function() {
|
|
17852
17922
|
var t = m(/* @__PURE__ */ h().mark(function r(n, a) {
|
|
@@ -17871,7 +17941,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17871
17941
|
}
|
|
17872
17942
|
return e;
|
|
17873
17943
|
}() }, { key: "remoteSet", value: function(e, r) {
|
|
17874
|
-
l(this,
|
|
17944
|
+
l(this, Cn)[Cn].storeInsertKeys(l(this, En)[En], this.name, [{ key: e, payload: r }]);
|
|
17875
17945
|
} }, { key: "bulkSet", value: function() {
|
|
17876
17946
|
var t = m(/* @__PURE__ */ h().mark(function r(n) {
|
|
17877
17947
|
var a = this;
|
|
@@ -17882,7 +17952,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17882
17952
|
n.forEach(function(u) {
|
|
17883
17953
|
var c = u.key, d = u.payload;
|
|
17884
17954
|
l(a, ir)[ir][c] = d;
|
|
17885
|
-
}), l(this,
|
|
17955
|
+
}), l(this, Cn)[Cn].storeInsertKeys(l(this, En)[En], this.name, n);
|
|
17886
17956
|
case 2:
|
|
17887
17957
|
case "end":
|
|
17888
17958
|
return s.stop();
|
|
@@ -17926,7 +17996,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17926
17996
|
c.next = 5;
|
|
17927
17997
|
break;
|
|
17928
17998
|
}
|
|
17929
|
-
return c.abrupt("return", l(this,
|
|
17999
|
+
return c.abrupt("return", l(this, Cn)[Cn].storeDeleteKeys(l(this, En)[En], this.name, [{ key: n }]));
|
|
17930
18000
|
case 5:
|
|
17931
18001
|
i && (this.listeners[n] && (this.listeners[n].forEach(function(d) {
|
|
17932
18002
|
return d({ [n]: void 0 });
|
|
@@ -17955,7 +18025,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17955
18025
|
return n.forEach(function(u) {
|
|
17956
18026
|
var c = u.key;
|
|
17957
18027
|
l(a, ir)[ir][c] && delete l(a, ir)[ir][c];
|
|
17958
|
-
}), s.abrupt("return", l(this,
|
|
18028
|
+
}), s.abrupt("return", l(this, Cn)[Cn].storeDeleteKeys(l(this, En)[En], this.name, n));
|
|
17959
18029
|
case 2:
|
|
17960
18030
|
case "end":
|
|
17961
18031
|
return s.stop();
|
|
@@ -17984,15 +18054,26 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
17984
18054
|
*/
|
|
17985
18055
|
}, { key: "getAll", value: function() {
|
|
17986
18056
|
return l(this, ir)[ir];
|
|
17987
|
-
} }, {
|
|
17988
|
-
|
|
17989
|
-
|
|
18057
|
+
} }, {
|
|
18058
|
+
key: "rateLimits",
|
|
18059
|
+
get: function() {
|
|
18060
|
+
return this.rateLimitConfig;
|
|
18061
|
+
}
|
|
18062
|
+
/**
|
|
18063
|
+
* @param {number} num
|
|
18064
|
+
* @param {number} period
|
|
18065
|
+
*/
|
|
18066
|
+
}, { key: "updateRateLimits", value: function(e, r) {
|
|
17990
18067
|
this.rateLimitConfig.maxInvocations = e, this.rateLimitConfig.period = r;
|
|
17991
18068
|
} }, {
|
|
17992
18069
|
key: "bulkRateLimits",
|
|
17993
18070
|
get: function() {
|
|
17994
18071
|
return this.bulkRateLimitConfig;
|
|
17995
18072
|
}
|
|
18073
|
+
/**
|
|
18074
|
+
* @param {number} num
|
|
18075
|
+
* @param {number} period
|
|
18076
|
+
*/
|
|
17996
18077
|
// eslint-disable-next-line class-methods-use-this
|
|
17997
18078
|
}, {
|
|
17998
18079
|
key: "updateBulkRateLimits",
|
|
@@ -18016,21 +18097,27 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
|
|
|
18016
18097
|
this.listeners[e] = [r];
|
|
18017
18098
|
}
|
|
18018
18099
|
/**
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
*
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
}, {
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18100
|
+
* @description Removes all listeners for a key on the store.
|
|
18101
|
+
* @param {string} key - Unique identifier used to store value.
|
|
18102
|
+
* @param {Function} [cb] - Callback to be removed.
|
|
18103
|
+
* @returns {void} void
|
|
18104
|
+
*/
|
|
18105
|
+
}, {
|
|
18106
|
+
key: "unsubscribe",
|
|
18107
|
+
value: function(e, r) {
|
|
18108
|
+
if (r) {
|
|
18109
|
+
var n;
|
|
18110
|
+
this.listeners[e] = ((n = this.listeners[e]) === null || n === void 0 ? void 0 : n.filter(function(a) {
|
|
18111
|
+
return a !== r;
|
|
18112
|
+
})) || [];
|
|
18113
|
+
return;
|
|
18114
|
+
}
|
|
18115
|
+
this.listeners[e] && delete this.listeners[e];
|
|
18031
18116
|
}
|
|
18032
|
-
|
|
18033
|
-
|
|
18117
|
+
/**
|
|
18118
|
+
* @param {StoreData} data
|
|
18119
|
+
*/
|
|
18120
|
+
}, { key: "populate", value: function(e) {
|
|
18034
18121
|
l(this, ir)[ir] = e;
|
|
18035
18122
|
} }]);
|
|
18036
18123
|
}();
|
|
@@ -18064,9 +18151,9 @@ ul([$t(Bo, "bulkRateLimitConfig")], qo.prototype, "bulkSet", 1);
|
|
|
18064
18151
|
ul([$t(Bo, "rateLimitConfig")], qo.prototype, "update", 1);
|
|
18065
18152
|
ul([$t(Bo, "rateLimitConfig")], qo.prototype, "delete", 1);
|
|
18066
18153
|
ul([$t(Bo, "bulkRateLimitConfig")], qo.prototype, "bulkDelete", 1);
|
|
18067
|
-
var Oa = /* @__PURE__ */ C("pluginSocketHandler"), Da = /* @__PURE__ */ C("meetingId"), Iu = /* @__PURE__ */ C("peerId"), Lu = /* @__PURE__ */ C("context"),
|
|
18154
|
+
var Oa = /* @__PURE__ */ C("pluginSocketHandler"), Da = /* @__PURE__ */ C("meetingId"), Iu = /* @__PURE__ */ C("peerId"), Lu = /* @__PURE__ */ C("context"), Dn = /* @__PURE__ */ C("pendingInit"), ed = /* @__PURE__ */ C("setup"), QM = /* @__PURE__ */ function() {
|
|
18068
18155
|
function o(t, e) {
|
|
18069
|
-
w(this, o), Object.defineProperty(this, ed, { value: ZM }), Object.defineProperty(this, Iu, { get: XM, set: void 0 }), this.stores = /* @__PURE__ */ new Map(), Object.defineProperty(this, Oa, { writable: !0, value: void 0 }), Object.defineProperty(this, Da, { writable: !0, value: "" }), Object.defineProperty(this, Lu, { writable: !0, value: void 0 }), Object.defineProperty(this,
|
|
18156
|
+
w(this, o), Object.defineProperty(this, ed, { value: ZM }), Object.defineProperty(this, Iu, { get: XM, set: void 0 }), this.stores = /* @__PURE__ */ new Map(), Object.defineProperty(this, Oa, { writable: !0, value: void 0 }), Object.defineProperty(this, Da, { writable: !0, value: "" }), Object.defineProperty(this, Lu, { writable: !0, value: void 0 }), Object.defineProperty(this, Dn, { writable: !0, value: /* @__PURE__ */ new Map() }), l(this, Oa)[Oa] = e, l(this, Da)[Da] = t.getValue("meetingId"), l(this, Lu)[Lu] = t, l(this, ed)[ed]();
|
|
18070
18157
|
}
|
|
18071
18158
|
return P(o, [{ key: "create", value: function(e) {
|
|
18072
18159
|
var r = this, n = new qo({ name: e, socketHandler: l(this, Oa)[Oa], meetingId: l(this, Da)[Da] });
|
|
@@ -18075,7 +18162,7 @@ var Oa = /* @__PURE__ */ C("pluginSocketHandler"), Da = /* @__PURE__ */ C("meeti
|
|
|
18075
18162
|
var u = setTimeout(function() {
|
|
18076
18163
|
return s(Error("Failed"));
|
|
18077
18164
|
}, 3e3);
|
|
18078
|
-
l(r,
|
|
18165
|
+
l(r, Dn)[Dn].set(e, { rejectTimeout: u, resolve: i, store: n });
|
|
18079
18166
|
});
|
|
18080
18167
|
return a;
|
|
18081
18168
|
} }]);
|
|
@@ -18106,11 +18193,11 @@ function ZM() {
|
|
|
18106
18193
|
v.next = 9;
|
|
18107
18194
|
break;
|
|
18108
18195
|
}
|
|
18109
|
-
return u = l(o,
|
|
18196
|
+
return u = l(o, Dn)[Dn].get(n.storeName), c = o.stores.get(n.storeName) || (u == null ? void 0 : u.store), l(o, Dn)[Dn].get(n.storeName) && (o.stores.set(n.storeName, u.store), u.resolve(c), clearTimeout(u.rejectTimeout), l(o, Dn)[Dn].delete(n.storeName)), s.forEach(function(f) {
|
|
18110
18197
|
c.set(f.key, f.payload, !1, !1);
|
|
18111
18198
|
}), v.abrupt("return");
|
|
18112
18199
|
case 9:
|
|
18113
|
-
if (d = o.stores.get(n.storeName) || ((i = l(o,
|
|
18200
|
+
if (d = o.stores.get(n.storeName) || ((i = l(o, Dn)[Dn].get(n.storeName)) === null || i === void 0 ? void 0 : i.store), d !== void 0) {
|
|
18114
18201
|
v.next = 12;
|
|
18115
18202
|
break;
|
|
18116
18203
|
}
|
|
@@ -18143,12 +18230,12 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18143
18230
|
for (var a = n > 1 ? void 0 : n ? e_(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
18144
18231
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
18145
18232
|
return n && a && xM(e, r, a), a;
|
|
18146
|
-
}, r_ = 0.8, t_ = 1.2, Wa = (di = /* @__PURE__ */ C("isPinned"), pi = /* @__PURE__ */ C("stageStatus"), Nr = /* @__PURE__ */ C("context"), Qn = /* @__PURE__ */ C("roomNodeClient"),
|
|
18233
|
+
}, r_ = 0.8, t_ = 1.2, Wa = (di = /* @__PURE__ */ C("isPinned"), pi = /* @__PURE__ */ C("stageStatus"), Nr = /* @__PURE__ */ C("context"), Qn = /* @__PURE__ */ C("roomNodeClient"), kn = /* @__PURE__ */ C("audioPlayback"), Xn = /* @__PURE__ */ C("mediaJoined"), hl = /* @__PURE__ */ C("socketJoined"), Mt = /* @__PURE__ */ C("self"), co = /* @__PURE__ */ C("roomSocketHandler"), gn = /* @__PURE__ */ C("videoElements"), Zn = /* @__PURE__ */ C("pip"), _t = /* @__PURE__ */ C("maxSpatialLayer"), vl = /* @__PURE__ */ C("videoDimensionsUpdated"), po = /* @__PURE__ */ C("updateVideos"), fl = /* @__PURE__ */ C("updateAudio"), gl = /* @__PURE__ */ C("updateScreenShare"), /* @__PURE__ */ function(o) {
|
|
18147
18234
|
function t(e, r, n, a) {
|
|
18148
18235
|
var i;
|
|
18149
18236
|
w(this, t);
|
|
18150
18237
|
var s = e.getValue("logger");
|
|
18151
|
-
i = R(this, t, [s]), Object.defineProperty(i, gl, { value: c_ }), Object.defineProperty(i, fl, { value: l_ }), Object.defineProperty(i, po, { value: u_ }), Object.defineProperty(i, Zn, { get: o_, set: void 0 }), Object.defineProperty(i, hl, { get: s_, set: void 0 }), Object.defineProperty(i, Xn, { get: i_, set: void 0 }), Object.defineProperty(i,
|
|
18238
|
+
i = R(this, t, [s]), Object.defineProperty(i, gl, { value: c_ }), Object.defineProperty(i, fl, { value: l_ }), Object.defineProperty(i, po, { value: u_ }), Object.defineProperty(i, Zn, { get: o_, set: void 0 }), Object.defineProperty(i, hl, { get: s_, set: void 0 }), Object.defineProperty(i, Xn, { get: i_, set: void 0 }), Object.defineProperty(i, kn, { get: a_, set: void 0 }), Object.defineProperty(i, Qn, { get: n_, set: void 0 }), i.id = void 0, i.userId = void 0, i.name = void 0, i.picture = void 0, i.isHost = void 0, i.customParticipantId = void 0, i.flags = void 0, i.device = void 0, i.videoTrack = void 0, i.audioTrack = void 0, i.screenShareTracks = void 0, i.videoEnabled = void 0, i.audioEnabled = void 0, i.screenShareEnabled = void 0, i.producers = void 0, i.manualProducerConfig = void 0, Object.defineProperty(i, di, { writable: !0, value: void 0 }), i.supportsRemoteControl = !1, Object.defineProperty(i, pi, { writable: !0, value: void 0 }), i.presetName = void 0, Object.defineProperty(i, Nr, { writable: !0, value: void 0 }), Object.defineProperty(i, Mt, { writable: !0, value: void 0 }), Object.defineProperty(i, co, { writable: !0, value: void 0 }), Object.defineProperty(i, gn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(i, _t, { writable: !0, value: 1 }), Object.defineProperty(i, vl, { writable: !0, value: jp(function(U) {
|
|
18152
18239
|
if (i.videoTrack) {
|
|
18153
18240
|
var $ = U.clientWidth, L = U.clientHeight, H = i.videoTrack.getSettings(), Y = H.width, q = H.height;
|
|
18154
18241
|
if (!(!Y || !q)) {
|
|
@@ -18181,19 +18268,33 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18181
18268
|
function() {
|
|
18182
18269
|
return l(this, Nr)[Nr].getValue("telemetry");
|
|
18183
18270
|
}
|
|
18184
|
-
) }, {
|
|
18185
|
-
|
|
18186
|
-
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18271
|
+
) }, {
|
|
18272
|
+
key: "setVideoEnabled",
|
|
18273
|
+
value: function(r) {
|
|
18274
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
18275
|
+
this.videoEnabled = r, n && (this.logger.info("Participant::setVideoEnabled::videoUpdate", N({}, Is(this))), this.emit("videoUpdate", { videoEnabled: this.videoEnabled, videoTrack: this.videoTrack }));
|
|
18276
|
+
}
|
|
18277
|
+
/**
|
|
18278
|
+
* @param {boolean} audioEnabled
|
|
18279
|
+
* @param {boolean} [emitEvent=true]
|
|
18280
|
+
*/
|
|
18281
|
+
}, {
|
|
18282
|
+
key: "setAudioEnabled",
|
|
18283
|
+
value: function(r) {
|
|
18284
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
18285
|
+
this.audioEnabled = r, n && (this.logger.info("Participant::setAudioEnabled::audioUpdate", N({}, Is(this))), this.emit("audioUpdate", { audioEnabled: this.audioEnabled, audioTrack: this.audioTrack }));
|
|
18286
|
+
}
|
|
18287
|
+
/**
|
|
18288
|
+
* @param {boolean} screenShareEnabled
|
|
18289
|
+
* @param {boolean} [emitEvent=true]
|
|
18290
|
+
*/
|
|
18291
|
+
}, { key: "setScreenShareEnabled", value: function(r) {
|
|
18191
18292
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
18192
18293
|
this.screenShareEnabled = r, n && this.emit("screenShareUpdate", { screenShareEnabled: this.screenShareEnabled, screenShareTracks: this.screenShareTracks });
|
|
18193
18294
|
} }, {
|
|
18194
18295
|
key: "setupEvents",
|
|
18195
18296
|
value: function() {
|
|
18196
|
-
this.on("videoUpdate", l(this, po)[po]), l(this,
|
|
18297
|
+
this.on("videoUpdate", l(this, po)[po]), l(this, kn)[kn] && (this.on("audioUpdate", l(this, fl)[fl]), this.on("screenShareUpdate", l(this, gl)[gl]));
|
|
18197
18298
|
}
|
|
18198
18299
|
/**
|
|
18199
18300
|
* Returns `participant.id` if user has permission
|
|
@@ -18354,24 +18455,30 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18354
18455
|
return e.apply(this, arguments);
|
|
18355
18456
|
}
|
|
18356
18457
|
return r;
|
|
18357
|
-
}() }, { key: "getPermissions", value: function() {
|
|
18358
|
-
var e = m(/* @__PURE__ */ h().mark(function n() {
|
|
18359
|
-
return h().wrap(function(i) {
|
|
18360
|
-
for (; ; )
|
|
18361
|
-
switch (i.prev = i.next) {
|
|
18362
|
-
case 0:
|
|
18363
|
-
return i.abrupt("return", l(this, co)[co].getUserPermissions(this.userId));
|
|
18364
|
-
case 1:
|
|
18365
|
-
case "end":
|
|
18366
|
-
return i.stop();
|
|
18367
|
-
}
|
|
18368
|
-
}, n, this);
|
|
18369
|
-
}));
|
|
18370
|
-
function r() {
|
|
18371
|
-
return e.apply(this, arguments);
|
|
18372
|
-
}
|
|
18373
|
-
return r;
|
|
18374
18458
|
}() }, {
|
|
18459
|
+
key: "getPermissions",
|
|
18460
|
+
value: function() {
|
|
18461
|
+
var e = m(/* @__PURE__ */ h().mark(function n() {
|
|
18462
|
+
return h().wrap(function(i) {
|
|
18463
|
+
for (; ; )
|
|
18464
|
+
switch (i.prev = i.next) {
|
|
18465
|
+
case 0:
|
|
18466
|
+
return i.abrupt("return", l(this, co)[co].getUserPermissions(this.userId));
|
|
18467
|
+
case 1:
|
|
18468
|
+
case "end":
|
|
18469
|
+
return i.stop();
|
|
18470
|
+
}
|
|
18471
|
+
}, n, this);
|
|
18472
|
+
}));
|
|
18473
|
+
function r() {
|
|
18474
|
+
return e.apply(this, arguments);
|
|
18475
|
+
}
|
|
18476
|
+
return r;
|
|
18477
|
+
}()
|
|
18478
|
+
/**
|
|
18479
|
+
* @param {StageStatus} stageStatus
|
|
18480
|
+
*/
|
|
18481
|
+
}, {
|
|
18375
18482
|
key: "setStageStatus",
|
|
18376
18483
|
value: function(r) {
|
|
18377
18484
|
l(this, pi)[pi] = r, this.emit("stageStatusUpdate", this);
|
|
@@ -18381,25 +18488,37 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18381
18488
|
*/
|
|
18382
18489
|
}, { key: "isPinned", get: function() {
|
|
18383
18490
|
return l(this, di)[di];
|
|
18384
|
-
} }, {
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18491
|
+
} }, {
|
|
18492
|
+
key: "registerVideoElement",
|
|
18493
|
+
value: (
|
|
18494
|
+
/**
|
|
18495
|
+
* @param {HTMLVideoElement} videoElem
|
|
18496
|
+
*/
|
|
18497
|
+
function(r) {
|
|
18498
|
+
var n, a = this, i, s;
|
|
18499
|
+
if (r) {
|
|
18500
|
+
var u;
|
|
18501
|
+
(n = l(this, gn)[gn].get(r)) === null || n === void 0 || (n = n.observer) === null || n === void 0 || n.disconnect(), "ResizeObserver" in window && (u = new ResizeObserver(function() {
|
|
18502
|
+
return l(a, vl)[vl](r);
|
|
18503
|
+
}), u.observe(r)), l(this, gn)[gn].set(r, { observer: u }), this.updateVideo(r), (i = l(this, Zn)[Zn]) === null || i === void 0 || i.addSource(this.id, r, this.videoEnabled, this.isPinned, this.name, this.picture, (s = this.raised) !== null && s !== void 0 ? s : !1);
|
|
18504
|
+
}
|
|
18505
|
+
}
|
|
18506
|
+
)
|
|
18507
|
+
/**
|
|
18508
|
+
* @param {HTMLVideoElement} [videoElem]
|
|
18509
|
+
*/
|
|
18510
|
+
}, { key: "deregisterVideoElement", value: function(r) {
|
|
18393
18511
|
var n, a;
|
|
18394
18512
|
if (!r) {
|
|
18395
18513
|
var i;
|
|
18396
18514
|
(i = l(this, Zn)[Zn]) === null || i === void 0 || i.removeSource(this.id);
|
|
18397
18515
|
return;
|
|
18398
18516
|
}
|
|
18399
|
-
r.srcObject = void 0, (n = l(this,
|
|
18517
|
+
r.srcObject = void 0, (n = l(this, gn)[gn].get(r)) === null || n === void 0 || (n = n.observer) === null || n === void 0 || n.disconnect(), l(this, gn)[gn].delete(r), (a = l(this, Zn)[Zn]) === null || a === void 0 || a.removeSource(this.id);
|
|
18400
18518
|
} }, { key: "updateVideo", value: (
|
|
18401
18519
|
/**
|
|
18402
18520
|
* Internal method, do not use
|
|
18521
|
+
* @param {HTMLVideoElement} e
|
|
18403
18522
|
*/
|
|
18404
18523
|
function(r) {
|
|
18405
18524
|
if (this.videoEnabled) {
|
|
@@ -18433,24 +18552,24 @@ function o_() {
|
|
|
18433
18552
|
return l(this, Nr)[Nr].getValue("pip");
|
|
18434
18553
|
}
|
|
18435
18554
|
function u_() {
|
|
18436
|
-
Array.from(l(this,
|
|
18555
|
+
Array.from(l(this, gn)[gn].keys()).forEach(this.updateVideo);
|
|
18437
18556
|
}
|
|
18438
18557
|
function l_() {
|
|
18439
18558
|
if (this.audioEnabled && this.audioTrack) {
|
|
18440
18559
|
var o;
|
|
18441
|
-
(o = l(this,
|
|
18560
|
+
(o = l(this, kn)[kn]) === null || o === void 0 || o.addParticipantTrack(this.id, this.audioTrack);
|
|
18442
18561
|
} else {
|
|
18443
18562
|
var t;
|
|
18444
|
-
(t = l(this,
|
|
18563
|
+
(t = l(this, kn)[kn]) === null || t === void 0 || t.removeParticipantTrack(this.id);
|
|
18445
18564
|
}
|
|
18446
18565
|
}
|
|
18447
18566
|
function c_() {
|
|
18448
18567
|
if (this.screenShareEnabled && this.screenShareTracks.audio) {
|
|
18449
18568
|
var o;
|
|
18450
|
-
(o = l(this,
|
|
18569
|
+
(o = l(this, kn)[kn]) === null || o === void 0 || o.addParticipantTrack("screenshare-".concat(this.id), this.screenShareTracks.audio);
|
|
18451
18570
|
} else {
|
|
18452
18571
|
var t;
|
|
18453
|
-
(t = l(this,
|
|
18572
|
+
(t = l(this, kn)[kn]) === null || t === void 0 || t.removeParticipantTrack("screenshare-".concat(this.id));
|
|
18454
18573
|
}
|
|
18455
18574
|
}
|
|
18456
18575
|
Go([O.trace("Participant.disableAudio")], Wa.prototype, "disableAudio", 1);
|
|
@@ -18465,35 +18584,50 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18465
18584
|
var n = r != null ? r : {}, a = n.onAddEvent, i = a === void 0 ? "participantJoined" : a, s = n.onDeleteEvent, u = s === void 0 ? "participantLeft" : s, c = n.onClearEvent, d = c === void 0 ? "participantsCleared" : c;
|
|
18466
18585
|
return R(this, t, [{ onAddEvent: i, onDeleteEvent: u, onClearEvent: d }, e]);
|
|
18467
18586
|
}
|
|
18468
|
-
return A(t, o), P(t, [{
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18587
|
+
return A(t, o), P(t, [{
|
|
18588
|
+
key: "add",
|
|
18589
|
+
value: function(r) {
|
|
18590
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
18591
|
+
return this.has(r.id) && Object.is(this.get(r.id), r) === !1 && this.delete(r.id), Ce(t, "add", this, 3)([r, n]);
|
|
18592
|
+
}
|
|
18593
|
+
/**
|
|
18594
|
+
* @param {boolean} [emitEvent=true]
|
|
18595
|
+
* @param {boolean} [removeListeners=false]
|
|
18596
|
+
*/
|
|
18597
|
+
}, {
|
|
18598
|
+
key: "clear",
|
|
18599
|
+
value: function() {
|
|
18600
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
18601
|
+
return Ce(t, "clear", this, 3)([r, n]);
|
|
18602
|
+
}
|
|
18603
|
+
/**
|
|
18604
|
+
* @param {string} participantId
|
|
18605
|
+
* @param {boolean} [emitEvent=true]
|
|
18606
|
+
* @param {boolean} [removeListeners=false]
|
|
18607
|
+
*/
|
|
18608
|
+
}, { key: "delete", value: function(r) {
|
|
18475
18609
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
18476
18610
|
return Ce(t, "delete", this, 3)([r, n, a]);
|
|
18477
18611
|
} }]);
|
|
18478
|
-
}(yg),
|
|
18612
|
+
}(yg), Rn = /* @__PURE__ */ C("map"), d_ = /* @__PURE__ */ function(o) {
|
|
18479
18613
|
function t(e) {
|
|
18480
18614
|
var r;
|
|
18481
|
-
return w(this, t), r = R(this, t, [e]), Object.defineProperty(r,
|
|
18615
|
+
return w(this, t), r = R(this, t, [e]), Object.defineProperty(r, Rn, { writable: !0, value: void 0 }), l(r, Rn)[Rn] = /* @__PURE__ */ new Map(), r;
|
|
18482
18616
|
}
|
|
18483
18617
|
return A(t, o), P(t, [{
|
|
18484
18618
|
key: "__set",
|
|
18485
18619
|
value: function(r, n) {
|
|
18486
|
-
return l(this,
|
|
18620
|
+
return l(this, Rn)[Rn].set(r, n);
|
|
18487
18621
|
}
|
|
18488
18622
|
/**
|
|
18489
18623
|
* @private
|
|
18490
18624
|
*/
|
|
18491
18625
|
}, { key: "__clear", value: function() {
|
|
18492
|
-
return l(this,
|
|
18626
|
+
return l(this, Rn)[Rn].clear();
|
|
18493
18627
|
} }, { key: "get", value: function(r) {
|
|
18494
|
-
return l(this,
|
|
18628
|
+
return l(this, Rn)[Rn].get(r);
|
|
18495
18629
|
} }, { key: "toArray", value: function() {
|
|
18496
|
-
return Array.from(l(this,
|
|
18630
|
+
return Array.from(l(this, Rn)[Rn].values());
|
|
18497
18631
|
} }]);
|
|
18498
18632
|
}(Fo), p_ = /* @__PURE__ */ function() {
|
|
18499
18633
|
function o() {
|
|
@@ -18615,7 +18749,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18615
18749
|
* Updates the maximum number of participants that are populated in
|
|
18616
18750
|
* the active map.
|
|
18617
18751
|
*
|
|
18618
|
-
* @param limit
|
|
18752
|
+
* @param {number} limit Updated max limit
|
|
18619
18753
|
*/
|
|
18620
18754
|
}, {
|
|
18621
18755
|
key: "setMaxActiveParticipantsCount",
|
|
@@ -18642,7 +18776,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18642
18776
|
/**
|
|
18643
18777
|
* Accepts requests from waitlisted participants if user
|
|
18644
18778
|
* has appropriate permissions.
|
|
18645
|
-
* @param id peerId or userId of the waitlisted participant.
|
|
18779
|
+
* @param {string} id peerId or userId of the waitlisted participant.
|
|
18646
18780
|
*/
|
|
18647
18781
|
}, {
|
|
18648
18782
|
key: "acceptWaitingRoomRequest",
|
|
@@ -18657,6 +18791,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18657
18791
|
* We need a new event for socket service events
|
|
18658
18792
|
* since if we send them all together, sequence of events
|
|
18659
18793
|
* can be unreliable
|
|
18794
|
+
* @param {string[]} userIds
|
|
18660
18795
|
*/
|
|
18661
18796
|
}, { key: "acceptAllWaitingRoomRequest", value: function() {
|
|
18662
18797
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -18703,39 +18838,46 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18703
18838
|
return e.apply(this, arguments);
|
|
18704
18839
|
}
|
|
18705
18840
|
return r;
|
|
18706
|
-
}() }, {
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18841
|
+
}() }, {
|
|
18842
|
+
key: "setViewMode",
|
|
18843
|
+
value: function() {
|
|
18844
|
+
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
18845
|
+
var i;
|
|
18846
|
+
return h().wrap(function(u) {
|
|
18847
|
+
for (; ; )
|
|
18848
|
+
switch (u.prev = u.next) {
|
|
18849
|
+
case 0:
|
|
18850
|
+
if (this.logger.info("Participants::set_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), i = function(d) {
|
|
18851
|
+
return g_.includes(d);
|
|
18852
|
+
}, i(a)) {
|
|
18853
|
+
u.next = 5;
|
|
18854
|
+
break;
|
|
18855
|
+
}
|
|
18856
|
+
throw this.logger.error("Participants::setViewMode::invalid_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), new j("Invalid view mode: ".concat(a, ". Try ACTIVE_GRID, PAGINATED or MANUAL."), "1207");
|
|
18857
|
+
case 5:
|
|
18858
|
+
if (this.viewMode !== a) {
|
|
18859
|
+
u.next = 8;
|
|
18860
|
+
break;
|
|
18861
|
+
}
|
|
18862
|
+
return this.logger.info("Participants::setViewMode::view_mode_same_as_previous"), u.abrupt("return");
|
|
18863
|
+
case 8:
|
|
18864
|
+
this.viewMode = a, a === "PAGINATED" ? (this.currentPage = 1, l(this, ye)[ye].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "ACTIVE_GRID" ? (this.currentPage = 0, l(this, ye)[ye].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "MANUAL" && (this.currentPage = 0, l(this, ye)[ye].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })), this.emit("viewModeChanged", { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount });
|
|
18865
|
+
case 11:
|
|
18866
|
+
case "end":
|
|
18867
|
+
return u.stop();
|
|
18868
|
+
}
|
|
18869
|
+
}, n, this);
|
|
18870
|
+
}));
|
|
18871
|
+
function r(n) {
|
|
18872
|
+
return e.apply(this, arguments);
|
|
18873
|
+
}
|
|
18874
|
+
return r;
|
|
18875
|
+
}()
|
|
18876
|
+
/**
|
|
18877
|
+
* @param {string[]} peerIds
|
|
18878
|
+
* @param {Array.<('audio'|'video'|'screenshareAudio'|'screenshareVideo')>} [kinds]
|
|
18879
|
+
*/
|
|
18880
|
+
}, { key: "subscribe", value: function() {
|
|
18739
18881
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
18740
18882
|
var i = this, s, u = arguments;
|
|
18741
18883
|
return h().wrap(function(d) {
|
|
@@ -18959,7 +19101,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18959
19101
|
}
|
|
18960
19102
|
throw this.logger.error("Participants::unauthorized_kick_all"), new j("Unauthorized: User does not have permission to kick peers.", "1201");
|
|
18961
19103
|
case 7:
|
|
18962
|
-
i = l(this, ye)[ye].getValue("flagsmith").hasFeature(
|
|
19104
|
+
i = l(this, ye)[ye].getValue("flagsmith").hasFeature(me.PROPAGATE_KICK_ALL), l(this, wr)[wr].kickAll(i);
|
|
18963
19105
|
case 9:
|
|
18964
19106
|
case "end":
|
|
18965
19107
|
return u.stop();
|
|
@@ -19023,27 +19165,34 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19023
19165
|
return e.apply(this, arguments);
|
|
19024
19166
|
}
|
|
19025
19167
|
return r;
|
|
19026
|
-
}() }, {
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19031
|
-
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
|
|
19043
|
-
|
|
19044
|
-
|
|
19045
|
-
|
|
19046
|
-
|
|
19168
|
+
}() }, {
|
|
19169
|
+
key: "getAllJoinedPeers",
|
|
19170
|
+
value: function() {
|
|
19171
|
+
var e = m(/* @__PURE__ */ h().mark(function n(a, i, s) {
|
|
19172
|
+
var u;
|
|
19173
|
+
return h().wrap(function(d) {
|
|
19174
|
+
for (; ; )
|
|
19175
|
+
switch (d.prev = d.next) {
|
|
19176
|
+
case 0:
|
|
19177
|
+
return d.next = 2, l(this, wr)[wr].getRoomPeers(a, i, s);
|
|
19178
|
+
case 2:
|
|
19179
|
+
return u = d.sent, d.abrupt("return", u.peers.map(Ya.formatSocketPeerMessage));
|
|
19180
|
+
case 4:
|
|
19181
|
+
case "end":
|
|
19182
|
+
return d.stop();
|
|
19183
|
+
}
|
|
19184
|
+
}, n, this);
|
|
19185
|
+
}));
|
|
19186
|
+
function r(n, a, i) {
|
|
19187
|
+
return e.apply(this, arguments);
|
|
19188
|
+
}
|
|
19189
|
+
return r;
|
|
19190
|
+
}()
|
|
19191
|
+
/**
|
|
19192
|
+
* @param {string[]} participantIds
|
|
19193
|
+
* @param {PresetUpdates} permissions
|
|
19194
|
+
*/
|
|
19195
|
+
}, { key: "updatePermissions", value: function() {
|
|
19047
19196
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
19048
19197
|
var s, u;
|
|
19049
19198
|
return h().wrap(function(d) {
|
|
@@ -19176,7 +19325,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19176
19325
|
return function(i, s) {
|
|
19177
19326
|
return a.apply(this, arguments);
|
|
19178
19327
|
};
|
|
19179
|
-
}(), this.context = t, this.roomSocketHandler = r, this.participants = new Rt(t, e, this.roomSocketHandler), this.self = e, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events =
|
|
19328
|
+
}(), this.context = t, this.roomSocketHandler = r, this.participants = new Rt(t, e, this.roomSocketHandler), this.self = e, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = Nn, e.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
|
|
19180
19329
|
}
|
|
19181
19330
|
return P(o, [{ key: "roomNodeClient", get: function() {
|
|
19182
19331
|
return this.context.getValue("roomNodeClient");
|
|
@@ -19207,7 +19356,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19207
19356
|
for (; ; )
|
|
19208
19357
|
switch (c.prev = c.next) {
|
|
19209
19358
|
case 0:
|
|
19210
|
-
i = e.context.getValue("flagsmith").hasFeature(
|
|
19359
|
+
i = e.context.getValue("flagsmith").hasFeature(me.DEBUG_SOCKET_JOIN), i && (s = a && (a == null ? void 0 : a.length) < 20 ? { peers: JSON.stringify(a.map(function(d) {
|
|
19211
19360
|
return d.peerId;
|
|
19212
19361
|
})) } : void 0, e.logger.info("Processing socket peers", s)), a == null || a.forEach(function(d) {
|
|
19213
19362
|
d.waitlisted || e.onParticipantSocketJoined(e.createParticipantObjFromSocketPeer(d));
|
|
@@ -19228,7 +19377,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19228
19377
|
}).join("") } }), e.logger.info("events.peerJoinedBroadcast", { peers: n.peerId }), e.onParticipantMediaJoined(n.peerId, n.producerStates, n.capabilities);
|
|
19229
19378
|
}), this.roomSocketHandler.on(this.events.selfJoinComplete, function(r) {
|
|
19230
19379
|
var n = r.participants, a = r.selectedPeers, i = r.roomState;
|
|
19231
|
-
if (e.context.getValue("flagsmith").hasFeature(
|
|
19380
|
+
if (e.context.getValue("flagsmith").hasFeature(me.DEBUG_SOCKET_JOIN)) {
|
|
19232
19381
|
var s = n && (n == null ? void 0 : n.length) < 20 ? { peers: JSON.stringify(n.map(function(p) {
|
|
19233
19382
|
return p.peerId;
|
|
19234
19383
|
})) } : void 0;
|
|
@@ -19242,7 +19391,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19242
19391
|
i.pinnedPeerIds.length !== 0 && e.onParticipantPinned(i.pinnedPeerIds[0]), e.computeActivateParticipants(c != null ? c : [], d), e.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), e.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { createAllConsumers: !0 });
|
|
19243
19392
|
}), this.context.getValue("peerSessionStore").on(F.MAX_SPATIAL_LAYER_CHANGE, function(r) {
|
|
19244
19393
|
var n = r.peerId, a = r.maxSpatialLayer, i = e.videoPeerConsumerMap.get(n);
|
|
19245
|
-
i && (e.context.getValue("flagsmith").hasFeature(
|
|
19394
|
+
i && (e.context.getValue("flagsmith").hasFeature(me.DISABLE_LAYER_SWITCH) || (e.maxSpatialLayerUpdates.set(i, a), e.updateConsumerSpatialLayers()));
|
|
19246
19395
|
}), this.context.getValue("peerSessionStore").on(F.NEW_PRODUCER, function(r) {
|
|
19247
19396
|
var n = r.peerId, a = r.producer, i = e.participants.joined.get(n);
|
|
19248
19397
|
if (!i) {
|
|
@@ -19546,7 +19695,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19546
19695
|
return u % 2 ? "*" : s;
|
|
19547
19696
|
}).join("") } }), this.logger.info("onParticipantMediaJoined: peer ".concat(e, " has joined media room. Processing.")), r.forEach(function(s) {
|
|
19548
19697
|
s.kind === ca.AUDIO && !s.screenShare ? i.setAudioEnabled(!s.pause) : s.kind === ca.VIDEO && !s.screenShare && (i.setVideoEnabled(!s.pause), a.updatePipSource(i.id, !s.pause)), i.producers.push(N(N({}, s), {}, { producingTransportId: s.producingTransportId, kind: s.kind === ca.AUDIO ? "audio" : "video", producingPeerId: e, mimeType: s.mimeType }));
|
|
19549
|
-
}), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(
|
|
19698
|
+
}), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(me.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19550
19699
|
}
|
|
19551
19700
|
}
|
|
19552
19701
|
/**
|
|
@@ -19597,7 +19746,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19597
19746
|
this.roomSocketHandler.on(Q.joinRoom, function(r) {
|
|
19598
19747
|
var n = r.peer;
|
|
19599
19748
|
if (!n.waitlisted) {
|
|
19600
|
-
var a = e.context.getValue("flagsmith").hasFeature(
|
|
19749
|
+
var a = e.context.getValue("flagsmith").hasFeature(me.DEBUG_SOCKET_JOIN);
|
|
19601
19750
|
a && e.logger.info("Processing socket join", { peers: n.peerId }), e.onParticipantSocketJoined(e.createParticipantObjFromSocketPeer(n)), a && e.logger.info("Processed socket join", { peers: n.peerId });
|
|
19602
19751
|
}
|
|
19603
19752
|
}), this.roomSocketHandler.on(Q.leaveRoom, function(r) {
|
|
@@ -19834,7 +19983,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19834
19983
|
return g.producerId === c;
|
|
19835
19984
|
});
|
|
19836
19985
|
if (f && (f.consumer = { id: e, peerId: n, kind: a, appData: u, paused: i, producerId: c, rtpReceiver: d, localId: p }), u.screenShare) {
|
|
19837
|
-
a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), (!i || this.self.permissions.isRecorder || this.context.getValue("flagsmith").hasFeature(
|
|
19986
|
+
a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), (!i || this.self.permissions.isRecorder || this.context.getValue("flagsmith").hasFeature(me.SCREEENSHARE_ERR_HACK)) && v.setScreenShareEnabled(!0), u.supportsRemoteControl && (v.supportsRemoteControl = !0), this.participants.broadcastMessage("screenshareConsumerCreated", { producerId: c, peerId: n, screenShare: !0, consumerId: e, consumerPeerId: this.self.id }), this.logger.info("ParticipantController::newScreenshareConsumer::screenshareConsumerCreated", { consumer: { id: e, peerId: n, kind: a, remotelyPaused: i, appData: u, producerId: c } });
|
|
19838
19987
|
return;
|
|
19839
19988
|
}
|
|
19840
19989
|
a === "video" ? (v.videoTrack = s, i || (v.setVideoEnabled(!0), this.updatePipSource(v.id, !0)), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !i })) : a === "audio" && (v.audioTrack = s, i || v.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !i })), !i && u.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s });
|
|
@@ -19898,7 +20047,7 @@ no([O.trace("ParticipantController.processConsumerClosed")], Ya.prototype, "proc
|
|
|
19898
20047
|
no([O.trace("ParticipantController.processConsumerResumed")], Ya.prototype, "processConsumerResumed", 1);
|
|
19899
20048
|
no([O.trace("ParticipantController.processConsumerPaused")], Ya.prototype, "processConsumerPaused", 1);
|
|
19900
20049
|
no([O.trace("ParticipantController.processNewConsumer")], Ya.prototype, "processNewConsumer", 1);
|
|
19901
|
-
var ar =
|
|
20050
|
+
var ar = Un(Np().permissions), G = /* @__PURE__ */ C("permissions"), gs = /* @__PURE__ */ C("viewType"), Ms = /* @__PURE__ */ C("context"), rd = /* @__PURE__ */ C("updatePermission"), mr = /* @__PURE__ */ C("stageStatus"), w_ = /* @__PURE__ */ function(o) {
|
|
19902
20051
|
function t(e, r, n) {
|
|
19903
20052
|
var a, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
19904
20053
|
w(this, t);
|
|
@@ -20427,10 +20576,21 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20427
20576
|
return e.apply(this, arguments);
|
|
20428
20577
|
}
|
|
20429
20578
|
return r;
|
|
20430
|
-
}() }, {
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20579
|
+
}() }, {
|
|
20580
|
+
key: "peerId",
|
|
20581
|
+
get: function() {
|
|
20582
|
+
var r;
|
|
20583
|
+
return (r = l(this, jr)[jr]) === null || r === void 0 ? void 0 : r.getValue("peerId");
|
|
20584
|
+
}
|
|
20585
|
+
/**
|
|
20586
|
+
* @param {Object} options
|
|
20587
|
+
* @param {boolean} [options.video]
|
|
20588
|
+
* @param {boolean} [options.audio]
|
|
20589
|
+
* @param {MediaConstraints} [options.constraints]
|
|
20590
|
+
* @param {boolean} [skipAwaits=false]
|
|
20591
|
+
* @param {Context} [context=null]
|
|
20592
|
+
*/
|
|
20593
|
+
}, { key: "init", value: function() {
|
|
20434
20594
|
var e = m(/* @__PURE__ */ h().mark(function n() {
|
|
20435
20595
|
var a = this, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S = arguments;
|
|
20436
20596
|
return h().wrap(function(I) {
|
|
@@ -20570,6 +20730,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20570
20730
|
* If there are more than 1 audio middlewares,
|
|
20571
20731
|
* they will be executed in the sequence they were added in.
|
|
20572
20732
|
* If you want the sequence to be altered, please remove all previous middlewares and re-add.
|
|
20733
|
+
* @param {AudioMiddleware} audioMiddleware
|
|
20573
20734
|
*/
|
|
20574
20735
|
}, { key: "addAudioMiddleware", value: function() {
|
|
20575
20736
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -20640,6 +20801,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20640
20801
|
* If there are more than 1 video middlewares,
|
|
20641
20802
|
* they will be executed in the sequence they were added in.
|
|
20642
20803
|
* If you want the sequence to be altered, please remove all previous middlewares and re-add.
|
|
20804
|
+
* @param {VideoMiddleware} videoMiddleware
|
|
20643
20805
|
*/
|
|
20644
20806
|
}, { key: "addVideoMiddleware", value: function() {
|
|
20645
20807
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -20930,7 +21092,8 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20930
21092
|
}
|
|
20931
21093
|
/**
|
|
20932
21094
|
* Change the current media device that is being used by the local participant.
|
|
20933
|
-
* @param device The device that is to be used.
|
|
21095
|
+
* @param {MediaDeviceInfo} device The device that is to be used.
|
|
21096
|
+
* A device of the same `kind` will be replaced.
|
|
20934
21097
|
* the primary stream.
|
|
20935
21098
|
*/
|
|
20936
21099
|
}, { key: "setDevice", value: function() {
|
|
@@ -21065,7 +21228,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21065
21228
|
}
|
|
21066
21229
|
return u.prev = 7, u.next = 10, l(r, Ve)[Ve].shareWebcam(r.videoTrack);
|
|
21067
21230
|
case 10:
|
|
21068
|
-
if (i = u.sent, !(i && i.id !== r.videoTrack.id && l(r, Ne)[Ne].getValue("flagsmith").hasFeature(
|
|
21231
|
+
if (i = u.sent, !(i && i.id !== r.videoTrack.id && l(r, Ne)[Ne].getValue("flagsmith").hasFeature(me.EXP_RESHARE))) {
|
|
21069
21232
|
u.next = 14;
|
|
21070
21233
|
break;
|
|
21071
21234
|
}
|
|
@@ -21207,7 +21370,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21207
21370
|
* The name of the user can be set by calling this method.
|
|
21208
21371
|
* This will get reflected to other participants ONLY if
|
|
21209
21372
|
* this method is called before the room is joined.
|
|
21210
|
-
* @param name Name of the user.
|
|
21373
|
+
* @param {string} name Name of the user.
|
|
21211
21374
|
*/
|
|
21212
21375
|
function(r) {
|
|
21213
21376
|
if (!r)
|
|
@@ -21704,7 +21867,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21704
21867
|
p.next = 7;
|
|
21705
21868
|
break;
|
|
21706
21869
|
}
|
|
21707
|
-
if (this.logger.warn("Self.setDevice.setting_to_in_use_device", { devices: [a] }), !l(this, Ne)[Ne].getValue("flagsmith").hasFeature(
|
|
21870
|
+
if (this.logger.warn("Self.setDevice.setting_to_in_use_device", { devices: [a] }), !l(this, Ne)[Ne].getValue("flagsmith").hasFeature(me.SKIP_SETTING_IN_USE_DEVICE)) {
|
|
21708
21871
|
p.next = 7;
|
|
21709
21872
|
break;
|
|
21710
21873
|
}
|
|
@@ -21929,7 +22092,7 @@ var __ = /* @__PURE__ */ function(o) {
|
|
|
21929
22092
|
return e;
|
|
21930
22093
|
}() }, { key: "stop", value: function() {
|
|
21931
22094
|
this.stopping = !0;
|
|
21932
|
-
var e =
|
|
22095
|
+
var e = jn(this.pendingTasks.values()), r;
|
|
21933
22096
|
try {
|
|
21934
22097
|
for (e.s(); !(r = e.n()).done; ) {
|
|
21935
22098
|
var n = r.value;
|
|
@@ -21992,7 +22155,7 @@ var qd = /* @__PURE__ */ function(o) {
|
|
|
21992
22155
|
return w(this, t), r = R(this, t, [e]), r.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
|
|
21993
22156
|
}
|
|
21994
22157
|
return A(t, o), P(t);
|
|
21995
|
-
}(j),
|
|
22158
|
+
}(j), yn = /* @__PURE__ */ function(o) {
|
|
21996
22159
|
function t(e) {
|
|
21997
22160
|
var r;
|
|
21998
22161
|
return w(this, t), r = R(this, t, [e]), r.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
|
|
@@ -22001,7 +22164,7 @@ var qd = /* @__PURE__ */ function(o) {
|
|
|
22001
22164
|
}(j), qs = /* @__PURE__ */ function(o) {
|
|
22002
22165
|
function t(e) {
|
|
22003
22166
|
var r;
|
|
22004
|
-
return w(this, t), r = R(this, t, [e]), r.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r,
|
|
22167
|
+
return w(this, t), r = R(this, t, [e]), r.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, yn) : r.stack = new Error(e).stack, r;
|
|
22005
22168
|
}
|
|
22006
22169
|
return A(t, o), P(t);
|
|
22007
22170
|
}(j), yv = function(t) {
|
|
@@ -22118,7 +22281,7 @@ function N_(o) {
|
|
|
22118
22281
|
}
|
|
22119
22282
|
var qe = /* @__PURE__ */ C("socket"), V_ = /* @__PURE__ */ function() {
|
|
22120
22283
|
function o(t) {
|
|
22121
|
-
w(this, o), Object.defineProperty(this, qe, { writable: !0, value: void 0 }), this.events = void 0, l(this, qe)[qe] = t, this.events =
|
|
22284
|
+
w(this, o), Object.defineProperty(this, qe, { writable: !0, value: void 0 }), this.events = void 0, l(this, qe)[qe] = t, this.events = Nn;
|
|
22122
22285
|
}
|
|
22123
22286
|
return P(o, [{ key: "joinRoom", value: function() {
|
|
22124
22287
|
var t = m(/* @__PURE__ */ h().mark(function r(n, a, i) {
|
|
@@ -22938,7 +23101,7 @@ var qe = /* @__PURE__ */ C("socket"), V_ = /* @__PURE__ */ function() {
|
|
|
22938
23101
|
return u.reverse(), f = v.sender.getParameters(), f.encodings = u, D.next = 10, v.sender.setParameters(f);
|
|
22939
23102
|
case 10:
|
|
22940
23103
|
return g = function(_, V) {
|
|
22941
|
-
var U, $ =
|
|
23104
|
+
var U, $ = On.parse(_), L = $.media[$.media.length - 1], H = L.rtp.filter(function(x) {
|
|
22942
23105
|
return V.some(function(we) {
|
|
22943
23106
|
return we.name === x.codec;
|
|
22944
23107
|
});
|
|
@@ -22953,7 +23116,7 @@ var qe = /* @__PURE__ */ C("socket"), V_ = /* @__PURE__ */ function() {
|
|
|
22953
23116
|
}), B = H.map(function(x) {
|
|
22954
23117
|
return x.payload;
|
|
22955
23118
|
});
|
|
22956
|
-
return $.media[$.media.length - 1].rtp = H, $.media[$.media.length - 1].fmtp = Y, $.media[$.media.length - 1].rtcpFb = q, $.media[$.media.length - 1].payloads = B.join(" "),
|
|
23119
|
+
return $.media[$.media.length - 1].rtp = H, $.media[$.media.length - 1].fmtp = Y, $.media[$.media.length - 1].rtcpFb = q, $.media[$.media.length - 1].payloads = B.join(" "), On.write($);
|
|
22957
23120
|
}, D.next = 13, this.pc.createOffer();
|
|
22958
23121
|
case 13:
|
|
22959
23122
|
return k = D.sent, k.sdp = g(k.sdp, c), this.logger.debug("send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(k), "]")), D.next = 18, this.pc.setLocalDescription(k);
|
|
@@ -23193,7 +23356,7 @@ var pu = /* @__PURE__ */ C("handler"), Ta = /* @__PURE__ */ C("paused"), Tt = /*
|
|
|
23193
23356
|
i.next = 2;
|
|
23194
23357
|
break;
|
|
23195
23358
|
}
|
|
23196
|
-
throw new
|
|
23359
|
+
throw new yn("closed");
|
|
23197
23360
|
case 2:
|
|
23198
23361
|
return i.abrupt("return", l(this, pu)[pu].getReceiverStats(this.localId));
|
|
23199
23362
|
case 3:
|
|
@@ -23242,10 +23405,10 @@ function W_() {
|
|
|
23242
23405
|
this.logger.error("Consumer::destroyTrack()", N(N({}, l(this, Pt)[Pt]), {}, { error: o }));
|
|
23243
23406
|
}
|
|
23244
23407
|
}
|
|
23245
|
-
var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys = /* @__PURE__ */ C("disableTrackOnPause"), wa = /* @__PURE__ */ C("zeroRtpOnPause"), Zr = /* @__PURE__ */ C("closed"), Ke = /* @__PURE__ */ C("track"),
|
|
23408
|
+
var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys = /* @__PURE__ */ C("disableTrackOnPause"), wa = /* @__PURE__ */ C("zeroRtpOnPause"), Zr = /* @__PURE__ */ C("closed"), Ke = /* @__PURE__ */ C("track"), An = /* @__PURE__ */ C("paused"), ks = /* @__PURE__ */ C("maxSpatialLayer"), id = /* @__PURE__ */ C("context"), Fr = /* @__PURE__ */ C("metadata"), J_ = /* @__PURE__ */ function(o) {
|
|
23246
23409
|
function t(e, r) {
|
|
23247
23410
|
var n, a, i;
|
|
23248
|
-
return w(this, t), i = R(this, t, [e]), Object.defineProperty(i, Fr, { get: K_, set: void 0 }), i.id = void 0, i.localId = void 0, Object.defineProperty(i, ut, { writable: !0, value: void 0 }), i.kind = void 0, i.appData = void 0, i.rtpSender = void 0, Object.defineProperty(i, ms, { writable: !0, value: void 0 }), Object.defineProperty(i, ys, { writable: !0, value: void 0 }), Object.defineProperty(i, wa, { writable: !0, value: void 0 }), Object.defineProperty(i, Zr, { writable: !0, value: !1 }), Object.defineProperty(i, Ke, { writable: !0, value: void 0 }), Object.defineProperty(i,
|
|
23411
|
+
return w(this, t), i = R(this, t, [e]), Object.defineProperty(i, Fr, { get: K_, set: void 0 }), i.id = void 0, i.localId = void 0, Object.defineProperty(i, ut, { writable: !0, value: void 0 }), i.kind = void 0, i.appData = void 0, i.rtpSender = void 0, Object.defineProperty(i, ms, { writable: !0, value: void 0 }), Object.defineProperty(i, ys, { writable: !0, value: void 0 }), Object.defineProperty(i, wa, { writable: !0, value: void 0 }), Object.defineProperty(i, Zr, { writable: !0, value: !1 }), Object.defineProperty(i, Ke, { writable: !0, value: void 0 }), Object.defineProperty(i, An, { writable: !0, value: void 0 }), Object.defineProperty(i, ks, { writable: !0, value: void 0 }), Object.defineProperty(i, id, { writable: !0, value: void 0 }), i.id = r.id, i.localId = r.localId, l(i, Ke)[Ke] = r.track, i.kind = (n = r.track) === null || n === void 0 ? void 0 : n.kind, l(i, An)[An] = r.disableTrackOnPause ? !((a = r.track) !== null && a !== void 0 && a.enabled) : !1, l(i, ks)[ks] = void 0, l(i, ms)[ms] = r.stopTracks, l(i, ys)[ys] = r.disableTrackOnPause, l(i, wa)[wa] = r.zeroRtpOnPause, i.appData = r.appData || {}, i._onTrackEnded = i._onTrackEnded.bind(i), l(i, ut)[ut] = r.handler, i.rtpSender = r.rtpSender, i._handleTrack(), l(i, id)[id] = e, i;
|
|
23249
23412
|
}
|
|
23250
23413
|
return A(t, o), P(t, [{
|
|
23251
23414
|
key: "closed",
|
|
@@ -23266,7 +23429,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23266
23429
|
}, {
|
|
23267
23430
|
key: "paused",
|
|
23268
23431
|
get: function() {
|
|
23269
|
-
return l(this,
|
|
23432
|
+
return l(this, An)[An];
|
|
23270
23433
|
}
|
|
23271
23434
|
/**
|
|
23272
23435
|
* Max spatial layer.
|
|
@@ -23324,7 +23487,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23324
23487
|
i.next = 2;
|
|
23325
23488
|
break;
|
|
23326
23489
|
}
|
|
23327
|
-
throw new
|
|
23490
|
+
throw new yn("closed");
|
|
23328
23491
|
case 2:
|
|
23329
23492
|
return i.abrupt("return", l(this, ut)[ut].getSenderStats(this.localId));
|
|
23330
23493
|
case 3:
|
|
@@ -23340,7 +23503,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23340
23503
|
}() }, {
|
|
23341
23504
|
key: "pause",
|
|
23342
23505
|
value: function() {
|
|
23343
|
-
this.logger.debug("Producer::pause()", l(this, Fr)[Fr]), l(this, Zr)[Zr] && this.logger.error("Producer::pause() | Producer closed", l(this, Fr)[Fr]), l(this,
|
|
23506
|
+
this.logger.debug("Producer::pause()", l(this, Fr)[Fr]), l(this, Zr)[Zr] && this.logger.error("Producer::pause() | Producer closed", l(this, Fr)[Fr]), l(this, An)[An] = !0, l(this, Ke)[Ke] && l(this, ys)[ys] && (l(this, Ke)[Ke].enabled = !1), l(this, wa)[wa] && l(this, ut)[ut].replaceTrack(this.localId, null), this.emit("pause");
|
|
23344
23507
|
}
|
|
23345
23508
|
/**
|
|
23346
23509
|
* Resumes sending media.
|
|
@@ -23352,7 +23515,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23352
23515
|
this.logger.error("Producer::resume() | Producer closed", l(this, Fr)[Fr]);
|
|
23353
23516
|
return;
|
|
23354
23517
|
}
|
|
23355
|
-
l(this,
|
|
23518
|
+
l(this, An)[An] = !1, l(this, Ke)[Ke] && l(this, ys)[ys] && (l(this, Ke)[Ke].enabled = !0), l(this, wa)[wa] && l(this, ut)[ut].replaceTrack(this.localId, l(this, Ke)[Ke]), this.emit("resume");
|
|
23356
23519
|
}
|
|
23357
23520
|
/**
|
|
23358
23521
|
* Replaces the current track with a new one or null.
|
|
@@ -23374,13 +23537,13 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23374
23537
|
} catch (c) {
|
|
23375
23538
|
this.logger.error("Producer::replaceTrack", N(N({}, l(this, Fr)[Fr]), {}, { error: c }));
|
|
23376
23539
|
}
|
|
23377
|
-
throw new
|
|
23540
|
+
throw new yn("closed");
|
|
23378
23541
|
case 7:
|
|
23379
23542
|
if (!(i && i.readyState === "ended")) {
|
|
23380
23543
|
u.next = 9;
|
|
23381
23544
|
break;
|
|
23382
23545
|
}
|
|
23383
|
-
throw new
|
|
23546
|
+
throw new yn("track ended");
|
|
23384
23547
|
case 9:
|
|
23385
23548
|
if (i !== l(this, Ke)[Ke]) {
|
|
23386
23549
|
u.next = 12;
|
|
@@ -23388,7 +23551,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23388
23551
|
}
|
|
23389
23552
|
return this.logger.debug("replaceTrack() | same track, ignored trackId: ".concat(i.id), l(this, Fr)[Fr]), u.abrupt("return");
|
|
23390
23553
|
case 12:
|
|
23391
|
-
if (!(!l(this, wa)[wa] || !l(this,
|
|
23554
|
+
if (!(!l(this, wa)[wa] || !l(this, An)[An])) {
|
|
23392
23555
|
u.next = 15;
|
|
23393
23556
|
break;
|
|
23394
23557
|
}
|
|
@@ -23415,7 +23578,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23415
23578
|
s.next = 4;
|
|
23416
23579
|
break;
|
|
23417
23580
|
}
|
|
23418
|
-
throw new
|
|
23581
|
+
throw new yn("closed");
|
|
23419
23582
|
case 4:
|
|
23420
23583
|
if (this.kind === "video") {
|
|
23421
23584
|
s.next = 8;
|
|
@@ -23452,7 +23615,7 @@ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys
|
|
|
23452
23615
|
s.next = 4;
|
|
23453
23616
|
break;
|
|
23454
23617
|
}
|
|
23455
|
-
throw new
|
|
23618
|
+
throw new yn("closed");
|
|
23456
23619
|
case 4:
|
|
23457
23620
|
if (ke(a) === "object") {
|
|
23458
23621
|
s.next = 6;
|
|
@@ -23506,10 +23669,10 @@ function Y_(o) {
|
|
|
23506
23669
|
var t, e;
|
|
23507
23670
|
return z_(o) && (t = (e = o.payload._bolt) === null || e === void 0 ? void 0 : e.id) !== null && t !== void 0 ? t : "";
|
|
23508
23671
|
}
|
|
23509
|
-
var
|
|
23672
|
+
var In = /* @__PURE__ */ C("datachannelCache"), sd = /* @__PURE__ */ C("context"), Pa = /* @__PURE__ */ C("logger"), ll = /* @__PURE__ */ function(o) {
|
|
23510
23673
|
function t(e, r, n, a) {
|
|
23511
23674
|
var i;
|
|
23512
|
-
return w(this, t), i = R(this, t), i.channel = void 0, i.queue = void 0, i.serverProtocolVersion = void 0, Object.defineProperty(i,
|
|
23675
|
+
return w(this, t), i = R(this, t), i.channel = void 0, i.queue = void 0, i.serverProtocolVersion = void 0, Object.defineProperty(i, In, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(i, sd, { writable: !0, value: void 0 }), Object.defineProperty(i, Pa, { writable: !0, value: void 0 }), i.respond = function(s, u) {
|
|
23513
23676
|
var c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, d;
|
|
23514
23677
|
c ? d = t.createErrorResponse(s, u) : d = t.createResponse(s, u), i.channel.send(JSON.stringify(d));
|
|
23515
23678
|
}, i.notify = function(s) {
|
|
@@ -23555,15 +23718,15 @@ var Mn = /* @__PURE__ */ C("datachannelCache"), sd = /* @__PURE__ */ C("context"
|
|
|
23555
23718
|
} else
|
|
23556
23719
|
l(i, Pa)[Pa].debug("Sending message over dc: ".concat(u)), i.channel.send(u);
|
|
23557
23720
|
}, i.processMessage = function(s) {
|
|
23558
|
-
l(i,
|
|
23559
|
-
var u = l(i,
|
|
23721
|
+
l(i, In)[In].has(s.id) || l(i, In)[In].set(s.id, []);
|
|
23722
|
+
var u = l(i, In)[In].get(s.id);
|
|
23560
23723
|
if (u[s.chunkIndex] = s, (u == null ? void 0 : u.length) === s.count && !u.some(function(f) {
|
|
23561
23724
|
return f === void 0;
|
|
23562
23725
|
})) {
|
|
23563
|
-
var c, d = l(i,
|
|
23726
|
+
var c, d = l(i, In)[In].get(s.id), p = d == null ? void 0 : d.reduce(function(f, g) {
|
|
23564
23727
|
return f + g.chunk;
|
|
23565
23728
|
}, "");
|
|
23566
|
-
l(i,
|
|
23729
|
+
l(i, In)[In].delete(s.id);
|
|
23567
23730
|
var v = JSON.parse(p);
|
|
23568
23731
|
if (!v.payload || !Mg(v.payload))
|
|
23569
23732
|
throw new Error("corrupted incoming message over dc", { cause: { code: "CORRUPT_DC_MESSAGE", values: v } });
|
|
@@ -23691,7 +23854,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
23691
23854
|
i.next = 2;
|
|
23692
23855
|
break;
|
|
23693
23856
|
}
|
|
23694
|
-
throw new
|
|
23857
|
+
throw new yn("closed");
|
|
23695
23858
|
case 2:
|
|
23696
23859
|
return i.abrupt("return", this.handler.getTransportStats());
|
|
23697
23860
|
case 3:
|
|
@@ -23767,7 +23930,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
23767
23930
|
i.next = 3;
|
|
23768
23931
|
break;
|
|
23769
23932
|
}
|
|
23770
|
-
throw new
|
|
23933
|
+
throw new yn("closed");
|
|
23771
23934
|
case 3:
|
|
23772
23935
|
return i.abrupt("return", this.handler.restartIce());
|
|
23773
23936
|
case 4:
|
|
@@ -23803,7 +23966,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
23803
23966
|
c.next = 13;
|
|
23804
23967
|
break;
|
|
23805
23968
|
}
|
|
23806
|
-
throw new
|
|
23969
|
+
throw new yn("track ended");
|
|
23807
23970
|
case 13:
|
|
23808
23971
|
if (!(s && ke(s) !== "object")) {
|
|
23809
23972
|
c.next = 15;
|
|
@@ -23923,7 +24086,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
23923
24086
|
i.next = 4;
|
|
23924
24087
|
break;
|
|
23925
24088
|
}
|
|
23926
|
-
throw new
|
|
24089
|
+
throw new yn("closed");
|
|
23927
24090
|
case 4:
|
|
23928
24091
|
if (this.direction === "recv") {
|
|
23929
24092
|
i.next = 6;
|
|
@@ -24046,7 +24209,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
24046
24209
|
case 4:
|
|
24047
24210
|
return c.next = 6, this.handler.pc.createAnswer();
|
|
24048
24211
|
case 6:
|
|
24049
|
-
return i = c.sent, this.logger.info("Created answer corresponding to received offer", { sdp: i.sdp }), s =
|
|
24212
|
+
return i = c.sent, this.logger.info("Created answer corresponding to received offer", { sdp: i.sdp }), s = On.parse(i.sdp), s.media = s.media.map(function(d) {
|
|
24050
24213
|
if (d.type === "audio") {
|
|
24051
24214
|
var p = N({}, d), v = p.fmtp.find(function(g) {
|
|
24052
24215
|
return g.payload === 111;
|
|
@@ -24058,7 +24221,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
24058
24221
|
return f || p.rtcpFb.push({ payload: parseInt(p.payloads, 10), type: "nack" }), p;
|
|
24059
24222
|
}
|
|
24060
24223
|
return d;
|
|
24061
|
-
}), i.sdp =
|
|
24224
|
+
}), i.sdp = On.write(s), this.logger.info("Setting munged SDP", { sdp: i.sdp }), c.next = 14, this.setLocalDescription(i);
|
|
24062
24225
|
case 14:
|
|
24063
24226
|
return this.logger.info("Successfully set local description", { sdp: i.sdp }), c.abrupt("return", i);
|
|
24064
24227
|
case 18:
|
|
@@ -24205,12 +24368,12 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
24205
24368
|
}
|
|
24206
24369
|
return r;
|
|
24207
24370
|
}() }], [{ key: "parseCodecAndFmtpMappings", value: function(r, n) {
|
|
24208
|
-
var a =
|
|
24371
|
+
var a = On.parse(r.sdp), i = {};
|
|
24209
24372
|
return a.media.forEach(function(s) {
|
|
24210
24373
|
n.includes(s.mid.toString()) && (i[s.mid.toString()] = { rtp: s.rtp, fmtp: s.fmtp, payloads: s.payloads, rtcpFb: s.rtcpFb });
|
|
24211
24374
|
}), i;
|
|
24212
24375
|
} }, { key: "setCodecAndFmtpMappings", value: function(r, n, a) {
|
|
24213
|
-
var i =
|
|
24376
|
+
var i = On.parse(r.sdp);
|
|
24214
24377
|
i.media = i.media.map(function(u) {
|
|
24215
24378
|
if (n.includes(u.mid.toString())) {
|
|
24216
24379
|
var c = N({}, u);
|
|
@@ -24218,20 +24381,20 @@ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE_
|
|
|
24218
24381
|
}
|
|
24219
24382
|
return u;
|
|
24220
24383
|
});
|
|
24221
|
-
var s = N(N({}, r), {}, { sdp:
|
|
24384
|
+
var s = N(N({}, r), {}, { sdp: On.write(i) });
|
|
24222
24385
|
return s;
|
|
24223
24386
|
} }, { key: "parseHeaderExtensionMappings", value: function(r) {
|
|
24224
|
-
var n =
|
|
24387
|
+
var n = On.parse(r.sdp), a = {};
|
|
24225
24388
|
return n.media.forEach(function(i) {
|
|
24226
24389
|
a[i.mid] = i.ext;
|
|
24227
24390
|
}), a;
|
|
24228
24391
|
} }, { key: "setHeaderExtensionMappings", value: function(r, n) {
|
|
24229
|
-
var a =
|
|
24392
|
+
var a = On.parse(r.sdp);
|
|
24230
24393
|
a.media = a.media.map(function(s) {
|
|
24231
24394
|
var u = N({}, s);
|
|
24232
24395
|
return u.ext = n[s.mid], u;
|
|
24233
24396
|
});
|
|
24234
|
-
var i = N(N({}, r), {}, { sdp:
|
|
24397
|
+
var i = N(N({}, r), {}, { sdp: On.write(a) });
|
|
24235
24398
|
return i;
|
|
24236
24399
|
} }]);
|
|
24237
24400
|
}(Ac);
|
|
@@ -24313,9 +24476,9 @@ var Kt = /* @__PURE__ */ C("context"), Ea = /* @__PURE__ */ C("logger"), Z_ = /*
|
|
|
24313
24476
|
}(), x_ = 2e3, Gs = /* @__PURE__ */ C("device"), sr = /* @__PURE__ */ C("sendTransport"), or = /* @__PURE__ */ C("recvTransport"), hu = /* @__PURE__ */ C("sendTransportConnectedCallback"), vu = /* @__PURE__ */ C("recvTransportConnectedCallback"), ja = /* @__PURE__ */ C("socket"), _s = /* @__PURE__ */ C("socketHandler"), fu = /* @__PURE__ */ C("events"), Xs = /* @__PURE__ */ C("metrics"), Va = /* @__PURE__ */ C("transportDisconnectedTimer"), Ct = /* @__PURE__ */ C("iceTransportPolicy"), Ns = /* @__PURE__ */ C("connectionHandler"), gu = /* @__PURE__ */ C("reset"), od = /* @__PURE__ */ C("createTransports"), mu = /* @__PURE__ */ C("connectTransportWithRetry"), Wd = /* @__PURE__ */ C("connectTransport"), Jd = /* @__PURE__ */ C("createSendTransport"), Kd = /* @__PURE__ */ C("createRecvTransport"), zd = /* @__PURE__ */ C("setTransportEventHandlers"), Yd = /* @__PURE__ */ C("transportConnectionRequest"), Mu = /* @__PURE__ */ C("reconnectTransport"), Zu = /* @__PURE__ */ C("updateTransportState"), eO = /* @__PURE__ */ function(o) {
|
|
24314
24477
|
function t(e, r) {
|
|
24315
24478
|
var n;
|
|
24316
|
-
w(this, t), n = R(this, t), Object.defineProperty(n, Zu, { value: dO }), Object.defineProperty(n, Mu, { value: cO }), Object.defineProperty(n, Yd, { value: lO }), Object.defineProperty(n, zd, { value: uO }), Object.defineProperty(n, Kd, { value: oO }), Object.defineProperty(n, Jd, { value: sO }), Object.defineProperty(n, Wd, { value: iO }), Object.defineProperty(n, mu, { value: aO }), Object.defineProperty(n, od, { value: nO }), Object.defineProperty(n, gu, { value: tO }), Object.defineProperty(n, Ns, { get: rO, set: void 0 }), n.context = void 0, Object.defineProperty(n, Gs, { writable: !0, value: void 0 }), Object.defineProperty(n, sr, { writable: !0, value: void 0 }), Object.defineProperty(n, or, { writable: !0, value: void 0 }), Object.defineProperty(n, hu, { writable: !0, value: void 0 }), Object.defineProperty(n, vu, { writable: !0, value: void 0 }), Object.defineProperty(n, ja, { writable: !0, value: void 0 }), Object.defineProperty(n, _s, { writable: !0, value: void 0 }), Object.defineProperty(n, fu, { writable: !0, value: void 0 }), Object.defineProperty(n, Xs, { writable: !0, value: { transportFailureCount: { send: 0, recv: 0 }, lastConnectionTime: 0 } }), Object.defineProperty(n, Va, { writable: !0, value: void 0 }), Object.defineProperty(n, Ct, { writable: !0, value: "all" }), n.context = e, l(n, ja)[ja] = r, l(n, Gs)[Gs] = new Z_(e), l(n, _s)[_s] = new V_(r), l(n, fu)[fu] =
|
|
24479
|
+
w(this, t), n = R(this, t), Object.defineProperty(n, Zu, { value: dO }), Object.defineProperty(n, Mu, { value: cO }), Object.defineProperty(n, Yd, { value: lO }), Object.defineProperty(n, zd, { value: uO }), Object.defineProperty(n, Kd, { value: oO }), Object.defineProperty(n, Jd, { value: sO }), Object.defineProperty(n, Wd, { value: iO }), Object.defineProperty(n, mu, { value: aO }), Object.defineProperty(n, od, { value: nO }), Object.defineProperty(n, gu, { value: tO }), Object.defineProperty(n, Ns, { get: rO, set: void 0 }), n.context = void 0, Object.defineProperty(n, Gs, { writable: !0, value: void 0 }), Object.defineProperty(n, sr, { writable: !0, value: void 0 }), Object.defineProperty(n, or, { writable: !0, value: void 0 }), Object.defineProperty(n, hu, { writable: !0, value: void 0 }), Object.defineProperty(n, vu, { writable: !0, value: void 0 }), Object.defineProperty(n, ja, { writable: !0, value: void 0 }), Object.defineProperty(n, _s, { writable: !0, value: void 0 }), Object.defineProperty(n, fu, { writable: !0, value: void 0 }), Object.defineProperty(n, Xs, { writable: !0, value: { transportFailureCount: { send: 0, recv: 0 }, lastConnectionTime: 0 } }), Object.defineProperty(n, Va, { writable: !0, value: void 0 }), Object.defineProperty(n, Ct, { writable: !0, value: "all" }), n.context = e, l(n, ja)[ja] = r, l(n, Gs)[Gs] = new Z_(e), l(n, _s)[_s] = new V_(r), l(n, fu)[fu] = Nn, l(n, Ns)[Ns].mediaState = { send: { state: Uo.NEW }, recv: { state: Uo.NEW } };
|
|
24317
24480
|
var a = No(n.context, "forceRelay");
|
|
24318
|
-
return (a || n.context.getValue("flagsmith").hasFeature(
|
|
24481
|
+
return (a || n.context.getValue("flagsmith").hasFeature(me.FORCE_RELAY)) && (l(n, Ct)[Ct] = "relay"), n.logger.info("ICE Transport Policy initially set to ".concat(l(n, Ct)[Ct])), l(n, gu)[gu](), n;
|
|
24319
24482
|
}
|
|
24320
24483
|
return A(t, o), P(t, [{
|
|
24321
24484
|
key: "telemetry",
|
|
@@ -24415,11 +24578,11 @@ function Qd() {
|
|
|
24415
24578
|
for (; ; )
|
|
24416
24579
|
switch (g.prev = g.next) {
|
|
24417
24580
|
case 0:
|
|
24418
|
-
return r = No(this.context, "forceRelay"), (r || this.context.getValue("flagsmith").hasFeature(
|
|
24581
|
+
return r = No(this.context, "forceRelay"), (r || this.context.getValue("flagsmith").hasFeature(me.FORCE_RELAY)) && (l(this, Ct)[Ct] = "relay"), this.logger.info("ICE Transport Policy set to ".concat(l(this, Ct)[Ct])), n = ht(), g.next = 6, n.getICEServers().catch(function(k) {
|
|
24419
24582
|
return e.logger.warn("failed to get iceservers from server: ".concat(k.message)), [];
|
|
24420
24583
|
});
|
|
24421
24584
|
case 6:
|
|
24422
|
-
a = g.sent, t.send && (p = this.context.getValue("flagsmith").hasFeature(
|
|
24585
|
+
a = g.sent, t.send && (p = this.context.getValue("flagsmith").hasFeature(me.DISABLE_OPUS_DTX_CF), l(this, Jd)[Jd]({ iceServers: a, additionalSettings: { encodedInsertableStreams: (i = this.context.getValue("modules").e2ee) === null || i === void 0 ? void 0 : i.enabled }, config: { enableHighBitrate: (s = (u = this.context.getValue("defaults").mediaConfiguration) === null || u === void 0 || (u = u.audio) === null || u === void 0 ? void 0 : u.enableHighBitrate) !== null && s !== void 0 ? s : !1, enableStereo: (c = (d = this.context.getValue("defaults").mediaConfiguration) === null || d === void 0 || (d = d.audio) === null || d === void 0 ? void 0 : d.enableStereo) !== null && c !== void 0 ? c : !1, enableDtx: !!p }, iceTransportPolicy: l(this, Ct)[Ct] })), t.recv && l(this, Kd)[Kd]({ iceServers: a, additionalSettings: { encodedInsertableStreams: (v = this.context.getValue("modules").e2ee) === null || v === void 0 ? void 0 : v.enabled }, iceTransportPolicy: l(this, Ct)[Ct] });
|
|
24423
24586
|
case 9:
|
|
24424
24587
|
case "end":
|
|
24425
24588
|
return g.stop();
|
|
@@ -24670,7 +24833,7 @@ function ep() {
|
|
|
24670
24833
|
for (; ; )
|
|
24671
24834
|
switch (n.prev = n.next) {
|
|
24672
24835
|
case 0:
|
|
24673
|
-
return this.logger.info("Called reconnect transport", { transport: { type: t } }), this.stopTransports({ [t]: !0 }), e = this.context.getValue("flagsmith").hasFeature(
|
|
24836
|
+
return this.logger.info("Called reconnect transport", { transport: { type: t } }), this.stopTransports({ [t]: !0 }), e = this.context.getValue("flagsmith").hasFeature(me.CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED), e && l(this, ja)[ja].isConnected && l(this, Xs)[Xs].transportFailureCount[t] > 2 && (this.logger.warn("Multiple disconnections in ".concat(t, " transport, forcing relay")), l(this, Ct)[Ct] = "relay"), n.next = 6, this.setupTransports({ [t]: !0 });
|
|
24674
24837
|
case 6:
|
|
24675
24838
|
n.t0 = t, n.next = n.t0 === "send" ? 9 : n.t0 === "recv" ? 12 : 15;
|
|
24676
24839
|
break;
|
|
@@ -24711,7 +24874,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
24711
24874
|
throw new Error("List of producers is required");
|
|
24712
24875
|
case 2:
|
|
24713
24876
|
return i = /* @__PURE__ */ new Map(), s = [], n.forEach(function(g) {
|
|
24714
|
-
var k = g.producingPeerId, y = g.producerId, b = g.producingTransportId, E = l(a, yu)[yu].getValue("flagsmith").hasFeature(
|
|
24877
|
+
var k = g.producingPeerId, y = g.producerId, b = g.producingTransportId, E = l(a, yu)[yu].getValue("flagsmith").hasFeature(me.ENABLE_CF_SIMULCAST) ? { simulcast: { preferredRid: "h", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } } : {};
|
|
24715
24878
|
i.set(y, k), s.push(N({ producingPeerId: k, producerId: y, producingTransportId: b }, E));
|
|
24716
24879
|
}), f.next = 7, this.socketHandler.consume({ requests: s, consumingTransportId: this.recvTransport.serverId });
|
|
24717
24880
|
case 7:
|
|
@@ -24869,15 +25032,15 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
24869
25032
|
}
|
|
24870
25033
|
return e;
|
|
24871
25034
|
}() }], [{ key: "getMSIDFromSDP", value: function(e, r) {
|
|
24872
|
-
var n =
|
|
25035
|
+
var n = On.parse(e), a = n.media.filter(function(i) {
|
|
24873
25036
|
return r === "video" ? i.type === "video" : i.type === "audio";
|
|
24874
25037
|
}).at(-1).msid;
|
|
24875
25038
|
return a;
|
|
24876
25039
|
} }]);
|
|
24877
|
-
}(), La = /* @__PURE__ */ C("producers"),
|
|
25040
|
+
}(), La = /* @__PURE__ */ C("producers"), Ln = /* @__PURE__ */ C("consumers"), bs = /* @__PURE__ */ C("producerIdToConsumerIdMap"), $u = /* @__PURE__ */ C("producerStrategy"), Et = /* @__PURE__ */ C("consumerStrategy"), ud = /* @__PURE__ */ C("metrics"), tn = /* @__PURE__ */ C("producersToConsume"), Os = /* @__PURE__ */ C("processConsumerTimeout"), Nu = /* @__PURE__ */ C("processConsumers"), ld = /* @__PURE__ */ C("producerCreationRequest"), cd = /* @__PURE__ */ C("handleProducer"), rp = /* @__PURE__ */ C("consumerCreationRequest"), tp = /* @__PURE__ */ C("handleConsumer"), vO = /* @__PURE__ */ function(o) {
|
|
24878
25041
|
function t(e, r) {
|
|
24879
25042
|
var n;
|
|
24880
|
-
return w(this, t), n = R(this, t, [e, r]), Object.defineProperty(n, tp, { value: kO }), Object.defineProperty(n, rp, { value: yO }), Object.defineProperty(n, cd, { value: mO }), Object.defineProperty(n, ld, { value: gO }), Object.defineProperty(n, Nu, { value: fO }), Object.defineProperty(n, La, { writable: !0, value: void 0 }), Object.defineProperty(n,
|
|
25043
|
+
return w(this, t), n = R(this, t, [e, r]), Object.defineProperty(n, tp, { value: kO }), Object.defineProperty(n, rp, { value: yO }), Object.defineProperty(n, cd, { value: mO }), Object.defineProperty(n, ld, { value: gO }), Object.defineProperty(n, Nu, { value: fO }), Object.defineProperty(n, La, { writable: !0, value: void 0 }), Object.defineProperty(n, Ln, { writable: !0, value: void 0 }), Object.defineProperty(n, bs, { writable: !0, value: void 0 }), Object.defineProperty(n, $u, { writable: !0, value: void 0 }), Object.defineProperty(n, Et, { writable: !0, value: void 0 }), Object.defineProperty(n, ud, { writable: !0, value: { producerCreationFailureCount: 0, consumerCreationFailureCount: 0, producerNotReadyFailureCount: 0 } }), Object.defineProperty(n, tn, { writable: !0, value: [] }), Object.defineProperty(n, Os, { writable: !0, value: void 0 }), n.context = e, n.sendTransportConnectedCallback = /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function a() {
|
|
24881
25044
|
return h().wrap(function(s) {
|
|
24882
25045
|
for (; ; )
|
|
24883
25046
|
switch (s.prev = s.next) {
|
|
@@ -24911,7 +25074,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
24911
25074
|
} }, { key: "producers", get: function() {
|
|
24912
25075
|
return l(this, La)[La];
|
|
24913
25076
|
} }, { key: "consumers", get: function() {
|
|
24914
|
-
return l(this,
|
|
25077
|
+
return l(this, Ln)[Ln];
|
|
24915
25078
|
} }, {
|
|
24916
25079
|
key: "producerIdToConsumerIdMap",
|
|
24917
25080
|
get: function() {
|
|
@@ -24924,7 +25087,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
24924
25087
|
}, { key: "logger", get: function() {
|
|
24925
25088
|
return this.context.getValue("logger");
|
|
24926
25089
|
} }, { key: "reset", value: function() {
|
|
24927
|
-
l(this, La)[La] = /* @__PURE__ */ new Map(), l(this,
|
|
25090
|
+
l(this, La)[La] = /* @__PURE__ */ new Map(), l(this, Ln)[Ln] = /* @__PURE__ */ new Map(), l(this, bs)[bs] = /* @__PURE__ */ new Map();
|
|
24928
25091
|
} }, { key: "createProducer", value: function() {
|
|
24929
25092
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
24930
25093
|
var s, u;
|
|
@@ -25045,7 +25208,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
25045
25208
|
}
|
|
25046
25209
|
return r;
|
|
25047
25210
|
}() }, { key: "closeAllConsumers", value: function() {
|
|
25048
|
-
return this.closeConsumers(Array.from(l(this,
|
|
25211
|
+
return this.closeConsumers(Array.from(l(this, Ln)[Ln].keys()));
|
|
25049
25212
|
} }, { key: "switchConsumersToLayer", value: function() {
|
|
25050
25213
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
25051
25214
|
return h().wrap(function(u) {
|
|
@@ -25187,7 +25350,7 @@ function kO(o) {
|
|
|
25187
25350
|
for (; ; )
|
|
25188
25351
|
switch (i.prev = i.next) {
|
|
25189
25352
|
case 0:
|
|
25190
|
-
t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t,
|
|
25353
|
+
t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t, Ln)[Ln].delete(o.id), t.context.getValue("peerSessionStore").emit(F.CONSUMER_CLOSED, { id: o.id });
|
|
25191
25354
|
case 3:
|
|
25192
25355
|
case "end":
|
|
25193
25356
|
return i.stop();
|
|
@@ -25197,7 +25360,7 @@ function kO(o) {
|
|
|
25197
25360
|
return function(r) {
|
|
25198
25361
|
return e.apply(this, arguments);
|
|
25199
25362
|
};
|
|
25200
|
-
}()), l(this,
|
|
25363
|
+
}()), l(this, Ln)[Ln].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(F.NEW_CONSUMER, { id: o.id, appData: o.appData, peerId: o.peerId });
|
|
25201
25364
|
}
|
|
25202
25365
|
var ku = /* @__PURE__ */ C("zeroCrossingThreshold"), bu = /* @__PURE__ */ C("minVoiceDuration"), Tu = /* @__PURE__ */ C("hangoverFrames"), Ts = /* @__PURE__ */ C("initialEnergyThreshold"), Vs = /* @__PURE__ */ C("noiseAdaptationRate"), Us = /* @__PURE__ */ C("voiceAdaptationRate"), Vu = /* @__PURE__ */ C("minEnergyThreshold"), Uu = /* @__PURE__ */ C("maxEnergyThreshold"), ws = /* @__PURE__ */ C("energyRatioThreshold"), Mr = /* @__PURE__ */ C("currentEnergyThreshold"), dt = /* @__PURE__ */ C("backgroundNoiseEnergy"), ct = /* @__PURE__ */ C("voiceDetected"), Ca = /* @__PURE__ */ C("consecutiveVoiceFrames"), Ra = /* @__PURE__ */ C("hangoverCount"), en = /* @__PURE__ */ C("noiseEnergyHistory"), ju = /* @__PURE__ */ C("noiseHistorySize"), dd = /* @__PURE__ */ C("updateEnergyThreshold"), pd = /* @__PURE__ */ C("updateNoiseEstimate"), ip = /* @__PURE__ */ C("calculateEnergy"), sp = /* @__PURE__ */ C("calculateZeroCrossingRate"), Yp = /* @__PURE__ */ function() {
|
|
25203
25366
|
function o() {
|
|
@@ -25341,9 +25504,9 @@ var wu = /* @__PURE__ */ C("context"), Tv = /* @__PURE__ */ function() {
|
|
|
25341
25504
|
} }, { key: "clearTimeout", value: function(e) {
|
|
25342
25505
|
return navigator && navigator.RNBackgroundTimerImpl ? navigator.RNBackgroundTimerImpl.clearTimeout(e) : global.clearTimeout(e);
|
|
25343
25506
|
} }]);
|
|
25344
|
-
}(), EO = 60, CO = 400, zt = /* @__PURE__ */ C("interval"), Yt = /* @__PURE__ */ C("reportInterval"), pt = /* @__PURE__ */ C("producerId"), Su = /* @__PURE__ */ C("audioTrack"), Fa = /* @__PURE__ */ C("energy"), Ds = /* @__PURE__ */ C("vad"), Zt = /* @__PURE__ */ C("minEnergy"),
|
|
25507
|
+
}(), EO = 60, CO = 400, zt = /* @__PURE__ */ C("interval"), Yt = /* @__PURE__ */ C("reportInterval"), pt = /* @__PURE__ */ C("producerId"), Su = /* @__PURE__ */ C("audioTrack"), Fa = /* @__PURE__ */ C("energy"), Ds = /* @__PURE__ */ C("vad"), Zt = /* @__PURE__ */ C("minEnergy"), _n = /* @__PURE__ */ C("maxEnergy"), Ls = /* @__PURE__ */ C("previousState"), rn = /* @__PURE__ */ C("context"), xt = /* @__PURE__ */ C("audioSampler"), wt = /* @__PURE__ */ C("timer"), hd = /* @__PURE__ */ C("getAudioCharacteristics"), xu = /* @__PURE__ */ C("isSilent"), vd = /* @__PURE__ */ C("report"), op = /* @__PURE__ */ C("logScale"), Mc = /* @__PURE__ */ function() {
|
|
25345
25508
|
function o(t, e) {
|
|
25346
|
-
w(this, o), Object.defineProperty(this, vd, { value: IO }), Object.defineProperty(this, hd, { value: RO }), Object.defineProperty(this, zt, { writable: !0, value: void 0 }), Object.defineProperty(this, Yt, { writable: !0, value: void 0 }), Object.defineProperty(this, pt, { writable: !0, value: void 0 }), Object.defineProperty(this, Su, { writable: !0, value: void 0 }), Object.defineProperty(this, Fa, { writable: !0, value: void 0 }), Object.defineProperty(this, Ds, { writable: !0, value: void 0 }), Object.defineProperty(this, Zt, { writable: !0, value: void 0 }), Object.defineProperty(this,
|
|
25509
|
+
w(this, o), Object.defineProperty(this, vd, { value: IO }), Object.defineProperty(this, hd, { value: RO }), Object.defineProperty(this, zt, { writable: !0, value: void 0 }), Object.defineProperty(this, Yt, { writable: !0, value: void 0 }), Object.defineProperty(this, pt, { writable: !0, value: void 0 }), Object.defineProperty(this, Su, { writable: !0, value: void 0 }), Object.defineProperty(this, Fa, { writable: !0, value: void 0 }), Object.defineProperty(this, Ds, { writable: !0, value: void 0 }), Object.defineProperty(this, Zt, { writable: !0, value: void 0 }), Object.defineProperty(this, _n, { writable: !0, value: void 0 }), Object.defineProperty(this, Ls, { writable: !0, value: void 0 }), Object.defineProperty(this, rn, { writable: !0, value: void 0 }), Object.defineProperty(this, xt, { writable: !0, value: void 0 }), Object.defineProperty(this, wt, { writable: !0, value: void 0 }), this.reportRequest = e, l(this, rn)[rn] = t, l(this, Ds)[Ds] = new Yp();
|
|
25347
25510
|
var r = navigator, n = r.isReactNative;
|
|
25348
25511
|
l(this, xt)[xt] = n ? new Tv(l(this, rn)[rn]) : new wv(l(this, rn)[rn]), l(this, wt)[wt] = n ? SO : Ml;
|
|
25349
25512
|
}
|
|
@@ -25391,12 +25554,12 @@ var wu = /* @__PURE__ */ C("context"), Tv = /* @__PURE__ */ function() {
|
|
|
25391
25554
|
kp = Mc;
|
|
25392
25555
|
function RO() {
|
|
25393
25556
|
var o = l(this, xt)[xt].samples, t = l(this, Ds)[Ds].processAudioChunk(o), e = t.energy, r = t.isVoice, n = l(kp, op)[op](e);
|
|
25394
|
-
if (l(this, rn)[rn].getValue("flagsmith").hasFeature(
|
|
25557
|
+
if (l(this, rn)[rn].getValue("flagsmith").hasFeature(me.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug("AudioActivityReporter: producer: ".concat(l(this, pt)[pt], ", energy: ").concat(l(this, Fa)[Fa], `,
|
|
25395
25558
|
slogScale: `).concat(n, ", isVoice: ").concat(r, ", minEnergy: ").concat(l(this, Zt)[Zt], `,
|
|
25396
|
-
maxEnergy: `).concat(l(this,
|
|
25559
|
+
maxEnergy: `).concat(l(this, _n)[_n])), n === -1 / 0 || e < 1e-6)
|
|
25397
25560
|
return { energy: 0, isVoice: !1 };
|
|
25398
|
-
(!l(this, Zt)[Zt] || n < l(this, Zt)[Zt]) && (l(this, Zt)[Zt] = n), (!l(this,
|
|
25399
|
-
var a = (n - l(this, Zt)[Zt]) / (l(this,
|
|
25561
|
+
(!l(this, Zt)[Zt] || n < l(this, Zt)[Zt]) && (l(this, Zt)[Zt] = n), (!l(this, _n)[_n] || n > l(this, _n)[_n]) && (l(this, _n)[_n] = n);
|
|
25562
|
+
var a = (n - l(this, Zt)[Zt]) / (l(this, _n)[_n] - l(this, Zt)[Zt]) * 10 || 0;
|
|
25400
25563
|
return { energy: a, isVoice: r };
|
|
25401
25564
|
}
|
|
25402
25565
|
function AO(o) {
|
|
@@ -25405,7 +25568,7 @@ function AO(o) {
|
|
|
25405
25568
|
function IO() {
|
|
25406
25569
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : l(this, Fa)[Fa];
|
|
25407
25570
|
if (!l(this, pt)[pt] || !o) {
|
|
25408
|
-
l(this, rn)[rn].getValue("flagsmith").hasFeature(
|
|
25571
|
+
l(this, rn)[rn].getValue("flagsmith").hasFeature(me.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug("AudioActivityReporter: No producerId or energy to report: ".concat(l(this, pt)[pt]));
|
|
25409
25572
|
return;
|
|
25410
25573
|
}
|
|
25411
25574
|
var t = { producerId: l(this, pt)[pt], energy: Math.round(o), silent: l(kp, xu)[xu](o) };
|
|
@@ -25483,10 +25646,10 @@ var _O = function() {
|
|
|
25483
25646
|
for (var a = n > 1 ? void 0 : n ? LO(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
25484
25647
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
25485
25648
|
return n && a && DO(e, r, a), a;
|
|
25486
|
-
}, Qt = ["video/VP9", "video/VP8"], _g = (Co = /* @__PURE__ */ C("roomUUID"), Ro = /* @__PURE__ */ C("peerDisplayName"), Xe = /* @__PURE__ */ C("socketClient"), W = /* @__PURE__ */ C("sfuHandler"), Ci = /* @__PURE__ */ C("rtpCapabilities"), lr = /* @__PURE__ */ C("events"), ua = /* @__PURE__ */ C("roomJoiningInProgress"), la = /* @__PURE__ */ C("onceJoined"), ra = /* @__PURE__ */ C("transportQueue"), fo = /* @__PURE__ */ C("rejoinRoomFn"), Kr = /* @__PURE__ */ C("connectionPromise"), Dt = /* @__PURE__ */ C("screenshareConsumerProducer"), js = /* @__PURE__ */ C("location"), ta = /* @__PURE__ */ C("senderVideoCodecMap"), na = /* @__PURE__ */ C("receiverVideoCodecMap"), hr = /* @__PURE__ */ C("producerTypes"), Pr = /* @__PURE__ */ C("audioActivityReporter"),
|
|
25649
|
+
}, Qt = ["video/VP9", "video/VP8"], _g = (Co = /* @__PURE__ */ C("roomUUID"), Ro = /* @__PURE__ */ C("peerDisplayName"), Xe = /* @__PURE__ */ C("socketClient"), W = /* @__PURE__ */ C("sfuHandler"), Ci = /* @__PURE__ */ C("rtpCapabilities"), lr = /* @__PURE__ */ C("events"), ua = /* @__PURE__ */ C("roomJoiningInProgress"), la = /* @__PURE__ */ C("onceJoined"), ra = /* @__PURE__ */ C("transportQueue"), fo = /* @__PURE__ */ C("rejoinRoomFn"), Kr = /* @__PURE__ */ C("connectionPromise"), Dt = /* @__PURE__ */ C("screenshareConsumerProducer"), js = /* @__PURE__ */ C("location"), ta = /* @__PURE__ */ C("senderVideoCodecMap"), na = /* @__PURE__ */ C("receiverVideoCodecMap"), hr = /* @__PURE__ */ C("producerTypes"), Pr = /* @__PURE__ */ C("audioActivityReporter"), vn = /* @__PURE__ */ C("connectionHandler"), ml = /* @__PURE__ */ C("joinRoom"), Bl = /* @__PURE__ */ C("completeJoinRoom"), ql = /* @__PURE__ */ C("reportRoomJoinedAnalytics"), Ao = /* @__PURE__ */ C("initializeConnection"), Gl = /* @__PURE__ */ C("getLocation"), Wl = /* @__PURE__ */ C("getRtpCapabilities"), Jl = /* @__PURE__ */ C("sendJoinRoomMessage"), Kl = /* @__PURE__ */ C("setupInitialMediaProducers"), We = /* @__PURE__ */ C("getProducer"), aa = /* @__PURE__ */ C("setProducer"), yl = /* @__PURE__ */ C("deleteProducer"), kl = /* @__PURE__ */ C("getMicProducerDefaults"), bl = /* @__PURE__ */ C("getWebcamProducerDefaults"), Uc = /* @__PURE__ */ function() {
|
|
25487
25650
|
function o(t, e) {
|
|
25488
25651
|
var r, n, a = this;
|
|
25489
|
-
w(this, o), Object.defineProperty(this, bl, { value: zO }), Object.defineProperty(this, kl, { value: KO }), Object.defineProperty(this, yl, { value: JO }), Object.defineProperty(this, aa, { value: WO }), Object.defineProperty(this, We, { value: GO }), Object.defineProperty(this, Kl, { value: qO }), Object.defineProperty(this, Jl, { value: BO }), Object.defineProperty(this, Wl, { value: HO }), Object.defineProperty(this, Ao, { value: jO }), Object.defineProperty(this, ql, { value: UO }), Object.defineProperty(this, Bl, { value: VO }), Object.defineProperty(this, ml, { value: NO }), Object.defineProperty(this,
|
|
25652
|
+
w(this, o), Object.defineProperty(this, bl, { value: zO }), Object.defineProperty(this, kl, { value: KO }), Object.defineProperty(this, yl, { value: JO }), Object.defineProperty(this, aa, { value: WO }), Object.defineProperty(this, We, { value: GO }), Object.defineProperty(this, Kl, { value: qO }), Object.defineProperty(this, Jl, { value: BO }), Object.defineProperty(this, Wl, { value: HO }), Object.defineProperty(this, Ao, { value: jO }), Object.defineProperty(this, ql, { value: UO }), Object.defineProperty(this, Bl, { value: VO }), Object.defineProperty(this, ml, { value: NO }), Object.defineProperty(this, vn, { get: $O, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Co, { writable: !0, value: void 0 }), Object.defineProperty(this, Ro, { writable: !0, value: void 0 }), Object.defineProperty(this, Xe, { writable: !0, value: void 0 }), Object.defineProperty(this, W, { writable: !0, value: void 0 }), Object.defineProperty(this, Ci, { writable: !0, value: void 0 }), Object.defineProperty(this, lr, { writable: !0, value: void 0 }), Object.defineProperty(this, ua, { writable: !0, value: void 0 }), Object.defineProperty(this, la, { writable: !0, value: void 0 }), Object.defineProperty(this, ra, { writable: !0, value: void 0 }), Object.defineProperty(this, fo, { writable: !0, value: void 0 }), Object.defineProperty(this, Kr, { writable: !0, value: null }), Object.defineProperty(this, Dt, { writable: !0, value: void 0 }), Object.defineProperty(this, js, { writable: !0, value: void 0 }), Object.defineProperty(this, ta, { writable: !0, value: void 0 }), Object.defineProperty(this, na, { writable: !0, value: void 0 }), Object.defineProperty(this, hr, { writable: !0, value: void 0 }), Object.defineProperty(this, Pr, { writable: !0, value: void 0 }), this.context = t;
|
|
25490
25653
|
var i = e.socket;
|
|
25491
25654
|
this.mediaJoined = !1, l(this, ta)[ta] = /* @__PURE__ */ new Map([["video/VP9", /* @__PURE__ */ new Set()], ["video/VP8", /* @__PURE__ */ new Set()]]), l(this, na)[na] = /* @__PURE__ */ new Map([["video/VP9", /* @__PURE__ */ new Set()], ["video/VP8", /* @__PURE__ */ new Set()]]), l(this, Xe)[Xe] = i, l(this, ua)[ua] = !1, l(this, W)[W] = new vO(t, i), l(this, lr)[lr] = l(this, W)[W].events, l(this, Dt)[Dt] = /* @__PURE__ */ new Set(), l(this, hr)[hr] = /* @__PURE__ */ new Map(), l(this, la)[la] = !1, l(this, ra)[ra] = new Bd(t.getValue("logger")), l(this, Pr)[Pr] = new Mc(this.context, l(this, W)[W].socketHandler.audioActivity.bind(l(this, W)[W].socketHandler)), this.e2ee = (r = (n = t.getValue("modules").e2ee) === null || n === void 0 ? void 0 : n.enabled) !== null && r !== void 0 ? r : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), l(this, fo)[fo] = jp(/* @__PURE__ */ m(/* @__PURE__ */ h().mark(function s() {
|
|
25492
25655
|
var u, c;
|
|
@@ -25494,7 +25657,7 @@ var _O = function() {
|
|
|
25494
25657
|
for (; ; )
|
|
25495
25658
|
switch (p.prev = p.next) {
|
|
25496
25659
|
case 0:
|
|
25497
|
-
if (l(a,
|
|
25660
|
+
if (l(a, vn)[vn].mediaJoinAttempted) {
|
|
25498
25661
|
p.next = 2;
|
|
25499
25662
|
break;
|
|
25500
25663
|
}
|
|
@@ -25531,9 +25694,9 @@ var _O = function() {
|
|
|
25531
25694
|
}, { key: "logger", get: function() {
|
|
25532
25695
|
return this.context.getValue("logger");
|
|
25533
25696
|
} }, { key: "mediaJoined", get: function() {
|
|
25534
|
-
return l(this,
|
|
25697
|
+
return l(this, vn)[vn].mediaJoined;
|
|
25535
25698
|
}, set: function(e) {
|
|
25536
|
-
l(this,
|
|
25699
|
+
l(this, vn)[vn].mediaJoined = e;
|
|
25537
25700
|
} }, { key: "reset", value: function() {
|
|
25538
25701
|
l(this, W)[W].closeAllProducers(), l(this, W)[W].closeAllConsumers(), l(this, hr)[hr].clear(), l(this, Dt)[Dt].clear(), l(this, Kr)[Kr] = null, l(this, ra)[ra].stop(), l(this, W)[W].stopAllTransports(), l(this, W)[W].reset(), l(this, ra)[ra] = new Bd();
|
|
25539
25702
|
} }, { key: "joinRoom", value: function() {
|
|
@@ -25543,7 +25706,7 @@ var _O = function() {
|
|
|
25543
25706
|
for (; ; )
|
|
25544
25707
|
switch (f.prev = f.next) {
|
|
25545
25708
|
case 0:
|
|
25546
|
-
return s = p.length > 2 && p[2] !== void 0 ? p[2] : !1, u = p.length > 3 && p[3] !== void 0 ? p[3] : !1, c = p.length > 4 && p[4] !== void 0 ? p[4] : {}, l(this,
|
|
25709
|
+
return s = p.length > 2 && p[2] !== void 0 ? p[2] : !1, u = p.length > 3 && p[3] !== void 0 ? p[3] : !1, c = p.length > 4 && p[4] !== void 0 ? p[4] : {}, l(this, vn)[vn].mediaJoinAttempted = !0, l(this, ua)[ua] = !0, s && this.reset(), f.prev = 6, f.next = 9, l(this, ra)[ra].push(function() {
|
|
25547
25710
|
return l(i, ml)[ml](n, a, u, c);
|
|
25548
25711
|
}, "joinRoom");
|
|
25549
25712
|
case 9:
|
|
@@ -25618,7 +25781,7 @@ var _O = function() {
|
|
|
25618
25781
|
for (; ; )
|
|
25619
25782
|
switch (u.prev = u.next) {
|
|
25620
25783
|
case 0:
|
|
25621
|
-
l(this, W)[W].stopAllTransports(), l(this, la)[la] = !1, l(this,
|
|
25784
|
+
l(this, W)[W].stopAllTransports(), l(this, la)[la] = !1, l(this, vn)[vn].mediaJoinAttempted = !1, a = { closeRoom: !1 }, l(this, Xe)[Xe].sendMessagePromise(l(this, lr)[lr].leaveRoom, bS.toBinary(a)).then(function(c) {
|
|
25622
25785
|
var d;
|
|
25623
25786
|
(d = uE.fromBinary(c.payload)) !== null && d !== void 0 && d.closed && n.logger.warn("Weird state on peer closed and should not happen");
|
|
25624
25787
|
}).catch(function(c) {
|
|
@@ -25734,7 +25897,7 @@ var _O = function() {
|
|
|
25734
25897
|
case 17:
|
|
25735
25898
|
return v = [a].concat(Qt.filter(function(D) {
|
|
25736
25899
|
return D !== a;
|
|
25737
|
-
})), f = l(this, bl)[bl](n, v), g = No(this.context, "disableSimulcast"), k = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, y = g || k && k.disable, !y && this.context.getValue("flagsmith").hasFeature(
|
|
25900
|
+
})), f = l(this, bl)[bl](n, v), g = No(this.context, "disableSimulcast"), k = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, y = g || k && k.disable, !y && this.context.getValue("flagsmith").hasFeature(me.ENABLE_CF_SIMULCAST) ? (this.logger.info("Simulcast enabled for SFU: CF"), f.encodings = fM(this.context, n)) : this.logger.info("Simulcast disabled for webcam producer, SFU: CF"), this.context.getValue("flagsmith").hasFeature(me.TRACK_HINT) && (f.track.contentHint = this.context.getValue("flagsmith").getValue(me.TRACK_HINT)), b = function() {
|
|
25738
25901
|
s.logger.info("Disabling video due to the producer closure"), l(s, hr)[hr].delete(u);
|
|
25739
25902
|
}, E = l(this, W)[W].createProducer(f, b), l(this, aa)[aa](u, E.then(function(D) {
|
|
25740
25903
|
return D.id;
|
|
@@ -25764,7 +25927,7 @@ var _O = function() {
|
|
|
25764
25927
|
}
|
|
25765
25928
|
return d.abrupt("return", null);
|
|
25766
25929
|
case 2:
|
|
25767
|
-
if (s = (a = this.context.getValue("flagsmith").getValue(
|
|
25930
|
+
if (s = (a = this.context.getValue("flagsmith").getValue(me.FORCE_VIDEO_CODEC)) === null || a === void 0 ? void 0 : a.toString(), !s) {
|
|
25768
25931
|
d.next = 6;
|
|
25769
25932
|
break;
|
|
25770
25933
|
}
|
|
@@ -25837,7 +26000,7 @@ var _O = function() {
|
|
|
25837
26000
|
f.next = 3;
|
|
25838
26001
|
break;
|
|
25839
26002
|
}
|
|
25840
|
-
throw new
|
|
26003
|
+
throw new yn("track undefined");
|
|
25841
26004
|
case 3:
|
|
25842
26005
|
if (i = l(this, We)[We](dr.MIC), !i) {
|
|
25843
26006
|
f.next = 22;
|
|
@@ -26466,7 +26629,7 @@ var _O = function() {
|
|
|
26466
26629
|
;
|
|
26467
26630
|
} }, { key: "handlePeerLeaving", value: function(e) {
|
|
26468
26631
|
var r = this;
|
|
26469
|
-
this.context.getValue("flagsmith").hasFeature(
|
|
26632
|
+
this.context.getValue("flagsmith").hasFeature(me.FORCE_VIDEO_CODEC) || (l(this, ta)[ta].forEach(function(n) {
|
|
26470
26633
|
return n.delete(e);
|
|
26471
26634
|
}), l(this, na)[na].forEach(function(n, a) {
|
|
26472
26635
|
n.delete(e), !(n.size !== 0 || a === Qt[0]) && r.disableWebcam(a);
|
|
@@ -26579,7 +26742,7 @@ function FO() {
|
|
|
26579
26742
|
}
|
|
26580
26743
|
}
|
|
26581
26744
|
function HO() {
|
|
26582
|
-
var o, t = (o = this.context.getValue("flagsmith").getValue(
|
|
26745
|
+
var o, t = (o = this.context.getValue("flagsmith").getValue(me.FORCE_VIDEO_CODEC)) === null || o === void 0 ? void 0 : o.toString(), e = N_(t);
|
|
26583
26746
|
return l(this, Ci)[Ci] = e, e;
|
|
26584
26747
|
}
|
|
26585
26748
|
function BO(o, t, e, r) {
|
|
@@ -26637,7 +26800,7 @@ function pp() {
|
|
|
26637
26800
|
for (; ; )
|
|
26638
26801
|
switch (i.prev = i.next) {
|
|
26639
26802
|
case 0:
|
|
26640
|
-
if (e = this.context.getValue("flagsmith").hasFeature(
|
|
26803
|
+
if (e = this.context.getValue("flagsmith").hasFeature(me.PRECREATE_PRODUCERS), !(!e || !t)) {
|
|
26641
26804
|
i.next = 3;
|
|
26642
26805
|
break;
|
|
26643
26806
|
}
|
|
@@ -26780,7 +26943,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
26780
26943
|
}
|
|
26781
26944
|
return k.prev = 12, k.next = 15, l(this, cr)[cr].shareWebcam(i);
|
|
26782
26945
|
case 15:
|
|
26783
|
-
if (v = k.sent, !(v && v.id !== i.id && l(this, Z)[Z].getValue("flagsmith").hasFeature(
|
|
26946
|
+
if (v = k.sent, !(v && v.id !== i.id && l(this, Z)[Z].getValue("flagsmith").hasFeature(me.EXP_RESHARE))) {
|
|
26784
26947
|
k.next = 19;
|
|
26785
26948
|
break;
|
|
26786
26949
|
}
|
|
@@ -26902,7 +27065,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
26902
27065
|
var n = r.joinAttempted;
|
|
26903
27066
|
if (e.self.roomState !== "disconnected") {
|
|
26904
27067
|
var a = e.peerId;
|
|
26905
|
-
n && l(e, Z)[Z].getValue("flagsmith").hasFeature(
|
|
27068
|
+
n && l(e, Z)[Z].getValue("flagsmith").hasFeature(me.REFRESH_ID_ON_DISCONNECTION) && (a = Ks()), l(e, ia)[ia].updateURL(a);
|
|
26906
27069
|
var i = l(e, Z)[Z].getValue("telemetry");
|
|
26907
27070
|
i.resetPeerId(a);
|
|
26908
27071
|
var s = ht();
|
|
@@ -27165,7 +27328,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27165
27328
|
case 0:
|
|
27166
27329
|
return c = ht(), d = n.getValue("peerId"), p = !!n.getValue("cachedUserDetails"), y.next = 5, it.__init__(n, i, s, u, u.name, p);
|
|
27167
27330
|
case 5:
|
|
27168
|
-
return v = y.sent, n.setValue("self", v), f = n.getValue("logger"), navigator.product !== "ReactNative" ? (g = !n.getValue("flagsmith").hasFeature(
|
|
27331
|
+
return v = y.sent, n.setValue("self", v), f = n.getValue("logger"), navigator.product !== "ReactNative" ? (g = !n.getValue("flagsmith").hasFeature(me.PRECALL_BANDWIDTH_TEST), setTimeout(/* @__PURE__ */ m(/* @__PURE__ */ h().mark(function b() {
|
|
27169
27332
|
var E;
|
|
27170
27333
|
return h().wrap(function(S) {
|
|
27171
27334
|
for (; ; )
|
|
@@ -27768,32 +27931,32 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
|
|
|
27768
27931
|
a = nv.fromBinary.bind(nv);
|
|
27769
27932
|
break;
|
|
27770
27933
|
}
|
|
27771
|
-
case
|
|
27934
|
+
case Nn.peerJoinedBroadcast:
|
|
27772
27935
|
case Ri.peerJoinedBroadcast: {
|
|
27773
27936
|
a = Jh.fromBinary.bind(Jh);
|
|
27774
27937
|
break;
|
|
27775
27938
|
}
|
|
27776
|
-
case
|
|
27939
|
+
case Nn.selfJoinComplete:
|
|
27777
27940
|
case Ri.selfJoinComplete: {
|
|
27778
27941
|
a = Cd.fromBinary.bind(Cd);
|
|
27779
27942
|
break;
|
|
27780
27943
|
}
|
|
27781
|
-
case
|
|
27944
|
+
case Nn.globalPeerPinBroadcast:
|
|
27782
27945
|
case Ri.globalPeerPinBroadcast: {
|
|
27783
27946
|
a = Yh.fromBinary.bind(Yh);
|
|
27784
27947
|
break;
|
|
27785
27948
|
}
|
|
27786
|
-
case
|
|
27949
|
+
case Nn.selectedPeer:
|
|
27787
27950
|
case Ri.selectedPeer: {
|
|
27788
27951
|
a = Ed.fromBinary.bind(Ed);
|
|
27789
27952
|
break;
|
|
27790
27953
|
}
|
|
27791
|
-
case
|
|
27954
|
+
case Nn.selectedPeerDiff:
|
|
27792
27955
|
case Ri.selectedPeerDiff: {
|
|
27793
27956
|
a = Wh.fromBinary.bind(Wh);
|
|
27794
27957
|
break;
|
|
27795
27958
|
}
|
|
27796
|
-
case
|
|
27959
|
+
case Nn.leaveRoom:
|
|
27797
27960
|
case Ri.leaveRoom: {
|
|
27798
27961
|
a = Rd.fromBinary.bind(Rd);
|
|
27799
27962
|
break;
|
|
@@ -28409,12 +28572,12 @@ var yi = { debug: 0, info: 1, warn: 2, error: 3 }, Cs, Rs, bD = /* @__PURE__ */
|
|
|
28409
28572
|
Cs = /* @__PURE__ */ new WeakMap(), Rs = /* @__PURE__ */ new WeakMap();
|
|
28410
28573
|
var Wg = /* @__PURE__ */ function(o) {
|
|
28411
28574
|
return o[o.CONNECTING = 0] = "CONNECTING", o[o.OPEN = 1] = "OPEN", o[o.CLOSING = 2] = "CLOSING", o[o.CLOSED = 3] = "CLOSED", o;
|
|
28412
|
-
}(Wg || {}), TD = "2", wD = "3", $r, wo, Sr, Br, Ti, nt, Ha, Ii,
|
|
28575
|
+
}(Wg || {}), TD = "2", wD = "3", $r, wo, Sr, Br, Ti, nt, Ha, Ii, $n, Po, $a, hp, Jg, _u, Ul, vp, Kg, fp, Cv, sc, gp, mp, zg, Fu, jl, Hu, oc, uc, yp, Oo, Bu, qu, lc, PD = /* @__PURE__ */ function() {
|
|
28413
28576
|
function o(t, e) {
|
|
28414
28577
|
var r, n, a, i, s, u, c, d, p, v;
|
|
28415
|
-
w(this, o), yr(this, hp), yr(this, _u), yr(this, vp), yr(this, fp), yr(this, sc), yr(this, mp), yr(this, Fu), yr(this, Hu), yr(this, uc), yr(this, Oo), yr(this, qu), yr(this, $r, void 0), yr(this, wo, void 0), yr(this, Sr, void 0), yr(this, Br, void 0), yr(this, Ti, void 0), yr(this, nt, void 0), yr(this, Ha, void 0), yr(this, Ii, void 0), yr(this,
|
|
28578
|
+
w(this, o), yr(this, hp), yr(this, _u), yr(this, vp), yr(this, fp), yr(this, sc), yr(this, mp), yr(this, Fu), yr(this, Hu), yr(this, uc), yr(this, Oo), yr(this, qu), yr(this, $r, void 0), yr(this, wo, void 0), yr(this, Sr, void 0), yr(this, Br, void 0), yr(this, Ti, void 0), yr(this, nt, void 0), yr(this, Ha, void 0), yr(this, Ii, void 0), yr(this, $n, void 0), yr(this, Po, void 0), yr(this, $a, void 0);
|
|
28416
28579
|
var f, g, k, y, b, E, T, S, D;
|
|
28417
|
-
ze(this, wo, t), ze(this, Ti, []), ze(this, nt, new ic()), ze(this, Ha, !0), ze(this,
|
|
28580
|
+
ze(this, wo, t), ze(this, Ti, []), ze(this, nt, new ic()), ze(this, Ha, !0), ze(this, $n, !1), ze(this, Sr, e != null ? e : {}), (r = (f = J(this, Sr)).autoReconnect) !== null && r !== void 0 || (f.autoReconnect = !0), (n = (g = J(this, Sr)).retryConnectionInterval) !== null && n !== void 0 || (g.retryConnectionInterval = 1e3), (a = (k = J(this, Sr)).pingTimeout) !== null && a !== void 0 || (k.pingTimeout = 3e4), (i = (y = J(this, Sr)).connectionTimeout) !== null && i !== void 0 || (y.connectionTimeout = 5e3), (s = (b = J(this, Sr)).debug) !== null && s !== void 0 || (b.debug = !0), (u = (E = J(this, Sr)).maxReconnectionAttempts) !== null && u !== void 0 || (E.maxReconnectionAttempts = 10), (c = (T = J(this, Sr)).disconnectOnPingTimeout) !== null && c !== void 0 || (T.disconnectOnPingTimeout = !0), (d = (S = J(this, Sr)).queueOnDisconnect) !== null && d !== void 0 || (S.queueOnDisconnect = !1), (p = (D = J(this, Sr)).flushOnReconnect) !== null && p !== void 0 || (D.flushOnReconnect = !1), ze(this, Ii, { code: void 0, reason: void 0 }), ze(this, Br, (v = J(this, Sr).logger) !== null && v !== void 0 ? v : new bD(J(this, Sr).debug ? "debug" : "info")), ze(this, $a, new kD());
|
|
28418
28581
|
}
|
|
28419
28582
|
return P(o, [{
|
|
28420
28583
|
key: "readyState",
|
|
@@ -28495,7 +28658,7 @@ var Wg = /* @__PURE__ */ function(o) {
|
|
|
28495
28658
|
try {
|
|
28496
28659
|
ze(n, $r, new WebSocket(Er(n, hp, Jg).call(n, J(n, wo)))), J(n, $r).binaryType = "arraybuffer", J(n, Br).debug("Connecting");
|
|
28497
28660
|
var p = setTimeout(function() {
|
|
28498
|
-
J(n, Br).debug("Connection timeout. Closing socket"), ze(n, Ha, !0), Er(n, qu, lc).call(n), J(n, $r).close(3001, "Connection Timeout"), J(n, Sr).autoReconnect && !J(n,
|
|
28661
|
+
J(n, Br).debug("Connection timeout. Closing socket"), ze(n, Ha, !0), Er(n, qu, lc).call(n), J(n, $r).close(3001, "Connection Timeout"), J(n, Sr).autoReconnect && !J(n, $n) && (J(n, nt).emit(
|
|
28499
28662
|
"reconnecting"
|
|
28500
28663
|
/* reconnecting */
|
|
28501
28664
|
), Er(n, Fu, jl).call(n)), d(new Error("Connection timed out!"));
|
|
@@ -28509,7 +28672,7 @@ var Wg = /* @__PURE__ */ function(o) {
|
|
|
28509
28672
|
try {
|
|
28510
28673
|
p && clearTimeout(p);
|
|
28511
28674
|
var f = v.code, g = v.reason;
|
|
28512
|
-
d(g), J(n, Br).debug("Socket closed. Close event:", { event: v }), J(n, Br).debug("Connection closed code: ".concat(f)), J(n, Br).debug("Connection closed reason: ".concat(g)), J(n,
|
|
28675
|
+
d(g), J(n, Br).debug("Socket closed. Close event:", { event: v }), J(n, Br).debug("Connection closed code: ".concat(f)), J(n, Br).debug("Connection closed reason: ".concat(g)), J(n, $n) || Er(n, sc, gp).call(n, f, g);
|
|
28513
28676
|
} catch (k) {
|
|
28514
28677
|
Er(n, _u, Ul).call(n, k);
|
|
28515
28678
|
}
|
|
@@ -28632,7 +28795,7 @@ var Wg = /* @__PURE__ */ function(o) {
|
|
|
28632
28795
|
ze(this, Ha, !1), Er(this, Oo, Bu).call(this), this.removeAllListeners(), ze(this, Ii, { code: 1e3, reason: "Sockrates disconnect method called" }), J(this, $r).close(1e3, "Sockrates disconnect method called.");
|
|
28633
28796
|
} }]);
|
|
28634
28797
|
}();
|
|
28635
|
-
$r = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Ha = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(),
|
|
28798
|
+
$r = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Ha = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), $a = /* @__PURE__ */ new WeakMap(), hp = /* @__PURE__ */ new WeakSet(), Jg = function(t) {
|
|
28636
28799
|
if (t.startsWith("ws://") || t.startsWith("wss://"))
|
|
28637
28800
|
return t;
|
|
28638
28801
|
if (t.startsWith("https://"))
|
|
@@ -28655,7 +28818,7 @@ $r = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), Sr = /*
|
|
|
28655
28818
|
ze(this, Ii, { reason: e, code: t }), J(this, nt).emit("disconnected", { code: t, reason: e });
|
|
28656
28819
|
}, mp = /* @__PURE__ */ new WeakSet(), zg = function() {
|
|
28657
28820
|
var t = J(this, Ii), e = t.reason, r = t.code;
|
|
28658
|
-
r && r !== 1e3 && J(this, Ha) && J(this, Sr).autoReconnect && !J(this,
|
|
28821
|
+
r && r !== 1e3 && J(this, Ha) && J(this, Sr).autoReconnect && !J(this, $n) && (J(this, Br).debug("Triggering reconnection due to ".concat(e, ".")), J(this, nt).emit(
|
|
28659
28822
|
"reconnecting"
|
|
28660
28823
|
/* reconnecting */
|
|
28661
28824
|
), Er(this, Fu, jl).call(this));
|
|
@@ -28666,22 +28829,22 @@ $r = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), Sr = /*
|
|
|
28666
28829
|
for (; ; )
|
|
28667
28830
|
switch (a.prev = a.next) {
|
|
28668
28831
|
case 0:
|
|
28669
|
-
if (e = r.length > 0 && r[0] !== void 0 ? r[0] : !0, !(e && J(this,
|
|
28832
|
+
if (e = r.length > 0 && r[0] !== void 0 ? r[0] : !0, !(e && J(this, $n))) {
|
|
28670
28833
|
a.next = 4;
|
|
28671
28834
|
break;
|
|
28672
28835
|
}
|
|
28673
28836
|
return J(this, Br).debug("Reconnect called when already in a reconnect loop. Ignoring."), a.abrupt("return");
|
|
28674
28837
|
case 4:
|
|
28675
|
-
if (J(this,
|
|
28838
|
+
if (J(this, $n) || J(this, $a).reset(), !(J(this, Sr).maxReconnectionAttempts !== null && J(this, $a).getAttempts() >= J(this, Sr).maxReconnectionAttempts)) {
|
|
28676
28839
|
a.next = 7;
|
|
28677
28840
|
break;
|
|
28678
28841
|
}
|
|
28679
28842
|
return J(this, nt).emit(
|
|
28680
28843
|
"failed"
|
|
28681
28844
|
/* failed */
|
|
28682
|
-
), ze(this,
|
|
28845
|
+
), ze(this, $n, !1), a.abrupt("return");
|
|
28683
28846
|
case 7:
|
|
28684
|
-
return ze(this,
|
|
28847
|
+
return ze(this, $n, !0), Er(this, qu, lc).call(this), Er(this, Oo, Bu).call(this), a.prev = 8, a.next = 11, J(this, $a).wait();
|
|
28685
28848
|
case 11:
|
|
28686
28849
|
if (J(this, Ha) !== !1) {
|
|
28687
28850
|
a.next = 13;
|
|
@@ -28697,7 +28860,7 @@ $r = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), Sr = /*
|
|
|
28697
28860
|
}
|
|
28698
28861
|
throw Error("Reconnect Failed");
|
|
28699
28862
|
case 19:
|
|
28700
|
-
ze(this,
|
|
28863
|
+
ze(this, $n, !1), ze(this, Ii, { code: void 0, reason: void 0 }), J(this, nt).emit(
|
|
28701
28864
|
"reconnected"
|
|
28702
28865
|
/* reconnected */
|
|
28703
28866
|
), a.next = 25;
|
|
@@ -28736,12 +28899,12 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
28736
28899
|
for (var a = n > 1 ? void 0 : n ? ED(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
28737
28900
|
(s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
|
|
28738
28901
|
return n && a && SD(e, r, a), a;
|
|
28739
|
-
}, Rv = 65535, CD = 3e3, Yg = (
|
|
28902
|
+
}, Rv = 65535, CD = 3e3, Yg = (fn = /* @__PURE__ */ C("url"), be = /* @__PURE__ */ C("sockrates"), Te = /* @__PURE__ */ C("connectionHandler"), Jr = /* @__PURE__ */ C("socketDisconnectionTimeout"), Je = /* @__PURE__ */ C("context"), go = /* @__PURE__ */ C("getSocketURL"), mo = /* @__PURE__ */ C("generateId"), /* @__PURE__ */ function() {
|
|
28740
28903
|
function o(t, e) {
|
|
28741
28904
|
var r, n = e.peerId, a = e.meetingId, i = e.authToken, s = e.capabilities;
|
|
28742
|
-
if (w(this, o), Object.defineProperty(this, mo, { value: ID }), Object.defineProperty(this, go, { value: AD }), Object.defineProperty(this, Te, { get: RD, set: void 0 }), Object.defineProperty(this,
|
|
28905
|
+
if (w(this, o), Object.defineProperty(this, mo, { value: ID }), Object.defineProperty(this, go, { value: AD }), Object.defineProperty(this, Te, { get: RD, set: void 0 }), Object.defineProperty(this, fn, { writable: !0, value: void 0 }), Object.defineProperty(this, be, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, Jr, { writable: !0, value: void 0 }), Object.defineProperty(this, Je, { writable: !0, value: void 0 }), !n || !a || !i)
|
|
28743
28906
|
throw new j("peerId, meetingId, or authToken can not be empty", "0404");
|
|
28744
|
-
l(this, Jr)[Jr] = void 0, l(this, Je)[Je] = t, this.capabilities = s, this.roomName = a, this.authToken = i, l(this,
|
|
28907
|
+
l(this, Jr)[Jr] = void 0, l(this, Je)[Je] = t, this.capabilities = s, this.roomName = a, this.authToken = i, l(this, fn)[fn] = l(this, go)[go](n), l(this, be)[be] = new PD(l(this, fn)[fn], { autoReconnect: !0, disconnectOnPingTimeout: (r = s.includes("PING")) !== null && r !== void 0 ? r : !1, queueOnDisconnect: !0, flushOnReconnect: !1, logger: this.logger }), this.handleSocketConnectionEvents();
|
|
28745
28908
|
}
|
|
28746
28909
|
return P(o, [{ key: "joinAttempted", get: function() {
|
|
28747
28910
|
return l(this, Te)[Te].socketJoinAttempted;
|
|
@@ -28767,9 +28930,9 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
28767
28930
|
} }, { key: "peerId", get: function() {
|
|
28768
28931
|
return l(this, Je)[Je].getValue("peerId");
|
|
28769
28932
|
} }, { key: "updateURL", value: function(e) {
|
|
28770
|
-
e !== this.peerId && (l(this,
|
|
28933
|
+
e !== this.peerId && (l(this, fn)[fn] = l(this, go)[go](e), this.logger.debug("SocketService:: Connection URL updated.")), l(this, be)[be].updateURL(l(this, fn)[fn]);
|
|
28771
28934
|
} }, { key: "url", get: function() {
|
|
28772
|
-
return l(this,
|
|
28935
|
+
return l(this, fn)[fn];
|
|
28773
28936
|
} }, { key: "connect", value: function() {
|
|
28774
28937
|
var t = m(/* @__PURE__ */ h().mark(function r() {
|
|
28775
28938
|
return h().wrap(function(a) {
|
|
@@ -28807,7 +28970,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
28807
28970
|
var r = this, n = e.event, a = e.timeout, i = e.protobuf, s = e.messageId, u = e.resp, c = u != null ? u : n;
|
|
28808
28971
|
return new Promise(function(d, p) {
|
|
28809
28972
|
var v = function(T, S) {
|
|
28810
|
-
l(r, be)[be].removeListener(c, T), l(r, be)[be].removeListener(Rv, S), l(r, be)[be].removeListener(Ri.errorResponse, S), l(r, be)[be].removeListener(
|
|
28973
|
+
l(r, be)[be].removeListener(c, T), l(r, be)[be].removeListener(Rv, S), l(r, be)[be].removeListener(Ri.errorResponse, S), l(r, be)[be].removeListener(Nn.errorResponse, S);
|
|
28811
28974
|
}, f = s != null ? s : l(r, mo)[mo](), g = {}, k = l(r, Je)[Je].getValue("telemetry");
|
|
28812
28975
|
k.injectContext(g);
|
|
28813
28976
|
var y = function(T) {
|
|
@@ -28832,7 +28995,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
28832
28995
|
var S = T.id, D = T.payload;
|
|
28833
28996
|
f === S && (d({ id: S, payload: D }), v(b, y));
|
|
28834
28997
|
};
|
|
28835
|
-
l(r, be)[be].on(c, b), l(r, be)[be].on(Rv, y), l(r, be)[be].on(Ri.errorResponse, y), l(r, be)[be].on(
|
|
28998
|
+
l(r, be)[be].on(c, b), l(r, be)[be].on(Rv, y), l(r, be)[be].on(Ri.errorResponse, y), l(r, be)[be].on(Nn.errorResponse, y), setTimeout(function() {
|
|
28836
28999
|
v(b, y), p(new Error("request timeout for callback eventId:".concat(n)));
|
|
28837
29000
|
}, a), l(r, be)[be].send(n, f, i, new TextEncoder().encode(JSON.stringify(g)));
|
|
28838
29001
|
});
|
|
@@ -29142,6 +29305,7 @@ var MD = /* @__PURE__ */ function() {
|
|
|
29142
29305
|
}()
|
|
29143
29306
|
/**
|
|
29144
29307
|
* create connected meetings
|
|
29308
|
+
* @param {Array.<{ title: string }>} request
|
|
29145
29309
|
*/
|
|
29146
29310
|
}, { key: "createMeetings", value: function() {
|
|
29147
29311
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -29510,7 +29674,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
|
|
|
29510
29674
|
for (; ; )
|
|
29511
29675
|
switch (Re.prev = Re.next) {
|
|
29512
29676
|
case 0:
|
|
29513
|
-
return g = a.getValue("modules"), k = i.participant, y = a.getValue("defaults"), b = a.getValue("logger"), E = c.viewType, T = c.mediaConstraints.audio, a.setValue("viewType", E), a.setValue("defaults", N({ mediaConfiguration: { audio: { enableHighBitrate: (p = T.enableHighBitrate) !== null && p !== void 0 ? p : !1, enableStereo: (v = T.enableStereo) !== null && v !== void 0 ? v : !1 } } }, y)), a.setValue("maxPreferredStreams", br.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), Y = new xO(a, n), q = new MD(n), a.setValue("connectedMeetingsSocketHandler", q), B = new _c(a, n), x = new
|
|
29677
|
+
return g = a.getValue("modules"), k = i.participant, y = a.getValue("defaults"), b = a.getValue("logger"), E = c.viewType, T = c.mediaConstraints.audio, a.setValue("viewType", E), a.setValue("defaults", N({ mediaConfiguration: { audio: { enableHighBitrate: (p = T.enableHighBitrate) !== null && p !== void 0 ? p : !1, enableStereo: (v = T.enableStereo) !== null && v !== void 0 ? v : !1 } } }, y)), a.setValue("maxPreferredStreams", br.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), Y = new xO(a, n), q = new MD(n), a.setValue("connectedMeetingsSocketHandler", q), B = new _c(a, n), x = new Tn(a, n), we = new iD(n), ie = new $g(a, n), Le = new sD(a, n), Tr = new ZO(n), X = new Ys(a, n), Re.next = 20, Li.init(a, ie, k, d, c);
|
|
29514
29678
|
case 20:
|
|
29515
29679
|
return _r = Re.sent, a.setValue("selfController", _r), Re.next = 24, gg.init(a, _r.self, ie, Y, u);
|
|
29516
29680
|
case 24:
|
|
@@ -29518,7 +29682,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
|
|
|
29518
29682
|
Re.next = 31;
|
|
29519
29683
|
break;
|
|
29520
29684
|
}
|
|
29521
|
-
return Re.next = 30,
|
|
29685
|
+
return Re.next = 30, Vn.init(a, x, X, _r.self, L.participants);
|
|
29522
29686
|
case 30:
|
|
29523
29687
|
D = Re.sent;
|
|
29524
29688
|
case 31:
|
|
@@ -29530,7 +29694,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
|
|
|
29530
29694
|
case 34:
|
|
29531
29695
|
V = Re.sent;
|
|
29532
29696
|
case 35:
|
|
29533
|
-
if (g.livestream && c.viewType === Lt.Livestream && a.getValue("flagsmith").hasFeature(
|
|
29697
|
+
if (g.livestream && c.viewType === Lt.Livestream && a.getValue("flagsmith").hasFeature(me.LIVESTREAM) && ($ = new Eg(a, _r.self, Tr)), c.viewType === Lt.Chat) {
|
|
29534
29698
|
Re.next = 61;
|
|
29535
29699
|
break;
|
|
29536
29700
|
}
|
|
@@ -29656,9 +29820,9 @@ function jD(o, t) {
|
|
|
29656
29820
|
throw new j("Invalid auth token", "0004");
|
|
29657
29821
|
}
|
|
29658
29822
|
}
|
|
29659
|
-
var
|
|
29823
|
+
var Mn = /* @__PURE__ */ C("audioEl"), Aa = /* @__PURE__ */ C("stream"), Ia = /* @__PURE__ */ C("tracks"), Gu = /* @__PURE__ */ C("onError"), fd = /* @__PURE__ */ C("runErrorCallbacks"), FD = /* @__PURE__ */ function() {
|
|
29660
29824
|
function o() {
|
|
29661
|
-
w(this, o), Object.defineProperty(this, fd, { value: HD }), Object.defineProperty(this,
|
|
29825
|
+
w(this, o), Object.defineProperty(this, fd, { value: HD }), Object.defineProperty(this, Mn, { writable: !0, value: new Audio() }), Object.defineProperty(this, Aa, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Ia, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Gu, { writable: !0, value: void 0 }), l(this, Mn)[Mn].srcObject = l(this, Aa)[Aa], l(this, Mn)[Mn].autoplay = !0;
|
|
29662
29826
|
}
|
|
29663
29827
|
return P(o, [{ key: "playTracks", value: function() {
|
|
29664
29828
|
var t = m(/* @__PURE__ */ h().mark(function r(n) {
|
|
@@ -29681,7 +29845,7 @@ var _n = /* @__PURE__ */ C("audioEl"), Aa = /* @__PURE__ */ C("stream"), Ia = /*
|
|
|
29681
29845
|
}
|
|
29682
29846
|
return e;
|
|
29683
29847
|
}() }, { key: "setSpeakerDevice", value: function(e) {
|
|
29684
|
-
typeof HTMLAudioElement.prototype.setSinkId == "function" && l(this,
|
|
29848
|
+
typeof HTMLAudioElement.prototype.setSinkId == "function" && l(this, Mn)[Mn].setSinkId(e);
|
|
29685
29849
|
} }, { key: "removeTrack", value: function(e) {
|
|
29686
29850
|
var r = l(this, Ia)[Ia].get(e);
|
|
29687
29851
|
r && (l(this, Aa)[Aa].removeTrack(r), l(this, Ia)[Ia].delete(e));
|
|
@@ -29692,7 +29856,7 @@ var _n = /* @__PURE__ */ C("audioEl"), Aa = /* @__PURE__ */ C("stream"), Ia = /*
|
|
|
29692
29856
|
for (; ; )
|
|
29693
29857
|
switch (i.prev = i.next) {
|
|
29694
29858
|
case 0:
|
|
29695
|
-
return l(this,
|
|
29859
|
+
return l(this, Mn)[Mn].srcObject = l(this, Aa)[Aa], i.abrupt("return", l(this, Mn)[Mn].play().catch(function(s) {
|
|
29696
29860
|
l(n, fd)[fd](s);
|
|
29697
29861
|
}));
|
|
29698
29862
|
case 2:
|
|
@@ -29732,59 +29896,68 @@ var Ma = /* @__PURE__ */ C("trackMap"), BD = /* @__PURE__ */ function(o) {
|
|
|
29732
29896
|
function o(t, e) {
|
|
29733
29897
|
w(this, o), Object.defineProperty(this, Ue, { writable: !0, value: void 0 }), Object.defineProperty(this, sa, { writable: !0, value: void 0 }), l(this, sa)[sa] = t, l(this, Ue)[Ue] = e;
|
|
29734
29898
|
}
|
|
29735
|
-
return P(o, [{
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29739
|
-
var n;
|
|
29740
|
-
return h().wrap(function(i) {
|
|
29741
|
-
for (; ; )
|
|
29742
|
-
switch (i.prev = i.next) {
|
|
29743
|
-
case 0:
|
|
29744
|
-
if (n = l(this, Ue)[Ue].selfController, !n.self.roomJoined) {
|
|
29745
|
-
i.next = 3;
|
|
29746
|
-
break;
|
|
29747
|
-
}
|
|
29748
|
-
return i.abrupt("return", null);
|
|
29749
|
-
case 3:
|
|
29750
|
-
return i.abrupt("return", n.joinRoom());
|
|
29751
|
-
case 4:
|
|
29752
|
-
case "end":
|
|
29753
|
-
return i.stop();
|
|
29754
|
-
}
|
|
29755
|
-
}, r, this);
|
|
29756
|
-
}));
|
|
29757
|
-
function e() {
|
|
29758
|
-
return t.apply(this, arguments);
|
|
29899
|
+
return P(o, [{
|
|
29900
|
+
key: "peerId",
|
|
29901
|
+
get: function() {
|
|
29902
|
+
return l(this, sa)[sa].getValue("peerId");
|
|
29759
29903
|
}
|
|
29760
|
-
|
|
29761
|
-
|
|
29762
|
-
|
|
29904
|
+
/**
|
|
29905
|
+
* @param {Object} [options]
|
|
29906
|
+
* @param {boolean} [options.video]
|
|
29907
|
+
* @param {boolean} [options.audio]
|
|
29908
|
+
* @param {MediaConstraints} [options.constraints]
|
|
29909
|
+
* @param {boolean} [skipAwaits=false]
|
|
29910
|
+
* @param {CachedUserDetails} [cachedUserDetails]
|
|
29911
|
+
*/
|
|
29912
|
+
}, {
|
|
29913
|
+
key: "join",
|
|
29763
29914
|
value: function() {
|
|
29764
|
-
var t = m(/* @__PURE__ */ h().mark(function r(
|
|
29765
|
-
var
|
|
29766
|
-
return h().wrap(function(
|
|
29915
|
+
var t = m(/* @__PURE__ */ h().mark(function r() {
|
|
29916
|
+
var n;
|
|
29917
|
+
return h().wrap(function(i) {
|
|
29767
29918
|
for (; ; )
|
|
29768
|
-
switch (
|
|
29919
|
+
switch (i.prev = i.next) {
|
|
29769
29920
|
case 0:
|
|
29770
|
-
|
|
29921
|
+
if (n = l(this, Ue)[Ue].selfController, !n.self.roomJoined) {
|
|
29922
|
+
i.next = 3;
|
|
29923
|
+
break;
|
|
29924
|
+
}
|
|
29925
|
+
return i.abrupt("return", null);
|
|
29926
|
+
case 3:
|
|
29927
|
+
return i.abrupt("return", n.joinRoom());
|
|
29771
29928
|
case 4:
|
|
29772
29929
|
case "end":
|
|
29773
|
-
return
|
|
29930
|
+
return i.stop();
|
|
29774
29931
|
}
|
|
29775
29932
|
}, r, this);
|
|
29776
29933
|
}));
|
|
29777
|
-
function e(
|
|
29934
|
+
function e() {
|
|
29778
29935
|
return t.apply(this, arguments);
|
|
29779
29936
|
}
|
|
29780
29937
|
return e;
|
|
29781
29938
|
}()
|
|
29782
29939
|
/**
|
|
29783
|
-
*
|
|
29784
|
-
* `waitlisted`, `joined`, `active`, `pinned`. The maps are indexed by
|
|
29785
|
-
* `peerId`s, and the values are the corresponding participant objects.
|
|
29940
|
+
* @param {LeaveRoomState} [state]
|
|
29786
29941
|
*/
|
|
29787
|
-
}, {
|
|
29942
|
+
}, { key: "leave", value: function() {
|
|
29943
|
+
var t = m(/* @__PURE__ */ h().mark(function r(n) {
|
|
29944
|
+
var a;
|
|
29945
|
+
return h().wrap(function(s) {
|
|
29946
|
+
for (; ; )
|
|
29947
|
+
switch (s.prev = s.next) {
|
|
29948
|
+
case 0:
|
|
29949
|
+
return Av.cleanup(), l(this, sa)[sa].getValue("peerSessionStore").reset(), a = l(this, Ue)[Ue].selfController, s.abrupt("return", a.leaveRoom(n));
|
|
29950
|
+
case 4:
|
|
29951
|
+
case "end":
|
|
29952
|
+
return s.stop();
|
|
29953
|
+
}
|
|
29954
|
+
}, r, this);
|
|
29955
|
+
}));
|
|
29956
|
+
function e(r) {
|
|
29957
|
+
return t.apply(this, arguments);
|
|
29958
|
+
}
|
|
29959
|
+
return e;
|
|
29960
|
+
}() }, {
|
|
29788
29961
|
key: "participants",
|
|
29789
29962
|
get: function() {
|
|
29790
29963
|
var e;
|
|
@@ -29949,31 +30122,40 @@ var Ma = /* @__PURE__ */ C("trackMap"), BD = /* @__PURE__ */ function(o) {
|
|
|
29949
30122
|
return t.apply(this, arguments);
|
|
29950
30123
|
}
|
|
29951
30124
|
return e;
|
|
29952
|
-
}() }, {
|
|
29953
|
-
|
|
29954
|
-
|
|
29955
|
-
|
|
29956
|
-
|
|
29957
|
-
|
|
29958
|
-
|
|
29959
|
-
|
|
30125
|
+
}() }, {
|
|
30126
|
+
key: "init",
|
|
30127
|
+
value: function() {
|
|
30128
|
+
var t = m(/* @__PURE__ */ h().mark(function r(n) {
|
|
30129
|
+
var a, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S, D, I, _, V;
|
|
30130
|
+
return h().wrap(function($) {
|
|
30131
|
+
for (; ; )
|
|
30132
|
+
switch ($.prev = $.next) {
|
|
30133
|
+
case 0:
|
|
30134
|
+
return br.init(), v = (a = n.defaults) !== null && a !== void 0 ? a : {}, f = v.mediaHandler, g = (f == null ? void 0 : f.peerId) || ((i = n == null || (s = n.cachedUserDetails) === null || s === void 0 ? void 0 : s.peerId) !== null && i !== void 0 ? i : Ks()), k = n.authToken, y = n.baseURI, b = jD(k, y), E = b.meetingId, T = cc(b, rm), window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0, S = Oi.setupContext(g, n, E, T), D = S.getValue("telemetry"), I = S.getValue("logger"), bm(I), Av.init(I), D.init(S, { roomName: E, userId: T.participantId, organizationId: T.orgId, peerId: g }, (u = (c = n.modules) === null || c === void 0 ? void 0 : c.tracing) !== null && u !== void 0 ? u : !0), I.init(S), I.info("Client::init::options", { clientInitOptions: N(N({}, n), {}, { authToken: "".concat((d = n.authToken) === null || d === void 0 ? void 0 : d.slice(0, 10), `...
|
|
29960
30135
|
`).concat((p = n.authToken) === null || p === void 0 ? void 0 : p.slice(-10)) }) }), $.next = 16, dl.init(S);
|
|
29961
|
-
|
|
29962
|
-
|
|
29963
|
-
|
|
29964
|
-
|
|
29965
|
-
|
|
29966
|
-
|
|
29967
|
-
|
|
29968
|
-
|
|
29969
|
-
|
|
29970
|
-
|
|
29971
|
-
|
|
29972
|
-
|
|
29973
|
-
|
|
30136
|
+
case 16:
|
|
30137
|
+
return _ = $.sent, V = new Oi(S, _), S.setValue("meeting", V), $.abrupt("return", V);
|
|
30138
|
+
case 20:
|
|
30139
|
+
case "end":
|
|
30140
|
+
return $.stop();
|
|
30141
|
+
}
|
|
30142
|
+
}, r);
|
|
30143
|
+
}));
|
|
30144
|
+
function e(r) {
|
|
30145
|
+
return t.apply(this, arguments);
|
|
30146
|
+
}
|
|
30147
|
+
return e;
|
|
30148
|
+
}()
|
|
30149
|
+
/**
|
|
30150
|
+
* @param {string} peerId
|
|
30151
|
+
* @param {ClientOptions} options
|
|
30152
|
+
* @param {string} meetingId
|
|
30153
|
+
* @param {any} args
|
|
30154
|
+
*/
|
|
30155
|
+
}, { key: "setupContext", value: function(e, r, n, a) {
|
|
29974
30156
|
var i, s, u = Ba.createContext(e, r), c = N(N({}, TP), r == null ? void 0 : r.modules), d = r.defaults || { audio: !0, video: !0 };
|
|
29975
30157
|
return u.setValue("options", r), u.setValue("peerId", e), u.setValue("modules", c), u.setValue("sdkName", "web-core"), u.setValue("meetingId", n), u.setValue("apiBase", a.apiBase), u.setValue("baseURI", a.baseURI), u.setValue("userId", a.participantId), u.setValue("organizationId", a.orgId), u.setValue("authToken", r.authToken), u.setValue("overrides", (i = r.overrides) !== null && i !== void 0 ? i : {}), u.setValue("env", wP({ baseURI: a.baseURI })), u.setValue("defaults", d), u.setValue("onError", r.onError || function() {
|
|
29976
|
-
}), u.setValue("cachedUserDetails",
|
|
30158
|
+
}), u.setValue("cachedUserDetails", Un(r.cachedUserDetails)), u.setValue("sdkVersion", "VERSION_PLACEHOLDER"), (s = r.modules) !== null && s !== void 0 && s.experimentalAudioPlayback && u.setValue("audioPlayback", new BD()), u;
|
|
29977
30159
|
} }]);
|
|
29978
30160
|
}());
|
|
29979
30161
|
Nc([ft("0002"), za.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Oi.prototype, "join", 1);
|