@cloudflare/realtimekit 2.0.3-staging.3 → 2.0.3-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EncryptionManager.d.ts +1 -1
- package/dist/browser.js +7 -7
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +167 -163
- package/dist/index.es5.js +91 -99
- package/dist/index.rn.js +6 -6
- package/dist/ts3.4/dist/EncryptionManager.d.ts +1 -1
- package/dist/ts3.4/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es5.js
CHANGED
|
@@ -3,7 +3,7 @@ import Uv from "bowser";
|
|
|
3
3
|
import { MessageType as A, PbLong as Go, typeofJsonValue as wm } from "@protobuf-ts/runtime";
|
|
4
4
|
import * as Au from "worker-timers";
|
|
5
5
|
import * as Cn from "sdp-transform";
|
|
6
|
-
var im = ["chat", "connectedMeetings", "plugins", "polls", "media"], am = ["id"], sm = ["meetingId"], x, $n, qe, la, Bc, Qs, Un, qc, gc, Ji, Ki, ko, Xr, zi, jn, da, Ys, Fn, Xs, Zs, Zr, Qi, St, Hn, yr, xs, eo, Bn, Xt, ma, en, Qn, mc, To, bo, wo, ha, Yi, Xi, Zi, Ut, De, xi, ea, _t, qn, cn, Wn, yc, kr, to, tn, Gn, Tr, kc, ro, Tc, bc, ye, no, Jn, ta, Kn, mt, jt,
|
|
6
|
+
var im = ["chat", "connectedMeetings", "plugins", "polls", "media"], am = ["id"], sm = ["meetingId"], x, $n, qe, la, Bc, Qs, Un, qc, gc, Ji, Ki, ko, Xr, zi, jn, da, Ys, Fn, Xs, Zs, Zr, Qi, St, Hn, yr, xs, eo, Bn, Xt, ma, en, Qn, mc, To, bo, wo, ha, Yi, Xi, Zi, Ut, De, xi, ea, _t, qn, cn, Wn, yc, kr, to, tn, Gn, Tr, kc, ro, Tc, bc, ye, no, Jn, ta, Kn, mt, jt, Kt, xr, ra, it, na, Ne, br, Le, ia, we, pa, va, io, Eh, ao, Ft, Z, yt, Ll, wr, fa, ge, Ve, Xn, sn, Yn, Zn, nn, Qt, ar, on, xn, st, ln, ot, Ae, so, Wc, Gc, wc, Po, So, Jc, Kc, oo, Io, uo, zc, co, lo, de, Re, zn;
|
|
7
7
|
function Ch(s, r) {
|
|
8
8
|
if (s == null)
|
|
9
9
|
return {};
|
|
@@ -5657,12 +5657,12 @@ function LP(s) {
|
|
|
5657
5657
|
var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
5658
5658
|
var o = 0.5, c = 0.5, l = i, d = a, p = Math.min(t / l, n / d), v = l * p, f = d * p, g, y, k, P, T = 1;
|
|
5659
5659
|
return v < t && (T = t / v), Math.abs(T - 1) < 1e-14 && f < n && (T = n / f), v *= T, f *= T, k = l / (v / t), P = d / (f / n), g = (l - k) * o, y = (d - P) * c, g < 0 && (g = 0), y < 0 && (y = 0), k > l && (k = l), P > d && (P = d), [g, y, k, P, r, e, t, n];
|
|
5660
|
-
},
|
|
5660
|
+
}, Ht = /* @__PURE__ */ S("canvas"), si = /* @__PURE__ */ S("context"), tt = /* @__PURE__ */ S("videoContainer"), Bt = /* @__PURE__ */ S("video"), ke = /* @__PURE__ */ S("dimensions"), xt = /* @__PURE__ */ S("colors"), Mr = /* @__PURE__ */ S("rafRequest"), ct = /* @__PURE__ */ S("sources"), Ee = /* @__PURE__ */ S("self"), rs = /* @__PURE__ */ S("pinIcon"), ns = /* @__PURE__ */ S("handRaiseIcon"), Or = /* @__PURE__ */ S("state"), is = /* @__PURE__ */ S("initComplete"), VP = /* @__PURE__ */ function(s) {
|
|
5661
5661
|
function r(e, t, n, i) {
|
|
5662
5662
|
var a;
|
|
5663
5663
|
b(this, r);
|
|
5664
5664
|
var o = e.getValue("logger");
|
|
5665
|
-
return a = C(this, r, [o]), Object.defineProperty(a,
|
|
5665
|
+
return a = C(this, r, [o]), Object.defineProperty(a, Ht, { writable: !0, value: void 0 }), Object.defineProperty(a, si, { writable: !0, value: void 0 }), Object.defineProperty(a, tt, { writable: !0, value: void 0 }), Object.defineProperty(a, Bt, { writable: !0, value: void 0 }), Object.defineProperty(a, ke, { writable: !0, value: { height: Xp, width: Zp } }), Object.defineProperty(a, xt, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Mr, { writable: !0, value: void 0 }), Object.defineProperty(a, ct, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, rs, { writable: !0, value: void 0 }), Object.defineProperty(a, ns, { writable: !0, value: void 0 }), Object.defineProperty(a, Or, { writable: !0, value: void 0 }), Object.defineProperty(a, is, { writable: !0, value: !1 }), a.cleanupEventListeners = function() {
|
|
5666
5666
|
u(a, si)[si].unsubscribe("stageStatus", a.handlePipMediaControls), u(a, Ee)[Ee].removeListener("videoUpdate", a.onSelfVideoUpdateListener), u(a, Ee)[Ee].removeListener("audioUpdate", a.onSelfAudioUpdateListener), u(a, Ee)[Ee].removeListener("roomLeft", function() {
|
|
5667
5667
|
return a.disable();
|
|
5668
5668
|
});
|
|
@@ -5762,7 +5762,7 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5762
5762
|
}, {
|
|
5763
5763
|
key: "createVideoContainer",
|
|
5764
5764
|
value: function() {
|
|
5765
|
-
u(this, tt)[tt] = document.createElement("div"), u(this, tt)[tt].style.width = "0.1px", u(this, tt)[tt].style.height = "0.1px", u(this, tt)[tt].style.overflow = "hidden", u(this, tt)[tt].style.position = "absolute", u(this, tt)[tt].style.bottom = "0", u(this, tt)[tt].style.right = "0", u(this, tt)[tt].style.opacity = "0", u(this, tt)[tt].appendChild(u(this,
|
|
5765
|
+
u(this, tt)[tt] = document.createElement("div"), u(this, tt)[tt].style.width = "0.1px", u(this, tt)[tt].style.height = "0.1px", u(this, tt)[tt].style.overflow = "hidden", u(this, tt)[tt].style.position = "absolute", u(this, tt)[tt].style.bottom = "0", u(this, tt)[tt].style.right = "0", u(this, tt)[tt].style.opacity = "0", u(this, tt)[tt].appendChild(u(this, Bt)[Bt]);
|
|
5766
5766
|
}
|
|
5767
5767
|
/** @access private */
|
|
5768
5768
|
}, { key: "setupEventListeners", value: function() {
|
|
@@ -5774,7 +5774,7 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5774
5774
|
/** @access private */
|
|
5775
5775
|
function() {
|
|
5776
5776
|
var t = document.createElement("canvas");
|
|
5777
|
-
t.height = u(this, ke)[ke].height, t.width = u(this, ke)[ke].width, u(this,
|
|
5777
|
+
t.height = u(this, ke)[ke].height, t.width = u(this, ke)[ke].width, u(this, Ht)[Ht] = t;
|
|
5778
5778
|
}
|
|
5779
5779
|
) }, {
|
|
5780
5780
|
key: "setupMediaSessionEvents",
|
|
@@ -5817,8 +5817,8 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5817
5817
|
}, {
|
|
5818
5818
|
key: "drawEmptyTile",
|
|
5819
5819
|
value: function(t, n, i, a) {
|
|
5820
|
-
if (u(this,
|
|
5821
|
-
var o = u(this,
|
|
5820
|
+
if (u(this, Ht)[Ht] !== void 0) {
|
|
5821
|
+
var o = u(this, Ht)[Ht].getContext("2d"), c = u(this, Ht)[Ht].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(c / p), g = Math.floor(t / f), y = t % f, k = y * (p + l) + l, P = g * (v + l) + l, T = a != null ? a : {}, E = T.displayText, I = T.image;
|
|
5822
5822
|
o.fillStyle = E || I ? u(this, xt)[xt].videoBackground : u(this, xt)[xt].background, o.strokeStyle = u(this, xt)[xt].brand, o.beginPath(), o.moveTo(k + d, P), o.arcTo(k + p, P, k + p, P + d, d), o.arcTo(k + p, P + v, k + p - d, P + v, d), o.arcTo(k, P + v, k, P + v - d, d), o.arcTo(k, P, k + d, P, d), o.closePath(), o.fill(), o.stroke();
|
|
5823
5823
|
var M = p / 6, _ = p / 2 + k, O = v / 2 + P;
|
|
5824
5824
|
o.save(), (E || I) && (o.beginPath(), o.arc(_, O, M, 0, Math.PI * 2), o.fillStyle = u(this, xt)[xt].brand, o.fill(), I ? (o.clip(), o.drawImage(I, _ - M, O - M, M * 2, M * 2), o.restore()) : E && (o.fillStyle = u(this, xt)[xt].textOnBrand, o.font = "".concat(M / 2, "px sans-serif"), o.textAlign = "center", o.textBaseline = "middle", o.fillText(E, _, O)), this.drawIcons(a, k, P, Math.max(p, v)));
|
|
@@ -5829,7 +5829,7 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5829
5829
|
key: "drawIcons",
|
|
5830
5830
|
value: function(t, n, i, a) {
|
|
5831
5831
|
var o = this, c = Math.min(Math.max(a * 0.15, 100), 200), l = c * 0.2, d = c * 0.2, p = n + l, v = i + l, f = function(y) {
|
|
5832
|
-
var k = u(o,
|
|
5832
|
+
var k = u(o, Ht)[Ht].getContext("2d");
|
|
5833
5833
|
k.save(), k.fillStyle = u(o, xt)[xt].background, k.beginPath(), k.moveTo(p + d, v), k.arcTo(p + c, v, p + c, v + d, d), k.arcTo(p + c, v + c, p + c - d, v + c, d), k.arcTo(p, v + c, p, v + c - d, d), k.arcTo(p, v, p + d, v, d), k.closePath(), k.fill(), typeof y == "string" ? (k.font = "".concat(c / 1.5, "px sans-serif"), k.fillStyle = u(o, xt)[xt].text, k.textAlign = "center", k.textBaseline = "top", k.fillText(y, c / 2 + p, v + l)) : k.drawImage(y, p + l, v + l, c - l * 2, c - l * 2), p += c + l, k.restore();
|
|
5834
5834
|
};
|
|
5835
5835
|
t.pinned && f(u(this, rs)[rs]), t.handRaised && f(u(this, ns)[ns]), t.reaction && f(t.reaction);
|
|
@@ -5838,8 +5838,8 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5838
5838
|
}, {
|
|
5839
5839
|
key: "drawTile",
|
|
5840
5840
|
value: function(t, n, i) {
|
|
5841
|
-
if (u(this,
|
|
5842
|
-
for (var a = u(this,
|
|
5841
|
+
if (u(this, Ht)[Ht] !== void 0)
|
|
5842
|
+
for (var a = u(this, Ht)[Ht].getContext("2d"), o = this.getSources(), c = 0, l = 0; c < u(this, ke)[ke].height - 5; ) {
|
|
5843
5843
|
for (var d = 0; d < u(this, ke)[ke].width - 5 && l < i; ) {
|
|
5844
5844
|
var p;
|
|
5845
5845
|
if ((p = o[l]) !== null && p !== void 0 && p.enabled) {
|
|
@@ -5899,7 +5899,7 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5899
5899
|
document.body.removeChild(u(this, tt)[tt]);
|
|
5900
5900
|
} catch (t) {
|
|
5901
5901
|
}
|
|
5902
|
-
this.removeAllSources(), u(this,
|
|
5902
|
+
this.removeAllSources(), u(this, Ht)[Ht] = void 0, u(this, Bt)[Bt] = void 0, u(this, Mr)[Mr] = void 0;
|
|
5903
5903
|
}
|
|
5904
5904
|
/**
|
|
5905
5905
|
* Initialize PiP and prepare sources
|
|
@@ -5916,9 +5916,9 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
5916
5916
|
if (!u(this, is)[is]) {
|
|
5917
5917
|
u(this, is)[is] = !0, this.createCanvas(), this.setupMediaSessionEvents();
|
|
5918
5918
|
var o = document.createElement("video");
|
|
5919
|
-
u(this, ke)[ke] = { height: i != null ? i : Xp, width: a != null ? a : Zp }, o.height = u(this, ke)[ke].height, o.width = u(this, ke)[ke].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this,
|
|
5919
|
+
u(this, ke)[ke] = { height: i != null ? i : Xp, width: a != null ? a : Zp }, o.height = u(this, ke)[ke].height, o.width = u(this, ke)[ke].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this, Ht)[Ht].captureStream(24), u(this, Bt)[Bt] = o, u(this, Bt)[Bt].onloadedmetadata = function() {
|
|
5920
5920
|
try {
|
|
5921
|
-
t.emit("pipStarted"), u(t,
|
|
5921
|
+
t.emit("pipStarted"), u(t, Bt)[Bt].onleavepictureinpicture = function() {
|
|
5922
5922
|
t.emit("pipEnded");
|
|
5923
5923
|
};
|
|
5924
5924
|
} catch (c) {
|
|
@@ -6030,11 +6030,11 @@ var Xp = 1080, Zp = 1920, NP = function(r, e, t, n, i, a) {
|
|
|
6030
6030
|
var t = this;
|
|
6031
6031
|
u(this, Or)[Or] = "activating", this.setupEventListeners(), this.updateMediaSession("CAMERA", u(this, Ee)[Ee].videoEnabled), this.updateMediaSession("MIC", u(this, Ee)[Ee].audioEnabled), document.body.appendChild(u(this, tt)[tt]), u(this, Mr)[Mr] = requestAnimationFrame(function() {
|
|
6032
6032
|
return t.animate();
|
|
6033
|
-
}), u(this,
|
|
6034
|
-
u(t,
|
|
6033
|
+
}), u(this, Bt)[Bt].onloadedmetadata = function() {
|
|
6034
|
+
u(t, Bt)[Bt].requestPictureInPicture().then(function() {
|
|
6035
6035
|
u(t, Or)[Or] = "active";
|
|
6036
6036
|
});
|
|
6037
|
-
}, u(this,
|
|
6037
|
+
}, u(this, Bt)[Bt].readyState === 4 && u(this, Bt)[Bt].requestPictureInPicture().then(function() {
|
|
6038
6038
|
u(t, Or)[Or] = "active";
|
|
6039
6039
|
});
|
|
6040
6040
|
} }], [{ key: "_init", value: function() {
|
|
@@ -12676,12 +12676,12 @@ var Qo = {}, Wi = {
|
|
|
12676
12676
|
for (var i = n > 1 ? void 0 : n ? wA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
12677
12677
|
(o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
12678
12678
|
return n && i && bA(e, t, i), i;
|
|
12679
|
-
},
|
|
12679
|
+
}, qt = /* @__PURE__ */ S("stageSocketHandler"), Jl = /* @__PURE__ */ S("roomSocketHandler"), ie = /* @__PURE__ */ S("self"), Yo = /* @__PURE__ */ S("participants"), ur = /* @__PURE__ */ S("stageRequests"), je = /* @__PURE__ */ S("context"), Xo = /* @__PURE__ */ S("roomNodeClient"), ss = /* @__PURE__ */ S("setStatus"), _a = /* @__PURE__ */ function(s) {
|
|
12680
12680
|
function r(e, t, n, i, a) {
|
|
12681
12681
|
var o;
|
|
12682
12682
|
b(this, r);
|
|
12683
12683
|
var c = e.getValue("logger");
|
|
12684
|
-
return o = C(this, r, [c]), Object.defineProperty(o, ss, { value: SA }), Object.defineProperty(o, Xo, { get: PA, set: void 0 }), Object.defineProperty(o,
|
|
12684
|
+
return o = C(this, r, [c]), Object.defineProperty(o, ss, { value: SA }), Object.defineProperty(o, Xo, { get: PA, set: void 0 }), Object.defineProperty(o, qt, { writable: !0, value: void 0 }), Object.defineProperty(o, Jl, { writable: !0, value: void 0 }), Object.defineProperty(o, ie, { writable: !0, value: void 0 }), Object.defineProperty(o, Yo, { writable: !0, value: void 0 }), Object.defineProperty(o, ur, { writable: !0, value: void 0 }), Object.defineProperty(o, je, { writable: !0, value: void 0 }), u(o, je)[je] = e, u(o, qt)[qt] = i, u(o, Jl)[Jl] = a, u(o, ie)[ie] = t, u(o, Yo)[Yo] = n, u(o, ur)[ur] = [], o.setupEvents(), o;
|
|
12685
12685
|
}
|
|
12686
12686
|
return R(r, s), w(r, [{ key: "telemetry", get: (
|
|
12687
12687
|
/**
|
|
@@ -12750,7 +12750,7 @@ var Qo = {}, Wi = {
|
|
|
12750
12750
|
};
|
|
12751
12751
|
u(this, ie)[ie].permissions.on("permissionsUpdate", function(o) {
|
|
12752
12752
|
var c = o.canAcceptProductionRequests;
|
|
12753
|
-
c !== void 0 && (u(t, ie)[ie].permissions.acceptStageRequests ? (i(), u(t,
|
|
12753
|
+
c !== void 0 && (u(t, ie)[ie].permissions.acceptStageRequests ? (i(), u(t, qt)[qt].getStageRequests()) : (a(), u(t, ur)[ur] = [], t.emit("stageAccessRequestUpdate", u(t, ur)[ur])));
|
|
12754
12754
|
}), u(this, ie)[ie].permissions.acceptStageRequests && i();
|
|
12755
12755
|
}
|
|
12756
12756
|
) }, { key: "getAccessRequests", value: function() {
|
|
@@ -12788,7 +12788,7 @@ var Qo = {}, Wi = {
|
|
|
12788
12788
|
}
|
|
12789
12789
|
return u(this, ss)[ss]("ACCEPTED_TO_JOIN_STAGE"), i.a(2);
|
|
12790
12790
|
case 3:
|
|
12791
|
-
u(this,
|
|
12791
|
+
u(this, qt)[qt].requestAccess(), u(this, ss)[ss]("REQUESTED_TO_JOIN_STAGE");
|
|
12792
12792
|
case 4:
|
|
12793
12793
|
return i.a(2);
|
|
12794
12794
|
}
|
|
@@ -12812,7 +12812,7 @@ var Qo = {}, Wi = {
|
|
|
12812
12812
|
}
|
|
12813
12813
|
throw this.logger.error("Stage::stage_disabled"), new U("Stage is disabled", "2003");
|
|
12814
12814
|
case 1:
|
|
12815
|
-
u(this,
|
|
12815
|
+
u(this, qt)[qt].cancelRequestAccess(), u(this, ss)[ss]("OFF_STAGE");
|
|
12816
12816
|
case 2:
|
|
12817
12817
|
return i.a(2);
|
|
12818
12818
|
}
|
|
@@ -12835,7 +12835,7 @@ var Qo = {}, Wi = {
|
|
|
12835
12835
|
throw this.logger.error("Stage::stage_disabled"), new U("Stage is disabled", "2003");
|
|
12836
12836
|
if (!u(this, ie)[ie].permissions.acceptStageRequests)
|
|
12837
12837
|
throw this.logger.error("Stage::grant_access::permission_denied"), new U("You do not have permission to perform this action", "2001");
|
|
12838
|
-
return u(this,
|
|
12838
|
+
return u(this, qt)[qt].grantAccess(t);
|
|
12839
12839
|
}
|
|
12840
12840
|
/**
|
|
12841
12841
|
* @param {string[]} userIds
|
|
@@ -12849,7 +12849,7 @@ var Qo = {}, Wi = {
|
|
|
12849
12849
|
throw this.logger.error("Stage::stage_disabled"), new U("Stage is disabled", "2003");
|
|
12850
12850
|
if (!u(this, ie)[ie].permissions.acceptStageRequests)
|
|
12851
12851
|
throw this.logger.error("Stage::deny_access::permission_denied"), new U("You do not have permission to perform this action", "2001");
|
|
12852
|
-
return u(this,
|
|
12852
|
+
return u(this, qt)[qt].denyAccess(t);
|
|
12853
12853
|
}
|
|
12854
12854
|
/**
|
|
12855
12855
|
* Returns the peerId of the current user
|
|
@@ -12875,7 +12875,7 @@ var Qo = {}, Wi = {
|
|
|
12875
12875
|
}
|
|
12876
12876
|
throw new U("Unable to join stage you are currently ".concat(this.status), "2006");
|
|
12877
12877
|
case 2:
|
|
12878
|
-
return u(this, je)[je].setValue("stageStatus", "ON_STAGE", !1), a.n = 3, u(this,
|
|
12878
|
+
return u(this, je)[je].setValue("stageStatus", "ON_STAGE", !1), a.n = 3, u(this, qt)[qt].joinStage();
|
|
12879
12879
|
case 3:
|
|
12880
12880
|
if (i !== Vi.Livestream) {
|
|
12881
12881
|
a.n = 5;
|
|
@@ -12916,7 +12916,7 @@ var Qo = {}, Wi = {
|
|
|
12916
12916
|
}
|
|
12917
12917
|
throw new U("Unable to leave stage you are currently ".concat(this.status), "2006");
|
|
12918
12918
|
case 2:
|
|
12919
|
-
return u(this, ie)[ie].setIsPinned(!1), u(this, je)[je].setValue("stageStatus", "OFF_STAGE", !1), a.n = 3, u(this,
|
|
12919
|
+
return u(this, ie)[ie].setIsPinned(!1), u(this, je)[je].setValue("stageStatus", "OFF_STAGE", !1), a.n = 3, u(this, qt)[qt].leaveStage(u(this, ie)[ie].userId);
|
|
12920
12920
|
case 3:
|
|
12921
12921
|
return a.p = 3, a.n = 4, u(this, je)[je].getValue("peerSessionStore").emitAsync($.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
12922
12922
|
case 4:
|
|
@@ -12966,7 +12966,7 @@ var Qo = {}, Wi = {
|
|
|
12966
12966
|
}
|
|
12967
12967
|
throw this.logger.error("Stage::kick::permission_denied"), new U("You do not have permissions for kick", "2001");
|
|
12968
12968
|
case 3:
|
|
12969
|
-
return a.a(2, u(this,
|
|
12969
|
+
return a.a(2, u(this, qt)[qt].kick(i));
|
|
12970
12970
|
}
|
|
12971
12971
|
}, n, this);
|
|
12972
12972
|
}));
|
|
@@ -13915,12 +13915,12 @@ var ci = /* @__PURE__ */ S("context"), zA = /* @__PURE__ */ function() {
|
|
|
13915
13915
|
for (var i = n > 1 ? void 0 : n ? ZA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
13916
13916
|
(o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
13917
13917
|
return n && i && XA(e, t, i), i;
|
|
13918
|
-
}, Me = /* @__PURE__ */ S("mediaInterface"), fe = /* @__PURE__ */ S("audioMediaHandler"), pe = /* @__PURE__ */ S("videoMediaHandler"), Dr = /* @__PURE__ */ S("audioOutputMediaHandler"),
|
|
13918
|
+
}, Me = /* @__PURE__ */ S("mediaInterface"), fe = /* @__PURE__ */ S("audioMediaHandler"), pe = /* @__PURE__ */ S("videoMediaHandler"), Dr = /* @__PURE__ */ S("audioOutputMediaHandler"), Wt = /* @__PURE__ */ S("screenShareMediaHandler"), eu = /* @__PURE__ */ S("autoSwitchDevice"), Te = /* @__PURE__ */ S("context"), Pr = /* @__PURE__ */ function(s) {
|
|
13919
13919
|
function r(e, t) {
|
|
13920
13920
|
var n, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : il, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0;
|
|
13921
13921
|
b(this, r);
|
|
13922
13922
|
var o = e.getValue("logger");
|
|
13923
|
-
return n = C(this, r, [o]), Object.defineProperty(n, Me, { writable: !0, value: void 0 }), Object.defineProperty(n, fe, { writable: !0, value: void 0 }), Object.defineProperty(n, pe, { writable: !0, value: void 0 }), Object.defineProperty(n, Dr, { writable: !0, value: void 0 }), Object.defineProperty(n,
|
|
13923
|
+
return n = C(this, r, [o]), Object.defineProperty(n, Me, { writable: !0, value: void 0 }), Object.defineProperty(n, fe, { writable: !0, value: void 0 }), Object.defineProperty(n, pe, { writable: !0, value: void 0 }), Object.defineProperty(n, Dr, { writable: !0, value: void 0 }), Object.defineProperty(n, Wt, { writable: !0, value: void 0 }), Object.defineProperty(n, eu, { writable: !0, value: void 0 }), Object.defineProperty(n, Te, { writable: !0, value: void 0 }), n.audioUpdateInProgress = void 0, n.videoUpdateInProgress = void 0, u(n, Te)[Te] = e, n.audioUpdateInProgress = !1, n.videoUpdateInProgress = !1, u(n, Me)[Me] = new _g(e, t), u(n, fe)[fe] = new wI(e, u(n, Me)[Me], void 0, i), u(n, pe)[pe] = new AI(e, u(n, Me)[Me], void 0, i), u(n, Wt)[Wt] = new CI(u(n, Te)[Te], u(n, Me)[Me]), u(n, Dr)[Dr] = new SI(e, u(n, Me)[Me]), u(n, eu)[eu] = a, u(n, fe)[fe].on("trackMuted", n.onAudioTrackMuted.bind(n)), u(n, fe)[fe].on("trackChanged", n.onAudioTrackChanged.bind(n)), u(n, pe)[pe].on("trackChanged", n.onVideoTrackChanged.bind(n)), u(n, pe)[pe].on("trackEnded", n.onVideoTrackEnded.bind(n)), u(n, Wt)[Wt].on("trackEnded", n.onScreenShareEnded.bind(n)), n.onVisibilityChange = n.onVisibilityChange.bind(n), document.addEventListener("visibilitychange", n.onVisibilityChange), n;
|
|
13924
13924
|
}
|
|
13925
13925
|
return R(r, s), w(r, [{ key: "telemetry", get: (
|
|
13926
13926
|
/**
|
|
@@ -14295,16 +14295,16 @@ var ci = /* @__PURE__ */ S("context"), zA = /* @__PURE__ */ function() {
|
|
|
14295
14295
|
}, { key: "onScreenShareEnded", value: function() {
|
|
14296
14296
|
this.emit("SCREENSHARE_ENDED");
|
|
14297
14297
|
} }, { key: "screenShareTracks", get: function() {
|
|
14298
|
-
return { audio: u(this,
|
|
14298
|
+
return { audio: u(this, Wt)[Wt].audioMediaTrack, video: u(this, Wt)[Wt].videoMediaTrack };
|
|
14299
14299
|
} }, { key: "screenShareEnabled", get: function() {
|
|
14300
|
-
return u(this,
|
|
14300
|
+
return u(this, Wt)[Wt].trackEnabled;
|
|
14301
14301
|
} }, { key: "enableScreenShare", value: function() {
|
|
14302
14302
|
var e = m(/* @__PURE__ */ h().m(function n() {
|
|
14303
14303
|
return h().w(function(i) {
|
|
14304
14304
|
for (; ; )
|
|
14305
14305
|
switch (i.n) {
|
|
14306
14306
|
case 0:
|
|
14307
|
-
return i.n = 1, u(this,
|
|
14307
|
+
return i.n = 1, u(this, Wt)[Wt].enableScreenShare();
|
|
14308
14308
|
case 1:
|
|
14309
14309
|
return i.a(2);
|
|
14310
14310
|
}
|
|
@@ -14320,7 +14320,7 @@ var ci = /* @__PURE__ */ S("context"), zA = /* @__PURE__ */ function() {
|
|
|
14320
14320
|
for (; ; )
|
|
14321
14321
|
switch (i.n) {
|
|
14322
14322
|
case 0:
|
|
14323
|
-
u(this,
|
|
14323
|
+
u(this, Wt)[Wt].disableScreenShare();
|
|
14324
14324
|
case 1:
|
|
14325
14325
|
return i.a(2);
|
|
14326
14326
|
}
|
|
@@ -14336,7 +14336,7 @@ var ci = /* @__PURE__ */ S("context"), zA = /* @__PURE__ */ function() {
|
|
|
14336
14336
|
for (; ; )
|
|
14337
14337
|
switch (a.n) {
|
|
14338
14338
|
case 0:
|
|
14339
|
-
return a.n = 1, u(this,
|
|
14339
|
+
return a.n = 1, u(this, Wt)[Wt].updateConstraints(i);
|
|
14340
14340
|
case 1:
|
|
14341
14341
|
return a.a(2);
|
|
14342
14342
|
}
|
|
@@ -14369,7 +14369,7 @@ var ci = /* @__PURE__ */ S("context"), zA = /* @__PURE__ */ function() {
|
|
|
14369
14369
|
} }, { key: "setVideoMiddlewareGlobalConfig", value: function(t) {
|
|
14370
14370
|
return u(this, pe)[pe].setVideoMiddlewareGlobalConfig(t);
|
|
14371
14371
|
} }, { key: "destruct", value: function() {
|
|
14372
|
-
u(this, fe)[fe].disableTrack(), u(this, pe)[pe].disableTrack(), u(this, pe)[pe].terminateMiddlewareWebWorker(), u(this,
|
|
14372
|
+
u(this, fe)[fe].disableTrack(), u(this, pe)[pe].disableTrack(), u(this, pe)[pe].terminateMiddlewareWebWorker(), u(this, Wt)[Wt].disableScreenShare(), u(this, Me)[Me].destruct();
|
|
14373
14373
|
} }, {
|
|
14374
14374
|
key: "onDeviceChange",
|
|
14375
14375
|
value: function() {
|
|
@@ -18101,10 +18101,10 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18101
18101
|
for (var i = n > 1 ? void 0 : n ? lM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
18102
18102
|
(o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
18103
18103
|
return n && i && cM(e, t, i), i;
|
|
18104
|
-
}, Lg = (jt = /* @__PURE__ */ S("currentView"),
|
|
18104
|
+
}, Lg = (jt = /* @__PURE__ */ S("currentView"), Kt = /* @__PURE__ */ S("consumersSyncing"), xr = /* @__PURE__ */ S("resyncRequired"), /* @__PURE__ */ function() {
|
|
18105
18105
|
function s(r, e, t) {
|
|
18106
18106
|
var n = this;
|
|
18107
|
-
b(this, s), this.participants = void 0, this.self = void 0, this.selectedPeers = Dg, this.maxSpatialLayerUpdates = /* @__PURE__ */ new Map(), this.consumerPeerMap = void 0, this.events = void 0, this.roomSocketHandler = void 0, this.context = void 0, this.videoPeerConsumerMap = /* @__PURE__ */ new Map(), Object.defineProperty(this, jt, { writable: !0, value: { mode: "ACTIVE_GRID", page: 0 } }), Object.defineProperty(this,
|
|
18107
|
+
b(this, s), this.participants = void 0, this.self = void 0, this.selectedPeers = Dg, this.maxSpatialLayerUpdates = /* @__PURE__ */ new Map(), this.consumerPeerMap = void 0, this.events = void 0, this.roomSocketHandler = void 0, this.context = void 0, this.videoPeerConsumerMap = /* @__PURE__ */ new Map(), Object.defineProperty(this, jt, { writable: !0, value: { mode: "ACTIVE_GRID", page: 0 } }), Object.defineProperty(this, Kt, { writable: !0, value: !1 }), Object.defineProperty(this, xr, { writable: !0, value: !1 }), this.updateConsumerSpatialLayers = Wh(function() {
|
|
18108
18108
|
var i = {}, a = new Map(n.maxSpatialLayerUpdates);
|
|
18109
18109
|
n.maxSpatialLayerUpdates.clear(), Array.from(a.entries()).forEach(function(o) {
|
|
18110
18110
|
var c = $e(o, 2), l = c[0], d = c[1];
|
|
@@ -18120,7 +18120,7 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18120
18120
|
for (; ; )
|
|
18121
18121
|
switch (g.p = g.n) {
|
|
18122
18122
|
case 0:
|
|
18123
|
-
if (l = d.length > 2 && d[2] !== void 0 ? d[2] : [], n.logger.info("updateConsumers: Starting consumer updates - AddProducers: ".concat(o.length, ", RemoveProducers: ").concat(c.length, ", RemoveStaleConsumers: ").concat(l.length, ", ConsumersSyncing: ").concat(u(n,
|
|
18123
|
+
if (l = d.length > 2 && d[2] !== void 0 ? d[2] : [], n.logger.info("updateConsumers: Starting consumer updates - AddProducers: ".concat(o.length, ", RemoveProducers: ").concat(c.length, ", RemoveStaleConsumers: ").concat(l.length, ", ConsumersSyncing: ").concat(u(n, Kt)[Kt])), g.p = 1, o.length === 0) {
|
|
18124
18124
|
g.n = 3;
|
|
18125
18125
|
break;
|
|
18126
18126
|
}
|
|
@@ -18223,7 +18223,7 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18223
18223
|
e.logger.warn("ParticipantController::NEW_PRODUCER::participant not found", { producer: { id: i == null ? void 0 : i.producerId, kind: i == null ? void 0 : i.kind, status: "not_initialized", appData: { screenShare: i == null ? void 0 : i.screenShare } }, participant: { id: n } });
|
|
18224
18224
|
return;
|
|
18225
18225
|
}
|
|
18226
|
-
a.producers.push(i), e.logger.info("ParticipantController::NEW_PRODUCER::producer_added_to_participant", { producer: { id: i == null ? void 0 : i.producerId, peerId: n, kind: i == null ? void 0 : i.kind, status: "not_initialized", appData: { screenShare: i == null ? void 0 : i.screenShare } } }), (i == null ? void 0 : i.kind) === "audio" && e.participants.audioSubscribed.get(n) || (i == null ? void 0 : i.kind) === "video" && e.participants.videoSubscribed.get(n) || i != null && i.screenShare ? (e.logger.info("NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ".concat(i.producerId, ", Peer: ").concat(n, ", Kind: ").concat(i.kind, ", ScreenShare: ").concat(i.screenShare, ", ConsumersSyncing: ").concat(u(e,
|
|
18226
|
+
a.producers.push(i), e.logger.info("ParticipantController::NEW_PRODUCER::producer_added_to_participant", { producer: { id: i == null ? void 0 : i.producerId, peerId: n, kind: i == null ? void 0 : i.kind, status: "not_initialized", appData: { screenShare: i == null ? void 0 : i.screenShare } } }), (i == null ? void 0 : i.kind) === "audio" && e.participants.audioSubscribed.get(n) || (i == null ? void 0 : i.kind) === "video" && e.participants.videoSubscribed.get(n) || i != null && i.screenShare ? (e.logger.info("NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ".concat(i.producerId, ", Peer: ").concat(n, ", Kind: ").concat(i.kind, ", ScreenShare: ").concat(i.screenShare, ", ConsumersSyncing: ").concat(u(e, Kt)[Kt], ", VideoSub: ").concat(i.kind === "video" ? e.participants.videoSubscribed.has(n) : "N/A", ", AudioSub: ").concat(i.kind === "audio" ? e.participants.audioSubscribed.has(n) : "N/A")), e.scheduleSyncConsumers({ source: "NEW_PRODUCER_AUTO" })) : e.logger.info("ParticipantController::NEW_PRODUCER::not_consuming_producer_auto", { producer: { id: i == null ? void 0 : i.producerId, peerId: n, kind: i == null ? void 0 : i.kind, status: "UNKNOWN", appData: { screenShare: i == null ? void 0 : i.screenShare } } });
|
|
18227
18227
|
}), this.context.getValue("peerSessionStore").on($.PRODUCER_CLOSED, function(t) {
|
|
18228
18228
|
var n = t.peerId, i = t.producerId, a = e.participants.joined.get(n);
|
|
18229
18229
|
if (!a) {
|
|
@@ -18248,7 +18248,7 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18248
18248
|
var i = n;
|
|
18249
18249
|
e.onParticipantPinned(i);
|
|
18250
18250
|
var a = e.participants.joined.get(i);
|
|
18251
|
-
a && (e.logger.info("globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ".concat(i, " - ProducerCount: ").concat(a.producers.length, ", ConsumersSyncing: ").concat(u(e,
|
|
18251
|
+
a && (e.logger.info("globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ".concat(i, " - ProducerCount: ").concat(a.producers.length, ", ConsumersSyncing: ").concat(u(e, Kt)[Kt], ", ProducerIds: [").concat(a.producers.map(function(o) {
|
|
18252
18252
|
return o.producerId;
|
|
18253
18253
|
}).join(", "), "]")), e.scheduleSyncConsumers({ source: "GLOBAL_PEER_PIN" }));
|
|
18254
18254
|
}
|
|
@@ -18363,7 +18363,7 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18363
18363
|
for (; ; )
|
|
18364
18364
|
switch (p.n) {
|
|
18365
18365
|
case 0:
|
|
18366
|
-
l = n.source, d = ((i = u(this, jt)[jt]) === null || i === void 0 ? void 0 : i.mode) === "PAGINATED" && !u(this,
|
|
18366
|
+
l = n.source, d = ((i = u(this, jt)[jt]) === null || i === void 0 ? void 0 : i.mode) === "PAGINATED" && !u(this, Kt)[Kt] ? 200 : 0, this.logger.info("scheduleSyncConsumers():: Source: ".concat(l, ", ViewMode: ").concat((a = u(this, jt)[jt]) === null || a === void 0 ? void 0 : a.mode, ", ConsumersSyncing: ").concat(u(this, Kt)[Kt], ", Delay: ").concat(d, ", Page: ").concat((o = u(this, jt)[jt]) === null || o === void 0 ? void 0 : o.page)), setTimeout(function() {
|
|
18367
18367
|
return c.syncConsumers();
|
|
18368
18368
|
}, d);
|
|
18369
18369
|
case 1:
|
|
@@ -18415,13 +18415,13 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18415
18415
|
}
|
|
18416
18416
|
return this.logger.info("syncConsumers: Connection not ready, exiting."), F.a(2);
|
|
18417
18417
|
case 2:
|
|
18418
|
-
if (!u(this,
|
|
18418
|
+
if (!u(this, Kt)[Kt]) {
|
|
18419
18419
|
F.n = 3;
|
|
18420
18420
|
break;
|
|
18421
18421
|
}
|
|
18422
18422
|
return u(this, xr)[xr] = !0, this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting."), F.a(2);
|
|
18423
18423
|
case 3:
|
|
18424
|
-
if (this.logger.info("syncConsumers: Starting sync operation."), u(this,
|
|
18424
|
+
if (this.logger.info("syncConsumers: Starting sync operation."), u(this, Kt)[Kt] = !0, u(this, xr)[xr] = !1, p = [], this.participants.videoSubscribed.forEach(function(W) {
|
|
18425
18425
|
var G, H, Y = a.participants.joined.get(W.id), V = (G = (H = W.producers) === null || H === void 0 ? void 0 : H.filter(function(B) {
|
|
18426
18426
|
return B.kind === "video";
|
|
18427
18427
|
})) !== null && G !== void 0 ? G : [];
|
|
@@ -18488,7 +18488,7 @@ var cM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ks = funct
|
|
|
18488
18488
|
case 8:
|
|
18489
18489
|
F.p = 8, L = F.v, this.logger.error("syncConsumers: updateConsumers failed with error.", { error: L });
|
|
18490
18490
|
case 9:
|
|
18491
|
-
return F.p = 9, this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), u(this,
|
|
18491
|
+
return F.p = 9, this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), u(this, Kt)[Kt] = !1, d != null && (O = d.socketState) !== null && O !== void 0 && O.state && d.socketState.state !== "connected" && (u(this, xr)[xr] = !0), F.f(9);
|
|
18492
18492
|
case 10:
|
|
18493
18493
|
u(this, xr)[xr] && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
|
|
18494
18494
|
case 11:
|
|
@@ -21846,15 +21846,15 @@ function DM() {
|
|
|
21846
21846
|
this.logger.error("Consumer::destroyTrack()", N(N({}, u(this, pr)[pr]), {}, { error: s }));
|
|
21847
21847
|
}
|
|
21848
21848
|
}
|
|
21849
|
-
var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs = /* @__PURE__ */ S("disableTrackOnPause"), fi = /* @__PURE__ */ S("zeroRtpOnPause"),
|
|
21849
|
+
var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs = /* @__PURE__ */ S("disableTrackOnPause"), fi = /* @__PURE__ */ S("zeroRtpOnPause"), Gt = /* @__PURE__ */ S("closed"), Je = /* @__PURE__ */ S("track"), kn = /* @__PURE__ */ S("paused"), fs = /* @__PURE__ */ S("maxSpatialLayer"), rd = /* @__PURE__ */ S("context"), Lt = /* @__PURE__ */ S("metadata"), LM = /* @__PURE__ */ function(s) {
|
|
21850
21850
|
function r(e, t) {
|
|
21851
21851
|
var n, i, a;
|
|
21852
|
-
return b(this, r), a = C(this, r, [e]), Object.defineProperty(a, Lt, { get: NM, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, tr, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, ps, { writable: !0, value: void 0 }), Object.defineProperty(a, vs, { writable: !0, value: void 0 }), Object.defineProperty(a, fi, { writable: !0, value: void 0 }), Object.defineProperty(a,
|
|
21852
|
+
return b(this, r), a = C(this, r, [e]), Object.defineProperty(a, Lt, { get: NM, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, tr, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, ps, { writable: !0, value: void 0 }), Object.defineProperty(a, vs, { writable: !0, value: void 0 }), Object.defineProperty(a, fi, { writable: !0, value: void 0 }), Object.defineProperty(a, Gt, { writable: !0, value: !1 }), Object.defineProperty(a, Je, { writable: !0, value: void 0 }), Object.defineProperty(a, kn, { writable: !0, value: void 0 }), Object.defineProperty(a, fs, { writable: !0, value: void 0 }), Object.defineProperty(a, rd, { writable: !0, value: void 0 }), a.id = t.id, a.localId = t.localId, u(a, Je)[Je] = t.track, a.kind = (n = t.track) === null || n === void 0 ? void 0 : n.kind, u(a, kn)[kn] = t.disableTrackOnPause ? !((i = t.track) !== null && i !== void 0 && i.enabled) : !1, u(a, fs)[fs] = void 0, u(a, ps)[ps] = t.stopTracks, u(a, vs)[vs] = t.disableTrackOnPause, u(a, fi)[fi] = t.zeroRtpOnPause, a.appData = t.appData || {}, a._onTrackEnded = a._onTrackEnded.bind(a), u(a, tr)[tr] = t.handler, a.rtpSender = t.rtpSender, a._handleTrack(), u(a, rd)[rd] = e, a;
|
|
21853
21853
|
}
|
|
21854
21854
|
return R(r, s), w(r, [{
|
|
21855
21855
|
key: "closed",
|
|
21856
21856
|
get: function() {
|
|
21857
|
-
return u(this,
|
|
21857
|
+
return u(this, Gt)[Gt];
|
|
21858
21858
|
}
|
|
21859
21859
|
/**
|
|
21860
21860
|
* The associated track.
|
|
@@ -21890,13 +21890,13 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
21890
21890
|
for (; ; )
|
|
21891
21891
|
switch (p.n) {
|
|
21892
21892
|
case 0:
|
|
21893
|
-
if (!u(this,
|
|
21893
|
+
if (!u(this, Gt)[Gt]) {
|
|
21894
21894
|
p.n = 1;
|
|
21895
21895
|
break;
|
|
21896
21896
|
}
|
|
21897
21897
|
return p.a(2);
|
|
21898
21898
|
case 1:
|
|
21899
|
-
if (this.logger.debug("Producer::close() ".concat(i ? "with reason ".concat(i) : ""), u(this, Lt)[Lt]), u(this,
|
|
21899
|
+
if (this.logger.debug("Producer::close() ".concat(i ? "with reason ".concat(i) : ""), u(this, Lt)[Lt]), u(this, Gt)[Gt] = !0, this._destroyTrack(), i !== nc) {
|
|
21900
21900
|
p.n = 2;
|
|
21901
21901
|
break;
|
|
21902
21902
|
}
|
|
@@ -21923,7 +21923,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
21923
21923
|
for (; ; )
|
|
21924
21924
|
switch (i.n) {
|
|
21925
21925
|
case 0:
|
|
21926
|
-
if (!u(this,
|
|
21926
|
+
if (!u(this, Gt)[Gt]) {
|
|
21927
21927
|
i.n = 1;
|
|
21928
21928
|
break;
|
|
21929
21929
|
}
|
|
@@ -21940,7 +21940,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
21940
21940
|
}() }, {
|
|
21941
21941
|
key: "pause",
|
|
21942
21942
|
value: function() {
|
|
21943
|
-
this.logger.debug("Producer::pause()", u(this, Lt)[Lt]), u(this,
|
|
21943
|
+
this.logger.debug("Producer::pause()", u(this, Lt)[Lt]), u(this, Gt)[Gt] && this.logger.error("Producer::pause() | Producer closed", u(this, Lt)[Lt]), u(this, kn)[kn] = !0, u(this, Je)[Je] && u(this, vs)[vs] && (u(this, Je)[Je].enabled = !1), u(this, fi)[fi] && u(this, tr)[tr].replaceTrack(this.localId, null), this.emit("pause");
|
|
21944
21944
|
}
|
|
21945
21945
|
/**
|
|
21946
21946
|
* Resumes sending media.
|
|
@@ -21948,7 +21948,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
21948
21948
|
}, {
|
|
21949
21949
|
key: "resume",
|
|
21950
21950
|
value: function() {
|
|
21951
|
-
if (this.logger.debug("Producer::resume()", u(this, Lt)[Lt]), u(this,
|
|
21951
|
+
if (this.logger.debug("Producer::resume()", u(this, Lt)[Lt]), u(this, Gt)[Gt]) {
|
|
21952
21952
|
this.logger.error("Producer::resume() | Producer closed", u(this, Lt)[Lt]);
|
|
21953
21953
|
return;
|
|
21954
21954
|
}
|
|
@@ -21964,7 +21964,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
21964
21964
|
for (; ; )
|
|
21965
21965
|
switch (o.n) {
|
|
21966
21966
|
case 0:
|
|
21967
|
-
if (a = i.track, this.logger.debug("Producer::replaceTrack() trackId: ".concat(a == null ? void 0 : a.id), u(this, Lt)[Lt]), !u(this,
|
|
21967
|
+
if (a = i.track, this.logger.debug("Producer::replaceTrack() trackId: ".concat(a == null ? void 0 : a.id), u(this, Lt)[Lt]), !u(this, Gt)[Gt]) {
|
|
21968
21968
|
o.n = 1;
|
|
21969
21969
|
break;
|
|
21970
21970
|
}
|
|
@@ -22010,7 +22010,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
22010
22010
|
for (; ; )
|
|
22011
22011
|
switch (a.n) {
|
|
22012
22012
|
case 0:
|
|
22013
|
-
if (!u(this,
|
|
22013
|
+
if (!u(this, Gt)[Gt]) {
|
|
22014
22014
|
a.n = 1;
|
|
22015
22015
|
break;
|
|
22016
22016
|
}
|
|
@@ -22046,7 +22046,7 @@ var tr = /* @__PURE__ */ S("handler"), ps = /* @__PURE__ */ S("stopTracks"), vs
|
|
|
22046
22046
|
for (; ; )
|
|
22047
22047
|
switch (a.n) {
|
|
22048
22048
|
case 0:
|
|
22049
|
-
if (!u(this,
|
|
22049
|
+
if (!u(this, Gt)[Gt]) {
|
|
22050
22050
|
a.n = 1;
|
|
22051
22051
|
break;
|
|
22052
22052
|
}
|
|
@@ -23038,9 +23038,9 @@ function XM(s) {
|
|
|
23038
23038
|
var r = s.state, e = s.direction, t = s.sfuSessionId;
|
|
23039
23039
|
u(this, Ds)[Ds].mediaState[e] = { state: r, sfuSessionId: t }, this.context.getValue("peerSessionStore").emit($.TRANSPORT_STATE_UPDATE, N({ transport: e }, u(this, Ds)[Ds].mediaState[e]));
|
|
23040
23040
|
}
|
|
23041
|
-
var id = /* @__PURE__ */ S("context"),
|
|
23041
|
+
var id = /* @__PURE__ */ S("context"), Jt = /* @__PURE__ */ S("logger"), ZM = /* @__PURE__ */ function() {
|
|
23042
23042
|
function s(r, e, t, n, i) {
|
|
23043
|
-
b(this, s), Object.defineProperty(this, id, { writable: !0, value: void 0 }), Object.defineProperty(this,
|
|
23043
|
+
b(this, s), Object.defineProperty(this, id, { writable: !0, value: void 0 }), Object.defineProperty(this, Jt, { writable: !0, value: void 0 }), this.events = e, this.recvTransport = t, this.socket = n, this.socketHandler = i, u(this, id)[id] = r, u(this, Jt)[Jt] = r.getValue("logger");
|
|
23044
23044
|
}
|
|
23045
23045
|
return w(s, [{ key: "create", value: function() {
|
|
23046
23046
|
var r = m(/* @__PURE__ */ h().m(function t(n) {
|
|
@@ -23066,7 +23066,7 @@ var id = /* @__PURE__ */ S("context"), Gt = /* @__PURE__ */ S("logger"), ZM = /*
|
|
|
23066
23066
|
var g = $e(f, 2), y = g[0], k = g[1], P = l.get(y);
|
|
23067
23067
|
if (P) {
|
|
23068
23068
|
if (k.errorCode) {
|
|
23069
|
-
u(i,
|
|
23069
|
+
u(i, Jt)[Jt].warn("Consumer request failed for producer ".concat(y), { error: { message: k.errorCode } }), p.push(N(N({}, P), {}, { errorCode: k.errorCode }));
|
|
23070
23070
|
return;
|
|
23071
23071
|
}
|
|
23072
23072
|
var T = {};
|
|
@@ -23091,13 +23091,13 @@ var id = /* @__PURE__ */ S("context"), Gt = /* @__PURE__ */ S("logger"), ZM = /*
|
|
|
23091
23091
|
for (; ; )
|
|
23092
23092
|
switch (c.p = c.n) {
|
|
23093
23093
|
case 0:
|
|
23094
|
-
return c.p = 0, u(this,
|
|
23094
|
+
return c.p = 0, u(this, Jt)[Jt].info("Negotiating socket consumer", { transport: this.recvTransport }), u(this, Jt)[Jt].debug("[SDP] setting remote offer: ".concat(JSON.stringify(n), " on recvTransport"), { transport: this.recvTransport }), c.n = 1, this.recvTransport.setRemoteOffer(n);
|
|
23095
23095
|
case 1:
|
|
23096
|
-
return i = c.v, a = { transportId: this.recvTransport.serverId, description: { sdp: i.sdp, type: i.type, target: Ui.SUBSCRIBER } }, u(this,
|
|
23096
|
+
return i = c.v, a = { transportId: this.recvTransport.serverId, description: { sdp: i.sdp, type: i.type, target: Ui.SUBSCRIBER } }, u(this, Jt)[Jt].debug("sending renegotiate request: ".concat(JSON.stringify(a), " on recvTransport"), { transport: this.recvTransport }), c.n = 2, this.socket.sendMessagePromise(this.events.renegotiateSessionDescription, YP.toBinary(a));
|
|
23097
23097
|
case 2:
|
|
23098
|
-
return u(this,
|
|
23098
|
+
return u(this, Jt)[Jt].info("Renegotiation done", { transport: this.recvTransport }), c.a(2, i);
|
|
23099
23099
|
case 3:
|
|
23100
|
-
return c.p = 3, o = c.v, u(this,
|
|
23100
|
+
return c.p = 3, o = c.v, u(this, Jt)[Jt].error("Failed to renegotiate", { error: o }), c.a(2, void 0);
|
|
23101
23101
|
}
|
|
23102
23102
|
}, t, this, [[0, 3]]);
|
|
23103
23103
|
}));
|
|
@@ -23127,7 +23127,7 @@ var id = /* @__PURE__ */ S("context"), Gt = /* @__PURE__ */ S("logger"), ZM = /*
|
|
|
23127
23127
|
case 0:
|
|
23128
23128
|
return v = d.map(function(P) {
|
|
23129
23129
|
return P.localId;
|
|
23130
|
-
}), u(i,
|
|
23130
|
+
}), u(i, Jt)[Jt].info("Closing consumers: ".concat(JSON.stringify(v))), f = { description: { sdp: p.sdp, type: p.type, target: Ui.SUBSCRIBER }, consumerIds: v, consumingTransportId: i.recvTransport.serverId }, k.n = 1, i.socketHandler.closeConsumer(f);
|
|
23131
23131
|
case 1:
|
|
23132
23132
|
return g = k.v, y = PE.fromBinary(g).description, k.a(2, { sdp: y.sdp, type: y.type });
|
|
23133
23133
|
}
|
|
@@ -23162,7 +23162,7 @@ var id = /* @__PURE__ */ S("context"), Gt = /* @__PURE__ */ S("logger"), ZM = /*
|
|
|
23162
23162
|
a.requests.push({ producerId: d, producingTransportId: p, mid: v, simulcast: { preferredRid: i === 0 ? "q" : "h", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } });
|
|
23163
23163
|
}), c.n = 1, this.socketHandler.updateConsumersSimulcastConfig(a);
|
|
23164
23164
|
case 1:
|
|
23165
|
-
u(this,
|
|
23165
|
+
u(this, Jt)[Jt].info("Consumers switched layers to ".concat(i), { consumerIds: o == null ? void 0 : o.map(function(l) {
|
|
23166
23166
|
var d = l.id;
|
|
23167
23167
|
return d;
|
|
23168
23168
|
}) });
|
|
@@ -24940,11 +24940,11 @@ var OO = Object.defineProperty, DO = Object.getOwnPropertyDescriptor, zs = funct
|
|
|
24940
24940
|
for (var i = n > 1 ? void 0 : n ? DO(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
24941
24941
|
(o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
24942
24942
|
return n && i && OO(e, t, i), i;
|
|
24943
|
-
}, jg = (ao = /* @__PURE__ */ S("socketService"),
|
|
24943
|
+
}, jg = (ao = /* @__PURE__ */ S("socketService"), Ft = /* @__PURE__ */ S("roomSocketHandler"), Z = /* @__PURE__ */ S("context"), yt = /* @__PURE__ */ S("roomNodeClient"), /* @__PURE__ */ function() {
|
|
24944
24944
|
function s(r, e, t, n) {
|
|
24945
|
-
b(this, s), Object.defineProperty(this, yt, { get: LO, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ao, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this,
|
|
24945
|
+
b(this, s), Object.defineProperty(this, yt, { get: LO, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ao, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Ft, { writable: !0, value: void 0 }), Object.defineProperty(this, Z, { writable: !0, value: void 0 });
|
|
24946
24946
|
var i = t.socket, a = r.getValue("authToken");
|
|
24947
|
-
this.self = e, u(this, Z)[Z] = r, this.viewType = n, this.authToken = a, u(this, ao)[ao] = i, u(this,
|
|
24947
|
+
this.self = e, u(this, Z)[Z] = r, this.viewType = n, this.authToken = a, u(this, ao)[ao] = i, u(this, Ft)[Ft] = t, this.setupEvents();
|
|
24948
24948
|
}
|
|
24949
24949
|
return w(s, [{ key: "peerId", get: function() {
|
|
24950
24950
|
return u(this, Z)[Z].getValue("peerId");
|
|
@@ -25137,17 +25137,17 @@ var OO = Object.defineProperty, DO = Object.getOwnPropertyDescriptor, zs = funct
|
|
|
25137
25137
|
e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
|
|
25138
25138
|
}), u(this, Z)[Z].getValue("peerSessionStore").on($.SOCKET_SERVICE_FAILED, function() {
|
|
25139
25139
|
e.logger.error("Socket reconnection failed after exhausting all attempts. SDK re-initialization is required."), e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
|
|
25140
|
-
}), u(this,
|
|
25140
|
+
}), u(this, Ft)[Ft].on(Q.waitingRoomRequestAccepted, function() {
|
|
25141
25141
|
e.waitlistAcceptHandler();
|
|
25142
|
-
}), u(this,
|
|
25142
|
+
}), u(this, Ft)[Ft].on(Nc.updateUserPreset, function(t) {
|
|
25143
25143
|
t.updatePeersPresets.forEach(function(n) {
|
|
25144
25144
|
n.userIds === e.self.userId && u(e, Z)[Z].getValue("peerSessionStore").emit($.UPDATE_PERMISSIONS, n.patch);
|
|
25145
25145
|
});
|
|
25146
|
-
}), u(this,
|
|
25146
|
+
}), u(this, Ft)[Ft].on(Q.waitingRoomRequestDenied, function() {
|
|
25147
25147
|
e.waitlistRejectedHandler();
|
|
25148
|
-
}), u(this,
|
|
25148
|
+
}), u(this, Ft)[Ft].on(Q.kick, function() {
|
|
25149
25149
|
e.kickHandler({ kickType: "kick" });
|
|
25150
|
-
}), u(this,
|
|
25150
|
+
}), u(this, Ft)[Ft].on(Q.kickAll, function() {
|
|
25151
25151
|
e.kickHandler({ kickType: "kickAll" });
|
|
25152
25152
|
}), u(this, Z)[Z].getValue("peerSessionStore").onAsync($.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), u(this, Z)[Z].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
|
|
25153
25153
|
var n, i = t.score, a = t.kind, o = t.appData, c = t.scoreStats, l = (n = o == null ? void 0 : o.screenShare) !== null && n !== void 0 ? n : !1;
|
|
@@ -25192,9 +25192,9 @@ var OO = Object.defineProperty, DO = Object.getOwnPropertyDescriptor, zs = funct
|
|
|
25192
25192
|
for (; ; )
|
|
25193
25193
|
switch (p.p = p.n) {
|
|
25194
25194
|
case 0:
|
|
25195
|
-
return n = c.length > 0 && c[0] !== void 0 ? c[0] : !1, p.p = 1, this.logger.info("Joining socket room."), p.n = 2, u(this,
|
|
25195
|
+
return n = c.length > 0 && c[0] !== void 0 ? c[0] : !1, p.p = 1, this.logger.info("Joining socket room."), p.n = 2, u(this, Ft)[Ft].joinRoom(this.self);
|
|
25196
25196
|
case 2:
|
|
25197
|
-
if (i = p.v, a = i.peer, this.logger.info("Joined socket room."), u(this,
|
|
25197
|
+
if (i = p.v, a = i.peer, this.logger.info("Joined socket room."), u(this, Ft)[Ft].socket.flush(), o = Xh(a.stageType), u(this, Z)[Z].setValue("stageStatus", o, !1), !a.waitlisted) {
|
|
25198
25198
|
p.n = 3;
|
|
25199
25199
|
break;
|
|
25200
25200
|
}
|
|
@@ -25228,22 +25228,28 @@ var OO = Object.defineProperty, DO = Object.getOwnPropertyDescriptor, zs = funct
|
|
|
25228
25228
|
return e;
|
|
25229
25229
|
}() }, { key: "leaveRoom", value: function() {
|
|
25230
25230
|
var r = m(/* @__PURE__ */ h().m(function t() {
|
|
25231
|
-
var n, i, a = arguments;
|
|
25232
|
-
return h().w(function(
|
|
25231
|
+
var n, i, a, o = arguments;
|
|
25232
|
+
return h().w(function(c) {
|
|
25233
25233
|
for (; ; )
|
|
25234
|
-
switch (
|
|
25234
|
+
switch (c.n) {
|
|
25235
25235
|
case 0:
|
|
25236
|
-
if (i =
|
|
25237
|
-
|
|
25236
|
+
if (i = o.length > 0 && o[0] !== void 0 ? o[0] : "left", this.logger.info("Leaving room with state: ".concat(i)), i !== "rejected") {
|
|
25237
|
+
c.n = 1;
|
|
25238
25238
|
break;
|
|
25239
25239
|
}
|
|
25240
|
-
return this.self.roomState = i, this.self.emit("roomLeft", { state: i }),
|
|
25240
|
+
return this.self.roomState = i, this.self.emit("roomLeft", { state: i }), c.a(2);
|
|
25241
25241
|
case 1:
|
|
25242
|
-
return this.self.setIsPinned(!1), u(this, Z)[Z].setValue("stageStatus", "OFF_STAGE", !1),
|
|
25242
|
+
return this.self.setIsPinned(!1), u(this, Z)[Z].setValue("stageStatus", "OFF_STAGE", !1), c.n = 2, this.leaveMediaRoom(i);
|
|
25243
25243
|
case 2:
|
|
25244
|
-
u(this, Z)[Z].setValue("roomNodeClient", void 0), u(this, Z)[Z].notify("stageStatus"),
|
|
25244
|
+
if (u(this, Z)[Z].setValue("roomNodeClient", void 0), u(this, Z)[Z].notify("stageStatus"), a = u(this, Z)[Z].getValue("connectionHandler"), a.socketJoined)
|
|
25245
|
+
try {
|
|
25246
|
+
u(this, Ft)[Ft].leaveRoom();
|
|
25247
|
+
} catch (l) {
|
|
25248
|
+
this.logger.error("SelfController.leaveRoom: socket leave failed", { error: l });
|
|
25249
|
+
}
|
|
25250
|
+
(n = u(this, Z)[Z].getValue("roomSocketHandler")) === null || n === void 0 || n.cleanup(), this.self.roomState = i, this.self.emit("roomLeft", { state: i }), this.logger.info("roomLeft event emitted with state: ".concat(i));
|
|
25245
25251
|
case 3:
|
|
25246
|
-
return
|
|
25252
|
+
return c.a(2);
|
|
25247
25253
|
}
|
|
25248
25254
|
}, t, this);
|
|
25249
25255
|
}));
|
|
@@ -25833,22 +25839,8 @@ var jO = Object.defineProperty, FO = Object.getOwnPropertyDescriptor, HO = funct
|
|
|
25833
25839
|
}
|
|
25834
25840
|
return e;
|
|
25835
25841
|
}() }, { key: "leaveRoom", value: function() {
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
for (; ; )
|
|
25839
|
-
switch (n.n) {
|
|
25840
|
-
case 0:
|
|
25841
|
-
this.socket.joinAttempted = !1, this.socket.sendMessagePromise(Q.leaveRoom, kC.toBinary({}));
|
|
25842
|
-
case 1:
|
|
25843
|
-
return n.a(2);
|
|
25844
|
-
}
|
|
25845
|
-
}, t, this);
|
|
25846
|
-
}));
|
|
25847
|
-
function e() {
|
|
25848
|
-
return r.apply(this, arguments);
|
|
25849
|
-
}
|
|
25850
|
-
return e;
|
|
25851
|
-
}() }, { key: "kick", value: function() {
|
|
25842
|
+
return this.socket.joinAttempted = !1, this.socket.sendMessage(Q.leaveRoom, kC.toBinary({}));
|
|
25843
|
+
} }, { key: "kick", value: function() {
|
|
25852
25844
|
var r = m(/* @__PURE__ */ h().m(function t(n) {
|
|
25853
25845
|
var i;
|
|
25854
25846
|
return h().w(function(a) {
|
|
@@ -28153,7 +28145,7 @@ var Si = /* @__PURE__ */ S("trackMap"), F2 = /* @__PURE__ */ function(s) {
|
|
|
28153
28145
|
}, { key: "setupContext", value: function(e, t, n, i) {
|
|
28154
28146
|
var a, o, c = ba.createContext(e, t), l = N(N({}, lP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
|
|
28155
28147
|
return c.setValue("options", t), c.setValue("peerId", e), c.setValue("modules", l), c.setValue("sdkName", "web-core"), c.setValue("meetingId", n), c.setValue("apiBase", i.apiBase), c.setValue("baseURI", i.baseURI), c.setValue("userId", i.participantId), c.setValue("organizationId", i.orgId), c.setValue("authToken", t.authToken), c.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), c.setValue("env", dP({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
|
|
28156
|
-
}), c.setValue("cachedUserDetails", ei(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.
|
|
28148
|
+
}), c.setValue("cachedUserDetails", ei(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.4"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new F2()), c;
|
|
28157
28149
|
} }]);
|
|
28158
28150
|
}());
|
|
28159
28151
|
Ol([sr("0002"), Wi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ea.prototype, "join", 1);
|