@cloudflare/realtimekit 1.5.2-staging.5 → 1.5.2-staging.6
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 +0 -1
- package/dist/browser.js +11 -11
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +167 -171
- package/dist/index.es5.js +157 -160
- package/dist/index.rn.js +5 -5
- package/dist/ts3.4/dist/EncryptionManager.d.ts +0 -1
- package/dist/ts3.4/dist/index.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1535,7 +1535,7 @@ class tm extends st {
|
|
|
1535
1535
|
}) || e[e.length - 1];
|
|
1536
1536
|
}
|
|
1537
1537
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
1538
|
-
var _, w, R, D, $, B, H, F, X, Ne,
|
|
1538
|
+
var _, w, R, D, $, B, H, F, X, Ne, Et, Xt, Jr;
|
|
1539
1539
|
const c = e, d = new em(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1540
1540
|
for (const I of c.values()) {
|
|
1541
1541
|
if (l) {
|
|
@@ -1808,7 +1808,7 @@ class tm extends st {
|
|
|
1808
1808
|
}), E.set(C, {
|
|
1809
1809
|
score: +(k.score * 10).toFixed(),
|
|
1810
1810
|
packetsLostPercentage: ad({
|
|
1811
|
-
packetsLost: (k.packetsLost || 0) - (((
|
|
1811
|
+
packetsLost: (k.packetsLost || 0) - (((Et = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Et.packetsLost) || 0),
|
|
1812
1812
|
packetsReceived: (k.packetsReceived || 0) - (((Xt = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Xt.packetsReceived) || 0)
|
|
1813
1813
|
}),
|
|
1814
1814
|
jitter: k.jitter || 0,
|
|
@@ -2189,7 +2189,7 @@ class sm extends tm {
|
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
2191
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
2192
|
-
var _, w, R, D, $, B, H, F, X, Ne,
|
|
2192
|
+
var _, w, R, D, $, B, H, F, X, Ne, Et, Xt, Jr;
|
|
2193
2193
|
const c = e, d = new em(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2194
2194
|
for (const I of c.values()) {
|
|
2195
2195
|
if (l) {
|
|
@@ -2458,7 +2458,7 @@ class sm extends tm {
|
|
|
2458
2458
|
}), E.set(C, {
|
|
2459
2459
|
score: +(k.score * 10).toFixed(),
|
|
2460
2460
|
packetsLostPercentage: ad({
|
|
2461
|
-
packetsLost: (k.packetsLost || 0) - (((
|
|
2461
|
+
packetsLost: (k.packetsLost || 0) - (((Et = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Et.packetsLost) || 0),
|
|
2462
2462
|
packetsReceived: (k.packetsReceived || 0) - (((Xt = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Xt.packetsReceived) || 0)
|
|
2463
2463
|
}),
|
|
2464
2464
|
jitter: k.jitter || 0,
|
|
@@ -4813,8 +4813,8 @@ function nh(s, t, e) {
|
|
|
4813
4813
|
return l = F, c = setTimeout(R, t), h ? v(F) : o;
|
|
4814
4814
|
}
|
|
4815
4815
|
function _(F) {
|
|
4816
|
-
var X = F - d, Ne = F - l,
|
|
4817
|
-
return g ? eC(
|
|
4816
|
+
var X = F - d, Ne = F - l, Et = t - X;
|
|
4817
|
+
return g ? eC(Et, n - Ne) : Et;
|
|
4818
4818
|
}
|
|
4819
4819
|
function w(F) {
|
|
4820
4820
|
var X = F - d, Ne = F - l;
|
|
@@ -11694,12 +11694,12 @@ var WI = Object.defineProperty, JI = Object.getOwnPropertyDescriptor, jr = (s, t
|
|
|
11694
11694
|
for (var i = r > 1 ? void 0 : r ? JI(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
11695
11695
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11696
11696
|
return r && i && WI(t, e, i), i;
|
|
11697
|
-
}, Yt = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Yt || {}),
|
|
11697
|
+
}, Yt = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Yt || {}), Ct, En;
|
|
11698
11698
|
class nr {
|
|
11699
11699
|
constructor(t, e) {
|
|
11700
|
-
m(this,
|
|
11700
|
+
m(this, Ct, void 0);
|
|
11701
11701
|
m(this, En, void 0);
|
|
11702
|
-
S(this,
|
|
11702
|
+
S(this, Ct, e), S(this, En, t);
|
|
11703
11703
|
}
|
|
11704
11704
|
/**
|
|
11705
11705
|
* @access private
|
|
@@ -11716,7 +11716,7 @@ class nr {
|
|
|
11716
11716
|
return a(this, En).getValue("logger");
|
|
11717
11717
|
}
|
|
11718
11718
|
getChatMessages() {
|
|
11719
|
-
return a(this,
|
|
11719
|
+
return a(this, Ct).sendMessagePromise(Ge.getMessages);
|
|
11720
11720
|
}
|
|
11721
11721
|
getChatMessagesPaginated(t, e, r, i) {
|
|
11722
11722
|
return u(this, null, function* () {
|
|
@@ -11726,7 +11726,7 @@ class nr {
|
|
|
11726
11726
|
from: 0,
|
|
11727
11727
|
// NOTE(ikabra): We do not need offset for timeStamp based pagination.
|
|
11728
11728
|
reversed: r
|
|
11729
|
-
}, i && { filters: { filters: i } }), o = yield a(this,
|
|
11729
|
+
}, i && { filters: { filters: i } }), o = yield a(this, Ct).sendMessagePromise(
|
|
11730
11730
|
Ge.getPaginatedMessages,
|
|
11731
11731
|
sA.toBinary(n)
|
|
11732
11732
|
);
|
|
@@ -11743,7 +11743,7 @@ class nr {
|
|
|
11743
11743
|
payloadType: e,
|
|
11744
11744
|
payload: t
|
|
11745
11745
|
};
|
|
11746
|
-
a(this,
|
|
11746
|
+
a(this, Ct).sendMessage(
|
|
11747
11747
|
Ge.sendMessageToRoom,
|
|
11748
11748
|
oA.toBinary(r)
|
|
11749
11749
|
);
|
|
@@ -11754,7 +11754,7 @@ class nr {
|
|
|
11754
11754
|
peerIds: r,
|
|
11755
11755
|
payload: t
|
|
11756
11756
|
};
|
|
11757
|
-
a(this,
|
|
11757
|
+
a(this, Ct).sendMessage(
|
|
11758
11758
|
Ge.sendMessageToPeers,
|
|
11759
11759
|
lA.toBinary(i)
|
|
11760
11760
|
);
|
|
@@ -11774,7 +11774,7 @@ class nr {
|
|
|
11774
11774
|
payload: e
|
|
11775
11775
|
};
|
|
11776
11776
|
i !== void 0 && (n.pinned = i);
|
|
11777
|
-
const o = yield a(this,
|
|
11777
|
+
const o = yield a(this, Ct).sendMessagePromise(
|
|
11778
11778
|
Ge.editMessage,
|
|
11779
11779
|
mA.toBinary(n)
|
|
11780
11780
|
);
|
|
@@ -11785,7 +11785,7 @@ class nr {
|
|
|
11785
11785
|
return u(this, null, function* () {
|
|
11786
11786
|
const e = {
|
|
11787
11787
|
chatId: t
|
|
11788
|
-
}, r = yield a(this,
|
|
11788
|
+
}, r = yield a(this, Ct).sendMessagePromise(
|
|
11789
11789
|
Ge.deleteMessage,
|
|
11790
11790
|
EA.toBinary(e)
|
|
11791
11791
|
);
|
|
@@ -11803,7 +11803,7 @@ class nr {
|
|
|
11803
11803
|
reversed: (c = e.reversed) != null ? c : !0
|
|
11804
11804
|
};
|
|
11805
11805
|
try {
|
|
11806
|
-
const d = yield a(this,
|
|
11806
|
+
const d = yield a(this, Ct).sendMessagePromise(
|
|
11807
11807
|
Ge.searchChannelMessages,
|
|
11808
11808
|
CA.toBinary(r)
|
|
11809
11809
|
);
|
|
@@ -11818,7 +11818,7 @@ class nr {
|
|
|
11818
11818
|
const r = {
|
|
11819
11819
|
chatId: t,
|
|
11820
11820
|
pinned: e
|
|
11821
|
-
}, i = yield a(this,
|
|
11821
|
+
}, i = yield a(this, Ct).sendMessagePromise(
|
|
11822
11822
|
Ge.pinMessage,
|
|
11823
11823
|
SA.toBinary(r)
|
|
11824
11824
|
);
|
|
@@ -11863,7 +11863,7 @@ class nr {
|
|
|
11863
11863
|
this.logger.warn(`ChatSocketHandler::Event ${t} is not recognized`);
|
|
11864
11864
|
return;
|
|
11865
11865
|
}
|
|
11866
|
-
a(this,
|
|
11866
|
+
a(this, Ct).on(t, ({ payload: n }) => {
|
|
11867
11867
|
let o = i;
|
|
11868
11868
|
try {
|
|
11869
11869
|
o = r(n);
|
|
@@ -11876,7 +11876,7 @@ class nr {
|
|
|
11876
11876
|
});
|
|
11877
11877
|
}
|
|
11878
11878
|
}
|
|
11879
|
-
|
|
11879
|
+
Ct = new WeakMap(), En = new WeakMap();
|
|
11880
11880
|
jr([
|
|
11881
11881
|
P.trace("SocketService.getChatMessages")
|
|
11882
11882
|
], nr.prototype, "getChatMessages", 1);
|
|
@@ -12334,7 +12334,7 @@ let pu;
|
|
|
12334
12334
|
function s0(s, t) {
|
|
12335
12335
|
return pu = new bs(s, t), pu;
|
|
12336
12336
|
}
|
|
12337
|
-
function
|
|
12337
|
+
function vt() {
|
|
12338
12338
|
return pu;
|
|
12339
12339
|
}
|
|
12340
12340
|
const Ea = {
|
|
@@ -12481,7 +12481,7 @@ let Ot = (ig = class extends Lt {
|
|
|
12481
12481
|
return;
|
|
12482
12482
|
}
|
|
12483
12483
|
try {
|
|
12484
|
-
const h =
|
|
12484
|
+
const h = vt(), { getLocation: g, putLocation: f } = yield h.getPresignedUrls(t.name);
|
|
12485
12485
|
yield h.uploadFile(t, f);
|
|
12486
12486
|
let v = [];
|
|
12487
12487
|
e && e.length > 0 && (e.push(a(this, te).id), v = a(this, ii).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), v.push(a(this, te).userId)), a(this, Ue).sendMessage(
|
|
@@ -12515,7 +12515,7 @@ let Ot = (ig = class extends Lt {
|
|
|
12515
12515
|
return;
|
|
12516
12516
|
}
|
|
12517
12517
|
try {
|
|
12518
|
-
const l =
|
|
12518
|
+
const l = vt(), { getLocation: h, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12519
12519
|
yield l.uploadFile(t, g);
|
|
12520
12520
|
let f = [];
|
|
12521
12521
|
e && e.length > 0 && (e.push(a(this, te).id), f = a(this, ii).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), f.push(a(this, te).userId));
|
|
@@ -12571,7 +12571,7 @@ let Ot = (ig = class extends Lt {
|
|
|
12571
12571
|
try {
|
|
12572
12572
|
if (typeof B == "string")
|
|
12573
12573
|
return { link: B };
|
|
12574
|
-
const H =
|
|
12574
|
+
const H = vt(), { getLocation: F, putLocation: X } = yield H.getPresignedUrls(B.name);
|
|
12575
12575
|
return yield H.uploadFile(B, X), {
|
|
12576
12576
|
link: F,
|
|
12577
12577
|
type: B.type,
|
|
@@ -12650,7 +12650,7 @@ let Ot = (ig = class extends Lt {
|
|
|
12650
12650
|
return;
|
|
12651
12651
|
}
|
|
12652
12652
|
try {
|
|
12653
|
-
const d =
|
|
12653
|
+
const d = vt(), { getLocation: l, putLocation: h } = yield d.getPresignedUrls(e.name);
|
|
12654
12654
|
yield d.uploadFile(e, h), a(this, Ue).editMessage(
|
|
12655
12655
|
t,
|
|
12656
12656
|
l,
|
|
@@ -12673,7 +12673,7 @@ let Ot = (ig = class extends Lt {
|
|
|
12673
12673
|
return;
|
|
12674
12674
|
}
|
|
12675
12675
|
try {
|
|
12676
|
-
const c =
|
|
12676
|
+
const c = vt(), { getLocation: d, putLocation: l } = yield c.getPresignedUrls(e.name);
|
|
12677
12677
|
yield c.uploadFile(e, l), a(this, Ue).editMessage(
|
|
12678
12678
|
t,
|
|
12679
12679
|
JSON.stringify({
|
|
@@ -13470,7 +13470,7 @@ let Br = (dg = class extends Lt {
|
|
|
13470
13470
|
getActiveTranscript() {
|
|
13471
13471
|
return u(this, null, function* () {
|
|
13472
13472
|
try {
|
|
13473
|
-
const t =
|
|
13473
|
+
const t = vt(), { transcript: e } = yield t.getActiveTranscript();
|
|
13474
13474
|
this.transcripts = Br.parseTranscripts(e);
|
|
13475
13475
|
} catch (t) {
|
|
13476
13476
|
}
|
|
@@ -13502,7 +13502,7 @@ var E0 = Object.defineProperty, P0 = Object.getOwnPropertyDescriptor, _0 = (s, t
|
|
|
13502
13502
|
for (var i = r > 1 ? void 0 : r ? P0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
13503
13503
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13504
13504
|
return r && i && E0(t, e, i), i;
|
|
13505
|
-
}, vr, bn,
|
|
13505
|
+
}, vr, bn, wt, lg;
|
|
13506
13506
|
const uf = (lg = class {
|
|
13507
13507
|
constructor(s, t, e, r, i, n) {
|
|
13508
13508
|
p(this, "meta");
|
|
@@ -13510,8 +13510,8 @@ const uf = (lg = class {
|
|
|
13510
13510
|
m(this, vr, void 0);
|
|
13511
13511
|
m(this, bn, void 0);
|
|
13512
13512
|
p(this, "aiSocketHandler");
|
|
13513
|
-
m(this,
|
|
13514
|
-
S(this,
|
|
13513
|
+
m(this, wt, void 0);
|
|
13514
|
+
S(this, wt, s), this.meta = new fu(
|
|
13515
13515
|
s,
|
|
13516
13516
|
t,
|
|
13517
13517
|
t.config.viewType,
|
|
@@ -13524,14 +13524,14 @@ const uf = (lg = class {
|
|
|
13524
13524
|
* Not for external use
|
|
13525
13525
|
*/
|
|
13526
13526
|
get telemetry() {
|
|
13527
|
-
return a(this,
|
|
13527
|
+
return a(this, wt).getValue("telemetry");
|
|
13528
13528
|
}
|
|
13529
13529
|
/**
|
|
13530
13530
|
* @access private
|
|
13531
13531
|
* Not for external use
|
|
13532
13532
|
*/
|
|
13533
13533
|
get logger() {
|
|
13534
|
-
return a(this,
|
|
13534
|
+
return a(this, wt).getValue("logger");
|
|
13535
13535
|
}
|
|
13536
13536
|
/**
|
|
13537
13537
|
*
|
|
@@ -13560,17 +13560,17 @@ const uf = (lg = class {
|
|
|
13560
13560
|
));
|
|
13561
13561
|
}
|
|
13562
13562
|
setupEvents() {
|
|
13563
|
-
a(this,
|
|
13563
|
+
a(this, wt).getValue("peerSessionStore").on(
|
|
13564
13564
|
b.TRANSPORT_STATE_UPDATE,
|
|
13565
13565
|
(s) => {
|
|
13566
13566
|
this.meta.emit("mediaConnectionUpdate", s);
|
|
13567
13567
|
}
|
|
13568
|
-
), a(this,
|
|
13568
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13569
13569
|
b.SOCKET_STATE_UPDATE,
|
|
13570
13570
|
(s) => {
|
|
13571
13571
|
this.meta.emit("socketConnectionUpdate", s);
|
|
13572
13572
|
}
|
|
13573
|
-
), a(this,
|
|
13573
|
+
), a(this, wt).getValue("peerSessionStore").on(b.ROOM_STATE, ({ createdAt: s, roomUuid: t }) => {
|
|
13574
13574
|
const e = this.meta.meetingStartedTimestamp;
|
|
13575
13575
|
if (t && (this.meta.sessionId = t), s && !e) {
|
|
13576
13576
|
const r = new Date(s * 1e3);
|
|
@@ -13578,7 +13578,7 @@ const uf = (lg = class {
|
|
|
13578
13578
|
meetingStartedTimestamp: this.meta.meetingStartedTimestamp
|
|
13579
13579
|
});
|
|
13580
13580
|
}
|
|
13581
|
-
}), a(this,
|
|
13581
|
+
}), a(this, wt).getValue("peerSessionStore").on(
|
|
13582
13582
|
b.PRODUCER_SCORE_UPDATE,
|
|
13583
13583
|
({ score: s }) => {
|
|
13584
13584
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
@@ -13586,7 +13586,7 @@ const uf = (lg = class {
|
|
|
13586
13586
|
), a(this, vr).permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this, bn).broadcastMessage("spotlight", {
|
|
13587
13587
|
userId: a(this, vr).userId,
|
|
13588
13588
|
currentTab: this.meta.selfActiveTab
|
|
13589
|
-
})), a(this,
|
|
13589
|
+
})), a(this, wt).getValue("peerSessionStore").on(
|
|
13590
13590
|
b.PEER_JOINED_INTERNAL,
|
|
13591
13591
|
(s) => u(this, null, function* () {
|
|
13592
13592
|
a(this, vr).permissions.canSpotlight && this.meta.selfActiveTab && a(this, bn).broadcastToPeers("spotlight", [s.id], {
|
|
@@ -13594,7 +13594,7 @@ const uf = (lg = class {
|
|
|
13594
13594
|
currentTab: this.meta.selfActiveTab
|
|
13595
13595
|
});
|
|
13596
13596
|
})
|
|
13597
|
-
), a(this,
|
|
13597
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13598
13598
|
b.ROOM_MESSAGE,
|
|
13599
13599
|
(s) => {
|
|
13600
13600
|
var e, r;
|
|
@@ -13619,7 +13619,7 @@ const uf = (lg = class {
|
|
|
13619
13619
|
}
|
|
13620
13620
|
}), this.conditionallySetActiveTab(t);
|
|
13621
13621
|
}
|
|
13622
|
-
), a(this,
|
|
13622
|
+
), a(this, wt).getValue("peerSessionStore").on(
|
|
13623
13623
|
b.MESSAGE,
|
|
13624
13624
|
(s) => {
|
|
13625
13625
|
var e, r;
|
|
@@ -13665,7 +13665,7 @@ const uf = (lg = class {
|
|
|
13665
13665
|
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
13666
13666
|
});
|
|
13667
13667
|
}
|
|
13668
|
-
}, vr = new WeakMap(), bn = new WeakMap(),
|
|
13668
|
+
}, vr = new WeakMap(), bn = new WeakMap(), wt = new WeakMap(), lg);
|
|
13669
13669
|
let hf = uf;
|
|
13670
13670
|
_0([
|
|
13671
13671
|
P.trace("MetaController.setupEvents")
|
|
@@ -14551,7 +14551,7 @@ let Wi = (pg = class extends Lt {
|
|
|
14551
14551
|
"1005"
|
|
14552
14552
|
);
|
|
14553
14553
|
try {
|
|
14554
|
-
const e =
|
|
14554
|
+
const e = vt(), { recording: r = {} } = a(this, Mn).getValue("defaults"), i = yield e.startRecording(r, t == null ? void 0 : t.allowMultiple);
|
|
14555
14555
|
this.updateRecordings([...this.recordings, {
|
|
14556
14556
|
id: i,
|
|
14557
14557
|
state: "STARTING",
|
|
@@ -14603,7 +14603,7 @@ let Wi = (pg = class extends Lt {
|
|
|
14603
14603
|
const o = n.state;
|
|
14604
14604
|
t === "stop" && (n.state = "STOPPING", this.emit("recordingUpdate", "STOPPING"));
|
|
14605
14605
|
try {
|
|
14606
|
-
yield
|
|
14606
|
+
yield vt().updateRecording(n.id, t);
|
|
14607
14607
|
} catch (c) {
|
|
14608
14608
|
throw this.logger.error("Recording::stop::recording_failed_to_stop", {
|
|
14609
14609
|
error: c
|
|
@@ -14767,7 +14767,7 @@ var G0 = Object.defineProperty, W0 = Object.getOwnPropertyDescriptor, xt = (s, t
|
|
|
14767
14767
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14768
14768
|
return r && i && G0(t, e, i), i;
|
|
14769
14769
|
}, Ve, fe, he, Ls, jt, Ao, be;
|
|
14770
|
-
class
|
|
14770
|
+
class yt extends ya {
|
|
14771
14771
|
constructor(e, r, i = ud, n = !0) {
|
|
14772
14772
|
const o = e.getValue("logger");
|
|
14773
14773
|
super(o);
|
|
@@ -15129,43 +15129,43 @@ class Et extends ya {
|
|
|
15129
15129
|
Ve = new WeakMap(), fe = new WeakMap(), he = new WeakMap(), Ls = new WeakMap(), jt = new WeakMap(), Ao = new WeakMap(), be = new WeakMap();
|
|
15130
15130
|
xt([
|
|
15131
15131
|
P.trace("MediaHandler.setupStreams")
|
|
15132
|
-
],
|
|
15132
|
+
], yt.prototype, "setupStreams", 1);
|
|
15133
15133
|
xt([
|
|
15134
15134
|
P.trace("MediaHandler.enableAudio")
|
|
15135
|
-
],
|
|
15135
|
+
], yt.prototype, "enableAudio", 1);
|
|
15136
15136
|
xt([
|
|
15137
15137
|
P.trace("MediaHandler.disableAudio")
|
|
15138
|
-
],
|
|
15138
|
+
], yt.prototype, "disableAudio", 1);
|
|
15139
15139
|
xt([
|
|
15140
15140
|
P.trace("MediaHandler.setAudioDevice")
|
|
15141
|
-
],
|
|
15141
|
+
], yt.prototype, "setAudioDevice", 1);
|
|
15142
15142
|
xt([
|
|
15143
15143
|
P.trace("MediaHandler.enableVideo")
|
|
15144
|
-
],
|
|
15144
|
+
], yt.prototype, "enableVideo", 1);
|
|
15145
15145
|
xt([
|
|
15146
15146
|
P.trace("MediaHandler.disableVideo")
|
|
15147
|
-
],
|
|
15147
|
+
], yt.prototype, "disableVideo", 1);
|
|
15148
15148
|
xt([
|
|
15149
15149
|
P.trace("MediaHandler.setVideoDevice")
|
|
15150
|
-
],
|
|
15150
|
+
], yt.prototype, "setVideoDevice", 1);
|
|
15151
15151
|
xt([
|
|
15152
15152
|
P.trace("MediaHandler.updateVideoConstraints")
|
|
15153
|
-
],
|
|
15153
|
+
], yt.prototype, "updateVideoConstraints", 1);
|
|
15154
15154
|
xt([
|
|
15155
15155
|
P.trace("MediaHandler.enableScreenShare")
|
|
15156
|
-
],
|
|
15156
|
+
], yt.prototype, "enableScreenShare", 1);
|
|
15157
15157
|
xt([
|
|
15158
15158
|
P.trace("MediaHandler.disableScreenShare")
|
|
15159
|
-
],
|
|
15159
|
+
], yt.prototype, "disableScreenShare", 1);
|
|
15160
15160
|
xt([
|
|
15161
15161
|
P.trace("MediaHandler.updateScreenshareConstraints")
|
|
15162
|
-
],
|
|
15162
|
+
], yt.prototype, "updateScreenshareConstraints", 1);
|
|
15163
15163
|
xt([
|
|
15164
15164
|
P.trace("MediaHandler.destruct")
|
|
15165
|
-
],
|
|
15165
|
+
], yt.prototype, "destruct", 1);
|
|
15166
15166
|
xt([
|
|
15167
15167
|
P.trace("MediaHandler.onDeviceChange")
|
|
15168
|
-
],
|
|
15168
|
+
], yt.prototype, "onDeviceChange", 1);
|
|
15169
15169
|
function $c(s, t, e) {
|
|
15170
15170
|
switch (!0) {
|
|
15171
15171
|
case ve.isChromiumBased():
|
|
@@ -16896,7 +16896,7 @@ class fh extends Lt {
|
|
|
16896
16896
|
);
|
|
16897
16897
|
this.setLivestreamState("STARTING");
|
|
16898
16898
|
try {
|
|
16899
|
-
const r =
|
|
16899
|
+
const r = vt(), {
|
|
16900
16900
|
playbackUrl: i,
|
|
16901
16901
|
ingestionCredentials: n
|
|
16902
16902
|
} = yield r.startLivestreaming(e);
|
|
@@ -16918,7 +16918,7 @@ class fh extends Lt {
|
|
|
16918
16918
|
if (this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")
|
|
16919
16919
|
throw this.logger.error("Livestream::stop::inconsistent_state"), new A("Livestream not started yet", "1902");
|
|
16920
16920
|
try {
|
|
16921
|
-
this.setLivestreamState("STOPPING"), yield
|
|
16921
|
+
this.setLivestreamState("STOPPING"), yield vt().stopLivestreaming();
|
|
16922
16922
|
} catch (e) {
|
|
16923
16923
|
throw this.logger.error("Livestream::stop::livestream_failed_to_stop", {
|
|
16924
16924
|
error: e
|
|
@@ -16964,7 +16964,7 @@ class Pf {
|
|
|
16964
16964
|
}
|
|
16965
16965
|
fetchInitialLivestreamingState() {
|
|
16966
16966
|
return u(this, null, function* () {
|
|
16967
|
-
const t =
|
|
16967
|
+
const t = vt(), {
|
|
16968
16968
|
status: e,
|
|
16969
16969
|
playbackUrl: r,
|
|
16970
16970
|
manualIngest: i,
|
|
@@ -17352,7 +17352,7 @@ var MM = Object.defineProperty, DM = Object.getOwnPropertyDescriptor, _a = (s, t
|
|
|
17352
17352
|
return r && i && MM(t, e, i), i;
|
|
17353
17353
|
};
|
|
17354
17354
|
const OM = 0.8, NM = 1.2;
|
|
17355
|
-
var $n, Bn,
|
|
17355
|
+
var $n, Bn, Rt, Ti, ja, wr, sn, yi, Ga, wd, wf, xs, xo, Rr, Ei, Wa, Us, Rd, Uo, Pu, bd, Rf, kd, bf, mg;
|
|
17356
17356
|
let sr = (mg = class extends Lt {
|
|
17357
17357
|
/**
|
|
17358
17358
|
* @param {Context} context
|
|
@@ -17453,7 +17453,7 @@ let sr = (mg = class extends Lt {
|
|
|
17453
17453
|
* The preset of the participant.
|
|
17454
17454
|
*/
|
|
17455
17455
|
p(this, "presetName");
|
|
17456
|
-
m(this,
|
|
17456
|
+
m(this, Rt, void 0);
|
|
17457
17457
|
m(this, xs, void 0);
|
|
17458
17458
|
m(this, xo, void 0);
|
|
17459
17459
|
m(this, Rr, /* @__PURE__ */ new Map());
|
|
@@ -17470,15 +17470,15 @@ let sr = (mg = class extends Lt {
|
|
|
17470
17470
|
if (!i || !n)
|
|
17471
17471
|
return;
|
|
17472
17472
|
const o = n / r, c = i / e, d = Math.max(o, c);
|
|
17473
|
-
d > NM && a(this, Us) === 1 ? (S(this, Us, 0), a(this,
|
|
17473
|
+
d > NM && a(this, Us) === 1 ? (S(this, Us, 0), a(this, Rt).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17474
17474
|
peerId: this.id,
|
|
17475
17475
|
maxSpatialLayer: a(this, Us)
|
|
17476
|
-
})) : d < OM && a(this, Us) === 0 && (S(this, Us, 1), a(this,
|
|
17476
|
+
})) : d < OM && a(this, Us) === 0 && (S(this, Us, 1), a(this, Rt).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17477
17477
|
peerId: this.id,
|
|
17478
17478
|
maxSpatialLayer: a(this, Us)
|
|
17479
17479
|
}));
|
|
17480
17480
|
}, 2e3));
|
|
17481
|
-
S(this,
|
|
17481
|
+
S(this, Rt, t);
|
|
17482
17482
|
const {
|
|
17483
17483
|
id: o,
|
|
17484
17484
|
userId: c,
|
|
@@ -17518,7 +17518,7 @@ let sr = (mg = class extends Lt {
|
|
|
17518
17518
|
* Not for external use
|
|
17519
17519
|
*/
|
|
17520
17520
|
get telemetry() {
|
|
17521
|
-
return a(this,
|
|
17521
|
+
return a(this, Rt).getValue("telemetry");
|
|
17522
17522
|
}
|
|
17523
17523
|
/**
|
|
17524
17524
|
* @param {boolean} videoEnabled
|
|
@@ -17619,7 +17619,7 @@ let sr = (mg = class extends Lt {
|
|
|
17619
17619
|
}), !a(this, wd, wf))
|
|
17620
17620
|
throw new A("Can`t kick participant without joining room", "1205");
|
|
17621
17621
|
if (a(this, xs).permissions.kickParticipant) {
|
|
17622
|
-
yield a(this,
|
|
17622
|
+
yield a(this, Rt).getValue("peerSessionStore").emitAsync(b.KICK_PEER, {
|
|
17623
17623
|
peerId: t
|
|
17624
17624
|
});
|
|
17625
17625
|
return;
|
|
@@ -17716,16 +17716,16 @@ let sr = (mg = class extends Lt {
|
|
|
17716
17716
|
t.srcObject = void 0;
|
|
17717
17717
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
17718
17718
|
}
|
|
17719
|
-
}, $n = new WeakMap(), Bn = new WeakMap(),
|
|
17720
|
-
return a(this,
|
|
17719
|
+
}, $n = new WeakMap(), Bn = new WeakMap(), Rt = new WeakMap(), Ti = new WeakSet(), ja = function() {
|
|
17720
|
+
return a(this, Rt).getValue("roomNodeClient");
|
|
17721
17721
|
}, wr = new WeakSet(), sn = function() {
|
|
17722
|
-
return a(this,
|
|
17722
|
+
return a(this, Rt).getValue("audioPlayback");
|
|
17723
17723
|
}, yi = new WeakSet(), Ga = function() {
|
|
17724
|
-
return a(this,
|
|
17724
|
+
return a(this, Rt).getValue("connectionHandler").mediaJoined;
|
|
17725
17725
|
}, wd = new WeakSet(), wf = function() {
|
|
17726
|
-
return a(this,
|
|
17726
|
+
return a(this, Rt).getValue("connectionHandler").socketJoined;
|
|
17727
17727
|
}, xs = new WeakMap(), xo = new WeakMap(), Rr = new WeakMap(), Ei = new WeakSet(), Wa = function() {
|
|
17728
|
-
return a(this,
|
|
17728
|
+
return a(this, Rt).getValue("pip");
|
|
17729
17729
|
}, Us = new WeakMap(), Rd = new WeakMap(), Uo = new WeakSet(), Pu = function() {
|
|
17730
17730
|
Array.from(a(this, Rr).keys()).forEach(this.updateVideo);
|
|
17731
17731
|
}, bd = new WeakSet(), Rf = function() {
|
|
@@ -19402,7 +19402,7 @@ Qi([
|
|
|
19402
19402
|
const me = Cs(
|
|
19403
19403
|
ah().permissions
|
|
19404
19404
|
);
|
|
19405
|
-
var q, qn, jn, Ad, ot,
|
|
19405
|
+
var q, qn, jn, Ad, ot, Pt;
|
|
19406
19406
|
const dn = class extends Lt {
|
|
19407
19407
|
constructor(e, r, i, n = !1) {
|
|
19408
19408
|
const o = e.getValue("logger");
|
|
@@ -19652,7 +19652,7 @@ const dn = class extends Lt {
|
|
|
19652
19652
|
get canProduceVideo() {
|
|
19653
19653
|
var r;
|
|
19654
19654
|
const e = (r = a(this, q).media.video.canProduce) != null ? r : me.media.video.canProduce;
|
|
19655
|
-
return this.stageEnabled && (a(this, ot,
|
|
19655
|
+
return this.stageEnabled && (a(this, ot, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, ot, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, ot, Pt) === "OFF_STAGE" || a(this, ot, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19656
19656
|
}
|
|
19657
19657
|
/**
|
|
19658
19658
|
* @deprecated in favour of `canProduceScreenshare`
|
|
@@ -19669,7 +19669,7 @@ const dn = class extends Lt {
|
|
|
19669
19669
|
get canProduceScreenshare() {
|
|
19670
19670
|
var r;
|
|
19671
19671
|
const e = (r = a(this, q).media.screenshare.canProduce) != null ? r : me.media.screenshare.canProduce;
|
|
19672
|
-
return this.stageEnabled && (a(this, ot,
|
|
19672
|
+
return this.stageEnabled && (a(this, ot, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, ot, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, ot, Pt) === "OFF_STAGE" || a(this, ot, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19673
19673
|
}
|
|
19674
19674
|
/**
|
|
19675
19675
|
* @deprecated in favour of `canProduceAudio`
|
|
@@ -19686,7 +19686,7 @@ const dn = class extends Lt {
|
|
|
19686
19686
|
get canProduceAudio() {
|
|
19687
19687
|
var r;
|
|
19688
19688
|
const e = (r = a(this, q).media.audio.canProduce) != null ? r : me.media.audio.canProduce;
|
|
19689
|
-
return this.stageEnabled && (a(this, ot,
|
|
19689
|
+
return this.stageEnabled && (a(this, ot, Pt) === "ACCEPTED_TO_JOIN_STAGE" || a(this, ot, Pt) === "ON_STAGE") && e === j.CanRequest ? j.Allowed : this.stageEnabled && (a(this, ot, Pt) === "OFF_STAGE" || a(this, ot, Pt) === "REQUESTED_TO_JOIN_STAGE") && e === j.Allowed ? j.NotAllowed : e;
|
|
19690
19690
|
}
|
|
19691
19691
|
/**
|
|
19692
19692
|
* The `chatPublic` shows permissions for public chat
|
|
@@ -19798,10 +19798,10 @@ const dn = class extends Lt {
|
|
|
19798
19798
|
}
|
|
19799
19799
|
};
|
|
19800
19800
|
let Cu = dn;
|
|
19801
|
-
q = new WeakMap(), qn = new WeakMap(), jn = new WeakMap(), Ad = new WeakMap(), ot = new WeakSet(),
|
|
19801
|
+
q = new WeakMap(), qn = new WeakMap(), jn = new WeakMap(), Ad = new WeakMap(), ot = new WeakSet(), Pt = function() {
|
|
19802
19802
|
return a(this, jn).getValue("stageStatus");
|
|
19803
19803
|
};
|
|
19804
|
-
var
|
|
19804
|
+
var bt;
|
|
19805
19805
|
class If extends Lt {
|
|
19806
19806
|
/**
|
|
19807
19807
|
* @param {Context} context
|
|
@@ -19810,8 +19810,8 @@ class If extends Lt {
|
|
|
19810
19810
|
constructor(e, r) {
|
|
19811
19811
|
super(r);
|
|
19812
19812
|
p(this, "localMediaHandler");
|
|
19813
|
-
m(this,
|
|
19814
|
-
S(this,
|
|
19813
|
+
m(this, bt, void 0);
|
|
19814
|
+
S(this, bt, e);
|
|
19815
19815
|
}
|
|
19816
19816
|
updatePermission() {
|
|
19817
19817
|
return u(this, null, function* () {
|
|
@@ -19819,7 +19819,7 @@ class If extends Lt {
|
|
|
19819
19819
|
const e = (h, g) => {
|
|
19820
19820
|
this.mediaPermissions[h] = g;
|
|
19821
19821
|
const f = { message: this.mediaPermissions[h], kind: h };
|
|
19822
|
-
g === "DENIED" ? a(this,
|
|
19822
|
+
g === "DENIED" ? a(this, bt).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_ERROR, f) : a(this, bt).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, f);
|
|
19823
19823
|
};
|
|
19824
19824
|
if (ve.getName() === "firefox")
|
|
19825
19825
|
return;
|
|
@@ -19851,15 +19851,15 @@ class If extends Lt {
|
|
|
19851
19851
|
var n, o, c, d;
|
|
19852
19852
|
switch (r) {
|
|
19853
19853
|
case "audio": {
|
|
19854
|
-
(n = a(this,
|
|
19854
|
+
(n = a(this, bt)) == null || n.getValue("callstats").mediaPermission("AUDIO", e), (o = a(this, bt)) == null || o.getValue("callstats").mediaPermission("SPEAKER", e);
|
|
19855
19855
|
break;
|
|
19856
19856
|
}
|
|
19857
19857
|
case "video": {
|
|
19858
|
-
(c = a(this,
|
|
19858
|
+
(c = a(this, bt)) == null || c.getValue("callstats").mediaPermission("VIDEO", e);
|
|
19859
19859
|
break;
|
|
19860
19860
|
}
|
|
19861
19861
|
case "screenshare": {
|
|
19862
|
-
(d = a(this,
|
|
19862
|
+
(d = a(this, bt)) == null || d.getValue("callstats").mediaPermission("SCREENSHARE", e);
|
|
19863
19863
|
break;
|
|
19864
19864
|
}
|
|
19865
19865
|
}
|
|
@@ -19867,7 +19867,7 @@ class If extends Lt {
|
|
|
19867
19867
|
}
|
|
19868
19868
|
get peerId() {
|
|
19869
19869
|
var e;
|
|
19870
|
-
return (e = a(this,
|
|
19870
|
+
return (e = a(this, bt)) == null ? void 0 : e.getValue("peerId");
|
|
19871
19871
|
}
|
|
19872
19872
|
/**
|
|
19873
19873
|
* @param {Object} options
|
|
@@ -19880,7 +19880,7 @@ class If extends Lt {
|
|
|
19880
19880
|
init() {
|
|
19881
19881
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
19882
19882
|
var n, o, c, d, l, h, g;
|
|
19883
|
-
if (ve.init(), i && S(this,
|
|
19883
|
+
if (ve.init(), i && S(this, bt, i), !this.localMediaHandler)
|
|
19884
19884
|
try {
|
|
19885
19885
|
let f = !0;
|
|
19886
19886
|
if ((n = i == null ? void 0 : i.getValue("defaults")) != null && n.mediaHandler)
|
|
@@ -19889,7 +19889,7 @@ class If extends Lt {
|
|
|
19889
19889
|
const { RNLocalMediaHandlerImpl: v } = navigator;
|
|
19890
19890
|
this.localMediaHandler = yield v.init(e);
|
|
19891
19891
|
} else
|
|
19892
|
-
this.localMediaHandler = new
|
|
19892
|
+
this.localMediaHandler = new yt(
|
|
19893
19893
|
i,
|
|
19894
19894
|
e.constraints,
|
|
19895
19895
|
(o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
|
|
@@ -19946,7 +19946,7 @@ class If extends Lt {
|
|
|
19946
19946
|
});
|
|
19947
19947
|
}
|
|
19948
19948
|
set context(e) {
|
|
19949
|
-
S(this,
|
|
19949
|
+
S(this, bt, e), this.localMediaHandler.context = e;
|
|
19950
19950
|
}
|
|
19951
19951
|
/**
|
|
19952
19952
|
* Returns the `audioTrack`.
|
|
@@ -20209,7 +20209,7 @@ class If extends Lt {
|
|
|
20209
20209
|
});
|
|
20210
20210
|
}
|
|
20211
20211
|
}
|
|
20212
|
-
|
|
20212
|
+
bt = new WeakMap();
|
|
20213
20213
|
var qM = Object.defineProperty, jM = Object.getOwnPropertyDescriptor, ht = (s, t, e, r) => {
|
|
20214
20214
|
for (var i = r > 1 ? void 0 : r ? jM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20215
20215
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -20880,14 +20880,14 @@ class go extends Error {
|
|
|
20880
20880
|
super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, go) : this.stack = new Error(t).stack;
|
|
20881
20881
|
}
|
|
20882
20882
|
}
|
|
20883
|
-
class
|
|
20883
|
+
class Tt extends Error {
|
|
20884
20884
|
constructor(t) {
|
|
20885
|
-
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
20885
|
+
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Tt) : this.stack = new Error(t).stack;
|
|
20886
20886
|
}
|
|
20887
20887
|
}
|
|
20888
20888
|
class fr extends Error {
|
|
20889
20889
|
constructor(t) {
|
|
20890
|
-
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this,
|
|
20890
|
+
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Tt) : this.stack = new Error(t).stack;
|
|
20891
20891
|
}
|
|
20892
20892
|
}
|
|
20893
20893
|
const Wp = (s) => new Promise((t) => setTimeout(t, s));
|
|
@@ -21794,7 +21794,7 @@ class QM extends Rl {
|
|
|
21794
21794
|
getStats() {
|
|
21795
21795
|
return u(this, null, function* () {
|
|
21796
21796
|
if (a(this, vs))
|
|
21797
|
-
throw new
|
|
21797
|
+
throw new Tt("closed");
|
|
21798
21798
|
return a(this, qo).getReceiverStats(this.localId);
|
|
21799
21799
|
});
|
|
21800
21800
|
}
|
|
@@ -21841,7 +21841,7 @@ qo = new WeakMap(), Ci = new WeakMap(), vs = new WeakMap(), Id = new WeakMap(),
|
|
|
21841
21841
|
}));
|
|
21842
21842
|
}
|
|
21843
21843
|
};
|
|
21844
|
-
var ns, Yn, Qn, wi, Jt, ze, kr, Xn, Od,
|
|
21844
|
+
var ns, Yn, Qn, wi, Jt, ze, kr, Xn, Od, kt, Zt;
|
|
21845
21845
|
class XM extends Rl {
|
|
21846
21846
|
/**
|
|
21847
21847
|
* @emits transportclose
|
|
@@ -21854,7 +21854,7 @@ class XM extends Rl {
|
|
|
21854
21854
|
constructor(e, r) {
|
|
21855
21855
|
var i, n;
|
|
21856
21856
|
super(e);
|
|
21857
|
-
m(this,
|
|
21857
|
+
m(this, kt);
|
|
21858
21858
|
/**
|
|
21859
21859
|
* Producer ID.
|
|
21860
21860
|
*/
|
|
@@ -21931,7 +21931,7 @@ class XM extends Rl {
|
|
|
21931
21931
|
return u(this, null, function* () {
|
|
21932
21932
|
if (a(this, Jt))
|
|
21933
21933
|
return;
|
|
21934
|
-
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, a(this,
|
|
21934
|
+
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, a(this, kt, Zt)), S(this, Jt, !0), this._destroyTrack(), e === mo) {
|
|
21935
21935
|
this.safeEmit("close", { reason: e });
|
|
21936
21936
|
return;
|
|
21937
21937
|
}
|
|
@@ -21945,7 +21945,7 @@ class XM extends Rl {
|
|
|
21945
21945
|
getStats() {
|
|
21946
21946
|
return u(this, null, function* () {
|
|
21947
21947
|
if (a(this, Jt))
|
|
21948
|
-
throw new
|
|
21948
|
+
throw new Tt("closed");
|
|
21949
21949
|
return a(this, ns).getSenderStats(this.localId);
|
|
21950
21950
|
});
|
|
21951
21951
|
}
|
|
@@ -21953,14 +21953,14 @@ class XM extends Rl {
|
|
|
21953
21953
|
* Pauses sending media.
|
|
21954
21954
|
*/
|
|
21955
21955
|
pause() {
|
|
21956
|
-
this.logger.debug("Producer::pause()", a(this,
|
|
21956
|
+
this.logger.debug("Producer::pause()", a(this, kt, Zt)), a(this, Jt) && this.logger.error("Producer::pause() | Producer closed", a(this, kt, Zt)), S(this, kr, !0), a(this, ze) && a(this, Qn) && (a(this, ze).enabled = !1), a(this, wi) && a(this, ns).replaceTrack(this.localId, null), this.emit("pause");
|
|
21957
21957
|
}
|
|
21958
21958
|
/**
|
|
21959
21959
|
* Resumes sending media.
|
|
21960
21960
|
*/
|
|
21961
21961
|
resume() {
|
|
21962
|
-
if (this.logger.debug("Producer::resume()", a(this,
|
|
21963
|
-
this.logger.error("Producer::resume() | Producer closed", a(this,
|
|
21962
|
+
if (this.logger.debug("Producer::resume()", a(this, kt, Zt)), a(this, Jt)) {
|
|
21963
|
+
this.logger.error("Producer::resume() | Producer closed", a(this, kt, Zt));
|
|
21964
21964
|
return;
|
|
21965
21965
|
}
|
|
21966
21966
|
S(this, kr, !1), a(this, ze) && a(this, Qn) && (a(this, ze).enabled = !0), a(this, wi) && a(this, ns).replaceTrack(this.localId, a(this, ze)), this.emit("resume");
|
|
@@ -21972,20 +21972,20 @@ class XM extends Rl {
|
|
|
21972
21972
|
return u(this, arguments, function* ({
|
|
21973
21973
|
track: e
|
|
21974
21974
|
}) {
|
|
21975
|
-
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this,
|
|
21975
|
+
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this, kt, Zt)), a(this, Jt)) {
|
|
21976
21976
|
if (e && a(this, Yn))
|
|
21977
21977
|
try {
|
|
21978
21978
|
e.stop();
|
|
21979
21979
|
} catch (i) {
|
|
21980
|
-
this.logger.error("Producer::replaceTrack", W(N({}, a(this,
|
|
21980
|
+
this.logger.error("Producer::replaceTrack", W(N({}, a(this, kt, Zt)), {
|
|
21981
21981
|
error: i
|
|
21982
21982
|
}));
|
|
21983
21983
|
}
|
|
21984
|
-
throw new
|
|
21984
|
+
throw new Tt("closed");
|
|
21985
21985
|
} else if (e && e.readyState === "ended")
|
|
21986
|
-
throw new
|
|
21986
|
+
throw new Tt("track ended");
|
|
21987
21987
|
if (e === a(this, ze)) {
|
|
21988
|
-
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this,
|
|
21988
|
+
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, a(this, kt, Zt));
|
|
21989
21989
|
return;
|
|
21990
21990
|
}
|
|
21991
21991
|
(!a(this, wi) || !a(this, kr)) && (yield a(this, ns).replaceTrack(this.localId, e)), this._destroyTrack(), S(this, ze, e), this._handleTrack();
|
|
@@ -21997,7 +21997,7 @@ class XM extends Rl {
|
|
|
21997
21997
|
setMaxSpatialLayer(e) {
|
|
21998
21998
|
return u(this, null, function* () {
|
|
21999
21999
|
if (a(this, Jt))
|
|
22000
|
-
throw new
|
|
22000
|
+
throw new Tt("closed");
|
|
22001
22001
|
if (this.kind !== "video")
|
|
22002
22002
|
throw new go("not a video Producer");
|
|
22003
22003
|
if (typeof e != "number")
|
|
@@ -22011,14 +22011,14 @@ class XM extends Rl {
|
|
|
22011
22011
|
setRtpEncodingParameters(e) {
|
|
22012
22012
|
return u(this, null, function* () {
|
|
22013
22013
|
if (a(this, Jt))
|
|
22014
|
-
throw new
|
|
22014
|
+
throw new Tt("closed");
|
|
22015
22015
|
if (typeof e != "object")
|
|
22016
22016
|
throw new TypeError("invalid params");
|
|
22017
22017
|
yield a(this, ns).setRtpEncodingParameters(this.localId, e);
|
|
22018
22018
|
});
|
|
22019
22019
|
}
|
|
22020
22020
|
_onTrackEnded() {
|
|
22021
|
-
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, a(this,
|
|
22021
|
+
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, a(this, kt, Zt)), this.safeEmit("trackended", this.track.id);
|
|
22022
22022
|
}
|
|
22023
22023
|
_handleTrack() {
|
|
22024
22024
|
a(this, ze) && a(this, ze).addEventListener("ended", this._onTrackEnded);
|
|
@@ -22029,13 +22029,13 @@ class XM extends Rl {
|
|
|
22029
22029
|
try {
|
|
22030
22030
|
a(this, ze).removeEventListener("ended", this._onTrackEnded), a(this, Yn) && a(this, ze).stop();
|
|
22031
22031
|
} catch (r) {
|
|
22032
|
-
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, W(N({}, a(this,
|
|
22032
|
+
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, W(N({}, a(this, kt, Zt)), {
|
|
22033
22033
|
error: r
|
|
22034
22034
|
}));
|
|
22035
22035
|
}
|
|
22036
22036
|
}
|
|
22037
22037
|
}
|
|
22038
|
-
ns = new WeakMap(), Yn = new WeakMap(), Qn = new WeakMap(), wi = new WeakMap(), Jt = new WeakMap(), ze = new WeakMap(), kr = new WeakMap(), Xn = new WeakMap(), Od = new WeakMap(),
|
|
22038
|
+
ns = new WeakMap(), Yn = new WeakMap(), Qn = new WeakMap(), wi = new WeakMap(), Jt = new WeakMap(), ze = new WeakMap(), kr = new WeakMap(), Xn = new WeakMap(), Od = new WeakMap(), kt = new WeakSet(), Zt = function() {
|
|
22039
22039
|
return {
|
|
22040
22040
|
producer: {
|
|
22041
22041
|
id: this.id,
|
|
@@ -22360,7 +22360,7 @@ const un = class extends Rl {
|
|
|
22360
22360
|
getStats() {
|
|
22361
22361
|
return u(this, null, function* () {
|
|
22362
22362
|
if (this.closed)
|
|
22363
|
-
throw new
|
|
22363
|
+
throw new Tt("closed");
|
|
22364
22364
|
return this.handler.getTransportStats();
|
|
22365
22365
|
});
|
|
22366
22366
|
}
|
|
@@ -22386,7 +22386,7 @@ const un = class extends Rl {
|
|
|
22386
22386
|
restartIce() {
|
|
22387
22387
|
return u(this, null, function* () {
|
|
22388
22388
|
if (this.logger.debug("restartIce()"), this.closed)
|
|
22389
|
-
throw new
|
|
22389
|
+
throw new Tt("closed");
|
|
22390
22390
|
return this.handler.restartIce();
|
|
22391
22391
|
});
|
|
22392
22392
|
}
|
|
@@ -22397,7 +22397,7 @@ const un = class extends Rl {
|
|
|
22397
22397
|
if (this.direction !== "send")
|
|
22398
22398
|
throw new go("not a sending Transport");
|
|
22399
22399
|
if (r.readyState === "ended")
|
|
22400
|
-
throw new
|
|
22400
|
+
throw new Tt("track ended");
|
|
22401
22401
|
if (i && typeof i != "object")
|
|
22402
22402
|
throw new TypeError("if given, appData must be an object");
|
|
22403
22403
|
} else
|
|
@@ -22473,7 +22473,7 @@ const un = class extends Rl {
|
|
|
22473
22473
|
canConsume() {
|
|
22474
22474
|
return u(this, null, function* () {
|
|
22475
22475
|
if (this.closed)
|
|
22476
|
-
throw new
|
|
22476
|
+
throw new Tt("closed");
|
|
22477
22477
|
if (this.direction !== "recv")
|
|
22478
22478
|
throw new go("not a receiving transport");
|
|
22479
22479
|
if (!(yield this.transportConnectionPromise))
|
|
@@ -22932,7 +22932,7 @@ Zn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Go = new WeakMap(),
|
|
|
22932
22932
|
return u(this, null, function* () {
|
|
22933
22933
|
var o, c, d, l, h, g, f, v;
|
|
22934
22934
|
Ta(this.context, "forceRelay") && S(this, ys, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, ys)}`);
|
|
22935
|
-
const n = yield
|
|
22935
|
+
const n = yield vt().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
22936
22936
|
e.send && V(this, xd, xf).call(this, {
|
|
22937
22937
|
iceServers: n,
|
|
22938
22938
|
additionalSettings: {
|
|
@@ -23811,7 +23811,7 @@ var lD = Object.defineProperty, uD = Object.getOwnPropertyDescriptor, le = (s, t
|
|
|
23811
23811
|
for (var i = r > 1 ? void 0 : r ? uD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
23812
23812
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23813
23813
|
return r && i && lD(t, e, i), i;
|
|
23814
|
-
}, lc, uc, et, G, tl, dt, Li, Vi, xi, hc,
|
|
23814
|
+
}, lc, uc, et, G, tl, dt, Li, Vi, xi, hc, At, _s, tt, mt, Js, Xr, sl, Xf, rl, Zf, il, eS, pc, Lu, nl, tS, al, sS, lt, _t, Ui, Ya, ol, rS, cl, iS, dl, nS;
|
|
23815
23815
|
class ne {
|
|
23816
23816
|
constructor(t, e) {
|
|
23817
23817
|
m(this, Js);
|
|
@@ -23860,7 +23860,7 @@ class ne {
|
|
|
23860
23860
|
m(this, Vi, void 0);
|
|
23861
23861
|
m(this, xi, void 0);
|
|
23862
23862
|
m(this, hc, void 0);
|
|
23863
|
-
m(this,
|
|
23863
|
+
m(this, At, null);
|
|
23864
23864
|
m(this, _s, void 0);
|
|
23865
23865
|
m(this, tt, void 0);
|
|
23866
23866
|
m(this, mt, void 0);
|
|
@@ -23911,7 +23911,7 @@ class ne {
|
|
|
23911
23911
|
a(this, Js, Xr).mediaJoined = t;
|
|
23912
23912
|
}
|
|
23913
23913
|
reset() {
|
|
23914
|
-
a(this, G).closeAllProducers(), a(this, G).closeAllConsumers(), a(this, tt).clear(), a(this, _s).clear(), S(this,
|
|
23914
|
+
a(this, G).closeAllProducers(), a(this, G).closeAllConsumers(), a(this, tt).clear(), a(this, _s).clear(), S(this, At, null), a(this, xi).stop(), a(this, G).stopAllTransports(), a(this, G).reset(), S(this, xi, new Ru());
|
|
23915
23915
|
}
|
|
23916
23916
|
joinRoom(n, o) {
|
|
23917
23917
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
@@ -23933,13 +23933,13 @@ class ne {
|
|
|
23933
23933
|
*/
|
|
23934
23934
|
initializeConnection(n, o) {
|
|
23935
23935
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
23936
|
-
return a(this,
|
|
23936
|
+
return a(this, At) ? a(this, At) : (S(this, At, (() => u(this, null, function* () {
|
|
23937
23937
|
try {
|
|
23938
23938
|
yield V(this, pc, Lu).call(this, t, e, r, i);
|
|
23939
23939
|
} catch (c) {
|
|
23940
|
-
throw S(this,
|
|
23940
|
+
throw S(this, At, null), c;
|
|
23941
23941
|
}
|
|
23942
|
-
}))()), a(this,
|
|
23942
|
+
}))()), a(this, At));
|
|
23943
23943
|
});
|
|
23944
23944
|
}
|
|
23945
23945
|
getConsumers() {
|
|
@@ -23995,7 +23995,7 @@ class ne {
|
|
|
23995
23995
|
_shareWebcam(t) {
|
|
23996
23996
|
return u(this, null, function* () {
|
|
23997
23997
|
var h, g, f, v;
|
|
23998
|
-
const e = we.WEBCAM, r = V(this, lt,
|
|
23998
|
+
const e = we.WEBCAM, r = V(this, lt, _t).call(this, e);
|
|
23999
23999
|
if (r) {
|
|
24000
24000
|
const E = yield r;
|
|
24001
24001
|
if (a(this, G).producers.has(E)) {
|
|
@@ -24073,8 +24073,8 @@ class ne {
|
|
|
24073
24073
|
return u(this, null, function* () {
|
|
24074
24074
|
try {
|
|
24075
24075
|
if (t === void 0)
|
|
24076
|
-
throw new
|
|
24077
|
-
const e = V(this, lt,
|
|
24076
|
+
throw new Tt("track undefined");
|
|
24077
|
+
const e = V(this, lt, _t).call(this, we.MIC);
|
|
24078
24078
|
if (e) {
|
|
24079
24079
|
const o = yield e;
|
|
24080
24080
|
if (a(this, G).producers.has(o)) {
|
|
@@ -24105,7 +24105,7 @@ class ne {
|
|
|
24105
24105
|
pauseMic() {
|
|
24106
24106
|
return u(this, null, function* () {
|
|
24107
24107
|
var i;
|
|
24108
|
-
const t = yield V(this, lt,
|
|
24108
|
+
const t = yield V(this, lt, _t).call(this, we.MIC), e = a(this, G).producers.get(t);
|
|
24109
24109
|
if (!e) {
|
|
24110
24110
|
this.logger.error("pauseMic::could_not_find_mic_producer");
|
|
24111
24111
|
return;
|
|
@@ -24127,7 +24127,7 @@ class ne {
|
|
|
24127
24127
|
}
|
|
24128
24128
|
pauseWebcam() {
|
|
24129
24129
|
return u(this, null, function* () {
|
|
24130
|
-
const t = yield V(this, lt,
|
|
24130
|
+
const t = yield V(this, lt, _t).call(this, we.WEBCAM), e = a(this, G).producers.get(t);
|
|
24131
24131
|
if (!e) {
|
|
24132
24132
|
this.logger.error("pauseWebcam::could_not_find_webcam_producer");
|
|
24133
24133
|
return;
|
|
@@ -24145,7 +24145,7 @@ class ne {
|
|
|
24145
24145
|
}
|
|
24146
24146
|
resumeMic() {
|
|
24147
24147
|
return u(this, null, function* () {
|
|
24148
|
-
const t = yield V(this, lt,
|
|
24148
|
+
const t = yield V(this, lt, _t).call(this, we.MIC), e = a(this, G).producers.get(t);
|
|
24149
24149
|
if (!e) {
|
|
24150
24150
|
this.logger.error("resumeMic::could_not_find_mic_producer");
|
|
24151
24151
|
return;
|
|
@@ -24167,7 +24167,7 @@ class ne {
|
|
|
24167
24167
|
}
|
|
24168
24168
|
resumeWebcam() {
|
|
24169
24169
|
return u(this, arguments, function* (t = we.WEBCAM) {
|
|
24170
|
-
const e = yield V(this, lt,
|
|
24170
|
+
const e = yield V(this, lt, _t).call(this, t), r = a(this, G).producers.get(e);
|
|
24171
24171
|
if (!r) {
|
|
24172
24172
|
this.logger.error("resumeWebcam::could_not_find_webcam_producer");
|
|
24173
24173
|
return;
|
|
@@ -24189,21 +24189,21 @@ class ne {
|
|
|
24189
24189
|
}
|
|
24190
24190
|
disableWebcam() {
|
|
24191
24191
|
return u(this, null, function* () {
|
|
24192
|
-
const t = we.WEBCAM, e = yield V(this, lt,
|
|
24192
|
+
const t = we.WEBCAM, e = yield V(this, lt, _t).call(this, t);
|
|
24193
24193
|
V(this, ol, rS).call(this, t), e && (yield a(this, G).closeProducer(e));
|
|
24194
24194
|
});
|
|
24195
24195
|
}
|
|
24196
24196
|
disableMic() {
|
|
24197
24197
|
return u(this, null, function* () {
|
|
24198
24198
|
var e;
|
|
24199
|
-
const t = yield V(this, lt,
|
|
24199
|
+
const t = yield V(this, lt, _t).call(this, we.MIC);
|
|
24200
24200
|
t && (yield a(this, G).closeProducer(t)), (e = a(this, mt)) == null || e.stop(), a(this, tt).delete(we.MIC);
|
|
24201
24201
|
});
|
|
24202
24202
|
}
|
|
24203
24203
|
disableScreenShare() {
|
|
24204
24204
|
return u(this, null, function* () {
|
|
24205
24205
|
this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop();
|
|
24206
|
-
const t = yield V(this, lt,
|
|
24206
|
+
const t = yield V(this, lt, _t).call(this, we.SCREENSHARE_VIDEO), e = yield V(this, lt, _t).call(this, we.SCREENSHARE_AUDIO);
|
|
24207
24207
|
t && (yield a(this, G).closeProducer(t)), e && (yield a(this, G).closeProducer(e)), a(this, _s).clear(), a(this, tt).delete(we.SCREENSHARE_VIDEO), a(this, tt).delete(we.SCREENSHARE_AUDIO);
|
|
24208
24208
|
});
|
|
24209
24209
|
}
|
|
@@ -24215,11 +24215,11 @@ class ne {
|
|
|
24215
24215
|
resetVideoProducers(t, e) {
|
|
24216
24216
|
return u(this, null, function* () {
|
|
24217
24217
|
if (t) {
|
|
24218
|
-
const r = yield V(this, lt,
|
|
24218
|
+
const r = yield V(this, lt, _t).call(this, we.WEBCAM);
|
|
24219
24219
|
yield a(this, G).closeProducer(r, { stopTrack: !1 }), this.shareWebcam(t);
|
|
24220
24220
|
}
|
|
24221
24221
|
if (e) {
|
|
24222
|
-
const r = yield V(this, lt,
|
|
24222
|
+
const r = yield V(this, lt, _t).call(this, we.SCREENSHARE_VIDEO);
|
|
24223
24223
|
yield a(this, G).closeProducer(
|
|
24224
24224
|
r,
|
|
24225
24225
|
{ stopTrack: !1 }
|
|
@@ -24457,7 +24457,7 @@ class ne {
|
|
|
24457
24457
|
});
|
|
24458
24458
|
}
|
|
24459
24459
|
}
|
|
24460
|
-
lc = new WeakMap(), uc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), tl = new WeakMap(), dt = new WeakMap(), Li = new WeakMap(), Vi = new WeakMap(), xi = new WeakMap(), hc = new WeakMap(),
|
|
24460
|
+
lc = new WeakMap(), uc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), tl = new WeakMap(), dt = new WeakMap(), Li = new WeakMap(), Vi = new WeakMap(), xi = new WeakMap(), hc = new WeakMap(), At = new WeakMap(), _s = new WeakMap(), tt = new WeakMap(), mt = new WeakMap(), Js = new WeakSet(), Xr = function() {
|
|
24461
24461
|
return this.context.getValue("connectionHandler");
|
|
24462
24462
|
}, sl = new WeakSet(), Xf = function(t, e, r, i) {
|
|
24463
24463
|
return u(this, null, function* () {
|
|
@@ -24466,16 +24466,16 @@ lc = new WeakMap(), uc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), t
|
|
|
24466
24466
|
let n = !1;
|
|
24467
24467
|
if (r) {
|
|
24468
24468
|
const { recv: c, send: d } = (o = a(this, Js, Xr).mediaState) != null ? o : {};
|
|
24469
|
-
(d == null ? void 0 : d.state) === Hr.CONNECTED && (c == null ? void 0 : c.state) === Hr.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — partial reset (producers only)"), a(this, G).closeAllProducersLocally(), a(this, tt).clear(), a(this, _s).clear(), S(this,
|
|
24469
|
+
(d == null ? void 0 : d.state) === Hr.CONNECTED && (c == null ? void 0 : c.state) === Hr.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — partial reset (producers only)"), a(this, G).closeAllProducersLocally(), a(this, tt).clear(), a(this, _s).clear(), S(this, At, null), n = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset());
|
|
24470
24470
|
}
|
|
24471
24471
|
try {
|
|
24472
|
-
a(this,
|
|
24472
|
+
a(this, At) ? yield a(this, At) : yield V(this, pc, Lu).call(this, t, e, r, i, n), V(this, il, eS).call(this, e);
|
|
24473
24473
|
const { joined: c, error: d } = yield V(this, rl, Zf).call(this);
|
|
24474
24474
|
return { roomJoined: c, error: d };
|
|
24475
24475
|
} catch (c) {
|
|
24476
24476
|
return this.logger.error("Failed to complete room join", { error: c }), { roomJoined: !1, error: c };
|
|
24477
24477
|
} finally {
|
|
24478
|
-
S(this,
|
|
24478
|
+
S(this, At, null);
|
|
24479
24479
|
}
|
|
24480
24480
|
});
|
|
24481
24481
|
}, rl = new WeakSet(), Zf = function() {
|
|
@@ -24552,7 +24552,7 @@ lc = new WeakMap(), uc = new WeakMap(), et = new WeakMap(), G = new WeakMap(), t
|
|
|
24552
24552
|
}
|
|
24553
24553
|
);
|
|
24554
24554
|
});
|
|
24555
|
-
}, lt = new WeakSet(),
|
|
24555
|
+
}, lt = new WeakSet(), _t = function(t) {
|
|
24556
24556
|
return a(this, tt).get(t);
|
|
24557
24557
|
}, Ui = new WeakSet(), Ya = function(t, e) {
|
|
24558
24558
|
return a(this, tt).set(t, e);
|
|
@@ -24734,7 +24734,7 @@ const oS = (Tg = class {
|
|
|
24734
24734
|
}
|
|
24735
24735
|
static init(s, t, e, r, i) {
|
|
24736
24736
|
return u(this, null, function* () {
|
|
24737
|
-
const n =
|
|
24737
|
+
const n = vt(), o = s.getValue("peerId"), c = !!s.getValue("cachedUserDetails"), d = yield Je.__init__(
|
|
24738
24738
|
s,
|
|
24739
24739
|
e,
|
|
24740
24740
|
r,
|
|
@@ -24869,7 +24869,7 @@ const oS = (Tg = class {
|
|
|
24869
24869
|
if (this.self.roomState === "disconnected")
|
|
24870
24870
|
return;
|
|
24871
24871
|
const { peerId: t } = this;
|
|
24872
|
-
a(this, ha).updateURL(t), a(this, ee).getValue("telemetry").resetPeerId(t),
|
|
24872
|
+
a(this, ha).updateURL(t), a(this, ee).getValue("telemetry").resetPeerId(t), vt().setHeader("tracing-id", t), $r.remapContext(t, a(this, ee)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
24873
24873
|
}), a(this, ee).getValue("peerSessionStore").on(b.SOCKET_SERVICE_FAILED, () => {
|
|
24874
24874
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
24875
24875
|
}), a(this, cs).on(x.waitingRoomRequestAccepted, () => {
|
|
@@ -25172,26 +25172,26 @@ var TD = Object.defineProperty, yD = Object.getOwnPropertyDescriptor, ED = (s, t
|
|
|
25172
25172
|
for (var i = r > 1 ? void 0 : r ? yD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
25173
25173
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
25174
25174
|
return r && i && TD(t, e, i), i;
|
|
25175
|
-
},
|
|
25175
|
+
}, It;
|
|
25176
25176
|
class cS {
|
|
25177
25177
|
constructor(t, e) {
|
|
25178
25178
|
p(this, "socket");
|
|
25179
|
-
m(this,
|
|
25180
|
-
S(this,
|
|
25179
|
+
m(this, It, void 0);
|
|
25180
|
+
S(this, It, t), this.socket = e, this.handleSocketEvents(), a(this, It).setValue("roomSocketHandler", this);
|
|
25181
25181
|
}
|
|
25182
25182
|
/**
|
|
25183
25183
|
* @access private
|
|
25184
25184
|
* Not for external use
|
|
25185
25185
|
*/
|
|
25186
25186
|
get telemetry() {
|
|
25187
|
-
return a(this,
|
|
25187
|
+
return a(this, It).getValue("telemetry");
|
|
25188
25188
|
}
|
|
25189
25189
|
/**
|
|
25190
25190
|
* @access private
|
|
25191
25191
|
* Not for external use
|
|
25192
25192
|
*/
|
|
25193
25193
|
get logger() {
|
|
25194
|
-
return a(this,
|
|
25194
|
+
return a(this, It).getValue("logger");
|
|
25195
25195
|
}
|
|
25196
25196
|
cleanup() {
|
|
25197
25197
|
var t;
|
|
@@ -25222,9 +25222,9 @@ class cS {
|
|
|
25222
25222
|
);
|
|
25223
25223
|
try {
|
|
25224
25224
|
const { peer: n } = en.fromBinary((yield r).payload);
|
|
25225
|
-
a(this,
|
|
25225
|
+
a(this, It).getValue("connectionHandler").socketJoined = !0, a(this, It).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_ROOM_JOINED, { peer: n });
|
|
25226
25226
|
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
|
|
25227
|
-
return a(this,
|
|
25227
|
+
return a(this, It).getValue("peerSessionStore").emit(b.ROOM_STATE, d), a(this, It).getValue("peerSessionStore").emit(b.SOCKET_PEERS, l), { peer: n };
|
|
25228
25228
|
} catch (n) {
|
|
25229
25229
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
25230
25230
|
error: n
|
|
@@ -25459,7 +25459,7 @@ class cS {
|
|
|
25459
25459
|
this.socket.on(x.broadcastMessage, ({ payload: t }) => {
|
|
25460
25460
|
try {
|
|
25461
25461
|
const e = Ha.fromBinary(t);
|
|
25462
|
-
a(this,
|
|
25462
|
+
a(this, It).getValue("peerSessionStore").emit(b.ROOM_MESSAGE, {
|
|
25463
25463
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25464
25464
|
type: e.type,
|
|
25465
25465
|
timestamp: e.timestamp
|
|
@@ -25470,7 +25470,7 @@ class cS {
|
|
|
25470
25470
|
}), this.socket.on(x.broadcastToEntity, ({ payload: t }) => {
|
|
25471
25471
|
try {
|
|
25472
25472
|
const e = Ha.fromBinary(t);
|
|
25473
|
-
a(this,
|
|
25473
|
+
a(this, It).getValue("peerSessionStore").emit(b.MESSAGE, {
|
|
25474
25474
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
25475
25475
|
type: e.type,
|
|
25476
25476
|
timestamp: e.timestamp
|
|
@@ -25566,7 +25566,7 @@ class cS {
|
|
|
25566
25566
|
});
|
|
25567
25567
|
}
|
|
25568
25568
|
}
|
|
25569
|
-
|
|
25569
|
+
It = new WeakMap();
|
|
25570
25570
|
ED([
|
|
25571
25571
|
P.trace("RoomSocketHandler.joinRoom")
|
|
25572
25572
|
], cS.prototype, "joinRoom", 1);
|
|
@@ -26097,13 +26097,13 @@ const Zp = "2", eg = "3";
|
|
|
26097
26097
|
var ke, rn, oe, _e, gr, We, Ys, xr, ds, nn, an, ks, Vu, TS, Qa, ed, xu, yS, td, Yl, md, Uu, $u, ES, to, sd, fn, so, fd, Bu, Sn, ro, Hu, PS, io, rd, no, Sd;
|
|
26098
26098
|
class UD {
|
|
26099
26099
|
constructor(t, e) {
|
|
26100
|
-
var E, _, w, R, D, $, B, H, F, X, Ne,
|
|
26100
|
+
var E, _, w, R, D, $, B, H, F, X, Ne, Et;
|
|
26101
26101
|
ae(this, Vu), ae(this, Qa), ae(this, xu), ae(this, td), ae(this, md), ae(this, $u), ae(this, to), ae(this, fn), ae(this, fd), ae(this, Sn), ae(this, Hu), ae(this, io), ae(this, no), ae(this, ke, void 0), ae(this, rn, void 0), ae(this, oe, void 0), ae(this, _e, void 0), ae(this, gr, void 0), ae(this, We, void 0), ae(this, Ys, void 0), ae(this, xr, void 0), ae(this, ds, void 0), ae(this, nn, void 0), ae(this, an, void 0), ae(this, ks, void 0);
|
|
26102
26102
|
var r, i, n, o, c, d, l, h, g, f, v;
|
|
26103
26103
|
se(this, rn, t), se(this, gr, []), se(this, We, new gd()), se(this, Ys, !0), se(this, ds, !1), se(this, oe, e != null ? e : {}), (E = (r = M(this, oe)).autoReconnect) != null || (r.autoReconnect = !0), (_ = (i = M(this, oe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (w = (n = M(this, oe)).pingTimeout) != null || (n.pingTimeout = 3e4), (R = (o = M(this, oe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (D = (c = M(this, oe)).debug) != null || (c.debug = !0), ($ = (d = M(this, oe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (B = (l = M(this, oe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (H = (h = M(this, oe)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (F = (g = M(this, oe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), (X = (f = M(this, oe)).clientInitiatedPings) != null || (f.clientInitiatedPings = !1), (Ne = (v = M(this, oe)).clientInitiatedPingInterval) != null || (v.clientInitiatedPingInterval = 3e4), se(this, xr, {
|
|
26104
26104
|
code: void 0,
|
|
26105
26105
|
reason: void 0
|
|
26106
|
-
}), se(this, _e, (
|
|
26106
|
+
}), se(this, _e, (Et = M(this, oe).logger) != null ? Et : new xD(M(this, oe).debug ? "debug" : "info")), se(this, ks, new VD());
|
|
26107
26107
|
}
|
|
26108
26108
|
/**
|
|
26109
26109
|
* Ready state of the current WebSocket.
|
|
@@ -26730,7 +26730,7 @@ var qD = Object.defineProperty, jD = Object.getOwnPropertyDescriptor, GD = (s, t
|
|
|
26730
26730
|
for (var i = r > 1 ? void 0 : r ? jD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
26731
26731
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
26732
26732
|
return r && i && qD(t, e, i), i;
|
|
26733
|
-
},
|
|
26733
|
+
}, Mt;
|
|
26734
26734
|
class CS extends Lt {
|
|
26735
26735
|
/**
|
|
26736
26736
|
* @param {Context} context
|
|
@@ -26740,18 +26740,14 @@ class CS extends Lt {
|
|
|
26740
26740
|
super(r);
|
|
26741
26741
|
p(this, "meetings", []);
|
|
26742
26742
|
p(this, "parentMeeting", null);
|
|
26743
|
-
m(this,
|
|
26744
|
-
S(this,
|
|
26745
|
-
}
|
|
26746
|
-
get supportsConnectedMeetings() {
|
|
26747
|
-
const e = a(this, vt).getValue("self").permissions.connectedMeetings;
|
|
26748
|
-
return e ? e.canAlterConnectedMeetings || e.canSwitchConnectedMeetings || e.canSwitchToParentMeeting : !1;
|
|
26743
|
+
m(this, Mt, void 0);
|
|
26744
|
+
S(this, Mt, e);
|
|
26749
26745
|
}
|
|
26750
26746
|
get isActive() {
|
|
26751
26747
|
return this.meetings.length !== 0;
|
|
26752
26748
|
}
|
|
26753
26749
|
validateAlterAction() {
|
|
26754
|
-
const e = a(this,
|
|
26750
|
+
const e = a(this, Mt).getValue("self").permissions.connectedMeetings;
|
|
26755
26751
|
if (!(e != null && e.canAlterConnectedMeetings))
|
|
26756
26752
|
throw new Error(
|
|
26757
26753
|
"You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset."
|
|
@@ -26761,14 +26757,14 @@ class CS extends Lt {
|
|
|
26761
26757
|
var d;
|
|
26762
26758
|
if (!(r != null && r.length))
|
|
26763
26759
|
throw new Error("You're trying to move participants with an empty list.");
|
|
26764
|
-
const i = a(this,
|
|
26760
|
+
const i = a(this, Mt).getValue("self").permissions.connectedMeetings;
|
|
26765
26761
|
if (!i)
|
|
26766
26762
|
throw new Error(
|
|
26767
26763
|
"You are not allowed to perform this action. Please enable connected meetings permissions in your preset."
|
|
26768
26764
|
);
|
|
26769
26765
|
if (i.canAlterConnectedMeetings)
|
|
26770
26766
|
return;
|
|
26771
|
-
const n = a(this,
|
|
26767
|
+
const n = a(this, Mt).getValue("peerId");
|
|
26772
26768
|
if (!(r.length === 1 && r[0] === n))
|
|
26773
26769
|
throw new Error(
|
|
26774
26770
|
"You are not allowed to move other participants. Please enable canAlterConnectedMeetings permission in your preset."
|
|
@@ -26788,7 +26784,7 @@ class CS extends Lt {
|
|
|
26788
26784
|
getConnectedMeetings() {
|
|
26789
26785
|
return u(this, null, function* () {
|
|
26790
26786
|
this.logger.info("Getting connected meetings dump");
|
|
26791
|
-
const e = yield a(this,
|
|
26787
|
+
const e = yield a(this, Mt).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
|
|
26792
26788
|
return this.logger.info("Got connected meetings dump"), e;
|
|
26793
26789
|
});
|
|
26794
26790
|
}
|
|
@@ -26799,7 +26795,7 @@ class CS extends Lt {
|
|
|
26799
26795
|
createMeetings(e) {
|
|
26800
26796
|
return u(this, null, function* () {
|
|
26801
26797
|
this.validateAlterAction(), this.logger.info(`Creating connected meetings ${JSON.stringify(e)}`);
|
|
26802
|
-
const r = yield a(this,
|
|
26798
|
+
const r = yield a(this, Mt).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
|
|
26803
26799
|
e
|
|
26804
26800
|
);
|
|
26805
26801
|
return this.logger.info(`Created connected meetings ${JSON.stringify(r)}`), r.map((i) => ({
|
|
@@ -26814,7 +26810,7 @@ class CS extends Lt {
|
|
|
26814
26810
|
*/
|
|
26815
26811
|
updateMeetings(e) {
|
|
26816
26812
|
return u(this, null, function* () {
|
|
26817
|
-
this.validateAlterAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield a(this,
|
|
26813
|
+
this.validateAlterAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield a(this, Mt).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
|
|
26818
26814
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
26819
26815
|
), this.logger.info(`Updated connected meetings ${JSON.stringify(e)}`);
|
|
26820
26816
|
});
|
|
@@ -26832,7 +26828,7 @@ class CS extends Lt {
|
|
|
26832
26828
|
n.participants.map((o) => o.id)
|
|
26833
26829
|
) : Promise.resolve());
|
|
26834
26830
|
this.logger.info(`Moved participants before deleting connected meetings ${JSON.stringify(e)}. Deleting now.`), yield Promise.all(r);
|
|
26835
|
-
const i = yield a(this,
|
|
26831
|
+
const i = yield a(this, Mt).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
|
|
26836
26832
|
e
|
|
26837
26833
|
);
|
|
26838
26834
|
return this.logger.info(`Deleted connected meetings ${JSON.stringify(e)}`), i;
|
|
@@ -26848,7 +26844,7 @@ class CS extends Lt {
|
|
|
26848
26844
|
moveParticipants(e, r, i) {
|
|
26849
26845
|
return u(this, null, function* () {
|
|
26850
26846
|
this.validateMoveAction(r, i), this.logger.info(`Moving connected meetings participants ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26851
|
-
const n = yield a(this,
|
|
26847
|
+
const n = yield a(this, Mt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26852
26848
|
{
|
|
26853
26849
|
sourceMeetingId: e,
|
|
26854
26850
|
destinationMeetingId: r,
|
|
@@ -26869,7 +26865,7 @@ class CS extends Lt {
|
|
|
26869
26865
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
26870
26866
|
return u(this, null, function* () {
|
|
26871
26867
|
this.validateMoveAction(r, i.map((o) => o.id)), this.logger.info(`Moving connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
26872
|
-
const n = yield a(this,
|
|
26868
|
+
const n = yield a(this, Mt).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
26873
26869
|
{
|
|
26874
26870
|
sourceMeetingId: e,
|
|
26875
26871
|
destinationMeetingId: r,
|
|
@@ -26909,7 +26905,7 @@ class CS extends Lt {
|
|
|
26909
26905
|
});
|
|
26910
26906
|
}
|
|
26911
26907
|
}
|
|
26912
|
-
|
|
26908
|
+
Mt = new WeakMap();
|
|
26913
26909
|
GD([
|
|
26914
26910
|
Vt({ maxInvocations: 60, period: 60 })
|
|
26915
26911
|
], CS.prototype, "getConnectedMeetings", 1);
|
|
@@ -27187,7 +27183,7 @@ const Xa = class {
|
|
|
27187
27183
|
s
|
|
27188
27184
|
);
|
|
27189
27185
|
t.setValue("connectedMeetingsSocketHandler", F);
|
|
27190
|
-
const X = new bl(t, s), Ne = new nr(t, s),
|
|
27186
|
+
const X = new bl(t, s), Ne = new nr(t, s), Et = new PD(s), Xt = new cS(t, s), Jr = new _D(t, s), I = new mD(s), y = yield Wr.init(
|
|
27191
27187
|
t,
|
|
27192
27188
|
Xt,
|
|
27193
27189
|
c,
|
|
@@ -27225,7 +27221,7 @@ const Xa = class {
|
|
|
27225
27221
|
Xt
|
|
27226
27222
|
)), o.stage && (E = new pf(
|
|
27227
27223
|
t,
|
|
27228
|
-
|
|
27224
|
+
Et,
|
|
27229
27225
|
Xt,
|
|
27230
27226
|
y.self,
|
|
27231
27227
|
$.participants
|
|
@@ -27501,7 +27497,7 @@ let Fr = (Pg = class {
|
|
|
27501
27497
|
video: !0
|
|
27502
27498
|
};
|
|
27503
27499
|
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", yC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
27504
|
-
})), n.setValue("cachedUserDetails", Cs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.5.2-staging.
|
|
27500
|
+
})), n.setValue("cachedUserDetails", Cs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.5.2-staging.6"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new ZD()), n;
|
|
27505
27501
|
}
|
|
27506
27502
|
join() {
|
|
27507
27503
|
return u(this, null, function* () {
|