@cloudflare/realtimekit-react 1.0.2-staging.3 → 1.0.2-staging.5
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 +13 -13
- package/dist/index.es.js +596 -594
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -4538,10 +4538,10 @@ var lt = {}, Cv = {
|
|
|
4538
4538
|
set exports(s) {
|
|
4539
4539
|
lt = s;
|
|
4540
4540
|
}
|
|
4541
|
-
},
|
|
4541
|
+
}, un = typeof Reflect == "object" ? Reflect : null, Oh = un && typeof un.apply == "function" ? un.apply : function(t, e, r) {
|
|
4542
4542
|
return Function.prototype.apply.call(t, e, r);
|
|
4543
4543
|
}, $c;
|
|
4544
|
-
|
|
4544
|
+
un && typeof un.ownKeys == "function" ? $c = un.ownKeys : Object.getOwnPropertySymbols ? $c = function(t) {
|
|
4545
4545
|
return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
|
|
4546
4546
|
} : $c = function(t) {
|
|
4547
4547
|
return Object.getOwnPropertyNames(t);
|
|
@@ -5578,8 +5578,8 @@ class jm extends lt {
|
|
|
5578
5578
|
d.staleProducerStreamMap = true;
|
|
5579
5579
|
break;
|
|
5580
5580
|
}
|
|
5581
|
-
const
|
|
5582
|
-
if (((A =
|
|
5581
|
+
const Me = this.callStatsInstance.producers.get(R);
|
|
5582
|
+
if (((A = Me == null ? void 0 : Me.track) == null ? void 0 : A.readyState) === "ended")
|
|
5583
5583
|
break;
|
|
5584
5584
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
5585
5585
|
outboundVideoRtpId: [],
|
|
@@ -5597,7 +5597,7 @@ class jm extends lt {
|
|
|
5597
5597
|
totalPacketSendDelay: E.totalPacketSendDelay || 0
|
|
5598
5598
|
};
|
|
5599
5599
|
if (E.mediaType === "video" || E.kind === "video") {
|
|
5600
|
-
const b = E,
|
|
5600
|
+
const b = E, Le = O({
|
|
5601
5601
|
frameHeight: b.frameHeight,
|
|
5602
5602
|
frameWidth: b.frameWidth,
|
|
5603
5603
|
framesEncoded: b.framesEncoded,
|
|
@@ -5620,13 +5620,13 @@ class jm extends lt {
|
|
|
5620
5620
|
scalabilityMode: b.scalabilityMode,
|
|
5621
5621
|
powerEfficientEncoder: b.powerEfficientEncoder
|
|
5622
5622
|
}, V);
|
|
5623
|
-
d.outboundVideoRtp.set(M.id,
|
|
5623
|
+
d.outboundVideoRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(R, ye, Le);
|
|
5624
5624
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
5625
|
-
const b = E,
|
|
5625
|
+
const b = E, Le = O({
|
|
5626
5626
|
retransmittedBytesSent: b.retransmittedBytesSent,
|
|
5627
5627
|
retransmittedPacketsSent: b.retransmittedPacketsSent
|
|
5628
5628
|
}, V);
|
|
5629
|
-
d.outboundAudioRtp.set(M.id,
|
|
5629
|
+
d.outboundAudioRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(R, ye, Le);
|
|
5630
5630
|
}
|
|
5631
5631
|
} else
|
|
5632
5632
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -5657,7 +5657,7 @@ class jm extends lt {
|
|
|
5657
5657
|
inboundVideoRtpId: [],
|
|
5658
5658
|
inboundAudioRtpId: []
|
|
5659
5659
|
});
|
|
5660
|
-
const
|
|
5660
|
+
const Me = {
|
|
5661
5661
|
bytesReceived: E.bytesReceived,
|
|
5662
5662
|
packetsReceived: E.packetsReceived,
|
|
5663
5663
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -5697,7 +5697,7 @@ class jm extends lt {
|
|
|
5697
5697
|
freezeCount: V.freezeCount || 0,
|
|
5698
5698
|
pauseCount: V.pauseCount || 0,
|
|
5699
5699
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
5700
|
-
},
|
|
5700
|
+
}, Me);
|
|
5701
5701
|
b.score = Bm({
|
|
5702
5702
|
frameWidth: b.frameWidth || 0,
|
|
5703
5703
|
framesDecoded: (b.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -5733,7 +5733,7 @@ class jm extends lt {
|
|
|
5733
5733
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
5734
5734
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
5735
5735
|
playoutId: V.playoutId
|
|
5736
|
-
},
|
|
5736
|
+
}, Me);
|
|
5737
5737
|
b.score = Fm({
|
|
5738
5738
|
concealmentEvents: (b.concealmentEvents || 0) - (((X = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : X.concealmentEvents) || 0),
|
|
5739
5739
|
packetsLost: (b.packetsLost || 0) - (((oe = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : oe.packetsLost) || 0),
|
|
@@ -5757,7 +5757,7 @@ class jm extends lt {
|
|
|
5757
5757
|
}
|
|
5758
5758
|
}
|
|
5759
5759
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
5760
|
-
var R, $, ye,
|
|
5760
|
+
var R, $, ye, Me, V, b, Le, Aa, Ma, Da, Oa, Na, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga;
|
|
5761
5761
|
if (M.outboundVideoRtpId.length > 0) {
|
|
5762
5762
|
const me = [];
|
|
5763
5763
|
M.outboundVideoRtpId.forEach((Ol) => {
|
|
@@ -5770,14 +5770,14 @@ class jm extends lt {
|
|
|
5770
5770
|
jitter: ((R = ne.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
5771
5771
|
isScreenShare: this.screenShareProducers.has(E),
|
|
5772
5772
|
packetsSent: (ne.packetsSent || 0) - ((($ = this.videoProducerToStatsMap.get(E)) == null ? void 0 : $.packetsSent) || 0),
|
|
5773
|
-
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (
|
|
5773
|
+
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (Me = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Me.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
5774
5774
|
framesEncoded: (ne.framesEncoded || 0) - (((b = this.videoProducerToStatsMap.get(E)) == null ? void 0 : b.framesEncoded) || 0)
|
|
5775
5775
|
}), _.set(E, {
|
|
5776
5776
|
score: +(ne.score * 10).toFixed(),
|
|
5777
5777
|
frameWidth: ne.frameWidth || 0,
|
|
5778
5778
|
frameHeight: ne.frameHeight || 0,
|
|
5779
5779
|
framesPerSecond: ne.framesPerSecond || 0,
|
|
5780
|
-
jitter: ((
|
|
5780
|
+
jitter: ((Le = ne.remoteData) == null ? void 0 : Le.jitter) || 0,
|
|
5781
5781
|
isScreenShare: this.screenShareProducers.has(E),
|
|
5782
5782
|
packetsLostPercentage: Zc({
|
|
5783
5783
|
packetsSent: (ne.packetsSent || 0) - (((Aa = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Aa.packetsSent) || 0),
|
|
@@ -6211,8 +6211,8 @@ class Gm extends jm {
|
|
|
6211
6211
|
d.staleProducerStreamMap = true;
|
|
6212
6212
|
break;
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6215
|
-
if (((A =
|
|
6214
|
+
const Me = this.callStatsInstance.producers.get(R);
|
|
6215
|
+
if (((A = Me == null ? void 0 : Me.track) == null ? void 0 : A.readyState) === "ended")
|
|
6216
6216
|
break;
|
|
6217
6217
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
6218
6218
|
outboundVideoRtpId: [],
|
|
@@ -6230,7 +6230,7 @@ class Gm extends jm {
|
|
|
6230
6230
|
totalPacketSendDelay: E.totalPacketSendDelay || 0
|
|
6231
6231
|
};
|
|
6232
6232
|
if (E.mediaType === "video" || E.kind === "video") {
|
|
6233
|
-
const b = E,
|
|
6233
|
+
const b = E, Le = O({
|
|
6234
6234
|
frameHeight: b.frameHeight,
|
|
6235
6235
|
frameWidth: b.frameWidth,
|
|
6236
6236
|
framesEncoded: b.framesEncoded,
|
|
@@ -6253,13 +6253,13 @@ class Gm extends jm {
|
|
|
6253
6253
|
scalabilityMode: b.scalabilityMode,
|
|
6254
6254
|
powerEfficientEncoder: b.powerEfficientEncoder
|
|
6255
6255
|
}, V);
|
|
6256
|
-
d.outboundVideoRtp.set(M.id,
|
|
6256
|
+
d.outboundVideoRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(R, ye, Le);
|
|
6257
6257
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
6258
|
-
const b = E,
|
|
6258
|
+
const b = E, Le = O({
|
|
6259
6259
|
retransmittedBytesSent: b.retransmittedBytesSent,
|
|
6260
6260
|
retransmittedPacketsSent: b.retransmittedPacketsSent
|
|
6261
6261
|
}, V);
|
|
6262
|
-
d.outboundAudioRtp.set(M.id,
|
|
6262
|
+
d.outboundAudioRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(R, ye, Le);
|
|
6263
6263
|
}
|
|
6264
6264
|
} else
|
|
6265
6265
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -6290,7 +6290,7 @@ class Gm extends jm {
|
|
|
6290
6290
|
inboundVideoRtpId: [],
|
|
6291
6291
|
inboundAudioRtpId: []
|
|
6292
6292
|
});
|
|
6293
|
-
const
|
|
6293
|
+
const Me = {
|
|
6294
6294
|
bytesReceived: E.bytesReceived,
|
|
6295
6295
|
packetsReceived: E.packetsReceived,
|
|
6296
6296
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -6330,7 +6330,7 @@ class Gm extends jm {
|
|
|
6330
6330
|
freezeCount: V.freezeCount || 0,
|
|
6331
6331
|
pauseCount: V.pauseCount || 0,
|
|
6332
6332
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
6333
|
-
},
|
|
6333
|
+
}, Me);
|
|
6334
6334
|
b.score = Bm({
|
|
6335
6335
|
frameWidth: b.frameWidth || 0,
|
|
6336
6336
|
framesDecoded: (b.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -6366,7 +6366,7 @@ class Gm extends jm {
|
|
|
6366
6366
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
6367
6367
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
6368
6368
|
playoutId: V.playoutId
|
|
6369
|
-
},
|
|
6369
|
+
}, Me);
|
|
6370
6370
|
b.score = Fm({
|
|
6371
6371
|
concealmentEvents: (b.concealmentEvents || 0) - (((X = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : X.concealmentEvents) || 0),
|
|
6372
6372
|
packetsLost: (b.packetsLost || 0) - (((oe = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : oe.packetsLost) || 0),
|
|
@@ -6390,7 +6390,7 @@ class Gm extends jm {
|
|
|
6390
6390
|
}
|
|
6391
6391
|
}
|
|
6392
6392
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
6393
|
-
var R, $, ye,
|
|
6393
|
+
var R, $, ye, Me, V, b, Le, Aa, Ma, Da, Oa, Na, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga;
|
|
6394
6394
|
if (M.outboundVideoRtpId.length > 0) {
|
|
6395
6395
|
const me = [];
|
|
6396
6396
|
M.outboundVideoRtpId.forEach((Ol) => {
|
|
@@ -6403,14 +6403,14 @@ class Gm extends jm {
|
|
|
6403
6403
|
jitter: ((R = ne.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
6404
6404
|
isScreenShare: this.screenShareProducers.has(E),
|
|
6405
6405
|
packetsSent: (ne.packetsSent || 0) - ((($ = this.videoProducerToStatsMap.get(E)) == null ? void 0 : $.packetsSent) || 0),
|
|
6406
|
-
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (
|
|
6406
|
+
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (Me = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Me.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
6407
6407
|
framesEncoded: (ne.framesEncoded || 0) - (((b = this.videoProducerToStatsMap.get(E)) == null ? void 0 : b.framesEncoded) || 0)
|
|
6408
6408
|
}), _.set(E, {
|
|
6409
6409
|
score: +(ne.score * 10).toFixed(),
|
|
6410
6410
|
frameWidth: ne.frameWidth || 0,
|
|
6411
6411
|
frameHeight: ne.frameHeight || 0,
|
|
6412
6412
|
framesPerSecond: ne.framesPerSecond || 0,
|
|
6413
|
-
jitter: ((
|
|
6413
|
+
jitter: ((Le = ne.remoteData) == null ? void 0 : Le.jitter) || 0,
|
|
6414
6414
|
isScreenShare: this.screenShareProducers.has(E),
|
|
6415
6415
|
packetsLostPercentage: Zc({
|
|
6416
6416
|
packetsSent: (ne.packetsSent || 0) - (((Aa = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Aa.packetsSent) || 0),
|
|
@@ -7582,7 +7582,7 @@ function ST(s) {
|
|
|
7582
7582
|
return yT.call(s);
|
|
7583
7583
|
}
|
|
7584
7584
|
var ET = "[object Null]", _T = "[object Undefined]", Fh = Hr ? Hr.toStringTag : void 0;
|
|
7585
|
-
function
|
|
7585
|
+
function Gi(s) {
|
|
7586
7586
|
return s == null ? s === void 0 ? _T : ET : Fh && Fh in Object(s) ? vT(s) : ST(s);
|
|
7587
7587
|
}
|
|
7588
7588
|
function Ts(s) {
|
|
@@ -7593,7 +7593,7 @@ var PT = "[object AsyncFunction]", CT = "[object Function]", RT = "[object Gener
|
|
|
7593
7593
|
function Qu(s) {
|
|
7594
7594
|
if (!Ts(s))
|
|
7595
7595
|
return false;
|
|
7596
|
-
var t =
|
|
7596
|
+
var t = Gi(s);
|
|
7597
7597
|
return t == CT || t == RT || t == PT || t == wT;
|
|
7598
7598
|
}
|
|
7599
7599
|
var bT = ys["__core-js_shared__"];
|
|
@@ -7606,7 +7606,7 @@ function kT(s) {
|
|
|
7606
7606
|
return !!Bh && Bh in s;
|
|
7607
7607
|
}
|
|
7608
7608
|
var IT = Function.prototype, AT = IT.toString;
|
|
7609
|
-
function
|
|
7609
|
+
function Wi(s) {
|
|
7610
7610
|
if (s != null) {
|
|
7611
7611
|
try {
|
|
7612
7612
|
return AT.call(s);
|
|
@@ -7626,18 +7626,18 @@ function UT(s) {
|
|
|
7626
7626
|
if (!Ts(s) || kT(s))
|
|
7627
7627
|
return false;
|
|
7628
7628
|
var t = Qu(s) ? xT : DT;
|
|
7629
|
-
return t.test(
|
|
7629
|
+
return t.test(Wi(s));
|
|
7630
7630
|
}
|
|
7631
7631
|
function $T(s, t) {
|
|
7632
7632
|
return s == null ? void 0 : s[t];
|
|
7633
7633
|
}
|
|
7634
|
-
function
|
|
7634
|
+
function Ji(s, t) {
|
|
7635
7635
|
var e = $T(s, t);
|
|
7636
7636
|
return UT(e) ? e : void 0;
|
|
7637
7637
|
}
|
|
7638
|
-
var FT =
|
|
7638
|
+
var FT = Ji(ys, "Map");
|
|
7639
7639
|
const fo = FT;
|
|
7640
|
-
var BT =
|
|
7640
|
+
var BT = Ji(Object, "create");
|
|
7641
7641
|
const vo = BT;
|
|
7642
7642
|
function HT() {
|
|
7643
7643
|
this.__data__ = vo ? vo(null) : {}, this.size = 0;
|
|
@@ -7665,23 +7665,23 @@ function XT(s, t) {
|
|
|
7665
7665
|
var e = this.__data__;
|
|
7666
7666
|
return this.size += this.has(s) ? 0 : 1, e[s] = vo && t === void 0 ? QT : t, this;
|
|
7667
7667
|
}
|
|
7668
|
-
function
|
|
7668
|
+
function Hi(s) {
|
|
7669
7669
|
var t = -1, e = s == null ? 0 : s.length;
|
|
7670
7670
|
for (this.clear(); ++t < e; ) {
|
|
7671
7671
|
var r = s[t];
|
|
7672
7672
|
this.set(r[0], r[1]);
|
|
7673
7673
|
}
|
|
7674
7674
|
}
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7675
|
+
Hi.prototype.clear = HT;
|
|
7676
|
+
Hi.prototype.delete = qT;
|
|
7677
|
+
Hi.prototype.get = JT;
|
|
7678
|
+
Hi.prototype.has = YT;
|
|
7679
|
+
Hi.prototype.set = XT;
|
|
7680
7680
|
function ZT() {
|
|
7681
7681
|
this.size = 0, this.__data__ = {
|
|
7682
|
-
hash: new
|
|
7682
|
+
hash: new Hi(),
|
|
7683
7683
|
map: new (fo || dr)(),
|
|
7684
|
-
string: new
|
|
7684
|
+
string: new Hi()
|
|
7685
7685
|
};
|
|
7686
7686
|
}
|
|
7687
7687
|
function ey(s) {
|
|
@@ -7706,18 +7706,18 @@ function iy(s, t) {
|
|
|
7706
7706
|
var e = Tl(this, s), r = e.size;
|
|
7707
7707
|
return e.set(s, t), this.size += e.size == r ? 0 : 1, this;
|
|
7708
7708
|
}
|
|
7709
|
-
function
|
|
7709
|
+
function Ki(s) {
|
|
7710
7710
|
var t = -1, e = s == null ? 0 : s.length;
|
|
7711
7711
|
for (this.clear(); ++t < e; ) {
|
|
7712
7712
|
var r = s[t];
|
|
7713
7713
|
this.set(r[0], r[1]);
|
|
7714
7714
|
}
|
|
7715
7715
|
}
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7716
|
+
Ki.prototype.clear = ZT;
|
|
7717
|
+
Ki.prototype.delete = ty;
|
|
7718
|
+
Ki.prototype.get = sy;
|
|
7719
|
+
Ki.prototype.has = ry;
|
|
7720
|
+
Ki.prototype.set = iy;
|
|
7721
7721
|
var ny = 200;
|
|
7722
7722
|
function ay(s, t) {
|
|
7723
7723
|
var e = this.__data__;
|
|
@@ -7725,7 +7725,7 @@ function ay(s, t) {
|
|
|
7725
7725
|
var r = e.__data__;
|
|
7726
7726
|
if (!fo || r.length < ny - 1)
|
|
7727
7727
|
return r.push([s, t]), this.size = ++e.size, this;
|
|
7728
|
-
e = this.__data__ = new
|
|
7728
|
+
e = this.__data__ = new Ki(r);
|
|
7729
7729
|
}
|
|
7730
7730
|
return e.set(s, t), this.size = e.size, this;
|
|
7731
7731
|
}
|
|
@@ -7745,7 +7745,7 @@ function oy(s, t) {
|
|
|
7745
7745
|
}
|
|
7746
7746
|
var cy = function() {
|
|
7747
7747
|
try {
|
|
7748
|
-
var s =
|
|
7748
|
+
var s = Ji(Object, "defineProperty");
|
|
7749
7749
|
return s({}, "", {}), s;
|
|
7750
7750
|
} catch (t) {
|
|
7751
7751
|
}
|
|
@@ -7783,7 +7783,7 @@ function Os(s) {
|
|
|
7783
7783
|
}
|
|
7784
7784
|
var hy = "[object Arguments]";
|
|
7785
7785
|
function Hh(s) {
|
|
7786
|
-
return Os(s) &&
|
|
7786
|
+
return Os(s) && Gi(s) == hy;
|
|
7787
7787
|
}
|
|
7788
7788
|
var zm = Object.prototype, py = zm.hasOwnProperty, my = zm.propertyIsEnumerable, gy = Hh(function() {
|
|
7789
7789
|
return arguments;
|
|
@@ -7811,7 +7811,7 @@ var Cy = "[object Arguments]", Ry = "[object Array]", wy = "[object Boolean]", b
|
|
|
7811
7811
|
_e[$y] = _e[Fy] = _e[By] = _e[Hy] = _e[qy] = _e[jy] = _e[Gy] = _e[Wy] = _e[Jy] = true;
|
|
7812
7812
|
_e[Cy] = _e[Ry] = _e[xy] = _e[wy] = _e[Uy] = _e[by] = _e[ky] = _e[Iy] = _e[Ay] = _e[My] = _e[Dy] = _e[Oy] = _e[Ny] = _e[Ly] = _e[Vy] = false;
|
|
7813
7813
|
function Ky(s) {
|
|
7814
|
-
return Os(s) && Xm(s.length) && !!_e[
|
|
7814
|
+
return Os(s) && Xm(s.length) && !!_e[Gi(s)];
|
|
7815
7815
|
}
|
|
7816
7816
|
function Zu(s) {
|
|
7817
7817
|
return function(t) {
|
|
@@ -7945,17 +7945,17 @@ function Xl(s) {
|
|
|
7945
7945
|
function ES(s) {
|
|
7946
7946
|
return dg(s, Sc, cg);
|
|
7947
7947
|
}
|
|
7948
|
-
var _S =
|
|
7948
|
+
var _S = Ji(ys, "DataView");
|
|
7949
7949
|
const Zl = _S;
|
|
7950
|
-
var PS =
|
|
7950
|
+
var PS = Ji(ys, "Promise");
|
|
7951
7951
|
const eu = PS;
|
|
7952
|
-
var CS =
|
|
7952
|
+
var CS = Ji(ys, "Set");
|
|
7953
7953
|
const tu = CS;
|
|
7954
|
-
var RS =
|
|
7954
|
+
var RS = Ji(ys, "WeakMap");
|
|
7955
7955
|
const su = RS;
|
|
7956
|
-
var Yh = "[object Map]", wS = "[object Object]", Qh = "[object Promise]", Xh = "[object Set]", Zh = "[object WeakMap]", ep = "[object DataView]", bS =
|
|
7956
|
+
var Yh = "[object Map]", wS = "[object Object]", Qh = "[object Promise]", Xh = "[object Set]", Zh = "[object WeakMap]", ep = "[object DataView]", bS = Wi(Zl), kS = Wi(fo), IS = Wi(eu), AS = Wi(tu), MS = Wi(su), Yr = Gi;
|
|
7957
7957
|
(Zl && Yr(new Zl(new ArrayBuffer(1))) != ep || fo && Yr(new fo()) != Yh || eu && Yr(eu.resolve()) != Qh || tu && Yr(new tu()) != Xh || su && Yr(new su()) != Zh) && (Yr = function(s) {
|
|
7958
|
-
var t =
|
|
7958
|
+
var t = Gi(s), e = t == wS ? s.constructor : void 0, r = e ? Wi(e) : "";
|
|
7959
7959
|
if (r)
|
|
7960
7960
|
switch (r) {
|
|
7961
7961
|
case bS:
|
|
@@ -8109,7 +8109,7 @@ function ih(s) {
|
|
|
8109
8109
|
}
|
|
8110
8110
|
var jE = "[object Symbol]";
|
|
8111
8111
|
function GE(s) {
|
|
8112
|
-
return typeof s == "symbol" || Os(s) &&
|
|
8112
|
+
return typeof s == "symbol" || Os(s) && Gi(s) == jE;
|
|
8113
8113
|
}
|
|
8114
8114
|
var WE = Object.defineProperty, JE = (s, t) => {
|
|
8115
8115
|
for (var e in t)
|
|
@@ -8795,7 +8795,7 @@ function M_(s) {
|
|
|
8795
8795
|
}
|
|
8796
8796
|
var D_ = "[object Object]", O_ = Function.prototype, N_ = Object.prototype, Sg = O_.toString, L_ = N_.hasOwnProperty, V_ = Sg.call(Object);
|
|
8797
8797
|
function x_(s) {
|
|
8798
|
-
if (!Os(s) ||
|
|
8798
|
+
if (!Os(s) || Gi(s) != D_)
|
|
8799
8799
|
return false;
|
|
8800
8800
|
var t = sh(s);
|
|
8801
8801
|
if (t === null)
|
|
@@ -8812,7 +8812,7 @@ function F_(s) {
|
|
|
8812
8812
|
}
|
|
8813
8813
|
function nd(s) {
|
|
8814
8814
|
var t = -1, e = s == null ? 0 : s.length;
|
|
8815
|
-
for (this.__data__ = new
|
|
8815
|
+
for (this.__data__ = new Ki(); ++t < e; )
|
|
8816
8816
|
this.add(s[t]);
|
|
8817
8817
|
}
|
|
8818
8818
|
nd.prototype.add = nd.prototype.push = $_;
|
|
@@ -9487,21 +9487,21 @@ function _a(s, t) {
|
|
|
9487
9487
|
function HP({ baseURI: s }) {
|
|
9488
9488
|
return s != null && s.includes("preprod.dyte") ? oo.PREPROD : s != null && s.includes("devel.dyte") ? oo.DEVEL : oo.PROD;
|
|
9489
9489
|
}
|
|
9490
|
-
function
|
|
9490
|
+
function hn({ servicePrefix: s, baseURI: t }) {
|
|
9491
9491
|
return `${s}.${t}`;
|
|
9492
9492
|
}
|
|
9493
9493
|
function Dg(s) {
|
|
9494
9494
|
const t = s.getValue("baseURI");
|
|
9495
9495
|
return {
|
|
9496
|
-
location:
|
|
9496
|
+
location: hn({
|
|
9497
9497
|
servicePrefix: "location",
|
|
9498
9498
|
baseURI: t
|
|
9499
9499
|
}),
|
|
9500
|
-
locationLegacy:
|
|
9500
|
+
locationLegacy: hn({
|
|
9501
9501
|
servicePrefix: "location-legacy",
|
|
9502
9502
|
baseURI: t
|
|
9503
9503
|
}),
|
|
9504
|
-
daCollector:
|
|
9504
|
+
daCollector: hn({
|
|
9505
9505
|
servicePrefix: "da-collector",
|
|
9506
9506
|
baseURI: t
|
|
9507
9507
|
})
|
|
@@ -9570,10 +9570,10 @@ class WP {
|
|
|
9570
9570
|
return this.mostRecentPeerId;
|
|
9571
9571
|
}
|
|
9572
9572
|
}
|
|
9573
|
-
const
|
|
9573
|
+
const Fi = new WP(), ae = class {
|
|
9574
9574
|
static get logsEndpoint() {
|
|
9575
|
-
const t =
|
|
9576
|
-
return `https://${
|
|
9575
|
+
const t = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9576
|
+
return `https://${hn({
|
|
9577
9577
|
servicePrefix: "api-silos",
|
|
9578
9578
|
baseURI: t.getValue("baseURI")
|
|
9579
9579
|
})}/otel/logs`;
|
|
@@ -9621,7 +9621,7 @@ const $i = new WP(), ae = class {
|
|
|
9621
9621
|
}
|
|
9622
9622
|
static addLogInCurrentSpan(t, e, r = {}, i = false) {
|
|
9623
9623
|
r != null && r.error && Object.assign(r, { error: Bc(r.error) });
|
|
9624
|
-
const n =
|
|
9624
|
+
const n = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9625
9625
|
if (MP(n) && (kP(r) ? console[t]("DyteInternalLogs:: ", t, e) : console[t](
|
|
9626
9626
|
"DyteInternalLogs:: ",
|
|
9627
9627
|
t,
|
|
@@ -9653,7 +9653,7 @@ const $i = new WP(), ae = class {
|
|
|
9653
9653
|
}
|
|
9654
9654
|
}
|
|
9655
9655
|
static sendOtelLogsToNewRelic(t) {
|
|
9656
|
-
const e =
|
|
9656
|
+
const e = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9657
9657
|
fetch(ae.logsEndpoint, {
|
|
9658
9658
|
method: "POST",
|
|
9659
9659
|
headers: {
|
|
@@ -9913,7 +9913,7 @@ ${this.message}`;
|
|
|
9913
9913
|
r && r.endsWith("00") && (n = true), n && l.error("DyteError", {
|
|
9914
9914
|
error: { message: this.message, name: this.name, code: r }
|
|
9915
9915
|
});
|
|
9916
|
-
const o =
|
|
9916
|
+
const o = Fi.getContext(Fi.getMostRecentPeerId());
|
|
9917
9917
|
if (o) {
|
|
9918
9918
|
const c = o.getValue("onError");
|
|
9919
9919
|
try {
|
|
@@ -10199,15 +10199,15 @@ const fp = 1080, vp = 1920, ZP = (s, t, e, r, i, n) => {
|
|
|
10199
10199
|
let g = d * m, T = h * m, _, P, A, C, L = 1;
|
|
10200
10200
|
return g < e && (L = e / g), Math.abs(L - 1) < 1e-14 && T < r && (L = r / T), g *= L, T *= L, A = d / (g / e), C = h / (T / r), _ = (d - A) * o, P = (h - C) * c, _ < 0 && (_ = 0), P < 0 && (P = 0), A > d && (A = d), C > h && (C = h), [_, P, A, C, s, t, e, r];
|
|
10201
10201
|
};
|
|
10202
|
-
var qt,
|
|
10202
|
+
var qt, fn, tt, jt, De, ns, Fs, mt, xe, vn, Tn, Bs, yn;
|
|
10203
10203
|
const kh = class extends Ut {
|
|
10204
10204
|
constructor(e, r, i, n) {
|
|
10205
10205
|
super();
|
|
10206
10206
|
f(this, qt, void 0);
|
|
10207
|
-
f(this,
|
|
10207
|
+
f(this, fn, void 0);
|
|
10208
10208
|
f(this, tt, void 0);
|
|
10209
10209
|
f(this, jt, void 0);
|
|
10210
|
-
f(this,
|
|
10210
|
+
f(this, De, {
|
|
10211
10211
|
height: fp,
|
|
10212
10212
|
width: vp
|
|
10213
10213
|
});
|
|
@@ -10220,13 +10220,13 @@ const kh = class extends Ut {
|
|
|
10220
10220
|
});
|
|
10221
10221
|
f(this, Fs, void 0);
|
|
10222
10222
|
f(this, mt, {});
|
|
10223
|
-
f(this,
|
|
10224
|
-
f(this, fn, void 0);
|
|
10223
|
+
f(this, xe, void 0);
|
|
10225
10224
|
f(this, vn, void 0);
|
|
10225
|
+
f(this, Tn, void 0);
|
|
10226
10226
|
f(this, Bs, void 0);
|
|
10227
|
-
f(this,
|
|
10227
|
+
f(this, yn, false);
|
|
10228
10228
|
p(this, "cleanupEventListeners", () => {
|
|
10229
|
-
a(this,
|
|
10229
|
+
a(this, fn).unsubscribe("stageStatus", this.handlePipMediaControls), a(this, xe).removeListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, xe).removeListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, xe).removeListener("roomLeft", () => this.disable());
|
|
10230
10230
|
});
|
|
10231
10231
|
p(this, "enablePipMediaControls", () => {
|
|
10232
10232
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
@@ -10241,7 +10241,7 @@ const kh = class extends Ut {
|
|
|
10241
10241
|
e2 === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
10242
10242
|
});
|
|
10243
10243
|
p(this, "eventCallback", (e2) => {
|
|
10244
|
-
e2 === "CAMERA" && (a(this,
|
|
10244
|
+
e2 === "CAMERA" && (a(this, xe).videoEnabled ? a(this, xe).disableVideo() : a(this, xe).enableVideo(), this.emit("cameraToggled")), e2 === "MIC" && (a(this, xe).audioEnabled ? a(this, xe).disableAudio() : a(this, xe).enableAudio(), this.emit("micToggled")), e2 === "END" && (k.emit(I.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
10245
10245
|
});
|
|
10246
10246
|
p(this, "unmountEvents", () => {
|
|
10247
10247
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
@@ -10256,7 +10256,7 @@ const kh = class extends Ut {
|
|
|
10256
10256
|
p(this, "disable", (e2 = false) => {
|
|
10257
10257
|
v(this, Bs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, Fs)), e2 !== true && document.body.removeChild(a(this, tt)), v(this, Fs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
10258
10258
|
});
|
|
10259
|
-
v(this,
|
|
10259
|
+
v(this, fn, e), v(this, Bs, "idle"), v(this, xe, r), v(this, ns, {
|
|
10260
10260
|
brand: r.config.designTokens.colors.brand[500],
|
|
10261
10261
|
background: r.config.designTokens.colors.background[1e3],
|
|
10262
10262
|
text: r.config.designTokens.colors.text,
|
|
@@ -10278,10 +10278,10 @@ const kh = class extends Ut {
|
|
|
10278
10278
|
return u(this, null, function* () {
|
|
10279
10279
|
switch (e) {
|
|
10280
10280
|
case "handRaise":
|
|
10281
|
-
v(this,
|
|
10281
|
+
v(this, Tn, r);
|
|
10282
10282
|
break;
|
|
10283
10283
|
case "pin":
|
|
10284
|
-
v(this,
|
|
10284
|
+
v(this, vn, r);
|
|
10285
10285
|
break;
|
|
10286
10286
|
}
|
|
10287
10287
|
});
|
|
@@ -10290,10 +10290,10 @@ const kh = class extends Ut {
|
|
|
10290
10290
|
return u(this, null, function* () {
|
|
10291
10291
|
switch (e) {
|
|
10292
10292
|
case "handRaise":
|
|
10293
|
-
v(this,
|
|
10293
|
+
v(this, Tn, yield Ac(r));
|
|
10294
10294
|
break;
|
|
10295
10295
|
case "pin":
|
|
10296
|
-
v(this,
|
|
10296
|
+
v(this, vn, yield Ac(r));
|
|
10297
10297
|
break;
|
|
10298
10298
|
}
|
|
10299
10299
|
});
|
|
@@ -10310,11 +10310,11 @@ const kh = class extends Ut {
|
|
|
10310
10310
|
v(this, tt, document.createElement("div")), a(this, tt).style.width = "0.1px", a(this, tt).style.height = "0.1px", a(this, tt).style.overflow = "hidden", a(this, tt).style.position = "absolute", a(this, tt).style.bottom = "0", a(this, tt).style.right = "0", a(this, tt).style.opacity = "0", a(this, tt).appendChild(a(this, jt));
|
|
10311
10311
|
}
|
|
10312
10312
|
setupEventListeners() {
|
|
10313
|
-
a(this,
|
|
10313
|
+
a(this, fn).subscribe("stageStatus", this.handlePipMediaControls), a(this, xe).addListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, xe).addListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, xe).addListener("roomLeft", () => this.disable());
|
|
10314
10314
|
}
|
|
10315
10315
|
createCanvas() {
|
|
10316
10316
|
const e = document.createElement("canvas");
|
|
10317
|
-
e.height = a(this,
|
|
10317
|
+
e.height = a(this, De).height, e.width = a(this, De).width, v(this, qt, e);
|
|
10318
10318
|
}
|
|
10319
10319
|
setupMediaSessionEvents() {
|
|
10320
10320
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", () => {
|
|
@@ -10322,12 +10322,12 @@ const kh = class extends Ut {
|
|
|
10322
10322
|
}), this.mountAudioEvents(), this.mountVideoEvents());
|
|
10323
10323
|
}
|
|
10324
10324
|
mountAudioEvents() {
|
|
10325
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this,
|
|
10325
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this, xe).permissions.canProduceAudio && navigator.mediaSession.setActionHandler("togglemicrophone", () => {
|
|
10326
10326
|
this.eventCallback("MIC");
|
|
10327
10327
|
});
|
|
10328
10328
|
}
|
|
10329
10329
|
mountVideoEvents() {
|
|
10330
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this,
|
|
10330
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this, xe).permissions.canProduceVideo && navigator.mediaSession.setActionHandler("togglecamera", () => {
|
|
10331
10331
|
this.eventCallback("CAMERA");
|
|
10332
10332
|
});
|
|
10333
10333
|
}
|
|
@@ -10377,7 +10377,7 @@ const kh = class extends Ut {
|
|
|
10377
10377
|
o - c * 2
|
|
10378
10378
|
), h += o + c, _.restore();
|
|
10379
10379
|
};
|
|
10380
|
-
e.pinned && g(a(this,
|
|
10380
|
+
e.pinned && g(a(this, vn)), e.handRaised && g(a(this, Tn));
|
|
10381
10381
|
}
|
|
10382
10382
|
drawTile(e, r, i) {
|
|
10383
10383
|
var h, m;
|
|
@@ -10385,9 +10385,9 @@ const kh = class extends Ut {
|
|
|
10385
10385
|
return;
|
|
10386
10386
|
const n = a(this, qt).getContext("2d"), o = this.getSources();
|
|
10387
10387
|
let c = 0, d = 0;
|
|
10388
|
-
for (; c < a(this,
|
|
10388
|
+
for (; c < a(this, De).height - 5; ) {
|
|
10389
10389
|
let g = 0;
|
|
10390
|
-
for (; g < a(this,
|
|
10390
|
+
for (; g < a(this, De).width - 5 && d < i; ) {
|
|
10391
10391
|
if ((h = o[d]) != null && h.enabled) {
|
|
10392
10392
|
const T = o[d].element, [_, P, A, C, L, H, B, F] = ZP(
|
|
10393
10393
|
g,
|
|
@@ -10409,21 +10409,21 @@ const kh = class extends Ut {
|
|
|
10409
10409
|
switch (e) {
|
|
10410
10410
|
case 0:
|
|
10411
10411
|
case 1:
|
|
10412
|
-
return [a(this,
|
|
10412
|
+
return [a(this, De).width, a(this, De).height];
|
|
10413
10413
|
case 2:
|
|
10414
|
-
return [Math.floor(a(this,
|
|
10414
|
+
return [Math.floor(a(this, De).width / 2), a(this, De).height];
|
|
10415
10415
|
case 3:
|
|
10416
10416
|
case 4:
|
|
10417
|
-
return [Math.floor(a(this,
|
|
10417
|
+
return [Math.floor(a(this, De).width / 2), Math.floor(a(this, De).height / 2)];
|
|
10418
10418
|
case 5:
|
|
10419
10419
|
case 6:
|
|
10420
|
-
return [Math.floor(a(this,
|
|
10420
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 2)];
|
|
10421
10421
|
case 7:
|
|
10422
10422
|
case 8:
|
|
10423
10423
|
case 9:
|
|
10424
|
-
return [Math.floor(a(this,
|
|
10424
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 3)];
|
|
10425
10425
|
default:
|
|
10426
|
-
return [Math.floor(a(this,
|
|
10426
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 2)];
|
|
10427
10427
|
}
|
|
10428
10428
|
}
|
|
10429
10429
|
paintCanvas() {
|
|
@@ -10434,13 +10434,13 @@ const kh = class extends Ut {
|
|
|
10434
10434
|
}
|
|
10435
10435
|
isSupported() {
|
|
10436
10436
|
var e;
|
|
10437
|
-
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this,
|
|
10437
|
+
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this, xe).config) == null ? void 0 : e.viewType) !== "LIVESTREAM";
|
|
10438
10438
|
}
|
|
10439
10439
|
get isActive() {
|
|
10440
10440
|
return document.pictureInPictureElement !== null;
|
|
10441
10441
|
}
|
|
10442
10442
|
cleanup() {
|
|
10443
|
-
if (v(this,
|
|
10443
|
+
if (v(this, yn, false), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), a(this, tt))
|
|
10444
10444
|
try {
|
|
10445
10445
|
document.body.removeChild(a(this, tt));
|
|
10446
10446
|
} catch (e) {
|
|
@@ -10450,14 +10450,14 @@ const kh = class extends Ut {
|
|
|
10450
10450
|
init({ height: e, width: r } = {}) {
|
|
10451
10451
|
if (!this.isSupported())
|
|
10452
10452
|
throw l.error("DytePip.unsupported"), new Error("Picture-in-picture is not available in this environment");
|
|
10453
|
-
if (a(this,
|
|
10453
|
+
if (a(this, yn))
|
|
10454
10454
|
return;
|
|
10455
|
-
v(this,
|
|
10455
|
+
v(this, yn, true), this.createCanvas(), this.setupMediaSessionEvents();
|
|
10456
10456
|
const i = document.createElement("video");
|
|
10457
|
-
v(this,
|
|
10457
|
+
v(this, De, {
|
|
10458
10458
|
height: e != null ? e : fp,
|
|
10459
10459
|
width: r != null ? r : vp
|
|
10460
|
-
}), i.height = a(this,
|
|
10460
|
+
}), i.height = a(this, De).height, i.width = a(this, De).width, i.autoplay = true, i.muted = true, i.srcObject = a(this, qt).captureStream(24), v(this, jt, i), a(this, jt).onloadedmetadata = () => {
|
|
10461
10461
|
try {
|
|
10462
10462
|
this.emit("pipStarted"), a(this, jt).onleavepictureinpicture = () => {
|
|
10463
10463
|
this.emit("pipEnded");
|
|
@@ -10531,7 +10531,7 @@ const kh = class extends Ut {
|
|
|
10531
10531
|
v(this, mt, {});
|
|
10532
10532
|
}
|
|
10533
10533
|
enable() {
|
|
10534
|
-
v(this, Bs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this,
|
|
10534
|
+
v(this, Bs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, xe).videoEnabled), this.updateMediaSession("MIC", a(this, xe).audioEnabled), document.body.appendChild(a(this, tt)), v(this, Fs, requestAnimationFrame(() => this.animate())), a(this, jt).onloadedmetadata = () => {
|
|
10535
10535
|
a(this, jt).requestPictureInPicture().then(() => {
|
|
10536
10536
|
v(this, Bs, "active");
|
|
10537
10537
|
});
|
|
@@ -10541,7 +10541,7 @@ const kh = class extends Ut {
|
|
|
10541
10541
|
}
|
|
10542
10542
|
};
|
|
10543
10543
|
let ou = kh;
|
|
10544
|
-
qt = /* @__PURE__ */ new WeakMap(),
|
|
10544
|
+
qt = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), ns = /* @__PURE__ */ new WeakMap(), Fs = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), Bs = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
|
|
10545
10545
|
var or;
|
|
10546
10546
|
(function(s) {
|
|
10547
10547
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -12220,10 +12220,10 @@ class fw extends MessageType {
|
|
|
12220
12220
|
}
|
|
12221
12221
|
}
|
|
12222
12222
|
const vw = new fw();
|
|
12223
|
-
var
|
|
12223
|
+
var Bi;
|
|
12224
12224
|
(function(s) {
|
|
12225
12225
|
s[s.BROWSER = 0] = "BROWSER", s[s.TRACK = 1] = "TRACK", s[s.COMPOSITE = 2] = "COMPOSITE";
|
|
12226
|
-
})(
|
|
12226
|
+
})(Bi || (Bi = {}));
|
|
12227
12227
|
var rr;
|
|
12228
12228
|
(function(s) {
|
|
12229
12229
|
s[s.UNSPECIFIED = 0] = "UNSPECIFIED", s[s.ON_STAGE = 1] = "ON_STAGE", s[s.APPROVED_STAGE = 2] = "APPROVED_STAGE", s[s.REQUESTED_STAGE = 3] = "REQUESTED_STAGE", s[s.OFF_STAGE = 4] = "OFF_STAGE";
|
|
@@ -12326,7 +12326,7 @@ class Ew extends MessageType {
|
|
|
12326
12326
|
]);
|
|
12327
12327
|
}
|
|
12328
12328
|
}
|
|
12329
|
-
const
|
|
12329
|
+
const en = new Ew();
|
|
12330
12330
|
class _w extends MessageType {
|
|
12331
12331
|
constructor() {
|
|
12332
12332
|
super("socket.room.PeerStatusUpdate", [
|
|
@@ -12437,7 +12437,7 @@ class kw extends MessageType {
|
|
|
12437
12437
|
kind: "scalar",
|
|
12438
12438
|
T: 9
|
|
12439
12439
|
},
|
|
12440
|
-
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
12440
|
+
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Bi] },
|
|
12441
12441
|
{
|
|
12442
12442
|
no: 3,
|
|
12443
12443
|
name: "recording_status",
|
|
@@ -13595,7 +13595,7 @@ class ok extends MessageType {
|
|
|
13595
13595
|
]);
|
|
13596
13596
|
}
|
|
13597
13597
|
}
|
|
13598
|
-
const
|
|
13598
|
+
const zi = new ok();
|
|
13599
13599
|
class ck extends MessageType {
|
|
13600
13600
|
constructor() {
|
|
13601
13601
|
super("socket.chat.GetPaginatedChatMessageRoomRequest", [
|
|
@@ -13638,7 +13638,7 @@ const dk = new ck();
|
|
|
13638
13638
|
class lk extends MessageType {
|
|
13639
13639
|
constructor() {
|
|
13640
13640
|
super("socket.chat.GetPaginatedChatMessageRoomResponse", [
|
|
13641
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
13641
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => zi },
|
|
13642
13642
|
{
|
|
13643
13643
|
no: 2,
|
|
13644
13644
|
name: "next",
|
|
@@ -13652,7 +13652,7 @@ const uk = new lk();
|
|
|
13652
13652
|
class hk extends MessageType {
|
|
13653
13653
|
constructor() {
|
|
13654
13654
|
super("socket.chat.GetChatMessagesResponse", [
|
|
13655
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
13655
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => zi }
|
|
13656
13656
|
]);
|
|
13657
13657
|
}
|
|
13658
13658
|
}
|
|
@@ -13679,7 +13679,7 @@ const mk = new pk();
|
|
|
13679
13679
|
class gk extends MessageType {
|
|
13680
13680
|
constructor() {
|
|
13681
13681
|
super("socket.chat.SendChatMessageToRoomResponse", [
|
|
13682
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13682
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13683
13683
|
]);
|
|
13684
13684
|
}
|
|
13685
13685
|
}
|
|
@@ -13713,7 +13713,7 @@ const vk = new fk();
|
|
|
13713
13713
|
class Tk extends MessageType {
|
|
13714
13714
|
constructor() {
|
|
13715
13715
|
super("socket.chat.SendChatMessageToPeersResponse", [
|
|
13716
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13716
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13717
13717
|
]);
|
|
13718
13718
|
}
|
|
13719
13719
|
}
|
|
@@ -13746,7 +13746,7 @@ const Sk = new yk();
|
|
|
13746
13746
|
class Ek extends MessageType {
|
|
13747
13747
|
constructor() {
|
|
13748
13748
|
super("socket.chat.SendChatMessageToChannelResponse", [
|
|
13749
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13749
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13750
13750
|
]);
|
|
13751
13751
|
}
|
|
13752
13752
|
}
|
|
@@ -13847,7 +13847,7 @@ const Oc = new wk();
|
|
|
13847
13847
|
class bk extends MessageType {
|
|
13848
13848
|
constructor() {
|
|
13849
13849
|
super("socket.chat.EditChatMessageResponse", [
|
|
13850
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13850
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13851
13851
|
]);
|
|
13852
13852
|
}
|
|
13853
13853
|
}
|
|
@@ -14091,7 +14091,7 @@ const qk = new Hk();
|
|
|
14091
14091
|
class jk extends MessageType {
|
|
14092
14092
|
constructor() {
|
|
14093
14093
|
super("socket.chat.LatestMessageAndUnreadCount", [
|
|
14094
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
14094
|
+
{ no: 1, name: "message", kind: "message", T: () => zi },
|
|
14095
14095
|
{
|
|
14096
14096
|
no: 2,
|
|
14097
14097
|
name: "unread_count",
|
|
@@ -14908,7 +14908,7 @@ class ZI extends MessageType {
|
|
|
14908
14908
|
kind: "scalar",
|
|
14909
14909
|
T: 9
|
|
14910
14910
|
},
|
|
14911
|
-
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
14911
|
+
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Bi] }
|
|
14912
14912
|
]);
|
|
14913
14913
|
}
|
|
14914
14914
|
}
|
|
@@ -15310,16 +15310,16 @@ const fu = (sm = class {
|
|
|
15310
15310
|
});
|
|
15311
15311
|
}
|
|
15312
15312
|
}, yr = /* @__PURE__ */ new WeakMap(), sm);
|
|
15313
|
-
let
|
|
15313
|
+
let qi = fu;
|
|
15314
15314
|
uh([
|
|
15315
15315
|
y.trace("ChatChannelHandler.createChannel")
|
|
15316
|
-
],
|
|
15316
|
+
], qi.prototype, "createChannel", 1);
|
|
15317
15317
|
uh([
|
|
15318
15318
|
y.trace("ChatChannelHandler.updateChannel")
|
|
15319
|
-
],
|
|
15319
|
+
], qi.prototype, "updateChannel", 1);
|
|
15320
15320
|
uh([
|
|
15321
15321
|
y.trace("ChatChannelHandler.getChannelMembers")
|
|
15322
|
-
],
|
|
15322
|
+
], qi.prototype, "getChannelMembers", 1);
|
|
15323
15323
|
var TA = Object.defineProperty, yA = Object.getOwnPropertyDescriptor, Es = (s, t, e, r) => {
|
|
15324
15324
|
for (var i = r > 1 ? void 0 : r ? yA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15325
15325
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -15450,7 +15450,7 @@ class ts {
|
|
|
15450
15450
|
const t = yield a(this, st).sendMessagePromise(
|
|
15451
15451
|
Ie.getAllChatChannels
|
|
15452
15452
|
);
|
|
15453
|
-
return Ns.fromBinary(t.payload).chatChannels.map(
|
|
15453
|
+
return Ns.fromBinary(t.payload).chatChannels.map(qi.formatChannel);
|
|
15454
15454
|
} catch (t) {
|
|
15455
15455
|
return [];
|
|
15456
15456
|
}
|
|
@@ -16808,7 +16808,7 @@ const Qr = (im = class {
|
|
|
16808
16808
|
), this.chatChannelSocketHandler.on(
|
|
16809
16809
|
si.createChatChannel,
|
|
16810
16810
|
(s) => {
|
|
16811
|
-
const [t] = s.chatChannels, e =
|
|
16811
|
+
const [t] = s.chatChannels, e = qi.formatChannel(t);
|
|
16812
16812
|
this.chat.channels.push(e), this.chat.emit("channelCreate", e);
|
|
16813
16813
|
}
|
|
16814
16814
|
), this.chatSocketHandler.on(
|
|
@@ -16827,7 +16827,7 @@ const Qr = (im = class {
|
|
|
16827
16827
|
), this.chatChannelSocketHandler.on(
|
|
16828
16828
|
si.updateChatChannel,
|
|
16829
16829
|
(s) => {
|
|
16830
|
-
const [t] = s.chatChannels, e =
|
|
16830
|
+
const [t] = s.chatChannels, e = qi.formatChannel(t);
|
|
16831
16831
|
this.chat.channels = this.chat.channels.map((r) => r.id === e.id ? e : r), this.chat.emit("channelUpdate", e);
|
|
16832
16832
|
}
|
|
16833
16833
|
);
|
|
@@ -16841,23 +16841,23 @@ var VA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, UA = (s, t
|
|
|
16841
16841
|
for (var i = r > 1 ? void 0 : r ? xA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16842
16842
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16843
16843
|
return r && i && VA(t, e, i), i;
|
|
16844
|
-
}, Sd, Qg, Ed, Xg,
|
|
16844
|
+
}, Sd, Qg, Ed, Xg, Sn, En, _o, nm;
|
|
16845
16845
|
let yu = (nm = class extends Ut {
|
|
16846
16846
|
constructor(t, e, r) {
|
|
16847
16847
|
super();
|
|
16848
16848
|
f(this, Sd);
|
|
16849
16849
|
f(this, Ed);
|
|
16850
16850
|
p(this, "items");
|
|
16851
|
-
f(this, yn, void 0);
|
|
16852
16851
|
f(this, Sn, void 0);
|
|
16852
|
+
f(this, En, void 0);
|
|
16853
16853
|
f(this, _o, void 0);
|
|
16854
|
-
v(this, _o, t), v(this,
|
|
16854
|
+
v(this, _o, t), v(this, Sn, e), v(this, En, r), this.items = [];
|
|
16855
16855
|
}
|
|
16856
16856
|
create(t, e, r = false, i = false) {
|
|
16857
16857
|
return u(this, null, function* () {
|
|
16858
16858
|
if (!a(this, Ed, Xg))
|
|
16859
16859
|
throw new w("Can't create polls without joining room", "0705");
|
|
16860
|
-
if (!a(this,
|
|
16860
|
+
if (!a(this, Sn).permissions.polls.canCreate) {
|
|
16861
16861
|
l.error("DytePolls::create::permission_denied");
|
|
16862
16862
|
return;
|
|
16863
16863
|
}
|
|
@@ -16876,7 +16876,7 @@ let yu = (nm = class extends Ut {
|
|
|
16876
16876
|
});
|
|
16877
16877
|
return;
|
|
16878
16878
|
}
|
|
16879
|
-
yield a(this,
|
|
16879
|
+
yield a(this, En).createPoll(
|
|
16880
16880
|
t,
|
|
16881
16881
|
e,
|
|
16882
16882
|
r,
|
|
@@ -16886,11 +16886,11 @@ let yu = (nm = class extends Ut {
|
|
|
16886
16886
|
}
|
|
16887
16887
|
vote(t, e) {
|
|
16888
16888
|
return u(this, null, function* () {
|
|
16889
|
-
if (!a(this,
|
|
16889
|
+
if (!a(this, Sn).permissions.polls.canVote) {
|
|
16890
16890
|
l.error("DytePolls::vote::permission_denied");
|
|
16891
16891
|
return;
|
|
16892
16892
|
}
|
|
16893
|
-
yield a(this,
|
|
16893
|
+
yield a(this, En).votePoll(t, e);
|
|
16894
16894
|
});
|
|
16895
16895
|
}
|
|
16896
16896
|
}, Sd = /* @__PURE__ */ new WeakSet(), Qg = function() {
|
|
@@ -16898,7 +16898,7 @@ let yu = (nm = class extends Ut {
|
|
|
16898
16898
|
}, Ed = /* @__PURE__ */ new WeakSet(), Xg = function() {
|
|
16899
16899
|
var t;
|
|
16900
16900
|
return ((t = a(this, Sd, Qg)) == null ? void 0 : t.socketJoined) === true;
|
|
16901
|
-
},
|
|
16901
|
+
}, Sn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), nm);
|
|
16902
16902
|
yu = UA([
|
|
16903
16903
|
ut("0700")
|
|
16904
16904
|
], yu);
|
|
@@ -16906,32 +16906,32 @@ var $A = Object.defineProperty, FA = Object.getOwnPropertyDescriptor, BA = (s, t
|
|
|
16906
16906
|
for (var i = r > 1 ? void 0 : r ? FA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16907
16907
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16908
16908
|
return r && i && $A(t, e, i), i;
|
|
16909
|
-
},
|
|
16910
|
-
const
|
|
16909
|
+
}, _n, ci, am;
|
|
16910
|
+
const tn = (am = class {
|
|
16911
16911
|
constructor(s, t, e) {
|
|
16912
16912
|
p(this, "polls");
|
|
16913
|
-
f(this,
|
|
16913
|
+
f(this, _n, void 0);
|
|
16914
16914
|
f(this, ci, void 0);
|
|
16915
|
-
this.polls = new yu(s, t, e), v(this,
|
|
16915
|
+
this.polls = new yu(s, t, e), v(this, _n, t), v(this, ci, e), this.setupEvents();
|
|
16916
16916
|
}
|
|
16917
16917
|
static init(s, t, e) {
|
|
16918
16918
|
return u(this, null, function* () {
|
|
16919
|
-
return new
|
|
16919
|
+
return new tn(s, t, e);
|
|
16920
16920
|
});
|
|
16921
16921
|
}
|
|
16922
16922
|
canViewPolls() {
|
|
16923
|
-
return a(this,
|
|
16923
|
+
return a(this, _n).permissions.polls.canView;
|
|
16924
16924
|
}
|
|
16925
16925
|
setupEvents() {
|
|
16926
16926
|
const s = {
|
|
16927
16927
|
[xs.createPoll]: (r) => {
|
|
16928
|
-
r.poll && this.updatePoll(
|
|
16928
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16929
16929
|
},
|
|
16930
16930
|
[xs.updatePoll]: (r) => {
|
|
16931
|
-
r.poll && this.updatePoll(
|
|
16931
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16932
16932
|
},
|
|
16933
16933
|
[xs.votePoll]: (r) => {
|
|
16934
|
-
r.poll && this.updatePoll(
|
|
16934
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16935
16935
|
}
|
|
16936
16936
|
}, t = () => {
|
|
16937
16937
|
k.on(I.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
@@ -16946,7 +16946,7 @@ const en = (am = class {
|
|
|
16946
16946
|
a(this, ci).removeListeners(r);
|
|
16947
16947
|
});
|
|
16948
16948
|
};
|
|
16949
|
-
a(this,
|
|
16949
|
+
a(this, _n).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
|
|
16950
16950
|
var i;
|
|
16951
16951
|
(i = r == null ? void 0 : r.polls) != null && i.canView ? (yield this.getPolls(), t()) : (this.polls.items = [], e());
|
|
16952
16952
|
})), this.canViewPolls() && t();
|
|
@@ -16972,7 +16972,7 @@ const en = (am = class {
|
|
|
16972
16972
|
return;
|
|
16973
16973
|
const { polls: t } = XI.fromBinary(s.payload);
|
|
16974
16974
|
this.polls.items = t.map(
|
|
16975
|
-
(e) =>
|
|
16975
|
+
(e) => tn.formatSocketServicePoll(e)
|
|
16976
16976
|
);
|
|
16977
16977
|
});
|
|
16978
16978
|
}
|
|
@@ -16996,8 +16996,8 @@ const en = (am = class {
|
|
|
16996
16996
|
voted: s.votes
|
|
16997
16997
|
};
|
|
16998
16998
|
}
|
|
16999
|
-
},
|
|
17000
|
-
let Zg =
|
|
16999
|
+
}, _n = /* @__PURE__ */ new WeakMap(), ci = /* @__PURE__ */ new WeakMap(), am);
|
|
17000
|
+
let Zg = tn;
|
|
17001
17001
|
BA([
|
|
17002
17002
|
y.trace("PollController.setupEvents")
|
|
17003
17003
|
], Zg.prototype, "setupEvents", 1);
|
|
@@ -17005,21 +17005,21 @@ var HA = Object.defineProperty, qA = Object.getOwnPropertyDescriptor, jA = (s, t
|
|
|
17005
17005
|
for (var i = r > 1 ? void 0 : r ? qA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17006
17006
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17007
17007
|
return r && i && HA(t, e, i), i;
|
|
17008
|
-
}, ef = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(ef || {}),
|
|
17008
|
+
}, ef = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(ef || {}), Pn, Po, Eu, di, Co, om;
|
|
17009
17009
|
let Su = (om = class extends Ut {
|
|
17010
17010
|
constructor(t, e, r, i, n) {
|
|
17011
17011
|
super();
|
|
17012
17012
|
f(this, Po);
|
|
17013
17013
|
p(this, "selfActiveTab");
|
|
17014
17014
|
p(this, "broadcastTabChanges");
|
|
17015
|
-
f(this,
|
|
17015
|
+
f(this, Pn, void 0);
|
|
17016
17016
|
f(this, di, void 0);
|
|
17017
17017
|
f(this, Co, void 0);
|
|
17018
17018
|
p(this, "viewType");
|
|
17019
17019
|
p(this, "meetingStartedTimestamp");
|
|
17020
17020
|
p(this, "meetingTitle");
|
|
17021
17021
|
p(this, "sessionId");
|
|
17022
|
-
v(this,
|
|
17022
|
+
v(this, Pn, t), v(this, di, e), this.viewType = r, v(this, Co, i), this.meetingTitle = n, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
17023
17023
|
}
|
|
17024
17024
|
get socketState() {
|
|
17025
17025
|
return a(this, Po, Eu).socketState;
|
|
@@ -17028,7 +17028,7 @@ let Su = (om = class extends Ut {
|
|
|
17028
17028
|
return a(this, Po, Eu).mediaState;
|
|
17029
17029
|
}
|
|
17030
17030
|
get meetingId() {
|
|
17031
|
-
return a(this,
|
|
17031
|
+
return a(this, Pn).getValue("meetingId");
|
|
17032
17032
|
}
|
|
17033
17033
|
setBroadcastTabChanges(t) {
|
|
17034
17034
|
if (!a(this, di).permissions.canSpotlight)
|
|
@@ -17052,8 +17052,8 @@ let Su = (om = class extends Ut {
|
|
|
17052
17052
|
currentTab: this.selfActiveTab
|
|
17053
17053
|
});
|
|
17054
17054
|
}
|
|
17055
|
-
},
|
|
17056
|
-
return a(this,
|
|
17055
|
+
}, Pn = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakSet(), Eu = function() {
|
|
17056
|
+
return a(this, Pn).getValue("connectionHandler");
|
|
17057
17057
|
}, di = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), om);
|
|
17058
17058
|
Su = jA([
|
|
17059
17059
|
ut("0800")
|
|
@@ -17152,13 +17152,13 @@ var KA = Object.defineProperty, zA = Object.getOwnPropertyDescriptor, YA = (s, t
|
|
|
17152
17152
|
for (var i = r > 1 ? void 0 : r ? zA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17153
17153
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17154
17154
|
return r && i && KA(t, e, i), i;
|
|
17155
|
-
}, Sr,
|
|
17155
|
+
}, Sr, Cn, _d, cm;
|
|
17156
17156
|
const sf = (cm = class {
|
|
17157
17157
|
constructor(s, t, e, r, i, n) {
|
|
17158
17158
|
p(this, "meta");
|
|
17159
17159
|
p(this, "ai");
|
|
17160
17160
|
f(this, Sr, void 0);
|
|
17161
|
-
f(this,
|
|
17161
|
+
f(this, Cn, void 0);
|
|
17162
17162
|
p(this, "aiSocketHandler");
|
|
17163
17163
|
f(this, _d, void 0);
|
|
17164
17164
|
v(this, _d, s), this.meta = new Su(
|
|
@@ -17167,7 +17167,7 @@ const sf = (cm = class {
|
|
|
17167
17167
|
t.config.viewType,
|
|
17168
17168
|
e,
|
|
17169
17169
|
n
|
|
17170
|
-
), this.ai = r, v(this, Sr, t), v(this,
|
|
17170
|
+
), this.ai = r, v(this, Sr, t), v(this, Cn, e), this.aiSocketHandler = i, t.config.viewType !== At.Chat && this.setupEvents();
|
|
17171
17171
|
}
|
|
17172
17172
|
static init(s, t, e, r, i) {
|
|
17173
17173
|
return u(this, null, function* () {
|
|
@@ -17216,13 +17216,13 @@ const sf = (cm = class {
|
|
|
17216
17216
|
({ score: s }) => {
|
|
17217
17217
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
17218
17218
|
}
|
|
17219
|
-
), a(this, Sr).permissions.canSpotlight && (l.info("DyteMetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this,
|
|
17219
|
+
), a(this, Sr).permissions.canSpotlight && (l.info("DyteMetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this, Cn).broadcastMessage("spotlight", {
|
|
17220
17220
|
userId: a(this, Sr).userId,
|
|
17221
17221
|
currentTab: this.meta.selfActiveTab
|
|
17222
17222
|
})), k.on(
|
|
17223
17223
|
I.PEER_JOINED_INTERNAL,
|
|
17224
17224
|
(s) => u(this, null, function* () {
|
|
17225
|
-
a(this, Sr).permissions.canSpotlight && this.meta.selfActiveTab && a(this,
|
|
17225
|
+
a(this, Sr).permissions.canSpotlight && this.meta.selfActiveTab && a(this, Cn).broadcastToPeers("spotlight", [s.id], {
|
|
17226
17226
|
userId: a(this, Sr).userId,
|
|
17227
17227
|
currentTab: this.meta.selfActiveTab
|
|
17228
17228
|
});
|
|
@@ -17292,28 +17292,28 @@ const sf = (cm = class {
|
|
|
17292
17292
|
l.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
17293
17293
|
});
|
|
17294
17294
|
}
|
|
17295
|
-
}, Sr = /* @__PURE__ */ new WeakMap(),
|
|
17295
|
+
}, Sr = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), _d = /* @__PURE__ */ new WeakMap(), cm);
|
|
17296
17296
|
let rf = sf;
|
|
17297
17297
|
YA([
|
|
17298
17298
|
y.trace("MetaController.setupEvents")
|
|
17299
17299
|
], rf.prototype, "setupEvents", 1);
|
|
17300
|
-
var QA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor,
|
|
17300
|
+
var QA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor, Yi = (s, t, e, r) => {
|
|
17301
17301
|
for (var i = r > 1 ? void 0 : r ? XA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17302
17302
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17303
17303
|
return r && i && QA(t, e, i), i;
|
|
17304
|
-
}, Gt,
|
|
17304
|
+
}, Gt, Rn, ce, Ro, Cs, as, wo, _u, wn, Gc;
|
|
17305
17305
|
class Gr extends Ut {
|
|
17306
17306
|
constructor(e, r, i, n, o) {
|
|
17307
17307
|
super();
|
|
17308
17308
|
f(this, wo);
|
|
17309
|
-
f(this,
|
|
17309
|
+
f(this, wn);
|
|
17310
17310
|
f(this, Gt, void 0);
|
|
17311
|
-
f(this,
|
|
17311
|
+
f(this, Rn, void 0);
|
|
17312
17312
|
f(this, ce, void 0);
|
|
17313
17313
|
f(this, Ro, void 0);
|
|
17314
17314
|
f(this, Cs, void 0);
|
|
17315
17315
|
f(this, as, void 0);
|
|
17316
|
-
v(this, as, e), v(this, Gt, n), v(this,
|
|
17316
|
+
v(this, as, e), v(this, Gt, n), v(this, Rn, o), v(this, ce, r), v(this, Ro, i), v(this, Cs, []), this.setupEvents();
|
|
17317
17317
|
}
|
|
17318
17318
|
get status() {
|
|
17319
17319
|
return a(this, as).getValue("stageStatus");
|
|
@@ -17371,17 +17371,17 @@ class Gr extends Ut {
|
|
|
17371
17371
|
"2006"
|
|
17372
17372
|
);
|
|
17373
17373
|
if (a(this, ce).permissions.stageAccess === G.Allowed) {
|
|
17374
|
-
x(this,
|
|
17374
|
+
x(this, wn, Gc).call(this, "ACCEPTED_TO_JOIN_STAGE");
|
|
17375
17375
|
return;
|
|
17376
17376
|
}
|
|
17377
|
-
a(this, Gt).requestAccess(), x(this,
|
|
17377
|
+
a(this, Gt).requestAccess(), x(this, wn, Gc).call(this, "REQUESTED_TO_JOIN_STAGE");
|
|
17378
17378
|
});
|
|
17379
17379
|
}
|
|
17380
17380
|
cancelRequestAccess() {
|
|
17381
17381
|
return u(this, null, function* () {
|
|
17382
17382
|
if (!a(this, ce).permissions.stageEnabled)
|
|
17383
17383
|
throw l.error("DyteStage::stage_disabled"), new w("Stage is disabled", "2003");
|
|
17384
|
-
a(this, Gt).cancelRequestAccess(), x(this,
|
|
17384
|
+
a(this, Gt).cancelRequestAccess(), x(this, wn, Gc).call(this, "OFF_STAGE");
|
|
17385
17385
|
});
|
|
17386
17386
|
}
|
|
17387
17387
|
grantAccess(e) {
|
|
@@ -17415,8 +17415,8 @@ class Gr extends Ut {
|
|
|
17415
17415
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || a(this, ce).permissions.stageAccess === G.NotAllowed)
|
|
17416
17416
|
throw new w(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
17417
17417
|
if (yield a(this, Gt).joinStage(), e === At.Livestream) {
|
|
17418
|
-
yield a(this,
|
|
17419
|
-
const { peers: r } = yield a(this,
|
|
17418
|
+
yield a(this, Rn).joinRoom(a(this, ce));
|
|
17419
|
+
const { peers: r } = yield a(this, Rn).getStagePeers();
|
|
17420
17420
|
k.emit(I.SOCKET_PEERS, r);
|
|
17421
17421
|
}
|
|
17422
17422
|
a(this, as).setValue("stageStatus", "ON_STAGE"), a(this, ce).audioEnabled && a(this, wo, _u).shareMic(a(this, ce).audioTrack), a(this, ce).videoEnabled && a(this, wo, _u).shareWebcam(a(this, ce).videoTrack);
|
|
@@ -17446,32 +17446,32 @@ class Gr extends Ut {
|
|
|
17446
17446
|
});
|
|
17447
17447
|
}
|
|
17448
17448
|
}
|
|
17449
|
-
Gt = /* @__PURE__ */ new WeakMap(),
|
|
17449
|
+
Gt = /* @__PURE__ */ new WeakMap(), Rn = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), as = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakSet(), _u = function() {
|
|
17450
17450
|
return a(this, as).getValue("roomNodeClient");
|
|
17451
|
-
},
|
|
17451
|
+
}, wn = /* @__PURE__ */ new WeakSet(), Gc = function(e) {
|
|
17452
17452
|
return u(this, null, function* () {
|
|
17453
17453
|
this.status !== e && a(this, as).setValue("stageStatus", e);
|
|
17454
17454
|
});
|
|
17455
17455
|
};
|
|
17456
|
-
|
|
17456
|
+
Yi([
|
|
17457
17457
|
y.trace("DyteStage.getStageRequests")
|
|
17458
17458
|
], Gr.prototype, "getAccessRequests", 1);
|
|
17459
|
-
|
|
17459
|
+
Yi([
|
|
17460
17460
|
y.trace("DyteStage.requestAccess")
|
|
17461
17461
|
], Gr.prototype, "requestAccess", 1);
|
|
17462
|
-
|
|
17462
|
+
Yi([
|
|
17463
17463
|
y.trace("DyteStage.cancelRequestAccess")
|
|
17464
17464
|
], Gr.prototype, "cancelRequestAccess", 1);
|
|
17465
|
-
|
|
17465
|
+
Yi([
|
|
17466
17466
|
y.trace("DyteStage.grantAccess")
|
|
17467
17467
|
], Gr.prototype, "grantAccess", 1);
|
|
17468
|
-
|
|
17468
|
+
Yi([
|
|
17469
17469
|
y.trace("DyteStage.denyAccess")
|
|
17470
17470
|
], Gr.prototype, "denyAccess", 1);
|
|
17471
|
-
|
|
17471
|
+
Yi([
|
|
17472
17472
|
y.trace("DyteStage.joinStage")
|
|
17473
17473
|
], Gr.prototype, "join", 1);
|
|
17474
|
-
|
|
17474
|
+
Yi([
|
|
17475
17475
|
y.trace("DyteStage.leaveStage")
|
|
17476
17476
|
], Gr.prototype, "leave", 1);
|
|
17477
17477
|
function ZA(s) {
|
|
@@ -17605,7 +17605,7 @@ var rM = Object.defineProperty, iM = Object.getOwnPropertyDescriptor, _l = (s, t
|
|
|
17605
17605
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17606
17606
|
return r && i && rM(t, e, i), i;
|
|
17607
17607
|
};
|
|
17608
|
-
const
|
|
17608
|
+
const Oe = {
|
|
17609
17609
|
getPeer: 14,
|
|
17610
17610
|
getPeers: 15,
|
|
17611
17611
|
chatMessage: 16,
|
|
@@ -17619,7 +17619,7 @@ const De = {
|
|
|
17619
17619
|
stageStatusUpdate: 25,
|
|
17620
17620
|
peerStageStatusUpdate: 26
|
|
17621
17621
|
};
|
|
17622
|
-
var rt, Lt,
|
|
17622
|
+
var rt, Lt, bn, kn, qs, In, ui, An, dm;
|
|
17623
17623
|
let Pa = (dm = class extends Ra {
|
|
17624
17624
|
constructor(t, {
|
|
17625
17625
|
baseURL: e,
|
|
@@ -17644,8 +17644,8 @@ let Pa = (dm = class extends Ra {
|
|
|
17644
17644
|
p(this, "id");
|
|
17645
17645
|
p(this, "name");
|
|
17646
17646
|
f(this, Lt, void 0);
|
|
17647
|
-
f(this, wn, void 0);
|
|
17648
17647
|
f(this, bn, void 0);
|
|
17648
|
+
f(this, kn, void 0);
|
|
17649
17649
|
p(this, "organizationId");
|
|
17650
17650
|
p(this, "picture");
|
|
17651
17651
|
p(this, "private");
|
|
@@ -17656,13 +17656,13 @@ let Pa = (dm = class extends Ra {
|
|
|
17656
17656
|
p(this, "updatedAt");
|
|
17657
17657
|
f(this, qs, void 0);
|
|
17658
17658
|
p(this, "config");
|
|
17659
|
-
f(this,
|
|
17659
|
+
f(this, In, void 0);
|
|
17660
17660
|
p(this, "active");
|
|
17661
17661
|
p(this, "iframes");
|
|
17662
17662
|
p(this, "enabledBy");
|
|
17663
17663
|
f(this, ui, void 0);
|
|
17664
|
-
f(this,
|
|
17665
|
-
v(this, ui, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, v(this, Lt, C), this.organizationId = c, this.picture = d, this.private = h, this.published = m, this.staggered = g, this.tags = T, this.type = _, this.updatedAt = new Date(P), this.active = false, this.iframes = /* @__PURE__ */ new Map(), v(this, rt, A), v(this,
|
|
17664
|
+
f(this, An, void 0);
|
|
17665
|
+
v(this, ui, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, v(this, Lt, C), this.organizationId = c, this.picture = d, this.private = h, this.published = m, this.staggered = g, this.tags = T, this.type = _, this.updatedAt = new Date(P), this.active = false, this.iframes = /* @__PURE__ */ new Map(), v(this, rt, A), v(this, bn, L), v(this, kn, H), this.enabledBy = "", v(this, An, B);
|
|
17666
17666
|
}
|
|
17667
17667
|
sendIframeEvent(t) {
|
|
17668
17668
|
this.iframes.size && this.iframes.forEach((e) => {
|
|
@@ -17749,28 +17749,28 @@ let Pa = (dm = class extends Ra {
|
|
|
17749
17749
|
a(this, rt).storeDelete(this.id, r.store, i);
|
|
17750
17750
|
break;
|
|
17751
17751
|
}
|
|
17752
|
-
case
|
|
17752
|
+
case Oe.chatMessage: {
|
|
17753
17753
|
const {
|
|
17754
17754
|
messagePayload: c,
|
|
17755
17755
|
peerIds: d
|
|
17756
17756
|
} = r;
|
|
17757
|
-
if (!a(this,
|
|
17757
|
+
if (!a(this, kn)) {
|
|
17758
17758
|
this.sendIframeEvent({
|
|
17759
|
-
type:
|
|
17759
|
+
type: Oe.chatMessage,
|
|
17760
17760
|
uuid: e.uuid,
|
|
17761
17761
|
payload: { error: "Chat is disabled for this room." }
|
|
17762
17762
|
});
|
|
17763
17763
|
return;
|
|
17764
17764
|
}
|
|
17765
17765
|
try {
|
|
17766
|
-
yield a(this,
|
|
17767
|
-
type:
|
|
17766
|
+
yield a(this, kn).sendMessage(c, d), this.sendIframeEvent({
|
|
17767
|
+
type: Oe.chatMessage,
|
|
17768
17768
|
uuid: e.uuid,
|
|
17769
17769
|
payload: { success: true }
|
|
17770
17770
|
});
|
|
17771
17771
|
} catch (h) {
|
|
17772
17772
|
this.sendIframeEvent({
|
|
17773
|
-
type:
|
|
17773
|
+
type: Oe.chatMessage,
|
|
17774
17774
|
uuid: e.uuid,
|
|
17775
17775
|
payload: {
|
|
17776
17776
|
error: h
|
|
@@ -17779,7 +17779,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17779
17779
|
}
|
|
17780
17780
|
break;
|
|
17781
17781
|
}
|
|
17782
|
-
case
|
|
17782
|
+
case Oe.getPeer: {
|
|
17783
17783
|
let c;
|
|
17784
17784
|
const { peerId: d } = r, h = q(O({}, a(this, Lt)), {
|
|
17785
17785
|
id: a(this, Lt).id,
|
|
@@ -17787,47 +17787,47 @@ let Pa = (dm = class extends Ra {
|
|
|
17787
17787
|
isHidden: a(this, Lt).permissions.hiddenParticipant,
|
|
17788
17788
|
stageStatus: a(this, Lt).stageStatus
|
|
17789
17789
|
});
|
|
17790
|
-
d ? (c = a(this,
|
|
17791
|
-
type:
|
|
17790
|
+
d ? (c = a(this, bn).joined.get(r.peerId), a(this, Lt).id === d && (c = h)) : c = h, this.sendIframeEvent({
|
|
17791
|
+
type: Oe.getPeer,
|
|
17792
17792
|
payload: { peer: c && cd(c) },
|
|
17793
17793
|
uuid: e.uuid
|
|
17794
17794
|
});
|
|
17795
17795
|
break;
|
|
17796
17796
|
}
|
|
17797
|
-
case
|
|
17798
|
-
const c = a(this,
|
|
17797
|
+
case Oe.getPeers: {
|
|
17798
|
+
const c = a(this, bn).joined.toArray().map((d) => cd(d));
|
|
17799
17799
|
this.sendIframeEvent({
|
|
17800
|
-
type:
|
|
17800
|
+
type: Oe.getPeers,
|
|
17801
17801
|
payload: { peers: c },
|
|
17802
17802
|
uuid: e.uuid
|
|
17803
17803
|
});
|
|
17804
17804
|
break;
|
|
17805
17805
|
}
|
|
17806
|
-
case
|
|
17806
|
+
case Oe.getPluginInitiator: {
|
|
17807
17807
|
this.sendIframeEvent({
|
|
17808
|
-
type:
|
|
17808
|
+
type: Oe.getPluginInitiator,
|
|
17809
17809
|
payload: { enabledBy: this.enabledBy },
|
|
17810
17810
|
uuid: e.uuid
|
|
17811
17811
|
});
|
|
17812
17812
|
break;
|
|
17813
17813
|
}
|
|
17814
|
-
case
|
|
17814
|
+
case Oe.getDisplayTitle: {
|
|
17815
17815
|
this.sendIframeEvent({
|
|
17816
|
-
type:
|
|
17817
|
-
payload: { displayTitle: a(this,
|
|
17816
|
+
type: Oe.getDisplayTitle,
|
|
17817
|
+
payload: { displayTitle: a(this, An) },
|
|
17818
17818
|
uuid: e.uuid
|
|
17819
17819
|
});
|
|
17820
17820
|
break;
|
|
17821
17821
|
}
|
|
17822
|
-
case
|
|
17822
|
+
case Oe.getRoomName: {
|
|
17823
17823
|
this.sendIframeEvent({
|
|
17824
|
-
type:
|
|
17824
|
+
type: Oe.getRoomName,
|
|
17825
17825
|
payload: { roomName: a(this, ui).getValue("meetingId") },
|
|
17826
17826
|
uuid: e.uuid
|
|
17827
17827
|
});
|
|
17828
17828
|
break;
|
|
17829
17829
|
}
|
|
17830
|
-
case
|
|
17830
|
+
case Oe.customPluginEventToParent: {
|
|
17831
17831
|
this.emit(e.payload.eventName, e.payload.data);
|
|
17832
17832
|
break;
|
|
17833
17833
|
}
|
|
@@ -17844,7 +17844,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17844
17844
|
}
|
|
17845
17845
|
}
|
|
17846
17846
|
}), this.sendIframeEvent({
|
|
17847
|
-
type:
|
|
17847
|
+
type: Oe.sendData,
|
|
17848
17848
|
uuid: "",
|
|
17849
17849
|
payload: t
|
|
17850
17850
|
}));
|
|
@@ -17856,7 +17856,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17856
17856
|
}
|
|
17857
17857
|
addPluginView(t, e = "default") {
|
|
17858
17858
|
var o;
|
|
17859
|
-
if (!a(this,
|
|
17859
|
+
if (!a(this, In))
|
|
17860
17860
|
throw l.error(
|
|
17861
17861
|
"DytePlugin::addPluginView::no_auth_token_set_for_plugin"
|
|
17862
17862
|
), new w("No auth token set for plugin.", "0602");
|
|
@@ -17864,12 +17864,12 @@ let Pa = (dm = class extends Ra {
|
|
|
17864
17864
|
throw l.error("DytePlugin::addPluginView::iframe_was_not_provided"), new w("Iframe was not provided.", "0603");
|
|
17865
17865
|
this.removePluginView(e);
|
|
17866
17866
|
const r = t, i = new URL(this.baseURL), n = {
|
|
17867
|
-
auth: a(this,
|
|
17867
|
+
auth: a(this, In),
|
|
17868
17868
|
parent: navigator.isReactNative ? this.baseURL : window.location.origin,
|
|
17869
17869
|
backend: a(this, ui).getValue("apiBase"),
|
|
17870
17870
|
pluginId: this.id,
|
|
17871
17871
|
roomName: (o = a(this, ui).getValue("meetingId")) != null ? o : "",
|
|
17872
|
-
displayTitle: a(this,
|
|
17872
|
+
displayTitle: a(this, An)
|
|
17873
17873
|
};
|
|
17874
17874
|
if (Object.keys(n).forEach((c) => {
|
|
17875
17875
|
i.searchParams.set(c, n[c]);
|
|
@@ -17904,7 +17904,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17904
17904
|
activateForSelf() {
|
|
17905
17905
|
return u(this, null, function* () {
|
|
17906
17906
|
const t = dt(), e = yield t.authorizePlugin(this.id);
|
|
17907
|
-
v(this,
|
|
17907
|
+
v(this, In, e), v(this, qs, new Date());
|
|
17908
17908
|
try {
|
|
17909
17909
|
const r = yield t.getPluginConfig(this.baseURL);
|
|
17910
17910
|
this.config = r;
|
|
@@ -17951,7 +17951,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17951
17951
|
}), v(this, qs, void 0)));
|
|
17952
17952
|
});
|
|
17953
17953
|
}
|
|
17954
|
-
}, rt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(),
|
|
17954
|
+
}, rt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), qs = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), ui = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), dm);
|
|
17955
17955
|
_l([
|
|
17956
17956
|
Mt({ maxInvocations: 5, period: 1 })
|
|
17957
17957
|
], Pa.prototype, "sendData", 1);
|
|
@@ -17964,7 +17964,7 @@ _l([
|
|
|
17964
17964
|
Pa = _l([
|
|
17965
17965
|
ut("0600")
|
|
17966
17966
|
], Pa);
|
|
17967
|
-
var
|
|
17967
|
+
var Ue, hi;
|
|
17968
17968
|
class af extends Map {
|
|
17969
17969
|
constructor(e) {
|
|
17970
17970
|
const {
|
|
@@ -17973,54 +17973,54 @@ class af extends Map {
|
|
|
17973
17973
|
onClearEvent: n
|
|
17974
17974
|
} = e;
|
|
17975
17975
|
super();
|
|
17976
|
-
f(this,
|
|
17976
|
+
f(this, Ue, void 0);
|
|
17977
17977
|
f(this, hi, void 0);
|
|
17978
17978
|
p(this, "onAddEvent");
|
|
17979
17979
|
p(this, "onDeleteEvent");
|
|
17980
17980
|
p(this, "onClearEvent");
|
|
17981
|
-
v(this,
|
|
17981
|
+
v(this, Ue, new Ra()), this.onAddEvent = r, this.onDeleteEvent = i, this.onClearEvent = n, v(this, hi, /* @__PURE__ */ new Map());
|
|
17982
17982
|
}
|
|
17983
17983
|
emit(e, ...r) {
|
|
17984
|
-
return a(this,
|
|
17984
|
+
return a(this, Ue).emit(e, ...r);
|
|
17985
17985
|
}
|
|
17986
17986
|
on(e, r) {
|
|
17987
|
-
return a(this,
|
|
17987
|
+
return a(this, Ue).on(e, r);
|
|
17988
17988
|
}
|
|
17989
17989
|
addListener(e, r) {
|
|
17990
|
-
return a(this,
|
|
17990
|
+
return a(this, Ue).addListener(e, r);
|
|
17991
17991
|
}
|
|
17992
17992
|
off(e, r) {
|
|
17993
|
-
return a(this,
|
|
17993
|
+
return a(this, Ue).off(e, r);
|
|
17994
17994
|
}
|
|
17995
17995
|
once(e, r) {
|
|
17996
|
-
return a(this,
|
|
17996
|
+
return a(this, Ue).once(e, r);
|
|
17997
17997
|
}
|
|
17998
17998
|
prependListener(e, r) {
|
|
17999
|
-
return a(this,
|
|
17999
|
+
return a(this, Ue).prependListener(e, r);
|
|
18000
18000
|
}
|
|
18001
18001
|
prependOnceListener(e, r) {
|
|
18002
|
-
return a(this,
|
|
18002
|
+
return a(this, Ue).prependOnceListener(e, r);
|
|
18003
18003
|
}
|
|
18004
18004
|
removeListener(e, r) {
|
|
18005
|
-
return a(this,
|
|
18005
|
+
return a(this, Ue).removeListener(e, r);
|
|
18006
18006
|
}
|
|
18007
18007
|
removeAllListeners(e) {
|
|
18008
|
-
return a(this,
|
|
18008
|
+
return a(this, Ue).removeAllListeners(e);
|
|
18009
18009
|
}
|
|
18010
18010
|
listeners(e) {
|
|
18011
|
-
return a(this,
|
|
18011
|
+
return a(this, Ue).listeners(e);
|
|
18012
18012
|
}
|
|
18013
18013
|
listenerCount(e) {
|
|
18014
|
-
return a(this,
|
|
18014
|
+
return a(this, Ue).listenerCount(e);
|
|
18015
18015
|
}
|
|
18016
18016
|
getMaxListeners() {
|
|
18017
|
-
return a(this,
|
|
18017
|
+
return a(this, Ue).getMaxListeners();
|
|
18018
18018
|
}
|
|
18019
18019
|
setMaxListeners(e) {
|
|
18020
|
-
return a(this,
|
|
18020
|
+
return a(this, Ue).setMaxListeners(e);
|
|
18021
18021
|
}
|
|
18022
18022
|
eventNames() {
|
|
18023
|
-
return a(this,
|
|
18023
|
+
return a(this, Ue).eventNames();
|
|
18024
18024
|
}
|
|
18025
18025
|
add(e, r = true) {
|
|
18026
18026
|
return this.set(e.id, e, r);
|
|
@@ -18029,7 +18029,7 @@ class af extends Map {
|
|
|
18029
18029
|
const n = super.set(e, r), o = (c, ...d) => {
|
|
18030
18030
|
this.emit(c, r, ...d);
|
|
18031
18031
|
};
|
|
18032
|
-
return a(this, hi).set(e, o), r.on("*", o), i && a(this,
|
|
18032
|
+
return a(this, hi).set(e, o), r.on("*", o), i && a(this, Ue).emit(this.onAddEvent, r), n;
|
|
18033
18033
|
}
|
|
18034
18034
|
delete(e, r = true, i = false) {
|
|
18035
18035
|
const n = this.get(e);
|
|
@@ -18037,20 +18037,20 @@ class af extends Map {
|
|
|
18037
18037
|
return false;
|
|
18038
18038
|
n.removeListener("*", a(this, hi).get(e));
|
|
18039
18039
|
const o = super.delete(e);
|
|
18040
|
-
return i && n.removeAllListeners(), r && a(this,
|
|
18040
|
+
return i && n.removeAllListeners(), r && a(this, Ue).emit(this.onDeleteEvent, n), o;
|
|
18041
18041
|
}
|
|
18042
18042
|
clear(e = true, r = false) {
|
|
18043
18043
|
this.forEach((n) => {
|
|
18044
18044
|
n.removeListener("*", a(this, hi).get(n.id)), r && n.removeAllListeners();
|
|
18045
18045
|
});
|
|
18046
18046
|
const i = super.clear();
|
|
18047
|
-
return e && a(this,
|
|
18047
|
+
return e && a(this, Ue).emit(this.onClearEvent), i;
|
|
18048
18048
|
}
|
|
18049
18049
|
toArray() {
|
|
18050
18050
|
return Array.from(this.values());
|
|
18051
18051
|
}
|
|
18052
18052
|
}
|
|
18053
|
-
|
|
18053
|
+
Ue = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap();
|
|
18054
18054
|
class Hp extends af {
|
|
18055
18055
|
constructor() {
|
|
18056
18056
|
super({
|
|
@@ -18084,14 +18084,14 @@ var cM = Object.defineProperty, dM = Object.getOwnPropertyDescriptor, Pl = (s, t
|
|
|
18084
18084
|
for (var i = r > 1 ? void 0 : r ? dM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18085
18085
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18086
18086
|
return r && i && cM(t, e, i), i;
|
|
18087
|
-
}, Wt,
|
|
18087
|
+
}, Wt, Mn, ko, lm;
|
|
18088
18088
|
const of = (lm = class {
|
|
18089
18089
|
constructor(s, t, e, r) {
|
|
18090
18090
|
p(this, "plugins");
|
|
18091
18091
|
f(this, Wt, void 0);
|
|
18092
|
-
f(this,
|
|
18092
|
+
f(this, Mn, void 0);
|
|
18093
18093
|
f(this, ko, void 0);
|
|
18094
|
-
v(this, Wt, t), v(this,
|
|
18094
|
+
v(this, Wt, t), v(this, Mn, e), v(this, ko, s), this.plugins = r, this.setupEvents();
|
|
18095
18095
|
}
|
|
18096
18096
|
static init(s, t, e, r, i, n, o, c) {
|
|
18097
18097
|
return u(this, null, function* () {
|
|
@@ -18252,34 +18252,34 @@ const of = (lm = class {
|
|
|
18252
18252
|
storeName: s.storeName
|
|
18253
18253
|
});
|
|
18254
18254
|
})
|
|
18255
|
-
), a(this,
|
|
18255
|
+
), a(this, Mn).on(
|
|
18256
18256
|
Ie.sendMessageToPeers,
|
|
18257
18257
|
(s) => {
|
|
18258
18258
|
const t = fs == null ? void 0 : fs.formatSocketServiceMessage(
|
|
18259
18259
|
s.message
|
|
18260
18260
|
);
|
|
18261
|
-
this.broadcastIframeEvent(
|
|
18261
|
+
this.broadcastIframeEvent(Oe.chatMessage, { message: t });
|
|
18262
18262
|
}
|
|
18263
|
-
), a(this,
|
|
18263
|
+
), a(this, Mn).on(
|
|
18264
18264
|
Ie.sendMessageToRoom,
|
|
18265
18265
|
(s) => {
|
|
18266
18266
|
const t = fs == null ? void 0 : fs.formatSocketServiceMessage(
|
|
18267
18267
|
s.message
|
|
18268
18268
|
);
|
|
18269
|
-
this.broadcastIframeEvent(
|
|
18269
|
+
this.broadcastIframeEvent(Oe.chatMessage, { message: t });
|
|
18270
18270
|
}
|
|
18271
18271
|
), k.on(I.PEER_JOINED_INTERNAL, (s) => {
|
|
18272
18272
|
const t = cd(s);
|
|
18273
|
-
this.broadcastIframeEvent(
|
|
18273
|
+
this.broadcastIframeEvent(Oe.peerJoined, t);
|
|
18274
18274
|
}), k.on(I.PEER_CLOSED, (s) => {
|
|
18275
|
-
this.broadcastIframeEvent(
|
|
18275
|
+
this.broadcastIframeEvent(Oe.peerLeft, s);
|
|
18276
18276
|
}), k.on(I.UPDATE_PEER_STAGE_STATUS, (s) => {
|
|
18277
|
-
this.broadcastIframeEvent(
|
|
18277
|
+
this.broadcastIframeEvent(Oe.peerStageStatusUpdate, s);
|
|
18278
18278
|
}), a(this, ko).subscribe("stageStatus", (s) => {
|
|
18279
|
-
this.broadcastIframeEvent(
|
|
18279
|
+
this.broadcastIframeEvent(Oe.stageStatusUpdate, s);
|
|
18280
18280
|
});
|
|
18281
18281
|
}
|
|
18282
|
-
}, Wt = /* @__PURE__ */ new WeakMap(),
|
|
18282
|
+
}, Wt = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), lm);
|
|
18283
18283
|
let _c = of;
|
|
18284
18284
|
Pl([
|
|
18285
18285
|
y.trace("PluginController.getRoomPlugins")
|
|
@@ -18370,16 +18370,16 @@ var uM = Object.defineProperty, hM = Object.getOwnPropertyDescriptor, Pc = (s, t
|
|
|
18370
18370
|
for (var i = r > 1 ? void 0 : r ? hM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18371
18371
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18372
18372
|
return r && i && uM(t, e, i), i;
|
|
18373
|
-
},
|
|
18374
|
-
let
|
|
18373
|
+
}, Dn, Io, On, Wc, um;
|
|
18374
|
+
let ji = (um = class extends Ut {
|
|
18375
18375
|
constructor(t, e) {
|
|
18376
18376
|
super();
|
|
18377
|
-
f(this,
|
|
18378
|
-
f(this,
|
|
18377
|
+
f(this, On);
|
|
18378
|
+
f(this, Dn, void 0);
|
|
18379
18379
|
f(this, Io, void 0);
|
|
18380
18380
|
p(this, "recordingPeerIds", []);
|
|
18381
18381
|
p(this, "recordings", []);
|
|
18382
|
-
v(this, Io, t), v(this,
|
|
18382
|
+
v(this, Io, t), v(this, Dn, e);
|
|
18383
18383
|
}
|
|
18384
18384
|
get recordingState() {
|
|
18385
18385
|
return this.recordings.some((t) => t.state === "RECORDING") ? "RECORDING" : this.recordings.some((t) => t.state === "PAUSED") ? "PAUSED" : this.recordings.some((t) => t.state === "STARTING") ? "STARTING" : this.recordings.some((t) => t.state === "STOPPING") ? "STOPPING" : "IDLE";
|
|
@@ -18389,7 +18389,7 @@ let qi = (um = class extends Ut {
|
|
|
18389
18389
|
}
|
|
18390
18390
|
start(t) {
|
|
18391
18391
|
return u(this, null, function* () {
|
|
18392
|
-
if (!a(this,
|
|
18392
|
+
if (!a(this, Dn).permissions.canRecord)
|
|
18393
18393
|
throw l.error("DyteRecording::start::permission_denied"), new w("User does not have permission to start recording", "1001");
|
|
18394
18394
|
if ((t == null ? void 0 : t.allowMultiple) !== true && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))
|
|
18395
18395
|
throw l.error("DyteRecording::start::recording_in_progress", {
|
|
@@ -18416,22 +18416,22 @@ let qi = (um = class extends Ut {
|
|
|
18416
18416
|
}
|
|
18417
18417
|
stop(t) {
|
|
18418
18418
|
return u(this, null, function* () {
|
|
18419
|
-
yield x(this,
|
|
18419
|
+
yield x(this, On, Wc).call(this, "stop", ["RECORDING", "PAUSED"], t);
|
|
18420
18420
|
});
|
|
18421
18421
|
}
|
|
18422
18422
|
pause(t) {
|
|
18423
18423
|
return u(this, null, function* () {
|
|
18424
|
-
yield x(this,
|
|
18424
|
+
yield x(this, On, Wc).call(this, "pause", ["RECORDING"], t);
|
|
18425
18425
|
});
|
|
18426
18426
|
}
|
|
18427
18427
|
resume(t) {
|
|
18428
18428
|
return u(this, null, function* () {
|
|
18429
|
-
yield x(this,
|
|
18429
|
+
yield x(this, On, Wc).call(this, "resume", ["PAUSED"], t);
|
|
18430
18430
|
});
|
|
18431
18431
|
}
|
|
18432
|
-
},
|
|
18432
|
+
}, Dn = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakSet(), Wc = function(t, e, r) {
|
|
18433
18433
|
return u(this, null, function* () {
|
|
18434
|
-
if (!a(this,
|
|
18434
|
+
if (!a(this, Dn).permissions.canRecord)
|
|
18435
18435
|
throw l.error("DyteRecording::stop::permission_denied"), new w("User does not have permission to stop recording", "1001");
|
|
18436
18436
|
let i = [];
|
|
18437
18437
|
if (r !== void 0) {
|
|
@@ -18464,19 +18464,19 @@ let qi = (um = class extends Ut {
|
|
|
18464
18464
|
}, um);
|
|
18465
18465
|
Pc([
|
|
18466
18466
|
y.trace("DyteRecording.start")
|
|
18467
|
-
],
|
|
18467
|
+
], ji.prototype, "start", 1);
|
|
18468
18468
|
Pc([
|
|
18469
18469
|
y.trace("DyteRecording.stop")
|
|
18470
|
-
],
|
|
18470
|
+
], ji.prototype, "stop", 1);
|
|
18471
18471
|
Pc([
|
|
18472
18472
|
y.trace("DyteRecording.stop")
|
|
18473
|
-
],
|
|
18473
|
+
], ji.prototype, "pause", 1);
|
|
18474
18474
|
Pc([
|
|
18475
18475
|
y.trace("DyteRecording.stop")
|
|
18476
|
-
],
|
|
18477
|
-
|
|
18476
|
+
], ji.prototype, "resume", 1);
|
|
18477
|
+
ji = Pc([
|
|
18478
18478
|
ut("1000")
|
|
18479
|
-
],
|
|
18479
|
+
], ji);
|
|
18480
18480
|
var pM = Object.defineProperty, mM = Object.getOwnPropertyDescriptor, gM = (s, t, e, r) => {
|
|
18481
18481
|
for (var i = r > 1 ? void 0 : r ? mM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18482
18482
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -18487,18 +18487,18 @@ class cf {
|
|
|
18487
18487
|
p(this, "recording");
|
|
18488
18488
|
p(this, "room");
|
|
18489
18489
|
f(this, Pd, void 0);
|
|
18490
|
-
v(this, Pd, t), this.recording = new
|
|
18490
|
+
v(this, Pd, t), this.recording = new ji(t, e), this.room = r, this.setupEvents();
|
|
18491
18491
|
}
|
|
18492
18492
|
getRecordingTypeFromProtoType(t) {
|
|
18493
18493
|
let e;
|
|
18494
18494
|
switch (t) {
|
|
18495
|
-
case
|
|
18495
|
+
case Bi.BROWSER:
|
|
18496
18496
|
e = "BROWSER";
|
|
18497
18497
|
break;
|
|
18498
|
-
case
|
|
18498
|
+
case Bi.COMPOSITE:
|
|
18499
18499
|
e = "COMPOSITE";
|
|
18500
18500
|
break;
|
|
18501
|
-
case
|
|
18501
|
+
case Bi.TRACK:
|
|
18502
18502
|
e = "TRACK";
|
|
18503
18503
|
break;
|
|
18504
18504
|
default:
|
|
@@ -19153,7 +19153,7 @@ const qp = {
|
|
|
19153
19153
|
}), e[n][1];
|
|
19154
19154
|
};
|
|
19155
19155
|
var fe = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(fe || {});
|
|
19156
|
-
const CM = c_(),
|
|
19156
|
+
const CM = c_(), Zi = vs(
|
|
19157
19157
|
CM.config.media
|
|
19158
19158
|
);
|
|
19159
19159
|
function RM(s) {
|
|
@@ -19277,15 +19277,15 @@ var kM = Object.defineProperty, IM = Object.getOwnPropertyDescriptor, _s = (s, t
|
|
|
19277
19277
|
for (var i = r > 1 ? void 0 : r ? IM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
19278
19278
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
19279
19279
|
return r && i && kM(t, e, i), i;
|
|
19280
|
-
},
|
|
19280
|
+
}, Nn, Kt, wd, hm;
|
|
19281
19281
|
let xt = (hm = class extends bM {
|
|
19282
19282
|
constructor(t, e) {
|
|
19283
19283
|
super();
|
|
19284
19284
|
p(this, "availableDevices");
|
|
19285
|
-
f(this,
|
|
19285
|
+
f(this, Nn, void 0);
|
|
19286
19286
|
f(this, Kt, void 0);
|
|
19287
19287
|
f(this, wd, void 0);
|
|
19288
|
-
v(this, wd, t), v(this, Kt, new wM(t, e)), v(this,
|
|
19288
|
+
v(this, wd, t), v(this, Kt, new wM(t, e)), v(this, Nn, new AbortController()), this.availableDevices = [], this.getAvailableDevices();
|
|
19289
19289
|
}
|
|
19290
19290
|
get constraintsBuilder() {
|
|
19291
19291
|
return a(this, Kt);
|
|
@@ -19293,7 +19293,7 @@ let xt = (hm = class extends bM {
|
|
|
19293
19293
|
destruct() {
|
|
19294
19294
|
return u(this, null, function* () {
|
|
19295
19295
|
var t;
|
|
19296
|
-
(t = a(this,
|
|
19296
|
+
(t = a(this, Nn)) == null || t.abort();
|
|
19297
19297
|
});
|
|
19298
19298
|
}
|
|
19299
19299
|
handlePermissionErrors(t, e) {
|
|
@@ -19565,11 +19565,11 @@ let xt = (hm = class extends bM {
|
|
|
19565
19565
|
g.some((T) => T.kind === "audioinput") && W.devices("AUDIO", o == null ? void 0 : o.filter((T) => T.kind === "audioinput")), g.some((T) => T.kind === "videoinput") && W.devices("VIDEO", o == null ? void 0 : o.filter((T) => T.kind === "videoinput")), g.some((T) => T.kind === "audiooutput") && W.devices("SPEAKER", o == null ? void 0 : o.filter((T) => T.kind === "audiooutput")), t(e, d, false);
|
|
19566
19566
|
}
|
|
19567
19567
|
}),
|
|
19568
|
-
{ signal: a(this,
|
|
19568
|
+
{ signal: a(this, Nn).signal }
|
|
19569
19569
|
);
|
|
19570
19570
|
});
|
|
19571
19571
|
}
|
|
19572
|
-
},
|
|
19572
|
+
}, Nn = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), wd = /* @__PURE__ */ new WeakMap(), hm);
|
|
19573
19573
|
_s([
|
|
19574
19574
|
y.trace("WebMediaInterface.destruct")
|
|
19575
19575
|
], xt.prototype, "destruct", 1);
|
|
@@ -20029,20 +20029,20 @@ fh([
|
|
|
20029
20029
|
y.trace("AudioMediaHandler.conditionallyChangeTrack")
|
|
20030
20030
|
], Cl.prototype, "conditionallyChangeTrack", 1);
|
|
20031
20031
|
const FM = Cl;
|
|
20032
|
-
var
|
|
20032
|
+
var Ln;
|
|
20033
20033
|
class BM {
|
|
20034
20034
|
constructor(t) {
|
|
20035
|
-
f(this,
|
|
20035
|
+
f(this, Ln, void 0);
|
|
20036
20036
|
p(this, "currentDevice");
|
|
20037
|
-
v(this,
|
|
20037
|
+
v(this, Ln, t);
|
|
20038
20038
|
}
|
|
20039
20039
|
setupSpeaker(t) {
|
|
20040
20040
|
return u(this, null, function* () {
|
|
20041
20041
|
var i, n;
|
|
20042
|
-
if (!(a(this,
|
|
20042
|
+
if (!(a(this, Ln) instanceof df))
|
|
20043
20043
|
return;
|
|
20044
20044
|
let e = t;
|
|
20045
|
-
if (t || ([e] = (yield a(this,
|
|
20045
|
+
if (t || ([e] = (yield a(this, Ln).getAvailableDevicesByKind(
|
|
20046
20046
|
"audiooutput"
|
|
20047
20047
|
)).filter((c) => !Cu(c))), !e)
|
|
20048
20048
|
throw new w("No speaker found", "1608");
|
|
@@ -20060,7 +20060,7 @@ class BM {
|
|
|
20060
20060
|
});
|
|
20061
20061
|
}
|
|
20062
20062
|
}
|
|
20063
|
-
|
|
20063
|
+
Ln = /* @__PURE__ */ new WeakMap();
|
|
20064
20064
|
const HM = BM;
|
|
20065
20065
|
class qM extends Ra {
|
|
20066
20066
|
constructor(e) {
|
|
@@ -20133,15 +20133,15 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, Rl = (s, t
|
|
|
20133
20133
|
for (var i = r > 1 ? void 0 : r ? WM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20134
20134
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20135
20135
|
return r && i && GM(t, e, i), i;
|
|
20136
|
-
},
|
|
20136
|
+
}, Vn, Mo;
|
|
20137
20137
|
class Cc extends uf {
|
|
20138
20138
|
constructor(e, r, i) {
|
|
20139
20139
|
super(e, r, i);
|
|
20140
|
-
f(this,
|
|
20140
|
+
f(this, Vn, void 0);
|
|
20141
20141
|
f(this, Mo, {
|
|
20142
20142
|
disablePerFrameCanvasRendering: false
|
|
20143
20143
|
});
|
|
20144
|
-
v(this,
|
|
20144
|
+
v(this, Vn, new EM());
|
|
20145
20145
|
}
|
|
20146
20146
|
onSetDevice(e) {
|
|
20147
20147
|
return u(this, null, function* () {
|
|
@@ -20199,7 +20199,7 @@ class Cc extends uf {
|
|
|
20199
20199
|
return;
|
|
20200
20200
|
}
|
|
20201
20201
|
try {
|
|
20202
|
-
this.transformedMediaTrack = yield a(this,
|
|
20202
|
+
this.transformedMediaTrack = yield a(this, Vn).getTransformedVideoTrack(
|
|
20203
20203
|
this.middlewares,
|
|
20204
20204
|
this.mediaTrack,
|
|
20205
20205
|
a(this, Mo)
|
|
@@ -20235,7 +20235,7 @@ class Cc extends uf {
|
|
|
20235
20235
|
});
|
|
20236
20236
|
}
|
|
20237
20237
|
terminateMiddlewareWebWorker() {
|
|
20238
|
-
a(this,
|
|
20238
|
+
a(this, Vn).terminateMiddlewareWebWorker();
|
|
20239
20239
|
}
|
|
20240
20240
|
onTrackEnded() {
|
|
20241
20241
|
return u(this, null, function* () {
|
|
@@ -20259,7 +20259,7 @@ class Cc extends uf {
|
|
|
20259
20259
|
});
|
|
20260
20260
|
}
|
|
20261
20261
|
}
|
|
20262
|
-
|
|
20262
|
+
Vn = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap();
|
|
20263
20263
|
Rl([
|
|
20264
20264
|
y.trace("VideoMediaHandler.setTransformedTrack")
|
|
20265
20265
|
], Cc.prototype, "setTransformedTrack", 1);
|
|
@@ -20275,25 +20275,25 @@ Rl([
|
|
|
20275
20275
|
const JM = Cc, Wp = vs(
|
|
20276
20276
|
nh()
|
|
20277
20277
|
);
|
|
20278
|
-
var Ct, gi, Do,
|
|
20279
|
-
const
|
|
20278
|
+
var Ct, gi, Do, xn;
|
|
20279
|
+
const on = class {
|
|
20280
20280
|
constructor(t) {
|
|
20281
20281
|
f(this, Ct, void 0);
|
|
20282
20282
|
f(this, gi, void 0);
|
|
20283
20283
|
f(this, Do, void 0);
|
|
20284
|
-
f(this,
|
|
20284
|
+
f(this, xn, void 0);
|
|
20285
20285
|
if (!t)
|
|
20286
20286
|
throw new w("Could not load preset.", "0904");
|
|
20287
|
-
v(this, Ct, t.config), v(this, Do, t.name), v(this, gi, t.ui || vs(nh().ui)), v(this,
|
|
20287
|
+
v(this, Ct, t.config), v(this, Do, t.name), v(this, gi, t.ui || vs(nh().ui)), v(this, xn, t.permissions.plugins.config);
|
|
20288
20288
|
}
|
|
20289
20289
|
static fromResponse(t) {
|
|
20290
|
-
return new
|
|
20290
|
+
return new on(t);
|
|
20291
20291
|
}
|
|
20292
20292
|
static default() {
|
|
20293
|
-
return new
|
|
20293
|
+
return new on(Wp);
|
|
20294
20294
|
}
|
|
20295
20295
|
static init(t, e = true) {
|
|
20296
|
-
return !t || e ? new
|
|
20296
|
+
return !t || e ? new on(Wp) : new on(t);
|
|
20297
20297
|
}
|
|
20298
20298
|
get setupScreen() {
|
|
20299
20299
|
return {
|
|
@@ -20352,7 +20352,7 @@ const an = class {
|
|
|
20352
20352
|
return [];
|
|
20353
20353
|
}
|
|
20354
20354
|
get disabledPlugins() {
|
|
20355
|
-
return Object.keys(a(this,
|
|
20355
|
+
return Object.keys(a(this, xn)).filter((t) => a(this, xn)[t].disabled);
|
|
20356
20356
|
}
|
|
20357
20357
|
get designTokens() {
|
|
20358
20358
|
return a(this, gi).designTokens;
|
|
@@ -20364,16 +20364,16 @@ const an = class {
|
|
|
20364
20364
|
var t, e, r, i, n, o, c, d, h, m, g, T, _, P, A, C, L, H, B, F, Q, X, oe, et;
|
|
20365
20365
|
return {
|
|
20366
20366
|
audio: {
|
|
20367
|
-
enableStereo: (i = (r = (e = (t = a(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i :
|
|
20368
|
-
enableHighBitrate: (d = (c = (o = (n = a(this, Ct)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d :
|
|
20367
|
+
enableStereo: (i = (r = (e = (t = a(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Zi.audio.enableStereo,
|
|
20368
|
+
enableHighBitrate: (d = (c = (o = (n = a(this, Ct)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Zi.audio.enableHighBitrate
|
|
20369
20369
|
},
|
|
20370
20370
|
video: {
|
|
20371
|
-
quality: (T = (g = (m = (h = a(this, Ct)) == null ? void 0 : h.media) == null ? void 0 : m.video) == null ? void 0 : g.quality) != null ? T :
|
|
20372
|
-
frameRate: (C = (A = (P = (_ = a(this, Ct)) == null ? void 0 : _.media) == null ? void 0 : P.video) == null ? void 0 : A.frameRate) != null ? C :
|
|
20371
|
+
quality: (T = (g = (m = (h = a(this, Ct)) == null ? void 0 : h.media) == null ? void 0 : m.video) == null ? void 0 : g.quality) != null ? T : Zi.video.quality,
|
|
20372
|
+
frameRate: (C = (A = (P = (_ = a(this, Ct)) == null ? void 0 : _.media) == null ? void 0 : P.video) == null ? void 0 : A.frameRate) != null ? C : Zi.video.frameRate
|
|
20373
20373
|
},
|
|
20374
20374
|
screenshare: {
|
|
20375
|
-
quality: (F = (B = (H = (L = a(this, Ct)) == null ? void 0 : L.media) == null ? void 0 : H.screenshare) == null ? void 0 : B.quality) != null ? F :
|
|
20376
|
-
frameRate: (et = (oe = (X = (Q = a(this, Ct)) == null ? void 0 : Q.media) == null ? void 0 : X.screenshare) == null ? void 0 : oe.frameRate) != null ? et :
|
|
20375
|
+
quality: (F = (B = (H = (L = a(this, Ct)) == null ? void 0 : L.media) == null ? void 0 : H.screenshare) == null ? void 0 : B.quality) != null ? F : Zi.screenshare.quality,
|
|
20376
|
+
frameRate: (et = (oe = (X = (Q = a(this, Ct)) == null ? void 0 : Q.media) == null ? void 0 : X.screenshare) == null ? void 0 : oe.frameRate) != null ? et : Zi.screenshare.frameRate
|
|
20377
20377
|
}
|
|
20378
20378
|
};
|
|
20379
20379
|
}
|
|
@@ -20381,22 +20381,22 @@ const an = class {
|
|
|
20381
20381
|
return a(this, Do);
|
|
20382
20382
|
}
|
|
20383
20383
|
};
|
|
20384
|
-
let Ru =
|
|
20385
|
-
Ct = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(),
|
|
20384
|
+
let Ru = on;
|
|
20385
|
+
Ct = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap();
|
|
20386
20386
|
var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, hf = (s, t, e, r) => {
|
|
20387
20387
|
for (var i = r > 1 ? void 0 : r ? zM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20388
20388
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20389
20389
|
return r && i && KM(t, e, i), i;
|
|
20390
|
-
},
|
|
20390
|
+
}, Un;
|
|
20391
20391
|
class vh extends Ut {
|
|
20392
20392
|
constructor(e) {
|
|
20393
20393
|
super();
|
|
20394
|
-
f(this,
|
|
20394
|
+
f(this, Un, void 0);
|
|
20395
20395
|
p(this, "state", "IDLE");
|
|
20396
20396
|
p(this, "playbackUrl");
|
|
20397
20397
|
p(this, "ingestionCredentials");
|
|
20398
20398
|
p(this, "viewerCount");
|
|
20399
|
-
v(this,
|
|
20399
|
+
v(this, Un, e), this.viewerCount = 0;
|
|
20400
20400
|
}
|
|
20401
20401
|
setLivestreamState(e) {
|
|
20402
20402
|
const r = this.state;
|
|
@@ -20409,7 +20409,7 @@ class vh extends Ut {
|
|
|
20409
20409
|
return u(this, arguments, function* (e = {
|
|
20410
20410
|
manualIngestion: false
|
|
20411
20411
|
}) {
|
|
20412
|
-
if (!a(this,
|
|
20412
|
+
if (!a(this, Un).permissions.canLivestream)
|
|
20413
20413
|
throw l.error("DyteLivestream::start::permission_denied"), new w(
|
|
20414
20414
|
"User does not have permission to start livestreaming",
|
|
20415
20415
|
"1901"
|
|
@@ -20430,7 +20430,7 @@ class vh extends Ut {
|
|
|
20430
20430
|
}
|
|
20431
20431
|
stop() {
|
|
20432
20432
|
return u(this, null, function* () {
|
|
20433
|
-
if (!a(this,
|
|
20433
|
+
if (!a(this, Un).permissions.canLivestream)
|
|
20434
20434
|
throw l.error("DyteLivestream::stop::permission_denied"), new w(
|
|
20435
20435
|
"User does not have permission to stop livestreaming",
|
|
20436
20436
|
"1901"
|
|
@@ -20447,7 +20447,7 @@ class vh extends Ut {
|
|
|
20447
20447
|
});
|
|
20448
20448
|
}
|
|
20449
20449
|
}
|
|
20450
|
-
|
|
20450
|
+
Un = /* @__PURE__ */ new WeakMap();
|
|
20451
20451
|
hf([
|
|
20452
20452
|
y.trace("livestream.start")
|
|
20453
20453
|
], vh.prototype, "start", 1);
|
|
@@ -20458,14 +20458,14 @@ var YM = Object.defineProperty, QM = Object.getOwnPropertyDescriptor, XM = (s, t
|
|
|
20458
20458
|
for (var i = r > 1 ? void 0 : r ? QM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20459
20459
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20460
20460
|
return r && i && YM(t, e, i), i;
|
|
20461
|
-
},
|
|
20461
|
+
}, $n, Fn, js;
|
|
20462
20462
|
class pf {
|
|
20463
20463
|
constructor(t, e) {
|
|
20464
20464
|
p(this, "livestream");
|
|
20465
|
-
f(this, Un, void 0);
|
|
20466
20465
|
f(this, $n, void 0);
|
|
20466
|
+
f(this, Fn, void 0);
|
|
20467
20467
|
f(this, js, void 0);
|
|
20468
|
-
v(this,
|
|
20468
|
+
v(this, Fn, t), this.livestream = new vh(t), v(this, js, e), this.setupEvents();
|
|
20469
20469
|
}
|
|
20470
20470
|
fetchInitialLivestreamingState() {
|
|
20471
20471
|
return u(this, null, function* () {
|
|
@@ -20484,7 +20484,7 @@ class pf {
|
|
|
20484
20484
|
(t) => u(this, null, function* () {
|
|
20485
20485
|
this.livestream.playbackUrl = t.playbackUrl, this.livestream.setLivestreamState("LIVESTREAMING");
|
|
20486
20486
|
try {
|
|
20487
|
-
a(this,
|
|
20487
|
+
a(this, Fn).permissions.canLivestream && (yield this.fetchInitialLivestreamingState());
|
|
20488
20488
|
} catch (e) {
|
|
20489
20489
|
l.error("Error: LivestreamController.fetchLivestream during startedLivestream re-fetch");
|
|
20490
20490
|
}
|
|
@@ -20495,7 +20495,7 @@ class pf {
|
|
|
20495
20495
|
if (t.manualIngest) {
|
|
20496
20496
|
this.livestream.setLivestreamState("WAITING_ON_MANUAL_INGESTION");
|
|
20497
20497
|
try {
|
|
20498
|
-
a(this,
|
|
20498
|
+
a(this, Fn).permissions.canLivestream && (yield this.fetchInitialLivestreamingState());
|
|
20499
20499
|
} catch (e) {
|
|
20500
20500
|
l.error("Error: LivestreamController.fetchLivestream during livestreamingInvoked re-fetch");
|
|
20501
20501
|
}
|
|
@@ -20514,10 +20514,10 @@ class pf {
|
|
|
20514
20514
|
I.PEER_JOINED_INTERNAL,
|
|
20515
20515
|
(t) => u(this, null, function* () {
|
|
20516
20516
|
var e;
|
|
20517
|
-
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === true && t.recorderType === "LIVESTREAMER" && (v(this,
|
|
20517
|
+
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === true && t.recorderType === "LIVESTREAMER" && (v(this, $n, t.id), this.livestream.setLivestreamState("LIVESTREAMING"));
|
|
20518
20518
|
})
|
|
20519
20519
|
), k.on(I.PEER_CLOSED, (t) => {
|
|
20520
|
-
t.id === a(this,
|
|
20520
|
+
t.id === a(this, $n) && (v(this, $n, void 0), this.livestream.setLivestreamState("IDLE"));
|
|
20521
20521
|
}), k.onAsync(I.LEAVE_MEDIA_ROOM, () => u(this, null, function* () {
|
|
20522
20522
|
this.livestream.playbackUrl || (l.info("Fetching livestreaming state on leave stage"), yield this.fetchInitialLivestreamingState());
|
|
20523
20523
|
})), k.on(I.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
|
|
@@ -20529,7 +20529,7 @@ class pf {
|
|
|
20529
20529
|
}));
|
|
20530
20530
|
}
|
|
20531
20531
|
}
|
|
20532
|
-
|
|
20532
|
+
$n = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap();
|
|
20533
20533
|
XM([
|
|
20534
20534
|
y.trace("LivestreamController.setupEvents")
|
|
20535
20535
|
], pf.prototype, "setupEvents", 1);
|
|
@@ -20780,7 +20780,7 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, Ia = (s, t
|
|
|
20780
20780
|
return r && i && s0(t, e, i), i;
|
|
20781
20781
|
};
|
|
20782
20782
|
const i0 = 0.8, n0 = 1.2;
|
|
20783
|
-
var
|
|
20783
|
+
var Bn, Hn, wr, Ti, Xa, yi, Za, Id, ff, Gs, Lo, br, Si, eo, Ws, Ad, Vo, bu, pm;
|
|
20784
20784
|
let cr = (pm = class extends Ut {
|
|
20785
20785
|
constructor(t, e, r, i) {
|
|
20786
20786
|
super();
|
|
@@ -20805,9 +20805,9 @@ let cr = (pm = class extends Ut {
|
|
|
20805
20805
|
p(this, "screenShareEnabled");
|
|
20806
20806
|
p(this, "producers");
|
|
20807
20807
|
p(this, "manualProducerConfig");
|
|
20808
|
-
f(this, Fn, void 0);
|
|
20809
|
-
p(this, "supportsRemoteControl", false);
|
|
20810
20808
|
f(this, Bn, void 0);
|
|
20809
|
+
p(this, "supportsRemoteControl", false);
|
|
20810
|
+
f(this, Hn, void 0);
|
|
20811
20811
|
p(this, "presetName");
|
|
20812
20812
|
f(this, wr, void 0);
|
|
20813
20813
|
f(this, Gs, void 0);
|
|
@@ -20848,16 +20848,16 @@ let cr = (pm = class extends Ut {
|
|
|
20848
20848
|
producers: B,
|
|
20849
20849
|
metadata: F
|
|
20850
20850
|
} = e;
|
|
20851
|
-
this.id = n, this.userId = o, this.name = c, this.device = d, this.picture = h, this.isHost = m, this.flags = g, this.manualProducerConfig = FP, v(this,
|
|
20851
|
+
this.id = n, this.userId = o, this.name = c, this.device = d, this.picture = h, this.isHost = m, this.flags = g, this.manualProducerConfig = FP, v(this, Hn, _ != null ? _ : "ON_STAGE"), this.customParticipantId = P != null ? P : T, this.audioEnabled = !A, this.audioTrack = C, this.videoEnabled = L, this.videoTrack = H, this.screenShareTracks = {
|
|
20852
20852
|
audio: void 0,
|
|
20853
20853
|
video: void 0
|
|
20854
|
-
}, this.producers = B != null ? B : [], this.presetName = F == null ? void 0 : F.preset_name, v(this,
|
|
20854
|
+
}, this.producers = B != null ? B : [], this.presetName = F == null ? void 0 : F.preset_name, v(this, Bn, false), v(this, Gs, r), v(this, Lo, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), x(this, Vo, bu).call(this);
|
|
20855
20855
|
}
|
|
20856
20856
|
get clientSpecificId() {
|
|
20857
20857
|
return this.customParticipantId;
|
|
20858
20858
|
}
|
|
20859
20859
|
get stageStatus() {
|
|
20860
|
-
return a(this,
|
|
20860
|
+
return a(this, Hn);
|
|
20861
20861
|
}
|
|
20862
20862
|
setVideoEnabled(t, e = true) {
|
|
20863
20863
|
this.videoEnabled = t, e && (l.info("DyteParticipant::setVideoEnabled::videoUpdate", O({}, ri(this))), this.emit("videoUpdate", {
|
|
@@ -20900,7 +20900,7 @@ let cr = (pm = class extends Ut {
|
|
|
20900
20900
|
}
|
|
20901
20901
|
setIsPinned(t, e = true) {
|
|
20902
20902
|
var i;
|
|
20903
|
-
v(this,
|
|
20903
|
+
v(this, Bn, t);
|
|
20904
20904
|
const r = t ? "pinned" : "unpinned";
|
|
20905
20905
|
(i = a(this, Si, eo)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
20906
20906
|
}
|
|
@@ -20971,10 +20971,10 @@ let cr = (pm = class extends Ut {
|
|
|
20971
20971
|
});
|
|
20972
20972
|
}
|
|
20973
20973
|
setStageStatus(t) {
|
|
20974
|
-
v(this,
|
|
20974
|
+
v(this, Hn, t), this.emit("stageStatusUpdate", this);
|
|
20975
20975
|
}
|
|
20976
20976
|
get isPinned() {
|
|
20977
|
-
return a(this,
|
|
20977
|
+
return a(this, Bn);
|
|
20978
20978
|
}
|
|
20979
20979
|
registerVideoElement(t) {
|
|
20980
20980
|
var r, i, n, o;
|
|
@@ -21013,7 +21013,7 @@ let cr = (pm = class extends Ut {
|
|
|
21013
21013
|
t.srcObject = void 0;
|
|
21014
21014
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
21015
21015
|
}
|
|
21016
|
-
},
|
|
21016
|
+
}, Bn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakSet(), Xa = function() {
|
|
21017
21017
|
return a(this, wr).getValue("roomNodeClient");
|
|
21018
21018
|
}, yi = /* @__PURE__ */ new WeakSet(), Za = function() {
|
|
21019
21019
|
return a(this, wr).getValue("connectionHandler").mediaJoined;
|
|
@@ -21165,13 +21165,13 @@ var d0 = Object.defineProperty, l0 = Object.getOwnPropertyDescriptor, Bt = (s, t
|
|
|
21165
21165
|
return r && i && d0(t, e, i), i;
|
|
21166
21166
|
};
|
|
21167
21167
|
const u0 = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
21168
|
-
var zt, Ei, to, _i, so,
|
|
21168
|
+
var zt, Ei, to, _i, so, qn, Jc, Pi, Rt, mm;
|
|
21169
21169
|
let Et = (mm = class extends Ut {
|
|
21170
21170
|
constructor(t, e, r) {
|
|
21171
21171
|
super();
|
|
21172
21172
|
f(this, Ei);
|
|
21173
21173
|
f(this, _i);
|
|
21174
|
-
f(this,
|
|
21174
|
+
f(this, qn);
|
|
21175
21175
|
p(this, "waitlisted");
|
|
21176
21176
|
p(this, "joined");
|
|
21177
21177
|
p(this, "active");
|
|
@@ -21220,7 +21220,7 @@ let Et = (mm = class extends Ut {
|
|
|
21220
21220
|
setMaxActiveParticipantsCount(t) {
|
|
21221
21221
|
if (t < 0 || t > 24)
|
|
21222
21222
|
throw new w("0 <= Max active participants count limit <= 24", "1203");
|
|
21223
|
-
a(this, zt).setValue("maxPreferredStreams", t), a(this,
|
|
21223
|
+
a(this, zt).setValue("maxPreferredStreams", t), a(this, qn, Jc) && k.emit(I.UPDATE_ACTIVE);
|
|
21224
21224
|
}
|
|
21225
21225
|
get pageCount() {
|
|
21226
21226
|
if (this.viewMode === "PAGINATED") {
|
|
@@ -21432,7 +21432,7 @@ let Et = (mm = class extends Ut {
|
|
|
21432
21432
|
return u(this, null, function* () {
|
|
21433
21433
|
if (l.info("DyteParticipants::disable_all_audio", {
|
|
21434
21434
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
21435
|
-
}), !a(this,
|
|
21435
|
+
}), !a(this, qn, Jc))
|
|
21436
21436
|
throw new w("Can`t disable all audio without joining room", "1205");
|
|
21437
21437
|
if (a(this, Pi).permissions.canAllowParticipantAudio)
|
|
21438
21438
|
return a(this, Ei, to).muteAll(t);
|
|
@@ -21446,7 +21446,7 @@ let Et = (mm = class extends Ut {
|
|
|
21446
21446
|
}
|
|
21447
21447
|
disableAllVideo() {
|
|
21448
21448
|
return u(this, null, function* () {
|
|
21449
|
-
if (l.info("DyteParticipants::disable_all_video"), !a(this,
|
|
21449
|
+
if (l.info("DyteParticipants::disable_all_video"), !a(this, qn, Jc))
|
|
21450
21450
|
throw new w("Can`t disable all video without joining room", "1205");
|
|
21451
21451
|
if (a(this, Pi).permissions.canAllowParticipantVideo)
|
|
21452
21452
|
return a(this, Ei, to).muteAllVideo();
|
|
@@ -21531,7 +21531,7 @@ let Et = (mm = class extends Ut {
|
|
|
21531
21531
|
}, _i = /* @__PURE__ */ new WeakSet(), so = function() {
|
|
21532
21532
|
var t;
|
|
21533
21533
|
return ((t = a(this, zt).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === true;
|
|
21534
|
-
},
|
|
21534
|
+
}, qn = /* @__PURE__ */ new WeakSet(), Jc = function() {
|
|
21535
21535
|
var t;
|
|
21536
21536
|
return ((t = a(this, zt).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === true;
|
|
21537
21537
|
}, Pi = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), mm);
|
|
@@ -21577,11 +21577,11 @@ Bt([
|
|
|
21577
21577
|
Et = Bt([
|
|
21578
21578
|
ut("1200")
|
|
21579
21579
|
], Et);
|
|
21580
|
-
var
|
|
21580
|
+
var pn = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(pn || {}), Ae = /* @__PURE__ */ ((s) => (s[s.HIVE = 1] = "HIVE", s[s.ROOM_NODE = 2] = "ROOM_NODE", s[s.CF = 3] = "CF", s))(Ae || {}), h0 = Object.defineProperty, p0 = Object.getOwnPropertyDescriptor, Qi = (s, t, e, r) => {
|
|
21581
21581
|
for (var i = r > 1 ? void 0 : r ? p0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
21582
21582
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
21583
21583
|
return r && i && h0(t, e, i), i;
|
|
21584
|
-
}, Js,
|
|
21584
|
+
}, Js, jn, Gn, Ci, Wn, gm;
|
|
21585
21585
|
const Kc = (gm = class {
|
|
21586
21586
|
constructor(s, t, e, r) {
|
|
21587
21587
|
p(this, "participants");
|
|
@@ -21594,10 +21594,10 @@ const Kc = (gm = class {
|
|
|
21594
21594
|
p(this, "context");
|
|
21595
21595
|
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
21596
21596
|
f(this, Js, { mode: "ACTIVE_GRID", page: 0 });
|
|
21597
|
-
f(this, qn, new ii());
|
|
21598
21597
|
f(this, jn, new ii());
|
|
21598
|
+
f(this, Gn, new ii());
|
|
21599
21599
|
f(this, Ci, false);
|
|
21600
|
-
f(this,
|
|
21600
|
+
f(this, Wn, false);
|
|
21601
21601
|
p(this, "updateConsumerSpatialLayers", ah(() => {
|
|
21602
21602
|
const s2 = {}, t2 = new Map(this.maxSpatialLayerUpdates);
|
|
21603
21603
|
this.maxSpatialLayerUpdates.clear(), Array.from(t2.entries()).forEach(([e2, r2]) => {
|
|
@@ -21623,11 +21623,11 @@ const Kc = (gm = class {
|
|
|
21623
21623
|
}
|
|
21624
21624
|
}));
|
|
21625
21625
|
switch (this.context = s, this.roomSocketHandler = e, this.participants = new Et(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), r) {
|
|
21626
|
-
case
|
|
21626
|
+
case Ae.HIVE: {
|
|
21627
21627
|
this.events = es;
|
|
21628
21628
|
break;
|
|
21629
21629
|
}
|
|
21630
|
-
case
|
|
21630
|
+
case Ae.CF: {
|
|
21631
21631
|
this.events = gs;
|
|
21632
21632
|
break;
|
|
21633
21633
|
}
|
|
@@ -21879,7 +21879,7 @@ const Kc = (gm = class {
|
|
|
21879
21879
|
const { page: e, createAllConsumers: r } = t != null ? t : {};
|
|
21880
21880
|
s && a(this, Js).mode !== s && (a(this, Js).mode = s), e && a(this, Js).page !== e && (a(this, Js).page = e);
|
|
21881
21881
|
const { mode: i, page: n } = a(this, Js);
|
|
21882
|
-
switch (r && (a(this,
|
|
21882
|
+
switch (r && (a(this, jn).clear(), a(this, Gn).clear()), i) {
|
|
21883
21883
|
case "PAGINATED": {
|
|
21884
21884
|
if (!n)
|
|
21885
21885
|
return;
|
|
@@ -21910,24 +21910,24 @@ const Kc = (gm = class {
|
|
|
21910
21910
|
if (((d = (c = (o = this.context.getValue("connectionHandler")) == null ? void 0 : o.mediaState) == null ? void 0 : c.recv) == null ? void 0 : d.state) !== "connected")
|
|
21911
21911
|
return;
|
|
21912
21912
|
if (a(this, Ci)) {
|
|
21913
|
-
v(this,
|
|
21913
|
+
v(this, Wn, true);
|
|
21914
21914
|
return;
|
|
21915
21915
|
}
|
|
21916
|
-
v(this, Ci, true), v(this,
|
|
21916
|
+
v(this, Ci, true), v(this, Wn, false);
|
|
21917
21917
|
const [s, t] = Kc.mapDiff(
|
|
21918
|
-
a(this,
|
|
21918
|
+
a(this, jn),
|
|
21919
21919
|
this.participants.videoSubscribed
|
|
21920
21920
|
);
|
|
21921
21921
|
this.updateParticipantsMap(
|
|
21922
|
-
a(this,
|
|
21922
|
+
a(this, jn),
|
|
21923
21923
|
this.participants.videoSubscribed.toArray().filter(({ videoEnabled: h }) => !!h).map(({ id: h }) => h)
|
|
21924
21924
|
);
|
|
21925
21925
|
const [e, r] = Kc.mapDiff(
|
|
21926
|
-
a(this,
|
|
21926
|
+
a(this, Gn),
|
|
21927
21927
|
this.participants.audioSubscribed
|
|
21928
21928
|
);
|
|
21929
21929
|
this.updateParticipantsMap(
|
|
21930
|
-
a(this,
|
|
21930
|
+
a(this, Gn),
|
|
21931
21931
|
this.participants.audioSubscribed.toArray().filter(({ audioEnabled: h }) => !!h).map(({ id: h }) => h)
|
|
21932
21932
|
);
|
|
21933
21933
|
const i = [
|
|
@@ -21942,7 +21942,7 @@ const Kc = (gm = class {
|
|
|
21942
21942
|
} finally {
|
|
21943
21943
|
v(this, Ci, false);
|
|
21944
21944
|
}
|
|
21945
|
-
a(this,
|
|
21945
|
+
a(this, Wn) && this.syncConsumers();
|
|
21946
21946
|
});
|
|
21947
21947
|
}
|
|
21948
21948
|
static mapDiff(s, t) {
|
|
@@ -22457,40 +22457,40 @@ const Kc = (gm = class {
|
|
|
22457
22457
|
volume: 1
|
|
22458
22458
|
})), t && this.updateSubscriptions(this.participants.viewMode);
|
|
22459
22459
|
}
|
|
22460
|
-
}, Js = /* @__PURE__ */ new WeakMap(),
|
|
22460
|
+
}, Js = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), gm);
|
|
22461
22461
|
let lr = Kc;
|
|
22462
|
-
|
|
22462
|
+
Qi([
|
|
22463
22463
|
y.trace("ParticipantController.setupEvents")
|
|
22464
22464
|
], lr.prototype, "setupEvents", 1);
|
|
22465
|
-
|
|
22465
|
+
Qi([
|
|
22466
22466
|
y.trace("ParticipantController.setupEvents")
|
|
22467
22467
|
], lr.prototype, "setupEventsGlobal", 1);
|
|
22468
|
-
|
|
22468
|
+
Qi([
|
|
22469
22469
|
y.trace("ParticipantController.processMedia")
|
|
22470
22470
|
], lr.prototype, "processMedia", 1);
|
|
22471
|
-
|
|
22471
|
+
Qi([
|
|
22472
22472
|
y.trace("ParticipantController.processConsumerClosed")
|
|
22473
22473
|
], lr.prototype, "processConsumerClosed", 1);
|
|
22474
|
-
|
|
22474
|
+
Qi([
|
|
22475
22475
|
y.trace("ParticipantController.processConsumerResumed")
|
|
22476
22476
|
], lr.prototype, "processConsumerResumed", 1);
|
|
22477
|
-
|
|
22477
|
+
Qi([
|
|
22478
22478
|
y.trace("ParticipantController.processConsumerPaused")
|
|
22479
22479
|
], lr.prototype, "processConsumerPaused", 1);
|
|
22480
|
-
|
|
22480
|
+
Qi([
|
|
22481
22481
|
y.trace("ParticipantController.processNewConsumer")
|
|
22482
22482
|
], lr.prototype, "processNewConsumer", 1);
|
|
22483
22483
|
const ge = vs(
|
|
22484
22484
|
nh().permissions
|
|
22485
22485
|
);
|
|
22486
|
-
var j,
|
|
22487
|
-
const
|
|
22486
|
+
var j, Jn, Kn, Md, gt, Ot;
|
|
22487
|
+
const cn = class extends Ut {
|
|
22488
22488
|
constructor(e, r, i, n = false) {
|
|
22489
22489
|
super();
|
|
22490
22490
|
f(this, gt);
|
|
22491
22491
|
f(this, j, void 0);
|
|
22492
|
-
f(this, Wn, void 0);
|
|
22493
22492
|
f(this, Jn, void 0);
|
|
22493
|
+
f(this, Kn, void 0);
|
|
22494
22494
|
f(this, Md, (e2) => {
|
|
22495
22495
|
var m, g, T;
|
|
22496
22496
|
const h = e2, {
|
|
@@ -22537,28 +22537,28 @@ const on = class extends Ut {
|
|
|
22537
22537
|
});
|
|
22538
22538
|
if (!r)
|
|
22539
22539
|
throw l.error("DytePermissionsPreset::load_preset_permissions_failed"), new w("Could not load preset permissions.", "0904");
|
|
22540
|
-
v(this,
|
|
22540
|
+
v(this, Kn, e), v(this, Jn, i), v(this, j, r), n && this.setupEvents();
|
|
22541
22541
|
}
|
|
22542
22542
|
setupEvents() {
|
|
22543
22543
|
k.on(I.UPDATE_PERMISSIONS, a(this, Md));
|
|
22544
22544
|
}
|
|
22545
22545
|
static fromResponse(e, r, i) {
|
|
22546
|
-
return new
|
|
22546
|
+
return new cn(i, e, r, true);
|
|
22547
22547
|
}
|
|
22548
22548
|
static default(e, r) {
|
|
22549
|
-
return new
|
|
22549
|
+
return new cn(e, ge, r);
|
|
22550
22550
|
}
|
|
22551
22551
|
static init(e, r, i) {
|
|
22552
22552
|
let n;
|
|
22553
|
-
return i ? n = new
|
|
22553
|
+
return i ? n = new cn(e, i, r, true) : n = new cn(e, ge, r), n;
|
|
22554
22554
|
}
|
|
22555
22555
|
get mediaRoomType() {
|
|
22556
|
-
const { sfu: e } = a(this,
|
|
22557
|
-
return e ===
|
|
22556
|
+
const { sfu: e } = a(this, Kn).getValue("roomNodeOptions");
|
|
22557
|
+
return e === Ae.CF ? "CF" : "HIVE";
|
|
22558
22558
|
}
|
|
22559
22559
|
get stageEnabled() {
|
|
22560
22560
|
var e;
|
|
22561
|
-
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this,
|
|
22561
|
+
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this, Jn) === At.Webinar || a(this, Jn) === At.Livestream;
|
|
22562
22562
|
}
|
|
22563
22563
|
get acceptStageRequests() {
|
|
22564
22564
|
var e, r;
|
|
@@ -22722,9 +22722,9 @@ const on = class extends Ut {
|
|
|
22722
22722
|
return a(this, j).transcriptionEnabled;
|
|
22723
22723
|
}
|
|
22724
22724
|
};
|
|
22725
|
-
let ku =
|
|
22726
|
-
j = /* @__PURE__ */ new WeakMap(),
|
|
22727
|
-
return a(this,
|
|
22725
|
+
let ku = cn;
|
|
22726
|
+
j = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), Md = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), Ot = function() {
|
|
22727
|
+
return a(this, Kn).getValue("stageStatus");
|
|
22728
22728
|
};
|
|
22729
22729
|
var Ku;
|
|
22730
22730
|
class m0 extends Ut {
|
|
@@ -23062,22 +23062,22 @@ var g0 = Object.defineProperty, f0 = Object.getOwnPropertyDescriptor, _t = (s, t
|
|
|
23062
23062
|
for (var i = r > 1 ? void 0 : r ? f0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
23063
23063
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23064
23064
|
return r && i && g0(t, e, i), i;
|
|
23065
|
-
},
|
|
23065
|
+
}, zn, ft, Yn, ws, Ks, Xr, je, Qe, $e, He, Qn, Xn, xo, Iu, fm;
|
|
23066
23066
|
let Ye = (fm = class extends m0 {
|
|
23067
23067
|
constructor(t, e, r, i, n) {
|
|
23068
23068
|
var o;
|
|
23069
23069
|
super();
|
|
23070
23070
|
f(this, Ks);
|
|
23071
23071
|
f(this, je);
|
|
23072
|
-
f(this,
|
|
23072
|
+
f(this, $e);
|
|
23073
23073
|
f(this, xo);
|
|
23074
23074
|
p(this, "name");
|
|
23075
23075
|
p(this, "picture");
|
|
23076
23076
|
p(this, "customParticipantId");
|
|
23077
23077
|
p(this, "waitlistStatus");
|
|
23078
|
-
f(this, Kn, void 0);
|
|
23079
|
-
f(this, ft, void 0);
|
|
23080
23078
|
f(this, zn, void 0);
|
|
23079
|
+
f(this, ft, void 0);
|
|
23080
|
+
f(this, Yn, void 0);
|
|
23081
23081
|
p(this, "role");
|
|
23082
23082
|
p(this, "userId");
|
|
23083
23083
|
p(this, "organizationId");
|
|
@@ -23087,9 +23087,9 @@ let Ye = (fm = class extends m0 {
|
|
|
23087
23087
|
p(this, "hidden", false);
|
|
23088
23088
|
p(this, "presetName");
|
|
23089
23089
|
p(this, "roomState", "init");
|
|
23090
|
-
f(this, Yn, /* @__PURE__ */ new Set());
|
|
23091
23090
|
f(this, Qn, /* @__PURE__ */ new Set());
|
|
23092
|
-
|
|
23091
|
+
f(this, Xn, /* @__PURE__ */ new Set());
|
|
23092
|
+
v(this, ws, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (o = e.customParticipantId) != null ? o : e.clientSpecificId, this.waitlistStatus = "none", v(this, ft, r), v(this, zn, i), this.hidden = false, v(this, Yn, false), this.organizationId = e.organizationId, this.supportsRemoteControl = Ce.isElectron(), this.device = Ce.getDeviceInfo(), this.presetName = n, i.viewType !== At.Chat && this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), x(this, xo, Iu).call(this);
|
|
23093
23093
|
}
|
|
23094
23094
|
get stageStatus() {
|
|
23095
23095
|
return a(this, ws).getValue("stageStatus");
|
|
@@ -23118,7 +23118,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23118
23118
|
}
|
|
23119
23119
|
setupEvents() {
|
|
23120
23120
|
this.on("videoUpdate", x(this, xo, Iu)), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23121
|
-
if (l.info("DyteSelf::setupEvents::AUDIO_TRACK_CHANGE", O({}, ri(this))), a(this,
|
|
23121
|
+
if (l.info("DyteSelf::setupEvents::AUDIO_TRACK_CHANGE", O({}, ri(this))), a(this, $e, He) && this.audioEnabled)
|
|
23122
23122
|
try {
|
|
23123
23123
|
yield a(this, je, Qe).shareMic(this.audioTrack);
|
|
23124
23124
|
} catch (t) {
|
|
@@ -23131,9 +23131,9 @@ let Ye = (fm = class extends m0 {
|
|
|
23131
23131
|
audioTrack: this.audioTrack
|
|
23132
23132
|
});
|
|
23133
23133
|
})), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23134
|
-
if (l.info("DyteSelf::setupEvents::VIDEO_TRACK_CHANGE", O({}, ri(this))), a(this,
|
|
23134
|
+
if (l.info("DyteSelf::setupEvents::VIDEO_TRACK_CHANGE", O({}, ri(this))), a(this, $e, He) && this.rawVideoTrack === void 0)
|
|
23135
23135
|
l.info("DyteSelf::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
23136
|
-
else if (this.videoEnabled && a(this,
|
|
23136
|
+
else if (this.videoEnabled && a(this, $e, He))
|
|
23137
23137
|
try {
|
|
23138
23138
|
const t = yield a(this, je, Qe).shareWebcam(this.videoTrack);
|
|
23139
23139
|
t && t.id !== this.videoTrack.id && z.hasFeature(se.EXP_RESHARE) && (yield a(this, je, Qe).shareWebcam(this.videoTrack));
|
|
@@ -23156,7 +23156,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23156
23156
|
), this.localMediaHandler.on("DEVICE_LIST_UPDATED", (t) => {
|
|
23157
23157
|
this.emit("deviceListUpdate", t);
|
|
23158
23158
|
}), this.localMediaHandler.on("SCREENSHARE_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23159
|
-
if (!a(this,
|
|
23159
|
+
if (!a(this, $e, He)) {
|
|
23160
23160
|
l.error(
|
|
23161
23161
|
"DyteSelf.SCREENSHARE_TRACK_CHANGE.LocalMediaInitialized_WithoutRoomNode"
|
|
23162
23162
|
);
|
|
@@ -23184,7 +23184,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23184
23184
|
}), this.localMediaHandler.on("FORCE_MUTE_AUDIO", () => {
|
|
23185
23185
|
this.disableAudio();
|
|
23186
23186
|
}), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => u(this, null, function* () {
|
|
23187
|
-
a(this,
|
|
23187
|
+
a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23188
23188
|
videoEnabled: this.videoEnabled,
|
|
23189
23189
|
videoTrack: this.videoTrack
|
|
23190
23190
|
}), W.videoOff();
|
|
@@ -23197,11 +23197,11 @@ let Ye = (fm = class extends m0 {
|
|
|
23197
23197
|
return a(this, ft);
|
|
23198
23198
|
}
|
|
23199
23199
|
get config() {
|
|
23200
|
-
return a(this,
|
|
23200
|
+
return a(this, zn);
|
|
23201
23201
|
}
|
|
23202
23202
|
get roomJoined() {
|
|
23203
23203
|
var t;
|
|
23204
|
-
return a(this,
|
|
23204
|
+
return a(this, zn).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = a(this, ws).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === true : a(this, $e, He);
|
|
23205
23205
|
}
|
|
23206
23206
|
setName(t) {
|
|
23207
23207
|
if (!t)
|
|
@@ -23226,7 +23226,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23226
23226
|
enableAudio(t) {
|
|
23227
23227
|
return u(this, null, function* () {
|
|
23228
23228
|
if (this.permissions.canProduceAudio !== G.NotAllowed && !(a(this, ft).canProduceAudio === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
|
|
23229
|
-
if (W.audioOn(), yield this.localMediaHandler.enableAudio(t), a(this,
|
|
23229
|
+
if (W.audioOn(), yield this.localMediaHandler.enableAudio(t), a(this, $e, He) && this.stageStatus === "ON_STAGE") {
|
|
23230
23230
|
if (this.audioTrack)
|
|
23231
23231
|
try {
|
|
23232
23232
|
yield a(this, je, Qe).shareMic(this.audioTrack);
|
|
@@ -23249,7 +23249,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23249
23249
|
enableVideo(t) {
|
|
23250
23250
|
return u(this, null, function* () {
|
|
23251
23251
|
if (a(this, ft).canProduceVideo !== G.NotAllowed && !(a(this, ft).canProduceVideo === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
|
|
23252
|
-
if (W.videoOn(), yield this.localMediaHandler.enableVideo(t), a(this,
|
|
23252
|
+
if (W.videoOn(), yield this.localMediaHandler.enableVideo(t), a(this, $e, He) && this.stageStatus === "ON_STAGE")
|
|
23253
23253
|
try {
|
|
23254
23254
|
yield a(this, je, Qe).shareWebcam(this.videoTrack);
|
|
23255
23255
|
} catch (e) {
|
|
@@ -23273,7 +23273,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23273
23273
|
}
|
|
23274
23274
|
enableScreenShare() {
|
|
23275
23275
|
return u(this, null, function* () {
|
|
23276
|
-
if (!a(this,
|
|
23276
|
+
if (!a(this, $e, He))
|
|
23277
23277
|
throw new w("Can`t enable screenshare without joining room", "1105");
|
|
23278
23278
|
if (a(this, ft).canProduceScreenshare !== G.NotAllowed && !(a(this, ft).canProduceScreenshare === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
|
|
23279
23279
|
try {
|
|
@@ -23302,7 +23302,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23302
23302
|
}
|
|
23303
23303
|
disableAudio() {
|
|
23304
23304
|
return u(this, null, function* () {
|
|
23305
|
-
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this,
|
|
23305
|
+
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this, $e, He) && a(this, je, Qe).muteSelf(), this.emit("audioUpdate", {
|
|
23306
23306
|
audioEnabled: this.audioEnabled,
|
|
23307
23307
|
audioTrack: this.audioTrack
|
|
23308
23308
|
}), W.audioOff());
|
|
@@ -23310,7 +23310,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23310
23310
|
}
|
|
23311
23311
|
disableVideo() {
|
|
23312
23312
|
return u(this, null, function* () {
|
|
23313
|
-
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this,
|
|
23313
|
+
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23314
23314
|
videoEnabled: this.videoEnabled,
|
|
23315
23315
|
videoTrack: this.videoTrack
|
|
23316
23316
|
}), W.videoOff());
|
|
@@ -23318,7 +23318,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23318
23318
|
}
|
|
23319
23319
|
disableScreenShare() {
|
|
23320
23320
|
return u(this, null, function* () {
|
|
23321
|
-
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this,
|
|
23321
|
+
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this, $e, He) && (yield a(this, je, Qe).disableScreenShare()), this.emit("screenShareUpdate", {
|
|
23322
23322
|
screenShareEnabled: this.screenShareEnabled,
|
|
23323
23323
|
screenShareTracks: this.screenShareTracks
|
|
23324
23324
|
}));
|
|
@@ -23329,36 +23329,36 @@ let Ye = (fm = class extends m0 {
|
|
|
23329
23329
|
}
|
|
23330
23330
|
setIsPinned(t, e = true) {
|
|
23331
23331
|
var i;
|
|
23332
|
-
v(this,
|
|
23332
|
+
v(this, Yn, t);
|
|
23333
23333
|
const r = t ? "pinned" : "unpinned";
|
|
23334
23334
|
(i = a(this, Ks, Xr)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
23335
23335
|
}
|
|
23336
23336
|
get isPinned() {
|
|
23337
|
-
return a(this,
|
|
23337
|
+
return a(this, Yn);
|
|
23338
23338
|
}
|
|
23339
23339
|
pin() {
|
|
23340
23340
|
return u(this, null, function* () {
|
|
23341
|
-
if (!a(this,
|
|
23341
|
+
if (!a(this, $e, He))
|
|
23342
23342
|
throw new w("Can`t pin participants without joining room", "1105");
|
|
23343
23343
|
return this.show(), a(this, je, Qe).pinPeer(this.id);
|
|
23344
23344
|
});
|
|
23345
23345
|
}
|
|
23346
23346
|
unpin() {
|
|
23347
23347
|
return u(this, null, function* () {
|
|
23348
|
-
if (!a(this,
|
|
23348
|
+
if (!a(this, $e, He))
|
|
23349
23349
|
throw new w("Can`t unpin participants without joining room", "1105");
|
|
23350
23350
|
return a(this, je, Qe).pinPeer(null);
|
|
23351
23351
|
});
|
|
23352
23352
|
}
|
|
23353
23353
|
hide() {
|
|
23354
23354
|
return u(this, null, function* () {
|
|
23355
|
-
if (!a(this,
|
|
23355
|
+
if (!a(this, $e, He))
|
|
23356
23356
|
throw new w("Can`t toggle participant tile without joining room", "1105");
|
|
23357
23357
|
this.hidden = true, this.emit("toggleTile", { hidden: this.hidden });
|
|
23358
23358
|
});
|
|
23359
23359
|
}
|
|
23360
23360
|
show() {
|
|
23361
|
-
if (!a(this,
|
|
23361
|
+
if (!a(this, $e, He))
|
|
23362
23362
|
throw new w("Can`t toggle participant tile without joining room", "1105");
|
|
23363
23363
|
this.hidden = false, this.emit("toggleTile", { hidden: this.hidden });
|
|
23364
23364
|
}
|
|
@@ -23375,7 +23375,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23375
23375
|
try {
|
|
23376
23376
|
yield this.localMediaHandler.setAudioDevice(t);
|
|
23377
23377
|
} catch (o) {
|
|
23378
|
-
a(this,
|
|
23378
|
+
a(this, $e, He) && (yield a(this, je, Qe).muteSelf()), this.emit("audioUpdate", {
|
|
23379
23379
|
audioEnabled: this.audioEnabled,
|
|
23380
23380
|
audioTrack: this.audioTrack
|
|
23381
23381
|
});
|
|
@@ -23388,7 +23388,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23388
23388
|
try {
|
|
23389
23389
|
yield this.localMediaHandler.setVideoDevice(t);
|
|
23390
23390
|
} catch (o) {
|
|
23391
|
-
a(this,
|
|
23391
|
+
a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23392
23392
|
videoEnabled: this.videoEnabled,
|
|
23393
23393
|
videoTrack: this.videoTrack
|
|
23394
23394
|
});
|
|
@@ -23403,7 +23403,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23403
23403
|
}
|
|
23404
23404
|
registerVideoElement(t, e = false) {
|
|
23405
23405
|
var r, i;
|
|
23406
|
-
t && (e ? a(this,
|
|
23406
|
+
t && (e ? a(this, Qn).add(t) : a(this, Xn).add(t), this.updateVideo(t), e || (i = a(this, Ks, Xr)) == null || i.addSource(
|
|
23407
23407
|
this.id,
|
|
23408
23408
|
t,
|
|
23409
23409
|
this.videoEnabled,
|
|
@@ -23418,7 +23418,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23418
23418
|
a(this, Ks, Xr).removeSource(this.id);
|
|
23419
23419
|
return;
|
|
23420
23420
|
}
|
|
23421
|
-
t.srcObject = void 0, e ? a(this,
|
|
23421
|
+
t.srcObject = void 0, e ? a(this, Qn).delete(t) : (a(this, Xn).delete(t), a(this, Ks, Xr).removeSource(this.id));
|
|
23422
23422
|
}
|
|
23423
23423
|
updateVideo(t, e = false) {
|
|
23424
23424
|
var r, i, n;
|
|
@@ -23434,15 +23434,15 @@ let Ye = (fm = class extends m0 {
|
|
|
23434
23434
|
t.srcObject = void 0, e || (n = a(this, Ks, Xr)) == null || n.disableSource(this.id);
|
|
23435
23435
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
23436
23436
|
}
|
|
23437
|
-
},
|
|
23437
|
+
}, zn = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakSet(), Xr = function() {
|
|
23438
23438
|
return a(this, ws).getValue("pip");
|
|
23439
23439
|
}, je = /* @__PURE__ */ new WeakSet(), Qe = function() {
|
|
23440
23440
|
return a(this, ws).getValue("roomNodeClient");
|
|
23441
|
-
},
|
|
23441
|
+
}, $e = /* @__PURE__ */ new WeakSet(), He = function() {
|
|
23442
23442
|
var t;
|
|
23443
23443
|
return ((t = a(this, ws).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === true;
|
|
23444
|
-
},
|
|
23445
|
-
Array.from(a(this,
|
|
23444
|
+
}, Qn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakSet(), Iu = function() {
|
|
23445
|
+
Array.from(a(this, Xn)).forEach((t) => this.updateVideo(t, false)), Array.from(a(this, Qn)).forEach((t) => this.updateVideo(t, true));
|
|
23446
23446
|
}, fm);
|
|
23447
23447
|
_t([
|
|
23448
23448
|
y.trace("DyteSelf.cleanupEvents")
|
|
@@ -23564,7 +23564,7 @@ const Tf = (vm = class {
|
|
|
23564
23564
|
Nw.toBinary(t)
|
|
23565
23565
|
);
|
|
23566
23566
|
try {
|
|
23567
|
-
const { peer: i } =
|
|
23567
|
+
const { peer: i } = en.fromBinary((yield e).payload);
|
|
23568
23568
|
a(this, Uo).getValue("connectionHandler").socketJoined = true, k.emit(I.SOCKET_SERVICE_ROOM_JOINED, { peer: i });
|
|
23569
23569
|
const n = this.getRoomState(), o = this.getRoomPeersNonPaginated(), [{ room: c }, { peers: d }] = yield Promise.all([n, o]);
|
|
23570
23570
|
return k.emit(I.ROOM_STATE, c), k.emit(I.SOCKET_PEERS, d), { peer: i };
|
|
@@ -23650,7 +23650,7 @@ const Tf = (vm = class {
|
|
|
23650
23650
|
U.getPeerInfo,
|
|
23651
23651
|
Bg.toBinary({ peerId: s })
|
|
23652
23652
|
);
|
|
23653
|
-
t =
|
|
23653
|
+
t = en.fromBinary(e.payload);
|
|
23654
23654
|
} catch (e) {
|
|
23655
23655
|
l.error("getPeerInfo::binary_decode_error", { error: e });
|
|
23656
23656
|
}
|
|
@@ -23824,7 +23824,7 @@ const Tf = (vm = class {
|
|
|
23824
23824
|
case U.leaveRoom:
|
|
23825
23825
|
case U.kick:
|
|
23826
23826
|
case U.kickAll: {
|
|
23827
|
-
e =
|
|
23827
|
+
e = en.fromBinary.bind(en), r = en.create();
|
|
23828
23828
|
break;
|
|
23829
23829
|
}
|
|
23830
23830
|
case U.getWaitingRoomRequests: {
|
|
@@ -24106,7 +24106,7 @@ class C0 {
|
|
|
24106
24106
|
f(this, We, void 0);
|
|
24107
24107
|
p(this, "events");
|
|
24108
24108
|
p(this, "sfuType");
|
|
24109
|
-
v(this, We, t), this.sfuType = e, this.events = e ===
|
|
24109
|
+
v(this, We, t), this.sfuType = e, this.events = e === Ae.CF ? gs : es;
|
|
24110
24110
|
}
|
|
24111
24111
|
joinRoom(t, e, r, i = false, n = null) {
|
|
24112
24112
|
return u(this, null, function* () {
|
|
@@ -24157,7 +24157,7 @@ class C0 {
|
|
|
24157
24157
|
}
|
|
24158
24158
|
consume(t) {
|
|
24159
24159
|
return u(this, null, function* () {
|
|
24160
|
-
if (this.sfuType ===
|
|
24160
|
+
if (this.sfuType === Ae.HIVE)
|
|
24161
24161
|
throw new Error("Hive does not support socket consumer operations");
|
|
24162
24162
|
const e = (yield a(this, We).sendMessagePromise(
|
|
24163
24163
|
this.events.consume,
|
|
@@ -24180,7 +24180,7 @@ class C0 {
|
|
|
24180
24180
|
}
|
|
24181
24181
|
closeConsumer(t) {
|
|
24182
24182
|
return u(this, null, function* () {
|
|
24183
|
-
if (this.sfuType ===
|
|
24183
|
+
if (this.sfuType === Ae.HIVE)
|
|
24184
24184
|
throw new Error("Hive does not support socket consumer operations");
|
|
24185
24185
|
return (yield a(this, We).sendMessagePromise(
|
|
24186
24186
|
this.events.closeConsumer,
|
|
@@ -24190,7 +24190,7 @@ class C0 {
|
|
|
24190
24190
|
}
|
|
24191
24191
|
updateConsumersSimulcastConfig(t) {
|
|
24192
24192
|
return u(this, null, function* () {
|
|
24193
|
-
if (this.sfuType ===
|
|
24193
|
+
if (this.sfuType === Ae.HIVE)
|
|
24194
24194
|
throw new Error("Method not implemented");
|
|
24195
24195
|
return (yield a(this, We).sendMessagePromise(
|
|
24196
24196
|
this.events.updateConsumersSimulcastConfig,
|
|
@@ -24331,6 +24331,7 @@ class Sh extends wl {
|
|
|
24331
24331
|
p(this, "enableHighBitrate", false);
|
|
24332
24332
|
p(this, "enableStereo", false);
|
|
24333
24333
|
p(this, "enableDtx", true);
|
|
24334
|
+
p(this, "sfu", Ae.HIVE);
|
|
24334
24335
|
}
|
|
24335
24336
|
get midTransceiverMap() {
|
|
24336
24337
|
return this._mapMidTransceiver;
|
|
@@ -24379,12 +24380,13 @@ class Sh extends wl {
|
|
|
24379
24380
|
}
|
|
24380
24381
|
connect() {
|
|
24381
24382
|
return u(this, null, function* () {
|
|
24382
|
-
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24386
|
-
|
|
24387
|
-
|
|
24383
|
+
let e;
|
|
24384
|
+
this.sfu === Ae.CF ? this.pc.addTransceiver("video", { direction: "sendonly" }) : e = this.pc.createDataChannel("dyte");
|
|
24385
|
+
const r = yield this.pc.createOffer();
|
|
24386
|
+
return yield this.pc.setLocalDescription(r), l.info(`connect offer: ${JSON.stringify(r)}`), {
|
|
24387
|
+
offerSdp: r,
|
|
24388
|
+
callback: (n) => u(this, null, function* () {
|
|
24389
|
+
l.debug(`${this.name}::connect() | calling pc.setRemoteDescription() [answer:${JSON.stringify(n)}]`), yield this.pc.setRemoteDescription(n), e == null || e.close();
|
|
24388
24390
|
})
|
|
24389
24391
|
};
|
|
24390
24392
|
});
|
|
@@ -24886,7 +24888,7 @@ Fo = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), bs = /*
|
|
|
24886
24888
|
}));
|
|
24887
24889
|
}
|
|
24888
24890
|
};
|
|
24889
|
-
var os,
|
|
24891
|
+
var os, Zn, ea, wi, Yt, Xe, Ir, ta, Vt, rs;
|
|
24890
24892
|
class b0 extends wl {
|
|
24891
24893
|
constructor(e) {
|
|
24892
24894
|
var r, i;
|
|
@@ -24898,14 +24900,14 @@ class b0 extends wl {
|
|
|
24898
24900
|
p(this, "kind");
|
|
24899
24901
|
p(this, "appData");
|
|
24900
24902
|
p(this, "rtpSender");
|
|
24901
|
-
f(this, Xn, void 0);
|
|
24902
24903
|
f(this, Zn, void 0);
|
|
24904
|
+
f(this, ea, void 0);
|
|
24903
24905
|
f(this, wi, void 0);
|
|
24904
24906
|
f(this, Yt, false);
|
|
24905
24907
|
f(this, Xe, void 0);
|
|
24906
24908
|
f(this, Ir, void 0);
|
|
24907
|
-
f(this,
|
|
24908
|
-
this.id = e.id, this.localId = e.localId, v(this, Xe, e.track), this.kind = (r = e.track) == null ? void 0 : r.kind, v(this, Ir, e.disableTrackOnPause ? !((i = e.track) != null && i.enabled) : false), v(this,
|
|
24909
|
+
f(this, ta, void 0);
|
|
24910
|
+
this.id = e.id, this.localId = e.localId, v(this, Xe, e.track), this.kind = (r = e.track) == null ? void 0 : r.kind, v(this, Ir, e.disableTrackOnPause ? !((i = e.track) != null && i.enabled) : false), v(this, ta, void 0), v(this, Zn, e.stopTracks), v(this, ea, e.disableTrackOnPause), v(this, wi, e.zeroRtpOnPause), this.appData = e.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), v(this, os, e.handler), this.rtpSender = e.rtpSender, this._handleTrack();
|
|
24909
24911
|
}
|
|
24910
24912
|
get closed() {
|
|
24911
24913
|
return a(this, Yt);
|
|
@@ -24917,7 +24919,7 @@ class b0 extends wl {
|
|
|
24917
24919
|
return a(this, Ir);
|
|
24918
24920
|
}
|
|
24919
24921
|
get maxSpatialLayer() {
|
|
24920
|
-
return a(this,
|
|
24922
|
+
return a(this, ta);
|
|
24921
24923
|
}
|
|
24922
24924
|
close(e) {
|
|
24923
24925
|
return u(this, null, function* () {
|
|
@@ -24939,21 +24941,21 @@ class b0 extends wl {
|
|
|
24939
24941
|
});
|
|
24940
24942
|
}
|
|
24941
24943
|
pause() {
|
|
24942
|
-
l.debug("Producer::pause()", a(this, Vt, rs)), a(this, Yt) && l.error("Producer::pause() | Producer closed", a(this, Vt, rs)), v(this, Ir, true), a(this, Xe) && a(this,
|
|
24944
|
+
l.debug("Producer::pause()", a(this, Vt, rs)), a(this, Yt) && l.error("Producer::pause() | Producer closed", a(this, Vt, rs)), v(this, Ir, true), a(this, Xe) && a(this, ea) && (a(this, Xe).enabled = false), a(this, wi) && a(this, os).replaceTrack(this.localId, null), this.emit("pause");
|
|
24943
24945
|
}
|
|
24944
24946
|
resume() {
|
|
24945
24947
|
if (l.debug("Producer::resume()", a(this, Vt, rs)), a(this, Yt)) {
|
|
24946
24948
|
l.error("Producer::resume() | Producer closed", a(this, Vt, rs));
|
|
24947
24949
|
return;
|
|
24948
24950
|
}
|
|
24949
|
-
v(this, Ir, false), a(this, Xe) && a(this,
|
|
24951
|
+
v(this, Ir, false), a(this, Xe) && a(this, ea) && (a(this, Xe).enabled = true), a(this, wi) && a(this, os).replaceTrack(this.localId, a(this, Xe)), this.emit("resume");
|
|
24950
24952
|
}
|
|
24951
24953
|
replaceTrack(r) {
|
|
24952
24954
|
return u(this, arguments, function* ({
|
|
24953
24955
|
track: e
|
|
24954
24956
|
}) {
|
|
24955
24957
|
if (l.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this, Vt, rs)), a(this, Yt)) {
|
|
24956
|
-
if (e && a(this,
|
|
24958
|
+
if (e && a(this, Zn))
|
|
24957
24959
|
try {
|
|
24958
24960
|
e.stop();
|
|
24959
24961
|
} catch (i) {
|
|
@@ -24979,7 +24981,7 @@ class b0 extends wl {
|
|
|
24979
24981
|
throw new yo("not a video Producer");
|
|
24980
24982
|
if (typeof e != "number")
|
|
24981
24983
|
throw new TypeError("invalid spatialLayer");
|
|
24982
|
-
yield a(this, os).setMaxSpatialLayer(this.localId, e), v(this,
|
|
24984
|
+
yield a(this, os).setMaxSpatialLayer(this.localId, e), v(this, ta, e);
|
|
24983
24985
|
});
|
|
24984
24986
|
}
|
|
24985
24987
|
setRtpEncodingParameters(e) {
|
|
@@ -25001,7 +25003,7 @@ class b0 extends wl {
|
|
|
25001
25003
|
var e;
|
|
25002
25004
|
if (a(this, Xe))
|
|
25003
25005
|
try {
|
|
25004
|
-
a(this, Xe).removeEventListener("ended", this._onTrackEnded), a(this,
|
|
25006
|
+
a(this, Xe).removeEventListener("ended", this._onTrackEnded), a(this, Zn) && a(this, Xe).stop();
|
|
25005
25007
|
} catch (r) {
|
|
25006
25008
|
l.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, q(O({}, a(this, Vt, rs)), {
|
|
25007
25009
|
error: r
|
|
@@ -25009,7 +25011,7 @@ class b0 extends wl {
|
|
|
25009
25011
|
}
|
|
25010
25012
|
}
|
|
25011
25013
|
}
|
|
25012
|
-
os = /* @__PURE__ */ new WeakMap(),
|
|
25014
|
+
os = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakSet(), rs = function() {
|
|
25013
25015
|
return {
|
|
25014
25016
|
producer: {
|
|
25015
25017
|
id: this.id,
|
|
@@ -25037,7 +25039,7 @@ function Pf(s) {
|
|
|
25037
25039
|
return k0(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
|
|
25038
25040
|
}
|
|
25039
25041
|
var Ar;
|
|
25040
|
-
const
|
|
25042
|
+
const dn = class extends lt.EventEmitter {
|
|
25041
25043
|
constructor(e, r, i) {
|
|
25042
25044
|
super();
|
|
25043
25045
|
p(this, "channel");
|
|
@@ -25046,14 +25048,14 @@ const cn = class extends lt.EventEmitter {
|
|
|
25046
25048
|
f(this, Ar, /* @__PURE__ */ new Map());
|
|
25047
25049
|
p(this, "respond", (e2, r2, i2 = false) => {
|
|
25048
25050
|
let n;
|
|
25049
|
-
i2 ? n =
|
|
25051
|
+
i2 ? n = dn.createErrorResponse(e2, r2) : n = dn.createResponse(e2, r2), this.channel.send(JSON.stringify(n));
|
|
25050
25052
|
});
|
|
25051
25053
|
p(this, "notify", (e2) => {
|
|
25052
|
-
const r2 =
|
|
25054
|
+
const r2 = dn.createNotification(e2);
|
|
25053
25055
|
this.channel.send(JSON.stringify(r2));
|
|
25054
25056
|
});
|
|
25055
25057
|
p(this, "request", (e2) => u(this, null, function* () {
|
|
25056
|
-
const r2 =
|
|
25058
|
+
const r2 = dn.createRequest(e2), i2 = new Promise((n, o) => {
|
|
25057
25059
|
const { id: d } = r2.payload._bolt, h = {
|
|
25058
25060
|
id: d,
|
|
25059
25061
|
method: r2.type,
|
|
@@ -25121,7 +25123,7 @@ const cn = class extends lt.EventEmitter {
|
|
|
25121
25123
|
this.label = r, this.transportId = i, this.channel = e, this.queue = /* @__PURE__ */ new Map();
|
|
25122
25124
|
}
|
|
25123
25125
|
};
|
|
25124
|
-
let Zr =
|
|
25126
|
+
let Zr = dn;
|
|
25125
25127
|
Ar = /* @__PURE__ */ new WeakMap(), p(Zr, "createRequest", (e) => {
|
|
25126
25128
|
var r;
|
|
25127
25129
|
if ((r = e.payload) != null && r._bolt)
|
|
@@ -25176,8 +25178,8 @@ Ar = /* @__PURE__ */ new WeakMap(), p(Zr, "createRequest", (e) => {
|
|
|
25176
25178
|
}
|
|
25177
25179
|
}));
|
|
25178
25180
|
const hd = "transport closed";
|
|
25179
|
-
var
|
|
25180
|
-
const
|
|
25181
|
+
var bi;
|
|
25182
|
+
const ln = class extends wl {
|
|
25181
25183
|
constructor(e, {
|
|
25182
25184
|
id: r,
|
|
25183
25185
|
direction: i,
|
|
@@ -25193,7 +25195,7 @@ const dn = class extends wl {
|
|
|
25193
25195
|
super();
|
|
25194
25196
|
p(this, "awaitQueue");
|
|
25195
25197
|
p(this, "observer");
|
|
25196
|
-
f(this,
|
|
25198
|
+
f(this, bi, void 0);
|
|
25197
25199
|
p(this, "id");
|
|
25198
25200
|
p(this, "serverId");
|
|
25199
25201
|
p(this, "direction");
|
|
@@ -25211,9 +25213,9 @@ const dn = class extends wl {
|
|
|
25211
25213
|
p(this, "consumerTrackEvents");
|
|
25212
25214
|
p(this, "unknownTracksMap");
|
|
25213
25215
|
p(this, "appData");
|
|
25214
|
-
l.debug(`constructor() [id: ${r}, direction: ${i}]`), v(this,
|
|
25216
|
+
l.debug(`constructor() [id: ${r}, direction: ${i}]`), v(this, bi, e), this.id = r, this.direction = i;
|
|
25215
25217
|
const T = R0(h, {});
|
|
25216
|
-
delete T.iceServers, delete T.iceTransportPolicy, delete T.bundlePolicy, delete T.rtcpMuxPolicy, delete T.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 Au(true), this.handler = n(), this.handler.enableHighBitrate = (_ = g == null ? void 0 : g.enableHighBitrate) != null ? _ : false, this.handler.enableStereo = (P = g == null ? void 0 : g.enableStereo) != null ? P : false, this.handler.enableDtx = (A = g == null ? void 0 : g.enableDtx) != null ? A : true, this.handler.init({
|
|
25218
|
+
delete T.iceServers, delete T.iceTransportPolicy, delete T.bundlePolicy, delete T.rtcpMuxPolicy, delete T.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 Au(true), this.handler = n(), this.handler.enableHighBitrate = (_ = g == null ? void 0 : g.enableHighBitrate) != null ? _ : false, this.handler.enableStereo = (P = g == null ? void 0 : g.enableStereo) != null ? P : false, this.handler.enableDtx = (A = g == null ? void 0 : g.enableDtx) != null ? A : true, this.handler.sfu = a(this, bi), this.handler.init({
|
|
25217
25219
|
onTrackHandler: this._ontrack.bind(this),
|
|
25218
25220
|
direction: i,
|
|
25219
25221
|
iceServers: o,
|
|
@@ -25321,7 +25323,7 @@ const dn = class extends wl {
|
|
|
25321
25323
|
this.setServerId(n), yield i(o);
|
|
25322
25324
|
})), !(yield this.transportConnectionPromise))
|
|
25323
25325
|
throw new Error("ice connection failed");
|
|
25324
|
-
if (a(this,
|
|
25326
|
+
if (a(this, bi) === Ae.HIVE && !(yield this.isEventsDCReady))
|
|
25325
25327
|
throw new Error("events datachannel not open");
|
|
25326
25328
|
} catch (r) {
|
|
25327
25329
|
throw l.error("transport failed to connect:", { error: r }), r;
|
|
@@ -25492,19 +25494,19 @@ const dn = class extends wl {
|
|
|
25492
25494
|
closeConsumers(e, r) {
|
|
25493
25495
|
return u(this, null, function* () {
|
|
25494
25496
|
try {
|
|
25495
|
-
const i = e.map((h) => h.transceiver.mid), n =
|
|
25497
|
+
const i = e.map((h) => h.transceiver.mid), n = ln.parseCodecAndFmtpMappings(
|
|
25496
25498
|
this.handler.pc.remoteDescription,
|
|
25497
25499
|
i
|
|
25498
|
-
), o =
|
|
25500
|
+
), o = ln.parseHeaderExtensionMappings(
|
|
25499
25501
|
this.handler.pc.remoteDescription
|
|
25500
25502
|
);
|
|
25501
25503
|
l.info("Stopping transceivers", { consumerIds: e.map(({ id: h }) => h) }), e.forEach((h) => h.close(void 0, true));
|
|
25502
25504
|
let c = yield this.handler.pc.createOffer();
|
|
25503
|
-
l.info("Created offer for closing consumers", { sdp: c.sdp }), c =
|
|
25505
|
+
l.info("Created offer for closing consumers", { sdp: c.sdp }), c = ln.setCodecAndFmtpMappings(
|
|
25504
25506
|
c,
|
|
25505
25507
|
i,
|
|
25506
25508
|
n
|
|
25507
|
-
), c =
|
|
25509
|
+
), c = ln.setHeaderExtensionMappings(
|
|
25508
25510
|
c,
|
|
25509
25511
|
o
|
|
25510
25512
|
), l.info("Updated codec and fmtp mappings in close consumer offer", { sdp: c.sdp }), yield this.setLocalDescription(c), l.info("Successfully set local description in close consumers");
|
|
@@ -25545,7 +25547,7 @@ const dn = class extends wl {
|
|
|
25545
25547
|
const { track: r, transceiver: i, streams: n } = e;
|
|
25546
25548
|
l.info(`track event received [trackId: ${r.id}] [mid: ${i.mid}]`);
|
|
25547
25549
|
let o;
|
|
25548
|
-
a(this,
|
|
25550
|
+
a(this, bi) === Ae.HIVE ? o = `${n[0].id}:${r.kind}` : o = `${i.mid}:${r.kind}`, r.addEventListener("ended", () => {
|
|
25549
25551
|
l.info(`rtc consumer track ended [trackId: ${r.id}]`), this.unknownTracksMap.delete(o);
|
|
25550
25552
|
});
|
|
25551
25553
|
const c = this.consumerTrackEvents.get(o);
|
|
@@ -25650,8 +25652,8 @@ const dn = class extends wl {
|
|
|
25650
25652
|
});
|
|
25651
25653
|
}
|
|
25652
25654
|
};
|
|
25653
|
-
let Du =
|
|
25654
|
-
|
|
25655
|
+
let Du = ln;
|
|
25656
|
+
bi = /* @__PURE__ */ new WeakMap();
|
|
25655
25657
|
function I0() {
|
|
25656
25658
|
if (typeof navigator == "object" && navigator.product === "ReactNative") {
|
|
25657
25659
|
if (typeof RTCPeerConnection == "undefined") {
|
|
@@ -25738,7 +25740,7 @@ class A0 {
|
|
|
25738
25740
|
}
|
|
25739
25741
|
Ho = /* @__PURE__ */ new WeakMap();
|
|
25740
25742
|
const M0 = 2e3;
|
|
25741
|
-
var cs, sa, nt, at, qo, jo,
|
|
25743
|
+
var cs, sa, nt, at, qo, jo, ki, ra, ia, na, Ii, Is, aa, oa, zc, Go, Ou, Nd, Cf, Wo, Nu, Ld, Rf, Vd, wf, xd, bf, Ud, kf, $d, If, Jo, Lu, Ko, Vu;
|
|
25742
25744
|
class D0 extends lt.EventEmitter {
|
|
25743
25745
|
constructor(e, r, i) {
|
|
25744
25746
|
super();
|
|
@@ -25759,7 +25761,7 @@ class D0 extends lt.EventEmitter {
|
|
|
25759
25761
|
f(this, at, void 0);
|
|
25760
25762
|
f(this, qo, void 0);
|
|
25761
25763
|
f(this, jo, void 0);
|
|
25762
|
-
f(this,
|
|
25764
|
+
f(this, ki, void 0);
|
|
25763
25765
|
f(this, ra, void 0);
|
|
25764
25766
|
f(this, ia, void 0);
|
|
25765
25767
|
f(this, na, {
|
|
@@ -25769,27 +25771,27 @@ class D0 extends lt.EventEmitter {
|
|
|
25769
25771
|
},
|
|
25770
25772
|
lastConnectionTime: 0
|
|
25771
25773
|
});
|
|
25772
|
-
f(this,
|
|
25774
|
+
f(this, Ii, void 0);
|
|
25773
25775
|
f(this, Is, "all");
|
|
25774
25776
|
f(this, aa, void 0);
|
|
25775
|
-
switch (v(this, cs, e), v(this,
|
|
25776
|
-
case
|
|
25777
|
+
switch (v(this, cs, e), v(this, ki, r), v(this, aa, i), v(this, sa, new A0(i)), v(this, ra, new C0(r, i)), i) {
|
|
25778
|
+
case Ae.CF: {
|
|
25777
25779
|
v(this, ia, gs);
|
|
25778
25780
|
break;
|
|
25779
25781
|
}
|
|
25780
|
-
case
|
|
25782
|
+
case Ae.HIVE:
|
|
25781
25783
|
default: {
|
|
25782
25784
|
v(this, ia, es);
|
|
25783
25785
|
break;
|
|
25784
25786
|
}
|
|
25785
25787
|
}
|
|
25786
25788
|
a(this, oa, zc).mediaState = {
|
|
25787
|
-
send: { state:
|
|
25788
|
-
recv: { state:
|
|
25789
|
+
send: { state: pn.NEW },
|
|
25790
|
+
recv: { state: pn.NEW }
|
|
25789
25791
|
}, (_a(a(this, cs), "forceRelay") || z.hasFeature(se.FORCE_RELAY)) && v(this, Is, "relay"), l.info(`ICE Transport Policy initially set to ${a(this, Is)}`), x(this, Go, Ou).call(this);
|
|
25790
25792
|
}
|
|
25791
25793
|
get socket() {
|
|
25792
|
-
return a(this,
|
|
25794
|
+
return a(this, ki);
|
|
25793
25795
|
}
|
|
25794
25796
|
get socketHandler() {
|
|
25795
25797
|
return a(this, ra);
|
|
@@ -25850,10 +25852,10 @@ class D0 extends lt.EventEmitter {
|
|
|
25850
25852
|
throw new Error("Method not implemented.");
|
|
25851
25853
|
}
|
|
25852
25854
|
}
|
|
25853
|
-
cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(),
|
|
25855
|
+
cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakSet(), zc = function() {
|
|
25854
25856
|
return a(this, cs).getValue("connectionHandler");
|
|
25855
25857
|
}, Go = /* @__PURE__ */ new WeakSet(), Ou = function() {
|
|
25856
|
-
v(this,
|
|
25858
|
+
v(this, Ii, {
|
|
25857
25859
|
send: void 0,
|
|
25858
25860
|
recv: void 0
|
|
25859
25861
|
});
|
|
@@ -25874,7 +25876,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25874
25876
|
config: {
|
|
25875
25877
|
enableHighBitrate: (h = (d = (c = a(this, cs).getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? h : false,
|
|
25876
25878
|
enableStereo: (T = (g = (m = a(this, cs).getValue("defaults").mediaConfiguration) == null ? void 0 : m.audio) == null ? void 0 : g.enableStereo) != null ? T : false,
|
|
25877
|
-
enableDtx: a(this, aa) ===
|
|
25879
|
+
enableDtx: a(this, aa) === Ae.HIVE ? true : !!P
|
|
25878
25880
|
},
|
|
25879
25881
|
iceTransportPolicy: a(this, Is)
|
|
25880
25882
|
});
|
|
@@ -25930,7 +25932,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25930
25932
|
const { id: r, direction: i } = e;
|
|
25931
25933
|
if (l.info(`Connecting ${i} transport`, {
|
|
25932
25934
|
transport: { id: r, type: i }
|
|
25933
|
-
}), !a(this,
|
|
25935
|
+
}), !a(this, ki).isConnected)
|
|
25934
25936
|
throw new ni("Socket is not connected");
|
|
25935
25937
|
if (e.connectionState === "closed")
|
|
25936
25938
|
throw new ni("Transport is closed");
|
|
@@ -25989,15 +25991,15 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25989
25991
|
}
|
|
25990
25992
|
);
|
|
25991
25993
|
const o = () => {
|
|
25992
|
-
const c = a(this,
|
|
25993
|
-
c !== void 0 && (clearTimeout(c), a(this,
|
|
25994
|
+
const c = a(this, Ii)[r];
|
|
25995
|
+
c !== void 0 && (clearTimeout(c), a(this, Ii)[r] = void 0);
|
|
25994
25996
|
};
|
|
25995
25997
|
switch (n) {
|
|
25996
25998
|
case "connected":
|
|
25997
25999
|
o(), a(this, na).lastConnectionTime = performance.now();
|
|
25998
26000
|
break;
|
|
25999
26001
|
case "disconnected":
|
|
26000
|
-
a(this,
|
|
26002
|
+
a(this, Ii)[r] = setTimeout(() => u(this, null, function* () {
|
|
26001
26003
|
yield x(this, Jo, Lu).call(this, e.direction);
|
|
26002
26004
|
}), M0);
|
|
26003
26005
|
break;
|
|
@@ -26068,7 +26070,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
26068
26070
|
return u(this, null, function* () {
|
|
26069
26071
|
switch (l.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: true }), z.hasFeature(
|
|
26070
26072
|
se.HIVE_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
26071
|
-
) && a(this,
|
|
26073
|
+
) && a(this, ki).isConnected && a(this, na).transportFailureCount[e] > 2 && (l.warn(`Multiple disconnections in ${e} transport, forcing relay`), v(this, Is, "relay")), yield this.setupTransports({ [e]: true }), e) {
|
|
26072
26074
|
case "send": {
|
|
26073
26075
|
l.info("Transport reconnected", { transport: a(this, nt) }), k.emit(I.RESET_PRODUCER_STATE);
|
|
26074
26076
|
break;
|
|
@@ -26081,7 +26083,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
26081
26083
|
l.warn("Unknown transport direction", { transport: { type: e } });
|
|
26082
26084
|
}
|
|
26083
26085
|
x(this, Ko, Vu).call(this, {
|
|
26084
|
-
state:
|
|
26086
|
+
state: pn.CONNECTED,
|
|
26085
26087
|
direction: e
|
|
26086
26088
|
});
|
|
26087
26089
|
});
|
|
@@ -26380,7 +26382,7 @@ class Ph {
|
|
|
26380
26382
|
});
|
|
26381
26383
|
}
|
|
26382
26384
|
}
|
|
26383
|
-
var zo,
|
|
26385
|
+
var zo, Ai, Mr, ca, Yo, ds, Bd, zs, da, Qo, xu, Hd, Mf, qd, Df, jd, Of, Gd, Nf;
|
|
26384
26386
|
class L0 extends D0 {
|
|
26385
26387
|
constructor(e, r, i) {
|
|
26386
26388
|
super(e, r, i);
|
|
@@ -26390,7 +26392,7 @@ class L0 extends D0 {
|
|
|
26390
26392
|
f(this, jd);
|
|
26391
26393
|
f(this, Gd);
|
|
26392
26394
|
f(this, zo, void 0);
|
|
26393
|
-
f(this,
|
|
26395
|
+
f(this, Ai, void 0);
|
|
26394
26396
|
f(this, Mr, void 0);
|
|
26395
26397
|
f(this, ca, void 0);
|
|
26396
26398
|
f(this, Yo, void 0);
|
|
@@ -26406,7 +26408,7 @@ class L0 extends D0 {
|
|
|
26406
26408
|
v(this, Yo, new Ph(this.socketHandler));
|
|
26407
26409
|
}), this.recvTransportConnectedCallback = (n) => u(this, null, function* () {
|
|
26408
26410
|
switch (a(this, ca).clear(), this.nodeType) {
|
|
26409
|
-
case
|
|
26411
|
+
case Ae.CF: {
|
|
26410
26412
|
v(this, ds, new N0(
|
|
26411
26413
|
this.events,
|
|
26412
26414
|
n,
|
|
@@ -26415,7 +26417,7 @@ class L0 extends D0 {
|
|
|
26415
26417
|
));
|
|
26416
26418
|
break;
|
|
26417
26419
|
}
|
|
26418
|
-
case
|
|
26420
|
+
case Ae.HIVE:
|
|
26419
26421
|
default:
|
|
26420
26422
|
v(this, ds, new O0(n));
|
|
26421
26423
|
}
|
|
@@ -26425,7 +26427,7 @@ class L0 extends D0 {
|
|
|
26425
26427
|
return super.socketHandler;
|
|
26426
26428
|
}
|
|
26427
26429
|
get producers() {
|
|
26428
|
-
return a(this,
|
|
26430
|
+
return a(this, Ai);
|
|
26429
26431
|
}
|
|
26430
26432
|
get consumers() {
|
|
26431
26433
|
return a(this, Mr);
|
|
@@ -26434,7 +26436,7 @@ class L0 extends D0 {
|
|
|
26434
26436
|
return a(this, ca);
|
|
26435
26437
|
}
|
|
26436
26438
|
reset() {
|
|
26437
|
-
v(this,
|
|
26439
|
+
v(this, Ai, /* @__PURE__ */ new Map()), v(this, Mr, /* @__PURE__ */ new Map()), v(this, ca, /* @__PURE__ */ new Map());
|
|
26438
26440
|
}
|
|
26439
26441
|
createProducer(e, r) {
|
|
26440
26442
|
return u(this, null, function* () {
|
|
@@ -26469,7 +26471,7 @@ class L0 extends D0 {
|
|
|
26469
26471
|
});
|
|
26470
26472
|
}
|
|
26471
26473
|
closeAllProducers() {
|
|
26472
|
-
return Promise.all(Array.from(a(this,
|
|
26474
|
+
return Promise.all(Array.from(a(this, Ai).entries()).map(([, e]) => e.close()));
|
|
26473
26475
|
}
|
|
26474
26476
|
createConsumer(e) {
|
|
26475
26477
|
return this.createConsumers([e]);
|
|
@@ -26502,7 +26504,7 @@ class L0 extends D0 {
|
|
|
26502
26504
|
});
|
|
26503
26505
|
}
|
|
26504
26506
|
}
|
|
26505
|
-
zo = /* @__PURE__ */ new WeakMap(),
|
|
26507
|
+
zo = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), Yo = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), Bd = /* @__PURE__ */ new WeakMap(), zs = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakSet(), xu = function() {
|
|
26506
26508
|
return u(this, null, function* () {
|
|
26507
26509
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
26508
26510
|
throw new Error("Recv transport is closed");
|
|
@@ -26571,7 +26573,7 @@ zo = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Mr = /*
|
|
|
26571
26573
|
this.producers.delete(e.id), r();
|
|
26572
26574
|
})), e.on("trackended", () => {
|
|
26573
26575
|
l.info("producer::trackended", { producer: q(O({}, e), { status: "UNKNOWN" }) });
|
|
26574
|
-
}), a(this,
|
|
26576
|
+
}), a(this, Ai).set(e.id, e);
|
|
26575
26577
|
}, jd = /* @__PURE__ */ new WeakSet(), Of = function(e) {
|
|
26576
26578
|
return u(this, null, function* () {
|
|
26577
26579
|
try {
|
|
@@ -26596,7 +26598,7 @@ zo = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Mr = /*
|
|
|
26596
26598
|
peerId: e.peerId
|
|
26597
26599
|
});
|
|
26598
26600
|
};
|
|
26599
|
-
var Xo, Zo, ec, la, ua, ha, tc, sc, pa, wt, ls, us,
|
|
26601
|
+
var Xo, Zo, ec, la, ua, ha, tc, sc, pa, wt, ls, us, Mi, Di, Ys, rc, Wd, Lf, Jd, Vf, Kd, xf, zd, Uf;
|
|
26600
26602
|
const Yd = class {
|
|
26601
26603
|
constructor({
|
|
26602
26604
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -26624,8 +26626,8 @@ const Yd = class {
|
|
|
26624
26626
|
f(this, wt, void 0);
|
|
26625
26627
|
f(this, ls, void 0);
|
|
26626
26628
|
f(this, us, false);
|
|
26627
|
-
f(this, Ai, 0);
|
|
26628
26629
|
f(this, Mi, 0);
|
|
26630
|
+
f(this, Di, 0);
|
|
26629
26631
|
f(this, Ys, []);
|
|
26630
26632
|
f(this, rc, void 0);
|
|
26631
26633
|
v(this, la, t), v(this, wt, t), v(this, Xo, e), v(this, Zo, r), v(this, ec, i), v(this, ua, n), v(this, ha, o), v(this, tc, c), v(this, sc, d), v(this, pa, h), v(this, rc, m), v(this, ls, t / 2);
|
|
@@ -26636,10 +26638,10 @@ const Yd = class {
|
|
|
26636
26638
|
processAudioChunk(t) {
|
|
26637
26639
|
var o, c;
|
|
26638
26640
|
const e = x(o = Yd, Kd, xf).call(o, t), r = x(c = Yd, zd, Uf).call(c, t);
|
|
26639
|
-
return x(this, Wd, Lf).call(this, e), e / a(this, ls) > a(this, pa) && e > a(this, wt) && r > a(this, Xo) ? (v(this,
|
|
26641
|
+
return x(this, Wd, Lf).call(this, e), e / a(this, ls) > a(this, pa) && e > a(this, wt) && r > a(this, Xo) ? (v(this, Mi, a(this, Mi) + 1), v(this, Di, a(this, ec)), a(this, Mi) >= a(this, Zo) && v(this, us, true)) : (v(this, Mi, 0), a(this, Di) > 0 ? v(this, Di, a(this, Di) - 1) : a(this, us) && v(this, us, false), a(this, us) || x(this, Jd, Vf).call(this, e)), { energy: e, isVoice: a(this, us) };
|
|
26640
26642
|
}
|
|
26641
26643
|
reset() {
|
|
26642
|
-
v(this, us, false), v(this,
|
|
26644
|
+
v(this, us, false), v(this, Mi, 0), v(this, Di, 0), v(this, wt, a(this, la)), v(this, ls, a(this, la) / 2), v(this, Ys, []);
|
|
26643
26645
|
}
|
|
26644
26646
|
getThresholdInfo() {
|
|
26645
26647
|
return {
|
|
@@ -26650,7 +26652,7 @@ const Yd = class {
|
|
|
26650
26652
|
}
|
|
26651
26653
|
};
|
|
26652
26654
|
let ro = Yd;
|
|
26653
|
-
Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), tc = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakMap(),
|
|
26655
|
+
Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), tc = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap(), rc = /* @__PURE__ */ new WeakMap(), Wd = /* @__PURE__ */ new WeakSet(), Lf = function(t) {
|
|
26654
26656
|
a(this, us) ? v(this, wt, a(this, ha) * a(this, wt) + (1 - a(this, ha)) * t) : v(this, wt, a(this, ua) * a(this, wt) + (1 - a(this, ua)) * a(this, ls)), v(this, wt, Math.max(
|
|
26655
26657
|
a(this, tc),
|
|
26656
26658
|
Math.min(a(this, sc), a(this, wt))
|
|
@@ -26673,7 +26675,7 @@ Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /*
|
|
|
26673
26675
|
return e;
|
|
26674
26676
|
}, f(ro, Kd), f(ro, zd);
|
|
26675
26677
|
const V0 = 60, x0 = 400;
|
|
26676
|
-
var Qs, Xs, hs, Dr, Or, ma,
|
|
26678
|
+
var Qs, Xs, hs, Dr, Or, ma, Oi, ga, Zs, Nr, fa, Qd, $f, ic, Uu, Xd, Ff, Zd, Bf;
|
|
26677
26679
|
const go = class {
|
|
26678
26680
|
constructor(t) {
|
|
26679
26681
|
f(this, Qd);
|
|
@@ -26684,7 +26686,7 @@ const go = class {
|
|
|
26684
26686
|
f(this, Dr, void 0);
|
|
26685
26687
|
f(this, Or, void 0);
|
|
26686
26688
|
f(this, ma, void 0);
|
|
26687
|
-
f(this,
|
|
26689
|
+
f(this, Oi, void 0);
|
|
26688
26690
|
f(this, ga, void 0);
|
|
26689
26691
|
f(this, Zs, void 0);
|
|
26690
26692
|
f(this, Nr, void 0);
|
|
@@ -26706,7 +26708,7 @@ const go = class {
|
|
|
26706
26708
|
return;
|
|
26707
26709
|
const { energy: t } = x(this, Qd, $f).call(this), e = x(i = go, ic, Uu).call(i, t);
|
|
26708
26710
|
let r = 0.9;
|
|
26709
|
-
a(this, fa) !== e && a(this, fa) ? r = 0.9 : e ? r = 0.3 : r = 0.5, v(this,
|
|
26711
|
+
a(this, fa) !== e && a(this, fa) ? r = 0.9 : e ? r = 0.3 : r = 0.5, v(this, Oi, (a(this, Oi) || 0) * (1 - r) + t * r);
|
|
26710
26712
|
}), V0)), a(this, Xs) && clearInterval$1(a(this, Xs)), v(this, Xs, setInterval$1(
|
|
26711
26713
|
x(this, Xd, Ff).bind(this),
|
|
26712
26714
|
x0
|
|
@@ -26721,7 +26723,7 @@ const go = class {
|
|
|
26721
26723
|
}
|
|
26722
26724
|
};
|
|
26723
26725
|
let io = go;
|
|
26724
|
-
Qs = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(),
|
|
26726
|
+
Qs = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), Nr = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), Qd = /* @__PURE__ */ new WeakSet(), $f = function() {
|
|
26725
26727
|
var o;
|
|
26726
26728
|
a(this, Dr).state === "suspended" && a(this, Dr).resume().then(() => {
|
|
26727
26729
|
l.debug("AudioActivityReporter: AudioContext forced resumed");
|
|
@@ -26732,13 +26734,13 @@ Qs = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), hs = /*
|
|
|
26732
26734
|
a(this, Or).getFloatTimeDomainData(t);
|
|
26733
26735
|
const { energy: e, isVoice: r } = a(this, ga).processAudioChunk(t), i = x(o = go, Zd, Bf).call(o, e);
|
|
26734
26736
|
return z.hasFeature(se.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && l.debug(
|
|
26735
|
-
`AudioActivityReporter: producer: ${a(this, hs)}, energy: ${a(this,
|
|
26737
|
+
`AudioActivityReporter: producer: ${a(this, hs)}, energy: ${a(this, Oi)},
|
|
26736
26738
|
slogScale: ${i}, isVoice: ${r}, minEnergy: ${a(this, Zs)},
|
|
26737
26739
|
maxEnergy: ${a(this, Nr)}`
|
|
26738
26740
|
), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: false } : ((!a(this, Zs) || i < a(this, Zs)) && v(this, Zs, i), (!a(this, Nr) || i > a(this, Nr)) && v(this, Nr, i), { energy: (i - a(this, Zs)) / (a(this, Nr) - a(this, Zs)) * 10 || 0, isVoice: r });
|
|
26739
26741
|
}, ic = /* @__PURE__ */ new WeakSet(), Uu = function(t) {
|
|
26740
26742
|
return t < 5;
|
|
26741
|
-
}, Xd = /* @__PURE__ */ new WeakSet(), Ff = function(t = a(this,
|
|
26743
|
+
}, Xd = /* @__PURE__ */ new WeakSet(), Ff = function(t = a(this, Oi)) {
|
|
26742
26744
|
var r;
|
|
26743
26745
|
if (!a(this, hs) || !t) {
|
|
26744
26746
|
z.hasFeature(se.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && l.debug(`AudioActivityReporter: No producerId or energy to report: ${a(this, hs)}`);
|
|
@@ -26815,7 +26817,7 @@ var F0 = Object.defineProperty, B0 = Object.getOwnPropertyDescriptor, pe = (s, t
|
|
|
26815
26817
|
return r && i && F0(t, e, i), i;
|
|
26816
26818
|
};
|
|
26817
26819
|
const Ps = ["video/VP9", "video/VP8"];
|
|
26818
|
-
var nc, ac, ot, J, va, As, vt,
|
|
26820
|
+
var nc, ac, ot, J, va, As, vt, Ni, Li, Vi, oc, Qt, er, cc, xi, Ui, Tt, bt, Lr, sn, el, qf, tl, jf, sl, Gf, dc, $u, rl, Yl, Wf, il, Jf, nl, Kf, al, zf, Ze, pt, $i, no, ol, Yf, cl, Qf, dl, Xf;
|
|
26819
26821
|
const Hf = (Yl = class {
|
|
26820
26822
|
constructor(s, t, e) {
|
|
26821
26823
|
f(this, Lr);
|
|
@@ -26827,7 +26829,7 @@ const Hf = (Yl = class {
|
|
|
26827
26829
|
f(this, nl);
|
|
26828
26830
|
f(this, al);
|
|
26829
26831
|
f(this, Ze);
|
|
26830
|
-
f(this,
|
|
26832
|
+
f(this, $i);
|
|
26831
26833
|
f(this, ol);
|
|
26832
26834
|
f(this, cl);
|
|
26833
26835
|
f(this, dl);
|
|
@@ -26841,15 +26843,15 @@ const Hf = (Yl = class {
|
|
|
26841
26843
|
f(this, va, void 0);
|
|
26842
26844
|
f(this, As, void 0);
|
|
26843
26845
|
f(this, vt, void 0);
|
|
26844
|
-
f(this, Oi, void 0);
|
|
26845
26846
|
f(this, Ni, void 0);
|
|
26846
26847
|
f(this, Li, void 0);
|
|
26848
|
+
f(this, Vi, void 0);
|
|
26847
26849
|
f(this, oc, void 0);
|
|
26848
26850
|
f(this, Qt, null);
|
|
26849
26851
|
f(this, er, void 0);
|
|
26850
26852
|
f(this, cc, void 0);
|
|
26851
|
-
f(this, Vi, void 0);
|
|
26852
26853
|
f(this, xi, void 0);
|
|
26854
|
+
f(this, Ui, void 0);
|
|
26853
26855
|
f(this, Tt, void 0);
|
|
26854
26856
|
f(this, bt, void 0);
|
|
26855
26857
|
var i, n;
|
|
@@ -26857,17 +26859,17 @@ const Hf = (Yl = class {
|
|
|
26857
26859
|
const {
|
|
26858
26860
|
socket: r
|
|
26859
26861
|
} = e;
|
|
26860
|
-
this.mediaJoined = false, v(this,
|
|
26862
|
+
this.mediaJoined = false, v(this, xi, /* @__PURE__ */ new Map([
|
|
26861
26863
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26862
26864
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26863
|
-
])), v(this,
|
|
26865
|
+
])), v(this, Ui, /* @__PURE__ */ new Map([
|
|
26864
26866
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26865
26867
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26866
|
-
])), v(this, As, t), v(this, ot, r), v(this,
|
|
26868
|
+
])), v(this, As, t), v(this, ot, r), v(this, Ni, false), v(this, J, new L0(s, r, t)), v(this, vt, a(this, J).events), v(this, er, /* @__PURE__ */ new Set()), v(this, Tt, /* @__PURE__ */ new Map()), v(this, Li, false), v(this, Vi, new Au()), t === Ae.CF && !navigator.isReactNative && v(this, bt, new io(
|
|
26867
26869
|
a(this, J).socketHandler.audioActivity.bind(a(this, J).socketHandler)
|
|
26868
26870
|
)), this.e2ee = (n = (i = s.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : false, this.handleSocketEvents(), this.handleCallstatsEvents(), v(this, oc, ah(
|
|
26869
26871
|
() => u(this, null, function* () {
|
|
26870
|
-
if (!a(this, Lr,
|
|
26872
|
+
if (!a(this, Lr, sn).mediaJoinAttempted)
|
|
26871
26873
|
return;
|
|
26872
26874
|
const { roomJoined: o } = yield this.joinRoom(
|
|
26873
26875
|
a(this, ac),
|
|
@@ -26885,19 +26887,19 @@ const Hf = (Yl = class {
|
|
|
26885
26887
|
return this.context.getValue("peerId");
|
|
26886
26888
|
}
|
|
26887
26889
|
get mediaJoined() {
|
|
26888
|
-
return a(this, Lr,
|
|
26890
|
+
return a(this, Lr, sn).mediaJoined;
|
|
26889
26891
|
}
|
|
26890
26892
|
set mediaJoined(s) {
|
|
26891
|
-
a(this, Lr,
|
|
26893
|
+
a(this, Lr, sn).mediaJoined = s;
|
|
26892
26894
|
}
|
|
26893
26895
|
reset() {
|
|
26894
|
-
a(this, J).closeAllProducers(), a(this, J).closeAllConsumers(), a(this, Tt).clear(), a(this, er).clear(), v(this, Qt, null), a(this,
|
|
26896
|
+
a(this, J).closeAllProducers(), a(this, J).closeAllConsumers(), a(this, Tt).clear(), a(this, er).clear(), v(this, Qt, null), a(this, Vi).stop(), a(this, J).stopAllTransports(), a(this, J).reset(), v(this, Vi, new Au());
|
|
26895
26897
|
}
|
|
26896
26898
|
joinRoom(n, o) {
|
|
26897
26899
|
return u(this, arguments, function* (s, t, e = false, r = false, i = {}) {
|
|
26898
|
-
a(this, Lr,
|
|
26900
|
+
a(this, Lr, sn).mediaJoinAttempted = true, v(this, Ni, true), e && this.reset();
|
|
26899
26901
|
try {
|
|
26900
|
-
return yield a(this,
|
|
26902
|
+
return yield a(this, Vi).push(
|
|
26901
26903
|
() => x(this, el, qf).call(this, s, t, r, i),
|
|
26902
26904
|
"joinRoom"
|
|
26903
26905
|
);
|
|
@@ -26923,7 +26925,7 @@ const Hf = (Yl = class {
|
|
|
26923
26925
|
leaveRoom() {
|
|
26924
26926
|
return u(this, null, function* () {
|
|
26925
26927
|
var t;
|
|
26926
|
-
a(this, J).stopAllTransports(), v(this,
|
|
26928
|
+
a(this, J).stopAllTransports(), v(this, Li, false), a(this, Lr, sn).mediaJoinAttempted = false;
|
|
26927
26929
|
const s = {
|
|
26928
26930
|
closeRoom: false
|
|
26929
26931
|
};
|
|
@@ -26977,7 +26979,7 @@ const Hf = (Yl = class {
|
|
|
26977
26979
|
}
|
|
26978
26980
|
return this._shareWebcam(s, t);
|
|
26979
26981
|
}
|
|
26980
|
-
const i = x(this, dl, Xf).call(this, s, t), n = _a(this.context, "disableSimulcast"), o = a(this, As) ===
|
|
26982
|
+
const i = x(this, dl, Xf).call(this, s, t), n = _a(this.context, "disableSimulcast"), o = a(this, As) === Ae.CF ? se.ENABLE_CF_SIMULCAST : se.ENABLE_HIVE_SIMULCAST;
|
|
26981
26983
|
!n && z.hasFeature(o) ? (l.info(`Simulcast enabled for SFU: ${a(this, As)}`), i.encodings = PM(s)) : l.info(`Simulcast disabled for webcam producer, SFU: ${a(this, As)}`), z.hasFeature(se.TRACK_HINT) && (i.track.contentHint = z.getValue(
|
|
26982
26984
|
se.TRACK_HINT
|
|
26983
26985
|
));
|
|
@@ -26987,7 +26989,7 @@ const Hf = (Yl = class {
|
|
|
26987
26989
|
i,
|
|
26988
26990
|
c
|
|
26989
26991
|
);
|
|
26990
|
-
return x(this,
|
|
26992
|
+
return x(this, $i, no).call(this, e, d.then((h) => h.id)), d.then((h) => h.track);
|
|
26991
26993
|
});
|
|
26992
26994
|
}
|
|
26993
26995
|
shareWebcam(s) {
|
|
@@ -27004,7 +27006,7 @@ const Hf = (Yl = class {
|
|
|
27004
27006
|
var e, r;
|
|
27005
27007
|
return ((r = (e = a(this, va).sender) == null ? void 0 : e.video) == null ? void 0 : r.codecs.findIndex(
|
|
27006
27008
|
(i) => i.mimeType === t
|
|
27007
|
-
)) >= 0 && a(this,
|
|
27009
|
+
)) >= 0 && a(this, Ui).get(t).size > 0 ? (l.debug(
|
|
27008
27010
|
`Calling _shareWebcam with video codec: ${t}`
|
|
27009
27011
|
), this._shareWebcam(s, t)) : s;
|
|
27010
27012
|
})
|
|
@@ -27035,7 +27037,7 @@ const Hf = (Yl = class {
|
|
|
27035
27037
|
r,
|
|
27036
27038
|
i
|
|
27037
27039
|
);
|
|
27038
|
-
x(this,
|
|
27040
|
+
x(this, $i, no).call(this, fe.SCREENSHARE_VIDEO, n.then((c) => c.id));
|
|
27039
27041
|
let o;
|
|
27040
27042
|
if (e) {
|
|
27041
27043
|
const c = {
|
|
@@ -27047,13 +27049,13 @@ const Hf = (Yl = class {
|
|
|
27047
27049
|
supportsRemoteControl: Ce.isElectron()
|
|
27048
27050
|
},
|
|
27049
27051
|
stopTracks: false,
|
|
27050
|
-
zeroRtpOnPause: a(this, As) !==
|
|
27052
|
+
zeroRtpOnPause: a(this, As) !== Ae.CF
|
|
27051
27053
|
}, d = () => {
|
|
27052
27054
|
};
|
|
27053
27055
|
o = a(this, J).createProducer(
|
|
27054
27056
|
c,
|
|
27055
27057
|
d
|
|
27056
|
-
), x(this,
|
|
27058
|
+
), x(this, $i, no).call(this, fe.SCREENSHARE_AUDIO, o.then((h) => h.id));
|
|
27057
27059
|
}
|
|
27058
27060
|
yield Promise.all([n, o || Promise.resolve()]), W.screenShareStart();
|
|
27059
27061
|
});
|
|
@@ -27083,7 +27085,7 @@ const Hf = (Yl = class {
|
|
|
27083
27085
|
e,
|
|
27084
27086
|
r
|
|
27085
27087
|
);
|
|
27086
|
-
x(this,
|
|
27088
|
+
x(this, $i, no).call(this, fe.MIC, i.then((n) => n.id)), yield i.then((n) => {
|
|
27087
27089
|
a(this, bt) && (a(this, bt).audioTrack = n.track, a(this, bt).producerId = n.id, a(this, bt).start());
|
|
27088
27090
|
});
|
|
27089
27091
|
} catch (t) {
|
|
@@ -27308,7 +27310,7 @@ const Hf = (Yl = class {
|
|
|
27308
27310
|
return;
|
|
27309
27311
|
if (i != null && i.mimeType || (i.mimeType = i.kind === Ms.AUDIO ? "audio/opus" : "video/VP8"), i.kind === Ms.VIDEO && !i.screenShare && ((e = (t = a(this, va).receiver) == null ? void 0 : t.video) == null ? void 0 : e.codecs.findIndex(
|
|
27310
27312
|
(n) => n.mimeType === Ps[0]
|
|
27311
|
-
)) >= 0 && a(this,
|
|
27313
|
+
)) >= 0 && a(this, xi).get(Ps[0]).has(r) && i.mimeType !== Ps[0]) {
|
|
27312
27314
|
l.warn(`Ignoring producer: ${i.producerId}`);
|
|
27313
27315
|
return;
|
|
27314
27316
|
}
|
|
@@ -27415,7 +27417,7 @@ const Hf = (Yl = class {
|
|
|
27415
27417
|
), a(this, ot).on(
|
|
27416
27418
|
a(this, vt).mediaRoomTerminationBroadcastResponse,
|
|
27417
27419
|
() => {
|
|
27418
|
-
!this.mediaJoined && !a(this,
|
|
27420
|
+
!this.mediaJoined && !a(this, Ni) && !a(this, Li) || (l.warn(
|
|
27419
27421
|
"media hub termination broadcast received, rejoining room"
|
|
27420
27422
|
), k.emit(I.ROOM_NODE_DISCONNECTED), a(this, oc).call(this));
|
|
27421
27423
|
}
|
|
@@ -27456,7 +27458,7 @@ const Hf = (Yl = class {
|
|
|
27456
27458
|
if (((r = (e = t == null ? void 0 : t.receiver) == null ? void 0 : e.video) == null ? void 0 : r.codecs.findIndex(
|
|
27457
27459
|
(d) => d.mimeType === c
|
|
27458
27460
|
)) >= 0 || o === Ps.length - 1) {
|
|
27459
|
-
a(this,
|
|
27461
|
+
a(this, Ui).get(c).add(s);
|
|
27460
27462
|
break;
|
|
27461
27463
|
}
|
|
27462
27464
|
}
|
|
@@ -27465,17 +27467,17 @@ const Hf = (Yl = class {
|
|
|
27465
27467
|
if (((n = (i = t == null ? void 0 : t.sender) == null ? void 0 : i.video) == null ? void 0 : n.codecs.findIndex(
|
|
27466
27468
|
(d) => d.mimeType === c
|
|
27467
27469
|
)) >= 0 || o === Ps.length - 1) {
|
|
27468
|
-
a(this,
|
|
27470
|
+
a(this, xi).get(c).add(s);
|
|
27469
27471
|
break;
|
|
27470
27472
|
}
|
|
27471
27473
|
}
|
|
27472
27474
|
}
|
|
27473
27475
|
handlePeerLeaving(s) {
|
|
27474
|
-
z.hasFeature(se.FORCE_VIDEO_CODEC) || (a(this,
|
|
27476
|
+
z.hasFeature(se.FORCE_VIDEO_CODEC) || (a(this, xi).forEach((t) => t.delete(s)), a(this, Ui).forEach((t, e) => {
|
|
27475
27477
|
t.delete(s), t.size === 0 && this.disableWebcam(e);
|
|
27476
27478
|
}));
|
|
27477
27479
|
}
|
|
27478
|
-
}, nc = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(),
|
|
27480
|
+
}, nc = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakSet(), sn = function() {
|
|
27479
27481
|
return this.context.getValue("connectionHandler");
|
|
27480
27482
|
}, el = /* @__PURE__ */ new WeakSet(), qf = function(s, t, e, r) {
|
|
27481
27483
|
return u(this, null, function* () {
|
|
@@ -27493,7 +27495,7 @@ const Hf = (Yl = class {
|
|
|
27493
27495
|
try {
|
|
27494
27496
|
this.mediaJoined = true;
|
|
27495
27497
|
const { roomState: s } = yield a(this, J).socketHandler.notifySelfJoinComplete();
|
|
27496
|
-
return v(this, nc, s.roomUuid), v(this,
|
|
27498
|
+
return v(this, nc, s.roomUuid), v(this, Li, true), v(this, Ni, false), true;
|
|
27497
27499
|
} catch (s) {
|
|
27498
27500
|
return l.error("Error completing room join", { error: s }), this.mediaJoined = false, false;
|
|
27499
27501
|
}
|
|
@@ -27574,7 +27576,7 @@ const Hf = (Yl = class {
|
|
|
27574
27576
|
});
|
|
27575
27577
|
}, al = /* @__PURE__ */ new WeakSet(), zf = function(s) {
|
|
27576
27578
|
return u(this, null, function* () {
|
|
27577
|
-
if (!(a(this, As) ===
|
|
27579
|
+
if (!(a(this, As) === Ae.HIVE || !z.hasFeature(
|
|
27578
27580
|
se.PRECREATE_PRODUCERS
|
|
27579
27581
|
) || !s))
|
|
27580
27582
|
try {
|
|
@@ -27590,7 +27592,7 @@ const Hf = (Yl = class {
|
|
|
27590
27592
|
});
|
|
27591
27593
|
}, Ze = /* @__PURE__ */ new WeakSet(), pt = function(s) {
|
|
27592
27594
|
return a(this, Tt).get(s);
|
|
27593
|
-
},
|
|
27595
|
+
}, $i = /* @__PURE__ */ new WeakSet(), no = function(s, t) {
|
|
27594
27596
|
return a(this, Tt).set(s, t);
|
|
27595
27597
|
}, ol = /* @__PURE__ */ new WeakSet(), Yf = function(s) {
|
|
27596
27598
|
return a(this, Tt).delete(s);
|
|
@@ -27611,7 +27613,7 @@ const Hf = (Yl = class {
|
|
|
27611
27613
|
e2ee: this.e2ee
|
|
27612
27614
|
},
|
|
27613
27615
|
stopTracks: false,
|
|
27614
|
-
zeroRtpOnPause: a(this, As) !==
|
|
27616
|
+
zeroRtpOnPause: a(this, As) !== Ae.CF
|
|
27615
27617
|
};
|
|
27616
27618
|
}, dl = /* @__PURE__ */ new WeakSet(), Xf = function(s, t) {
|
|
27617
27619
|
return {
|
|
@@ -27732,7 +27734,7 @@ function ev(s) {
|
|
|
27732
27734
|
}
|
|
27733
27735
|
s.setValue("roomNodeClient", void 0);
|
|
27734
27736
|
}
|
|
27735
|
-
var H0 = Object.defineProperty, q0 = Object.getOwnPropertyDescriptor,
|
|
27737
|
+
var H0 = Object.defineProperty, q0 = Object.getOwnPropertyDescriptor, Xi = (s, t, e, r) => {
|
|
27736
27738
|
for (var i = r > 1 ? void 0 : r ? q0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
27737
27739
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27738
27740
|
return r && i && H0(t, e, i), i;
|
|
@@ -27872,7 +27874,7 @@ const tv = (Tm = class {
|
|
|
27872
27874
|
if (this.self.roomState === "disconnected")
|
|
27873
27875
|
return;
|
|
27874
27876
|
let { peerId: t } = this;
|
|
27875
|
-
s && z.hasFeature(se.REFRESH_ID_ON_DISCONNECTION) && (t = v4()), a(this, Vr).updateURL(t), y.resetPeerId(t), dt().setHeader("dyte-tracing-id", t),
|
|
27877
|
+
s && z.hasFeature(se.REFRESH_ID_ON_DISCONNECTION) && (t = v4()), a(this, Vr).updateURL(t), y.resetPeerId(t), dt().setHeader("dyte-tracing-id", t), Fi.remapContext(t, a(this, ct)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
27876
27878
|
}), k.on(I.SOCKET_SERVICE_FAILED, () => {
|
|
27877
27879
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
27878
27880
|
}), a(this, ps).on(U.waitingRoomRequestAccepted, () => {
|
|
@@ -28011,25 +28013,25 @@ const tv = (Tm = class {
|
|
|
28011
28013
|
return a(this, ct).getValue("roomNodeClient");
|
|
28012
28014
|
}, Tm);
|
|
28013
28015
|
let Jr = tv;
|
|
28014
|
-
|
|
28016
|
+
Xi([
|
|
28015
28017
|
y.trace("SelfController.resetSelf")
|
|
28016
28018
|
], Jr.prototype, "resetSelf", 1);
|
|
28017
|
-
|
|
28019
|
+
Xi([
|
|
28018
28020
|
y.trace("SelfController.setupEvents")
|
|
28019
28021
|
], Jr.prototype, "setupEvents", 1);
|
|
28020
|
-
|
|
28022
|
+
Xi([
|
|
28021
28023
|
y.trace("SelfController.joinRoom")
|
|
28022
28024
|
], Jr.prototype, "joinRoom", 1);
|
|
28023
|
-
|
|
28025
|
+
Xi([
|
|
28024
28026
|
y.trace("SelfController.leaveRoom")
|
|
28025
28027
|
], Jr.prototype, "leaveRoom", 1);
|
|
28026
|
-
|
|
28028
|
+
Xi([
|
|
28027
28029
|
y.trace("SelfController.joinMediaRoom")
|
|
28028
28030
|
], Jr.prototype, "joinMediaRoom", 1);
|
|
28029
|
-
|
|
28031
|
+
Xi([
|
|
28030
28032
|
y.trace("SelfController.leaveMediaRoom")
|
|
28031
28033
|
], Jr.prototype, "leaveMediaRoom", 1);
|
|
28032
|
-
|
|
28034
|
+
Xi([
|
|
28033
28035
|
y.trace("SelfController.init")
|
|
28034
28036
|
], Jr, "init", 1);
|
|
28035
28037
|
var lc;
|
|
@@ -28262,7 +28264,7 @@ class K0 {
|
|
|
28262
28264
|
U.getPeerInfo,
|
|
28263
28265
|
Bg.toBinary({ peerId: t })
|
|
28264
28266
|
);
|
|
28265
|
-
return
|
|
28267
|
+
return en.fromBinary(e.payload);
|
|
28266
28268
|
});
|
|
28267
28269
|
}
|
|
28268
28270
|
}
|
|
@@ -28462,10 +28464,10 @@ var Y0 = Object.defineProperty, Q0 = (s, t, e) => t in s ? Y0(s, t, { enumerable
|
|
|
28462
28464
|
set exports(s) {
|
|
28463
28465
|
pd = s;
|
|
28464
28466
|
}
|
|
28465
|
-
},
|
|
28467
|
+
}, mn = typeof Reflect == "object" ? Reflect : null, zp = mn && typeof mn.apply == "function" ? mn.apply : function(s, t, e) {
|
|
28466
28468
|
return Function.prototype.apply.call(s, t, e);
|
|
28467
28469
|
}, Yc;
|
|
28468
|
-
|
|
28470
|
+
mn && typeof mn.ownKeys == "function" ? Yc = mn.ownKeys : Object.getOwnPropertySymbols ? Yc = function(s) {
|
|
28469
28471
|
return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s));
|
|
28470
28472
|
} : Yc = function(s) {
|
|
28471
28473
|
return Object.getOwnPropertyNames(s);
|
|
@@ -28784,26 +28786,26 @@ class dD {
|
|
|
28784
28786
|
ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap();
|
|
28785
28787
|
var uv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(uv || {});
|
|
28786
28788
|
const lD = "2", uD = "3";
|
|
28787
|
-
var
|
|
28789
|
+
var Ne, rn, Re, Fe, fr, Ke, ir, $r, ms, nn, Ls, Fu, hv, ao, Qc, Bu, pv, Hu, Xp, md, qu, ju, mv, uo, Xc, ho, gd, fd, Gu, gn, po, mo, vd;
|
|
28788
28790
|
class hD {
|
|
28789
28791
|
constructor(t, e) {
|
|
28790
28792
|
var Q;
|
|
28791
|
-
Se(this, Fu), Se(this, ao), Se(this, Bu), Se(this, Hu), Se(this, md), Se(this, ju), Se(this, uo), Se(this, ho), Se(this, fd), Se(this,
|
|
28793
|
+
Se(this, Fu), Se(this, ao), Se(this, Bu), Se(this, Hu), Se(this, md), Se(this, ju), Se(this, uo), Se(this, ho), Se(this, fd), Se(this, gn), Se(this, mo), Se(this, Ne, void 0), Se(this, rn, void 0), Se(this, Re, void 0), Se(this, Fe, void 0), Se(this, fr, void 0), Se(this, Ke, void 0), Se(this, ir, void 0), Se(this, $r, void 0), Se(this, ms, void 0), Se(this, nn, void 0), Se(this, Ls, void 0);
|
|
28792
28794
|
var r, i, n, o, c, d, h, m, g;
|
|
28793
|
-
de(this,
|
|
28795
|
+
de(this, rn, t), de(this, fr, []), de(this, Ke, new pd()), de(this, ir, true), de(this, ms, false), de(this, Re, e != null ? e : {}), (r = D(this, Re)).autoReconnect != null || (r.autoReconnect = true), (i = D(this, Re)).retryConnectionInterval != null || (i.retryConnectionInterval = 1e3), (n = D(this, Re)).pingTimeout != null || (n.pingTimeout = 3e4), (o = D(this, Re)).connectionTimeout != null || (o.connectionTimeout = 5e3), (c = D(this, Re)).debug != null || (c.debug = true), (d = D(this, Re)).maxReconnectionAttempts != null || (d.maxReconnectionAttempts = 10), (h = D(this, Re)).disconnectOnPingTimeout != null || (h.disconnectOnPingTimeout = true), (m = D(this, Re)).queueOnDisconnect != null || (m.queueOnDisconnect = false), (g = D(this, Re)).flushOnReconnect != null || (g.flushOnReconnect = false), de(this, $r, {
|
|
28794
28796
|
code: void 0,
|
|
28795
28797
|
reason: void 0
|
|
28796
|
-
}), de(this,
|
|
28798
|
+
}), de(this, Fe, (Q = D(this, Re).logger) != null ? Q : new dD(D(this, Re).debug ? "debug" : "info")), de(this, Ls, new cD());
|
|
28797
28799
|
}
|
|
28798
28800
|
get readyState() {
|
|
28799
28801
|
var t;
|
|
28800
|
-
return (t = D(this,
|
|
28802
|
+
return (t = D(this, Ne)) == null ? void 0 : t.readyState;
|
|
28801
28803
|
}
|
|
28802
28804
|
get url() {
|
|
28803
|
-
return D(this,
|
|
28805
|
+
return D(this, rn);
|
|
28804
28806
|
}
|
|
28805
28807
|
updateURL(t) {
|
|
28806
|
-
de(this,
|
|
28808
|
+
de(this, rn, t), we(this, ju, mv).call(this);
|
|
28807
28809
|
}
|
|
28808
28810
|
get config() {
|
|
28809
28811
|
return D(this, Re);
|
|
@@ -28825,37 +28827,37 @@ class hD {
|
|
|
28825
28827
|
0,
|
|
28826
28828
|
1
|
|
28827
28829
|
].includes(this.readyState)) {
|
|
28828
|
-
D(this,
|
|
28830
|
+
D(this, Fe).debug("Websocket was already connecting or connected.");
|
|
28829
28831
|
return;
|
|
28830
28832
|
}
|
|
28831
28833
|
if (D(this, ir) !== false)
|
|
28832
28834
|
return new Promise((e, r) => {
|
|
28833
|
-
we(this,
|
|
28835
|
+
we(this, gn, po).call(this), we(this, mo, vd).call(this);
|
|
28834
28836
|
try {
|
|
28835
|
-
de(this,
|
|
28837
|
+
de(this, Ne, new WebSocket(we(this, Fu, hv).call(this, D(this, rn)))), D(this, Ne).binaryType = "arraybuffer", D(this, Fe).debug("Connecting");
|
|
28836
28838
|
const i = setTimeout(() => {
|
|
28837
|
-
D(this,
|
|
28839
|
+
D(this, Fe).debug("Connection timeout. Closing socket"), de(this, ir, true), we(this, mo, vd).call(this), D(this, Ne).close(3001, "Connection Timeout"), D(this, Re).autoReconnect && !D(this, ms) && (D(this, Ke).emit(
|
|
28838
28840
|
"reconnecting"
|
|
28839
28841
|
), we(this, uo, Xc).call(this)), r(new Error("Connection timed out!"));
|
|
28840
28842
|
}, D(this, Re).connectionTimeout);
|
|
28841
|
-
D(this,
|
|
28842
|
-
D(this,
|
|
28843
|
+
D(this, Ne).onopen = () => {
|
|
28844
|
+
D(this, Fe).debug(`Ready State: ${uv[D(this, Ne).readyState]}`), i && clearTimeout(i), we(this, fd, Gu).call(this), de(this, $r, {
|
|
28843
28845
|
code: void 0,
|
|
28844
28846
|
reason: void 0
|
|
28845
28847
|
}), D(this, Ke).emit(
|
|
28846
28848
|
"connected"
|
|
28847
28849
|
), D(this, Re).flushOnReconnect && this.flush(), e();
|
|
28848
|
-
}, D(this,
|
|
28850
|
+
}, D(this, Ne).onclose = (n) => {
|
|
28849
28851
|
try {
|
|
28850
28852
|
i && clearTimeout(i);
|
|
28851
28853
|
const { code: o, reason: c } = n;
|
|
28852
|
-
r(c), D(this,
|
|
28854
|
+
r(c), D(this, Fe).debug("Socket closed. Close event:", { event: n }), D(this, Fe).debug(`Connection closed code: ${o}`), D(this, Fe).debug(`Connection closed reason: ${c}`), D(this, ms) || we(this, md, qu).call(this, o, c);
|
|
28853
28855
|
} catch (o) {
|
|
28854
28856
|
we(this, ao, Qc).call(this, o);
|
|
28855
28857
|
}
|
|
28856
|
-
}, D(this,
|
|
28858
|
+
}, D(this, Ne).onerror = (n) => {
|
|
28857
28859
|
we(this, ao, Qc).call(this, n);
|
|
28858
|
-
}, D(this,
|
|
28860
|
+
}, D(this, Ne).onmessage = (n) => we(this, Bu, pv).call(this, n);
|
|
28859
28861
|
} catch (i) {
|
|
28860
28862
|
we(this, ao, Qc).call(this, i, r);
|
|
28861
28863
|
}
|
|
@@ -28864,8 +28866,8 @@ class hD {
|
|
|
28864
28866
|
}
|
|
28865
28867
|
send(t, e, r, i) {
|
|
28866
28868
|
const n = { event: t, id: e, payload: r, metadata: i };
|
|
28867
|
-
if (D(this, Re).queueOnDisconnect && (!D(this,
|
|
28868
|
-
return D(this,
|
|
28869
|
+
if (D(this, Re).queueOnDisconnect && (!D(this, Ne) || D(this, Ne).readyState !== 1))
|
|
28870
|
+
return D(this, Fe).debug("Queuing message since socket is not connected!", n), D(this, fr).push(n), false;
|
|
28869
28871
|
const o = lv.encode(n);
|
|
28870
28872
|
return we(this, ho, gd).call(this, o);
|
|
28871
28873
|
}
|
|
@@ -28903,13 +28905,13 @@ class hD {
|
|
|
28903
28905
|
);
|
|
28904
28906
|
}
|
|
28905
28907
|
disconnect() {
|
|
28906
|
-
de(this, ir, false), we(this,
|
|
28908
|
+
de(this, ir, false), we(this, gn, po).call(this), this.removeAllListeners(), de(this, $r, {
|
|
28907
28909
|
code: 1e3,
|
|
28908
28910
|
reason: "Sockrates disconnect method called"
|
|
28909
|
-
}), D(this,
|
|
28911
|
+
}), D(this, Ne).close(1e3, "Sockrates disconnect method called.");
|
|
28910
28912
|
}
|
|
28911
28913
|
}
|
|
28912
|
-
|
|
28914
|
+
Ne = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), ms = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap(), Fu = /* @__PURE__ */ new WeakSet(), hv = function(s) {
|
|
28913
28915
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
28914
28916
|
return s;
|
|
28915
28917
|
if (s.startsWith("https://"))
|
|
@@ -28918,27 +28920,27 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28918
28920
|
return `ws://${s.substring(7)}`;
|
|
28919
28921
|
throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
|
|
28920
28922
|
}, ao = /* @__PURE__ */ new WeakSet(), Qc = function(s, t) {
|
|
28921
|
-
D(this,
|
|
28923
|
+
D(this, Fe).error("Error:", { error: s }), D(this, Ke).emit("errored", { error: s }), t == null || t(s);
|
|
28922
28924
|
}, Bu = /* @__PURE__ */ new WeakSet(), pv = function(s) {
|
|
28923
28925
|
if (we(this, fd, Gu).call(this), s.data === lD) {
|
|
28924
|
-
D(this,
|
|
28926
|
+
D(this, Fe).debug("Received ping from server"), we(this, ho, gd).call(this, uD);
|
|
28925
28927
|
return;
|
|
28926
28928
|
}
|
|
28927
28929
|
const t = lv.decode(s.data), { id: e, payload: r } = t;
|
|
28928
|
-
D(this,
|
|
28930
|
+
D(this, Fe).debug("Received message", { event: t.event, messageID: e }), D(this, Ke).emit(t.event.toString(), { id: e, payload: r });
|
|
28929
28931
|
}, Hu = /* @__PURE__ */ new WeakSet(), Xp = function() {
|
|
28930
|
-
return D(this,
|
|
28932
|
+
return D(this, Ne).readyState === 1;
|
|
28931
28933
|
}, md = /* @__PURE__ */ new WeakSet(), qu = function(s, t) {
|
|
28932
28934
|
de(this, $r, { reason: t, code: s }), D(this, Ke).emit("disconnected", { code: s, reason: t });
|
|
28933
28935
|
}, ju = /* @__PURE__ */ new WeakSet(), mv = function() {
|
|
28934
28936
|
const { reason: s, code: t } = D(this, $r);
|
|
28935
|
-
t && t !== 1e3 && D(this, ir) && D(this, Re).autoReconnect && !D(this, ms) && (D(this,
|
|
28937
|
+
t && t !== 1e3 && D(this, ir) && D(this, Re).autoReconnect && !D(this, ms) && (D(this, Fe).debug(`Triggering reconnection due to ${s}.`), D(this, Ke).emit(
|
|
28936
28938
|
"reconnecting"
|
|
28937
28939
|
), we(this, uo, Xc).call(this));
|
|
28938
28940
|
}, uo = /* @__PURE__ */ new WeakSet(), Xc = function(s = true) {
|
|
28939
28941
|
return u(this, null, function* () {
|
|
28940
28942
|
if (s && D(this, ms)) {
|
|
28941
|
-
D(this,
|
|
28943
|
+
D(this, Fe).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
28942
28944
|
return;
|
|
28943
28945
|
}
|
|
28944
28946
|
if (D(this, ms) || D(this, Ls).reset(), D(this, Re).maxReconnectionAttempts !== null && D(this, Ls).getAttempts() >= D(this, Re).maxReconnectionAttempts) {
|
|
@@ -28947,11 +28949,11 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28947
28949
|
), de(this, ms, false);
|
|
28948
28950
|
return;
|
|
28949
28951
|
}
|
|
28950
|
-
de(this, ms, true), we(this, mo, vd).call(this), we(this,
|
|
28952
|
+
de(this, ms, true), we(this, mo, vd).call(this), we(this, gn, po).call(this);
|
|
28951
28953
|
try {
|
|
28952
28954
|
if (yield D(this, Ls).wait(), D(this, ir) === false)
|
|
28953
28955
|
return;
|
|
28954
|
-
if (D(this,
|
|
28956
|
+
if (D(this, Fe).debug(`Reconnection attempt ${D(this, Ls).getAttempts()}`), D(this, Ke).emit("reconnectAttempt", { attempt: D(this, Ls).getAttempts() }), yield this.connect(), !we(this, Hu, Xp).call(this))
|
|
28955
28957
|
throw Error("Reconnect Failed");
|
|
28956
28958
|
de(this, ms, false), de(this, $r, {
|
|
28957
28959
|
code: void 0,
|
|
@@ -28960,26 +28962,26 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28960
28962
|
"reconnected"
|
|
28961
28963
|
);
|
|
28962
28964
|
} catch (t) {
|
|
28963
|
-
D(this,
|
|
28965
|
+
D(this, Fe).debug("Failed to reconnect."), D(this, Ke).emit("reconnectFailure", { attempt: D(this, Ls).getAttempts() }), we(this, uo, Xc).call(this, false);
|
|
28964
28966
|
}
|
|
28965
28967
|
});
|
|
28966
28968
|
}, ho = /* @__PURE__ */ new WeakSet(), gd = function(s) {
|
|
28967
28969
|
try {
|
|
28968
|
-
return D(this,
|
|
28970
|
+
return D(this, Ne).send(s), true;
|
|
28969
28971
|
} catch (t) {
|
|
28970
|
-
return D(this,
|
|
28972
|
+
return D(this, Fe).error(t.message), false;
|
|
28971
28973
|
}
|
|
28972
28974
|
}, fd = /* @__PURE__ */ new WeakSet(), Gu = function() {
|
|
28973
|
-
this.config.disconnectOnPingTimeout && (D(this,
|
|
28975
|
+
this.config.disconnectOnPingTimeout && (D(this, Fe).debug("Resetting ping timeout"), we(this, gn, po).call(this), de(this, nn, setTimeout(() => {
|
|
28974
28976
|
var s;
|
|
28975
|
-
D(this,
|
|
28977
|
+
D(this, Fe).debug("Disconnecting the socket due to ping timeout"), de(this, ir, true);
|
|
28976
28978
|
const t = 3002, e = "Ping timeout";
|
|
28977
|
-
(s = D(this,
|
|
28979
|
+
(s = D(this, Ne)) == null || s.close(t, e), we(this, md, qu).call(this, t, e);
|
|
28978
28980
|
}, D(this, Re).pingTimeout)));
|
|
28979
|
-
},
|
|
28980
|
-
D(this,
|
|
28981
|
+
}, gn = /* @__PURE__ */ new WeakSet(), po = function() {
|
|
28982
|
+
D(this, nn) && (clearTimeout(D(this, nn)), de(this, nn, void 0));
|
|
28981
28983
|
}, mo = /* @__PURE__ */ new WeakSet(), vd = function() {
|
|
28982
|
-
D(this,
|
|
28984
|
+
D(this, Ne) && (D(this, Ne).onopen = void 0, D(this, Ne).onerror = void 0, D(this, Ne).onmessage = void 0, D(this, Ne).onclose = void 0);
|
|
28983
28985
|
};
|
|
28984
28986
|
var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Il = (s, t, e, r) => {
|
|
28985
28987
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
@@ -28987,7 +28989,7 @@ var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Il = (s, t
|
|
|
28987
28989
|
return r && i && pD(t, e, i), i;
|
|
28988
28990
|
};
|
|
28989
28991
|
const Zp = 65535, gD = 3e3;
|
|
28990
|
-
var xr, be, ke,
|
|
28992
|
+
var xr, be, ke, Ve, Xt, sr, hc, Wu, pc, Ju, ym;
|
|
28991
28993
|
const gv = (ym = class {
|
|
28992
28994
|
constructor(s, {
|
|
28993
28995
|
peerId: t,
|
|
@@ -29017,10 +29019,10 @@ const gv = (ym = class {
|
|
|
29017
29019
|
})), this.handleSocketConnectionEvents();
|
|
29018
29020
|
}
|
|
29019
29021
|
get joinAttempted() {
|
|
29020
|
-
return a(this, ke,
|
|
29022
|
+
return a(this, ke, Ve).socketJoinAttempted;
|
|
29021
29023
|
}
|
|
29022
29024
|
set joinAttempted(s) {
|
|
29023
|
-
a(this, ke,
|
|
29025
|
+
a(this, ke, Ve).socketJoinAttempted = s;
|
|
29024
29026
|
}
|
|
29025
29027
|
get peerId() {
|
|
29026
29028
|
return a(this, sr).getValue("peerId");
|
|
@@ -29029,14 +29031,14 @@ const gv = (ym = class {
|
|
|
29029
29031
|
s !== this.peerId && (v(this, xr, x(this, hc, Wu).call(this, s)), l.debug("SocketService:: Connection URL updated.")), a(this, be).updateURL(a(this, xr));
|
|
29030
29032
|
}
|
|
29031
29033
|
static getSocketEdgeDomain(s) {
|
|
29032
|
-
return
|
|
29034
|
+
return hn({ servicePrefix: "socket-edge", baseURI: s });
|
|
29033
29035
|
}
|
|
29034
29036
|
get url() {
|
|
29035
29037
|
return a(this, xr);
|
|
29036
29038
|
}
|
|
29037
29039
|
connect() {
|
|
29038
29040
|
return u(this, null, function* () {
|
|
29039
|
-
a(this, ke,
|
|
29041
|
+
a(this, ke, Ve).socketJoinAttempted = true, yield a(this, be).connect(), a(this, ke, Ve).socketJoinAttempted = true, a(this, ke, Ve).socketState = {
|
|
29040
29042
|
state: "connected",
|
|
29041
29043
|
reconnected: false,
|
|
29042
29044
|
reconnectionAttempt: void 0
|
|
@@ -29045,7 +29047,7 @@ const gv = (ym = class {
|
|
|
29045
29047
|
}
|
|
29046
29048
|
disconnect() {
|
|
29047
29049
|
return u(this, null, function* () {
|
|
29048
|
-
a(this, ke,
|
|
29050
|
+
a(this, ke, Ve).socketJoinAttempted = false, a(this, be).disconnect(), a(this, ke, Ve).socketJoinAttempted = true, a(this, ke, Ve).socketState = {
|
|
29049
29051
|
state: "disconnected",
|
|
29050
29052
|
reconnected: false,
|
|
29051
29053
|
reconnectionAttempt: void 0
|
|
@@ -29152,45 +29154,45 @@ const gv = (ym = class {
|
|
|
29152
29154
|
}
|
|
29153
29155
|
handleSocketConnectionEvents() {
|
|
29154
29156
|
this.onStateEvent("connected", () => u(this, null, function* () {
|
|
29155
|
-
l.info("SocketService::Connected to socket-edge"), a(this, Xt) && (clearTimeout(a(this, Xt)), v(this, Xt, void 0)), a(this, ke,
|
|
29157
|
+
l.info("SocketService::Connected to socket-edge"), a(this, Xt) && (clearTimeout(a(this, Xt)), v(this, Xt, void 0)), a(this, ke, Ve).updateSocketConnectionState("connected");
|
|
29156
29158
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
29157
29159
|
var i;
|
|
29158
29160
|
l.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: y.location.country });
|
|
29159
|
-
const { recv: e, send: r } = (i = a(this, ke,
|
|
29160
|
-
e != null && e.state && (e == null ? void 0 : e.state) !==
|
|
29161
|
+
const { recv: e, send: r } = (i = a(this, ke, Ve).mediaState) != null ? i : {};
|
|
29162
|
+
e != null && e.state && (e == null ? void 0 : e.state) !== pn.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== pn.CONNECTED ? k.emit(
|
|
29161
29163
|
I.SOCKET_SERVICE_DISCONNECTED,
|
|
29162
29164
|
{
|
|
29163
|
-
joinAttempted: a(this, ke,
|
|
29165
|
+
joinAttempted: a(this, ke, Ve).joinAttempted
|
|
29164
29166
|
}
|
|
29165
29167
|
) : v(this, Xt, setTimeout(() => {
|
|
29166
29168
|
k.emit(
|
|
29167
29169
|
I.SOCKET_SERVICE_DISCONNECTED,
|
|
29168
|
-
{ joinAttempted: a(this, ke,
|
|
29170
|
+
{ joinAttempted: a(this, ke, Ve).joinAttempted }
|
|
29169
29171
|
), v(this, Xt, void 0);
|
|
29170
|
-
}, gD)), a(this, ke,
|
|
29172
|
+
}, gD)), a(this, ke, Ve).updateSocketConnectionState("disconnected");
|
|
29171
29173
|
}), this.onStateEvent("reconnecting", () => u(this, null, function* () {
|
|
29172
|
-
l.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke,
|
|
29174
|
+
l.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke, Ve).updateSocketConnectionState("reconnecting");
|
|
29173
29175
|
})), this.onStateEvent("reconnectAttempt", (t) => u(this, [t], function* ({ attempt: s }) {
|
|
29174
29176
|
l.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
29175
29177
|
socket: {
|
|
29176
29178
|
retryAttempt: s
|
|
29177
29179
|
}
|
|
29178
|
-
}), a(this, ke,
|
|
29180
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnectAttempt", s);
|
|
29179
29181
|
})), this.onStateEvent("reconnectFailure", ({ attempt: s }) => {
|
|
29180
29182
|
l.info("SocketService::Reconnect attempt to socket-edge failed", {
|
|
29181
29183
|
socket: {
|
|
29182
29184
|
retryAttempt: s
|
|
29183
29185
|
}
|
|
29184
|
-
}), a(this, ke,
|
|
29186
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnectFailure", s);
|
|
29185
29187
|
}), this.onStateEvent("reconnected", () => u(this, null, function* () {
|
|
29186
|
-
l.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, ke,
|
|
29187
|
-
wasJoinAttempted: a(this, ke,
|
|
29188
|
-
}), a(this, ke,
|
|
29188
|
+
l.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, ke, Ve).mediaJoinAttempted } }), a(this, Xt) && (clearTimeout(a(this, Xt)), v(this, Xt, void 0)), k.emit(I.SOCKET_SERVICE_RECONNECTED, {
|
|
29189
|
+
wasJoinAttempted: a(this, ke, Ve).mediaJoinAttempted
|
|
29190
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnected");
|
|
29189
29191
|
})), this.onStateEvent("failed", () => u(this, null, function* () {
|
|
29190
|
-
l.info("SocketService::Failed to connect to socket-edge", { country: y.location.country }), k.emit(I.SOCKET_SERVICE_FAILED), a(this, ke,
|
|
29192
|
+
l.info("SocketService::Failed to connect to socket-edge", { country: y.location.country }), k.emit(I.SOCKET_SERVICE_FAILED), a(this, ke, Ve).updateSocketConnectionState("failed");
|
|
29191
29193
|
}));
|
|
29192
29194
|
}
|
|
29193
|
-
}, xr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(),
|
|
29195
|
+
}, xr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(), Ve = function() {
|
|
29194
29196
|
return a(this, sr).getValue("connectionHandler");
|
|
29195
29197
|
}, Xt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakSet(), Wu = function(s) {
|
|
29196
29198
|
let t = gv.getSocketEdgeDomain(a(this, sr).getValue("baseURI"));
|
|
@@ -29326,7 +29328,7 @@ var fD = Object.defineProperty, vD = Object.getOwnPropertyDescriptor, Al = (s, t
|
|
|
29326
29328
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
29327
29329
|
return r && i && fD(t, e, i), i;
|
|
29328
29330
|
};
|
|
29329
|
-
const
|
|
29331
|
+
const an = class {
|
|
29330
29332
|
constructor(s, t) {
|
|
29331
29333
|
p(this, "apiBase");
|
|
29332
29334
|
p(this, "selfController");
|
|
@@ -29366,10 +29368,10 @@ const nn = class {
|
|
|
29366
29368
|
c.setRoomName(i), c.setRoomUUID(i), c.setOrganizationId(n), c.setHeader("dyte-tracing-id", t), s.setValue("apiClient", c);
|
|
29367
29369
|
const d = new lM();
|
|
29368
29370
|
s.setValue("connectionHandler", d);
|
|
29369
|
-
const h =
|
|
29370
|
-
let _ =
|
|
29371
|
+
const h = an.createSocketService(s), m = h.connect(), g = c.getUserDetails(), T = c.getPlugins();
|
|
29372
|
+
let _ = Ae.HIVE, P, A = "";
|
|
29371
29373
|
try {
|
|
29372
|
-
yield
|
|
29374
|
+
yield an.setupFlagsmith(s);
|
|
29373
29375
|
} catch (X) {
|
|
29374
29376
|
l.error("Failed to setup flagsmith", { error: X });
|
|
29375
29377
|
}
|
|
@@ -29390,7 +29392,7 @@ const nn = class {
|
|
|
29390
29392
|
s,
|
|
29391
29393
|
C.viewType,
|
|
29392
29394
|
P.preset.permissions
|
|
29393
|
-
), H =
|
|
29395
|
+
), H = an.setupControllers(
|
|
29394
29396
|
h,
|
|
29395
29397
|
s,
|
|
29396
29398
|
P,
|
|
@@ -29399,7 +29401,7 @@ const nn = class {
|
|
|
29399
29401
|
C,
|
|
29400
29402
|
L
|
|
29401
29403
|
);
|
|
29402
|
-
ZA(C) && ((F =
|
|
29404
|
+
ZA(C) && ((F = an.createRoomNodeClient(s, h).initializeConnection(
|
|
29403
29405
|
P.participant.name,
|
|
29404
29406
|
i,
|
|
29405
29407
|
false,
|
|
@@ -29411,7 +29413,7 @@ const nn = class {
|
|
|
29411
29413
|
);
|
|
29412
29414
|
})), y.location.country = (Q = c.ipInfo) == null ? void 0 : Q.country;
|
|
29413
29415
|
const { controllers: B } = yield H;
|
|
29414
|
-
return QP(), new
|
|
29416
|
+
return QP(), new an(e, B);
|
|
29415
29417
|
});
|
|
29416
29418
|
}
|
|
29417
29419
|
static setupFlagsmith(s) {
|
|
@@ -29435,7 +29437,7 @@ const nn = class {
|
|
|
29435
29437
|
isReactNative: navigator.isReactNative
|
|
29436
29438
|
});
|
|
29437
29439
|
try {
|
|
29438
|
-
const h = (d = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || d ?
|
|
29440
|
+
const h = (d = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || d ? hn({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
29439
29441
|
yield z.identify(
|
|
29440
29442
|
`${nu.PEER}_${t}`,
|
|
29441
29443
|
JSON.parse(JSON.stringify(c)),
|
|
@@ -29455,12 +29457,12 @@ const nn = class {
|
|
|
29455
29457
|
}
|
|
29456
29458
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
29457
29459
|
return u(this, null, function* () {
|
|
29458
|
-
var
|
|
29460
|
+
var Me, V, b;
|
|
29459
29461
|
const c = t.getValue("modules"), { participant: d } = e, h = t.getValue("defaults"), { sfu: m } = t.getValue("roomNodeOptions"), { viewType: g, mediaConstraints: { audio: T } } = n;
|
|
29460
29462
|
t.setValue("viewType", g), t.setValue("defaults", O({
|
|
29461
29463
|
mediaConfiguration: {
|
|
29462
29464
|
audio: {
|
|
29463
|
-
enableHighBitrate: (
|
|
29465
|
+
enableHighBitrate: (Me = T.enableHighBitrate) != null ? Me : false,
|
|
29464
29466
|
enableStereo: (V = T.enableStereo) != null ? V : false
|
|
29465
29467
|
}
|
|
29466
29468
|
}
|
|
@@ -29468,7 +29470,7 @@ const nn = class {
|
|
|
29468
29470
|
let _, P, A, C, L, H, B, F;
|
|
29469
29471
|
const Q = new G0(s);
|
|
29470
29472
|
Pe.socketService = s;
|
|
29471
|
-
const X = new bl(s), oe = new ts(s), et = new K0(s), Pt = ld.create(s, t), ur = new z0(s), Kr = new j0(s), M = new
|
|
29473
|
+
const X = new bl(s), oe = new ts(s), et = new K0(s), Pt = ld.create(s, t), ur = new z0(s), Kr = new j0(s), M = new qi(s), E = yield Jr.init(
|
|
29472
29474
|
t,
|
|
29473
29475
|
Pt,
|
|
29474
29476
|
d,
|
|
@@ -29516,10 +29518,10 @@ const nn = class {
|
|
|
29516
29518
|
"The plugin module cannot be initialized without the `participant` module",
|
|
29517
29519
|
"0102"
|
|
29518
29520
|
);
|
|
29519
|
-
const
|
|
29521
|
+
const Le = yield r;
|
|
29520
29522
|
C = yield _c.init(
|
|
29521
29523
|
t,
|
|
29522
|
-
|
|
29524
|
+
Le,
|
|
29523
29525
|
ur,
|
|
29524
29526
|
oe,
|
|
29525
29527
|
P == null ? void 0 : P.chat,
|
|
@@ -29529,8 +29531,8 @@ const nn = class {
|
|
|
29529
29531
|
);
|
|
29530
29532
|
}
|
|
29531
29533
|
if (c.pip) {
|
|
29532
|
-
const
|
|
29533
|
-
t.setValue("pip",
|
|
29534
|
+
const Le = yield ou._init(t, E.self);
|
|
29535
|
+
t.setValue("pip", Le);
|
|
29534
29536
|
}
|
|
29535
29537
|
}
|
|
29536
29538
|
const ye = {
|
|
@@ -29577,7 +29579,7 @@ const nn = class {
|
|
|
29577
29579
|
});
|
|
29578
29580
|
}
|
|
29579
29581
|
};
|
|
29580
|
-
let bc =
|
|
29582
|
+
let bc = an;
|
|
29581
29583
|
Al([
|
|
29582
29584
|
y.trace("Controller.init")
|
|
29583
29585
|
], bc, "init", 1);
|
|
@@ -29948,7 +29950,7 @@ let jr = (Sm = class {
|
|
|
29948
29950
|
}
|
|
29949
29951
|
static setupContext(t, e, r, i) {
|
|
29950
29952
|
var c;
|
|
29951
|
-
const n =
|
|
29953
|
+
const n = Fi.createContext(t, e), o = O(O({}, BP), e == null ? void 0 : e.modules);
|
|
29952
29954
|
return 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", (c = e.overrides) != null ? c : {}), n.setValue("env", HP({ baseURI: i.baseURI })), n.setValue("defaults", e.defaults || { audio: true, video: true }), n.setValue("onError", e.onError || (() => {
|
|
29953
29955
|
})), n.setValue("cachedUserDetails", vs(e.cachedUserDetails)), n.setValue("sdkVersion", "VERSION_PLACEHOLDER"), n;
|
|
29954
29956
|
}
|