@cloudflare/realtimekit-react 0.5.0-staging.128 → 0.5.0-staging.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +133 -139
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -5478,7 +5478,7 @@ class Gm extends lt {
|
|
|
5478
5478
|
}) || e[e.length - 1];
|
|
5479
5479
|
}
|
|
5480
5480
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
5481
|
-
var A, C, L, H, B, F, Q, X, oe, et,
|
|
5481
|
+
var A, C, L, H, B, F, Q, X, oe, et, Pt, lr, Kr;
|
|
5482
5482
|
const c = e, d = new jm(), h = r.length ? new Set(r) : void 0, m = [], g = [], T = [], _ = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
|
5483
5483
|
for (const M of c.values()) {
|
|
5484
5484
|
if (h) {
|
|
@@ -5742,7 +5742,7 @@ class Gm extends lt {
|
|
|
5742
5742
|
}), P.set(R, {
|
|
5743
5743
|
score: +(b.score * 10).toFixed(),
|
|
5744
5744
|
packetsLostPercentage: Zc({
|
|
5745
|
-
packetsLost: (b.packetsLost || 0) - (((
|
|
5745
|
+
packetsLost: (b.packetsLost || 0) - (((Pt = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : Pt.packetsLost) || 0),
|
|
5746
5746
|
packetsReceived: (b.packetsReceived || 0) - (((lr = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : lr.packetsReceived) || 0)
|
|
5747
5747
|
}),
|
|
5748
5748
|
jitter: b.jitter || 0,
|
|
@@ -6111,7 +6111,7 @@ class Wm extends Gm {
|
|
|
6111
6111
|
};
|
|
6112
6112
|
}
|
|
6113
6113
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
6114
|
-
var A, C, L, H, B, F, Q, X, oe, et,
|
|
6114
|
+
var A, C, L, H, B, F, Q, X, oe, et, Pt, lr, Kr;
|
|
6115
6115
|
const c = e, d = new jm(), h = r.length ? new Set(r) : void 0, m = [], g = [], T = [], _ = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
|
6116
6116
|
for (const M of c.values()) {
|
|
6117
6117
|
if (h) {
|
|
@@ -6375,7 +6375,7 @@ class Wm extends Gm {
|
|
|
6375
6375
|
}), P.set(R, {
|
|
6376
6376
|
score: +(b.score * 10).toFixed(),
|
|
6377
6377
|
packetsLostPercentage: Zc({
|
|
6378
|
-
packetsLost: (b.packetsLost || 0) - (((
|
|
6378
|
+
packetsLost: (b.packetsLost || 0) - (((Pt = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : Pt.packetsLost) || 0),
|
|
6379
6379
|
packetsReceived: (b.packetsReceived || 0) - (((lr = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : lr.packetsReceived) || 0)
|
|
6380
6380
|
}),
|
|
6381
6381
|
jitter: b.jitter || 0,
|
|
@@ -8119,7 +8119,7 @@ JE(KE, {
|
|
|
8119
8119
|
permissions: () => zE,
|
|
8120
8120
|
theme: () => YE
|
|
8121
8121
|
});
|
|
8122
|
-
var
|
|
8122
|
+
var At = /* @__PURE__ */ ((s) => (s.GroupCall = "GROUP_CALL", s.Webinar = "WEBINAR", s.AudioRoom = "AUDIO_ROOM", s.Livestream = "LIVESTREAM", s.Chat = "CHAT", s))(At || {}), G = /* @__PURE__ */ ((s) => (s.Allowed = "ALLOWED", s.NotAllowed = "NOT_ALLOWED", s.CanRequest = "CAN_REQUEST", s))(G || {}), zE = {
|
|
8123
8123
|
view_type: "GROUP_CALL",
|
|
8124
8124
|
accept_waiting_requests: false,
|
|
8125
8125
|
accept_present_requests: false,
|
|
@@ -8994,8 +8994,8 @@ function oh(s, t, e) {
|
|
|
8994
8994
|
return h = X, c = setTimeout(L, t), m ? _(X) : o;
|
|
8995
8995
|
}
|
|
8996
8996
|
function A(X) {
|
|
8997
|
-
var oe = X - d, et = X - h,
|
|
8998
|
-
return g ? SP(
|
|
8997
|
+
var oe = X - d, et = X - h, Pt = t - oe;
|
|
8998
|
+
return g ? SP(Pt, n - et) : Pt;
|
|
8999
8999
|
}
|
|
9000
9000
|
function C(X) {
|
|
9001
9001
|
var oe = X - d, et = X - h;
|
|
@@ -17089,7 +17089,7 @@ const sf = (dm = class {
|
|
|
17089
17089
|
t.config.viewType,
|
|
17090
17090
|
e,
|
|
17091
17091
|
n
|
|
17092
|
-
), this.ai = r, v(this, yr, t), v(this, _n, e), this.aiSocketHandler = i, t.config.viewType !==
|
|
17092
|
+
), this.ai = r, v(this, yr, t), v(this, _n, e), this.aiSocketHandler = i, t.config.viewType !== At.Chat && this.setupEvents();
|
|
17093
17093
|
}
|
|
17094
17094
|
static init(s, t, e, r, i) {
|
|
17095
17095
|
return u(this, null, function* () {
|
|
@@ -17336,7 +17336,7 @@ class Gr extends Ut {
|
|
|
17336
17336
|
throw new w("You are already on stage.", "2006");
|
|
17337
17337
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || a(this, ce).permissions.stageAccess === G.NotAllowed)
|
|
17338
17338
|
throw new w(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
17339
|
-
if (yield a(this, Gt).joinStage(), e ===
|
|
17339
|
+
if (yield a(this, Gt).joinStage(), e === At.Livestream) {
|
|
17340
17340
|
yield a(this, Pn).joinRoom(a(this, ce));
|
|
17341
17341
|
const { peers: r } = yield a(this, Pn).getStagePeers();
|
|
17342
17342
|
k.emit(I.SOCKET_PEERS, r);
|
|
@@ -20197,16 +20197,16 @@ Rl([
|
|
|
20197
20197
|
const HM = _c, Jp = gs(
|
|
20198
20198
|
ah()
|
|
20199
20199
|
);
|
|
20200
|
-
var
|
|
20200
|
+
var Ct, gi, Mo, Ln;
|
|
20201
20201
|
const nn = class {
|
|
20202
20202
|
constructor(t) {
|
|
20203
|
-
f(this,
|
|
20203
|
+
f(this, Ct, void 0);
|
|
20204
20204
|
f(this, gi, void 0);
|
|
20205
20205
|
f(this, Mo, void 0);
|
|
20206
20206
|
f(this, Ln, void 0);
|
|
20207
20207
|
if (!t)
|
|
20208
20208
|
throw new w("Could not load preset.", "0904");
|
|
20209
|
-
v(this,
|
|
20209
|
+
v(this, Ct, t.config), v(this, Mo, t.name), v(this, gi, t.ui || gs(ah().ui)), v(this, Ln, t.permissions.plugins.config);
|
|
20210
20210
|
}
|
|
20211
20211
|
static fromResponse(t) {
|
|
20212
20212
|
return new nn(t);
|
|
@@ -20259,16 +20259,16 @@ const nn = class {
|
|
|
20259
20259
|
return true;
|
|
20260
20260
|
}
|
|
20261
20261
|
get viewType() {
|
|
20262
|
-
return a(this,
|
|
20262
|
+
return a(this, Ct).viewType;
|
|
20263
20263
|
}
|
|
20264
20264
|
get livestreamViewerQualities() {
|
|
20265
|
-
return a(this,
|
|
20265
|
+
return a(this, Ct).livestreamViewerQualities || [];
|
|
20266
20266
|
}
|
|
20267
20267
|
get maxVideoStreams() {
|
|
20268
|
-
return a(this,
|
|
20268
|
+
return a(this, Ct).maxVideoStreams;
|
|
20269
20269
|
}
|
|
20270
20270
|
get maxScreenShareCount() {
|
|
20271
|
-
return a(this,
|
|
20271
|
+
return a(this, Ct).maxScreenshareCount;
|
|
20272
20272
|
}
|
|
20273
20273
|
get plugins() {
|
|
20274
20274
|
return [];
|
|
@@ -20286,16 +20286,16 @@ const nn = class {
|
|
|
20286
20286
|
var t, e, r, i, n, o, c, d, h, m, g, T, _, P, A, C, L, H, B, F, Q, X, oe, et;
|
|
20287
20287
|
return {
|
|
20288
20288
|
audio: {
|
|
20289
|
-
enableStereo: (i = (r = (e = (t = a(this,
|
|
20290
|
-
enableHighBitrate: (d = (c = (o = (n = a(this,
|
|
20289
|
+
enableStereo: (i = (r = (e = (t = a(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Qi.audio.enableStereo,
|
|
20290
|
+
enableHighBitrate: (d = (c = (o = (n = a(this, Ct)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Qi.audio.enableHighBitrate
|
|
20291
20291
|
},
|
|
20292
20292
|
video: {
|
|
20293
|
-
quality: (T = (g = (m = (h = a(this,
|
|
20294
|
-
frameRate: (C = (A = (P = (_ = a(this,
|
|
20293
|
+
quality: (T = (g = (m = (h = a(this, Ct)) == null ? void 0 : h.media) == null ? void 0 : m.video) == null ? void 0 : g.quality) != null ? T : Qi.video.quality,
|
|
20294
|
+
frameRate: (C = (A = (P = (_ = a(this, Ct)) == null ? void 0 : _.media) == null ? void 0 : P.video) == null ? void 0 : A.frameRate) != null ? C : Qi.video.frameRate
|
|
20295
20295
|
},
|
|
20296
20296
|
screenshare: {
|
|
20297
|
-
quality: (F = (B = (H = (L = a(this,
|
|
20298
|
-
frameRate: (et = (oe = (X = (Q = a(this,
|
|
20297
|
+
quality: (F = (B = (H = (L = a(this, Ct)) == null ? void 0 : L.media) == null ? void 0 : H.screenshare) == null ? void 0 : B.quality) != null ? F : Qi.screenshare.quality,
|
|
20298
|
+
frameRate: (et = (oe = (X = (Q = a(this, Ct)) == null ? void 0 : Q.media) == null ? void 0 : X.screenshare) == null ? void 0 : oe.frameRate) != null ? et : Qi.screenshare.frameRate
|
|
20299
20299
|
}
|
|
20300
20300
|
};
|
|
20301
20301
|
}
|
|
@@ -20304,7 +20304,7 @@ const nn = class {
|
|
|
20304
20304
|
}
|
|
20305
20305
|
};
|
|
20306
20306
|
let Ru = nn;
|
|
20307
|
-
|
|
20307
|
+
Ct = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap(), Ln = /* @__PURE__ */ new WeakMap();
|
|
20308
20308
|
var qM = Object.defineProperty, jM = Object.getOwnPropertyDescriptor, hf = (s, t, e, r) => {
|
|
20309
20309
|
for (var i = r > 1 ? void 0 : r ? jM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20310
20310
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -21081,8 +21081,8 @@ var i0 = Object.defineProperty, n0 = Object.getOwnPropertyDescriptor, Bt = (s, t
|
|
|
21081
21081
|
return r && i && i0(t, e, i), i;
|
|
21082
21082
|
};
|
|
21083
21083
|
const a0 = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
21084
|
-
var zt, Si, eo, Ei, to, Hn, Wc, _i,
|
|
21085
|
-
let
|
|
21084
|
+
var zt, Si, eo, Ei, to, Hn, Wc, _i, Rt, gm;
|
|
21085
|
+
let Et = (gm = class extends Ut {
|
|
21086
21086
|
constructor(t, e, r) {
|
|
21087
21087
|
super();
|
|
21088
21088
|
f(this, Si);
|
|
@@ -21097,7 +21097,7 @@ let _t = (gm = class extends Ut {
|
|
|
21097
21097
|
p(this, "all");
|
|
21098
21098
|
f(this, zt, void 0);
|
|
21099
21099
|
f(this, _i, void 0);
|
|
21100
|
-
f(this,
|
|
21100
|
+
f(this, Rt, void 0);
|
|
21101
21101
|
p(this, "rateLimitConfig", {
|
|
21102
21102
|
maxInvocations: 5,
|
|
21103
21103
|
period: 1
|
|
@@ -21106,7 +21106,7 @@ let _t = (gm = class extends Ut {
|
|
|
21106
21106
|
p(this, "currentPage");
|
|
21107
21107
|
p(this, "lastActiveSpeaker");
|
|
21108
21108
|
p(this, "selectedPeers", vf);
|
|
21109
|
-
v(this, zt, t), v(this, _i, e), v(this,
|
|
21109
|
+
v(this, zt, t), v(this, _i, e), v(this, Rt, r), this.waitlisted = new ii(), this.joined = new ii(), this.videoSubscribed = new ii(), this.audioSubscribed = new ii(), this.active = this.videoSubscribed, this.pinned = new ii(), this.all = new t0(), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
21110
21110
|
}
|
|
21111
21111
|
get pip() {
|
|
21112
21112
|
return a(this, zt).getValue("pip");
|
|
@@ -21155,7 +21155,7 @@ let _t = (gm = class extends Ut {
|
|
|
21155
21155
|
"1205"
|
|
21156
21156
|
);
|
|
21157
21157
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
21158
|
-
return a(this,
|
|
21158
|
+
return a(this, Rt).acceptWaitingRoomRequest([e]);
|
|
21159
21159
|
}
|
|
21160
21160
|
acceptAllWaitingRoomRequest(t) {
|
|
21161
21161
|
return u(this, null, function* () {
|
|
@@ -21163,7 +21163,7 @@ let _t = (gm = class extends Ut {
|
|
|
21163
21163
|
var i, n;
|
|
21164
21164
|
return (n = (i = this.waitlisted.get(r)) == null ? void 0 : i.userId) != null ? n : r;
|
|
21165
21165
|
});
|
|
21166
|
-
return a(this,
|
|
21166
|
+
return a(this, Rt).acceptWaitingRoomRequest(e);
|
|
21167
21167
|
});
|
|
21168
21168
|
}
|
|
21169
21169
|
rejectWaitingRoomRequest(t) {
|
|
@@ -21175,7 +21175,7 @@ let _t = (gm = class extends Ut {
|
|
|
21175
21175
|
"1205"
|
|
21176
21176
|
);
|
|
21177
21177
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
21178
|
-
a(this,
|
|
21178
|
+
a(this, Rt).rejectWaitingRoomRequest([e]);
|
|
21179
21179
|
});
|
|
21180
21180
|
}
|
|
21181
21181
|
setViewMode(t) {
|
|
@@ -21399,7 +21399,7 @@ let _t = (gm = class extends Ut {
|
|
|
21399
21399
|
"1201"
|
|
21400
21400
|
);
|
|
21401
21401
|
const e = z.hasFeature(re.PROPAGATE_KICK_ALL);
|
|
21402
|
-
a(this,
|
|
21402
|
+
a(this, Rt).kickAll(e);
|
|
21403
21403
|
});
|
|
21404
21404
|
}
|
|
21405
21405
|
broadcastMessage(t, e, r) {
|
|
@@ -21410,7 +21410,7 @@ let _t = (gm = class extends Ut {
|
|
|
21410
21410
|
throw new w("`type` must be a non-empty string.", "1209");
|
|
21411
21411
|
if (r)
|
|
21412
21412
|
if ("meetingIds" in r)
|
|
21413
|
-
yield a(this,
|
|
21413
|
+
yield a(this, Rt).broadcastToMeetings(t, r.meetingIds, e);
|
|
21414
21414
|
else {
|
|
21415
21415
|
let i = [];
|
|
21416
21416
|
"participantIds" in r ? i = r.participantIds : i = this.joined.toArray().filter(
|
|
@@ -21418,15 +21418,15 @@ let _t = (gm = class extends Ut {
|
|
|
21418
21418
|
var o;
|
|
21419
21419
|
return (o = r.presetNames) == null ? void 0 : o.includes(n.presetName);
|
|
21420
21420
|
}
|
|
21421
|
-
).map((n) => n.id), yield a(this,
|
|
21421
|
+
).map((n) => n.id), yield a(this, Rt).broadcastToPeers(t, i, e);
|
|
21422
21422
|
}
|
|
21423
21423
|
else
|
|
21424
|
-
yield a(this,
|
|
21424
|
+
yield a(this, Rt).broadcastMessage(t, e);
|
|
21425
21425
|
});
|
|
21426
21426
|
}
|
|
21427
21427
|
getAllJoinedPeers(t, e, r) {
|
|
21428
21428
|
return u(this, null, function* () {
|
|
21429
|
-
return (yield a(this,
|
|
21429
|
+
return (yield a(this, Rt).getRoomPeers(t, e, r)).peers.map(dr.formatSocketServiceMessage);
|
|
21430
21430
|
});
|
|
21431
21431
|
}
|
|
21432
21432
|
updatePermissions(t, e) {
|
|
@@ -21434,12 +21434,12 @@ let _t = (gm = class extends Ut {
|
|
|
21434
21434
|
const r = this.joined.toArray().filter((n) => t.includes(n.id)).map((n) => n.userId), i = [...new Set(r)];
|
|
21435
21435
|
if (!i.length)
|
|
21436
21436
|
throw new w("Cannot update permissions, no valid userIDs found", "1204");
|
|
21437
|
-
a(this,
|
|
21437
|
+
a(this, Rt).updatePermissions(i, e);
|
|
21438
21438
|
});
|
|
21439
21439
|
}
|
|
21440
21440
|
getParticipantsInMeetingPreJoin() {
|
|
21441
21441
|
return u(this, null, function* () {
|
|
21442
|
-
return a(this,
|
|
21442
|
+
return a(this, Rt).getRoomPeersNonPaginated();
|
|
21443
21443
|
});
|
|
21444
21444
|
}
|
|
21445
21445
|
}, zt = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakSet(), eo = function() {
|
|
@@ -21450,49 +21450,49 @@ let _t = (gm = class extends Ut {
|
|
|
21450
21450
|
}, Hn = /* @__PURE__ */ new WeakSet(), Wc = function() {
|
|
21451
21451
|
var t;
|
|
21452
21452
|
return ((t = a(this, zt).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === true;
|
|
21453
|
-
}, _i = /* @__PURE__ */ new WeakMap(),
|
|
21453
|
+
}, _i = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), gm);
|
|
21454
21454
|
Bt([
|
|
21455
21455
|
y.trace("DyteParticipants.setViewMode")
|
|
21456
|
-
],
|
|
21456
|
+
], Et.prototype, "setViewMode", 1);
|
|
21457
21457
|
Bt([
|
|
21458
21458
|
y.trace("DyteParticipants.setPage")
|
|
21459
|
-
],
|
|
21459
|
+
], Et.prototype, "setPage", 1);
|
|
21460
21460
|
Bt([
|
|
21461
21461
|
y.trace("DyteParticipants.disableAllAudio")
|
|
21462
|
-
],
|
|
21462
|
+
], Et.prototype, "disableAllAudio", 1);
|
|
21463
21463
|
Bt([
|
|
21464
21464
|
y.trace("DyteParticipants.disableAllVideo")
|
|
21465
|
-
],
|
|
21465
|
+
], Et.prototype, "disableAllVideo", 1);
|
|
21466
21466
|
Bt([
|
|
21467
21467
|
y.trace("DyteParticipants.disablePeerAudio")
|
|
21468
|
-
],
|
|
21468
|
+
], Et.prototype, "disableAudio", 1);
|
|
21469
21469
|
Bt([
|
|
21470
21470
|
y.trace("DyteParticipants.disablePeerVideo")
|
|
21471
|
-
],
|
|
21471
|
+
], Et.prototype, "disableVideo", 1);
|
|
21472
21472
|
Bt([
|
|
21473
21473
|
y.trace("DyteParticipants.kickPeer")
|
|
21474
|
-
],
|
|
21474
|
+
], Et.prototype, "kick", 1);
|
|
21475
21475
|
Bt([
|
|
21476
21476
|
y.trace("DyteParticipants.kickAll")
|
|
21477
|
-
],
|
|
21477
|
+
], Et.prototype, "kickAll", 1);
|
|
21478
21478
|
Bt([
|
|
21479
21479
|
y.trace("DyteParticipants.broadcastMessage"),
|
|
21480
21480
|
Mt(ba, "rateLimitConfig")
|
|
21481
|
-
],
|
|
21481
|
+
], Et.prototype, "broadcastMessage", 1);
|
|
21482
21482
|
Bt([
|
|
21483
21483
|
y.trace("DyteParticipants.getAllJoinedPeers"),
|
|
21484
21484
|
Mt({ maxInvocations: 10, period: 60 })
|
|
21485
|
-
],
|
|
21485
|
+
], Et.prototype, "getAllJoinedPeers", 1);
|
|
21486
21486
|
Bt([
|
|
21487
21487
|
y.trace("DyteParticipant.updatePermissions"),
|
|
21488
21488
|
Mt({ maxInvocations: 1e3, period: 60 })
|
|
21489
|
-
],
|
|
21489
|
+
], Et.prototype, "updatePermissions", 1);
|
|
21490
21490
|
Bt([
|
|
21491
21491
|
y.trace("DyteParticipants.getParticipantsInMeetingPreJoin")
|
|
21492
|
-
],
|
|
21493
|
-
|
|
21492
|
+
], Et.prototype, "getParticipantsInMeetingPreJoin", 1);
|
|
21493
|
+
Et = Bt([
|
|
21494
21494
|
ut("1200")
|
|
21495
|
-
],
|
|
21495
|
+
], Et);
|
|
21496
21496
|
var un = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(un || {}), Be = /* @__PURE__ */ ((s) => (s[s.HIVE = 1] = "HIVE", s[s.ROOM_NODE = 2] = "ROOM_NODE", s[s.CF = 3] = "CF", s))(Be || {}), o0 = Object.defineProperty, c0 = Object.getOwnPropertyDescriptor, zi = (s, t, e, r) => {
|
|
21497
21497
|
for (var i = r > 1 ? void 0 : r ? c0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
21498
21498
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -21538,7 +21538,7 @@ const Jc = (fm = class {
|
|
|
21538
21538
|
l.error("Error deactivating peers", { error: e2 });
|
|
21539
21539
|
}
|
|
21540
21540
|
}));
|
|
21541
|
-
switch (this.context = s, this.roomSocketHandler = e, this.participants = new
|
|
21541
|
+
switch (this.context = s, this.roomSocketHandler = e, this.participants = new Et(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), r) {
|
|
21542
21542
|
case Be.HIVE: {
|
|
21543
21543
|
this.events = es;
|
|
21544
21544
|
break;
|
|
@@ -22089,21 +22089,15 @@ const Jc = (fm = class {
|
|
|
22089
22089
|
}
|
|
22090
22090
|
onParticipantJoined(s) {
|
|
22091
22091
|
return u(this, null, function* () {
|
|
22092
|
-
var e, r
|
|
22093
|
-
|
|
22092
|
+
var t, e, r;
|
|
22093
|
+
this.self.id !== s.id && !((t = s.flags) != null && t.recorder) && !((e = s.flags) != null && e.hidden_participant) && !((r = s.flags) != null && r.hiddenParticipant) && (this.participants.videoSubscribed.delete(s.id), this.participants.audioSubscribed.delete(s.id), this.participants.joined.add(s), this.participants.waitlisted.delete(s.id), s.stageStatus === "REQUESTED_TO_JOIN_STAGE" && k.emit(I.UPDATE_STAGE_REQUESTS, {
|
|
22094
22094
|
request: {
|
|
22095
22095
|
displayName: s.name,
|
|
22096
22096
|
userId: s.userId,
|
|
22097
22097
|
peerId: s.id
|
|
22098
22098
|
},
|
|
22099
22099
|
add: true
|
|
22100
|
-
})), k.emit(I.PEER_JOINED_INTERNAL, s)
|
|
22101
|
-
return;
|
|
22102
|
-
const t = this.participants.currentPage;
|
|
22103
|
-
this.updateSubscriptions(
|
|
22104
|
-
t ? "PAGINATED" : "ACTIVE_GRID",
|
|
22105
|
-
{ page: t }
|
|
22106
|
-
);
|
|
22100
|
+
})), k.emit(I.PEER_JOINED_INTERNAL, s);
|
|
22107
22101
|
});
|
|
22108
22102
|
}
|
|
22109
22103
|
onParticipantLeave(s) {
|
|
@@ -22480,7 +22474,7 @@ const an = class extends Ut {
|
|
|
22480
22474
|
}
|
|
22481
22475
|
get stageEnabled() {
|
|
22482
22476
|
var e;
|
|
22483
|
-
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this, Wn) ===
|
|
22477
|
+
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this, Wn) === At.Webinar || a(this, Wn) === At.Livestream;
|
|
22484
22478
|
}
|
|
22485
22479
|
get acceptStageRequests() {
|
|
22486
22480
|
var e, r;
|
|
@@ -22980,7 +22974,7 @@ const Qa = {}, Wr = {
|
|
|
22980
22974
|
};
|
|
22981
22975
|
}
|
|
22982
22976
|
};
|
|
22983
|
-
var l0 = Object.defineProperty, u0 = Object.getOwnPropertyDescriptor,
|
|
22977
|
+
var l0 = Object.defineProperty, u0 = Object.getOwnPropertyDescriptor, _t = (s, t, e, r) => {
|
|
22984
22978
|
for (var i = r > 1 ? void 0 : r ? u0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
22985
22979
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
22986
22980
|
return r && i && l0(t, e, i), i;
|
|
@@ -23011,7 +23005,7 @@ let ze = (vm = class extends d0 {
|
|
|
23011
23005
|
p(this, "roomState", "init");
|
|
23012
23006
|
f(this, Yn, /* @__PURE__ */ new Set());
|
|
23013
23007
|
f(this, Qn, /* @__PURE__ */ new Set());
|
|
23014
|
-
v(this, Cs, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (o = e.customParticipantId) != null ? o : e.clientSpecificId, this.waitlistStatus = "none", v(this, ft, r), v(this, Kn, i), this.hidden = false, v(this, zn, false), this.organizationId = e.organizationId, this.supportsRemoteControl = Ce.isElectron(), this.device = Ce.getDeviceInfo(), this.presetName = n, i.viewType !==
|
|
23008
|
+
v(this, Cs, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (o = e.customParticipantId) != null ? o : e.clientSpecificId, this.waitlistStatus = "none", v(this, ft, r), v(this, Kn, i), this.hidden = false, v(this, zn, false), this.organizationId = e.organizationId, this.supportsRemoteControl = Ce.isElectron(), this.device = Ce.getDeviceInfo(), this.presetName = n, i.viewType !== At.Chat && this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), x(this, Vo, Iu).call(this);
|
|
23015
23009
|
}
|
|
23016
23010
|
get stageStatus() {
|
|
23017
23011
|
return a(this, Cs).getValue("stageStatus");
|
|
@@ -23025,7 +23019,7 @@ let ze = (vm = class extends d0 {
|
|
|
23025
23019
|
let c = (T = (g = t.getValue("defaults")) == null ? void 0 : g.audio) != null ? T : true, d = (P = (_ = t.getValue("defaults")) == null ? void 0 : _.video) != null ? P : true;
|
|
23026
23020
|
r.canProduceAudio !== "ALLOWED" && (c = false), r.canProduceVideo !== "ALLOWED" && (d = false);
|
|
23027
23021
|
const h = new ze(t, e, r, i, n);
|
|
23028
|
-
if (i.viewType ===
|
|
23022
|
+
if (i.viewType === At.Chat)
|
|
23029
23023
|
return h;
|
|
23030
23024
|
const m = SM(i.mediaConstraints);
|
|
23031
23025
|
return hr(m, (A = t.getValue("defaults")) == null ? void 0 : A.mediaConfiguration), yield h.init({
|
|
@@ -23123,7 +23117,7 @@ let ze = (vm = class extends d0 {
|
|
|
23123
23117
|
}
|
|
23124
23118
|
get roomJoined() {
|
|
23125
23119
|
var t;
|
|
23126
|
-
return a(this, Kn).viewType ===
|
|
23120
|
+
return a(this, Kn).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = a(this, Cs).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === true : a(this, Ue, He);
|
|
23127
23121
|
}
|
|
23128
23122
|
setName(t) {
|
|
23129
23123
|
if (!t)
|
|
@@ -23366,22 +23360,22 @@ let ze = (vm = class extends d0 {
|
|
|
23366
23360
|
}, Yn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), Vo = /* @__PURE__ */ new WeakSet(), Iu = function() {
|
|
23367
23361
|
Array.from(a(this, Qn)).forEach((t) => this.updateVideo(t, false)), Array.from(a(this, Yn)).forEach((t) => this.updateVideo(t, true));
|
|
23368
23362
|
}, vm);
|
|
23369
|
-
|
|
23363
|
+
_t([
|
|
23370
23364
|
y.trace("DyteSelf.cleanupEvents")
|
|
23371
23365
|
], ze.prototype, "cleanupEvents", 1);
|
|
23372
|
-
|
|
23366
|
+
_t([
|
|
23373
23367
|
y.trace("DyteSelf.setupEvents")
|
|
23374
23368
|
], ze.prototype, "setupEvents", 1);
|
|
23375
|
-
|
|
23369
|
+
_t([
|
|
23376
23370
|
y.trace("DyteSelf.setupTracks")
|
|
23377
23371
|
], ze.prototype, "setupTracks", 1);
|
|
23378
|
-
|
|
23372
|
+
_t([
|
|
23379
23373
|
y.trace("DyteSelf.destructMediaHandler")
|
|
23380
23374
|
], ze.prototype, "destructMediaHandler", 1);
|
|
23381
|
-
|
|
23375
|
+
_t([
|
|
23382
23376
|
y.trace("DyteSelf.removeDocumentEventListeners")
|
|
23383
23377
|
], ze.prototype, "removeDocumentEventListeners", 1);
|
|
23384
|
-
|
|
23378
|
+
_t([
|
|
23385
23379
|
Wr.executeWithLock({
|
|
23386
23380
|
methodName: "meeting.self.enableAudio",
|
|
23387
23381
|
lockName: "DyteSelf.toggleAudio",
|
|
@@ -23389,7 +23383,7 @@ Pt([
|
|
|
23389
23383
|
}),
|
|
23390
23384
|
y.trace("DyteSelf.enableAudio")
|
|
23391
23385
|
], ze.prototype, "enableAudio", 1);
|
|
23392
|
-
|
|
23386
|
+
_t([
|
|
23393
23387
|
Wr.executeWithLock({
|
|
23394
23388
|
methodName: "meeting.self.enableVideo",
|
|
23395
23389
|
lockName: "DyteSelf.toggleVideo",
|
|
@@ -23397,10 +23391,10 @@ Pt([
|
|
|
23397
23391
|
}),
|
|
23398
23392
|
y.trace("DyteSelf.enableVideo")
|
|
23399
23393
|
], ze.prototype, "enableVideo", 1);
|
|
23400
|
-
|
|
23394
|
+
_t([
|
|
23401
23395
|
y.trace("DyteSelf.updateVideoConstraints")
|
|
23402
23396
|
], ze.prototype, "updateVideoConstraints", 1);
|
|
23403
|
-
|
|
23397
|
+
_t([
|
|
23404
23398
|
y.trace("DyteSelf.enableScreenShare"),
|
|
23405
23399
|
Wr.executeWithLock({
|
|
23406
23400
|
methodName: "meeting.self.enableScreenShare",
|
|
@@ -23408,10 +23402,10 @@ Pt([
|
|
|
23408
23402
|
timeout: 3e3
|
|
23409
23403
|
})
|
|
23410
23404
|
], ze.prototype, "enableScreenShare", 1);
|
|
23411
|
-
|
|
23405
|
+
_t([
|
|
23412
23406
|
y.trace("DyteSelf.updateScreenshareConstraints")
|
|
23413
23407
|
], ze.prototype, "updateScreenshareConstraints", 1);
|
|
23414
|
-
|
|
23408
|
+
_t([
|
|
23415
23409
|
Wr.executeWithLock({
|
|
23416
23410
|
methodName: "meeting.self.disableAudio",
|
|
23417
23411
|
lockName: "DyteSelf.toggleAudio",
|
|
@@ -23419,7 +23413,7 @@ Pt([
|
|
|
23419
23413
|
}),
|
|
23420
23414
|
y.trace("DyteSelf.disableAudio")
|
|
23421
23415
|
], ze.prototype, "disableAudio", 1);
|
|
23422
|
-
|
|
23416
|
+
_t([
|
|
23423
23417
|
Wr.executeWithLock({
|
|
23424
23418
|
methodName: "meeting.self.disableVideo",
|
|
23425
23419
|
lockName: "DyteSelf.toggleVideo",
|
|
@@ -23427,7 +23421,7 @@ Pt([
|
|
|
23427
23421
|
}),
|
|
23428
23422
|
y.trace("DyteSelf.disableVideo")
|
|
23429
23423
|
], ze.prototype, "disableVideo", 1);
|
|
23430
|
-
|
|
23424
|
+
_t([
|
|
23431
23425
|
Wr.executeWithLock({
|
|
23432
23426
|
methodName: "meeting.self.disableScreenShare",
|
|
23433
23427
|
lockName: "DyteSelf.toggleScreenShare",
|
|
@@ -23435,10 +23429,10 @@ Pt([
|
|
|
23435
23429
|
}),
|
|
23436
23430
|
y.trace("DyteSelf.disableScreenShare")
|
|
23437
23431
|
], ze.prototype, "disableScreenShare", 1);
|
|
23438
|
-
|
|
23432
|
+
_t([
|
|
23439
23433
|
y.trace("DyteSelf.setDevice")
|
|
23440
23434
|
], ze.prototype, "setDevice", 1);
|
|
23441
|
-
ze =
|
|
23435
|
+
ze = _t([
|
|
23442
23436
|
ut("1100")
|
|
23443
23437
|
], ze);
|
|
23444
23438
|
var h0 = Object.defineProperty, p0 = Object.getOwnPropertyDescriptor, m0 = (s, t, e, r) => {
|
|
@@ -23947,14 +23941,14 @@ class To extends w {
|
|
|
23947
23941
|
super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, To) : this.stack = new Error(t).stack;
|
|
23948
23942
|
}
|
|
23949
23943
|
}
|
|
23950
|
-
class
|
|
23944
|
+
class It extends w {
|
|
23951
23945
|
constructor(t) {
|
|
23952
|
-
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
23946
|
+
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
|
|
23953
23947
|
}
|
|
23954
23948
|
}
|
|
23955
23949
|
class ni extends w {
|
|
23956
23950
|
constructor(t) {
|
|
23957
|
-
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
23951
|
+
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
|
|
23958
23952
|
}
|
|
23959
23953
|
}
|
|
23960
23954
|
const Kp = (s) => new Promise((t) => setTimeout(t, s));
|
|
@@ -24756,7 +24750,7 @@ class E0 extends wl {
|
|
|
24756
24750
|
getStats() {
|
|
24757
24751
|
return u(this, null, function* () {
|
|
24758
24752
|
if (a(this, Rs))
|
|
24759
|
-
throw new
|
|
24753
|
+
throw new It("closed");
|
|
24760
24754
|
return a(this, $o).getReceiverStats(this.localId);
|
|
24761
24755
|
});
|
|
24762
24756
|
}
|
|
@@ -24845,7 +24839,7 @@ class _0 extends wl {
|
|
|
24845
24839
|
getStats() {
|
|
24846
24840
|
return u(this, null, function* () {
|
|
24847
24841
|
if (a(this, Yt))
|
|
24848
|
-
throw new
|
|
24842
|
+
throw new It("closed");
|
|
24849
24843
|
return a(this, os).getSenderStats(this.localId);
|
|
24850
24844
|
});
|
|
24851
24845
|
}
|
|
@@ -24872,9 +24866,9 @@ class _0 extends wl {
|
|
|
24872
24866
|
error: i
|
|
24873
24867
|
}));
|
|
24874
24868
|
}
|
|
24875
|
-
throw new
|
|
24869
|
+
throw new It("closed");
|
|
24876
24870
|
} else if (e && e.readyState === "ended")
|
|
24877
|
-
throw new
|
|
24871
|
+
throw new It("track ended");
|
|
24878
24872
|
if (e === a(this, Xe)) {
|
|
24879
24873
|
l.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this, Vt, rs));
|
|
24880
24874
|
return;
|
|
@@ -24885,7 +24879,7 @@ class _0 extends wl {
|
|
|
24885
24879
|
setMaxSpatialLayer(e) {
|
|
24886
24880
|
return u(this, null, function* () {
|
|
24887
24881
|
if (a(this, Yt))
|
|
24888
|
-
throw new
|
|
24882
|
+
throw new It("closed");
|
|
24889
24883
|
if (this.kind !== "video")
|
|
24890
24884
|
throw new To("not a video Producer");
|
|
24891
24885
|
if (typeof e != "number")
|
|
@@ -24896,7 +24890,7 @@ class _0 extends wl {
|
|
|
24896
24890
|
setRtpEncodingParameters(e) {
|
|
24897
24891
|
return u(this, null, function* () {
|
|
24898
24892
|
if (a(this, Yt))
|
|
24899
|
-
throw new
|
|
24893
|
+
throw new It("closed");
|
|
24900
24894
|
if (typeof e != "object")
|
|
24901
24895
|
throw new TypeError("invalid params");
|
|
24902
24896
|
yield a(this, os).setRtpEncodingParameters(this.localId, e);
|
|
@@ -25217,7 +25211,7 @@ const cn = class extends wl {
|
|
|
25217
25211
|
getStats() {
|
|
25218
25212
|
return u(this, null, function* () {
|
|
25219
25213
|
if (this.closed)
|
|
25220
|
-
throw new
|
|
25214
|
+
throw new It("closed");
|
|
25221
25215
|
return this.handler.getTransportStats();
|
|
25222
25216
|
});
|
|
25223
25217
|
}
|
|
@@ -25242,7 +25236,7 @@ const cn = class extends wl {
|
|
|
25242
25236
|
restartIce() {
|
|
25243
25237
|
return u(this, null, function* () {
|
|
25244
25238
|
if (l.debug("restartIce()"), this.closed)
|
|
25245
|
-
throw new
|
|
25239
|
+
throw new It("closed");
|
|
25246
25240
|
return this.handler.restartIce();
|
|
25247
25241
|
});
|
|
25248
25242
|
}
|
|
@@ -25253,7 +25247,7 @@ const cn = class extends wl {
|
|
|
25253
25247
|
if (this.direction !== "send")
|
|
25254
25248
|
throw new To("not a sending Transport");
|
|
25255
25249
|
if (r.readyState === "ended")
|
|
25256
|
-
throw new
|
|
25250
|
+
throw new It("track ended");
|
|
25257
25251
|
if (i && typeof i != "object")
|
|
25258
25252
|
throw new TypeError("if given, appData must be an object");
|
|
25259
25253
|
} else
|
|
@@ -25329,7 +25323,7 @@ const cn = class extends wl {
|
|
|
25329
25323
|
canConsume() {
|
|
25330
25324
|
return u(this, null, function* () {
|
|
25331
25325
|
if (this.closed)
|
|
25332
|
-
throw new
|
|
25326
|
+
throw new It("closed");
|
|
25333
25327
|
if (this.direction !== "recv")
|
|
25334
25328
|
throw new To("not a receiving transport");
|
|
25335
25329
|
if (!(yield this.transportConnectionPromise))
|
|
@@ -26472,7 +26466,7 @@ ca = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Mr = /*
|
|
|
26472
26466
|
peerId: e.peerId
|
|
26473
26467
|
});
|
|
26474
26468
|
};
|
|
26475
|
-
var Yo, Qo, Xo, ua, ha, pa, Zo, ec, ma,
|
|
26469
|
+
var Yo, Qo, Xo, ua, ha, pa, Zo, ec, ma, wt, cs, ds, Ii, Ai, zs, tc, Wd, Lf, Jd, Vf, Kd, xf, zd, Uf;
|
|
26476
26470
|
const Yd = class {
|
|
26477
26471
|
constructor({
|
|
26478
26472
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -26497,14 +26491,14 @@ const Yd = class {
|
|
|
26497
26491
|
f(this, Zo, void 0);
|
|
26498
26492
|
f(this, ec, void 0);
|
|
26499
26493
|
f(this, ma, void 0);
|
|
26500
|
-
f(this,
|
|
26494
|
+
f(this, wt, void 0);
|
|
26501
26495
|
f(this, cs, void 0);
|
|
26502
26496
|
f(this, ds, false);
|
|
26503
26497
|
f(this, Ii, 0);
|
|
26504
26498
|
f(this, Ai, 0);
|
|
26505
26499
|
f(this, zs, []);
|
|
26506
26500
|
f(this, tc, void 0);
|
|
26507
|
-
v(this, ua, t), v(this,
|
|
26501
|
+
v(this, ua, t), v(this, wt, t), v(this, Yo, e), v(this, Qo, r), v(this, Xo, i), v(this, ha, n), v(this, pa, o), v(this, Zo, c), v(this, ec, d), v(this, ma, h), v(this, tc, m), v(this, cs, t / 2);
|
|
26508
26502
|
}
|
|
26509
26503
|
get voiceDetected() {
|
|
26510
26504
|
return a(this, ds);
|
|
@@ -26512,27 +26506,27 @@ const Yd = class {
|
|
|
26512
26506
|
processAudioChunk(t) {
|
|
26513
26507
|
var o, c;
|
|
26514
26508
|
const e = x(o = Yd, Kd, xf).call(o, t), r = x(c = Yd, zd, Uf).call(c, t);
|
|
26515
|
-
return x(this, Wd, Lf).call(this, e), e / a(this, cs) > a(this, ma) && e > a(this,
|
|
26509
|
+
return x(this, Wd, Lf).call(this, e), e / a(this, cs) > a(this, ma) && e > a(this, wt) && r > a(this, Yo) ? (v(this, Ii, a(this, Ii) + 1), v(this, Ai, a(this, Xo)), a(this, Ii) >= a(this, Qo) && v(this, ds, true)) : (v(this, Ii, 0), a(this, Ai) > 0 ? v(this, Ai, a(this, Ai) - 1) : a(this, ds) && v(this, ds, false), a(this, ds) || x(this, Jd, Vf).call(this, e)), { energy: e, isVoice: a(this, ds) };
|
|
26516
26510
|
}
|
|
26517
26511
|
reset() {
|
|
26518
|
-
v(this, ds, false), v(this, Ii, 0), v(this, Ai, 0), v(this,
|
|
26512
|
+
v(this, ds, false), v(this, Ii, 0), v(this, Ai, 0), v(this, wt, a(this, ua)), v(this, cs, a(this, ua) / 2), v(this, zs, []);
|
|
26519
26513
|
}
|
|
26520
26514
|
getThresholdInfo() {
|
|
26521
26515
|
return {
|
|
26522
|
-
currentEnergyThreshold: a(this,
|
|
26516
|
+
currentEnergyThreshold: a(this, wt),
|
|
26523
26517
|
backgroundNoiseEnergy: a(this, cs),
|
|
26524
26518
|
energyRatioThreshold: a(this, ma)
|
|
26525
26519
|
};
|
|
26526
26520
|
}
|
|
26527
26521
|
};
|
|
26528
26522
|
let so = Yd;
|
|
26529
|
-
Yo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(),
|
|
26530
|
-
a(this, ds) ? v(this,
|
|
26523
|
+
Yo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), zs = /* @__PURE__ */ new WeakMap(), tc = /* @__PURE__ */ new WeakMap(), Wd = /* @__PURE__ */ new WeakSet(), Lf = function(t) {
|
|
26524
|
+
a(this, ds) ? v(this, wt, a(this, pa) * a(this, wt) + (1 - a(this, pa)) * t) : v(this, wt, a(this, ha) * a(this, wt) + (1 - a(this, ha)) * a(this, cs)), v(this, wt, Math.max(
|
|
26531
26525
|
a(this, Zo),
|
|
26532
|
-
Math.min(a(this, ec), a(this,
|
|
26526
|
+
Math.min(a(this, ec), a(this, wt))
|
|
26533
26527
|
));
|
|
26534
26528
|
}, Jd = /* @__PURE__ */ new WeakSet(), Vf = function(t) {
|
|
26535
|
-
if (t < a(this,
|
|
26529
|
+
if (t < a(this, wt) * 1.2)
|
|
26536
26530
|
if (a(this, zs).push(t), a(this, zs).length > a(this, tc) && a(this, zs).shift(), a(this, zs).length >= 10) {
|
|
26537
26531
|
const e = [...a(this, zs)].sort((i, n) => i - n), r = Math.floor(e.length / 2);
|
|
26538
26532
|
v(this, cs, e[r]);
|
|
@@ -26691,7 +26685,7 @@ var V0 = Object.defineProperty, x0 = Object.getOwnPropertyDescriptor, pe = (s, t
|
|
|
26691
26685
|
return r && i && V0(t, e, i), i;
|
|
26692
26686
|
};
|
|
26693
26687
|
const Es = ["video/VP9", "video/VP8"];
|
|
26694
|
-
var rc, ic, ot, J, Ta, ks, vt, Di, Oi, Ni, nc, Qt, Zs, ac, Li, Vi, Tt,
|
|
26688
|
+
var rc, ic, ot, J, Ta, ks, vt, Di, Oi, Ni, nc, Qt, Zs, ac, Li, Vi, Tt, bt, Lr, en, el, qf, tl, jf, sl, Gf, oc, $u, rl, Yl, Wf, il, Jf, nl, Kf, al, zf, Ze, pt, xi, io, ol, Yf, cl, Qf, dl, Xf;
|
|
26695
26689
|
const Hf = (Yl = class {
|
|
26696
26690
|
constructor(s, t, e) {
|
|
26697
26691
|
f(this, Lr);
|
|
@@ -26727,7 +26721,7 @@ const Hf = (Yl = class {
|
|
|
26727
26721
|
f(this, Li, void 0);
|
|
26728
26722
|
f(this, Vi, void 0);
|
|
26729
26723
|
f(this, Tt, void 0);
|
|
26730
|
-
f(this,
|
|
26724
|
+
f(this, bt, void 0);
|
|
26731
26725
|
var i, n;
|
|
26732
26726
|
this.context = s;
|
|
26733
26727
|
const {
|
|
@@ -26739,7 +26733,7 @@ const Hf = (Yl = class {
|
|
|
26739
26733
|
])), v(this, Vi, /* @__PURE__ */ new Map([
|
|
26740
26734
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26741
26735
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26742
|
-
])), v(this, ks, t), v(this, ot, r), v(this, Di, false), v(this, J, new A0(s, r, t)), v(this, vt, a(this, J).events), v(this, Zs, /* @__PURE__ */ new Set()), v(this, Tt, /* @__PURE__ */ new Map()), v(this, Oi, false), v(this, Ni, new Au()), t === Be.CF && !navigator.isReactNative && v(this,
|
|
26736
|
+
])), v(this, ks, t), v(this, ot, r), v(this, Di, false), v(this, J, new A0(s, r, t)), v(this, vt, a(this, J).events), v(this, Zs, /* @__PURE__ */ new Set()), v(this, Tt, /* @__PURE__ */ new Map()), v(this, Oi, false), v(this, Ni, new Au()), t === Be.CF && !navigator.isReactNative && v(this, bt, new ro(
|
|
26743
26737
|
a(this, J).socketHandler.audioActivity.bind(a(this, J).socketHandler)
|
|
26744
26738
|
)), this.e2ee = (n = (i = s.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : false, this.handleSocketEvents(), this.handleCallstatsEvents(), v(this, nc, oh(
|
|
26745
26739
|
() => u(this, null, function* () {
|
|
@@ -26938,14 +26932,14 @@ const Hf = (Yl = class {
|
|
|
26938
26932
|
return u(this, null, function* () {
|
|
26939
26933
|
try {
|
|
26940
26934
|
if (s === void 0)
|
|
26941
|
-
throw new
|
|
26935
|
+
throw new It("track undefined");
|
|
26942
26936
|
const t = x(this, Ze, pt).call(this, fe.MIC);
|
|
26943
26937
|
if (t) {
|
|
26944
26938
|
const n = yield t;
|
|
26945
26939
|
if (a(this, J).producers.has(n)) {
|
|
26946
26940
|
const o = a(this, J).producers.get(n);
|
|
26947
26941
|
if (!o.closed) {
|
|
26948
|
-
yield o.replaceTrack({ track: s }), yield this.resumeMic(), a(this,
|
|
26942
|
+
yield o.replaceTrack({ track: s }), yield this.resumeMic(), a(this, bt) && (a(this, bt).audioTrack = s, a(this, bt).producerId = n, a(this, bt).start());
|
|
26949
26943
|
return;
|
|
26950
26944
|
}
|
|
26951
26945
|
yield a(this, J).closeProducer(n, { stopTrack: false });
|
|
@@ -26960,7 +26954,7 @@ const Hf = (Yl = class {
|
|
|
26960
26954
|
r
|
|
26961
26955
|
);
|
|
26962
26956
|
x(this, xi, io).call(this, fe.MIC, i.then((n) => n.id)), yield i.then((n) => {
|
|
26963
|
-
a(this,
|
|
26957
|
+
a(this, bt) && (a(this, bt).audioTrack = n.track, a(this, bt).producerId = n.id, a(this, bt).start());
|
|
26964
26958
|
});
|
|
26965
26959
|
} catch (t) {
|
|
26966
26960
|
throw new w(t);
|
|
@@ -26979,7 +26973,7 @@ const Hf = (Yl = class {
|
|
|
26979
26973
|
l.info("pauseMic::mic_producer_already_paused");
|
|
26980
26974
|
return;
|
|
26981
26975
|
}
|
|
26982
|
-
t.pause(), (r = a(this,
|
|
26976
|
+
t.pause(), (r = a(this, bt)) == null || r.stop();
|
|
26983
26977
|
const e = {
|
|
26984
26978
|
producerId: t.id,
|
|
26985
26979
|
pause: true
|
|
@@ -27064,7 +27058,7 @@ const Hf = (Yl = class {
|
|
|
27064
27058
|
return u(this, null, function* () {
|
|
27065
27059
|
var t;
|
|
27066
27060
|
const s = yield x(this, Ze, pt).call(this, fe.MIC);
|
|
27067
|
-
s && (yield a(this, J).closeProducer(s)), (t = a(this,
|
|
27061
|
+
s && (yield a(this, J).closeProducer(s)), (t = a(this, bt)) == null || t.stop(), a(this, Tt).delete(fe.MIC);
|
|
27068
27062
|
});
|
|
27069
27063
|
}
|
|
27070
27064
|
disableScreenShare() {
|
|
@@ -27350,7 +27344,7 @@ const Hf = (Yl = class {
|
|
|
27350
27344
|
t.delete(s), t.size === 0 && this.disableWebcam(e);
|
|
27351
27345
|
}));
|
|
27352
27346
|
}
|
|
27353
|
-
}, rc = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), nc = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(),
|
|
27347
|
+
}, rc = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), nc = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakSet(), en = function() {
|
|
27354
27348
|
return this.context.getValue("connectionHandler");
|
|
27355
27349
|
}, el = /* @__PURE__ */ new WeakSet(), qf = function(s, t, e, r) {
|
|
27356
27350
|
return u(this, null, function* () {
|
|
@@ -27622,7 +27616,7 @@ const tv = (ym = class {
|
|
|
27622
27616
|
f(this, us, void 0);
|
|
27623
27617
|
f(this, ct, void 0);
|
|
27624
27618
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
27625
|
-
this.self = t, v(this, ct, s), this.viewType = r, this.authToken = n, v(this, Vr, i), v(this, us, e), t.config.viewType !==
|
|
27619
|
+
this.self = t, v(this, ct, s), this.viewType = r, this.authToken = n, v(this, Vr, i), v(this, us, e), t.config.viewType !== At.Chat && this.setupEvents();
|
|
27626
27620
|
}
|
|
27627
27621
|
get peerId() {
|
|
27628
27622
|
return a(this, ct).getValue("peerId");
|
|
@@ -27842,7 +27836,7 @@ const tv = (ym = class {
|
|
|
27842
27836
|
roomNodeOptions: n
|
|
27843
27837
|
} = a(this, ct).getAllValues(), { sfu: o } = n;
|
|
27844
27838
|
try {
|
|
27845
|
-
if (e ===
|
|
27839
|
+
if (e === At.Livestream) {
|
|
27846
27840
|
if (i !== "ON_STAGE") {
|
|
27847
27841
|
this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s });
|
|
27848
27842
|
return;
|
|
@@ -27874,7 +27868,7 @@ const tv = (ym = class {
|
|
|
27874
27868
|
leaveMediaRoom(s) {
|
|
27875
27869
|
return u(this, null, function* () {
|
|
27876
27870
|
const t = a(this, ct).getValue("viewType");
|
|
27877
|
-
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t ===
|
|
27871
|
+
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === At.Webinar) && a(this, yt, Nt) && (a(this, yt, Nt).mediaJoined && s !== "disconnected" && (yield a(this, yt, Nt).leaveRoom()), !(s === "stageLeft" && t === At.Livestream) && (a(this, yt, Nt).mediaJoined = false));
|
|
27878
27872
|
});
|
|
27879
27873
|
}
|
|
27880
27874
|
cleanupSelf() {
|
|
@@ -28027,32 +28021,32 @@ Rh([
|
|
|
28027
28021
|
Rh([
|
|
28028
28022
|
y.trace("PollSocketHandler.votePoll")
|
|
28029
28023
|
], bl.prototype, "votePoll", 1);
|
|
28030
|
-
var
|
|
28024
|
+
var kt;
|
|
28031
28025
|
class j0 {
|
|
28032
28026
|
constructor(t) {
|
|
28033
|
-
f(this,
|
|
28034
|
-
v(this,
|
|
28027
|
+
f(this, kt, void 0);
|
|
28028
|
+
v(this, kt, t);
|
|
28035
28029
|
}
|
|
28036
28030
|
getStageRequests() {
|
|
28037
28031
|
return u(this, null, function* () {
|
|
28038
|
-
const { payload: t } = yield a(this,
|
|
28032
|
+
const { payload: t } = yield a(this, kt).sendMessagePromise(
|
|
28039
28033
|
U.getStageRequests
|
|
28040
28034
|
);
|
|
28041
28035
|
return t ? Gl.fromBinary(t) : { stageRequests: [] };
|
|
28042
28036
|
});
|
|
28043
28037
|
}
|
|
28044
28038
|
requestAccess() {
|
|
28045
|
-
a(this,
|
|
28039
|
+
a(this, kt).sendMessage(U.requestStageAccess);
|
|
28046
28040
|
}
|
|
28047
28041
|
cancelRequestAccess() {
|
|
28048
|
-
a(this,
|
|
28042
|
+
a(this, kt).sendMessage(U.cancelStageRequest);
|
|
28049
28043
|
}
|
|
28050
28044
|
grantAccess(t) {
|
|
28051
28045
|
return u(this, null, function* () {
|
|
28052
28046
|
const e = {
|
|
28053
28047
|
userIds: t
|
|
28054
28048
|
};
|
|
28055
|
-
a(this,
|
|
28049
|
+
a(this, kt).sendMessage(
|
|
28056
28050
|
U.grantStageAccess,
|
|
28057
28051
|
DI.toBinary(e)
|
|
28058
28052
|
);
|
|
@@ -28063,14 +28057,14 @@ class j0 {
|
|
|
28063
28057
|
const e = {
|
|
28064
28058
|
userIds: t
|
|
28065
28059
|
};
|
|
28066
|
-
a(this,
|
|
28060
|
+
a(this, kt).sendMessage(
|
|
28067
28061
|
U.denyStageAccess,
|
|
28068
28062
|
NI.toBinary(e)
|
|
28069
28063
|
);
|
|
28070
28064
|
});
|
|
28071
28065
|
}
|
|
28072
28066
|
joinStage() {
|
|
28073
|
-
return a(this,
|
|
28067
|
+
return a(this, kt).sendMessagePromise(
|
|
28074
28068
|
U.joinStage,
|
|
28075
28069
|
void 0,
|
|
28076
28070
|
void 0,
|
|
@@ -28081,7 +28075,7 @@ class j0 {
|
|
|
28081
28075
|
const e = {
|
|
28082
28076
|
userIds: [t]
|
|
28083
28077
|
};
|
|
28084
|
-
return a(this,
|
|
28078
|
+
return a(this, kt).sendMessagePromise(
|
|
28085
28079
|
U.leaveStage,
|
|
28086
28080
|
Fp.toBinary(e),
|
|
28087
28081
|
void 0,
|
|
@@ -28092,7 +28086,7 @@ class j0 {
|
|
|
28092
28086
|
const e = {
|
|
28093
28087
|
userIds: t
|
|
28094
28088
|
};
|
|
28095
|
-
return a(this,
|
|
28089
|
+
return a(this, kt).sendMessagePromise(
|
|
28096
28090
|
U.leaveStage,
|
|
28097
28091
|
Fp.toBinary(e)
|
|
28098
28092
|
);
|
|
@@ -28124,7 +28118,7 @@ class j0 {
|
|
|
28124
28118
|
break;
|
|
28125
28119
|
}
|
|
28126
28120
|
}
|
|
28127
|
-
a(this,
|
|
28121
|
+
a(this, kt).on(t, ({ payload: i, id: n }) => {
|
|
28128
28122
|
if (!i || !r)
|
|
28129
28123
|
return e(void 0, n);
|
|
28130
28124
|
const o = r(i);
|
|
@@ -28133,7 +28127,7 @@ class j0 {
|
|
|
28133
28127
|
}
|
|
28134
28128
|
getPeerInfo(t) {
|
|
28135
28129
|
return u(this, null, function* () {
|
|
28136
|
-
const e = yield a(this,
|
|
28130
|
+
const e = yield a(this, kt).sendMessagePromise(
|
|
28137
28131
|
U.getPeerInfo,
|
|
28138
28132
|
Bg.toBinary({ peerId: t })
|
|
28139
28133
|
);
|
|
@@ -28141,7 +28135,7 @@ class j0 {
|
|
|
28141
28135
|
});
|
|
28142
28136
|
}
|
|
28143
28137
|
}
|
|
28144
|
-
|
|
28138
|
+
kt = /* @__PURE__ */ new WeakMap();
|
|
28145
28139
|
var Ge;
|
|
28146
28140
|
class G0 {
|
|
28147
28141
|
constructor(t) {
|
|
@@ -29342,23 +29336,23 @@ const rn = class {
|
|
|
29342
29336
|
let _, P, A, C, L, H, B, F;
|
|
29343
29337
|
const Q = new B0(s);
|
|
29344
29338
|
Pe.socketService = s;
|
|
29345
|
-
const X = new bl(s), oe = new ts(s), et = new j0(s),
|
|
29339
|
+
const X = new bl(s), oe = new ts(s), et = new j0(s), Pt = ld.create(s, t), lr = new G0(s), Kr = new F0(s), M = new Bi(s), E = yield Jr.init(
|
|
29346
29340
|
t,
|
|
29347
|
-
|
|
29341
|
+
Pt,
|
|
29348
29342
|
d,
|
|
29349
29343
|
o,
|
|
29350
29344
|
n
|
|
29351
29345
|
), R = yield rf.init(
|
|
29352
29346
|
t,
|
|
29353
29347
|
E.self,
|
|
29354
|
-
|
|
29348
|
+
Pt,
|
|
29355
29349
|
Q,
|
|
29356
29350
|
i
|
|
29357
29351
|
);
|
|
29358
29352
|
if (c.participant && (F = new dr(
|
|
29359
29353
|
t,
|
|
29360
29354
|
E.self,
|
|
29361
|
-
|
|
29355
|
+
Pt,
|
|
29362
29356
|
m
|
|
29363
29357
|
)), (b = c.e2ee) != null && b.enabled && c.e2ee.manager.init(l, k), c.chat && (P = yield ms.init(
|
|
29364
29358
|
t,
|
|
@@ -29366,10 +29360,10 @@ const rn = class {
|
|
|
29366
29360
|
M,
|
|
29367
29361
|
E.self,
|
|
29368
29362
|
F.participants
|
|
29369
|
-
)), c.internals && (L = yield gh.init()), c.livestream && n.viewType ===
|
|
29363
|
+
)), c.internals && (L = yield gh.init()), c.livestream && n.viewType === At.Livestream && z.hasFeature(re.LIVESTREAM) && (B = new pf(
|
|
29370
29364
|
E.self,
|
|
29371
29365
|
Kr
|
|
29372
|
-
)), n.viewType !==
|
|
29366
|
+
)), n.viewType !== At.Chat) {
|
|
29373
29367
|
if (c.poll && (_ = yield Zg.init(
|
|
29374
29368
|
t,
|
|
29375
29369
|
E.self,
|
|
@@ -29377,11 +29371,11 @@ const rn = class {
|
|
|
29377
29371
|
)), c.recording && (H = new cf(
|
|
29378
29372
|
t,
|
|
29379
29373
|
E.self,
|
|
29380
|
-
|
|
29374
|
+
Pt
|
|
29381
29375
|
)), c.stage && (A = new nf(
|
|
29382
29376
|
t,
|
|
29383
29377
|
et,
|
|
29384
|
-
|
|
29378
|
+
Pt,
|
|
29385
29379
|
E.self,
|
|
29386
29380
|
F.participants
|
|
29387
29381
|
)), c.plugin) {
|