@cloudflare/realtimekit 1.2.4-staging.3 → 1.2.4-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EncryptionManager.cjs.js +1 -1
- package/dist/EncryptionManager.d.ts +12 -2
- package/dist/EncryptionManager.es.js +213 -213
- package/dist/browser.js +11 -11
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +10 -10
- package/dist/index.d.ts +12 -2
- package/dist/index.es.js +773 -742
- package/dist/index.es5.js +1832 -1783
- package/dist/index.rn.js +10 -10
- package/dist/ts3.4/dist/EncryptionManager.d.ts +12 -2
- package/dist/ts3.4/dist/index.d.ts +12 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -44,11 +44,11 @@ var u = (s, t, e) => new Promise((r, i) => {
|
|
|
44
44
|
}, c = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(a, o);
|
|
45
45
|
c((e = e.apply(s, t)).next());
|
|
46
46
|
});
|
|
47
|
-
import { v4 as
|
|
47
|
+
import { v4 as an, validate as zg } from "uuid";
|
|
48
48
|
import Yg from "bowser";
|
|
49
49
|
import { MessageType as T, PbLong as no, typeofJsonValue as aS } from "@protobuf-ts/runtime";
|
|
50
50
|
import * as nd from "worker-timers";
|
|
51
|
-
import * as
|
|
51
|
+
import * as ps from "sdp-transform";
|
|
52
52
|
function oS(s) {
|
|
53
53
|
const { length: t } = this, e = s >= 0 ? s : t + s;
|
|
54
54
|
return e < 0 || e >= t ? void 0 : this[e];
|
|
@@ -571,10 +571,10 @@ var lt = {}, vS = {
|
|
|
571
571
|
set exports(s) {
|
|
572
572
|
lt = s;
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, In = typeof Reflect == "object" ? Reflect : null, sp = In && typeof In.apply == "function" ? In.apply : function(t, e, r) {
|
|
575
575
|
return Function.prototype.apply.call(t, e, r);
|
|
576
576
|
}, ad;
|
|
577
|
-
|
|
577
|
+
In && typeof In.ownKeys == "function" ? ad = In.ownKeys : Object.getOwnPropertySymbols ? ad = function(t) {
|
|
578
578
|
return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
|
|
579
579
|
} : ad = function(t) {
|
|
580
580
|
return Object.getOwnPropertyNames(t);
|
|
@@ -1519,7 +1519,7 @@ class wm extends lt {
|
|
|
1519
1519
|
}) || e[e.length - 1];
|
|
1520
1520
|
}
|
|
1521
1521
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
1522
|
-
var _, C, w, L, F, N, B, G, re, tt,
|
|
1522
|
+
var _, C, w, L, F, N, B, G, re, tt, ls, ri, us;
|
|
1523
1523
|
const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
|
1524
1524
|
for (const A of c.values()) {
|
|
1525
1525
|
if (l) {
|
|
@@ -1623,8 +1623,8 @@ class wm extends lt {
|
|
|
1623
1623
|
d.staleProducerStreamMap = !0;
|
|
1624
1624
|
break;
|
|
1625
1625
|
}
|
|
1626
|
-
const
|
|
1627
|
-
if (((_ =
|
|
1626
|
+
const Ue = this.callStatsInstance.producers.get(R);
|
|
1627
|
+
if (((_ = Ue == null ? void 0 : Ue.track) == null ? void 0 : _.readyState) === "ended")
|
|
1628
1628
|
break;
|
|
1629
1629
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
1630
1630
|
outboundVideoRtpId: [],
|
|
@@ -1642,7 +1642,7 @@ class wm extends lt {
|
|
|
1642
1642
|
totalPacketSendDelay: y.totalPacketSendDelay || 0
|
|
1643
1643
|
};
|
|
1644
1644
|
if (y.mediaType === "video" || y.kind === "video") {
|
|
1645
|
-
const I = y,
|
|
1645
|
+
const I = y, $e = D({
|
|
1646
1646
|
frameHeight: I.frameHeight,
|
|
1647
1647
|
frameWidth: I.frameWidth,
|
|
1648
1648
|
framesEncoded: I.framesEncoded,
|
|
@@ -1667,13 +1667,13 @@ class wm extends lt {
|
|
|
1667
1667
|
scalabilityMode: I.scalabilityMode,
|
|
1668
1668
|
powerEfficientEncoder: I.powerEfficientEncoder
|
|
1669
1669
|
}, V);
|
|
1670
|
-
d.outboundVideoRtp.set(A.id,
|
|
1670
|
+
d.outboundVideoRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, $e);
|
|
1671
1671
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
1672
|
-
const I = y,
|
|
1672
|
+
const I = y, $e = D({
|
|
1673
1673
|
retransmittedBytesSent: I.retransmittedBytesSent,
|
|
1674
1674
|
retransmittedPacketsSent: I.retransmittedPacketsSent
|
|
1675
1675
|
}, V);
|
|
1676
|
-
d.outboundAudioRtp.set(A.id,
|
|
1676
|
+
d.outboundAudioRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, $e);
|
|
1677
1677
|
}
|
|
1678
1678
|
} else
|
|
1679
1679
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -1706,7 +1706,7 @@ class wm extends lt {
|
|
|
1706
1706
|
inboundVideoRtpId: [],
|
|
1707
1707
|
inboundAudioRtpId: []
|
|
1708
1708
|
});
|
|
1709
|
-
const
|
|
1709
|
+
const Ue = {
|
|
1710
1710
|
bytesReceived: y.bytesReceived,
|
|
1711
1711
|
packetsReceived: y.packetsReceived,
|
|
1712
1712
|
packetsLost: y.packetsLost >= 0 ? y.packetsLost : 0,
|
|
@@ -1746,7 +1746,7 @@ class wm extends lt {
|
|
|
1746
1746
|
freezeCount: V.freezeCount || 0,
|
|
1747
1747
|
pauseCount: V.pauseCount || 0,
|
|
1748
1748
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
1749
|
-
},
|
|
1749
|
+
}, Ue);
|
|
1750
1750
|
I.score = Pm({
|
|
1751
1751
|
frameWidth: I.frameWidth || 0,
|
|
1752
1752
|
framesDecoded: (I.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -1783,7 +1783,7 @@ class wm extends lt {
|
|
|
1783
1783
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
1784
1784
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
1785
1785
|
playoutId: V.playoutId
|
|
1786
|
-
},
|
|
1786
|
+
}, Ue);
|
|
1787
1787
|
I.score = Em({
|
|
1788
1788
|
concealmentEvents: (I.concealmentEvents || 0) - (((G = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : G.concealmentEvents) || 0),
|
|
1789
1789
|
packetsLost: (I.packetsLost || 0) - (((re = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : re.packetsLost) || 0),
|
|
@@ -1792,12 +1792,12 @@ class wm extends lt {
|
|
|
1792
1792
|
}), P.set(R, {
|
|
1793
1793
|
score: +(I.score * 10).toFixed(),
|
|
1794
1794
|
packetsLostPercentage: Pd({
|
|
1795
|
-
packetsLost: (I.packetsLost || 0) - (((
|
|
1795
|
+
packetsLost: (I.packetsLost || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.packetsLost) || 0),
|
|
1796
1796
|
packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
|
|
1797
1797
|
}),
|
|
1798
1798
|
jitter: I.jitter || 0,
|
|
1799
1799
|
isScreenShare: this.screenShareConsumers.has(R),
|
|
1800
|
-
bitrate: ((I.bytesReceived || 0) - (((
|
|
1800
|
+
bitrate: ((I.bytesReceived || 0) - (((us = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : us.bytesReceived) || 0)) * 8 / 7
|
|
1801
1801
|
// Bytes received in last 7 seconds
|
|
1802
1802
|
}), this.audioConsumerToStatsMap.set(R, I), d.inboundAudioRtp.set(A.id, I), d.consumerStreamMap.get(R).inboundAudioRtpId.push(A.id), this.processInboundConsumerAudioStats(R, fe, I);
|
|
1803
1803
|
}
|
|
@@ -1808,7 +1808,7 @@ class wm extends lt {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
if (d.producerStreamMap.forEach((A, y) => {
|
|
1811
|
-
var R, x, fe,
|
|
1811
|
+
var R, x, fe, Ue, V, I, $e, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
|
|
1812
1812
|
if (A.outboundVideoRtpId.length > 0) {
|
|
1813
1813
|
const le = [];
|
|
1814
1814
|
A.outboundVideoRtpId.forEach((Zl) => {
|
|
@@ -1821,14 +1821,14 @@ class wm extends lt {
|
|
|
1821
1821
|
jitter: ((R = se.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
1822
1822
|
isScreenShare: this.screenShareProducers.has(y),
|
|
1823
1823
|
packetsSent: (se.packetsSent || 0) - (((x = this.videoProducerToStatsMap.get(y)) == null ? void 0 : x.packetsSent) || 0),
|
|
1824
|
-
packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (
|
|
1824
|
+
packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (Ue = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Ue.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
1825
1825
|
framesEncoded: (se.framesEncoded || 0) - (((I = this.videoProducerToStatsMap.get(y)) == null ? void 0 : I.framesEncoded) || 0)
|
|
1826
1826
|
}), S.set(y, {
|
|
1827
1827
|
score: +(se.score * 10).toFixed(),
|
|
1828
1828
|
frameWidth: se.frameWidth || 0,
|
|
1829
1829
|
frameHeight: se.frameHeight || 0,
|
|
1830
1830
|
framesPerSecond: se.framesPerSecond || 0,
|
|
1831
|
-
jitter: ((
|
|
1831
|
+
jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
|
|
1832
1832
|
isScreenShare: this.screenShareProducers.has(y),
|
|
1833
1833
|
packetsLostPercentage: Ed({
|
|
1834
1834
|
packetsSent: (se.packetsSent || 0) - (((Cr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Cr.packetsSent) || 0),
|
|
@@ -2170,7 +2170,7 @@ class Rm extends wm {
|
|
|
2170
2170
|
};
|
|
2171
2171
|
}
|
|
2172
2172
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
2173
|
-
var _, C, w, L, F, N, B, G, re, tt,
|
|
2173
|
+
var _, C, w, L, F, N, B, G, re, tt, ls, ri, us;
|
|
2174
2174
|
const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
|
|
2175
2175
|
for (const A of c.values()) {
|
|
2176
2176
|
if (l) {
|
|
@@ -2272,8 +2272,8 @@ class Rm extends wm {
|
|
|
2272
2272
|
d.staleProducerStreamMap = !0;
|
|
2273
2273
|
break;
|
|
2274
2274
|
}
|
|
2275
|
-
const
|
|
2276
|
-
if (((_ =
|
|
2275
|
+
const Ue = this.callStatsInstance.producers.get(R);
|
|
2276
|
+
if (((_ = Ue == null ? void 0 : Ue.track) == null ? void 0 : _.readyState) === "ended")
|
|
2277
2277
|
break;
|
|
2278
2278
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
2279
2279
|
outboundVideoRtpId: [],
|
|
@@ -2291,7 +2291,7 @@ class Rm extends wm {
|
|
|
2291
2291
|
totalPacketSendDelay: y.totalPacketSendDelay || 0
|
|
2292
2292
|
};
|
|
2293
2293
|
if (y.mediaType === "video" || y.kind === "video") {
|
|
2294
|
-
const I = y,
|
|
2294
|
+
const I = y, $e = D({
|
|
2295
2295
|
frameHeight: I.frameHeight,
|
|
2296
2296
|
frameWidth: I.frameWidth,
|
|
2297
2297
|
framesEncoded: I.framesEncoded,
|
|
@@ -2314,13 +2314,13 @@ class Rm extends wm {
|
|
|
2314
2314
|
scalabilityMode: I.scalabilityMode,
|
|
2315
2315
|
powerEfficientEncoder: I.powerEfficientEncoder
|
|
2316
2316
|
}, V);
|
|
2317
|
-
d.outboundVideoRtp.set(A.id,
|
|
2317
|
+
d.outboundVideoRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, $e);
|
|
2318
2318
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
2319
|
-
const I = y,
|
|
2319
|
+
const I = y, $e = D({
|
|
2320
2320
|
retransmittedBytesSent: I.retransmittedBytesSent,
|
|
2321
2321
|
retransmittedPacketsSent: I.retransmittedPacketsSent
|
|
2322
2322
|
}, V);
|
|
2323
|
-
d.outboundAudioRtp.set(A.id,
|
|
2323
|
+
d.outboundAudioRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, $e);
|
|
2324
2324
|
}
|
|
2325
2325
|
} else
|
|
2326
2326
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -2353,7 +2353,7 @@ class Rm extends wm {
|
|
|
2353
2353
|
inboundVideoRtpId: [],
|
|
2354
2354
|
inboundAudioRtpId: []
|
|
2355
2355
|
});
|
|
2356
|
-
const
|
|
2356
|
+
const Ue = {
|
|
2357
2357
|
bytesReceived: y.bytesReceived,
|
|
2358
2358
|
packetsReceived: y.packetsReceived,
|
|
2359
2359
|
packetsLost: y.packetsLost >= 0 ? y.packetsLost : 0,
|
|
@@ -2393,7 +2393,7 @@ class Rm extends wm {
|
|
|
2393
2393
|
freezeCount: V.freezeCount || 0,
|
|
2394
2394
|
pauseCount: V.pauseCount || 0,
|
|
2395
2395
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
2396
|
-
},
|
|
2396
|
+
}, Ue);
|
|
2397
2397
|
I.score = Pm({
|
|
2398
2398
|
frameWidth: I.frameWidth || 0,
|
|
2399
2399
|
framesDecoded: (I.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -2430,7 +2430,7 @@ class Rm extends wm {
|
|
|
2430
2430
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
2431
2431
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
2432
2432
|
playoutId: V.playoutId
|
|
2433
|
-
},
|
|
2433
|
+
}, Ue);
|
|
2434
2434
|
I.score = Em({
|
|
2435
2435
|
concealmentEvents: (I.concealmentEvents || 0) - (((G = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : G.concealmentEvents) || 0),
|
|
2436
2436
|
packetsLost: (I.packetsLost || 0) - (((re = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : re.packetsLost) || 0),
|
|
@@ -2439,12 +2439,12 @@ class Rm extends wm {
|
|
|
2439
2439
|
}), P.set(R, {
|
|
2440
2440
|
score: +(I.score * 10).toFixed(),
|
|
2441
2441
|
packetsLostPercentage: Pd({
|
|
2442
|
-
packetsLost: (I.packetsLost || 0) - (((
|
|
2442
|
+
packetsLost: (I.packetsLost || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.packetsLost) || 0),
|
|
2443
2443
|
packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
|
|
2444
2444
|
}),
|
|
2445
2445
|
jitter: I.jitter || 0,
|
|
2446
2446
|
isScreenShare: this.screenShareConsumers.has(R),
|
|
2447
|
-
bitrate: ((I.bytesReceived || 0) - (((
|
|
2447
|
+
bitrate: ((I.bytesReceived || 0) - (((us = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : us.bytesReceived) || 0)) * 8 / 7
|
|
2448
2448
|
// Bytes received in last 7 seconds
|
|
2449
2449
|
}), this.audioConsumerToStatsMap.set(R, I), d.inboundAudioRtp.set(A.id, I), d.consumerStreamMap.get(R).inboundAudioRtpId.push(A.id), this.processInboundConsumerAudioStats(R, fe, I);
|
|
2450
2450
|
}
|
|
@@ -2455,7 +2455,7 @@ class Rm extends wm {
|
|
|
2455
2455
|
}
|
|
2456
2456
|
}
|
|
2457
2457
|
if (d.producerStreamMap.forEach((A, y) => {
|
|
2458
|
-
var R, x, fe,
|
|
2458
|
+
var R, x, fe, Ue, V, I, $e, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
|
|
2459
2459
|
if (A.outboundVideoRtpId.length > 0) {
|
|
2460
2460
|
const le = [];
|
|
2461
2461
|
A.outboundVideoRtpId.forEach((Zl) => {
|
|
@@ -2468,14 +2468,14 @@ class Rm extends wm {
|
|
|
2468
2468
|
jitter: ((R = se.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
2469
2469
|
isScreenShare: this.screenShareProducers.has(y),
|
|
2470
2470
|
packetsSent: (se.packetsSent || 0) - (((x = this.videoProducerToStatsMap.get(y)) == null ? void 0 : x.packetsSent) || 0),
|
|
2471
|
-
packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (
|
|
2471
|
+
packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (Ue = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Ue.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
2472
2472
|
framesEncoded: (se.framesEncoded || 0) - (((I = this.videoProducerToStatsMap.get(y)) == null ? void 0 : I.framesEncoded) || 0)
|
|
2473
2473
|
}), S.set(y, {
|
|
2474
2474
|
score: +(se.score * 10).toFixed(),
|
|
2475
2475
|
frameWidth: se.frameWidth || 0,
|
|
2476
2476
|
frameHeight: se.frameHeight || 0,
|
|
2477
2477
|
framesPerSecond: se.framesPerSecond || 0,
|
|
2478
|
-
jitter: ((
|
|
2478
|
+
jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
|
|
2479
2479
|
isScreenShare: this.screenShareProducers.has(y),
|
|
2480
2480
|
packetsLostPercentage: Ed({
|
|
2481
2481
|
packetsSent: (se.packetsSent || 0) - (((Cr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Cr.packetsSent) || 0),
|
|
@@ -3641,18 +3641,18 @@ function uT(s) {
|
|
|
3641
3641
|
return lT.call(s);
|
|
3642
3642
|
}
|
|
3643
3643
|
var hT = "[object Null]", pT = "[object Undefined]", dp = Bs ? Bs.toStringTag : void 0;
|
|
3644
|
-
function
|
|
3644
|
+
function ln(s) {
|
|
3645
3645
|
return s == null ? s === void 0 ? pT : hT : dp && dp in Object(s) ? cT(s) : uT(s);
|
|
3646
3646
|
}
|
|
3647
|
-
function
|
|
3647
|
+
function os(s) {
|
|
3648
3648
|
var t = typeof s;
|
|
3649
3649
|
return s != null && (t == "object" || t == "function");
|
|
3650
3650
|
}
|
|
3651
3651
|
var gT = "[object AsyncFunction]", mT = "[object Function]", fT = "[object GeneratorFunction]", vT = "[object Proxy]";
|
|
3652
3652
|
function mh(s) {
|
|
3653
|
-
if (!
|
|
3653
|
+
if (!os(s))
|
|
3654
3654
|
return !1;
|
|
3655
|
-
var t =
|
|
3655
|
+
var t = ln(s);
|
|
3656
3656
|
return t == mT || t == fT || t == gT || t == vT;
|
|
3657
3657
|
}
|
|
3658
3658
|
var ST = ks["__core-js_shared__"];
|
|
@@ -3665,7 +3665,7 @@ function TT(s) {
|
|
|
3665
3665
|
return !!lp && lp in s;
|
|
3666
3666
|
}
|
|
3667
3667
|
var yT = Function.prototype, ET = yT.toString;
|
|
3668
|
-
function
|
|
3668
|
+
function un(s) {
|
|
3669
3669
|
if (s != null) {
|
|
3670
3670
|
try {
|
|
3671
3671
|
return ET.call(s);
|
|
@@ -3682,21 +3682,21 @@ var PT = /[\\^$.*+?()[\]{}|]/g, _T = /^\[object .+?Constructor\]$/, CT = Functio
|
|
|
3682
3682
|
"^" + RT.call(bT).replace(PT, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3683
3683
|
);
|
|
3684
3684
|
function IT(s) {
|
|
3685
|
-
if (!
|
|
3685
|
+
if (!os(s) || TT(s))
|
|
3686
3686
|
return !1;
|
|
3687
3687
|
var t = mh(s) ? kT : _T;
|
|
3688
|
-
return t.test(
|
|
3688
|
+
return t.test(un(s));
|
|
3689
3689
|
}
|
|
3690
3690
|
function AT(s, t) {
|
|
3691
3691
|
return s == null ? void 0 : s[t];
|
|
3692
3692
|
}
|
|
3693
|
-
function
|
|
3693
|
+
function hn(s, t) {
|
|
3694
3694
|
var e = AT(s, t);
|
|
3695
3695
|
return IT(e) ? e : void 0;
|
|
3696
3696
|
}
|
|
3697
|
-
var MT =
|
|
3697
|
+
var MT = hn(ks, "Map");
|
|
3698
3698
|
const ko = MT;
|
|
3699
|
-
var DT =
|
|
3699
|
+
var DT = hn(Object, "create");
|
|
3700
3700
|
const Io = DT;
|
|
3701
3701
|
function OT() {
|
|
3702
3702
|
this.__data__ = Io ? Io(null) : {}, this.size = 0;
|
|
@@ -3724,23 +3724,23 @@ function qT(s, t) {
|
|
|
3724
3724
|
var e = this.__data__;
|
|
3725
3725
|
return this.size += this.has(s) ? 0 : 1, e[s] = Io && t === void 0 ? HT : t, this;
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3727
|
+
function on(s) {
|
|
3728
3728
|
var t = -1, e = s == null ? 0 : s.length;
|
|
3729
3729
|
for (this.clear(); ++t < e; ) {
|
|
3730
3730
|
var r = s[t];
|
|
3731
3731
|
this.set(r[0], r[1]);
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3734
|
+
on.prototype.clear = OT;
|
|
3735
|
+
on.prototype.delete = NT;
|
|
3736
|
+
on.prototype.get = UT;
|
|
3737
|
+
on.prototype.has = BT;
|
|
3738
|
+
on.prototype.set = qT;
|
|
3739
3739
|
function jT() {
|
|
3740
3740
|
this.size = 0, this.__data__ = {
|
|
3741
|
-
hash: new
|
|
3741
|
+
hash: new on(),
|
|
3742
3742
|
map: new (ko || yr)(),
|
|
3743
|
-
string: new
|
|
3743
|
+
string: new on()
|
|
3744
3744
|
};
|
|
3745
3745
|
}
|
|
3746
3746
|
function GT(s) {
|
|
@@ -3804,7 +3804,7 @@ function XT(s, t) {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
var ZT = function() {
|
|
3806
3806
|
try {
|
|
3807
|
-
var s =
|
|
3807
|
+
var s = hn(Object, "defineProperty");
|
|
3808
3808
|
return s({}, "", {}), s;
|
|
3809
3809
|
} catch (t) {
|
|
3810
3810
|
}
|
|
@@ -3842,7 +3842,7 @@ function Hs(s) {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
var ry = "[object Arguments]";
|
|
3844
3844
|
function up(s) {
|
|
3845
|
-
return Hs(s) &&
|
|
3845
|
+
return Hs(s) && ln(s) == ry;
|
|
3846
3846
|
}
|
|
3847
3847
|
var Mm = Object.prototype, iy = Mm.hasOwnProperty, ny = Mm.propertyIsEnumerable, ay = up(function() {
|
|
3848
3848
|
return arguments;
|
|
@@ -3870,7 +3870,7 @@ var my = "[object Arguments]", fy = "[object Array]", vy = "[object Boolean]", S
|
|
|
3870
3870
|
Te[Ay] = Te[My] = Te[Dy] = Te[Oy] = Te[Ny] = Te[Vy] = Te[Ly] = Te[xy] = Te[Uy] = !0;
|
|
3871
3871
|
Te[my] = Te[fy] = Te[ky] = Te[vy] = Te[Iy] = Te[Sy] = Te[Ty] = Te[yy] = Te[Ey] = Te[Py] = Te[_y] = Te[Cy] = Te[wy] = Te[Ry] = Te[by] = !1;
|
|
3872
3872
|
function $y(s) {
|
|
3873
|
-
return Hs(s) && Sh(s.length) && !!Te[
|
|
3873
|
+
return Hs(s) && Sh(s.length) && !!Te[ln(s)];
|
|
3874
3874
|
}
|
|
3875
3875
|
function Th(s) {
|
|
3876
3876
|
return function(t) {
|
|
@@ -3937,7 +3937,7 @@ function Qy(s) {
|
|
|
3937
3937
|
}
|
|
3938
3938
|
var Xy = Object.prototype, Zy = Xy.hasOwnProperty;
|
|
3939
3939
|
function eE(s) {
|
|
3940
|
-
if (!
|
|
3940
|
+
if (!os(s))
|
|
3941
3941
|
return Qy(s);
|
|
3942
3942
|
var t = Ll(s), e = [];
|
|
3943
3943
|
for (var r in s)
|
|
@@ -4008,17 +4008,17 @@ function vu(s) {
|
|
|
4008
4008
|
function hE(s) {
|
|
4009
4009
|
return qm(s, Fc, Hm);
|
|
4010
4010
|
}
|
|
4011
|
-
var pE =
|
|
4011
|
+
var pE = hn(ks, "DataView");
|
|
4012
4012
|
const Su = pE;
|
|
4013
|
-
var gE =
|
|
4013
|
+
var gE = hn(ks, "Promise");
|
|
4014
4014
|
const Tu = gE;
|
|
4015
|
-
var mE =
|
|
4016
|
-
const
|
|
4017
|
-
var fE =
|
|
4015
|
+
var mE = hn(ks, "Set");
|
|
4016
|
+
const An = mE;
|
|
4017
|
+
var fE = hn(ks, "WeakMap");
|
|
4018
4018
|
const yu = fE;
|
|
4019
|
-
var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE =
|
|
4020
|
-
(Su && ii(new Su(new ArrayBuffer(1))) != _p || ko && ii(new ko()) != Tp || Tu && ii(Tu.resolve()) != yp ||
|
|
4021
|
-
var t =
|
|
4019
|
+
var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE = un(Su), TE = un(ko), yE = un(Tu), EE = un(An), PE = un(yu), ii = ln;
|
|
4020
|
+
(Su && ii(new Su(new ArrayBuffer(1))) != _p || ko && ii(new ko()) != Tp || Tu && ii(Tu.resolve()) != yp || An && ii(new An()) != Ep || yu && ii(new yu()) != Pp) && (ii = function(s) {
|
|
4021
|
+
var t = ln(s), e = t == vE ? s.constructor : void 0, r = e ? un(e) : "";
|
|
4022
4022
|
if (r)
|
|
4023
4023
|
switch (r) {
|
|
4024
4024
|
case SE:
|
|
@@ -4101,7 +4101,7 @@ var Rp = Object.create, QE = function() {
|
|
|
4101
4101
|
function s() {
|
|
4102
4102
|
}
|
|
4103
4103
|
return function(t) {
|
|
4104
|
-
if (!
|
|
4104
|
+
if (!os(t))
|
|
4105
4105
|
return {};
|
|
4106
4106
|
if (Rp)
|
|
4107
4107
|
return Rp(t);
|
|
@@ -4133,7 +4133,7 @@ function od(s, t, e, r, i, a) {
|
|
|
4133
4133
|
var o, c = t & oP, d = t & cP, l = t & dP;
|
|
4134
4134
|
if (e && (o = i ? e(s, r, i, a) : e(s)), o !== void 0)
|
|
4135
4135
|
return o;
|
|
4136
|
-
if (!
|
|
4136
|
+
if (!os(s))
|
|
4137
4137
|
return s;
|
|
4138
4138
|
var p = Ht(s);
|
|
4139
4139
|
if (p) {
|
|
@@ -4172,7 +4172,7 @@ function _h(s) {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
var VP = "[object Symbol]";
|
|
4174
4174
|
function Ul(s) {
|
|
4175
|
-
return typeof s == "symbol" || Hs(s) &&
|
|
4175
|
+
return typeof s == "symbol" || Hs(s) && ln(s) == VP;
|
|
4176
4176
|
}
|
|
4177
4177
|
var LP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, xP = /^\w*$/;
|
|
4178
4178
|
function Ch(s, t) {
|
|
@@ -4986,9 +4986,9 @@ function Op(s) {
|
|
|
4986
4986
|
return s;
|
|
4987
4987
|
if (Ul(s))
|
|
4988
4988
|
return Dp;
|
|
4989
|
-
if (
|
|
4989
|
+
if (os(s)) {
|
|
4990
4990
|
var t = typeof s.valueOf == "function" ? s.valueOf() : s;
|
|
4991
|
-
s =
|
|
4991
|
+
s = os(t) ? t + "" : t;
|
|
4992
4992
|
}
|
|
4993
4993
|
if (typeof s != "string")
|
|
4994
4994
|
return s === 0 ? s : +s;
|
|
@@ -5080,7 +5080,7 @@ function B_(s, t) {
|
|
|
5080
5080
|
return N_(F_(s, t, bh), s + "");
|
|
5081
5081
|
}
|
|
5082
5082
|
function H_(s, t, e) {
|
|
5083
|
-
if (!
|
|
5083
|
+
if (!os(e))
|
|
5084
5084
|
return !1;
|
|
5085
5085
|
var r = typeof t;
|
|
5086
5086
|
return (r == "number" ? $c(e) && vh(t, e.length) : r == "string" && t in e) ? xc(e[t], s) : !1;
|
|
@@ -5097,7 +5097,7 @@ function q_(s) {
|
|
|
5097
5097
|
}
|
|
5098
5098
|
var j_ = "[object Object]", G_ = Function.prototype, W_ = Object.prototype, nf = G_.toString, J_ = W_.hasOwnProperty, K_ = nf.call(Object);
|
|
5099
5099
|
function z_(s) {
|
|
5100
|
-
if (!Hs(s) ||
|
|
5100
|
+
if (!Hs(s) || ln(s) != j_)
|
|
5101
5101
|
return !1;
|
|
5102
5102
|
var t = Eh(s);
|
|
5103
5103
|
if (t === null)
|
|
@@ -5293,7 +5293,7 @@ function RC(s, t, e, r) {
|
|
|
5293
5293
|
return !0;
|
|
5294
5294
|
}
|
|
5295
5295
|
function cf(s) {
|
|
5296
|
-
return s === s && !
|
|
5296
|
+
return s === s && !os(s);
|
|
5297
5297
|
}
|
|
5298
5298
|
function bC(s) {
|
|
5299
5299
|
for (var t = xl(s), e = t.length; e--; ) {
|
|
@@ -5363,7 +5363,7 @@ function Ih(s, t, e) {
|
|
|
5363
5363
|
var r, i, a, o, c, d, l = 0, p = !1, g = !1, v = !0;
|
|
5364
5364
|
if (typeof s != "function")
|
|
5365
5365
|
throw new TypeError(HC);
|
|
5366
|
-
t = Op(t) || 0,
|
|
5366
|
+
t = Op(t) || 0, os(e) && (p = !!e.leading, g = "maxWait" in e, a = g ? qC(Op(e.maxWait) || 0, t) : a, v = "trailing" in e ? !!e.trailing : v);
|
|
5367
5367
|
function S(G) {
|
|
5368
5368
|
var re = r, tt = i;
|
|
5369
5369
|
return r = i = void 0, l = G, o = s.apply(tt, re), o;
|
|
@@ -5372,8 +5372,8 @@ function Ih(s, t, e) {
|
|
|
5372
5372
|
return l = G, c = setTimeout(w, t), p ? S(G) : o;
|
|
5373
5373
|
}
|
|
5374
5374
|
function _(G) {
|
|
5375
|
-
var re = G - d, tt = G - l,
|
|
5376
|
-
return g ? jC(
|
|
5375
|
+
var re = G - d, tt = G - l, ls = t - re;
|
|
5376
|
+
return g ? jC(ls, a - tt) : ls;
|
|
5377
5377
|
}
|
|
5378
5378
|
function C(G) {
|
|
5379
5379
|
var re = G - d, tt = G - l;
|
|
@@ -5428,13 +5428,13 @@ function JC(s, t, e, r, i, a, o) {
|
|
|
5428
5428
|
var p = a ? a(c, d, e + "", s, t, o) : void 0, g = p === void 0;
|
|
5429
5429
|
if (g) {
|
|
5430
5430
|
var v = Ht(d), S = !v && Na(d), P = !v && !S && Vl(d);
|
|
5431
|
-
p = d, v || S || P ? Ht(c) ? p = c : GC(c) ? p = $m(c) : S ? (g = !1, p = Um(d, !0)) : P ? (g = !1, p = jm(d, !0)) : p = [] : z_(d) || Ao(d) ? (p = c, Ao(c) ? p = WC(c) : (!
|
|
5431
|
+
p = d, v || S || P ? Ht(c) ? p = c : GC(c) ? p = $m(c) : S ? (g = !1, p = Um(d, !0)) : P ? (g = !1, p = jm(d, !0)) : p = [] : z_(d) || Ao(d) ? (p = c, Ao(c) ? p = WC(c) : (!os(c) || mh(c)) && (p = Gm(d))) : g = !1;
|
|
5432
5432
|
}
|
|
5433
5433
|
g && (o.set(d, p), i(p, d, r, a, o), o.delete(d)), Pu(s, e, p);
|
|
5434
5434
|
}
|
|
5435
5435
|
function lf(s, t, e, r, i) {
|
|
5436
5436
|
s !== t && FC(t, function(a, o) {
|
|
5437
|
-
if (i || (i = new bs()),
|
|
5437
|
+
if (i || (i = new bs()), os(a))
|
|
5438
5438
|
JC(s, t, o, e, lf, r, i);
|
|
5439
5439
|
else {
|
|
5440
5440
|
var c = r ? r(_u(s, o), a, o + "", s, t, i) : void 0;
|
|
@@ -5471,8 +5471,8 @@ var tw = q_(function(s, t, e) {
|
|
|
5471
5471
|
lf(s, t, e);
|
|
5472
5472
|
});
|
|
5473
5473
|
const Rr = tw;
|
|
5474
|
-
var sw = 1 / 0, rw =
|
|
5475
|
-
return new
|
|
5474
|
+
var sw = 1 / 0, rw = An && 1 / kh(new An([, -0]))[1] == sw ? function(s) {
|
|
5475
|
+
return new An(s);
|
|
5476
5476
|
} : w_;
|
|
5477
5477
|
const iw = rw;
|
|
5478
5478
|
var nw = 200;
|
|
@@ -5522,7 +5522,6 @@ const ee = {
|
|
|
5522
5522
|
VIDEO_CONSTRAINTS: "video_constraints",
|
|
5523
5523
|
SCREENSHARE_CONSTRAINTS: "screenshare_constraints",
|
|
5524
5524
|
FEAT_CHAT_SDK: "feat_chat_sdk",
|
|
5525
|
-
FEAT_CHAT_SDK_SEARCH: "chat_search",
|
|
5526
5525
|
OBS_QUALITY: "obs_quality",
|
|
5527
5526
|
ALLOW_SAFARI_MEDIA_MIDDLEWARES: "allow_safari_media_middlewares",
|
|
5528
5527
|
EXP_RESHARE: "exp_reshare",
|
|
@@ -5585,21 +5584,21 @@ function xa(s, t) {
|
|
|
5585
5584
|
function lw({ baseURI: s }) {
|
|
5586
5585
|
return s.includes("preprod.dyte") || s.includes("preprod.realtime") ? yo.PREPROD : s.includes("devel.dyte") || s.includes("devel.realtime") ? yo.DEVEL : yo.PROD;
|
|
5587
5586
|
}
|
|
5588
|
-
function
|
|
5587
|
+
function sn({ servicePrefix: s, baseURI: t }) {
|
|
5589
5588
|
return `${s}.${t}`;
|
|
5590
5589
|
}
|
|
5591
5590
|
function hf(s) {
|
|
5592
5591
|
const t = s.getValue("baseURI");
|
|
5593
5592
|
return {
|
|
5594
|
-
location:
|
|
5593
|
+
location: sn({
|
|
5595
5594
|
servicePrefix: "location",
|
|
5596
5595
|
baseURI: t
|
|
5597
5596
|
}),
|
|
5598
|
-
locationLegacy:
|
|
5597
|
+
locationLegacy: sn({
|
|
5599
5598
|
servicePrefix: "location-legacy",
|
|
5600
5599
|
baseURI: t
|
|
5601
5600
|
}),
|
|
5602
|
-
daCollector:
|
|
5601
|
+
daCollector: sn({
|
|
5603
5602
|
servicePrefix: "da-collector",
|
|
5604
5603
|
/**
|
|
5605
5604
|
* FIXME(ravindra-cloudflare): Need to port da-collector to CF.
|
|
@@ -5720,7 +5719,7 @@ const Yh = class {
|
|
|
5720
5719
|
}
|
|
5721
5720
|
get logsEndpoint() {
|
|
5722
5721
|
const t = mr.getContext(this.meetingMetadata.peerId);
|
|
5723
|
-
return `https://${
|
|
5722
|
+
return `https://${sn({
|
|
5724
5723
|
servicePrefix: "api-silos",
|
|
5725
5724
|
baseURI: t.getValue("baseURI")
|
|
5726
5725
|
})}/otel/logs`;
|
|
@@ -5765,7 +5764,7 @@ const Yh = class {
|
|
|
5765
5764
|
}
|
|
5766
5765
|
injectContext(t) {
|
|
5767
5766
|
var i;
|
|
5768
|
-
const e =
|
|
5767
|
+
const e = an().replace(/-/g, "").substring(0, 16), r = (i = this.meetingMetadata.peerId) == null ? void 0 : i.replace(/-/g, "");
|
|
5769
5768
|
t.TRACEPARENT = `00-${r}-${e}-01`;
|
|
5770
5769
|
}
|
|
5771
5770
|
/**
|
|
@@ -6292,7 +6291,7 @@ const Bp = 1080, Hp = 1920, Pw = (s, t, e, r, i, a) => {
|
|
|
6292
6291
|
let g = d * p, v = l * p, S, P, _, C, w = 1;
|
|
6293
6292
|
return g < e && (w = e / g), Math.abs(w - 1) < 1e-14 && v < r && (w = r / v), g *= w, v *= w, _ = d / (g / e), C = l / (v / r), S = (d - _) * o, P = (l - C) * c, S < 0 && (S = 0), P < 0 && (P = 0), _ > d && (_ = d), C > l && (C = l), [S, P, _, C, s, t, e, r];
|
|
6294
6293
|
};
|
|
6295
|
-
var zt, gi, st, Yt, be,
|
|
6294
|
+
var zt, gi, st, Yt, be, gs, zs, gt, De, Nn, Vn, Ys, Ln;
|
|
6296
6295
|
const Qh = class extends jt {
|
|
6297
6296
|
/**
|
|
6298
6297
|
* @param {Context} context
|
|
@@ -6311,7 +6310,7 @@ const Qh = class extends jt {
|
|
|
6311
6310
|
height: Bp,
|
|
6312
6311
|
width: Hp
|
|
6313
6312
|
});
|
|
6314
|
-
m(this,
|
|
6313
|
+
m(this, gs, {
|
|
6315
6314
|
brand: "#2160FD",
|
|
6316
6315
|
background: "#141414",
|
|
6317
6316
|
text: "#000000",
|
|
@@ -6321,10 +6320,10 @@ const Qh = class extends jt {
|
|
|
6321
6320
|
m(this, zs, void 0);
|
|
6322
6321
|
m(this, gt, {});
|
|
6323
6322
|
m(this, De, void 0);
|
|
6323
|
+
m(this, Nn, void 0);
|
|
6324
6324
|
m(this, Vn, void 0);
|
|
6325
|
-
m(this, Ln, void 0);
|
|
6326
6325
|
m(this, Ys, void 0);
|
|
6327
|
-
m(this,
|
|
6326
|
+
m(this, Ln, !1);
|
|
6328
6327
|
h(this, "cleanupEventListeners", () => {
|
|
6329
6328
|
n(this, gi).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).removeListener("roomLeft", () => this.disable());
|
|
6330
6329
|
});
|
|
@@ -6359,7 +6358,7 @@ const Qh = class extends jt {
|
|
|
6359
6358
|
h(this, "disable", (e = !1) => {
|
|
6360
6359
|
f(this, Ys, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, zs)), e !== !0 && document.body.removeChild(n(this, st)), f(this, zs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6361
6360
|
});
|
|
6362
|
-
f(this, gi, e), f(this, Ys, "idle"), f(this, De, r), f(this,
|
|
6361
|
+
f(this, gi, e), f(this, Ys, "idle"), f(this, De, r), f(this, gs, {
|
|
6363
6362
|
brand: r.config.designTokens.colors.brand[500],
|
|
6364
6363
|
background: r.config.designTokens.colors.background[1e3],
|
|
6365
6364
|
text: r.config.designTokens.colors.text,
|
|
@@ -6385,10 +6384,10 @@ const Qh = class extends jt {
|
|
|
6385
6384
|
return u(this, null, function* () {
|
|
6386
6385
|
switch (e) {
|
|
6387
6386
|
case "handRaise":
|
|
6388
|
-
f(this,
|
|
6387
|
+
f(this, Vn, r);
|
|
6389
6388
|
break;
|
|
6390
6389
|
case "pin":
|
|
6391
|
-
f(this,
|
|
6390
|
+
f(this, Nn, r);
|
|
6392
6391
|
break;
|
|
6393
6392
|
}
|
|
6394
6393
|
});
|
|
@@ -6397,10 +6396,10 @@ const Qh = class extends jt {
|
|
|
6397
6396
|
return u(this, null, function* () {
|
|
6398
6397
|
switch (e) {
|
|
6399
6398
|
case "handRaise":
|
|
6400
|
-
f(this,
|
|
6399
|
+
f(this, Vn, yield Yc(r));
|
|
6401
6400
|
break;
|
|
6402
6401
|
case "pin":
|
|
6403
|
-
f(this,
|
|
6402
|
+
f(this, Nn, yield Yc(r));
|
|
6404
6403
|
break;
|
|
6405
6404
|
}
|
|
6406
6405
|
});
|
|
@@ -6449,7 +6448,7 @@ const Qh = class extends jt {
|
|
|
6449
6448
|
if (n(this, zt) === void 0)
|
|
6450
6449
|
return;
|
|
6451
6450
|
const o = n(this, zt).getContext("2d"), c = n(this, zt).width, d = 0, l = 0, p = r - d * 2, g = i - d * 2, v = Math.floor(c / p), S = Math.floor(e / v), _ = e % v * (p + d) + d, C = S * (g + d) + d, { displayText: w, image: L } = a != null ? a : {};
|
|
6452
|
-
o.fillStyle = w || L ? n(this,
|
|
6451
|
+
o.fillStyle = w || L ? n(this, gs).videoBackground : n(this, gs).background, o.strokeStyle = n(this, gs).brand, o.beginPath(), o.moveTo(_ + l, C), o.arcTo(_ + p, C, _ + p, C + l, l), o.arcTo(
|
|
6453
6452
|
_ + p,
|
|
6454
6453
|
C + g,
|
|
6455
6454
|
_ + p - l,
|
|
@@ -6457,26 +6456,26 @@ const Qh = class extends jt {
|
|
|
6457
6456
|
l
|
|
6458
6457
|
), o.arcTo(_, C + g, _, C + g - l, l), o.arcTo(_, C, _ + l, C, l), o.closePath(), o.fill(), o.stroke();
|
|
6459
6458
|
const F = p / 6, N = p / 2 + _, B = g / 2 + C;
|
|
6460
|
-
o.save(), (w || L) && (o.beginPath(), o.arc(N, B, F, 0, Math.PI * 2), o.fillStyle = n(this,
|
|
6459
|
+
o.save(), (w || L) && (o.beginPath(), o.arc(N, B, F, 0, Math.PI * 2), o.fillStyle = n(this, gs).brand, o.fill(), L ? (o.clip(), o.drawImage(
|
|
6461
6460
|
L,
|
|
6462
6461
|
N - F,
|
|
6463
6462
|
B - F,
|
|
6464
6463
|
F * 2,
|
|
6465
6464
|
F * 2
|
|
6466
|
-
), o.restore()) : w && (o.fillStyle = n(this,
|
|
6465
|
+
), o.restore()) : w && (o.fillStyle = n(this, gs).textOnBrand, o.font = `${F / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(w, N, B)), this.drawIcons(a, _, C, Math.max(p, g)));
|
|
6467
6466
|
}
|
|
6468
6467
|
drawIcons(e, r, i, a) {
|
|
6469
6468
|
const o = Math.min(Math.max(a * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
6470
6469
|
let l = r + c;
|
|
6471
6470
|
const p = i + c, g = (v) => {
|
|
6472
6471
|
const S = n(this, zt).getContext("2d");
|
|
6473
|
-
S.save(), S.fillStyle = n(this,
|
|
6472
|
+
S.save(), S.fillStyle = n(this, gs).background, S.beginPath(), S.moveTo(l + d, p), S.arcTo(l + o, p, l + o, p + d, d), S.arcTo(
|
|
6474
6473
|
l + o,
|
|
6475
6474
|
p + o,
|
|
6476
6475
|
l + o - d,
|
|
6477
6476
|
p + o,
|
|
6478
6477
|
d
|
|
6479
|
-
), S.arcTo(l, p + o, l, p + o - d, d), S.arcTo(l, p, l + d, p, d), S.closePath(), S.fill(), typeof v == "string" ? (S.font = `${o / 1.5}px sans-serif`, S.fillStyle = n(this,
|
|
6478
|
+
), S.arcTo(l, p + o, l, p + o - d, d), S.arcTo(l, p, l + d, p, d), S.closePath(), S.fill(), typeof v == "string" ? (S.font = `${o / 1.5}px sans-serif`, S.fillStyle = n(this, gs).text, S.textAlign = "center", S.textBaseline = "top", S.fillText(v, o / 2 + l, p + c)) : S.drawImage(
|
|
6480
6479
|
v,
|
|
6481
6480
|
l + c,
|
|
6482
6481
|
p + c,
|
|
@@ -6484,7 +6483,7 @@ const Qh = class extends jt {
|
|
|
6484
6483
|
o - c * 2
|
|
6485
6484
|
), l += o + c, S.restore();
|
|
6486
6485
|
};
|
|
6487
|
-
e.pinned && g(n(this,
|
|
6486
|
+
e.pinned && g(n(this, Nn)), e.handRaised && g(n(this, Vn)), e.reaction && g(e.reaction);
|
|
6488
6487
|
}
|
|
6489
6488
|
drawTile(e, r, i) {
|
|
6490
6489
|
var l, p;
|
|
@@ -6547,7 +6546,7 @@ const Qh = class extends jt {
|
|
|
6547
6546
|
return document.pictureInPictureElement !== null;
|
|
6548
6547
|
}
|
|
6549
6548
|
cleanup() {
|
|
6550
|
-
if (f(this,
|
|
6549
|
+
if (f(this, Ln, !1), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), n(this, st))
|
|
6551
6550
|
try {
|
|
6552
6551
|
document.body.removeChild(n(this, st));
|
|
6553
6552
|
} catch (e) {
|
|
@@ -6563,9 +6562,9 @@ const Qh = class extends jt {
|
|
|
6563
6562
|
init({ height: e, width: r } = {}) {
|
|
6564
6563
|
if (!this.isSupported())
|
|
6565
6564
|
throw this.logger.error("Pip.unsupported"), new Error("Picture-in-picture is not available in this environment");
|
|
6566
|
-
if (n(this,
|
|
6565
|
+
if (n(this, Ln))
|
|
6567
6566
|
return;
|
|
6568
|
-
f(this,
|
|
6567
|
+
f(this, Ln, !0), this.createCanvas(), this.setupMediaSessionEvents();
|
|
6569
6568
|
const i = document.createElement("video");
|
|
6570
6569
|
f(this, be, {
|
|
6571
6570
|
height: e != null ? e : Bp,
|
|
@@ -6684,7 +6683,7 @@ const Qh = class extends jt {
|
|
|
6684
6683
|
}
|
|
6685
6684
|
};
|
|
6686
6685
|
let wu = Qh;
|
|
6687
|
-
zt = new WeakMap(), gi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(),
|
|
6686
|
+
zt = new WeakMap(), gi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), gs = new WeakMap(), zs = new WeakMap(), gt = new WeakMap(), De = new WeakMap(), Nn = new WeakMap(), Vn = new WeakMap(), Ys = new WeakMap(), Ln = new WeakMap();
|
|
6688
6687
|
var Sr;
|
|
6689
6688
|
(function(s) {
|
|
6690
6689
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -8525,10 +8524,10 @@ class $b extends T {
|
|
|
8525
8524
|
}
|
|
8526
8525
|
}
|
|
8527
8526
|
const Fb = new $b();
|
|
8528
|
-
var
|
|
8527
|
+
var rn;
|
|
8529
8528
|
(function(s) {
|
|
8530
8529
|
s[s.BROWSER = 0] = "BROWSER", s[s.TRACK = 1] = "TRACK", s[s.COMPOSITE = 2] = "COMPOSITE";
|
|
8531
|
-
})(
|
|
8530
|
+
})(rn || (rn = {}));
|
|
8532
8531
|
var pr;
|
|
8533
8532
|
(function(s) {
|
|
8534
8533
|
s[s.UNSPECIFIED = 0] = "UNSPECIFIED", s[s.ON_STAGE = 1] = "ON_STAGE", s[s.APPROVED_STAGE = 2] = "APPROVED_STAGE", s[s.REQUESTED_STAGE = 3] = "REQUESTED_STAGE", s[s.OFF_STAGE = 4] = "OFF_STAGE";
|
|
@@ -8641,7 +8640,7 @@ class jb extends T {
|
|
|
8641
8640
|
]);
|
|
8642
8641
|
}
|
|
8643
8642
|
}
|
|
8644
|
-
const
|
|
8643
|
+
const Sn = new jb();
|
|
8645
8644
|
class Gb extends T {
|
|
8646
8645
|
constructor() {
|
|
8647
8646
|
super("socket.room.PeerStatusUpdate", [
|
|
@@ -8763,7 +8762,7 @@ class Qb extends T {
|
|
|
8763
8762
|
T: 9
|
|
8764
8763
|
/*ScalarType.STRING*/
|
|
8765
8764
|
},
|
|
8766
|
-
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
8765
|
+
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", rn] },
|
|
8767
8766
|
{
|
|
8768
8767
|
no: 3,
|
|
8769
8768
|
name: "recording_status",
|
|
@@ -10028,7 +10027,7 @@ class AI extends T {
|
|
|
10028
10027
|
]);
|
|
10029
10028
|
}
|
|
10030
10029
|
}
|
|
10031
|
-
const
|
|
10030
|
+
const pn = new AI();
|
|
10032
10031
|
class MI extends T {
|
|
10033
10032
|
constructor() {
|
|
10034
10033
|
super("socket.chat.GetPaginatedChatMessageRoomRequest", [
|
|
@@ -10076,7 +10075,7 @@ const DI = new MI();
|
|
|
10076
10075
|
class OI extends T {
|
|
10077
10076
|
constructor() {
|
|
10078
10077
|
super("socket.chat.GetPaginatedChatMessageRoomResponse", [
|
|
10079
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10078
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => pn },
|
|
10080
10079
|
{
|
|
10081
10080
|
no: 2,
|
|
10082
10081
|
name: "next",
|
|
@@ -10091,7 +10090,7 @@ const NI = new OI();
|
|
|
10091
10090
|
class VI extends T {
|
|
10092
10091
|
constructor() {
|
|
10093
10092
|
super("socket.chat.GetChatMessagesResponse", [
|
|
10094
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10093
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => pn }
|
|
10095
10094
|
]);
|
|
10096
10095
|
}
|
|
10097
10096
|
}
|
|
@@ -10120,7 +10119,7 @@ const xI = new LI();
|
|
|
10120
10119
|
class UI extends T {
|
|
10121
10120
|
constructor() {
|
|
10122
10121
|
super("socket.chat.SendChatMessageToRoomResponse", [
|
|
10123
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10122
|
+
{ no: 1, name: "message", kind: "message", T: () => pn }
|
|
10124
10123
|
]);
|
|
10125
10124
|
}
|
|
10126
10125
|
}
|
|
@@ -10157,7 +10156,7 @@ const FI = new $I();
|
|
|
10157
10156
|
class BI extends T {
|
|
10158
10157
|
constructor() {
|
|
10159
10158
|
super("socket.chat.SendChatMessageToPeersResponse", [
|
|
10160
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10159
|
+
{ no: 1, name: "message", kind: "message", T: () => pn }
|
|
10161
10160
|
]);
|
|
10162
10161
|
}
|
|
10163
10162
|
}
|
|
@@ -10193,7 +10192,7 @@ const qI = new HI();
|
|
|
10193
10192
|
class jI extends T {
|
|
10194
10193
|
constructor() {
|
|
10195
10194
|
super("socket.chat.SendChatMessageToChannelResponse", [
|
|
10196
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10195
|
+
{ no: 1, name: "message", kind: "message", T: () => pn }
|
|
10197
10196
|
]);
|
|
10198
10197
|
}
|
|
10199
10198
|
}
|
|
@@ -10305,7 +10304,7 @@ const Zc = new zI();
|
|
|
10305
10304
|
class YI extends T {
|
|
10306
10305
|
constructor() {
|
|
10307
10306
|
super("socket.chat.EditChatMessageResponse", [
|
|
10308
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10307
|
+
{ no: 1, name: "message", kind: "message", T: () => pn }
|
|
10309
10308
|
]);
|
|
10310
10309
|
}
|
|
10311
10310
|
}
|
|
@@ -10576,7 +10575,7 @@ const hA = new uA();
|
|
|
10576
10575
|
class pA extends T {
|
|
10577
10576
|
constructor() {
|
|
10578
10577
|
super("socket.chat.LatestMessageAndUnreadCount", [
|
|
10579
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10578
|
+
{ no: 1, name: "message", kind: "message", T: () => pn },
|
|
10580
10579
|
{
|
|
10581
10580
|
no: 2,
|
|
10582
10581
|
name: "unread_count",
|
|
@@ -11479,7 +11478,7 @@ class PM extends T {
|
|
|
11479
11478
|
T: 9
|
|
11480
11479
|
/*ScalarType.STRING*/
|
|
11481
11480
|
},
|
|
11482
|
-
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
11481
|
+
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", rn] }
|
|
11483
11482
|
]);
|
|
11484
11483
|
}
|
|
11485
11484
|
}
|
|
@@ -11814,7 +11813,7 @@ const $ = Fa(bM, OM), Re = Fa(kM, NM), J = Fa(
|
|
|
11814
11813
|
), Ws = Fa(AM, LM), li = Fa(
|
|
11815
11814
|
MM,
|
|
11816
11815
|
xM
|
|
11817
|
-
), Ar = If(kf, 16777216),
|
|
11816
|
+
), Ar = If(kf, 16777216), ws = If(kf, 50331648), ld = Fa(
|
|
11818
11817
|
DM,
|
|
11819
11818
|
UM
|
|
11820
11819
|
);
|
|
@@ -11822,26 +11821,26 @@ var $M = Object.defineProperty, FM = Object.getOwnPropertyDescriptor, Oh = (s, t
|
|
|
11822
11821
|
for (var i = r > 1 ? void 0 : r ? FM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
11823
11822
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11824
11823
|
return r && i && $M(t, e, i), i;
|
|
11825
|
-
}, Mr,
|
|
11824
|
+
}, Mr, xn, Ig;
|
|
11826
11825
|
const Nu = (Ig = class {
|
|
11827
11826
|
constructor(s, t) {
|
|
11828
11827
|
m(this, Mr, void 0);
|
|
11829
|
-
m(this,
|
|
11830
|
-
f(this, Mr, t), f(this,
|
|
11828
|
+
m(this, xn, void 0);
|
|
11829
|
+
f(this, Mr, t), f(this, xn, s);
|
|
11831
11830
|
}
|
|
11832
11831
|
/**
|
|
11833
11832
|
* @access private
|
|
11834
11833
|
* Not for external use
|
|
11835
11834
|
*/
|
|
11836
11835
|
get telemetry() {
|
|
11837
|
-
return n(this,
|
|
11836
|
+
return n(this, xn).getValue("telemetry");
|
|
11838
11837
|
}
|
|
11839
11838
|
/**
|
|
11840
11839
|
* @private access
|
|
11841
11840
|
* Not for external use
|
|
11842
11841
|
*/
|
|
11843
11842
|
get logger() {
|
|
11844
|
-
return n(this,
|
|
11843
|
+
return n(this, xn).getValue("logger");
|
|
11845
11844
|
}
|
|
11846
11845
|
createChannel(s, t, e, r = "public", i = !1) {
|
|
11847
11846
|
return u(this, null, function* () {
|
|
@@ -11886,7 +11885,7 @@ const Nu = (Ig = class {
|
|
|
11886
11885
|
memberIds: s.targetUserIds,
|
|
11887
11886
|
unreadCount: (r = t == null ? void 0 : t.unreadCount) != null ? r : 0
|
|
11888
11887
|
});
|
|
11889
|
-
return t != null && t.message && (e.latestMessage =
|
|
11888
|
+
return t != null && t.message && (e.latestMessage = as.formatSocketPeerMessage(
|
|
11890
11889
|
t.message
|
|
11891
11890
|
)), delete e.chatChannelId, delete e.targetUserIds, delete e.latestMessageAndUnreadCount, e;
|
|
11892
11891
|
}
|
|
@@ -11940,41 +11939,41 @@ const Nu = (Ig = class {
|
|
|
11940
11939
|
return t(a);
|
|
11941
11940
|
});
|
|
11942
11941
|
}
|
|
11943
|
-
}, Mr = new WeakMap(),
|
|
11944
|
-
let
|
|
11942
|
+
}, Mr = new WeakMap(), xn = new WeakMap(), Ig);
|
|
11943
|
+
let cn = Nu;
|
|
11945
11944
|
Oh([
|
|
11946
11945
|
E.trace("ChatChannelHandler.createChannel")
|
|
11947
|
-
],
|
|
11946
|
+
], cn.prototype, "createChannel", 1);
|
|
11948
11947
|
Oh([
|
|
11949
11948
|
E.trace("ChatChannelHandler.updateChannel")
|
|
11950
|
-
],
|
|
11949
|
+
], cn.prototype, "updateChannel", 1);
|
|
11951
11950
|
Oh([
|
|
11952
11951
|
E.trace("ChatChannelHandler.getChannelMembers")
|
|
11953
|
-
],
|
|
11952
|
+
], cn.prototype, "getChannelMembers", 1);
|
|
11954
11953
|
var BM = Object.defineProperty, HM = Object.getOwnPropertyDescriptor, As = (s, t, e, r) => {
|
|
11955
11954
|
for (var i = r > 1 ? void 0 : r ? HM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
11956
11955
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11957
11956
|
return r && i && BM(t, e, i), i;
|
|
11958
|
-
}, Et = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Et || {}), rt,
|
|
11959
|
-
class
|
|
11957
|
+
}, Et = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Et || {}), rt, Un;
|
|
11958
|
+
class cs {
|
|
11960
11959
|
constructor(t, e) {
|
|
11961
11960
|
m(this, rt, void 0);
|
|
11962
|
-
m(this,
|
|
11963
|
-
f(this, rt, e), f(this,
|
|
11961
|
+
m(this, Un, void 0);
|
|
11962
|
+
f(this, rt, e), f(this, Un, t);
|
|
11964
11963
|
}
|
|
11965
11964
|
/**
|
|
11966
11965
|
* @access private
|
|
11967
11966
|
* Not for external use
|
|
11968
11967
|
*/
|
|
11969
11968
|
get telemetry() {
|
|
11970
|
-
return n(this,
|
|
11969
|
+
return n(this, Un).getValue("telemetry");
|
|
11971
11970
|
}
|
|
11972
11971
|
/**
|
|
11973
11972
|
* @private access
|
|
11974
11973
|
* Not available for external use
|
|
11975
11974
|
*/
|
|
11976
11975
|
get logger() {
|
|
11977
|
-
return n(this,
|
|
11976
|
+
return n(this, Un).getValue("logger");
|
|
11978
11977
|
}
|
|
11979
11978
|
getChatMessages() {
|
|
11980
11979
|
return n(this, rt).sendMessagePromise(Re.getMessages);
|
|
@@ -12070,22 +12069,22 @@ class os {
|
|
|
12070
12069
|
}
|
|
12071
12070
|
searchMessages(t, e) {
|
|
12072
12071
|
return u(this, null, function* () {
|
|
12073
|
-
var i, a, o;
|
|
12072
|
+
var i, a, o, c;
|
|
12074
12073
|
const r = {
|
|
12075
12074
|
searchTerm: t,
|
|
12076
12075
|
timeStamp: (i = e.timestamp) != null ? i : Date.now(),
|
|
12077
|
-
size: (a = e.
|
|
12078
|
-
from: 0,
|
|
12079
|
-
reversed: (
|
|
12076
|
+
size: (a = e.limit) != null ? a : 75,
|
|
12077
|
+
from: (o = e.offset) != null ? o : 0,
|
|
12078
|
+
reversed: (c = e.reversed) != null ? c : !0
|
|
12080
12079
|
};
|
|
12081
12080
|
e.channelId && (r.channelId = e.channelId);
|
|
12082
12081
|
try {
|
|
12083
|
-
const
|
|
12082
|
+
const d = yield n(this, rt).sendMessagePromise(
|
|
12084
12083
|
Re.searchChannelMessages,
|
|
12085
12084
|
tA.toBinary(r)
|
|
12086
12085
|
);
|
|
12087
|
-
return Rf.fromBinary(
|
|
12088
|
-
} catch (
|
|
12086
|
+
return Rf.fromBinary(d.payload).messages;
|
|
12087
|
+
} catch (d) {
|
|
12089
12088
|
return [];
|
|
12090
12089
|
}
|
|
12091
12090
|
});
|
|
@@ -12096,7 +12095,7 @@ class os {
|
|
|
12096
12095
|
const t = yield n(this, rt).sendMessagePromise(
|
|
12097
12096
|
Re.getAllChatChannels
|
|
12098
12097
|
);
|
|
12099
|
-
return js.fromBinary(t.payload).chatChannels.map(
|
|
12098
|
+
return js.fromBinary(t.payload).chatChannels.map(cn.formatChannel);
|
|
12100
12099
|
} catch (t) {
|
|
12101
12100
|
return [];
|
|
12102
12101
|
}
|
|
@@ -12179,40 +12178,40 @@ class os {
|
|
|
12179
12178
|
});
|
|
12180
12179
|
}
|
|
12181
12180
|
}
|
|
12182
|
-
rt = new WeakMap(),
|
|
12181
|
+
rt = new WeakMap(), Un = new WeakMap();
|
|
12183
12182
|
As([
|
|
12184
12183
|
E.trace("SocketService.getChatMessages")
|
|
12185
|
-
],
|
|
12184
|
+
], cs.prototype, "getChatMessages", 1);
|
|
12186
12185
|
As([
|
|
12187
12186
|
E.trace("SocketService.getChatMessagesPaginated")
|
|
12188
|
-
],
|
|
12187
|
+
], cs.prototype, "getChatMessagesPaginated", 1);
|
|
12189
12188
|
As([
|
|
12190
12189
|
E.trace("SocketService.sendMessageToRoom")
|
|
12191
|
-
],
|
|
12190
|
+
], cs.prototype, "sendMessageToRoom", 1);
|
|
12192
12191
|
As([
|
|
12193
12192
|
E.trace("SocketService.sendMessageToPeers")
|
|
12194
|
-
],
|
|
12193
|
+
], cs.prototype, "sendMessageToPeers", 1);
|
|
12195
12194
|
As([
|
|
12196
12195
|
E.trace("SocketService.sendMessageToChannel")
|
|
12197
|
-
],
|
|
12196
|
+
], cs.prototype, "sendMessageToChannel", 1);
|
|
12198
12197
|
As([
|
|
12199
12198
|
E.trace("SocketService.sendMessage")
|
|
12200
|
-
],
|
|
12199
|
+
], cs.prototype, "sendMessage", 1);
|
|
12201
12200
|
As([
|
|
12202
12201
|
E.trace("SocketService.editMessage")
|
|
12203
|
-
],
|
|
12202
|
+
], cs.prototype, "editMessage", 1);
|
|
12204
12203
|
As([
|
|
12205
12204
|
E.trace("SocketService.deleteMessage")
|
|
12206
|
-
],
|
|
12205
|
+
], cs.prototype, "deleteMessage", 1);
|
|
12207
12206
|
As([
|
|
12208
12207
|
E.trace("SocketService.searchMessages")
|
|
12209
|
-
],
|
|
12208
|
+
], cs.prototype, "searchMessages", 1);
|
|
12210
12209
|
As([
|
|
12211
12210
|
E.trace("SocketService.getAllChannels")
|
|
12212
|
-
],
|
|
12211
|
+
], cs.prototype, "getAllChannels", 1);
|
|
12213
12212
|
As([
|
|
12214
12213
|
E.trace("SocketService.markLastReadMessage")
|
|
12215
|
-
],
|
|
12214
|
+
], cs.prototype, "markLastReadMessage", 1);
|
|
12216
12215
|
function qM(s) {
|
|
12217
12216
|
return s.replace(
|
|
12218
12217
|
/([-_]\w)/g,
|
|
@@ -12444,7 +12443,7 @@ class KM {
|
|
|
12444
12443
|
this.organizationId = t;
|
|
12445
12444
|
}
|
|
12446
12445
|
}
|
|
12447
|
-
var zM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor,
|
|
12446
|
+
var zM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor, ds = (s, t, e, r) => {
|
|
12448
12447
|
for (var i = r > 1 ? void 0 : r ? YM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
12449
12448
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
12450
12449
|
return r && i && zM(t, e, i), i;
|
|
@@ -12685,40 +12684,40 @@ class Gt extends KM {
|
|
|
12685
12684
|
});
|
|
12686
12685
|
}
|
|
12687
12686
|
}
|
|
12688
|
-
|
|
12687
|
+
ds([
|
|
12689
12688
|
E.trace("APIClient.getIPDetails")
|
|
12690
12689
|
], Gt.prototype, "getIPDetails", 1);
|
|
12691
|
-
|
|
12690
|
+
ds([
|
|
12692
12691
|
E.trace("APIClient.getICEServers")
|
|
12693
12692
|
], Gt.prototype, "getICEServers", 1);
|
|
12694
|
-
|
|
12693
|
+
ds([
|
|
12695
12694
|
E.trace("APIClient.getPlugins")
|
|
12696
12695
|
], Gt.prototype, "getPlugins", 1);
|
|
12697
|
-
|
|
12696
|
+
ds([
|
|
12698
12697
|
E.trace("APIClient.startLivestreaming")
|
|
12699
12698
|
], Gt.prototype, "startLivestreaming", 1);
|
|
12700
|
-
|
|
12699
|
+
ds([
|
|
12701
12700
|
E.trace("APIClient.stopLivestreaming")
|
|
12702
12701
|
], Gt.prototype, "stopLivestreaming", 1);
|
|
12703
|
-
|
|
12702
|
+
ds([
|
|
12704
12703
|
E.trace("APIClient.getActiveLivestream")
|
|
12705
12704
|
], Gt.prototype, "getActiveLivestream", 1);
|
|
12706
|
-
|
|
12705
|
+
ds([
|
|
12707
12706
|
E.trace("APIClient.getUserDetails")
|
|
12708
12707
|
], Gt.prototype, "getUserDetails", 1);
|
|
12709
|
-
|
|
12708
|
+
ds([
|
|
12710
12709
|
E.trace("APIClient.startRecording")
|
|
12711
12710
|
], Gt.prototype, "startRecording", 1);
|
|
12712
|
-
|
|
12711
|
+
ds([
|
|
12713
12712
|
E.trace("APIClient.stopRecording")
|
|
12714
12713
|
], Gt.prototype, "updateRecording", 1);
|
|
12715
|
-
|
|
12714
|
+
ds([
|
|
12716
12715
|
E.trace("APIClient.getActiveRecording")
|
|
12717
12716
|
], Gt.prototype, "getActiveRecording", 1);
|
|
12718
|
-
|
|
12717
|
+
ds([
|
|
12719
12718
|
E.trace("APIClient.getActiveTranscript")
|
|
12720
12719
|
], Gt.prototype, "getActiveTranscript", 1);
|
|
12721
|
-
|
|
12720
|
+
ds([
|
|
12722
12721
|
E.trace("APIClient.getRoomNodeData")
|
|
12723
12722
|
], Gt.prototype, "getRoomNodeData", 1);
|
|
12724
12723
|
let Vu;
|
|
@@ -12755,7 +12754,7 @@ var ZM = Object.defineProperty, e0 = Object.getOwnPropertyDescriptor, ht = (s, t
|
|
|
12755
12754
|
return r && i && ZM(t, e, i), i;
|
|
12756
12755
|
};
|
|
12757
12756
|
const t0 = ["text", "image", "file", "custom", "poll"], ud = { maxInvocations: 180, period: 60 };
|
|
12758
|
-
var Z, mi,
|
|
12757
|
+
var Z, mi, Oe, fi, $n, xd, Mf, No, Lu, Ag;
|
|
12759
12758
|
let ze = (Ag = class extends jt {
|
|
12760
12759
|
/**
|
|
12761
12760
|
* @param {Context} context
|
|
@@ -12774,6 +12773,12 @@ let ze = (Ag = class extends jt {
|
|
|
12774
12773
|
*/
|
|
12775
12774
|
m(this, No);
|
|
12776
12775
|
/**
|
|
12776
|
+
* @deprecated Use `fetchMessages` method instead.
|
|
12777
|
+
*
|
|
12778
|
+
* **Note:** Limited to the most recent 1000 messages from before joining,
|
|
12779
|
+
* plus any messages received after joining.
|
|
12780
|
+
* This limit prevents memory and meeting join issues when meetings have extensive chat history.
|
|
12781
|
+
*
|
|
12777
12782
|
* An array of chat messages.
|
|
12778
12783
|
*/
|
|
12779
12784
|
h(this, "messages");
|
|
@@ -12783,18 +12788,18 @@ let ze = (Ag = class extends jt {
|
|
|
12783
12788
|
h(this, "channels", []);
|
|
12784
12789
|
m(this, Z, void 0);
|
|
12785
12790
|
m(this, mi, void 0);
|
|
12786
|
-
m(this,
|
|
12791
|
+
m(this, Oe, void 0);
|
|
12787
12792
|
m(this, fi, void 0);
|
|
12788
|
-
m(this,
|
|
12793
|
+
m(this, $n, void 0);
|
|
12789
12794
|
h(this, "maxTextLimit", 2e3);
|
|
12790
|
-
f(this,
|
|
12795
|
+
f(this, $n, t), f(this, Oe, e), f(this, fi, r), f(this, Z, i), f(this, mi, a), this.messages = [];
|
|
12791
12796
|
}
|
|
12792
12797
|
/**
|
|
12793
12798
|
* @access private
|
|
12794
12799
|
* Not for external use
|
|
12795
12800
|
*/
|
|
12796
12801
|
get telemetry() {
|
|
12797
|
-
return n(this,
|
|
12802
|
+
return n(this, $n).getValue("telemetry");
|
|
12798
12803
|
}
|
|
12799
12804
|
/**
|
|
12800
12805
|
* Set the max character limit of a text message
|
|
@@ -12850,11 +12855,11 @@ let ze = (Ag = class extends jt {
|
|
|
12850
12855
|
if (!t)
|
|
12851
12856
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new b("Message can not be empty.", "0502");
|
|
12852
12857
|
if (r) {
|
|
12853
|
-
n(this,
|
|
12858
|
+
n(this, Oe).sendMessageToChannel(t, Et.TEXT, r);
|
|
12854
12859
|
return;
|
|
12855
12860
|
}
|
|
12856
12861
|
let i = [];
|
|
12857
|
-
e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, mi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this,
|
|
12862
|
+
e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, mi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this, Oe).sendMessage(
|
|
12858
12863
|
t,
|
|
12859
12864
|
Et.TEXT,
|
|
12860
12865
|
e
|
|
@@ -12892,7 +12897,7 @@ let ze = (Ag = class extends jt {
|
|
|
12892
12897
|
n(this, Z).config.viewType
|
|
12893
12898
|
);
|
|
12894
12899
|
if (yield g.uploadFile(t, S), r) {
|
|
12895
|
-
n(this,
|
|
12900
|
+
n(this, Oe).sendMessageToChannel(
|
|
12896
12901
|
v,
|
|
12897
12902
|
Et.IMAGE,
|
|
12898
12903
|
r
|
|
@@ -12900,7 +12905,7 @@ let ze = (Ag = class extends jt {
|
|
|
12900
12905
|
return;
|
|
12901
12906
|
}
|
|
12902
12907
|
let P = [];
|
|
12903
|
-
e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this,
|
|
12908
|
+
e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this, Oe).sendMessage(
|
|
12904
12909
|
v,
|
|
12905
12910
|
Et.IMAGE,
|
|
12906
12911
|
e
|
|
@@ -12937,7 +12942,7 @@ let ze = (Ag = class extends jt {
|
|
|
12937
12942
|
n(this, Z).config.viewType
|
|
12938
12943
|
);
|
|
12939
12944
|
if (yield p.uploadFile(t, v), r) {
|
|
12940
|
-
n(this,
|
|
12945
|
+
n(this, Oe).sendMessageToChannel(
|
|
12941
12946
|
JSON.stringify({
|
|
12942
12947
|
link: g,
|
|
12943
12948
|
name: t.name,
|
|
@@ -12955,7 +12960,7 @@ let ze = (Ag = class extends jt {
|
|
|
12955
12960
|
name: t.name,
|
|
12956
12961
|
size: "size" in t ? t.size : 0
|
|
12957
12962
|
});
|
|
12958
|
-
n(this,
|
|
12963
|
+
n(this, Oe).sendMessage(
|
|
12959
12964
|
P,
|
|
12960
12965
|
Et.FILE,
|
|
12961
12966
|
e
|
|
@@ -13026,7 +13031,7 @@ let ze = (Ag = class extends jt {
|
|
|
13026
13031
|
return r(N);
|
|
13027
13032
|
})))
|
|
13028
13033
|
});
|
|
13029
|
-
n(this,
|
|
13034
|
+
n(this, Oe).sendMessage(
|
|
13030
13035
|
JSON.stringify(i),
|
|
13031
13036
|
Et.CUSTOM,
|
|
13032
13037
|
e
|
|
@@ -13061,7 +13066,7 @@ let ze = (Ag = class extends jt {
|
|
|
13061
13066
|
this.logger.error("editTextMessage::message_can_not_be_empty");
|
|
13062
13067
|
return;
|
|
13063
13068
|
}
|
|
13064
|
-
n(this,
|
|
13069
|
+
n(this, Oe).editMessage(
|
|
13065
13070
|
t,
|
|
13066
13071
|
e,
|
|
13067
13072
|
Et.TEXT,
|
|
@@ -13088,7 +13093,7 @@ let ze = (Ag = class extends jt {
|
|
|
13088
13093
|
}
|
|
13089
13094
|
try {
|
|
13090
13095
|
const l = dt(), { getLocation: p, putLocation: g } = yield l.getPresignedUrls(e.name, n(this, Z).config.viewType);
|
|
13091
|
-
yield l.uploadFile(e, g), n(this,
|
|
13096
|
+
yield l.uploadFile(e, g), n(this, Oe).editMessage(
|
|
13092
13097
|
t,
|
|
13093
13098
|
p,
|
|
13094
13099
|
Et.IMAGE,
|
|
@@ -13115,7 +13120,7 @@ let ze = (Ag = class extends jt {
|
|
|
13115
13120
|
e.name,
|
|
13116
13121
|
n(this, Z).config.viewType
|
|
13117
13122
|
);
|
|
13118
|
-
yield d.uploadFile(e, p), n(this,
|
|
13123
|
+
yield d.uploadFile(e, p), n(this, Oe).editMessage(
|
|
13119
13124
|
t,
|
|
13120
13125
|
JSON.stringify({
|
|
13121
13126
|
link: l,
|
|
@@ -13159,10 +13164,13 @@ let ze = (Ag = class extends jt {
|
|
|
13159
13164
|
var r, i;
|
|
13160
13165
|
if (((i = (r = n(this, Z).permissions) == null ? void 0 : r.chatMessage) == null ? void 0 : i.canDelete) === "NONE")
|
|
13161
13166
|
throw new b("Not permitted to delete messages", "0501");
|
|
13162
|
-
n(this,
|
|
13167
|
+
n(this, Oe).deleteMessage(t, e);
|
|
13163
13168
|
});
|
|
13164
13169
|
}
|
|
13165
13170
|
/**
|
|
13171
|
+
* @deprecated this method is deprecated and will be removed in a future release.
|
|
13172
|
+
* Use `fetchMessages` with appropriate filters instead.
|
|
13173
|
+
*
|
|
13166
13174
|
* Returns an array of messages sent by a specific userId.
|
|
13167
13175
|
* @param {string} userId The user id of the user that sent the message.
|
|
13168
13176
|
*/
|
|
@@ -13170,6 +13178,9 @@ let ze = (Ag = class extends jt {
|
|
|
13170
13178
|
return this.messages.filter((e) => e.userId === t);
|
|
13171
13179
|
}
|
|
13172
13180
|
/**
|
|
13181
|
+
* @deprecated this method is deprecated and will be removed in a future release.
|
|
13182
|
+
* Use `fetchMessages` with appropriate filters instead.
|
|
13183
|
+
*
|
|
13173
13184
|
* Returns an array of 'text', 'image' or 'file' messages.
|
|
13174
13185
|
* @param {(
|
|
13175
13186
|
* 'text'|'image'|'file'|'custom'|'poll'
|
|
@@ -13190,7 +13201,7 @@ let ze = (Ag = class extends jt {
|
|
|
13190
13201
|
throw new b("You do not have permission to pin messages.", "0501");
|
|
13191
13202
|
const e = this.messages.find((r) => r.id === t);
|
|
13192
13203
|
if (e) {
|
|
13193
|
-
n(this,
|
|
13204
|
+
n(this, Oe).setPinState(e, !0);
|
|
13194
13205
|
return;
|
|
13195
13206
|
}
|
|
13196
13207
|
throw new b(`No message found with id: ${t}`, "0504");
|
|
@@ -13208,12 +13219,33 @@ let ze = (Ag = class extends jt {
|
|
|
13208
13219
|
throw new b("You do not have permission to unpin messages.", "0501");
|
|
13209
13220
|
const e = this.messages.find((r) => r.id === t);
|
|
13210
13221
|
if (e) {
|
|
13211
|
-
n(this,
|
|
13222
|
+
n(this, Oe).setPinState(e, !1);
|
|
13212
13223
|
return;
|
|
13213
13224
|
}
|
|
13214
13225
|
throw new b(`No message found with id: ${t}`, "0504");
|
|
13215
13226
|
});
|
|
13216
13227
|
}
|
|
13228
|
+
fetchMessages(d) {
|
|
13229
|
+
return u(this, arguments, function* ({
|
|
13230
|
+
timestamp: t = 0,
|
|
13231
|
+
offset: e,
|
|
13232
|
+
limit: r,
|
|
13233
|
+
direction: i = "after",
|
|
13234
|
+
searchQuery: a = "",
|
|
13235
|
+
type: o,
|
|
13236
|
+
userId: c
|
|
13237
|
+
}) {
|
|
13238
|
+
let l = [];
|
|
13239
|
+
return a ? l = (yield n(this, Oe).searchMessages(a, {
|
|
13240
|
+
offset: e,
|
|
13241
|
+
limit: r,
|
|
13242
|
+
timestamp: t,
|
|
13243
|
+
reversed: i === "before"
|
|
13244
|
+
})).map(as.formatSocketPeerMessage) : l = (yield n(this, Oe).getChatMessagesPaginated(t, r, i === "before", e)).messages.map(
|
|
13245
|
+
(g) => as.formatSocketPeerMessage(g)
|
|
13246
|
+
), o && (l = l.filter((p) => p.type === o)), c && (l = l.filter((p) => p.userId === c)), l;
|
|
13247
|
+
});
|
|
13248
|
+
}
|
|
13217
13249
|
/**
|
|
13218
13250
|
* Gets chat messages in a paginated manner
|
|
13219
13251
|
* @param {number} timeStamp
|
|
@@ -13224,10 +13256,10 @@ let ze = (Ag = class extends jt {
|
|
|
13224
13256
|
*/
|
|
13225
13257
|
getMessages(t, e, r, i = 0, a = void 0) {
|
|
13226
13258
|
return u(this, null, function* () {
|
|
13227
|
-
const o = yield n(this,
|
|
13259
|
+
const o = yield n(this, Oe).getChatMessagesPaginated(t, e, r, i, a);
|
|
13228
13260
|
return {
|
|
13229
13261
|
messages: o.messages.map(
|
|
13230
|
-
(c) =>
|
|
13262
|
+
(c) => as.formatSocketPeerMessage(c)
|
|
13231
13263
|
),
|
|
13232
13264
|
next: o.next
|
|
13233
13265
|
};
|
|
@@ -13286,16 +13318,15 @@ let ze = (Ag = class extends jt {
|
|
|
13286
13318
|
return n(this, fi).getChannelMembers(t);
|
|
13287
13319
|
});
|
|
13288
13320
|
}
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
return (yield n(this, $e).searchMessages(t, e)).map(ws.formatSocketPeerMessage);
|
|
13321
|
+
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
13322
|
+
searchMessages(t, e) {
|
|
13323
|
+
return u(this, null, function* () {
|
|
13324
|
+
throw new b("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
|
|
13294
13325
|
});
|
|
13295
13326
|
}
|
|
13296
13327
|
markLastReadMessage(t, e) {
|
|
13297
13328
|
return u(this, null, function* () {
|
|
13298
|
-
yield n(this,
|
|
13329
|
+
yield n(this, Oe).markLastReadMessage(t, e);
|
|
13299
13330
|
const r = this.channels.find((i) => i.id === t);
|
|
13300
13331
|
if (r) {
|
|
13301
13332
|
const i = H(D({}, r), { unreadCount: 0 });
|
|
@@ -13309,8 +13340,8 @@ let ze = (Ag = class extends jt {
|
|
|
13309
13340
|
get pinned() {
|
|
13310
13341
|
return this.messages.filter((t) => t.pinned);
|
|
13311
13342
|
}
|
|
13312
|
-
}, Z = new WeakMap(), mi = new WeakMap(),
|
|
13313
|
-
return n(this,
|
|
13343
|
+
}, Z = new WeakMap(), mi = new WeakMap(), Oe = new WeakMap(), fi = new WeakMap(), $n = new WeakMap(), xd = new WeakSet(), Mf = function() {
|
|
13344
|
+
return n(this, $n).getValue("connectionHandler");
|
|
13314
13345
|
}, No = new WeakSet(), Lu = function() {
|
|
13315
13346
|
return n(this, xd, Mf).socketJoined === !0;
|
|
13316
13347
|
}, Ag);
|
|
@@ -13370,15 +13401,15 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, i0 = (s, t
|
|
|
13370
13401
|
for (var i = r > 1 ? void 0 : r ? r0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13371
13402
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13372
13403
|
return r && i && s0(t, e, i), i;
|
|
13373
|
-
},
|
|
13404
|
+
}, vi, Mg;
|
|
13374
13405
|
const ni = (Mg = class {
|
|
13375
13406
|
constructor(s, t, e, r, i) {
|
|
13376
13407
|
h(this, "chat");
|
|
13377
13408
|
h(this, "chatSocketHandler");
|
|
13378
13409
|
h(this, "chatChannelSocketHandler");
|
|
13379
13410
|
h(this, "self");
|
|
13380
|
-
m(this,
|
|
13381
|
-
f(this,
|
|
13411
|
+
m(this, vi, void 0);
|
|
13412
|
+
f(this, vi, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new ze(
|
|
13382
13413
|
s,
|
|
13383
13414
|
t,
|
|
13384
13415
|
e,
|
|
@@ -13391,14 +13422,14 @@ const ni = (Mg = class {
|
|
|
13391
13422
|
* Not for external use
|
|
13392
13423
|
*/
|
|
13393
13424
|
get telemetry() {
|
|
13394
|
-
return n(this,
|
|
13425
|
+
return n(this, vi).getValue("telemetry");
|
|
13395
13426
|
}
|
|
13396
13427
|
/**
|
|
13397
13428
|
* @access private
|
|
13398
13429
|
* Not for external use
|
|
13399
13430
|
*/
|
|
13400
13431
|
get logger() {
|
|
13401
|
-
return n(this,
|
|
13432
|
+
return n(this, vi).getValue("logger");
|
|
13402
13433
|
}
|
|
13403
13434
|
static init(s, t, e, r, i) {
|
|
13404
13435
|
return u(this, null, function* () {
|
|
@@ -13488,7 +13519,7 @@ const ni = (Mg = class {
|
|
|
13488
13519
|
});
|
|
13489
13520
|
}
|
|
13490
13521
|
setupEvents() {
|
|
13491
|
-
n(this,
|
|
13522
|
+
n(this, vi).getValue("peerSessionStore").on(
|
|
13492
13523
|
k.SOCKET_SERVICE_ROOM_JOINED,
|
|
13493
13524
|
() => u(this, null, function* () {
|
|
13494
13525
|
this.getChatMessages();
|
|
@@ -13568,7 +13599,7 @@ const ni = (Mg = class {
|
|
|
13568
13599
|
), this.chatChannelSocketHandler.on(
|
|
13569
13600
|
li.createChatChannel,
|
|
13570
13601
|
(s) => {
|
|
13571
|
-
const [t] = s.chatChannels, e =
|
|
13602
|
+
const [t] = s.chatChannels, e = cn.formatChannel(t);
|
|
13572
13603
|
this.chat.channels.push(e), this.chat.emit("channelCreate", e);
|
|
13573
13604
|
}
|
|
13574
13605
|
), this.chatSocketHandler.on(
|
|
@@ -13587,16 +13618,16 @@ const ni = (Mg = class {
|
|
|
13587
13618
|
), this.chatChannelSocketHandler.on(
|
|
13588
13619
|
li.updateChatChannel,
|
|
13589
13620
|
(s) => {
|
|
13590
|
-
const [t] = s.chatChannels, e =
|
|
13621
|
+
const [t] = s.chatChannels, e = cn.formatChannel(t);
|
|
13591
13622
|
this.chat.channels = this.chat.channels.map((r) => r.id === e.id ? e : r), this.chat.emit("channelUpdate", e);
|
|
13592
13623
|
}
|
|
13593
13624
|
);
|
|
13594
13625
|
}
|
|
13595
|
-
},
|
|
13596
|
-
let
|
|
13626
|
+
}, vi = new WeakMap(), Mg);
|
|
13627
|
+
let as = ni;
|
|
13597
13628
|
i0([
|
|
13598
13629
|
E.trace("ChatController.setupEvents")
|
|
13599
|
-
],
|
|
13630
|
+
], as.prototype, "setupEvents", 1);
|
|
13600
13631
|
var n0 = Object.defineProperty, a0 = Object.getOwnPropertyDescriptor, o0 = (s, t, e, r) => {
|
|
13601
13632
|
for (var i = r > 1 ? void 0 : r ? a0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13602
13633
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -13686,14 +13717,14 @@ var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor, l0 = (s, t
|
|
|
13686
13717
|
for (var i = r > 1 ? void 0 : r ? d0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13687
13718
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13688
13719
|
return r && i && c0(t, e, i), i;
|
|
13689
|
-
}, Dr, Hn,
|
|
13690
|
-
const
|
|
13720
|
+
}, Dr, Hn, Si, Og;
|
|
13721
|
+
const Tn = (Og = class {
|
|
13691
13722
|
constructor(s, t, e) {
|
|
13692
13723
|
h(this, "polls");
|
|
13693
13724
|
m(this, Dr, void 0);
|
|
13694
13725
|
m(this, Hn, void 0);
|
|
13695
|
-
m(this,
|
|
13696
|
-
this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Dr, s), f(this,
|
|
13726
|
+
m(this, Si, void 0);
|
|
13727
|
+
this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Dr, s), f(this, Si, e), this.setupEvents();
|
|
13697
13728
|
}
|
|
13698
13729
|
/**
|
|
13699
13730
|
* @access private
|
|
@@ -13711,7 +13742,7 @@ const yn = (Og = class {
|
|
|
13711
13742
|
}
|
|
13712
13743
|
static init(s, t, e) {
|
|
13713
13744
|
return u(this, null, function* () {
|
|
13714
|
-
return new
|
|
13745
|
+
return new Tn(s, t, e);
|
|
13715
13746
|
});
|
|
13716
13747
|
}
|
|
13717
13748
|
canViewPolls() {
|
|
@@ -13720,25 +13751,25 @@ const yn = (Og = class {
|
|
|
13720
13751
|
setupEvents() {
|
|
13721
13752
|
const s = {
|
|
13722
13753
|
[Ws.createPoll]: (r) => {
|
|
13723
|
-
r.poll && this.updatePoll(
|
|
13754
|
+
r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
|
|
13724
13755
|
},
|
|
13725
13756
|
[Ws.updatePoll]: (r) => {
|
|
13726
|
-
r.poll && this.updatePoll(
|
|
13757
|
+
r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
|
|
13727
13758
|
},
|
|
13728
13759
|
[Ws.votePoll]: (r) => {
|
|
13729
|
-
r.poll && this.updatePoll(
|
|
13760
|
+
r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
|
|
13730
13761
|
}
|
|
13731
13762
|
}, t = () => {
|
|
13732
13763
|
n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13733
13764
|
this.getPolls();
|
|
13734
13765
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13735
|
-
n(this,
|
|
13766
|
+
n(this, Si).on(r, s[r]);
|
|
13736
13767
|
});
|
|
13737
13768
|
}, e = () => {
|
|
13738
13769
|
n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13739
13770
|
this.getPolls();
|
|
13740
13771
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13741
|
-
n(this,
|
|
13772
|
+
n(this, Si).removeListeners(r);
|
|
13742
13773
|
});
|
|
13743
13774
|
};
|
|
13744
13775
|
n(this, Hn).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
|
|
@@ -13762,12 +13793,12 @@ const yn = (Og = class {
|
|
|
13762
13793
|
}
|
|
13763
13794
|
getPolls() {
|
|
13764
13795
|
return u(this, null, function* () {
|
|
13765
|
-
const s = yield n(this,
|
|
13796
|
+
const s = yield n(this, Si).getPolls();
|
|
13766
13797
|
if (!(s != null && s.payload))
|
|
13767
13798
|
return;
|
|
13768
13799
|
const { polls: t } = EM.fromBinary(s.payload);
|
|
13769
13800
|
this.polls.items = t.map(
|
|
13770
|
-
(e) =>
|
|
13801
|
+
(e) => Tn.formatSocketServicePoll(e)
|
|
13771
13802
|
);
|
|
13772
13803
|
});
|
|
13773
13804
|
}
|
|
@@ -13791,8 +13822,8 @@ const yn = (Og = class {
|
|
|
13791
13822
|
voted: s.votes
|
|
13792
13823
|
};
|
|
13793
13824
|
}
|
|
13794
|
-
}, Dr = new WeakMap(), Hn = new WeakMap(),
|
|
13795
|
-
let Nf =
|
|
13825
|
+
}, Dr = new WeakMap(), Hn = new WeakMap(), Si = new WeakMap(), Og);
|
|
13826
|
+
let Nf = Tn;
|
|
13796
13827
|
l0([
|
|
13797
13828
|
E.trace("PollController.setupEvents")
|
|
13798
13829
|
], Nf.prototype, "setupEvents", 1);
|
|
@@ -13800,7 +13831,7 @@ var u0 = Object.defineProperty, h0 = Object.getOwnPropertyDescriptor, p0 = (s, t
|
|
|
13800
13831
|
for (var i = r > 1 ? void 0 : r ? h0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13801
13832
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13802
13833
|
return r && i && u0(t, e, i), i;
|
|
13803
|
-
}, Vf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Vf || {}), qn, Lo, $u,
|
|
13834
|
+
}, Vf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Vf || {}), qn, Lo, $u, Ti, xo, Ng;
|
|
13804
13835
|
let Uu = (Ng = class extends jt {
|
|
13805
13836
|
/**
|
|
13806
13837
|
* @param {Context} context
|
|
@@ -13822,7 +13853,7 @@ let Uu = (Ng = class extends jt {
|
|
|
13822
13853
|
*/
|
|
13823
13854
|
h(this, "broadcastTabChanges");
|
|
13824
13855
|
m(this, qn, void 0);
|
|
13825
|
-
m(this,
|
|
13856
|
+
m(this, Ti, void 0);
|
|
13826
13857
|
m(this, xo, void 0);
|
|
13827
13858
|
/**
|
|
13828
13859
|
* The `viewType` tells the type of the meeting
|
|
@@ -13841,7 +13872,7 @@ let Uu = (Ng = class extends jt {
|
|
|
13841
13872
|
* (Experimental) The sessionId this meeting object is part of.
|
|
13842
13873
|
*/
|
|
13843
13874
|
h(this, "sessionId");
|
|
13844
|
-
f(this, qn, t), f(this,
|
|
13875
|
+
f(this, qn, t), f(this, Ti, e), this.viewType = r, f(this, xo, i), this.meetingTitle = a, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
13845
13876
|
}
|
|
13846
13877
|
get socketState() {
|
|
13847
13878
|
return n(this, Lo, $u).socketState;
|
|
@@ -13860,7 +13891,7 @@ let Uu = (Ng = class extends jt {
|
|
|
13860
13891
|
* @param {boolean} broadcastTabChanges
|
|
13861
13892
|
*/
|
|
13862
13893
|
setBroadcastTabChanges(t) {
|
|
13863
|
-
if (!n(this,
|
|
13894
|
+
if (!n(this, Ti).permissions.canSpotlight)
|
|
13864
13895
|
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new b("User does not have permission to toggle spotlight", "0801");
|
|
13865
13896
|
this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
|
|
13866
13897
|
}
|
|
@@ -13878,17 +13909,17 @@ let Uu = (Ng = class extends jt {
|
|
|
13878
13909
|
type: t.type
|
|
13879
13910
|
}
|
|
13880
13911
|
}
|
|
13881
|
-
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this,
|
|
13912
|
+
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this, Ti).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
|
|
13882
13913
|
}
|
|
13883
13914
|
assertActiveTabToRoom() {
|
|
13884
13915
|
n(this, xo).broadcastMessage("spotlight", {
|
|
13885
|
-
userId: n(this,
|
|
13916
|
+
userId: n(this, Ti).userId,
|
|
13886
13917
|
currentTab: this.selfActiveTab
|
|
13887
13918
|
});
|
|
13888
13919
|
}
|
|
13889
13920
|
}, qn = new WeakMap(), Lo = new WeakSet(), $u = function() {
|
|
13890
13921
|
return n(this, qn).getValue("connectionHandler");
|
|
13891
|
-
},
|
|
13922
|
+
}, Ti = new WeakMap(), xo = new WeakMap(), Ng);
|
|
13892
13923
|
Uu = p0([
|
|
13893
13924
|
ut("0800")
|
|
13894
13925
|
], Uu);
|
|
@@ -13949,7 +13980,7 @@ let Zr = (Vg = class extends jt {
|
|
|
13949
13980
|
d
|
|
13950
13981
|
]] = g0(t);
|
|
13951
13982
|
return {
|
|
13952
|
-
id:
|
|
13983
|
+
id: an(),
|
|
13953
13984
|
name: c,
|
|
13954
13985
|
peerId: i,
|
|
13955
13986
|
userId: a,
|
|
@@ -14228,7 +14259,7 @@ const lo = {}, Pr = {
|
|
|
14228
14259
|
};
|
|
14229
14260
|
}
|
|
14230
14261
|
};
|
|
14231
|
-
var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor,
|
|
14262
|
+
var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor, gn = (s, t, e, r) => {
|
|
14232
14263
|
for (var i = r > 1 ? void 0 : r ? E0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14233
14264
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14234
14265
|
return r && i && y0(t, e, i), i;
|
|
@@ -14433,22 +14464,22 @@ Qt = new WeakMap(), Fd = new WeakMap(), ie = new WeakMap(), $o = new WeakMap(),
|
|
|
14433
14464
|
this.status !== e && n(this, We).setValue("stageStatus", e);
|
|
14434
14465
|
});
|
|
14435
14466
|
};
|
|
14436
|
-
|
|
14467
|
+
gn([
|
|
14437
14468
|
E.trace("Stage.getStageRequests")
|
|
14438
14469
|
], ti.prototype, "getAccessRequests", 1);
|
|
14439
|
-
|
|
14470
|
+
gn([
|
|
14440
14471
|
E.trace("Stage.requestAccess")
|
|
14441
14472
|
], ti.prototype, "requestAccess", 1);
|
|
14442
|
-
|
|
14473
|
+
gn([
|
|
14443
14474
|
E.trace("Stage.cancelRequestAccess")
|
|
14444
14475
|
], ti.prototype, "cancelRequestAccess", 1);
|
|
14445
|
-
|
|
14476
|
+
gn([
|
|
14446
14477
|
E.trace("Stage.grantAccess")
|
|
14447
14478
|
], ti.prototype, "grantAccess", 1);
|
|
14448
|
-
|
|
14479
|
+
gn([
|
|
14449
14480
|
E.trace("Stage.denyAccess")
|
|
14450
14481
|
], ti.prototype, "denyAccess", 1);
|
|
14451
|
-
|
|
14482
|
+
gn([
|
|
14452
14483
|
Pr.executeWithLock({
|
|
14453
14484
|
methodName: "joinStage",
|
|
14454
14485
|
lockName: "Stage.join",
|
|
@@ -14456,7 +14487,7 @@ mn([
|
|
|
14456
14487
|
}),
|
|
14457
14488
|
E.trace("Stage.joinStage")
|
|
14458
14489
|
], ti.prototype, "join", 1);
|
|
14459
|
-
|
|
14490
|
+
gn([
|
|
14460
14491
|
E.trace("Stage.leaveStage")
|
|
14461
14492
|
], ti.prototype, "leave", 1);
|
|
14462
14493
|
function P0(s) {
|
|
@@ -14482,12 +14513,12 @@ var _0 = Object.defineProperty, C0 = Object.getOwnPropertyDescriptor, w0 = (s, t
|
|
|
14482
14513
|
for (var i = r > 1 ? void 0 : r ? C0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14483
14514
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14484
14515
|
return r && i && _0(t, e, i), i;
|
|
14485
|
-
}, Nr,
|
|
14516
|
+
}, Nr, ms, Vr, Bo, mt;
|
|
14486
14517
|
class $f {
|
|
14487
14518
|
constructor(t, e, r, i, a) {
|
|
14488
14519
|
h(this, "stage");
|
|
14489
14520
|
m(this, Nr, void 0);
|
|
14490
|
-
m(this,
|
|
14521
|
+
m(this, ms, void 0);
|
|
14491
14522
|
m(this, Vr, void 0);
|
|
14492
14523
|
m(this, Bo, 0);
|
|
14493
14524
|
m(this, mt, void 0);
|
|
@@ -14497,7 +14528,7 @@ class $f {
|
|
|
14497
14528
|
a,
|
|
14498
14529
|
e,
|
|
14499
14530
|
r
|
|
14500
|
-
), f(this, Vr, e), f(this, Nr, i), f(this,
|
|
14531
|
+
), f(this, Vr, e), f(this, Nr, i), f(this, ms, a), this.setupEvents();
|
|
14501
14532
|
}
|
|
14502
14533
|
/**
|
|
14503
14534
|
* @access private
|
|
@@ -14534,7 +14565,7 @@ class $f {
|
|
|
14534
14565
|
);
|
|
14535
14566
|
}
|
|
14536
14567
|
getCurrentStageRequests() {
|
|
14537
|
-
return n(this,
|
|
14568
|
+
return n(this, ms).joined.toArray().filter(
|
|
14538
14569
|
(e) => e.stageStatus === "REQUESTED_TO_JOIN_STAGE"
|
|
14539
14570
|
).map((e) => ({
|
|
14540
14571
|
displayName: e.name,
|
|
@@ -14575,14 +14606,14 @@ class $f {
|
|
|
14575
14606
|
*/
|
|
14576
14607
|
peerStageStatusHandler(t) {
|
|
14577
14608
|
return u(this, null, function* () {
|
|
14578
|
-
const e = n(this,
|
|
14609
|
+
const e = n(this, ms).joined.get(t.peerId), r = n(this, ms).viewMode === "ACTIVE_GRID";
|
|
14579
14610
|
if (!e) {
|
|
14580
14611
|
this.logger.warn("err::peerStageStatusUpdate: participant not found");
|
|
14581
14612
|
return;
|
|
14582
14613
|
}
|
|
14583
14614
|
switch (t.stageType) {
|
|
14584
14615
|
case 1:
|
|
14585
|
-
e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this,
|
|
14616
|
+
e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
|
|
14586
14617
|
break;
|
|
14587
14618
|
case 2:
|
|
14588
14619
|
e.setStageStatus("ACCEPTED_TO_JOIN_STAGE");
|
|
@@ -14593,7 +14624,7 @@ class $f {
|
|
|
14593
14624
|
case 0:
|
|
14594
14625
|
case 4:
|
|
14595
14626
|
default:
|
|
14596
|
-
e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this,
|
|
14627
|
+
e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
|
|
14597
14628
|
break;
|
|
14598
14629
|
}
|
|
14599
14630
|
n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_PEER_STAGE_STATUS, {
|
|
@@ -14603,7 +14634,7 @@ class $f {
|
|
|
14603
14634
|
});
|
|
14604
14635
|
}
|
|
14605
14636
|
}
|
|
14606
|
-
Nr = new WeakMap(),
|
|
14637
|
+
Nr = new WeakMap(), ms = new WeakMap(), Vr = new WeakMap(), Bo = new WeakMap(), mt = new WeakMap();
|
|
14607
14638
|
w0([
|
|
14608
14639
|
E.trace("Stage.setupEvents")
|
|
14609
14640
|
], $f.prototype, "setupEvents", 1);
|
|
@@ -15026,7 +15057,7 @@ Hl([
|
|
|
15026
15057
|
Ua = Hl([
|
|
15027
15058
|
ut("0600")
|
|
15028
15059
|
], Ua);
|
|
15029
|
-
var
|
|
15060
|
+
var Ne, yi;
|
|
15030
15061
|
class Ff extends Map {
|
|
15031
15062
|
constructor(e, r = void 0) {
|
|
15032
15063
|
const {
|
|
@@ -15035,54 +15066,54 @@ class Ff extends Map {
|
|
|
15035
15066
|
onClearEvent: o
|
|
15036
15067
|
} = e;
|
|
15037
15068
|
super();
|
|
15038
|
-
m(this,
|
|
15039
|
-
m(this,
|
|
15069
|
+
m(this, Ne, void 0);
|
|
15070
|
+
m(this, yi, void 0);
|
|
15040
15071
|
h(this, "onAddEvent");
|
|
15041
15072
|
h(this, "onDeleteEvent");
|
|
15042
15073
|
h(this, "onClearEvent");
|
|
15043
|
-
f(this,
|
|
15074
|
+
f(this, Ne, new $a(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this, yi, /* @__PURE__ */ new Map());
|
|
15044
15075
|
}
|
|
15045
15076
|
emit(e, ...r) {
|
|
15046
|
-
return n(this,
|
|
15077
|
+
return n(this, Ne).emit(e, ...r);
|
|
15047
15078
|
}
|
|
15048
15079
|
on(e, r) {
|
|
15049
|
-
return n(this,
|
|
15080
|
+
return n(this, Ne).on(e, r);
|
|
15050
15081
|
}
|
|
15051
15082
|
addListener(e, r) {
|
|
15052
|
-
return n(this,
|
|
15083
|
+
return n(this, Ne).addListener(e, r);
|
|
15053
15084
|
}
|
|
15054
15085
|
off(e, r) {
|
|
15055
|
-
return n(this,
|
|
15086
|
+
return n(this, Ne).off(e, r);
|
|
15056
15087
|
}
|
|
15057
15088
|
once(e, r) {
|
|
15058
|
-
return n(this,
|
|
15089
|
+
return n(this, Ne).once(e, r);
|
|
15059
15090
|
}
|
|
15060
15091
|
prependListener(e, r) {
|
|
15061
|
-
return n(this,
|
|
15092
|
+
return n(this, Ne).prependListener(e, r);
|
|
15062
15093
|
}
|
|
15063
15094
|
prependOnceListener(e, r) {
|
|
15064
|
-
return n(this,
|
|
15095
|
+
return n(this, Ne).prependOnceListener(e, r);
|
|
15065
15096
|
}
|
|
15066
15097
|
removeListener(e, r) {
|
|
15067
|
-
return n(this,
|
|
15098
|
+
return n(this, Ne).removeListener(e, r);
|
|
15068
15099
|
}
|
|
15069
15100
|
removeAllListeners(e) {
|
|
15070
|
-
return n(this,
|
|
15101
|
+
return n(this, Ne).removeAllListeners(e);
|
|
15071
15102
|
}
|
|
15072
15103
|
listeners(e) {
|
|
15073
|
-
return n(this,
|
|
15104
|
+
return n(this, Ne).listeners(e);
|
|
15074
15105
|
}
|
|
15075
15106
|
listenerCount(e) {
|
|
15076
|
-
return n(this,
|
|
15107
|
+
return n(this, Ne).listenerCount(e);
|
|
15077
15108
|
}
|
|
15078
15109
|
getMaxListeners() {
|
|
15079
|
-
return n(this,
|
|
15110
|
+
return n(this, Ne).getMaxListeners();
|
|
15080
15111
|
}
|
|
15081
15112
|
setMaxListeners(e) {
|
|
15082
|
-
return n(this,
|
|
15113
|
+
return n(this, Ne).setMaxListeners(e);
|
|
15083
15114
|
}
|
|
15084
15115
|
eventNames() {
|
|
15085
|
-
return n(this,
|
|
15116
|
+
return n(this, Ne).eventNames();
|
|
15086
15117
|
}
|
|
15087
15118
|
add(e, r = !0) {
|
|
15088
15119
|
return this.set(e.id, e, r);
|
|
@@ -15091,28 +15122,28 @@ class Ff extends Map {
|
|
|
15091
15122
|
const a = super.set(e, r), o = (c, ...d) => {
|
|
15092
15123
|
this.emit(c, r, ...d);
|
|
15093
15124
|
};
|
|
15094
|
-
return n(this,
|
|
15125
|
+
return n(this, yi).set(e, o), r.on("*", o), i && n(this, Ne).emit(this.onAddEvent, r), a;
|
|
15095
15126
|
}
|
|
15096
15127
|
delete(e, r = !0, i = !1) {
|
|
15097
15128
|
const a = this.get(e);
|
|
15098
15129
|
if (!a)
|
|
15099
15130
|
return !1;
|
|
15100
|
-
a.removeListener("*", n(this,
|
|
15131
|
+
a.removeListener("*", n(this, yi).get(e));
|
|
15101
15132
|
const o = super.delete(e);
|
|
15102
|
-
return i && a.removeAllListeners(), r && n(this,
|
|
15133
|
+
return i && a.removeAllListeners(), r && n(this, Ne).emit(this.onDeleteEvent, a), o;
|
|
15103
15134
|
}
|
|
15104
15135
|
clear(e = !0, r = !1) {
|
|
15105
15136
|
this.forEach((a) => {
|
|
15106
|
-
a.removeListener("*", n(this,
|
|
15137
|
+
a.removeListener("*", n(this, yi).get(a.id)), r && a.removeAllListeners();
|
|
15107
15138
|
});
|
|
15108
15139
|
const i = super.clear();
|
|
15109
|
-
return e && n(this,
|
|
15140
|
+
return e && n(this, Ne).emit(this.onClearEvent), i;
|
|
15110
15141
|
}
|
|
15111
15142
|
toArray() {
|
|
15112
15143
|
return Array.from(this.values());
|
|
15113
15144
|
}
|
|
15114
15145
|
}
|
|
15115
|
-
|
|
15146
|
+
Ne = new WeakMap(), yi = new WeakMap();
|
|
15116
15147
|
class pg extends Ff {
|
|
15117
15148
|
constructor(t) {
|
|
15118
15149
|
super({
|
|
@@ -15155,28 +15186,28 @@ var M0 = Object.defineProperty, D0 = Object.getOwnPropertyDescriptor, ql = (s, t
|
|
|
15155
15186
|
for (var i = r > 1 ? void 0 : r ? D0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
15156
15187
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15157
15188
|
return r && i && M0(t, e, i), i;
|
|
15158
|
-
}, Xt, Yn,
|
|
15189
|
+
}, Xt, Yn, fs, Ug;
|
|
15159
15190
|
const Bf = (Ug = class {
|
|
15160
15191
|
constructor(s, t, e, r) {
|
|
15161
15192
|
h(this, "plugins");
|
|
15162
15193
|
m(this, Xt, void 0);
|
|
15163
15194
|
m(this, Yn, void 0);
|
|
15164
|
-
m(this,
|
|
15165
|
-
f(this, Xt, t), f(this, Yn, e), f(this,
|
|
15195
|
+
m(this, fs, void 0);
|
|
15196
|
+
f(this, Xt, t), f(this, Yn, e), f(this, fs, s), this.plugins = r, this.setupEvents();
|
|
15166
15197
|
}
|
|
15167
15198
|
/**
|
|
15168
15199
|
* @access private
|
|
15169
15200
|
* Not for external use
|
|
15170
15201
|
*/
|
|
15171
15202
|
get telemetry() {
|
|
15172
|
-
return n(this,
|
|
15203
|
+
return n(this, fs).getValue("telemetry");
|
|
15173
15204
|
}
|
|
15174
15205
|
/**
|
|
15175
15206
|
* @access private
|
|
15176
15207
|
* Not for external use
|
|
15177
15208
|
*/
|
|
15178
15209
|
get logger() {
|
|
15179
|
-
return n(this,
|
|
15210
|
+
return n(this, fs).getValue("logger");
|
|
15180
15211
|
}
|
|
15181
15212
|
static init(s, t, e, r, i, a, o, c) {
|
|
15182
15213
|
return u(this, null, function* () {
|
|
@@ -15250,7 +15281,7 @@ const Bf = (Ug = class {
|
|
|
15250
15281
|
}
|
|
15251
15282
|
this.plugins.active.delete(t);
|
|
15252
15283
|
}
|
|
15253
|
-
), n(this,
|
|
15284
|
+
), n(this, fs).getValue("peerSessionStore").onAsync(k.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
|
|
15254
15285
|
yield this.getRoomPlugins(), this.logger.debug("[SOCKET_SERVICE_ROOM_JOINED] resolved request to fetch plugins.");
|
|
15255
15286
|
})), n(this, Xt).on(
|
|
15256
15287
|
J.addPlugin,
|
|
@@ -15340,7 +15371,7 @@ const Bf = (Ug = class {
|
|
|
15340
15371
|
), n(this, Yn).on(
|
|
15341
15372
|
Re.sendMessageToPeers,
|
|
15342
15373
|
(s) => {
|
|
15343
|
-
const t =
|
|
15374
|
+
const t = as == null ? void 0 : as.formatSocketPeerMessage(
|
|
15344
15375
|
s.message
|
|
15345
15376
|
);
|
|
15346
15377
|
this.broadcastIframeEvent(Ie.chatMessage, { message: t });
|
|
@@ -15348,23 +15379,23 @@ const Bf = (Ug = class {
|
|
|
15348
15379
|
), n(this, Yn).on(
|
|
15349
15380
|
Re.sendMessageToRoom,
|
|
15350
15381
|
(s) => {
|
|
15351
|
-
const t =
|
|
15382
|
+
const t = as == null ? void 0 : as.formatSocketPeerMessage(
|
|
15352
15383
|
s.message
|
|
15353
15384
|
);
|
|
15354
15385
|
this.broadcastIframeEvent(Ie.chatMessage, { message: t });
|
|
15355
15386
|
}
|
|
15356
|
-
), n(this,
|
|
15387
|
+
), n(this, fs).getValue("peerSessionStore").on(k.PEER_JOINED_INTERNAL, (s) => {
|
|
15357
15388
|
const t = bd(s);
|
|
15358
15389
|
this.broadcastIframeEvent(Ie.peerJoined, t);
|
|
15359
|
-
}), n(this,
|
|
15390
|
+
}), n(this, fs).getValue("peerSessionStore").on(k.PEER_CLOSED, (s) => {
|
|
15360
15391
|
this.broadcastIframeEvent(Ie.peerLeft, s);
|
|
15361
|
-
}), n(this,
|
|
15392
|
+
}), n(this, fs).getValue("peerSessionStore").on(k.UPDATE_PEER_STAGE_STATUS, (s) => {
|
|
15362
15393
|
this.broadcastIframeEvent(Ie.peerStageStatusUpdate, s);
|
|
15363
|
-
}), n(this,
|
|
15394
|
+
}), n(this, fs).subscribe("stageStatus", (s) => {
|
|
15364
15395
|
this.broadcastIframeEvent(Ie.stageStatusUpdate, s);
|
|
15365
15396
|
});
|
|
15366
15397
|
}
|
|
15367
|
-
}, Xt = new WeakMap(), Yn = new WeakMap(),
|
|
15398
|
+
}, Xt = new WeakMap(), Yn = new WeakMap(), fs = new WeakMap(), Ug);
|
|
15368
15399
|
let Hc = Bf;
|
|
15369
15400
|
ql([
|
|
15370
15401
|
E.trace("PluginController.getRoomPlugins")
|
|
@@ -15459,7 +15490,7 @@ var N0 = Object.defineProperty, V0 = Object.getOwnPropertyDescriptor, qc = (s, t
|
|
|
15459
15490
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15460
15491
|
return r && i && N0(t, e, i), i;
|
|
15461
15492
|
}, Qn, Xn, Zn, pd, $g;
|
|
15462
|
-
let
|
|
15493
|
+
let dn = ($g = class extends jt {
|
|
15463
15494
|
constructor(t, e) {
|
|
15464
15495
|
const r = t.getValue("logger");
|
|
15465
15496
|
super(r);
|
|
@@ -15560,56 +15591,56 @@ let ln = ($g = class extends jt {
|
|
|
15560
15591
|
}, $g);
|
|
15561
15592
|
qc([
|
|
15562
15593
|
E.trace("Recording.start")
|
|
15563
|
-
],
|
|
15594
|
+
], dn.prototype, "start", 1);
|
|
15564
15595
|
qc([
|
|
15565
15596
|
E.trace("Recording.stop")
|
|
15566
|
-
],
|
|
15597
|
+
], dn.prototype, "stop", 1);
|
|
15567
15598
|
qc([
|
|
15568
15599
|
E.trace("Recording.stop")
|
|
15569
|
-
],
|
|
15600
|
+
], dn.prototype, "pause", 1);
|
|
15570
15601
|
qc([
|
|
15571
15602
|
E.trace("Recording.stop")
|
|
15572
|
-
],
|
|
15573
|
-
|
|
15603
|
+
], dn.prototype, "resume", 1);
|
|
15604
|
+
dn = qc([
|
|
15574
15605
|
ut("1000")
|
|
15575
|
-
],
|
|
15606
|
+
], dn);
|
|
15576
15607
|
var L0 = Object.defineProperty, x0 = Object.getOwnPropertyDescriptor, U0 = (s, t, e, r) => {
|
|
15577
15608
|
for (var i = r > 1 ? void 0 : r ? x0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
15578
15609
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15579
15610
|
return r && i && L0(t, e, i), i;
|
|
15580
|
-
},
|
|
15611
|
+
}, Ei;
|
|
15581
15612
|
class Hf {
|
|
15582
15613
|
constructor(t, e, r) {
|
|
15583
15614
|
h(this, "recording");
|
|
15584
15615
|
h(this, "room");
|
|
15585
|
-
m(this,
|
|
15586
|
-
f(this,
|
|
15616
|
+
m(this, Ei, void 0);
|
|
15617
|
+
f(this, Ei, t), this.recording = new dn(t, e), this.room = r, this.setupEvents();
|
|
15587
15618
|
}
|
|
15588
15619
|
/**
|
|
15589
15620
|
* @access private
|
|
15590
15621
|
* Not for external use
|
|
15591
15622
|
*/
|
|
15592
15623
|
get telemetry() {
|
|
15593
|
-
return n(this,
|
|
15624
|
+
return n(this, Ei).getValue("telemetry");
|
|
15594
15625
|
}
|
|
15595
15626
|
/**
|
|
15596
15627
|
* @access private
|
|
15597
15628
|
* Not for external use
|
|
15598
15629
|
*/
|
|
15599
15630
|
get logger() {
|
|
15600
|
-
return n(this,
|
|
15631
|
+
return n(this, Ei).getValue("logger");
|
|
15601
15632
|
}
|
|
15602
15633
|
// eslint-disable-next-line class-methods-use-this
|
|
15603
15634
|
getRecordingTypeFromProtoType(t) {
|
|
15604
15635
|
let e;
|
|
15605
15636
|
switch (t) {
|
|
15606
|
-
case
|
|
15637
|
+
case rn.BROWSER:
|
|
15607
15638
|
e = "BROWSER";
|
|
15608
15639
|
break;
|
|
15609
|
-
case
|
|
15640
|
+
case rn.COMPOSITE:
|
|
15610
15641
|
e = "COMPOSITE";
|
|
15611
15642
|
break;
|
|
15612
|
-
case
|
|
15643
|
+
case rn.TRACK:
|
|
15613
15644
|
e = "TRACK";
|
|
15614
15645
|
break;
|
|
15615
15646
|
default:
|
|
@@ -15618,7 +15649,7 @@ class Hf {
|
|
|
15618
15649
|
return e;
|
|
15619
15650
|
}
|
|
15620
15651
|
setupEvents() {
|
|
15621
|
-
n(this,
|
|
15652
|
+
n(this, Ei).getValue("peerSessionStore").on(k.ROOM_STATE, (t) => {
|
|
15622
15653
|
t.activeRecordings.length !== 0 ? this.recording.updateRecordings(
|
|
15623
15654
|
t.activeRecordings.map((e) => {
|
|
15624
15655
|
const r = this.getRecordingTypeFromProtoType(e.recordingType);
|
|
@@ -15650,28 +15681,28 @@ class Hf {
|
|
|
15650
15681
|
});
|
|
15651
15682
|
}
|
|
15652
15683
|
}
|
|
15653
|
-
|
|
15684
|
+
Ei = new WeakMap();
|
|
15654
15685
|
U0([
|
|
15655
15686
|
E.trace("RecordingController.setupEvents")
|
|
15656
15687
|
], Hf.prototype, "setupEvents", 1);
|
|
15657
|
-
var
|
|
15688
|
+
var Pi;
|
|
15658
15689
|
class $0 {
|
|
15659
15690
|
constructor(t) {
|
|
15660
|
-
m(this,
|
|
15661
|
-
f(this,
|
|
15691
|
+
m(this, Pi, void 0);
|
|
15692
|
+
f(this, Pi, t);
|
|
15662
15693
|
}
|
|
15663
15694
|
hasFeature(t) {
|
|
15664
15695
|
var e;
|
|
15665
|
-
return (e = n(this,
|
|
15696
|
+
return (e = n(this, Pi).getValue("flagsmith").hasFeature(t)) != null ? e : !1;
|
|
15666
15697
|
}
|
|
15667
15698
|
getFeatureValue(t) {
|
|
15668
|
-
return n(this,
|
|
15699
|
+
return n(this, Pi).getValue("flagsmith").getValue(t);
|
|
15669
15700
|
}
|
|
15670
15701
|
getAllFeatures() {
|
|
15671
|
-
return n(this,
|
|
15702
|
+
return n(this, Pi).getValue("flagsmith").getAllFlags();
|
|
15672
15703
|
}
|
|
15673
15704
|
}
|
|
15674
|
-
|
|
15705
|
+
Pi = new WeakMap();
|
|
15675
15706
|
class Vh {
|
|
15676
15707
|
constructor(t, e, r) {
|
|
15677
15708
|
h(this, "logger");
|
|
@@ -16189,10 +16220,10 @@ function q0(s, t, e) {
|
|
|
16189
16220
|
return c.stream.getAudioTracks()[0];
|
|
16190
16221
|
});
|
|
16191
16222
|
}
|
|
16192
|
-
var
|
|
16223
|
+
var _i, jo;
|
|
16193
16224
|
class j0 {
|
|
16194
16225
|
constructor(t) {
|
|
16195
|
-
m(this,
|
|
16226
|
+
m(this, _i, void 0);
|
|
16196
16227
|
m(this, jo, void 0);
|
|
16197
16228
|
f(this, jo, t);
|
|
16198
16229
|
}
|
|
@@ -16204,9 +16235,9 @@ class j0 {
|
|
|
16204
16235
|
return n(this, jo).getValue("logger");
|
|
16205
16236
|
}
|
|
16206
16237
|
terminateMiddlewareWebWorker() {
|
|
16207
|
-
if (n(this,
|
|
16238
|
+
if (n(this, _i))
|
|
16208
16239
|
try {
|
|
16209
|
-
nd.clearInterval(n(this,
|
|
16240
|
+
nd.clearInterval(n(this, _i)), f(this, _i, void 0);
|
|
16210
16241
|
} catch (t) {
|
|
16211
16242
|
this.logger.debug("WorkerTimers::terminateMiddlewareWebWorker::failed");
|
|
16212
16243
|
}
|
|
@@ -16257,7 +16288,7 @@ class j0 {
|
|
|
16257
16288
|
o.addEventListener(
|
|
16258
16289
|
"play",
|
|
16259
16290
|
() => {
|
|
16260
|
-
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this,
|
|
16291
|
+
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this, _i, nd.setInterval(
|
|
16261
16292
|
l,
|
|
16262
16293
|
50
|
|
16263
16294
|
));
|
|
@@ -16271,7 +16302,7 @@ class j0 {
|
|
|
16271
16302
|
});
|
|
16272
16303
|
}
|
|
16273
16304
|
}
|
|
16274
|
-
|
|
16305
|
+
_i = new WeakMap(), jo = new WeakMap();
|
|
16275
16306
|
const gg = {
|
|
16276
16307
|
gross: { width: { ideal: 192 }, height: { ideal: 144 } },
|
|
16277
16308
|
qvga: { width: { ideal: 384 }, height: { ideal: 288 } },
|
|
@@ -16351,7 +16382,7 @@ const gg = {
|
|
|
16351
16382
|
}), i[c][1];
|
|
16352
16383
|
};
|
|
16353
16384
|
var he = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(he || {});
|
|
16354
|
-
const J0 = g_(),
|
|
16385
|
+
const J0 = g_(), vn = Rs(
|
|
16355
16386
|
J0.config.media
|
|
16356
16387
|
);
|
|
16357
16388
|
function K0(s) {
|
|
@@ -16362,15 +16393,15 @@ function K0(s) {
|
|
|
16362
16393
|
enableHighBitrate: (r = s.audio.enableHighBitrate) != null ? r : !1
|
|
16363
16394
|
}), t.video = s.video.quality, t;
|
|
16364
16395
|
}
|
|
16365
|
-
var
|
|
16396
|
+
var Ci, Os;
|
|
16366
16397
|
class z0 {
|
|
16367
16398
|
constructor(t, e) {
|
|
16368
|
-
m(this,
|
|
16399
|
+
m(this, Ci, void 0);
|
|
16369
16400
|
m(this, Os, void 0);
|
|
16370
16401
|
// eslint-disable-next-line class-methods-use-this
|
|
16371
16402
|
h(this, "getScreenShareConstraints", () => {
|
|
16372
16403
|
var l, p, g, v, S, P, _, C, w, L, F;
|
|
16373
|
-
const t = (l = n(this,
|
|
16404
|
+
const t = (l = n(this, Ci)) == null ? void 0 : l.screenshare, e = (g = (p = t == null ? void 0 : t.width) == null ? void 0 : p.max) != null ? g : 1920, r = (S = (v = t == null ? void 0 : t.height) == null ? void 0 : v.max) != null ? S : 1080, i = (_ = (P = t == null ? void 0 : t.frameRate) == null ? void 0 : P.max) != null ? _ : 5;
|
|
16374
16405
|
let a = (w = (C = t == null ? void 0 : t.frameRate) == null ? void 0 : C.ideal) != null ? w : 5;
|
|
16375
16406
|
const o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
16376
16407
|
n(this, Os).getValue("flagsmith").getValue(ee.VAL_MIN_FRAMERATE) && (a = parseInt(
|
|
@@ -16399,7 +16430,7 @@ class z0 {
|
|
|
16399
16430
|
// eslint-disable-next-line class-methods-use-this
|
|
16400
16431
|
h(this, "getAudioConstraints", (t) => {
|
|
16401
16432
|
var a, o, c, d, l, p, g;
|
|
16402
|
-
const e = {}, r = (a = n(this,
|
|
16433
|
+
const e = {}, r = (a = n(this, Ci)) == null ? void 0 : a.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
16403
16434
|
return ye.isFirefox() || ye.isWebKitBased() ? (e.audio = {
|
|
16404
16435
|
deviceId: t,
|
|
16405
16436
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : !0,
|
|
@@ -16415,7 +16446,7 @@ class z0 {
|
|
|
16415
16446
|
});
|
|
16416
16447
|
h(this, "getVideoConstraints", (t) => {
|
|
16417
16448
|
var a, o, c, d;
|
|
16418
|
-
const e = {}, r = (a = n(this,
|
|
16449
|
+
const e = {}, r = (a = n(this, Ci)) == null ? void 0 : a.video;
|
|
16419
16450
|
let i = gg.vga;
|
|
16420
16451
|
if (typeof r == "string" ? i = gg[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
|
|
16421
16452
|
ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
|
|
@@ -16427,14 +16458,14 @@ class z0 {
|
|
|
16427
16458
|
}
|
|
16428
16459
|
return e.video = i, typeof e.video == "boolean" || (t ? e.video.deviceId = { exact: t } : e.video.facingMode = "user"), e;
|
|
16429
16460
|
});
|
|
16430
|
-
f(this, Os, t), f(this,
|
|
16461
|
+
f(this, Os, t), f(this, Ci, e);
|
|
16431
16462
|
}
|
|
16432
16463
|
// eslint-disable-next-line class-methods-use-this
|
|
16433
16464
|
getUpdatedVideoConstraints(t) {
|
|
16434
16465
|
return t;
|
|
16435
16466
|
}
|
|
16436
16467
|
}
|
|
16437
|
-
|
|
16468
|
+
Ci = new WeakMap(), Os = new WeakMap();
|
|
16438
16469
|
class pu extends Error {
|
|
16439
16470
|
constructor(e, r, i) {
|
|
16440
16471
|
super(r);
|
|
@@ -16475,28 +16506,28 @@ var Q0 = Object.defineProperty, X0 = Object.getOwnPropertyDescriptor, Ms = (s, t
|
|
|
16475
16506
|
for (var i = r > 1 ? void 0 : r ? X0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
16476
16507
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16477
16508
|
return r && i && Q0(t, e, i), i;
|
|
16478
|
-
}, ea, es,
|
|
16509
|
+
}, ea, es, Ve, Fg;
|
|
16479
16510
|
let qt = (Fg = class extends Y0 {
|
|
16480
16511
|
constructor(t, e) {
|
|
16481
16512
|
super();
|
|
16482
16513
|
m(this, ea, void 0);
|
|
16483
16514
|
m(this, es, void 0);
|
|
16484
|
-
m(this,
|
|
16485
|
-
f(this,
|
|
16515
|
+
m(this, Ve, void 0);
|
|
16516
|
+
f(this, Ve, t), f(this, es, new z0(t, e)), f(this, ea, new AbortController());
|
|
16486
16517
|
}
|
|
16487
16518
|
/**
|
|
16488
16519
|
* @access private
|
|
16489
16520
|
* Not for external use
|
|
16490
16521
|
*/
|
|
16491
16522
|
get telemetry() {
|
|
16492
|
-
return n(this,
|
|
16523
|
+
return n(this, Ve).getValue("telemetry");
|
|
16493
16524
|
}
|
|
16494
16525
|
/**
|
|
16495
16526
|
* @access private
|
|
16496
16527
|
* Not for external use
|
|
16497
16528
|
*/
|
|
16498
16529
|
get logger() {
|
|
16499
|
-
return n(this,
|
|
16530
|
+
return n(this, Ve).getValue("logger");
|
|
16500
16531
|
}
|
|
16501
16532
|
get constraintsBuilder() {
|
|
16502
16533
|
return n(this, es);
|
|
@@ -16509,7 +16540,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16509
16540
|
}
|
|
16510
16541
|
handlePermissionErrors(t, e) {
|
|
16511
16542
|
const r = sd(t, e.name, e.message);
|
|
16512
|
-
return this.permissions[t] = r, n(this,
|
|
16543
|
+
return this.permissions[t] = r, n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_ERROR, {
|
|
16513
16544
|
message: r,
|
|
16514
16545
|
constraints: e.constraints,
|
|
16515
16546
|
kind: t
|
|
@@ -16544,14 +16575,14 @@ let qt = (Fg = class extends Y0 {
|
|
|
16544
16575
|
});
|
|
16545
16576
|
const _ = P.getAudioTracks()[0];
|
|
16546
16577
|
let C = P.getVideoTracks()[0];
|
|
16547
|
-
if (this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", n(this,
|
|
16578
|
+
if (this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", n(this, Ve).getValue("flagsmith").hasFeature(ee.OBS_QUALITY) && C.label.includes("OBS Virtual")) {
|
|
16548
16579
|
const F = (yield this.getVideoInputDevices()).find((N) => N.label.includes("OBS Virtual"));
|
|
16549
16580
|
C = yield this.getVideoTrack(F.deviceId);
|
|
16550
16581
|
}
|
|
16551
|
-
return n(this,
|
|
16582
|
+
return n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16552
16583
|
message: this.permissions.audio,
|
|
16553
16584
|
kind: "audio"
|
|
16554
|
-
}), n(this,
|
|
16585
|
+
}), n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16555
16586
|
message: this.permissions.video,
|
|
16556
16587
|
kind: "video"
|
|
16557
16588
|
}), { audioTrack: _, videoTrack: C };
|
|
@@ -16565,7 +16596,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16565
16596
|
var c, d;
|
|
16566
16597
|
let r = yield this.getAudioInputDevices();
|
|
16567
16598
|
if (!(r != null && r.length))
|
|
16568
|
-
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this,
|
|
16599
|
+
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16569
16600
|
message: this.permissions.audio,
|
|
16570
16601
|
kind: "audio"
|
|
16571
16602
|
}), new b("No audio devices available", "1606");
|
|
@@ -16610,7 +16641,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16610
16641
|
});
|
|
16611
16642
|
try {
|
|
16612
16643
|
const l = yield o(a);
|
|
16613
|
-
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this,
|
|
16644
|
+
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16614
16645
|
message: this.permissions.audio,
|
|
16615
16646
|
kind: "audio"
|
|
16616
16647
|
})), l;
|
|
@@ -16622,9 +16653,9 @@ let qt = (Fg = class extends Y0 {
|
|
|
16622
16653
|
getVideoTrack(t) {
|
|
16623
16654
|
return u(this, null, function* () {
|
|
16624
16655
|
var l, p, g;
|
|
16625
|
-
const e = n(this,
|
|
16656
|
+
const e = n(this, Ve).getValue("flagsmith").hasFeature(ee.OBS_QUALITY), r = (l = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : l.includes("OBS Virtual"), i = e && r, a = yield this.getVideoInputDevices();
|
|
16626
16657
|
if (!(a != null && a.length))
|
|
16627
|
-
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this,
|
|
16658
|
+
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16628
16659
|
message: this.permissions.video,
|
|
16629
16660
|
kind: "video"
|
|
16630
16661
|
}), new b("No video devices available", "1607");
|
|
@@ -16680,7 +16711,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16680
16711
|
});
|
|
16681
16712
|
try {
|
|
16682
16713
|
const v = n(this, es).getVideoConstraints(c), S = yield d(v);
|
|
16683
|
-
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this,
|
|
16714
|
+
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16684
16715
|
message: this.permissions.video,
|
|
16685
16716
|
kind: "video"
|
|
16686
16717
|
})), S;
|
|
@@ -16695,7 +16726,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16695
16726
|
try {
|
|
16696
16727
|
this.logger.info("getDisplayMediaWithoutTimeout::requesting_display_media", {
|
|
16697
16728
|
constraints: JSON.stringify(e)
|
|
16698
|
-
}), n(this,
|
|
16729
|
+
}), n(this, Ve).getValue("callstats").screenShareRequested();
|
|
16699
16730
|
const r = yield navigator.mediaDevices.getDisplayMedia(
|
|
16700
16731
|
e
|
|
16701
16732
|
);
|
|
@@ -16708,7 +16739,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16708
16739
|
r.name,
|
|
16709
16740
|
r.message
|
|
16710
16741
|
), a = new pu(r.name, r.message, e), o = { video: !0 };
|
|
16711
|
-
if (ew(e, o) || !n(this,
|
|
16742
|
+
if (ew(e, o) || !n(this, Ve).getValue("flagsmith").hasFeature(ee.SCREEENSHARE_CONSTRAINTS_RETRY))
|
|
16712
16743
|
throw a;
|
|
16713
16744
|
if (i === "COULD_NOT_START")
|
|
16714
16745
|
return t(o);
|
|
@@ -16717,7 +16748,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16717
16748
|
});
|
|
16718
16749
|
try {
|
|
16719
16750
|
const e = n(this, es).getScreenShareConstraints(), r = yield t(e);
|
|
16720
|
-
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this,
|
|
16751
|
+
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
|
|
16721
16752
|
message: this.permissions.screenshare,
|
|
16722
16753
|
kind: "screenshare"
|
|
16723
16754
|
})), {
|
|
@@ -16831,7 +16862,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16831
16862
|
devices: JSON.stringify(o)
|
|
16832
16863
|
});
|
|
16833
16864
|
const g = [...d.added, ...d.removed];
|
|
16834
|
-
g.some((v) => v.kind === "audioinput") && n(this,
|
|
16865
|
+
g.some((v) => v.kind === "audioinput") && n(this, Ve).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((v) => v.kind === "audioinput")), g.some((v) => v.kind === "videoinput") && n(this, Ve).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((v) => v.kind === "videoinput")), g.some((v) => v.kind === "audiooutput") && n(this, Ve).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((v) => v.kind === "audiooutput")), t(r, d, !1);
|
|
16835
16866
|
}
|
|
16836
16867
|
}),
|
|
16837
16868
|
{ signal: n(this, ea).signal }
|
|
@@ -16839,7 +16870,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16839
16870
|
}
|
|
16840
16871
|
});
|
|
16841
16872
|
}
|
|
16842
|
-
}, ea = new WeakMap(), es = new WeakMap(),
|
|
16873
|
+
}, ea = new WeakMap(), es = new WeakMap(), Ve = new WeakMap(), Fg);
|
|
16843
16874
|
Ms([
|
|
16844
16875
|
E.trace("WebMediaInterface.destruct")
|
|
16845
16876
|
], qt.prototype, "destruct", 1);
|
|
@@ -16873,7 +16904,7 @@ Ms([
|
|
|
16873
16904
|
qt = Ms([
|
|
16874
16905
|
ut("1600")
|
|
16875
16906
|
], qt);
|
|
16876
|
-
const qf = qt,
|
|
16907
|
+
const qf = qt, nn = {
|
|
16877
16908
|
setItem: (s, t, e) => {
|
|
16878
16909
|
try {
|
|
16879
16910
|
localStorage.setItem(s, t);
|
|
@@ -17008,12 +17039,12 @@ let Id = class extends $a {
|
|
|
17008
17039
|
h(this, "middlewares", []);
|
|
17009
17040
|
h(this, "currentDevice");
|
|
17010
17041
|
h(this, "userPreferredDeviceKey", `Realtimekit::${this.constructorName}::UserDeviceID`);
|
|
17011
|
-
h(this, "setUserPreferredDevice", (t) =>
|
|
17042
|
+
h(this, "setUserPreferredDevice", (t) => nn.setItem(
|
|
17012
17043
|
this.userPreferredDeviceKey,
|
|
17013
17044
|
t,
|
|
17014
17045
|
this.logger
|
|
17015
17046
|
));
|
|
17016
|
-
h(this, "getUserPreferredDevice", () =>
|
|
17047
|
+
h(this, "getUserPreferredDevice", () => nn.getItem(
|
|
17017
17048
|
this.userPreferredDeviceKey,
|
|
17018
17049
|
this.logger
|
|
17019
17050
|
));
|
|
@@ -17303,7 +17334,7 @@ class jl extends Gf {
|
|
|
17303
17334
|
a[0].deviceId
|
|
17304
17335
|
));
|
|
17305
17336
|
const o = JSON.parse(
|
|
17306
|
-
|
|
17337
|
+
nn.getItem(gu, this.logger)
|
|
17307
17338
|
);
|
|
17308
17339
|
if (o != null && o.devices.some(
|
|
17309
17340
|
(l) => l.label === r.label
|
|
@@ -17313,7 +17344,7 @@ class jl extends Gf {
|
|
|
17313
17344
|
const l = (d = o == null ? void 0 : o.devices.concat({
|
|
17314
17345
|
label: r.label
|
|
17315
17346
|
})) != null ? d : [{ label: r.label }];
|
|
17316
|
-
return
|
|
17347
|
+
return nn.setItem(gu, JSON.stringify({
|
|
17317
17348
|
devices: l
|
|
17318
17349
|
}), this.logger), r;
|
|
17319
17350
|
}
|
|
@@ -17328,7 +17359,7 @@ class jl extends Gf {
|
|
|
17328
17359
|
const g = (p = o == null ? void 0 : o.devices.concat({
|
|
17329
17360
|
label: r.label
|
|
17330
17361
|
})) != null ? p : [{ label: r.label }];
|
|
17331
|
-
return
|
|
17362
|
+
return nn.setItem(gu, JSON.stringify({
|
|
17332
17363
|
devices: g
|
|
17333
17364
|
}), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), !0;
|
|
17334
17365
|
}
|
|
@@ -17347,37 +17378,37 @@ Uh([
|
|
|
17347
17378
|
E.trace("AudioMediaHandler.conditionallyChangeTrack")
|
|
17348
17379
|
], jl.prototype, "conditionallyChangeTrack", 1);
|
|
17349
17380
|
const dD = jl;
|
|
17350
|
-
var
|
|
17381
|
+
var wi;
|
|
17351
17382
|
class lD {
|
|
17352
17383
|
constructor(t, e) {
|
|
17353
|
-
m(this,
|
|
17384
|
+
m(this, wi, void 0);
|
|
17354
17385
|
h(this, "currentDevice");
|
|
17355
17386
|
h(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
|
|
17356
17387
|
h(this, "logger");
|
|
17357
|
-
h(this, "setUserPreferredDevice", (t) =>
|
|
17388
|
+
h(this, "setUserPreferredDevice", (t) => nn.setItem(
|
|
17358
17389
|
this.userPreferredDeviceKey,
|
|
17359
17390
|
t,
|
|
17360
17391
|
this.logger
|
|
17361
17392
|
));
|
|
17362
|
-
h(this, "getUserPreferredDevice", () =>
|
|
17393
|
+
h(this, "getUserPreferredDevice", () => nn.getItem(
|
|
17363
17394
|
this.userPreferredDeviceKey,
|
|
17364
17395
|
this.logger
|
|
17365
17396
|
));
|
|
17366
|
-
f(this,
|
|
17397
|
+
f(this, wi, e), this.logger = t.getValue("logger");
|
|
17367
17398
|
}
|
|
17368
17399
|
setPreferredSpeaker() {
|
|
17369
17400
|
return u(this, null, function* () {
|
|
17370
|
-
const t = this.getUserPreferredDevice(), e = yield n(this,
|
|
17401
|
+
const t = this.getUserPreferredDevice(), e = yield n(this, wi).getAudioOutputDevices(), r = e == null ? void 0 : e.find((i) => i.deviceId === t);
|
|
17371
17402
|
yield this.setupSpeaker(r, { saveDevicePreference: !1 });
|
|
17372
17403
|
});
|
|
17373
17404
|
}
|
|
17374
17405
|
setupSpeaker(r, i) {
|
|
17375
17406
|
return u(this, arguments, function* (t, { saveDevicePreference: e }) {
|
|
17376
17407
|
var c, d;
|
|
17377
|
-
if (!(n(this,
|
|
17408
|
+
if (!(n(this, wi) instanceof qf))
|
|
17378
17409
|
return;
|
|
17379
17410
|
let a = t;
|
|
17380
|
-
if (t || ([a] = (yield n(this,
|
|
17411
|
+
if (t || ([a] = (yield n(this, wi).getAvailableDevicesByKind(
|
|
17381
17412
|
"audiooutput"
|
|
17382
17413
|
)).filter((p) => !kd(p))), !a)
|
|
17383
17414
|
throw new b("No speaker found", "1608");
|
|
@@ -17395,7 +17426,7 @@ class lD {
|
|
|
17395
17426
|
});
|
|
17396
17427
|
}
|
|
17397
17428
|
}
|
|
17398
|
-
|
|
17429
|
+
wi = new WeakMap();
|
|
17399
17430
|
const uD = lD;
|
|
17400
17431
|
var Go;
|
|
17401
17432
|
class hD extends $a {
|
|
@@ -17616,37 +17647,37 @@ Gl([
|
|
|
17616
17647
|
const fD = jc, vg = Rs(
|
|
17617
17648
|
Rh()
|
|
17618
17649
|
);
|
|
17619
|
-
var Ct,
|
|
17620
|
-
const
|
|
17650
|
+
var Ct, Ri, Jo, sa;
|
|
17651
|
+
const wn = class {
|
|
17621
17652
|
/**
|
|
17622
17653
|
* @param {PresetV2CamelCased} preset
|
|
17623
17654
|
*/
|
|
17624
17655
|
constructor(t) {
|
|
17625
17656
|
m(this, Ct, void 0);
|
|
17626
|
-
m(this,
|
|
17657
|
+
m(this, Ri, void 0);
|
|
17627
17658
|
m(this, Jo, void 0);
|
|
17628
17659
|
m(this, sa, void 0);
|
|
17629
17660
|
if (!t)
|
|
17630
17661
|
throw new b("Could not load preset.", "0904");
|
|
17631
|
-
f(this, Ct, t.config), f(this, Jo, t.name), f(this,
|
|
17662
|
+
f(this, Ct, t.config), f(this, Jo, t.name), f(this, Ri, t.ui || Rs(Rh().ui)), f(this, sa, t.permissions.plugins.config);
|
|
17632
17663
|
}
|
|
17633
17664
|
/**
|
|
17634
17665
|
* @deprecated. Use init()
|
|
17635
17666
|
* @param {PresetV2CamelCased} preset
|
|
17636
17667
|
*/
|
|
17637
17668
|
static fromResponse(t) {
|
|
17638
|
-
return new
|
|
17669
|
+
return new wn(t);
|
|
17639
17670
|
}
|
|
17640
17671
|
/** @deprecated. Use init() */
|
|
17641
17672
|
static default() {
|
|
17642
|
-
return new
|
|
17673
|
+
return new wn(vg);
|
|
17643
17674
|
}
|
|
17644
17675
|
/**
|
|
17645
17676
|
* @param {PresetV2CamelCased} [preset]
|
|
17646
17677
|
* @param {boolean} [useDefault=true]
|
|
17647
17678
|
*/
|
|
17648
17679
|
static init(t, e = !0) {
|
|
17649
|
-
return !t || e ? new
|
|
17680
|
+
return !t || e ? new wn(vg) : new wn(t);
|
|
17650
17681
|
}
|
|
17651
17682
|
/**
|
|
17652
17683
|
* @deprecated
|
|
@@ -17703,7 +17734,7 @@ const Rn = class {
|
|
|
17703
17734
|
return {
|
|
17704
17735
|
isEnabled: !0,
|
|
17705
17736
|
elements: {
|
|
17706
|
-
logo: n(this,
|
|
17737
|
+
logo: n(this, Ri).designTokens.logo,
|
|
17707
17738
|
timer: !0,
|
|
17708
17739
|
title: !0,
|
|
17709
17740
|
participantCount: !0,
|
|
@@ -17760,25 +17791,25 @@ const Rn = class {
|
|
|
17760
17791
|
return Object.keys(n(this, sa)).filter((t) => n(this, sa)[t].disabled);
|
|
17761
17792
|
}
|
|
17762
17793
|
get designTokens() {
|
|
17763
|
-
return n(this,
|
|
17794
|
+
return n(this, Ri).designTokens;
|
|
17764
17795
|
}
|
|
17765
17796
|
get configDiff() {
|
|
17766
|
-
return n(this,
|
|
17797
|
+
return n(this, Ri).configDiff;
|
|
17767
17798
|
}
|
|
17768
17799
|
get mediaConstraints() {
|
|
17769
17800
|
var t, e, r, i, a, o, c, d, l, p, g, v, S, P, _, C, w, L, F, N, B, G, re, tt;
|
|
17770
17801
|
return {
|
|
17771
17802
|
audio: {
|
|
17772
|
-
enableStereo: (i = (r = (e = (t = n(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i :
|
|
17773
|
-
enableHighBitrate: (d = (c = (o = (a = n(this, Ct)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d :
|
|
17803
|
+
enableStereo: (i = (r = (e = (t = n(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : vn.audio.enableStereo,
|
|
17804
|
+
enableHighBitrate: (d = (c = (o = (a = n(this, Ct)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : vn.audio.enableHighBitrate
|
|
17774
17805
|
},
|
|
17775
17806
|
video: {
|
|
17776
|
-
quality: (v = (g = (p = (l = n(this, Ct)) == null ? void 0 : l.media) == null ? void 0 : p.video) == null ? void 0 : g.quality) != null ? v :
|
|
17777
|
-
frameRate: (C = (_ = (P = (S = n(this, Ct)) == null ? void 0 : S.media) == null ? void 0 : P.video) == null ? void 0 : _.frameRate) != null ? C :
|
|
17807
|
+
quality: (v = (g = (p = (l = n(this, Ct)) == null ? void 0 : l.media) == null ? void 0 : p.video) == null ? void 0 : g.quality) != null ? v : vn.video.quality,
|
|
17808
|
+
frameRate: (C = (_ = (P = (S = n(this, Ct)) == null ? void 0 : S.media) == null ? void 0 : P.video) == null ? void 0 : _.frameRate) != null ? C : vn.video.frameRate
|
|
17778
17809
|
},
|
|
17779
17810
|
screenshare: {
|
|
17780
|
-
quality: (N = (F = (L = (w = n(this, Ct)) == null ? void 0 : w.media) == null ? void 0 : L.screenshare) == null ? void 0 : F.quality) != null ? N :
|
|
17781
|
-
frameRate: (tt = (re = (G = (B = n(this, Ct)) == null ? void 0 : B.media) == null ? void 0 : G.screenshare) == null ? void 0 : re.frameRate) != null ? tt :
|
|
17811
|
+
quality: (N = (F = (L = (w = n(this, Ct)) == null ? void 0 : w.media) == null ? void 0 : L.screenshare) == null ? void 0 : F.quality) != null ? N : vn.screenshare.quality,
|
|
17812
|
+
frameRate: (tt = (re = (G = (B = n(this, Ct)) == null ? void 0 : B.media) == null ? void 0 : G.screenshare) == null ? void 0 : re.frameRate) != null ? tt : vn.screenshare.frameRate
|
|
17782
17813
|
}
|
|
17783
17814
|
};
|
|
17784
17815
|
}
|
|
@@ -17786,8 +17817,8 @@ const Rn = class {
|
|
|
17786
17817
|
return n(this, Jo);
|
|
17787
17818
|
}
|
|
17788
17819
|
};
|
|
17789
|
-
let Hu =
|
|
17790
|
-
Ct = new WeakMap(),
|
|
17820
|
+
let Hu = wn;
|
|
17821
|
+
Ct = new WeakMap(), Ri = new WeakMap(), Jo = new WeakMap(), sa = new WeakMap();
|
|
17791
17822
|
var vD = Object.defineProperty, SD = Object.getOwnPropertyDescriptor, Wf = (s, t, e, r) => {
|
|
17792
17823
|
for (var i = r > 1 ? void 0 : r ? SD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
17793
17824
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -18173,29 +18204,29 @@ Gc([
|
|
|
18173
18204
|
Gc([
|
|
18174
18205
|
Mt(Ba, "bulkRateLimitConfig")
|
|
18175
18206
|
], Ha.prototype, "bulkDelete", 1);
|
|
18176
|
-
var
|
|
18207
|
+
var bi, ki, zo, qu, Yo, $r, Hd, zf;
|
|
18177
18208
|
class CD {
|
|
18178
18209
|
constructor(t, e) {
|
|
18179
18210
|
m(this, zo);
|
|
18180
18211
|
m(this, Hd);
|
|
18181
18212
|
h(this, "stores", /* @__PURE__ */ new Map());
|
|
18182
|
-
m(this,
|
|
18183
|
-
m(this,
|
|
18213
|
+
m(this, bi, void 0);
|
|
18214
|
+
m(this, ki, "");
|
|
18184
18215
|
m(this, Yo, void 0);
|
|
18185
18216
|
m(this, $r, /* @__PURE__ */ new Map());
|
|
18186
|
-
f(this,
|
|
18217
|
+
f(this, bi, e), f(this, ki, t.getValue("meetingId")), f(this, Yo, t), U(this, Hd, zf).call(this);
|
|
18187
18218
|
}
|
|
18188
18219
|
create(t) {
|
|
18189
18220
|
const e = new Ha(
|
|
18190
|
-
{ name: t, socketHandler: n(this,
|
|
18221
|
+
{ name: t, socketHandler: n(this, bi), meetingId: n(this, ki) }
|
|
18191
18222
|
);
|
|
18192
|
-
return n(this,
|
|
18223
|
+
return n(this, bi).storeGetKeys(n(this, ki), t, []), new Promise((i, a) => {
|
|
18193
18224
|
const o = setTimeout(() => a(Error("Failed")), 3e3);
|
|
18194
18225
|
n(this, $r).set(t, { rejectTimeout: o, resolve: i, store: e });
|
|
18195
18226
|
});
|
|
18196
18227
|
}
|
|
18197
18228
|
}
|
|
18198
|
-
|
|
18229
|
+
bi = new WeakMap(), ki = new WeakMap(), zo = new WeakSet(), qu = function() {
|
|
18199
18230
|
return n(this, Yo).getValue("peerId");
|
|
18200
18231
|
}, Yo = new WeakMap(), $r = new WeakMap(), Hd = new WeakSet(), zf = function() {
|
|
18201
18232
|
[
|
|
@@ -18203,11 +18234,11 @@ ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
|
|
|
18203
18234
|
J.storeGetKeys,
|
|
18204
18235
|
J.storeDeleteKeys
|
|
18205
18236
|
].forEach((t) => {
|
|
18206
|
-
n(this,
|
|
18237
|
+
n(this, bi).on(
|
|
18207
18238
|
t,
|
|
18208
18239
|
(e) => u(this, null, function* () {
|
|
18209
18240
|
var a, o;
|
|
18210
|
-
if (e.pluginId !== n(this,
|
|
18241
|
+
if (e.pluginId !== n(this, ki))
|
|
18211
18242
|
return;
|
|
18212
18243
|
const r = (a = e.storeItems) == null ? void 0 : a.map((c) => {
|
|
18213
18244
|
var d;
|
|
@@ -18272,7 +18303,7 @@ var wD = Object.defineProperty, RD = Object.getOwnPropertyDescriptor, qa = (s, t
|
|
|
18272
18303
|
return r && i && wD(t, e, i), i;
|
|
18273
18304
|
};
|
|
18274
18305
|
const bD = 0.8, kD = 1.2;
|
|
18275
|
-
var aa, oa, Ut,
|
|
18306
|
+
var aa, oa, Ut, Ii, ho, Fr, yn, Ai, po, qd, Yf, er, Qo, Br, Mi, go, tr, jd, Xo, ju, Gd, Qf, Wd, Xf, Bg;
|
|
18276
18307
|
let Tr = (Bg = class extends jt {
|
|
18277
18308
|
/**
|
|
18278
18309
|
* @param {Context} context
|
|
@@ -18284,17 +18315,17 @@ let Tr = (Bg = class extends jt {
|
|
|
18284
18315
|
const a = t.getValue("logger");
|
|
18285
18316
|
super(a);
|
|
18286
18317
|
// eslint-disable-next-line class-methods-use-this
|
|
18287
|
-
m(this,
|
|
18318
|
+
m(this, Ii);
|
|
18288
18319
|
m(this, Fr);
|
|
18289
18320
|
/**
|
|
18290
18321
|
* Returns true if the local participant has joined the meeting.
|
|
18291
18322
|
*/
|
|
18292
|
-
m(this,
|
|
18323
|
+
m(this, Ai);
|
|
18293
18324
|
/**
|
|
18294
18325
|
* Returns true if the local participant has joined the meeting.
|
|
18295
18326
|
*/
|
|
18296
18327
|
m(this, qd);
|
|
18297
|
-
m(this,
|
|
18328
|
+
m(this, Mi);
|
|
18298
18329
|
m(this, Xo);
|
|
18299
18330
|
m(this, Gd);
|
|
18300
18331
|
m(this, Wd);
|
|
@@ -18471,7 +18502,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18471
18502
|
});
|
|
18472
18503
|
}
|
|
18473
18504
|
setupEvents() {
|
|
18474
|
-
this.on("videoUpdate", U(this, Xo, ju)), n(this, Fr,
|
|
18505
|
+
this.on("videoUpdate", U(this, Xo, ju)), n(this, Fr, yn) && (this.on("audioUpdate", U(this, Gd, Qf)), this.on("screenShareUpdate", U(this, Wd, Xf)));
|
|
18475
18506
|
}
|
|
18476
18507
|
/**
|
|
18477
18508
|
* Returns `participant.id` if user has permission
|
|
@@ -18479,11 +18510,11 @@ let Tr = (Bg = class extends jt {
|
|
|
18479
18510
|
*/
|
|
18480
18511
|
pin() {
|
|
18481
18512
|
return u(this, null, function* () {
|
|
18482
|
-
if (!n(this,
|
|
18513
|
+
if (!n(this, Ai, po))
|
|
18483
18514
|
throw new b("Can`t pin participant without joining room", "1205");
|
|
18484
18515
|
if (!n(this, er).permissions.pinParticipant)
|
|
18485
18516
|
throw new b("You do not have permission to pin participants.", "1201");
|
|
18486
|
-
return n(this,
|
|
18517
|
+
return n(this, Ii, ho).pinPeer(this.id);
|
|
18487
18518
|
});
|
|
18488
18519
|
}
|
|
18489
18520
|
/**
|
|
@@ -18492,11 +18523,11 @@ let Tr = (Bg = class extends jt {
|
|
|
18492
18523
|
*/
|
|
18493
18524
|
unpin() {
|
|
18494
18525
|
return u(this, null, function* () {
|
|
18495
|
-
if (!n(this,
|
|
18526
|
+
if (!n(this, Ai, po))
|
|
18496
18527
|
throw new b("Can`t unpin participant without joining room", "1205");
|
|
18497
18528
|
if (!n(this, er).permissions.pinParticipant)
|
|
18498
18529
|
throw new b("You do not have permission to unpin participants.", "1201");
|
|
18499
|
-
return n(this,
|
|
18530
|
+
return n(this, Ii, ho).pinPeer(null);
|
|
18500
18531
|
});
|
|
18501
18532
|
}
|
|
18502
18533
|
/**
|
|
@@ -18509,20 +18540,20 @@ let Tr = (Bg = class extends jt {
|
|
|
18509
18540
|
var i;
|
|
18510
18541
|
f(this, aa, t);
|
|
18511
18542
|
const r = t ? "pinned" : "unpinned";
|
|
18512
|
-
(i = n(this,
|
|
18543
|
+
(i = n(this, Mi, go)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
18513
18544
|
}
|
|
18514
18545
|
disableAudio() {
|
|
18515
18546
|
return u(this, null, function* () {
|
|
18516
18547
|
const t = this.id;
|
|
18517
18548
|
if (this.logger.info("Participant::disable_audio", {
|
|
18518
18549
|
participant: { id: t }
|
|
18519
|
-
}), !n(this,
|
|
18550
|
+
}), !n(this, Ai, po))
|
|
18520
18551
|
throw new b(
|
|
18521
18552
|
"Can`t disable participant audio without joining room",
|
|
18522
18553
|
"1205"
|
|
18523
18554
|
);
|
|
18524
18555
|
if (n(this, er).permissions.canDisableParticipantAudio)
|
|
18525
|
-
return n(this,
|
|
18556
|
+
return n(this, Ii, ho).disableAudio(t);
|
|
18526
18557
|
throw this.logger.error("Participant::unauthorized_disable_audio", {
|
|
18527
18558
|
participant: { id: t }
|
|
18528
18559
|
}), new b(
|
|
@@ -18557,13 +18588,13 @@ let Tr = (Bg = class extends jt {
|
|
|
18557
18588
|
const t = this.id;
|
|
18558
18589
|
if (this.logger.info("Participant::disable_video", {
|
|
18559
18590
|
participant: { id: t }
|
|
18560
|
-
}), !n(this,
|
|
18591
|
+
}), !n(this, Ai, po))
|
|
18561
18592
|
throw new b(
|
|
18562
18593
|
"Can`t disable participant video without joining room",
|
|
18563
18594
|
"1205"
|
|
18564
18595
|
);
|
|
18565
18596
|
if (n(this, er).permissions.canDisableParticipantVideo)
|
|
18566
|
-
return n(this,
|
|
18597
|
+
return n(this, Ii, ho).disableVideo(t);
|
|
18567
18598
|
throw this.logger.error("Participant::unauthorized_disable_video", {
|
|
18568
18599
|
participant: { id: t }
|
|
18569
18600
|
}), new b(
|
|
@@ -18597,7 +18628,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18597
18628
|
if (!t)
|
|
18598
18629
|
return;
|
|
18599
18630
|
let e;
|
|
18600
|
-
(i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Br).set(t, { observer: e }), this.updateVideo(t), (o = n(this,
|
|
18631
|
+
(i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Br).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Mi, go)) == null || o.addSource(
|
|
18601
18632
|
this.id,
|
|
18602
18633
|
t,
|
|
18603
18634
|
this.videoEnabled,
|
|
@@ -18613,10 +18644,10 @@ let Tr = (Bg = class extends jt {
|
|
|
18613
18644
|
deregisterVideoElement(t) {
|
|
18614
18645
|
var e, r, i, a;
|
|
18615
18646
|
if (!t) {
|
|
18616
|
-
(e = n(this,
|
|
18647
|
+
(e = n(this, Mi, go)) == null || e.removeSource(this.id);
|
|
18617
18648
|
return;
|
|
18618
18649
|
}
|
|
18619
|
-
t.srcObject = void 0, (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Br).delete(t), (a = n(this,
|
|
18650
|
+
t.srcObject = void 0, (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Br).delete(t), (a = n(this, Mi, go)) == null || a.removeSource(this.id);
|
|
18620
18651
|
}
|
|
18621
18652
|
/**
|
|
18622
18653
|
* Internal method, do not use
|
|
@@ -18636,24 +18667,24 @@ let Tr = (Bg = class extends jt {
|
|
|
18636
18667
|
t.srcObject = void 0;
|
|
18637
18668
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
18638
18669
|
}
|
|
18639
|
-
}, aa = new WeakMap(), oa = new WeakMap(), Ut = new WeakMap(),
|
|
18670
|
+
}, aa = new WeakMap(), oa = new WeakMap(), Ut = new WeakMap(), Ii = new WeakSet(), ho = function() {
|
|
18640
18671
|
return n(this, Ut).getValue("roomNodeClient");
|
|
18641
|
-
}, Fr = new WeakSet(),
|
|
18672
|
+
}, Fr = new WeakSet(), yn = function() {
|
|
18642
18673
|
return n(this, Ut).getValue("audioPlayback");
|
|
18643
|
-
},
|
|
18674
|
+
}, Ai = new WeakSet(), po = function() {
|
|
18644
18675
|
return n(this, Ut).getValue("connectionHandler").mediaJoined;
|
|
18645
18676
|
}, qd = new WeakSet(), Yf = function() {
|
|
18646
18677
|
return n(this, Ut).getValue("connectionHandler").socketJoined;
|
|
18647
|
-
}, er = new WeakMap(), Qo = new WeakMap(), Br = new WeakMap(),
|
|
18678
|
+
}, er = new WeakMap(), Qo = new WeakMap(), Br = new WeakMap(), Mi = new WeakSet(), go = function() {
|
|
18648
18679
|
return n(this, Ut).getValue("pip");
|
|
18649
18680
|
}, tr = new WeakMap(), jd = new WeakMap(), Xo = new WeakSet(), ju = function() {
|
|
18650
18681
|
Array.from(n(this, Br).keys()).forEach(this.updateVideo);
|
|
18651
18682
|
}, Gd = new WeakSet(), Qf = function() {
|
|
18652
18683
|
var t, e;
|
|
18653
|
-
this.audioEnabled && this.audioTrack ? (t = n(this, Fr,
|
|
18684
|
+
this.audioEnabled && this.audioTrack ? (t = n(this, Fr, yn)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, Fr, yn)) == null || e.removeParticipantTrack(this.id);
|
|
18654
18685
|
}, Wd = new WeakSet(), Xf = function() {
|
|
18655
18686
|
var t, e;
|
|
18656
|
-
this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Fr,
|
|
18687
|
+
this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Fr, yn)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, Fr, yn)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
|
|
18657
18688
|
}, Bg);
|
|
18658
18689
|
qa([
|
|
18659
18690
|
E.trace("Participant.disableAudio")
|
|
@@ -18821,7 +18852,7 @@ var DD = Object.defineProperty, OD = Object.getOwnPropertyDescriptor, Jt = (s, t
|
|
|
18821
18852
|
return r && i && DD(t, e, i), i;
|
|
18822
18853
|
};
|
|
18823
18854
|
const ND = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
18824
|
-
var Ee, Zo, Gu,
|
|
18855
|
+
var Ee, Zo, Gu, Di, mo, ca, gd, Oi, wt, Hg;
|
|
18825
18856
|
let Pt = (Hg = class extends jt {
|
|
18826
18857
|
/**
|
|
18827
18858
|
* This constructs a new Participant object and maintains
|
|
@@ -18843,7 +18874,7 @@ let Pt = (Hg = class extends jt {
|
|
|
18843
18874
|
/**
|
|
18844
18875
|
* Returns true if the local participant has joined the meeting.
|
|
18845
18876
|
*/
|
|
18846
|
-
m(this,
|
|
18877
|
+
m(this, Di);
|
|
18847
18878
|
/**
|
|
18848
18879
|
* Returns true if the local participant has joined the meeting.
|
|
18849
18880
|
*/
|
|
@@ -18879,7 +18910,7 @@ let Pt = (Hg = class extends jt {
|
|
|
18879
18910
|
*/
|
|
18880
18911
|
h(this, "all");
|
|
18881
18912
|
m(this, Ee, void 0);
|
|
18882
|
-
m(this,
|
|
18913
|
+
m(this, Oi, void 0);
|
|
18883
18914
|
m(this, wt, void 0);
|
|
18884
18915
|
h(this, "rateLimitConfig", {
|
|
18885
18916
|
maxInvocations: 5,
|
|
@@ -18910,7 +18941,7 @@ let Pt = (Hg = class extends jt {
|
|
|
18910
18941
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18911
18942
|
*/
|
|
18912
18943
|
h(this, "selectedPeers", Zf);
|
|
18913
|
-
f(this, Ee, t), f(this,
|
|
18944
|
+
f(this, Ee, t), f(this, Oi, e), f(this, wt, r), this.waitlisted = new uo(i), this.joined = new uo(i), this.videoSubscribed = new uo(i), this.audioSubscribed = new uo(i), this.active = this.videoSubscribed, this.pinned = new uo(i), this.all = new ID(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18914
18945
|
}
|
|
18915
18946
|
/**
|
|
18916
18947
|
* Return the controls for Picture-in-Picture
|
|
@@ -18989,7 +19020,7 @@ let Pt = (Hg = class extends jt {
|
|
|
18989
19020
|
*/
|
|
18990
19021
|
acceptWaitingRoomRequest(t) {
|
|
18991
19022
|
var r, i;
|
|
18992
|
-
if (!n(this,
|
|
19023
|
+
if (!n(this, Di, mo))
|
|
18993
19024
|
throw new b(
|
|
18994
19025
|
"Can`t accept waiting room request without joining room",
|
|
18995
19026
|
"1205"
|
|
@@ -19020,7 +19051,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19020
19051
|
rejectWaitingRoomRequest(t) {
|
|
19021
19052
|
return u(this, null, function* () {
|
|
19022
19053
|
var r, i;
|
|
19023
|
-
if (!n(this,
|
|
19054
|
+
if (!n(this, Di, mo))
|
|
19024
19055
|
throw new b(
|
|
19025
19056
|
"Can`t reject waiting room request without joining room",
|
|
19026
19057
|
"1205"
|
|
@@ -19152,7 +19183,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19152
19183
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
19153
19184
|
}), !n(this, ca, gd))
|
|
19154
19185
|
throw new b("Can`t disable all audio without joining room", "1205");
|
|
19155
|
-
if (n(this,
|
|
19186
|
+
if (n(this, Oi).permissions.canAllowParticipantAudio)
|
|
19156
19187
|
return n(this, Zo, Gu).muteAll(t);
|
|
19157
19188
|
throw this.logger.error("Participants::unauthorized_disable_all_audio", {
|
|
19158
19189
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
@@ -19166,7 +19197,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19166
19197
|
return u(this, null, function* () {
|
|
19167
19198
|
if (this.logger.info("Participants::disable_all_video"), !n(this, ca, gd))
|
|
19168
19199
|
throw new b("Can`t disable all video without joining room", "1205");
|
|
19169
|
-
if (n(this,
|
|
19200
|
+
if (n(this, Oi).permissions.canAllowParticipantVideo)
|
|
19170
19201
|
return n(this, Zo, Gu).muteAllVideo();
|
|
19171
19202
|
throw this.logger.error("Participants::unauthorized_disable_all_video"), new b(
|
|
19172
19203
|
"Unauthorized: User does not have permission to disable peer video.",
|
|
@@ -19193,9 +19224,9 @@ let Pt = (Hg = class extends jt {
|
|
|
19193
19224
|
}
|
|
19194
19225
|
kickAll() {
|
|
19195
19226
|
return u(this, null, function* () {
|
|
19196
|
-
if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this,
|
|
19227
|
+
if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this, Di, mo))
|
|
19197
19228
|
throw new b("Can`t kick all without joining room", "1205");
|
|
19198
|
-
if (!n(this,
|
|
19229
|
+
if (!n(this, Oi).permissions.kickParticipant)
|
|
19199
19230
|
throw this.logger.error("Participants::unauthorized_kick_all"), new b(
|
|
19200
19231
|
"Unauthorized: User does not have permission to kick peers.",
|
|
19201
19232
|
"1201"
|
|
@@ -19206,7 +19237,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19206
19237
|
}
|
|
19207
19238
|
broadcastMessage(t, e, r) {
|
|
19208
19239
|
return u(this, null, function* () {
|
|
19209
|
-
if (this.logger.info("Participants::broadcastMessage"), !n(this,
|
|
19240
|
+
if (this.logger.info("Participants::broadcastMessage"), !n(this, Di, mo))
|
|
19210
19241
|
throw new b("Can`t broadcast message without joining room", "1205");
|
|
19211
19242
|
if (!(t != null && t.trim()))
|
|
19212
19243
|
throw new b("`type` must be a non-empty string.", "1209");
|
|
@@ -19250,13 +19281,13 @@ let Pt = (Hg = class extends jt {
|
|
|
19250
19281
|
}
|
|
19251
19282
|
}, Ee = new WeakMap(), Zo = new WeakSet(), Gu = function() {
|
|
19252
19283
|
return n(this, Ee).getValue("roomNodeClient");
|
|
19253
|
-
},
|
|
19284
|
+
}, Di = new WeakSet(), mo = function() {
|
|
19254
19285
|
var t;
|
|
19255
19286
|
return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0;
|
|
19256
19287
|
}, ca = new WeakSet(), gd = function() {
|
|
19257
19288
|
var t;
|
|
19258
19289
|
return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
19259
|
-
},
|
|
19290
|
+
}, Oi = new WeakMap(), wt = new WeakMap(), Hg);
|
|
19260
19291
|
Jt([
|
|
19261
19292
|
E.trace("Participants.setViewMode")
|
|
19262
19293
|
], Pt.prototype, "setViewMode", 1);
|
|
@@ -19299,11 +19330,11 @@ Jt([
|
|
|
19299
19330
|
Pt = Jt([
|
|
19300
19331
|
ut("1200")
|
|
19301
19332
|
], Pt);
|
|
19302
|
-
var VD = Object.defineProperty, LD = Object.getOwnPropertyDescriptor,
|
|
19333
|
+
var VD = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, mn = (s, t, e, r) => {
|
|
19303
19334
|
for (var i = r > 1 ? void 0 : r ? LD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
19304
19335
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
19305
19336
|
return r && i && VD(t, e, i), i;
|
|
19306
|
-
}, ts,
|
|
19337
|
+
}, ts, vs, da, qg;
|
|
19307
19338
|
const ev = (qg = class {
|
|
19308
19339
|
constructor(s, t, e) {
|
|
19309
19340
|
h(this, "participants");
|
|
@@ -19316,7 +19347,7 @@ const ev = (qg = class {
|
|
|
19316
19347
|
h(this, "context");
|
|
19317
19348
|
h(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
19318
19349
|
m(this, ts, { mode: "ACTIVE_GRID", page: 0 });
|
|
19319
|
-
m(this,
|
|
19350
|
+
m(this, vs, !1);
|
|
19320
19351
|
m(this, da, !1);
|
|
19321
19352
|
h(this, "updateConsumerSpatialLayers", Ih(() => {
|
|
19322
19353
|
const s = {}, t = new Map(this.maxSpatialLayerUpdates);
|
|
@@ -19331,7 +19362,7 @@ const ev = (qg = class {
|
|
|
19331
19362
|
});
|
|
19332
19363
|
}, 2e3));
|
|
19333
19364
|
h(this, "updateConsumers", (s, t) => u(this, null, function* () {
|
|
19334
|
-
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${n(this,
|
|
19365
|
+
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${n(this, vs)}`);
|
|
19335
19366
|
try {
|
|
19336
19367
|
s.length !== 0 && (this.logger.info(`updateConsumers: Creating consumers for ${s.length} producers: [${s.map((e) => e.producerId).join(", ")}]`), yield this.roomNodeClient.createConsumers(s), this.logger.info("updateConsumers: Successfully created consumers."));
|
|
19337
19368
|
} catch (e) {
|
|
@@ -19344,7 +19375,7 @@ const ev = (qg = class {
|
|
|
19344
19375
|
}
|
|
19345
19376
|
this.logger.info("updateConsumers: Completed consumer updates.");
|
|
19346
19377
|
}));
|
|
19347
|
-
this.context = s, this.roomSocketHandler = e, this.participants = new Pt(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events =
|
|
19378
|
+
this.context = s, this.roomSocketHandler = e, this.participants = new Pt(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = ws, t.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
|
|
19348
19379
|
}
|
|
19349
19380
|
get roomNodeClient() {
|
|
19350
19381
|
return this.context.getValue("roomNodeClient");
|
|
@@ -19454,7 +19485,7 @@ const ev = (qg = class {
|
|
|
19454
19485
|
appData: { screenShare: t == null ? void 0 : t.screenShare }
|
|
19455
19486
|
}
|
|
19456
19487
|
}
|
|
19457
|
-
), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${n(this,
|
|
19488
|
+
), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${n(this, vs)}, VideoSub: ${t.kind === "video" ? this.participants.videoSubscribed.has(s) : "N/A"}, AudioSub: ${t.kind === "audio" ? this.participants.audioSubscribed.has(s) : "N/A"}`), this.scheduleSyncConsumers({
|
|
19458
19489
|
source: "NEW_PRODUCER_AUTO"
|
|
19459
19490
|
})) : this.logger.info(
|
|
19460
19491
|
"ParticipantController::NEW_PRODUCER::not_consuming_producer_auto",
|
|
@@ -19515,7 +19546,7 @@ const ev = (qg = class {
|
|
|
19515
19546
|
const e = t;
|
|
19516
19547
|
this.onParticipantPinned(e);
|
|
19517
19548
|
const r = this.participants.joined.get(e);
|
|
19518
|
-
r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${n(this,
|
|
19549
|
+
r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${n(this, vs)}, ProducerIds: [${r.producers.map((i) => i.producerId).join(", ")}]`), this.scheduleSyncConsumers({
|
|
19519
19550
|
source: "GLOBAL_PEER_PIN"
|
|
19520
19551
|
}));
|
|
19521
19552
|
}
|
|
@@ -19643,8 +19674,8 @@ const ev = (qg = class {
|
|
|
19643
19674
|
source: s
|
|
19644
19675
|
}) {
|
|
19645
19676
|
var r, i, a;
|
|
19646
|
-
const e = ((r = n(this, ts)) == null ? void 0 : r.mode) === "PAGINATED" && !n(this,
|
|
19647
|
-
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this, ts)) == null ? void 0 : i.mode}, ConsumersSyncing: ${n(this,
|
|
19677
|
+
const e = ((r = n(this, ts)) == null ? void 0 : r.mode) === "PAGINATED" && !n(this, vs) ? 200 : 0;
|
|
19678
|
+
this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this, ts)) == null ? void 0 : i.mode}, ConsumersSyncing: ${n(this, vs)}, Delay: ${e}, Page: ${(a = n(this, ts)) == null ? void 0 : a.page}`), setTimeout(() => this.syncConsumers(), e);
|
|
19648
19679
|
});
|
|
19649
19680
|
}
|
|
19650
19681
|
/**
|
|
@@ -19674,11 +19705,11 @@ const ev = (qg = class {
|
|
|
19674
19705
|
this.logger.info("syncConsumers: Connection not ready, exiting.");
|
|
19675
19706
|
return;
|
|
19676
19707
|
}
|
|
19677
|
-
if (n(this,
|
|
19708
|
+
if (n(this, vs)) {
|
|
19678
19709
|
f(this, da, !0), this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting.");
|
|
19679
19710
|
return;
|
|
19680
19711
|
}
|
|
19681
|
-
this.logger.info("syncConsumers: Starting sync operation."), f(this,
|
|
19712
|
+
this.logger.info("syncConsumers: Starting sync operation."), f(this, vs, !0), f(this, da, !1);
|
|
19682
19713
|
let s = [];
|
|
19683
19714
|
this.participants.videoSubscribed.forEach((g) => {
|
|
19684
19715
|
var P, _;
|
|
@@ -19724,7 +19755,7 @@ const ev = (qg = class {
|
|
|
19724
19755
|
} catch (g) {
|
|
19725
19756
|
this.logger.error("syncConsumers: updateConsumers failed with error.", { error: g });
|
|
19726
19757
|
} finally {
|
|
19727
|
-
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this,
|
|
19758
|
+
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, vs, !1);
|
|
19728
19759
|
}
|
|
19729
19760
|
n(this, da) && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
|
|
19730
19761
|
});
|
|
@@ -20299,34 +20330,34 @@ const ev = (qg = class {
|
|
|
20299
20330
|
// priority
|
|
20300
20331
|
})), t && this.context.getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
20301
20332
|
}
|
|
20302
|
-
}, ts = new WeakMap(),
|
|
20333
|
+
}, ts = new WeakMap(), vs = new WeakMap(), da = new WeakMap(), qg);
|
|
20303
20334
|
let _r = ev;
|
|
20304
|
-
|
|
20335
|
+
mn([
|
|
20305
20336
|
E.trace("ParticipantController.setupEvents")
|
|
20306
20337
|
], _r.prototype, "setupEvents", 1);
|
|
20307
|
-
|
|
20338
|
+
mn([
|
|
20308
20339
|
E.trace("ParticipantController.setupEvents")
|
|
20309
20340
|
], _r.prototype, "setupEventsGlobal", 1);
|
|
20310
|
-
|
|
20341
|
+
mn([
|
|
20311
20342
|
E.trace("ParticipantController.processMedia")
|
|
20312
20343
|
], _r.prototype, "processMedia", 1);
|
|
20313
|
-
|
|
20344
|
+
mn([
|
|
20314
20345
|
E.trace("ParticipantController.processConsumerClosed")
|
|
20315
20346
|
], _r.prototype, "processConsumerClosed", 1);
|
|
20316
|
-
|
|
20347
|
+
mn([
|
|
20317
20348
|
E.trace("ParticipantController.processConsumerResumed")
|
|
20318
20349
|
], _r.prototype, "processConsumerResumed", 1);
|
|
20319
|
-
|
|
20350
|
+
mn([
|
|
20320
20351
|
E.trace("ParticipantController.processConsumerPaused")
|
|
20321
20352
|
], _r.prototype, "processConsumerPaused", 1);
|
|
20322
|
-
|
|
20353
|
+
mn([
|
|
20323
20354
|
E.trace("ParticipantController.processNewConsumer")
|
|
20324
20355
|
], _r.prototype, "processNewConsumer", 1);
|
|
20325
20356
|
const ue = Rs(
|
|
20326
20357
|
Rh().permissions
|
|
20327
20358
|
);
|
|
20328
20359
|
var q, la, ua, Jd, ft, Nt;
|
|
20329
|
-
const
|
|
20360
|
+
const Rn = class extends jt {
|
|
20330
20361
|
constructor(e, r, i, a = !1) {
|
|
20331
20362
|
const o = e.getValue("logger");
|
|
20332
20363
|
super(o);
|
|
@@ -20387,15 +20418,15 @@ const bn = class extends jt {
|
|
|
20387
20418
|
}
|
|
20388
20419
|
/** @deprecated. Use init() */
|
|
20389
20420
|
static fromResponse(e, r, i) {
|
|
20390
|
-
return new
|
|
20421
|
+
return new Rn(i, e, r, !0);
|
|
20391
20422
|
}
|
|
20392
20423
|
/** @deprecated. Use init() */
|
|
20393
20424
|
static default(e, r) {
|
|
20394
|
-
return new
|
|
20425
|
+
return new Rn(e, ue, r);
|
|
20395
20426
|
}
|
|
20396
20427
|
static init(e, r, i) {
|
|
20397
20428
|
let a;
|
|
20398
|
-
return i ? a = new
|
|
20429
|
+
return i ? a = new Rn(e, i, r, !0) : a = new Rn(e, ue, r), a;
|
|
20399
20430
|
}
|
|
20400
20431
|
// eslint-disable-next-line class-methods-use-this
|
|
20401
20432
|
get mediaRoomType() {
|
|
@@ -20728,7 +20759,7 @@ const bn = class extends jt {
|
|
|
20728
20759
|
return n(this, q).transcriptionEnabled;
|
|
20729
20760
|
}
|
|
20730
20761
|
};
|
|
20731
|
-
let Wu =
|
|
20762
|
+
let Wu = Rn;
|
|
20732
20763
|
q = new WeakMap(), la = new WeakMap(), ua = new WeakMap(), Jd = new WeakMap(), ft = new WeakSet(), Nt = function() {
|
|
20733
20764
|
return n(this, ua).getValue("stageStatus");
|
|
20734
20765
|
};
|
|
@@ -21145,7 +21176,7 @@ var xD = Object.defineProperty, UD = Object.getOwnPropertyDescriptor, _t = (s, t
|
|
|
21145
21176
|
for (var i = r > 1 ? void 0 : r ? UD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
21146
21177
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
21147
21178
|
return r && i && xD(t, e, i), i;
|
|
21148
|
-
}, ha, vt, pa, Fe, sr, ai, qe, Qe, ga, md,
|
|
21179
|
+
}, ha, vt, pa, Fe, sr, ai, qe, Qe, ga, md, Le, Be, ma, fa, ec, Ju, jg;
|
|
21149
21180
|
let Ye = (jg = class extends tv {
|
|
21150
21181
|
constructor(t, e, r, i, a) {
|
|
21151
21182
|
var c;
|
|
@@ -21158,7 +21189,7 @@ let Ye = (jg = class extends tv {
|
|
|
21158
21189
|
/**
|
|
21159
21190
|
* Returns true if the local participant has joined the meeting.
|
|
21160
21191
|
*/
|
|
21161
|
-
m(this,
|
|
21192
|
+
m(this, Le);
|
|
21162
21193
|
m(this, ec);
|
|
21163
21194
|
h(this, "name");
|
|
21164
21195
|
h(this, "picture");
|
|
@@ -21241,7 +21272,7 @@ let Ye = (jg = class extends tv {
|
|
|
21241
21272
|
t && t.onError((e) => {
|
|
21242
21273
|
this.emit("autoplayError", e);
|
|
21243
21274
|
}), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
21244
|
-
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ui(this))), n(this,
|
|
21275
|
+
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ui(this))), n(this, Le, Be) && this.audioEnabled)
|
|
21245
21276
|
try {
|
|
21246
21277
|
yield n(this, qe, Qe).shareMic(this.audioTrack);
|
|
21247
21278
|
} catch (e) {
|
|
@@ -21254,9 +21285,9 @@ let Ye = (jg = class extends tv {
|
|
|
21254
21285
|
audioTrack: this.audioTrack
|
|
21255
21286
|
});
|
|
21256
21287
|
})), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
21257
|
-
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ui(this))), n(this,
|
|
21288
|
+
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ui(this))), n(this, Le, Be) && this.rawVideoTrack === void 0)
|
|
21258
21289
|
this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
21259
|
-
else if (this.videoEnabled && n(this,
|
|
21290
|
+
else if (this.videoEnabled && n(this, Le, Be))
|
|
21260
21291
|
try {
|
|
21261
21292
|
const e = yield n(this, qe, Qe).shareWebcam(this.videoTrack);
|
|
21262
21293
|
e && e.id !== this.videoTrack.id && n(this, Fe).getValue("flagsmith").hasFeature(ee.EXP_RESHARE) && (yield n(this, qe, Qe).shareWebcam(this.videoTrack));
|
|
@@ -21280,7 +21311,7 @@ let Ye = (jg = class extends tv {
|
|
|
21280
21311
|
), this.localMediaHandler.on("DEVICE_LIST_UPDATED", (e) => {
|
|
21281
21312
|
this.emit("deviceListUpdate", e);
|
|
21282
21313
|
}), this.localMediaHandler.on("SCREENSHARE_TRACK_CHANGE", () => u(this, null, function* () {
|
|
21283
|
-
if (!n(this,
|
|
21314
|
+
if (!n(this, Le, Be)) {
|
|
21284
21315
|
this.logger.error(
|
|
21285
21316
|
"Self.SCREENSHARE_TRACK_CHANGE.LocalMediaInitialized_WithoutRoomNode"
|
|
21286
21317
|
);
|
|
@@ -21310,7 +21341,7 @@ let Ye = (jg = class extends tv {
|
|
|
21310
21341
|
this.disableAudio();
|
|
21311
21342
|
}), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => u(this, null, function* () {
|
|
21312
21343
|
var e;
|
|
21313
|
-
n(this,
|
|
21344
|
+
n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
21314
21345
|
videoEnabled: this.videoEnabled,
|
|
21315
21346
|
videoTrack: this.videoTrack
|
|
21316
21347
|
}), (e = n(this, Fe)) == null || e.getValue("callstats").videoOff();
|
|
@@ -21336,7 +21367,7 @@ let Ye = (jg = class extends tv {
|
|
|
21336
21367
|
*/
|
|
21337
21368
|
get roomJoined() {
|
|
21338
21369
|
var t;
|
|
21339
|
-
return n(this, ha).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0 : n(this,
|
|
21370
|
+
return n(this, ha).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0 : n(this, Le, Be);
|
|
21340
21371
|
}
|
|
21341
21372
|
/**
|
|
21342
21373
|
* The name of the user can be set by calling this method.
|
|
@@ -21368,7 +21399,7 @@ let Ye = (jg = class extends tv {
|
|
|
21368
21399
|
return u(this, null, function* () {
|
|
21369
21400
|
var e;
|
|
21370
21401
|
if (this.permissions.canProduceAudio !== j.NotAllowed && !(n(this, vt).canProduceAudio === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
|
|
21371
|
-
if ((e = n(this, Fe)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this,
|
|
21402
|
+
if ((e = n(this, Fe)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this, Le, Be) && this.stageStatus === "ON_STAGE") {
|
|
21372
21403
|
if (this.audioTrack)
|
|
21373
21404
|
try {
|
|
21374
21405
|
yield n(this, qe, Qe).shareMic(this.audioTrack);
|
|
@@ -21391,7 +21422,7 @@ let Ye = (jg = class extends tv {
|
|
|
21391
21422
|
return u(this, null, function* () {
|
|
21392
21423
|
var e;
|
|
21393
21424
|
if (n(this, vt).canProduceVideo !== j.NotAllowed && !(n(this, vt).canProduceVideo === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
|
|
21394
|
-
if ((e = n(this, Fe)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this,
|
|
21425
|
+
if ((e = n(this, Fe)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this, Le, Be) && this.stageStatus === "ON_STAGE")
|
|
21395
21426
|
try {
|
|
21396
21427
|
yield n(this, qe, Qe).shareWebcam(this.videoTrack);
|
|
21397
21428
|
} catch (r) {
|
|
@@ -21415,7 +21446,7 @@ let Ye = (jg = class extends tv {
|
|
|
21415
21446
|
}
|
|
21416
21447
|
enableScreenShare() {
|
|
21417
21448
|
return u(this, null, function* () {
|
|
21418
|
-
if (!n(this,
|
|
21449
|
+
if (!n(this, Le, Be))
|
|
21419
21450
|
throw new b("Can`t enable screenshare without joining room", "1105");
|
|
21420
21451
|
if (n(this, vt).canProduceScreenshare !== j.NotAllowed && !(n(this, vt).canProduceScreenshare === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
|
|
21421
21452
|
try {
|
|
@@ -21445,7 +21476,7 @@ let Ye = (jg = class extends tv {
|
|
|
21445
21476
|
disableAudio() {
|
|
21446
21477
|
return u(this, null, function* () {
|
|
21447
21478
|
var t;
|
|
21448
|
-
this.audioEnabled && (this.localMediaHandler.disableAudio(), n(this,
|
|
21479
|
+
this.audioEnabled && (this.localMediaHandler.disableAudio(), n(this, Le, Be) && n(this, qe, Qe).muteSelf(), this.emit("audioUpdate", {
|
|
21449
21480
|
audioEnabled: this.audioEnabled,
|
|
21450
21481
|
audioTrack: this.audioTrack
|
|
21451
21482
|
}), (t = n(this, Fe)) == null || t.getValue("callstats").audioOff());
|
|
@@ -21454,7 +21485,7 @@ let Ye = (jg = class extends tv {
|
|
|
21454
21485
|
disableVideo() {
|
|
21455
21486
|
return u(this, null, function* () {
|
|
21456
21487
|
var t;
|
|
21457
|
-
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), n(this,
|
|
21488
|
+
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
21458
21489
|
videoEnabled: this.videoEnabled,
|
|
21459
21490
|
videoTrack: this.videoTrack
|
|
21460
21491
|
}), (t = n(this, Fe)) == null || t.getValue("callstats").videoOff());
|
|
@@ -21462,7 +21493,7 @@ let Ye = (jg = class extends tv {
|
|
|
21462
21493
|
}
|
|
21463
21494
|
disableScreenShare() {
|
|
21464
21495
|
return u(this, null, function* () {
|
|
21465
|
-
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), n(this,
|
|
21496
|
+
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), n(this, Le, Be) && (yield n(this, qe, Qe).disableScreenShare()), this.emit("screenShareUpdate", {
|
|
21466
21497
|
screenShareEnabled: this.screenShareEnabled,
|
|
21467
21498
|
screenShareTracks: this.screenShareTracks
|
|
21468
21499
|
}));
|
|
@@ -21496,7 +21527,7 @@ let Ye = (jg = class extends tv {
|
|
|
21496
21527
|
*/
|
|
21497
21528
|
pin() {
|
|
21498
21529
|
return u(this, null, function* () {
|
|
21499
|
-
if (!n(this,
|
|
21530
|
+
if (!n(this, Le, Be))
|
|
21500
21531
|
throw new b("Can`t pin participants without joining room", "1105");
|
|
21501
21532
|
return this.show(), n(this, qe, Qe).pinPeer(this.id);
|
|
21502
21533
|
});
|
|
@@ -21507,7 +21538,7 @@ let Ye = (jg = class extends tv {
|
|
|
21507
21538
|
*/
|
|
21508
21539
|
unpin() {
|
|
21509
21540
|
return u(this, null, function* () {
|
|
21510
|
-
if (!n(this,
|
|
21541
|
+
if (!n(this, Le, Be))
|
|
21511
21542
|
throw new b("Can`t unpin participants without joining room", "1105");
|
|
21512
21543
|
return n(this, qe, Qe).pinPeer(null);
|
|
21513
21544
|
});
|
|
@@ -21517,7 +21548,7 @@ let Ye = (jg = class extends tv {
|
|
|
21517
21548
|
*/
|
|
21518
21549
|
hide() {
|
|
21519
21550
|
return u(this, null, function* () {
|
|
21520
|
-
if (!n(this,
|
|
21551
|
+
if (!n(this, Le, Be))
|
|
21521
21552
|
throw new b("Can`t toggle participant tile without joining room", "1105");
|
|
21522
21553
|
this.hidden = !0, this.emit("toggleTile", { hidden: this.hidden });
|
|
21523
21554
|
});
|
|
@@ -21526,7 +21557,7 @@ let Ye = (jg = class extends tv {
|
|
|
21526
21557
|
* Show's user's tile in the UI if hidden (locally)
|
|
21527
21558
|
*/
|
|
21528
21559
|
show() {
|
|
21529
|
-
if (!n(this,
|
|
21560
|
+
if (!n(this, Le, Be))
|
|
21530
21561
|
throw new b("Can`t toggle participant tile without joining room", "1105");
|
|
21531
21562
|
this.hidden = !1, this.emit("toggleTile", { hidden: this.hidden });
|
|
21532
21563
|
}
|
|
@@ -21543,7 +21574,7 @@ let Ye = (jg = class extends tv {
|
|
|
21543
21574
|
try {
|
|
21544
21575
|
yield this.localMediaHandler.setAudioDevice(t, { saveDevicePreference: !0 });
|
|
21545
21576
|
} catch (o) {
|
|
21546
|
-
n(this,
|
|
21577
|
+
n(this, Le, Be) && (yield n(this, qe, Qe).muteSelf()), this.emit("audioUpdate", {
|
|
21547
21578
|
audioEnabled: this.audioEnabled,
|
|
21548
21579
|
audioTrack: this.audioTrack
|
|
21549
21580
|
});
|
|
@@ -21556,7 +21587,7 @@ let Ye = (jg = class extends tv {
|
|
|
21556
21587
|
try {
|
|
21557
21588
|
yield this.localMediaHandler.setVideoDevice(t, { saveDevicePreference: !0 });
|
|
21558
21589
|
} catch (o) {
|
|
21559
|
-
n(this,
|
|
21590
|
+
n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
21560
21591
|
videoEnabled: this.videoEnabled,
|
|
21561
21592
|
videoTrack: this.videoTrack
|
|
21562
21593
|
});
|
|
@@ -21615,7 +21646,7 @@ let Ye = (jg = class extends tv {
|
|
|
21615
21646
|
return n(this, Fe).getValue("roomNodeClient");
|
|
21616
21647
|
}, ga = new WeakSet(), md = function() {
|
|
21617
21648
|
return n(this, Fe).getValue("audioPlayback");
|
|
21618
|
-
},
|
|
21649
|
+
}, Le = new WeakSet(), Be = function() {
|
|
21619
21650
|
var t;
|
|
21620
21651
|
return ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
21621
21652
|
}, ma = new WeakMap(), fa = new WeakMap(), ec = new WeakSet(), Ju = function() {
|
|
@@ -21897,7 +21928,7 @@ class qD {
|
|
|
21897
21928
|
constructor(t) {
|
|
21898
21929
|
m(this, Je, void 0);
|
|
21899
21930
|
h(this, "events");
|
|
21900
|
-
f(this, Je, t), this.events =
|
|
21931
|
+
f(this, Je, t), this.events = ws;
|
|
21901
21932
|
}
|
|
21902
21933
|
joinRoom(t, e, r, i = !1, a = null) {
|
|
21903
21934
|
return u(this, null, function* () {
|
|
@@ -22079,7 +22110,7 @@ class qD {
|
|
|
22079
22110
|
}
|
|
22080
22111
|
}
|
|
22081
22112
|
Je = new WeakMap();
|
|
22082
|
-
var
|
|
22113
|
+
var Mn = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(Mn || {}), sc;
|
|
22083
22114
|
class Wl extends lt.EventEmitter {
|
|
22084
22115
|
constructor(e) {
|
|
22085
22116
|
super();
|
|
@@ -22513,8 +22544,8 @@ class Ad extends Hh {
|
|
|
22513
22544
|
}
|
|
22514
22545
|
const l = (v, S) => {
|
|
22515
22546
|
var N;
|
|
22516
|
-
const P =
|
|
22517
|
-
return P.media[P.media.length - 1].rtp = C, P.media[P.media.length - 1].fmtp = w, P.media[P.media.length - 1].rtcpFb = L, P.media[P.media.length - 1].payloads = F.join(" "),
|
|
22547
|
+
const P = ps.parse(v), _ = P.media[P.media.length - 1], C = _.rtp.filter((B) => S.some((G) => G.name === B.codec)), w = _.fmtp.filter((B) => C.some((G) => G.payload === B.payload)), L = (N = _.rtcpFb) == null ? void 0 : N.filter((B) => C.some((G) => G.payload === B.payload)), F = C.map((B) => B.payload);
|
|
22548
|
+
return P.media[P.media.length - 1].rtp = C, P.media[P.media.length - 1].fmtp = w, P.media[P.media.length - 1].rtcpFb = L, P.media[P.media.length - 1].payloads = F.join(" "), ps.write(P);
|
|
22518
22549
|
}, p = yield this.pc.createOffer();
|
|
22519
22550
|
if (p.sdp = l(p.sdp, i), this.logger.debug(`send() | calling pc.setLocalDescription() [offer:${JSON.stringify(p)}]`), yield this.pc.setLocalDescription(p), e === "audio" || e.kind === "audio") {
|
|
22520
22551
|
const { enableDtx: v, enableStereo: S } = this, P = this.enableHighBitrate ? S ? 128e3 : 64e3 : S ? 64e3 : 32e3;
|
|
@@ -22638,7 +22669,7 @@ class jh extends Hh {
|
|
|
22638
22669
|
function jD(s, t) {
|
|
22639
22670
|
return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
|
|
22640
22671
|
}
|
|
22641
|
-
var rc,
|
|
22672
|
+
var rc, Ni, Vs, Kd, Ls, br, ic, zu, zd, rv, Yd, iv;
|
|
22642
22673
|
class GD extends Wl {
|
|
22643
22674
|
constructor(e, r) {
|
|
22644
22675
|
var i;
|
|
@@ -22688,10 +22719,10 @@ class GD extends Wl {
|
|
|
22688
22719
|
* RTCRtpReceiver associated with the consumer
|
|
22689
22720
|
*/
|
|
22690
22721
|
m(this, rc, void 0);
|
|
22691
|
-
m(this,
|
|
22722
|
+
m(this, Ni, void 0);
|
|
22692
22723
|
m(this, Vs, void 0);
|
|
22693
22724
|
m(this, Kd, void 0);
|
|
22694
|
-
this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Vs, !1), this.producerId = r.producerId, this.track = r.track, f(this,
|
|
22725
|
+
this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Vs, !1), this.producerId = r.producerId, this.track = r.track, f(this, Ni, (i = r.paused) != null ? i : !1), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, U(this, zd, rv).call(this), f(this, Kd, e);
|
|
22695
22726
|
}
|
|
22696
22727
|
/**
|
|
22697
22728
|
* Indicates whether this consumer is closed
|
|
@@ -22709,7 +22740,7 @@ class GD extends Wl {
|
|
|
22709
22740
|
* Indicates whether the consumer is paused
|
|
22710
22741
|
*/
|
|
22711
22742
|
get paused() {
|
|
22712
|
-
return n(this,
|
|
22743
|
+
return n(this, Ni);
|
|
22713
22744
|
}
|
|
22714
22745
|
/**
|
|
22715
22746
|
* Closes the Consumer.
|
|
@@ -22735,7 +22766,7 @@ class GD extends Wl {
|
|
|
22735
22766
|
this.logger.error("consumer::pause() | Consumer closed", n(this, Ls, br));
|
|
22736
22767
|
return;
|
|
22737
22768
|
}
|
|
22738
|
-
f(this,
|
|
22769
|
+
f(this, Ni, !0), this.track.enabled = !1, this.safeEmit("pause");
|
|
22739
22770
|
}
|
|
22740
22771
|
/**
|
|
22741
22772
|
* Resumes receiving media.
|
|
@@ -22745,10 +22776,10 @@ class GD extends Wl {
|
|
|
22745
22776
|
this.logger.error("Consumer::resume() | Consumer closed", n(this, Ls, br));
|
|
22746
22777
|
return;
|
|
22747
22778
|
}
|
|
22748
|
-
f(this,
|
|
22779
|
+
f(this, Ni, !1), this.track.enabled = !0, this.safeEmit("resume");
|
|
22749
22780
|
}
|
|
22750
22781
|
}
|
|
22751
|
-
rc = new WeakMap(),
|
|
22782
|
+
rc = new WeakMap(), Ni = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(), Ls = new WeakSet(), br = function() {
|
|
22752
22783
|
return {
|
|
22753
22784
|
consumer: {
|
|
22754
22785
|
id: this.id,
|
|
@@ -22770,7 +22801,7 @@ rc = new WeakMap(), Vi = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(),
|
|
|
22770
22801
|
}));
|
|
22771
22802
|
}
|
|
22772
22803
|
};
|
|
22773
|
-
var
|
|
22804
|
+
var Ss, va, Sa, Vi, ss, Xe, qr, Ta, Qd, Ft, hs;
|
|
22774
22805
|
class WD extends Wl {
|
|
22775
22806
|
/**
|
|
22776
22807
|
* @emits transportclose
|
|
@@ -22795,7 +22826,7 @@ class WD extends Wl {
|
|
|
22795
22826
|
/**
|
|
22796
22827
|
* Associated RTCRtpSender.
|
|
22797
22828
|
*/
|
|
22798
|
-
m(this,
|
|
22829
|
+
m(this, Ss, void 0);
|
|
22799
22830
|
/**
|
|
22800
22831
|
* Kind of media on to this producer
|
|
22801
22832
|
*/
|
|
@@ -22819,13 +22850,13 @@ class WD extends Wl {
|
|
|
22819
22850
|
/**
|
|
22820
22851
|
* Specify if we should replace the RTCRtpSender.track with null when paused.
|
|
22821
22852
|
*/
|
|
22822
|
-
m(this,
|
|
22853
|
+
m(this, Vi, void 0);
|
|
22823
22854
|
m(this, ss, !1);
|
|
22824
22855
|
m(this, Xe, void 0);
|
|
22825
22856
|
m(this, qr, void 0);
|
|
22826
22857
|
m(this, Ta, void 0);
|
|
22827
22858
|
m(this, Qd, void 0);
|
|
22828
|
-
this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, qr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this,
|
|
22859
|
+
this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, qr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this, Vi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, Ss, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Qd, e);
|
|
22829
22860
|
}
|
|
22830
22861
|
/**
|
|
22831
22862
|
* Whether the Producer is closed.
|
|
@@ -22860,11 +22891,11 @@ class WD extends Wl {
|
|
|
22860
22891
|
return u(this, null, function* () {
|
|
22861
22892
|
if (n(this, ss))
|
|
22862
22893
|
return;
|
|
22863
|
-
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this, Ft,
|
|
22894
|
+
if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this, Ft, hs)), f(this, ss, !0), this._destroyTrack(), e === Md) {
|
|
22864
22895
|
this.safeEmit("close", { reason: e });
|
|
22865
22896
|
return;
|
|
22866
22897
|
}
|
|
22867
|
-
const { offerSdp: r, callback: i } = yield n(this,
|
|
22898
|
+
const { offerSdp: r, callback: i } = yield n(this, Ss).stopSending(this.localId), { answer: a } = yield this.safeEmitAsPromise("close", { offer: r, reason: e });
|
|
22868
22899
|
i(a);
|
|
22869
22900
|
});
|
|
22870
22901
|
}
|
|
@@ -22875,24 +22906,24 @@ class WD extends Wl {
|
|
|
22875
22906
|
return u(this, null, function* () {
|
|
22876
22907
|
if (n(this, ss))
|
|
22877
22908
|
throw new It("closed");
|
|
22878
|
-
return n(this,
|
|
22909
|
+
return n(this, Ss).getSenderStats(this.localId);
|
|
22879
22910
|
});
|
|
22880
22911
|
}
|
|
22881
22912
|
/**
|
|
22882
22913
|
* Pauses sending media.
|
|
22883
22914
|
*/
|
|
22884
22915
|
pause() {
|
|
22885
|
-
this.logger.debug("Producer::pause()", n(this, Ft,
|
|
22916
|
+
this.logger.debug("Producer::pause()", n(this, Ft, hs)), n(this, ss) && this.logger.error("Producer::pause() | Producer closed", n(this, Ft, hs)), f(this, qr, !0), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !1), n(this, Vi) && n(this, Ss).replaceTrack(this.localId, null), this.emit("pause");
|
|
22886
22917
|
}
|
|
22887
22918
|
/**
|
|
22888
22919
|
* Resumes sending media.
|
|
22889
22920
|
*/
|
|
22890
22921
|
resume() {
|
|
22891
|
-
if (this.logger.debug("Producer::resume()", n(this, Ft,
|
|
22892
|
-
this.logger.error("Producer::resume() | Producer closed", n(this, Ft,
|
|
22922
|
+
if (this.logger.debug("Producer::resume()", n(this, Ft, hs)), n(this, ss)) {
|
|
22923
|
+
this.logger.error("Producer::resume() | Producer closed", n(this, Ft, hs));
|
|
22893
22924
|
return;
|
|
22894
22925
|
}
|
|
22895
|
-
f(this, qr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this,
|
|
22926
|
+
f(this, qr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this, Vi) && n(this, Ss).replaceTrack(this.localId, n(this, Xe)), this.emit("resume");
|
|
22896
22927
|
}
|
|
22897
22928
|
/**
|
|
22898
22929
|
* Replaces the current track with a new one or null.
|
|
@@ -22901,12 +22932,12 @@ class WD extends Wl {
|
|
|
22901
22932
|
return u(this, arguments, function* ({
|
|
22902
22933
|
track: e
|
|
22903
22934
|
}) {
|
|
22904
|
-
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this, Ft,
|
|
22935
|
+
if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this, Ft, hs)), n(this, ss)) {
|
|
22905
22936
|
if (e && n(this, va))
|
|
22906
22937
|
try {
|
|
22907
22938
|
e.stop();
|
|
22908
22939
|
} catch (i) {
|
|
22909
|
-
this.logger.error("Producer::replaceTrack", H(D({}, n(this, Ft,
|
|
22940
|
+
this.logger.error("Producer::replaceTrack", H(D({}, n(this, Ft, hs)), {
|
|
22910
22941
|
error: i
|
|
22911
22942
|
}));
|
|
22912
22943
|
}
|
|
@@ -22914,10 +22945,10 @@ class WD extends Wl {
|
|
|
22914
22945
|
} else if (e && e.readyState === "ended")
|
|
22915
22946
|
throw new It("track ended");
|
|
22916
22947
|
if (e === n(this, Xe)) {
|
|
22917
|
-
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ft,
|
|
22948
|
+
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ft, hs));
|
|
22918
22949
|
return;
|
|
22919
22950
|
}
|
|
22920
|
-
(!n(this,
|
|
22951
|
+
(!n(this, Vi) || !n(this, qr)) && (yield n(this, Ss).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Xe, e), this._handleTrack();
|
|
22921
22952
|
});
|
|
22922
22953
|
}
|
|
22923
22954
|
/**
|
|
@@ -22931,7 +22962,7 @@ class WD extends Wl {
|
|
|
22931
22962
|
throw new Do("not a video Producer");
|
|
22932
22963
|
if (typeof e != "number")
|
|
22933
22964
|
throw new TypeError("invalid spatialLayer");
|
|
22934
|
-
yield n(this,
|
|
22965
|
+
yield n(this, Ss).setMaxSpatialLayer(this.localId, e), f(this, Ta, e);
|
|
22935
22966
|
});
|
|
22936
22967
|
}
|
|
22937
22968
|
/**
|
|
@@ -22943,11 +22974,11 @@ class WD extends Wl {
|
|
|
22943
22974
|
throw new It("closed");
|
|
22944
22975
|
if (typeof e != "object")
|
|
22945
22976
|
throw new TypeError("invalid params");
|
|
22946
|
-
yield n(this,
|
|
22977
|
+
yield n(this, Ss).setRtpEncodingParameters(this.localId, e);
|
|
22947
22978
|
});
|
|
22948
22979
|
}
|
|
22949
22980
|
_onTrackEnded() {
|
|
22950
|
-
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this, Ft,
|
|
22981
|
+
this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this, Ft, hs)), this.safeEmit("trackended", this.track.id);
|
|
22951
22982
|
}
|
|
22952
22983
|
_handleTrack() {
|
|
22953
22984
|
n(this, Xe) && n(this, Xe).addEventListener("ended", this._onTrackEnded);
|
|
@@ -22958,13 +22989,13 @@ class WD extends Wl {
|
|
|
22958
22989
|
try {
|
|
22959
22990
|
n(this, Xe).removeEventListener("ended", this._onTrackEnded), n(this, va) && n(this, Xe).stop();
|
|
22960
22991
|
} catch (r) {
|
|
22961
|
-
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, H(D({}, n(this, Ft,
|
|
22992
|
+
this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, H(D({}, n(this, Ft, hs)), {
|
|
22962
22993
|
error: r
|
|
22963
22994
|
}));
|
|
22964
22995
|
}
|
|
22965
22996
|
}
|
|
22966
22997
|
}
|
|
22967
|
-
|
|
22998
|
+
Ss = new WeakMap(), va = new WeakMap(), Sa = new WeakMap(), Vi = new WeakMap(), ss = new WeakMap(), Xe = new WeakMap(), qr = new WeakMap(), Ta = new WeakMap(), Qd = new WeakMap(), Ft = new WeakSet(), hs = function() {
|
|
22968
22999
|
return {
|
|
22969
23000
|
producer: {
|
|
22970
23001
|
id: this.id,
|
|
@@ -22991,8 +23022,8 @@ function KD(s) {
|
|
|
22991
23022
|
var t, e;
|
|
22992
23023
|
return JD(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
|
|
22993
23024
|
}
|
|
22994
|
-
var jr, Xd,
|
|
22995
|
-
const
|
|
23025
|
+
var jr, Xd, Li;
|
|
23026
|
+
const bn = class extends lt.EventEmitter {
|
|
22996
23027
|
constructor(e, r, i, a) {
|
|
22997
23028
|
super();
|
|
22998
23029
|
h(this, "channel");
|
|
@@ -23000,17 +23031,17 @@ const kn = class extends lt.EventEmitter {
|
|
|
23000
23031
|
h(this, "serverProtocolVersion");
|
|
23001
23032
|
m(this, jr, /* @__PURE__ */ new Map());
|
|
23002
23033
|
m(this, Xd, void 0);
|
|
23003
|
-
m(this,
|
|
23034
|
+
m(this, Li, void 0);
|
|
23004
23035
|
h(this, "respond", (e, r, i = !1) => {
|
|
23005
23036
|
let a;
|
|
23006
|
-
i ? a =
|
|
23037
|
+
i ? a = bn.createErrorResponse(e, r) : a = bn.createResponse(e, r), this.channel.send(JSON.stringify(a));
|
|
23007
23038
|
});
|
|
23008
23039
|
h(this, "notify", (e) => {
|
|
23009
|
-
const r =
|
|
23040
|
+
const r = bn.createNotification(e);
|
|
23010
23041
|
this.channel.send(JSON.stringify(r));
|
|
23011
23042
|
});
|
|
23012
23043
|
h(this, "request", (e) => u(this, null, function* () {
|
|
23013
|
-
const r =
|
|
23044
|
+
const r = bn.createRequest(e), i = new Promise((a, o) => {
|
|
23014
23045
|
const { id: d } = r.payload._bolt, l = {
|
|
23015
23046
|
id: d,
|
|
23016
23047
|
method: r.type,
|
|
@@ -23036,7 +23067,7 @@ const kn = class extends lt.EventEmitter {
|
|
|
23036
23067
|
const p = l * a, g = (l + 1) * a;
|
|
23037
23068
|
c.push(r.slice(p, g));
|
|
23038
23069
|
}
|
|
23039
|
-
const d =
|
|
23070
|
+
const d = an();
|
|
23040
23071
|
for (let l = 0; l < o; l += 1) {
|
|
23041
23072
|
const p = c[l], v = JSON.stringify({
|
|
23042
23073
|
id: d,
|
|
@@ -23044,10 +23075,10 @@ const kn = class extends lt.EventEmitter {
|
|
|
23044
23075
|
chunkIndex: l,
|
|
23045
23076
|
chunk: p
|
|
23046
23077
|
});
|
|
23047
|
-
n(this,
|
|
23078
|
+
n(this, Li).debug(`Sending message chunk over dc: ${v}`), this.channel.send(v);
|
|
23048
23079
|
}
|
|
23049
23080
|
} else
|
|
23050
|
-
n(this,
|
|
23081
|
+
n(this, Li).debug(`Sending message over dc: ${r}`), this.channel.send(r);
|
|
23051
23082
|
});
|
|
23052
23083
|
h(this, "processMessage", (e) => {
|
|
23053
23084
|
var i;
|
|
@@ -23069,17 +23100,17 @@ const kn = class extends lt.EventEmitter {
|
|
|
23069
23100
|
});
|
|
23070
23101
|
h(this, "processResponseMsg", (e) => {
|
|
23071
23102
|
const { id: r } = e.payload._bolt, i = this.queue.get(r);
|
|
23072
|
-
return i ? (n(this,
|
|
23103
|
+
return i ? (n(this, Li).debug(`resolving pending request with id: ${r}, complete response: ${JSON.stringify(e)}`), e.type === "error" ? i.cancel(Tg(e)) : i.resolve(Tg(e)), !0) : !1;
|
|
23073
23104
|
});
|
|
23074
23105
|
h(this, "processBoltHandshake", (e) => {
|
|
23075
23106
|
var r, i;
|
|
23076
23107
|
return e.type === "_bolt" || e.type === "handshake" ? (this.respond((i = (r = e.payload._bolt) == null ? void 0 : r.id) != null ? i : mu(8), { type: "_bolt", payload: { message: "pong" } }), !0) : !1;
|
|
23077
23108
|
});
|
|
23078
|
-
this.label = i, this.transportId = a, f(this, Xd, e), f(this,
|
|
23109
|
+
this.label = i, this.transportId = a, f(this, Xd, e), f(this, Li, e.getValue("logger")), this.channel = r, this.queue = /* @__PURE__ */ new Map();
|
|
23079
23110
|
}
|
|
23080
23111
|
};
|
|
23081
|
-
let oi =
|
|
23082
|
-
jr = new WeakMap(), Xd = new WeakMap(),
|
|
23112
|
+
let oi = bn;
|
|
23113
|
+
jr = new WeakMap(), Xd = new WeakMap(), Li = new WeakMap(), h(oi, "createRequest", (e) => {
|
|
23083
23114
|
var r;
|
|
23084
23115
|
if ((r = e.payload) != null && r._bolt)
|
|
23085
23116
|
throw new Error("rpc fields are internal values");
|
|
@@ -23133,8 +23164,8 @@ jr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(oi, "createRequest
|
|
|
23133
23164
|
}
|
|
23134
23165
|
}));
|
|
23135
23166
|
const Md = "transport closed";
|
|
23136
|
-
var
|
|
23137
|
-
const
|
|
23167
|
+
var xi;
|
|
23168
|
+
const kn = class extends Wl {
|
|
23138
23169
|
constructor(e, {
|
|
23139
23170
|
id: r,
|
|
23140
23171
|
direction: i,
|
|
@@ -23176,8 +23207,8 @@ const In = class extends Wl {
|
|
|
23176
23207
|
h(this, "unknownTracksMap");
|
|
23177
23208
|
// App custom data.
|
|
23178
23209
|
h(this, "appData");
|
|
23179
|
-
m(this,
|
|
23180
|
-
f(this,
|
|
23210
|
+
m(this, xi, void 0);
|
|
23211
|
+
f(this, xi, e);
|
|
23181
23212
|
const v = e.getValue("logger");
|
|
23182
23213
|
v.debug(`constructor() [id: ${r}, direction: ${i}]`), this.id = r, this.direction = i;
|
|
23183
23214
|
const S = jD(l, {});
|
|
@@ -23210,7 +23241,7 @@ const In = class extends Wl {
|
|
|
23210
23241
|
}
|
|
23211
23242
|
), this.handler.on("dc_open", (w) => {
|
|
23212
23243
|
let L = this.datachannels.get(w.label);
|
|
23213
|
-
L || (L || (L = new oi(n(this,
|
|
23244
|
+
L || (L || (L = new oi(n(this, xi), w, w.label, this.serverId), this.datachannels.set(w.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
|
|
23214
23245
|
w.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", w.label));
|
|
23215
23246
|
}, 5e3));
|
|
23216
23247
|
}), this.handler.on("datachannel", (w, L) => {
|
|
@@ -23381,7 +23412,7 @@ const In = class extends Wl {
|
|
|
23381
23412
|
}
|
|
23382
23413
|
createProducerObject(e) {
|
|
23383
23414
|
return u(this, null, function* () {
|
|
23384
|
-
const r = new WD(n(this,
|
|
23415
|
+
const r = new WD(n(this, xi), e);
|
|
23385
23416
|
return this.producers.set(r.id, r), r.once("close", () => {
|
|
23386
23417
|
this.producers.delete(r.id);
|
|
23387
23418
|
}), this.emit("newproducer", r), r;
|
|
@@ -23429,7 +23460,7 @@ const In = class extends Wl {
|
|
|
23429
23460
|
});
|
|
23430
23461
|
}
|
|
23431
23462
|
static parseCodecAndFmtpMappings(e, r) {
|
|
23432
|
-
const i =
|
|
23463
|
+
const i = ps.parse(e.sdp), a = {};
|
|
23433
23464
|
return i.media.forEach((o) => {
|
|
23434
23465
|
r.includes(o.mid.toString()) && (a[o.mid.toString()] = {
|
|
23435
23466
|
rtp: o.rtp,
|
|
@@ -23440,7 +23471,7 @@ const In = class extends Wl {
|
|
|
23440
23471
|
}), a;
|
|
23441
23472
|
}
|
|
23442
23473
|
static setCodecAndFmtpMappings(e, r, i) {
|
|
23443
|
-
const a =
|
|
23474
|
+
const a = ps.parse(e.sdp);
|
|
23444
23475
|
return a.media = a.media.map((c) => {
|
|
23445
23476
|
if (r.includes(c.mid.toString())) {
|
|
23446
23477
|
const d = D({}, c);
|
|
@@ -23448,40 +23479,40 @@ const In = class extends Wl {
|
|
|
23448
23479
|
}
|
|
23449
23480
|
return c;
|
|
23450
23481
|
}), H(D({}, e), {
|
|
23451
|
-
sdp:
|
|
23482
|
+
sdp: ps.write(a)
|
|
23452
23483
|
});
|
|
23453
23484
|
}
|
|
23454
23485
|
static parseHeaderExtensionMappings(e) {
|
|
23455
|
-
const r =
|
|
23486
|
+
const r = ps.parse(e.sdp), i = {};
|
|
23456
23487
|
return r.media.forEach((a) => {
|
|
23457
23488
|
i[a.mid] = a.ext;
|
|
23458
23489
|
}), i;
|
|
23459
23490
|
}
|
|
23460
23491
|
static setHeaderExtensionMappings(e, r) {
|
|
23461
|
-
const i =
|
|
23492
|
+
const i = ps.parse(e.sdp);
|
|
23462
23493
|
return i.media = i.media.map((o) => {
|
|
23463
23494
|
const c = D({}, o);
|
|
23464
23495
|
return c.ext = r[o.mid], c;
|
|
23465
23496
|
}), H(D({}, e), {
|
|
23466
|
-
sdp:
|
|
23497
|
+
sdp: ps.write(i)
|
|
23467
23498
|
});
|
|
23468
23499
|
}
|
|
23469
23500
|
closeConsumers(e, r) {
|
|
23470
23501
|
return u(this, null, function* () {
|
|
23471
23502
|
try {
|
|
23472
|
-
const i = e.map((l) => l.transceiver.mid), a =
|
|
23503
|
+
const i = e.map((l) => l.transceiver.mid), a = kn.parseCodecAndFmtpMappings(
|
|
23473
23504
|
this.handler.pc.remoteDescription,
|
|
23474
23505
|
i
|
|
23475
|
-
), o =
|
|
23506
|
+
), o = kn.parseHeaderExtensionMappings(
|
|
23476
23507
|
this.handler.pc.remoteDescription
|
|
23477
23508
|
);
|
|
23478
23509
|
this.logger.info("Stopping transceivers", { consumerIds: e.map(({ id: l }) => l) }), e.forEach((l) => l.close(void 0, !0));
|
|
23479
23510
|
let c = yield this.handler.pc.createOffer();
|
|
23480
|
-
this.logger.info("Created offer for closing consumers", { sdp: c.sdp }), c =
|
|
23511
|
+
this.logger.info("Created offer for closing consumers", { sdp: c.sdp }), c = kn.setCodecAndFmtpMappings(
|
|
23481
23512
|
c,
|
|
23482
23513
|
i,
|
|
23483
23514
|
a
|
|
23484
|
-
), c =
|
|
23515
|
+
), c = kn.setHeaderExtensionMappings(
|
|
23485
23516
|
c,
|
|
23486
23517
|
o
|
|
23487
23518
|
), this.logger.info("Updated codec and fmtp mappings in close consumer offer", { sdp: c.sdp }), yield this.setLocalDescription(c), this.logger.info("Successfully set local description in close consumers");
|
|
@@ -23498,7 +23529,7 @@ const In = class extends Wl {
|
|
|
23498
23529
|
this.logger.info("Received offer from SFU", { sdp: e.sdp }), yield this.setRemoteDescription(e);
|
|
23499
23530
|
const r = yield this.handler.pc.createAnswer();
|
|
23500
23531
|
this.logger.info("Created answer corresponding to received offer", { sdp: r.sdp });
|
|
23501
|
-
const i =
|
|
23532
|
+
const i = ps.parse(r.sdp);
|
|
23502
23533
|
return i.media = i.media.map((a) => {
|
|
23503
23534
|
if (a.type === "audio") {
|
|
23504
23535
|
const o = D({}, a), c = o.fmtp.find(
|
|
@@ -23512,7 +23543,7 @@ const In = class extends Wl {
|
|
|
23512
23543
|
}), o;
|
|
23513
23544
|
}
|
|
23514
23545
|
return a;
|
|
23515
|
-
}), r.sdp =
|
|
23546
|
+
}), r.sdp = ps.write(i), this.logger.info("Setting munged SDP", { sdp: r.sdp }), yield this.setLocalDescription(r), this.logger.info("Successfully set local description", { sdp: r.sdp }), r;
|
|
23516
23547
|
} catch (r) {
|
|
23517
23548
|
throw this.logger.error("Set remote offer failed", { error: r }), r;
|
|
23518
23549
|
}
|
|
@@ -23571,7 +23602,7 @@ const In = class extends Wl {
|
|
|
23571
23602
|
else {
|
|
23572
23603
|
const G = N;
|
|
23573
23604
|
G.enabled = !0, this.handler.midTransceiverMap.set(B.mid, B);
|
|
23574
|
-
const re = new GD(n(this,
|
|
23605
|
+
const re = new GD(n(this, xi), {
|
|
23575
23606
|
id: r,
|
|
23576
23607
|
localId: B.mid,
|
|
23577
23608
|
transceiver: B,
|
|
@@ -23627,8 +23658,8 @@ const In = class extends Wl {
|
|
|
23627
23658
|
});
|
|
23628
23659
|
}
|
|
23629
23660
|
};
|
|
23630
|
-
let Yu =
|
|
23631
|
-
|
|
23661
|
+
let Yu = kn;
|
|
23662
|
+
xi = new WeakMap();
|
|
23632
23663
|
function zD(s) {
|
|
23633
23664
|
if (typeof navigator == "object" && navigator.product === "ReactNative") {
|
|
23634
23665
|
if (typeof RTCPeerConnection == "undefined") {
|
|
@@ -23668,15 +23699,15 @@ function zD(s) {
|
|
|
23668
23699
|
}
|
|
23669
23700
|
s.warn("Device::this._detectDevice() | unknown device");
|
|
23670
23701
|
}
|
|
23671
|
-
var rr,
|
|
23702
|
+
var rr, Ui;
|
|
23672
23703
|
class YD {
|
|
23673
23704
|
constructor(t, { handlerName: e, handlerFactory: r } = {}) {
|
|
23674
23705
|
// RTC handler factory.
|
|
23675
23706
|
h(this, "handlerFactory");
|
|
23676
23707
|
m(this, rr, void 0);
|
|
23677
|
-
m(this,
|
|
23708
|
+
m(this, Ui, void 0);
|
|
23678
23709
|
const i = t.getValue("logger");
|
|
23679
|
-
if (i.debug("constructor()"), f(this, rr, t), f(this,
|
|
23710
|
+
if (i.debug("constructor()"), f(this, rr, t), f(this, Ui, i), e && r)
|
|
23680
23711
|
throw new TypeError(
|
|
23681
23712
|
"just one of handlerName or handlerInterface can be given"
|
|
23682
23713
|
);
|
|
@@ -23684,9 +23715,9 @@ class YD {
|
|
|
23684
23715
|
this.handlerFactory = r;
|
|
23685
23716
|
else {
|
|
23686
23717
|
if (e)
|
|
23687
|
-
n(this,
|
|
23688
|
-
else if (e = zD(n(this,
|
|
23689
|
-
n(this,
|
|
23718
|
+
n(this, Ui).debug(`Device::constructor() | handler given: ${e}`);
|
|
23719
|
+
else if (e = zD(n(this, Ui)), e)
|
|
23720
|
+
n(this, Ui).debug(`Device::constructor() | detected handler: ${e}`);
|
|
23690
23721
|
else
|
|
23691
23722
|
throw new Error("device not supported");
|
|
23692
23723
|
switch (e) {
|
|
@@ -23720,7 +23751,7 @@ class YD {
|
|
|
23720
23751
|
* @throws {TypeError} if wrong arguments.
|
|
23721
23752
|
*/
|
|
23722
23753
|
createTransport(t) {
|
|
23723
|
-
const e =
|
|
23754
|
+
const e = an();
|
|
23724
23755
|
return new Yu(n(this, rr), H(D({
|
|
23725
23756
|
id: e
|
|
23726
23757
|
}, t), {
|
|
@@ -23728,9 +23759,9 @@ class YD {
|
|
|
23728
23759
|
}));
|
|
23729
23760
|
}
|
|
23730
23761
|
}
|
|
23731
|
-
rr = new WeakMap(),
|
|
23762
|
+
rr = new WeakMap(), Ui = new WeakMap();
|
|
23732
23763
|
const QD = 2e3;
|
|
23733
|
-
var ya, at, ot, nc, ac,
|
|
23764
|
+
var ya, at, ot, nc, ac, $i, Ea, oc, Pa, Fi, xs, _a, fd, cc, Qu, Zd, av, dc, Xu, el, ov, tl, cv, sl, dv, rl, lv, il, uv, lc, Zu, uc, eh;
|
|
23734
23765
|
class XD extends lt.EventEmitter {
|
|
23735
23766
|
constructor(e, r) {
|
|
23736
23767
|
super();
|
|
@@ -23751,7 +23782,7 @@ class XD extends lt.EventEmitter {
|
|
|
23751
23782
|
m(this, ot, void 0);
|
|
23752
23783
|
m(this, nc, void 0);
|
|
23753
23784
|
m(this, ac, void 0);
|
|
23754
|
-
m(this,
|
|
23785
|
+
m(this, $i, void 0);
|
|
23755
23786
|
m(this, Ea, void 0);
|
|
23756
23787
|
m(this, oc, void 0);
|
|
23757
23788
|
m(this, Pa, {
|
|
@@ -23761,11 +23792,11 @@ class XD extends lt.EventEmitter {
|
|
|
23761
23792
|
},
|
|
23762
23793
|
lastConnectionTime: 0
|
|
23763
23794
|
});
|
|
23764
|
-
m(this,
|
|
23795
|
+
m(this, Fi, void 0);
|
|
23765
23796
|
m(this, xs, "all");
|
|
23766
|
-
this.context = e, f(this,
|
|
23767
|
-
send: { state:
|
|
23768
|
-
recv: { state:
|
|
23797
|
+
this.context = e, f(this, $i, r), f(this, ya, new YD(e)), f(this, Ea, new qD(r)), f(this, oc, ws), n(this, _a, fd).mediaState = {
|
|
23798
|
+
send: { state: Mn.NEW },
|
|
23799
|
+
recv: { state: Mn.NEW }
|
|
23769
23800
|
}, (xa(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(ee.FORCE_RELAY)) && f(this, xs, "relay"), this.logger.info(`ICE Transport Policy initially set to ${n(this, xs)}`), U(this, cc, Qu).call(this);
|
|
23770
23801
|
}
|
|
23771
23802
|
/**
|
|
@@ -23783,7 +23814,7 @@ class XD extends lt.EventEmitter {
|
|
|
23783
23814
|
return this.context.getValue("logger");
|
|
23784
23815
|
}
|
|
23785
23816
|
get socket() {
|
|
23786
|
-
return n(this,
|
|
23817
|
+
return n(this, $i);
|
|
23787
23818
|
}
|
|
23788
23819
|
get socketHandler() {
|
|
23789
23820
|
return n(this, Ea);
|
|
@@ -23842,10 +23873,10 @@ class XD extends lt.EventEmitter {
|
|
|
23842
23873
|
throw new Error("Method not implemented.");
|
|
23843
23874
|
}
|
|
23844
23875
|
}
|
|
23845
|
-
ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(),
|
|
23876
|
+
ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(), $i = new WeakMap(), Ea = new WeakMap(), oc = new WeakMap(), Pa = new WeakMap(), Fi = new WeakMap(), xs = new WeakMap(), _a = new WeakSet(), fd = function() {
|
|
23846
23877
|
return this.context.getValue("connectionHandler");
|
|
23847
23878
|
}, cc = new WeakSet(), Qu = function() {
|
|
23848
|
-
f(this,
|
|
23879
|
+
f(this, Fi, {
|
|
23849
23880
|
send: void 0,
|
|
23850
23881
|
recv: void 0
|
|
23851
23882
|
});
|
|
@@ -23919,7 +23950,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
23919
23950
|
const { id: r, direction: i } = e;
|
|
23920
23951
|
if (this.logger.info(`Connecting ${i} transport`, {
|
|
23921
23952
|
transport: { id: r, type: i }
|
|
23922
|
-
}), !n(this,
|
|
23953
|
+
}), !n(this, $i).isConnected)
|
|
23923
23954
|
throw new hi("Socket is not connected");
|
|
23924
23955
|
if (e.connectionState === "closed")
|
|
23925
23956
|
throw new hi("Transport is closed");
|
|
@@ -23978,15 +24009,15 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
23978
24009
|
}
|
|
23979
24010
|
);
|
|
23980
24011
|
const o = () => {
|
|
23981
|
-
const c = n(this,
|
|
23982
|
-
c !== void 0 && (clearTimeout(c), n(this,
|
|
24012
|
+
const c = n(this, Fi)[r];
|
|
24013
|
+
c !== void 0 && (clearTimeout(c), n(this, Fi)[r] = void 0);
|
|
23983
24014
|
};
|
|
23984
24015
|
switch (a) {
|
|
23985
24016
|
case "connected":
|
|
23986
24017
|
o(), n(this, Pa).lastConnectionTime = performance.now();
|
|
23987
24018
|
break;
|
|
23988
24019
|
case "disconnected":
|
|
23989
|
-
n(this,
|
|
24020
|
+
n(this, Fi)[r] = setTimeout(() => u(this, null, function* () {
|
|
23990
24021
|
this.logger.warn(`${r} transport is in disconnected state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield U(this, lc, Zu).call(this, e.direction);
|
|
23991
24022
|
}), QD);
|
|
23992
24023
|
break;
|
|
@@ -24057,7 +24088,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
24057
24088
|
return u(this, null, function* () {
|
|
24058
24089
|
switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: !0 }), this.context.getValue("flagsmith").hasFeature(
|
|
24059
24090
|
ee.CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
24060
|
-
) && n(this,
|
|
24091
|
+
) && n(this, $i).isConnected && n(this, Pa).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, xs, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
|
|
24061
24092
|
case "send": {
|
|
24062
24093
|
this.logger.info("Transport reconnected", { transport: n(this, at) }), this.context.getValue("peerSessionStore").emit(k.RESET_PRODUCER_STATE);
|
|
24063
24094
|
break;
|
|
@@ -24070,7 +24101,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
24070
24101
|
this.logger.warn("Unknown transport direction", { transport: { type: e } });
|
|
24071
24102
|
}
|
|
24072
24103
|
U(this, uc, eh).call(this, {
|
|
24073
|
-
state:
|
|
24104
|
+
state: Mn.CONNECTED,
|
|
24074
24105
|
direction: e
|
|
24075
24106
|
});
|
|
24076
24107
|
});
|
|
@@ -24226,7 +24257,7 @@ class Gh {
|
|
|
24226
24257
|
this.socketHandler = t;
|
|
24227
24258
|
}
|
|
24228
24259
|
static getMSIDFromSDP(t, e) {
|
|
24229
|
-
return
|
|
24260
|
+
return ps.parse(t).media.filter(
|
|
24230
24261
|
(a) => e === "video" ? a.type === "video" : a.type === "audio"
|
|
24231
24262
|
).at(-1).msid;
|
|
24232
24263
|
}
|
|
@@ -24258,7 +24289,7 @@ class Gh {
|
|
|
24258
24289
|
});
|
|
24259
24290
|
}
|
|
24260
24291
|
}
|
|
24261
|
-
var
|
|
24292
|
+
var Bi, Gr, Ca, pc, Us, nl, ir, wa, gc, th, al, hv, ol, pv, cl, gv, dl, mv;
|
|
24262
24293
|
class eO extends XD {
|
|
24263
24294
|
constructor(e, r) {
|
|
24264
24295
|
super(e, r);
|
|
@@ -24267,7 +24298,7 @@ class eO extends XD {
|
|
|
24267
24298
|
m(this, ol);
|
|
24268
24299
|
m(this, cl);
|
|
24269
24300
|
m(this, dl);
|
|
24270
|
-
m(this,
|
|
24301
|
+
m(this, Bi, void 0);
|
|
24271
24302
|
m(this, Gr, void 0);
|
|
24272
24303
|
m(this, Ca, void 0);
|
|
24273
24304
|
m(this, pc, void 0);
|
|
@@ -24295,7 +24326,7 @@ class eO extends XD {
|
|
|
24295
24326
|
return super.socketHandler;
|
|
24296
24327
|
}
|
|
24297
24328
|
get producers() {
|
|
24298
|
-
return n(this,
|
|
24329
|
+
return n(this, Bi);
|
|
24299
24330
|
}
|
|
24300
24331
|
get consumers() {
|
|
24301
24332
|
return n(this, Gr);
|
|
@@ -24311,7 +24342,7 @@ class eO extends XD {
|
|
|
24311
24342
|
return this.context.getValue("logger");
|
|
24312
24343
|
}
|
|
24313
24344
|
reset() {
|
|
24314
|
-
f(this,
|
|
24345
|
+
f(this, Bi, /* @__PURE__ */ new Map()), f(this, Gr, /* @__PURE__ */ new Map()), f(this, Ca, /* @__PURE__ */ new Map());
|
|
24315
24346
|
}
|
|
24316
24347
|
createProducer(e, r) {
|
|
24317
24348
|
return u(this, null, function* () {
|
|
@@ -24346,7 +24377,7 @@ class eO extends XD {
|
|
|
24346
24377
|
});
|
|
24347
24378
|
}
|
|
24348
24379
|
closeAllProducers() {
|
|
24349
|
-
return Promise.all(Array.from(n(this,
|
|
24380
|
+
return Promise.all(Array.from(n(this, Bi).entries()).map(([, e]) => e.close()));
|
|
24350
24381
|
}
|
|
24351
24382
|
createConsumer(e) {
|
|
24352
24383
|
return this.createConsumers([e]);
|
|
@@ -24379,7 +24410,7 @@ class eO extends XD {
|
|
|
24379
24410
|
});
|
|
24380
24411
|
}
|
|
24381
24412
|
}
|
|
24382
|
-
|
|
24413
|
+
Bi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(), Us = new WeakMap(), nl = new WeakMap(), ir = new WeakMap(), wa = new WeakMap(), gc = new WeakSet(), th = function() {
|
|
24383
24414
|
return u(this, null, function* () {
|
|
24384
24415
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
24385
24416
|
throw new Error("Recv transport is closed");
|
|
@@ -24448,7 +24479,7 @@ Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
|
|
|
24448
24479
|
this.producers.delete(e.id), r();
|
|
24449
24480
|
})), e.on("trackended", () => {
|
|
24450
24481
|
this.logger.info("producer::trackended", { producer: H(D({}, e), { status: "UNKNOWN" }) });
|
|
24451
|
-
}), n(this,
|
|
24482
|
+
}), n(this, Bi).set(e.id, e);
|
|
24452
24483
|
}, cl = new WeakSet(), gv = function(e) {
|
|
24453
24484
|
return u(this, null, function* () {
|
|
24454
24485
|
try {
|
|
@@ -24473,7 +24504,7 @@ Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
|
|
|
24473
24504
|
peerId: e.peerId
|
|
24474
24505
|
});
|
|
24475
24506
|
};
|
|
24476
|
-
var mc, fc, vc, Ra, ba, ka, Sc, Tc, Ia, Rt,
|
|
24507
|
+
var mc, fc, vc, Ra, ba, ka, Sc, Tc, Ia, Rt, Ts, ys, Hi, qi, nr, yc, ll, fv, ul, vv, hl, Sv, pl, Tv;
|
|
24477
24508
|
const gl = class {
|
|
24478
24509
|
constructor({
|
|
24479
24510
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -24509,16 +24540,16 @@ const gl = class {
|
|
|
24509
24540
|
m(this, Ia, void 0);
|
|
24510
24541
|
// State variables
|
|
24511
24542
|
m(this, Rt, void 0);
|
|
24512
|
-
m(this,
|
|
24513
|
-
m(this,
|
|
24543
|
+
m(this, Ts, void 0);
|
|
24544
|
+
m(this, ys, !1);
|
|
24545
|
+
m(this, Hi, 0);
|
|
24514
24546
|
m(this, qi, 0);
|
|
24515
|
-
m(this, ji, 0);
|
|
24516
24547
|
m(this, nr, []);
|
|
24517
24548
|
m(this, yc, void 0);
|
|
24518
|
-
f(this, Ra, t), f(this, Rt, t), f(this, mc, e), f(this, fc, r), f(this, vc, i), f(this, ba, a), f(this, ka, o), f(this, Sc, c), f(this, Tc, d), f(this, Ia, l), f(this, yc, p), f(this,
|
|
24549
|
+
f(this, Ra, t), f(this, Rt, t), f(this, mc, e), f(this, fc, r), f(this, vc, i), f(this, ba, a), f(this, ka, o), f(this, Sc, c), f(this, Tc, d), f(this, Ia, l), f(this, yc, p), f(this, Ts, t / 2);
|
|
24519
24550
|
}
|
|
24520
24551
|
get voiceDetected() {
|
|
24521
|
-
return n(this,
|
|
24552
|
+
return n(this, ys);
|
|
24522
24553
|
}
|
|
24523
24554
|
/**
|
|
24524
24555
|
* Process an audio chunk and determine if it contains voice activity
|
|
@@ -24528,13 +24559,13 @@ const gl = class {
|
|
|
24528
24559
|
processAudioChunk(t) {
|
|
24529
24560
|
var o, c;
|
|
24530
24561
|
const e = U(o = gl, hl, Sv).call(o, t), r = U(c = gl, pl, Tv).call(c, t);
|
|
24531
|
-
return U(this, ll, fv).call(this, e), e / n(this,
|
|
24562
|
+
return U(this, ll, fv).call(this, e), e / n(this, Ts) > n(this, Ia) && e > n(this, Rt) && r > n(this, mc) ? (f(this, Hi, n(this, Hi) + 1), f(this, qi, n(this, vc)), n(this, Hi) >= n(this, fc) && f(this, ys, !0)) : (f(this, Hi, 0), n(this, qi) > 0 ? f(this, qi, n(this, qi) - 1) : n(this, ys) && f(this, ys, !1), n(this, ys) || U(this, ul, vv).call(this, e)), { energy: e, isVoice: n(this, ys) };
|
|
24532
24563
|
}
|
|
24533
24564
|
/**
|
|
24534
24565
|
* Reset the detector state
|
|
24535
24566
|
*/
|
|
24536
24567
|
reset() {
|
|
24537
|
-
f(this,
|
|
24568
|
+
f(this, ys, !1), f(this, Hi, 0), f(this, qi, 0), f(this, Rt, n(this, Ra)), f(this, Ts, n(this, Ra) / 2), f(this, nr, []);
|
|
24538
24569
|
}
|
|
24539
24570
|
/**
|
|
24540
24571
|
* Get current adaptive threshold values for debugging/visualization
|
|
@@ -24542,14 +24573,14 @@ const gl = class {
|
|
|
24542
24573
|
getThresholdInfo() {
|
|
24543
24574
|
return {
|
|
24544
24575
|
currentEnergyThreshold: n(this, Rt),
|
|
24545
|
-
backgroundNoiseEnergy: n(this,
|
|
24576
|
+
backgroundNoiseEnergy: n(this, Ts),
|
|
24546
24577
|
energyRatioThreshold: n(this, Ia)
|
|
24547
24578
|
};
|
|
24548
24579
|
}
|
|
24549
24580
|
};
|
|
24550
24581
|
let fo = gl;
|
|
24551
|
-
mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(), ba = new WeakMap(), ka = new WeakMap(), Sc = new WeakMap(), Tc = new WeakMap(), Ia = new WeakMap(), Rt = new WeakMap(),
|
|
24552
|
-
n(this,
|
|
24582
|
+
mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(), ba = new WeakMap(), ka = new WeakMap(), Sc = new WeakMap(), Tc = new WeakMap(), Ia = new WeakMap(), Rt = new WeakMap(), Ts = new WeakMap(), ys = new WeakMap(), Hi = new WeakMap(), qi = new WeakMap(), nr = new WeakMap(), yc = new WeakMap(), ll = new WeakSet(), fv = function(t) {
|
|
24583
|
+
n(this, ys) ? f(this, Rt, n(this, ka) * n(this, Rt) + (1 - n(this, ka)) * t) : f(this, Rt, n(this, ba) * n(this, Rt) + (1 - n(this, ba)) * n(this, Ts)), f(this, Rt, Math.max(
|
|
24553
24584
|
n(this, Sc),
|
|
24554
24585
|
Math.min(n(this, Tc), n(this, Rt))
|
|
24555
24586
|
));
|
|
@@ -24557,9 +24588,9 @@ mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(),
|
|
|
24557
24588
|
if (t < n(this, Rt) * 1.2)
|
|
24558
24589
|
if (n(this, nr).push(t), n(this, nr).length > n(this, yc) && n(this, nr).shift(), n(this, nr).length >= 10) {
|
|
24559
24590
|
const e = [...n(this, nr)].sort((i, a) => i - a), r = Math.floor(e.length / 2);
|
|
24560
|
-
f(this,
|
|
24591
|
+
f(this, Ts, e[r]);
|
|
24561
24592
|
} else
|
|
24562
|
-
f(this,
|
|
24593
|
+
f(this, Ts, 0.95 * n(this, Ts) + 0.05 * t);
|
|
24563
24594
|
}, hl = new WeakSet(), Sv = function(t) {
|
|
24564
24595
|
return Math.sqrt(
|
|
24565
24596
|
t.map((e) => e * e).reduce((e, r) => e + r) / t.length
|
|
@@ -24647,16 +24678,16 @@ class tO {
|
|
|
24647
24678
|
}
|
|
24648
24679
|
}
|
|
24649
24680
|
const sO = 60, rO = 400;
|
|
24650
|
-
var ar, or,
|
|
24681
|
+
var ar, or, Es, _c, ji, Aa, cr, Wr, Ma, dr, lr, $s, ml, yv, Cc, sh, fl, Ev, vl, Pv;
|
|
24651
24682
|
const Ro = class {
|
|
24652
24683
|
constructor(t, e) {
|
|
24653
24684
|
m(this, ml);
|
|
24654
24685
|
m(this, fl);
|
|
24655
24686
|
m(this, ar, void 0);
|
|
24656
24687
|
m(this, or, void 0);
|
|
24657
|
-
m(this,
|
|
24688
|
+
m(this, Es, void 0);
|
|
24658
24689
|
m(this, _c, void 0);
|
|
24659
|
-
m(this,
|
|
24690
|
+
m(this, ji, void 0);
|
|
24660
24691
|
m(this, Aa, void 0);
|
|
24661
24692
|
m(this, cr, void 0);
|
|
24662
24693
|
m(this, Wr, void 0);
|
|
@@ -24676,19 +24707,19 @@ const Ro = class {
|
|
|
24676
24707
|
return n(this, dr).getValue("logger");
|
|
24677
24708
|
}
|
|
24678
24709
|
set producerId(t) {
|
|
24679
|
-
f(this,
|
|
24710
|
+
f(this, Es, t);
|
|
24680
24711
|
}
|
|
24681
24712
|
set audioTrack(t) {
|
|
24682
24713
|
f(this, _c, t), n(this, lr) instanceof Eg && (n(this, lr).audioTrack = t);
|
|
24683
24714
|
}
|
|
24684
24715
|
start() {
|
|
24685
|
-
this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${n(this,
|
|
24716
|
+
this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${n(this, Es)}`), n(this, ar) && n(this, $s).clearInterval(n(this, ar)), f(this, ar, n(this, $s).setInterval(() => u(this, null, function* () {
|
|
24686
24717
|
var i;
|
|
24687
|
-
if (!n(this, _c) || !n(this,
|
|
24718
|
+
if (!n(this, _c) || !n(this, Es))
|
|
24688
24719
|
return;
|
|
24689
24720
|
const { energy: t } = U(this, ml, yv).call(this), e = U(i = Ro, Cc, sh).call(i, t);
|
|
24690
24721
|
let r = 0.9;
|
|
24691
|
-
n(this, Ma) !== e && n(this, Ma) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this,
|
|
24722
|
+
n(this, Ma) !== e && n(this, Ma) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this, ji, (n(this, ji) || 0) * (1 - r) + t * r);
|
|
24692
24723
|
}), sO)), n(this, or) && n(this, $s).clearInterval(n(this, or)), f(this, or, n(this, $s).setInterval(
|
|
24693
24724
|
U(this, fl, Ev).bind(this),
|
|
24694
24725
|
rO
|
|
@@ -24696,31 +24727,31 @@ const Ro = class {
|
|
|
24696
24727
|
}
|
|
24697
24728
|
stop() {
|
|
24698
24729
|
try {
|
|
24699
|
-
this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${n(this,
|
|
24730
|
+
this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${n(this, Es)}`), n(this, ar) && (n(this, $s).clearInterval(n(this, ar)), f(this, ar, void 0)), n(this, or) && (n(this, $s).clearInterval(n(this, or)), f(this, or, void 0));
|
|
24700
24731
|
} catch (t) {
|
|
24701
24732
|
}
|
|
24702
24733
|
n(this, Aa).reset(), n(this, lr) instanceof yg && n(this, lr).stop();
|
|
24703
24734
|
}
|
|
24704
24735
|
};
|
|
24705
24736
|
let vo = Ro;
|
|
24706
|
-
ar = new WeakMap(), or = new WeakMap(),
|
|
24737
|
+
ar = new WeakMap(), or = new WeakMap(), Es = new WeakMap(), _c = new WeakMap(), ji = new WeakMap(), Aa = new WeakMap(), cr = new WeakMap(), Wr = new WeakMap(), Ma = new WeakMap(), dr = new WeakMap(), lr = new WeakMap(), $s = new WeakMap(), ml = new WeakSet(), yv = function() {
|
|
24707
24738
|
var o;
|
|
24708
24739
|
const { samples: t } = n(this, lr), { energy: e, isVoice: r } = n(this, Aa).processAudioChunk(t), i = U(o = Ro, vl, Pv).call(o, e);
|
|
24709
24740
|
return n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
|
|
24710
|
-
`AudioActivityReporter: producer: ${n(this,
|
|
24741
|
+
`AudioActivityReporter: producer: ${n(this, Es)}, energy: ${n(this, ji)},
|
|
24711
24742
|
slogScale: ${i}, isVoice: ${r}, minEnergy: ${n(this, cr)},
|
|
24712
24743
|
maxEnergy: ${n(this, Wr)}`
|
|
24713
24744
|
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, cr) || i < n(this, cr)) && f(this, cr, i), (!n(this, Wr) || i > n(this, Wr)) && f(this, Wr, i), { energy: (i - n(this, cr)) / (n(this, Wr) - n(this, cr)) * 10 || 0, isVoice: r });
|
|
24714
24745
|
}, Cc = new WeakSet(), sh = function(t) {
|
|
24715
24746
|
return t < 5;
|
|
24716
|
-
}, fl = new WeakSet(), Ev = function(t = n(this,
|
|
24747
|
+
}, fl = new WeakSet(), Ev = function(t = n(this, ji)) {
|
|
24717
24748
|
var r;
|
|
24718
|
-
if (!n(this,
|
|
24719
|
-
n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(`AudioActivityReporter: No producerId or energy to report: ${n(this,
|
|
24749
|
+
if (!n(this, Es) || !t) {
|
|
24750
|
+
n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(`AudioActivityReporter: No producerId or energy to report: ${n(this, Es)}`);
|
|
24720
24751
|
return;
|
|
24721
24752
|
}
|
|
24722
24753
|
const e = {
|
|
24723
|
-
producerId: n(this,
|
|
24754
|
+
producerId: n(this, Es),
|
|
24724
24755
|
energy: Math.round(t),
|
|
24725
24756
|
silent: U(r = Ro, Cc, sh).call(r, t)
|
|
24726
24757
|
};
|
|
@@ -24790,7 +24821,7 @@ var aO = Object.defineProperty, oO = Object.getOwnPropertyDescriptor, de = (s, t
|
|
|
24790
24821
|
return r && i && aO(t, e, i), i;
|
|
24791
24822
|
};
|
|
24792
24823
|
const Ot = ["video/VP9", "video/VP8"];
|
|
24793
|
-
var wc, Rc, ct, W, Da, St, Wi, Ji,
|
|
24824
|
+
var wc, Rc, ct, W, Da, St, Gi, Wi, Ji, bc, is, ur, kc, Ki, zi, Tt, bt, Jr, En, Sl, Cv, Tl, wv, yl, Rv, Ic, rh, El, fu, bv, Pl, kv, _l, Iv, Cl, Av, Ze, pt, Yi, So, wl, Mv, Rl, Dv, bl, Ov;
|
|
24794
24825
|
const _v = (fu = class {
|
|
24795
24826
|
constructor(s, t) {
|
|
24796
24827
|
m(this, Jr);
|
|
@@ -24813,7 +24844,7 @@ const _v = (fu = class {
|
|
|
24813
24844
|
m(this, _l);
|
|
24814
24845
|
m(this, Cl);
|
|
24815
24846
|
m(this, Ze);
|
|
24816
|
-
m(this,
|
|
24847
|
+
m(this, Yi);
|
|
24817
24848
|
m(this, wl);
|
|
24818
24849
|
m(this, Rl);
|
|
24819
24850
|
m(this, bl);
|
|
@@ -24826,9 +24857,9 @@ const _v = (fu = class {
|
|
|
24826
24857
|
m(this, W, void 0);
|
|
24827
24858
|
m(this, Da, void 0);
|
|
24828
24859
|
m(this, St, void 0);
|
|
24860
|
+
m(this, Gi, void 0);
|
|
24829
24861
|
m(this, Wi, void 0);
|
|
24830
24862
|
m(this, Ji, void 0);
|
|
24831
|
-
m(this, Ki, void 0);
|
|
24832
24863
|
m(this, bc, void 0);
|
|
24833
24864
|
m(this, is, null);
|
|
24834
24865
|
m(this, ur, void 0);
|
|
@@ -24836,8 +24867,8 @@ const _v = (fu = class {
|
|
|
24836
24867
|
// NOTE(roerohan): If a peer ID is present in a set corresponding
|
|
24837
24868
|
// to a video codec, it implies that the video codec is the best
|
|
24838
24869
|
// codec that the peer can send
|
|
24870
|
+
m(this, Ki, void 0);
|
|
24839
24871
|
m(this, zi, void 0);
|
|
24840
|
-
m(this, Yi, void 0);
|
|
24841
24872
|
m(this, Tt, void 0);
|
|
24842
24873
|
m(this, bt, void 0);
|
|
24843
24874
|
var r, i;
|
|
@@ -24845,18 +24876,18 @@ const _v = (fu = class {
|
|
|
24845
24876
|
const {
|
|
24846
24877
|
socket: e
|
|
24847
24878
|
} = t;
|
|
24848
|
-
this.mediaJoined = !1, f(this,
|
|
24879
|
+
this.mediaJoined = !1, f(this, Ki, /* @__PURE__ */ new Map([
|
|
24849
24880
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
24850
24881
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
24851
|
-
])), f(this,
|
|
24882
|
+
])), f(this, zi, /* @__PURE__ */ new Map([
|
|
24852
24883
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
24853
24884
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
24854
|
-
])), f(this, ct, e), f(this,
|
|
24885
|
+
])), f(this, ct, e), f(this, Gi, !1), f(this, W, new eO(s, e)), f(this, St, n(this, W).events), f(this, ur, /* @__PURE__ */ new Set()), f(this, Tt, /* @__PURE__ */ new Map()), f(this, Wi, !1), f(this, Ji, new Ku(s.getValue("logger"))), f(this, bt, new vo(
|
|
24855
24886
|
this.context,
|
|
24856
24887
|
n(this, W).socketHandler.audioActivity.bind(n(this, W).socketHandler)
|
|
24857
24888
|
)), this.e2ee = (i = (r = s.getValue("modules").e2ee) == null ? void 0 : r.enabled) != null ? i : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, bc, Ih(
|
|
24858
24889
|
() => u(this, null, function* () {
|
|
24859
|
-
if (!n(this, Jr,
|
|
24890
|
+
if (!n(this, Jr, En).mediaJoinAttempted)
|
|
24860
24891
|
return;
|
|
24861
24892
|
const { roomJoined: a } = yield this.joinRoom(
|
|
24862
24893
|
n(this, Rc),
|
|
@@ -24888,19 +24919,19 @@ const _v = (fu = class {
|
|
|
24888
24919
|
return this.context.getValue("logger");
|
|
24889
24920
|
}
|
|
24890
24921
|
get mediaJoined() {
|
|
24891
|
-
return n(this, Jr,
|
|
24922
|
+
return n(this, Jr, En).mediaJoined;
|
|
24892
24923
|
}
|
|
24893
24924
|
set mediaJoined(s) {
|
|
24894
|
-
n(this, Jr,
|
|
24925
|
+
n(this, Jr, En).mediaJoined = s;
|
|
24895
24926
|
}
|
|
24896
24927
|
reset() {
|
|
24897
|
-
n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, Tt).clear(), n(this, ur).clear(), f(this, is, null), n(this,
|
|
24928
|
+
n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, Tt).clear(), n(this, ur).clear(), f(this, is, null), n(this, Ji).stop(), n(this, W).stopAllTransports(), n(this, W).reset(), f(this, Ji, new Ku());
|
|
24898
24929
|
}
|
|
24899
24930
|
joinRoom(a, o) {
|
|
24900
24931
|
return u(this, arguments, function* (s, t, e = !1, r = !1, i = {}) {
|
|
24901
|
-
n(this, Jr,
|
|
24932
|
+
n(this, Jr, En).mediaJoinAttempted = !0, f(this, Gi, !0), e && this.reset();
|
|
24902
24933
|
try {
|
|
24903
|
-
return yield n(this,
|
|
24934
|
+
return yield n(this, Ji).push(
|
|
24904
24935
|
() => U(this, Sl, Cv).call(this, s, t, r, i),
|
|
24905
24936
|
"joinRoom"
|
|
24906
24937
|
);
|
|
@@ -24933,7 +24964,7 @@ const _v = (fu = class {
|
|
|
24933
24964
|
}
|
|
24934
24965
|
leaveRoom() {
|
|
24935
24966
|
return u(this, null, function* () {
|
|
24936
|
-
n(this, W).stopAllTransports(), f(this,
|
|
24967
|
+
n(this, W).stopAllTransports(), f(this, Wi, !1), n(this, Jr, En).mediaJoinAttempted = !1;
|
|
24937
24968
|
const s = {
|
|
24938
24969
|
closeRoom: !1
|
|
24939
24970
|
};
|
|
@@ -24997,7 +25028,7 @@ const _v = (fu = class {
|
|
|
24997
25028
|
a,
|
|
24998
25029
|
l
|
|
24999
25030
|
);
|
|
25000
|
-
return U(this,
|
|
25031
|
+
return U(this, Yi, So).call(this, e, p.then((S) => S.id)), p.then((S) => S.track);
|
|
25001
25032
|
});
|
|
25002
25033
|
}
|
|
25003
25034
|
shareWebcam(s) {
|
|
@@ -25014,7 +25045,7 @@ const _v = (fu = class {
|
|
|
25014
25045
|
// NOTE(roerohan): If the codec is supported
|
|
25015
25046
|
((o = (a = n(this, Da).sender) == null ? void 0 : a.video) == null ? void 0 : o.codecs.findIndex(
|
|
25016
25047
|
(c) => c.mimeType === i
|
|
25017
|
-
)) >= 0 && n(this,
|
|
25048
|
+
)) >= 0 && n(this, zi).get(i).size > 0
|
|
25018
25049
|
);
|
|
25019
25050
|
});
|
|
25020
25051
|
return e.length === 0 && e.push(Ot[0]), yield Promise.all(e.map((i) => (this.logger.debug(`Calling _shareWebcam with video codec: ${i}`), this._shareWebcam(s, i)))), s;
|
|
@@ -25044,7 +25075,7 @@ const _v = (fu = class {
|
|
|
25044
25075
|
r,
|
|
25045
25076
|
i
|
|
25046
25077
|
);
|
|
25047
|
-
U(this,
|
|
25078
|
+
U(this, Yi, So).call(this, he.SCREENSHARE_VIDEO, a.then((c) => c.id));
|
|
25048
25079
|
let o;
|
|
25049
25080
|
if (e) {
|
|
25050
25081
|
const c = {
|
|
@@ -25062,7 +25093,7 @@ const _v = (fu = class {
|
|
|
25062
25093
|
o = n(this, W).createProducer(
|
|
25063
25094
|
c,
|
|
25064
25095
|
d
|
|
25065
|
-
), U(this,
|
|
25096
|
+
), U(this, Yi, So).call(this, he.SCREENSHARE_AUDIO, o.then((l) => l.id));
|
|
25066
25097
|
}
|
|
25067
25098
|
yield Promise.all([a, o || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
25068
25099
|
});
|
|
@@ -25092,7 +25123,7 @@ const _v = (fu = class {
|
|
|
25092
25123
|
e,
|
|
25093
25124
|
r
|
|
25094
25125
|
);
|
|
25095
|
-
U(this,
|
|
25126
|
+
U(this, Yi, So).call(this, he.MIC, i.then((a) => a.id)), yield i.then((a) => {
|
|
25096
25127
|
n(this, bt) && (n(this, bt).audioTrack = a.track, n(this, bt).producerId = a.id, n(this, bt).start());
|
|
25097
25128
|
});
|
|
25098
25129
|
} catch (t) {
|
|
@@ -25315,7 +25346,7 @@ const _v = (fu = class {
|
|
|
25315
25346
|
if (i != null && i.mimeType || (i.mimeType = i.kind === Fs.AUDIO ? "audio/opus" : "video/VP8"), i.kind === Fs.VIDEO && !i.screenShare && // Can receive vp9
|
|
25316
25347
|
((e = (t = n(this, Da).receiver) == null ? void 0 : t.video) == null ? void 0 : e.codecs.findIndex(
|
|
25317
25348
|
(a) => a.mimeType === Ot[0]
|
|
25318
|
-
)) >= 0 && n(this,
|
|
25349
|
+
)) >= 0 && n(this, Ki).get(Ot[0]).has(r) && i.mimeType !== Ot[0]) {
|
|
25319
25350
|
this.logger.warn(`Ignoring producer: ${i.producerId}`);
|
|
25320
25351
|
return;
|
|
25321
25352
|
}
|
|
@@ -25430,7 +25461,7 @@ const _v = (fu = class {
|
|
|
25430
25461
|
), n(this, ct).on(
|
|
25431
25462
|
n(this, St).mediaRoomTerminationBroadcastResponse,
|
|
25432
25463
|
() => {
|
|
25433
|
-
!this.mediaJoined && !n(this,
|
|
25464
|
+
!this.mediaJoined && !n(this, Gi) && !n(this, Wi) || (this.logger.warn(
|
|
25434
25465
|
"media hub termination broadcast received, rejoining room"
|
|
25435
25466
|
), this.context.getValue("peerSessionStore").emit(k.ROOM_NODE_DISCONNECTED), n(this, bc).call(this));
|
|
25436
25467
|
}
|
|
@@ -25474,7 +25505,7 @@ const _v = (fu = class {
|
|
|
25474
25505
|
(d) => d.mimeType === c
|
|
25475
25506
|
)) >= 0 || o === Ot.length - 1
|
|
25476
25507
|
) {
|
|
25477
|
-
n(this,
|
|
25508
|
+
n(this, zi).get(c).add(s);
|
|
25478
25509
|
break;
|
|
25479
25510
|
}
|
|
25480
25511
|
}
|
|
@@ -25486,17 +25517,17 @@ const _v = (fu = class {
|
|
|
25486
25517
|
(d) => d.mimeType === c
|
|
25487
25518
|
)) >= 0 || o === Ot.length - 1
|
|
25488
25519
|
) {
|
|
25489
|
-
n(this,
|
|
25520
|
+
n(this, Ki).get(c).add(s);
|
|
25490
25521
|
break;
|
|
25491
25522
|
}
|
|
25492
25523
|
}
|
|
25493
25524
|
}
|
|
25494
25525
|
handlePeerLeaving(s) {
|
|
25495
|
-
this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || (n(this,
|
|
25526
|
+
this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || (n(this, Ki).forEach((t) => t.delete(s)), n(this, zi).forEach((t, e) => {
|
|
25496
25527
|
t.delete(s), !(t.size !== 0 || e === Ot[0]) && this.disableWebcam(e);
|
|
25497
25528
|
}));
|
|
25498
25529
|
}
|
|
25499
|
-
}, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(),
|
|
25530
|
+
}, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(), Gi = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), bc = new WeakMap(), is = new WeakMap(), ur = new WeakMap(), kc = new WeakMap(), Ki = new WeakMap(), zi = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), Jr = new WeakSet(), En = function() {
|
|
25500
25531
|
return this.context.getValue("connectionHandler");
|
|
25501
25532
|
}, Sl = new WeakSet(), Cv = function(s, t, e, r) {
|
|
25502
25533
|
return u(this, null, function* () {
|
|
@@ -25514,7 +25545,7 @@ const _v = (fu = class {
|
|
|
25514
25545
|
try {
|
|
25515
25546
|
this.mediaJoined = !0;
|
|
25516
25547
|
const { roomState: s } = yield n(this, W).socketHandler.notifySelfJoinComplete();
|
|
25517
|
-
return f(this, wc, s.roomUuid), f(this,
|
|
25548
|
+
return f(this, wc, s.roomUuid), f(this, Wi, !0), f(this, Gi, !1), !0;
|
|
25518
25549
|
} catch (s) {
|
|
25519
25550
|
return this.logger.error("Error completing room join", { error: s }), this.mediaJoined = !1, !1;
|
|
25520
25551
|
}
|
|
@@ -25611,7 +25642,7 @@ const _v = (fu = class {
|
|
|
25611
25642
|
});
|
|
25612
25643
|
}, Ze = new WeakSet(), pt = function(s) {
|
|
25613
25644
|
return n(this, Tt).get(s);
|
|
25614
|
-
},
|
|
25645
|
+
}, Yi = new WeakSet(), So = function(s, t) {
|
|
25615
25646
|
return n(this, Tt).set(s, t);
|
|
25616
25647
|
}, wl = new WeakSet(), Mv = function(s) {
|
|
25617
25648
|
return n(this, Tt).delete(s);
|
|
@@ -25751,11 +25782,11 @@ function Vv(s) {
|
|
|
25751
25782
|
}
|
|
25752
25783
|
s.setValue("roomNodeClient", void 0);
|
|
25753
25784
|
}
|
|
25754
|
-
var cO = Object.defineProperty, dO = Object.getOwnPropertyDescriptor,
|
|
25785
|
+
var cO = Object.defineProperty, dO = Object.getOwnPropertyDescriptor, fn = (s, t, e, r) => {
|
|
25755
25786
|
for (var i = r > 1 ? void 0 : r ? dO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
25756
25787
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
25757
25788
|
return r && i && cO(t, e, i), i;
|
|
25758
|
-
},
|
|
25789
|
+
}, Qi, Ps, te, yt, Vt, Gg;
|
|
25759
25790
|
const Lv = (Gg = class {
|
|
25760
25791
|
/**
|
|
25761
25792
|
* Use await SelfController.init(roomNodeClient) instead
|
|
@@ -25765,12 +25796,12 @@ const Lv = (Gg = class {
|
|
|
25765
25796
|
m(this, yt);
|
|
25766
25797
|
h(this, "self");
|
|
25767
25798
|
h(this, "authToken");
|
|
25768
|
-
m(this,
|
|
25799
|
+
m(this, Qi, void 0);
|
|
25769
25800
|
h(this, "viewType");
|
|
25770
|
-
m(this,
|
|
25801
|
+
m(this, Ps, void 0);
|
|
25771
25802
|
m(this, te, void 0);
|
|
25772
25803
|
const { socket: i } = e, a = s.getValue("authToken");
|
|
25773
|
-
this.self = t, f(this, te, s), this.viewType = r, this.authToken = a, f(this,
|
|
25804
|
+
this.self = t, f(this, te, s), this.viewType = r, this.authToken = a, f(this, Qi, i), f(this, Ps, e), t.config.viewType !== At.Chat && this.setupEvents();
|
|
25774
25805
|
}
|
|
25775
25806
|
get peerId() {
|
|
25776
25807
|
return n(this, te).getValue("peerId");
|
|
@@ -25914,20 +25945,20 @@ const Lv = (Gg = class {
|
|
|
25914
25945
|
if (this.self.roomState === "disconnected")
|
|
25915
25946
|
return;
|
|
25916
25947
|
let { peerId: t } = this;
|
|
25917
|
-
s && n(this, te).getValue("flagsmith").hasFeature(ee.REFRESH_ID_ON_DISCONNECTION) && (t =
|
|
25948
|
+
s && n(this, te).getValue("flagsmith").hasFeature(ee.REFRESH_ID_ON_DISCONNECTION) && (t = an()), n(this, Qi).updateURL(t), n(this, te).getValue("telemetry").resetPeerId(t), dt().setHeader("tracing-id", t), mr.remapContext(t, n(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
25918
25949
|
}), n(this, te).getValue("peerSessionStore").on(k.SOCKET_SERVICE_FAILED, () => {
|
|
25919
25950
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
25920
|
-
}), n(this,
|
|
25951
|
+
}), n(this, Ps).on($.waitingRoomRequestAccepted, () => {
|
|
25921
25952
|
this.waitlistAcceptHandler();
|
|
25922
|
-
}), n(this,
|
|
25953
|
+
}), n(this, Ps).on(ld.updateUserPreset, (s) => {
|
|
25923
25954
|
s.updatePeersPresets.forEach((t) => {
|
|
25924
25955
|
t.userIds === this.self.userId && n(this, te).getValue("peerSessionStore").emit(k.UPDATE_PERMISSIONS, t.patch);
|
|
25925
25956
|
});
|
|
25926
|
-
}), n(this,
|
|
25957
|
+
}), n(this, Ps).on($.waitingRoomRequestDenied, () => {
|
|
25927
25958
|
this.waitlistRejectedHandler();
|
|
25928
|
-
}), n(this,
|
|
25959
|
+
}), n(this, Ps).on($.kick, () => {
|
|
25929
25960
|
this.kickHandler({ kickType: "kick" });
|
|
25930
|
-
}), n(this,
|
|
25961
|
+
}), n(this, Ps).on($.kickAll, () => {
|
|
25931
25962
|
this.kickHandler({ kickType: "kickAll" });
|
|
25932
25963
|
}), n(this, te).getValue("peerSessionStore").onAsync(k.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), n(this, te).getValue("peerSessionStore").on(
|
|
25933
25964
|
k.PRODUCER_SCORE_UPDATE,
|
|
@@ -25962,10 +25993,10 @@ const Lv = (Gg = class {
|
|
|
25962
25993
|
joinRoom(s = !1) {
|
|
25963
25994
|
return u(this, null, function* () {
|
|
25964
25995
|
try {
|
|
25965
|
-
const { peer: t } = yield n(this,
|
|
25996
|
+
const { peer: t } = yield n(this, Ps).joinRoom(
|
|
25966
25997
|
this.self
|
|
25967
25998
|
);
|
|
25968
|
-
n(this,
|
|
25999
|
+
n(this, Ps).socket.flush();
|
|
25969
26000
|
const e = Nh(t.stageType);
|
|
25970
26001
|
if (n(this, te).setValue("stageStatus", e, !1), t.waitlisted) {
|
|
25971
26002
|
this.waitlistedHandler();
|
|
@@ -25986,7 +26017,7 @@ const Lv = (Gg = class {
|
|
|
25986
26017
|
}
|
|
25987
26018
|
this.self.setIsPinned(!1), n(this, te).setValue("stageStatus", "OFF_STAGE", !1), yield this.leaveMediaRoom(s), n(this, te).notify("stageStatus");
|
|
25988
26019
|
try {
|
|
25989
|
-
(e = n(this,
|
|
26020
|
+
(e = n(this, Qi)) == null || e.disconnect();
|
|
25990
26021
|
} catch (r) {
|
|
25991
26022
|
this.logger.error("SelfController::leaveRoom::socketDisconnect");
|
|
25992
26023
|
}
|
|
@@ -26009,7 +26040,7 @@ const Lv = (Gg = class {
|
|
|
26009
26040
|
return;
|
|
26010
26041
|
}
|
|
26011
26042
|
Nv(n(this, te), {
|
|
26012
|
-
socket: n(this,
|
|
26043
|
+
socket: n(this, Qi),
|
|
26013
26044
|
peerId: t
|
|
26014
26045
|
});
|
|
26015
26046
|
}
|
|
@@ -26043,29 +26074,29 @@ const Lv = (Gg = class {
|
|
|
26043
26074
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
26044
26075
|
});
|
|
26045
26076
|
}
|
|
26046
|
-
},
|
|
26077
|
+
}, Qi = new WeakMap(), Ps = new WeakMap(), te = new WeakMap(), yt = new WeakSet(), Vt = function() {
|
|
26047
26078
|
return n(this, te).getValue("roomNodeClient");
|
|
26048
26079
|
}, Gg);
|
|
26049
26080
|
let si = Lv;
|
|
26050
|
-
|
|
26081
|
+
fn([
|
|
26051
26082
|
E.trace("SelfController.resetSelf")
|
|
26052
26083
|
], si.prototype, "resetSelf", 1);
|
|
26053
|
-
|
|
26084
|
+
fn([
|
|
26054
26085
|
E.trace("SelfController.setupEvents")
|
|
26055
26086
|
], si.prototype, "setupEvents", 1);
|
|
26056
|
-
|
|
26087
|
+
fn([
|
|
26057
26088
|
E.trace("SelfController.joinRoom")
|
|
26058
26089
|
], si.prototype, "joinRoom", 1);
|
|
26059
|
-
|
|
26090
|
+
fn([
|
|
26060
26091
|
E.trace("SelfController.leaveRoom")
|
|
26061
26092
|
], si.prototype, "leaveRoom", 1);
|
|
26062
|
-
|
|
26093
|
+
fn([
|
|
26063
26094
|
E.trace("SelfController.joinMediaRoom")
|
|
26064
26095
|
], si.prototype, "joinMediaRoom", 1);
|
|
26065
|
-
|
|
26096
|
+
fn([
|
|
26066
26097
|
E.trace("SelfController.leaveMediaRoom")
|
|
26067
26098
|
], si.prototype, "leaveMediaRoom", 1);
|
|
26068
|
-
|
|
26099
|
+
fn([
|
|
26069
26100
|
E.trace("SelfController.init")
|
|
26070
26101
|
], si, "init", 1);
|
|
26071
26102
|
var Ac;
|
|
@@ -26266,7 +26297,7 @@ class xv {
|
|
|
26266
26297
|
rk.toBinary(e)
|
|
26267
26298
|
);
|
|
26268
26299
|
try {
|
|
26269
|
-
const { peer: a } =
|
|
26300
|
+
const { peer: a } = Sn.fromBinary((yield r).payload);
|
|
26270
26301
|
n(this, Bt).getValue("connectionHandler").socketJoined = !0, n(this, Bt).getValue("peerSessionStore").emit(k.SOCKET_SERVICE_ROOM_JOINED, { peer: a });
|
|
26271
26302
|
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
|
|
26272
26303
|
return n(this, Bt).getValue("peerSessionStore").emit(k.ROOM_STATE, d), n(this, Bt).getValue("peerSessionStore").emit(k.SOCKET_PEERS, l), { peer: a };
|
|
@@ -26358,7 +26389,7 @@ class xv {
|
|
|
26358
26389
|
$.getPeerInfo,
|
|
26359
26390
|
Pf.toBinary({ peerId: t })
|
|
26360
26391
|
);
|
|
26361
|
-
e =
|
|
26392
|
+
e = Sn.fromBinary(r.payload);
|
|
26362
26393
|
} catch (r) {
|
|
26363
26394
|
this.logger.error("getPeerInfo::binary_decode_error", { error: r });
|
|
26364
26395
|
}
|
|
@@ -26537,7 +26568,7 @@ class xv {
|
|
|
26537
26568
|
case $.leaveRoom:
|
|
26538
26569
|
case $.kick:
|
|
26539
26570
|
case $.kickAll: {
|
|
26540
|
-
r =
|
|
26571
|
+
r = Sn.fromBinary.bind(Sn), i = Sn.create();
|
|
26541
26572
|
break;
|
|
26542
26573
|
}
|
|
26543
26574
|
case $.getWaitingRoomRequests: {
|
|
@@ -26554,32 +26585,32 @@ class xv {
|
|
|
26554
26585
|
r = rg.fromBinary.bind(rg);
|
|
26555
26586
|
break;
|
|
26556
26587
|
}
|
|
26557
|
-
case
|
|
26588
|
+
case ws.peerJoinedBroadcast:
|
|
26558
26589
|
case Ar.peerJoinedBroadcast: {
|
|
26559
26590
|
r = Wp.fromBinary.bind(Wp);
|
|
26560
26591
|
break;
|
|
26561
26592
|
}
|
|
26562
|
-
case
|
|
26593
|
+
case ws.selfJoinComplete:
|
|
26563
26594
|
case Ar.selfJoinComplete: {
|
|
26564
26595
|
r = bu.fromBinary.bind(bu);
|
|
26565
26596
|
break;
|
|
26566
26597
|
}
|
|
26567
|
-
case
|
|
26598
|
+
case ws.globalPeerPinBroadcast:
|
|
26568
26599
|
case Ar.globalPeerPinBroadcast: {
|
|
26569
26600
|
r = zp.fromBinary.bind(zp);
|
|
26570
26601
|
break;
|
|
26571
26602
|
}
|
|
26572
|
-
case
|
|
26603
|
+
case ws.selectedPeer:
|
|
26573
26604
|
case Ar.selectedPeer: {
|
|
26574
26605
|
r = Ru.fromBinary.bind(Ru);
|
|
26575
26606
|
break;
|
|
26576
26607
|
}
|
|
26577
|
-
case
|
|
26608
|
+
case ws.selectedPeerDiff:
|
|
26578
26609
|
case Ar.selectedPeerDiff: {
|
|
26579
26610
|
r = Gp.fromBinary.bind(Gp);
|
|
26580
26611
|
break;
|
|
26581
26612
|
}
|
|
26582
|
-
case
|
|
26613
|
+
case ws.leaveRoom:
|
|
26583
26614
|
case Ar.leaveRoom: {
|
|
26584
26615
|
r = ku.fromBinary.bind(ku);
|
|
26585
26616
|
break;
|
|
@@ -26730,7 +26761,7 @@ class vO {
|
|
|
26730
26761
|
$.getPeerInfo,
|
|
26731
26762
|
Pf.toBinary({ peerId: t })
|
|
26732
26763
|
);
|
|
26733
|
-
return
|
|
26764
|
+
return Sn.fromBinary(e.payload);
|
|
26734
26765
|
});
|
|
26735
26766
|
}
|
|
26736
26767
|
}
|
|
@@ -26945,10 +26976,10 @@ var TO = Object.defineProperty, yO = (s, t, e) => t in s ? TO(s, t, { enumerable
|
|
|
26945
26976
|
set exports(s) {
|
|
26946
26977
|
Dd = s;
|
|
26947
26978
|
}
|
|
26948
|
-
},
|
|
26979
|
+
}, Dn = typeof Reflect == "object" ? Reflect : null, Pg = Dn && typeof Dn.apply == "function" ? Dn.apply : function(s, t, e) {
|
|
26949
26980
|
return Function.prototype.apply.call(s, t, e);
|
|
26950
26981
|
}, vd;
|
|
26951
|
-
|
|
26982
|
+
Dn && typeof Dn.ownKeys == "function" ? vd = Dn.ownKeys : Object.getOwnPropertySymbols ? vd = function(s) {
|
|
26952
26983
|
return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s));
|
|
26953
26984
|
} : vd = function(s) {
|
|
26954
26985
|
return Object.getOwnPropertyNames(s);
|
|
@@ -27271,16 +27302,16 @@ class DO {
|
|
|
27271
27302
|
ci = /* @__PURE__ */ new WeakMap(), di = /* @__PURE__ */ new WeakMap();
|
|
27272
27303
|
var Jv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(Jv || {});
|
|
27273
27304
|
const OO = "2", NO = "3";
|
|
27274
|
-
var Ae,
|
|
27305
|
+
var Ae, Pn, Pe, xe, Ir, Ke, gr, Qr, Cs, _n, Gs, ih, Kv, To, Sd, nh, zv, ah, wg, Od, oh, ch, Yv, Po, Td, _o, Nd, Vd, dh, On, Co, wo, Ld;
|
|
27275
27306
|
class VO {
|
|
27276
27307
|
constructor(t, e) {
|
|
27277
27308
|
var v, S, P, _, C, w, L, F, N, B;
|
|
27278
|
-
ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this,
|
|
27309
|
+
ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this, On), ve(this, wo), ve(this, Ae, void 0), ve(this, Pn, void 0), ve(this, Pe, void 0), ve(this, xe, void 0), ve(this, Ir, void 0), ve(this, Ke, void 0), ve(this, gr, void 0), ve(this, Qr, void 0), ve(this, Cs, void 0), ve(this, _n, void 0), ve(this, Gs, void 0);
|
|
27279
27310
|
var r, i, a, o, c, d, l, p, g;
|
|
27280
|
-
ne(this,
|
|
27311
|
+
ne(this, Pn, t), ne(this, Ir, []), ne(this, Ke, new Dd()), ne(this, gr, !0), ne(this, Cs, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (P = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (w = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Qr, {
|
|
27281
27312
|
code: void 0,
|
|
27282
27313
|
reason: void 0
|
|
27283
|
-
}), ne(this,
|
|
27314
|
+
}), ne(this, xe, (B = M(this, Pe).logger) != null ? B : new DO(M(this, Pe).debug ? "debug" : "info")), ne(this, Gs, new MO());
|
|
27284
27315
|
}
|
|
27285
27316
|
/**
|
|
27286
27317
|
* Ready state of the current WebSocket.
|
|
@@ -27293,13 +27324,13 @@ class VO {
|
|
|
27293
27324
|
* Sockrates connection URL.
|
|
27294
27325
|
*/
|
|
27295
27326
|
get url() {
|
|
27296
|
-
return M(this,
|
|
27327
|
+
return M(this, Pn);
|
|
27297
27328
|
}
|
|
27298
27329
|
/**
|
|
27299
27330
|
* Update connection URL.
|
|
27300
27331
|
*/
|
|
27301
27332
|
updateURL(t) {
|
|
27302
|
-
ne(this,
|
|
27333
|
+
ne(this, Pn, t), _e(this, ch, Yv).call(this);
|
|
27303
27334
|
}
|
|
27304
27335
|
/**
|
|
27305
27336
|
* Configuration options passed to Sockrates.
|
|
@@ -27333,22 +27364,22 @@ class VO {
|
|
|
27333
27364
|
1
|
|
27334
27365
|
/* OPEN */
|
|
27335
27366
|
].includes(this.readyState)) {
|
|
27336
|
-
M(this,
|
|
27367
|
+
M(this, xe).debug("Websocket was already connecting or connected.");
|
|
27337
27368
|
return;
|
|
27338
27369
|
}
|
|
27339
27370
|
if (M(this, gr) !== !1)
|
|
27340
27371
|
return new Promise((e, r) => {
|
|
27341
|
-
_e(this,
|
|
27372
|
+
_e(this, On, Co).call(this), _e(this, wo, Ld).call(this);
|
|
27342
27373
|
try {
|
|
27343
|
-
ne(this, Ae, new WebSocket(_e(this, ih, Kv).call(this, M(this,
|
|
27374
|
+
ne(this, Ae, new WebSocket(_e(this, ih, Kv).call(this, M(this, Pn)))), M(this, Ae).binaryType = "arraybuffer", M(this, xe).debug("Connecting");
|
|
27344
27375
|
const i = setTimeout(() => {
|
|
27345
|
-
M(this,
|
|
27376
|
+
M(this, xe).debug("Connection timeout. Closing socket"), ne(this, gr, !0), _e(this, wo, Ld).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Pe).autoReconnect && !M(this, Cs) && (M(this, Ke).emit(
|
|
27346
27377
|
"reconnecting"
|
|
27347
27378
|
/* reconnecting */
|
|
27348
27379
|
), _e(this, Po, Td).call(this)), r(new Error("Connection timed out!"));
|
|
27349
27380
|
}, M(this, Pe).connectionTimeout);
|
|
27350
27381
|
M(this, Ae).onopen = () => {
|
|
27351
|
-
M(this,
|
|
27382
|
+
M(this, xe).debug(`Ready State: ${Jv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Vd, dh).call(this), ne(this, Qr, {
|
|
27352
27383
|
code: void 0,
|
|
27353
27384
|
reason: void 0
|
|
27354
27385
|
}), M(this, Ke).emit(
|
|
@@ -27359,7 +27390,7 @@ class VO {
|
|
|
27359
27390
|
try {
|
|
27360
27391
|
i && clearTimeout(i);
|
|
27361
27392
|
const { code: o, reason: c } = a;
|
|
27362
|
-
r(c), M(this,
|
|
27393
|
+
r(c), M(this, xe).debug("Socket closed. Close event:", { event: a }), M(this, xe).debug(`Connection closed code: ${o}`), M(this, xe).debug(`Connection closed reason: ${c}`), M(this, Cs) || _e(this, Od, oh).call(this, o, c);
|
|
27363
27394
|
} catch (o) {
|
|
27364
27395
|
_e(this, To, Sd).call(this, o);
|
|
27365
27396
|
}
|
|
@@ -27379,7 +27410,7 @@ class VO {
|
|
|
27379
27410
|
send(t, e, r, i) {
|
|
27380
27411
|
const a = { event: t, id: e, payload: r, metadata: i };
|
|
27381
27412
|
if (M(this, Pe).queueOnDisconnect && (!M(this, Ae) || M(this, Ae).readyState !== 1))
|
|
27382
|
-
return M(this,
|
|
27413
|
+
return M(this, xe).debug("Queuing message since socket is not connected!", a), M(this, Ir).push(a), !1;
|
|
27383
27414
|
const o = Wv.encode(a);
|
|
27384
27415
|
return _e(this, _o, Nd).call(this, o);
|
|
27385
27416
|
}
|
|
@@ -27447,13 +27478,13 @@ class VO {
|
|
|
27447
27478
|
* Disconnect the socket.
|
|
27448
27479
|
*/
|
|
27449
27480
|
disconnect() {
|
|
27450
|
-
ne(this, gr, !1), _e(this,
|
|
27481
|
+
ne(this, gr, !1), _e(this, On, Co).call(this), this.removeAllListeners(), ne(this, Qr, {
|
|
27451
27482
|
code: 1e3,
|
|
27452
27483
|
reason: "Sockrates disconnect method called"
|
|
27453
27484
|
}), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
|
|
27454
27485
|
}
|
|
27455
27486
|
}
|
|
27456
|
-
Ae = /* @__PURE__ */ new WeakMap(),
|
|
27487
|
+
Ae = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), ih = /* @__PURE__ */ new WeakSet(), Kv = function(s) {
|
|
27457
27488
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
27458
27489
|
return s;
|
|
27459
27490
|
if (s.startsWith("https://"))
|
|
@@ -27462,44 +27493,44 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
|
|
|
27462
27493
|
return `ws://${s.substring(7)}`;
|
|
27463
27494
|
throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
|
|
27464
27495
|
}, To = /* @__PURE__ */ new WeakSet(), Sd = function(s, t) {
|
|
27465
|
-
M(this,
|
|
27496
|
+
M(this, xe).error("Error:", { error: s }), M(this, Ke).emit("errored", { error: s }), t == null || t(s);
|
|
27466
27497
|
}, nh = /* @__PURE__ */ new WeakSet(), zv = function(s) {
|
|
27467
27498
|
if (_e(this, Vd, dh).call(this), s.data === OO) {
|
|
27468
|
-
M(this,
|
|
27499
|
+
M(this, xe).debug("Received ping from server"), _e(this, _o, Nd).call(this, NO);
|
|
27469
27500
|
return;
|
|
27470
27501
|
}
|
|
27471
27502
|
const t = Wv.decode(s.data), { id: e, payload: r } = t;
|
|
27472
|
-
M(this,
|
|
27503
|
+
M(this, xe).debug("Received message", { event: t.event, messageID: e }), M(this, Ke).emit(t.event.toString(), { id: e, payload: r });
|
|
27473
27504
|
}, ah = /* @__PURE__ */ new WeakSet(), wg = function() {
|
|
27474
27505
|
return M(this, Ae).readyState === 1;
|
|
27475
27506
|
}, Od = /* @__PURE__ */ new WeakSet(), oh = function(s, t) {
|
|
27476
27507
|
ne(this, Qr, { reason: t, code: s }), M(this, Ke).emit("disconnected", { code: s, reason: t });
|
|
27477
27508
|
}, ch = /* @__PURE__ */ new WeakSet(), Yv = function() {
|
|
27478
27509
|
const { reason: s, code: t } = M(this, Qr);
|
|
27479
|
-
t && t !== 1e3 && M(this, gr) && M(this, Pe).autoReconnect && !M(this,
|
|
27510
|
+
t && t !== 1e3 && M(this, gr) && M(this, Pe).autoReconnect && !M(this, Cs) && (M(this, xe).debug(`Triggering reconnection due to ${s}.`), M(this, Ke).emit(
|
|
27480
27511
|
"reconnecting"
|
|
27481
27512
|
/* reconnecting */
|
|
27482
27513
|
), _e(this, Po, Td).call(this));
|
|
27483
27514
|
}, Po = /* @__PURE__ */ new WeakSet(), Td = function(s = !0) {
|
|
27484
27515
|
return u(this, null, function* () {
|
|
27485
|
-
if (s && M(this,
|
|
27486
|
-
M(this,
|
|
27516
|
+
if (s && M(this, Cs)) {
|
|
27517
|
+
M(this, xe).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
27487
27518
|
return;
|
|
27488
27519
|
}
|
|
27489
|
-
if (M(this,
|
|
27520
|
+
if (M(this, Cs) || M(this, Gs).reset(), M(this, Pe).maxReconnectionAttempts !== null && M(this, Gs).getAttempts() >= M(this, Pe).maxReconnectionAttempts) {
|
|
27490
27521
|
M(this, Ke).emit(
|
|
27491
27522
|
"failed"
|
|
27492
27523
|
/* failed */
|
|
27493
|
-
), ne(this,
|
|
27524
|
+
), ne(this, Cs, !1);
|
|
27494
27525
|
return;
|
|
27495
27526
|
}
|
|
27496
|
-
ne(this,
|
|
27527
|
+
ne(this, Cs, !0), _e(this, wo, Ld).call(this), _e(this, On, Co).call(this);
|
|
27497
27528
|
try {
|
|
27498
27529
|
if (yield M(this, Gs).wait(), M(this, gr) === !1)
|
|
27499
27530
|
return;
|
|
27500
|
-
if (M(this,
|
|
27531
|
+
if (M(this, xe).debug(`Reconnection attempt ${M(this, Gs).getAttempts()}`), M(this, Ke).emit("reconnectAttempt", { attempt: M(this, Gs).getAttempts() }), yield this.connect(), !_e(this, ah, wg).call(this))
|
|
27501
27532
|
throw Error("Reconnect Failed");
|
|
27502
|
-
ne(this,
|
|
27533
|
+
ne(this, Cs, !1), ne(this, Qr, {
|
|
27503
27534
|
code: void 0,
|
|
27504
27535
|
reason: void 0
|
|
27505
27536
|
}), M(this, Ke).emit(
|
|
@@ -27507,24 +27538,24 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
|
|
|
27507
27538
|
/* reconnected */
|
|
27508
27539
|
);
|
|
27509
27540
|
} catch (t) {
|
|
27510
|
-
M(this,
|
|
27541
|
+
M(this, xe).debug("Failed to reconnect."), M(this, Ke).emit("reconnectFailure", { attempt: M(this, Gs).getAttempts() }), _e(this, Po, Td).call(this, !1);
|
|
27511
27542
|
}
|
|
27512
27543
|
});
|
|
27513
27544
|
}, _o = /* @__PURE__ */ new WeakSet(), Nd = function(s) {
|
|
27514
27545
|
try {
|
|
27515
27546
|
return M(this, Ae).send(s), !0;
|
|
27516
27547
|
} catch (t) {
|
|
27517
|
-
return M(this,
|
|
27548
|
+
return M(this, xe).error(t.message), !1;
|
|
27518
27549
|
}
|
|
27519
27550
|
}, Vd = /* @__PURE__ */ new WeakSet(), dh = function() {
|
|
27520
|
-
this.config.disconnectOnPingTimeout && (M(this,
|
|
27551
|
+
this.config.disconnectOnPingTimeout && (M(this, xe).debug("Resetting ping timeout"), _e(this, On, Co).call(this), ne(this, _n, setTimeout(() => {
|
|
27521
27552
|
var s;
|
|
27522
|
-
M(this,
|
|
27553
|
+
M(this, xe).debug("Disconnecting the socket due to ping timeout"), ne(this, gr, !0);
|
|
27523
27554
|
const t = 3002, e = "Ping timeout";
|
|
27524
27555
|
(s = M(this, Ae)) == null || s.close(t, e), _e(this, Od, oh).call(this, t, e);
|
|
27525
27556
|
}, M(this, Pe).pingTimeout)));
|
|
27526
|
-
},
|
|
27527
|
-
M(this,
|
|
27557
|
+
}, On = /* @__PURE__ */ new WeakSet(), Co = function() {
|
|
27558
|
+
M(this, _n) && (clearTimeout(M(this, _n)), ne(this, _n, void 0));
|
|
27528
27559
|
}, wo = /* @__PURE__ */ new WeakSet(), Ld = function() {
|
|
27529
27560
|
M(this, Ae) && (M(this, Ae).onopen = void 0, M(this, Ae).onerror = void 0, M(this, Ae).onmessage = void 0, M(this, Ae).onclose = void 0);
|
|
27530
27561
|
};
|
|
@@ -27590,7 +27621,7 @@ const Qv = (Wg = class {
|
|
|
27590
27621
|
s !== this.peerId && (f(this, Kr, U(this, Nc, lh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), n(this, Ce).updateURL(n(this, Kr));
|
|
27591
27622
|
}
|
|
27592
27623
|
static getSocketEdgeDomain(s) {
|
|
27593
|
-
return
|
|
27624
|
+
return sn({ servicePrefix: "socket-edge", baseURI: s });
|
|
27594
27625
|
}
|
|
27595
27626
|
get url() {
|
|
27596
27627
|
return n(this, Kr);
|
|
@@ -27652,7 +27683,7 @@ const Qv = (Wg = class {
|
|
|
27652
27683
|
Ar.errorResponse,
|
|
27653
27684
|
_
|
|
27654
27685
|
), n(this, Ce).removeListener(
|
|
27655
|
-
|
|
27686
|
+
ws.errorResponse,
|
|
27656
27687
|
_
|
|
27657
27688
|
);
|
|
27658
27689
|
}, l = r != null ? r : U(this, Vc, uh).call(this), p = {};
|
|
@@ -27683,7 +27714,7 @@ const Qv = (Wg = class {
|
|
|
27683
27714
|
}) => {
|
|
27684
27715
|
l === P && (o({ id: P, payload: _ }), d(S, v));
|
|
27685
27716
|
};
|
|
27686
|
-
n(this, Ce).on(a, S), n(this, Ce).on(Rg, v), n(this, Ce).on(Ar.errorResponse, v), n(this, Ce).on(
|
|
27717
|
+
n(this, Ce).on(a, S), n(this, Ce).on(Rg, v), n(this, Ce).on(Ar.errorResponse, v), n(this, Ce).on(ws.errorResponse, v), setTimeout(() => {
|
|
27687
27718
|
d(S, v), c(new Error(`request timeout for callback eventId:${s}`));
|
|
27688
27719
|
}, t), n(this, Ce).send(
|
|
27689
27720
|
s,
|
|
@@ -27716,7 +27747,7 @@ const Qv = (Wg = class {
|
|
|
27716
27747
|
var i;
|
|
27717
27748
|
this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: E.location.country });
|
|
27718
27749
|
const { recv: e, send: r } = (i = n(this, we, Me).mediaState) != null ? i : {};
|
|
27719
|
-
e != null && e.state && (e == null ? void 0 : e.state) !==
|
|
27750
|
+
e != null && e.state && (e == null ? void 0 : e.state) !== Mn.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== Mn.CONNECTED ? n(this, et).getValue("peerSessionStore").emit(
|
|
27720
27751
|
k.SOCKET_SERVICE_DISCONNECTED,
|
|
27721
27752
|
{
|
|
27722
27753
|
joinAttempted: n(this, we, Me).joinAttempted
|
|
@@ -27892,7 +27923,7 @@ var FO = Object.defineProperty, BO = Object.getOwnPropertyDescriptor, HO = (s, t
|
|
|
27892
27923
|
for (var i = r > 1 ? void 0 : r ? BO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
27893
27924
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27894
27925
|
return r && i && FO(t, e, i), i;
|
|
27895
|
-
},
|
|
27926
|
+
}, _s;
|
|
27896
27927
|
class Xv extends jt {
|
|
27897
27928
|
/**
|
|
27898
27929
|
* @param {Context} context
|
|
@@ -27902,11 +27933,11 @@ class Xv extends jt {
|
|
|
27902
27933
|
super(r);
|
|
27903
27934
|
h(this, "meetings", []);
|
|
27904
27935
|
h(this, "parentMeeting", null);
|
|
27905
|
-
m(this,
|
|
27906
|
-
f(this,
|
|
27936
|
+
m(this, _s, void 0);
|
|
27937
|
+
f(this, _s, e);
|
|
27907
27938
|
}
|
|
27908
27939
|
get supportsConnectedMeetings() {
|
|
27909
|
-
return n(this,
|
|
27940
|
+
return n(this, _s).getValue("self").id !== "";
|
|
27910
27941
|
}
|
|
27911
27942
|
get isActive() {
|
|
27912
27943
|
return this.meetings.length !== 0;
|
|
@@ -27919,7 +27950,7 @@ class Xv extends jt {
|
|
|
27919
27950
|
getConnectedMeetings() {
|
|
27920
27951
|
return u(this, null, function* () {
|
|
27921
27952
|
this.validateConnectedMeetingsAction(), this.logger.info("Getting connected meetings dump");
|
|
27922
|
-
const e = yield n(this,
|
|
27953
|
+
const e = yield n(this, _s).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
|
|
27923
27954
|
return this.logger.info("Got connected meetings dump"), e;
|
|
27924
27955
|
});
|
|
27925
27956
|
}
|
|
@@ -27930,7 +27961,7 @@ class Xv extends jt {
|
|
|
27930
27961
|
createMeetings(e) {
|
|
27931
27962
|
return u(this, null, function* () {
|
|
27932
27963
|
this.validateConnectedMeetingsAction(), this.logger.info(`Creating connected meetings ${JSON.stringify(e)}`);
|
|
27933
|
-
const r = yield n(this,
|
|
27964
|
+
const r = yield n(this, _s).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
|
|
27934
27965
|
e
|
|
27935
27966
|
);
|
|
27936
27967
|
return this.logger.info(`Created connected meetings ${JSON.stringify(r)}`), r.map((i) => ({
|
|
@@ -27945,7 +27976,7 @@ class Xv extends jt {
|
|
|
27945
27976
|
*/
|
|
27946
27977
|
updateMeetings(e) {
|
|
27947
27978
|
return u(this, null, function* () {
|
|
27948
|
-
this.validateConnectedMeetingsAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this,
|
|
27979
|
+
this.validateConnectedMeetingsAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this, _s).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
|
|
27949
27980
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
27950
27981
|
), this.logger.info(`Updated connected meetings ${JSON.stringify(e)}`);
|
|
27951
27982
|
});
|
|
@@ -27963,7 +27994,7 @@ class Xv extends jt {
|
|
|
27963
27994
|
a.participants.map((o) => o.id)
|
|
27964
27995
|
) : Promise.resolve());
|
|
27965
27996
|
this.logger.info(`Moved participants before deleting connected meetings ${JSON.stringify(e)}. Deleting now.`), yield Promise.all(r);
|
|
27966
|
-
const i = yield n(this,
|
|
27997
|
+
const i = yield n(this, _s).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
|
|
27967
27998
|
e
|
|
27968
27999
|
);
|
|
27969
28000
|
return this.logger.info(`Deleted connected meetings ${JSON.stringify(e)}`), i;
|
|
@@ -27979,7 +28010,7 @@ class Xv extends jt {
|
|
|
27979
28010
|
moveParticipants(e, r, i) {
|
|
27980
28011
|
return u(this, null, function* () {
|
|
27981
28012
|
this.validateConnectedMeetingsAction(), this.logger.info(`Moving connected meetings participants ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
27982
|
-
const a = yield n(this,
|
|
28013
|
+
const a = yield n(this, _s).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
27983
28014
|
{
|
|
27984
28015
|
sourceMeetingId: e,
|
|
27985
28016
|
destinationMeetingId: r,
|
|
@@ -28000,7 +28031,7 @@ class Xv extends jt {
|
|
|
28000
28031
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
28001
28032
|
return u(this, null, function* () {
|
|
28002
28033
|
this.validateConnectedMeetingsAction(), this.logger.info(`Moving connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`);
|
|
28003
|
-
const a = yield n(this,
|
|
28034
|
+
const a = yield n(this, _s).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
|
|
28004
28035
|
{
|
|
28005
28036
|
sourceMeetingId: e,
|
|
28006
28037
|
destinationMeetingId: r,
|
|
@@ -28040,7 +28071,7 @@ class Xv extends jt {
|
|
|
28040
28071
|
});
|
|
28041
28072
|
}
|
|
28042
28073
|
}
|
|
28043
|
-
|
|
28074
|
+
_s = new WeakMap();
|
|
28044
28075
|
HO([
|
|
28045
28076
|
Mt({ maxInvocations: 60, period: 60 })
|
|
28046
28077
|
], Xv.prototype, "getConnectedMeetings", 1);
|
|
@@ -28204,7 +28235,7 @@ var GO = Object.defineProperty, WO = Object.getOwnPropertyDescriptor, Ql = (s, t
|
|
|
28204
28235
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
28205
28236
|
return r && i && GO(t, e, i), i;
|
|
28206
28237
|
};
|
|
28207
|
-
const
|
|
28238
|
+
const Cn = class {
|
|
28208
28239
|
constructor(s, t, e) {
|
|
28209
28240
|
h(this, "apiBase");
|
|
28210
28241
|
h(this, "selfController");
|
|
@@ -28256,10 +28287,10 @@ const wn = class {
|
|
|
28256
28287
|
d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(a), d.setHeader("tracing-id", t), s.setValue("apiClient", d);
|
|
28257
28288
|
const l = new O0(s);
|
|
28258
28289
|
s.setValue("connectionHandler", l);
|
|
28259
|
-
const p =
|
|
28290
|
+
const p = Cn.createSocketService(s), g = p.connect(), v = d.getUserDetails(), S = d.getPlugins();
|
|
28260
28291
|
let P, _ = "";
|
|
28261
28292
|
try {
|
|
28262
|
-
yield
|
|
28293
|
+
yield Cn.setupFlagsmith(s);
|
|
28263
28294
|
} catch (G) {
|
|
28264
28295
|
c.error("Failed to setup flagsmith", { error: G });
|
|
28265
28296
|
}
|
|
@@ -28280,7 +28311,7 @@ const wn = class {
|
|
|
28280
28311
|
s,
|
|
28281
28312
|
C.viewType,
|
|
28282
28313
|
P.preset.permissions
|
|
28283
|
-
), L =
|
|
28314
|
+
), L = Cn.setupControllers(
|
|
28284
28315
|
p,
|
|
28285
28316
|
s,
|
|
28286
28317
|
P,
|
|
@@ -28289,7 +28320,7 @@ const wn = class {
|
|
|
28289
28320
|
C,
|
|
28290
28321
|
w
|
|
28291
28322
|
);
|
|
28292
|
-
P0(C) && ((N =
|
|
28323
|
+
P0(C) && ((N = Cn.createRoomNodeClient(s, p).initializeConnection(
|
|
28293
28324
|
P.participant.name,
|
|
28294
28325
|
i,
|
|
28295
28326
|
!1,
|
|
@@ -28301,7 +28332,7 @@ const wn = class {
|
|
|
28301
28332
|
);
|
|
28302
28333
|
})), E.location.country = (B = d.ipInfo) == null ? void 0 : B.country;
|
|
28303
28334
|
const { controllers: F } = yield L;
|
|
28304
|
-
return yw(), new
|
|
28335
|
+
return yw(), new Cn(e, F, s);
|
|
28305
28336
|
});
|
|
28306
28337
|
}
|
|
28307
28338
|
static setupFlagsmith(s) {
|
|
@@ -28326,7 +28357,7 @@ const wn = class {
|
|
|
28326
28357
|
isReactNative: navigator.isReactNative
|
|
28327
28358
|
});
|
|
28328
28359
|
try {
|
|
28329
|
-
const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ?
|
|
28360
|
+
const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? sn({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
28330
28361
|
yield s.getValue("flagsmith").identify(
|
|
28331
28362
|
`${Cu.PEER}_${t}`,
|
|
28332
28363
|
JSON.parse(JSON.stringify(d)),
|
|
@@ -28348,13 +28379,13 @@ const wn = class {
|
|
|
28348
28379
|
}
|
|
28349
28380
|
static setupControllers(s, t, e, r, i, a, o) {
|
|
28350
28381
|
return u(this, null, function* () {
|
|
28351
|
-
var I,
|
|
28382
|
+
var I, $e, Cr;
|
|
28352
28383
|
const c = t.getValue("modules"), { participant: d } = e, l = t.getValue("defaults"), p = t.getValue("logger"), { viewType: g, mediaConstraints: { audio: v } } = a;
|
|
28353
28384
|
t.setValue("viewType", g), t.setValue("defaults", D({
|
|
28354
28385
|
mediaConfiguration: {
|
|
28355
28386
|
audio: {
|
|
28356
28387
|
enableHighBitrate: (I = v.enableHighBitrate) != null ? I : !1,
|
|
28357
|
-
enableStereo: (
|
|
28388
|
+
enableStereo: ($e = v.enableStereo) != null ? $e : !1
|
|
28358
28389
|
}
|
|
28359
28390
|
}
|
|
28360
28391
|
}, l)), t.setValue("maxPreferredStreams", ye.isMobile() ? a.maxVideoStreams.mobile : a.maxVideoStreams.desktop);
|
|
@@ -28363,9 +28394,9 @@ const wn = class {
|
|
|
28363
28394
|
s
|
|
28364
28395
|
);
|
|
28365
28396
|
t.setValue("connectedMeetingsSocketHandler", re);
|
|
28366
|
-
const tt = new Jl(t, s),
|
|
28397
|
+
const tt = new Jl(t, s), ls = new cs(t, s), ri = new vO(s), us = new xv(t, s), A = new SO(t, s), y = new lO(s), R = new cn(t, s), x = yield si.init(
|
|
28367
28398
|
t,
|
|
28368
|
-
|
|
28399
|
+
us,
|
|
28369
28400
|
d,
|
|
28370
28401
|
o,
|
|
28371
28402
|
a
|
|
@@ -28374,17 +28405,17 @@ const wn = class {
|
|
|
28374
28405
|
const fe = yield Uf.init(
|
|
28375
28406
|
t,
|
|
28376
28407
|
x.self,
|
|
28377
|
-
|
|
28408
|
+
us,
|
|
28378
28409
|
G,
|
|
28379
28410
|
i
|
|
28380
28411
|
);
|
|
28381
28412
|
if (c.participant && (N = new _r(
|
|
28382
28413
|
t,
|
|
28383
28414
|
x.self,
|
|
28384
|
-
|
|
28385
|
-
)), (Cr = c.e2ee) != null && Cr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield
|
|
28415
|
+
us
|
|
28416
|
+
)), (Cr = c.e2ee) != null && Cr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield as.init(
|
|
28386
28417
|
t,
|
|
28387
|
-
|
|
28418
|
+
ls,
|
|
28388
28419
|
R,
|
|
28389
28420
|
x.self,
|
|
28390
28421
|
N.participants
|
|
@@ -28400,11 +28431,11 @@ const wn = class {
|
|
|
28400
28431
|
)), c.recording && (L = new Hf(
|
|
28401
28432
|
t,
|
|
28402
28433
|
x.self,
|
|
28403
|
-
|
|
28434
|
+
us
|
|
28404
28435
|
)), c.stage && (_ = new $f(
|
|
28405
28436
|
t,
|
|
28406
28437
|
ri,
|
|
28407
|
-
|
|
28438
|
+
us,
|
|
28408
28439
|
x.self,
|
|
28409
28440
|
N.participants
|
|
28410
28441
|
)), c.plugin) {
|
|
@@ -28418,7 +28449,7 @@ const wn = class {
|
|
|
28418
28449
|
t,
|
|
28419
28450
|
qs,
|
|
28420
28451
|
A,
|
|
28421
|
-
|
|
28452
|
+
ls,
|
|
28422
28453
|
P == null ? void 0 : P.chat,
|
|
28423
28454
|
x.self,
|
|
28424
28455
|
N.participants,
|
|
@@ -28476,7 +28507,7 @@ const wn = class {
|
|
|
28476
28507
|
});
|
|
28477
28508
|
}
|
|
28478
28509
|
};
|
|
28479
|
-
let Jc =
|
|
28510
|
+
let Jc = Cn;
|
|
28480
28511
|
Ql([
|
|
28481
28512
|
E.trace("Controller.init")
|
|
28482
28513
|
], Jc, "init", 1);
|
|
@@ -28532,7 +28563,7 @@ function KO(s, t) {
|
|
|
28532
28563
|
throw Error(`Received V1 auth token ${s}`);
|
|
28533
28564
|
let a = pi.baseURI.prod;
|
|
28534
28565
|
t && (a = t);
|
|
28535
|
-
const o = `https://${
|
|
28566
|
+
const o = `https://${sn({ servicePrefix: "api", baseURI: a })}`;
|
|
28536
28567
|
return {
|
|
28537
28568
|
meetingId: e,
|
|
28538
28569
|
orgId: r,
|
|
@@ -28544,20 +28575,20 @@ function KO(s, t) {
|
|
|
28544
28575
|
throw new b("Invalid auth token", "0004");
|
|
28545
28576
|
}
|
|
28546
28577
|
}
|
|
28547
|
-
var zr,
|
|
28578
|
+
var zr, Xi, Zi, Lc, kl, eS;
|
|
28548
28579
|
class zO {
|
|
28549
28580
|
constructor() {
|
|
28550
28581
|
m(this, kl);
|
|
28551
28582
|
m(this, zr, new Audio());
|
|
28552
|
-
m(this,
|
|
28553
|
-
m(this,
|
|
28583
|
+
m(this, Xi, new MediaStream());
|
|
28584
|
+
m(this, Zi, /* @__PURE__ */ new Map());
|
|
28554
28585
|
m(this, Lc, void 0);
|
|
28555
|
-
n(this, zr).srcObject = n(this,
|
|
28586
|
+
n(this, zr).srcObject = n(this, Xi), n(this, zr).autoplay = !0;
|
|
28556
28587
|
}
|
|
28557
28588
|
playTracks(t) {
|
|
28558
28589
|
return u(this, null, function* () {
|
|
28559
28590
|
return t.forEach((e) => {
|
|
28560
|
-
n(this,
|
|
28591
|
+
n(this, Zi).has(e.id) || (n(this, Xi).addTrack(e), n(this, Zi).set(e.id, e));
|
|
28561
28592
|
}), this.play();
|
|
28562
28593
|
});
|
|
28563
28594
|
}
|
|
@@ -28565,12 +28596,12 @@ class zO {
|
|
|
28565
28596
|
typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, zr).setSinkId(t);
|
|
28566
28597
|
}
|
|
28567
28598
|
removeTrack(t) {
|
|
28568
|
-
const e = n(this,
|
|
28569
|
-
e && (n(this,
|
|
28599
|
+
const e = n(this, Zi).get(t);
|
|
28600
|
+
e && (n(this, Xi).removeTrack(e), n(this, Zi).delete(t));
|
|
28570
28601
|
}
|
|
28571
28602
|
play() {
|
|
28572
28603
|
return u(this, null, function* () {
|
|
28573
|
-
return n(this, zr).srcObject = n(this,
|
|
28604
|
+
return n(this, zr).srcObject = n(this, Xi), n(this, zr).play().catch((t) => {
|
|
28574
28605
|
U(this, kl, eS).call(this, t);
|
|
28575
28606
|
});
|
|
28576
28607
|
});
|
|
@@ -28579,32 +28610,32 @@ class zO {
|
|
|
28579
28610
|
f(this, Lc, t);
|
|
28580
28611
|
}
|
|
28581
28612
|
}
|
|
28582
|
-
zr = new WeakMap(),
|
|
28613
|
+
zr = new WeakMap(), Xi = new WeakMap(), Zi = new WeakMap(), Lc = new WeakMap(), kl = new WeakSet(), eS = function(t) {
|
|
28583
28614
|
var e;
|
|
28584
28615
|
(e = n(this, Lc)) == null || e.call(this, t);
|
|
28585
28616
|
};
|
|
28586
|
-
var
|
|
28617
|
+
var en;
|
|
28587
28618
|
class YO extends zO {
|
|
28588
28619
|
constructor() {
|
|
28589
28620
|
super();
|
|
28590
28621
|
/** Maps participantId to trackId */
|
|
28591
|
-
m(this,
|
|
28592
|
-
f(this,
|
|
28622
|
+
m(this, en, void 0);
|
|
28623
|
+
f(this, en, /* @__PURE__ */ new Map());
|
|
28593
28624
|
}
|
|
28594
28625
|
addParticipantTrack(e, r) {
|
|
28595
|
-
n(this,
|
|
28626
|
+
n(this, en).set(e, r.id), this.playTracks([r]);
|
|
28596
28627
|
}
|
|
28597
28628
|
removeParticipantTrack(e) {
|
|
28598
|
-
const r = n(this,
|
|
28599
|
-
r && this.removeTrack(r), n(this,
|
|
28629
|
+
const r = n(this, en).get(e);
|
|
28630
|
+
r && this.removeTrack(r), n(this, en).delete(e);
|
|
28600
28631
|
}
|
|
28601
28632
|
}
|
|
28602
|
-
|
|
28633
|
+
en = new WeakMap();
|
|
28603
28634
|
var QO = Object.defineProperty, XO = Object.getOwnPropertyDescriptor, Xl = (s, t, e, r) => {
|
|
28604
28635
|
for (var i = r > 1 ? void 0 : r ? XO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
28605
28636
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
28606
28637
|
return r && i && QO(t, e, i), i;
|
|
28607
|
-
}, Ge,
|
|
28638
|
+
}, Ge, tn, Kg;
|
|
28608
28639
|
let ei = (Kg = class {
|
|
28609
28640
|
/**
|
|
28610
28641
|
* @param {IContext} context
|
|
@@ -28612,11 +28643,11 @@ let ei = (Kg = class {
|
|
|
28612
28643
|
*/
|
|
28613
28644
|
constructor(t, e) {
|
|
28614
28645
|
m(this, Ge, void 0);
|
|
28615
|
-
m(this,
|
|
28616
|
-
f(this,
|
|
28646
|
+
m(this, tn, void 0);
|
|
28647
|
+
f(this, tn, t), f(this, Ge, e);
|
|
28617
28648
|
}
|
|
28618
28649
|
get peerId() {
|
|
28619
|
-
return n(this,
|
|
28650
|
+
return n(this, tn).getValue("peerId");
|
|
28620
28651
|
}
|
|
28621
28652
|
/**
|
|
28622
28653
|
* @param {Object} [options]
|
|
@@ -28629,7 +28660,7 @@ let ei = (Kg = class {
|
|
|
28629
28660
|
static initMedia() {
|
|
28630
28661
|
return u(this, arguments, function* (t = {}, e = !1, r = void 0) {
|
|
28631
28662
|
var d;
|
|
28632
|
-
const i = (d = r == null ? void 0 : r.peerId) != null ? d :
|
|
28663
|
+
const i = (d = r == null ? void 0 : r.peerId) != null ? d : an(), a = mr.createContext(i, {
|
|
28633
28664
|
peerId: i
|
|
28634
28665
|
}), o = a.getValue("logger");
|
|
28635
28666
|
o.init(a);
|
|
@@ -28641,7 +28672,7 @@ let ei = (Kg = class {
|
|
|
28641
28672
|
return u(this, null, function* () {
|
|
28642
28673
|
var S, P, _, w, L, F, N;
|
|
28643
28674
|
ye.init();
|
|
28644
|
-
const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (P = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : P.peerId) != null ? _ :
|
|
28675
|
+
const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (P = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : P.peerId) != null ? _ : an()), { authToken: i, baseURI: a } = t, C = KO(i, a), { meetingId: o } = C, c = io(C, ["meetingId"]);
|
|
28645
28676
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
|
|
28646
28677
|
const d = ei.setupContext(
|
|
28647
28678
|
r,
|
|
@@ -28677,7 +28708,7 @@ let ei = (Kg = class {
|
|
|
28677
28708
|
video: !0
|
|
28678
28709
|
};
|
|
28679
28710
|
return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", lw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
28680
|
-
})), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.
|
|
28711
|
+
})), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
|
|
28681
28712
|
}
|
|
28682
28713
|
join() {
|
|
28683
28714
|
return u(this, null, function* () {
|
|
@@ -28690,7 +28721,7 @@ let ei = (Kg = class {
|
|
|
28690
28721
|
*/
|
|
28691
28722
|
leave(t) {
|
|
28692
28723
|
return u(this, null, function* () {
|
|
28693
|
-
bg.cleanup(), n(this,
|
|
28724
|
+
bg.cleanup(), n(this, tn).getValue("peerSessionStore").reset();
|
|
28694
28725
|
const { selfController: e } = n(this, Ge);
|
|
28695
28726
|
return e.leaveRoom(t);
|
|
28696
28727
|
});
|
|
@@ -28782,7 +28813,7 @@ let ei = (Kg = class {
|
|
|
28782
28813
|
return n(this, Ge).storesManager;
|
|
28783
28814
|
}
|
|
28784
28815
|
get audio() {
|
|
28785
|
-
return n(this,
|
|
28816
|
+
return n(this, tn).getValue("audioPlayback");
|
|
28786
28817
|
}
|
|
28787
28818
|
/**
|
|
28788
28819
|
* The __internals__ object exposes the internal tools & utilities such as features and logger
|
|
@@ -28809,7 +28840,7 @@ let ei = (Kg = class {
|
|
|
28809
28840
|
return this.leave(t);
|
|
28810
28841
|
});
|
|
28811
28842
|
}
|
|
28812
|
-
}, Ge = new WeakMap(),
|
|
28843
|
+
}, Ge = new WeakMap(), tn = new WeakMap(), Kg);
|
|
28813
28844
|
Xl([
|
|
28814
28845
|
ut("0002"),
|
|
28815
28846
|
Pr.executeWithLock({
|