@cloudflare/realtimekit 2.0.2-staging.1 → 2.0.2-staging.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +2 -2
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +850 -850
- package/dist/index.es5.js +2 -2
- package/dist/index.rn.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -29,20 +29,20 @@ var a = (s, t, e) => (Bl(s, t, "read from private field"), e ? e.call(s) : t.get
|
|
|
29
29
|
}, S = (s, t, e, r) => (Bl(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e);
|
|
30
30
|
var V = (s, t, e) => (Bl(s, t, "access private method"), e), Hh = (s, t, e) => BS($S(s), e, t);
|
|
31
31
|
var u = (s, t, e) => new Promise((r, i) => {
|
|
32
|
-
var n = (
|
|
32
|
+
var n = (d) => {
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
c(e.next(d));
|
|
35
35
|
} catch (l) {
|
|
36
36
|
i(l);
|
|
37
37
|
}
|
|
38
|
-
}, o = (
|
|
38
|
+
}, o = (d) => {
|
|
39
39
|
try {
|
|
40
|
-
|
|
40
|
+
c(e.throw(d));
|
|
41
41
|
} catch (l) {
|
|
42
42
|
i(l);
|
|
43
43
|
}
|
|
44
|
-
},
|
|
45
|
-
|
|
44
|
+
}, c = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(n, o);
|
|
45
|
+
c((e = e.apply(s, t)).next());
|
|
46
46
|
});
|
|
47
47
|
import { v4 as ga, validate as Dg } from "uuid";
|
|
48
48
|
import Og from "bowser";
|
|
@@ -72,7 +72,7 @@ const jS = (s) => {
|
|
|
72
72
|
}), window.addEventListener(
|
|
73
73
|
"unhandledrejection",
|
|
74
74
|
(t) => {
|
|
75
|
-
var e, r, i, n, o,
|
|
75
|
+
var e, r, i, n, o, c, d, l;
|
|
76
76
|
s.error(
|
|
77
77
|
"window::unhandledrejection",
|
|
78
78
|
{
|
|
@@ -85,8 +85,8 @@ const jS = (s) => {
|
|
|
85
85
|
networkCall: {
|
|
86
86
|
url: (r = (e = t == null ? void 0 : t.reason) == null ? void 0 : e.config) == null ? void 0 : r.url,
|
|
87
87
|
baseURL: (n = (i = t == null ? void 0 : t.reason) == null ? void 0 : i.config) == null ? void 0 : n.baseURL,
|
|
88
|
-
method: (
|
|
89
|
-
status: (
|
|
88
|
+
method: (c = (o = t == null ? void 0 : t.reason) == null ? void 0 : o.config) == null ? void 0 : c.method,
|
|
89
|
+
status: (d = t == null ? void 0 : t.reason) == null ? void 0 : d.status,
|
|
90
90
|
statusText: (l = t == null ? void 0 : t.reason) == null ? void 0 : l.statusText
|
|
91
91
|
}
|
|
92
92
|
},
|
|
@@ -636,16 +636,16 @@ ce.prototype.emit = function(t) {
|
|
|
636
636
|
var o;
|
|
637
637
|
if (e.length > 0 && (o = e[0]), o instanceof Error)
|
|
638
638
|
throw o;
|
|
639
|
-
var
|
|
640
|
-
throw
|
|
639
|
+
var c = new Error("Unhandled error." + (o ? " (" + o.message + ")" : ""));
|
|
640
|
+
throw c.context = o, c;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
643
|
-
if (
|
|
642
|
+
var d = n[t];
|
|
643
|
+
if (d === void 0)
|
|
644
644
|
return !1;
|
|
645
|
-
if (typeof
|
|
646
|
-
Fh(
|
|
645
|
+
if (typeof d == "function")
|
|
646
|
+
Fh(d, this, e);
|
|
647
647
|
else
|
|
648
|
-
for (var l =
|
|
648
|
+
for (var l = d.length, h = Jg(d, l), r = 0; r < l; ++r)
|
|
649
649
|
Fh(h[r], this, e);
|
|
650
650
|
return !0;
|
|
651
651
|
};
|
|
@@ -659,8 +659,8 @@ function qg(s, t, e, r) {
|
|
|
659
659
|
o = n[t] = e, ++s._eventsCount;
|
|
660
660
|
else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), i = Fg(s), i > 0 && o.length > i && !o.warned) {
|
|
661
661
|
o.warned = !0;
|
|
662
|
-
var
|
|
663
|
-
|
|
662
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
663
|
+
c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, ZS(c);
|
|
664
664
|
}
|
|
665
665
|
return s;
|
|
666
666
|
}
|
|
@@ -686,7 +686,7 @@ ce.prototype.prependOnceListener = function(t, e) {
|
|
|
686
686
|
return fl(e), this.prependListener(t, jg(this, t, e)), this;
|
|
687
687
|
};
|
|
688
688
|
ce.prototype.removeListener = function(t, e) {
|
|
689
|
-
var r, i, n, o,
|
|
689
|
+
var r, i, n, o, c;
|
|
690
690
|
if (fl(e), i = this._events, i === void 0)
|
|
691
691
|
return this;
|
|
692
692
|
if (r = i[t], r === void 0)
|
|
@@ -696,12 +696,12 @@ ce.prototype.removeListener = function(t, e) {
|
|
|
696
696
|
else if (typeof r != "function") {
|
|
697
697
|
for (n = -1, o = r.length - 1; o >= 0; o--)
|
|
698
698
|
if (r[o] === e || r[o].listener === e) {
|
|
699
|
-
|
|
699
|
+
c = r[o].listener, n = o;
|
|
700
700
|
break;
|
|
701
701
|
}
|
|
702
702
|
if (n < 0)
|
|
703
703
|
return this;
|
|
704
|
-
n === 0 ? r.shift() : tv(r, n), r.length === 1 && (i[t] = r[0]), i.removeListener !== void 0 && this.emit("removeListener", t,
|
|
704
|
+
n === 0 ? r.shift() : tv(r, n), r.length === 1 && (i[t] = r[0]), i.removeListener !== void 0 && this.emit("removeListener", t, c || e);
|
|
705
705
|
}
|
|
706
706
|
return this;
|
|
707
707
|
};
|
|
@@ -991,7 +991,7 @@ function lv({ framesEncoded: s }) {
|
|
|
991
991
|
return s === 0;
|
|
992
992
|
}
|
|
993
993
|
function rm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r, jitter: i, isScreenShare: n, framesEncoded: o }) {
|
|
994
|
-
const
|
|
994
|
+
const c = Zs({
|
|
995
995
|
stat: tm({
|
|
996
996
|
packetsLost: e,
|
|
997
997
|
packetsSent: r
|
|
@@ -1000,7 +1000,7 @@ function rm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
1000
1000
|
rangeMin: 0,
|
|
1001
1001
|
rangeMax: Sl,
|
|
1002
1002
|
rangeRankingDirection: "UP"
|
|
1003
|
-
}),
|
|
1003
|
+
}), d = Zs({
|
|
1004
1004
|
stat: i,
|
|
1005
1005
|
weight: 1,
|
|
1006
1006
|
rangeMin: vl,
|
|
@@ -1020,8 +1020,8 @@ function rm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
1020
1020
|
isLowQualityVideo: l,
|
|
1021
1021
|
isVideoLagging: h,
|
|
1022
1022
|
isVideoStuck: g,
|
|
1023
|
-
jitterQuality:
|
|
1024
|
-
packetsLostQuality:
|
|
1023
|
+
jitterQuality: d,
|
|
1024
|
+
packetsLostQuality: c
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
1027
|
function im({ packetsLost: s, packetsReceived: t }) {
|
|
@@ -1034,7 +1034,7 @@ function nm({ concealmentEvents: s, packetsLost: t, packetsReceived: e, jitter:
|
|
|
1034
1034
|
rangeMin: 0,
|
|
1035
1035
|
rangeMax: 3,
|
|
1036
1036
|
rangeRankingDirection: "UP"
|
|
1037
|
-
}), o = 0.5,
|
|
1037
|
+
}), o = 0.5, c = Zs({
|
|
1038
1038
|
stat: im({
|
|
1039
1039
|
packetsLost: t,
|
|
1040
1040
|
packetsReceived: e
|
|
@@ -1050,7 +1050,7 @@ function nm({ concealmentEvents: s, packetsLost: t, packetsReceived: e, jitter:
|
|
|
1050
1050
|
rangeMax: Tl,
|
|
1051
1051
|
rangeRankingDirection: "UP"
|
|
1052
1052
|
});
|
|
1053
|
-
return n +
|
|
1053
|
+
return n + c + l;
|
|
1054
1054
|
}
|
|
1055
1055
|
function uv({ framesDecoded: s }) {
|
|
1056
1056
|
return s === 0;
|
|
@@ -1062,7 +1062,7 @@ function pv({ frameWidth: s, isScreenShare: t }) {
|
|
|
1062
1062
|
return s < (t ? Qg : Yg);
|
|
1063
1063
|
}
|
|
1064
1064
|
function am({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived: r, jitter: i, isScreenShare: n, framesDecoded: o }) {
|
|
1065
|
-
const
|
|
1065
|
+
const c = Zs({
|
|
1066
1066
|
stat: im({
|
|
1067
1067
|
packetsLost: e,
|
|
1068
1068
|
packetsReceived: r
|
|
@@ -1071,7 +1071,7 @@ function am({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
1071
1071
|
rangeMin: 0,
|
|
1072
1072
|
rangeMax: Sl,
|
|
1073
1073
|
rangeRankingDirection: "UP"
|
|
1074
|
-
}),
|
|
1074
|
+
}), d = Zs({
|
|
1075
1075
|
stat: i,
|
|
1076
1076
|
weight: 1,
|
|
1077
1077
|
rangeMin: vl,
|
|
@@ -1091,8 +1091,8 @@ function am({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
1091
1091
|
isLowQualityVideo: l,
|
|
1092
1092
|
isVideoLagging: h,
|
|
1093
1093
|
isVideoStuck: g,
|
|
1094
|
-
jitterQuality:
|
|
1095
|
-
packetsLostQuality:
|
|
1094
|
+
jitterQuality: d,
|
|
1095
|
+
packetsLostQuality: c
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
1098
1098
|
class sr {
|
|
@@ -1323,23 +1323,23 @@ class yv {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
getIPDetails(i) {
|
|
1325
1325
|
return u(this, arguments, function* ({ peerId: t, apiHostnames: e, logger: r }) {
|
|
1326
|
-
var n, o,
|
|
1326
|
+
var n, o, c;
|
|
1327
1327
|
if (!this.ipInformation) {
|
|
1328
1328
|
try {
|
|
1329
|
-
const
|
|
1329
|
+
const d = `https://${e.location}`, h = yield (yield fetch(d)).json();
|
|
1330
1330
|
if (((n = h.loc) == null ? void 0 : n.length) > 5)
|
|
1331
1331
|
return this.ipInformation = h, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Hr(this.ipInformation.ip)), h;
|
|
1332
1332
|
throw Error("Insufficient data");
|
|
1333
|
-
} catch (
|
|
1334
|
-
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error:
|
|
1333
|
+
} catch (d) {
|
|
1334
|
+
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
1335
1335
|
}
|
|
1336
1336
|
try {
|
|
1337
|
-
const
|
|
1337
|
+
const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
|
|
1338
1338
|
method: "POST"
|
|
1339
1339
|
});
|
|
1340
|
-
this.ipInformation = yield
|
|
1341
|
-
} catch (
|
|
1342
|
-
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error:
|
|
1340
|
+
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Hr(this.ipInformation.ip));
|
|
1341
|
+
} catch (d) {
|
|
1342
|
+
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
return this.ipInformation;
|
|
@@ -1430,13 +1430,13 @@ class lm extends st {
|
|
|
1430
1430
|
this.pausedProducerMap.delete(e);
|
|
1431
1431
|
}
|
|
1432
1432
|
processInboundConsumerVideoStats(e, r, i) {
|
|
1433
|
-
var o,
|
|
1434
|
-
const n = ((
|
|
1433
|
+
var o, c;
|
|
1434
|
+
const n = ((c = (o = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : o.consumerSharedMediaStatesMap) == null ? void 0 : c.get(e)) || {};
|
|
1435
1435
|
r.totalVideoPacketsReceived === i.packetsReceived ? (this.consumerIdsWithFreezedVideo.add(e), this.callStatsInstance && n.video && (this.callStatsInstance.logger.debug("callstats::measurements::consumerVideoFreezed", { consumerId: e }), this.callStatsInstance.eventHandler.emit("consumer_video_status", "pause", e))) : (r.totalVideoPacketsReceived = i.packetsReceived, this.consumerIdsWithFreezedVideo.has(e) && (this.consumerIdsWithFreezedVideo.delete(e), this.callStatsInstance && n.video && (this.callStatsInstance.logger.debug("callstats::measurements::consumerVideoDefreezed", { consumerId: e }), this.callStatsInstance.eventHandler.emit("consumer_video_status", "resume", e))));
|
|
1436
1436
|
}
|
|
1437
1437
|
processInboundConsumerAudioStats(e, r, i) {
|
|
1438
|
-
var o,
|
|
1439
|
-
const n = ((
|
|
1438
|
+
var o, c;
|
|
1439
|
+
const n = ((c = (o = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : o.consumerSharedMediaStatesMap) == null ? void 0 : c.get(e)) || {};
|
|
1440
1440
|
r.totalAudioPacketsReceived === i.packetsReceived ? (this.consumerIdsWithFreezedAudio.add(e), this.callStatsInstance && n.audio && (this.callStatsInstance.logger.debug("callStats::measurements::consumerAudioFreezed", { consumerId: e }), this.callStatsInstance.eventHandler.emit("consumer_audio_status", "pause", e))) : (r.totalAudioPacketsReceived = i.packetsReceived, this.consumerIdsWithFreezedAudio.has(e) && (this.consumerIdsWithFreezedAudio.delete(e), this.callStatsInstance && n.audio && (this.callStatsInstance.logger.debug("callStats::measurements::consumerAudioDefreezed", { consumerId: e }), this.callStatsInstance.eventHandler.emit("consumer_audio_status", "resume", e))));
|
|
1441
1441
|
}
|
|
1442
1442
|
processOutboundProducerVideoStats(e, r, i) {
|
|
@@ -1451,12 +1451,12 @@ class lm extends st {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
processProducingTransportStats(e, r, i) {
|
|
1453
1453
|
var h;
|
|
1454
|
-
const n = ((h = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : h.currentUserMediaStates) || {}, { audio: o, video:
|
|
1454
|
+
const n = ((h = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : h.currentUserMediaStates) || {}, { audio: o, video: c, screen: d } = n, l = o || c || d;
|
|
1455
1455
|
r.totalPacketsSent === i.packetsSent ? (this.freezedProducingTransportIds.add(e), this.callStatsInstance && l && (this.callStatsInstance.logger.debug("callStats::measurements::producingTransportFreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("producing_transport_status", "pause", e))) : (r.totalPacketsSent = i.packetsSent, this.freezedProducingTransportIds.has(e) && (this.freezedProducingTransportIds.delete(e), this.callStatsInstance && l && (this.callStatsInstance.logger.debug("callStats::measurements::producingTransportDefreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("producing_transport_status", "resume", e))));
|
|
1456
1456
|
}
|
|
1457
1457
|
processConsumingTransportStats(e, r, i) {
|
|
1458
|
-
var
|
|
1459
|
-
const o = !!Array.from(((
|
|
1458
|
+
var c, d;
|
|
1459
|
+
const o = !!Array.from(((d = (c = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : c.consumerSharedMediaStatesMap) == null ? void 0 : d.values()) || []).reduce((l, h) => l || h.audio || h.video || h.screen, !1);
|
|
1460
1460
|
r.totalPacketsReceived === i.packetsSent ? (this.freezedConsumingTransportIds.add(e), this.callStatsInstance && o && (this.callStatsInstance.logger.debug("callStats::measurements::consumingTransportFreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("consuming_transport_status", "pause", e))) : (r.totalPacketsReceived = i.packetsSent, this.freezedConsumingTransportIds.has(e) && (this.freezedConsumingTransportIds.delete(e), this.callStatsInstance && o && (this.callStatsInstance.logger.debug("callStats::measurements::consumingTransportDefreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("consuming_transport_status", "resume", e))));
|
|
1461
1461
|
}
|
|
1462
1462
|
registerConsumer(e) {
|
|
@@ -1530,14 +1530,14 @@ class lm extends st {
|
|
|
1530
1530
|
// eslint-disable-next-line class-methods-use-this
|
|
1531
1531
|
getWorkingSimulcastVideoStats(e) {
|
|
1532
1532
|
return e.find((i) => {
|
|
1533
|
-
const n = i.framesEncoded > 0, o = i.packetsSent > 0,
|
|
1534
|
-
return n && o && !!
|
|
1533
|
+
const n = i.framesEncoded > 0, o = i.packetsSent > 0, c = i.frameWidth && i.frameHeight;
|
|
1534
|
+
return n && o && !!c;
|
|
1535
1535
|
}) || e[e.length - 1];
|
|
1536
1536
|
}
|
|
1537
1537
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
1538
1538
|
var _, w, R, D, U, B, F, H, X, Le, yt, Qt, Yr;
|
|
1539
|
-
const
|
|
1540
|
-
for (const I of
|
|
1539
|
+
const c = e, d = new dm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1540
|
+
for (const I of c.values()) {
|
|
1541
1541
|
if (l) {
|
|
1542
1542
|
if (l.size === 0)
|
|
1543
1543
|
break;
|
|
@@ -1573,7 +1573,7 @@ class lm extends st {
|
|
|
1573
1573
|
packetsReceived: $.packetsReceived,
|
|
1574
1574
|
packetsDiscardedOnSend: $.packetsDiscardedOnSend
|
|
1575
1575
|
};
|
|
1576
|
-
f.push(ve), (I.nominated === !0 || I.selected === !0) && (
|
|
1576
|
+
f.push(ve), (I.nominated === !0 || I.selected === !0) && (d.candidatePair = ve);
|
|
1577
1577
|
break;
|
|
1578
1578
|
}
|
|
1579
1579
|
case "transport": {
|
|
@@ -1594,7 +1594,7 @@ class lm extends st {
|
|
|
1594
1594
|
// @ts-ignore
|
|
1595
1595
|
iceRole: y.iceRole
|
|
1596
1596
|
};
|
|
1597
|
-
if (
|
|
1597
|
+
if (d.transport = C, o) {
|
|
1598
1598
|
if (o.producing) {
|
|
1599
1599
|
const $ = this.overallProducingTransportsStatsMap[o.id];
|
|
1600
1600
|
this.processProducingTransportStats(o.id, $, C);
|
|
@@ -1615,7 +1615,7 @@ class lm extends st {
|
|
|
1615
1615
|
totalRoundTripTime: y.totalRoundTripTime,
|
|
1616
1616
|
packetsLost: y.packetsLost
|
|
1617
1617
|
};
|
|
1618
|
-
|
|
1618
|
+
d.remoteInboundRtp.set(y.localId, C);
|
|
1619
1619
|
break;
|
|
1620
1620
|
}
|
|
1621
1621
|
case "outbound-rtp": {
|
|
@@ -1636,13 +1636,13 @@ class lm extends st {
|
|
|
1636
1636
|
const ve = this.overallProducersStatsMap[C];
|
|
1637
1637
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
1638
1638
|
if (!this.outboundProducerMap.has(I.id)) {
|
|
1639
|
-
|
|
1639
|
+
d.staleProducerStreamMap = !0;
|
|
1640
1640
|
break;
|
|
1641
1641
|
}
|
|
1642
1642
|
const Pe = this.callStatsInstance.producers.get(C);
|
|
1643
1643
|
if (((_ = Pe == null ? void 0 : Pe.track) == null ? void 0 : _.readyState) === "ended")
|
|
1644
1644
|
break;
|
|
1645
|
-
|
|
1645
|
+
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
1646
1646
|
outboundVideoRtpId: [],
|
|
1647
1647
|
outboundAudioRtpId: []
|
|
1648
1648
|
});
|
|
@@ -1683,13 +1683,13 @@ class lm extends st {
|
|
|
1683
1683
|
scalabilityMode: A.scalabilityMode,
|
|
1684
1684
|
powerEfficientEncoder: A.powerEfficientEncoder
|
|
1685
1685
|
}, L);
|
|
1686
|
-
|
|
1686
|
+
d.outboundVideoRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ve, Ae);
|
|
1687
1687
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
1688
1688
|
const A = y, Ae = N({
|
|
1689
1689
|
retransmittedBytesSent: A.retransmittedBytesSent,
|
|
1690
1690
|
retransmittedPacketsSent: A.retransmittedPacketsSent
|
|
1691
1691
|
}, L);
|
|
1692
|
-
|
|
1692
|
+
d.outboundAudioRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundAudioRtpId.push(I.id), this.processOutboundProducerAudioStats(C, ve, Ae);
|
|
1693
1693
|
}
|
|
1694
1694
|
} else
|
|
1695
1695
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -1715,10 +1715,10 @@ class lm extends st {
|
|
|
1715
1715
|
const ve = this.overallConsumersStatsMap[C];
|
|
1716
1716
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
1717
1717
|
if (!this.inboundConsumerMap.has(I.id)) {
|
|
1718
|
-
|
|
1718
|
+
d.staleConsumerStreamMap = !0;
|
|
1719
1719
|
break;
|
|
1720
1720
|
}
|
|
1721
|
-
|
|
1721
|
+
d.consumerStreamMap.has(C) || d.consumerStreamMap.set(C, {
|
|
1722
1722
|
inboundVideoRtpId: [],
|
|
1723
1723
|
inboundAudioRtpId: []
|
|
1724
1724
|
});
|
|
@@ -1784,7 +1784,7 @@ class lm extends st {
|
|
|
1784
1784
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
1785
1785
|
bitrate: ((A.bytesReceived || 0) - (((F = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : F.bytesReceived) || 0)) * 8 / 7
|
|
1786
1786
|
// Bytes received in last 7 seconds
|
|
1787
|
-
}), this.videoConsumerToStatsMap.set(C, A),
|
|
1787
|
+
}), this.videoConsumerToStatsMap.set(C, A), d.inboundVideoRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ve, A);
|
|
1788
1788
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
1789
1789
|
const L = y, A = N({
|
|
1790
1790
|
audioLevel: L.audioLevel,
|
|
@@ -1815,7 +1815,7 @@ class lm extends st {
|
|
|
1815
1815
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
1816
1816
|
bitrate: ((A.bytesReceived || 0) - (((Yr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Yr.bytesReceived) || 0)) * 8 / 7
|
|
1817
1817
|
// Bytes received in last 7 seconds
|
|
1818
|
-
}), this.audioConsumerToStatsMap.set(C, A),
|
|
1818
|
+
}), this.audioConsumerToStatsMap.set(C, A), d.inboundAudioRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundAudioRtpId.push(I.id), this.processInboundConsumerAudioStats(C, ve, A);
|
|
1819
1819
|
}
|
|
1820
1820
|
} else
|
|
1821
1821
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -1823,12 +1823,12 @@ class lm extends st {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
|
-
if (
|
|
1826
|
+
if (d.producerStreamMap.forEach((I, y) => {
|
|
1827
1827
|
var C, $, ve, Pe, L, A, Ae, _a, Ca, wa, Ra, ba, ka, Aa, Ia, Ma, Da, Oa, Na, La, Va, xa, Ua;
|
|
1828
1828
|
if (I.outboundVideoRtpId.length > 0) {
|
|
1829
1829
|
const ue = [];
|
|
1830
1830
|
I.outboundVideoRtpId.forEach((Ul) => {
|
|
1831
|
-
ue.push(
|
|
1831
|
+
ue.push(d.outboundVideoRtp.get(Ul));
|
|
1832
1832
|
});
|
|
1833
1833
|
const Z = this.getWorkingSimulcastVideoStats(ue);
|
|
1834
1834
|
Z.score = rm({
|
|
@@ -1856,7 +1856,7 @@ class lm extends st {
|
|
|
1856
1856
|
bandwidthLimitations: Z.qualityLimitationReason === "bandwidth"
|
|
1857
1857
|
}), this.videoProducerToStatsMap.set(y, Z);
|
|
1858
1858
|
} else if (I.outboundAudioRtpId.length > 0) {
|
|
1859
|
-
const ue =
|
|
1859
|
+
const ue = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
1860
1860
|
ue.score = sm({
|
|
1861
1861
|
packetsSent: (ue.packetsSent || 0) - (((ka = this.audioProducerToStatsMap.get(y)) == null ? void 0 : ka.packetsSent) || 0),
|
|
1862
1862
|
packetsLost: (((Aa = ue.remoteData) == null ? void 0 : Aa.packetsLost) || 0) - (((Ma = (Ia = this.audioProducerToStatsMap.get(y)) == null ? void 0 : Ia.remoteData) == null ? void 0 : Ma.packetsLost) || 0),
|
|
@@ -1876,19 +1876,19 @@ class lm extends st {
|
|
|
1876
1876
|
}), f.forEach((I) => {
|
|
1877
1877
|
const y = h.find(($) => $.id === I.localCandidateId ? (I.localCandidateId = $.id, $) : null), C = g.find(($) => $.id === I.remoteCandidateId ? (I.remoteCandidateId = $.id, $) : null);
|
|
1878
1878
|
y && (I.localCandidateType = y.type, I.localCandidateAddress = Hr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = Hr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Hr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
1879
|
-
}),
|
|
1879
|
+
}), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
1880
1880
|
// candidateStats: result.candidatePair,
|
|
1881
|
-
bytesReceived:
|
|
1882
|
-
bytesSent:
|
|
1883
|
-
totalRoundTripTime:
|
|
1884
|
-
availableOutgoingBitrate:
|
|
1885
|
-
availableIncomingBitrate:
|
|
1886
|
-
roundTripTime:
|
|
1887
|
-
}),
|
|
1881
|
+
bytesReceived: d.candidatePair.bytesReceived,
|
|
1882
|
+
bytesSent: d.candidatePair.bytesSent,
|
|
1883
|
+
totalRoundTripTime: d.candidatePair.totalRoundTripTime,
|
|
1884
|
+
availableOutgoingBitrate: d.candidatePair.availableOutgoingBitrate,
|
|
1885
|
+
availableIncomingBitrate: d.candidatePair.availableIncomingBitrate,
|
|
1886
|
+
roundTripTime: d.candidatePair.currentRoundTripTime
|
|
1887
|
+
}), d.transport && (d.transport.candidatePairs = f), d.transport && !d.transport.roundTripTime) {
|
|
1888
1888
|
let I = 0, y = 0;
|
|
1889
|
-
|
|
1889
|
+
d.remoteInboundRtp.forEach((C, $) => {
|
|
1890
1890
|
C.roundTripTime && C.roundTripTime > I && (I = C.roundTripTime, y = C.totalRoundTripTime);
|
|
1891
|
-
}),
|
|
1891
|
+
}), d.transport.roundTripTime = I, d.transport.totalRoundTripTime = y;
|
|
1892
1892
|
}
|
|
1893
1893
|
if (E.size > 0)
|
|
1894
1894
|
try {
|
|
@@ -1900,7 +1900,7 @@ class lm extends st {
|
|
|
1900
1900
|
this.observer.emit("producer_score", v);
|
|
1901
1901
|
} catch (I) {
|
|
1902
1902
|
}
|
|
1903
|
-
return
|
|
1903
|
+
return d;
|
|
1904
1904
|
}
|
|
1905
1905
|
getProducersReport(e) {
|
|
1906
1906
|
return u(this, null, function* () {
|
|
@@ -1922,15 +1922,15 @@ class lm extends st {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
getProcessedStats(e, r, i) {
|
|
1924
1924
|
return u(this, null, function* () {
|
|
1925
|
-
const n = yield this.getTransportReport(e), o = { producing: i, consuming: r, id: e.id },
|
|
1926
|
-
if (!
|
|
1925
|
+
const n = yield this.getTransportReport(e), o = { producing: i, consuming: r, id: e.id }, c = n, d = this.parseRTCReport(c, ["transport", "candidate-pair", "inbound-rtp", "outbound-rtp", "remote-inbound-rtp", "local-candidate", "remote-candidate"], !1, void 0, o);
|
|
1926
|
+
if (!d)
|
|
1927
1927
|
return;
|
|
1928
1928
|
const l = {
|
|
1929
|
-
stats:
|
|
1929
|
+
stats: d.transport,
|
|
1930
1930
|
transportId: e.id,
|
|
1931
1931
|
consuming: r,
|
|
1932
1932
|
producing: i
|
|
1933
|
-
}, h =
|
|
1933
|
+
}, h = d.staleProducerStreamMap ? void 0 : this.getProducerStatsFromReport(d), g = d.staleConsumerStreamMap ? void 0 : this.getConsumerStatsFromReport(d);
|
|
1934
1934
|
return {
|
|
1935
1935
|
transportReport: l,
|
|
1936
1936
|
producerReport: h,
|
|
@@ -1943,12 +1943,12 @@ class lm extends st {
|
|
|
1943
1943
|
const r = [];
|
|
1944
1944
|
try {
|
|
1945
1945
|
e.producerStreamMap.forEach((i, n) => {
|
|
1946
|
-
var o,
|
|
1946
|
+
var o, c;
|
|
1947
1947
|
r.push({
|
|
1948
1948
|
producerId: n,
|
|
1949
|
-
videoStats: i.outboundVideoRtpId.map((
|
|
1950
|
-
audioStats: i.outboundAudioRtpId.map((
|
|
1951
|
-
appData: ((
|
|
1949
|
+
videoStats: i.outboundVideoRtpId.map((d) => e.outboundVideoRtp.get(d)),
|
|
1950
|
+
audioStats: i.outboundAudioRtpId.map((d) => e.outboundAudioRtp.get(d)),
|
|
1951
|
+
appData: ((c = (o = this.callStatsInstance.producers) == null ? void 0 : o.get(n)) == null ? void 0 : c.appData) || null
|
|
1952
1952
|
});
|
|
1953
1953
|
});
|
|
1954
1954
|
} catch (i) {
|
|
@@ -1962,12 +1962,12 @@ class lm extends st {
|
|
|
1962
1962
|
const r = [];
|
|
1963
1963
|
try {
|
|
1964
1964
|
e.consumerStreamMap.forEach((i, n) => {
|
|
1965
|
-
const { peerId: o, producerId:
|
|
1965
|
+
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(n);
|
|
1966
1966
|
r.push({
|
|
1967
1967
|
consumerId: n,
|
|
1968
1968
|
peerId: o,
|
|
1969
|
-
producerId:
|
|
1970
|
-
appData:
|
|
1969
|
+
producerId: c,
|
|
1970
|
+
appData: d,
|
|
1971
1971
|
videoStats: i.inboundVideoRtpId.map((l) => e.inboundVideoRtp.get(l)),
|
|
1972
1972
|
audioStats: i.inboundAudioRtpId.map((l) => e.inboundAudioRtp.get(l))
|
|
1973
1973
|
});
|
|
@@ -2024,10 +2024,10 @@ class lm extends st {
|
|
|
2024
2024
|
} catch (f) {
|
|
2025
2025
|
g(f);
|
|
2026
2026
|
}
|
|
2027
|
-
}), [
|
|
2027
|
+
}), [c, d, l] = yield Promise.all([i, n, o]);
|
|
2028
2028
|
return {
|
|
2029
|
-
host:
|
|
2030
|
-
relay:
|
|
2029
|
+
host: c == null ? void 0 : c.connectivity,
|
|
2030
|
+
relay: d == null ? void 0 : d.connectivity,
|
|
2031
2031
|
reflexive: l == null ? void 0 : l.connectivity
|
|
2032
2032
|
};
|
|
2033
2033
|
} catch (r) {
|
|
@@ -2045,12 +2045,12 @@ class lm extends st {
|
|
|
2045
2045
|
try {
|
|
2046
2046
|
const i = yield new Promise((n, o) => {
|
|
2047
2047
|
try {
|
|
2048
|
-
const
|
|
2048
|
+
const c = {
|
|
2049
2049
|
iceServers: e || Wh
|
|
2050
|
-
},
|
|
2051
|
-
|
|
2052
|
-
} catch (
|
|
2053
|
-
o(
|
|
2050
|
+
}, d = new fv(c);
|
|
2051
|
+
d.addListener("done", n), d.addListener("failed", o), d.start(1e4);
|
|
2052
|
+
} catch (c) {
|
|
2053
|
+
o(c);
|
|
2054
2054
|
}
|
|
2055
2055
|
});
|
|
2056
2056
|
return {
|
|
@@ -2097,12 +2097,12 @@ class lm extends st {
|
|
|
2097
2097
|
}
|
|
2098
2098
|
getNetworkInfo(e, r = !1) {
|
|
2099
2099
|
return u(this, null, function* () {
|
|
2100
|
-
var
|
|
2100
|
+
var c, d;
|
|
2101
2101
|
if (r) {
|
|
2102
2102
|
const l = yield this.getIPDetails();
|
|
2103
2103
|
return {
|
|
2104
2104
|
ipDetails: l,
|
|
2105
|
-
effectiveNetworkType: (
|
|
2105
|
+
effectiveNetworkType: (c = navigator.connection) == null ? void 0 : c.effectiveType,
|
|
2106
2106
|
location: l != null && l.loc ? Jh(l == null ? void 0 : l.loc) : void 0
|
|
2107
2107
|
// userLocation,
|
|
2108
2108
|
};
|
|
@@ -2114,7 +2114,7 @@ class lm extends st {
|
|
|
2114
2114
|
]);
|
|
2115
2115
|
return {
|
|
2116
2116
|
ipDetails: o,
|
|
2117
|
-
effectiveNetworkType: (
|
|
2117
|
+
effectiveNetworkType: (d = navigator.connection) == null ? void 0 : d.effectiveType,
|
|
2118
2118
|
location: o != null && o.loc ? Jh(o == null ? void 0 : o.loc) : void 0,
|
|
2119
2119
|
// userLocation,
|
|
2120
2120
|
turnConnectivity: i ? i.host || i.relay || i.reflexive : !1,
|
|
@@ -2152,15 +2152,15 @@ class um extends lm {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
generateConsumerStreamMap(e, r = !1) {
|
|
2154
2154
|
return u(this, null, function* () {
|
|
2155
|
-
const i = yield e.getStats(), n = this.parseRTCReport(i, ["inbound-rtp"], !1, e.id), o = [...n.consumerStreamMap.values()][0],
|
|
2156
|
-
for (const
|
|
2157
|
-
switch (
|
|
2155
|
+
const i = yield e.getStats(), n = this.parseRTCReport(i, ["inbound-rtp"], !1, e.id), o = [...n.consumerStreamMap.values()][0], c = r ? this.getConsumerStatsFromParsedConsumerStats(n, o, e.id) : void 0;
|
|
2156
|
+
for (const d of i.values())
|
|
2157
|
+
switch (d.type) {
|
|
2158
2158
|
case "inbound-rtp": {
|
|
2159
|
-
this.inboundConsumerMap.set(
|
|
2159
|
+
this.inboundConsumerMap.set(d.id, e.id);
|
|
2160
2160
|
break;
|
|
2161
2161
|
}
|
|
2162
2162
|
}
|
|
2163
|
-
return
|
|
2163
|
+
return c;
|
|
2164
2164
|
});
|
|
2165
2165
|
}
|
|
2166
2166
|
deregisterProducer(e) {
|
|
@@ -2190,8 +2190,8 @@ class um extends lm {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
2192
2192
|
var _, w, R, D, U, B, F, H, X, Le, yt, Qt, Yr;
|
|
2193
|
-
const
|
|
2194
|
-
for (const I of
|
|
2193
|
+
const c = e, d = new dm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2194
|
+
for (const I of c.values()) {
|
|
2195
2195
|
if (l) {
|
|
2196
2196
|
if (l.size === 0)
|
|
2197
2197
|
break;
|
|
@@ -2227,7 +2227,7 @@ class um extends lm {
|
|
|
2227
2227
|
packetsReceived: $.packetsReceived,
|
|
2228
2228
|
packetsDiscardedOnSend: $.packetsDiscardedOnSend
|
|
2229
2229
|
};
|
|
2230
|
-
f.push(ve), (I.nominated === !0 || I.selected === !0) && (
|
|
2230
|
+
f.push(ve), (I.nominated === !0 || I.selected === !0) && (d.candidatePair = ve);
|
|
2231
2231
|
break;
|
|
2232
2232
|
}
|
|
2233
2233
|
case "transport": {
|
|
@@ -2246,7 +2246,7 @@ class um extends lm {
|
|
|
2246
2246
|
dtlsState: y.dtlsState,
|
|
2247
2247
|
iceRole: y.iceRole
|
|
2248
2248
|
};
|
|
2249
|
-
if (
|
|
2249
|
+
if (d.transport = C, o) {
|
|
2250
2250
|
if (o.producing) {
|
|
2251
2251
|
const $ = this.overallProducingTransportsStatsMap[o.id];
|
|
2252
2252
|
this.processProducingTransportStats(o.id, $, C);
|
|
@@ -2267,7 +2267,7 @@ class um extends lm {
|
|
|
2267
2267
|
totalRoundTripTime: y.totalRoundTripTime,
|
|
2268
2268
|
packetsLost: y.packetsLost
|
|
2269
2269
|
};
|
|
2270
|
-
|
|
2270
|
+
d.remoteInboundRtp.set(y.localId, C);
|
|
2271
2271
|
break;
|
|
2272
2272
|
}
|
|
2273
2273
|
case "outbound-rtp": {
|
|
@@ -2288,13 +2288,13 @@ class um extends lm {
|
|
|
2288
2288
|
const ve = this.overallProducersStatsMap[C];
|
|
2289
2289
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
2290
2290
|
if (!this.outboundProducerMap.has(I.id)) {
|
|
2291
|
-
|
|
2291
|
+
d.staleProducerStreamMap = !0;
|
|
2292
2292
|
break;
|
|
2293
2293
|
}
|
|
2294
2294
|
const Pe = this.callStatsInstance.producers.get(C);
|
|
2295
2295
|
if (((_ = Pe == null ? void 0 : Pe.track) == null ? void 0 : _.readyState) === "ended")
|
|
2296
2296
|
break;
|
|
2297
|
-
|
|
2297
|
+
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
2298
2298
|
outboundVideoRtpId: [],
|
|
2299
2299
|
outboundAudioRtpId: []
|
|
2300
2300
|
});
|
|
@@ -2333,13 +2333,13 @@ class um extends lm {
|
|
|
2333
2333
|
scalabilityMode: A.scalabilityMode,
|
|
2334
2334
|
powerEfficientEncoder: A.powerEfficientEncoder
|
|
2335
2335
|
}, L);
|
|
2336
|
-
|
|
2336
|
+
d.outboundVideoRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ve, Ae);
|
|
2337
2337
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
2338
2338
|
const A = y, Ae = N({
|
|
2339
2339
|
retransmittedBytesSent: A.retransmittedBytesSent,
|
|
2340
2340
|
retransmittedPacketsSent: A.retransmittedPacketsSent
|
|
2341
2341
|
}, L);
|
|
2342
|
-
|
|
2342
|
+
d.outboundAudioRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundAudioRtpId.push(I.id), this.processOutboundProducerAudioStats(C, ve, Ae);
|
|
2343
2343
|
}
|
|
2344
2344
|
} else
|
|
2345
2345
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -2365,10 +2365,10 @@ class um extends lm {
|
|
|
2365
2365
|
const ve = this.overallConsumersStatsMap[C];
|
|
2366
2366
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
2367
2367
|
if (!this.inboundConsumerMap.has(I.id)) {
|
|
2368
|
-
|
|
2368
|
+
d.staleConsumerStreamMap = !0;
|
|
2369
2369
|
break;
|
|
2370
2370
|
}
|
|
2371
|
-
|
|
2371
|
+
d.consumerStreamMap.has(C) || d.consumerStreamMap.set(C, {
|
|
2372
2372
|
inboundVideoRtpId: [],
|
|
2373
2373
|
inboundAudioRtpId: []
|
|
2374
2374
|
});
|
|
@@ -2434,7 +2434,7 @@ class um extends lm {
|
|
|
2434
2434
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
2435
2435
|
bitrate: ((A.bytesReceived || 0) - (((F = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : F.bytesReceived) || 0)) * 8 / 7
|
|
2436
2436
|
// Bytes received in last 7 seconds
|
|
2437
|
-
}), this.videoConsumerToStatsMap.set(C, A),
|
|
2437
|
+
}), this.videoConsumerToStatsMap.set(C, A), d.inboundVideoRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ve, A);
|
|
2438
2438
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
2439
2439
|
const L = y, A = N({
|
|
2440
2440
|
audioLevel: L.audioLevel,
|
|
@@ -2465,7 +2465,7 @@ class um extends lm {
|
|
|
2465
2465
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
2466
2466
|
bitrate: ((A.bytesReceived || 0) - (((Yr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : Yr.bytesReceived) || 0)) * 8 / 7
|
|
2467
2467
|
// Bytes received in last 7 seconds
|
|
2468
|
-
}), this.audioConsumerToStatsMap.set(C, A),
|
|
2468
|
+
}), this.audioConsumerToStatsMap.set(C, A), d.inboundAudioRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundAudioRtpId.push(I.id), this.processInboundConsumerAudioStats(C, ve, A);
|
|
2469
2469
|
}
|
|
2470
2470
|
} else
|
|
2471
2471
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -2473,12 +2473,12 @@ class um extends lm {
|
|
|
2473
2473
|
}
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
2476
|
-
if (
|
|
2476
|
+
if (d.producerStreamMap.forEach((I, y) => {
|
|
2477
2477
|
var C, $, ve, Pe, L, A, Ae, _a, Ca, wa, Ra, ba, ka, Aa, Ia, Ma, Da, Oa, Na, La, Va, xa, Ua;
|
|
2478
2478
|
if (I.outboundVideoRtpId.length > 0) {
|
|
2479
2479
|
const ue = [];
|
|
2480
2480
|
I.outboundVideoRtpId.forEach((Ul) => {
|
|
2481
|
-
ue.push(
|
|
2481
|
+
ue.push(d.outboundVideoRtp.get(Ul));
|
|
2482
2482
|
});
|
|
2483
2483
|
const Z = this.getWorkingSimulcastVideoStats(ue);
|
|
2484
2484
|
Z.score = rm({
|
|
@@ -2506,7 +2506,7 @@ class um extends lm {
|
|
|
2506
2506
|
bandwidthLimitations: Z.qualityLimitationReason === "bandwidth"
|
|
2507
2507
|
}), this.videoProducerToStatsMap.set(y, Z);
|
|
2508
2508
|
} else if (I.outboundAudioRtpId.length > 0) {
|
|
2509
|
-
const ue =
|
|
2509
|
+
const ue = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
2510
2510
|
ue.score = sm({
|
|
2511
2511
|
packetsSent: (ue.packetsSent || 0) - (((ka = this.audioProducerToStatsMap.get(y)) == null ? void 0 : ka.packetsSent) || 0),
|
|
2512
2512
|
packetsLost: (((Aa = ue.remoteData) == null ? void 0 : Aa.packetsLost) || 0) - (((Ma = (Ia = this.audioProducerToStatsMap.get(y)) == null ? void 0 : Ia.remoteData) == null ? void 0 : Ma.packetsLost) || 0),
|
|
@@ -2526,19 +2526,19 @@ class um extends lm {
|
|
|
2526
2526
|
}), f.forEach((I) => {
|
|
2527
2527
|
const y = h.find(($) => $.id === I.localCandidateId ? (I.localCandidateId = $.id, $) : null), C = g.find(($) => $.id === I.remoteCandidateId ? (I.remoteCandidateId = $.id, $) : null);
|
|
2528
2528
|
y && (I.localCandidateType = y.type, I.localCandidateAddress = Hr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = Hr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Hr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
2529
|
-
}),
|
|
2529
|
+
}), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
2530
2530
|
// candidateStats: result.candidatePair,
|
|
2531
|
-
bytesReceived:
|
|
2532
|
-
bytesSent:
|
|
2533
|
-
totalRoundTripTime:
|
|
2534
|
-
availableOutgoingBitrate:
|
|
2535
|
-
availableIncomingBitrate:
|
|
2536
|
-
roundTripTime:
|
|
2537
|
-
}),
|
|
2531
|
+
bytesReceived: d.candidatePair.bytesReceived,
|
|
2532
|
+
bytesSent: d.candidatePair.bytesSent,
|
|
2533
|
+
totalRoundTripTime: d.candidatePair.totalRoundTripTime,
|
|
2534
|
+
availableOutgoingBitrate: d.candidatePair.availableOutgoingBitrate,
|
|
2535
|
+
availableIncomingBitrate: d.candidatePair.availableIncomingBitrate,
|
|
2536
|
+
roundTripTime: d.candidatePair.currentRoundTripTime
|
|
2537
|
+
}), d.transport && (d.transport.candidatePairs = f), d.transport && !d.transport.roundTripTime) {
|
|
2538
2538
|
let I = 0, y = 0;
|
|
2539
|
-
|
|
2539
|
+
d.remoteInboundRtp.forEach((C, $) => {
|
|
2540
2540
|
C.roundTripTime && C.roundTripTime > I && (I = C.roundTripTime, y = C.totalRoundTripTime);
|
|
2541
|
-
}),
|
|
2541
|
+
}), d.transport.roundTripTime = I, d.transport.totalRoundTripTime = y;
|
|
2542
2542
|
}
|
|
2543
2543
|
if (E.size > 0)
|
|
2544
2544
|
try {
|
|
@@ -2550,19 +2550,19 @@ class um extends lm {
|
|
|
2550
2550
|
this.observer.emit("producer_score", v);
|
|
2551
2551
|
} catch (I) {
|
|
2552
2552
|
}
|
|
2553
|
-
return
|
|
2553
|
+
return d;
|
|
2554
2554
|
}
|
|
2555
2555
|
getProducerStatsFromReport(e) {
|
|
2556
2556
|
const r = [];
|
|
2557
2557
|
try {
|
|
2558
2558
|
e.producerStreamMap.forEach((i, n) => {
|
|
2559
|
-
const o = this.producerMap.get(n),
|
|
2559
|
+
const o = this.producerMap.get(n), c = o.track.getSettings(), d = i.outboundVideoRtpId.map((h) => {
|
|
2560
2560
|
const g = e.outboundVideoRtp.get(h);
|
|
2561
|
-
return g.frameHeight || (g.frameHeight =
|
|
2561
|
+
return g.frameHeight || (g.frameHeight = c.height, g.frameWidth = c.width, g.framesPerSecond = c.frameRate), g;
|
|
2562
2562
|
}), l = {
|
|
2563
2563
|
producerId: n,
|
|
2564
2564
|
appData: o.appData,
|
|
2565
|
-
videoStats:
|
|
2565
|
+
videoStats: d,
|
|
2566
2566
|
audioStats: i.outboundAudioRtpId.map((h) => e.outboundAudioRtp.get(h))
|
|
2567
2567
|
};
|
|
2568
2568
|
r.push(l);
|
|
@@ -2575,15 +2575,15 @@ class um extends lm {
|
|
|
2575
2575
|
getConsumerStatsFromParsedConsumerStats(e, r, i) {
|
|
2576
2576
|
let n;
|
|
2577
2577
|
try {
|
|
2578
|
-
const { peerId: o, producerId:
|
|
2578
|
+
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(i), l = r == null ? void 0 : r.inboundVideoRtpId.map((h) => {
|
|
2579
2579
|
const f = this.consumerMap.get(i).track.getSettings(), v = e.inboundVideoRtp.get(h);
|
|
2580
2580
|
return v.frameHeight || (v.frameHeight = f.height, v.frameWidth = f.width, v.framesPerSecond = f.frameRate), v;
|
|
2581
2581
|
});
|
|
2582
2582
|
n = {
|
|
2583
2583
|
consumerId: i,
|
|
2584
2584
|
peerId: o,
|
|
2585
|
-
producerId:
|
|
2586
|
-
appData:
|
|
2585
|
+
producerId: c,
|
|
2586
|
+
appData: d,
|
|
2587
2587
|
videoStats: l,
|
|
2588
2588
|
audioStats: r == null ? void 0 : r.inboundAudioRtpId.map((h) => e.inboundAudioRtp.get(h))
|
|
2589
2589
|
};
|
|
@@ -2630,12 +2630,12 @@ const Q = (s, t) => (e, r, i) => {
|
|
|
2630
2630
|
const n = i.value;
|
|
2631
2631
|
return i.value = function(...o) {
|
|
2632
2632
|
try {
|
|
2633
|
-
const
|
|
2634
|
-
return
|
|
2635
|
-
ld(this, s, t,
|
|
2636
|
-
}) :
|
|
2637
|
-
} catch (
|
|
2638
|
-
ld(this, s, t,
|
|
2633
|
+
const c = n.apply(this, o);
|
|
2634
|
+
return c && c instanceof Promise ? c.catch((d) => {
|
|
2635
|
+
ld(this, s, t, d);
|
|
2636
|
+
}) : c;
|
|
2637
|
+
} catch (c) {
|
|
2638
|
+
ld(this, s, t, c);
|
|
2639
2639
|
}
|
|
2640
2640
|
return null;
|
|
2641
2641
|
}, i;
|
|
@@ -2652,13 +2652,13 @@ var K = globalThis && globalThis.__decorate || function(s, t, e, r) {
|
|
|
2652
2652
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2653
2653
|
n = Reflect.decorate(s, t, e, r);
|
|
2654
2654
|
else
|
|
2655
|
-
for (var
|
|
2656
|
-
(o = s[
|
|
2655
|
+
for (var c = s.length - 1; c >= 0; c--)
|
|
2656
|
+
(o = s[c]) && (n = (i < 3 ? o(n) : i > 3 ? o(t, e, n) : o(t, e)) || n);
|
|
2657
2657
|
return i > 3 && n && Object.defineProperty(t, e, n), n;
|
|
2658
2658
|
};
|
|
2659
2659
|
const z = console;
|
|
2660
2660
|
let G = class extends st {
|
|
2661
|
-
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = zg.PROD, n, o,
|
|
2661
|
+
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = zg.PROD, n, o, c, d, l) {
|
|
2662
2662
|
super();
|
|
2663
2663
|
p(this, "observer");
|
|
2664
2664
|
p(this, "eventHandler");
|
|
@@ -2678,7 +2678,7 @@ let G = class extends st {
|
|
|
2678
2678
|
p(this, "currentUserMediaStates", {});
|
|
2679
2679
|
if (!l)
|
|
2680
2680
|
throw Error("authToken is missing but required to initialize CallStats!");
|
|
2681
|
-
switch (this.env = i, this.apiHostnames =
|
|
2681
|
+
switch (this.env = i, this.apiHostnames = d, this.logger = o, this.peerId = c, this.eventHandler = new ov({ logger: o, peerId: c, apiHostnames: d, authToken: l }), this.logger.debug("callStats::engineName: ", { engineName: r }), r) {
|
|
2682
2682
|
case "Blink":
|
|
2683
2683
|
this.measurements = new Ev();
|
|
2684
2684
|
break;
|
|
@@ -2882,13 +2882,13 @@ let G = class extends st {
|
|
|
2882
2882
|
event: O.NET_QUALITY_TEST_BEGIN,
|
|
2883
2883
|
timestamp: r
|
|
2884
2884
|
}), new Promise((n, o) => u(this, null, function* () {
|
|
2885
|
-
const
|
|
2885
|
+
const c = [];
|
|
2886
2886
|
try {
|
|
2887
|
-
for (const
|
|
2887
|
+
for (const d of e)
|
|
2888
2888
|
try {
|
|
2889
|
-
if (
|
|
2890
|
-
const l = yield this.measurements.getNetworkQuality(
|
|
2891
|
-
|
|
2889
|
+
if (d.iceServers && d.iceServers.length > 0) {
|
|
2890
|
+
const l = yield this.measurements.getNetworkQuality(d.iceServers);
|
|
2891
|
+
c.push(j(N({}, d), {
|
|
2892
2892
|
networkResults: l
|
|
2893
2893
|
}));
|
|
2894
2894
|
}
|
|
@@ -2896,10 +2896,10 @@ let G = class extends st {
|
|
|
2896
2896
|
console.warn("Error handling ", l);
|
|
2897
2897
|
}
|
|
2898
2898
|
n({
|
|
2899
|
-
regionData:
|
|
2899
|
+
regionData: c
|
|
2900
2900
|
});
|
|
2901
|
-
} catch (
|
|
2902
|
-
console.warn("Error in callstats, ",
|
|
2901
|
+
} catch (d) {
|
|
2902
|
+
console.warn("Error in callstats, ", d), o(d);
|
|
2903
2903
|
}
|
|
2904
2904
|
})).then((n) => {
|
|
2905
2905
|
this.eventHandler.callEvent({
|
|
@@ -2952,14 +2952,14 @@ let G = class extends st {
|
|
|
2952
2952
|
}
|
|
2953
2953
|
sendPingStatsEvent(e = !0, r) {
|
|
2954
2954
|
return u(this, null, function* () {
|
|
2955
|
-
var
|
|
2955
|
+
var c, d;
|
|
2956
2956
|
let i, n;
|
|
2957
|
-
if (this.producingTransport && (i = yield this.measurements.getProcessedStats(this.producingTransport, !1, !0), !i || !((
|
|
2957
|
+
if (this.producingTransport && (i = yield this.measurements.getProcessedStats(this.producingTransport, !1, !0), !i || !((c = i == null ? void 0 : i.producerReport) != null && c.length))) {
|
|
2958
2958
|
this.logger.debug("callStats::sendPingStatsEvent::staleProducingTransport", { disclaimer: "Stale producer? Regenerating Stream Maps!" });
|
|
2959
2959
|
const l = yield this.measurements.getProducersReport([...this.producers.values()]);
|
|
2960
2960
|
i && l ? i.producerReport = l : (i = yield this.measurements.getProcessedStats(this.producingTransport, !1, !0), (!i || !(i != null && i.producerReport)) && this.logger.debug("callStats::sendPingStatsEvent::noProducingTransportReport", { disclaimer: "Stream maps invalid despite regenerating!" }));
|
|
2961
2961
|
}
|
|
2962
|
-
if (this.consumingTransport && (n = yield this.measurements.getProcessedStats(this.consumingTransport, !0, !1), !n || !((
|
|
2962
|
+
if (this.consumingTransport && (n = yield this.measurements.getProcessedStats(this.consumingTransport, !0, !1), !n || !((d = n.consumerReport) != null && d.length))) {
|
|
2963
2963
|
this.logger.debug("callStats::sendPingStatsEvent::staleConsumingTransport", { disclaimer: "Stale consumer? Regenerating Stream Maps!" });
|
|
2964
2964
|
const l = yield this.measurements.getConsumersReport([...this.consumers.values()]);
|
|
2965
2965
|
n && l ? n.consumerReport = l : (n = yield this.measurements.getProcessedStats(this.consumingTransport, !0, !1), (!n || !n.consumerReport) && this.logger.debug("callStats::sendPingStatsEvent::noConsumingTransportReport", { disclaimer: "Stream maps invalid despite regenerating!" }));
|
|
@@ -3264,17 +3264,17 @@ class hm extends st {
|
|
|
3264
3264
|
p(this, "logger");
|
|
3265
3265
|
}
|
|
3266
3266
|
initialize(f) {
|
|
3267
|
-
return u(this, arguments, function* ({ peerId: e, engineName: r, env: i = zg.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags:
|
|
3267
|
+
return u(this, arguments, function* ({ peerId: e, engineName: r, env: i = zg.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags: c, logger: d = console, apiHostnames: l, skipConnectivityChecks: h = !1, authToken: g }) {
|
|
3268
3268
|
var v, E, _;
|
|
3269
3269
|
try {
|
|
3270
|
-
if (this.peerId = e, this.logger =
|
|
3270
|
+
if (this.peerId = e, this.logger = d, !g) {
|
|
3271
3271
|
this.logger.error("callStats::initialize", {
|
|
3272
3272
|
event: "auth_token_missing",
|
|
3273
3273
|
peerId: this.peerId
|
|
3274
3274
|
}), this.stallCallStats();
|
|
3275
3275
|
return;
|
|
3276
3276
|
}
|
|
3277
|
-
this.ipInformation = yield cm.getIPDetails({ peerId: e, apiHostnames: l, logger:
|
|
3277
|
+
this.ipInformation = yield cm.getIPDetails({ peerId: e, apiHostnames: l, logger: d }), this.backend = new Cv(o, r, i, c, d, e, l, g), this.iceServers = n, (v = this.backend) == null || v.registerIceServers(this.iceServers), this.initialized = !0, (_ = (E = this.backend) == null ? void 0 : E.eventHandler) == null || _.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(h);
|
|
3278
3278
|
} catch (w) {
|
|
3279
3279
|
this.logger.error("callStats::CallStatsIntegration", {
|
|
3280
3280
|
peerId: this.peerId,
|
|
@@ -3536,7 +3536,7 @@ class hm extends st {
|
|
|
3536
3536
|
ivsPlayerEvent(e, r) {
|
|
3537
3537
|
const i = new Date();
|
|
3538
3538
|
this.onSafeInitialization(() => {
|
|
3539
|
-
var n, o,
|
|
3539
|
+
var n, o, c, d, l, h, g, f, v, E, _;
|
|
3540
3540
|
switch (e) {
|
|
3541
3541
|
case "PlayerRebuffering":
|
|
3542
3542
|
(n = this.backend) == null || n.sendIVSPlayerRebufferEvent(i);
|
|
@@ -3545,10 +3545,10 @@ class hm extends st {
|
|
|
3545
3545
|
(o = this.backend) == null || o.sendIVSPlayerAudioBlockEvent(i);
|
|
3546
3546
|
break;
|
|
3547
3547
|
case "PlayerPlaybackBlocked":
|
|
3548
|
-
(
|
|
3548
|
+
(c = this.backend) == null || c.sendIVSPlayerPlaybackBlockedEvent(i);
|
|
3549
3549
|
break;
|
|
3550
3550
|
case "PlayerNetworkUnavailable":
|
|
3551
|
-
(
|
|
3551
|
+
(d = this.backend) == null || d.sendIVSPlayerNetworkUnavailableEvent(i);
|
|
3552
3552
|
break;
|
|
3553
3553
|
case "PlayerInitialized":
|
|
3554
3554
|
(l = this.backend) == null || l.sendIVSPlayerInitializedEvent(i);
|
|
@@ -3692,14 +3692,14 @@ const Vh = class extends st.EventEmitter {
|
|
|
3692
3692
|
}
|
|
3693
3693
|
onAsync(e, r) {
|
|
3694
3694
|
const i = a(this, Ds), n = (...o) => u(this, null, function* () {
|
|
3695
|
-
var
|
|
3695
|
+
var d;
|
|
3696
3696
|
try {
|
|
3697
3697
|
yield r(...o);
|
|
3698
3698
|
} catch (l) {
|
|
3699
3699
|
this.logger.error("[onAsync]", { error: l });
|
|
3700
3700
|
}
|
|
3701
|
-
const
|
|
3702
|
-
|
|
3701
|
+
const c = (d = i.get(e)) == null ? void 0 : d.shift();
|
|
3702
|
+
c == null || c();
|
|
3703
3703
|
});
|
|
3704
3704
|
return a(this, Os).get(e) || a(this, Os).set(e, []), a(this, Os).get(e).push(n), super.on(e, n);
|
|
3705
3705
|
}
|
|
@@ -3967,8 +3967,8 @@ function Cc(s, t, e, r) {
|
|
|
3967
3967
|
var i = !e;
|
|
3968
3968
|
e || (e = {});
|
|
3969
3969
|
for (var n = -1, o = t.length; ++n < o; ) {
|
|
3970
|
-
var
|
|
3971
|
-
|
|
3970
|
+
var c = t[n], d = r ? r(e[c], s[c], c, e, s) : void 0;
|
|
3971
|
+
d === void 0 && (d = s[c]), i ? ih(e, c, d) : Sm(e, c, d);
|
|
3972
3972
|
}
|
|
3973
3973
|
return e;
|
|
3974
3974
|
}
|
|
@@ -3978,9 +3978,9 @@ function $T(s, t, e) {
|
|
|
3978
3978
|
for (var r = arguments, i = -1, n = sp(r.length - t, 0), o = Array(n); ++i < n; )
|
|
3979
3979
|
o[i] = r[t + i];
|
|
3980
3980
|
i = -1;
|
|
3981
|
-
for (var
|
|
3982
|
-
|
|
3983
|
-
return
|
|
3981
|
+
for (var c = Array(t + 1); ++i < t; )
|
|
3982
|
+
c[i] = r[i];
|
|
3983
|
+
return c[t] = e(o), ST(s, this, c);
|
|
3984
3984
|
};
|
|
3985
3985
|
}
|
|
3986
3986
|
function BT(s, t) {
|
|
@@ -4003,8 +4003,8 @@ function qT(s) {
|
|
|
4003
4003
|
return BT(function(t, e) {
|
|
4004
4004
|
var r = -1, i = e.length, n = i > 1 ? e[i - 1] : void 0, o = i > 2 ? e[2] : void 0;
|
|
4005
4005
|
for (n = s.length > 3 && typeof n == "function" ? (i--, n) : void 0, o && FT(e[0], e[1], o) && (n = i < 3 ? void 0 : n, i = 1), t = Object(t); ++r < i; ) {
|
|
4006
|
-
var
|
|
4007
|
-
|
|
4006
|
+
var c = e[r];
|
|
4007
|
+
c && s(t, c, r, n);
|
|
4008
4008
|
}
|
|
4009
4009
|
return t;
|
|
4010
4010
|
});
|
|
@@ -4057,14 +4057,14 @@ var ap = fa && fa.isTypedArray, by = ap ? ah(ap) : Cy;
|
|
|
4057
4057
|
const Pl = by;
|
|
4058
4058
|
var ky = Object.prototype, Ay = ky.hasOwnProperty;
|
|
4059
4059
|
function Em(s, t) {
|
|
4060
|
-
var e = Mt(s), r = !e && lo(s), i = !e && !r && ma(s), n = !e && !r && !i && Pl(s), o = e || r || i || n,
|
|
4060
|
+
var e = Mt(s), r = !e && lo(s), i = !e && !r && ma(s), n = !e && !r && !i && Pl(s), o = e || r || i || n, c = o ? GT(s.length, String) : [], d = c.length;
|
|
4061
4061
|
for (var l in s)
|
|
4062
4062
|
(t || Ay.call(s, l)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
4063
4063
|
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
4064
4064
|
i && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
4065
4065
|
n && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
|
|
4066
|
-
rh(l,
|
|
4067
|
-
return
|
|
4066
|
+
rh(l, d))) && c.push(l);
|
|
4067
|
+
return c;
|
|
4068
4068
|
}
|
|
4069
4069
|
function Pm(s, t) {
|
|
4070
4070
|
return function(e) {
|
|
@@ -4492,26 +4492,26 @@ var UP = 1, $P = 2, BP = 4, Lm = "[object Arguments]", HP = "[object Array]", FP
|
|
|
4492
4492
|
ge[Lm] = ge[HP] = ge[ZP] = ge[e_] = ge[FP] = ge[qP] = ge[t_] = ge[s_] = ge[r_] = ge[i_] = ge[n_] = ge[WP] = ge[JP] = ge[xm] = ge[KP] = ge[zP] = ge[YP] = ge[QP] = ge[a_] = ge[o_] = ge[c_] = ge[d_] = !0;
|
|
4493
4493
|
ge[jP] = ge[Vm] = ge[XP] = !1;
|
|
4494
4494
|
function eo(s, t, e, r, i, n) {
|
|
4495
|
-
var o,
|
|
4495
|
+
var o, c = t & UP, d = t & $P, l = t & BP;
|
|
4496
4496
|
if (e && (o = i ? e(s, r, i, n) : e(s)), o !== void 0)
|
|
4497
4497
|
return o;
|
|
4498
4498
|
if (!Kt(s))
|
|
4499
4499
|
return s;
|
|
4500
4500
|
var h = Mt(s);
|
|
4501
4501
|
if (h) {
|
|
4502
|
-
if (o = iP(s), !
|
|
4502
|
+
if (o = iP(s), !c)
|
|
4503
4503
|
return fm(s, o);
|
|
4504
4504
|
} else {
|
|
4505
4505
|
var g = Sa(s), f = g == Vm || g == GP;
|
|
4506
4506
|
if (ma(s))
|
|
4507
|
-
return Am(s,
|
|
4507
|
+
return Am(s, c);
|
|
4508
4508
|
if (g == xm || g == Lm || f && !i) {
|
|
4509
|
-
if (o =
|
|
4510
|
-
return
|
|
4509
|
+
if (o = d || f ? {} : Nm(s), !c)
|
|
4510
|
+
return d ? GE(s, VE(o, s)) : FE(s, LE(o, s));
|
|
4511
4511
|
} else {
|
|
4512
4512
|
if (!ge[g])
|
|
4513
4513
|
return i ? s : {};
|
|
4514
|
-
o = AP(s, g,
|
|
4514
|
+
o = AP(s, g, c);
|
|
4515
4515
|
}
|
|
4516
4516
|
}
|
|
4517
4517
|
n || (n = new us());
|
|
@@ -4523,7 +4523,7 @@ function eo(s, t, e, r, i, n) {
|
|
|
4523
4523
|
}) : OP(s) && s.forEach(function(w, R) {
|
|
4524
4524
|
o.set(R, eo(w, t, e, R, s, n));
|
|
4525
4525
|
});
|
|
4526
|
-
var E = l ?
|
|
4526
|
+
var E = l ? d ? WE : iu : d ? Rc : _l, _ = h ? void 0 : E(s);
|
|
4527
4527
|
return AT(_ || s, function(w, R) {
|
|
4528
4528
|
_ && (R = w, w = s[R]), Sm(o, R, eo(w, t, e, R, s, n));
|
|
4529
4529
|
}), o;
|
|
@@ -4561,14 +4561,14 @@ function Um(s, t) {
|
|
|
4561
4561
|
}
|
|
4562
4562
|
var v_ = 1, T_ = 2;
|
|
4563
4563
|
function $m(s, t, e, r, i, n) {
|
|
4564
|
-
var o = e & v_,
|
|
4565
|
-
if (
|
|
4564
|
+
var o = e & v_, c = s.length, d = t.length;
|
|
4565
|
+
if (c != d && !(o && d > c))
|
|
4566
4566
|
return !1;
|
|
4567
4567
|
var l = n.get(s), h = n.get(t);
|
|
4568
4568
|
if (l && h)
|
|
4569
4569
|
return l == t && h == s;
|
|
4570
4570
|
var g = -1, f = !0, v = e & T_ ? new po() : void 0;
|
|
4571
|
-
for (n.set(s, t), n.set(t, s); ++g <
|
|
4571
|
+
for (n.set(s, t), n.set(t, s); ++g < c; ) {
|
|
4572
4572
|
var E = s[g], _ = t[g];
|
|
4573
4573
|
if (r)
|
|
4574
4574
|
var w = o ? r(_, E, g, t, s, n) : r(E, _, g, s, t, n);
|
|
@@ -4624,16 +4624,16 @@ function N_(s, t, e, r, i, n, o) {
|
|
|
4624
4624
|
case I_:
|
|
4625
4625
|
return s == t + "";
|
|
4626
4626
|
case R_:
|
|
4627
|
-
var
|
|
4627
|
+
var c = y_;
|
|
4628
4628
|
case A_:
|
|
4629
|
-
var
|
|
4630
|
-
if (
|
|
4629
|
+
var d = r & E_;
|
|
4630
|
+
if (c || (c = ph), s.size != t.size && !d)
|
|
4631
4631
|
return !1;
|
|
4632
4632
|
var l = o.get(s);
|
|
4633
4633
|
if (l)
|
|
4634
4634
|
return l == t;
|
|
4635
4635
|
r |= P_, o.set(s, t);
|
|
4636
|
-
var h = $m(
|
|
4636
|
+
var h = $m(c(s), c(t), r, i, n, o);
|
|
4637
4637
|
return o.delete(s), h;
|
|
4638
4638
|
case M_:
|
|
4639
4639
|
if (ql)
|
|
@@ -4643,11 +4643,11 @@ function N_(s, t, e, r, i, n, o) {
|
|
|
4643
4643
|
}
|
|
4644
4644
|
var L_ = 1, V_ = Object.prototype, x_ = V_.hasOwnProperty;
|
|
4645
4645
|
function U_(s, t, e, r, i, n) {
|
|
4646
|
-
var o = e & L_,
|
|
4647
|
-
if (
|
|
4646
|
+
var o = e & L_, c = iu(s), d = c.length, l = iu(t), h = l.length;
|
|
4647
|
+
if (d != h && !o)
|
|
4648
4648
|
return !1;
|
|
4649
|
-
for (var g =
|
|
4650
|
-
var f =
|
|
4649
|
+
for (var g = d; g--; ) {
|
|
4650
|
+
var f = c[g];
|
|
4651
4651
|
if (!(o ? f in t : x_.call(t, f)))
|
|
4652
4652
|
return !1;
|
|
4653
4653
|
}
|
|
@@ -4656,8 +4656,8 @@ function U_(s, t, e, r, i, n) {
|
|
|
4656
4656
|
return v == t && E == s;
|
|
4657
4657
|
var _ = !0;
|
|
4658
4658
|
n.set(s, t), n.set(t, s);
|
|
4659
|
-
for (var w = o; ++g <
|
|
4660
|
-
f =
|
|
4659
|
+
for (var w = o; ++g < d; ) {
|
|
4660
|
+
f = c[g];
|
|
4661
4661
|
var R = s[f], D = t[f];
|
|
4662
4662
|
if (r)
|
|
4663
4663
|
var U = o ? r(D, R, f, t, s, n) : r(R, D, f, s, t, n);
|
|
@@ -4675,16 +4675,16 @@ function U_(s, t, e, r, i, n) {
|
|
|
4675
4675
|
}
|
|
4676
4676
|
var $_ = 1, Ep = "[object Arguments]", Pp = "[object Array]", Lc = "[object Object]", B_ = Object.prototype, _p = B_.hasOwnProperty;
|
|
4677
4677
|
function H_(s, t, e, r, i, n) {
|
|
4678
|
-
var o = Mt(s),
|
|
4679
|
-
|
|
4680
|
-
var h =
|
|
4678
|
+
var o = Mt(s), c = Mt(t), d = o ? Pp : Sa(s), l = c ? Pp : Sa(t);
|
|
4679
|
+
d = d == Ep ? Lc : d, l = l == Ep ? Lc : l;
|
|
4680
|
+
var h = d == Lc, g = l == Lc, f = d == l;
|
|
4681
4681
|
if (f && ma(s)) {
|
|
4682
4682
|
if (!ma(t))
|
|
4683
4683
|
return !1;
|
|
4684
4684
|
o = !0, h = !1;
|
|
4685
4685
|
}
|
|
4686
4686
|
if (f && !h)
|
|
4687
|
-
return n || (n = new us()), o || Pl(s) ? $m(s, t, e, r, i, n) : N_(s, t,
|
|
4687
|
+
return n || (n = new us()), o || Pl(s) ? $m(s, t, e, r, i, n) : N_(s, t, d, e, r, i, n);
|
|
4688
4688
|
if (!(e & $_)) {
|
|
4689
4689
|
var v = h && _p.call(s, "__wrapped__"), E = g && _p.call(t, "__wrapped__");
|
|
4690
4690
|
if (v || E) {
|
|
@@ -4703,20 +4703,20 @@ function j_(s, t, e, r) {
|
|
|
4703
4703
|
if (s == null)
|
|
4704
4704
|
return !n;
|
|
4705
4705
|
for (s = Object(s); i--; ) {
|
|
4706
|
-
var
|
|
4707
|
-
if (o &&
|
|
4706
|
+
var c = e[i];
|
|
4707
|
+
if (o && c[2] ? c[1] !== s[c[0]] : !(c[0] in s))
|
|
4708
4708
|
return !1;
|
|
4709
4709
|
}
|
|
4710
4710
|
for (; ++i < n; ) {
|
|
4711
|
-
|
|
4712
|
-
var
|
|
4713
|
-
if (o &&
|
|
4714
|
-
if (l === void 0 && !(
|
|
4711
|
+
c = e[i];
|
|
4712
|
+
var d = c[0], l = s[d], h = c[1];
|
|
4713
|
+
if (o && c[2]) {
|
|
4714
|
+
if (l === void 0 && !(d in s))
|
|
4715
4715
|
return !1;
|
|
4716
4716
|
} else {
|
|
4717
4717
|
var g = new us();
|
|
4718
4718
|
if (r)
|
|
4719
|
-
var f = r(l, h,
|
|
4719
|
+
var f = r(l, h, d, s, t, g);
|
|
4720
4720
|
if (!(f === void 0 ? bl(h, l, F_ | q_, r, g) : f))
|
|
4721
4721
|
return !1;
|
|
4722
4722
|
}
|
|
@@ -4785,9 +4785,9 @@ function sC(s) {
|
|
|
4785
4785
|
}
|
|
4786
4786
|
function rC(s) {
|
|
4787
4787
|
return function(t, e, r) {
|
|
4788
|
-
for (var i = -1, n = Object(t), o = r(t),
|
|
4789
|
-
var
|
|
4790
|
-
if (e(n[
|
|
4788
|
+
for (var i = -1, n = Object(t), o = r(t), c = o.length; c--; ) {
|
|
4789
|
+
var d = o[s ? c : ++i];
|
|
4790
|
+
if (e(n[d], d, n) === !1)
|
|
4791
4791
|
break;
|
|
4792
4792
|
}
|
|
4793
4793
|
return t;
|
|
@@ -4801,7 +4801,7 @@ var aC = function() {
|
|
|
4801
4801
|
const jl = aC;
|
|
4802
4802
|
var oC = "Expected a function", cC = Math.max, dC = Math.min;
|
|
4803
4803
|
function gh(s, t, e) {
|
|
4804
|
-
var r, i, n, o,
|
|
4804
|
+
var r, i, n, o, c, d, l = 0, h = !1, g = !1, f = !0;
|
|
4805
4805
|
if (typeof s != "function")
|
|
4806
4806
|
throw new TypeError(oC);
|
|
4807
4807
|
t = Zh(t) || 0, Kt(e) && (h = !!e.leading, g = "maxWait" in e, n = g ? cC(Zh(e.maxWait) || 0, t) : n, f = "trailing" in e ? !!e.trailing : f);
|
|
@@ -4810,40 +4810,40 @@ function gh(s, t, e) {
|
|
|
4810
4810
|
return r = i = void 0, l = H, o = s.apply(Le, X), o;
|
|
4811
4811
|
}
|
|
4812
4812
|
function E(H) {
|
|
4813
|
-
return l = H,
|
|
4813
|
+
return l = H, c = setTimeout(R, t), h ? v(H) : o;
|
|
4814
4814
|
}
|
|
4815
4815
|
function _(H) {
|
|
4816
|
-
var X = H -
|
|
4816
|
+
var X = H - d, Le = H - l, yt = t - X;
|
|
4817
4817
|
return g ? dC(yt, n - Le) : yt;
|
|
4818
4818
|
}
|
|
4819
4819
|
function w(H) {
|
|
4820
|
-
var X = H -
|
|
4821
|
-
return
|
|
4820
|
+
var X = H - d, Le = H - l;
|
|
4821
|
+
return d === void 0 || X >= t || X < 0 || g && Le >= n;
|
|
4822
4822
|
}
|
|
4823
4823
|
function R() {
|
|
4824
4824
|
var H = jl();
|
|
4825
4825
|
if (w(H))
|
|
4826
4826
|
return D(H);
|
|
4827
|
-
|
|
4827
|
+
c = setTimeout(R, _(H));
|
|
4828
4828
|
}
|
|
4829
4829
|
function D(H) {
|
|
4830
|
-
return
|
|
4830
|
+
return c = void 0, f && r ? v(H) : (r = i = void 0, o);
|
|
4831
4831
|
}
|
|
4832
4832
|
function U() {
|
|
4833
|
-
|
|
4833
|
+
c !== void 0 && clearTimeout(c), l = 0, r = d = i = c = void 0;
|
|
4834
4834
|
}
|
|
4835
4835
|
function B() {
|
|
4836
|
-
return
|
|
4836
|
+
return c === void 0 ? o : D(jl());
|
|
4837
4837
|
}
|
|
4838
4838
|
function F() {
|
|
4839
4839
|
var H = jl(), X = w(H);
|
|
4840
|
-
if (r = arguments, i = this,
|
|
4841
|
-
if (
|
|
4842
|
-
return E(
|
|
4840
|
+
if (r = arguments, i = this, d = H, X) {
|
|
4841
|
+
if (c === void 0)
|
|
4842
|
+
return E(d);
|
|
4843
4843
|
if (g)
|
|
4844
|
-
return clearTimeout(
|
|
4844
|
+
return clearTimeout(c), c = setTimeout(R, t), v(d);
|
|
4845
4845
|
}
|
|
4846
|
-
return
|
|
4846
|
+
return c === void 0 && (c = setTimeout(R, t)), o;
|
|
4847
4847
|
}
|
|
4848
4848
|
return F.cancel = U, F.flush = B, F;
|
|
4849
4849
|
}
|
|
@@ -4861,25 +4861,25 @@ function uC(s) {
|
|
|
4861
4861
|
return Cc(s, Rc(s));
|
|
4862
4862
|
}
|
|
4863
4863
|
function hC(s, t, e, r, i, n, o) {
|
|
4864
|
-
var
|
|
4864
|
+
var c = cu(s, e), d = cu(t, e), l = o.get(d);
|
|
4865
4865
|
if (l) {
|
|
4866
4866
|
ou(s, e, l);
|
|
4867
4867
|
return;
|
|
4868
4868
|
}
|
|
4869
|
-
var h = n ? n(
|
|
4869
|
+
var h = n ? n(c, d, e + "", s, t, o) : void 0, g = h === void 0;
|
|
4870
4870
|
if (g) {
|
|
4871
|
-
var f = Mt(
|
|
4872
|
-
h =
|
|
4871
|
+
var f = Mt(d), v = !f && ma(d), E = !f && !v && Pl(d);
|
|
4872
|
+
h = d, f || v || E ? Mt(c) ? h = c : lC(c) ? h = fm(c) : v ? (g = !1, h = Am(d, !0)) : E ? (g = !1, h = Om(d, !0)) : h = [] : kE(d) || lo(d) ? (h = c, lo(c) ? h = uC(c) : (!Kt(c) || sh(c)) && (h = Nm(d))) : g = !1;
|
|
4873
4873
|
}
|
|
4874
|
-
g && (o.set(
|
|
4874
|
+
g && (o.set(d, h), i(h, d, r, n, o), o.delete(d)), ou(s, e, h);
|
|
4875
4875
|
}
|
|
4876
4876
|
function Fm(s, t, e, r, i) {
|
|
4877
4877
|
s !== t && nC(t, function(n, o) {
|
|
4878
4878
|
if (i || (i = new us()), Kt(n))
|
|
4879
4879
|
hC(s, t, o, e, Fm, r, i);
|
|
4880
4880
|
else {
|
|
4881
|
-
var
|
|
4882
|
-
|
|
4881
|
+
var c = r ? r(cu(s, o), n, o + "", s, t, i) : void 0;
|
|
4882
|
+
c === void 0 && (c = n), ou(s, o, c);
|
|
4883
4883
|
}
|
|
4884
4884
|
}, Rc);
|
|
4885
4885
|
}
|
|
@@ -4918,28 +4918,28 @@ var EC = 1 / 0, PC = hn && 1 / ph(new hn([, -0]))[1] == EC ? function(s) {
|
|
|
4918
4918
|
const _C = PC;
|
|
4919
4919
|
var CC = 200;
|
|
4920
4920
|
function qm(s, t, e) {
|
|
4921
|
-
var r = -1, i = NT, n = s.length, o = !0,
|
|
4921
|
+
var r = -1, i = NT, n = s.length, o = !0, c = [], d = c;
|
|
4922
4922
|
if (e)
|
|
4923
4923
|
o = !1, i = pC;
|
|
4924
4924
|
else if (n >= CC) {
|
|
4925
4925
|
var l = t ? null : _C(s);
|
|
4926
4926
|
if (l)
|
|
4927
4927
|
return ph(l);
|
|
4928
|
-
o = !1, i = Um,
|
|
4928
|
+
o = !1, i = Um, d = new po();
|
|
4929
4929
|
} else
|
|
4930
|
-
|
|
4930
|
+
d = t ? [] : c;
|
|
4931
4931
|
e:
|
|
4932
4932
|
for (; ++r < n; ) {
|
|
4933
4933
|
var h = s[r], g = t ? t(h) : h;
|
|
4934
4934
|
if (h = e || h !== 0 ? h : 0, o && g === g) {
|
|
4935
|
-
for (var f =
|
|
4936
|
-
if (
|
|
4935
|
+
for (var f = d.length; f--; )
|
|
4936
|
+
if (d[f] === g)
|
|
4937
4937
|
continue e;
|
|
4938
|
-
t &&
|
|
4938
|
+
t && d.push(g), c.push(h);
|
|
4939
4939
|
} else
|
|
4940
|
-
i(
|
|
4940
|
+
i(d, g, e) || (d !== c && d.push(g), c.push(h));
|
|
4941
4941
|
}
|
|
4942
|
-
return
|
|
4942
|
+
return c;
|
|
4943
4943
|
}
|
|
4944
4944
|
function wC(s) {
|
|
4945
4945
|
return s && s.length ? qm(s) : [];
|
|
@@ -5067,19 +5067,19 @@ function Gm(s, t, e = {}) {
|
|
|
5067
5067
|
function wp(s, t, e = {}, r = "") {
|
|
5068
5068
|
const i = {};
|
|
5069
5069
|
try {
|
|
5070
|
-
const n = JSON.stringify(e), o = JSON.parse(n),
|
|
5070
|
+
const n = JSON.stringify(e), o = JSON.parse(n), c = Gm(
|
|
5071
5071
|
o,
|
|
5072
5072
|
r
|
|
5073
|
-
),
|
|
5074
|
-
if (!(t == null ? void 0 : t.startsWith("[SDP]")) &&
|
|
5073
|
+
), d = JSON.stringify(c);
|
|
5074
|
+
if (!(t == null ? void 0 : t.startsWith("[SDP]")) && d.length > 5e3) {
|
|
5075
5075
|
const h = `Log named: "${t}" is trying to log an flattened object of size
|
|
5076
|
-
${
|
|
5076
|
+
${d.length} chars that is beyond permitted limit of 5000 chars. Please optimize.`;
|
|
5077
5077
|
throw jm(s) && console.error(h, {
|
|
5078
5078
|
log: e,
|
|
5079
|
-
flattened:
|
|
5079
|
+
flattened: d
|
|
5080
5080
|
}), new Error(h);
|
|
5081
5081
|
}
|
|
5082
|
-
return JSON.parse(
|
|
5082
|
+
return JSON.parse(d);
|
|
5083
5083
|
} catch (n) {
|
|
5084
5084
|
const o = Jc(n);
|
|
5085
5085
|
i[`${r}.error.message`] = o.message || "", i[`${r}.error.stack`] = o.stack || "", i[`${r}.error.reason`] = o.reason || "", i[`${r}.error.source`] = "safelyFlattenObjForOpenTelemetry";
|
|
@@ -5173,12 +5173,12 @@ class P {
|
|
|
5173
5173
|
static trace(t, e = void 0) {
|
|
5174
5174
|
return (r, i, n) => {
|
|
5175
5175
|
const o = n.value;
|
|
5176
|
-
return n.value = function(...
|
|
5176
|
+
return n.value = function(...d) {
|
|
5177
5177
|
const l = this == null ? void 0 : this.telemetry;
|
|
5178
5178
|
if (!l || !l.initialized || navigator.isReactNative || !l.tracingEnabled)
|
|
5179
|
-
return o.apply(this,
|
|
5179
|
+
return o.apply(this, d);
|
|
5180
5180
|
l.addLogInCurrentSpan("info", t, e);
|
|
5181
|
-
const h = performance.now(), g = o.apply(this,
|
|
5181
|
+
const h = performance.now(), g = o.apply(this, d);
|
|
5182
5182
|
return Promise.resolve(g).then(() => {
|
|
5183
5183
|
const f = performance.now();
|
|
5184
5184
|
f - h > 10 && l.addLogInCurrentSpan("info", `${t}_timing`, {
|
|
@@ -5211,28 +5211,28 @@ class P {
|
|
|
5211
5211
|
t
|
|
5212
5212
|
))
|
|
5213
5213
|
try {
|
|
5214
|
-
const
|
|
5214
|
+
const c = wp(
|
|
5215
5215
|
n,
|
|
5216
5216
|
e,
|
|
5217
5217
|
r,
|
|
5218
5218
|
"metadata"
|
|
5219
|
-
),
|
|
5219
|
+
), d = new Date(), l = j(N({
|
|
5220
5220
|
message: e,
|
|
5221
5221
|
level: t
|
|
5222
|
-
},
|
|
5223
|
-
loggedAt:
|
|
5224
|
-
loggedAtTzOffset:
|
|
5222
|
+
}, c), {
|
|
5223
|
+
loggedAt: d.toISOString(),
|
|
5224
|
+
loggedAtTzOffset: d.getTimezoneOffset()
|
|
5225
5225
|
});
|
|
5226
5226
|
i ? this.sendOtelLogsToNewRelic([l], {
|
|
5227
5227
|
isInDestructionMode: !1
|
|
5228
5228
|
}).catch(() => {
|
|
5229
5229
|
}) : this.logsCache.push(l);
|
|
5230
|
-
} catch (
|
|
5230
|
+
} catch (c) {
|
|
5231
5231
|
this.addLogInCurrentSpan(
|
|
5232
5232
|
"error",
|
|
5233
5233
|
"opentelemetry::addLogInCurrentSpan_failed",
|
|
5234
5234
|
{
|
|
5235
|
-
error: Jc(
|
|
5235
|
+
error: Jc(c)
|
|
5236
5236
|
}
|
|
5237
5237
|
);
|
|
5238
5238
|
}
|
|
@@ -5246,7 +5246,7 @@ class P {
|
|
|
5246
5246
|
8e3
|
|
5247
5247
|
);
|
|
5248
5248
|
try {
|
|
5249
|
-
const o = Fr.getContext(this.meetingMetadata.peerId),
|
|
5249
|
+
const o = Fr.getContext(this.meetingMetadata.peerId), c = JSON.stringify({
|
|
5250
5250
|
meetingMetadata: wp(
|
|
5251
5251
|
o,
|
|
5252
5252
|
"sendOtelLogsToNewRelic",
|
|
@@ -5256,19 +5256,19 @@ class P {
|
|
|
5256
5256
|
serviceName: o.getValue("sdkName"),
|
|
5257
5257
|
logs: t
|
|
5258
5258
|
});
|
|
5259
|
-
let
|
|
5259
|
+
let d;
|
|
5260
5260
|
const l = {
|
|
5261
5261
|
Authorization: `Bearer ${o.getValue("authToken")}`
|
|
5262
5262
|
};
|
|
5263
5263
|
if (this.isCompressionSupported()) {
|
|
5264
|
-
const h = new Blob([
|
|
5265
|
-
|
|
5264
|
+
const h = new Blob([c]).stream().pipeThrough(new CompressionStream("gzip"));
|
|
5265
|
+
d = yield new Response(h).arrayBuffer(), l["Content-Type"] = "application/gzip", l["Content-Encoding"] = "gzip";
|
|
5266
5266
|
} else
|
|
5267
|
-
|
|
5267
|
+
d = c, l["Content-Type"] = "application/json";
|
|
5268
5268
|
yield fetch(this.logsEndpoint, {
|
|
5269
5269
|
method: "POST",
|
|
5270
5270
|
headers: l,
|
|
5271
|
-
body:
|
|
5271
|
+
body: d,
|
|
5272
5272
|
signal: i.signal,
|
|
5273
5273
|
/*
|
|
5274
5274
|
* NOTE(ravindra-cloudflare):
|
|
@@ -5497,12 +5497,12 @@ class k extends Error {
|
|
|
5497
5497
|
super(e);
|
|
5498
5498
|
p(this, "code");
|
|
5499
5499
|
this.code = r, this.name = "ClientError";
|
|
5500
|
-
const o = this.code ? `[ERR${this.code}]` : "[ERR]",
|
|
5501
|
-
this.message = `${o}: ${
|
|
5500
|
+
const o = this.code ? `[ERR${this.code}]` : "[ERR]", c = this.code ? Kc[this.code] : "";
|
|
5501
|
+
this.message = `${o}: ${c}
|
|
5502
5502
|
${this.message}`;
|
|
5503
5503
|
try {
|
|
5504
|
-
let
|
|
5505
|
-
r && r.endsWith("00") && i && (
|
|
5504
|
+
let d = n && !!i;
|
|
5505
|
+
r && r.endsWith("00") && i && (d = !0), d && i.error("ClientError", {
|
|
5506
5506
|
error: { message: this.message, name: this.name, code: r }
|
|
5507
5507
|
});
|
|
5508
5508
|
const l = Fr.getContext(Fr.getMostRecentPeerId());
|
|
@@ -5516,7 +5516,7 @@ ${this.message}`;
|
|
|
5516
5516
|
typeof window != "undefined" && window.dispatchEvent(new CustomEvent("ClientError", {
|
|
5517
5517
|
detail: this
|
|
5518
5518
|
}));
|
|
5519
|
-
} catch (
|
|
5519
|
+
} catch (d) {
|
|
5520
5520
|
}
|
|
5521
5521
|
}
|
|
5522
5522
|
}
|
|
@@ -5541,8 +5541,8 @@ function Rp(s, t, e) {
|
|
|
5541
5541
|
}), n && (s.set = function(o) {
|
|
5542
5542
|
try {
|
|
5543
5543
|
return n.apply(this, [o]);
|
|
5544
|
-
} catch (
|
|
5545
|
-
xc(this, t, e,
|
|
5544
|
+
} catch (c) {
|
|
5545
|
+
xc(this, t, e, c);
|
|
5546
5546
|
}
|
|
5547
5547
|
}), s;
|
|
5548
5548
|
}
|
|
@@ -5591,38 +5591,38 @@ var FC = (s, t, e) => {
|
|
|
5591
5591
|
if (t == 0)
|
|
5592
5592
|
r = i = n = e;
|
|
5593
5593
|
else {
|
|
5594
|
-
const o = (l, h, g) => (g < 0 && (g += 1), g > 1 && (g -= 1), g < 0.16666666666666666 ? l + (h - l) * 6 * g : g < 0.5 ? h : g < 0.6666666666666666 ? l + (h - l) * (0.6666666666666666 - g) * 6 : l),
|
|
5595
|
-
r = o(
|
|
5594
|
+
const o = (l, h, g) => (g < 0 && (g += 1), g > 1 && (g -= 1), g < 0.16666666666666666 ? l + (h - l) * 6 * g : g < 0.5 ? h : g < 0.6666666666666666 ? l + (h - l) * (0.6666666666666666 - g) * 6 : l), c = e < 0.5 ? e * (1 + t) : e + t - e * t, d = 2 * e - c;
|
|
5595
|
+
r = o(d, c, s + 1 / 3), i = o(d, c, s), n = o(d, c, s - 1 / 3);
|
|
5596
5596
|
}
|
|
5597
5597
|
return [Math.round(r * 255), Math.round(i * 255), Math.round(n * 255)];
|
|
5598
5598
|
}, qC = (s, t, e) => {
|
|
5599
5599
|
s /= 255, t /= 255, e /= 255;
|
|
5600
5600
|
const r = Math.max(s, t, e), i = Math.min(s, t, e);
|
|
5601
5601
|
let n, o;
|
|
5602
|
-
const
|
|
5602
|
+
const c = (r + i) / 2;
|
|
5603
5603
|
if (r == i)
|
|
5604
5604
|
n = o = 0;
|
|
5605
5605
|
else {
|
|
5606
|
-
const
|
|
5607
|
-
switch (o =
|
|
5606
|
+
const d = r - i;
|
|
5607
|
+
switch (o = c > 0.5 ? d / (2 - r - i) : d / (r + i), r) {
|
|
5608
5608
|
case s:
|
|
5609
|
-
n = (t - e) /
|
|
5609
|
+
n = (t - e) / d + (t < e ? 6 : 0);
|
|
5610
5610
|
break;
|
|
5611
5611
|
case t:
|
|
5612
|
-
n = (e - s) /
|
|
5612
|
+
n = (e - s) / d + 2;
|
|
5613
5613
|
break;
|
|
5614
5614
|
case e:
|
|
5615
|
-
n = (s - t) /
|
|
5615
|
+
n = (s - t) / d + 4;
|
|
5616
5616
|
break;
|
|
5617
5617
|
}
|
|
5618
5618
|
n /= 6;
|
|
5619
5619
|
}
|
|
5620
|
-
return [n, o,
|
|
5620
|
+
return [n, o, c];
|
|
5621
5621
|
}, jC = (s, t, e) => {
|
|
5622
5622
|
const r = (i) => i.toString(16).padStart(2, "0");
|
|
5623
5623
|
return `#${r(s)}${r(t)}${r(e)}`;
|
|
5624
5624
|
}, Jm = (s, t = Wm, e = 0.4) => {
|
|
5625
|
-
const r = [], [i, n, o] = HC(s), [
|
|
5625
|
+
const r = [], [i, n, o] = HC(s), [c, d, l] = qC(i, n, o), h = Math.round(l * 100);
|
|
5626
5626
|
h > 70 ? e = 0.8 : h > 60 ? e = 0.9 : h < 10 ? e = 0.075 : h < 42 && (e = 0.3);
|
|
5627
5627
|
const g = t.findIndex((w) => w === 0);
|
|
5628
5628
|
if (g === -1)
|
|
@@ -5631,7 +5631,7 @@ var FC = (s, t, e) => {
|
|
|
5631
5631
|
for (const w of t) {
|
|
5632
5632
|
let R;
|
|
5633
5633
|
w < 0 ? R = h + w * _ * e : w > 0 ? R = h + w * E * e : R = h;
|
|
5634
|
-
const [D, U, B] = FC(
|
|
5634
|
+
const [D, U, B] = FC(c, d, R / 100);
|
|
5635
5635
|
r.push(jC(D, U, B));
|
|
5636
5636
|
}
|
|
5637
5637
|
return r;
|
|
@@ -6147,10 +6147,10 @@ function XC(s, t = 2) {
|
|
|
6147
6147
|
return s.replace(/[^\u00BF-\u1FFF\u2C00-\uD7FF\w\s]/g, "").trim().split(/\s+/).slice(0, t).map((i) => i.charAt(0)).join("").toUpperCase();
|
|
6148
6148
|
}
|
|
6149
6149
|
const kp = 1080, Ap = 1920, ZC = (s, t, e, r, i, n) => {
|
|
6150
|
-
let o = 0.5,
|
|
6151
|
-
const
|
|
6152
|
-
let g =
|
|
6153
|
-
return g < e && (R = e / g), Math.abs(R - 1) < 1e-14 && f < r && (R = r / f), g *= R, f *= R, _ =
|
|
6150
|
+
let o = 0.5, c = 0.5;
|
|
6151
|
+
const d = i, l = n, h = Math.min(e / d, r / l);
|
|
6152
|
+
let g = d * h, f = l * h, v, E, _, w, R = 1;
|
|
6153
|
+
return g < e && (R = e / g), Math.abs(R - 1) < 1e-14 && f < r && (R = r / f), g *= R, f *= R, _ = d / (g / e), w = l / (f / r), v = (d - _) * o, E = (l - w) * c, v < 0 && (v = 0), E < 0 && (E = 0), _ > d && (_ = d), w > l && (w = l), [v, E, _, w, s, t, e, r];
|
|
6154
6154
|
};
|
|
6155
6155
|
var Ut, ni, Qe, $t, we, es, Ns, it, Me, Sn, vn, Ls, Tn;
|
|
6156
6156
|
const xh = class extends Ot {
|
|
@@ -6320,7 +6320,7 @@ const xh = class extends Ot {
|
|
|
6320
6320
|
drawEmptyTile(e, r, i, n) {
|
|
6321
6321
|
if (a(this, Ut) === void 0)
|
|
6322
6322
|
return;
|
|
6323
|
-
const o = a(this, Ut).getContext("2d"),
|
|
6323
|
+
const o = a(this, Ut).getContext("2d"), c = a(this, Ut).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, f = Math.floor(c / h), v = Math.floor(e / f), _ = e % f * (h + d) + d, w = v * (g + d) + d, { displayText: R, image: D } = n != null ? n : {};
|
|
6324
6324
|
o.fillStyle = R || D ? a(this, es).videoBackground : a(this, es).background, o.strokeStyle = a(this, es).brand, o.beginPath(), o.moveTo(_ + l, w), o.arcTo(_ + h, w, _ + h, w + l, l), o.arcTo(
|
|
6325
6325
|
_ + h,
|
|
6326
6326
|
w + g,
|
|
@@ -6339,23 +6339,23 @@ const xh = class extends Ot {
|
|
|
6339
6339
|
}
|
|
6340
6340
|
/** @access private */
|
|
6341
6341
|
drawIcons(e, r, i, n) {
|
|
6342
|
-
const o = Math.min(Math.max(n * 0.15, 100), 200),
|
|
6343
|
-
let l = r +
|
|
6344
|
-
const h = i +
|
|
6342
|
+
const o = Math.min(Math.max(n * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
6343
|
+
let l = r + c;
|
|
6344
|
+
const h = i + c, g = (f) => {
|
|
6345
6345
|
const v = a(this, Ut).getContext("2d");
|
|
6346
|
-
v.save(), v.fillStyle = a(this, es).background, v.beginPath(), v.moveTo(l +
|
|
6346
|
+
v.save(), v.fillStyle = a(this, es).background, v.beginPath(), v.moveTo(l + d, h), v.arcTo(l + o, h, l + o, h + d, d), v.arcTo(
|
|
6347
6347
|
l + o,
|
|
6348
6348
|
h + o,
|
|
6349
|
-
l + o -
|
|
6349
|
+
l + o - d,
|
|
6350
6350
|
h + o,
|
|
6351
|
-
|
|
6352
|
-
), v.arcTo(l, h + o, l, h + o -
|
|
6351
|
+
d
|
|
6352
|
+
), v.arcTo(l, h + o, l, h + o - d, d), v.arcTo(l, h, l + d, h, d), v.closePath(), v.fill(), typeof f == "string" ? (v.font = `${o / 1.5}px sans-serif`, v.fillStyle = a(this, es).text, v.textAlign = "center", v.textBaseline = "top", v.fillText(f, o / 2 + l, h + c)) : v.drawImage(
|
|
6353
6353
|
f,
|
|
6354
|
-
l +
|
|
6355
|
-
h +
|
|
6356
|
-
o -
|
|
6357
|
-
o -
|
|
6358
|
-
), l += o +
|
|
6354
|
+
l + c,
|
|
6355
|
+
h + c,
|
|
6356
|
+
o - c * 2,
|
|
6357
|
+
o - c * 2
|
|
6358
|
+
), l += o + c, v.restore();
|
|
6359
6359
|
};
|
|
6360
6360
|
e.pinned && g(a(this, Sn)), e.handRaised && g(a(this, vn)), e.reaction && g(e.reaction);
|
|
6361
6361
|
}
|
|
@@ -6365,25 +6365,25 @@ const xh = class extends Ot {
|
|
|
6365
6365
|
if (a(this, Ut) === void 0)
|
|
6366
6366
|
return;
|
|
6367
6367
|
const n = a(this, Ut).getContext("2d"), o = this.getSources();
|
|
6368
|
-
let
|
|
6369
|
-
for (;
|
|
6368
|
+
let c = 0, d = 0;
|
|
6369
|
+
for (; c < a(this, we).height - 5; ) {
|
|
6370
6370
|
let g = 0;
|
|
6371
|
-
for (; g < a(this, we).width - 5 &&
|
|
6372
|
-
if ((l = o[
|
|
6373
|
-
const f = o[
|
|
6371
|
+
for (; g < a(this, we).width - 5 && d < i; ) {
|
|
6372
|
+
if ((l = o[d]) != null && l.enabled) {
|
|
6373
|
+
const f = o[d].element, [v, E, _, w, R, D, U, B] = ZC(
|
|
6374
6374
|
g,
|
|
6375
|
-
|
|
6375
|
+
c,
|
|
6376
6376
|
e,
|
|
6377
6377
|
r,
|
|
6378
6378
|
f.videoWidth,
|
|
6379
6379
|
f.videoHeight
|
|
6380
6380
|
);
|
|
6381
|
-
((h = f == null ? void 0 : f.classList) == null ? void 0 : h.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(f, v, E, _, w, -1 * R, D, -1 * U, B), n.restore()) : n.drawImage(f, v, E, _, w, R, D, U, B), this.drawIcons(o[
|
|
6381
|
+
((h = f == null ? void 0 : f.classList) == null ? void 0 : h.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(f, v, E, _, w, -1 * R, D, -1 * U, B), n.restore()) : n.drawImage(f, v, E, _, w, R, D, U, B), this.drawIcons(o[d], R, D, Math.max(U, B));
|
|
6382
6382
|
} else
|
|
6383
|
-
this.drawEmptyTile(
|
|
6384
|
-
|
|
6383
|
+
this.drawEmptyTile(d, e, r, o[d]);
|
|
6384
|
+
d += 1, g += e;
|
|
6385
6385
|
}
|
|
6386
|
-
|
|
6386
|
+
c += r;
|
|
6387
6387
|
}
|
|
6388
6388
|
}
|
|
6389
6389
|
/** @access private */
|
|
@@ -6495,11 +6495,11 @@ const xh = class extends Ot {
|
|
|
6495
6495
|
* @param {boolean} enabled if source is enabled
|
|
6496
6496
|
* @param {?string} [displayText] two character display text
|
|
6497
6497
|
*/
|
|
6498
|
-
addSource(e, r, i, n = !1, o = void 0,
|
|
6498
|
+
addSource(e, r, i, n = !1, o = void 0, c = void 0, d = !1) {
|
|
6499
6499
|
this.logger.debug("Pip::AddSource", {
|
|
6500
6500
|
pip: {
|
|
6501
6501
|
id: e,
|
|
6502
|
-
handRaised:
|
|
6502
|
+
handRaised: d
|
|
6503
6503
|
}
|
|
6504
6504
|
}), a(this, it)[e] = {
|
|
6505
6505
|
id: e,
|
|
@@ -6507,9 +6507,9 @@ const xh = class extends Ot {
|
|
|
6507
6507
|
enabled: i,
|
|
6508
6508
|
pinned: n,
|
|
6509
6509
|
displayText: o ? XC(o) : void 0,
|
|
6510
|
-
imageUrl:
|
|
6511
|
-
handRaised:
|
|
6512
|
-
},
|
|
6510
|
+
imageUrl: c,
|
|
6511
|
+
handRaised: d
|
|
6512
|
+
}, c && this.generateAvatar(e, c);
|
|
6513
6513
|
}
|
|
6514
6514
|
/**
|
|
6515
6515
|
* Update a video source
|
|
@@ -11814,21 +11814,21 @@ class or {
|
|
|
11814
11814
|
}
|
|
11815
11815
|
searchMessages(t, e) {
|
|
11816
11816
|
return u(this, null, function* () {
|
|
11817
|
-
var i, n, o,
|
|
11817
|
+
var i, n, o, c;
|
|
11818
11818
|
const r = {
|
|
11819
11819
|
searchTerm: t,
|
|
11820
11820
|
timeStamp: (i = e.timestamp) != null ? i : Date.now(),
|
|
11821
11821
|
size: (n = e.limit) != null ? n : 75,
|
|
11822
11822
|
from: (o = e.offset) != null ? o : 0,
|
|
11823
|
-
reversed: (
|
|
11823
|
+
reversed: (c = e.reversed) != null ? c : !0
|
|
11824
11824
|
};
|
|
11825
11825
|
try {
|
|
11826
|
-
const
|
|
11826
|
+
const d = yield a(this, _t).sendMessagePromise(
|
|
11827
11827
|
je.searchChannelMessages,
|
|
11828
11828
|
OA.toBinary(r)
|
|
11829
11829
|
);
|
|
11830
|
-
return cf.fromBinary(
|
|
11831
|
-
} catch (
|
|
11830
|
+
return cf.fromBinary(d.payload).messages;
|
|
11831
|
+
} catch (d) {
|
|
11832
11832
|
return [];
|
|
11833
11833
|
}
|
|
11834
11834
|
});
|
|
@@ -11887,9 +11887,9 @@ class or {
|
|
|
11887
11887
|
let o = i;
|
|
11888
11888
|
try {
|
|
11889
11889
|
o = r(n);
|
|
11890
|
-
} catch (
|
|
11890
|
+
} catch (c) {
|
|
11891
11891
|
this.logger.error("chatSocketHandler::on::binary_decode_error", {
|
|
11892
|
-
error:
|
|
11892
|
+
error: c
|
|
11893
11893
|
});
|
|
11894
11894
|
}
|
|
11895
11895
|
return e(o);
|
|
@@ -11996,8 +11996,8 @@ class Yp {
|
|
|
11996
11996
|
const { baseURL: r } = this.defaults, i = t.startsWith("http") ? t : `${r}${t.startsWith("/") ? t : `/${t}`}`;
|
|
11997
11997
|
if (e) {
|
|
11998
11998
|
const n = new URLSearchParams();
|
|
11999
|
-
return Object.entries(e).forEach(([o,
|
|
12000
|
-
n.append(o,
|
|
11999
|
+
return Object.entries(e).forEach(([o, c]) => {
|
|
12000
|
+
n.append(o, c);
|
|
12001
12001
|
}), `${i}${i.includes("?") ? "&" : "?"}${n.toString()}`;
|
|
12002
12002
|
}
|
|
12003
12003
|
return i;
|
|
@@ -12007,15 +12007,15 @@ class Yp {
|
|
|
12007
12007
|
var g;
|
|
12008
12008
|
const e = ((g = t.method) == null ? void 0 : g.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = N(N({}, this.defaults.headers.common), t.headers);
|
|
12009
12009
|
e !== "GET" && e !== "HEAD" && t.data && !i["Content-Type"] && (i["Content-Type"] = "application/json");
|
|
12010
|
-
const o = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data,
|
|
12010
|
+
const o = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data, c = {
|
|
12011
12011
|
method: e,
|
|
12012
12012
|
headers: i,
|
|
12013
12013
|
body: e !== "GET" && e !== "HEAD" && t.data ? o : void 0
|
|
12014
|
-
},
|
|
12014
|
+
}, d = t.timeout || this.defaults.timeout, l = t.retry !== void 0 ? t.retry : this.defaults.retry, h = t.retryDelay || this.defaults.retryDelay;
|
|
12015
12015
|
try {
|
|
12016
|
-
const f = new AbortController(), v = setTimeout(() => f.abort(),
|
|
12017
|
-
|
|
12018
|
-
const E = yield fetch(r,
|
|
12016
|
+
const f = new AbortController(), v = setTimeout(() => f.abort(), d);
|
|
12017
|
+
c.signal = f.signal;
|
|
12018
|
+
const E = yield fetch(r, c);
|
|
12019
12019
|
clearTimeout(v);
|
|
12020
12020
|
let _ = null;
|
|
12021
12021
|
const w = E.headers.get("content-type");
|
|
@@ -12089,10 +12089,10 @@ class c0 {
|
|
|
12089
12089
|
retry: i = n0,
|
|
12090
12090
|
retryDelay: n = a0,
|
|
12091
12091
|
baseURL: o = ii.apiBase.prod,
|
|
12092
|
-
authToken:
|
|
12093
|
-
cachedUserDetails:
|
|
12092
|
+
authToken: c,
|
|
12093
|
+
cachedUserDetails: d
|
|
12094
12094
|
} = e || {};
|
|
12095
|
-
this.iceServers =
|
|
12095
|
+
this.iceServers = d == null ? void 0 : d.iceServers, this.userDetails = d == null ? void 0 : d.userDetails, this.roomDetails = d == null ? void 0 : d.roomDetails, this.requests = new Yp({
|
|
12096
12096
|
baseURL: o,
|
|
12097
12097
|
timeout: r,
|
|
12098
12098
|
retry: i,
|
|
@@ -12105,7 +12105,7 @@ class c0 {
|
|
|
12105
12105
|
retry: i,
|
|
12106
12106
|
retryDelay: n,
|
|
12107
12107
|
responseType: "json"
|
|
12108
|
-
}), this.setAuthToken(
|
|
12108
|
+
}), this.setAuthToken(c, { bearer: !0 });
|
|
12109
12109
|
const l = this.requests.request.bind(this.requests);
|
|
12110
12110
|
this.requests.request = (h) => u(this, null, function* () {
|
|
12111
12111
|
var f, v, E, _, w;
|
|
@@ -12364,12 +12364,12 @@ const ya = {
|
|
|
12364
12364
|
function Nt(s, t) {
|
|
12365
12365
|
return function(e, r, i) {
|
|
12366
12366
|
const n = i.value;
|
|
12367
|
-
let o = 0,
|
|
12368
|
-
return i.value = function(...
|
|
12367
|
+
let o = 0, c = Date.now();
|
|
12368
|
+
return i.value = function(...d) {
|
|
12369
12369
|
const l = Date.now(), h = t ? this[t] : s;
|
|
12370
|
-
if (l -
|
|
12370
|
+
if (l - c > h.period * 1e3 && (c = l, o = 0), o >= h.maxInvocations)
|
|
12371
12371
|
throw new k(`Method rate limit ${h.maxInvocations} invocations/${h.period}sec exceeded`, "0013");
|
|
12372
|
-
return o += 1, n.apply(this,
|
|
12372
|
+
return o += 1, n.apply(this, d);
|
|
12373
12373
|
}, i;
|
|
12374
12374
|
};
|
|
12375
12375
|
}
|
|
@@ -12454,13 +12454,13 @@ let zt = (pg = class extends Ot {
|
|
|
12454
12454
|
/** @access private */
|
|
12455
12455
|
sendTextMessageInternal(t, e) {
|
|
12456
12456
|
return u(this, null, function* () {
|
|
12457
|
-
var i, n, o,
|
|
12457
|
+
var i, n, o, c, d, l;
|
|
12458
12458
|
if (t.length > this.maxTextLimit)
|
|
12459
12459
|
throw new k("Max character limit breached", "0503");
|
|
12460
12460
|
if (e && e.length > 0) {
|
|
12461
12461
|
if (!((i = a(this, te).permissions) != null && i.chatPrivate.canSend) || !((n = a(this, te).permissions) != null && n.chatPrivate.text))
|
|
12462
12462
|
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new k("Could not send message to private chat.", "0501");
|
|
12463
|
-
} else if (!((
|
|
12463
|
+
} else if (!((c = (o = a(this, te).permissions) == null ? void 0 : o.chatPublic) != null && c.canSend) || !((l = (d = a(this, te).permissions) == null ? void 0 : d.chatPublic) != null && l.text))
|
|
12464
12464
|
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new k("Could not send message to public chat.", "0501");
|
|
12465
12465
|
if (!t)
|
|
12466
12466
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new k("Message can not be empty.", "0502");
|
|
@@ -12479,13 +12479,13 @@ let zt = (pg = class extends Ot {
|
|
|
12479
12479
|
/** @access private */
|
|
12480
12480
|
sendImageMessageInternal(t, e) {
|
|
12481
12481
|
return u(this, null, function* () {
|
|
12482
|
-
var i, n, o,
|
|
12482
|
+
var i, n, o, c, d, l;
|
|
12483
12483
|
if (e && e.length > 0) {
|
|
12484
12484
|
if (!((i = a(this, te).permissions) != null && i.chatPrivate.canSend) || !((n = a(this, te).permissions) != null && n.chatPrivate.files)) {
|
|
12485
12485
|
this.logger.error("sendImageMessage::private_chat_permission_denied");
|
|
12486
12486
|
return;
|
|
12487
12487
|
}
|
|
12488
|
-
} else if (!((
|
|
12488
|
+
} else if (!((c = (o = a(this, te).permissions) == null ? void 0 : o.chatPublic) != null && c.canSend) || !((l = (d = a(this, te).permissions) == null ? void 0 : d.chatPublic) != null && l.files)) {
|
|
12489
12489
|
this.logger.error("sendImageMessage::permission_denied");
|
|
12490
12490
|
return;
|
|
12491
12491
|
}
|
|
@@ -12518,13 +12518,13 @@ let zt = (pg = class extends Ot {
|
|
|
12518
12518
|
/** @access private */
|
|
12519
12519
|
sendFileMessageInternal(t, e) {
|
|
12520
12520
|
return u(this, null, function* () {
|
|
12521
|
-
var r, i, n, o,
|
|
12521
|
+
var r, i, n, o, c, d;
|
|
12522
12522
|
if (e && e.length > 0) {
|
|
12523
12523
|
if (!((r = a(this, te).permissions) != null && r.chatPrivate.canSend) || !((i = a(this, te).permissions) != null && i.chatPrivate.files)) {
|
|
12524
12524
|
this.logger.error("sendFileMessage::private_chat_permission_denied");
|
|
12525
12525
|
return;
|
|
12526
12526
|
}
|
|
12527
|
-
} else if (!((o = (n = a(this, te).permissions) == null ? void 0 : n.chatPublic) != null && o.canSend) || !((
|
|
12527
|
+
} else if (!((o = (n = a(this, te).permissions) == null ? void 0 : n.chatPublic) != null && o.canSend) || !((d = (c = a(this, te).permissions) == null ? void 0 : c.chatPublic) != null && d.files)) {
|
|
12528
12528
|
this.logger.error("sendFileMessage::permission_denied");
|
|
12529
12529
|
return;
|
|
12530
12530
|
}
|
|
@@ -12575,13 +12575,13 @@ let zt = (pg = class extends Ot {
|
|
|
12575
12575
|
*/
|
|
12576
12576
|
sendCustomMessage(t, e) {
|
|
12577
12577
|
return u(this, null, function* () {
|
|
12578
|
-
var n, o,
|
|
12578
|
+
var n, o, c, d, l, h, g, f, v, E, _, w, R, D, U;
|
|
12579
12579
|
if (e && e.length > 0) {
|
|
12580
|
-
if (!((n = a(this, te).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, te).permissions) != null && o.chatPrivate.files) || !((
|
|
12580
|
+
if (!((n = a(this, te).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, te).permissions) != null && o.chatPrivate.files) || !((c = a(this, te).permissions) != null && c.chatPrivate.text)) {
|
|
12581
12581
|
this.logger.error("sendCustomMessage::private_chat_permission_denied");
|
|
12582
12582
|
return;
|
|
12583
12583
|
}
|
|
12584
|
-
} else if (!((l = (
|
|
12584
|
+
} else if (!((l = (d = a(this, te).permissions) == null ? void 0 : d.chatPublic) != null && l.canSend) || !((g = (h = a(this, te).permissions) == null ? void 0 : h.chatPublic) != null && g.files) || !((v = (f = a(this, te).permissions) == null ? void 0 : f.chatPublic) != null && v.text)) {
|
|
12585
12585
|
this.logger.error("sendCustomMessage::permission_denied");
|
|
12586
12586
|
return;
|
|
12587
12587
|
}
|
|
@@ -12652,8 +12652,8 @@ let zt = (pg = class extends Ot {
|
|
|
12652
12652
|
}
|
|
12653
12653
|
editImageMessage(t, e) {
|
|
12654
12654
|
return u(this, null, function* () {
|
|
12655
|
-
var i, n, o,
|
|
12656
|
-
if (!((n = (i = a(this, te).permissions) == null ? void 0 : i.chatPublic) != null && n.canSend) || !((
|
|
12655
|
+
var i, n, o, c;
|
|
12656
|
+
if (!((n = (i = a(this, te).permissions) == null ? void 0 : i.chatPublic) != null && n.canSend) || !((c = (o = a(this, te).permissions) == null ? void 0 : o.chatPublic) != null && c.files)) {
|
|
12657
12657
|
this.logger.error("editImageMessage::permission_denied");
|
|
12658
12658
|
return;
|
|
12659
12659
|
}
|
|
@@ -12668,13 +12668,13 @@ let zt = (pg = class extends Ot {
|
|
|
12668
12668
|
return;
|
|
12669
12669
|
}
|
|
12670
12670
|
try {
|
|
12671
|
-
const
|
|
12672
|
-
yield
|
|
12671
|
+
const d = St(), { getLocation: l, putLocation: h } = yield d.getPresignedUrls(e.name);
|
|
12672
|
+
yield d.uploadFile(e, h), a(this, Je).editMessage(
|
|
12673
12673
|
t,
|
|
12674
12674
|
l,
|
|
12675
12675
|
Jt.IMAGE
|
|
12676
12676
|
);
|
|
12677
|
-
} catch (
|
|
12677
|
+
} catch (d) {
|
|
12678
12678
|
throw new k("Error editing image message.", "0500", this.logger);
|
|
12679
12679
|
}
|
|
12680
12680
|
});
|
|
@@ -12691,17 +12691,17 @@ let zt = (pg = class extends Ot {
|
|
|
12691
12691
|
return;
|
|
12692
12692
|
}
|
|
12693
12693
|
try {
|
|
12694
|
-
const
|
|
12695
|
-
yield
|
|
12694
|
+
const c = St(), { getLocation: d, putLocation: l } = yield c.getPresignedUrls(e.name);
|
|
12695
|
+
yield c.uploadFile(e, l), a(this, Je).editMessage(
|
|
12696
12696
|
t,
|
|
12697
12697
|
JSON.stringify({
|
|
12698
|
-
link:
|
|
12698
|
+
link: d,
|
|
12699
12699
|
name: e.name,
|
|
12700
12700
|
size: "size" in e ? e.size : 0
|
|
12701
12701
|
}),
|
|
12702
12702
|
Jt.FILE
|
|
12703
12703
|
);
|
|
12704
|
-
} catch (
|
|
12704
|
+
} catch (c) {
|
|
12705
12705
|
throw new k("Error editing file message.", "0500", this.logger);
|
|
12706
12706
|
}
|
|
12707
12707
|
});
|
|
@@ -12777,7 +12777,7 @@ let zt = (pg = class extends Ot {
|
|
|
12777
12777
|
direction: r = "after"
|
|
12778
12778
|
}) {
|
|
12779
12779
|
return (yield a(this, Je).getChatMessagesPaginated(t, e, r === "before")).messages.map(
|
|
12780
|
-
(
|
|
12780
|
+
(c) => to.formatSocketPeerMessage(c)
|
|
12781
12781
|
);
|
|
12782
12782
|
});
|
|
12783
12783
|
}
|
|
@@ -12798,7 +12798,7 @@ let zt = (pg = class extends Ot {
|
|
|
12798
12798
|
oneofKind: "userId",
|
|
12799
12799
|
userId: i
|
|
12800
12800
|
})).messages.map(
|
|
12801
|
-
(
|
|
12801
|
+
(d) => to.formatSocketPeerMessage(d)
|
|
12802
12802
|
);
|
|
12803
12803
|
});
|
|
12804
12804
|
}
|
|
@@ -12817,7 +12817,7 @@ let zt = (pg = class extends Ot {
|
|
|
12817
12817
|
oneofKind: "pinned",
|
|
12818
12818
|
pinned: !0
|
|
12819
12819
|
})).messages.map(
|
|
12820
|
-
(
|
|
12820
|
+
(c) => to.formatSocketPeerMessage(c)
|
|
12821
12821
|
);
|
|
12822
12822
|
});
|
|
12823
12823
|
}
|
|
@@ -12953,9 +12953,9 @@ const pr = (gg = class {
|
|
|
12953
12953
|
images: i,
|
|
12954
12954
|
message: n,
|
|
12955
12955
|
videos: o,
|
|
12956
|
-
files:
|
|
12956
|
+
files: c
|
|
12957
12957
|
} = JSON.parse(s.payload);
|
|
12958
|
-
e.message = n, e.html = r, e.images = i, e.videos = o, e.files =
|
|
12958
|
+
e.message = n, e.html = r, e.images = i, e.videos = o, e.files = c;
|
|
12959
12959
|
break;
|
|
12960
12960
|
}
|
|
12961
12961
|
}
|
|
@@ -13350,10 +13350,10 @@ Pu = R0([
|
|
|
13350
13350
|
function b0(s) {
|
|
13351
13351
|
let t = "", e = [""];
|
|
13352
13352
|
const r = [e];
|
|
13353
|
-
let i = 0, n = 0, o = !0,
|
|
13354
|
-
for (
|
|
13355
|
-
|
|
13356
|
-
` && o ? (t === "\r" && (e[i] = e[i].slice(0, -1)), e = r[++n] = [
|
|
13353
|
+
let i = 0, n = 0, o = !0, c;
|
|
13354
|
+
for (c of s)
|
|
13355
|
+
c === '"' ? (o && c === t && (e[i] += c), o = !o) : c === "," && o ? c = e[++i] = "" : c === `
|
|
13356
|
+
` && o ? (t === "\r" && (e[i] = e[i].slice(0, -1)), e = r[++n] = [c = ""], i = 0) : e[i] += c, t = c;
|
|
13357
13357
|
return r;
|
|
13358
13358
|
}
|
|
13359
13359
|
var k0 = Object.defineProperty, A0 = Object.getOwnPropertyDescriptor, vf = (s, t, e, r) => {
|
|
@@ -13400,16 +13400,16 @@ let qr = (vg = class extends Ot {
|
|
|
13400
13400
|
i,
|
|
13401
13401
|
n,
|
|
13402
13402
|
o,
|
|
13403
|
-
|
|
13404
|
-
|
|
13403
|
+
c,
|
|
13404
|
+
d
|
|
13405
13405
|
]] = b0(t);
|
|
13406
13406
|
return {
|
|
13407
13407
|
id: ga(),
|
|
13408
|
-
name:
|
|
13408
|
+
name: c,
|
|
13409
13409
|
peerId: i,
|
|
13410
13410
|
userId: n,
|
|
13411
13411
|
customParticipantId: o,
|
|
13412
|
-
transcript:
|
|
13412
|
+
transcript: d,
|
|
13413
13413
|
isPartialTranscript: e,
|
|
13414
13414
|
date: new Date(parseInt(r, 10) * 1e3)
|
|
13415
13415
|
};
|
|
@@ -13608,16 +13608,16 @@ const Tf = (Tg = class {
|
|
|
13608
13608
|
let i;
|
|
13609
13609
|
try {
|
|
13610
13610
|
i = qr.parseTranscript(e, r);
|
|
13611
|
-
} catch (
|
|
13612
|
-
this.logger.error(`Failed to parse transcript: ${e}`,
|
|
13611
|
+
} catch (d) {
|
|
13612
|
+
this.logger.error(`Failed to parse transcript: ${e}`, d);
|
|
13613
13613
|
}
|
|
13614
13614
|
if (!i) {
|
|
13615
13615
|
this.logger.warn("Received empty transcript data");
|
|
13616
13616
|
return;
|
|
13617
13617
|
}
|
|
13618
13618
|
this.ai.onTranscript(i);
|
|
13619
|
-
const { peerId: n, name: o, transcript:
|
|
13620
|
-
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${
|
|
13619
|
+
const { peerId: n, name: o, transcript: c } = i;
|
|
13620
|
+
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
13621
13621
|
});
|
|
13622
13622
|
}
|
|
13623
13623
|
}, yr = new WeakMap(), Rn = new WeakMap(), Ct = new WeakMap(), Tg);
|
|
@@ -13652,9 +13652,9 @@ const Fa = {}, dr = {
|
|
|
13652
13652
|
}) {
|
|
13653
13653
|
return (r, i, n) => {
|
|
13654
13654
|
const o = n.value;
|
|
13655
|
-
return n.value = function(...
|
|
13655
|
+
return n.value = function(...d) {
|
|
13656
13656
|
var E, _;
|
|
13657
|
-
const l = (_ = (this == null ? void 0 : this.peerId) || ((E =
|
|
13657
|
+
const l = (_ = (this == null ? void 0 : this.peerId) || ((E = d[0]) == null ? void 0 : E.authToken)) != null ? _ : "", h = `${t}-${l}`, g = this == null ? void 0 : this.logger;
|
|
13658
13658
|
if (Fa[h]) {
|
|
13659
13659
|
const w = new Error(
|
|
13660
13660
|
`Unsupported concurrent calls on method: ${s}.`
|
|
@@ -13673,7 +13673,7 @@ const Fa = {}, dr = {
|
|
|
13673
13673
|
const f = setTimeout(
|
|
13674
13674
|
() => delete Fa[h],
|
|
13675
13675
|
e
|
|
13676
|
-
), v = o.apply(this,
|
|
13676
|
+
), v = o.apply(this, d);
|
|
13677
13677
|
return Promise.resolve(v).then(() => {
|
|
13678
13678
|
delete Fa[h], clearTimeout(f);
|
|
13679
13679
|
}).catch(() => {
|
|
@@ -13690,8 +13690,8 @@ var O0 = Object.defineProperty, N0 = Object.getOwnPropertyDescriptor, Qi = (s, t
|
|
|
13690
13690
|
}, Bt, Cd, ie, _o, ms, Ue, Co, Cu, bn, Qc;
|
|
13691
13691
|
class Kr extends Ot {
|
|
13692
13692
|
constructor(e, r, i, n, o) {
|
|
13693
|
-
const
|
|
13694
|
-
super(
|
|
13693
|
+
const c = e.getValue("logger");
|
|
13694
|
+
super(c);
|
|
13695
13695
|
// eslint-disable-next-line class-methods-use-this
|
|
13696
13696
|
m(this, Co);
|
|
13697
13697
|
/**
|
|
@@ -13730,8 +13730,8 @@ class Kr extends Ot {
|
|
|
13730
13730
|
* who has requested leaves/joins the meeting
|
|
13731
13731
|
*/
|
|
13732
13732
|
[b.UPDATE_STAGE_REQUESTS]: (o) => u(this, [o], function* ({ add: n }) {
|
|
13733
|
-
const
|
|
13734
|
-
(n ||
|
|
13733
|
+
const c = a(this, ms).length, { stageRequests: d } = this.getAccessRequests();
|
|
13734
|
+
(n || d.length > c) && this.emit("newStageRequest", { count: d.length }), this.emit("stageAccessRequestUpdate", d);
|
|
13735
13735
|
})
|
|
13736
13736
|
}, r = () => {
|
|
13737
13737
|
Object.entries(e).forEach(([n, o]) => {
|
|
@@ -14228,8 +14228,8 @@ class Pf extends Map {
|
|
|
14228
14228
|
return this.set(e.id, e, r);
|
|
14229
14229
|
}
|
|
14230
14230
|
set(e, r, i = !0) {
|
|
14231
|
-
const n = super.set(e, r), o = (
|
|
14232
|
-
this.emit(
|
|
14231
|
+
const n = super.set(e, r), o = (c, ...d) => {
|
|
14232
|
+
this.emit(c, r, ...d);
|
|
14233
14233
|
};
|
|
14234
14234
|
return a(this, hi).set(e, o), r.on("*", o), i && a(this, De).emit(this.onAddEvent, r), n;
|
|
14235
14235
|
}
|
|
@@ -14324,23 +14324,23 @@ const _f = (Eg = class {
|
|
|
14324
14324
|
return u(this, null, function* () {
|
|
14325
14325
|
var l, h;
|
|
14326
14326
|
const i = s.getValue("logger"), n = s.getValue("connectionHandler"), o = new wu(i);
|
|
14327
|
-
let
|
|
14328
|
-
n.socketState.state === "connected" ? (i.info("Creating active plugins store immediately. Socket is already connected."),
|
|
14327
|
+
let c;
|
|
14328
|
+
n.socketState.state === "connected" ? (i.info("Creating active plugins store immediately. Socket is already connected."), c = yield r.create(du, !0)) : i.info("Deferring active plugins store creation until socket connects."), t.forEach((g) => {
|
|
14329
14329
|
const f = new go(
|
|
14330
14330
|
s,
|
|
14331
14331
|
g,
|
|
14332
|
-
|
|
14332
|
+
c,
|
|
14333
14333
|
e
|
|
14334
14334
|
);
|
|
14335
14335
|
o.all.add(f);
|
|
14336
14336
|
});
|
|
14337
|
-
const
|
|
14337
|
+
const d = new _f(
|
|
14338
14338
|
s,
|
|
14339
14339
|
o,
|
|
14340
14340
|
r,
|
|
14341
|
-
|
|
14341
|
+
c
|
|
14342
14342
|
);
|
|
14343
|
-
return
|
|
14343
|
+
return c ? V(l = d, Io, ku).call(l) : V(h = d, wd, Cf).call(h), d;
|
|
14344
14344
|
});
|
|
14345
14345
|
}
|
|
14346
14346
|
cleanup() {
|
|
@@ -14590,9 +14590,9 @@ let Ji = (Pg = class extends Ot {
|
|
|
14590
14590
|
t === "stop" && (n.state = "STOPPING", this.emit("recordingUpdate", "STOPPING"));
|
|
14591
14591
|
try {
|
|
14592
14592
|
yield St().updateRecording(n.id, t);
|
|
14593
|
-
} catch (
|
|
14593
|
+
} catch (c) {
|
|
14594
14594
|
throw this.logger.error("Recording::stop::recording_failed_to_stop", {
|
|
14595
|
-
error:
|
|
14595
|
+
error: c
|
|
14596
14596
|
}), n.state !== o && (n.state = o, this.emit("recordingUpdate", o)), new k("Error while stopping recording", "1000", this.logger);
|
|
14597
14597
|
}
|
|
14598
14598
|
}));
|
|
@@ -14820,21 +14820,21 @@ class Tt extends Ta {
|
|
|
14820
14820
|
audio: e,
|
|
14821
14821
|
video: r
|
|
14822
14822
|
}) {
|
|
14823
|
-
var
|
|
14823
|
+
var c;
|
|
14824
14824
|
e ? a(this, Re).getValue("callstats").audioOn() : a(this, Re).getValue("callstats").audioOff(), r ? a(this, Re).getValue("callstats").videoOn() : a(this, Re).getValue("callstats").videoOff();
|
|
14825
14825
|
let n, o;
|
|
14826
14826
|
if (e && r)
|
|
14827
14827
|
try {
|
|
14828
|
-
const
|
|
14828
|
+
const d = yield a(this, xe).getAudioAndVideoTrack(
|
|
14829
14829
|
a(this, me).userSelectedDevice,
|
|
14830
14830
|
a(this, he).userSelectedDevice
|
|
14831
14831
|
);
|
|
14832
|
-
n =
|
|
14833
|
-
} catch (
|
|
14832
|
+
n = d.audioTrack, o = d.videoTrack;
|
|
14833
|
+
} catch (d) {
|
|
14834
14834
|
this.logger.error(
|
|
14835
14835
|
"LocalMediaHandler::init::Failed to get audio video tracks",
|
|
14836
14836
|
{
|
|
14837
|
-
error:
|
|
14837
|
+
error: d
|
|
14838
14838
|
}
|
|
14839
14839
|
);
|
|
14840
14840
|
}
|
|
@@ -14844,9 +14844,9 @@ class Tt extends Ta {
|
|
|
14844
14844
|
!1,
|
|
14845
14845
|
a(this, me).userSelectedDevice
|
|
14846
14846
|
);
|
|
14847
|
-
} catch (
|
|
14847
|
+
} catch (d) {
|
|
14848
14848
|
this.logger.error("LocalMediaHandler::init::Failed to get audio track", {
|
|
14849
|
-
error:
|
|
14849
|
+
error: d
|
|
14850
14850
|
});
|
|
14851
14851
|
}
|
|
14852
14852
|
if (!o && r)
|
|
@@ -14854,25 +14854,25 @@ class Tt extends Ta {
|
|
|
14854
14854
|
o = yield a(this, xe).getVideoTrack(
|
|
14855
14855
|
a(this, he).userSelectedDevice
|
|
14856
14856
|
);
|
|
14857
|
-
} catch (
|
|
14857
|
+
} catch (d) {
|
|
14858
14858
|
this.logger.error("LocalMediaHandler::init::Failed to get video track", {
|
|
14859
|
-
error:
|
|
14859
|
+
error: d
|
|
14860
14860
|
});
|
|
14861
14861
|
}
|
|
14862
14862
|
e && !n && a(this, Re).getValue("callstats").audioOff(), r && !o && a(this, Re).getValue("callstats").videoOff(), yield a(this, me).setMediaTrack(n), yield a(this, he).setMediaTrack(o);
|
|
14863
14863
|
try {
|
|
14864
14864
|
yield this.setupSpeaker();
|
|
14865
|
-
} catch (
|
|
14865
|
+
} catch (d) {
|
|
14866
14866
|
}
|
|
14867
14867
|
if (o) {
|
|
14868
|
-
const
|
|
14869
|
-
a(this, Re).getValue("callstats").selectedDevice("VIDEO",
|
|
14868
|
+
const d = yield this.getDeviceById(o.getSettings().deviceId);
|
|
14869
|
+
a(this, Re).getValue("callstats").selectedDevice("VIDEO", d);
|
|
14870
14870
|
}
|
|
14871
14871
|
if (n) {
|
|
14872
|
-
const
|
|
14873
|
-
a(this, Re).getValue("callstats").selectedDevice("AUDIO",
|
|
14872
|
+
const d = yield this.getDeviceById(n.getSettings().deviceId);
|
|
14873
|
+
a(this, Re).getValue("callstats").selectedDevice("AUDIO", d);
|
|
14874
14874
|
}
|
|
14875
|
-
(
|
|
14875
|
+
(c = a(this, xs).currentDevice) != null && c.deviceId && a(this, Re).getValue("callstats").selectedDevice("SPEAKER", a(this, xs).currentDevice), a(this, xe).onDeviceChange((d, l, h) => {
|
|
14876
14876
|
this.onDeviceChange(l, h);
|
|
14877
14877
|
});
|
|
14878
14878
|
});
|
|
@@ -15064,12 +15064,12 @@ class Tt extends Ta {
|
|
|
15064
15064
|
if (this.emit("DEVICE_LIST_UPDATED", e), r || !a(this, Do))
|
|
15065
15065
|
return;
|
|
15066
15066
|
let i = !1;
|
|
15067
|
-
(n = e == null ? void 0 : e.added) == null || n.reverse().forEach((
|
|
15068
|
-
var
|
|
15069
|
-
|
|
15070
|
-
})), i || (o = e == null ? void 0 : e.removed) == null || o.forEach((
|
|
15071
|
-
var
|
|
15072
|
-
if (
|
|
15067
|
+
(n = e == null ? void 0 : e.added) == null || n.reverse().forEach((c) => u(this, null, function* () {
|
|
15068
|
+
var d;
|
|
15069
|
+
c && !gd(c) && (c.kind === "audioinput" && ((d = this.audioTrack) == null ? void 0 : d.enabled) === !0 ? yield this.setAudioDevice(c, { saveDevicePreference: !1 }) : c.kind === "audiooutput" && (i = !0, yield this.setSpeakerDevice(c, { saveDevicePreference: !1 })));
|
|
15070
|
+
})), i || (o = e == null ? void 0 : e.removed) == null || o.forEach((c) => u(this, null, function* () {
|
|
15071
|
+
var d;
|
|
15072
|
+
if (c.kind === "audiooutput" && ((d = this.getCurrentDevices().speaker) == null ? void 0 : d.deviceId) === c.deviceId) {
|
|
15073
15073
|
const l = yield this.getSpeakerDevices();
|
|
15074
15074
|
(l == null ? void 0 : l.length) > 0 && (yield this.setSpeakerDevice(l[0], { saveDevicePreference: !1 }));
|
|
15075
15075
|
}
|
|
@@ -15224,21 +15224,21 @@ function rM(s, t, e) {
|
|
|
15224
15224
|
if (!(t != null && t.length))
|
|
15225
15225
|
return e;
|
|
15226
15226
|
const r = s.getValue("logger"), i = new AudioContext(), n = yield Promise.all(
|
|
15227
|
-
t == null ? void 0 : t.map((
|
|
15227
|
+
t == null ? void 0 : t.map((d) => d(i))
|
|
15228
15228
|
), o = i.createMediaStreamSource(
|
|
15229
15229
|
new MediaStream([e])
|
|
15230
|
-
),
|
|
15230
|
+
), c = i.createMediaStreamDestination();
|
|
15231
15231
|
try {
|
|
15232
|
-
let
|
|
15232
|
+
let d = o;
|
|
15233
15233
|
for (let l = 0; l < n.length; l += 1)
|
|
15234
|
-
|
|
15235
|
-
|
|
15236
|
-
} catch (
|
|
15234
|
+
d.connect(n[l]), d = n[l];
|
|
15235
|
+
d.connect(c);
|
|
15236
|
+
} catch (d) {
|
|
15237
15237
|
return r.error("getTransformedAudioTrack::middleware_execution_failed", {
|
|
15238
|
-
error:
|
|
15238
|
+
error: d
|
|
15239
15239
|
}), e;
|
|
15240
15240
|
}
|
|
15241
|
-
return
|
|
15241
|
+
return c.stream.getAudioTracks()[0];
|
|
15242
15242
|
});
|
|
15243
15243
|
}
|
|
15244
15244
|
var fi, Oo;
|
|
@@ -15279,21 +15279,21 @@ class iM {
|
|
|
15279
15279
|
value: e.getSettings()
|
|
15280
15280
|
}), v;
|
|
15281
15281
|
}
|
|
15282
|
-
const o = document.createElement("video"),
|
|
15283
|
-
|
|
15284
|
-
const
|
|
15285
|
-
o.srcObject =
|
|
15282
|
+
const o = document.createElement("video"), c = new MediaStream();
|
|
15283
|
+
c.addTrack(e);
|
|
15284
|
+
const d = i.getContext("2d");
|
|
15285
|
+
o.srcObject = c, o.autoplay = !0, this.terminateMiddlewareWebWorker();
|
|
15286
15286
|
const l = () => u(this, null, function* () {
|
|
15287
15287
|
if (e.enabled === !1 || e.readyState === "ended") {
|
|
15288
15288
|
this.terminateMiddlewareWebWorker(), o.remove(), i.remove();
|
|
15289
15289
|
return;
|
|
15290
15290
|
}
|
|
15291
15291
|
try {
|
|
15292
|
-
|
|
15292
|
+
d.drawImage(o, 0, 0);
|
|
15293
15293
|
for (let f = 0; f < n.length; f += 1)
|
|
15294
15294
|
typeof n[f] == "function" && (yield n[f](
|
|
15295
15295
|
i,
|
|
15296
|
-
|
|
15296
|
+
d
|
|
15297
15297
|
));
|
|
15298
15298
|
} catch (f) {
|
|
15299
15299
|
this.logger.error(
|
|
@@ -15394,15 +15394,15 @@ const nM = {
|
|
|
15394
15394
|
}
|
|
15395
15395
|
]]
|
|
15396
15396
|
], oM = (s, t) => {
|
|
15397
|
-
var
|
|
15398
|
-
const e = (
|
|
15397
|
+
var d, l, h;
|
|
15398
|
+
const e = (d = s == null ? void 0 : s.getValue("overrides")) == null ? void 0 : d.simulcastConfig;
|
|
15399
15399
|
if ((l = e == null ? void 0 : e.encodings) != null && l.length)
|
|
15400
15400
|
return e.encodings;
|
|
15401
15401
|
const r = "getSettings" in t && t.getSettings().width || "getConstraints" in t && t.getConstraints().width || "originalSettings" in t && ((h = t.originalSettings) == null ? void 0 : h.width), i = aM, n = i.map(([g]) => g).sort((g, f) => g - f);
|
|
15402
|
-
let o = Number.MAX_VALUE,
|
|
15402
|
+
let o = Number.MAX_VALUE, c = 0;
|
|
15403
15403
|
return n.forEach((g, f) => {
|
|
15404
|
-
Math.abs(g - r) < o && (o = Math.abs(g - r),
|
|
15405
|
-
}), i[
|
|
15404
|
+
Math.abs(g - r) < o && (o = Math.abs(g - r), c = f);
|
|
15405
|
+
}), i[c][1];
|
|
15406
15406
|
};
|
|
15407
15407
|
var Ce = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(Ce || {});
|
|
15408
15408
|
const cM = zC(), en = _s(
|
|
@@ -15424,8 +15424,8 @@ class lM {
|
|
|
15424
15424
|
// eslint-disable-next-line class-methods-use-this
|
|
15425
15425
|
p(this, "getScreenShareConstraints", () => {
|
|
15426
15426
|
var l, h, g, f, v, E, _, w, R;
|
|
15427
|
-
const t = (l = a(this, Si)) == null ? void 0 : l.screenshare, e = (g = (h = t == null ? void 0 : t.width) == null ? void 0 : h.max) != null ? g : 1920, r = (v = (f = t == null ? void 0 : t.height) == null ? void 0 : f.max) != null ? v : 1080, i = (_ = (E = t == null ? void 0 : t.frameRate) == null ? void 0 : E.max) != null ? _ : 5, n = (R = (w = t == null ? void 0 : t.frameRate) == null ? void 0 : w.ideal) != null ? R : 5, o = t == null ? void 0 : t.displaySurface,
|
|
15428
|
-
let
|
|
15427
|
+
const t = (l = a(this, Si)) == null ? void 0 : l.screenshare, e = (g = (h = t == null ? void 0 : t.width) == null ? void 0 : h.max) != null ? g : 1920, r = (v = (f = t == null ? void 0 : t.height) == null ? void 0 : f.max) != null ? v : 1080, i = (_ = (E = t == null ? void 0 : t.frameRate) == null ? void 0 : E.max) != null ? _ : 5, n = (R = (w = t == null ? void 0 : t.frameRate) == null ? void 0 : w.ideal) != null ? R : 5, o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
15428
|
+
let d = {
|
|
15429
15429
|
width: { max: e },
|
|
15430
15430
|
height: { max: r },
|
|
15431
15431
|
frameRate: {
|
|
@@ -15433,20 +15433,20 @@ class lM {
|
|
|
15433
15433
|
max: i
|
|
15434
15434
|
}
|
|
15435
15435
|
};
|
|
15436
|
-
return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (
|
|
15436
|
+
return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (d = j(N({}, d), { displaySurface: o })), c !== void 0 && (d = j(N({}, d), { selfBrowserSurface: c })), {
|
|
15437
15437
|
audio: !0,
|
|
15438
|
-
video:
|
|
15438
|
+
video: d
|
|
15439
15439
|
};
|
|
15440
15440
|
});
|
|
15441
15441
|
// eslint-disable-next-line class-methods-use-this
|
|
15442
15442
|
p(this, "getAudioConstraints", (t) => {
|
|
15443
|
-
var n, o,
|
|
15443
|
+
var n, o, c, d, l, h, g;
|
|
15444
15444
|
const e = {}, r = (n = a(this, Si)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
15445
15445
|
return Se.isFirefox() || Se.isWebKitBased() ? (e.audio = {
|
|
15446
15446
|
deviceId: t,
|
|
15447
15447
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : !0,
|
|
15448
|
-
echoCancellation: (
|
|
15449
|
-
noiseSuppression: (
|
|
15448
|
+
echoCancellation: (c = r == null ? void 0 : r.echoCancellation) != null ? c : !0,
|
|
15449
|
+
noiseSuppression: (d = r == null ? void 0 : r.noiseSupression) != null ? d : !0,
|
|
15450
15450
|
channelCount: i
|
|
15451
15451
|
}, e) : (e.audio = {
|
|
15452
15452
|
autoGainControl: (l = r == null ? void 0 : r.autoGainControl) != null ? l : !0,
|
|
@@ -15456,14 +15456,14 @@ class lM {
|
|
|
15456
15456
|
}, t && (e.audio.deviceId = { exact: t }), e);
|
|
15457
15457
|
});
|
|
15458
15458
|
p(this, "getVideoConstraints", (t) => {
|
|
15459
|
-
var o,
|
|
15459
|
+
var o, c, d;
|
|
15460
15460
|
const e = {}, r = (o = a(this, Si)) == null ? void 0 : o.video, i = u_(nM);
|
|
15461
15461
|
let n = i.vga;
|
|
15462
15462
|
if (typeof r == "string") {
|
|
15463
15463
|
const l = i[r];
|
|
15464
15464
|
l && (n = l);
|
|
15465
15465
|
} else
|
|
15466
|
-
r !== void 0 && (n.height.ideal = r.height.ideal, n.width.ideal = r.width.ideal, n.frameRate.ideal = (
|
|
15466
|
+
r !== void 0 && (n.height.ideal = r.height.ideal, n.width.ideal = r.width.ideal, n.frameRate.ideal = (d = (c = r.frameRate) == null ? void 0 : c.ideal) != null ? d : 30);
|
|
15467
15467
|
return e.video = n, typeof e.video == "boolean" || (t ? e.video.deviceId = { exact: t } : e.video.facingMode = "user"), e;
|
|
15468
15468
|
});
|
|
15469
15469
|
S(this, Rd, t), S(this, Si, e);
|
|
@@ -15558,16 +15558,16 @@ let Dt = (_g = class extends uM {
|
|
|
15558
15558
|
return u(this, null, function* () {
|
|
15559
15559
|
var r, i, n, o;
|
|
15560
15560
|
try {
|
|
15561
|
-
const
|
|
15561
|
+
const c = yield this.getAudioInputDevices(), d = yield this.getVideoInputDevices(), l = !!(c != null && c.find(
|
|
15562
15562
|
(R) => R.deviceId === t
|
|
15563
15563
|
));
|
|
15564
15564
|
let h;
|
|
15565
|
-
t && l ? h = t :
|
|
15566
|
-
const g = !!(
|
|
15565
|
+
t && l ? h = t : c && ((r = c[0]) != null && r.deviceId) && (h = (i = c[0]) == null ? void 0 : i.deviceId);
|
|
15566
|
+
const g = !!(d != null && d.find(
|
|
15567
15567
|
(R) => R.deviceId === e
|
|
15568
15568
|
));
|
|
15569
15569
|
let f;
|
|
15570
|
-
e && g ? f = e :
|
|
15570
|
+
e && g ? f = e : d && ((n = d[0]) != null && n.deviceId) && (f = (o = d[0]) == null ? void 0 : o.deviceId);
|
|
15571
15571
|
const v = {
|
|
15572
15572
|
audio: a(this, Ft).getAudioConstraints(h).audio,
|
|
15573
15573
|
video: a(this, Ft).getVideoConstraints(f).video
|
|
@@ -15594,14 +15594,14 @@ let Dt = (_g = class extends uM {
|
|
|
15594
15594
|
message: this.permissions.video,
|
|
15595
15595
|
kind: "video"
|
|
15596
15596
|
}), { audioTrack: _, videoTrack: w };
|
|
15597
|
-
} catch (
|
|
15598
|
-
throw this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error:
|
|
15597
|
+
} catch (c) {
|
|
15598
|
+
throw this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: c }), new k("Couldnt fetch audio and video track", "1605");
|
|
15599
15599
|
}
|
|
15600
15600
|
});
|
|
15601
15601
|
}
|
|
15602
15602
|
getAudioTrack(t, e) {
|
|
15603
15603
|
return u(this, null, function* () {
|
|
15604
|
-
var
|
|
15604
|
+
var c, d;
|
|
15605
15605
|
let r = yield this.getAudioInputDevices();
|
|
15606
15606
|
if (!(r != null && r.length))
|
|
15607
15607
|
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", a(this, $e).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
@@ -15612,7 +15612,7 @@ let Dt = (_g = class extends uM {
|
|
|
15612
15612
|
(l) => l.deviceId === e
|
|
15613
15613
|
));
|
|
15614
15614
|
let n;
|
|
15615
|
-
e && i ? n = e : (
|
|
15615
|
+
e && i ? n = e : (c = r[0]) != null && c.deviceId && (n = (d = r[0]) == null ? void 0 : d.deviceId);
|
|
15616
15616
|
const o = (l) => u(this, null, function* () {
|
|
15617
15617
|
let h;
|
|
15618
15618
|
try {
|
|
@@ -15660,8 +15660,8 @@ let Dt = (_g = class extends uM {
|
|
|
15660
15660
|
}
|
|
15661
15661
|
getVideoTrack(t) {
|
|
15662
15662
|
return u(this, null, function* () {
|
|
15663
|
-
var
|
|
15664
|
-
const e = (
|
|
15663
|
+
var c, d, l;
|
|
15664
|
+
const e = (c = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : c.includes("OBS Virtual"), r = yield this.getVideoInputDevices();
|
|
15665
15665
|
if (!(r != null && r.length))
|
|
15666
15666
|
throw this.permissions.video = "NO_DEVICES_AVAILABLE", a(this, $e).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
15667
15667
|
message: this.permissions.video,
|
|
@@ -15671,7 +15671,7 @@ let Dt = (_g = class extends uM {
|
|
|
15671
15671
|
(h) => h.deviceId === t
|
|
15672
15672
|
));
|
|
15673
15673
|
let n;
|
|
15674
|
-
t && i ? n = t : (
|
|
15674
|
+
t && i ? n = t : (d = r[0]) != null && d.deviceId && (n = (l = r[0]) == null ? void 0 : l.deviceId);
|
|
15675
15675
|
const o = (h) => u(this, null, function* () {
|
|
15676
15676
|
try {
|
|
15677
15677
|
let g = h;
|
|
@@ -15790,13 +15790,13 @@ let Dt = (_g = class extends uM {
|
|
|
15790
15790
|
};
|
|
15791
15791
|
return t.sort((i, n) => {
|
|
15792
15792
|
var h, g;
|
|
15793
|
-
const o = e(i),
|
|
15794
|
-
if (o !==
|
|
15795
|
-
return o -
|
|
15796
|
-
const
|
|
15797
|
-
if (
|
|
15793
|
+
const o = e(i), c = e(n);
|
|
15794
|
+
if (o !== c)
|
|
15795
|
+
return o - c;
|
|
15796
|
+
const d = i.deviceId === "default" || ((h = i.label) == null ? void 0 : h.toLowerCase().includes("default")), l = n.deviceId === "default" || ((g = n.label) == null ? void 0 : g.toLowerCase().includes("default"));
|
|
15797
|
+
if (d && !l)
|
|
15798
15798
|
return -1;
|
|
15799
|
-
if (!
|
|
15799
|
+
if (!d && l)
|
|
15800
15800
|
return 1;
|
|
15801
15801
|
if (i.kind === "videoinput" && n.kind === "videoinput") {
|
|
15802
15802
|
const f = r(i), v = r(n);
|
|
@@ -15854,23 +15854,23 @@ let Dt = (_g = class extends uM {
|
|
|
15854
15854
|
var l, h;
|
|
15855
15855
|
const i = (g) => `${g.kind}-${g.label}-${g.deviceId}-${g.groupId}`, n = new Set(
|
|
15856
15856
|
e.map((g) => i(g))
|
|
15857
|
-
), o = yield this.getAvailableDevices(),
|
|
15857
|
+
), o = yield this.getAvailableDevices(), c = new Set(
|
|
15858
15858
|
o.map((g) => i(g))
|
|
15859
|
-
),
|
|
15859
|
+
), d = {
|
|
15860
15860
|
added: o.filter(
|
|
15861
15861
|
(g) => !n.has(i(g))
|
|
15862
15862
|
),
|
|
15863
15863
|
removed: e.filter(
|
|
15864
|
-
(g) => !
|
|
15864
|
+
(g) => !c.has(i(g))
|
|
15865
15865
|
),
|
|
15866
15866
|
devices: o
|
|
15867
15867
|
};
|
|
15868
|
-
if (e = o, (l =
|
|
15868
|
+
if (e = o, (l = d.added) != null && l.length || (h = d.removed) != null && h.length) {
|
|
15869
15869
|
this.logger.info("repopulated_full_device_list", {
|
|
15870
15870
|
devices: JSON.stringify(o)
|
|
15871
15871
|
});
|
|
15872
|
-
const g = [...
|
|
15873
|
-
g.some((f) => f.kind === "audioinput") && a(this, $e).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((f) => f.kind === "audioinput")), g.some((f) => f.kind === "videoinput") && a(this, $e).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((f) => f.kind === "videoinput")), g.some((f) => f.kind === "audiooutput") && a(this, $e).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((f) => f.kind === "audiooutput")), t(r,
|
|
15872
|
+
const g = [...d.added, ...d.removed];
|
|
15873
|
+
g.some((f) => f.kind === "audioinput") && a(this, $e).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((f) => f.kind === "audioinput")), g.some((f) => f.kind === "videoinput") && a(this, $e).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((f) => f.kind === "videoinput")), g.some((f) => f.kind === "audiooutput") && a(this, $e).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((f) => f.kind === "audiooutput")), t(r, d, !1);
|
|
15874
15874
|
}
|
|
15875
15875
|
}),
|
|
15876
15876
|
{ signal: a(this, Dn).signal }
|
|
@@ -15940,14 +15940,14 @@ const bf = Dt, Gi = {
|
|
|
15940
15940
|
const r = typeof e == "number" ? e : 250, i = s.createMediaStreamSource(t), n = s.createAnalyser();
|
|
15941
15941
|
n.fftSize = 2048, i.connect(n);
|
|
15942
15942
|
const o = new Uint8Array(n.fftSize);
|
|
15943
|
-
let
|
|
15943
|
+
let c = !1;
|
|
15944
15944
|
setTimeout(() => {
|
|
15945
|
-
|
|
15945
|
+
c = !0;
|
|
15946
15946
|
}, r);
|
|
15947
|
-
function
|
|
15948
|
-
return
|
|
15947
|
+
function d() {
|
|
15948
|
+
return c ? Promise.resolve(!0) : (n.getByteTimeDomainData(o), o.some((l) => l !== 128 && l !== 0) ? Promise.resolve(!1) : gM().then(d));
|
|
15949
15949
|
}
|
|
15950
|
-
return
|
|
15950
|
+
return d().then(
|
|
15951
15951
|
(l) => (i.disconnect(), l),
|
|
15952
15952
|
(l) => {
|
|
15953
15953
|
throw i.disconnect(), l;
|
|
@@ -16330,7 +16330,7 @@ class Al extends Af {
|
|
|
16330
16330
|
}
|
|
16331
16331
|
conditionallyChangeTrack(t, e = !1) {
|
|
16332
16332
|
return u(this, null, function* () {
|
|
16333
|
-
var
|
|
16333
|
+
var d;
|
|
16334
16334
|
if (!t || this.userSelectedDevice || e)
|
|
16335
16335
|
return t;
|
|
16336
16336
|
let r = t;
|
|
@@ -16351,16 +16351,16 @@ class Al extends Af {
|
|
|
16351
16351
|
))
|
|
16352
16352
|
return r;
|
|
16353
16353
|
if (!(yield Zp(this.logger, r))) {
|
|
16354
|
-
const l = (
|
|
16354
|
+
const l = (d = o == null ? void 0 : o.devices.concat({
|
|
16355
16355
|
label: r.label
|
|
16356
|
-
})) != null ?
|
|
16356
|
+
})) != null ? d : [{ label: r.label }];
|
|
16357
16357
|
return Gi.setItem(Zl, JSON.stringify({
|
|
16358
16358
|
devices: l
|
|
16359
16359
|
}), this.logger), r;
|
|
16360
16360
|
}
|
|
16361
16361
|
this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack");
|
|
16362
|
-
const
|
|
16363
|
-
return n.filter((l) => l.deviceId !==
|
|
16362
|
+
const c = r.getSettings().deviceId;
|
|
16363
|
+
return n.filter((l) => l.deviceId !== c).some((l) => u(this, null, function* () {
|
|
16364
16364
|
var h;
|
|
16365
16365
|
if (r = yield this.mediaInterface.getAudioTrack(
|
|
16366
16366
|
!1,
|
|
@@ -16414,7 +16414,7 @@ class wM {
|
|
|
16414
16414
|
}
|
|
16415
16415
|
setupSpeaker(r, i) {
|
|
16416
16416
|
return u(this, arguments, function* (t, { saveDevicePreference: e }) {
|
|
16417
|
-
var
|
|
16417
|
+
var c, d;
|
|
16418
16418
|
if (!(a(this, vi) instanceof bf))
|
|
16419
16419
|
return;
|
|
16420
16420
|
let n = t;
|
|
@@ -16422,11 +16422,11 @@ class wM {
|
|
|
16422
16422
|
"audiooutput"
|
|
16423
16423
|
)).filter((h) => !gd(h))), !n)
|
|
16424
16424
|
throw new k("No speaker found", "1608");
|
|
16425
|
-
if (((
|
|
16425
|
+
if (((c = this.currentDevice) == null ? void 0 : c.deviceId) === n.deviceId)
|
|
16426
16426
|
return;
|
|
16427
16427
|
e && this.setUserPreferredDevice(n.deviceId), this.currentDevice = n;
|
|
16428
16428
|
const o = document.querySelectorAll("audio");
|
|
16429
|
-
(
|
|
16429
|
+
(d = o[0]) != null && d.setSinkId && o.forEach((l) => u(this, null, function* () {
|
|
16430
16430
|
if (typeof l.sinkId != "undefined" && this.currentDevice.deviceId && l.sinkId !== this.currentDevice.deviceId)
|
|
16431
16431
|
try {
|
|
16432
16432
|
yield l.setSinkId(this.currentDevice.deviceId);
|
|
@@ -16630,11 +16630,11 @@ class Ic extends Af {
|
|
|
16630
16630
|
if (!e || this.userSelectedDevice || r)
|
|
16631
16631
|
return e;
|
|
16632
16632
|
let i = e;
|
|
16633
|
-
const n = yield this.mediaInterface.getVideoInputDevices(), o = this.isNonPreferredDevice ? n.filter((
|
|
16634
|
-
|
|
16633
|
+
const n = yield this.mediaInterface.getVideoInputDevices(), o = this.isNonPreferredDevice ? n.filter((c) => !this.isNonPreferredDevice(
|
|
16634
|
+
c
|
|
16635
16635
|
)) : n;
|
|
16636
16636
|
return !(o != null && o.length) || window.FAST_RTK || o.find(
|
|
16637
|
-
(
|
|
16637
|
+
(c) => c.deviceId === e.getSettings().deviceId
|
|
16638
16638
|
) || (i.stop(), this.logger.info("localmediahandler::setupstreams::found_video_non_preferred"), i = yield this.mediaInterface.getVideoTrack(
|
|
16639
16639
|
o[0].deviceId
|
|
16640
16640
|
)), i;
|
|
@@ -16810,11 +16810,11 @@ const cn = class {
|
|
|
16810
16810
|
return (i = (r = (e = (t = a(this, at)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
|
|
16811
16811
|
}
|
|
16812
16812
|
get mediaConstraints() {
|
|
16813
|
-
var t, e, r, i, n, o,
|
|
16813
|
+
var t, e, r, i, n, o, c, d, l, h, g, f, v, E, _, w, R, D, U, B, F, H, X, Le;
|
|
16814
16814
|
return {
|
|
16815
16815
|
audio: {
|
|
16816
16816
|
enableStereo: (i = (r = (e = (t = a(this, at)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : en.audio.enableStereo,
|
|
16817
|
-
enableHighBitrate: (
|
|
16817
|
+
enableHighBitrate: (d = (c = (o = (n = a(this, at)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : en.audio.enableHighBitrate
|
|
16818
16818
|
},
|
|
16819
16819
|
video: {
|
|
16820
16820
|
quality: (f = (g = (h = (l = a(this, at)) == null ? void 0 : l.media) == null ? void 0 : h.video) == null ? void 0 : g.quality) != null ? f : en.video.quality,
|
|
@@ -17177,12 +17177,12 @@ class Ea {
|
|
|
17177
17177
|
}
|
|
17178
17178
|
Ke = new WeakMap(), Cr = new WeakMap(), wr = new WeakMap(), bd = new WeakSet(), Df = function(t, e, r = !0) {
|
|
17179
17179
|
let i;
|
|
17180
|
-
const n = a(this, Ke)[t], o = Object.prototype.toString.call(e),
|
|
17181
|
-
if (o !==
|
|
17180
|
+
const n = a(this, Ke)[t], o = Object.prototype.toString.call(e), c = Object.prototype.toString.call(n);
|
|
17181
|
+
if (o !== c) {
|
|
17182
17182
|
this.set(t, e);
|
|
17183
17183
|
return;
|
|
17184
17184
|
}
|
|
17185
|
-
switch (
|
|
17185
|
+
switch (c) {
|
|
17186
17186
|
case "[object Array]":
|
|
17187
17187
|
i = [...n, ...e];
|
|
17188
17188
|
break;
|
|
@@ -17235,10 +17235,10 @@ class $M {
|
|
|
17235
17235
|
{ name: t, socketHandler: a(this, Rr), meetingId: a(this, br) }
|
|
17236
17236
|
);
|
|
17237
17237
|
return a(this, Rr).storeGetKeys(a(this, br), t, []), new Promise((n, o) => {
|
|
17238
|
-
const
|
|
17238
|
+
const c = setTimeout(() => {
|
|
17239
17239
|
a(this, rs).delete(t), o(Error("Failed"));
|
|
17240
17240
|
}, 3e3);
|
|
17241
|
-
a(this, rs).set(t, { rejectTimeout:
|
|
17241
|
+
a(this, rs).set(t, { rejectTimeout: c, resolve: n, store: r });
|
|
17242
17242
|
});
|
|
17243
17243
|
}
|
|
17244
17244
|
refresh(t) {
|
|
@@ -17265,38 +17265,38 @@ Rr = new WeakMap(), br = new WeakMap(), Uo = new WeakSet(), Iu = function() {
|
|
|
17265
17265
|
var n, o;
|
|
17266
17266
|
if (e.pluginId !== a(this, br))
|
|
17267
17267
|
return;
|
|
17268
|
-
const r = (n = e.storeItems) == null ? void 0 : n.map((
|
|
17269
|
-
var
|
|
17268
|
+
const r = (n = e.storeItems) == null ? void 0 : n.map((c) => {
|
|
17269
|
+
var d;
|
|
17270
17270
|
return {
|
|
17271
|
-
timestamp:
|
|
17272
|
-
peerId:
|
|
17271
|
+
timestamp: c.timestamp,
|
|
17272
|
+
peerId: c.peerId,
|
|
17273
17273
|
payload: JSON.parse(
|
|
17274
|
-
(
|
|
17274
|
+
(d = c.payload) != null && d.length ? new TextDecoder().decode(c.payload) : "{}"
|
|
17275
17275
|
),
|
|
17276
|
-
key:
|
|
17276
|
+
key: c.storeKey
|
|
17277
17277
|
};
|
|
17278
17278
|
});
|
|
17279
17279
|
if (t === Is.storeGetKeys) {
|
|
17280
|
-
const
|
|
17281
|
-
if (a(this, rs).get(e.storeName) && (this.stores.set(e.storeName,
|
|
17280
|
+
const c = a(this, rs).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
|
|
17281
|
+
if (a(this, rs).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), a(this, rs).delete(e.storeName)), !d)
|
|
17282
17282
|
return;
|
|
17283
17283
|
r.forEach((l) => {
|
|
17284
|
-
|
|
17284
|
+
d.set(l.key, l.payload, !1, !1);
|
|
17285
17285
|
});
|
|
17286
17286
|
return;
|
|
17287
17287
|
}
|
|
17288
17288
|
const i = this.stores.get(e.storeName) || ((o = a(this, rs).get(e.storeName)) == null ? void 0 : o.store);
|
|
17289
|
-
i !== void 0 && (t === Is.storeInsertKeys && r.forEach(({ key:
|
|
17290
|
-
|
|
17291
|
-
}), t === Is.storeDeleteKeys && r.forEach(({ key:
|
|
17292
|
-
|
|
17289
|
+
i !== void 0 && (t === Is.storeInsertKeys && r.forEach(({ key: c, peerId: d, payload: l }) => {
|
|
17290
|
+
d !== a(this, Uo, Iu) && i.set(c, l, !1, !0);
|
|
17291
|
+
}), t === Is.storeDeleteKeys && r.forEach(({ key: c, peerId: d }) => {
|
|
17292
|
+
d !== a(this, Uo, Iu) && i.delete(c, !1, !0);
|
|
17293
17293
|
}));
|
|
17294
17294
|
})
|
|
17295
17295
|
);
|
|
17296
17296
|
});
|
|
17297
17297
|
};
|
|
17298
17298
|
function ri(s) {
|
|
17299
|
-
var t, e, r, i, n, o,
|
|
17299
|
+
var t, e, r, i, n, o, c, d, l, h, g, f, v;
|
|
17300
17300
|
return s ? {
|
|
17301
17301
|
media: {
|
|
17302
17302
|
audio: {
|
|
@@ -17313,8 +17313,8 @@ function ri(s) {
|
|
|
17313
17313
|
enabled: s.screenShareEnabled,
|
|
17314
17314
|
permission: "mediaPermissions" in s ? (n = s.mediaPermissions) == null ? void 0 : n.screenshare : null,
|
|
17315
17315
|
audio: {
|
|
17316
|
-
enabled: (
|
|
17317
|
-
trackId: (l = (
|
|
17316
|
+
enabled: (c = (o = s.screenShareTracks) == null ? void 0 : o.audio) == null ? void 0 : c.enabled,
|
|
17317
|
+
trackId: (l = (d = s.screenShareTracks) == null ? void 0 : d.audio) == null ? void 0 : l.id
|
|
17318
17318
|
},
|
|
17319
17319
|
video: {
|
|
17320
17320
|
enabled: (g = (h = s.screenShareTracks) == null ? void 0 : h.video) == null ? void 0 : g.enabled,
|
|
@@ -17441,11 +17441,11 @@ let ir = (Cg = class extends Ot {
|
|
|
17441
17441
|
const { clientWidth: e, clientHeight: r } = t, { width: i, height: n } = this.videoTrack.getSettings();
|
|
17442
17442
|
if (!i || !n)
|
|
17443
17443
|
return;
|
|
17444
|
-
const o = n / r,
|
|
17445
|
-
|
|
17444
|
+
const o = n / r, c = i / e, d = Math.max(o, c);
|
|
17445
|
+
d > qM && a(this, Bs) === 1 ? (S(this, Bs, 0), a(this, wt).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17446
17446
|
peerId: this.id,
|
|
17447
17447
|
maxSpatialLayer: a(this, Bs)
|
|
17448
|
-
})) :
|
|
17448
|
+
})) : d < FM && a(this, Bs) === 0 && (S(this, Bs, 1), a(this, wt).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
17449
17449
|
peerId: this.id,
|
|
17450
17450
|
maxSpatialLayer: a(this, Bs)
|
|
17451
17451
|
}));
|
|
@@ -17453,8 +17453,8 @@ let ir = (Cg = class extends Ot {
|
|
|
17453
17453
|
S(this, wt, t);
|
|
17454
17454
|
const {
|
|
17455
17455
|
id: o,
|
|
17456
|
-
userId:
|
|
17457
|
-
displayName:
|
|
17456
|
+
userId: c,
|
|
17457
|
+
displayName: d,
|
|
17458
17458
|
device: l,
|
|
17459
17459
|
picture: h,
|
|
17460
17460
|
isHost: g,
|
|
@@ -17468,7 +17468,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17468
17468
|
producers: U,
|
|
17469
17469
|
metadata: B
|
|
17470
17470
|
} = e;
|
|
17471
|
-
this.id = o, this.userId =
|
|
17471
|
+
this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = f, this.manualProducerConfig = bC, S(this, $n, v != null ? v : "ON_STAGE"), this.customParticipantId = E, this.audioEnabled = !_, this.audioTrack = w, this.videoEnabled = R, this.videoTrack = D, this.screenShareTracks = {
|
|
17472
17472
|
audio: void 0,
|
|
17473
17473
|
video: void 0
|
|
17474
17474
|
}, this.producers = U != null ? U : [], this.presetName = B == null ? void 0 : B.preset_name, S(this, Un, !1), S(this, $s, r), S(this, Bo, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), V(this, Ho, Mu).call(this);
|
|
@@ -18154,10 +18154,10 @@ let Yt = (wg = class extends Ot {
|
|
|
18154
18154
|
}
|
|
18155
18155
|
});
|
|
18156
18156
|
const { compulsoryPeers: t } = this.selectedPeers, e = t.filter(
|
|
18157
|
-
(
|
|
18157
|
+
(c) => this.joined.has(c)
|
|
18158
18158
|
), r = Array.from(this.pinned.keys()).filter(
|
|
18159
|
-
(
|
|
18160
|
-
), i = Array.from(this.joined.toArray().filter((
|
|
18159
|
+
(c) => !e.includes(c)
|
|
18160
|
+
), i = Array.from(this.joined.toArray().filter((c) => c.stageStatus === "ON_STAGE").map((c) => c.id)), n = Math.max(
|
|
18161
18161
|
(this.currentPage - 1) * (this.maxActiveParticipantsCount - e.length - r.length)
|
|
18162
18162
|
), o = this.currentPage * (this.maxActiveParticipantsCount - e.length - r.length);
|
|
18163
18163
|
return e.concat(r, i.slice(n, o));
|
|
@@ -18571,10 +18571,10 @@ const Uf = (Rg = class {
|
|
|
18571
18571
|
}
|
|
18572
18572
|
selectPagePeers(s) {
|
|
18573
18573
|
const { compulsoryPeers: t } = this.selectedPeers, e = t.filter(
|
|
18574
|
-
(
|
|
18574
|
+
(d) => this.participants.joined.has(d)
|
|
18575
18575
|
), r = Array.from(this.participants.pinned.keys()).filter(
|
|
18576
|
-
(
|
|
18577
|
-
), i = Array.from(this.participants.joined.toArray().filter((
|
|
18576
|
+
(d) => !e.includes(d)
|
|
18577
|
+
), i = Array.from(this.participants.joined.toArray().filter((d) => d.stageStatus === "ON_STAGE").map((d) => d.id)), n = Math.max(
|
|
18578
18578
|
(s - 1) * (this.maxPreferredStreams - e.length - r.length)
|
|
18579
18579
|
), o = s * (this.maxPreferredStreams - e.length - r.length);
|
|
18580
18580
|
return e.concat(r, i.slice(n, o));
|
|
@@ -18582,17 +18582,17 @@ const Uf = (Rg = class {
|
|
|
18582
18582
|
selectActivePeers(s) {
|
|
18583
18583
|
const t = /* @__PURE__ */ new Map(), e = Array.from(
|
|
18584
18584
|
this.participants.joined.toArray().filter((h) => h.stageStatus === "ON_STAGE").map((h) => (t.set(h.id, !0), h.id))
|
|
18585
|
-
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((h, g) => (g.stageStatus !== "ON_STAGE" ? this.participants.pinned.delete(g.id) : h.push(g.id), h), []), n = this.self.stageStatus === "ON_STAGE" ? 1 : 0, o = s - n,
|
|
18585
|
+
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((h, g) => (g.stageStatus !== "ON_STAGE" ? this.participants.pinned.delete(g.id) : h.push(g.id), h), []), n = this.self.stageStatus === "ON_STAGE" ? 1 : 0, o = s - n, c = new Set(
|
|
18586
18586
|
r.concat(i).filter((h) => h !== this.self.id && t.has(h))
|
|
18587
18587
|
);
|
|
18588
|
-
let
|
|
18589
|
-
const l = o -
|
|
18588
|
+
let d = Array.from(c);
|
|
18589
|
+
const l = o - c.size;
|
|
18590
18590
|
if (l >= 0) {
|
|
18591
|
-
const h = e.filter((g) => !
|
|
18592
|
-
|
|
18591
|
+
const h = e.filter((g) => !c.has(g) && g !== this.self.id).slice(0, l);
|
|
18592
|
+
d = Array.from(c).concat(h);
|
|
18593
18593
|
} else
|
|
18594
|
-
|
|
18595
|
-
return
|
|
18594
|
+
d = d.slice(0, o);
|
|
18595
|
+
return d;
|
|
18596
18596
|
}
|
|
18597
18597
|
/**
|
|
18598
18598
|
* NOTE(ravindra-cloudflare):
|
|
@@ -18670,8 +18670,8 @@ const Uf = (Rg = class {
|
|
|
18670
18670
|
*/
|
|
18671
18671
|
syncConsumers() {
|
|
18672
18672
|
return u(this, null, function* () {
|
|
18673
|
-
var
|
|
18674
|
-
if (((l = (
|
|
18673
|
+
var c, d, l, h, g;
|
|
18674
|
+
if (((l = (d = (c = this.context.getValue("connectionHandler")) == null ? void 0 : c.mediaState) == null ? void 0 : d.recv) == null ? void 0 : l.state) !== "connected") {
|
|
18675
18675
|
this.logger.info("syncConsumers: Connection not ready, exiting.");
|
|
18676
18676
|
return;
|
|
18677
18677
|
}
|
|
@@ -18806,8 +18806,8 @@ const Uf = (Rg = class {
|
|
|
18806
18806
|
*/
|
|
18807
18807
|
updateParticipantsMapMinReplacement(s, t) {
|
|
18808
18808
|
const e = Array.from(s.keys()), r = new Map(s), i = new Set(t), n = [];
|
|
18809
|
-
e.forEach((o,
|
|
18810
|
-
(!i.has(o) || !this.participants.joined.get(o)) && n.push(
|
|
18809
|
+
e.forEach((o, c) => {
|
|
18810
|
+
(!i.has(o) || !this.participants.joined.get(o)) && n.push(c);
|
|
18811
18811
|
}), t.forEach((o) => {
|
|
18812
18812
|
if (s.get(o))
|
|
18813
18813
|
return;
|
|
@@ -18815,8 +18815,8 @@ const Uf = (Rg = class {
|
|
|
18815
18815
|
e.push(o);
|
|
18816
18816
|
return;
|
|
18817
18817
|
}
|
|
18818
|
-
const
|
|
18819
|
-
e[
|
|
18818
|
+
const c = n.shift();
|
|
18819
|
+
e[c] = o;
|
|
18820
18820
|
}), n.forEach((o) => {
|
|
18821
18821
|
e.splice(o, 1);
|
|
18822
18822
|
}), Array.from(s.keys()).forEach((o) => {
|
|
@@ -18934,8 +18934,8 @@ const Uf = (Rg = class {
|
|
|
18934
18934
|
peerId: r,
|
|
18935
18935
|
scoreStats: i
|
|
18936
18936
|
}) => {
|
|
18937
|
-
var
|
|
18938
|
-
const n = t === "video" && ((
|
|
18937
|
+
var c;
|
|
18938
|
+
const n = t === "video" && ((c = e == null ? void 0 : e.screenShare) != null ? c : !1), o = this.participants.joined.get(r);
|
|
18939
18939
|
o && (o.emit("mediaScoreUpdate", {
|
|
18940
18940
|
kind: t,
|
|
18941
18941
|
isScreenshare: n,
|
|
@@ -19014,8 +19014,8 @@ const Uf = (Rg = class {
|
|
|
19014
19014
|
appData: i,
|
|
19015
19015
|
track: n,
|
|
19016
19016
|
producerId: o,
|
|
19017
|
-
rtpReceiver:
|
|
19018
|
-
paused:
|
|
19017
|
+
rtpReceiver: c,
|
|
19018
|
+
paused: d,
|
|
19019
19019
|
localId: l
|
|
19020
19020
|
} = (g = t.get(s)) != null ? g : {};
|
|
19021
19021
|
if (!e)
|
|
@@ -19028,7 +19028,7 @@ const Uf = (Rg = class {
|
|
|
19028
19028
|
supportsRemoteControl: !!(i != null && i.supportsRemoteControl),
|
|
19029
19029
|
screenShare: !!(i != null && i.screenShare)
|
|
19030
19030
|
},
|
|
19031
|
-
remotelyPaused:
|
|
19031
|
+
remotelyPaused: d,
|
|
19032
19032
|
producerId: o
|
|
19033
19033
|
}
|
|
19034
19034
|
}), {};
|
|
@@ -19039,23 +19039,23 @@ const Uf = (Rg = class {
|
|
|
19039
19039
|
peerId: e,
|
|
19040
19040
|
kind: r,
|
|
19041
19041
|
appData: h,
|
|
19042
|
-
remotelyPaused:
|
|
19042
|
+
remotelyPaused: d,
|
|
19043
19043
|
producerId: o
|
|
19044
19044
|
}
|
|
19045
19045
|
}), this.consumerPeerMap.set(s, {
|
|
19046
19046
|
type: r,
|
|
19047
19047
|
peerId: e,
|
|
19048
19048
|
appData: h,
|
|
19049
|
-
remotelyPaused:
|
|
19049
|
+
remotelyPaused: d,
|
|
19050
19050
|
producerId: o
|
|
19051
19051
|
}), {
|
|
19052
19052
|
peerId: e,
|
|
19053
19053
|
kind: r,
|
|
19054
19054
|
appData: h,
|
|
19055
|
-
remotelyPaused:
|
|
19055
|
+
remotelyPaused: d,
|
|
19056
19056
|
track: n,
|
|
19057
19057
|
producerId: o,
|
|
19058
|
-
rtpReceiver:
|
|
19058
|
+
rtpReceiver: c,
|
|
19059
19059
|
localId: l
|
|
19060
19060
|
};
|
|
19061
19061
|
}
|
|
@@ -19078,8 +19078,8 @@ const Uf = (Rg = class {
|
|
|
19078
19078
|
}
|
|
19079
19079
|
}), this.consumerPeerMap.delete(s), e === "video" && r.screenShare !== !0 && this.videoPeerConsumerMap.delete(t), !o)
|
|
19080
19080
|
return;
|
|
19081
|
-
const
|
|
19082
|
-
|
|
19081
|
+
const c = o.producers.find((l) => l.producerId === n);
|
|
19082
|
+
c && (c.consumer = {
|
|
19083
19083
|
id: s,
|
|
19084
19084
|
peerId: t,
|
|
19085
19085
|
kind: void 0,
|
|
@@ -19089,11 +19089,11 @@ const Uf = (Rg = class {
|
|
|
19089
19089
|
rtpReceiver: void 0,
|
|
19090
19090
|
localId: void 0
|
|
19091
19091
|
});
|
|
19092
|
-
const
|
|
19093
|
-
r && r.screenShare ? (o.setScreenShareEnabled(!1), this.context.getValue("callstats").consumerSharedMediaState(s, { screen: !1 }), o.screenShareTracks.video &&
|
|
19092
|
+
const d = [];
|
|
19093
|
+
r && r.screenShare ? (o.setScreenShareEnabled(!1), this.context.getValue("callstats").consumerSharedMediaState(s, { screen: !1 }), o.screenShareTracks.video && d.push(o.screenShareTracks.video.id), o.screenShareTracks.audio && d.push(o.screenShareTracks.audio.id), o.screenShareTracks = {
|
|
19094
19094
|
audio: void 0,
|
|
19095
19095
|
video: void 0
|
|
19096
|
-
}) : e === "audio" ? (o.setAudioEnabled(!1), o.audioTrack &&
|
|
19096
|
+
}) : e === "audio" ? (o.setAudioEnabled(!1), o.audioTrack && d.push(o.audioTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { audio: !1 }), o.audioTrack = void 0) : e === "video" && (o.setVideoEnabled(!1), this.updatePipSource(o.id, !1), o.videoTrack && d.push(o.videoTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { video: !1 }), o.videoTrack = void 0), r.e2ee && d.forEach((l) => {
|
|
19097
19097
|
this.context.getValue("peerSessionStore").emit(
|
|
19098
19098
|
b.E2EE_INACTIVE_CONSUMER,
|
|
19099
19099
|
{
|
|
@@ -19111,8 +19111,8 @@ const Uf = (Rg = class {
|
|
|
19111
19111
|
appData: i,
|
|
19112
19112
|
track: n,
|
|
19113
19113
|
remotelyPaused: o,
|
|
19114
|
-
producerId:
|
|
19115
|
-
rtpReceiver:
|
|
19114
|
+
producerId: c,
|
|
19115
|
+
rtpReceiver: d,
|
|
19116
19116
|
localId: l
|
|
19117
19117
|
} = t;
|
|
19118
19118
|
if (!e)
|
|
@@ -19124,23 +19124,23 @@ const Uf = (Rg = class {
|
|
|
19124
19124
|
kind: r,
|
|
19125
19125
|
appData: i,
|
|
19126
19126
|
remotelyPaused: o,
|
|
19127
|
-
producerId:
|
|
19127
|
+
producerId: c
|
|
19128
19128
|
}
|
|
19129
19129
|
});
|
|
19130
19130
|
const h = this.participants.joined.get(e);
|
|
19131
19131
|
if (!h)
|
|
19132
19132
|
return;
|
|
19133
|
-
const g = h.producers.find((v) => v.producerId ===
|
|
19133
|
+
const g = h.producers.find((v) => v.producerId === c);
|
|
19134
19134
|
if (g && (g.consumer = {
|
|
19135
19135
|
id: s,
|
|
19136
19136
|
peerId: e,
|
|
19137
19137
|
kind: r,
|
|
19138
19138
|
appData: i,
|
|
19139
19139
|
paused: o,
|
|
19140
|
-
producerId:
|
|
19141
|
-
rtpReceiver:
|
|
19140
|
+
producerId: c,
|
|
19141
|
+
rtpReceiver: d,
|
|
19142
19142
|
localId: l
|
|
19143
|
-
}), i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: e, rtpReceiver:
|
|
19143
|
+
}), i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: e, rtpReceiver: d, track: n }), i.screenShare) {
|
|
19144
19144
|
r === "video" ? h.screenShareTracks.video = n : r === "audio" && (h.screenShareTracks.audio = n), h.setScreenShareEnabled(!0), (f = this.context) == null || f.getValue("callstats").consumerSharedMediaState(s, { screen: !0 });
|
|
19145
19145
|
return;
|
|
19146
19146
|
}
|
|
@@ -19159,8 +19159,8 @@ const Uf = (Rg = class {
|
|
|
19159
19159
|
appData: i,
|
|
19160
19160
|
remotelyPaused: n,
|
|
19161
19161
|
producerId: o,
|
|
19162
|
-
rtpReceiver:
|
|
19163
|
-
localId:
|
|
19162
|
+
rtpReceiver: c,
|
|
19163
|
+
localId: d
|
|
19164
19164
|
} = this.processMedia(s);
|
|
19165
19165
|
if (!t)
|
|
19166
19166
|
return;
|
|
@@ -19185,8 +19185,8 @@ const Uf = (Rg = class {
|
|
|
19185
19185
|
appData: i,
|
|
19186
19186
|
paused: n,
|
|
19187
19187
|
producerId: o,
|
|
19188
|
-
rtpReceiver:
|
|
19189
|
-
localId:
|
|
19188
|
+
rtpReceiver: c,
|
|
19189
|
+
localId: d
|
|
19190
19190
|
}), r && i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_INACTIVE_CONSUMER, { peerId: t, trackId: r.id }), e === "video" ? (l.videoTrack = r, l.setVideoEnabled(!1), this.updatePipSource(l.id, !1), this.context.getValue("callstats").consumerSharedMediaState(s, { video: !1 })) : e === "audio" && (l.audioTrack = r, l.setAudioEnabled(l.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
19191
19191
|
audio: l.audioEnabled
|
|
19192
19192
|
}));
|
|
@@ -19199,8 +19199,8 @@ const Uf = (Rg = class {
|
|
|
19199
19199
|
track: i,
|
|
19200
19200
|
appData: n,
|
|
19201
19201
|
producerId: o,
|
|
19202
|
-
rtpReceiver:
|
|
19203
|
-
localId:
|
|
19202
|
+
rtpReceiver: c,
|
|
19203
|
+
localId: d
|
|
19204
19204
|
} = this.processMedia(s);
|
|
19205
19205
|
if (!t)
|
|
19206
19206
|
return;
|
|
@@ -19225,8 +19225,8 @@ const Uf = (Rg = class {
|
|
|
19225
19225
|
appData: n,
|
|
19226
19226
|
paused: r,
|
|
19227
19227
|
producerId: o,
|
|
19228
|
-
rtpReceiver:
|
|
19229
|
-
localId:
|
|
19228
|
+
rtpReceiver: c,
|
|
19229
|
+
localId: d
|
|
19230
19230
|
}), n.screenShare) {
|
|
19231
19231
|
e === "video" ? l.screenShareTracks.video = i : e === "audio" && (l.screenShareTracks.audio = i), (!r || this.self.permissions.isRecorder) && l.setScreenShareEnabled(!0), n.supportsRemoteControl && (l.supportsRemoteControl = !0), this.participants.broadcastMessage("screenshareConsumerCreated", {
|
|
19232
19232
|
producerId: o,
|
|
@@ -19250,10 +19250,10 @@ const Uf = (Rg = class {
|
|
|
19250
19250
|
video: !r
|
|
19251
19251
|
})) : e === "audio" && (l.audioTrack = i, r || l.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
19252
19252
|
audio: !r
|
|
19253
|
-
})), !r && n.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver:
|
|
19253
|
+
})), !r && n.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver: c, track: i });
|
|
19254
19254
|
}
|
|
19255
19255
|
static formatSocketPeerMessage(s) {
|
|
19256
|
-
var e, r, i, n, o,
|
|
19256
|
+
var e, r, i, n, o, c;
|
|
19257
19257
|
if (!s)
|
|
19258
19258
|
return;
|
|
19259
19259
|
const t = Th(s.stageType);
|
|
@@ -19275,7 +19275,7 @@ const Uf = (Rg = class {
|
|
|
19275
19275
|
flags: {
|
|
19276
19276
|
hiddenParticipant: (i = s.flags) == null ? void 0 : i.hiddenParticipant,
|
|
19277
19277
|
hidden_participant: (n = s.flags) == null ? void 0 : n.hiddenParticipant,
|
|
19278
|
-
recorder: ((o = s.flags) == null ? void 0 : o.recorderType) !== void 0 && ((
|
|
19278
|
+
recorder: ((o = s.flags) == null ? void 0 : o.recorderType) !== void 0 && ((c = s.flags) == null ? void 0 : c.recorderType) !== "NONE"
|
|
19279
19279
|
}
|
|
19280
19280
|
};
|
|
19281
19281
|
}
|
|
@@ -19349,15 +19349,15 @@ const Nd = class extends Ot {
|
|
|
19349
19349
|
connectedMeetings: i,
|
|
19350
19350
|
plugins: n,
|
|
19351
19351
|
polls: o,
|
|
19352
|
-
media:
|
|
19353
|
-
} = l,
|
|
19352
|
+
media: c
|
|
19353
|
+
} = l, d = Nc(l, [
|
|
19354
19354
|
"chat",
|
|
19355
19355
|
"connectedMeetings",
|
|
19356
19356
|
"plugins",
|
|
19357
19357
|
"polls",
|
|
19358
19358
|
"media"
|
|
19359
19359
|
]);
|
|
19360
|
-
if (r && (r.private && hr(a(this, Y).chat.private, r.private), r.public && hr(a(this, Y).chat.public, r.public), this.emit("chatUpdate")), i && hr(a(this, Y).connectedMeetings, i),
|
|
19360
|
+
if (r && (r.private && hr(a(this, Y).chat.private, r.private), r.public && hr(a(this, Y).chat.public, r.public), this.emit("chatUpdate")), i && hr(a(this, Y).connectedMeetings, i), c) {
|
|
19361
19361
|
const v = (_) => {
|
|
19362
19362
|
switch (_) {
|
|
19363
19363
|
case $r.NONE:
|
|
@@ -19376,15 +19376,15 @@ const Nd = class extends Ot {
|
|
|
19376
19376
|
video: void 0,
|
|
19377
19377
|
screenshare: void 0
|
|
19378
19378
|
};
|
|
19379
|
-
(h =
|
|
19380
|
-
canProduce: v(
|
|
19381
|
-
}), (g =
|
|
19382
|
-
canProduce: v(
|
|
19383
|
-
}), (f =
|
|
19384
|
-
canProduce: v(
|
|
19379
|
+
(h = c.audio) != null && h.canProduce && (E.audio = {
|
|
19380
|
+
canProduce: v(c.audio.canProduce)
|
|
19381
|
+
}), (g = c.video) != null && g.canProduce && (E.video = {
|
|
19382
|
+
canProduce: v(c.video.canProduce)
|
|
19383
|
+
}), (f = c.screenshare) != null && f.canProduce && (E.screenshare = {
|
|
19384
|
+
canProduce: v(c.screenshare.canProduce)
|
|
19385
19385
|
}), hr(a(this, Y).media, E);
|
|
19386
19386
|
}
|
|
19387
|
-
n && (hr(a(this, Y).plugins, n), this.emit("pluginsUpdate")), o && (hr(a(this, Y).polls, o), this.emit("pollsUpdate")), Object.keys(
|
|
19387
|
+
n && (hr(a(this, Y).plugins, n), this.emit("pluginsUpdate")), o && (hr(a(this, Y).polls, o), this.emit("pollsUpdate")), Object.keys(d).length !== 0 && hr(a(this, Y), d), this.emit("permissionsUpdate", e);
|
|
19388
19388
|
});
|
|
19389
19389
|
if (!r)
|
|
19390
19390
|
throw this.logger.error("PermissionPreset::load_preset_permissions_failed"), new k("Could not load preset permissions.", "0904");
|
|
@@ -19653,7 +19653,7 @@ class $f extends Ot {
|
|
|
19653
19653
|
}
|
|
19654
19654
|
updatePermission() {
|
|
19655
19655
|
return u(this, null, function* () {
|
|
19656
|
-
var
|
|
19656
|
+
var d, l;
|
|
19657
19657
|
const e = (h, g) => {
|
|
19658
19658
|
this.mediaPermissions[h] = g;
|
|
19659
19659
|
const f = { message: this.mediaPermissions[h], kind: h };
|
|
@@ -19661,9 +19661,9 @@ class $f extends Ot {
|
|
|
19661
19661
|
};
|
|
19662
19662
|
if (Se.getName() === "firefox")
|
|
19663
19663
|
return;
|
|
19664
|
-
const r = "microphone", i = "camera", n = yield (
|
|
19664
|
+
const r = "microphone", i = "camera", n = yield (d = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : d.query({ name: r }), o = yield (l = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : l.query({
|
|
19665
19665
|
name: i
|
|
19666
|
-
}),
|
|
19666
|
+
}), c = (h, g) => {
|
|
19667
19667
|
switch (g) {
|
|
19668
19668
|
case "granted":
|
|
19669
19669
|
e(h, "ACCEPTED");
|
|
@@ -19677,7 +19677,7 @@ class $f extends Ot {
|
|
|
19677
19677
|
}
|
|
19678
19678
|
this.localMediaHandler.repopulateAvailableDevices();
|
|
19679
19679
|
};
|
|
19680
|
-
n && (n.onchange = () =>
|
|
19680
|
+
n && (n.onchange = () => c("audio", n.state)), o && (o.onchange = () => c("video", o.state));
|
|
19681
19681
|
});
|
|
19682
19682
|
}
|
|
19683
19683
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -19686,18 +19686,18 @@ class $f extends Ot {
|
|
|
19686
19686
|
message: e,
|
|
19687
19687
|
kind: r
|
|
19688
19688
|
}) {
|
|
19689
|
-
var n, o,
|
|
19689
|
+
var n, o, c, d;
|
|
19690
19690
|
switch (r) {
|
|
19691
19691
|
case "audio": {
|
|
19692
19692
|
(n = a(this, Rt)) == null || n.getValue("callstats").mediaPermission("AUDIO", e), (o = a(this, Rt)) == null || o.getValue("callstats").mediaPermission("SPEAKER", e);
|
|
19693
19693
|
break;
|
|
19694
19694
|
}
|
|
19695
19695
|
case "video": {
|
|
19696
|
-
(
|
|
19696
|
+
(c = a(this, Rt)) == null || c.getValue("callstats").mediaPermission("VIDEO", e);
|
|
19697
19697
|
break;
|
|
19698
19698
|
}
|
|
19699
19699
|
case "screenshare": {
|
|
19700
|
-
(
|
|
19700
|
+
(d = a(this, Rt)) == null || d.getValue("callstats").mediaPermission("SCREENSHARE", e);
|
|
19701
19701
|
break;
|
|
19702
19702
|
}
|
|
19703
19703
|
}
|
|
@@ -19710,7 +19710,7 @@ class $f extends Ot {
|
|
|
19710
19710
|
/** @access private */
|
|
19711
19711
|
init() {
|
|
19712
19712
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
19713
|
-
var n, o,
|
|
19713
|
+
var n, o, c, d, l, h, g;
|
|
19714
19714
|
if (Se.init(), i && S(this, Rt, i), !this.localMediaHandler)
|
|
19715
19715
|
try {
|
|
19716
19716
|
let f = !0;
|
|
@@ -19724,7 +19724,7 @@ class $f extends Ot {
|
|
|
19724
19724
|
i,
|
|
19725
19725
|
e.constraints,
|
|
19726
19726
|
(o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
|
|
19727
|
-
(
|
|
19727
|
+
(c = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : c.autoSwitchAudioDevice
|
|
19728
19728
|
);
|
|
19729
19729
|
if (i == null || i.getValue("peerSessionStore").on(
|
|
19730
19730
|
b.MEDIA_PERMISSION_UPDATE,
|
|
@@ -19762,7 +19762,7 @@ class $f extends Ot {
|
|
|
19762
19762
|
}), this.emit("mediaPermissionError", v), this.emit("mediaPermissionUpdate", { message: _, kind: E });
|
|
19763
19763
|
})
|
|
19764
19764
|
), f) {
|
|
19765
|
-
this.logger.info(`Setting up SelfMedia streams using media handler. audio:${(
|
|
19765
|
+
this.logger.info(`Setting up SelfMedia streams using media handler. audio:${(d = e == null ? void 0 : e.audio) != null ? d : !0} video:${(l = e == null ? void 0 : e.video) != null ? l : !0}`);
|
|
19766
19766
|
const v = this.localMediaHandler.setupStreams({
|
|
19767
19767
|
video: (h = e == null ? void 0 : e.video) != null ? h : !0,
|
|
19768
19768
|
audio: (g = e == null ? void 0 : e.audio) != null ? g : !0
|
|
@@ -20116,14 +20116,14 @@ let We = (bg = class extends $f {
|
|
|
20116
20116
|
static __init__(t, e, r, i, n, o = !1) {
|
|
20117
20117
|
return u(this, null, function* () {
|
|
20118
20118
|
var f, v, E, _, w, R;
|
|
20119
|
-
let
|
|
20120
|
-
r.canProduceAudio !== "ALLOWED" && (
|
|
20119
|
+
let c = (v = (f = t.getValue("defaults")) == null ? void 0 : f.audio) != null ? v : !0, d = (_ = (E = t.getValue("defaults")) == null ? void 0 : E.video) != null ? _ : !0;
|
|
20120
|
+
r.canProduceAudio !== "ALLOWED" && (c = !1), r.canProduceVideo !== "ALLOWED" && (d = !1);
|
|
20121
20121
|
const l = new We(t, e, r, i, n), h = dM(i.mediaConstraints);
|
|
20122
20122
|
hr(h, (w = t.getValue("defaults")) == null ? void 0 : w.mediaConfiguration);
|
|
20123
20123
|
const g = (R = t.getValue("defaults")) == null ? void 0 : R.mediaHandler;
|
|
20124
20124
|
return g && (g.context = t), yield l.init({
|
|
20125
|
-
audio:
|
|
20126
|
-
video:
|
|
20125
|
+
audio: c,
|
|
20126
|
+
video: d,
|
|
20127
20127
|
constraints: h
|
|
20128
20128
|
}, o, t), l.setupEvents(), l;
|
|
20129
20129
|
});
|
|
@@ -20500,8 +20500,8 @@ let We = (bg = class extends $f {
|
|
|
20500
20500
|
const o = (r = t.srcObject) == null ? void 0 : r.getTracks()[0];
|
|
20501
20501
|
if ((o == null ? void 0 : o.id) === this.videoTrack.id)
|
|
20502
20502
|
return;
|
|
20503
|
-
const
|
|
20504
|
-
|
|
20503
|
+
const c = new MediaStream();
|
|
20504
|
+
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = a(this, Hs, Xr)) == null || i.enableSource(this.id);
|
|
20505
20505
|
} else
|
|
20506
20506
|
t.srcObject = void 0, e || (n = a(this, Hs, Xr)) == null || n.disableSource(this.id);
|
|
20507
20507
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
@@ -20637,17 +20637,17 @@ class Lu {
|
|
|
20637
20637
|
enqueuedAt: Date.now(),
|
|
20638
20638
|
executedAt: void 0,
|
|
20639
20639
|
completed: !1,
|
|
20640
|
-
resolve: (
|
|
20640
|
+
resolve: (c) => {
|
|
20641
20641
|
if (o.completed)
|
|
20642
20642
|
return;
|
|
20643
|
-
o.completed = !0, this.pendingTasks.delete(o.id), i(
|
|
20644
|
-
const [
|
|
20645
|
-
|
|
20643
|
+
o.completed = !0, this.pendingTasks.delete(o.id), i(c);
|
|
20644
|
+
const [d] = this.pendingTasks.values();
|
|
20645
|
+
d && !d.executedAt && this.execute(d);
|
|
20646
20646
|
},
|
|
20647
|
-
reject: (
|
|
20648
|
-
if (!o.completed && (o.completed = !0, this.pendingTasks.delete(o.id), n(
|
|
20649
|
-
const [
|
|
20650
|
-
|
|
20647
|
+
reject: (c) => {
|
|
20648
|
+
if (!o.completed && (o.completed = !0, this.pendingTasks.delete(o.id), n(c), !this.stopping)) {
|
|
20649
|
+
const [d] = this.pendingTasks.values();
|
|
20650
|
+
d && !d.executedAt && this.execute(d);
|
|
20651
20651
|
}
|
|
20652
20652
|
}
|
|
20653
20653
|
};
|
|
@@ -20733,25 +20733,25 @@ function Bf(s, t) {
|
|
|
20733
20733
|
maxRetryCount: 3,
|
|
20734
20734
|
delayTime: 10
|
|
20735
20735
|
}, t);
|
|
20736
|
-
let
|
|
20736
|
+
let c = 0, d, l = !1;
|
|
20737
20737
|
const h = (g) => {
|
|
20738
20738
|
l = !0, r(g);
|
|
20739
20739
|
};
|
|
20740
|
-
for (;
|
|
20740
|
+
for (; c < n; ) {
|
|
20741
20741
|
try {
|
|
20742
|
-
const g = yield s(
|
|
20742
|
+
const g = yield s(c, h);
|
|
20743
20743
|
return e(g);
|
|
20744
20744
|
} catch (g) {
|
|
20745
|
-
if (
|
|
20745
|
+
if (d = g, l)
|
|
20746
20746
|
break;
|
|
20747
|
-
if (
|
|
20748
|
-
i === "linear" ? yield tg(o * (
|
|
20747
|
+
if (c < n)
|
|
20748
|
+
i === "linear" ? yield tg(o * (c + 1)) : i === "exponential" && (yield tg(o * (c + Math.max(0, c - 1))));
|
|
20749
20749
|
else
|
|
20750
20750
|
break;
|
|
20751
20751
|
}
|
|
20752
|
-
|
|
20752
|
+
c += 1;
|
|
20753
20753
|
}
|
|
20754
|
-
return r(
|
|
20754
|
+
return r(d);
|
|
20755
20755
|
}));
|
|
20756
20756
|
});
|
|
20757
20757
|
}
|
|
@@ -20776,7 +20776,7 @@ function qc(s) {
|
|
|
20776
20776
|
}
|
|
20777
20777
|
function rD(s) {
|
|
20778
20778
|
const t = RTCRtpReceiver.getCapabilities("audio"), e = RTCRtpReceiver.getCapabilities("video"), r = RTCRtpSender.getCapabilities("audio"), i = RTCRtpSender.getCapabilities("video");
|
|
20779
|
-
s && (e.codecs = e.codecs.filter(({ mimeType:
|
|
20779
|
+
s && (e.codecs = e.codecs.filter(({ mimeType: d }) => s === d), i.codecs = i.codecs.filter(({ mimeType: d }) => s === d));
|
|
20780
20780
|
const n = {
|
|
20781
20781
|
audio: qc(t),
|
|
20782
20782
|
video: qc(e)
|
|
@@ -21011,13 +21011,13 @@ class Ml extends st.EventEmitter {
|
|
|
21011
21011
|
setTimeout(o, r, "event request timeout");
|
|
21012
21012
|
try {
|
|
21013
21013
|
this.emit(e.toString(), ...i, n, o);
|
|
21014
|
-
} catch (
|
|
21014
|
+
} catch (c) {
|
|
21015
21015
|
this.logger.error(
|
|
21016
21016
|
`EnhancedEventEmitter:: safeEmitAsPromise() | event listener for event ${e.toString()} threw an error [event:%s]:%o`,
|
|
21017
21017
|
{
|
|
21018
|
-
error:
|
|
21018
|
+
error: c
|
|
21019
21019
|
}
|
|
21020
|
-
), o(
|
|
21020
|
+
), o(c);
|
|
21021
21021
|
}
|
|
21022
21022
|
});
|
|
21023
21023
|
});
|
|
@@ -21074,7 +21074,7 @@ class kh extends Ml {
|
|
|
21074
21074
|
iceTransportPolicy: i,
|
|
21075
21075
|
additionalSettings: n,
|
|
21076
21076
|
proprietaryConstraints: o,
|
|
21077
|
-
onTrackHandler:
|
|
21077
|
+
onTrackHandler: c
|
|
21078
21078
|
}) {
|
|
21079
21079
|
this.logger.debug("HandlerInterface::init()"), this._direction = e, this.pc = new RTCPeerConnection(
|
|
21080
21080
|
N({
|
|
@@ -21084,8 +21084,8 @@ class kh extends Ml {
|
|
|
21084
21084
|
rtcpMuxPolicy: "require"
|
|
21085
21085
|
}, n),
|
|
21086
21086
|
o
|
|
21087
|
-
),
|
|
21088
|
-
d
|
|
21087
|
+
), c && this.pc.addEventListener("track", (d) => {
|
|
21088
|
+
c(d);
|
|
21089
21089
|
}), this._addEventListeners();
|
|
21090
21090
|
}
|
|
21091
21091
|
connect() {
|
|
@@ -21167,8 +21167,8 @@ class kh extends Ml {
|
|
|
21167
21167
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
21168
21168
|
const n = i.sender.getParameters();
|
|
21169
21169
|
n.encodings.forEach(
|
|
21170
|
-
(o,
|
|
21171
|
-
|
|
21170
|
+
(o, c) => {
|
|
21171
|
+
c <= r ? o.active = !0 : o.active = !1;
|
|
21172
21172
|
}
|
|
21173
21173
|
), yield i.sender.setParameters(n);
|
|
21174
21174
|
});
|
|
@@ -21181,8 +21181,8 @@ class kh extends Ml {
|
|
|
21181
21181
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
21182
21182
|
const n = i.sender.getParameters();
|
|
21183
21183
|
n.encodings.forEach(
|
|
21184
|
-
(o,
|
|
21185
|
-
n.encodings[
|
|
21184
|
+
(o, c) => {
|
|
21185
|
+
n.encodings[c] = N(N({}, o), r);
|
|
21186
21186
|
}
|
|
21187
21187
|
), yield i.sender.setParameters(n);
|
|
21188
21188
|
});
|
|
@@ -21306,8 +21306,8 @@ class Ah extends kh {
|
|
|
21306
21306
|
sdpSemantics: "unified-plan"
|
|
21307
21307
|
}, i),
|
|
21308
21308
|
n
|
|
21309
|
-
), o && this.pc.addEventListener("track", (
|
|
21310
|
-
o(
|
|
21309
|
+
), o && this.pc.addEventListener("track", (c) => {
|
|
21310
|
+
o(c);
|
|
21311
21311
|
}), this._addEventListeners();
|
|
21312
21312
|
}
|
|
21313
21313
|
send(n) {
|
|
@@ -21343,22 +21343,22 @@ class Ah extends kh {
|
|
|
21343
21343
|
h.push(f);
|
|
21344
21344
|
}), this.logger.info(`selected codecs: ${JSON.stringify(h)}`), o.setCodecPreferences(h);
|
|
21345
21345
|
}
|
|
21346
|
-
const
|
|
21347
|
-
if (yield this.pc.setLocalDescription(
|
|
21346
|
+
const c = yield this.pc.createOffer();
|
|
21347
|
+
if (yield this.pc.setLocalDescription(c), r && r.findIndex(({ name: l }) => l === "opus") >= 0) {
|
|
21348
21348
|
const { enableDtx: l, enableStereo: h } = this, g = this.enableHighBitrate ? h ? 128e3 : 64e3 : h ? 64e3 : 32e3;
|
|
21349
|
-
|
|
21349
|
+
c.sdp = c.sdp.replace(
|
|
21350
21350
|
"minptime=10;useinbandfec=1",
|
|
21351
21351
|
`minptime=10;useinbandfec=1;${l ? "usedtx=1;" : ""}${h ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${g}`
|
|
21352
|
-
),
|
|
21352
|
+
), c.sdp += `a=rtcp-fb:111 nack\r
|
|
21353
21353
|
`;
|
|
21354
21354
|
}
|
|
21355
21355
|
this.midTransceiverMap.set(o.mid, o);
|
|
21356
|
-
const
|
|
21356
|
+
const d = (l) => u(this, null, function* () {
|
|
21357
21357
|
return this.logger.debug(`[SDP] send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(l)}]`), yield this.pc.setRemoteDescription(l), o.mid;
|
|
21358
21358
|
});
|
|
21359
|
-
return this.logger.debug(`[SDP] send() | calling pc.setLocalDescription() [offer: ${JSON.stringify(
|
|
21360
|
-
offerSdp:
|
|
21361
|
-
callback:
|
|
21359
|
+
return this.logger.debug(`[SDP] send() | calling pc.setLocalDescription() [offer: ${JSON.stringify(c, void 0, 2)}]`), {
|
|
21360
|
+
offerSdp: c,
|
|
21361
|
+
callback: d,
|
|
21362
21362
|
sender: o.sender,
|
|
21363
21363
|
mid: o.mid
|
|
21364
21364
|
};
|
|
@@ -21405,16 +21405,16 @@ class fd extends kh {
|
|
|
21405
21405
|
screenShare: n
|
|
21406
21406
|
}) {
|
|
21407
21407
|
this._assertSendDirection();
|
|
21408
|
-
const
|
|
21408
|
+
const c = this.supportsSendEncodings && r !== void 0 ? { sendEncodings: r } : {}, d = this.pc.addTransceiver(e, N({
|
|
21409
21409
|
direction: "sendonly",
|
|
21410
21410
|
streams: [
|
|
21411
21411
|
n ? this._sendScreenShareStream : this._sendWebStream
|
|
21412
21412
|
]
|
|
21413
|
-
},
|
|
21413
|
+
}, c));
|
|
21414
21414
|
if (!this.supportsSendEncodings && r) {
|
|
21415
21415
|
r.reverse();
|
|
21416
|
-
const f =
|
|
21417
|
-
f.encodings = r, yield
|
|
21416
|
+
const f = d.sender.getParameters();
|
|
21417
|
+
f.encodings = r, yield d.sender.setParameters(f);
|
|
21418
21418
|
}
|
|
21419
21419
|
const l = (f, v) => {
|
|
21420
21420
|
var B;
|
|
@@ -21428,13 +21428,13 @@ class fd extends kh {
|
|
|
21428
21428
|
`minptime=10;useinbandfec=1;${f ? "usedtx=1;" : ""}${v ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${E}`
|
|
21429
21429
|
);
|
|
21430
21430
|
}
|
|
21431
|
-
return this.midTransceiverMap.set(
|
|
21431
|
+
return this.midTransceiverMap.set(d.mid, d), {
|
|
21432
21432
|
offerSdp: h,
|
|
21433
21433
|
callback: (f) => u(this, null, function* () {
|
|
21434
|
-
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(f)}]`), yield this.pc.setRemoteDescription(f),
|
|
21434
|
+
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(f)}]`), yield this.pc.setRemoteDescription(f), d.mid;
|
|
21435
21435
|
}),
|
|
21436
|
-
sender:
|
|
21437
|
-
mid:
|
|
21436
|
+
sender: d.sender,
|
|
21437
|
+
mid: d.mid
|
|
21438
21438
|
};
|
|
21439
21439
|
});
|
|
21440
21440
|
}
|
|
@@ -21446,8 +21446,8 @@ class fd extends kh {
|
|
|
21446
21446
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
21447
21447
|
const n = i.sender.getParameters(), o = n.encodings.length - 1 - r;
|
|
21448
21448
|
n.encodings.forEach(
|
|
21449
|
-
(
|
|
21450
|
-
|
|
21449
|
+
(c, d) => {
|
|
21450
|
+
d >= o ? c.active = !0 : c.active = !1;
|
|
21451
21451
|
}
|
|
21452
21452
|
), yield i.sender.setParameters(n);
|
|
21453
21453
|
});
|
|
@@ -21491,12 +21491,12 @@ class Ih extends kh {
|
|
|
21491
21491
|
i ? this._sendScreenShareStream : this._sendWebStream
|
|
21492
21492
|
],
|
|
21493
21493
|
sendEncodings: e
|
|
21494
|
-
}),
|
|
21495
|
-
this.logger.info(`Safari12::senders available params: ${JSON.stringify(
|
|
21496
|
-
const
|
|
21494
|
+
}), c = RTCRtpSender.getCapabilities(typeof t == "string" ? t : t.kind);
|
|
21495
|
+
this.logger.info(`Safari12::senders available params: ${JSON.stringify(c)}`);
|
|
21496
|
+
const d = [];
|
|
21497
21497
|
r && r.length > 0 && r.forEach((g) => {
|
|
21498
21498
|
var v;
|
|
21499
|
-
const f =
|
|
21499
|
+
const f = c.codecs.find(
|
|
21500
21500
|
(E) => E.mimeType.includes(g.name)
|
|
21501
21501
|
);
|
|
21502
21502
|
if (g.parameters) {
|
|
@@ -21506,8 +21506,8 @@ class Ih extends kh {
|
|
|
21506
21506
|
const _ = [...new Set(E).values()];
|
|
21507
21507
|
f.sdpFmtpLine = _.join(";");
|
|
21508
21508
|
}
|
|
21509
|
-
|
|
21510
|
-
}), this.logger.info(`Safari12::selected codecs: ${JSON.stringify(
|
|
21509
|
+
d.push(f);
|
|
21510
|
+
}), this.logger.info(`Safari12::selected codecs: ${JSON.stringify(d)}`), o.setCodecPreferences(d);
|
|
21511
21511
|
const l = yield this.pc.createOffer();
|
|
21512
21512
|
if (yield this.pc.setLocalDescription(l), t === "audio" || t.kind === "audio") {
|
|
21513
21513
|
const { enableStereo: g, enableDtx: f } = this, v = this.enableHighBitrate ? g ? 128e3 : 64e3 : g ? 64e3 : 32e3;
|
|
@@ -21916,35 +21916,35 @@ const dn = class extends st.EventEmitter {
|
|
|
21916
21916
|
});
|
|
21917
21917
|
p(this, "request", (e) => u(this, null, function* () {
|
|
21918
21918
|
const r = dn.createRequest(e), i = new Promise((n, o) => {
|
|
21919
|
-
const { id:
|
|
21920
|
-
id:
|
|
21919
|
+
const { id: d } = r.payload._bolt, l = {
|
|
21920
|
+
id: d,
|
|
21921
21921
|
method: r.type,
|
|
21922
21922
|
resolve: (h) => {
|
|
21923
|
-
this.queue.delete(
|
|
21923
|
+
this.queue.delete(d) && (clearTimeout(l.timer), n(h));
|
|
21924
21924
|
},
|
|
21925
21925
|
timer: setTimeout(() => {
|
|
21926
|
-
this.queue.delete(
|
|
21926
|
+
this.queue.delete(d) && o(new Error(`request timeout for message id: ${d}`));
|
|
21927
21927
|
}, 2e4),
|
|
21928
21928
|
cancel: (h) => {
|
|
21929
|
-
this.queue.delete(
|
|
21929
|
+
this.queue.delete(d) && (clearTimeout(l.timer), o(h));
|
|
21930
21930
|
}
|
|
21931
21931
|
};
|
|
21932
|
-
this.queue.set(
|
|
21932
|
+
this.queue.set(d, l);
|
|
21933
21933
|
});
|
|
21934
21934
|
return this.channel.send(JSON.stringify(r)), i;
|
|
21935
21935
|
}));
|
|
21936
21936
|
p(this, "send", (e) => {
|
|
21937
21937
|
const r = JSON.stringify(e), i = 16384;
|
|
21938
21938
|
if (r.length > i) {
|
|
21939
|
-
const n = i - 200, o = Math.ceil(r.length / n),
|
|
21939
|
+
const n = i - 200, o = Math.ceil(r.length / n), c = [];
|
|
21940
21940
|
for (let l = 0; l < o; l += 1) {
|
|
21941
21941
|
const h = l * n, g = (l + 1) * n;
|
|
21942
|
-
|
|
21942
|
+
c.push(r.slice(h, g));
|
|
21943
21943
|
}
|
|
21944
|
-
const
|
|
21944
|
+
const d = ga();
|
|
21945
21945
|
for (let l = 0; l < o; l += 1) {
|
|
21946
|
-
const h =
|
|
21947
|
-
id:
|
|
21946
|
+
const h = c[l], f = JSON.stringify({
|
|
21947
|
+
id: d,
|
|
21948
21948
|
count: o,
|
|
21949
21949
|
chunkIndex: l,
|
|
21950
21950
|
chunk: h
|
|
@@ -21959,17 +21959,17 @@ const dn = class extends st.EventEmitter {
|
|
|
21959
21959
|
a(this, Dr).has(e.id) || a(this, Dr).set(e.id, []);
|
|
21960
21960
|
const r = a(this, Dr).get(e.id);
|
|
21961
21961
|
if (r[e.chunkIndex] = e, (r == null ? void 0 : r.length) === e.count && !r.some((n) => n === void 0)) {
|
|
21962
|
-
const n = a(this, Dr).get(e.id), o = n == null ? void 0 : n.reduce((
|
|
21962
|
+
const n = a(this, Dr).get(e.id), o = n == null ? void 0 : n.reduce((d, l) => d + l.chunk, "");
|
|
21963
21963
|
a(this, Dr).delete(e.id);
|
|
21964
|
-
const
|
|
21965
|
-
if (!
|
|
21964
|
+
const c = JSON.parse(o);
|
|
21965
|
+
if (!c.payload || !qf(c.payload))
|
|
21966
21966
|
throw new Error("corrupted incoming message over dc", {
|
|
21967
|
-
cause: { code: "CORRUPT_DC_MESSAGE", values:
|
|
21967
|
+
cause: { code: "CORRUPT_DC_MESSAGE", values: c }
|
|
21968
21968
|
});
|
|
21969
|
-
if (this.processBoltHandshake(
|
|
21969
|
+
if (this.processBoltHandshake(c))
|
|
21970
21970
|
return;
|
|
21971
|
-
if (this.serverProtocolVersion = (i =
|
|
21972
|
-
return
|
|
21971
|
+
if (this.serverProtocolVersion = (i = c.payload._bolt) == null ? void 0 : i.version, !this.processResponseMsg(c))
|
|
21972
|
+
return c;
|
|
21973
21973
|
}
|
|
21974
21974
|
});
|
|
21975
21975
|
p(this, "processResponseMsg", (e) => {
|
|
@@ -22045,8 +22045,8 @@ const ln = class extends Ml {
|
|
|
22045
22045
|
direction: i,
|
|
22046
22046
|
handlerFactory: n,
|
|
22047
22047
|
iceServers: o,
|
|
22048
|
-
iceTransportPolicy:
|
|
22049
|
-
proprietaryConstraints:
|
|
22048
|
+
iceTransportPolicy: c,
|
|
22049
|
+
proprietaryConstraints: d,
|
|
22050
22050
|
additionalSettings: l,
|
|
22051
22051
|
appData: h,
|
|
22052
22052
|
config: g
|
|
@@ -22090,9 +22090,9 @@ const ln = class extends Ml {
|
|
|
22090
22090
|
onTrackHandler: this._ontrack.bind(this),
|
|
22091
22091
|
direction: i,
|
|
22092
22092
|
iceServers: o,
|
|
22093
|
-
iceTransportPolicy:
|
|
22093
|
+
iceTransportPolicy: c,
|
|
22094
22094
|
additionalSettings: l,
|
|
22095
|
-
proprietaryConstraints:
|
|
22095
|
+
proprietaryConstraints: d
|
|
22096
22096
|
}), this.appData = h || {};
|
|
22097
22097
|
const E = 3e4;
|
|
22098
22098
|
this.transportConnectionPromise = new Promise((D) => {
|
|
@@ -22248,8 +22248,8 @@ const ln = class extends Ml {
|
|
|
22248
22248
|
const {
|
|
22249
22249
|
track: n,
|
|
22250
22250
|
encodings: o,
|
|
22251
|
-
codecOptions:
|
|
22252
|
-
stopTracks:
|
|
22251
|
+
codecOptions: c,
|
|
22252
|
+
stopTracks: d = !0,
|
|
22253
22253
|
disableTrackOnPause: l = !0,
|
|
22254
22254
|
zeroRtpOnPause: h = !1,
|
|
22255
22255
|
appData: g = {}
|
|
@@ -22264,7 +22264,7 @@ const ln = class extends Ml {
|
|
|
22264
22264
|
} = yield this.handler.send({
|
|
22265
22265
|
track: n,
|
|
22266
22266
|
encodings: o,
|
|
22267
|
-
codecOptions:
|
|
22267
|
+
codecOptions: c,
|
|
22268
22268
|
screenShare: g == null ? void 0 : g.screenShare
|
|
22269
22269
|
}), { answer: U, producerId: B } = yield r(
|
|
22270
22270
|
{
|
|
@@ -22272,7 +22272,7 @@ const ln = class extends Ml {
|
|
|
22272
22272
|
kind: n.kind,
|
|
22273
22273
|
paused: l ? !n.enabled || Object.hasOwn(n, "fakeTracks") : !1,
|
|
22274
22274
|
appData: j(N({}, g || {}), { mid: D }),
|
|
22275
|
-
codecOptions:
|
|
22275
|
+
codecOptions: c,
|
|
22276
22276
|
producingTransportId: this.serverId
|
|
22277
22277
|
}
|
|
22278
22278
|
), F = yield w(U);
|
|
@@ -22282,7 +22282,7 @@ const ln = class extends Ml {
|
|
|
22282
22282
|
id: f,
|
|
22283
22283
|
localId: v,
|
|
22284
22284
|
track: n,
|
|
22285
|
-
stopTracks:
|
|
22285
|
+
stopTracks: d,
|
|
22286
22286
|
disableTrackOnPause: l,
|
|
22287
22287
|
zeroRtpOnPause: h,
|
|
22288
22288
|
appData: g,
|
|
@@ -22320,14 +22320,14 @@ const ln = class extends Ml {
|
|
|
22320
22320
|
return this.awaitQueue.push(() => u(this, null, function* () {
|
|
22321
22321
|
const n = {}, {
|
|
22322
22322
|
consumerStates: o,
|
|
22323
|
-
sessionDescription:
|
|
22324
|
-
failedProducers:
|
|
22323
|
+
sessionDescription: c,
|
|
22324
|
+
failedProducers: d
|
|
22325
22325
|
} = yield r(e);
|
|
22326
22326
|
o.forEach((h, g) => {
|
|
22327
22327
|
n[g] = this.createConsumerObjectAndWaitForTrack(j(N({}, h), {
|
|
22328
22328
|
producerId: g
|
|
22329
22329
|
}));
|
|
22330
|
-
}),
|
|
22330
|
+
}), c && (this.logger.info("Session description found, sending negotiation request"), yield i(c));
|
|
22331
22331
|
const l = [];
|
|
22332
22332
|
return yield Promise.all(Object.entries(n).map(
|
|
22333
22333
|
([h, g]) => g.then((f) => l.push(f)).catch(() => {
|
|
@@ -22336,7 +22336,7 @@ const ln = class extends Ml {
|
|
|
22336
22336
|
transport: { serverId: this.serverId }
|
|
22337
22337
|
});
|
|
22338
22338
|
})
|
|
22339
|
-
)), { consumers: l, failedProducers:
|
|
22339
|
+
)), { consumers: l, failedProducers: d };
|
|
22340
22340
|
}), "Transport.consume", { producersLength: e.length });
|
|
22341
22341
|
});
|
|
22342
22342
|
}
|
|
@@ -22353,12 +22353,12 @@ const ln = class extends Ml {
|
|
|
22353
22353
|
}
|
|
22354
22354
|
static setCodecAndFmtpMappings(e, r, i) {
|
|
22355
22355
|
const n = Zt.parse(e.sdp);
|
|
22356
|
-
return n.media = n.media.map((
|
|
22357
|
-
if (r.includes(
|
|
22358
|
-
const
|
|
22359
|
-
return
|
|
22356
|
+
return n.media = n.media.map((c) => {
|
|
22357
|
+
if (r.includes(c.mid.toString())) {
|
|
22358
|
+
const d = N({}, c);
|
|
22359
|
+
return d.rtp = i[c.mid.toString()].rtp, d.fmtp = i[c.mid.toString()].fmtp, d.payloads = i[c.mid.toString()].payloads, d.rtcpFb = i[c.mid.toString()].rtcpFb, d;
|
|
22360
22360
|
}
|
|
22361
|
-
return
|
|
22361
|
+
return c;
|
|
22362
22362
|
}), j(N({}, e), {
|
|
22363
22363
|
sdp: Zt.write(n)
|
|
22364
22364
|
});
|
|
@@ -22372,8 +22372,8 @@ const ln = class extends Ml {
|
|
|
22372
22372
|
static setHeaderExtensionMappings(e, r) {
|
|
22373
22373
|
const i = Zt.parse(e.sdp);
|
|
22374
22374
|
return i.media = i.media.map((o) => {
|
|
22375
|
-
const
|
|
22376
|
-
return
|
|
22375
|
+
const c = N({}, o);
|
|
22376
|
+
return c.ext = r[o.mid], c;
|
|
22377
22377
|
}), j(N({}, e), {
|
|
22378
22378
|
sdp: Zt.write(i)
|
|
22379
22379
|
});
|
|
@@ -22388,17 +22388,17 @@ const ln = class extends Ml {
|
|
|
22388
22388
|
this.handler.pc.remoteDescription
|
|
22389
22389
|
);
|
|
22390
22390
|
this.logger.info("Stopping transceivers", { consumerIds: e.map(({ id: l }) => l) }), e.forEach((l) => l.close(void 0, !0));
|
|
22391
|
-
let
|
|
22392
|
-
this.logger.info("[SDP] Created offer for closing consumers", { sdp:
|
|
22393
|
-
|
|
22391
|
+
let c = yield this.handler.pc.createOffer();
|
|
22392
|
+
this.logger.info("[SDP] Created offer for closing consumers", { sdp: c.sdp }), c = ln.setCodecAndFmtpMappings(
|
|
22393
|
+
c,
|
|
22394
22394
|
i,
|
|
22395
22395
|
n
|
|
22396
|
-
),
|
|
22397
|
-
|
|
22396
|
+
), c = ln.setHeaderExtensionMappings(
|
|
22397
|
+
c,
|
|
22398
22398
|
o
|
|
22399
|
-
), this.logger.info("[SDP] Updated codec and fmtp mappings in close consumer offer", { sdp:
|
|
22400
|
-
const
|
|
22401
|
-
this.logger.info("[SDP] Received answer in close consumers", { sdp:
|
|
22399
|
+
), this.logger.info("[SDP] 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");
|
|
22400
|
+
const d = yield r(e, c);
|
|
22401
|
+
this.logger.info("[SDP] Received answer in close consumers", { sdp: d.sdp }), yield this.setRemoteDescription(d), this.logger.info("[SDP] Remote description was set successfully in close consumers", { sdp: d.sdp });
|
|
22402
22402
|
} catch (i) {
|
|
22403
22403
|
this.logger.error("Failed to close consumers", { error: i });
|
|
22404
22404
|
}
|
|
@@ -22413,10 +22413,10 @@ const ln = class extends Ml {
|
|
|
22413
22413
|
const i = Zt.parse(r.sdp);
|
|
22414
22414
|
return i.media = i.media.map((n) => {
|
|
22415
22415
|
if (n.type === "audio") {
|
|
22416
|
-
const o = N({}, n),
|
|
22416
|
+
const o = N({}, n), c = o.fmtp.find(
|
|
22417
22417
|
(l) => l.payload === 111
|
|
22418
22418
|
);
|
|
22419
|
-
return
|
|
22419
|
+
return c && (c.config += ";stereo=1;sprop-stereo=1"), o.rtcpFb || (o.rtcpFb = []), o.rtcpFb.some(
|
|
22420
22420
|
(l) => l.type === "nack"
|
|
22421
22421
|
) || o.rtcpFb.push({
|
|
22422
22422
|
payload: parseInt(o.payloads, 10),
|
|
@@ -22463,13 +22463,13 @@ const ln = class extends Ml {
|
|
|
22463
22463
|
producerId: i,
|
|
22464
22464
|
producingPeerId: n,
|
|
22465
22465
|
producingTransportId: o,
|
|
22466
|
-
streamId:
|
|
22467
|
-
paused:
|
|
22466
|
+
streamId: c,
|
|
22467
|
+
paused: d,
|
|
22468
22468
|
screenShare: l,
|
|
22469
22469
|
appData: h,
|
|
22470
22470
|
kind: g,
|
|
22471
22471
|
mimeType: f
|
|
22472
|
-
} = e, v = `${
|
|
22472
|
+
} = e, v = `${c}:${g}`, E = j(N({}, e), {
|
|
22473
22473
|
name: "consumer creation task error",
|
|
22474
22474
|
message: "consumer creation failed"
|
|
22475
22475
|
});
|
|
@@ -22488,7 +22488,7 @@ const ln = class extends Ml {
|
|
|
22488
22488
|
localId: F.mid,
|
|
22489
22489
|
transceiver: F,
|
|
22490
22490
|
track: H,
|
|
22491
|
-
paused:
|
|
22491
|
+
paused: d,
|
|
22492
22492
|
producerId: i,
|
|
22493
22493
|
producingPeerId: n,
|
|
22494
22494
|
producingTransportId: o,
|
|
@@ -22738,12 +22738,12 @@ class pD extends st.EventEmitter {
|
|
|
22738
22738
|
stopTransports(e) {
|
|
22739
22739
|
var r, i;
|
|
22740
22740
|
if (e.send && this.sendTransport !== void 0) {
|
|
22741
|
-
const { id: n, serverId: o, direction:
|
|
22742
|
-
this.logger.info("Closing send transport", { transport: { id: n, serverId: o, type:
|
|
22741
|
+
const { id: n, serverId: o, direction: c } = a(this, Xe);
|
|
22742
|
+
this.logger.info("Closing send transport", { transport: { id: n, serverId: o, type: c } }), a(this, Xe).close(), a(this, Xe).removeAllListeners(), S(this, Xe, void 0);
|
|
22743
22743
|
}
|
|
22744
22744
|
if (e.recv && this.recvTransport !== void 0) {
|
|
22745
|
-
const { id: n, serverId: o, direction:
|
|
22746
|
-
this.logger.info("Closing recv transport", { transport: { id: n, serverId: o, type:
|
|
22745
|
+
const { id: n, serverId: o, direction: c } = a(this, Ze);
|
|
22746
|
+
this.logger.info("Closing recv transport", { transport: { id: n, serverId: o, type: c } }), (r = a(this, Ze)) == null || r.close(), (i = a(this, Ze)) == null || i.removeAllListeners(), S(this, Ze, void 0);
|
|
22747
22747
|
}
|
|
22748
22748
|
V(this, Qo, Uu).call(this);
|
|
22749
22749
|
}
|
|
@@ -22764,7 +22764,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22764
22764
|
});
|
|
22765
22765
|
}, Bd = new WeakSet(), jf = function(e) {
|
|
22766
22766
|
return u(this, null, function* () {
|
|
22767
|
-
var o,
|
|
22767
|
+
var o, c, d, l, h, g, f, v;
|
|
22768
22768
|
va(this.context, "forceRelay") && S(this, Ts, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, Ts)}`);
|
|
22769
22769
|
const n = yield St().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
22770
22770
|
e.send && V(this, Fd, Wf).call(this, {
|
|
@@ -22773,7 +22773,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22773
22773
|
encodedInsertableStreams: (o = this.context.getValue("modules").e2ee) == null ? void 0 : o.enabled
|
|
22774
22774
|
},
|
|
22775
22775
|
config: {
|
|
22776
|
-
enableHighBitrate: (l = (
|
|
22776
|
+
enableHighBitrate: (l = (d = (c = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? l : !1,
|
|
22777
22777
|
enableStereo: (f = (g = (h = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : h.audio) == null ? void 0 : g.enableStereo) != null ? f : !1,
|
|
22778
22778
|
enableDtx: !1
|
|
22779
22779
|
},
|
|
@@ -22791,8 +22791,8 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22791
22791
|
const { id: r, serverId: i, direction: n } = e;
|
|
22792
22792
|
V(this, jd, Kf).call(this, e);
|
|
22793
22793
|
try {
|
|
22794
|
-
return yield Bf((
|
|
22795
|
-
|
|
22794
|
+
return yield Bf((c, d) => u(this, null, function* () {
|
|
22795
|
+
c > 0 && this.logger.debug(`Retrying transport connect, count: ${c}`, {
|
|
22796
22796
|
transport: { id: r, serverId: i, type: n }
|
|
22797
22797
|
});
|
|
22798
22798
|
try {
|
|
@@ -22801,7 +22801,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22801
22801
|
yield V(this, Hd, Gf).call(this, e);
|
|
22802
22802
|
} catch (l) {
|
|
22803
22803
|
if (l instanceof vr) {
|
|
22804
|
-
|
|
22804
|
+
d(l);
|
|
22805
22805
|
return;
|
|
22806
22806
|
}
|
|
22807
22807
|
throw this.logger.error("Failed to connect transport, retrying", { transport: e, error: l }), l;
|
|
@@ -22885,8 +22885,8 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22885
22885
|
}
|
|
22886
22886
|
);
|
|
22887
22887
|
const o = () => {
|
|
22888
|
-
const
|
|
22889
|
-
|
|
22888
|
+
const c = a(this, Mi)[r];
|
|
22889
|
+
c !== void 0 && (clearTimeout(c), a(this, Mi)[r] = void 0);
|
|
22890
22890
|
};
|
|
22891
22891
|
switch (n) {
|
|
22892
22892
|
case "connected":
|
|
@@ -22906,7 +22906,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22906
22906
|
})), e.on("icecandidate", (n) => u(this, null, function* () {
|
|
22907
22907
|
this.logger.debug("Sending iceCandidate:", { iceCandidate: n });
|
|
22908
22908
|
})), e.on("datachannel:events", (n, o) => u(this, null, function* () {
|
|
22909
|
-
var
|
|
22909
|
+
var c, d;
|
|
22910
22910
|
this.logger.debug("Got data channel message on event:", {
|
|
22911
22911
|
rtcChannel: { label: n, message: o }
|
|
22912
22912
|
});
|
|
@@ -22923,7 +22923,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22923
22923
|
break;
|
|
22924
22924
|
}
|
|
22925
22925
|
case "hub-disconnect": {
|
|
22926
|
-
this.logger.debug(`media hub disconnected, full_reconnect: ${(
|
|
22926
|
+
this.logger.debug(`media hub disconnected, full_reconnect: ${(c = o.payload) == null ? void 0 : c.full_reconnect}`), ((d = o.payload) == null ? void 0 : d.full_reconnect) === !0 && this.handleErrors("rejoin");
|
|
22927
22927
|
break;
|
|
22928
22928
|
}
|
|
22929
22929
|
case "error":
|
|
@@ -22943,7 +22943,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22943
22943
|
return u(this, null, function* () {
|
|
22944
22944
|
const i = e === "recv";
|
|
22945
22945
|
try {
|
|
22946
|
-
const { sdp: n, type: o } = r,
|
|
22946
|
+
const { sdp: n, type: o } = r, c = {
|
|
22947
22947
|
consuming: i,
|
|
22948
22948
|
description: {
|
|
22949
22949
|
sdp: n,
|
|
@@ -22952,7 +22952,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
|
|
|
22952
22952
|
},
|
|
22953
22953
|
producers: []
|
|
22954
22954
|
};
|
|
22955
|
-
return a(this, Zn).connectTransport(
|
|
22955
|
+
return a(this, Zn).connectTransport(c);
|
|
22956
22956
|
} catch (n) {
|
|
22957
22957
|
throw this.logger.error(
|
|
22958
22958
|
`Error in ${e} transport connection:`,
|
|
@@ -23003,8 +23003,8 @@ class gD {
|
|
|
23003
23003
|
if (!t || t && t.length === 0)
|
|
23004
23004
|
throw new Error("List of producers is required");
|
|
23005
23005
|
const e = /* @__PURE__ */ new Map(), r = [];
|
|
23006
|
-
t.forEach((
|
|
23007
|
-
const { producingPeerId: l, producerId: h, producingTransportId: g } =
|
|
23006
|
+
t.forEach((d) => {
|
|
23007
|
+
const { producingPeerId: l, producerId: h, producingTransportId: g } = d, f = {
|
|
23008
23008
|
simulcast: {
|
|
23009
23009
|
preferredRid: "f",
|
|
23010
23010
|
priorityOrdering: "asciibetical",
|
|
@@ -23021,16 +23021,16 @@ class gD {
|
|
|
23021
23021
|
requests: r,
|
|
23022
23022
|
consumingTransportId: this.recvTransport.serverId
|
|
23023
23023
|
}), n = /* @__PURE__ */ new Map();
|
|
23024
|
-
t.forEach((
|
|
23025
|
-
const o = /* @__PURE__ */ new Map(),
|
|
23026
|
-
return Object.entries(i.consumerStateMap).forEach(([
|
|
23027
|
-
const h = n.get(
|
|
23024
|
+
t.forEach((d) => n.set(d.producerId, d));
|
|
23025
|
+
const o = /* @__PURE__ */ new Map(), c = [];
|
|
23026
|
+
return Object.entries(i.consumerStateMap).forEach(([d, l]) => {
|
|
23027
|
+
const h = n.get(d);
|
|
23028
23028
|
if (!h)
|
|
23029
23029
|
return;
|
|
23030
23030
|
if (l.errorCode) {
|
|
23031
|
-
a(this, Gt).warn(`Consumer request failed for producer ${
|
|
23031
|
+
a(this, Gt).warn(`Consumer request failed for producer ${d}`, {
|
|
23032
23032
|
error: { message: l.errorCode }
|
|
23033
|
-
}),
|
|
23033
|
+
}), c.push(j(N({}, h), { errorCode: l.errorCode }));
|
|
23034
23034
|
return;
|
|
23035
23035
|
}
|
|
23036
23036
|
let g = {};
|
|
@@ -23038,7 +23038,7 @@ class gD {
|
|
|
23038
23038
|
g = JSON.parse(l.producerState.appData);
|
|
23039
23039
|
} catch (f) {
|
|
23040
23040
|
}
|
|
23041
|
-
o.set(
|
|
23041
|
+
o.set(d, {
|
|
23042
23042
|
consumerId: l.consumerId,
|
|
23043
23043
|
producingTransportId: h.producingTransportId,
|
|
23044
23044
|
producingPeerId: h.producingPeerId,
|
|
@@ -23050,7 +23050,7 @@ class gD {
|
|
|
23050
23050
|
mimeType: h.mimeType,
|
|
23051
23051
|
appData: g
|
|
23052
23052
|
});
|
|
23053
|
-
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers:
|
|
23053
|
+
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers: c };
|
|
23054
23054
|
});
|
|
23055
23055
|
}
|
|
23056
23056
|
negotiate(t) {
|
|
@@ -23094,10 +23094,10 @@ class gD {
|
|
|
23094
23094
|
},
|
|
23095
23095
|
consumerIds: n,
|
|
23096
23096
|
consumingTransportId: this.recvTransport.serverId
|
|
23097
|
-
},
|
|
23097
|
+
}, c = yield this.socketHandler.closeConsumer(o), d = BR.fromBinary(c).description;
|
|
23098
23098
|
return {
|
|
23099
|
-
sdp:
|
|
23100
|
-
type:
|
|
23099
|
+
sdp: d.sdp,
|
|
23100
|
+
type: d.type
|
|
23101
23101
|
};
|
|
23102
23102
|
});
|
|
23103
23103
|
return yield this.recvTransport.awaitQueue.push(() => this.recvTransport.closeConsumers(t, e), "ConsumerStrategy.close", { consumersLength: t.length }), {};
|
|
@@ -23109,11 +23109,11 @@ class gD {
|
|
|
23109
23109
|
requests: [],
|
|
23110
23110
|
consumingTransportId: this.recvTransport.serverId
|
|
23111
23111
|
}, i = t.filter((n) => n && n.id);
|
|
23112
|
-
i.forEach(({ id: n, producingTransportId: o, localId:
|
|
23112
|
+
i.forEach(({ id: n, producingTransportId: o, localId: c }) => {
|
|
23113
23113
|
r.requests.push({
|
|
23114
23114
|
producerId: n,
|
|
23115
23115
|
producingTransportId: o,
|
|
23116
|
-
mid:
|
|
23116
|
+
mid: c,
|
|
23117
23117
|
simulcast: {
|
|
23118
23118
|
preferredRid: e === 0 ? "q" : "h",
|
|
23119
23119
|
priorityOrdering: "asciibetical",
|
|
@@ -23135,7 +23135,7 @@ class Mh {
|
|
|
23135
23135
|
(n) => e === "video" ? n.type === "video" : n.type === "audio"
|
|
23136
23136
|
).at(-1).msid;
|
|
23137
23137
|
}
|
|
23138
|
-
create(
|
|
23138
|
+
create(c) {
|
|
23139
23139
|
return u(this, arguments, function* ({
|
|
23140
23140
|
offer: t,
|
|
23141
23141
|
kind: e,
|
|
@@ -23145,7 +23145,7 @@ class Mh {
|
|
|
23145
23145
|
producingTransportId: o
|
|
23146
23146
|
}) {
|
|
23147
23147
|
var f, v;
|
|
23148
|
-
const
|
|
23148
|
+
const d = Mh.getMSIDFromSDP(t.sdp, e), l = {
|
|
23149
23149
|
description: {
|
|
23150
23150
|
sdp: t.sdp,
|
|
23151
23151
|
type: t.type,
|
|
@@ -23153,7 +23153,7 @@ class Mh {
|
|
|
23153
23153
|
},
|
|
23154
23154
|
paused: r,
|
|
23155
23155
|
kind: e,
|
|
23156
|
-
msid:
|
|
23156
|
+
msid: d,
|
|
23157
23157
|
appData: JSON.stringify(i),
|
|
23158
23158
|
screenShare: (f = i.screenShare) != null ? f : !1,
|
|
23159
23159
|
mimeType: `${e}/${(v = n[0]) == null ? void 0 : v.name}`,
|
|
@@ -23320,18 +23320,18 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
|
|
|
23320
23320
|
throw new Error("Recv transport is closed");
|
|
23321
23321
|
const e = 500, r = a(this, qs).splice(0, a(this, qs).length);
|
|
23322
23322
|
try {
|
|
23323
|
-
const i = new Set(Array.from(this.consumers.values()).map(({ producerId:
|
|
23323
|
+
const i = new Set(Array.from(this.consumers.values()).map(({ producerId: d }) => d)), n = r.filter(({ producerId: d }) => !this.producers.get(d) && !i.has(d));
|
|
23324
23324
|
if (n.length === 0)
|
|
23325
23325
|
return;
|
|
23326
|
-
const { consumers: o, failedProducers:
|
|
23326
|
+
const { consumers: o, failedProducers: c } = yield this.recvTransport.consume(
|
|
23327
23327
|
n,
|
|
23328
23328
|
V(this, Yd, Xf).bind(this),
|
|
23329
23329
|
a(this, ys).negotiate.bind(a(this, ys))
|
|
23330
23330
|
);
|
|
23331
|
-
if (o.forEach(V(this, Qd, Zf).bind(this)),
|
|
23332
|
-
this.logger.error("Failed to create consumers for producers", { producers:
|
|
23333
|
-
const
|
|
23334
|
-
S(this, qs, a(this, qs).concat(
|
|
23331
|
+
if (o.forEach(V(this, Qd, Zf).bind(this)), c != null && c.length) {
|
|
23332
|
+
this.logger.error("Failed to create consumers for producers", { producers: c });
|
|
23333
|
+
const d = c.filter(({ errorCode: l, producerId: h }) => l === "not_found_track_error" ? (this.logger.error(`Track not found for producer: ${h}. This will not be retried.`), !1) : l === "backend_error" ? (this.logger.error("Unrecoverable error: backend error"), !1) : !0);
|
|
23334
|
+
S(this, qs, a(this, qs).concat(d)), S(this, ra, setTimeout(
|
|
23335
23335
|
V(this, sc, Fu).bind(this),
|
|
23336
23336
|
e
|
|
23337
23337
|
));
|
|
@@ -23357,12 +23357,12 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
|
|
|
23357
23357
|
return a(this, tc).create(e);
|
|
23358
23358
|
}, zd = new WeakSet(), Qf = function(e, r) {
|
|
23359
23359
|
e.on("close", (i, n) => u(this, null, function* () {
|
|
23360
|
-
const { offer: o, reason:
|
|
23360
|
+
const { offer: o, reason: c } = i;
|
|
23361
23361
|
if (this.logger.info("producer::closing", {
|
|
23362
|
-
debuggingHint:
|
|
23362
|
+
debuggingHint: c,
|
|
23363
23363
|
producer: j(N({}, e), { status: "closing" })
|
|
23364
|
-
}),
|
|
23365
|
-
const
|
|
23364
|
+
}), c !== fo) {
|
|
23365
|
+
const d = {
|
|
23366
23366
|
producerId: e.id,
|
|
23367
23367
|
description: {
|
|
23368
23368
|
sdp: o.sdp,
|
|
@@ -23371,7 +23371,7 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
|
|
|
23371
23371
|
}
|
|
23372
23372
|
};
|
|
23373
23373
|
try {
|
|
23374
|
-
const l = yield this.socketHandler.closeProducer(
|
|
23374
|
+
const l = yield this.socketHandler.closeProducer(d), h = {
|
|
23375
23375
|
sdp: l == null ? void 0 : l.sdp,
|
|
23376
23376
|
type: l == null ? void 0 : l.type
|
|
23377
23377
|
};
|
|
@@ -23417,8 +23417,8 @@ const sl = class {
|
|
|
23417
23417
|
hangoverFrames: i = 5,
|
|
23418
23418
|
noiseAdaptationRate: n = 0.95,
|
|
23419
23419
|
voiceAdaptationRate: o = 0.99,
|
|
23420
|
-
minEnergyThreshold:
|
|
23421
|
-
maxEnergyThreshold:
|
|
23420
|
+
minEnergyThreshold: c = 5e-3,
|
|
23421
|
+
maxEnergyThreshold: d = 0.2,
|
|
23422
23422
|
energyRatioThreshold: l = 1.5,
|
|
23423
23423
|
noiseHistorySize: h = 50
|
|
23424
23424
|
} = {}) {
|
|
@@ -23450,7 +23450,7 @@ const sl = class {
|
|
|
23450
23450
|
m(this, Oi, 0);
|
|
23451
23451
|
m(this, js, []);
|
|
23452
23452
|
m(this, cc, void 0);
|
|
23453
|
-
S(this, ia, t), S(this, pt, t), S(this, rc, e), S(this, ic, r), S(this, nc, i), S(this, na, n), S(this, aa, o), S(this, ac,
|
|
23453
|
+
S(this, ia, t), S(this, pt, t), S(this, rc, e), S(this, ic, r), S(this, nc, i), S(this, na, n), S(this, aa, o), S(this, ac, c), S(this, oc, d), S(this, oa, l), S(this, cc, h), S(this, as, t / 2);
|
|
23454
23454
|
}
|
|
23455
23455
|
get voiceDetected() {
|
|
23456
23456
|
return a(this, os);
|
|
@@ -23461,8 +23461,8 @@ const sl = class {
|
|
|
23461
23461
|
* @returns boolean indicating if voice activity is detected
|
|
23462
23462
|
*/
|
|
23463
23463
|
processAudioChunk(t) {
|
|
23464
|
-
var o,
|
|
23465
|
-
const e = V(o = sl, el, sS).call(o, t), r = V(
|
|
23464
|
+
var o, c;
|
|
23465
|
+
const e = V(o = sl, el, sS).call(o, t), r = V(c = sl, tl, rS).call(c, t);
|
|
23466
23466
|
return V(this, Xd, eS).call(this, e), e / a(this, as) > a(this, oa) && e > a(this, pt) && r > a(this, rc) ? (S(this, Di, a(this, Di) + 1), S(this, Oi, a(this, nc)), a(this, Di) >= a(this, ic) && S(this, os, !0)) : (S(this, Di, 0), a(this, Oi) > 0 ? S(this, Oi, a(this, Oi) - 1) : a(this, os) && S(this, os, !1), a(this, os) || V(this, Zd, tS).call(this, e)), { energy: e, isVoice: a(this, os) };
|
|
23467
23467
|
}
|
|
23468
23468
|
/**
|
|
@@ -23772,8 +23772,8 @@ class ne {
|
|
|
23772
23772
|
() => V(this, ol, oS).call(this, t, e, r, i),
|
|
23773
23773
|
"joinRoom"
|
|
23774
23774
|
);
|
|
23775
|
-
} catch (
|
|
23776
|
-
return this.logger.error("Error in room joining process", { error:
|
|
23775
|
+
} catch (c) {
|
|
23776
|
+
return this.logger.error("Error in room joining process", { error: c }), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_FAILED), { roomJoined: !1, error: c };
|
|
23777
23777
|
}
|
|
23778
23778
|
});
|
|
23779
23779
|
}
|
|
@@ -23787,8 +23787,8 @@ class ne {
|
|
|
23787
23787
|
return a(this, kt) ? a(this, kt) : (S(this, kt, (() => u(this, null, function* () {
|
|
23788
23788
|
try {
|
|
23789
23789
|
yield V(this, fc, ju).call(this, t, e, r, i);
|
|
23790
|
-
} catch (
|
|
23791
|
-
throw S(this, kt, null),
|
|
23790
|
+
} catch (c) {
|
|
23791
|
+
throw S(this, kt, null), c;
|
|
23792
23792
|
}
|
|
23793
23793
|
}))()), a(this, kt));
|
|
23794
23794
|
});
|
|
@@ -23859,11 +23859,11 @@ class ne {
|
|
|
23859
23859
|
}
|
|
23860
23860
|
const i = V(this, gl, gS).call(this, t), n = va(this.context, "disableSimulcast"), o = (g = (h = this.context) == null ? void 0 : h.getValue("overrides")) == null ? void 0 : g.simulcastConfig;
|
|
23861
23861
|
n || o && o.disable || !((v = (f = this.context) == null ? void 0 : f.getValue("theme")) != null && v.isSimulcastEnabled) ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), i.encodings = oM(this.context, t), this.logger.info(`Simulcast encodings: ${JSON.stringify(i.encodings)}`));
|
|
23862
|
-
const
|
|
23862
|
+
const d = () => {
|
|
23863
23863
|
this.logger.info("Disabling video due to the producer closure"), a(this, tt).delete(e);
|
|
23864
23864
|
}, l = a(this, q).createProducer(
|
|
23865
23865
|
i,
|
|
23866
|
-
|
|
23866
|
+
d
|
|
23867
23867
|
);
|
|
23868
23868
|
return V(this, $i, Ya).call(this, e, l.then((E) => E.id)), l.then((E) => E.track);
|
|
23869
23869
|
});
|
|
@@ -23897,10 +23897,10 @@ class ne {
|
|
|
23897
23897
|
i,
|
|
23898
23898
|
n
|
|
23899
23899
|
);
|
|
23900
|
-
V(this, $i, Ya).call(this, Ce.SCREENSHARE_VIDEO, o.then((
|
|
23901
|
-
let
|
|
23900
|
+
V(this, $i, Ya).call(this, Ce.SCREENSHARE_VIDEO, o.then((d) => d.id));
|
|
23901
|
+
let c;
|
|
23902
23902
|
if (r) {
|
|
23903
|
-
const
|
|
23903
|
+
const d = {
|
|
23904
23904
|
track: r,
|
|
23905
23905
|
codecOptions: [{ name: "opus" }],
|
|
23906
23906
|
appData: {
|
|
@@ -23912,12 +23912,12 @@ class ne {
|
|
|
23912
23912
|
zeroRtpOnPause: !1
|
|
23913
23913
|
}, l = () => {
|
|
23914
23914
|
};
|
|
23915
|
-
|
|
23916
|
-
|
|
23915
|
+
c = a(this, q).createProducer(
|
|
23916
|
+
d,
|
|
23917
23917
|
l
|
|
23918
|
-
), V(this, $i, Ya).call(this, Ce.SCREENSHARE_AUDIO,
|
|
23918
|
+
), V(this, $i, Ya).call(this, Ce.SCREENSHARE_AUDIO, c.then((h) => h.id));
|
|
23919
23919
|
}
|
|
23920
|
-
yield Promise.all([o,
|
|
23920
|
+
yield Promise.all([o, c || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
23921
23921
|
});
|
|
23922
23922
|
}
|
|
23923
23923
|
shareMic(t) {
|
|
@@ -23929,9 +23929,9 @@ class ne {
|
|
|
23929
23929
|
if (e) {
|
|
23930
23930
|
const o = yield e;
|
|
23931
23931
|
if (a(this, q).producers.has(o)) {
|
|
23932
|
-
const
|
|
23933
|
-
if (!
|
|
23934
|
-
yield
|
|
23932
|
+
const c = a(this, q).producers.get(o);
|
|
23933
|
+
if (!c.closed) {
|
|
23934
|
+
yield c.replaceTrack({ track: t }), yield this.resumeMic(), a(this, gt) && (a(this, gt).audioTrack = t, a(this, gt).producerId = o, a(this, gt).start());
|
|
23935
23935
|
return;
|
|
23936
23936
|
}
|
|
23937
23937
|
yield a(this, q).closeProducer(o, { stopTrack: !1 });
|
|
@@ -24189,23 +24189,23 @@ class ne {
|
|
|
24189
24189
|
kind: i,
|
|
24190
24190
|
pause: n,
|
|
24191
24191
|
producerId: o,
|
|
24192
|
-
screenShare:
|
|
24192
|
+
screenShare: c
|
|
24193
24193
|
}
|
|
24194
24194
|
} = Lp.fromBinary(t);
|
|
24195
|
-
if (
|
|
24195
|
+
if (c)
|
|
24196
24196
|
return;
|
|
24197
|
-
const
|
|
24197
|
+
const d = i === tr.AUDIO ? "audio" : "video";
|
|
24198
24198
|
if (this.logger.info(
|
|
24199
|
-
`producer toggle broadcast: ${e}, producerId: ${o}, kind:${
|
|
24199
|
+
`producer toggle broadcast: ${e}, producerId: ${o}, kind:${d}, paused:${n} payload: ${JSON.stringify(Lp.fromBinary(t))}`
|
|
24200
24200
|
), e === this.peerId && r !== this.peerId && n && this.context.getValue("peerSessionStore").emit(
|
|
24201
|
-
|
|
24201
|
+
d === "audio" ? b.MUTE_SELF : b.MUTE_SELF_VIDEO
|
|
24202
24202
|
), e === this.peerId)
|
|
24203
24203
|
return;
|
|
24204
24204
|
this.context.getValue("peerSessionStore").emit(b.PRODUCER_TOGGLE, {
|
|
24205
24205
|
peerId: e,
|
|
24206
24206
|
producerId: o,
|
|
24207
24207
|
paused: n,
|
|
24208
|
-
kind:
|
|
24208
|
+
kind: d
|
|
24209
24209
|
}), Array.from(
|
|
24210
24210
|
this.getConsumers().values()
|
|
24211
24211
|
).filter((h) => h.producerId === o).forEach((h) => {
|
|
@@ -24316,15 +24316,15 @@ pc = new WeakMap(), gc = new WeakMap(), et = new WeakMap(), q = new WeakMap(), a
|
|
|
24316
24316
|
S(this, gc, t);
|
|
24317
24317
|
let n = !1;
|
|
24318
24318
|
if (r) {
|
|
24319
|
-
const { recv:
|
|
24320
|
-
(
|
|
24319
|
+
const { recv: c, send: d } = (o = a(this, zs, ei).mediaState) != null ? o : {};
|
|
24320
|
+
(d == null ? void 0 : d.state) === jr.CONNECTED && (c == null ? void 0 : c.state) === jr.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — partial reset (producers only)"), yield a(this, q).closeAllProducersLocally(), a(this, tt).clear(), a(this, Ps).clear(), S(this, kt, null), n = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }));
|
|
24321
24321
|
}
|
|
24322
24322
|
try {
|
|
24323
24323
|
a(this, kt) ? yield a(this, kt) : yield V(this, fc, ju).call(this, t, e, r, i, n), V(this, dl, dS).call(this, e);
|
|
24324
|
-
const { joined:
|
|
24325
|
-
return { roomJoined:
|
|
24326
|
-
} catch (
|
|
24327
|
-
return this.logger.error("Failed to complete room join", { error:
|
|
24324
|
+
const { joined: c, error: d } = yield V(this, cl, cS).call(this);
|
|
24325
|
+
return { roomJoined: c, error: d };
|
|
24326
|
+
} catch (c) {
|
|
24327
|
+
return this.logger.error("Failed to complete room join", { error: c }), { roomJoined: !1, error: c };
|
|
24328
24328
|
} finally {
|
|
24329
24329
|
S(this, kt, null);
|
|
24330
24330
|
}
|
|
@@ -24392,8 +24392,8 @@ pc = new WeakMap(), gc = new WeakMap(), et = new WeakMap(), q = new WeakMap(), a
|
|
|
24392
24392
|
i,
|
|
24393
24393
|
r
|
|
24394
24394
|
);
|
|
24395
|
-
} catch (
|
|
24396
|
-
throw this.logger.error("Failed to send joinRoom message after retries", { error:
|
|
24395
|
+
} catch (c) {
|
|
24396
|
+
throw this.logger.error("Failed to send joinRoom message after retries", { error: c }), c;
|
|
24397
24397
|
}
|
|
24398
24398
|
}),
|
|
24399
24399
|
{
|
|
@@ -24585,18 +24585,18 @@ const fS = (kg = class {
|
|
|
24585
24585
|
}
|
|
24586
24586
|
static init(s, t, e, r, i) {
|
|
24587
24587
|
return u(this, null, function* () {
|
|
24588
|
-
const n = St(), o = s.getValue("peerId"),
|
|
24588
|
+
const n = St(), o = s.getValue("peerId"), c = !!s.getValue("cachedUserDetails"), d = yield We.__init__(
|
|
24589
24589
|
s,
|
|
24590
24590
|
e,
|
|
24591
24591
|
r,
|
|
24592
24592
|
i,
|
|
24593
24593
|
i.name,
|
|
24594
|
-
|
|
24594
|
+
c
|
|
24595
24595
|
);
|
|
24596
|
-
s.setValue("self",
|
|
24596
|
+
s.setValue("self", d);
|
|
24597
24597
|
const l = s.getValue("logger");
|
|
24598
24598
|
return navigator.product !== "ReactNative" ? setTimeout(() => u(this, null, function* () {
|
|
24599
|
-
const g = yield
|
|
24599
|
+
const g = yield d.getAllDevices();
|
|
24600
24600
|
l.info("populated_full_device_list", {
|
|
24601
24601
|
devices: JSON.stringify(g)
|
|
24602
24602
|
}), s.getValue("callstats").devices("AUDIO", g == null ? void 0 : g.filter((f) => f.kind === "audioinput")), s.getValue("callstats").devices("VIDEO", g == null ? void 0 : g.filter((f) => f.kind === "videoinput")), s.getValue("callstats").devices("SPEAKER", g == null ? void 0 : g.filter((f) => f.kind === "audiooutput")), l.info("Callstats:: initializing");
|
|
@@ -24625,12 +24625,12 @@ const fS = (kg = class {
|
|
|
24625
24625
|
} catch (f) {
|
|
24626
24626
|
l.error("Callstats:: initialization failed", { error: f });
|
|
24627
24627
|
}
|
|
24628
|
-
}), 0) : l.info("Callstats:: Skipped initialization due to navigator product being ReactNative."), new fS(s,
|
|
24628
|
+
}), 0) : l.info("Callstats:: Skipped initialization due to navigator product being ReactNative."), new fS(s, d, t, i.viewType);
|
|
24629
24629
|
});
|
|
24630
24630
|
}
|
|
24631
24631
|
shareMediaTracks() {
|
|
24632
24632
|
return u(this, null, function* () {
|
|
24633
|
-
var
|
|
24633
|
+
var c;
|
|
24634
24634
|
const {
|
|
24635
24635
|
audioTrack: s,
|
|
24636
24636
|
videoTrack: t,
|
|
@@ -24644,7 +24644,7 @@ const fS = (kg = class {
|
|
|
24644
24644
|
if ((s == null ? void 0 : s.readyState) === "live")
|
|
24645
24645
|
try {
|
|
24646
24646
|
yield a(this, mt, Vt).shareMic(s), this.self.audioEnabled || a(this, mt, Vt).pauseMic();
|
|
24647
|
-
} catch (
|
|
24647
|
+
} catch (d) {
|
|
24648
24648
|
this.self.disableAudio();
|
|
24649
24649
|
}
|
|
24650
24650
|
else
|
|
@@ -24653,17 +24653,17 @@ const fS = (kg = class {
|
|
|
24653
24653
|
if ((t == null ? void 0 : t.readyState) === "live")
|
|
24654
24654
|
try {
|
|
24655
24655
|
yield a(this, mt, Vt).shareWebcam(t), this.self.videoEnabled || a(this, mt, Vt).pauseWebcam();
|
|
24656
|
-
} catch (
|
|
24656
|
+
} catch (d) {
|
|
24657
24657
|
this.self.disableVideo();
|
|
24658
24658
|
}
|
|
24659
24659
|
else
|
|
24660
24660
|
this.logger.warn("shareMediaTracks: video track is dead, disabling video"), this.self.disableVideo();
|
|
24661
24661
|
if (e.canProduceScreenshare === W.Allowed && n) {
|
|
24662
|
-
const
|
|
24663
|
-
if ((
|
|
24662
|
+
const d = o.video, l = o.audio;
|
|
24663
|
+
if ((d == null ? void 0 : d.readyState) === "live")
|
|
24664
24664
|
try {
|
|
24665
|
-
yield (
|
|
24666
|
-
video:
|
|
24665
|
+
yield (c = a(this, mt, Vt)) == null ? void 0 : c.shareScreen({
|
|
24666
|
+
video: d,
|
|
24667
24667
|
audio: (l == null ? void 0 : l.readyState) === "live" ? l : void 0
|
|
24668
24668
|
});
|
|
24669
24669
|
} catch (h) {
|
|
@@ -24821,21 +24821,21 @@ const fS = (kg = class {
|
|
|
24821
24821
|
peerId: t
|
|
24822
24822
|
});
|
|
24823
24823
|
}
|
|
24824
|
-
const { canProduceAudio:
|
|
24824
|
+
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (n = a(this, mt, Vt)) == null ? void 0 : n.joinRoom(
|
|
24825
24825
|
this.self.name,
|
|
24826
24826
|
r,
|
|
24827
24827
|
s,
|
|
24828
24828
|
{
|
|
24829
|
-
canProduceAudio:
|
|
24830
|
-
canProduceVideo:
|
|
24829
|
+
canProduceAudio: c,
|
|
24830
|
+
canProduceVideo: d,
|
|
24831
24831
|
canProduceScreenshare: l
|
|
24832
24832
|
}
|
|
24833
24833
|
)) != null ? o : {};
|
|
24834
24834
|
if (!h)
|
|
24835
24835
|
throw g != null ? g : new Error("Could not connect to media server");
|
|
24836
24836
|
this.logger.info(i === "ON_STAGE" ? "Peer is on stage. Sharing media tracks" : "Peer is not on stage. Not sharing media tracks"), i === "ON_STAGE" && (yield this.shareMediaTracks()), this.logger.info(i === "ON_STAGE" ? "Peer is on stage. Shared media tracks" : "Peer is not on stage. Did not share media tracks"), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s });
|
|
24837
|
-
} catch (
|
|
24838
|
-
throw this.logger.error("SelfController.mediaRoomJoin", { error:
|
|
24837
|
+
} catch (c) {
|
|
24838
|
+
throw this.logger.error("SelfController.mediaRoomJoin", { error: c }), c;
|
|
24839
24839
|
}
|
|
24840
24840
|
});
|
|
24841
24841
|
}
|
|
@@ -24924,9 +24924,9 @@ class wD {
|
|
|
24924
24924
|
let o = i;
|
|
24925
24925
|
try {
|
|
24926
24926
|
o = r(n);
|
|
24927
|
-
} catch (
|
|
24927
|
+
} catch (c) {
|
|
24928
24928
|
this.logger.error("aiSocketHandler::on::binary_decode_error", {
|
|
24929
|
-
error:
|
|
24929
|
+
error: c
|
|
24930
24930
|
});
|
|
24931
24931
|
}
|
|
24932
24932
|
return e(o);
|
|
@@ -24998,9 +24998,9 @@ class Dl {
|
|
|
24998
24998
|
let o = i;
|
|
24999
24999
|
try {
|
|
25000
25000
|
o = r(n);
|
|
25001
|
-
} catch (
|
|
25001
|
+
} catch (c) {
|
|
25002
25002
|
this.logger.error("pollSocketHandler::on::binary_decode_error", {
|
|
25003
|
-
error:
|
|
25003
|
+
error: c
|
|
25004
25004
|
});
|
|
25005
25005
|
}
|
|
25006
25006
|
return e(o);
|
|
@@ -25075,8 +25075,8 @@ class SS {
|
|
|
25075
25075
|
try {
|
|
25076
25076
|
const { peer: n } = tn.fromBinary((yield r).payload);
|
|
25077
25077
|
a(this, At).getValue("connectionHandler").socketJoined = !0, a(this, At).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_ROOM_JOINED, { peer: n });
|
|
25078
|
-
const o = this.getRoomState(),
|
|
25079
|
-
return a(this, At).getValue("peerSessionStore").emit(b.ROOM_STATE,
|
|
25078
|
+
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
|
|
25079
|
+
return a(this, At).getValue("peerSessionStore").emit(b.ROOM_STATE, d), a(this, At).getValue("peerSessionStore").emit(b.SOCKET_PEERS, l), { peer: n };
|
|
25080
25080
|
} catch (n) {
|
|
25081
25081
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
25082
25082
|
error: n
|
|
@@ -25393,9 +25393,9 @@ class SS {
|
|
|
25393
25393
|
return e(void 0);
|
|
25394
25394
|
try {
|
|
25395
25395
|
o = r(n);
|
|
25396
|
-
} catch (
|
|
25396
|
+
} catch (c) {
|
|
25397
25397
|
this.logger.error("roomSocketHandler::on::binary_decode_error", {
|
|
25398
|
-
error:
|
|
25398
|
+
error: c
|
|
25399
25399
|
});
|
|
25400
25400
|
}
|
|
25401
25401
|
return e(o);
|
|
@@ -25688,13 +25688,13 @@ de.prototype.emit = function(s) {
|
|
|
25688
25688
|
var o = new Error("Unhandled error." + (n ? " (" + n.message + ")" : ""));
|
|
25689
25689
|
throw o.context = n, o;
|
|
25690
25690
|
}
|
|
25691
|
-
var
|
|
25692
|
-
if (
|
|
25691
|
+
var c = i[s];
|
|
25692
|
+
if (c === void 0)
|
|
25693
25693
|
return !1;
|
|
25694
|
-
if (typeof
|
|
25695
|
-
ng(
|
|
25694
|
+
if (typeof c == "function")
|
|
25695
|
+
ng(c, this, t);
|
|
25696
25696
|
else
|
|
25697
|
-
for (var
|
|
25697
|
+
for (var d = c.length, l = CS(c, d), e = 0; e < d; ++e)
|
|
25698
25698
|
ng(l[e], this, t);
|
|
25699
25699
|
return !0;
|
|
25700
25700
|
};
|
|
@@ -25708,8 +25708,8 @@ function yS(s, t, e, r) {
|
|
|
25708
25708
|
o = n[t] = e, ++s._eventsCount;
|
|
25709
25709
|
else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), i = TS(s), i > 0 && o.length > i && !o.warned) {
|
|
25710
25710
|
o.warned = !0;
|
|
25711
|
-
var
|
|
25712
|
-
|
|
25711
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
25712
|
+
c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, xD(c);
|
|
25713
25713
|
}
|
|
25714
25714
|
return s;
|
|
25715
25715
|
}
|
|
@@ -25951,8 +25951,8 @@ class JD {
|
|
|
25951
25951
|
constructor(t, e) {
|
|
25952
25952
|
var E, _, w, R, D, U, B, F, H, X, Le, yt;
|
|
25953
25953
|
ae(this, Gu), ae(this, Qa), ae(this, Wu), ae(this, id), ae(this, vd), ae(this, Ku), ae(this, so), ae(this, mn), ae(this, Td), ae(this, fn), ae(this, Yu), ae(this, no), ae(this, ao), ae(this, ke, void 0), ae(this, nn, void 0), ae(this, oe, void 0), ae(this, Ee, void 0), ae(this, fr, void 0), ae(this, Ge, void 0), ae(this, Xs, void 0), ae(this, Br, void 0), ae(this, ds, void 0), ae(this, an, void 0), ae(this, on, void 0), ae(this, As, void 0);
|
|
25954
|
-
var r, i, n, o,
|
|
25955
|
-
se(this, nn, t), se(this, fr, []), se(this, Ge, new Sd()), se(this, Xs, !0), se(this, ds, !1), se(this, oe, e != null ? e : {}), (E = (r = M(this, oe)).autoReconnect) != null || (r.autoReconnect = !0), (_ = (i = M(this, oe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (w = (n = M(this, oe)).pingTimeout) != null || (n.pingTimeout = 3e4), (R = (o = M(this, oe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (D = (
|
|
25954
|
+
var r, i, n, o, c, d, l, h, g, f, v;
|
|
25955
|
+
se(this, nn, t), se(this, fr, []), se(this, Ge, new Sd()), se(this, Xs, !0), se(this, ds, !1), se(this, oe, e != null ? e : {}), (E = (r = M(this, oe)).autoReconnect) != null || (r.autoReconnect = !0), (_ = (i = M(this, oe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (w = (n = M(this, oe)).pingTimeout) != null || (n.pingTimeout = 3e4), (R = (o = M(this, oe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (D = (c = M(this, oe)).debug) != null || (c.debug = !0), (U = (d = M(this, oe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (B = (l = M(this, oe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (h = M(this, oe)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (H = (g = M(this, oe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), (X = (f = M(this, oe)).clientInitiatedPings) != null || (f.clientInitiatedPings = !1), (Le = (v = M(this, oe)).clientInitiatedPingInterval) != null || (v.clientInitiatedPingInterval = 3e4), se(this, Br, {
|
|
25956
25956
|
code: void 0,
|
|
25957
25957
|
reason: void 0
|
|
25958
25958
|
}), se(this, Ee, (yt = M(this, oe).logger) != null ? yt : new WD(M(this, oe).debug ? "debug" : "info")), se(this, As, new GD());
|
|
@@ -26033,8 +26033,8 @@ class JD {
|
|
|
26033
26033
|
}, M(this, ke).onclose = (n) => {
|
|
26034
26034
|
try {
|
|
26035
26035
|
i && clearTimeout(i);
|
|
26036
|
-
const { code: o, reason:
|
|
26037
|
-
r(
|
|
26036
|
+
const { code: o, reason: c } = n;
|
|
26037
|
+
r(c), M(this, Ee).debug("Socket closed. Close event:", { event: n }), M(this, Ee).debug(`Connection closed code: ${o}`), M(this, Ee).debug(`Connection closed reason: ${c}`), M(this, ds) || re(this, vd, Ju).call(this, o, c);
|
|
26038
26038
|
} catch (o) {
|
|
26039
26039
|
re(this, Qa, rd).call(this, o);
|
|
26040
26040
|
}
|
|
@@ -26353,8 +26353,8 @@ const DS = (Ag = class {
|
|
|
26353
26353
|
}) {
|
|
26354
26354
|
const n = i != null ? i : s;
|
|
26355
26355
|
return new Promise(
|
|
26356
|
-
(o,
|
|
26357
|
-
const
|
|
26356
|
+
(o, c) => {
|
|
26357
|
+
const d = (E, _) => {
|
|
26358
26358
|
a(this, Te).removeListener(n, E), a(this, Te).removeListener(lg, _), a(this, Te).removeListener(
|
|
26359
26359
|
Sr.errorResponse,
|
|
26360
26360
|
_
|
|
@@ -26382,16 +26382,16 @@ const DS = (Ag = class {
|
|
|
26382
26382
|
w = new Error("failed to parse error message", { cause: D });
|
|
26383
26383
|
}
|
|
26384
26384
|
}
|
|
26385
|
-
|
|
26385
|
+
c(w), d(v, f);
|
|
26386
26386
|
}
|
|
26387
26387
|
}, v = ({
|
|
26388
26388
|
id: E,
|
|
26389
26389
|
payload: _
|
|
26390
26390
|
}) => {
|
|
26391
|
-
l === E && (o({ id: E, payload: _ }),
|
|
26391
|
+
l === E && (o({ id: E, payload: _ }), d(v, f));
|
|
26392
26392
|
};
|
|
26393
26393
|
a(this, Te).on(n, v), a(this, Te).on(lg, f), a(this, Te).on(Sr.errorResponse, f), a(this, Te).on(ls.errorResponse, f), setTimeout(() => {
|
|
26394
|
-
|
|
26394
|
+
d(v, f), c(new Error(`request timeout for callback eventId:${s}`));
|
|
26395
26395
|
}, t), a(this, Te).send(
|
|
26396
26396
|
s,
|
|
26397
26397
|
l,
|
|
@@ -26469,13 +26469,13 @@ const DS = (Ag = class {
|
|
|
26469
26469
|
useMediaV2: !0
|
|
26470
26470
|
}, n !== s && { oldPeerID: n }), {
|
|
26471
26471
|
ping: this.capabilities.includes("PING"),
|
|
26472
|
-
capabilities: this.capabilities.map((
|
|
26472
|
+
capabilities: this.capabilities.map((c) => pd[c]).join(" "),
|
|
26473
26473
|
joinWithDetails: !0,
|
|
26474
26474
|
useCfWorker: !0,
|
|
26475
26475
|
useStartSession: !0
|
|
26476
26476
|
});
|
|
26477
|
-
return Object.entries(o).forEach(([
|
|
26478
|
-
i.searchParams.append(
|
|
26477
|
+
return Object.entries(o).forEach(([c, d]) => {
|
|
26478
|
+
i.searchParams.append(c, d.toString());
|
|
26479
26479
|
}), i.href;
|
|
26480
26480
|
}, Ec = new WeakSet(), Xu = function() {
|
|
26481
26481
|
return `${this.peerId}-${(Math.random() + 1).toString(36).substring(7)}`;
|
|
@@ -26502,11 +26502,11 @@ class QD {
|
|
|
26502
26502
|
handleConnectedRoomsDumpRaw({ payload: t }) {
|
|
26503
26503
|
var n;
|
|
26504
26504
|
const e = jb.fromBinary(t), r = e.meetings.map((o) => {
|
|
26505
|
-
var
|
|
26505
|
+
var c;
|
|
26506
26506
|
return {
|
|
26507
26507
|
id: o.id,
|
|
26508
26508
|
title: o.title,
|
|
26509
|
-
participants: (
|
|
26509
|
+
participants: (c = o.participants) != null ? c : []
|
|
26510
26510
|
};
|
|
26511
26511
|
});
|
|
26512
26512
|
return {
|
|
@@ -26623,7 +26623,7 @@ class OS extends Ot {
|
|
|
26623
26623
|
}
|
|
26624
26624
|
/** @access private */
|
|
26625
26625
|
validateMoveAction(e, r) {
|
|
26626
|
-
var
|
|
26626
|
+
var d;
|
|
26627
26627
|
if (!(r != null && r.length))
|
|
26628
26628
|
throw new Error("You're trying to move participants with an empty list.");
|
|
26629
26629
|
const i = a(this, It).getValue("self").permissions.connectedMeetings;
|
|
@@ -26638,7 +26638,7 @@ class OS extends Ot {
|
|
|
26638
26638
|
throw new Error(
|
|
26639
26639
|
"You are not allowed to move other participants. Please enable canAlterConnectedMeetings permission in your preset."
|
|
26640
26640
|
);
|
|
26641
|
-
if (e === ((
|
|
26641
|
+
if (e === ((d = this.parentMeeting) == null ? void 0 : d.id)) {
|
|
26642
26642
|
if (!i.canSwitchToParentMeeting)
|
|
26643
26643
|
throw new Error(
|
|
26644
26644
|
"You are not allowed to move to the parent meeting. Please enable canSwitchToParentMeeting permission in your preset."
|
|
@@ -26756,19 +26756,19 @@ class OS extends Ot {
|
|
|
26756
26756
|
(o) => !i.includes(o.id)
|
|
26757
26757
|
)), this.meetings = this.meetings.map((o) => {
|
|
26758
26758
|
if (r === o.id) {
|
|
26759
|
-
const
|
|
26760
|
-
i.map((
|
|
26759
|
+
const c = o.participants.concat(
|
|
26760
|
+
i.map((d) => n.get(d))
|
|
26761
26761
|
);
|
|
26762
26762
|
return j(N({}, o), {
|
|
26763
|
-
participants:
|
|
26763
|
+
participants: c
|
|
26764
26764
|
});
|
|
26765
26765
|
}
|
|
26766
26766
|
if (e === o.id) {
|
|
26767
|
-
const
|
|
26768
|
-
(
|
|
26767
|
+
const c = o.participants.filter(
|
|
26768
|
+
(d) => !i.includes(d.id)
|
|
26769
26769
|
);
|
|
26770
26770
|
return j(N({}, o), {
|
|
26771
|
-
participants:
|
|
26771
|
+
participants: c
|
|
26772
26772
|
});
|
|
26773
26773
|
}
|
|
26774
26774
|
return o;
|
|
@@ -26845,7 +26845,7 @@ const NS = (Ig = class {
|
|
|
26845
26845
|
authToken: s,
|
|
26846
26846
|
meetingId: t
|
|
26847
26847
|
}) {
|
|
26848
|
-
var n, o,
|
|
26848
|
+
var n, o, c, d;
|
|
26849
26849
|
this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show switching breakout UI"), this.connectedMeetings.emit("changingMeeting", t);
|
|
26850
26850
|
const r = {
|
|
26851
26851
|
video: a(this, pe).getValue("self").videoEnabled,
|
|
@@ -26874,14 +26874,14 @@ const NS = (Ig = class {
|
|
|
26874
26874
|
}),
|
|
26875
26875
|
authToken: s
|
|
26876
26876
|
}));
|
|
26877
|
-
this.logger.info(`ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ${(
|
|
26877
|
+
this.logger.info(`ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ${(c = i == null ? void 0 : i.meta) == null ? void 0 : c.meetingId}`);
|
|
26878
26878
|
try {
|
|
26879
26879
|
const { hidden: l } = a(this, pe).getValue("self");
|
|
26880
26880
|
i.self.setName(a(this, pe).getValue("self").name), yield i.join(), l && i.self.hide();
|
|
26881
26881
|
} catch (l) {
|
|
26882
26882
|
this.logger.error("ConnectedMeetingsController.joinRoom", { error: l });
|
|
26883
26883
|
}
|
|
26884
|
-
return this.logger.info(`ConnectedMeetingsController::switchMeeting:: asking ui-kit to show in-meeting ui of newly joined meeting id: ${(
|
|
26884
|
+
return this.logger.info(`ConnectedMeetingsController::switchMeeting:: asking ui-kit to show in-meeting ui of newly joined meeting id: ${(d = i == null ? void 0 : i.meta) == null ? void 0 : d.meetingId}`), this.connectedMeetings.emit("meetingChanged", i), i;
|
|
26885
26885
|
});
|
|
26886
26886
|
}
|
|
26887
26887
|
handleConnectedRoomsDump(s) {
|
|
@@ -26973,11 +26973,11 @@ const Xa = class {
|
|
|
26973
26973
|
meetingId: i,
|
|
26974
26974
|
organizationId: n,
|
|
26975
26975
|
cachedUserDetails: o,
|
|
26976
|
-
logger:
|
|
26976
|
+
logger: c
|
|
26977
26977
|
} = s.getAllValues();
|
|
26978
26978
|
if (ED(s), Se.isSupported() === !1)
|
|
26979
|
-
throw new k("Browser not supported", "0010",
|
|
26980
|
-
const
|
|
26979
|
+
throw new k("Browser not supported", "0010", c, !0);
|
|
26980
|
+
const d = u0(
|
|
26981
26981
|
s,
|
|
26982
26982
|
{
|
|
26983
26983
|
authToken: r,
|
|
@@ -26985,24 +26985,24 @@ const Xa = class {
|
|
|
26985
26985
|
cachedUserDetails: o
|
|
26986
26986
|
}
|
|
26987
26987
|
);
|
|
26988
|
-
|
|
26988
|
+
d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(n), d.setHeader("tracing-id", t), s.setValue("apiClient", d);
|
|
26989
26989
|
const l = new J0(s);
|
|
26990
26990
|
s.setValue("connectionHandler", l);
|
|
26991
26991
|
let h = "", g = "", f = null;
|
|
26992
|
-
|
|
26992
|
+
c.info("CF SFU is being used.");
|
|
26993
26993
|
try {
|
|
26994
|
-
f = yield
|
|
26994
|
+
f = yield d.getUserDetails(), h = ((U = f.meeting) == null ? void 0 : U.title) || "", g = ((B = f.socket) == null ? void 0 : B.baseUri) || s.getValue("baseURI"), s.setValue("presetName", f.preset.name), s.setValue("socketBaseURI", g), c.info(`Socket Base URI ${g} is being used`);
|
|
26995
26995
|
} catch (H) {
|
|
26996
|
-
throw
|
|
26996
|
+
throw c.error("Failed to get user details", { error: H }), H instanceof vu ? H.status === 401 ? new k("Unauthorized. The auth token may be invalid or expired. (401)", "0004") : H.status === 403 ? new k("Access denied. Insufficient permissions to join the meeting. (403)", "0004") : H.status === 404 ? (c.error("[ERROR:0004] participant-details returned 404."), new k(
|
|
26997
26997
|
"The auth token is not associated with an active participant in this meeting. The meeting may have ended, or the participant may no longer exist. (404)",
|
|
26998
26998
|
"0004"
|
|
26999
|
-
) : H.status >= 500 ? new k(`The server encountered an error. Try again. (${H.status})`, "0001") : H.isHttpError ? new k(`Request rejected by the server. (${H.status})`, "0001") : H.isTimeout ? new k("Connection timed out. Check the network and try again.", "0001") : new k("Unable to connect to the server. Check the internet connection.", "0001") : new k((H == null ? void 0 : H.message) || "Failed to initialize.", "0001");
|
|
26999
|
+
)) : H.status >= 500 ? new k(`The server encountered an error. Try again. (${H.status})`, "0001") : H.isHttpError ? new k(`Request rejected by the server. (${H.status})`, "0001") : H.isTimeout ? new k("Connection timed out. Check the network and try again.", "0001") : new k("Unable to connect to the server. Check the internet connection.", "0001") : new k((H == null ? void 0 : H.message) || "Failed to initialize.", "0001");
|
|
27000
27000
|
}
|
|
27001
27001
|
const v = Xa.createSocketService(s), E = v.connect();
|
|
27002
27002
|
try {
|
|
27003
27003
|
yield E;
|
|
27004
27004
|
} catch (H) {
|
|
27005
|
-
|
|
27005
|
+
c.error(
|
|
27006
27006
|
"[Controller]: Failed to connect to socket server:",
|
|
27007
27007
|
{ error: H }
|
|
27008
27008
|
);
|
|
@@ -27027,7 +27027,7 @@ const Xa = class {
|
|
|
27027
27027
|
!1,
|
|
27028
27028
|
w
|
|
27029
27029
|
)) == null || F.catch((X) => {
|
|
27030
|
-
|
|
27030
|
+
c.error(
|
|
27031
27031
|
"[Controller]: Failed to queue partial media room promise:",
|
|
27032
27032
|
{ error: X }
|
|
27033
27033
|
);
|
|
@@ -27039,7 +27039,7 @@ const Xa = class {
|
|
|
27039
27039
|
static setupControllers(s, t, e, r, i, n) {
|
|
27040
27040
|
return u(this, null, function* () {
|
|
27041
27041
|
var Pe, L, A;
|
|
27042
|
-
const o = t.getValue("modules"), { participant:
|
|
27042
|
+
const o = t.getValue("modules"), { participant: c } = e, d = t.getValue("defaults"), l = t.getValue("logger"), { viewType: h, mediaConstraints: { audio: g } } = i;
|
|
27043
27043
|
t.setValue("viewType", h), t.setValue("defaults", N({
|
|
27044
27044
|
mediaConfiguration: {
|
|
27045
27045
|
audio: {
|
|
@@ -27047,7 +27047,7 @@ const Xa = class {
|
|
|
27047
27047
|
enableStereo: (L = g.enableStereo) != null ? L : !1
|
|
27048
27048
|
}
|
|
27049
27049
|
}
|
|
27050
|
-
},
|
|
27050
|
+
}, d)), t.setValue("maxPreferredStreams", Se.isMobile() ? i.maxVideoStreams.mobile : i.maxVideoStreams.desktop);
|
|
27051
27051
|
let f, v, E, _, w, R, D, U, B;
|
|
27052
27052
|
const F = new wD(t, s), H = new QD(
|
|
27053
27053
|
s
|
|
@@ -27056,7 +27056,7 @@ const Xa = class {
|
|
|
27056
27056
|
const X = new Dl(t, s), Le = new or(t, s), yt = new MD(s), Qt = new SS(t, s), Yr = new DD(t, s), I = new CD(s), y = yield zr.init(
|
|
27057
27057
|
t,
|
|
27058
27058
|
Qt,
|
|
27059
|
-
|
|
27059
|
+
c,
|
|
27060
27060
|
n,
|
|
27061
27061
|
i
|
|
27062
27062
|
);
|
|
@@ -27103,7 +27103,7 @@ const Xa = class {
|
|
|
27103
27103
|
"The plugin module cannot be initialized without the `participant` module",
|
|
27104
27104
|
"0102"
|
|
27105
27105
|
);
|
|
27106
|
-
const Ae =
|
|
27106
|
+
const Ae = d.plugins || [];
|
|
27107
27107
|
_ = yield wf.init(
|
|
27108
27108
|
t,
|
|
27109
27109
|
Ae,
|
|
@@ -27147,12 +27147,12 @@ const Xa = class {
|
|
|
27147
27147
|
});
|
|
27148
27148
|
}
|
|
27149
27149
|
static createSocketService(s) {
|
|
27150
|
-
var
|
|
27150
|
+
var d;
|
|
27151
27151
|
const {
|
|
27152
27152
|
peerId: t,
|
|
27153
27153
|
meetingId: e,
|
|
27154
27154
|
authToken: r
|
|
27155
|
-
} = s.getAllValues(), o = ((
|
|
27155
|
+
} = s.getAllValues(), o = ((d = s.getValue("socketBaseURI")) != null ? d : "").includes("realtime.cloudflare.com") ? [] : ["PING"];
|
|
27156
27156
|
return s.getValue("logger").info(`Socket service capabilities: ${JSON.stringify(o)}`), new Dc(s, {
|
|
27157
27157
|
peerId: t,
|
|
27158
27158
|
meetingId: e,
|
|
@@ -27306,13 +27306,13 @@ let Gr = (Mg = class {
|
|
|
27306
27306
|
*/
|
|
27307
27307
|
static initMedia() {
|
|
27308
27308
|
return u(this, arguments, function* (t = {}, e = !1, r = void 0) {
|
|
27309
|
-
var
|
|
27310
|
-
const i = (
|
|
27309
|
+
var d;
|
|
27310
|
+
const i = (d = r == null ? void 0 : r.peerId) != null ? d : ga(), n = Fr.createContext(i, {
|
|
27311
27311
|
peerId: i
|
|
27312
27312
|
}), o = n.getValue("logger");
|
|
27313
27313
|
o.init(n);
|
|
27314
|
-
const
|
|
27315
|
-
return yield
|
|
27314
|
+
const c = new $f(n, o);
|
|
27315
|
+
return yield c.init(t, e, n), n.setValue("defaults", { mediaHandler: c }), c;
|
|
27316
27316
|
});
|
|
27317
27317
|
}
|
|
27318
27318
|
static init(t) {
|
|
@@ -27323,14 +27323,14 @@ let Gr = (Mg = class {
|
|
|
27323
27323
|
if ((_ = o.baseURI) != null && _.includes("dyte.io"))
|
|
27324
27324
|
throw new k("Dyte Base URIs are no longer supported. Use RealtimeKit Base URIs.", "0001");
|
|
27325
27325
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
|
|
27326
|
-
const
|
|
27326
|
+
const c = Gr.setupContext(
|
|
27327
27327
|
e,
|
|
27328
27328
|
t,
|
|
27329
27329
|
n,
|
|
27330
27330
|
o
|
|
27331
|
-
),
|
|
27332
|
-
jS(l), ug.init(l),
|
|
27333
|
-
|
|
27331
|
+
), d = c.getValue("telemetry"), l = c.getValue("logger");
|
|
27332
|
+
jS(l), ug.init(l), d.init(
|
|
27333
|
+
c,
|
|
27334
27334
|
{
|
|
27335
27335
|
roomName: n,
|
|
27336
27336
|
userId: o.participantId,
|
|
@@ -27339,14 +27339,14 @@ let Gr = (Mg = class {
|
|
|
27339
27339
|
},
|
|
27340
27340
|
(R = (w = t.modules) == null ? void 0 : w.tracing) != null ? R : !0,
|
|
27341
27341
|
(U = (D = t == null ? void 0 : t.modules) == null ? void 0 : D.devTools) == null ? void 0 : U.logLevel
|
|
27342
|
-
), l.init(
|
|
27342
|
+
), l.init(c), l.info("Client::init::options", {
|
|
27343
27343
|
clientInitOptions: j(N({}, t), {
|
|
27344
27344
|
authToken: `${(B = t.authToken) == null ? void 0 : B.slice(0, 10)}...
|
|
27345
27345
|
${(F = t.authToken) == null ? void 0 : F.slice(-10)}`
|
|
27346
27346
|
})
|
|
27347
27347
|
});
|
|
27348
|
-
const h = yield Vl.init(
|
|
27349
|
-
return
|
|
27348
|
+
const h = yield Vl.init(c), g = new Gr(c, h);
|
|
27349
|
+
return c.setValue("meeting", g), g;
|
|
27350
27350
|
});
|
|
27351
27351
|
}
|
|
27352
27352
|
/**
|
|
@@ -27357,13 +27357,13 @@ let Gr = (Mg = class {
|
|
|
27357
27357
|
* @param {any} args
|
|
27358
27358
|
*/
|
|
27359
27359
|
static setupContext(t, e, r, i) {
|
|
27360
|
-
var
|
|
27361
|
-
const n = Fr.createContext(t, e), o = N(N({}, kC), e == null ? void 0 : e.modules),
|
|
27360
|
+
var d, l;
|
|
27361
|
+
const n = Fr.createContext(t, e), o = N(N({}, kC), e == null ? void 0 : e.modules), c = e.defaults || {
|
|
27362
27362
|
audio: !0,
|
|
27363
27363
|
video: !0
|
|
27364
27364
|
};
|
|
27365
|
-
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (
|
|
27366
|
-
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.2-staging.
|
|
27365
|
+
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", AC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
27366
|
+
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.2-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new cO()), n;
|
|
27367
27367
|
}
|
|
27368
27368
|
join() {
|
|
27369
27369
|
return u(this, null, function* () {
|