@cloudflare/realtimekit-react 1.1.3-staging.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +953 -953
- package/package.json +4 -3
package/dist/index.es.js
CHANGED
|
@@ -4516,20 +4516,20 @@ var a = (s, t, e) => (ru(s, t, "read from private field"), e ? e.call(s) : t.get
|
|
|
4516
4516
|
}, m = (s, t, e, r) => (ru(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e);
|
|
4517
4517
|
var V = (s, t, e) => (ru(s, t, "access private method"), e), Zh = (s, t, e) => QS(YS(s), e, t);
|
|
4518
4518
|
var l = (s, t, e) => new Promise((r, i) => {
|
|
4519
|
-
var n = (
|
|
4519
|
+
var n = (d) => {
|
|
4520
4520
|
try {
|
|
4521
|
-
|
|
4521
|
+
c(e.next(d));
|
|
4522
4522
|
} catch (u) {
|
|
4523
4523
|
i(u);
|
|
4524
4524
|
}
|
|
4525
|
-
}, o = (
|
|
4525
|
+
}, o = (d) => {
|
|
4526
4526
|
try {
|
|
4527
|
-
|
|
4527
|
+
c(e.throw(d));
|
|
4528
4528
|
} catch (u) {
|
|
4529
4529
|
i(u);
|
|
4530
4530
|
}
|
|
4531
|
-
},
|
|
4532
|
-
|
|
4531
|
+
}, c = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(n, o);
|
|
4532
|
+
c((e = e.apply(s, t)).next());
|
|
4533
4533
|
});
|
|
4534
4534
|
function ZS(s) {
|
|
4535
4535
|
const { length: t } = this, e = s >= 0 ? s : t + s;
|
|
@@ -4554,7 +4554,7 @@ const tv = (s) => {
|
|
|
4554
4554
|
}), window.addEventListener(
|
|
4555
4555
|
"unhandledrejection",
|
|
4556
4556
|
(t) => {
|
|
4557
|
-
var e, r, i, n, o,
|
|
4557
|
+
var e, r, i, n, o, c, d, u;
|
|
4558
4558
|
s.error(
|
|
4559
4559
|
"window::unhandledrejection",
|
|
4560
4560
|
{
|
|
@@ -4562,8 +4562,8 @@ const tv = (s) => {
|
|
|
4562
4562
|
networkCall: {
|
|
4563
4563
|
url: (r = (e = t == null ? void 0 : t.reason) == null ? void 0 : e.config) == null ? void 0 : r.url,
|
|
4564
4564
|
baseURL: (n = (i = t == null ? void 0 : t.reason) == null ? void 0 : i.config) == null ? void 0 : n.baseURL,
|
|
4565
|
-
method: (
|
|
4566
|
-
status: (
|
|
4565
|
+
method: (c = (o = t == null ? void 0 : t.reason) == null ? void 0 : o.config) == null ? void 0 : c.method,
|
|
4566
|
+
status: (d = t == null ? void 0 : t.reason) == null ? void 0 : d.status,
|
|
4567
4567
|
statusText: (u = t == null ? void 0 : t.reason) == null ? void 0 : u.statusText
|
|
4568
4568
|
}
|
|
4569
4569
|
},
|
|
@@ -4890,16 +4890,16 @@ ce.prototype.emit = function(t) {
|
|
|
4890
4890
|
var o;
|
|
4891
4891
|
if (e.length > 0 && (o = e[0]), o instanceof Error)
|
|
4892
4892
|
throw o;
|
|
4893
|
-
var
|
|
4894
|
-
throw
|
|
4893
|
+
var c = new Error("Unhandled error." + (o ? " (" + o.message + ")" : ""));
|
|
4894
|
+
throw c.context = o, c;
|
|
4895
4895
|
}
|
|
4896
|
-
var
|
|
4897
|
-
if (
|
|
4896
|
+
var d = n[t];
|
|
4897
|
+
if (d === void 0)
|
|
4898
4898
|
return false;
|
|
4899
|
-
if (typeof
|
|
4900
|
-
ep(
|
|
4899
|
+
if (typeof d == "function")
|
|
4900
|
+
ep(d, this, e);
|
|
4901
4901
|
else
|
|
4902
|
-
for (var u =
|
|
4902
|
+
for (var u = d.length, p = im(d, u), r = 0; r < u; ++r)
|
|
4903
4903
|
ep(p[r], this, e);
|
|
4904
4904
|
return true;
|
|
4905
4905
|
};
|
|
@@ -4913,8 +4913,8 @@ function em(s, t, e, r) {
|
|
|
4913
4913
|
o = n[t] = e, ++s._eventsCount;
|
|
4914
4914
|
else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), i = Zg(s), i > 0 && o.length > i && !o.warned) {
|
|
4915
4915
|
o.warned = true;
|
|
4916
|
-
var
|
|
4917
|
-
|
|
4916
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
4917
|
+
c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, lv(c);
|
|
4918
4918
|
}
|
|
4919
4919
|
return s;
|
|
4920
4920
|
}
|
|
@@ -4940,7 +4940,7 @@ ce.prototype.prependOnceListener = function(t, e) {
|
|
|
4940
4940
|
return Ll(e), this.prependListener(t, tm(this, t, e)), this;
|
|
4941
4941
|
};
|
|
4942
4942
|
ce.prototype.removeListener = function(t, e) {
|
|
4943
|
-
var r, i, n, o,
|
|
4943
|
+
var r, i, n, o, c;
|
|
4944
4944
|
if (Ll(e), i = this._events, i === void 0)
|
|
4945
4945
|
return this;
|
|
4946
4946
|
if (r = i[t], r === void 0)
|
|
@@ -4950,12 +4950,12 @@ ce.prototype.removeListener = function(t, e) {
|
|
|
4950
4950
|
else if (typeof r != "function") {
|
|
4951
4951
|
for (n = -1, o = r.length - 1; o >= 0; o--)
|
|
4952
4952
|
if (r[o] === e || r[o].listener === e) {
|
|
4953
|
-
|
|
4953
|
+
c = r[o].listener, n = o;
|
|
4954
4954
|
break;
|
|
4955
4955
|
}
|
|
4956
4956
|
if (n < 0)
|
|
4957
4957
|
return this;
|
|
4958
|
-
n === 0 ? r.shift() : hv(r, n), r.length === 1 && (i[t] = r[0]), i.removeListener !== void 0 && this.emit("removeListener", t,
|
|
4958
|
+
n === 0 ? r.shift() : hv(r, n), r.length === 1 && (i[t] = r[0]), i.removeListener !== void 0 && this.emit("removeListener", t, c || e);
|
|
4959
4959
|
}
|
|
4960
4960
|
return this;
|
|
4961
4961
|
};
|
|
@@ -5226,7 +5226,7 @@ function Ev({ framesEncoded: s }) {
|
|
|
5226
5226
|
return s === 0;
|
|
5227
5227
|
}
|
|
5228
5228
|
function pm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r, jitter: i, isScreenShare: n, framesEncoded: o }) {
|
|
5229
|
-
const
|
|
5229
|
+
const c = hr({
|
|
5230
5230
|
stat: um({
|
|
5231
5231
|
packetsLost: e,
|
|
5232
5232
|
packetsSent: r
|
|
@@ -5235,7 +5235,7 @@ function pm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
5235
5235
|
rangeMin: 0,
|
|
5236
5236
|
rangeMax: Vl,
|
|
5237
5237
|
rangeRankingDirection: "UP"
|
|
5238
|
-
}),
|
|
5238
|
+
}), d = hr({
|
|
5239
5239
|
stat: i,
|
|
5240
5240
|
weight: 1,
|
|
5241
5241
|
rangeMin: xl,
|
|
@@ -5255,8 +5255,8 @@ function pm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
5255
5255
|
isLowQualityVideo: u,
|
|
5256
5256
|
isVideoLagging: p,
|
|
5257
5257
|
isVideoStuck: f,
|
|
5258
|
-
jitterQuality:
|
|
5259
|
-
packetsLostQuality:
|
|
5258
|
+
jitterQuality: d,
|
|
5259
|
+
packetsLostQuality: c
|
|
5260
5260
|
});
|
|
5261
5261
|
}
|
|
5262
5262
|
function gm({ packetsLost: s, packetsReceived: t }) {
|
|
@@ -5269,7 +5269,7 @@ function mm({ concealmentEvents: s, packetsLost: t, packetsReceived: e, jitter:
|
|
|
5269
5269
|
rangeMin: 0,
|
|
5270
5270
|
rangeMax: 3,
|
|
5271
5271
|
rangeRankingDirection: "UP"
|
|
5272
|
-
}), o = 0.5,
|
|
5272
|
+
}), o = 0.5, c = hr({
|
|
5273
5273
|
stat: gm({
|
|
5274
5274
|
packetsLost: t,
|
|
5275
5275
|
packetsReceived: e
|
|
@@ -5285,7 +5285,7 @@ function mm({ concealmentEvents: s, packetsLost: t, packetsReceived: e, jitter:
|
|
|
5285
5285
|
rangeMax: Ul,
|
|
5286
5286
|
rangeRankingDirection: "UP"
|
|
5287
5287
|
});
|
|
5288
|
-
return n +
|
|
5288
|
+
return n + c + u;
|
|
5289
5289
|
}
|
|
5290
5290
|
function _v({ framesDecoded: s }) {
|
|
5291
5291
|
return s === 0;
|
|
@@ -5297,7 +5297,7 @@ function Cv({ frameWidth: s, isScreenShare: t }) {
|
|
|
5297
5297
|
return s < (t ? om : nm);
|
|
5298
5298
|
}
|
|
5299
5299
|
function fm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived: r, jitter: i, isScreenShare: n, framesDecoded: o }) {
|
|
5300
|
-
const
|
|
5300
|
+
const c = hr({
|
|
5301
5301
|
stat: gm({
|
|
5302
5302
|
packetsLost: e,
|
|
5303
5303
|
packetsReceived: r
|
|
@@ -5306,7 +5306,7 @@ function fm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
5306
5306
|
rangeMin: 0,
|
|
5307
5307
|
rangeMax: Vl,
|
|
5308
5308
|
rangeRankingDirection: "UP"
|
|
5309
|
-
}),
|
|
5309
|
+
}), d = hr({
|
|
5310
5310
|
stat: i,
|
|
5311
5311
|
weight: 1,
|
|
5312
5312
|
rangeMin: xl,
|
|
@@ -5326,8 +5326,8 @@ function fm({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
5326
5326
|
isLowQualityVideo: u,
|
|
5327
5327
|
isVideoLagging: p,
|
|
5328
5328
|
isVideoStuck: f,
|
|
5329
|
-
jitterQuality:
|
|
5330
|
-
packetsLostQuality:
|
|
5329
|
+
jitterQuality: d,
|
|
5330
|
+
packetsLostQuality: c
|
|
5331
5331
|
});
|
|
5332
5332
|
}
|
|
5333
5333
|
class pr {
|
|
@@ -5555,23 +5555,23 @@ class Mv {
|
|
|
5555
5555
|
}
|
|
5556
5556
|
getIPDetails(i) {
|
|
5557
5557
|
return l(this, arguments, function* ({ peerId: t, apiHostnames: e, logger: r }) {
|
|
5558
|
-
var n, o,
|
|
5558
|
+
var n, o, c;
|
|
5559
5559
|
if (!this.ipInformation) {
|
|
5560
5560
|
try {
|
|
5561
|
-
const
|
|
5561
|
+
const d = `https://${e.location}`, p = yield (yield fetch(d)).json();
|
|
5562
5562
|
if (((n = p.loc) == null ? void 0 : n.length) > 5)
|
|
5563
5563
|
return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip)), p;
|
|
5564
5564
|
throw Error("Insufficient data");
|
|
5565
|
-
} catch (
|
|
5566
|
-
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error:
|
|
5565
|
+
} catch (d) {
|
|
5566
|
+
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
5567
5567
|
}
|
|
5568
5568
|
try {
|
|
5569
|
-
const
|
|
5569
|
+
const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
|
|
5570
5570
|
method: "POST"
|
|
5571
5571
|
});
|
|
5572
|
-
this.ipInformation = yield
|
|
5573
|
-
} catch (
|
|
5574
|
-
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error:
|
|
5572
|
+
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip));
|
|
5573
|
+
} catch (d) {
|
|
5574
|
+
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
|
|
5575
5575
|
}
|
|
5576
5576
|
}
|
|
5577
5577
|
return this.ipInformation;
|
|
@@ -5662,13 +5662,13 @@ class ym extends ut {
|
|
|
5662
5662
|
this.pausedProducerMap.delete(e);
|
|
5663
5663
|
}
|
|
5664
5664
|
processInboundConsumerVideoStats(e, r, i) {
|
|
5665
|
-
var o,
|
|
5666
|
-
const n = ((
|
|
5665
|
+
var o, c;
|
|
5666
|
+
const n = ((c = (o = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : o.consumerSharedMediaStatesMap) == null ? void 0 : c.get(e)) || {};
|
|
5667
5667
|
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))));
|
|
5668
5668
|
}
|
|
5669
5669
|
processInboundConsumerAudioStats(e, r, i) {
|
|
5670
|
-
var o,
|
|
5671
|
-
const n = ((
|
|
5670
|
+
var o, c;
|
|
5671
|
+
const n = ((c = (o = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : o.consumerSharedMediaStatesMap) == null ? void 0 : c.get(e)) || {};
|
|
5672
5672
|
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))));
|
|
5673
5673
|
}
|
|
5674
5674
|
processOutboundProducerVideoStats(e, r, i) {
|
|
@@ -5683,12 +5683,12 @@ class ym extends ut {
|
|
|
5683
5683
|
}
|
|
5684
5684
|
processProducingTransportStats(e, r, i) {
|
|
5685
5685
|
var p;
|
|
5686
|
-
const n = ((p = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : p.currentUserMediaStates) || {}, { audio: o, video:
|
|
5686
|
+
const n = ((p = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : p.currentUserMediaStates) || {}, { audio: o, video: c, screen: d } = n, u = o || c || d;
|
|
5687
5687
|
r.totalPacketsSent === i.packetsSent ? (this.freezedProducingTransportIds.add(e), this.callStatsInstance && u && (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 && u && (this.callStatsInstance.logger.debug("callStats::measurements::producingTransportDefreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("producing_transport_status", "resume", e))));
|
|
5688
5688
|
}
|
|
5689
5689
|
processConsumingTransportStats(e, r, i) {
|
|
5690
|
-
var
|
|
5691
|
-
const o = !!Array.from(((
|
|
5690
|
+
var c, d;
|
|
5691
|
+
const o = !!Array.from(((d = (c = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : c.consumerSharedMediaStatesMap) == null ? void 0 : d.values()) || []).reduce((u, p) => u || p.audio || p.video || p.screen, false);
|
|
5692
5692
|
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))));
|
|
5693
5693
|
}
|
|
5694
5694
|
registerConsumer(e) {
|
|
@@ -5760,14 +5760,14 @@ class ym extends ut {
|
|
|
5760
5760
|
}
|
|
5761
5761
|
getWorkingSimulcastVideoStats(e) {
|
|
5762
5762
|
return e.find((i) => {
|
|
5763
|
-
const n = i.framesEncoded > 0, o = i.packetsSent > 0,
|
|
5764
|
-
return n && o && !!
|
|
5763
|
+
const n = i.framesEncoded > 0, o = i.packetsSent > 0, c = i.frameWidth && i.frameHeight;
|
|
5764
|
+
return n && o && !!c;
|
|
5765
5765
|
}) || e[e.length - 1];
|
|
5766
5766
|
}
|
|
5767
5767
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
5768
5768
|
var P, k, A, N, H, $, F, K, re, Je, Is, vr, ni;
|
|
5769
|
-
const
|
|
5770
|
-
for (const I of
|
|
5769
|
+
const c = e, d = new vm(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
5770
|
+
for (const I of c.values()) {
|
|
5771
5771
|
if (u) {
|
|
5772
5772
|
if (u.size === 0)
|
|
5773
5773
|
break;
|
|
@@ -5803,7 +5803,7 @@ class ym extends ut {
|
|
|
5803
5803
|
packetsReceived: U.packetsReceived,
|
|
5804
5804
|
packetsDiscardedOnSend: U.packetsDiscardedOnSend
|
|
5805
5805
|
};
|
|
5806
|
-
S.push(ie), (I.nominated === true || I.selected === true) && (
|
|
5806
|
+
S.push(ie), (I.nominated === true || I.selected === true) && (d.candidatePair = ie);
|
|
5807
5807
|
break;
|
|
5808
5808
|
}
|
|
5809
5809
|
case "transport": {
|
|
@@ -5822,7 +5822,7 @@ class ym extends ut {
|
|
|
5822
5822
|
dtlsState: y.dtlsState,
|
|
5823
5823
|
iceRole: y.iceRole
|
|
5824
5824
|
};
|
|
5825
|
-
if (
|
|
5825
|
+
if (d.transport = C, o) {
|
|
5826
5826
|
if (o.producing) {
|
|
5827
5827
|
const U = this.overallProducingTransportsStatsMap[o.id];
|
|
5828
5828
|
this.processProducingTransportStats(o.id, U, C);
|
|
@@ -5843,7 +5843,7 @@ class ym extends ut {
|
|
|
5843
5843
|
totalRoundTripTime: y.totalRoundTripTime,
|
|
5844
5844
|
packetsLost: y.packetsLost
|
|
5845
5845
|
};
|
|
5846
|
-
|
|
5846
|
+
d.remoteInboundRtp.set(y.localId, C);
|
|
5847
5847
|
break;
|
|
5848
5848
|
}
|
|
5849
5849
|
case "outbound-rtp": {
|
|
@@ -5862,13 +5862,13 @@ class ym extends ut {
|
|
|
5862
5862
|
const ie = this.overallProducersStatsMap[C];
|
|
5863
5863
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
5864
5864
|
if (!this.outboundProducerMap.has(I.id)) {
|
|
5865
|
-
|
|
5865
|
+
d.staleProducerStreamMap = true;
|
|
5866
5866
|
break;
|
|
5867
5867
|
}
|
|
5868
5868
|
const Me = this.callStatsInstance.producers.get(C);
|
|
5869
5869
|
if (((P = Me == null ? void 0 : Me.track) == null ? void 0 : P.readyState) === "ended")
|
|
5870
5870
|
break;
|
|
5871
|
-
|
|
5871
|
+
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
5872
5872
|
outboundVideoRtpId: [],
|
|
5873
5873
|
outboundAudioRtpId: []
|
|
5874
5874
|
});
|
|
@@ -5907,13 +5907,13 @@ class ym extends ut {
|
|
|
5907
5907
|
scalabilityMode: w.scalabilityMode,
|
|
5908
5908
|
powerEfficientEncoder: w.powerEfficientEncoder
|
|
5909
5909
|
}, L);
|
|
5910
|
-
|
|
5910
|
+
d.outboundVideoRtp.set(I.id, $e), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ie, $e);
|
|
5911
5911
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
5912
5912
|
const w = y, $e = D({
|
|
5913
5913
|
retransmittedBytesSent: w.retransmittedBytesSent,
|
|
5914
5914
|
retransmittedPacketsSent: w.retransmittedPacketsSent
|
|
5915
5915
|
}, L);
|
|
5916
|
-
|
|
5916
|
+
d.outboundAudioRtp.set(I.id, $e), d.producerStreamMap.get(C).outboundAudioRtpId.push(I.id), this.processOutboundProducerAudioStats(C, ie, $e);
|
|
5917
5917
|
}
|
|
5918
5918
|
} else
|
|
5919
5919
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -5937,10 +5937,10 @@ class ym extends ut {
|
|
|
5937
5937
|
const ie = this.overallConsumersStatsMap[C];
|
|
5938
5938
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
5939
5939
|
if (!this.inboundConsumerMap.has(I.id)) {
|
|
5940
|
-
|
|
5940
|
+
d.staleConsumerStreamMap = true;
|
|
5941
5941
|
break;
|
|
5942
5942
|
}
|
|
5943
|
-
|
|
5943
|
+
d.consumerStreamMap.has(C) || d.consumerStreamMap.set(C, {
|
|
5944
5944
|
inboundVideoRtpId: [],
|
|
5945
5945
|
inboundAudioRtpId: []
|
|
5946
5946
|
});
|
|
@@ -6005,7 +6005,7 @@ class ym extends ut {
|
|
|
6005
6005
|
jitter: w.jitter || 0,
|
|
6006
6006
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6007
6007
|
bitrate: ((w.bytesReceived || 0) - (((F = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : F.bytesReceived) || 0)) * 8 / 7
|
|
6008
|
-
}), this.videoConsumerToStatsMap.set(C, w),
|
|
6008
|
+
}), this.videoConsumerToStatsMap.set(C, w), d.inboundVideoRtp.set(I.id, w), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ie, w);
|
|
6009
6009
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
6010
6010
|
const L = y, w = D({
|
|
6011
6011
|
audioLevel: L.audioLevel,
|
|
@@ -6035,7 +6035,7 @@ class ym extends ut {
|
|
|
6035
6035
|
jitter: w.jitter || 0,
|
|
6036
6036
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6037
6037
|
bitrate: ((w.bytesReceived || 0) - (((ni = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ni.bytesReceived) || 0)) * 8 / 7
|
|
6038
|
-
}), this.audioConsumerToStatsMap.set(C, w),
|
|
6038
|
+
}), this.audioConsumerToStatsMap.set(C, w), d.inboundAudioRtp.set(I.id, w), d.consumerStreamMap.get(C).inboundAudioRtpId.push(I.id), this.processInboundConsumerAudioStats(C, ie, w);
|
|
6039
6039
|
}
|
|
6040
6040
|
} else
|
|
6041
6041
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -6043,12 +6043,12 @@ class ym extends ut {
|
|
|
6043
6043
|
}
|
|
6044
6044
|
}
|
|
6045
6045
|
}
|
|
6046
|
-
if (
|
|
6046
|
+
if (d.producerStreamMap.forEach((I, y) => {
|
|
6047
6047
|
var C, U, ie, Me, L, w, $e, yr, Tr, $s, eo, to, so, ro, io, ao, no, oo, co, lo, uo, ho, po;
|
|
6048
6048
|
if (I.outboundVideoRtpId.length > 0) {
|
|
6049
6049
|
const ue = [];
|
|
6050
6050
|
I.outboundVideoRtpId.forEach((tu) => {
|
|
6051
|
-
ue.push(
|
|
6051
|
+
ue.push(d.outboundVideoRtp.get(tu));
|
|
6052
6052
|
});
|
|
6053
6053
|
const se = this.getWorkingSimulcastVideoStats(ue);
|
|
6054
6054
|
se.score = pm({
|
|
@@ -6075,7 +6075,7 @@ class ym extends ut {
|
|
|
6075
6075
|
bandwidthLimitations: se.qualityLimitationReason === "bandwidth"
|
|
6076
6076
|
}), this.videoProducerToStatsMap.set(y, se);
|
|
6077
6077
|
} else if (I.outboundAudioRtpId.length > 0) {
|
|
6078
|
-
const ue =
|
|
6078
|
+
const ue = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
6079
6079
|
ue.score = hm({
|
|
6080
6080
|
packetsSent: (ue.packetsSent || 0) - (((so = this.audioProducerToStatsMap.get(y)) == null ? void 0 : so.packetsSent) || 0),
|
|
6081
6081
|
packetsLost: (((ro = ue.remoteData) == null ? void 0 : ro.packetsLost) || 0) - (((ao = (io = this.audioProducerToStatsMap.get(y)) == null ? void 0 : io.remoteData) == null ? void 0 : ao.packetsLost) || 0),
|
|
@@ -6094,18 +6094,18 @@ class ym extends ut {
|
|
|
6094
6094
|
}), S.forEach((I) => {
|
|
6095
6095
|
const y = p.find((U) => U.id === I.localCandidateId ? (I.localCandidateId = U.id, U) : null), C = f.find((U) => U.id === I.remoteCandidateId ? (I.remoteCandidateId = U.id, U) : null);
|
|
6096
6096
|
y && (I.localCandidateType = y.type, I.localCandidateAddress = Xr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = Xr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Xr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
6097
|
-
}),
|
|
6098
|
-
bytesReceived:
|
|
6099
|
-
bytesSent:
|
|
6100
|
-
totalRoundTripTime:
|
|
6101
|
-
availableOutgoingBitrate:
|
|
6102
|
-
availableIncomingBitrate:
|
|
6103
|
-
roundTripTime:
|
|
6104
|
-
}),
|
|
6097
|
+
}), 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 = {
|
|
6098
|
+
bytesReceived: d.candidatePair.bytesReceived,
|
|
6099
|
+
bytesSent: d.candidatePair.bytesSent,
|
|
6100
|
+
totalRoundTripTime: d.candidatePair.totalRoundTripTime,
|
|
6101
|
+
availableOutgoingBitrate: d.candidatePair.availableOutgoingBitrate,
|
|
6102
|
+
availableIncomingBitrate: d.candidatePair.availableIncomingBitrate,
|
|
6103
|
+
roundTripTime: d.candidatePair.currentRoundTripTime
|
|
6104
|
+
}), d.transport && (d.transport.candidatePairs = S), d.transport && !d.transport.roundTripTime) {
|
|
6105
6105
|
let I = 0, y = 0;
|
|
6106
|
-
|
|
6106
|
+
d.remoteInboundRtp.forEach((C, U) => {
|
|
6107
6107
|
C.roundTripTime && C.roundTripTime > I && (I = C.roundTripTime, y = C.totalRoundTripTime);
|
|
6108
|
-
}),
|
|
6108
|
+
}), d.transport.roundTripTime = I, d.transport.totalRoundTripTime = y;
|
|
6109
6109
|
}
|
|
6110
6110
|
if (_.size > 0)
|
|
6111
6111
|
try {
|
|
@@ -6117,7 +6117,7 @@ class ym extends ut {
|
|
|
6117
6117
|
this.observer.emit("producer_score", E);
|
|
6118
6118
|
} catch (I) {
|
|
6119
6119
|
}
|
|
6120
|
-
return
|
|
6120
|
+
return d;
|
|
6121
6121
|
}
|
|
6122
6122
|
getProducersReport(e) {
|
|
6123
6123
|
return l(this, null, function* () {
|
|
@@ -6138,15 +6138,15 @@ class ym extends ut {
|
|
|
6138
6138
|
}
|
|
6139
6139
|
getProcessedStats(e, r, i) {
|
|
6140
6140
|
return l(this, null, function* () {
|
|
6141
|
-
const n = yield this.getTransportReport(e), o = { producing: i, consuming: r, id: e.id },
|
|
6142
|
-
if (!
|
|
6141
|
+
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"], false, void 0, o);
|
|
6142
|
+
if (!d)
|
|
6143
6143
|
return;
|
|
6144
6144
|
const u = {
|
|
6145
|
-
stats:
|
|
6145
|
+
stats: d.transport,
|
|
6146
6146
|
transportId: e.id,
|
|
6147
6147
|
consuming: r,
|
|
6148
6148
|
producing: i
|
|
6149
|
-
}, p =
|
|
6149
|
+
}, p = d.staleProducerStreamMap ? void 0 : this.getProducerStatsFromReport(d), f = d.staleConsumerStreamMap ? void 0 : this.getConsumerStatsFromReport(d);
|
|
6150
6150
|
return {
|
|
6151
6151
|
transportReport: u,
|
|
6152
6152
|
producerReport: p,
|
|
@@ -6158,12 +6158,12 @@ class ym extends ut {
|
|
|
6158
6158
|
const r = [];
|
|
6159
6159
|
try {
|
|
6160
6160
|
e.producerStreamMap.forEach((i, n) => {
|
|
6161
|
-
var o,
|
|
6161
|
+
var o, c;
|
|
6162
6162
|
r.push({
|
|
6163
6163
|
producerId: n,
|
|
6164
|
-
videoStats: i.outboundVideoRtpId.map((
|
|
6165
|
-
audioStats: i.outboundAudioRtpId.map((
|
|
6166
|
-
appData: ((
|
|
6164
|
+
videoStats: i.outboundVideoRtpId.map((d) => e.outboundVideoRtp.get(d)),
|
|
6165
|
+
audioStats: i.outboundAudioRtpId.map((d) => e.outboundAudioRtp.get(d)),
|
|
6166
|
+
appData: ((c = (o = this.callStatsInstance.producers) == null ? void 0 : o.get(n)) == null ? void 0 : c.appData) || null
|
|
6167
6167
|
});
|
|
6168
6168
|
});
|
|
6169
6169
|
} catch (i) {
|
|
@@ -6177,12 +6177,12 @@ class ym extends ut {
|
|
|
6177
6177
|
const r = [];
|
|
6178
6178
|
try {
|
|
6179
6179
|
e.consumerStreamMap.forEach((i, n) => {
|
|
6180
|
-
const { peerId: o, producerId:
|
|
6180
|
+
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(n);
|
|
6181
6181
|
r.push({
|
|
6182
6182
|
consumerId: n,
|
|
6183
6183
|
peerId: o,
|
|
6184
|
-
producerId:
|
|
6185
|
-
appData:
|
|
6184
|
+
producerId: c,
|
|
6185
|
+
appData: d,
|
|
6186
6186
|
videoStats: i.inboundVideoRtpId.map((u) => e.inboundVideoRtp.get(u)),
|
|
6187
6187
|
audioStats: i.inboundAudioRtpId.map((u) => e.inboundAudioRtp.get(u))
|
|
6188
6188
|
});
|
|
@@ -6237,10 +6237,10 @@ class ym extends ut {
|
|
|
6237
6237
|
} catch (S) {
|
|
6238
6238
|
f(S);
|
|
6239
6239
|
}
|
|
6240
|
-
}), [
|
|
6240
|
+
}), [c, d, u] = yield Promise.all([i, n, o]);
|
|
6241
6241
|
return {
|
|
6242
|
-
host:
|
|
6243
|
-
relay:
|
|
6242
|
+
host: c == null ? void 0 : c.connectivity,
|
|
6243
|
+
relay: d == null ? void 0 : d.connectivity,
|
|
6244
6244
|
reflexive: u == null ? void 0 : u.connectivity
|
|
6245
6245
|
};
|
|
6246
6246
|
} catch (r) {
|
|
@@ -6257,12 +6257,12 @@ class ym extends ut {
|
|
|
6257
6257
|
try {
|
|
6258
6258
|
const i = yield new Promise((n, o) => {
|
|
6259
6259
|
try {
|
|
6260
|
-
const
|
|
6260
|
+
const c = {
|
|
6261
6261
|
iceServers: e || ip
|
|
6262
|
-
},
|
|
6263
|
-
|
|
6264
|
-
} catch (
|
|
6265
|
-
o(
|
|
6262
|
+
}, d = new bv(c);
|
|
6263
|
+
d.addListener("done", n), d.addListener("failed", o), d.start(1e4);
|
|
6264
|
+
} catch (c) {
|
|
6265
|
+
o(c);
|
|
6266
6266
|
}
|
|
6267
6267
|
});
|
|
6268
6268
|
return {
|
|
@@ -6309,12 +6309,12 @@ class ym extends ut {
|
|
|
6309
6309
|
}
|
|
6310
6310
|
getNetworkInfo(e, r = false) {
|
|
6311
6311
|
return l(this, null, function* () {
|
|
6312
|
-
var
|
|
6312
|
+
var c, d;
|
|
6313
6313
|
if (r) {
|
|
6314
6314
|
const u = yield this.getIPDetails();
|
|
6315
6315
|
return {
|
|
6316
6316
|
ipDetails: u,
|
|
6317
|
-
effectiveNetworkType: (
|
|
6317
|
+
effectiveNetworkType: (c = navigator.connection) == null ? void 0 : c.effectiveType,
|
|
6318
6318
|
location: u != null && u.loc ? ap(u == null ? void 0 : u.loc) : void 0
|
|
6319
6319
|
};
|
|
6320
6320
|
}
|
|
@@ -6325,7 +6325,7 @@ class ym extends ut {
|
|
|
6325
6325
|
]);
|
|
6326
6326
|
return {
|
|
6327
6327
|
ipDetails: o,
|
|
6328
|
-
effectiveNetworkType: (
|
|
6328
|
+
effectiveNetworkType: (d = navigator.connection) == null ? void 0 : d.effectiveType,
|
|
6329
6329
|
location: o != null && o.loc ? ap(o == null ? void 0 : o.loc) : void 0,
|
|
6330
6330
|
turnConnectivity: i ? i.host || i.relay || i.reflexive : false,
|
|
6331
6331
|
connectivity: i,
|
|
@@ -6362,15 +6362,15 @@ class Tm extends ym {
|
|
|
6362
6362
|
}
|
|
6363
6363
|
generateConsumerStreamMap(e, r = false) {
|
|
6364
6364
|
return l(this, null, function* () {
|
|
6365
|
-
const i = yield e.getStats(), n = this.parseRTCReport(i, ["inbound-rtp"], false, e.id), o = [...n.consumerStreamMap.values()][0],
|
|
6366
|
-
for (const
|
|
6367
|
-
switch (
|
|
6365
|
+
const i = yield e.getStats(), n = this.parseRTCReport(i, ["inbound-rtp"], false, e.id), o = [...n.consumerStreamMap.values()][0], c = r ? this.getConsumerStatsFromParsedConsumerStats(n, o, e.id) : void 0;
|
|
6366
|
+
for (const d of i.values())
|
|
6367
|
+
switch (d.type) {
|
|
6368
6368
|
case "inbound-rtp": {
|
|
6369
|
-
this.inboundConsumerMap.set(
|
|
6369
|
+
this.inboundConsumerMap.set(d.id, e.id);
|
|
6370
6370
|
break;
|
|
6371
6371
|
}
|
|
6372
6372
|
}
|
|
6373
|
-
return
|
|
6373
|
+
return c;
|
|
6374
6374
|
});
|
|
6375
6375
|
}
|
|
6376
6376
|
deregisterProducer(e) {
|
|
@@ -6399,8 +6399,8 @@ class Tm extends ym {
|
|
|
6399
6399
|
}
|
|
6400
6400
|
parseRTCReport(e, r = [], i = false, n = void 0, o = void 0) {
|
|
6401
6401
|
var P, k, A, N, H, $, F, K, re, Je, Is, vr, ni;
|
|
6402
|
-
const
|
|
6403
|
-
for (const I of
|
|
6402
|
+
const c = e, d = new vm(), u = r.length ? new Set(r) : void 0, p = [], f = [], S = [], E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
6403
|
+
for (const I of c.values()) {
|
|
6404
6404
|
if (u) {
|
|
6405
6405
|
if (u.size === 0)
|
|
6406
6406
|
break;
|
|
@@ -6436,7 +6436,7 @@ class Tm extends ym {
|
|
|
6436
6436
|
packetsReceived: U.packetsReceived,
|
|
6437
6437
|
packetsDiscardedOnSend: U.packetsDiscardedOnSend
|
|
6438
6438
|
};
|
|
6439
|
-
S.push(ie), (I.nominated === true || I.selected === true) && (
|
|
6439
|
+
S.push(ie), (I.nominated === true || I.selected === true) && (d.candidatePair = ie);
|
|
6440
6440
|
break;
|
|
6441
6441
|
}
|
|
6442
6442
|
case "transport": {
|
|
@@ -6455,7 +6455,7 @@ class Tm extends ym {
|
|
|
6455
6455
|
dtlsState: y.dtlsState,
|
|
6456
6456
|
iceRole: y.iceRole
|
|
6457
6457
|
};
|
|
6458
|
-
if (
|
|
6458
|
+
if (d.transport = C, o) {
|
|
6459
6459
|
if (o.producing) {
|
|
6460
6460
|
const U = this.overallProducingTransportsStatsMap[o.id];
|
|
6461
6461
|
this.processProducingTransportStats(o.id, U, C);
|
|
@@ -6476,7 +6476,7 @@ class Tm extends ym {
|
|
|
6476
6476
|
totalRoundTripTime: y.totalRoundTripTime,
|
|
6477
6477
|
packetsLost: y.packetsLost
|
|
6478
6478
|
};
|
|
6479
|
-
|
|
6479
|
+
d.remoteInboundRtp.set(y.localId, C);
|
|
6480
6480
|
break;
|
|
6481
6481
|
}
|
|
6482
6482
|
case "outbound-rtp": {
|
|
@@ -6495,13 +6495,13 @@ class Tm extends ym {
|
|
|
6495
6495
|
const ie = this.overallProducersStatsMap[C];
|
|
6496
6496
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
6497
6497
|
if (!this.outboundProducerMap.has(I.id)) {
|
|
6498
|
-
|
|
6498
|
+
d.staleProducerStreamMap = true;
|
|
6499
6499
|
break;
|
|
6500
6500
|
}
|
|
6501
6501
|
const Me = this.callStatsInstance.producers.get(C);
|
|
6502
6502
|
if (((P = Me == null ? void 0 : Me.track) == null ? void 0 : P.readyState) === "ended")
|
|
6503
6503
|
break;
|
|
6504
|
-
|
|
6504
|
+
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
6505
6505
|
outboundVideoRtpId: [],
|
|
6506
6506
|
outboundAudioRtpId: []
|
|
6507
6507
|
});
|
|
@@ -6540,13 +6540,13 @@ class Tm extends ym {
|
|
|
6540
6540
|
scalabilityMode: w.scalabilityMode,
|
|
6541
6541
|
powerEfficientEncoder: w.powerEfficientEncoder
|
|
6542
6542
|
}, L);
|
|
6543
|
-
|
|
6543
|
+
d.outboundVideoRtp.set(I.id, $e), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ie, $e);
|
|
6544
6544
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
6545
6545
|
const w = y, $e = D({
|
|
6546
6546
|
retransmittedBytesSent: w.retransmittedBytesSent,
|
|
6547
6547
|
retransmittedPacketsSent: w.retransmittedPacketsSent
|
|
6548
6548
|
}, L);
|
|
6549
|
-
|
|
6549
|
+
d.outboundAudioRtp.set(I.id, $e), d.producerStreamMap.get(C).outboundAudioRtpId.push(I.id), this.processOutboundProducerAudioStats(C, ie, $e);
|
|
6550
6550
|
}
|
|
6551
6551
|
} else
|
|
6552
6552
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -6570,10 +6570,10 @@ class Tm extends ym {
|
|
|
6570
6570
|
const ie = this.overallConsumersStatsMap[C];
|
|
6571
6571
|
if (["video", "audio"].includes(y.mediaType) || ["video", "audio"].includes(y.kind)) {
|
|
6572
6572
|
if (!this.inboundConsumerMap.has(I.id)) {
|
|
6573
|
-
|
|
6573
|
+
d.staleConsumerStreamMap = true;
|
|
6574
6574
|
break;
|
|
6575
6575
|
}
|
|
6576
|
-
|
|
6576
|
+
d.consumerStreamMap.has(C) || d.consumerStreamMap.set(C, {
|
|
6577
6577
|
inboundVideoRtpId: [],
|
|
6578
6578
|
inboundAudioRtpId: []
|
|
6579
6579
|
});
|
|
@@ -6638,7 +6638,7 @@ class Tm extends ym {
|
|
|
6638
6638
|
jitter: w.jitter || 0,
|
|
6639
6639
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6640
6640
|
bitrate: ((w.bytesReceived || 0) - (((F = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : F.bytesReceived) || 0)) * 8 / 7
|
|
6641
|
-
}), this.videoConsumerToStatsMap.set(C, w),
|
|
6641
|
+
}), this.videoConsumerToStatsMap.set(C, w), d.inboundVideoRtp.set(I.id, w), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ie, w);
|
|
6642
6642
|
} else if (y.mediaType === "audio" || y.kind === "audio") {
|
|
6643
6643
|
const L = y, w = D({
|
|
6644
6644
|
audioLevel: L.audioLevel,
|
|
@@ -6668,7 +6668,7 @@ class Tm extends ym {
|
|
|
6668
6668
|
jitter: w.jitter || 0,
|
|
6669
6669
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6670
6670
|
bitrate: ((w.bytesReceived || 0) - (((ni = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ni.bytesReceived) || 0)) * 8 / 7
|
|
6671
|
-
}), this.audioConsumerToStatsMap.set(C, w),
|
|
6671
|
+
}), this.audioConsumerToStatsMap.set(C, w), d.inboundAudioRtp.set(I.id, w), d.consumerStreamMap.get(C).inboundAudioRtpId.push(I.id), this.processInboundConsumerAudioStats(C, ie, w);
|
|
6672
6672
|
}
|
|
6673
6673
|
} else
|
|
6674
6674
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
|
|
@@ -6676,12 +6676,12 @@ class Tm extends ym {
|
|
|
6676
6676
|
}
|
|
6677
6677
|
}
|
|
6678
6678
|
}
|
|
6679
|
-
if (
|
|
6679
|
+
if (d.producerStreamMap.forEach((I, y) => {
|
|
6680
6680
|
var C, U, ie, Me, L, w, $e, yr, Tr, $s, eo, to, so, ro, io, ao, no, oo, co, lo, uo, ho, po;
|
|
6681
6681
|
if (I.outboundVideoRtpId.length > 0) {
|
|
6682
6682
|
const ue = [];
|
|
6683
6683
|
I.outboundVideoRtpId.forEach((tu) => {
|
|
6684
|
-
ue.push(
|
|
6684
|
+
ue.push(d.outboundVideoRtp.get(tu));
|
|
6685
6685
|
});
|
|
6686
6686
|
const se = this.getWorkingSimulcastVideoStats(ue);
|
|
6687
6687
|
se.score = pm({
|
|
@@ -6708,7 +6708,7 @@ class Tm extends ym {
|
|
|
6708
6708
|
bandwidthLimitations: se.qualityLimitationReason === "bandwidth"
|
|
6709
6709
|
}), this.videoProducerToStatsMap.set(y, se);
|
|
6710
6710
|
} else if (I.outboundAudioRtpId.length > 0) {
|
|
6711
|
-
const ue =
|
|
6711
|
+
const ue = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
6712
6712
|
ue.score = hm({
|
|
6713
6713
|
packetsSent: (ue.packetsSent || 0) - (((so = this.audioProducerToStatsMap.get(y)) == null ? void 0 : so.packetsSent) || 0),
|
|
6714
6714
|
packetsLost: (((ro = ue.remoteData) == null ? void 0 : ro.packetsLost) || 0) - (((ao = (io = this.audioProducerToStatsMap.get(y)) == null ? void 0 : io.remoteData) == null ? void 0 : ao.packetsLost) || 0),
|
|
@@ -6727,18 +6727,18 @@ class Tm extends ym {
|
|
|
6727
6727
|
}), S.forEach((I) => {
|
|
6728
6728
|
const y = p.find((U) => U.id === I.localCandidateId ? (I.localCandidateId = U.id, U) : null), C = f.find((U) => U.id === I.remoteCandidateId ? (I.remoteCandidateId = U.id, U) : null);
|
|
6729
6729
|
y && (I.localCandidateType = y.type, I.localCandidateAddress = Xr(y.address), I.localCandidatePort = y.port, I.localCandidateProtocol = y.protocol, I.localCandidateUrl = y.url, I.localCandidateNetworkType = y.networkType, I.localCandidateRelatedAddress = Xr(y.relatedAddress), I.localCandidateRelatedPort = y.relatedPort), C && (I.remoteCandidateType = C.type, I.remoteCandidateAddress = Xr(C.address), I.remoteCandidatePort = C.port, I.remoteCandidateProtocol = C.protocol, I.remoteCandidateUrl = C.url);
|
|
6730
|
-
}),
|
|
6731
|
-
bytesReceived:
|
|
6732
|
-
bytesSent:
|
|
6733
|
-
totalRoundTripTime:
|
|
6734
|
-
availableOutgoingBitrate:
|
|
6735
|
-
availableIncomingBitrate:
|
|
6736
|
-
roundTripTime:
|
|
6737
|
-
}),
|
|
6730
|
+
}), 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 = {
|
|
6731
|
+
bytesReceived: d.candidatePair.bytesReceived,
|
|
6732
|
+
bytesSent: d.candidatePair.bytesSent,
|
|
6733
|
+
totalRoundTripTime: d.candidatePair.totalRoundTripTime,
|
|
6734
|
+
availableOutgoingBitrate: d.candidatePair.availableOutgoingBitrate,
|
|
6735
|
+
availableIncomingBitrate: d.candidatePair.availableIncomingBitrate,
|
|
6736
|
+
roundTripTime: d.candidatePair.currentRoundTripTime
|
|
6737
|
+
}), d.transport && (d.transport.candidatePairs = S), d.transport && !d.transport.roundTripTime) {
|
|
6738
6738
|
let I = 0, y = 0;
|
|
6739
|
-
|
|
6739
|
+
d.remoteInboundRtp.forEach((C, U) => {
|
|
6740
6740
|
C.roundTripTime && C.roundTripTime > I && (I = C.roundTripTime, y = C.totalRoundTripTime);
|
|
6741
|
-
}),
|
|
6741
|
+
}), d.transport.roundTripTime = I, d.transport.totalRoundTripTime = y;
|
|
6742
6742
|
}
|
|
6743
6743
|
if (_.size > 0)
|
|
6744
6744
|
try {
|
|
@@ -6750,19 +6750,19 @@ class Tm extends ym {
|
|
|
6750
6750
|
this.observer.emit("producer_score", E);
|
|
6751
6751
|
} catch (I) {
|
|
6752
6752
|
}
|
|
6753
|
-
return
|
|
6753
|
+
return d;
|
|
6754
6754
|
}
|
|
6755
6755
|
getProducerStatsFromReport(e) {
|
|
6756
6756
|
const r = [];
|
|
6757
6757
|
try {
|
|
6758
6758
|
e.producerStreamMap.forEach((i, n) => {
|
|
6759
|
-
const o = this.producerMap.get(n),
|
|
6759
|
+
const o = this.producerMap.get(n), c = o.track.getSettings(), d = i.outboundVideoRtpId.map((p) => {
|
|
6760
6760
|
const f = e.outboundVideoRtp.get(p);
|
|
6761
|
-
return f.frameHeight || (f.frameHeight =
|
|
6761
|
+
return f.frameHeight || (f.frameHeight = c.height, f.frameWidth = c.width, f.framesPerSecond = c.frameRate), f;
|
|
6762
6762
|
}), u = {
|
|
6763
6763
|
producerId: n,
|
|
6764
6764
|
appData: o.appData,
|
|
6765
|
-
videoStats:
|
|
6765
|
+
videoStats: d,
|
|
6766
6766
|
audioStats: i.outboundAudioRtpId.map((p) => e.outboundAudioRtp.get(p))
|
|
6767
6767
|
};
|
|
6768
6768
|
r.push(u);
|
|
@@ -6775,15 +6775,15 @@ class Tm extends ym {
|
|
|
6775
6775
|
getConsumerStatsFromParsedConsumerStats(e, r, i) {
|
|
6776
6776
|
let n;
|
|
6777
6777
|
try {
|
|
6778
|
-
const { peerId: o, producerId:
|
|
6778
|
+
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(i), u = r == null ? void 0 : r.inboundVideoRtpId.map((p) => {
|
|
6779
6779
|
const S = this.consumerMap.get(i).track.getSettings(), E = e.inboundVideoRtp.get(p);
|
|
6780
6780
|
return E.frameHeight || (E.frameHeight = S.height, E.frameWidth = S.width, E.framesPerSecond = S.frameRate), E;
|
|
6781
6781
|
});
|
|
6782
6782
|
n = {
|
|
6783
6783
|
consumerId: i,
|
|
6784
6784
|
peerId: o,
|
|
6785
|
-
producerId:
|
|
6786
|
-
appData:
|
|
6785
|
+
producerId: c,
|
|
6786
|
+
appData: d,
|
|
6787
6787
|
videoStats: u,
|
|
6788
6788
|
audioStats: r == null ? void 0 : r.inboundAudioRtpId.map((p) => e.inboundAudioRtp.get(p))
|
|
6789
6789
|
};
|
|
@@ -6830,12 +6830,12 @@ const X = (s, t) => (e, r, i) => {
|
|
|
6830
6830
|
const n = i.value;
|
|
6831
6831
|
return i.value = function(...o) {
|
|
6832
6832
|
try {
|
|
6833
|
-
const
|
|
6834
|
-
return
|
|
6835
|
-
kd(this, s, t,
|
|
6836
|
-
}) :
|
|
6837
|
-
} catch (
|
|
6838
|
-
kd(this, s, t,
|
|
6833
|
+
const c = n.apply(this, o);
|
|
6834
|
+
return c && c instanceof Promise ? c.catch((d) => {
|
|
6835
|
+
kd(this, s, t, d);
|
|
6836
|
+
}) : c;
|
|
6837
|
+
} catch (c) {
|
|
6838
|
+
kd(this, s, t, c);
|
|
6839
6839
|
}
|
|
6840
6840
|
return null;
|
|
6841
6841
|
}, i;
|
|
@@ -6852,13 +6852,13 @@ var Y = globalThis && globalThis.__decorate || function(s, t, e, r) {
|
|
|
6852
6852
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
6853
6853
|
n = Reflect.decorate(s, t, e, r);
|
|
6854
6854
|
else
|
|
6855
|
-
for (var
|
|
6856
|
-
(o = s[
|
|
6855
|
+
for (var c = s.length - 1; c >= 0; c--)
|
|
6856
|
+
(o = s[c]) && (n = (i < 3 ? o(n) : i > 3 ? o(t, e, n) : o(t, e)) || n);
|
|
6857
6857
|
return i > 3 && n && Object.defineProperty(t, e, n), n;
|
|
6858
6858
|
};
|
|
6859
6859
|
const Q = console;
|
|
6860
6860
|
let J = class extends ut {
|
|
6861
|
-
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = Io.PROD, n, o,
|
|
6861
|
+
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = Io.PROD, n, o, c, d) {
|
|
6862
6862
|
super();
|
|
6863
6863
|
h(this, "observer");
|
|
6864
6864
|
h(this, "eventHandler");
|
|
@@ -6876,7 +6876,7 @@ let J = class extends ut {
|
|
|
6876
6876
|
h(this, "peerId");
|
|
6877
6877
|
h(this, "consumerSharedMediaStatesMap", /* @__PURE__ */ new Map());
|
|
6878
6878
|
h(this, "currentUserMediaStates", {});
|
|
6879
|
-
switch (this.env = i, this.apiHostnames =
|
|
6879
|
+
switch (this.env = i, this.apiHostnames = d, this.logger = o, this.peerId = c, this.eventHandler = new vv({ logger: o, peerId: c, apiHostnames: d }), this.logger.debug("callStats::engineName: ", { engineName: r }), r) {
|
|
6880
6880
|
case "Blink":
|
|
6881
6881
|
this.measurements = new Dv();
|
|
6882
6882
|
break;
|
|
@@ -7078,13 +7078,13 @@ let J = class extends ut {
|
|
|
7078
7078
|
event: O.NET_QUALITY_TEST_BEGIN,
|
|
7079
7079
|
timestamp: r
|
|
7080
7080
|
}), new Promise((n, o) => l(this, null, function* () {
|
|
7081
|
-
const
|
|
7081
|
+
const c = [];
|
|
7082
7082
|
try {
|
|
7083
|
-
for (const
|
|
7083
|
+
for (const d of e)
|
|
7084
7084
|
try {
|
|
7085
|
-
if (
|
|
7086
|
-
const u = yield this.measurements.getNetworkQuality(
|
|
7087
|
-
|
|
7085
|
+
if (d.iceServers && d.iceServers.length > 0) {
|
|
7086
|
+
const u = yield this.measurements.getNetworkQuality(d.iceServers);
|
|
7087
|
+
c.push(B(D({}, d), {
|
|
7088
7088
|
networkResults: u
|
|
7089
7089
|
}));
|
|
7090
7090
|
}
|
|
@@ -7092,10 +7092,10 @@ let J = class extends ut {
|
|
|
7092
7092
|
console.warn("Error handling ", u);
|
|
7093
7093
|
}
|
|
7094
7094
|
n({
|
|
7095
|
-
regionData:
|
|
7095
|
+
regionData: c
|
|
7096
7096
|
});
|
|
7097
|
-
} catch (
|
|
7098
|
-
console.warn("Error in callstats, ",
|
|
7097
|
+
} catch (d) {
|
|
7098
|
+
console.warn("Error in callstats, ", d), o(d);
|
|
7099
7099
|
}
|
|
7100
7100
|
})).then((n) => {
|
|
7101
7101
|
this.eventHandler.callEvent({
|
|
@@ -7151,13 +7151,13 @@ let J = class extends ut {
|
|
|
7151
7151
|
let i, n;
|
|
7152
7152
|
if (this.producingTransport && (i = yield this.measurements.getProcessedStats(this.producingTransport, false, true), !i || !(i != null && i.producerReport))) {
|
|
7153
7153
|
this.logger.debug("callStats::sendPingStatsEvent::staleProducingTransport", { disclaimer: "Stale producer? Regenerating Stream Maps!" });
|
|
7154
|
-
const
|
|
7155
|
-
i &&
|
|
7154
|
+
const c = yield this.measurements.getProducersReport([...this.producers.values()]);
|
|
7155
|
+
i && c ? i.producerReport = c : (i = yield this.measurements.getProcessedStats(this.producingTransport, false, true), (!i || !(i != null && i.producerReport)) && this.logger.debug("callStats::sendPingStatsEvent::noProducingTransportReport", { disclaimer: "Stream maps invalid despite regenerating!" }));
|
|
7156
7156
|
}
|
|
7157
7157
|
if (this.consumingTransport && (n = yield this.measurements.getProcessedStats(this.consumingTransport, true, false), !n || !n.consumerReport)) {
|
|
7158
7158
|
this.logger.debug("callStats::sendPingStatsEvent::staleConsumingTransport", { disclaimer: "Stale consumer? Regenerating Stream Maps!" });
|
|
7159
|
-
const
|
|
7160
|
-
n &&
|
|
7159
|
+
const c = yield this.measurements.getConsumersReport([...this.consumers.values()]);
|
|
7160
|
+
n && c ? n.consumerReport = c : (n = yield this.measurements.getProcessedStats(this.consumingTransport, true, false), (!n || !n.consumerReport) && this.logger.debug("callStats::sendPingStatsEvent::noConsumingTransportReport", { disclaimer: "Stream maps invalid despite regenerating!" }));
|
|
7161
7161
|
}
|
|
7162
7162
|
const o = {
|
|
7163
7163
|
producingTransportStats: i ? i == null ? void 0 : i.transportReport : void 0,
|
|
@@ -7458,10 +7458,10 @@ class Em extends ut {
|
|
|
7458
7458
|
h(this, "logger");
|
|
7459
7459
|
}
|
|
7460
7460
|
initialize(f) {
|
|
7461
|
-
return l(this, arguments, function* ({ peerId: e, engineName: r, env: i = Io.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags:
|
|
7461
|
+
return l(this, arguments, function* ({ peerId: e, engineName: r, env: i = Io.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags: c, logger: d = console, apiHostnames: u, skipConnectivityChecks: p = false }) {
|
|
7462
7462
|
var S, E, _;
|
|
7463
7463
|
try {
|
|
7464
|
-
this.peerId = e, this.logger =
|
|
7464
|
+
this.peerId = e, this.logger = d, this.ipInformation = yield Sh.getIPDetails({ peerId: e, apiHostnames: u, logger: d }), this.backend = new Lv(o, r, i, c, d, e, u), this.iceServers = n, (S = this.backend) == null || S.registerIceServers(this.iceServers), this.initialized = true, (_ = (E = this.backend) == null ? void 0 : E.eventHandler) == null || _.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(p);
|
|
7465
7465
|
} catch (P) {
|
|
7466
7466
|
this.logger.error("callStats::CallStatsIntegration: ", { error: P }), this.stallCallStats();
|
|
7467
7467
|
}
|
|
@@ -7719,7 +7719,7 @@ class Em extends ut {
|
|
|
7719
7719
|
ivsPlayerEvent(e, r) {
|
|
7720
7720
|
const i = new Date();
|
|
7721
7721
|
this.onSafeInitialization(() => {
|
|
7722
|
-
var n, o,
|
|
7722
|
+
var n, o, c, d, u, p, f, S, E, _, P;
|
|
7723
7723
|
switch (e) {
|
|
7724
7724
|
case "PlayerRebuffering":
|
|
7725
7725
|
(n = this.backend) == null || n.sendIVSPlayerRebufferEvent(i);
|
|
@@ -7728,10 +7728,10 @@ class Em extends ut {
|
|
|
7728
7728
|
(o = this.backend) == null || o.sendIVSPlayerAudioBlockEvent(i);
|
|
7729
7729
|
break;
|
|
7730
7730
|
case "PlayerPlaybackBlocked":
|
|
7731
|
-
(
|
|
7731
|
+
(c = this.backend) == null || c.sendIVSPlayerPlaybackBlockedEvent(i);
|
|
7732
7732
|
break;
|
|
7733
7733
|
case "PlayerNetworkUnavailable":
|
|
7734
|
-
(
|
|
7734
|
+
(d = this.backend) == null || d.sendIVSPlayerNetworkUnavailableEvent(i);
|
|
7735
7735
|
break;
|
|
7736
7736
|
case "PlayerInitialized":
|
|
7737
7737
|
(u = this.backend) == null || u.sendIVSPlayerInitializedEvent(i);
|
|
@@ -8045,8 +8045,8 @@ function qc(s, t, e, r) {
|
|
|
8045
8045
|
var i = !e;
|
|
8046
8046
|
e || (e = {});
|
|
8047
8047
|
for (var n = -1, o = t.length; ++n < o; ) {
|
|
8048
|
-
var
|
|
8049
|
-
|
|
8048
|
+
var c = t[n], d = r ? r(e[c], s[c], c, e, s) : void 0;
|
|
8049
|
+
d === void 0 && (d = s[c]), i ? yh(e, c, d) : Cm(e, c, d);
|
|
8050
8050
|
}
|
|
8051
8051
|
return e;
|
|
8052
8052
|
}
|
|
@@ -8107,10 +8107,10 @@ var hp = Gn && Gn.isTypedArray, NT = hp ? Th(hp) : MT;
|
|
|
8107
8107
|
const Hl = NT;
|
|
8108
8108
|
var LT = Object.prototype, VT = LT.hasOwnProperty;
|
|
8109
8109
|
function Am(s, t) {
|
|
8110
|
-
var e = ti(s), r = !e && Ad(s), i = !e && !r && jn(s), n = !e && !r && !i && Hl(s), o = e || r || i || n,
|
|
8110
|
+
var e = ti(s), r = !e && Ad(s), i = !e && !r && jn(s), n = !e && !r && !i && Hl(s), o = e || r || i || n, c = o ? Ky(s.length, String) : [], d = c.length;
|
|
8111
8111
|
for (var u in s)
|
|
8112
|
-
(t || VT.call(s, u)) && !(o && (u == "length" || i && (u == "offset" || u == "parent") || n && (u == "buffer" || u == "byteLength" || u == "byteOffset") || bm(u,
|
|
8113
|
-
return
|
|
8112
|
+
(t || VT.call(s, u)) && !(o && (u == "length" || i && (u == "offset" || u == "parent") || n && (u == "buffer" || u == "byteLength" || u == "byteOffset") || bm(u, d))) && c.push(u);
|
|
8113
|
+
return c;
|
|
8114
8114
|
}
|
|
8115
8115
|
var xT = Object.prototype;
|
|
8116
8116
|
function Bl(s) {
|
|
@@ -8344,26 +8344,26 @@ var ZE = 1, e_ = 2, t_ = 4, Bm = "[object Arguments]", s_ = "[object Array]", r_
|
|
|
8344
8344
|
fe[Bm] = fe[s_] = fe[g_] = fe[m_] = fe[r_] = fe[i_] = fe[f_] = fe[S_] = fe[v_] = fe[y_] = fe[T_] = fe[o_] = fe[c_] = fe[jm] = fe[d_] = fe[l_] = fe[u_] = fe[h_] = fe[E_] = fe[__] = fe[P_] = fe[C_] = true;
|
|
8345
8345
|
fe[a_] = fe[qm] = fe[p_] = false;
|
|
8346
8346
|
function ud(s, t, e, r, i, n) {
|
|
8347
|
-
var o,
|
|
8347
|
+
var o, c = t & ZE, d = t & e_, u = t & t_;
|
|
8348
8348
|
if (e && (o = i ? e(s, r, i, n) : e(s)), o !== void 0)
|
|
8349
8349
|
return o;
|
|
8350
8350
|
if (!Cs(s))
|
|
8351
8351
|
return s;
|
|
8352
8352
|
var p = ti(s);
|
|
8353
8353
|
if (p) {
|
|
8354
|
-
if (o = SE(s), !
|
|
8354
|
+
if (o = SE(s), !c)
|
|
8355
8355
|
return Lm(s, o);
|
|
8356
8356
|
} else {
|
|
8357
8357
|
var f = Wn(s), S = f == qm || f == n_;
|
|
8358
8358
|
if (jn(s))
|
|
8359
|
-
return Nm(s,
|
|
8359
|
+
return Nm(s, c);
|
|
8360
8360
|
if (f == jm || f == Bm || S && !i) {
|
|
8361
|
-
if (o =
|
|
8362
|
-
return
|
|
8361
|
+
if (o = d || S ? {} : Hm(s), !c)
|
|
8362
|
+
return d ? rE(s, JT(o, s)) : ZT(s, BT(o, s));
|
|
8363
8363
|
} else {
|
|
8364
8364
|
if (!fe[f])
|
|
8365
8365
|
return i ? s : {};
|
|
8366
|
-
o = BE(s, f,
|
|
8366
|
+
o = BE(s, f, c);
|
|
8367
8367
|
}
|
|
8368
8368
|
}
|
|
8369
8369
|
n || (n = new xs());
|
|
@@ -8375,7 +8375,7 @@ function ud(s, t, e, r, i, n) {
|
|
|
8375
8375
|
}) : KE(s) && s.forEach(function(k, A) {
|
|
8376
8376
|
o.set(A, ud(k, t, e, A, s, n));
|
|
8377
8377
|
});
|
|
8378
|
-
var _ = u ?
|
|
8378
|
+
var _ = u ? d ? iE : yu : d ? Gc : Eh, P = p ? void 0 : _(s);
|
|
8379
8379
|
return jy(P || s, function(k, A) {
|
|
8380
8380
|
P && (A = k, k = s[A]), Cm(o, A, ud(k, t, e, A, s, n));
|
|
8381
8381
|
}), o;
|
|
@@ -8528,7 +8528,7 @@ var Wm = class {
|
|
|
8528
8528
|
h(this, "environmentKey", null);
|
|
8529
8529
|
this.environmentKey = s;
|
|
8530
8530
|
}
|
|
8531
|
-
identifyAndFetchFlagsWithRetry(
|
|
8531
|
+
identifyAndFetchFlagsWithRetry(c) {
|
|
8532
8532
|
return l(this, arguments, function* ({
|
|
8533
8533
|
primaryEndpoint: s,
|
|
8534
8534
|
secondaryEndpoint: t,
|
|
@@ -8538,7 +8538,7 @@ var Wm = class {
|
|
|
8538
8538
|
traitsObj: n,
|
|
8539
8539
|
logger: o
|
|
8540
8540
|
}) {
|
|
8541
|
-
const
|
|
8541
|
+
const d = JSON.parse(JSON.stringify(n)), u = Object.entries(d).map((f) => ({
|
|
8542
8542
|
trait_key: f[0],
|
|
8543
8543
|
trait_value: f[1]
|
|
8544
8544
|
})), p = [s, t, t];
|
|
@@ -8603,38 +8603,38 @@ var $_ = (s, t, e) => {
|
|
|
8603
8603
|
if (t == 0)
|
|
8604
8604
|
r = i = n = e;
|
|
8605
8605
|
else {
|
|
8606
|
-
const o = (u, p, f) => (f < 0 && (f += 1), f > 1 && (f -= 1), f < 0.16666666666666666 ? u + (p - u) * 6 * f : f < 0.5 ? p : f < 0.6666666666666666 ? u + (p - u) * (0.6666666666666666 - f) * 6 : u),
|
|
8607
|
-
r = o(
|
|
8606
|
+
const o = (u, p, f) => (f < 0 && (f += 1), f > 1 && (f -= 1), f < 0.16666666666666666 ? u + (p - u) * 6 * f : f < 0.5 ? p : f < 0.6666666666666666 ? u + (p - u) * (0.6666666666666666 - f) * 6 : u), c = e < 0.5 ? e * (1 + t) : e + t - e * t, d = 2 * e - c;
|
|
8607
|
+
r = o(d, c, s + 1 / 3), i = o(d, c, s), n = o(d, c, s - 1 / 3);
|
|
8608
8608
|
}
|
|
8609
8609
|
return [Math.round(r * 255), Math.round(i * 255), Math.round(n * 255)];
|
|
8610
8610
|
}, F_ = (s, t, e) => {
|
|
8611
8611
|
s /= 255, t /= 255, e /= 255;
|
|
8612
8612
|
const r = Math.max(s, t, e), i = Math.min(s, t, e);
|
|
8613
8613
|
let n, o;
|
|
8614
|
-
const
|
|
8614
|
+
const c = (r + i) / 2;
|
|
8615
8615
|
if (r == i)
|
|
8616
8616
|
n = o = 0;
|
|
8617
8617
|
else {
|
|
8618
|
-
const
|
|
8619
|
-
switch (o =
|
|
8618
|
+
const d = r - i;
|
|
8619
|
+
switch (o = c > 0.5 ? d / (2 - r - i) : d / (r + i), r) {
|
|
8620
8620
|
case s:
|
|
8621
|
-
n = (t - e) /
|
|
8621
|
+
n = (t - e) / d + (t < e ? 6 : 0);
|
|
8622
8622
|
break;
|
|
8623
8623
|
case t:
|
|
8624
|
-
n = (e - s) /
|
|
8624
|
+
n = (e - s) / d + 2;
|
|
8625
8625
|
break;
|
|
8626
8626
|
case e:
|
|
8627
|
-
n = (s - t) /
|
|
8627
|
+
n = (s - t) / d + 4;
|
|
8628
8628
|
break;
|
|
8629
8629
|
}
|
|
8630
8630
|
n /= 6;
|
|
8631
8631
|
}
|
|
8632
|
-
return [n, o,
|
|
8632
|
+
return [n, o, c];
|
|
8633
8633
|
}, H_ = (s, t, e) => {
|
|
8634
8634
|
const r = (i) => i.toString(16).padStart(2, "0");
|
|
8635
8635
|
return `#${r(s)}${r(t)}${r(e)}`;
|
|
8636
8636
|
}, Km = (s, t = Jm, e = 0.4) => {
|
|
8637
|
-
const r = [], [i, n, o] = U_(s), [
|
|
8637
|
+
const r = [], [i, n, o] = U_(s), [c, d, u] = F_(i, n, o), p = Math.round(u * 100);
|
|
8638
8638
|
p > 70 ? e = 0.8 : p > 60 ? e = 0.9 : p < 10 ? e = 0.075 : p < 42 && (e = 0.3);
|
|
8639
8639
|
const f = t.findIndex((k) => k === 0);
|
|
8640
8640
|
if (f === -1)
|
|
@@ -8643,7 +8643,7 @@ var $_ = (s, t, e) => {
|
|
|
8643
8643
|
for (const k of t) {
|
|
8644
8644
|
let A;
|
|
8645
8645
|
k < 0 ? A = p + k * P * e : k > 0 ? A = p + k * _ * e : A = p;
|
|
8646
|
-
const [N, H, $] = $_(
|
|
8646
|
+
const [N, H, $] = $_(c, d, A / 100);
|
|
8647
8647
|
r.push(H_(N, H, $));
|
|
8648
8648
|
}
|
|
8649
8649
|
return r;
|
|
@@ -9063,14 +9063,14 @@ const Jh = class extends ut.EventEmitter {
|
|
|
9063
9063
|
}
|
|
9064
9064
|
onAsync(e, r) {
|
|
9065
9065
|
const i = a(this, js), n = (...o) => l(this, null, function* () {
|
|
9066
|
-
var
|
|
9066
|
+
var d;
|
|
9067
9067
|
try {
|
|
9068
9068
|
yield r(...o);
|
|
9069
9069
|
} catch (u) {
|
|
9070
9070
|
this.logger.error("[onAsync]", { error: u });
|
|
9071
9071
|
}
|
|
9072
|
-
const
|
|
9073
|
-
|
|
9072
|
+
const c = (d = i.get(e)) == null ? void 0 : d.shift();
|
|
9073
|
+
c == null || c();
|
|
9074
9074
|
});
|
|
9075
9075
|
return a(this, Gs).get(e) || a(this, Gs).set(e, []), a(this, Gs).get(e).push(n), super.on(e, n);
|
|
9076
9076
|
}
|
|
@@ -9157,9 +9157,9 @@ function hP(s, t, e) {
|
|
|
9157
9157
|
for (var r = arguments, i = -1, n = Ap(r.length - t, 0), o = Array(n); ++i < n; )
|
|
9158
9158
|
o[i] = r[t + i];
|
|
9159
9159
|
i = -1;
|
|
9160
|
-
for (var
|
|
9161
|
-
|
|
9162
|
-
return
|
|
9160
|
+
for (var c = Array(t + 1); ++i < t; )
|
|
9161
|
+
c[i] = r[i];
|
|
9162
|
+
return c[t] = e(o), sP(s, this, c);
|
|
9163
9163
|
};
|
|
9164
9164
|
}
|
|
9165
9165
|
function pP(s, t) {
|
|
@@ -9175,8 +9175,8 @@ function mP(s) {
|
|
|
9175
9175
|
return pP(function(t, e) {
|
|
9176
9176
|
var r = -1, i = e.length, n = i > 1 ? e[i - 1] : void 0, o = i > 2 ? e[2] : void 0;
|
|
9177
9177
|
for (n = s.length > 3 && typeof n == "function" ? (i--, n) : void 0, o && gP(e[0], e[1], o) && (n = i < 3 ? void 0 : n, i = 1), t = Object(t); ++r < i; ) {
|
|
9178
|
-
var
|
|
9179
|
-
|
|
9178
|
+
var c = e[r];
|
|
9179
|
+
c && s(t, c, r, n);
|
|
9180
9180
|
}
|
|
9181
9181
|
return t;
|
|
9182
9182
|
});
|
|
@@ -9216,14 +9216,14 @@ function wP(s, t) {
|
|
|
9216
9216
|
}
|
|
9217
9217
|
var bP = 1, kP = 2;
|
|
9218
9218
|
function Zm(s, t, e, r, i, n) {
|
|
9219
|
-
var o = e & bP,
|
|
9220
|
-
if (
|
|
9219
|
+
var o = e & bP, c = s.length, d = t.length;
|
|
9220
|
+
if (c != d && !(o && d > c))
|
|
9221
9221
|
return false;
|
|
9222
9222
|
var u = n.get(s), p = n.get(t);
|
|
9223
9223
|
if (u && p)
|
|
9224
9224
|
return u == t && p == s;
|
|
9225
9225
|
var f = -1, S = true, E = e & kP ? new Dd() : void 0;
|
|
9226
|
-
for (n.set(s, t), n.set(t, s); ++f <
|
|
9226
|
+
for (n.set(s, t), n.set(t, s); ++f < c; ) {
|
|
9227
9227
|
var _ = s[f], P = t[f];
|
|
9228
9228
|
if (r)
|
|
9229
9229
|
var k = o ? r(P, _, f, t, s, n) : r(_, P, f, s, t, n);
|
|
@@ -9279,16 +9279,16 @@ function jP(s, t, e, r, i, n, o) {
|
|
|
9279
9279
|
case FP:
|
|
9280
9280
|
return s == t + "";
|
|
9281
9281
|
case VP:
|
|
9282
|
-
var
|
|
9282
|
+
var c = IP;
|
|
9283
9283
|
case $P:
|
|
9284
|
-
var
|
|
9285
|
-
if (
|
|
9284
|
+
var d = r & MP;
|
|
9285
|
+
if (c || (c = AP), s.size != t.size && !d)
|
|
9286
9286
|
return false;
|
|
9287
9287
|
var u = o.get(s);
|
|
9288
9288
|
if (u)
|
|
9289
9289
|
return u == t;
|
|
9290
9290
|
r |= DP, o.set(s, t);
|
|
9291
|
-
var p = Zm(
|
|
9291
|
+
var p = Zm(c(s), c(t), r, i, n, o);
|
|
9292
9292
|
return o.delete(s), p;
|
|
9293
9293
|
case HP:
|
|
9294
9294
|
if (nu)
|
|
@@ -9298,11 +9298,11 @@ function jP(s, t, e, r, i, n, o) {
|
|
|
9298
9298
|
}
|
|
9299
9299
|
var GP = 1, WP = Object.prototype, JP = WP.hasOwnProperty;
|
|
9300
9300
|
function KP(s, t, e, r, i, n) {
|
|
9301
|
-
var o = e & GP,
|
|
9302
|
-
if (
|
|
9301
|
+
var o = e & GP, c = yu(s), d = c.length, u = yu(t), p = u.length;
|
|
9302
|
+
if (d != p && !o)
|
|
9303
9303
|
return false;
|
|
9304
|
-
for (var f =
|
|
9305
|
-
var S =
|
|
9304
|
+
for (var f = d; f--; ) {
|
|
9305
|
+
var S = c[f];
|
|
9306
9306
|
if (!(o ? S in t : JP.call(t, S)))
|
|
9307
9307
|
return false;
|
|
9308
9308
|
}
|
|
@@ -9311,8 +9311,8 @@ function KP(s, t, e, r, i, n) {
|
|
|
9311
9311
|
return E == t && _ == s;
|
|
9312
9312
|
var P = true;
|
|
9313
9313
|
n.set(s, t), n.set(t, s);
|
|
9314
|
-
for (var k = o; ++f <
|
|
9315
|
-
S =
|
|
9314
|
+
for (var k = o; ++f < d; ) {
|
|
9315
|
+
S = c[f];
|
|
9316
9316
|
var A = s[S], N = t[S];
|
|
9317
9317
|
if (r)
|
|
9318
9318
|
var H = o ? r(N, A, S, t, s, n) : r(A, N, S, s, t, n);
|
|
@@ -9330,16 +9330,16 @@ function KP(s, t, e, r, i, n) {
|
|
|
9330
9330
|
}
|
|
9331
9331
|
var zP = 1, Dp = "[object Arguments]", Op = "[object Array]", ed = "[object Object]", YP = Object.prototype, Np = YP.hasOwnProperty;
|
|
9332
9332
|
function QP(s, t, e, r, i, n) {
|
|
9333
|
-
var o = ti(s),
|
|
9334
|
-
|
|
9335
|
-
var p =
|
|
9333
|
+
var o = ti(s), c = ti(t), d = o ? Op : Wn(s), u = c ? Op : Wn(t);
|
|
9334
|
+
d = d == Dp ? ed : d, u = u == Dp ? ed : u;
|
|
9335
|
+
var p = d == ed, f = u == ed, S = d == u;
|
|
9336
9336
|
if (S && jn(s)) {
|
|
9337
9337
|
if (!jn(t))
|
|
9338
9338
|
return false;
|
|
9339
9339
|
o = true, p = false;
|
|
9340
9340
|
}
|
|
9341
9341
|
if (S && !p)
|
|
9342
|
-
return n || (n = new xs()), o || Hl(s) ? Zm(s, t, e, r, i, n) : jP(s, t,
|
|
9342
|
+
return n || (n = new xs()), o || Hl(s) ? Zm(s, t, e, r, i, n) : jP(s, t, d, e, r, i, n);
|
|
9343
9343
|
if (!(e & zP)) {
|
|
9344
9344
|
var E = p && Np.call(s, "__wrapped__"), _ = f && Np.call(t, "__wrapped__");
|
|
9345
9345
|
if (E || _) {
|
|
@@ -9354,9 +9354,9 @@ function ef(s, t, e, r, i) {
|
|
|
9354
9354
|
}
|
|
9355
9355
|
function XP(s) {
|
|
9356
9356
|
return function(t, e, r) {
|
|
9357
|
-
for (var i = -1, n = Object(t), o = r(t),
|
|
9358
|
-
var
|
|
9359
|
-
if (e(n[
|
|
9357
|
+
for (var i = -1, n = Object(t), o = r(t), c = o.length; c--; ) {
|
|
9358
|
+
var d = o[s ? c : ++i];
|
|
9359
|
+
if (e(n[d], d, n) === false)
|
|
9360
9360
|
break;
|
|
9361
9361
|
}
|
|
9362
9362
|
return t;
|
|
@@ -9370,7 +9370,7 @@ var tC = function() {
|
|
|
9370
9370
|
const ou = tC;
|
|
9371
9371
|
var sC = "Expected a function", rC = Math.max, iC = Math.min;
|
|
9372
9372
|
function bh(s, t, e) {
|
|
9373
|
-
var r, i, n, o,
|
|
9373
|
+
var r, i, n, o, c, d, u = 0, p = false, f = false, S = true;
|
|
9374
9374
|
if (typeof s != "function")
|
|
9375
9375
|
throw new TypeError(sC);
|
|
9376
9376
|
t = Ip(t) || 0, Cs(e) && (p = !!e.leading, f = "maxWait" in e, n = f ? rC(Ip(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
|
|
@@ -9379,40 +9379,40 @@ function bh(s, t, e) {
|
|
|
9379
9379
|
return r = i = void 0, u = K, o = s.apply(Je, re), o;
|
|
9380
9380
|
}
|
|
9381
9381
|
function _(K) {
|
|
9382
|
-
return u = K,
|
|
9382
|
+
return u = K, c = setTimeout(A, t), p ? E(K) : o;
|
|
9383
9383
|
}
|
|
9384
9384
|
function P(K) {
|
|
9385
|
-
var re = K -
|
|
9385
|
+
var re = K - d, Je = K - u, Is = t - re;
|
|
9386
9386
|
return f ? iC(Is, n - Je) : Is;
|
|
9387
9387
|
}
|
|
9388
9388
|
function k(K) {
|
|
9389
|
-
var re = K -
|
|
9390
|
-
return
|
|
9389
|
+
var re = K - d, Je = K - u;
|
|
9390
|
+
return d === void 0 || re >= t || re < 0 || f && Je >= n;
|
|
9391
9391
|
}
|
|
9392
9392
|
function A() {
|
|
9393
9393
|
var K = ou();
|
|
9394
9394
|
if (k(K))
|
|
9395
9395
|
return N(K);
|
|
9396
|
-
|
|
9396
|
+
c = setTimeout(A, P(K));
|
|
9397
9397
|
}
|
|
9398
9398
|
function N(K) {
|
|
9399
|
-
return
|
|
9399
|
+
return c = void 0, S && r ? E(K) : (r = i = void 0, o);
|
|
9400
9400
|
}
|
|
9401
9401
|
function H() {
|
|
9402
|
-
|
|
9402
|
+
c !== void 0 && clearTimeout(c), u = 0, r = d = i = c = void 0;
|
|
9403
9403
|
}
|
|
9404
9404
|
function $() {
|
|
9405
|
-
return
|
|
9405
|
+
return c === void 0 ? o : N(ou());
|
|
9406
9406
|
}
|
|
9407
9407
|
function F() {
|
|
9408
9408
|
var K = ou(), re = k(K);
|
|
9409
|
-
if (r = arguments, i = this,
|
|
9410
|
-
if (
|
|
9411
|
-
return _(
|
|
9409
|
+
if (r = arguments, i = this, d = K, re) {
|
|
9410
|
+
if (c === void 0)
|
|
9411
|
+
return _(d);
|
|
9412
9412
|
if (f)
|
|
9413
|
-
return clearTimeout(
|
|
9413
|
+
return clearTimeout(c), c = setTimeout(A, t), E(d);
|
|
9414
9414
|
}
|
|
9415
|
-
return
|
|
9415
|
+
return c === void 0 && (c = setTimeout(A, t)), o;
|
|
9416
9416
|
}
|
|
9417
9417
|
return F.cancel = H, F.flush = $, F;
|
|
9418
9418
|
}
|
|
@@ -9430,25 +9430,25 @@ function nC(s) {
|
|
|
9430
9430
|
return qc(s, Gc(s));
|
|
9431
9431
|
}
|
|
9432
9432
|
function oC(s, t, e, r, i, n, o) {
|
|
9433
|
-
var
|
|
9433
|
+
var c = wu(s, e), d = wu(t, e), u = o.get(d);
|
|
9434
9434
|
if (u) {
|
|
9435
9435
|
Ru(s, e, u);
|
|
9436
9436
|
return;
|
|
9437
9437
|
}
|
|
9438
|
-
var p = n ? n(
|
|
9438
|
+
var p = n ? n(c, d, e + "", s, t, o) : void 0, f = p === void 0;
|
|
9439
9439
|
if (f) {
|
|
9440
|
-
var S = ti(
|
|
9441
|
-
p =
|
|
9440
|
+
var S = ti(d), E = !S && jn(d), _ = !S && !E && Hl(d);
|
|
9441
|
+
p = d, S || E || _ ? ti(c) ? p = c : aC(c) ? p = Lm(c) : E ? (f = false, p = Nm(d, true)) : _ ? (f = false, p = Fm(d, true)) : p = [] : EP(d) || Ad(d) ? (p = c, Ad(c) ? p = nC(c) : (!Cs(c) || vh(c)) && (p = Hm(d))) : f = false;
|
|
9442
9442
|
}
|
|
9443
|
-
f && (o.set(
|
|
9443
|
+
f && (o.set(d, p), i(p, d, r, n, o), o.delete(d)), Ru(s, e, p);
|
|
9444
9444
|
}
|
|
9445
9445
|
function tf(s, t, e, r, i) {
|
|
9446
9446
|
s !== t && eC(t, function(n, o) {
|
|
9447
9447
|
if (i || (i = new xs()), Cs(n))
|
|
9448
9448
|
oC(s, t, o, e, tf, r, i);
|
|
9449
9449
|
else {
|
|
9450
|
-
var
|
|
9451
|
-
|
|
9450
|
+
var c = r ? r(wu(s, o), n, o + "", s, t, i) : void 0;
|
|
9451
|
+
c === void 0 && (c = n), Ru(s, o, c);
|
|
9452
9452
|
}
|
|
9453
9453
|
}, Gc);
|
|
9454
9454
|
}
|
|
@@ -9580,11 +9580,11 @@ function sf(s, t, e = {}) {
|
|
|
9580
9580
|
function Lp(s, t, e = {}, r = "") {
|
|
9581
9581
|
const i = {};
|
|
9582
9582
|
try {
|
|
9583
|
-
const n = JSON.stringify(e), o = JSON.parse(n),
|
|
9583
|
+
const n = JSON.stringify(e), o = JSON.parse(n), c = sf(
|
|
9584
9584
|
o,
|
|
9585
9585
|
r
|
|
9586
|
-
),
|
|
9587
|
-
return JSON.parse(
|
|
9586
|
+
), d = JSON.stringify(c);
|
|
9587
|
+
return JSON.parse(d);
|
|
9588
9588
|
} catch (n) {
|
|
9589
9589
|
const o = hd(n);
|
|
9590
9590
|
i[`${r}.error.message`] = o.message || "", i[`${r}.error.stack`] = o.stack || "", i[`${r}.error.reason`] = o.reason || "", i[`${r}.error.source`] = "safelyFlattenObjForOpenTelemetry";
|
|
@@ -9718,13 +9718,13 @@ const TC = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
9718
9718
|
static trace(t, e = void 0) {
|
|
9719
9719
|
return (r, i, n) => {
|
|
9720
9720
|
const o = n.value;
|
|
9721
|
-
return n.value = function(...
|
|
9721
|
+
return n.value = function(...d) {
|
|
9722
9722
|
var S;
|
|
9723
9723
|
const u = this == null ? void 0 : this.telemetry;
|
|
9724
9724
|
if (!u || !u.initialized || navigator.isReactNative || !u.tracingEnabled || (S = ur.getContext(u.meetingMetadata.peerId)) != null && S.getValue("flagsmith").hasFeature(Z.SKIP_OTEL_TRACES))
|
|
9725
|
-
return o.apply(this,
|
|
9725
|
+
return o.apply(this, d);
|
|
9726
9726
|
u.addLogInCurrentSpan("info", t, e);
|
|
9727
|
-
const p = performance.now(), f = o.apply(this,
|
|
9727
|
+
const p = performance.now(), f = o.apply(this, d);
|
|
9728
9728
|
return Promise.resolve(f).then(() => {
|
|
9729
9729
|
const E = performance.now();
|
|
9730
9730
|
E - p > 10 && u.addLogInCurrentSpan("info", `${t}_timing`, {
|
|
@@ -9755,25 +9755,25 @@ const TC = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
9755
9755
|
r
|
|
9756
9756
|
)), !!fC(n, t))
|
|
9757
9757
|
try {
|
|
9758
|
-
const
|
|
9758
|
+
const c = Lp(
|
|
9759
9759
|
n,
|
|
9760
9760
|
e,
|
|
9761
9761
|
r,
|
|
9762
9762
|
"metadata"
|
|
9763
|
-
),
|
|
9763
|
+
), d = new Date(), u = B(D({
|
|
9764
9764
|
message: e,
|
|
9765
9765
|
level: t
|
|
9766
|
-
},
|
|
9767
|
-
loggedAt:
|
|
9768
|
-
loggedAtTzOffset:
|
|
9766
|
+
}, c), {
|
|
9767
|
+
loggedAt: d.toISOString(),
|
|
9768
|
+
loggedAtTzOffset: d.getTimezoneOffset()
|
|
9769
9769
|
});
|
|
9770
9770
|
i ? this.sendOtelLogsToNewRelic([u]) : this.logsCache.push(u);
|
|
9771
|
-
} catch (
|
|
9771
|
+
} catch (c) {
|
|
9772
9772
|
this.addLogInCurrentSpan(
|
|
9773
9773
|
"error",
|
|
9774
9774
|
"opentelemetry::addLogInCurrentSpan_failed",
|
|
9775
9775
|
{
|
|
9776
|
-
error: hd(
|
|
9776
|
+
error: hd(c)
|
|
9777
9777
|
}
|
|
9778
9778
|
);
|
|
9779
9779
|
}
|
|
@@ -9993,11 +9993,11 @@ ${this.message}`;
|
|
|
9993
9993
|
r && r.endsWith("00") && i && (o = true), o && i.error("DyteError", {
|
|
9994
9994
|
error: { message: this.message, name: this.name, code: r }
|
|
9995
9995
|
});
|
|
9996
|
-
const
|
|
9997
|
-
if (
|
|
9998
|
-
const
|
|
9996
|
+
const c = ur.getContext(ur.getMostRecentPeerId());
|
|
9997
|
+
if (c) {
|
|
9998
|
+
const d = c.getValue("onError");
|
|
9999
9999
|
try {
|
|
10000
|
-
|
|
10000
|
+
d(this);
|
|
10001
10001
|
} catch (u) {
|
|
10002
10002
|
}
|
|
10003
10003
|
}
|
|
@@ -10029,8 +10029,8 @@ function Vp(s, t, e) {
|
|
|
10029
10029
|
}), n && (s.set = function(o) {
|
|
10030
10030
|
try {
|
|
10031
10031
|
return n.apply(this, [o]);
|
|
10032
|
-
} catch (
|
|
10033
|
-
sd(this, t, e,
|
|
10032
|
+
} catch (c) {
|
|
10033
|
+
sd(this, t, e, c);
|
|
10034
10034
|
}
|
|
10035
10035
|
}), s;
|
|
10036
10036
|
}
|
|
@@ -10234,10 +10234,10 @@ function kC(s, t = 2) {
|
|
|
10234
10234
|
return s.replace(/[^\u00BF-\u1FFF\u2C00-\uD7FF\w\s]/g, "").trim().split(/\s+/).slice(0, t).map((i) => i.charAt(0)).join("").toUpperCase();
|
|
10235
10235
|
}
|
|
10236
10236
|
const xp = 1080, Up = 1920, IC = (s, t, e, r, i, n) => {
|
|
10237
|
-
let o = 0.5,
|
|
10238
|
-
const
|
|
10239
|
-
let f =
|
|
10240
|
-
return f < e && (A = e / f), Math.abs(A - 1) < 1e-14 && S < r && (A = r / S), f *= A, S *= A, P =
|
|
10237
|
+
let o = 0.5, c = 0.5;
|
|
10238
|
+
const d = i, u = n, p = Math.min(e / d, r / u);
|
|
10239
|
+
let f = d * p, S = u * p, E, _, P, k, A = 1;
|
|
10240
|
+
return f < e && (A = e / f), Math.abs(A - 1) < 1e-14 && S < r && (A = r / S), f *= A, S *= A, P = d / (f / e), k = u / (S / r), E = (d - P) * o, _ = (u - k) * c, E < 0 && (E = 0), _ < 0 && (_ = 0), P > d && (P = d), k > u && (k = u), [E, _, P, k, s, t, e, r];
|
|
10241
10241
|
};
|
|
10242
10242
|
var Kt, Si, st, zt, be, ds, Ws, mt, Oe, Fa, Ha, Js, Ba;
|
|
10243
10243
|
const zh = class extends qt {
|
|
@@ -10382,7 +10382,7 @@ const zh = class extends qt {
|
|
|
10382
10382
|
drawEmptyTile(e, r, i, n) {
|
|
10383
10383
|
if (a(this, Kt) === void 0)
|
|
10384
10384
|
return;
|
|
10385
|
-
const o = a(this, Kt).getContext("2d"),
|
|
10385
|
+
const o = a(this, Kt).getContext("2d"), c = a(this, Kt).width, d = 0, u = 0, p = r - d * 2, f = i - d * 2, S = Math.floor(c / p), E = Math.floor(e / S), P = e % S * (p + d) + d, k = E * (f + d) + d, { displayText: A, image: N } = n != null ? n : {};
|
|
10386
10386
|
o.fillStyle = A || N ? a(this, ds).videoBackground : a(this, ds).background, o.strokeStyle = a(this, ds).brand, o.beginPath(), o.moveTo(P + u, k), o.arcTo(P + p, k, P + p, k + u, u), o.arcTo(
|
|
10387
10387
|
P + p,
|
|
10388
10388
|
k + f,
|
|
@@ -10400,23 +10400,23 @@ const zh = class extends qt {
|
|
|
10400
10400
|
), o.restore()) : A && (o.fillStyle = a(this, ds).textOnBrand, o.font = `${H / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(A, $, F)), this.drawIcons(n, P, k, Math.max(p, f)));
|
|
10401
10401
|
}
|
|
10402
10402
|
drawIcons(e, r, i, n) {
|
|
10403
|
-
const o = Math.min(Math.max(n * 0.15, 100), 200),
|
|
10404
|
-
let u = r +
|
|
10405
|
-
const p = i +
|
|
10403
|
+
const o = Math.min(Math.max(n * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
10404
|
+
let u = r + c;
|
|
10405
|
+
const p = i + c, f = (S) => {
|
|
10406
10406
|
const E = a(this, Kt).getContext("2d");
|
|
10407
|
-
E.save(), E.fillStyle = a(this, ds).background, E.beginPath(), E.moveTo(u +
|
|
10407
|
+
E.save(), E.fillStyle = a(this, ds).background, E.beginPath(), E.moveTo(u + d, p), E.arcTo(u + o, p, u + o, p + d, d), E.arcTo(
|
|
10408
10408
|
u + o,
|
|
10409
10409
|
p + o,
|
|
10410
|
-
u + o -
|
|
10410
|
+
u + o - d,
|
|
10411
10411
|
p + o,
|
|
10412
|
-
|
|
10413
|
-
), E.arcTo(u, p + o, u, p + o -
|
|
10412
|
+
d
|
|
10413
|
+
), E.arcTo(u, p + o, u, p + o - d, d), E.arcTo(u, p, u + d, p, d), E.closePath(), E.fill(), typeof S == "string" ? (E.font = `${o / 1.5}px sans-serif`, E.fillStyle = a(this, ds).text, E.textAlign = "center", E.textBaseline = "top", E.fillText(S, o / 2 + u, p + c)) : E.drawImage(
|
|
10414
10414
|
S,
|
|
10415
|
-
u +
|
|
10416
|
-
p +
|
|
10417
|
-
o -
|
|
10418
|
-
o -
|
|
10419
|
-
), u += o +
|
|
10415
|
+
u + c,
|
|
10416
|
+
p + c,
|
|
10417
|
+
o - c * 2,
|
|
10418
|
+
o - c * 2
|
|
10419
|
+
), u += o + c, E.restore();
|
|
10420
10420
|
};
|
|
10421
10421
|
e.pinned && f(a(this, Fa)), e.handRaised && f(a(this, Ha));
|
|
10422
10422
|
}
|
|
@@ -10425,25 +10425,25 @@ const zh = class extends qt {
|
|
|
10425
10425
|
if (a(this, Kt) === void 0)
|
|
10426
10426
|
return;
|
|
10427
10427
|
const n = a(this, Kt).getContext("2d"), o = this.getSources();
|
|
10428
|
-
let
|
|
10429
|
-
for (;
|
|
10428
|
+
let c = 0, d = 0;
|
|
10429
|
+
for (; c < a(this, be).height - 5; ) {
|
|
10430
10430
|
let f = 0;
|
|
10431
|
-
for (; f < a(this, be).width - 5 &&
|
|
10432
|
-
if ((u = o[
|
|
10433
|
-
const S = o[
|
|
10431
|
+
for (; f < a(this, be).width - 5 && d < i; ) {
|
|
10432
|
+
if ((u = o[d]) != null && u.enabled) {
|
|
10433
|
+
const S = o[d].element, [E, _, P, k, A, N, H, $] = IC(
|
|
10434
10434
|
f,
|
|
10435
|
-
|
|
10435
|
+
c,
|
|
10436
10436
|
e,
|
|
10437
10437
|
r,
|
|
10438
10438
|
S.videoWidth,
|
|
10439
10439
|
S.videoHeight
|
|
10440
10440
|
);
|
|
10441
|
-
((p = S == null ? void 0 : S.classList) == null ? void 0 : p.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(S, E, _, P, k, -1 * A, N, -1 * H, $), n.restore()) : n.drawImage(S, E, _, P, k, A, N, H, $), this.drawIcons(o[
|
|
10441
|
+
((p = S == null ? void 0 : S.classList) == null ? void 0 : p.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(S, E, _, P, k, -1 * A, N, -1 * H, $), n.restore()) : n.drawImage(S, E, _, P, k, A, N, H, $), this.drawIcons(o[d], A, N, Math.max(H, $));
|
|
10442
10442
|
} else
|
|
10443
|
-
this.drawEmptyTile(
|
|
10444
|
-
|
|
10443
|
+
this.drawEmptyTile(d, e, r, o[d]);
|
|
10444
|
+
d += 1, f += e;
|
|
10445
10445
|
}
|
|
10446
|
-
|
|
10446
|
+
c += r;
|
|
10447
10447
|
}
|
|
10448
10448
|
}
|
|
10449
10449
|
calcGridElemSize(e) {
|
|
@@ -10534,11 +10534,11 @@ const zh = class extends qt {
|
|
|
10534
10534
|
}
|
|
10535
10535
|
});
|
|
10536
10536
|
}
|
|
10537
|
-
addSource(e, r, i, n = false, o = void 0,
|
|
10537
|
+
addSource(e, r, i, n = false, o = void 0, c = void 0, d = false) {
|
|
10538
10538
|
this.logger.debug("DytePIP::AddSource", {
|
|
10539
10539
|
pip: {
|
|
10540
10540
|
id: e,
|
|
10541
|
-
handRaised:
|
|
10541
|
+
handRaised: d
|
|
10542
10542
|
}
|
|
10543
10543
|
}), a(this, mt)[e] = {
|
|
10544
10544
|
id: e,
|
|
@@ -10546,9 +10546,9 @@ const zh = class extends qt {
|
|
|
10546
10546
|
enabled: i,
|
|
10547
10547
|
pinned: n,
|
|
10548
10548
|
displayText: o ? kC(o) : void 0,
|
|
10549
|
-
imageUrl:
|
|
10550
|
-
handRaised:
|
|
10551
|
-
},
|
|
10549
|
+
imageUrl: c,
|
|
10550
|
+
handRaised: d
|
|
10551
|
+
}, c && this.generateAvatar(e, c);
|
|
10552
10552
|
}
|
|
10553
10553
|
updateSource(e, r) {
|
|
10554
10554
|
this.logger.info("DytePIP::UpdateSource", {
|
|
@@ -15273,10 +15273,10 @@ const xu = (Pg = class {
|
|
|
15273
15273
|
const o = yield a(this, wr).sendMessagePromise(
|
|
15274
15274
|
pi.createChatChannel,
|
|
15275
15275
|
gI.toBinary(n)
|
|
15276
|
-
),
|
|
15276
|
+
), c = Fs.fromBinary(
|
|
15277
15277
|
o.payload
|
|
15278
15278
|
).chatChannels;
|
|
15279
|
-
return xu.formatChannel(
|
|
15279
|
+
return xu.formatChannel(c[0]);
|
|
15280
15280
|
});
|
|
15281
15281
|
}
|
|
15282
15282
|
updateChannel(s, t) {
|
|
@@ -15396,12 +15396,12 @@ class as {
|
|
|
15396
15396
|
from: i,
|
|
15397
15397
|
reversed: r,
|
|
15398
15398
|
channelId: n
|
|
15399
|
-
},
|
|
15399
|
+
}, c = yield a(this, rt).sendMessagePromise(
|
|
15400
15400
|
we.getPaginatedMessages,
|
|
15401
15401
|
$k.toBinary(o)
|
|
15402
15402
|
);
|
|
15403
|
-
return
|
|
15404
|
-
|
|
15403
|
+
return c.payload ? Hk.fromBinary(
|
|
15404
|
+
c.payload
|
|
15405
15405
|
) : {
|
|
15406
15406
|
messages: [],
|
|
15407
15407
|
next: false
|
|
@@ -15455,11 +15455,11 @@ class as {
|
|
|
15455
15455
|
payload: e
|
|
15456
15456
|
};
|
|
15457
15457
|
i && (o.channelId = i), n !== void 0 && (o.pinned = n);
|
|
15458
|
-
const
|
|
15458
|
+
const c = yield a(this, rt).sendMessagePromise(
|
|
15459
15459
|
we.editMessage,
|
|
15460
15460
|
Zk.toBinary(o)
|
|
15461
15461
|
);
|
|
15462
|
-
return ad.fromBinary(
|
|
15462
|
+
return ad.fromBinary(c.payload).message;
|
|
15463
15463
|
});
|
|
15464
15464
|
}
|
|
15465
15465
|
deleteMessage(t, e) {
|
|
@@ -15489,12 +15489,12 @@ class as {
|
|
|
15489
15489
|
};
|
|
15490
15490
|
e.channelId && (r.channelId = e.channelId);
|
|
15491
15491
|
try {
|
|
15492
|
-
const
|
|
15492
|
+
const c = yield a(this, rt).sendMessagePromise(
|
|
15493
15493
|
we.searchChannelMessages,
|
|
15494
15494
|
cI.toBinary(r)
|
|
15495
15495
|
);
|
|
15496
|
-
return Sf.fromBinary(
|
|
15497
|
-
} catch (
|
|
15496
|
+
return Sf.fromBinary(c.payload).messages;
|
|
15497
|
+
} catch (c) {
|
|
15498
15498
|
return [];
|
|
15499
15499
|
}
|
|
15500
15500
|
});
|
|
@@ -15579,9 +15579,9 @@ class as {
|
|
|
15579
15579
|
let o = i;
|
|
15580
15580
|
try {
|
|
15581
15581
|
o = r(n);
|
|
15582
|
-
} catch (
|
|
15582
|
+
} catch (c) {
|
|
15583
15583
|
this.logger.error("chatSocketHandler::on::binary_decode_error", {
|
|
15584
|
-
error:
|
|
15584
|
+
error: c
|
|
15585
15585
|
});
|
|
15586
15586
|
}
|
|
15587
15587
|
return e(o);
|
|
@@ -15686,8 +15686,8 @@ class cg {
|
|
|
15686
15686
|
const { baseURL: r } = this.defaults, i = t.startsWith("http") ? t : `${r}${t.startsWith("/") ? t : `/${t}`}`;
|
|
15687
15687
|
if (e) {
|
|
15688
15688
|
const n = new URLSearchParams();
|
|
15689
|
-
return Object.entries(e).forEach(([o,
|
|
15690
|
-
n.append(o,
|
|
15689
|
+
return Object.entries(e).forEach(([o, c]) => {
|
|
15690
|
+
n.append(o, c);
|
|
15691
15691
|
}), `${i}${i.includes("?") ? "&" : "?"}${n.toString()}`;
|
|
15692
15692
|
}
|
|
15693
15693
|
return i;
|
|
@@ -15697,15 +15697,15 @@ class cg {
|
|
|
15697
15697
|
var f;
|
|
15698
15698
|
const e = ((f = t.method) == null ? void 0 : f.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = D(D({}, this.defaults.headers.common), t.headers);
|
|
15699
15699
|
e !== "GET" && e !== "HEAD" && t.data && !i["Content-Type"] && (i["Content-Type"] = "application/json");
|
|
15700
|
-
const o = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data,
|
|
15700
|
+
const o = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data, c = {
|
|
15701
15701
|
method: e,
|
|
15702
15702
|
headers: i,
|
|
15703
15703
|
body: e !== "GET" && e !== "HEAD" && t.data ? o : void 0
|
|
15704
|
-
},
|
|
15704
|
+
}, d = t.timeout || this.defaults.timeout, u = t.retry !== void 0 ? t.retry : this.defaults.retry, p = t.retryDelay || this.defaults.retryDelay;
|
|
15705
15705
|
try {
|
|
15706
|
-
const S = new AbortController(), E = setTimeout(() => S.abort(),
|
|
15707
|
-
|
|
15708
|
-
const _ = yield fetch(r,
|
|
15706
|
+
const S = new AbortController(), E = setTimeout(() => S.abort(), d);
|
|
15707
|
+
c.signal = S.signal;
|
|
15708
|
+
const _ = yield fetch(r, c);
|
|
15709
15709
|
clearTimeout(E);
|
|
15710
15710
|
let P = null;
|
|
15711
15711
|
const k = _.headers.get("content-type");
|
|
@@ -15781,10 +15781,10 @@ class tM {
|
|
|
15781
15781
|
retry: i = XA,
|
|
15782
15782
|
retryDelay: n = ZA,
|
|
15783
15783
|
baseURL: o = "https://api.dyte.io",
|
|
15784
|
-
authToken:
|
|
15785
|
-
cachedUserDetails:
|
|
15784
|
+
authToken: c,
|
|
15785
|
+
cachedUserDetails: d
|
|
15786
15786
|
} = e || {};
|
|
15787
|
-
this.iceServers =
|
|
15787
|
+
this.iceServers = d == null ? void 0 : d.iceServers, this.pluginInformation = d == null ? void 0 : d.pluginInformation, this.userDetails = d == null ? void 0 : d.userDetails, this.roomDetails = d == null ? void 0 : d.roomDetails, this.requests = new cg({
|
|
15788
15788
|
baseURL: o,
|
|
15789
15789
|
timeout: r,
|
|
15790
15790
|
retry: i,
|
|
@@ -15796,7 +15796,7 @@ class tM {
|
|
|
15796
15796
|
retry: i,
|
|
15797
15797
|
retryDelay: n,
|
|
15798
15798
|
responseType: "json"
|
|
15799
|
-
}), this.setAuthToken(
|
|
15799
|
+
}), this.setAuthToken(c, { bearer: true });
|
|
15800
15800
|
const u = this.requests.request.bind(this.requests);
|
|
15801
15801
|
this.requests.request = (p) => l(this, null, function* () {
|
|
15802
15802
|
var S, E, _, P, k;
|
|
@@ -15896,14 +15896,14 @@ class jt extends tM {
|
|
|
15896
15896
|
}
|
|
15897
15897
|
getPlugins() {
|
|
15898
15898
|
return l(this, null, function* () {
|
|
15899
|
-
var n, o,
|
|
15899
|
+
var n, o, c, d, u, p, f;
|
|
15900
15900
|
if (this.pluginInformation)
|
|
15901
15901
|
return this.pluginInformation;
|
|
15902
15902
|
const { plugins: e } = (yield this.requests.get("/v2/plugins/user")).data.data, r = ((o = (n = this.context.getValue("flagsmith").getValue(Z.V1_PLUGINS)) == null ? void 0 : n.toString()) == null ? void 0 : o.split(",")) || [], i = e.reduce(
|
|
15903
15903
|
(S, E) => (S[r.includes(E.id) ? "v1" : "v2"].push(B(D({}, E), { name: E.name.replace("v2", "") })), S),
|
|
15904
15904
|
{ v1: [], v2: [] }
|
|
15905
15905
|
);
|
|
15906
|
-
return (u = (
|
|
15906
|
+
return (u = (d = (c = this.context.getValue("modules")) == null ? void 0 : c.devTools) == null ? void 0 : d.plugins) != null && u.length && ((f = (p = this.context.getValue("modules")) == null ? void 0 : p.devTools) == null || f.plugins.forEach((S) => {
|
|
15907
15907
|
var _, P, k;
|
|
15908
15908
|
const E = B(D({}, So), {
|
|
15909
15909
|
tags: [...So.tags],
|
|
@@ -15948,10 +15948,10 @@ class jt extends tM {
|
|
|
15948
15948
|
expiry: typeof i == "number" ? i : void 0
|
|
15949
15949
|
};
|
|
15950
15950
|
this.context.getValue("flagsmith").hasFeature(Z.FEAT_CHAT_SDK) && (n.viewType = r);
|
|
15951
|
-
const { getLocation: o, putLocation:
|
|
15951
|
+
const { getLocation: o, putLocation: c } = (yield this.requests.post("/v1/meetings/genPreSignedUploadUrl", n)).data.data;
|
|
15952
15952
|
return {
|
|
15953
15953
|
getLocation: o,
|
|
15954
|
-
putLocation:
|
|
15954
|
+
putLocation: c
|
|
15955
15955
|
};
|
|
15956
15956
|
});
|
|
15957
15957
|
}
|
|
@@ -16150,12 +16150,12 @@ const Qn = {
|
|
|
16150
16150
|
function Dt(s, t) {
|
|
16151
16151
|
return function(e, r, i) {
|
|
16152
16152
|
const n = i.value;
|
|
16153
|
-
let o = 0,
|
|
16154
|
-
return i.value = function(...
|
|
16153
|
+
let o = 0, c = Date.now();
|
|
16154
|
+
return i.value = function(...d) {
|
|
16155
16155
|
const u = Date.now(), p = t ? this[t] : s;
|
|
16156
|
-
if (u -
|
|
16156
|
+
if (u - c > p.period * 1e3 && (c = u, o = 0), o >= p.maxInvocations)
|
|
16157
16157
|
throw new R(`Method rate limit ${p.maxInvocations} invocations/${p.period}sec exceeded`, "0013");
|
|
16158
|
-
return o += 1, n.apply(this,
|
|
16158
|
+
return o += 1, n.apply(this, d);
|
|
16159
16159
|
}, i;
|
|
16160
16160
|
};
|
|
16161
16161
|
}
|
|
@@ -16188,12 +16188,12 @@ let Ye = (Cg = class extends qt {
|
|
|
16188
16188
|
setMaxTextLimit(t) {
|
|
16189
16189
|
this.maxTextLimit = t;
|
|
16190
16190
|
}
|
|
16191
|
-
sendMessageInternal(n, o,
|
|
16191
|
+
sendMessageInternal(n, o, c) {
|
|
16192
16192
|
return l(this, arguments, function* (t, e, r, i = {}) {
|
|
16193
16193
|
switch (t.type) {
|
|
16194
16194
|
case "text": {
|
|
16195
|
-
const
|
|
16196
|
-
yield this.sendTextMessageInternal(
|
|
16195
|
+
const d = i.replyTo && i.replyTo.type === "text" ? aM(t.message, i.replyTo.message) : t.message;
|
|
16196
|
+
yield this.sendTextMessageInternal(d, e, r);
|
|
16197
16197
|
break;
|
|
16198
16198
|
}
|
|
16199
16199
|
case "image":
|
|
@@ -16212,13 +16212,13 @@ let Ye = (Cg = class extends qt {
|
|
|
16212
16212
|
}
|
|
16213
16213
|
sendTextMessageInternal(t, e, r) {
|
|
16214
16214
|
return l(this, null, function* () {
|
|
16215
|
-
var n, o,
|
|
16215
|
+
var n, o, c, d, u, p;
|
|
16216
16216
|
if (t.length > this.maxTextLimit)
|
|
16217
16217
|
throw new R("Max character limit breached", "0503");
|
|
16218
16218
|
if (e && e.length > 0) {
|
|
16219
16219
|
if (!((n = a(this, ee).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, ee).permissions) != null && o.chatPrivate.text))
|
|
16220
16220
|
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new R("Could not send message to private chat.", "0501");
|
|
16221
|
-
} else if (!((
|
|
16221
|
+
} else if (!((d = (c = a(this, ee).permissions) == null ? void 0 : c.chatPublic) != null && d.canSend) || !((p = (u = a(this, ee).permissions) == null ? void 0 : u.chatPublic) != null && p.text))
|
|
16222
16222
|
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new R("Could not send message to public chat.", "0501");
|
|
16223
16223
|
if (!t)
|
|
16224
16224
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new R("Message can not be empty.", "0502");
|
|
@@ -16236,13 +16236,13 @@ let Ye = (Cg = class extends qt {
|
|
|
16236
16236
|
}
|
|
16237
16237
|
sendImageMessageInternal(t, e, r) {
|
|
16238
16238
|
return l(this, null, function* () {
|
|
16239
|
-
var n, o,
|
|
16239
|
+
var n, o, c, d, u, p;
|
|
16240
16240
|
if (e && e.length > 0) {
|
|
16241
16241
|
if (!((n = a(this, ee).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, ee).permissions) != null && o.chatPrivate.files)) {
|
|
16242
16242
|
this.logger.error("sendImageMessage::private_chat_permission_denied");
|
|
16243
16243
|
return;
|
|
16244
16244
|
}
|
|
16245
|
-
} else if (!((
|
|
16245
|
+
} else if (!((d = (c = a(this, ee).permissions) == null ? void 0 : c.chatPublic) != null && d.canSend) || !((p = (u = a(this, ee).permissions) == null ? void 0 : u.chatPublic) != null && p.files)) {
|
|
16246
16246
|
this.logger.error("sendImageMessage::permission_denied");
|
|
16247
16247
|
return;
|
|
16248
16248
|
}
|
|
@@ -16280,13 +16280,13 @@ let Ye = (Cg = class extends qt {
|
|
|
16280
16280
|
}
|
|
16281
16281
|
sendFileMessageInternal(t, e, r) {
|
|
16282
16282
|
return l(this, null, function* () {
|
|
16283
|
-
var i, n, o,
|
|
16283
|
+
var i, n, o, c, d, u;
|
|
16284
16284
|
if (e && e.length > 0) {
|
|
16285
16285
|
if (!((i = a(this, ee).permissions) != null && i.chatPrivate.canSend) || !((n = a(this, ee).permissions) != null && n.chatPrivate.files)) {
|
|
16286
16286
|
this.logger.error("sendFileMessage::private_chat_permission_denied");
|
|
16287
16287
|
return;
|
|
16288
16288
|
}
|
|
16289
|
-
} else if (!((
|
|
16289
|
+
} else if (!((c = (o = a(this, ee).permissions) == null ? void 0 : o.chatPublic) != null && c.canSend) || !((u = (d = a(this, ee).permissions) == null ? void 0 : d.chatPublic) != null && u.files)) {
|
|
16290
16290
|
this.logger.error("sendFileMessage::permission_denied");
|
|
16291
16291
|
return;
|
|
16292
16292
|
}
|
|
@@ -16341,13 +16341,13 @@ let Ye = (Cg = class extends qt {
|
|
|
16341
16341
|
}
|
|
16342
16342
|
sendCustomMessage(t, e) {
|
|
16343
16343
|
return l(this, null, function* () {
|
|
16344
|
-
var n, o,
|
|
16344
|
+
var n, o, c, d, u, p, f, S, E, _, P, k, A, N, H;
|
|
16345
16345
|
if (e && e.length > 0) {
|
|
16346
|
-
if (!((n = a(this, ee).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, ee).permissions) != null && o.chatPrivate.files) || !((
|
|
16346
|
+
if (!((n = a(this, ee).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, ee).permissions) != null && o.chatPrivate.files) || !((c = a(this, ee).permissions) != null && c.chatPrivate.text)) {
|
|
16347
16347
|
this.logger.error("sendCustomMessage::private_chat_permission_denied");
|
|
16348
16348
|
return;
|
|
16349
16349
|
}
|
|
16350
|
-
} else if (!((u = (
|
|
16350
|
+
} else if (!((u = (d = a(this, ee).permissions) == null ? void 0 : d.chatPublic) != null && u.canSend) || !((f = (p = a(this, ee).permissions) == null ? void 0 : p.chatPublic) != null && f.files) || !((E = (S = a(this, ee).permissions) == null ? void 0 : S.chatPublic) != null && E.text)) {
|
|
16351
16351
|
this.logger.error("sendCustomMessage::permission_denied");
|
|
16352
16352
|
return;
|
|
16353
16353
|
}
|
|
@@ -16403,10 +16403,10 @@ let Ye = (Cg = class extends qt {
|
|
|
16403
16403
|
}
|
|
16404
16404
|
editTextMessage(t, e, r) {
|
|
16405
16405
|
return l(this, null, function* () {
|
|
16406
|
-
var i, n, o,
|
|
16406
|
+
var i, n, o, c, d, u;
|
|
16407
16407
|
if (((n = (i = a(this, ee).permissions) == null ? void 0 : i.chatMessage) == null ? void 0 : n.canEdit) === "NONE")
|
|
16408
16408
|
throw new R("Not permitted to edit messages", "0501");
|
|
16409
|
-
if (!((
|
|
16409
|
+
if (!((c = (o = a(this, ee).permissions) == null ? void 0 : o.chatPublic) != null && c.canSend) || !((u = (d = a(this, ee).permissions) == null ? void 0 : d.chatPublic) != null && u.text)) {
|
|
16410
16410
|
this.logger.error("editTextMessage::permission_denied");
|
|
16411
16411
|
return;
|
|
16412
16412
|
}
|
|
@@ -16424,8 +16424,8 @@ let Ye = (Cg = class extends qt {
|
|
|
16424
16424
|
}
|
|
16425
16425
|
editImageMessage(t, e, r) {
|
|
16426
16426
|
return l(this, null, function* () {
|
|
16427
|
-
var n, o,
|
|
16428
|
-
if (!((o = (n = a(this, ee).permissions) == null ? void 0 : n.chatPublic) != null && o.canSend) || !((
|
|
16427
|
+
var n, o, c, d;
|
|
16428
|
+
if (!((o = (n = a(this, ee).permissions) == null ? void 0 : n.chatPublic) != null && o.canSend) || !((d = (c = a(this, ee).permissions) == null ? void 0 : c.chatPublic) != null && d.files)) {
|
|
16429
16429
|
this.logger.error("editImageMessage::permission_denied");
|
|
16430
16430
|
return;
|
|
16431
16431
|
}
|
|
@@ -16454,8 +16454,8 @@ let Ye = (Cg = class extends qt {
|
|
|
16454
16454
|
}
|
|
16455
16455
|
editFileMessage(t, e, r) {
|
|
16456
16456
|
return l(this, null, function* () {
|
|
16457
|
-
var i, n, o,
|
|
16458
|
-
if (!((n = (i = a(this, ee).permissions) == null ? void 0 : i.chatPublic) != null && n.canSend) || !((
|
|
16457
|
+
var i, n, o, c;
|
|
16458
|
+
if (!((n = (i = a(this, ee).permissions) == null ? void 0 : i.chatPublic) != null && n.canSend) || !((c = (o = a(this, ee).permissions) == null ? void 0 : o.chatPublic) != null && c.files)) {
|
|
16459
16459
|
this.logger.error("sendFileMessage::permission_denied");
|
|
16460
16460
|
return;
|
|
16461
16461
|
}
|
|
@@ -16464,11 +16464,11 @@ let Ye = (Cg = class extends qt {
|
|
|
16464
16464
|
return;
|
|
16465
16465
|
}
|
|
16466
16466
|
try {
|
|
16467
|
-
const
|
|
16467
|
+
const d = lt(), { getLocation: u, putLocation: p } = yield d.getPresignedUrls(
|
|
16468
16468
|
e.name,
|
|
16469
16469
|
a(this, ee).config.viewType
|
|
16470
16470
|
);
|
|
16471
|
-
yield
|
|
16471
|
+
yield d.uploadFile(e, p), a(this, Fe).editMessage(
|
|
16472
16472
|
t,
|
|
16473
16473
|
JSON.stringify({
|
|
16474
16474
|
link: u,
|
|
@@ -16478,7 +16478,7 @@ let Ye = (Cg = class extends qt {
|
|
|
16478
16478
|
_t.FILE,
|
|
16479
16479
|
r
|
|
16480
16480
|
);
|
|
16481
|
-
} catch (
|
|
16481
|
+
} catch (d) {
|
|
16482
16482
|
throw new R("Error editing file message.", "0500", this.logger);
|
|
16483
16483
|
}
|
|
16484
16484
|
});
|
|
@@ -16554,7 +16554,7 @@ let Ye = (Cg = class extends qt {
|
|
|
16554
16554
|
const o = yield a(this, Fe).getChatMessagesPaginated(t, e, r, i, n);
|
|
16555
16555
|
return {
|
|
16556
16556
|
messages: o.messages.map(
|
|
16557
|
-
(
|
|
16557
|
+
(c) => _s.formatSocketServiceMessage(c)
|
|
16558
16558
|
),
|
|
16559
16559
|
next: o.next
|
|
16560
16560
|
};
|
|
@@ -16574,10 +16574,10 @@ let Ye = (Cg = class extends qt {
|
|
|
16574
16574
|
}
|
|
16575
16575
|
if (!t || t.trim().length === 0)
|
|
16576
16576
|
throw new R("channel name cannot be empty.", "0510");
|
|
16577
|
-
const
|
|
16577
|
+
const c = [.../* @__PURE__ */ new Set([...e, a(this, ee).userId])];
|
|
16578
16578
|
return yield a(this, yi).createChannel(
|
|
16579
16579
|
t.trim(),
|
|
16580
|
-
|
|
16580
|
+
c,
|
|
16581
16581
|
r.displayPictureUrl,
|
|
16582
16582
|
r.visibility,
|
|
16583
16583
|
r.isDirectMessage
|
|
@@ -16585,7 +16585,7 @@ let Ye = (Cg = class extends qt {
|
|
|
16585
16585
|
});
|
|
16586
16586
|
}
|
|
16587
16587
|
updateChannel(t, e) {
|
|
16588
|
-
var o,
|
|
16588
|
+
var o, c, d, u, p;
|
|
16589
16589
|
const r = this.channels.find((f) => f.id === t), i = (o = a(this, ee).permissions) == null ? void 0 : o.chatChannel;
|
|
16590
16590
|
if (i) {
|
|
16591
16591
|
if (i.canUpdate === "NONE")
|
|
@@ -16596,8 +16596,8 @@ let Ye = (Cg = class extends qt {
|
|
|
16596
16596
|
throw new R("Not permitted to update private channels", "0501");
|
|
16597
16597
|
}
|
|
16598
16598
|
const n = {
|
|
16599
|
-
memberIds: (
|
|
16600
|
-
displayName: (
|
|
16599
|
+
memberIds: (c = e.memberIds) != null ? c : r.memberIds,
|
|
16600
|
+
displayName: (d = e.displayName) != null ? d : r.displayName,
|
|
16601
16601
|
displayPictureUrl: (u = e.displayPictureUrl) != null ? u : r.displayPictureUrl,
|
|
16602
16602
|
visibility: (p = e.visibility) != null ? p : r.visibility
|
|
16603
16603
|
};
|
|
@@ -16775,9 +16775,9 @@ const ci = (Rg = class {
|
|
|
16775
16775
|
images: i,
|
|
16776
16776
|
message: n,
|
|
16777
16777
|
videos: o,
|
|
16778
|
-
files:
|
|
16778
|
+
files: c
|
|
16779
16779
|
} = JSON.parse(s.payload);
|
|
16780
|
-
e.message = n, e.html = r, e.images = i, e.videos = o, e.files =
|
|
16780
|
+
e.message = n, e.html = r, e.images = i, e.videos = o, e.files = c;
|
|
16781
16781
|
break;
|
|
16782
16782
|
}
|
|
16783
16783
|
}
|
|
@@ -17141,10 +17141,10 @@ Hu = TM([
|
|
|
17141
17141
|
function EM(s) {
|
|
17142
17142
|
let t = "", e = [""];
|
|
17143
17143
|
const r = [e];
|
|
17144
|
-
let i = 0, n = 0, o = true,
|
|
17145
|
-
for (
|
|
17146
|
-
|
|
17147
|
-
` && o ? (t === "\r" && (e[i] = e[i].slice(0, -1)), e = r[++n] = [
|
|
17144
|
+
let i = 0, n = 0, o = true, c;
|
|
17145
|
+
for (c of s)
|
|
17146
|
+
c === '"' ? (o && c === t && (e[i] += c), o = !o) : c === "," && o ? c = e[++i] = "" : c === `
|
|
17147
|
+
` && o ? (t === "\r" && (e[i] = e[i].slice(0, -1)), e = r[++n] = [c = ""], i = 0) : e[i] += c, t = c;
|
|
17148
17148
|
return r;
|
|
17149
17149
|
}
|
|
17150
17150
|
var _M = Object.defineProperty, PM = Object.getOwnPropertyDescriptor, bf = (s, t, e, r) => {
|
|
@@ -17182,16 +17182,16 @@ let Zr = (Ig = class extends qt {
|
|
|
17182
17182
|
i,
|
|
17183
17183
|
n,
|
|
17184
17184
|
o,
|
|
17185
|
-
|
|
17186
|
-
|
|
17185
|
+
c,
|
|
17186
|
+
d
|
|
17187
17187
|
]] = EM(t);
|
|
17188
17188
|
return {
|
|
17189
17189
|
id: v4(),
|
|
17190
|
-
name:
|
|
17190
|
+
name: c,
|
|
17191
17191
|
peerId: i,
|
|
17192
17192
|
userId: n,
|
|
17193
17193
|
customParticipantId: o,
|
|
17194
|
-
transcript:
|
|
17194
|
+
transcript: d,
|
|
17195
17195
|
isPartialTranscript: e,
|
|
17196
17196
|
date: new Date(parseInt(r, 10) * 1e3)
|
|
17197
17197
|
};
|
|
@@ -17372,16 +17372,16 @@ const kf = (Ag = class {
|
|
|
17372
17372
|
let i;
|
|
17373
17373
|
try {
|
|
17374
17374
|
i = Zr.parseTranscript(e, r);
|
|
17375
|
-
} catch (
|
|
17376
|
-
this.logger.error(`Failed to parse transcript: ${e}`,
|
|
17375
|
+
} catch (d) {
|
|
17376
|
+
this.logger.error(`Failed to parse transcript: ${e}`, d);
|
|
17377
17377
|
}
|
|
17378
17378
|
if (!i) {
|
|
17379
17379
|
this.logger.warn("Received empty transcript data");
|
|
17380
17380
|
return;
|
|
17381
17381
|
}
|
|
17382
17382
|
this.ai.onTranscript(i), this.meta.emit("transcript", i);
|
|
17383
|
-
const { peerId: n, name: o, transcript:
|
|
17384
|
-
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${
|
|
17383
|
+
const { peerId: n, name: o, transcript: c } = i;
|
|
17384
|
+
this.logger.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
17385
17385
|
});
|
|
17386
17386
|
}
|
|
17387
17387
|
}, Ir = /* @__PURE__ */ new WeakMap(), za = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Ag);
|
|
@@ -17396,8 +17396,8 @@ var bM = Object.defineProperty, kM = Object.getOwnPropertyDescriptor, Ea = (s, t
|
|
|
17396
17396
|
}, Yt, Ya, ae, Jo, As, it, Ko, qu, Qa, fd;
|
|
17397
17397
|
class ri extends qt {
|
|
17398
17398
|
constructor(e, r, i, n, o) {
|
|
17399
|
-
const
|
|
17400
|
-
super(
|
|
17399
|
+
const c = e.getValue("logger");
|
|
17400
|
+
super(c);
|
|
17401
17401
|
g(this, Ko);
|
|
17402
17402
|
g(this, Qa);
|
|
17403
17403
|
g(this, Yt, void 0);
|
|
@@ -17420,8 +17420,8 @@ class ri extends qt {
|
|
|
17420
17420
|
m(this, As, n);
|
|
17421
17421
|
}),
|
|
17422
17422
|
[b.UPDATE_STAGE_REQUESTS]: (o) => l(this, [o], function* ({ add: n }) {
|
|
17423
|
-
const
|
|
17424
|
-
(n ||
|
|
17423
|
+
const c = a(this, As).length, { stageRequests: d } = this.getAccessRequests();
|
|
17424
|
+
(n || d.length > c) && this.emit("newStageRequest", { count: d.length }), this.emit("stageAccessRequestUpdate", d);
|
|
17425
17425
|
})
|
|
17426
17426
|
}, r = () => {
|
|
17427
17427
|
Object.entries(e).forEach(([n, o]) => {
|
|
@@ -17729,8 +17729,8 @@ let Kn = (Mg = class extends zn {
|
|
|
17729
17729
|
description: i,
|
|
17730
17730
|
id: n,
|
|
17731
17731
|
name: o,
|
|
17732
|
-
organizationId:
|
|
17733
|
-
picture:
|
|
17732
|
+
organizationId: c,
|
|
17733
|
+
picture: d,
|
|
17734
17734
|
private: u,
|
|
17735
17735
|
published: p,
|
|
17736
17736
|
staggered: f,
|
|
@@ -17765,7 +17765,7 @@ let Kn = (Mg = class extends zn {
|
|
|
17765
17765
|
h(this, "enabledBy");
|
|
17766
17766
|
g(this, Dr, void 0);
|
|
17767
17767
|
g(this, tn, void 0);
|
|
17768
|
-
m(this, Dr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, m(this, Ut, k), this.organizationId =
|
|
17768
|
+
m(this, Dr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, m(this, Ut, k), this.organizationId = c, this.picture = d, this.private = u, this.published = p, this.staggered = f, this.tags = S, this.type = E, this.updatedAt = new Date(_), this.active = false, this.iframes = /* @__PURE__ */ new Map(), m(this, at, P), m(this, Xa, A), m(this, Za, N), this.enabledBy = "", m(this, tn, H);
|
|
17769
17769
|
}
|
|
17770
17770
|
get telemetry() {
|
|
17771
17771
|
return a(this, Dr).getValue("telemetry");
|
|
@@ -17857,8 +17857,8 @@ let Kn = (Mg = class extends zn {
|
|
|
17857
17857
|
}
|
|
17858
17858
|
case Ie.chatMessage: {
|
|
17859
17859
|
const {
|
|
17860
|
-
messagePayload:
|
|
17861
|
-
peerIds:
|
|
17860
|
+
messagePayload: c,
|
|
17861
|
+
peerIds: d
|
|
17862
17862
|
} = r;
|
|
17863
17863
|
if (!a(this, Za)) {
|
|
17864
17864
|
this.sendIframeEvent({
|
|
@@ -17869,7 +17869,7 @@ let Kn = (Mg = class extends zn {
|
|
|
17869
17869
|
return;
|
|
17870
17870
|
}
|
|
17871
17871
|
try {
|
|
17872
|
-
yield a(this, Za).sendMessage(
|
|
17872
|
+
yield a(this, Za).sendMessage(c, d), this.sendIframeEvent({
|
|
17873
17873
|
type: Ie.chatMessage,
|
|
17874
17874
|
uuid: e.uuid,
|
|
17875
17875
|
payload: { success: true }
|
|
@@ -17886,25 +17886,25 @@ let Kn = (Mg = class extends zn {
|
|
|
17886
17886
|
break;
|
|
17887
17887
|
}
|
|
17888
17888
|
case Ie.getPeer: {
|
|
17889
|
-
let
|
|
17890
|
-
const { peerId:
|
|
17889
|
+
let c;
|
|
17890
|
+
const { peerId: d } = r, u = B(D({}, a(this, Ut)), {
|
|
17891
17891
|
id: a(this, Ut).id,
|
|
17892
17892
|
isRecorder: (o = a(this, Ut).permissions) == null ? void 0 : o.isRecorder,
|
|
17893
17893
|
isHidden: a(this, Ut).permissions.hiddenParticipant,
|
|
17894
17894
|
stageStatus: a(this, Ut).stageStatus
|
|
17895
17895
|
});
|
|
17896
|
-
|
|
17896
|
+
d ? (c = a(this, Xa).joined.get(r.peerId), a(this, Ut).id === d && (c = u)) : c = u, this.sendIframeEvent({
|
|
17897
17897
|
type: Ie.getPeer,
|
|
17898
|
-
payload: { peer:
|
|
17898
|
+
payload: { peer: c && Nd(c) },
|
|
17899
17899
|
uuid: e.uuid
|
|
17900
17900
|
});
|
|
17901
17901
|
break;
|
|
17902
17902
|
}
|
|
17903
17903
|
case Ie.getPeers: {
|
|
17904
|
-
const
|
|
17904
|
+
const c = a(this, Xa).joined.toArray().map((d) => Nd(d));
|
|
17905
17905
|
this.sendIframeEvent({
|
|
17906
17906
|
type: Ie.getPeers,
|
|
17907
|
-
payload: { peers:
|
|
17907
|
+
payload: { peers: c },
|
|
17908
17908
|
uuid: e.uuid
|
|
17909
17909
|
});
|
|
17910
17910
|
break;
|
|
@@ -17977,17 +17977,17 @@ let Kn = (Mg = class extends zn {
|
|
|
17977
17977
|
roomName: (o = a(this, Dr).getValue("meetingId")) != null ? o : "",
|
|
17978
17978
|
displayTitle: a(this, tn)
|
|
17979
17979
|
};
|
|
17980
|
-
if (Object.keys(n).forEach((
|
|
17981
|
-
i.searchParams.set(
|
|
17980
|
+
if (Object.keys(n).forEach((c) => {
|
|
17981
|
+
i.searchParams.set(c, n[c]);
|
|
17982
17982
|
}), r.src = i.href, r.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", r.title = e, navigator.isReactNative)
|
|
17983
|
-
r.props.onMessage = (
|
|
17984
|
-
this.handleIframeMessage(JSON.parse(
|
|
17983
|
+
r.props.onMessage = (c) => {
|
|
17984
|
+
this.handleIframeMessage(JSON.parse(c.nativeEvent.data));
|
|
17985
17985
|
}, this.iframes.set(e, { iframe: r });
|
|
17986
17986
|
else {
|
|
17987
|
-
const
|
|
17988
|
-
|
|
17987
|
+
const c = (d) => l(this, null, function* () {
|
|
17988
|
+
d.source === t.contentWindow && (yield this.handleIframeMessage(d.data));
|
|
17989
17989
|
});
|
|
17990
|
-
window.addEventListener("message",
|
|
17990
|
+
window.addEventListener("message", c), this.iframes.set(e, { iframe: r, listener: c });
|
|
17991
17991
|
}
|
|
17992
17992
|
}
|
|
17993
17993
|
setActive(t) {
|
|
@@ -18132,8 +18132,8 @@ class Mf extends Map {
|
|
|
18132
18132
|
return this.set(e.id, e, r);
|
|
18133
18133
|
}
|
|
18134
18134
|
set(e, r, i = true) {
|
|
18135
|
-
const n = super.set(e, r), o = (
|
|
18136
|
-
this.emit(
|
|
18135
|
+
const n = super.set(e, r), o = (c, ...d) => {
|
|
18136
|
+
this.emit(c, r, ...d);
|
|
18137
18137
|
};
|
|
18138
18138
|
return a(this, Ci).set(e, o), r.on("*", o), i && a(this, Ne).emit(this.onAddEvent, r), n;
|
|
18139
18139
|
}
|
|
@@ -18205,9 +18205,9 @@ const Df = (Dg = class {
|
|
|
18205
18205
|
get logger() {
|
|
18206
18206
|
return a(this, ls).getValue("logger");
|
|
18207
18207
|
}
|
|
18208
|
-
static init(s, t, e, r, i, n, o,
|
|
18208
|
+
static init(s, t, e, r, i, n, o, c) {
|
|
18209
18209
|
return l(this, null, function* () {
|
|
18210
|
-
const
|
|
18210
|
+
const d = s.getValue("logger"), u = new ju(d);
|
|
18211
18211
|
return t.forEach((p) => {
|
|
18212
18212
|
const f = new Kn(
|
|
18213
18213
|
s,
|
|
@@ -18216,7 +18216,7 @@ const Df = (Dg = class {
|
|
|
18216
18216
|
n,
|
|
18217
18217
|
o,
|
|
18218
18218
|
i,
|
|
18219
|
-
|
|
18219
|
+
c
|
|
18220
18220
|
);
|
|
18221
18221
|
u.all.add(f);
|
|
18222
18222
|
}), new Df(
|
|
@@ -18573,9 +18573,9 @@ let ma = (Og = class extends qt {
|
|
|
18573
18573
|
t === "stop" && (n.state = "STOPPING", this.emit("recordingUpdate", "STOPPING"));
|
|
18574
18574
|
try {
|
|
18575
18575
|
yield lt().updateRecording(n.id, t);
|
|
18576
|
-
} catch (
|
|
18576
|
+
} catch (c) {
|
|
18577
18577
|
throw this.logger.error("DyteRecording::stop::recording_failed_to_stop", {
|
|
18578
|
-
error:
|
|
18578
|
+
error: c
|
|
18579
18579
|
}), n.state !== o && (n.state = o, this.emit("recordingUpdate", o)), new R("Error while stopping recording", "1000", this.logger);
|
|
18580
18580
|
}
|
|
18581
18581
|
}));
|
|
@@ -18775,21 +18775,21 @@ class Ot extends zn {
|
|
|
18775
18775
|
audio: e,
|
|
18776
18776
|
video: r
|
|
18777
18777
|
}) {
|
|
18778
|
-
var
|
|
18778
|
+
var c;
|
|
18779
18779
|
e ? a(this, ke).getValue("callstats").audioOn() : a(this, ke).getValue("callstats").audioOff(), r ? a(this, ke).getValue("callstats").videoOn() : a(this, ke).getValue("callstats").videoOff();
|
|
18780
18780
|
let n, o;
|
|
18781
18781
|
if (e && r)
|
|
18782
18782
|
try {
|
|
18783
|
-
const
|
|
18783
|
+
const d = yield a(this, qe).getAudioAndVideoTrack(
|
|
18784
18784
|
a(this, ve).userSelectedDevice,
|
|
18785
18785
|
a(this, ge).userSelectedDevice
|
|
18786
18786
|
);
|
|
18787
|
-
n =
|
|
18788
|
-
} catch (
|
|
18787
|
+
n = d.audioTrack, o = d.videoTrack;
|
|
18788
|
+
} catch (d) {
|
|
18789
18789
|
this.logger.error(
|
|
18790
18790
|
"LocalMediaHandler::init::Failed to get audio video tracks",
|
|
18791
18791
|
{
|
|
18792
|
-
error:
|
|
18792
|
+
error: d
|
|
18793
18793
|
}
|
|
18794
18794
|
);
|
|
18795
18795
|
}
|
|
@@ -18799,9 +18799,9 @@ class Ot extends zn {
|
|
|
18799
18799
|
false,
|
|
18800
18800
|
a(this, ve).userSelectedDevice
|
|
18801
18801
|
);
|
|
18802
|
-
} catch (
|
|
18802
|
+
} catch (d) {
|
|
18803
18803
|
this.logger.error("LocalMediaHandler::init::Failed to get audio track", {
|
|
18804
|
-
error:
|
|
18804
|
+
error: d
|
|
18805
18805
|
});
|
|
18806
18806
|
}
|
|
18807
18807
|
if (!o && r)
|
|
@@ -18809,25 +18809,25 @@ class Ot extends zn {
|
|
|
18809
18809
|
o = yield a(this, qe).getVideoTrack(
|
|
18810
18810
|
a(this, ge).userSelectedDevice
|
|
18811
18811
|
);
|
|
18812
|
-
} catch (
|
|
18812
|
+
} catch (d) {
|
|
18813
18813
|
this.logger.error("LocalMediaHandler::init::Failed to get video track", {
|
|
18814
|
-
error:
|
|
18814
|
+
error: d
|
|
18815
18815
|
});
|
|
18816
18816
|
}
|
|
18817
18817
|
e && !n && a(this, ke).getValue("callstats").audioOff(), r && !o && a(this, ke).getValue("callstats").videoOff(), yield a(this, ve).setMediaTrack(n), yield a(this, ge).setMediaTrack(o);
|
|
18818
18818
|
try {
|
|
18819
18819
|
this.setupSpeaker();
|
|
18820
|
-
} catch (
|
|
18820
|
+
} catch (d) {
|
|
18821
18821
|
}
|
|
18822
18822
|
if (o) {
|
|
18823
|
-
const
|
|
18824
|
-
a(this, ke).getValue("callstats").selectedDevice("VIDEO",
|
|
18823
|
+
const d = yield this.getDeviceById(o.getSettings().deviceId);
|
|
18824
|
+
a(this, ke).getValue("callstats").selectedDevice("VIDEO", d);
|
|
18825
18825
|
}
|
|
18826
18826
|
if (n) {
|
|
18827
|
-
const
|
|
18828
|
-
a(this, ke).getValue("callstats").selectedDevice("AUDIO",
|
|
18827
|
+
const d = yield this.getDeviceById(n.getSettings().deviceId);
|
|
18828
|
+
a(this, ke).getValue("callstats").selectedDevice("AUDIO", d);
|
|
18829
18829
|
}
|
|
18830
|
-
(
|
|
18830
|
+
(c = a(this, zs).currentDevice) != null && c.deviceId && a(this, ke).getValue("callstats").selectedDevice("SPEAKER", a(this, zs).currentDevice), a(this, qe).onDeviceChange((d, u, p) => {
|
|
18831
18831
|
this.onDeviceChange(u, p);
|
|
18832
18832
|
});
|
|
18833
18833
|
});
|
|
@@ -19001,13 +19001,13 @@ class Ot extends zn {
|
|
|
19001
19001
|
return l(this, null, function* () {
|
|
19002
19002
|
var i, n;
|
|
19003
19003
|
this.emit("DEVICE_LIST_UPDATED", e), !(r || !a(this, Qo)) && ((i = e == null ? void 0 : e.added) == null || i.forEach((o) => l(this, null, function* () {
|
|
19004
|
-
var
|
|
19005
|
-
o && !Gu(o) && (o.kind === "audioinput" && ((
|
|
19004
|
+
var c;
|
|
19005
|
+
o && !Gu(o) && (o.kind === "audioinput" && ((c = this.audioTrack) == null ? void 0 : c.enabled) === true ? yield this.setAudioDevice(o) : o.kind === "audiooutput" && (yield this.setSpeakerDevice(o)));
|
|
19006
19006
|
})), (n = e == null ? void 0 : e.removed) == null || n.forEach((o) => l(this, null, function* () {
|
|
19007
|
-
var
|
|
19008
|
-
if (o.kind === "audiooutput" && ((
|
|
19009
|
-
const
|
|
19010
|
-
|
|
19007
|
+
var c;
|
|
19008
|
+
if (o.kind === "audiooutput" && ((c = this.getCurrentDevices().speaker) == null ? void 0 : c.deviceId) === o.deviceId) {
|
|
19009
|
+
const d = (yield this.getSpeakerDevices()).find((u) => u.deviceId !== o.deviceId);
|
|
19010
|
+
d && (yield this.setSpeakerDevice(d));
|
|
19011
19011
|
}
|
|
19012
19012
|
})));
|
|
19013
19013
|
});
|
|
@@ -19131,21 +19131,21 @@ function YM(s, t, e) {
|
|
|
19131
19131
|
if (!(t != null && t.length))
|
|
19132
19132
|
return e;
|
|
19133
19133
|
const r = s.getValue("logger"), i = new AudioContext(), n = yield Promise.all(
|
|
19134
|
-
t == null ? void 0 : t.map((
|
|
19134
|
+
t == null ? void 0 : t.map((d) => d(i))
|
|
19135
19135
|
), o = i.createMediaStreamSource(
|
|
19136
19136
|
new MediaStream([e])
|
|
19137
|
-
),
|
|
19137
|
+
), c = i.createMediaStreamDestination();
|
|
19138
19138
|
try {
|
|
19139
|
-
let
|
|
19139
|
+
let d = o;
|
|
19140
19140
|
for (let u = 0; u < n.length; u += 1)
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
} catch (
|
|
19141
|
+
d.connect(n[u]), d = n[u];
|
|
19142
|
+
d.connect(c);
|
|
19143
|
+
} catch (d) {
|
|
19144
19144
|
return r.error("getTransformedAudioTrack::middleware_execution_failed", {
|
|
19145
|
-
error:
|
|
19145
|
+
error: d
|
|
19146
19146
|
}), e;
|
|
19147
19147
|
}
|
|
19148
|
-
return
|
|
19148
|
+
return c.stream.getAudioTracks()[0];
|
|
19149
19149
|
});
|
|
19150
19150
|
}
|
|
19151
19151
|
var bi, Xo;
|
|
@@ -19182,21 +19182,21 @@ class QM {
|
|
|
19182
19182
|
value: e.getSettings()
|
|
19183
19183
|
}), E;
|
|
19184
19184
|
}
|
|
19185
|
-
const o = document.createElement("video"),
|
|
19186
|
-
|
|
19187
|
-
const
|
|
19188
|
-
o.srcObject =
|
|
19185
|
+
const o = document.createElement("video"), c = new MediaStream();
|
|
19186
|
+
c.addTrack(e);
|
|
19187
|
+
const d = i.getContext("2d");
|
|
19188
|
+
o.srcObject = c, o.autoplay = true, this.terminateMiddlewareWebWorker();
|
|
19189
19189
|
const u = () => l(this, null, function* () {
|
|
19190
19190
|
if (e.enabled === false || e.readyState === "ended") {
|
|
19191
19191
|
this.terminateMiddlewareWebWorker(), o.remove(), i.remove();
|
|
19192
19192
|
return;
|
|
19193
19193
|
}
|
|
19194
19194
|
try {
|
|
19195
|
-
|
|
19195
|
+
d.drawImage(o, 0, 0);
|
|
19196
19196
|
for (let S = 0; S < n.length; S += 1)
|
|
19197
19197
|
typeof n[S] == "function" && (yield n[S](
|
|
19198
19198
|
i,
|
|
19199
|
-
|
|
19199
|
+
d
|
|
19200
19200
|
));
|
|
19201
19201
|
} catch (S) {
|
|
19202
19202
|
this.logger.error(
|
|
@@ -19290,16 +19290,16 @@ const lg = {
|
|
|
19290
19290
|
}
|
|
19291
19291
|
]]
|
|
19292
19292
|
], ZM = (s, t) => {
|
|
19293
|
-
var
|
|
19294
|
-
const e = "getSettings" in t && t.getSettings().width || "getConstraints" in t && t.getConstraints().width || "originalSettings" in t && ((
|
|
19293
|
+
var c;
|
|
19294
|
+
const e = "getSettings" in t && t.getSettings().width || "getConstraints" in t && t.getConstraints().width || "originalSettings" in t && ((c = t.originalSettings) == null ? void 0 : c.width);
|
|
19295
19295
|
let r = XM;
|
|
19296
19296
|
s.getValue("flagsmith").hasFeature(Z.OVERRIDE_HIVE_SIMULCAST_DYNAMIC) && (r = JSON.parse(s.getValue("flagsmith").getValue(
|
|
19297
19297
|
Z.OVERRIDE_HIVE_SIMULCAST_DYNAMIC
|
|
19298
19298
|
)));
|
|
19299
|
-
const i = r.map(([
|
|
19299
|
+
const i = r.map(([d]) => d).sort((d, u) => d - u);
|
|
19300
19300
|
let n = Number.MAX_VALUE, o = 0;
|
|
19301
|
-
return i.forEach((
|
|
19302
|
-
Math.abs(
|
|
19301
|
+
return i.forEach((d, u) => {
|
|
19302
|
+
Math.abs(d - e) < n && (n = Math.abs(d - e), o = u);
|
|
19303
19303
|
}), r[o][1];
|
|
19304
19304
|
};
|
|
19305
19305
|
var pe = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(pe || {});
|
|
@@ -19323,12 +19323,12 @@ class s0 {
|
|
|
19323
19323
|
var u, p, f, S, E, _, P, k, A, N, H;
|
|
19324
19324
|
const t2 = (u = a(this, ki)) == null ? void 0 : u.screenshare, e2 = (f = (p = t2 == null ? void 0 : t2.width) == null ? void 0 : p.max) != null ? f : 1920, r = (E = (S = t2 == null ? void 0 : t2.height) == null ? void 0 : S.max) != null ? E : 1080, i = (P = (_ = t2 == null ? void 0 : t2.frameRate) == null ? void 0 : _.max) != null ? P : 5;
|
|
19325
19325
|
let n = (A = (k = t2 == null ? void 0 : t2.frameRate) == null ? void 0 : k.ideal) != null ? A : 5;
|
|
19326
|
-
const o = t2 == null ? void 0 : t2.displaySurface,
|
|
19326
|
+
const o = t2 == null ? void 0 : t2.displaySurface, c = t2 == null ? void 0 : t2.selfBrowserSurface;
|
|
19327
19327
|
a(this, Ms).getValue("flagsmith").getValue(Z.VAL_MIN_FRAMERATE) && (n = parseInt(
|
|
19328
19328
|
(N = a(this, Ms).getValue("flagsmith").getValue(Z.VAL_MIN_FRAMERATE)) == null ? void 0 : N.toString(),
|
|
19329
19329
|
10
|
|
19330
19330
|
));
|
|
19331
|
-
let
|
|
19331
|
+
let d = {
|
|
19332
19332
|
width: { max: e2 },
|
|
19333
19333
|
height: { max: r },
|
|
19334
19334
|
frameRate: {
|
|
@@ -19340,21 +19340,21 @@ class s0 {
|
|
|
19340
19340
|
const $ = (H = a(this, Ms).getValue("flagsmith").getValue(
|
|
19341
19341
|
Z.SCREENSHARE_CONSTRAINTS
|
|
19342
19342
|
)) == null ? void 0 : H.toString();
|
|
19343
|
-
|
|
19343
|
+
d = JSON.parse($);
|
|
19344
19344
|
}
|
|
19345
|
-
return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (
|
|
19345
|
+
return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (d = B(D({}, d), { displaySurface: o })), c !== void 0 && (d = B(D({}, d), { selfBrowserSurface: c })), {
|
|
19346
19346
|
audio: true,
|
|
19347
|
-
video:
|
|
19347
|
+
video: d
|
|
19348
19348
|
};
|
|
19349
19349
|
});
|
|
19350
19350
|
h(this, "getAudioConstraints", (t2) => {
|
|
19351
|
-
var n, o,
|
|
19351
|
+
var n, o, c, d, u, p, f, S;
|
|
19352
19352
|
const e2 = {}, r = (n = a(this, ki)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
19353
19353
|
return Te.isFirefox() || Te.isWebKitBased() ? (e2.audio = {
|
|
19354
19354
|
deviceId: t2,
|
|
19355
19355
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : true,
|
|
19356
|
-
echoCancellation: (
|
|
19357
|
-
noiseSuppression: (
|
|
19356
|
+
echoCancellation: (c = r == null ? void 0 : r.echoCancellation) != null ? c : true,
|
|
19357
|
+
noiseSuppression: (d = r == null ? void 0 : r.noiseSupression) != null ? d : true,
|
|
19358
19358
|
channelCount: i
|
|
19359
19359
|
}, e2) : (e2.audio = {}, e2.audio.optional = [
|
|
19360
19360
|
t2 ? { sourceId: t2 } : { sourceId: "default" },
|
|
@@ -19367,15 +19367,15 @@ class s0 {
|
|
|
19367
19367
|
], e2);
|
|
19368
19368
|
});
|
|
19369
19369
|
h(this, "getVideoConstraints", (t2) => {
|
|
19370
|
-
var n, o,
|
|
19370
|
+
var n, o, c, d;
|
|
19371
19371
|
const e2 = {}, r = (n = a(this, ki)) == null ? void 0 : n.video;
|
|
19372
19372
|
let i = lg.vga;
|
|
19373
19373
|
if (typeof r == "string" ? i = lg[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
|
|
19374
|
-
ideal: (
|
|
19374
|
+
ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
|
|
19375
19375
|
}, Te.isChromiumBased() && (i.frameRate.max = 30), a(this, Ms).getValue("flagsmith").hasFeature(Z.VIDEO_CONSTRAINTS)) {
|
|
19376
|
-
const u = (
|
|
19376
|
+
const u = (d = a(this, Ms).getValue("flagsmith").getValue(
|
|
19377
19377
|
Z.VIDEO_CONSTRAINTS
|
|
19378
|
-
)) == null ? void 0 :
|
|
19378
|
+
)) == null ? void 0 : d.toString();
|
|
19379
19379
|
i = JSON.parse(u);
|
|
19380
19380
|
}
|
|
19381
19381
|
return e2.video = i, typeof e2.video == "boolean" || (t2 ? e2.video.deviceId = { exact: t2 } : e2.video.facingMode = "user"), e2;
|
|
@@ -19505,26 +19505,26 @@ let Bt = (Ng = class extends r0 {
|
|
|
19505
19505
|
const i = (n) => l(this, null, function* () {
|
|
19506
19506
|
let o;
|
|
19507
19507
|
try {
|
|
19508
|
-
r = r.filter((
|
|
19508
|
+
r = r.filter((d) => d.deviceId !== n), o = a(this, Zt).getAudioConstraints(n), this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
19509
19509
|
constraints: JSON.stringify(o)
|
|
19510
19510
|
});
|
|
19511
|
-
const [
|
|
19511
|
+
const [c] = (yield navigator.mediaDevices.getUserMedia(o)).getAudioTracks();
|
|
19512
19512
|
return this.logger.info("getUserMediaWithoutTimeout::received_user_media", {
|
|
19513
19513
|
constraints: JSON.stringify(o)
|
|
19514
|
-
}),
|
|
19515
|
-
} catch (
|
|
19516
|
-
const
|
|
19514
|
+
}), c;
|
|
19515
|
+
} catch (c) {
|
|
19516
|
+
const d = od(
|
|
19517
19517
|
"audio",
|
|
19518
|
-
|
|
19519
|
-
|
|
19520
|
-
), u = new mu(
|
|
19521
|
-
if (
|
|
19518
|
+
c.name,
|
|
19519
|
+
c.message
|
|
19520
|
+
), u = new mu(c.name, c.message, o);
|
|
19521
|
+
if (d === "COULD_NOT_START") {
|
|
19522
19522
|
const p = r.shift();
|
|
19523
19523
|
if (!p)
|
|
19524
19524
|
throw u;
|
|
19525
19525
|
this.logger.info("getAudioTrack::gum_failed", {
|
|
19526
19526
|
constraints: JSON.stringify(o),
|
|
19527
|
-
error:
|
|
19527
|
+
error: c
|
|
19528
19528
|
});
|
|
19529
19529
|
const f = a(this, Zt).getAudioConstraints(
|
|
19530
19530
|
p.deviceId
|
|
@@ -19549,16 +19549,16 @@ let Bt = (Ng = class extends r0 {
|
|
|
19549
19549
|
}
|
|
19550
19550
|
getVideoTrack(t) {
|
|
19551
19551
|
return l(this, null, function* () {
|
|
19552
|
-
var
|
|
19553
|
-
const e = a(this, Le).getValue("flagsmith").hasFeature(Z.OBS_QUALITY), r = (
|
|
19552
|
+
var c;
|
|
19553
|
+
const e = a(this, Le).getValue("flagsmith").hasFeature(Z.OBS_QUALITY), r = (c = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : c.includes("OBS Virtual"), i = e && r, n = yield this.getVideoInputDevices();
|
|
19554
19554
|
if (n.length === 0)
|
|
19555
19555
|
throw this.permissions.video = "NO_DEVICES_AVAILABLE", a(this, Le).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
19556
19556
|
message: this.permissions.video,
|
|
19557
19557
|
kind: "video"
|
|
19558
19558
|
}), new R("No video devices available", "1607");
|
|
19559
|
-
const o = (
|
|
19559
|
+
const o = (d) => l(this, null, function* () {
|
|
19560
19560
|
try {
|
|
19561
|
-
let u =
|
|
19561
|
+
let u = d;
|
|
19562
19562
|
const { video: p } = u;
|
|
19563
19563
|
i && typeof p != "boolean" && (u = {
|
|
19564
19564
|
video: { deviceId: p.deviceId }
|
|
@@ -19582,13 +19582,13 @@ let Bt = (Ng = class extends r0 {
|
|
|
19582
19582
|
"video",
|
|
19583
19583
|
u.name,
|
|
19584
19584
|
u.message
|
|
19585
|
-
), f = new mu(u.name, u.message,
|
|
19585
|
+
), f = new mu(u.name, u.message, d);
|
|
19586
19586
|
if (p === "COULD_NOT_START") {
|
|
19587
19587
|
const S = n.shift();
|
|
19588
19588
|
if (!S)
|
|
19589
19589
|
throw f;
|
|
19590
19590
|
this.logger.info("getVideoTrack::gum_failed", {
|
|
19591
|
-
constraints: JSON.stringify(
|
|
19591
|
+
constraints: JSON.stringify(d),
|
|
19592
19592
|
error: u
|
|
19593
19593
|
});
|
|
19594
19594
|
const E = a(this, Zt).getVideoConstraints(
|
|
@@ -19602,13 +19602,13 @@ let Bt = (Ng = class extends r0 {
|
|
|
19602
19602
|
}
|
|
19603
19603
|
});
|
|
19604
19604
|
try {
|
|
19605
|
-
const
|
|
19605
|
+
const d = a(this, Zt).getVideoConstraints(t), u = yield o(d);
|
|
19606
19606
|
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", a(this, Le).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
19607
19607
|
message: this.permissions.video,
|
|
19608
19608
|
kind: "video"
|
|
19609
19609
|
})), u;
|
|
19610
|
-
} catch (
|
|
19611
|
-
throw
|
|
19610
|
+
} catch (d) {
|
|
19611
|
+
throw d.constraints && this.handlePermissionErrors("video", d), new R(d.message, "1602");
|
|
19612
19612
|
}
|
|
19613
19613
|
});
|
|
19614
19614
|
}
|
|
@@ -19702,23 +19702,23 @@ let Bt = (Ng = class extends r0 {
|
|
|
19702
19702
|
var u, p;
|
|
19703
19703
|
const r = (f) => `${f.kind}-${f.deviceId}-${f.groupId}`, i = this.availableDevices, n = new Set(
|
|
19704
19704
|
i.map((f) => r(f))
|
|
19705
|
-
), o = yield this.getAvailableDevices(),
|
|
19705
|
+
), o = yield this.getAvailableDevices(), c = new Set(
|
|
19706
19706
|
o.map((f) => r(f))
|
|
19707
|
-
),
|
|
19707
|
+
), d = {
|
|
19708
19708
|
added: o.filter(
|
|
19709
19709
|
(f) => !n.has(r(f))
|
|
19710
19710
|
),
|
|
19711
19711
|
removed: i.filter(
|
|
19712
|
-
(f) => !
|
|
19712
|
+
(f) => !c.has(r(f))
|
|
19713
19713
|
),
|
|
19714
19714
|
devices: o
|
|
19715
19715
|
};
|
|
19716
|
-
if ((u =
|
|
19716
|
+
if ((u = d.added) != null && u.length || (p = d.removed) != null && p.length) {
|
|
19717
19717
|
this.logger.info("repopulated_full_device_list", {
|
|
19718
19718
|
devices: JSON.stringify(o)
|
|
19719
19719
|
});
|
|
19720
|
-
const f = [...
|
|
19721
|
-
f.some((S) => S.kind === "audioinput") && a(this, Le).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((S) => S.kind === "audioinput")), f.some((S) => S.kind === "videoinput") && a(this, Le).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((S) => S.kind === "videoinput")), f.some((S) => S.kind === "audiooutput") && a(this, Le).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((S) => S.kind === "audiooutput")), t(e,
|
|
19720
|
+
const f = [...d.added, ...d.removed];
|
|
19721
|
+
f.some((S) => S.kind === "audioinput") && a(this, Le).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((S) => S.kind === "audioinput")), f.some((S) => S.kind === "videoinput") && a(this, Le).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((S) => S.kind === "videoinput")), f.some((S) => S.kind === "audiooutput") && a(this, Le).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((S) => S.kind === "audiooutput")), t(e, d, false);
|
|
19722
19722
|
}
|
|
19723
19723
|
}),
|
|
19724
19724
|
{ signal: a(this, on).signal }
|
|
@@ -19787,14 +19787,14 @@ const Nf = Bt, Mo = {
|
|
|
19787
19787
|
const r = typeof e == "number" ? e : 250, i = s.createMediaStreamSource(t), n = s.createAnalyser();
|
|
19788
19788
|
n.fftSize = 2048, i.connect(n);
|
|
19789
19789
|
const o = new Uint8Array(n.fftSize);
|
|
19790
|
-
let
|
|
19790
|
+
let c = false;
|
|
19791
19791
|
setTimeout(() => {
|
|
19792
|
-
|
|
19792
|
+
c = true;
|
|
19793
19793
|
}, r);
|
|
19794
|
-
function
|
|
19795
|
-
return
|
|
19794
|
+
function d() {
|
|
19795
|
+
return c ? Promise.resolve(true) : (n.getByteTimeDomainData(o), o.some((u) => u !== 128 && u !== 0) ? Promise.resolve(false) : n0().then(d));
|
|
19796
19796
|
}
|
|
19797
|
-
return
|
|
19797
|
+
return d().then(
|
|
19798
19798
|
(u) => (i.disconnect(), u),
|
|
19799
19799
|
(u) => {
|
|
19800
19800
|
throw i.disconnect(), u;
|
|
@@ -19909,23 +19909,23 @@ let Ld = class extends zn {
|
|
|
19909
19909
|
get mediaTrack() {
|
|
19910
19910
|
return this._mediaTrack;
|
|
19911
19911
|
}
|
|
19912
|
-
setMediaTrack(t) {
|
|
19912
|
+
setMediaTrack(t, e = false) {
|
|
19913
19913
|
return l(this, null, function* () {
|
|
19914
|
-
const
|
|
19914
|
+
const r = (i) => {
|
|
19915
19915
|
this.logger.error(`${this.constructorName}.setMediaTrack.error`, {
|
|
19916
|
-
error:
|
|
19916
|
+
error: i
|
|
19917
19917
|
});
|
|
19918
19918
|
};
|
|
19919
19919
|
try {
|
|
19920
19920
|
this.disableTrack();
|
|
19921
|
-
} catch (
|
|
19922
|
-
|
|
19921
|
+
} catch (i) {
|
|
19922
|
+
r(i);
|
|
19923
19923
|
}
|
|
19924
|
-
this._mediaTrack = yield this.conditionallyChangeTrack(t), yield this.setTransformedTrack();
|
|
19924
|
+
this._mediaTrack = yield this.conditionallyChangeTrack(t, e), yield this.setTransformedTrack();
|
|
19925
19925
|
try {
|
|
19926
19926
|
this.addMediaTrackListeners(), yield this.setCurrentDevice();
|
|
19927
|
-
} catch (
|
|
19928
|
-
|
|
19927
|
+
} catch (i) {
|
|
19928
|
+
r(i);
|
|
19929
19929
|
}
|
|
19930
19930
|
});
|
|
19931
19931
|
}
|
|
@@ -20095,7 +20095,7 @@ class Wl extends Vf {
|
|
|
20095
20095
|
return;
|
|
20096
20096
|
}
|
|
20097
20097
|
if (e) {
|
|
20098
|
-
this.isCustomTrack = true, yield this.setMediaTrack(e);
|
|
20098
|
+
this.isCustomTrack = true, yield this.setMediaTrack(e, true);
|
|
20099
20099
|
return;
|
|
20100
20100
|
}
|
|
20101
20101
|
this.isCustomTrack = false;
|
|
@@ -20136,52 +20136,52 @@ class Wl extends Vf {
|
|
|
20136
20136
|
onTrackMuted() {
|
|
20137
20137
|
this.logger.info("AudioMediaHandler.TrackMuted"), this.emit("trackMuted");
|
|
20138
20138
|
}
|
|
20139
|
-
conditionallyChangeTrack(t) {
|
|
20139
|
+
conditionallyChangeTrack(t, e = false) {
|
|
20140
20140
|
return l(this, null, function* () {
|
|
20141
20141
|
var d;
|
|
20142
|
-
if (!t || this.userSelectedDevice)
|
|
20142
|
+
if (!t || this.userSelectedDevice || e)
|
|
20143
20143
|
return t;
|
|
20144
|
-
let
|
|
20145
|
-
const
|
|
20146
|
-
if (!(
|
|
20147
|
-
return
|
|
20148
|
-
|
|
20149
|
-
(
|
|
20150
|
-
) || (
|
|
20144
|
+
let r = t;
|
|
20145
|
+
const i = yield this.mediaInterface.getAudioInputDevices(), n = this.isNonPreferredDevice ? i.filter((u) => u && !this.isNonPreferredDevice(u)) : i;
|
|
20146
|
+
if (!(n != null && n.length))
|
|
20147
|
+
return r;
|
|
20148
|
+
n.find(
|
|
20149
|
+
(u) => u.deviceId === t.getSettings().deviceId
|
|
20150
|
+
) || (r.stop(), this.logger.info("localmediahandler::setupstreams::found_audio_non_preferred"), r = yield this.mediaInterface.getAudioTrack(
|
|
20151
20151
|
false,
|
|
20152
|
-
|
|
20152
|
+
n[0].deviceId
|
|
20153
20153
|
));
|
|
20154
|
-
const
|
|
20154
|
+
const o = JSON.parse(
|
|
20155
20155
|
Mo.getItem(fu, this.logger)
|
|
20156
20156
|
);
|
|
20157
|
-
if (
|
|
20158
|
-
(
|
|
20157
|
+
if (o != null && o.devices.some(
|
|
20158
|
+
(u) => u.label === r.label
|
|
20159
20159
|
))
|
|
20160
|
-
return
|
|
20161
|
-
if (!(yield hg(this.logger,
|
|
20162
|
-
const
|
|
20163
|
-
label:
|
|
20164
|
-
})) != null ? d : [{ label:
|
|
20160
|
+
return r;
|
|
20161
|
+
if (!(yield hg(this.logger, r))) {
|
|
20162
|
+
const u = (d = o == null ? void 0 : o.devices.concat({
|
|
20163
|
+
label: r.label
|
|
20164
|
+
})) != null ? d : [{ label: r.label }];
|
|
20165
20165
|
return Mo.setItem(fu, JSON.stringify({
|
|
20166
|
-
devices:
|
|
20167
|
-
}), this.logger),
|
|
20166
|
+
devices: u
|
|
20167
|
+
}), this.logger), r;
|
|
20168
20168
|
}
|
|
20169
20169
|
this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack");
|
|
20170
|
-
const
|
|
20171
|
-
return
|
|
20172
|
-
if (
|
|
20170
|
+
const c = r.getSettings().deviceId;
|
|
20171
|
+
return n.filter((u) => u.deviceId !== c).some((u) => l(this, null, function* () {
|
|
20172
|
+
if (r = yield this.mediaInterface.getAudioTrack(
|
|
20173
20173
|
false,
|
|
20174
|
-
|
|
20175
|
-
), !(yield hg(this.logger,
|
|
20176
|
-
const
|
|
20177
|
-
label:
|
|
20174
|
+
u.deviceId
|
|
20175
|
+
), !(yield hg(this.logger, r))) {
|
|
20176
|
+
const p = o.devices.concat({
|
|
20177
|
+
label: r.label
|
|
20178
20178
|
});
|
|
20179
20179
|
return Mo.setItem(fu, JSON.stringify({
|
|
20180
|
-
devices:
|
|
20180
|
+
devices: p
|
|
20181
20181
|
}), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), true;
|
|
20182
20182
|
}
|
|
20183
20183
|
return this.logger.info("AudioMediaHandler.conditionallyChangeTrack.AnotherSilentTrackFound"), false;
|
|
20184
|
-
})),
|
|
20184
|
+
})), r;
|
|
20185
20185
|
});
|
|
20186
20186
|
}
|
|
20187
20187
|
}
|
|
@@ -20210,7 +20210,7 @@ class S0 {
|
|
|
20210
20210
|
let e = t;
|
|
20211
20211
|
if (t || ([e] = (yield a(this, cn).getAvailableDevicesByKind(
|
|
20212
20212
|
"audiooutput"
|
|
20213
|
-
)).filter((
|
|
20213
|
+
)).filter((c) => !Gu(c))), !e)
|
|
20214
20214
|
throw new R("No speaker found", "1608");
|
|
20215
20215
|
if (((i = this.currentDevice) == null ? void 0 : i.deviceId) === e.deviceId)
|
|
20216
20216
|
return;
|
|
@@ -20220,7 +20220,7 @@ class S0 {
|
|
|
20220
20220
|
if (typeof o.sinkId != "undefined" && this.currentDevice.deviceId && o.sinkId !== this.currentDevice.deviceId)
|
|
20221
20221
|
try {
|
|
20222
20222
|
yield o.setSinkId(this.currentDevice.deviceId);
|
|
20223
|
-
} catch (
|
|
20223
|
+
} catch (c) {
|
|
20224
20224
|
}
|
|
20225
20225
|
}));
|
|
20226
20226
|
});
|
|
@@ -20351,7 +20351,7 @@ class zc extends Vf {
|
|
|
20351
20351
|
return;
|
|
20352
20352
|
}
|
|
20353
20353
|
if (r) {
|
|
20354
|
-
this.isCustomTrack = true, yield this.setMediaTrack(r);
|
|
20354
|
+
this.isCustomTrack = true, yield this.setMediaTrack(r, true);
|
|
20355
20355
|
return;
|
|
20356
20356
|
}
|
|
20357
20357
|
this.isCustomTrack = false;
|
|
@@ -20415,19 +20415,19 @@ class zc extends Vf {
|
|
|
20415
20415
|
onTrackMuted() {
|
|
20416
20416
|
this.logger.info("VideoMediaHandler.TrackMuted"), this.emit("trackMuted");
|
|
20417
20417
|
}
|
|
20418
|
-
conditionallyChangeTrack(e) {
|
|
20418
|
+
conditionallyChangeTrack(e, r = false) {
|
|
20419
20419
|
return l(this, null, function* () {
|
|
20420
|
-
if (!e || this.userSelectedDevice)
|
|
20420
|
+
if (!e || this.userSelectedDevice || r)
|
|
20421
20421
|
return e;
|
|
20422
|
-
let
|
|
20423
|
-
const
|
|
20424
|
-
|
|
20425
|
-
)) :
|
|
20426
|
-
return !(
|
|
20427
|
-
(
|
|
20428
|
-
) || (
|
|
20429
|
-
|
|
20430
|
-
)),
|
|
20422
|
+
let i = e;
|
|
20423
|
+
const n = yield this.mediaInterface.getVideoInputDevices(), o = this.isNonPreferredDevice ? n.filter((c) => !this.isNonPreferredDevice(
|
|
20424
|
+
c
|
|
20425
|
+
)) : n;
|
|
20426
|
+
return !(o != null && o.length) || window.FAST_DYTE || o.find(
|
|
20427
|
+
(c) => c.deviceId === e.getSettings().deviceId
|
|
20428
|
+
) || (i.stop(), this.logger.info("localmediahandler::setupstreams::found_video_non_preferred"), i = yield this.mediaInterface.getVideoTrack(
|
|
20429
|
+
o[0].deviceId
|
|
20430
|
+
)), i;
|
|
20431
20431
|
});
|
|
20432
20432
|
}
|
|
20433
20433
|
}
|
|
@@ -20533,11 +20533,11 @@ const Da = class {
|
|
|
20533
20533
|
return a(this, Ii).configDiff;
|
|
20534
20534
|
}
|
|
20535
20535
|
get mediaConstraints() {
|
|
20536
|
-
var t, e, r, i, n, o,
|
|
20536
|
+
var t, e, r, i, n, o, c, d, u, p, f, S, E, _, P, k, A, N, H, $, F, K, re, Je;
|
|
20537
20537
|
return {
|
|
20538
20538
|
audio: {
|
|
20539
20539
|
enableStereo: (i = (r = (e = (t = a(this, Rt)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Ca.audio.enableStereo,
|
|
20540
|
-
enableHighBitrate: (
|
|
20540
|
+
enableHighBitrate: (d = (c = (o = (n = a(this, Rt)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Ca.audio.enableHighBitrate
|
|
20541
20541
|
},
|
|
20542
20542
|
video: {
|
|
20543
20543
|
quality: (S = (f = (p = (u = a(this, Rt)) == null ? void 0 : u.media) == null ? void 0 : p.video) == null ? void 0 : f.quality) != null ? S : Ca.video.quality,
|
|
@@ -20826,12 +20826,12 @@ class Xn {
|
|
|
20826
20826
|
}
|
|
20827
20827
|
nt = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), Nr = /* @__PURE__ */ new WeakMap(), Wd = /* @__PURE__ */ new WeakSet(), $f = function(t, e, r = true) {
|
|
20828
20828
|
let i;
|
|
20829
|
-
const n = a(this, nt)[t], o = Object.prototype.toString.call(e),
|
|
20830
|
-
if (o !==
|
|
20829
|
+
const n = a(this, nt)[t], o = Object.prototype.toString.call(e), c = Object.prototype.toString.call(n);
|
|
20830
|
+
if (o !== c) {
|
|
20831
20831
|
this.set(t, e);
|
|
20832
20832
|
return;
|
|
20833
20833
|
}
|
|
20834
|
-
switch (
|
|
20834
|
+
switch (c) {
|
|
20835
20835
|
case "[object Array]":
|
|
20836
20836
|
i = [...n, ...e];
|
|
20837
20837
|
break;
|
|
@@ -20901,36 +20901,36 @@ Ai = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), rc = /*
|
|
|
20901
20901
|
var n, o;
|
|
20902
20902
|
if (e.pluginId !== a(this, Mi))
|
|
20903
20903
|
return;
|
|
20904
|
-
const r = (n = e.storeItems) == null ? void 0 : n.map((
|
|
20905
|
-
var
|
|
20904
|
+
const r = (n = e.storeItems) == null ? void 0 : n.map((c) => {
|
|
20905
|
+
var d;
|
|
20906
20906
|
return {
|
|
20907
|
-
timestamp:
|
|
20908
|
-
peerId:
|
|
20907
|
+
timestamp: c.timestamp,
|
|
20908
|
+
peerId: c.peerId,
|
|
20909
20909
|
payload: JSON.parse(
|
|
20910
|
-
(
|
|
20910
|
+
(d = c.payload) != null && d.length ? new TextDecoder().decode(c.payload) : "{}"
|
|
20911
20911
|
),
|
|
20912
|
-
key:
|
|
20912
|
+
key: c.storeKey
|
|
20913
20913
|
};
|
|
20914
20914
|
});
|
|
20915
20915
|
if (t === W.storeGetKeys) {
|
|
20916
|
-
const
|
|
20917
|
-
a(this, Lr).get(e.storeName) && (this.stores.set(e.storeName,
|
|
20918
|
-
|
|
20916
|
+
const c = a(this, Lr).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
|
|
20917
|
+
a(this, Lr).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), a(this, Lr).delete(e.storeName)), r.forEach((u) => {
|
|
20918
|
+
d.set(u.key, u.payload, false, false);
|
|
20919
20919
|
});
|
|
20920
20920
|
return;
|
|
20921
20921
|
}
|
|
20922
20922
|
const i = this.stores.get(e.storeName) || ((o = a(this, Lr).get(e.storeName)) == null ? void 0 : o.store);
|
|
20923
|
-
i !== void 0 && (t === W.storeInsertKeys && r.forEach(({ key:
|
|
20924
|
-
|
|
20925
|
-
}), t === W.storeDeleteKeys && r.forEach(({ key:
|
|
20926
|
-
|
|
20923
|
+
i !== void 0 && (t === W.storeInsertKeys && r.forEach(({ key: c, peerId: d, payload: u }) => {
|
|
20924
|
+
d !== a(this, rc, Ju) && i.set(c, u, false, true);
|
|
20925
|
+
}), t === W.storeDeleteKeys && r.forEach(({ key: c, peerId: d }) => {
|
|
20926
|
+
d !== a(this, rc, Ju) && i.delete(c, false, true);
|
|
20927
20927
|
}));
|
|
20928
20928
|
})
|
|
20929
20929
|
);
|
|
20930
20930
|
});
|
|
20931
20931
|
};
|
|
20932
20932
|
function gi(s) {
|
|
20933
|
-
var t, e, r, i, n, o,
|
|
20933
|
+
var t, e, r, i, n, o, c, d, u, p, f, S, E;
|
|
20934
20934
|
return s ? {
|
|
20935
20935
|
media: {
|
|
20936
20936
|
audio: {
|
|
@@ -20947,8 +20947,8 @@ function gi(s) {
|
|
|
20947
20947
|
enabled: s.screenShareEnabled,
|
|
20948
20948
|
permission: "mediaPermissions" in s ? (n = s.mediaPermissions) == null ? void 0 : n.screenshare : null,
|
|
20949
20949
|
audio: {
|
|
20950
|
-
enabled: (
|
|
20951
|
-
trackId: (u = (
|
|
20950
|
+
enabled: (c = (o = s.screenShareTracks) == null ? void 0 : o.audio) == null ? void 0 : c.enabled,
|
|
20951
|
+
trackId: (u = (d = s.screenShareTracks) == null ? void 0 : d.audio) == null ? void 0 : u.id
|
|
20952
20952
|
},
|
|
20953
20953
|
video: {
|
|
20954
20954
|
enabled: (f = (p = s.screenShareTracks) == null ? void 0 : p.video) == null ? void 0 : f.enabled,
|
|
@@ -21008,11 +21008,11 @@ let mr = (Lg = class extends qt {
|
|
|
21008
21008
|
const { clientWidth: e2, clientHeight: r2 } = t2, { width: i2, height: n2 } = this.videoTrack.getSettings();
|
|
21009
21009
|
if (!i2 || !n2)
|
|
21010
21010
|
return;
|
|
21011
|
-
const o2 = n2 / r2,
|
|
21012
|
-
|
|
21011
|
+
const o2 = n2 / r2, c2 = i2 / e2, d2 = Math.max(o2, c2);
|
|
21012
|
+
d2 > L0 && a(this, Xs) === 1 ? (m(this, Xs, 0), a(this, $t).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
21013
21013
|
peerId: this.id,
|
|
21014
21014
|
maxSpatialLayer: a(this, Xs)
|
|
21015
|
-
})) :
|
|
21015
|
+
})) : d2 < N0 && a(this, Xs) === 0 && (m(this, Xs, 1), a(this, $t).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
21016
21016
|
peerId: this.id,
|
|
21017
21017
|
maxSpatialLayer: a(this, Xs)
|
|
21018
21018
|
}));
|
|
@@ -21020,8 +21020,8 @@ let mr = (Lg = class extends qt {
|
|
|
21020
21020
|
m(this, $t, t);
|
|
21021
21021
|
const {
|
|
21022
21022
|
id: o,
|
|
21023
|
-
userId:
|
|
21024
|
-
displayName:
|
|
21023
|
+
userId: c,
|
|
21024
|
+
displayName: d,
|
|
21025
21025
|
device: u,
|
|
21026
21026
|
picture: p,
|
|
21027
21027
|
isHost: f,
|
|
@@ -21036,7 +21036,7 @@ let mr = (Lg = class extends qt {
|
|
|
21036
21036
|
producers: $,
|
|
21037
21037
|
metadata: F
|
|
21038
21038
|
} = e;
|
|
21039
|
-
this.id = o, this.userId =
|
|
21039
|
+
this.id = o, this.userId = c, this.name = d, this.device = u, this.picture = p, this.isHost = f, this.flags = S, this.manualProducerConfig = SC, m(this, mn, _ != null ? _ : "ON_STAGE"), this.customParticipantId = P != null ? P : E, this.audioEnabled = !k, this.audioTrack = A, this.videoEnabled = N, this.videoTrack = H, this.screenShareTracks = {
|
|
21040
21040
|
audio: void 0,
|
|
21041
21041
|
video: void 0
|
|
21042
21042
|
}, this.producers = $ != null ? $ : [], this.presetName = F == null ? void 0 : F.preset_name, m(this, gn, false), m(this, Qs, r), m(this, ac, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), V(this, nc, Ku).call(this);
|
|
@@ -21522,33 +21522,33 @@ let Pt = (Vg = class extends qt {
|
|
|
21522
21522
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21523
21523
|
audio: true
|
|
21524
21524
|
}), this.videoSubscribed.add(o);
|
|
21525
|
-
const
|
|
21526
|
-
|
|
21525
|
+
const c = o.producers.find((d) => d.kind === "audio" && !d.screenShare);
|
|
21526
|
+
c && i.push(c);
|
|
21527
21527
|
}
|
|
21528
21528
|
if (e.includes("video")) {
|
|
21529
21529
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21530
21530
|
video: true
|
|
21531
21531
|
}), this.audioSubscribed.add(o);
|
|
21532
|
-
const
|
|
21533
|
-
|
|
21532
|
+
const c = o.producers.find((d) => d.kind === "video" && !d.screenShare);
|
|
21533
|
+
c && i.push(c);
|
|
21534
21534
|
}
|
|
21535
21535
|
if (e.includes("screenshareAudio")) {
|
|
21536
21536
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21537
21537
|
screenshareAudio: true
|
|
21538
21538
|
});
|
|
21539
|
-
const
|
|
21540
|
-
(
|
|
21539
|
+
const c = o.producers.find(
|
|
21540
|
+
(d) => d.kind === "audio" && d.screenShare
|
|
21541
21541
|
);
|
|
21542
|
-
i.push(
|
|
21542
|
+
i.push(c);
|
|
21543
21543
|
}
|
|
21544
21544
|
if (e.includes("screenshareVideo")) {
|
|
21545
21545
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21546
21546
|
screenshareVideo: true
|
|
21547
21547
|
});
|
|
21548
|
-
const
|
|
21549
|
-
(
|
|
21548
|
+
const c = o.producers.find(
|
|
21549
|
+
(d) => d.kind === "video" && d.screenShare
|
|
21550
21550
|
);
|
|
21551
|
-
i.push(
|
|
21551
|
+
i.push(c);
|
|
21552
21552
|
}
|
|
21553
21553
|
}
|
|
21554
21554
|
}), yield a(this, Li, Po).createConsumers(i);
|
|
@@ -21566,33 +21566,33 @@ let Pt = (Vg = class extends qt {
|
|
|
21566
21566
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21567
21567
|
audio: false
|
|
21568
21568
|
});
|
|
21569
|
-
const
|
|
21570
|
-
|
|
21569
|
+
const c = o.producers.find((d) => d.kind === "audio" && !d.screenShare);
|
|
21570
|
+
c && i.push(c);
|
|
21571
21571
|
}
|
|
21572
21572
|
if (e.includes("video")) {
|
|
21573
21573
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21574
21574
|
video: false
|
|
21575
21575
|
});
|
|
21576
|
-
const
|
|
21577
|
-
|
|
21576
|
+
const c = o.producers.find((d) => d.kind === "video" && !d.screenShare);
|
|
21577
|
+
c && i.push(c);
|
|
21578
21578
|
}
|
|
21579
21579
|
if (e.includes("screenshareAudio")) {
|
|
21580
21580
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21581
21581
|
screenshareAudio: false
|
|
21582
21582
|
});
|
|
21583
|
-
const
|
|
21584
|
-
(
|
|
21583
|
+
const c = o.producers.find(
|
|
21584
|
+
(d) => d.kind === "audio" && d.screenShare
|
|
21585
21585
|
);
|
|
21586
|
-
i.push(
|
|
21586
|
+
i.push(c);
|
|
21587
21587
|
}
|
|
21588
21588
|
if (e.includes("screenshareVideo")) {
|
|
21589
21589
|
o.manualProducerConfig = B(D({}, o.manualProducerConfig), {
|
|
21590
21590
|
screenshareVideo: false
|
|
21591
21591
|
});
|
|
21592
|
-
const
|
|
21593
|
-
(
|
|
21592
|
+
const c = o.producers.find(
|
|
21593
|
+
(d) => d.kind === "video" && d.screenShare
|
|
21594
21594
|
);
|
|
21595
|
-
i.push(
|
|
21595
|
+
i.push(c);
|
|
21596
21596
|
}
|
|
21597
21597
|
}
|
|
21598
21598
|
}), yield a(this, Li, Po).closeConsumers(i);
|
|
@@ -21608,10 +21608,10 @@ let Pt = (Vg = class extends qt {
|
|
|
21608
21608
|
}
|
|
21609
21609
|
});
|
|
21610
21610
|
const { compulsoryPeers: t } = this.selectedPeers, e = t.filter(
|
|
21611
|
-
(
|
|
21611
|
+
(c) => this.joined.has(c)
|
|
21612
21612
|
), r = Array.from(this.pinned.keys()).filter(
|
|
21613
|
-
(
|
|
21614
|
-
), i = Array.from(this.joined.toArray().filter((
|
|
21613
|
+
(c) => !e.includes(c)
|
|
21614
|
+
), i = Array.from(this.joined.toArray().filter((c) => c.stageStatus === "ON_STAGE").map((c) => c.id)), n = Math.max(
|
|
21615
21615
|
(this.currentPage - 1) * (this.maxActiveParticipantsCount - e.length - r.length)
|
|
21616
21616
|
), o = this.currentPage * (this.maxActiveParticipantsCount - e.length - r.length);
|
|
21617
21617
|
return e.concat(r, i.slice(n, o));
|
|
@@ -21896,10 +21896,10 @@ const yd = (xg = class {
|
|
|
21896
21896
|
} : void 0;
|
|
21897
21897
|
this.logger.info("events.selfJoinComplete", n);
|
|
21898
21898
|
}
|
|
21899
|
-
s.forEach(({ peerId: n, producerStates: o, capabilities:
|
|
21899
|
+
s.forEach(({ peerId: n, producerStates: o, capabilities: c }) => this.onMediaJoined(
|
|
21900
21900
|
n,
|
|
21901
21901
|
o,
|
|
21902
|
-
|
|
21902
|
+
c
|
|
21903
21903
|
));
|
|
21904
21904
|
const { audioPeers: r, compulsoryPeers: i } = t != null ? t : {};
|
|
21905
21905
|
e.pinnedPeerIds.length !== 0 && this.onParticipantPinned(e.pinnedPeerIds[0]), this.computeActivateParticipants(r != null ? r : [], i), this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { createAllConsumers: true });
|
|
@@ -22069,10 +22069,10 @@ const yd = (xg = class {
|
|
|
22069
22069
|
}
|
|
22070
22070
|
selectPagePeers(s) {
|
|
22071
22071
|
const { compulsoryPeers: t } = this.selectedPeers, e = t.filter(
|
|
22072
|
-
(
|
|
22072
|
+
(d) => this.participants.joined.has(d)
|
|
22073
22073
|
), r = Array.from(this.participants.pinned.keys()).filter(
|
|
22074
|
-
(
|
|
22075
|
-
), i = Array.from(this.participants.joined.toArray().filter((
|
|
22074
|
+
(d) => !e.includes(d)
|
|
22075
|
+
), i = Array.from(this.participants.joined.toArray().filter((d) => d.stageStatus === "ON_STAGE").map((d) => d.id)), n = Math.max(
|
|
22076
22076
|
(s - 1) * (this.maxPreferredStreams - e.length - r.length)
|
|
22077
22077
|
), o = s * (this.maxPreferredStreams - e.length - r.length);
|
|
22078
22078
|
return e.concat(r, i.slice(n, o));
|
|
@@ -22080,17 +22080,17 @@ const yd = (xg = class {
|
|
|
22080
22080
|
selectActivePeers(s) {
|
|
22081
22081
|
const t = /* @__PURE__ */ new Map(), e = Array.from(
|
|
22082
22082
|
this.participants.joined.toArray().filter((p) => p.stageStatus === "ON_STAGE").map((p) => (t.set(p.id, true), p.id))
|
|
22083
|
-
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((p, f) => (f.stageStatus !== "ON_STAGE" ? this.participants.pinned.delete(f.id) : p.push(f.id), p), []), n = this.self.stageStatus === "ON_STAGE" ? 1 : 0, o = s - n,
|
|
22083
|
+
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((p, f) => (f.stageStatus !== "ON_STAGE" ? this.participants.pinned.delete(f.id) : p.push(f.id), p), []), n = this.self.stageStatus === "ON_STAGE" ? 1 : 0, o = s - n, c = new Set(
|
|
22084
22084
|
r.concat(i).filter((p) => p !== this.self.id && t.has(p))
|
|
22085
22085
|
);
|
|
22086
|
-
let
|
|
22087
|
-
const u = o -
|
|
22086
|
+
let d = Array.from(c);
|
|
22087
|
+
const u = o - c.size;
|
|
22088
22088
|
if (u >= 0) {
|
|
22089
|
-
const p = e.filter((f) => !
|
|
22090
|
-
|
|
22089
|
+
const p = e.filter((f) => !c.has(f) && f !== this.self.id).slice(0, u);
|
|
22090
|
+
d = Array.from(c).concat(p);
|
|
22091
22091
|
} else
|
|
22092
|
-
|
|
22093
|
-
return
|
|
22092
|
+
d = d.slice(0, o);
|
|
22093
|
+
return d;
|
|
22094
22094
|
}
|
|
22095
22095
|
updateSubscriptions(s, t) {
|
|
22096
22096
|
const { page: e, createAllConsumers: r } = t != null ? t : {};
|
|
@@ -22100,20 +22100,20 @@ const yd = (xg = class {
|
|
|
22100
22100
|
case "PAGINATED": {
|
|
22101
22101
|
if (!n)
|
|
22102
22102
|
return;
|
|
22103
|
-
const o = this.selectPagePeers(n),
|
|
22103
|
+
const o = this.selectPagePeers(n), c = this.selectActivePeers(
|
|
22104
22104
|
this.participants.maxActiveParticipantsCount + 4
|
|
22105
22105
|
);
|
|
22106
|
-
this.updateParticipantsMap(this.participants.videoSubscribed, o), this.updateParticipantsMap(this.participants.audioSubscribed,
|
|
22106
|
+
this.updateParticipantsMap(this.participants.videoSubscribed, o), this.updateParticipantsMap(this.participants.audioSubscribed, c), this.logger.debug(
|
|
22107
22107
|
"ParticipantController::updateActive::updating_current_page_peers",
|
|
22108
22108
|
{ peerIds: o }
|
|
22109
22109
|
);
|
|
22110
22110
|
break;
|
|
22111
22111
|
}
|
|
22112
22112
|
case "ACTIVE_GRID": {
|
|
22113
|
-
const o = this.selectActivePeers(this.participants.maxActiveParticipantsCount),
|
|
22113
|
+
const o = this.selectActivePeers(this.participants.maxActiveParticipantsCount), c = this.selectActivePeers(
|
|
22114
22114
|
this.participants.maxActiveParticipantsCount + 4
|
|
22115
22115
|
);
|
|
22116
|
-
this.updateParticipantsMapMinReplacement(this.participants.videoSubscribed, o), this.updateParticipantsMap(this.participants.audioSubscribed,
|
|
22116
|
+
this.updateParticipantsMapMinReplacement(this.participants.videoSubscribed, o), this.updateParticipantsMap(this.participants.audioSubscribed, c);
|
|
22117
22117
|
break;
|
|
22118
22118
|
}
|
|
22119
22119
|
default:
|
|
@@ -22123,8 +22123,8 @@ const yd = (xg = class {
|
|
|
22123
22123
|
}
|
|
22124
22124
|
syncConsumers() {
|
|
22125
22125
|
return l(this, null, function* () {
|
|
22126
|
-
var o,
|
|
22127
|
-
if (((
|
|
22126
|
+
var o, c, d;
|
|
22127
|
+
if (((d = (c = (o = this.context.getValue("connectionHandler")) == null ? void 0 : o.mediaState) == null ? void 0 : c.recv) == null ? void 0 : d.state) !== "connected")
|
|
22128
22128
|
return;
|
|
22129
22129
|
if (a(this, Fi)) {
|
|
22130
22130
|
m(this, Sn, true);
|
|
@@ -22216,8 +22216,8 @@ const yd = (xg = class {
|
|
|
22216
22216
|
}
|
|
22217
22217
|
updateParticipantsMapMinReplacement(s, t) {
|
|
22218
22218
|
const e = Array.from(s.keys()), r = new Map(s), i = new Set(t), n = [];
|
|
22219
|
-
e.forEach((o,
|
|
22220
|
-
(!i.has(o) || !this.participants.joined.get(o)) && n.push(
|
|
22219
|
+
e.forEach((o, c) => {
|
|
22220
|
+
(!i.has(o) || !this.participants.joined.get(o)) && n.push(c);
|
|
22221
22221
|
}), t.forEach((o) => {
|
|
22222
22222
|
if (s.get(o))
|
|
22223
22223
|
return;
|
|
@@ -22225,8 +22225,8 @@ const yd = (xg = class {
|
|
|
22225
22225
|
e.push(o);
|
|
22226
22226
|
return;
|
|
22227
22227
|
}
|
|
22228
|
-
const
|
|
22229
|
-
e[
|
|
22228
|
+
const c = n.shift();
|
|
22229
|
+
e[c] = o;
|
|
22230
22230
|
}), n.forEach((o) => {
|
|
22231
22231
|
e.splice(o, 1);
|
|
22232
22232
|
}), Array.from(s.keys()).forEach((o) => {
|
|
@@ -22351,8 +22351,8 @@ const yd = (xg = class {
|
|
|
22351
22351
|
peerId: r,
|
|
22352
22352
|
scoreStats: i
|
|
22353
22353
|
}) => {
|
|
22354
|
-
var
|
|
22355
|
-
const n = t === "video" && ((
|
|
22354
|
+
var c;
|
|
22355
|
+
const n = t === "video" && ((c = e == null ? void 0 : e.screenShare) != null ? c : false), o = this.participants.joined.get(r);
|
|
22356
22356
|
o && (o.emit("mediaScoreUpdate", {
|
|
22357
22357
|
kind: t,
|
|
22358
22358
|
isScreenshare: n,
|
|
@@ -22427,8 +22427,8 @@ const yd = (xg = class {
|
|
|
22427
22427
|
appData: i,
|
|
22428
22428
|
track: n,
|
|
22429
22429
|
producerId: o,
|
|
22430
|
-
rtpReceiver:
|
|
22431
|
-
paused:
|
|
22430
|
+
rtpReceiver: c,
|
|
22431
|
+
paused: d
|
|
22432
22432
|
} = (p = t.get(s)) != null ? p : {};
|
|
22433
22433
|
if (!e)
|
|
22434
22434
|
return this.logger.warn("processMedia::Peer ID is undefined", {
|
|
@@ -22440,7 +22440,7 @@ const yd = (xg = class {
|
|
|
22440
22440
|
supportsRemoteControl: !!(i != null && i.supportsRemoteControl),
|
|
22441
22441
|
screenShare: !!(i != null && i.screenShare)
|
|
22442
22442
|
},
|
|
22443
|
-
remotelyPaused:
|
|
22443
|
+
remotelyPaused: d,
|
|
22444
22444
|
producerId: o
|
|
22445
22445
|
}
|
|
22446
22446
|
}), {};
|
|
@@ -22451,23 +22451,23 @@ const yd = (xg = class {
|
|
|
22451
22451
|
peerId: e,
|
|
22452
22452
|
kind: r,
|
|
22453
22453
|
appData: u,
|
|
22454
|
-
remotelyPaused:
|
|
22454
|
+
remotelyPaused: d,
|
|
22455
22455
|
producerId: o
|
|
22456
22456
|
}
|
|
22457
22457
|
}), this.consumerPeerMap.set(s, {
|
|
22458
22458
|
type: r,
|
|
22459
22459
|
peerId: e,
|
|
22460
22460
|
appData: u,
|
|
22461
|
-
remotelyPaused:
|
|
22461
|
+
remotelyPaused: d,
|
|
22462
22462
|
producerId: o
|
|
22463
22463
|
}), {
|
|
22464
22464
|
peerId: e,
|
|
22465
22465
|
kind: r,
|
|
22466
22466
|
appData: u,
|
|
22467
|
-
remotelyPaused:
|
|
22467
|
+
remotelyPaused: d,
|
|
22468
22468
|
track: n,
|
|
22469
22469
|
producerId: o,
|
|
22470
|
-
rtpReceiver:
|
|
22470
|
+
rtpReceiver: c
|
|
22471
22471
|
};
|
|
22472
22472
|
}
|
|
22473
22473
|
processConsumerClosed(s) {
|
|
@@ -22489,16 +22489,16 @@ const yd = (xg = class {
|
|
|
22489
22489
|
}
|
|
22490
22490
|
}), this.consumerPeerMap.delete(s), e === "video" && r.screenShare !== true && this.videoPeerConsumerMap.delete(t), !o)
|
|
22491
22491
|
return;
|
|
22492
|
-
const
|
|
22493
|
-
r && r.screenShare ? (o.setScreenShareEnabled(false), this.context.getValue("callstats").consumerSharedMediaState(s, { screen: false }), o.screenShareTracks.video &&
|
|
22492
|
+
const c = [];
|
|
22493
|
+
r && r.screenShare ? (o.setScreenShareEnabled(false), this.context.getValue("callstats").consumerSharedMediaState(s, { screen: false }), o.screenShareTracks.video && c.push(o.screenShareTracks.video.id), o.screenShareTracks.audio && c.push(o.screenShareTracks.audio.id), o.screenShareTracks = {
|
|
22494
22494
|
audio: void 0,
|
|
22495
22495
|
video: void 0
|
|
22496
|
-
}) : e === "audio" ? (o.setAudioEnabled(false), o.audioTrack &&
|
|
22496
|
+
}) : e === "audio" ? (o.setAudioEnabled(false), o.audioTrack && c.push(o.audioTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { audio: false }), o.audioTrack = void 0) : e === "video" && (o.setVideoEnabled(false), this.updatePipSource(o.id, false), o.videoTrack && c.push(o.videoTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { video: false }), o.videoTrack = void 0), r.e2ee && c.forEach((d) => {
|
|
22497
22497
|
this.context.getValue("peerSessionStore").emit(
|
|
22498
22498
|
b.E2EE_INACTIVE_CONSUMER,
|
|
22499
22499
|
{
|
|
22500
22500
|
peerId: t,
|
|
22501
|
-
trackId:
|
|
22501
|
+
trackId: d
|
|
22502
22502
|
}
|
|
22503
22503
|
);
|
|
22504
22504
|
});
|
|
@@ -22512,7 +22512,7 @@ const yd = (xg = class {
|
|
|
22512
22512
|
track: i,
|
|
22513
22513
|
remotelyPaused: n,
|
|
22514
22514
|
producerId: o,
|
|
22515
|
-
rtpReceiver:
|
|
22515
|
+
rtpReceiver: c
|
|
22516
22516
|
} = this.processMedia(s);
|
|
22517
22517
|
if (!t)
|
|
22518
22518
|
return;
|
|
@@ -22526,14 +22526,14 @@ const yd = (xg = class {
|
|
|
22526
22526
|
producerId: o
|
|
22527
22527
|
}
|
|
22528
22528
|
});
|
|
22529
|
-
const
|
|
22530
|
-
if (
|
|
22531
|
-
if (r.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver:
|
|
22532
|
-
e === "video" ?
|
|
22529
|
+
const d = this.participants.joined.get(t);
|
|
22530
|
+
if (d) {
|
|
22531
|
+
if (r.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver: c, track: i }), r.screenShare) {
|
|
22532
|
+
e === "video" ? d.screenShareTracks.video = i : e === "audio" && (d.screenShareTracks.audio = i), d.setScreenShareEnabled(true), (u = this.context) == null || u.getValue("callstats").consumerSharedMediaState(s, { screen: true });
|
|
22533
22533
|
return;
|
|
22534
22534
|
}
|
|
22535
|
-
e === "video" ? (
|
|
22536
|
-
audio:
|
|
22535
|
+
e === "video" ? (d.videoTrack = i, d.setVideoEnabled(true), this.updatePipSource(d.id, true), this.context.getValue("callstats").consumerSharedMediaState(s, { video: true })) : e === "audio" && (d.audioTrack = i, d.setAudioEnabled(d.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
22536
|
+
audio: d.audioEnabled
|
|
22537
22537
|
}));
|
|
22538
22538
|
}
|
|
22539
22539
|
}
|
|
@@ -22561,9 +22561,9 @@ const yd = (xg = class {
|
|
|
22561
22561
|
producerId: o
|
|
22562
22562
|
}
|
|
22563
22563
|
});
|
|
22564
|
-
const
|
|
22565
|
-
|
|
22566
|
-
audio:
|
|
22564
|
+
const c = this.participants.joined.get(t);
|
|
22565
|
+
c && (r && i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_INACTIVE_CONSUMER, { peerId: t, trackId: r.id }), e === "video" ? (c.videoTrack = r, c.setVideoEnabled(false), this.updatePipSource(c.id, false), this.context.getValue("callstats").consumerSharedMediaState(s, { video: false })) : e === "audio" && (c.audioTrack = r, c.setAudioEnabled(c.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
22566
|
+
audio: c.audioEnabled
|
|
22567
22567
|
})));
|
|
22568
22568
|
}
|
|
22569
22569
|
processNewConsumer(s) {
|
|
@@ -22574,7 +22574,7 @@ const yd = (xg = class {
|
|
|
22574
22574
|
track: i,
|
|
22575
22575
|
appData: n,
|
|
22576
22576
|
producerId: o,
|
|
22577
|
-
rtpReceiver:
|
|
22577
|
+
rtpReceiver: c
|
|
22578
22578
|
} = this.processMedia(s);
|
|
22579
22579
|
if (!t)
|
|
22580
22580
|
return;
|
|
@@ -22588,10 +22588,10 @@ const yd = (xg = class {
|
|
|
22588
22588
|
producerId: o
|
|
22589
22589
|
}
|
|
22590
22590
|
});
|
|
22591
|
-
const
|
|
22592
|
-
if (
|
|
22591
|
+
const d = this.participants.joined.get(t);
|
|
22592
|
+
if (d) {
|
|
22593
22593
|
if (n.screenShare) {
|
|
22594
|
-
e === "video" ?
|
|
22594
|
+
e === "video" ? d.screenShareTracks.video = i : e === "audio" && (d.screenShareTracks.audio = i), (!r || this.self.permissions.isRecorder || this.context.getValue("flagsmith").hasFeature(Z.SCREEENSHARE_ERR_HACK)) && d.setScreenShareEnabled(true), n.supportsRemoteControl && (d.supportsRemoteControl = true), this.participants.broadcastMessage("screenshareConsumerCreated", {
|
|
22595
22595
|
producerId: o,
|
|
22596
22596
|
peerId: t,
|
|
22597
22597
|
screenShare: true,
|
|
@@ -22609,15 +22609,15 @@ const yd = (xg = class {
|
|
|
22609
22609
|
});
|
|
22610
22610
|
return;
|
|
22611
22611
|
}
|
|
22612
|
-
e === "video" ? (
|
|
22612
|
+
e === "video" ? (d.videoTrack = i, r || (d.setVideoEnabled(true), this.updatePipSource(d.id, true)), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
22613
22613
|
video: !r
|
|
22614
|
-
})) : e === "audio" && (
|
|
22614
|
+
})) : e === "audio" && (d.audioTrack = i, r || d.setAudioEnabled(true), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
22615
22615
|
audio: !r
|
|
22616
|
-
})), !r && n.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver:
|
|
22616
|
+
})), !r && n.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver: c, track: i });
|
|
22617
22617
|
}
|
|
22618
22618
|
}
|
|
22619
22619
|
static formatSocketServiceMessage(s) {
|
|
22620
|
-
var e, r, i, n, o,
|
|
22620
|
+
var e, r, i, n, o, c;
|
|
22621
22621
|
if (!s)
|
|
22622
22622
|
return;
|
|
22623
22623
|
const t = Dh(s.stageType);
|
|
@@ -22639,12 +22639,12 @@ const yd = (xg = class {
|
|
|
22639
22639
|
flags: {
|
|
22640
22640
|
hiddenParticipant: (i = s.flags) == null ? void 0 : i.hiddenParticipant,
|
|
22641
22641
|
hidden_participant: (n = s.flags) == null ? void 0 : n.hiddenParticipant,
|
|
22642
|
-
recorder: ((o = s.flags) == null ? void 0 : o.recorderType) !== void 0 && ((
|
|
22642
|
+
recorder: ((o = s.flags) == null ? void 0 : o.recorderType) !== void 0 && ((c = s.flags) == null ? void 0 : c.recorderType) !== "NONE"
|
|
22643
22643
|
}
|
|
22644
22644
|
};
|
|
22645
22645
|
}
|
|
22646
22646
|
mapPeerIdsToProducers(s, t) {
|
|
22647
|
-
const e = (i, n) => i.filter(({ kind: o, screenShare:
|
|
22647
|
+
const e = (i, n) => i.filter(({ kind: o, screenShare: c }) => n.includes(o) || c && n.includes("screenshare"));
|
|
22648
22648
|
return s.flatMap((i) => {
|
|
22649
22649
|
const n = this.participants.joined.get(i);
|
|
22650
22650
|
if (n)
|
|
@@ -22717,15 +22717,15 @@ const Oa = class extends qt {
|
|
|
22717
22717
|
connectedMeetings: i2,
|
|
22718
22718
|
plugins: n2,
|
|
22719
22719
|
polls: o2,
|
|
22720
|
-
media:
|
|
22721
|
-
} = u,
|
|
22720
|
+
media: c
|
|
22721
|
+
} = u, d = go(u, [
|
|
22722
22722
|
"chat",
|
|
22723
22723
|
"connectedMeetings",
|
|
22724
22724
|
"plugins",
|
|
22725
22725
|
"polls",
|
|
22726
22726
|
"media"
|
|
22727
22727
|
]);
|
|
22728
|
-
if (r2 && (r2.private && _r(a(this, q).chat.private, r2.private), r2.public && _r(a(this, q).chat.public, r2.public), this.emit("chatUpdate")), i2 && _r(a(this, q).connectedMeetings, i2),
|
|
22728
|
+
if (r2 && (r2.private && _r(a(this, q).chat.private, r2.private), r2.public && _r(a(this, q).chat.public, r2.public), this.emit("chatUpdate")), i2 && _r(a(this, q).connectedMeetings, i2), c) {
|
|
22729
22729
|
const E = (P) => {
|
|
22730
22730
|
switch (P) {
|
|
22731
22731
|
case Yr.NONE:
|
|
@@ -22744,15 +22744,15 @@ const Oa = class extends qt {
|
|
|
22744
22744
|
video: void 0,
|
|
22745
22745
|
screenshare: void 0
|
|
22746
22746
|
};
|
|
22747
|
-
(p =
|
|
22748
|
-
canProduce: E(
|
|
22749
|
-
}), (f =
|
|
22750
|
-
canProduce: E(
|
|
22751
|
-
}), (S =
|
|
22752
|
-
canProduce: E(
|
|
22747
|
+
(p = c.audio) != null && p.canProduce && (_.audio = {
|
|
22748
|
+
canProduce: E(c.audio.canProduce)
|
|
22749
|
+
}), (f = c.video) != null && f.canProduce && (_.video = {
|
|
22750
|
+
canProduce: E(c.video.canProduce)
|
|
22751
|
+
}), (S = c.screenshare) != null && S.canProduce && (_.screenshare = {
|
|
22752
|
+
canProduce: E(c.screenshare.canProduce)
|
|
22753
22753
|
}), _r(a(this, q).media, _);
|
|
22754
22754
|
}
|
|
22755
|
-
n2 && (_r(a(this, q).plugins, n2), this.emit("pluginsUpdate")), o2 && (_r(a(this, q).polls, o2), this.emit("pollsUpdate")), Object.keys(
|
|
22755
|
+
n2 && (_r(a(this, q).plugins, n2), this.emit("pluginsUpdate")), o2 && (_r(a(this, q).polls, o2), this.emit("pollsUpdate")), Object.keys(d).length !== 0 && _r(a(this, q), d), this.emit("permissionsUpdate", e2);
|
|
22756
22756
|
});
|
|
22757
22757
|
if (!r)
|
|
22758
22758
|
throw this.logger.error("DytePermissionsPreset::load_preset_permissions_failed"), new R("Could not load preset permissions.", "0904");
|
|
@@ -22954,7 +22954,7 @@ class Gf extends qt {
|
|
|
22954
22954
|
}
|
|
22955
22955
|
updatePermission() {
|
|
22956
22956
|
return l(this, null, function* () {
|
|
22957
|
-
var
|
|
22957
|
+
var d, u;
|
|
22958
22958
|
const e = (p, f) => {
|
|
22959
22959
|
this.mediaPermissions[p] = f;
|
|
22960
22960
|
const S = { message: this.mediaPermissions[p], kind: p };
|
|
@@ -22962,9 +22962,9 @@ class Gf extends qt {
|
|
|
22962
22962
|
};
|
|
22963
22963
|
if (Te.getName() === "firefox")
|
|
22964
22964
|
return;
|
|
22965
|
-
const r = "microphone", i = "camera", n = yield (
|
|
22965
|
+
const r = "microphone", i = "camera", n = yield (d = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : d.query({ name: r }), o = yield (u = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : u.query({
|
|
22966
22966
|
name: i
|
|
22967
|
-
}),
|
|
22967
|
+
}), c = (p, f) => {
|
|
22968
22968
|
switch (f) {
|
|
22969
22969
|
case "granted":
|
|
22970
22970
|
e(p, "ACCEPTED");
|
|
@@ -22978,7 +22978,7 @@ class Gf extends qt {
|
|
|
22978
22978
|
}
|
|
22979
22979
|
this.localMediaHandler.repopulateAvailableDevices();
|
|
22980
22980
|
};
|
|
22981
|
-
n && (n.onchange = () =>
|
|
22981
|
+
n && (n.onchange = () => c("audio", n.state)), o && (o.onchange = () => c("video", o.state));
|
|
22982
22982
|
});
|
|
22983
22983
|
}
|
|
22984
22984
|
populateMediaPermissionsInCallstats(i) {
|
|
@@ -22986,18 +22986,18 @@ class Gf extends qt {
|
|
|
22986
22986
|
message: e,
|
|
22987
22987
|
kind: r
|
|
22988
22988
|
}) {
|
|
22989
|
-
var n, o,
|
|
22989
|
+
var n, o, c, d;
|
|
22990
22990
|
switch (r) {
|
|
22991
22991
|
case "audio": {
|
|
22992
22992
|
(n = a(this, us)) == null || n.getValue("callstats").mediaPermission("AUDIO", e), (o = a(this, us)) == null || o.getValue("callstats").mediaPermission("SPEAKER", e);
|
|
22993
22993
|
break;
|
|
22994
22994
|
}
|
|
22995
22995
|
case "video": {
|
|
22996
|
-
(
|
|
22996
|
+
(c = a(this, us)) == null || c.getValue("callstats").mediaPermission("VIDEO", e);
|
|
22997
22997
|
break;
|
|
22998
22998
|
}
|
|
22999
22999
|
case "screenshare": {
|
|
23000
|
-
(
|
|
23000
|
+
(d = a(this, us)) == null || d.getValue("callstats").mediaPermission("SCREENSHARE", e);
|
|
23001
23001
|
break;
|
|
23002
23002
|
}
|
|
23003
23003
|
}
|
|
@@ -23009,7 +23009,7 @@ class Gf extends qt {
|
|
|
23009
23009
|
}
|
|
23010
23010
|
init() {
|
|
23011
23011
|
return l(this, arguments, function* (e = {}, r = false, i = null) {
|
|
23012
|
-
var n, o,
|
|
23012
|
+
var n, o, c, d, u, p, f;
|
|
23013
23013
|
if (Te.init(), !this.localMediaHandler)
|
|
23014
23014
|
try {
|
|
23015
23015
|
let S = true;
|
|
@@ -23023,7 +23023,7 @@ class Gf extends qt {
|
|
|
23023
23023
|
i,
|
|
23024
23024
|
e.constraints,
|
|
23025
23025
|
(o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
|
|
23026
|
-
(
|
|
23026
|
+
(c = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : c.autoSwitchAudioDevice
|
|
23027
23027
|
);
|
|
23028
23028
|
if (i == null || i.getValue("peerSessionStore").on(
|
|
23029
23029
|
b.MEDIA_PERMISSION_UPDATE,
|
|
@@ -23061,7 +23061,7 @@ class Gf extends qt {
|
|
|
23061
23061
|
}), this.emit("mediaPermissionError", E), this.emit("mediaPermissionUpdate", { message: P, kind: _ });
|
|
23062
23062
|
})
|
|
23063
23063
|
), S) {
|
|
23064
|
-
this.logger.info(`Setting up DyteSelfMedia streams using media handler. audio:${(
|
|
23064
|
+
this.logger.info(`Setting up DyteSelfMedia streams using media handler. audio:${(d = e == null ? void 0 : e.audio) != null ? d : true} video:${(u = e == null ? void 0 : e.video) != null ? u : true}`);
|
|
23065
23065
|
const E = this.localMediaHandler.setupStreams({
|
|
23066
23066
|
video: (p = e == null ? void 0 : e.video) != null ? p : true,
|
|
23067
23067
|
audio: (f = e == null ? void 0 : e.audio) != null ? f : true
|
|
@@ -23256,9 +23256,9 @@ const yo = {}, ii = {
|
|
|
23256
23256
|
}) {
|
|
23257
23257
|
return (r, i, n) => {
|
|
23258
23258
|
const o = n.value;
|
|
23259
|
-
return n.value = function(...
|
|
23259
|
+
return n.value = function(...d) {
|
|
23260
23260
|
var _, P;
|
|
23261
|
-
const u = (P = (this == null ? void 0 : this.peerId) || ((_ =
|
|
23261
|
+
const u = (P = (this == null ? void 0 : this.peerId) || ((_ = d[0]) == null ? void 0 : _.authToken)) != null ? P : "", p = `${t}-${u}`, f = this == null ? void 0 : this.logger;
|
|
23262
23262
|
if (yo[p]) {
|
|
23263
23263
|
const k = new Error(
|
|
23264
23264
|
`Unsupported concurrent calls on Dyte method: ${s}.`
|
|
@@ -23277,7 +23277,7 @@ const yo = {}, ii = {
|
|
|
23277
23277
|
const S = setTimeout(
|
|
23278
23278
|
() => delete yo[p],
|
|
23279
23279
|
e
|
|
23280
|
-
), E = o.apply(this,
|
|
23280
|
+
), E = o.apply(this, d);
|
|
23281
23281
|
return Promise.resolve(E).then(() => {
|
|
23282
23282
|
delete yo[p], clearTimeout(S);
|
|
23283
23283
|
}).catch(() => {
|
|
@@ -23294,7 +23294,7 @@ var j0 = Object.defineProperty, G0 = Object.getOwnPropertyDescriptor, Ct = (s, t
|
|
|
23294
23294
|
}, yn, vt, Tn, He, er, di, je, Xe, En, Td, xe, Be, _n, Pn, oc, Yu, Ug;
|
|
23295
23295
|
let Qe = (Ug = class extends Gf {
|
|
23296
23296
|
constructor(t, e, r, i, n) {
|
|
23297
|
-
var
|
|
23297
|
+
var c;
|
|
23298
23298
|
const o = t.getValue("logger");
|
|
23299
23299
|
super(o);
|
|
23300
23300
|
g(this, er);
|
|
@@ -23320,7 +23320,7 @@ let Qe = (Ug = class extends Gf {
|
|
|
23320
23320
|
h(this, "roomState", "init");
|
|
23321
23321
|
g(this, _n, /* @__PURE__ */ new Set());
|
|
23322
23322
|
g(this, Pn, /* @__PURE__ */ new Set());
|
|
23323
|
-
m(this, He, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (
|
|
23323
|
+
m(this, He, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (c = e.customParticipantId) != null ? c : e.clientSpecificId, this.waitlistStatus = "none", m(this, vt, r), m(this, yn, i), this.hidden = false, m(this, Tn, false), this.organizationId = e.organizationId, this.supportsRemoteControl = Te.isElectron(), this.device = Te.getDeviceInfo(), this.presetName = n, i.viewType !== Mt.Chat && this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), V(this, oc, Yu).call(this);
|
|
23324
23324
|
}
|
|
23325
23325
|
get telemetry() {
|
|
23326
23326
|
return a(this, He).getValue("telemetry");
|
|
@@ -23337,8 +23337,8 @@ let Qe = (Ug = class extends Gf {
|
|
|
23337
23337
|
static __init__(t, e, r, i, n, o = false) {
|
|
23338
23338
|
return l(this, null, function* () {
|
|
23339
23339
|
var S, E, _, P, k, A;
|
|
23340
|
-
let
|
|
23341
|
-
r.canProduceAudio !== "ALLOWED" && (
|
|
23340
|
+
let c = (E = (S = t.getValue("defaults")) == null ? void 0 : S.audio) != null ? E : true, d = (P = (_ = t.getValue("defaults")) == null ? void 0 : _.video) != null ? P : true;
|
|
23341
|
+
r.canProduceAudio !== "ALLOWED" && (c = false), r.canProduceVideo !== "ALLOWED" && (d = false);
|
|
23342
23342
|
const u = new Qe(t, e, r, i, n);
|
|
23343
23343
|
if (i.viewType === Mt.Chat)
|
|
23344
23344
|
return u;
|
|
@@ -23346,8 +23346,8 @@ let Qe = (Ug = class extends Gf {
|
|
|
23346
23346
|
_r(p, (k = t.getValue("defaults")) == null ? void 0 : k.mediaConfiguration);
|
|
23347
23347
|
const f = (A = t.getValue("defaults")) == null ? void 0 : A.mediaHandler;
|
|
23348
23348
|
return f && (f.context = t), yield u.init({
|
|
23349
|
-
audio:
|
|
23350
|
-
video:
|
|
23349
|
+
audio: c,
|
|
23350
|
+
video: d,
|
|
23351
23351
|
constraints: p
|
|
23352
23352
|
}, o, t), u.setupEvents(), u;
|
|
23353
23353
|
});
|
|
@@ -23682,8 +23682,8 @@ let Qe = (Ug = class extends Gf {
|
|
|
23682
23682
|
const o = (r = t.srcObject) == null ? void 0 : r.getTracks()[0];
|
|
23683
23683
|
if ((o == null ? void 0 : o.id) === this.videoTrack.id)
|
|
23684
23684
|
return;
|
|
23685
|
-
const
|
|
23686
|
-
|
|
23685
|
+
const c = new MediaStream();
|
|
23686
|
+
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = a(this, er, di)) == null || i.enableSource(this.id);
|
|
23687
23687
|
} else
|
|
23688
23688
|
t.srcObject = void 0, e || (n = a(this, er, di)) == null || n.disableSource(this.id);
|
|
23689
23689
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
@@ -23816,17 +23816,17 @@ class Qu {
|
|
|
23816
23816
|
enqueuedAt: Date.now(),
|
|
23817
23817
|
executedAt: void 0,
|
|
23818
23818
|
completed: false,
|
|
23819
|
-
resolve: (
|
|
23819
|
+
resolve: (c) => {
|
|
23820
23820
|
if (o.completed)
|
|
23821
23821
|
return;
|
|
23822
|
-
o.completed = true, this.pendingTasks.delete(o.id), i(
|
|
23823
|
-
const [
|
|
23824
|
-
|
|
23822
|
+
o.completed = true, this.pendingTasks.delete(o.id), i(c);
|
|
23823
|
+
const [d] = this.pendingTasks.values();
|
|
23824
|
+
d && !d.executedAt && this.execute(d);
|
|
23825
23825
|
},
|
|
23826
|
-
reject: (
|
|
23827
|
-
if (!o.completed && (o.completed = true, this.pendingTasks.delete(o.id), n(
|
|
23828
|
-
const [
|
|
23829
|
-
|
|
23826
|
+
reject: (c) => {
|
|
23827
|
+
if (!o.completed && (o.completed = true, this.pendingTasks.delete(o.id), n(c), !this.stopping)) {
|
|
23828
|
+
const [d] = this.pendingTasks.values();
|
|
23829
|
+
d && !d.executedAt && this.execute(d);
|
|
23830
23830
|
}
|
|
23831
23831
|
}
|
|
23832
23832
|
};
|
|
@@ -23912,25 +23912,25 @@ function Wf(s, t) {
|
|
|
23912
23912
|
maxRetryCount: 3,
|
|
23913
23913
|
delayTime: 10
|
|
23914
23914
|
}, t);
|
|
23915
|
-
let
|
|
23915
|
+
let c = 0, d, u = false;
|
|
23916
23916
|
const p = (f) => {
|
|
23917
23917
|
u = true, r(f);
|
|
23918
23918
|
};
|
|
23919
|
-
for (;
|
|
23919
|
+
for (; c < n; ) {
|
|
23920
23920
|
try {
|
|
23921
|
-
const f = yield s(
|
|
23921
|
+
const f = yield s(c, p);
|
|
23922
23922
|
return e(f);
|
|
23923
23923
|
} catch (f) {
|
|
23924
|
-
if (
|
|
23924
|
+
if (d = f, u)
|
|
23925
23925
|
break;
|
|
23926
|
-
if (
|
|
23927
|
-
i === "linear" ? yield gg(o * (
|
|
23926
|
+
if (c < n)
|
|
23927
|
+
i === "linear" ? yield gg(o * (c + 1)) : i === "exponential" && (yield gg(o * (c + Math.max(0, c - 1))));
|
|
23928
23928
|
else
|
|
23929
23929
|
break;
|
|
23930
23930
|
}
|
|
23931
|
-
|
|
23931
|
+
c += 1;
|
|
23932
23932
|
}
|
|
23933
|
-
return r(
|
|
23933
|
+
return r(d);
|
|
23934
23934
|
}));
|
|
23935
23935
|
});
|
|
23936
23936
|
}
|
|
@@ -23955,7 +23955,7 @@ function cd(s) {
|
|
|
23955
23955
|
}
|
|
23956
23956
|
function z0(s) {
|
|
23957
23957
|
const t = RTCRtpReceiver.getCapabilities("audio"), e = RTCRtpReceiver.getCapabilities("video"), r = RTCRtpSender.getCapabilities("audio"), i = RTCRtpSender.getCapabilities("video");
|
|
23958
|
-
s && (e.codecs = e.codecs.filter(({ mimeType:
|
|
23958
|
+
s && (e.codecs = e.codecs.filter(({ mimeType: d }) => s === d), i.codecs = i.codecs.filter(({ mimeType: d }) => s === d));
|
|
23959
23959
|
const n = {
|
|
23960
23960
|
audio: cd(t),
|
|
23961
23961
|
video: cd(e)
|
|
@@ -24181,13 +24181,13 @@ class Kl extends ut.EventEmitter {
|
|
|
24181
24181
|
setTimeout(o, r, "event request timeout");
|
|
24182
24182
|
try {
|
|
24183
24183
|
this.emit(e.toString(), ...i, n, o);
|
|
24184
|
-
} catch (
|
|
24184
|
+
} catch (c) {
|
|
24185
24185
|
this.logger.error(
|
|
24186
24186
|
`EnhancedEventEmitter:: safeEmitAsPromise() | event listener for event ${e.toString()} threw an error [event:%s]:%o`,
|
|
24187
24187
|
{
|
|
24188
|
-
error:
|
|
24188
|
+
error: c
|
|
24189
24189
|
}
|
|
24190
|
-
), o(
|
|
24190
|
+
), o(c);
|
|
24191
24191
|
}
|
|
24192
24192
|
});
|
|
24193
24193
|
});
|
|
@@ -24239,7 +24239,7 @@ class Fh extends Kl {
|
|
|
24239
24239
|
iceTransportPolicy: i,
|
|
24240
24240
|
additionalSettings: n,
|
|
24241
24241
|
proprietaryConstraints: o,
|
|
24242
|
-
onTrackHandler:
|
|
24242
|
+
onTrackHandler: c
|
|
24243
24243
|
}) {
|
|
24244
24244
|
this.logger.debug("HandlerInterface::init()"), this._direction = e, this.pc = new RTCPeerConnection(
|
|
24245
24245
|
D({
|
|
@@ -24249,8 +24249,8 @@ class Fh extends Kl {
|
|
|
24249
24249
|
rtcpMuxPolicy: "require"
|
|
24250
24250
|
}, n),
|
|
24251
24251
|
o
|
|
24252
|
-
),
|
|
24253
|
-
d
|
|
24252
|
+
), c && this.pc.addEventListener("track", (d) => {
|
|
24253
|
+
c(d);
|
|
24254
24254
|
}), this._addEventListeners();
|
|
24255
24255
|
}
|
|
24256
24256
|
connect() {
|
|
@@ -24325,8 +24325,8 @@ class Fh extends Kl {
|
|
|
24325
24325
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
24326
24326
|
const n = i.sender.getParameters();
|
|
24327
24327
|
n.encodings.forEach(
|
|
24328
|
-
(o,
|
|
24329
|
-
|
|
24328
|
+
(o, c) => {
|
|
24329
|
+
c <= r ? o.active = true : o.active = false;
|
|
24330
24330
|
}
|
|
24331
24331
|
), yield i.sender.setParameters(n);
|
|
24332
24332
|
});
|
|
@@ -24339,8 +24339,8 @@ class Fh extends Kl {
|
|
|
24339
24339
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
24340
24340
|
const n = i.sender.getParameters();
|
|
24341
24341
|
n.encodings.forEach(
|
|
24342
|
-
(o,
|
|
24343
|
-
n.encodings[
|
|
24342
|
+
(o, c) => {
|
|
24343
|
+
n.encodings[c] = D(D({}, o), r);
|
|
24344
24344
|
}
|
|
24345
24345
|
), yield i.sender.setParameters(n);
|
|
24346
24346
|
});
|
|
@@ -24458,8 +24458,8 @@ class Hh extends Fh {
|
|
|
24458
24458
|
sdpSemantics: "unified-plan"
|
|
24459
24459
|
}, i),
|
|
24460
24460
|
n
|
|
24461
|
-
), o && this.pc.addEventListener("track", (
|
|
24462
|
-
o(
|
|
24461
|
+
), o && this.pc.addEventListener("track", (c) => {
|
|
24462
|
+
o(c);
|
|
24463
24463
|
}), this._addEventListeners();
|
|
24464
24464
|
}
|
|
24465
24465
|
send(n) {
|
|
@@ -24495,22 +24495,22 @@ class Hh extends Fh {
|
|
|
24495
24495
|
p.push(S);
|
|
24496
24496
|
}), this.logger.info(`selected codecs: ${JSON.stringify(p)}`), o.setCodecPreferences(p);
|
|
24497
24497
|
}
|
|
24498
|
-
const
|
|
24499
|
-
if (yield this.pc.setLocalDescription(
|
|
24498
|
+
const c = yield this.pc.createOffer();
|
|
24499
|
+
if (yield this.pc.setLocalDescription(c), r && r.findIndex(({ name: u }) => u === "opus") >= 0) {
|
|
24500
24500
|
const { enableDtx: u, enableStereo: p } = this, f = this.enableHighBitrate ? p ? 128e3 : 64e3 : p ? 64e3 : 32e3;
|
|
24501
|
-
|
|
24501
|
+
c.sdp = c.sdp.replace(
|
|
24502
24502
|
"minptime=10;useinbandfec=1",
|
|
24503
24503
|
`minptime=10;useinbandfec=1;${u ? "usedtx=1;" : ""}${p ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${f}`
|
|
24504
|
-
),
|
|
24504
|
+
), c.sdp += `a=rtcp-fb:111 nack\r
|
|
24505
24505
|
`;
|
|
24506
24506
|
}
|
|
24507
24507
|
this.midTransceiverMap.set(o.mid, o);
|
|
24508
|
-
const
|
|
24508
|
+
const d = (u) => l(this, null, function* () {
|
|
24509
24509
|
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(u)}]`), yield this.pc.setRemoteDescription(u), o.mid;
|
|
24510
24510
|
});
|
|
24511
|
-
return this.logger.debug(`send() | calling pc.setLocalDescription() [offer: ${JSON.stringify(
|
|
24512
|
-
offerSdp:
|
|
24513
|
-
callback:
|
|
24511
|
+
return this.logger.debug(`send() | calling pc.setLocalDescription() [offer: ${JSON.stringify(c, void 0, 2)}]`), {
|
|
24512
|
+
offerSdp: c,
|
|
24513
|
+
callback: d,
|
|
24514
24514
|
sender: o.sender,
|
|
24515
24515
|
mid: o.mid
|
|
24516
24516
|
};
|
|
@@ -24552,16 +24552,16 @@ class Vd extends Fh {
|
|
|
24552
24552
|
screenShare: n
|
|
24553
24553
|
}) {
|
|
24554
24554
|
this._assertSendDirection();
|
|
24555
|
-
const
|
|
24555
|
+
const c = this.supportsSendEncodings && r !== void 0 ? { sendEncodings: r } : {}, d = this.pc.addTransceiver(e, D({
|
|
24556
24556
|
direction: "sendonly",
|
|
24557
24557
|
streams: [
|
|
24558
24558
|
n ? this._sendScreenShareStream : this._sendWebStream
|
|
24559
24559
|
]
|
|
24560
|
-
},
|
|
24560
|
+
}, c));
|
|
24561
24561
|
if (!this.supportsSendEncodings && r) {
|
|
24562
24562
|
r.reverse();
|
|
24563
|
-
const S =
|
|
24564
|
-
S.encodings = r, yield
|
|
24563
|
+
const S = d.sender.getParameters();
|
|
24564
|
+
S.encodings = r, yield d.sender.setParameters(S);
|
|
24565
24565
|
}
|
|
24566
24566
|
const u = (S, E) => {
|
|
24567
24567
|
var $;
|
|
@@ -24575,13 +24575,13 @@ class Vd extends Fh {
|
|
|
24575
24575
|
`minptime=10;useinbandfec=1;${S ? "usedtx=1;" : ""}${E ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${_}`
|
|
24576
24576
|
);
|
|
24577
24577
|
}
|
|
24578
|
-
return this.midTransceiverMap.set(
|
|
24578
|
+
return this.midTransceiverMap.set(d.mid, d), {
|
|
24579
24579
|
offerSdp: p,
|
|
24580
24580
|
callback: (S) => l(this, null, function* () {
|
|
24581
|
-
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(S)}]`), yield this.pc.setRemoteDescription(S),
|
|
24581
|
+
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(S)}]`), yield this.pc.setRemoteDescription(S), d.mid;
|
|
24582
24582
|
}),
|
|
24583
|
-
sender:
|
|
24584
|
-
mid:
|
|
24583
|
+
sender: d.sender,
|
|
24584
|
+
mid: d.mid
|
|
24585
24585
|
};
|
|
24586
24586
|
});
|
|
24587
24587
|
}
|
|
@@ -24593,8 +24593,8 @@ class Vd extends Fh {
|
|
|
24593
24593
|
throw new Error("associated RTCRtpTransceiver not found");
|
|
24594
24594
|
const n = i.sender.getParameters(), o = n.encodings.length - 1 - r;
|
|
24595
24595
|
n.encodings.forEach(
|
|
24596
|
-
(
|
|
24597
|
-
|
|
24596
|
+
(c, d) => {
|
|
24597
|
+
d >= o ? c.active = true : c.active = false;
|
|
24598
24598
|
}
|
|
24599
24599
|
), yield i.sender.setParameters(n);
|
|
24600
24600
|
});
|
|
@@ -24634,12 +24634,12 @@ class Bh extends Fh {
|
|
|
24634
24634
|
i ? this._sendScreenShareStream : this._sendWebStream
|
|
24635
24635
|
],
|
|
24636
24636
|
sendEncodings: e
|
|
24637
|
-
}),
|
|
24638
|
-
this.logger.info(`Safari12::senders available params: ${JSON.stringify(
|
|
24639
|
-
const
|
|
24637
|
+
}), c = RTCRtpSender.getCapabilities(typeof t == "string" ? t : t.kind);
|
|
24638
|
+
this.logger.info(`Safari12::senders available params: ${JSON.stringify(c)}`);
|
|
24639
|
+
const d = [];
|
|
24640
24640
|
r && r.length > 0 && r.forEach((f) => {
|
|
24641
24641
|
var E;
|
|
24642
|
-
const S =
|
|
24642
|
+
const S = c.codecs.find(
|
|
24643
24643
|
(_) => _.mimeType.includes(f.name)
|
|
24644
24644
|
);
|
|
24645
24645
|
if (f.parameters) {
|
|
@@ -24649,8 +24649,8 @@ class Bh extends Fh {
|
|
|
24649
24649
|
const P = [...new Set(_).values()];
|
|
24650
24650
|
S.sdpFmtpLine = P.join(";");
|
|
24651
24651
|
}
|
|
24652
|
-
|
|
24653
|
-
}), this.logger.info(`Safari12::selected codecs: ${JSON.stringify(
|
|
24652
|
+
d.push(S);
|
|
24653
|
+
}), this.logger.info(`Safari12::selected codecs: ${JSON.stringify(d)}`), o.setCodecPreferences(d);
|
|
24654
24654
|
const u = yield this.pc.createOffer();
|
|
24655
24655
|
if (yield this.pc.setLocalDescription(u), t === "audio" || t.kind === "audio") {
|
|
24656
24656
|
const { enableStereo: f, enableDtx: S } = this, E = this.enableHighBitrate ? f ? 128e3 : 64e3 : f ? 64e3 : 32e3;
|
|
@@ -24938,35 +24938,35 @@ const Na = class extends ut.EventEmitter {
|
|
|
24938
24938
|
});
|
|
24939
24939
|
h(this, "request", (e2) => l(this, null, function* () {
|
|
24940
24940
|
const r2 = Na.createRequest(e2), i2 = new Promise((n2, o) => {
|
|
24941
|
-
const { id:
|
|
24942
|
-
id:
|
|
24941
|
+
const { id: d } = r2.payload._bolt, u = {
|
|
24942
|
+
id: d,
|
|
24943
24943
|
method: r2.type,
|
|
24944
24944
|
resolve: (p) => {
|
|
24945
|
-
this.queue.delete(
|
|
24945
|
+
this.queue.delete(d) && (clearTimeout(u.timer), n2(p));
|
|
24946
24946
|
},
|
|
24947
24947
|
timer: setTimeout(() => {
|
|
24948
|
-
this.queue.delete(
|
|
24948
|
+
this.queue.delete(d) && o(new Error(`request timeout for message id: ${d}`));
|
|
24949
24949
|
}, 2e4),
|
|
24950
24950
|
cancel: (p) => {
|
|
24951
|
-
this.queue.delete(
|
|
24951
|
+
this.queue.delete(d) && (clearTimeout(u.timer), o(p));
|
|
24952
24952
|
}
|
|
24953
24953
|
};
|
|
24954
|
-
this.queue.set(
|
|
24954
|
+
this.queue.set(d, u);
|
|
24955
24955
|
});
|
|
24956
24956
|
return this.channel.send(JSON.stringify(r2)), i2;
|
|
24957
24957
|
}));
|
|
24958
24958
|
h(this, "send", (e2) => {
|
|
24959
24959
|
const r2 = JSON.stringify(e2), i2 = 16384;
|
|
24960
24960
|
if (r2.length > i2) {
|
|
24961
|
-
const n2 = i2 - 200, o = Math.ceil(r2.length / n2),
|
|
24961
|
+
const n2 = i2 - 200, o = Math.ceil(r2.length / n2), c = [];
|
|
24962
24962
|
for (let u = 0; u < o; u += 1) {
|
|
24963
24963
|
const p = u * n2, f = (u + 1) * n2;
|
|
24964
|
-
|
|
24964
|
+
c.push(r2.slice(p, f));
|
|
24965
24965
|
}
|
|
24966
|
-
const
|
|
24966
|
+
const d = v4();
|
|
24967
24967
|
for (let u = 0; u < o; u += 1) {
|
|
24968
|
-
const p =
|
|
24969
|
-
id:
|
|
24968
|
+
const p = c[u], S = JSON.stringify({
|
|
24969
|
+
id: d,
|
|
24970
24970
|
count: o,
|
|
24971
24971
|
chunkIndex: u,
|
|
24972
24972
|
chunk: p
|
|
@@ -24981,17 +24981,17 @@ const Na = class extends ut.EventEmitter {
|
|
|
24981
24981
|
a(this, Fr).has(e2.id) || a(this, Fr).set(e2.id, []);
|
|
24982
24982
|
const r2 = a(this, Fr).get(e2.id);
|
|
24983
24983
|
if (r2[e2.chunkIndex] = e2, (r2 == null ? void 0 : r2.length) === e2.count && !r2.some((n2) => n2 === void 0)) {
|
|
24984
|
-
const n2 = a(this, Fr).get(e2.id), o = n2 == null ? void 0 : n2.reduce((
|
|
24984
|
+
const n2 = a(this, Fr).get(e2.id), o = n2 == null ? void 0 : n2.reduce((d, u) => d + u.chunk, "");
|
|
24985
24985
|
a(this, Fr).delete(e2.id);
|
|
24986
|
-
const
|
|
24987
|
-
if (!
|
|
24986
|
+
const c = JSON.parse(o);
|
|
24987
|
+
if (!c.payload || !zf(c.payload))
|
|
24988
24988
|
throw new Error("corrupted incoming message over dc", {
|
|
24989
|
-
cause: { code: "CORRUPT_DC_MESSAGE", values:
|
|
24989
|
+
cause: { code: "CORRUPT_DC_MESSAGE", values: c }
|
|
24990
24990
|
});
|
|
24991
|
-
if (this.processBoltHandshake(
|
|
24991
|
+
if (this.processBoltHandshake(c))
|
|
24992
24992
|
return;
|
|
24993
|
-
if (this.serverProtocolVersion = (i2 =
|
|
24994
|
-
return
|
|
24993
|
+
if (this.serverProtocolVersion = (i2 = c.payload._bolt) == null ? void 0 : i2.version, !this.processResponseMsg(c))
|
|
24994
|
+
return c;
|
|
24995
24995
|
}
|
|
24996
24996
|
});
|
|
24997
24997
|
h(this, "processResponseMsg", (e2) => {
|
|
@@ -25066,8 +25066,8 @@ const La = class extends Kl {
|
|
|
25066
25066
|
id: i,
|
|
25067
25067
|
direction: n,
|
|
25068
25068
|
handlerFactory: o,
|
|
25069
|
-
iceServers:
|
|
25070
|
-
iceTransportPolicy:
|
|
25069
|
+
iceServers: c,
|
|
25070
|
+
iceTransportPolicy: d,
|
|
25071
25071
|
proprietaryConstraints: u,
|
|
25072
25072
|
additionalSettings: p,
|
|
25073
25073
|
appData: f,
|
|
@@ -25103,8 +25103,8 @@ const La = class extends Kl {
|
|
|
25103
25103
|
delete _.iceServers, delete _.iceTransportPolicy, delete _.bundlePolicy, delete _.rtcpMuxPolicy, delete _.sdpSemantics, this.producers = /* @__PURE__ */ new Map(), this.consumers = /* @__PURE__ */ new Map(), this.datachannels = /* @__PURE__ */ new Map(), this.consumerTrackEvents = /* @__PURE__ */ new Map(), this.unknownTracksMap = /* @__PURE__ */ new Map(), this.awaitQueue = new Qu(E, true), this.handler = o(), this.handler.enableHighBitrate = (P = S == null ? void 0 : S.enableHighBitrate) != null ? P : false, this.handler.enableStereo = (k = S == null ? void 0 : S.enableStereo) != null ? k : false, this.handler.enableDtx = (A = S == null ? void 0 : S.enableDtx) != null ? A : true, this.handler.sfu = a(this, Gi), this.handler.init({
|
|
25104
25104
|
onTrackHandler: this._ontrack.bind(this),
|
|
25105
25105
|
direction: n,
|
|
25106
|
-
iceServers:
|
|
25107
|
-
iceTransportPolicy:
|
|
25106
|
+
iceServers: c,
|
|
25107
|
+
iceTransportPolicy: d,
|
|
25108
25108
|
additionalSettings: p,
|
|
25109
25109
|
proprietaryConstraints: u
|
|
25110
25110
|
}), this.appData = f || {}, this.transportConnectionPromise = new Promise((N) => {
|
|
@@ -25246,8 +25246,8 @@ const La = class extends Kl {
|
|
|
25246
25246
|
const {
|
|
25247
25247
|
track: n,
|
|
25248
25248
|
encodings: o,
|
|
25249
|
-
codecOptions:
|
|
25250
|
-
stopTracks:
|
|
25249
|
+
codecOptions: c,
|
|
25250
|
+
stopTracks: d = true,
|
|
25251
25251
|
disableTrackOnPause: u = true,
|
|
25252
25252
|
zeroRtpOnPause: p = false,
|
|
25253
25253
|
appData: f = {}
|
|
@@ -25262,7 +25262,7 @@ const La = class extends Kl {
|
|
|
25262
25262
|
} = yield this.handler.send({
|
|
25263
25263
|
track: n,
|
|
25264
25264
|
encodings: o,
|
|
25265
|
-
codecOptions:
|
|
25265
|
+
codecOptions: c,
|
|
25266
25266
|
screenShare: f == null ? void 0 : f.screenShare
|
|
25267
25267
|
}), { answer: H, producerId: $ } = yield r(
|
|
25268
25268
|
{
|
|
@@ -25270,7 +25270,7 @@ const La = class extends Kl {
|
|
|
25270
25270
|
kind: n.kind,
|
|
25271
25271
|
paused: u ? !n.enabled || Object.hasOwn(n, "fakeTracks") : false,
|
|
25272
25272
|
appData: B(D({}, f || {}), { mid: N }),
|
|
25273
|
-
codecOptions:
|
|
25273
|
+
codecOptions: c,
|
|
25274
25274
|
producingTransportId: this.serverId
|
|
25275
25275
|
}
|
|
25276
25276
|
), F = yield k(H);
|
|
@@ -25280,7 +25280,7 @@ const La = class extends Kl {
|
|
|
25280
25280
|
id: S,
|
|
25281
25281
|
localId: E,
|
|
25282
25282
|
track: n,
|
|
25283
|
-
stopTracks:
|
|
25283
|
+
stopTracks: d,
|
|
25284
25284
|
disableTrackOnPause: u,
|
|
25285
25285
|
zeroRtpOnPause: p,
|
|
25286
25286
|
appData: f,
|
|
@@ -25318,14 +25318,14 @@ const La = class extends Kl {
|
|
|
25318
25318
|
return this.awaitQueue.push(() => l(this, null, function* () {
|
|
25319
25319
|
const n = {}, {
|
|
25320
25320
|
consumerStates: o,
|
|
25321
|
-
sessionDescription:
|
|
25322
|
-
failedProducers:
|
|
25321
|
+
sessionDescription: c,
|
|
25322
|
+
failedProducers: d
|
|
25323
25323
|
} = yield r(e);
|
|
25324
25324
|
o.forEach((p, f) => {
|
|
25325
25325
|
n[f] = this.createConsumerObjectAndWaitForTrack(B(D({}, p), {
|
|
25326
25326
|
producerId: f
|
|
25327
25327
|
}));
|
|
25328
|
-
}),
|
|
25328
|
+
}), c && (this.logger.info("Session description found, sending negotiation request"), yield i(c));
|
|
25329
25329
|
const u = [];
|
|
25330
25330
|
return yield Promise.all(Object.entries(n).map(
|
|
25331
25331
|
([p, f]) => f.then((S) => u.push(S)).catch(() => {
|
|
@@ -25334,7 +25334,7 @@ const La = class extends Kl {
|
|
|
25334
25334
|
transport: { serverId: this.serverId }
|
|
25335
25335
|
});
|
|
25336
25336
|
})
|
|
25337
|
-
)), { consumers: u, failedProducers:
|
|
25337
|
+
)), { consumers: u, failedProducers: d };
|
|
25338
25338
|
}), "Transport.consume", { producersLength: e.length });
|
|
25339
25339
|
});
|
|
25340
25340
|
}
|
|
@@ -25351,12 +25351,12 @@ const La = class extends Kl {
|
|
|
25351
25351
|
}
|
|
25352
25352
|
static setCodecAndFmtpMappings(e, r, i) {
|
|
25353
25353
|
const n = parse(e.sdp);
|
|
25354
|
-
return n.media = n.media.map((
|
|
25355
|
-
if (r.includes(
|
|
25356
|
-
const
|
|
25357
|
-
return
|
|
25354
|
+
return n.media = n.media.map((c) => {
|
|
25355
|
+
if (r.includes(c.mid.toString())) {
|
|
25356
|
+
const d = D({}, c);
|
|
25357
|
+
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;
|
|
25358
25358
|
}
|
|
25359
|
-
return
|
|
25359
|
+
return c;
|
|
25360
25360
|
}), B(D({}, e), {
|
|
25361
25361
|
sdp: write(n)
|
|
25362
25362
|
});
|
|
@@ -25370,8 +25370,8 @@ const La = class extends Kl {
|
|
|
25370
25370
|
static setHeaderExtensionMappings(e, r) {
|
|
25371
25371
|
const i = parse(e.sdp);
|
|
25372
25372
|
return i.media = i.media.map((o) => {
|
|
25373
|
-
const
|
|
25374
|
-
return
|
|
25373
|
+
const c = D({}, o);
|
|
25374
|
+
return c.ext = r[o.mid], c;
|
|
25375
25375
|
}), B(D({}, e), {
|
|
25376
25376
|
sdp: write(i)
|
|
25377
25377
|
});
|
|
@@ -25386,17 +25386,17 @@ const La = class extends Kl {
|
|
|
25386
25386
|
this.handler.pc.remoteDescription
|
|
25387
25387
|
);
|
|
25388
25388
|
this.logger.info("Stopping transceivers", { consumerIds: e.map(({ id: u }) => u) }), e.forEach((u) => u.close(void 0, true));
|
|
25389
|
-
let
|
|
25390
|
-
this.logger.info("Created offer for closing consumers", { sdp:
|
|
25391
|
-
|
|
25389
|
+
let c = yield this.handler.pc.createOffer();
|
|
25390
|
+
this.logger.info("Created offer for closing consumers", { sdp: c.sdp }), c = La.setCodecAndFmtpMappings(
|
|
25391
|
+
c,
|
|
25392
25392
|
i,
|
|
25393
25393
|
n
|
|
25394
|
-
),
|
|
25395
|
-
|
|
25394
|
+
), c = La.setHeaderExtensionMappings(
|
|
25395
|
+
c,
|
|
25396
25396
|
o
|
|
25397
|
-
), this.logger.info("Updated codec and fmtp mappings in close consumer offer", { sdp:
|
|
25398
|
-
const
|
|
25399
|
-
this.logger.info("Received answer in close consumers", { sdp:
|
|
25397
|
+
), this.logger.info("Updated codec and fmtp mappings in close consumer offer", { sdp: c.sdp }), yield this.setLocalDescription(c), this.logger.info("Successfully set local description in close consumers");
|
|
25398
|
+
const d = yield r(e, c);
|
|
25399
|
+
this.logger.info("Received answer in close consumers", { sdp: d.sdp }), yield this.setRemoteDescription(d), this.logger.info("Remote description was set successfully in close consumers", { sdp: d.sdp });
|
|
25400
25400
|
} catch (i) {
|
|
25401
25401
|
this.logger.error("Failed to close consumers", { error: i });
|
|
25402
25402
|
}
|
|
@@ -25411,10 +25411,10 @@ const La = class extends Kl {
|
|
|
25411
25411
|
const i = parse(r.sdp);
|
|
25412
25412
|
return i.media = i.media.map((n) => {
|
|
25413
25413
|
if (n.type === "audio") {
|
|
25414
|
-
const o = D({}, n),
|
|
25414
|
+
const o = D({}, n), c = o.fmtp.find(
|
|
25415
25415
|
(u) => u.payload === 111
|
|
25416
25416
|
);
|
|
25417
|
-
return
|
|
25417
|
+
return c && (c.config += ";stereo=1;sprop-stereo=1"), o.rtcpFb || (o.rtcpFb = []), o.rtcpFb.some(
|
|
25418
25418
|
(u) => u.type === "nack"
|
|
25419
25419
|
) || o.rtcpFb.push({
|
|
25420
25420
|
payload: parseInt(o.payloads, 10),
|
|
@@ -25435,8 +25435,8 @@ const La = class extends Kl {
|
|
|
25435
25435
|
a(this, Gi) === Pe.HIVE ? o = `${n[0].id}:${r.kind}` : o = `${i.mid}:${r.kind}`, r.addEventListener("ended", () => {
|
|
25436
25436
|
this.logger.info(`rtc consumer track ended [trackId: ${r.id}]`), this.unknownTracksMap.delete(o);
|
|
25437
25437
|
});
|
|
25438
|
-
const
|
|
25439
|
-
|
|
25438
|
+
const c = this.consumerTrackEvents.get(o);
|
|
25439
|
+
c ? (c(r, i), this.consumerTrackEvents.delete(o)) : (this.logger.warn(`track event handler not found ${o}`), this.unknownTracksMap.set(o, e));
|
|
25440
25440
|
}
|
|
25441
25441
|
sendErrorOverDC(e, r, i) {
|
|
25442
25442
|
const n = this.getDatachannel(e);
|
|
@@ -25461,13 +25461,13 @@ const La = class extends Kl {
|
|
|
25461
25461
|
producerId: i,
|
|
25462
25462
|
producingPeerId: n,
|
|
25463
25463
|
producingTransportId: o,
|
|
25464
|
-
streamId:
|
|
25465
|
-
paused:
|
|
25464
|
+
streamId: c,
|
|
25465
|
+
paused: d,
|
|
25466
25466
|
screenShare: u,
|
|
25467
25467
|
appData: p,
|
|
25468
25468
|
kind: f,
|
|
25469
25469
|
mimeType: S
|
|
25470
|
-
} = e, E = `${
|
|
25470
|
+
} = e, E = `${c}:${f}`, _ = B(D({}, e), {
|
|
25471
25471
|
name: "consumer creation task error",
|
|
25472
25472
|
message: "consumer creation failed"
|
|
25473
25473
|
});
|
|
@@ -25486,7 +25486,7 @@ const La = class extends Kl {
|
|
|
25486
25486
|
localId: F.mid,
|
|
25487
25487
|
transceiver: F,
|
|
25488
25488
|
track: K,
|
|
25489
|
-
paused:
|
|
25489
|
+
paused: d,
|
|
25490
25490
|
producerId: i,
|
|
25491
25491
|
producingPeerId: n,
|
|
25492
25492
|
producingTransportId: o,
|
|
@@ -25736,12 +25736,12 @@ class iD extends ut.EventEmitter {
|
|
|
25736
25736
|
stopTransports(e) {
|
|
25737
25737
|
var r, i;
|
|
25738
25738
|
if (e.send && this.sendTransport !== void 0) {
|
|
25739
|
-
const { id: n, serverId: o, direction:
|
|
25740
|
-
this.logger.info("Closing send transport", { transport: { id: n, serverId: o, type:
|
|
25739
|
+
const { id: n, serverId: o, direction: c } = a(this, ot);
|
|
25740
|
+
this.logger.info("Closing send transport", { transport: { id: n, serverId: o, type: c } }), a(this, ot).close(), a(this, ot).removeAllListeners(), m(this, ot, void 0);
|
|
25741
25741
|
}
|
|
25742
25742
|
if (e.recv && this.recvTransport !== void 0) {
|
|
25743
|
-
const { id: n, serverId: o, direction:
|
|
25744
|
-
this.logger.info("Closing recv transport", { transport: { id: n, serverId: o, type:
|
|
25743
|
+
const { id: n, serverId: o, direction: c } = a(this, ct);
|
|
25744
|
+
this.logger.info("Closing recv transport", { transport: { id: n, serverId: o, type: c } }), (r = a(this, ct)) == null || r.close(), (i = a(this, ct)) == null || i.removeAllListeners(), m(this, ct, void 0);
|
|
25745
25745
|
}
|
|
25746
25746
|
V(this, mc, eh).call(this);
|
|
25747
25747
|
}
|
|
@@ -25761,7 +25761,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25761
25761
|
});
|
|
25762
25762
|
}, il = /* @__PURE__ */ new WeakSet(), Qf = function(e) {
|
|
25763
25763
|
return l(this, null, function* () {
|
|
25764
|
-
var o,
|
|
25764
|
+
var o, c, d, u, p, f, S, E;
|
|
25765
25765
|
(Jn(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(Z.FORCE_RELAY)) && m(this, Ls, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, Ls)}`);
|
|
25766
25766
|
const n = yield lt().getICEServers().catch((_) => (this.logger.warn(`failed to get iceservers from server: ${_.message}`), []));
|
|
25767
25767
|
if (e.send) {
|
|
@@ -25774,7 +25774,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25774
25774
|
encodedInsertableStreams: (o = this.context.getValue("modules").e2ee) == null ? void 0 : o.enabled
|
|
25775
25775
|
},
|
|
25776
25776
|
config: {
|
|
25777
|
-
enableHighBitrate: (u = (
|
|
25777
|
+
enableHighBitrate: (u = (d = (c = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? u : false,
|
|
25778
25778
|
enableStereo: (S = (f = (p = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : p.audio) == null ? void 0 : f.enableStereo) != null ? S : false,
|
|
25779
25779
|
enableDtx: a(this, Mn) === Pe.HIVE ? true : !!_
|
|
25780
25780
|
},
|
|
@@ -25797,8 +25797,8 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25797
25797
|
const o = this.context.getValue("flagsmith").hasFeature(
|
|
25798
25798
|
Z.ENABLE_HIVE_INFINITE_RETRIES
|
|
25799
25799
|
) ? 1 / 0 : 3;
|
|
25800
|
-
return yield Wf((
|
|
25801
|
-
|
|
25800
|
+
return yield Wf((c, d) => l(this, null, function* () {
|
|
25801
|
+
c > 0 && this.logger.debug(`Retrying transport connect, count: ${c}`, {
|
|
25802
25802
|
transport: { id: r, serverId: i, type: n }
|
|
25803
25803
|
});
|
|
25804
25804
|
try {
|
|
@@ -25807,7 +25807,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25807
25807
|
yield V(this, al, Xf).call(this, e);
|
|
25808
25808
|
} catch (u) {
|
|
25809
25809
|
if (u instanceof fi) {
|
|
25810
|
-
|
|
25810
|
+
d(u);
|
|
25811
25811
|
return;
|
|
25812
25812
|
}
|
|
25813
25813
|
throw this.logger.error("Failed to connect transport, retrying", { transport: e, error: u }), u;
|
|
@@ -25891,8 +25891,8 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25891
25891
|
}
|
|
25892
25892
|
);
|
|
25893
25893
|
const o = () => {
|
|
25894
|
-
const
|
|
25895
|
-
|
|
25894
|
+
const c = a(this, zi)[r];
|
|
25895
|
+
c !== void 0 && (clearTimeout(c), a(this, zi)[r] = void 0);
|
|
25896
25896
|
};
|
|
25897
25897
|
switch (n) {
|
|
25898
25898
|
case "connected":
|
|
@@ -25912,7 +25912,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25912
25912
|
})), e.on("icecandidate", (n) => l(this, null, function* () {
|
|
25913
25913
|
this.logger.debug("Sending iceCandidate:", { iceCandidate: n });
|
|
25914
25914
|
})), e.on("datachannel:events", (n, o) => l(this, null, function* () {
|
|
25915
|
-
var
|
|
25915
|
+
var c, d;
|
|
25916
25916
|
this.logger.debug("Got data channel message on event:", {
|
|
25917
25917
|
rtcChannel: { label: n, message: o }
|
|
25918
25918
|
});
|
|
@@ -25929,7 +25929,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25929
25929
|
break;
|
|
25930
25930
|
}
|
|
25931
25931
|
case "hub-disconnect": {
|
|
25932
|
-
this.logger.debug(`media hub disconnected, full_reconnect: ${(
|
|
25932
|
+
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) === true && this.handleErrors("rejoin");
|
|
25933
25933
|
break;
|
|
25934
25934
|
}
|
|
25935
25935
|
case "error":
|
|
@@ -25949,7 +25949,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25949
25949
|
return l(this, null, function* () {
|
|
25950
25950
|
const i = e === "recv";
|
|
25951
25951
|
try {
|
|
25952
|
-
const { sdp: n, type: o } = r,
|
|
25952
|
+
const { sdp: n, type: o } = r, c = {
|
|
25953
25953
|
consuming: i,
|
|
25954
25954
|
description: {
|
|
25955
25955
|
sdp: n,
|
|
@@ -25958,7 +25958,7 @@ bn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ct = /*
|
|
|
25958
25958
|
},
|
|
25959
25959
|
producers: []
|
|
25960
25960
|
};
|
|
25961
|
-
return a(this, kn).connectTransport(
|
|
25961
|
+
return a(this, kn).connectTransport(c);
|
|
25962
25962
|
} catch (n) {
|
|
25963
25963
|
throw this.logger.error(
|
|
25964
25964
|
`Error in ${e} transport connection:`,
|
|
@@ -26016,29 +26016,29 @@ class aD {
|
|
|
26016
26016
|
type: "create_consumer",
|
|
26017
26017
|
payload: {
|
|
26018
26018
|
producers: t.map(({
|
|
26019
|
-
producerId:
|
|
26020
|
-
producingTransportId:
|
|
26019
|
+
producerId: c,
|
|
26020
|
+
producingTransportId: d,
|
|
26021
26021
|
kind: u,
|
|
26022
26022
|
mimeType: p
|
|
26023
26023
|
}) => ({
|
|
26024
|
-
producerId:
|
|
26025
|
-
producingTransportId:
|
|
26024
|
+
producerId: c,
|
|
26025
|
+
producingTransportId: d,
|
|
26026
26026
|
preferredCodec: D(D({}, u === "video" && p ? { video: p } : {}), u === "audio" && p ? { audio: p } : {})
|
|
26027
26027
|
}))
|
|
26028
26028
|
}
|
|
26029
26029
|
}, i = yield this.recvTransport.sendDataChannelMessage("events", r), n = /* @__PURE__ */ new Map();
|
|
26030
|
-
t.forEach((
|
|
26030
|
+
t.forEach((c) => n.set(c.producerId, c));
|
|
26031
26031
|
const o = /* @__PURE__ */ new Map();
|
|
26032
|
-
return Object.entries(i).forEach(([
|
|
26033
|
-
const u = n.get(
|
|
26034
|
-
u && o.set(
|
|
26035
|
-
consumerId:
|
|
26032
|
+
return Object.entries(i).forEach(([c, d]) => {
|
|
26033
|
+
const u = n.get(d.producerId);
|
|
26034
|
+
u && o.set(d.producerId, {
|
|
26035
|
+
consumerId: c,
|
|
26036
26036
|
producingTransportId: u.producingTransportId,
|
|
26037
26037
|
producingPeerId: u.producingPeerId,
|
|
26038
26038
|
kind: u.kind,
|
|
26039
26039
|
paused: u.pause,
|
|
26040
|
-
streamId:
|
|
26041
|
-
trackId:
|
|
26040
|
+
streamId: d.streamId,
|
|
26041
|
+
trackId: d.trackId,
|
|
26042
26042
|
screenShare: u.screenShare,
|
|
26043
26043
|
mimeType: u.mimeType,
|
|
26044
26044
|
appData: {}
|
|
@@ -26086,7 +26086,7 @@ class aD {
|
|
|
26086
26086
|
this.logger.warn("events datachannel not found");
|
|
26087
26087
|
return;
|
|
26088
26088
|
}
|
|
26089
|
-
const i = (o = t == null ? void 0 : t.map(({ id:
|
|
26089
|
+
const i = (o = t == null ? void 0 : t.map(({ id: c }) => c)) != null ? o : [], n = {
|
|
26090
26090
|
type: "switch_consumer_layer",
|
|
26091
26091
|
payload: {
|
|
26092
26092
|
consumerIds: i,
|
|
@@ -26131,8 +26131,8 @@ class nD {
|
|
|
26131
26131
|
if (!t || t && t.length === 0)
|
|
26132
26132
|
throw new Error("List of producers is required");
|
|
26133
26133
|
const e = /* @__PURE__ */ new Map(), r = [];
|
|
26134
|
-
t.forEach((
|
|
26135
|
-
const { producingPeerId: u, producerId: p, producingTransportId: f } =
|
|
26134
|
+
t.forEach((d) => {
|
|
26135
|
+
const { producingPeerId: u, producerId: p, producingTransportId: f } = d, S = a(this, Tc).getValue("flagsmith").hasFeature(Z.ENABLE_CF_SIMULCAST) ? {
|
|
26136
26136
|
simulcast: {
|
|
26137
26137
|
preferredRid: "h",
|
|
26138
26138
|
priorityOrdering: "asciibetical",
|
|
@@ -26149,16 +26149,16 @@ class nD {
|
|
|
26149
26149
|
requests: r,
|
|
26150
26150
|
consumingTransportId: this.recvTransport.serverId
|
|
26151
26151
|
}), n = /* @__PURE__ */ new Map();
|
|
26152
|
-
t.forEach((
|
|
26153
|
-
const o = /* @__PURE__ */ new Map(),
|
|
26154
|
-
return Object.entries(i.consumerStateMap).forEach(([
|
|
26155
|
-
const p = n.get(
|
|
26152
|
+
t.forEach((d) => n.set(d.producerId, d));
|
|
26153
|
+
const o = /* @__PURE__ */ new Map(), c = [];
|
|
26154
|
+
return Object.entries(i.consumerStateMap).forEach(([d, u]) => {
|
|
26155
|
+
const p = n.get(d);
|
|
26156
26156
|
if (!p)
|
|
26157
26157
|
return;
|
|
26158
26158
|
if (u.errorCode) {
|
|
26159
|
-
a(this, ts).warn(`Consumer request failed for producer ${
|
|
26159
|
+
a(this, ts).warn(`Consumer request failed for producer ${d}`, {
|
|
26160
26160
|
error: { message: u.errorCode }
|
|
26161
|
-
}),
|
|
26161
|
+
}), c.push(B(D({}, p), { errorCode: u.errorCode }));
|
|
26162
26162
|
return;
|
|
26163
26163
|
}
|
|
26164
26164
|
let f = {};
|
|
@@ -26166,7 +26166,7 @@ class nD {
|
|
|
26166
26166
|
f = JSON.parse(u.producerState.appData);
|
|
26167
26167
|
} catch (S) {
|
|
26168
26168
|
}
|
|
26169
|
-
o.set(
|
|
26169
|
+
o.set(d, {
|
|
26170
26170
|
consumerId: u.consumerId,
|
|
26171
26171
|
producingTransportId: p.producingTransportId,
|
|
26172
26172
|
producingPeerId: p.producingPeerId,
|
|
@@ -26178,7 +26178,7 @@ class nD {
|
|
|
26178
26178
|
mimeType: p.mimeType,
|
|
26179
26179
|
appData: f
|
|
26180
26180
|
});
|
|
26181
|
-
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers:
|
|
26181
|
+
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers: c };
|
|
26182
26182
|
});
|
|
26183
26183
|
}
|
|
26184
26184
|
negotiate(t) {
|
|
@@ -26222,10 +26222,10 @@ class nD {
|
|
|
26222
26222
|
},
|
|
26223
26223
|
consumerIds: n,
|
|
26224
26224
|
consumingTransportId: this.recvTransport.serverId
|
|
26225
|
-
},
|
|
26225
|
+
}, c = yield this.socketHandler.closeConsumer(o), d = fw.fromBinary(c).description;
|
|
26226
26226
|
return {
|
|
26227
|
-
sdp:
|
|
26228
|
-
type:
|
|
26227
|
+
sdp: d.sdp,
|
|
26228
|
+
type: d.type
|
|
26229
26229
|
};
|
|
26230
26230
|
});
|
|
26231
26231
|
return yield this.recvTransport.awaitQueue.push(() => this.recvTransport.closeConsumers(t, e), "ConsumerStrategy.close", { consumersLength: t.length }), {};
|
|
@@ -26262,7 +26262,7 @@ class qh {
|
|
|
26262
26262
|
(n) => e === "video" ? n.type === "video" : n.type === "audio"
|
|
26263
26263
|
).at(-1).msid;
|
|
26264
26264
|
}
|
|
26265
|
-
create(
|
|
26265
|
+
create(c) {
|
|
26266
26266
|
return l(this, arguments, function* ({
|
|
26267
26267
|
offer: t,
|
|
26268
26268
|
kind: e,
|
|
@@ -26272,7 +26272,7 @@ class qh {
|
|
|
26272
26272
|
producingTransportId: o
|
|
26273
26273
|
}) {
|
|
26274
26274
|
var S, E;
|
|
26275
|
-
const
|
|
26275
|
+
const d = qh.getMSIDFromSDP(t.sdp, e), u = {
|
|
26276
26276
|
description: {
|
|
26277
26277
|
sdp: t.sdp,
|
|
26278
26278
|
type: t.type,
|
|
@@ -26280,7 +26280,7 @@ class qh {
|
|
|
26280
26280
|
},
|
|
26281
26281
|
paused: r,
|
|
26282
26282
|
kind: e,
|
|
26283
|
-
msid:
|
|
26283
|
+
msid: d,
|
|
26284
26284
|
appData: JSON.stringify(i),
|
|
26285
26285
|
screenShare: (S = i.screenShare) != null ? S : false,
|
|
26286
26286
|
mimeType: `${e}/${(E = n[0]) == null ? void 0 : E.name}`,
|
|
@@ -26421,18 +26421,18 @@ Yi = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), On = /*
|
|
|
26421
26421
|
throw new Error("Recv transport is closed");
|
|
26422
26422
|
const e = 500, r = a(this, sr).splice(0, a(this, sr).length);
|
|
26423
26423
|
try {
|
|
26424
|
-
const i = new Set(Array.from(this.consumers.values()).map(({ producerId:
|
|
26424
|
+
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));
|
|
26425
26425
|
if (n.length === 0)
|
|
26426
26426
|
return;
|
|
26427
|
-
const { consumers: o, failedProducers:
|
|
26427
|
+
const { consumers: o, failedProducers: c } = yield this.recvTransport.consume(
|
|
26428
26428
|
n,
|
|
26429
26429
|
V(this, gl, nS).bind(this),
|
|
26430
26430
|
a(this, ps).negotiate.bind(a(this, ps))
|
|
26431
26431
|
);
|
|
26432
|
-
if (o.forEach(V(this, ml, oS).bind(this)),
|
|
26433
|
-
this.logger.error("Failed to create consumers for producers", { producers:
|
|
26434
|
-
const
|
|
26435
|
-
m(this, sr, a(this, sr).concat(
|
|
26432
|
+
if (o.forEach(V(this, ml, oS).bind(this)), c != null && c.length) {
|
|
26433
|
+
this.logger.error("Failed to create consumers for producers", { producers: c });
|
|
26434
|
+
const d = c.filter(({ errorCode: u, producerId: p }) => u === "not_found_track_error" ? (this.logger.error(`Track not found for producer: ${p}. This will not be retried.`), false) : u === "backend_error" ? (this.logger.error("Unrecoverable error: backend error"), false) : true);
|
|
26435
|
+
m(this, sr, a(this, sr).concat(d)), m(this, Nn, setTimeout(
|
|
26436
26436
|
V(this, _c, ih).bind(this),
|
|
26437
26437
|
e
|
|
26438
26438
|
));
|
|
@@ -26458,12 +26458,12 @@ Yi = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), On = /*
|
|
|
26458
26458
|
return a(this, Ec).create(e);
|
|
26459
26459
|
}, pl = /* @__PURE__ */ new WeakSet(), aS = function(e, r) {
|
|
26460
26460
|
e.on("close", (i, n) => l(this, null, function* () {
|
|
26461
|
-
const { offer: o, reason:
|
|
26461
|
+
const { offer: o, reason: c } = i;
|
|
26462
26462
|
if (this.logger.info("producer::closing", {
|
|
26463
|
-
debuggingHint:
|
|
26463
|
+
debuggingHint: c,
|
|
26464
26464
|
producer: B(D({}, e), { status: "closing" })
|
|
26465
|
-
}),
|
|
26466
|
-
const
|
|
26465
|
+
}), c !== xd) {
|
|
26466
|
+
const d = {
|
|
26467
26467
|
producerId: e.id,
|
|
26468
26468
|
description: {
|
|
26469
26469
|
sdp: o.sdp,
|
|
@@ -26472,7 +26472,7 @@ Yi = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), On = /*
|
|
|
26472
26472
|
}
|
|
26473
26473
|
};
|
|
26474
26474
|
try {
|
|
26475
|
-
const u = yield this.socketHandler.closeProducer(
|
|
26475
|
+
const u = yield this.socketHandler.closeProducer(d), p = {
|
|
26476
26476
|
sdp: u == null ? void 0 : u.sdp,
|
|
26477
26477
|
type: u == null ? void 0 : u.type
|
|
26478
26478
|
};
|
|
@@ -26518,8 +26518,8 @@ const Tl = class {
|
|
|
26518
26518
|
hangoverFrames: i = 5,
|
|
26519
26519
|
noiseAdaptationRate: n = 0.95,
|
|
26520
26520
|
voiceAdaptationRate: o = 0.99,
|
|
26521
|
-
minEnergyThreshold:
|
|
26522
|
-
maxEnergyThreshold:
|
|
26521
|
+
minEnergyThreshold: c = 5e-3,
|
|
26522
|
+
maxEnergyThreshold: d = 0.2,
|
|
26523
26523
|
energyRatioThreshold: u = 1.5,
|
|
26524
26524
|
noiseHistorySize: p = 50
|
|
26525
26525
|
} = {}) {
|
|
@@ -26541,14 +26541,14 @@ const Tl = class {
|
|
|
26541
26541
|
g(this, Xi, 0);
|
|
26542
26542
|
g(this, rr, []);
|
|
26543
26543
|
g(this, kc, void 0);
|
|
26544
|
-
m(this, Ln, t), m(this, bt, t), m(this, Pc, e), m(this, Cc, r), m(this, Rc, i), m(this, Vn, n), m(this, xn, o), m(this, wc,
|
|
26544
|
+
m(this, Ln, t), m(this, bt, t), m(this, Pc, e), m(this, Cc, r), m(this, Rc, i), m(this, Vn, n), m(this, xn, o), m(this, wc, c), m(this, bc, d), m(this, Un, u), m(this, kc, p), m(this, gs, t / 2);
|
|
26545
26545
|
}
|
|
26546
26546
|
get voiceDetected() {
|
|
26547
26547
|
return a(this, ms);
|
|
26548
26548
|
}
|
|
26549
26549
|
processAudioChunk(t) {
|
|
26550
|
-
var o,
|
|
26551
|
-
const e = V(o = Tl, vl, lS).call(o, t), r = V(
|
|
26550
|
+
var o, c;
|
|
26551
|
+
const e = V(o = Tl, vl, lS).call(o, t), r = V(c = Tl, yl, uS).call(c, t);
|
|
26552
26552
|
return V(this, fl, cS).call(this, e), e / a(this, gs) > a(this, Un) && e > a(this, bt) && r > a(this, Pc) ? (m(this, Qi, a(this, Qi) + 1), m(this, Xi, a(this, Rc)), a(this, Qi) >= a(this, Cc) && m(this, ms, true)) : (m(this, Qi, 0), a(this, Xi) > 0 ? m(this, Xi, a(this, Xi) - 1) : a(this, ms) && m(this, ms, false), a(this, ms) || V(this, Sl, dS).call(this, e)), { energy: e, isVoice: a(this, ms) };
|
|
26553
26553
|
}
|
|
26554
26554
|
reset() {
|
|
@@ -26642,8 +26642,8 @@ ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), fs = /*
|
|
|
26642
26642
|
var o;
|
|
26643
26643
|
a(this, Br).state === "suspended" && a(this, Br).resume().then(() => {
|
|
26644
26644
|
this.logger.debug("AudioActivityReporter: AudioContext forced resumed");
|
|
26645
|
-
}).catch((
|
|
26646
|
-
this.logger.error("AudioActivityReporter: Error resuming AudioContext",
|
|
26645
|
+
}).catch((c) => {
|
|
26646
|
+
this.logger.error("AudioActivityReporter: Error resuming AudioContext", c);
|
|
26647
26647
|
});
|
|
26648
26648
|
const t = new Float32Array(a(this, qr).frequencyBinCount);
|
|
26649
26649
|
a(this, qr).getFloatTimeDomainData(t);
|
|
@@ -26675,7 +26675,7 @@ const lD = (s = false) => {
|
|
|
26675
26675
|
if ("MediaStreamTrackGenerator" in window && "AudioData" in window)
|
|
26676
26676
|
try {
|
|
26677
26677
|
const e = new window.MediaStreamTrackGenerator({ kind: "audio" }), r = e.writable.getWriter(), i = 48e3, n = 128, o = 1;
|
|
26678
|
-
let
|
|
26678
|
+
let c = 0, d = null;
|
|
26679
26679
|
const u = () => l(void 0, null, function* () {
|
|
26680
26680
|
try {
|
|
26681
26681
|
const S = new Float32Array(n * o), E = new window.AudioData({
|
|
@@ -26683,18 +26683,18 @@ const lD = (s = false) => {
|
|
|
26683
26683
|
sampleRate: i,
|
|
26684
26684
|
numberOfFrames: n,
|
|
26685
26685
|
numberOfChannels: o,
|
|
26686
|
-
timestamp:
|
|
26686
|
+
timestamp: c,
|
|
26687
26687
|
data: S
|
|
26688
26688
|
});
|
|
26689
|
-
|
|
26689
|
+
c += n / i * 1e6, yield r.ready, yield r.write(E);
|
|
26690
26690
|
} catch (S) {
|
|
26691
|
-
|
|
26691
|
+
d && clearInterval(d), r.releaseLock(), e.writable.abort();
|
|
26692
26692
|
}
|
|
26693
26693
|
});
|
|
26694
|
-
|
|
26694
|
+
d = window.setInterval(u, 100);
|
|
26695
26695
|
const f = new MediaStream([e]).getAudioTracks()[0];
|
|
26696
26696
|
return f.addEventListener("ended", () => {
|
|
26697
|
-
|
|
26697
|
+
d && clearInterval(d), r.releaseLock(), e.writable.abort();
|
|
26698
26698
|
}), Object.assign(f, { fakeTracks: "fakeTracks:fakeAudioTrack" }), f.enabled = s, f;
|
|
26699
26699
|
} catch (e) {
|
|
26700
26700
|
}
|
|
@@ -26825,8 +26825,8 @@ const mS = (vu = class {
|
|
|
26825
26825
|
() => V(this, Cl, fS).call(this, s, t, r, i),
|
|
26826
26826
|
"joinRoom"
|
|
26827
26827
|
);
|
|
26828
|
-
} catch (
|
|
26829
|
-
return this.logger.error("Error in room joining process", { error:
|
|
26828
|
+
} catch (c) {
|
|
26829
|
+
return this.logger.error("Error in room joining process", { error: c }), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_FAILED), { roomJoined: false };
|
|
26830
26830
|
}
|
|
26831
26831
|
});
|
|
26832
26832
|
}
|
|
@@ -26903,15 +26903,15 @@ const mS = (vu = class {
|
|
|
26903
26903
|
}
|
|
26904
26904
|
return this._shareWebcam(s, t);
|
|
26905
26905
|
}
|
|
26906
|
-
const i = [t].concat(Nt.filter((p) => p !== t)), n = V(this, Ol, RS).call(this, s, i), o = Jn(this.context, "disableSimulcast"),
|
|
26907
|
-
!o && this.context.getValue("flagsmith").hasFeature(
|
|
26906
|
+
const i = [t].concat(Nt.filter((p) => p !== t)), n = V(this, Ol, RS).call(this, s, i), o = Jn(this.context, "disableSimulcast"), c = a(this, Ss) === Pe.CF ? Z.ENABLE_CF_SIMULCAST : Z.ENABLE_HIVE_SIMULCAST;
|
|
26907
|
+
!o && this.context.getValue("flagsmith").hasFeature(c) ? (this.logger.info(`Simulcast enabled for SFU: ${a(this, Ss)}`), n.encodings = ZM(this.context, s)) : this.logger.info(`Simulcast disabled for webcam producer, SFU: ${a(this, Ss)}`), this.context.getValue("flagsmith").hasFeature(Z.TRACK_HINT) && (n.track.contentHint = this.context.getValue("flagsmith").getValue(
|
|
26908
26908
|
Z.TRACK_HINT
|
|
26909
26909
|
));
|
|
26910
|
-
const
|
|
26910
|
+
const d = () => {
|
|
26911
26911
|
this.logger.info("Disabling video due to the producer closure"), a(this, Tt).delete(e);
|
|
26912
26912
|
}, u = a(this, G).createProducer(
|
|
26913
26913
|
n,
|
|
26914
|
-
|
|
26914
|
+
d
|
|
26915
26915
|
);
|
|
26916
26916
|
return V(this, na, bo).call(this, e, u.then((p) => p.id)), u.then((p) => p.track);
|
|
26917
26917
|
});
|
|
@@ -26927,7 +26927,7 @@ const mS = (vu = class {
|
|
|
26927
26927
|
const e = Nt.filter((i) => {
|
|
26928
26928
|
var n, o;
|
|
26929
26929
|
return ((o = (n = a(this, Bn).sender) == null ? void 0 : n.video) == null ? void 0 : o.codecs.findIndex(
|
|
26930
|
-
(
|
|
26930
|
+
(c) => c.mimeType === i
|
|
26931
26931
|
)) >= 0 && a(this, aa).get(i).size > 0;
|
|
26932
26932
|
});
|
|
26933
26933
|
return e.length === 0 && e.push(Nt[0]), yield Promise.all(e.map((i) => (this.logger.debug(`Calling _shareWebcam with video codec: ${i}`), this._shareWebcam(s, i)))), s;
|
|
@@ -26957,10 +26957,10 @@ const mS = (vu = class {
|
|
|
26957
26957
|
r,
|
|
26958
26958
|
i
|
|
26959
26959
|
);
|
|
26960
|
-
V(this, na, bo).call(this, pe.SCREENSHARE_VIDEO, n.then((
|
|
26960
|
+
V(this, na, bo).call(this, pe.SCREENSHARE_VIDEO, n.then((c) => c.id));
|
|
26961
26961
|
let o;
|
|
26962
26962
|
if (e) {
|
|
26963
|
-
const
|
|
26963
|
+
const c = {
|
|
26964
26964
|
track: e,
|
|
26965
26965
|
codecOptions: [{ name: "opus" }],
|
|
26966
26966
|
appData: {
|
|
@@ -26970,11 +26970,11 @@ const mS = (vu = class {
|
|
|
26970
26970
|
},
|
|
26971
26971
|
stopTracks: false,
|
|
26972
26972
|
zeroRtpOnPause: a(this, Ss) !== Pe.CF
|
|
26973
|
-
},
|
|
26973
|
+
}, d = () => {
|
|
26974
26974
|
};
|
|
26975
26975
|
o = a(this, G).createProducer(
|
|
26976
|
-
|
|
26977
|
-
|
|
26976
|
+
c,
|
|
26977
|
+
d
|
|
26978
26978
|
), V(this, na, bo).call(this, pe.SCREENSHARE_AUDIO, o.then((u) => u.id));
|
|
26979
26979
|
}
|
|
26980
26980
|
yield Promise.all([n, o || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
@@ -27272,13 +27272,13 @@ const mS = (vu = class {
|
|
|
27272
27272
|
kind: o
|
|
27273
27273
|
}), Array.from(
|
|
27274
27274
|
this.getConsumers().values()
|
|
27275
|
-
).filter((
|
|
27276
|
-
|
|
27277
|
-
`consumer state mismatched for ${
|
|
27278
|
-
), i ? (
|
|
27279
|
-
id:
|
|
27280
|
-
})) : (
|
|
27281
|
-
id:
|
|
27275
|
+
).filter((d) => d.producerId === n).forEach((d) => {
|
|
27276
|
+
d.paused !== i && (this.logger.debug(
|
|
27277
|
+
`consumer state mismatched for ${d.id}. updating consumer pause state ${d.paused} to ${i}`
|
|
27278
|
+
), i ? (d.pause(), this.context.getValue("peerSessionStore").emit(b.CONSUMER_PAUSED, {
|
|
27279
|
+
id: d.id
|
|
27280
|
+
})) : (d.resume(), this.context.getValue("peerSessionStore").emit(b.CONSUMER_RESUMED, {
|
|
27281
|
+
id: d.id
|
|
27282
27282
|
})));
|
|
27283
27283
|
});
|
|
27284
27284
|
} catch (t) {
|
|
@@ -27374,20 +27374,20 @@ const mS = (vu = class {
|
|
|
27374
27374
|
handlePeerCapabilities(s, t) {
|
|
27375
27375
|
var e, r, i, n;
|
|
27376
27376
|
for (let o = 0; o <= Nt.length; o += 1) {
|
|
27377
|
-
const
|
|
27377
|
+
const c = Nt[o];
|
|
27378
27378
|
if (((r = (e = t == null ? void 0 : t.receiver) == null ? void 0 : e.video) == null ? void 0 : r.codecs.findIndex(
|
|
27379
|
-
(
|
|
27379
|
+
(d) => d.mimeType === c
|
|
27380
27380
|
)) >= 0 || o === Nt.length - 1) {
|
|
27381
|
-
a(this, aa).get(
|
|
27381
|
+
a(this, aa).get(c).add(s);
|
|
27382
27382
|
break;
|
|
27383
27383
|
}
|
|
27384
27384
|
}
|
|
27385
27385
|
for (let o = 0; o <= Nt.length; o += 1) {
|
|
27386
|
-
const
|
|
27386
|
+
const c = Nt[o];
|
|
27387
27387
|
if (((n = (i = t == null ? void 0 : t.sender) == null ? void 0 : i.video) == null ? void 0 : n.codecs.findIndex(
|
|
27388
|
-
(
|
|
27388
|
+
(d) => d.mimeType === c
|
|
27389
27389
|
)) >= 0 || o === Nt.length - 1) {
|
|
27390
|
-
a(this, ia).get(
|
|
27390
|
+
a(this, ia).get(c).add(s);
|
|
27391
27391
|
break;
|
|
27392
27392
|
}
|
|
27393
27393
|
}
|
|
@@ -27683,20 +27683,20 @@ const kS = ($g = class {
|
|
|
27683
27683
|
}
|
|
27684
27684
|
static init(s, t, e, r, i) {
|
|
27685
27685
|
return l(this, null, function* () {
|
|
27686
|
-
const n = lt(), o = s.getValue("peerId"),
|
|
27686
|
+
const n = lt(), o = s.getValue("peerId"), c = !!s.getValue("cachedUserDetails"), d = yield Qe.__init__(
|
|
27687
27687
|
s,
|
|
27688
27688
|
e,
|
|
27689
27689
|
r,
|
|
27690
27690
|
i,
|
|
27691
27691
|
i.name,
|
|
27692
|
-
|
|
27692
|
+
c
|
|
27693
27693
|
);
|
|
27694
|
-
s.setValue("self",
|
|
27694
|
+
s.setValue("self", d);
|
|
27695
27695
|
const u = s.getValue("logger");
|
|
27696
27696
|
if (navigator.product !== "ReactNative") {
|
|
27697
27697
|
const p = !s.getValue("flagsmith").hasFeature(Z.PRECALL_BANDWIDTH_TEST);
|
|
27698
27698
|
setTimeout(() => l(this, null, function* () {
|
|
27699
|
-
const f = yield
|
|
27699
|
+
const f = yield d.getAllDevices();
|
|
27700
27700
|
u.info("populated_full_device_list", {
|
|
27701
27701
|
devices: JSON.stringify(f)
|
|
27702
27702
|
}), s.getValue("callstats").devices("AUDIO", f == null ? void 0 : f.filter((S) => S.kind === "audioinput")), s.getValue("callstats").devices("VIDEO", f == null ? void 0 : f.filter((S) => S.kind === "videoinput")), s.getValue("callstats").devices("SPEAKER", f == null ? void 0 : f.filter((S) => S.kind === "audiooutput")), u.info("Callstats:: initializing");
|
|
@@ -27718,12 +27718,12 @@ const kS = ($g = class {
|
|
|
27718
27718
|
}), 0);
|
|
27719
27719
|
} else
|
|
27720
27720
|
u.info("Callstats:: Skipped initialization due to navigator product being ReactNative.");
|
|
27721
|
-
return new kS(s,
|
|
27721
|
+
return new kS(s, d, t, i.viewType);
|
|
27722
27722
|
});
|
|
27723
27723
|
}
|
|
27724
27724
|
shareMediaTracks() {
|
|
27725
27725
|
return l(this, null, function* () {
|
|
27726
|
-
var
|
|
27726
|
+
var c;
|
|
27727
27727
|
const {
|
|
27728
27728
|
audioTrack: s,
|
|
27729
27729
|
videoTrack: t,
|
|
@@ -27736,23 +27736,23 @@ const kS = ($g = class {
|
|
|
27736
27736
|
if (e.canProduceAudio === j.Allowed && r)
|
|
27737
27737
|
try {
|
|
27738
27738
|
yield a(this, Et, Vt).shareMic(s), this.self.audioEnabled || a(this, Et, Vt).pauseMic();
|
|
27739
|
-
} catch (
|
|
27739
|
+
} catch (d) {
|
|
27740
27740
|
this.self.disableAudio();
|
|
27741
27741
|
}
|
|
27742
27742
|
if (e.canProduceVideo === j.Allowed && i)
|
|
27743
27743
|
try {
|
|
27744
|
-
const
|
|
27745
|
-
|
|
27746
|
-
} catch (
|
|
27744
|
+
const d = yield a(this, Et, Vt).shareWebcam(t);
|
|
27745
|
+
d && d.id !== t.id && a(this, te).getValue("flagsmith").hasFeature(Z.EXP_RESHARE) && (yield a(this, Et, Vt).shareWebcam(d)), this.self.videoEnabled || a(this, Et, Vt).pauseWebcam();
|
|
27746
|
+
} catch (d) {
|
|
27747
27747
|
this.self.disableVideo();
|
|
27748
27748
|
}
|
|
27749
27749
|
if (e.canProduceScreenshare === j.Allowed && n)
|
|
27750
27750
|
try {
|
|
27751
|
-
yield (
|
|
27751
|
+
yield (c = a(this, Et, Vt)) == null ? void 0 : c.shareScreen({
|
|
27752
27752
|
video: o.video,
|
|
27753
27753
|
audio: o.audio
|
|
27754
27754
|
});
|
|
27755
|
-
} catch (
|
|
27755
|
+
} catch (d) {
|
|
27756
27756
|
this.self.disableScreenShare();
|
|
27757
27757
|
}
|
|
27758
27758
|
});
|
|
@@ -27886,7 +27886,7 @@ const kS = ($g = class {
|
|
|
27886
27886
|
}
|
|
27887
27887
|
joinMediaRoom(s = false) {
|
|
27888
27888
|
return l(this, null, function* () {
|
|
27889
|
-
var
|
|
27889
|
+
var c, d;
|
|
27890
27890
|
const {
|
|
27891
27891
|
peerId: t,
|
|
27892
27892
|
viewType: e,
|
|
@@ -27905,7 +27905,7 @@ const kS = ($g = class {
|
|
|
27905
27905
|
peerId: t
|
|
27906
27906
|
});
|
|
27907
27907
|
}
|
|
27908
|
-
const { canProduceAudio: u, canProduceVideo: p, canProduceScreenshare: f } = this.self.permissions, { roomJoined: S } = (
|
|
27908
|
+
const { canProduceAudio: u, canProduceVideo: p, canProduceScreenshare: f } = this.self.permissions, { roomJoined: S } = (d = yield (c = a(this, Et, Vt)) == null ? void 0 : c.joinRoom(
|
|
27909
27909
|
this.self.name,
|
|
27910
27910
|
r,
|
|
27911
27911
|
s,
|
|
@@ -27915,7 +27915,7 @@ const kS = ($g = class {
|
|
|
27915
27915
|
canProduceVideo: p,
|
|
27916
27916
|
canProduceScreenshare: f
|
|
27917
27917
|
}
|
|
27918
|
-
)) != null ?
|
|
27918
|
+
)) != null ? d : {};
|
|
27919
27919
|
if (!S)
|
|
27920
27920
|
return;
|
|
27921
27921
|
i === "ON_STAGE" && (yield this.shareMediaTracks()), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s });
|
|
@@ -28003,9 +28003,9 @@ class SD {
|
|
|
28003
28003
|
let o = i;
|
|
28004
28004
|
try {
|
|
28005
28005
|
o = r(n);
|
|
28006
|
-
} catch (
|
|
28006
|
+
} catch (c) {
|
|
28007
28007
|
this.logger.error("chatSocketHandler::on::binary_decode_error", {
|
|
28008
|
-
error:
|
|
28008
|
+
error: c
|
|
28009
28009
|
});
|
|
28010
28010
|
}
|
|
28011
28011
|
return e(o);
|
|
@@ -28069,9 +28069,9 @@ class zl {
|
|
|
28069
28069
|
let o = i;
|
|
28070
28070
|
try {
|
|
28071
28071
|
o = r(n);
|
|
28072
|
-
} catch (
|
|
28072
|
+
} catch (c) {
|
|
28073
28073
|
this.logger.error("pollSocketHandler::on::binary_decode_error", {
|
|
28074
|
-
error:
|
|
28074
|
+
error: c
|
|
28075
28075
|
});
|
|
28076
28076
|
}
|
|
28077
28077
|
return e(o);
|
|
@@ -28140,8 +28140,8 @@ class IS {
|
|
|
28140
28140
|
try {
|
|
28141
28141
|
const { peer: n } = Ra.fromBinary((yield r).payload);
|
|
28142
28142
|
a(this, Ht).getValue("connectionHandler").socketJoined = true, a(this, Ht).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_ROOM_JOINED, { peer: n });
|
|
28143
|
-
const o = this.getRoomState(),
|
|
28144
|
-
return a(this, Ht).getValue("peerSessionStore").emit(b.ROOM_STATE,
|
|
28143
|
+
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: u }] = yield Promise.all([o, c]);
|
|
28144
|
+
return a(this, Ht).getValue("peerSessionStore").emit(b.ROOM_STATE, d), a(this, Ht).getValue("peerSessionStore").emit(b.SOCKET_PEERS, u), { peer: n };
|
|
28145
28145
|
} catch (n) {
|
|
28146
28146
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
28147
28147
|
error: n
|
|
@@ -28453,9 +28453,9 @@ class IS {
|
|
|
28453
28453
|
return e(void 0);
|
|
28454
28454
|
try {
|
|
28455
28455
|
o = r(n);
|
|
28456
|
-
} catch (
|
|
28456
|
+
} catch (c) {
|
|
28457
28457
|
this.logger.error("roomSocketHandler::on::binary_decode_error", {
|
|
28458
|
-
error:
|
|
28458
|
+
error: c
|
|
28459
28459
|
});
|
|
28460
28460
|
}
|
|
28461
28461
|
return e(o);
|
|
@@ -28864,13 +28864,13 @@ de.prototype.emit = function(s) {
|
|
|
28864
28864
|
var o = new Error("Unhandled error." + (n ? " (" + n.message + ")" : ""));
|
|
28865
28865
|
throw o.context = n, o;
|
|
28866
28866
|
}
|
|
28867
|
-
var
|
|
28868
|
-
if (
|
|
28867
|
+
var c = i[s];
|
|
28868
|
+
if (c === void 0)
|
|
28869
28869
|
return false;
|
|
28870
|
-
if (typeof
|
|
28871
|
-
fg(
|
|
28870
|
+
if (typeof c == "function")
|
|
28871
|
+
fg(c, this, t);
|
|
28872
28872
|
else
|
|
28873
|
-
for (var
|
|
28873
|
+
for (var d = c.length, u = VS(c, d), e = 0; e < d; ++e)
|
|
28874
28874
|
fg(u[e], this, t);
|
|
28875
28875
|
return true;
|
|
28876
28876
|
};
|
|
@@ -28884,8 +28884,8 @@ function DS(s, t, e, r) {
|
|
|
28884
28884
|
o = n[t] = e, ++s._eventsCount;
|
|
28885
28885
|
else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), i = MS(s), i > 0 && o.length > i && !o.warned) {
|
|
28886
28886
|
o.warned = true;
|
|
28887
|
-
var
|
|
28888
|
-
|
|
28887
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
28888
|
+
c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, ID(c);
|
|
28889
28889
|
}
|
|
28890
28890
|
return s;
|
|
28891
28891
|
}
|
|
@@ -29123,8 +29123,8 @@ class HD {
|
|
|
29123
29123
|
constructor(t, e) {
|
|
29124
29124
|
var F;
|
|
29125
29125
|
Se(this, oh), Se(this, ko), Se(this, ch), Se(this, dh), Se(this, $d), Se(this, uh), Se(this, Do), Se(this, Oo), Se(this, Hd), Se(this, $a), Se(this, Lo), Se(this, Ae, void 0), Se(this, Ia, void 0), Se(this, Ee, void 0), Se(this, Ue, void 0), Se(this, Rr, void 0), Se(this, ze, void 0), Se(this, lr, void 0), Se(this, Qr, void 0), Se(this, Ts, void 0), Se(this, Aa, void 0), Se(this, Hs, void 0);
|
|
29126
|
-
var r, i, n, o,
|
|
29127
|
-
ne(this, Ia, t), ne(this, Rr, []), ne(this, ze, new Ud()), ne(this, lr, true), ne(this, Ts, false), ne(this, Ee, e != null ? e : {}), (r = M(this, Ee)).autoReconnect != null || (r.autoReconnect = true), (i = M(this, Ee)).retryConnectionInterval != null || (i.retryConnectionInterval = 1e3), (n = M(this, Ee)).pingTimeout != null || (n.pingTimeout = 3e4), (o = M(this, Ee)).connectionTimeout != null || (o.connectionTimeout = 5e3), (
|
|
29126
|
+
var r, i, n, o, c, d, u, p, f;
|
|
29127
|
+
ne(this, Ia, t), ne(this, Rr, []), ne(this, ze, new Ud()), ne(this, lr, true), ne(this, Ts, false), ne(this, Ee, e != null ? e : {}), (r = M(this, Ee)).autoReconnect != null || (r.autoReconnect = true), (i = M(this, Ee)).retryConnectionInterval != null || (i.retryConnectionInterval = 1e3), (n = M(this, Ee)).pingTimeout != null || (n.pingTimeout = 3e4), (o = M(this, Ee)).connectionTimeout != null || (o.connectionTimeout = 5e3), (c = M(this, Ee)).debug != null || (c.debug = true), (d = M(this, Ee)).maxReconnectionAttempts != null || (d.maxReconnectionAttempts = 10), (u = M(this, Ee)).disconnectOnPingTimeout != null || (u.disconnectOnPingTimeout = true), (p = M(this, Ee)).queueOnDisconnect != null || (p.queueOnDisconnect = false), (f = M(this, Ee)).flushOnReconnect != null || (f.flushOnReconnect = false), ne(this, Qr, {
|
|
29128
29128
|
code: void 0,
|
|
29129
29129
|
reason: void 0
|
|
29130
29130
|
}), ne(this, Ue, (F = M(this, Ee).logger) != null ? F : new UD(M(this, Ee).debug ? "debug" : "info")), ne(this, Hs, new xD());
|
|
@@ -29182,8 +29182,8 @@ class HD {
|
|
|
29182
29182
|
}, M(this, Ae).onclose = (n) => {
|
|
29183
29183
|
try {
|
|
29184
29184
|
i && clearTimeout(i);
|
|
29185
|
-
const { code: o, reason:
|
|
29186
|
-
r(
|
|
29185
|
+
const { code: o, reason: c } = n;
|
|
29186
|
+
r(c), M(this, Ue).debug("Socket closed. Close event:", { event: n }), M(this, Ue).debug(`Connection closed code: ${o}`), M(this, Ue).debug(`Connection closed reason: ${c}`), M(this, Ts) || _e(this, $d, lh).call(this, o, c);
|
|
29187
29187
|
} catch (o) {
|
|
29188
29188
|
_e(this, ko, Pd).call(this, o);
|
|
29189
29189
|
}
|
|
@@ -29427,8 +29427,8 @@ const qS = (Fg = class {
|
|
|
29427
29427
|
}) {
|
|
29428
29428
|
const n = i != null ? i : s;
|
|
29429
29429
|
return new Promise(
|
|
29430
|
-
(o,
|
|
29431
|
-
const
|
|
29430
|
+
(o, c) => {
|
|
29431
|
+
const d = (_, P) => {
|
|
29432
29432
|
a(this, Ce).removeListener(n, _), a(this, Ce).removeListener(Tg, P), a(this, Ce).removeListener(
|
|
29433
29433
|
is.errorResponse,
|
|
29434
29434
|
P
|
|
@@ -29456,16 +29456,16 @@ const qS = (Fg = class {
|
|
|
29456
29456
|
k = new Error("failed to parse error message", { cause: N });
|
|
29457
29457
|
}
|
|
29458
29458
|
}
|
|
29459
|
-
|
|
29459
|
+
c(k), d(E, S);
|
|
29460
29460
|
}
|
|
29461
29461
|
}, E = ({
|
|
29462
29462
|
id: _,
|
|
29463
29463
|
payload: P
|
|
29464
29464
|
}) => {
|
|
29465
|
-
u === _ && (o({ id: _, payload: P }),
|
|
29465
|
+
u === _ && (o({ id: _, payload: P }), d(E, S));
|
|
29466
29466
|
};
|
|
29467
29467
|
a(this, Ce).on(n, E), a(this, Ce).on(Tg, S), a(this, Ce).on(is.errorResponse, S), a(this, Ce).on(Es.errorResponse, S), setTimeout(() => {
|
|
29468
|
-
|
|
29468
|
+
d(E, S), c(new Error(`request timeout for callback eventId:${s}`));
|
|
29469
29469
|
}, t), a(this, Ce).send(
|
|
29470
29470
|
s,
|
|
29471
29471
|
u,
|
|
@@ -29547,8 +29547,8 @@ const qS = (Fg = class {
|
|
|
29547
29547
|
useCfWorker: true,
|
|
29548
29548
|
useStartSession: true
|
|
29549
29549
|
});
|
|
29550
|
-
return Object.entries(n).forEach(([o,
|
|
29551
|
-
r.searchParams.append(o,
|
|
29550
|
+
return Object.entries(n).forEach(([o, c]) => {
|
|
29551
|
+
r.searchParams.append(o, c.toString());
|
|
29552
29552
|
}), r.href;
|
|
29553
29553
|
}, Fc = /* @__PURE__ */ new WeakSet(), gh = function() {
|
|
29554
29554
|
return `${this.peerId}-${(Math.random() + 1).toString(36).substring(7)}`;
|
|
@@ -29574,11 +29574,11 @@ class GD {
|
|
|
29574
29574
|
handleConnectedRoomsDumpRaw({ payload: t }) {
|
|
29575
29575
|
var n;
|
|
29576
29576
|
const e = Tb.fromBinary(t), r = e.meetings.map((o) => {
|
|
29577
|
-
var
|
|
29577
|
+
var c;
|
|
29578
29578
|
return {
|
|
29579
29579
|
id: o.id,
|
|
29580
29580
|
title: o.title,
|
|
29581
|
-
participants: (
|
|
29581
|
+
participants: (c = o.participants) != null ? c : []
|
|
29582
29582
|
};
|
|
29583
29583
|
});
|
|
29584
29584
|
return {
|
|
@@ -29762,19 +29762,19 @@ class jS extends qt {
|
|
|
29762
29762
|
(o) => !i.includes(o.id)
|
|
29763
29763
|
)), this.meetings = this.meetings.map((o) => {
|
|
29764
29764
|
if (r === o.id) {
|
|
29765
|
-
const
|
|
29766
|
-
i.map((
|
|
29765
|
+
const c = o.participants.concat(
|
|
29766
|
+
i.map((d) => n.get(d))
|
|
29767
29767
|
);
|
|
29768
29768
|
return B(D({}, o), {
|
|
29769
|
-
participants:
|
|
29769
|
+
participants: c
|
|
29770
29770
|
});
|
|
29771
29771
|
}
|
|
29772
29772
|
if (e === o.id) {
|
|
29773
|
-
const
|
|
29774
|
-
(
|
|
29773
|
+
const c = o.participants.filter(
|
|
29774
|
+
(d) => !i.includes(d.id)
|
|
29775
29775
|
);
|
|
29776
29776
|
return B(D({}, o), {
|
|
29777
|
-
participants:
|
|
29777
|
+
participants: c
|
|
29778
29778
|
});
|
|
29779
29779
|
}
|
|
29780
29780
|
return o;
|
|
@@ -29841,7 +29841,7 @@ const GS = (Hg = class {
|
|
|
29841
29841
|
authToken: s,
|
|
29842
29842
|
meetingId: t
|
|
29843
29843
|
}) {
|
|
29844
|
-
var n, o,
|
|
29844
|
+
var n, o, c, d;
|
|
29845
29845
|
if (!this.connectedMeetings.supportsConnectedMeetings)
|
|
29846
29846
|
throw new Error(`You are not allowed to perform this action.
|
|
29847
29847
|
Please connect with Dyte team to move you to V2 APIs & to enable connected meetings.`);
|
|
@@ -29863,14 +29863,14 @@ const GS = (Hg = class {
|
|
|
29863
29863
|
}),
|
|
29864
29864
|
authToken: s
|
|
29865
29865
|
}));
|
|
29866
|
-
this.logger.info(`ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ${(
|
|
29866
|
+
this.logger.info(`ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ${(c = i == null ? void 0 : i.meta) == null ? void 0 : c.meetingId}`);
|
|
29867
29867
|
try {
|
|
29868
29868
|
const { hidden: u } = a(this, me).getValue("self");
|
|
29869
29869
|
i.self.setName(a(this, me).getValue("self").name), yield i.join(), u && i.self.hide();
|
|
29870
29870
|
} catch (u) {
|
|
29871
29871
|
this.logger.error("ConnectedMeetingsController.joinRoom", { error: u });
|
|
29872
29872
|
}
|
|
29873
|
-
return this.logger.info(`ConnectedMeetingsController::switchMeeting:: asking ui-kit to show in-meeting ui of newly joined meeting id: ${(
|
|
29873
|
+
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;
|
|
29874
29874
|
});
|
|
29875
29875
|
}
|
|
29876
29876
|
handleConnectedRoomsDump(s) {
|
|
@@ -29953,11 +29953,11 @@ const Ma = class {
|
|
|
29953
29953
|
meetingId: i,
|
|
29954
29954
|
organizationId: n,
|
|
29955
29955
|
cachedUserDetails: o,
|
|
29956
|
-
logger:
|
|
29956
|
+
logger: c
|
|
29957
29957
|
} = s.getAllValues();
|
|
29958
29958
|
if (bS(s), Te.isSupported() === false)
|
|
29959
|
-
throw new R("Browser not supported", "0010",
|
|
29960
|
-
const
|
|
29959
|
+
throw new R("Browser not supported", "0010", c, true);
|
|
29960
|
+
const d = iM(
|
|
29961
29961
|
s,
|
|
29962
29962
|
{
|
|
29963
29963
|
authToken: r,
|
|
@@ -29965,28 +29965,28 @@ const Ma = class {
|
|
|
29965
29965
|
cachedUserDetails: o
|
|
29966
29966
|
}
|
|
29967
29967
|
);
|
|
29968
|
-
|
|
29968
|
+
d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(n), d.setHeader("dyte-tracing-id", t), s.setValue("apiClient", d);
|
|
29969
29969
|
const u = new FM(s);
|
|
29970
29970
|
s.setValue("connectionHandler", u);
|
|
29971
|
-
const p = Ma.createSocketService(s), f = p.connect(), S =
|
|
29971
|
+
const p = Ma.createSocketService(s), f = p.connect(), S = d.getUserDetails(), E = d.getPlugins();
|
|
29972
29972
|
let _ = Pe.HIVE, P, k = "";
|
|
29973
29973
|
try {
|
|
29974
29974
|
yield Ma.setupFlagsmith(s);
|
|
29975
29975
|
} catch (re) {
|
|
29976
|
-
|
|
29976
|
+
c.error("Failed to setup flagsmith", { error: re });
|
|
29977
29977
|
}
|
|
29978
29978
|
try {
|
|
29979
29979
|
yield f;
|
|
29980
29980
|
} catch (re) {
|
|
29981
|
-
|
|
29981
|
+
c.error(
|
|
29982
29982
|
"[Controller]: Failed to connect to socket server:",
|
|
29983
29983
|
{ error: re }
|
|
29984
29984
|
);
|
|
29985
29985
|
}
|
|
29986
29986
|
try {
|
|
29987
|
-
({ sfu: _, meetingTitle: k } = yield
|
|
29987
|
+
({ sfu: _, meetingTitle: k } = yield d.getRoomNodeData()), P = yield S, c.info(`SFU ${_} is being used.`), s.setValue("presetName", P.preset.name), s.setValue("roomNodeOptions", { sfu: _ });
|
|
29988
29988
|
} catch (re) {
|
|
29989
|
-
|
|
29989
|
+
c.error("Failed to get room metadata", { error: re });
|
|
29990
29990
|
}
|
|
29991
29991
|
const A = Wu.init(P.preset, !s.getValue("modules").theme), N = zu.init(
|
|
29992
29992
|
s,
|
|
@@ -30007,11 +30007,11 @@ const Ma = class {
|
|
|
30007
30007
|
false,
|
|
30008
30008
|
N
|
|
30009
30009
|
)) == null || F.catch((Je) => {
|
|
30010
|
-
|
|
30010
|
+
c.error(
|
|
30011
30011
|
"[Controller]: Failed to queue partial media room promise:",
|
|
30012
30012
|
{ error: Je }
|
|
30013
30013
|
);
|
|
30014
|
-
})), T.location.country = (K =
|
|
30014
|
+
})), T.location.country = (K = d.ipInfo) == null ? void 0 : K.country;
|
|
30015
30015
|
const { controllers: $ } = yield H;
|
|
30016
30016
|
return bC(), new Ma(e, $, s);
|
|
30017
30017
|
});
|
|
@@ -30026,13 +30026,13 @@ const Ma = class {
|
|
|
30026
30026
|
meetingId: i,
|
|
30027
30027
|
organizationId: n,
|
|
30028
30028
|
logger: o
|
|
30029
|
-
} = s.getAllValues(),
|
|
30029
|
+
} = s.getAllValues(), c = wC(i), d = B(D({
|
|
30030
30030
|
entity: bu.PEER,
|
|
30031
30031
|
clientId: n,
|
|
30032
30032
|
isAnonUser: !n,
|
|
30033
30033
|
sdkVersion: s.getValue("sdkVersion"),
|
|
30034
30034
|
presetName: s.getValue("presetName"),
|
|
30035
|
-
meetingHash:
|
|
30035
|
+
meetingHash: c,
|
|
30036
30036
|
roomName: i
|
|
30037
30037
|
}, Te.getDeviceInfo()), {
|
|
30038
30038
|
isReactNative: navigator.isReactNative
|
|
@@ -30041,7 +30041,7 @@ const Ma = class {
|
|
|
30041
30041
|
const p = (u = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || u ? la({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
30042
30042
|
yield s.getValue("flagsmith").identify(
|
|
30043
30043
|
`${bu.PEER}_${t}`,
|
|
30044
|
-
JSON.parse(JSON.stringify(
|
|
30044
|
+
JSON.parse(JSON.stringify(d)),
|
|
30045
30045
|
false,
|
|
30046
30046
|
5e3,
|
|
30047
30047
|
p,
|
|
@@ -30059,7 +30059,7 @@ const Ma = class {
|
|
|
30059
30059
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
30060
30060
|
return l(this, null, function* () {
|
|
30061
30061
|
var $e, yr, Tr;
|
|
30062
|
-
const
|
|
30062
|
+
const c = t.getValue("modules"), { participant: d } = e, u = t.getValue("defaults"), p = t.getValue("logger"), { sfu: f } = t.getValue("roomNodeOptions"), { viewType: S, mediaConstraints: { audio: E } } = n;
|
|
30063
30063
|
t.setValue("viewType", S), t.setValue("defaults", D({
|
|
30064
30064
|
mediaConfiguration: {
|
|
30065
30065
|
audio: {
|
|
@@ -30076,7 +30076,7 @@ const Ma = class {
|
|
|
30076
30076
|
const Is = new zl(t, s), vr = new as(t, s), ni = new PD(s), I = new IS(t, s), y = new CD(t, s), C = new fD(s), U = new ga(t, s), ie = yield ai.init(
|
|
30077
30077
|
t,
|
|
30078
30078
|
I,
|
|
30079
|
-
|
|
30079
|
+
d,
|
|
30080
30080
|
o,
|
|
30081
30081
|
n
|
|
30082
30082
|
), Me = yield If.init(
|
|
@@ -30086,37 +30086,37 @@ const Ma = class {
|
|
|
30086
30086
|
re,
|
|
30087
30087
|
i
|
|
30088
30088
|
);
|
|
30089
|
-
if (
|
|
30089
|
+
if (c.participant && (F = new Sr(
|
|
30090
30090
|
t,
|
|
30091
30091
|
ie.self,
|
|
30092
30092
|
I,
|
|
30093
30093
|
f
|
|
30094
|
-
)), (Tr =
|
|
30094
|
+
)), (Tr = c.e2ee) != null && Tr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield _s.init(
|
|
30095
30095
|
t,
|
|
30096
30096
|
vr,
|
|
30097
30097
|
U,
|
|
30098
30098
|
ie.self,
|
|
30099
30099
|
F.participants
|
|
30100
|
-
)),
|
|
30100
|
+
)), c.internals && (N = yield Nh.init(t)), c.livestream && n.viewType === Mt.Livestream && t.getValue("flagsmith").hasFeature(Z.LIVESTREAM) && ($ = new Uf(
|
|
30101
30101
|
t,
|
|
30102
30102
|
ie.self,
|
|
30103
30103
|
C
|
|
30104
30104
|
)), n.viewType !== Mt.Chat) {
|
|
30105
|
-
if (
|
|
30105
|
+
if (c.poll && (_ = yield Rf.init(
|
|
30106
30106
|
t,
|
|
30107
30107
|
ie.self,
|
|
30108
30108
|
Is
|
|
30109
|
-
)),
|
|
30109
|
+
)), c.recording && (H = new Of(
|
|
30110
30110
|
t,
|
|
30111
30111
|
ie.self,
|
|
30112
30112
|
I
|
|
30113
|
-
)),
|
|
30113
|
+
)), c.stage && (k = new Af(
|
|
30114
30114
|
t,
|
|
30115
30115
|
ni,
|
|
30116
30116
|
I,
|
|
30117
30117
|
ie.self,
|
|
30118
30118
|
F.participants
|
|
30119
|
-
)),
|
|
30119
|
+
)), c.plugin) {
|
|
30120
30120
|
if (!F)
|
|
30121
30121
|
throw new R(
|
|
30122
30122
|
"The plugin module cannot be initialized without the `participant` module",
|
|
@@ -30134,9 +30134,9 @@ const Ma = class {
|
|
|
30134
30134
|
i
|
|
30135
30135
|
);
|
|
30136
30136
|
}
|
|
30137
|
-
if (
|
|
30137
|
+
if (c.connectedMeetings && (K = yield Xl.init(
|
|
30138
30138
|
t
|
|
30139
|
-
)),
|
|
30139
|
+
)), c.pip) {
|
|
30140
30140
|
const $s = yield ku._init(t, ie.self);
|
|
30141
30141
|
t.setValue("pip", $s);
|
|
30142
30142
|
}
|
|
@@ -30324,49 +30324,49 @@ let si = (Bg = class {
|
|
|
30324
30324
|
return a(this, zr).getValue("peerId");
|
|
30325
30325
|
}
|
|
30326
30326
|
static initMedia(t = {}, e = false, r = void 0) {
|
|
30327
|
-
var
|
|
30328
|
-
const i = (
|
|
30327
|
+
var d;
|
|
30328
|
+
const i = (d = r == null ? void 0 : r.peerId) != null ? d : v4(), n = ur.createContext(i, {
|
|
30329
30329
|
peerId: i
|
|
30330
30330
|
}), o = n.getValue("logger");
|
|
30331
30331
|
o.init(n);
|
|
30332
|
-
const
|
|
30333
|
-
return
|
|
30332
|
+
const c = new Gf(o);
|
|
30333
|
+
return c.init(t, e, n), n.setValue("defaults", { mediaHandler: c }), c;
|
|
30334
30334
|
}
|
|
30335
30335
|
static init(t) {
|
|
30336
30336
|
return l(this, null, function* () {
|
|
30337
30337
|
var E, _, P, A, N, H, $;
|
|
30338
30338
|
Te.init();
|
|
30339
|
-
const { mediaHandler: e } = (E = t.defaults) != null ? E : {}, r = (e == null ? void 0 : e.peerId) || ((P = (_ = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : _.peerId) != null ? P : v4()), { authToken: i, baseURI: n } = t, k = eO(i, n), { meetingId: o } = k,
|
|
30339
|
+
const { mediaHandler: e } = (E = t.defaults) != null ? E : {}, r = (e == null ? void 0 : e.peerId) || ((P = (_ = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : _.peerId) != null ? P : v4()), { authToken: i, baseURI: n } = t, k = eO(i, n), { meetingId: o } = k, c = go(k, ["meetingId"]);
|
|
30340
30340
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = true;
|
|
30341
|
-
const
|
|
30341
|
+
const d = si.setupContext(
|
|
30342
30342
|
r,
|
|
30343
30343
|
t,
|
|
30344
30344
|
o,
|
|
30345
|
-
|
|
30346
|
-
), u =
|
|
30347
|
-
tv(p), Eg.init(p), u.init(
|
|
30345
|
+
c
|
|
30346
|
+
), u = d.getValue("telemetry"), p = d.getValue("logger");
|
|
30347
|
+
tv(p), Eg.init(p), u.init(d, {
|
|
30348
30348
|
roomName: o,
|
|
30349
|
-
userId:
|
|
30350
|
-
organizationId:
|
|
30349
|
+
userId: c.participantId,
|
|
30350
|
+
organizationId: c.orgId,
|
|
30351
30351
|
peerId: r
|
|
30352
|
-
}, (N = (A = t.modules) == null ? void 0 : A.tracing) != null ? N : true), p.init(
|
|
30352
|
+
}, (N = (A = t.modules) == null ? void 0 : A.tracing) != null ? N : true), p.init(d), p.info("DyteClient::init::options", {
|
|
30353
30353
|
dyteClientInitOptions: B(D({}, t), {
|
|
30354
30354
|
authToken: `${(H = t.authToken) == null ? void 0 : H.slice(0, 10)}...
|
|
30355
30355
|
${($ = t.authToken) == null ? void 0 : $.slice(-10)}`
|
|
30356
30356
|
})
|
|
30357
30357
|
});
|
|
30358
|
-
const f = yield Xc.init(
|
|
30359
|
-
return
|
|
30358
|
+
const f = yield Xc.init(d), S = new si(d, f);
|
|
30359
|
+
return d.setValue("meeting", S), S;
|
|
30360
30360
|
});
|
|
30361
30361
|
}
|
|
30362
30362
|
static setupContext(t, e, r, i) {
|
|
30363
|
-
var
|
|
30364
|
-
const n = ur.createContext(t, e), o = D(D({}, vC), e == null ? void 0 : e.modules),
|
|
30363
|
+
var d, u;
|
|
30364
|
+
const n = ur.createContext(t, e), o = D(D({}, vC), e == null ? void 0 : e.modules), c = e.defaults || {
|
|
30365
30365
|
audio: true,
|
|
30366
30366
|
video: true
|
|
30367
30367
|
};
|
|
30368
|
-
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", (
|
|
30369
|
-
})), n.setValue("cachedUserDetails", Ps(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.3
|
|
30368
|
+
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", yC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
30369
|
+
})), n.setValue("cachedUserDetails", Ps(e.cachedUserDetails)), n.setValue("sdkVersion", "3.1.3"), (u = e.modules) != null && u.experimentalAudioPlayback && n.setValue("audioPlayback", new sO()), n;
|
|
30370
30370
|
}
|
|
30371
30371
|
join() {
|
|
30372
30372
|
return l(this, null, function* () {
|