@cloudflare/realtimekit 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/browser.js +15 -15
- package/dist/index.cjs.js +14 -14
- package/dist/index.d.ts +24 -23
- package/dist/index.es.js +597 -595
- package/dist/index.rn.js +14 -14
- package/dist/ts3.4/dist/index.d.ts +23 -22
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4531,10 +4531,10 @@ var lt = {}, Cv = {
|
|
|
4531
4531
|
set exports(s) {
|
|
4532
4532
|
lt = s;
|
|
4533
4533
|
}
|
|
4534
|
-
},
|
|
4534
|
+
}, un = typeof Reflect == "object" ? Reflect : null, Oh = un && typeof un.apply == "function" ? un.apply : function(t, e, r) {
|
|
4535
4535
|
return Function.prototype.apply.call(t, e, r);
|
|
4536
4536
|
}, $c;
|
|
4537
|
-
|
|
4537
|
+
un && typeof un.ownKeys == "function" ? $c = un.ownKeys : Object.getOwnPropertySymbols ? $c = function(t) {
|
|
4538
4538
|
return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
|
|
4539
4539
|
} : $c = function(t) {
|
|
4540
4540
|
return Object.getOwnPropertyNames(t);
|
|
@@ -5571,8 +5571,8 @@ class jm extends lt {
|
|
|
5571
5571
|
d.staleProducerStreamMap = true;
|
|
5572
5572
|
break;
|
|
5573
5573
|
}
|
|
5574
|
-
const
|
|
5575
|
-
if (((A =
|
|
5574
|
+
const Me = this.callStatsInstance.producers.get(R);
|
|
5575
|
+
if (((A = Me == null ? void 0 : Me.track) == null ? void 0 : A.readyState) === "ended")
|
|
5576
5576
|
break;
|
|
5577
5577
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
5578
5578
|
outboundVideoRtpId: [],
|
|
@@ -5590,7 +5590,7 @@ class jm extends lt {
|
|
|
5590
5590
|
totalPacketSendDelay: E.totalPacketSendDelay || 0
|
|
5591
5591
|
};
|
|
5592
5592
|
if (E.mediaType === "video" || E.kind === "video") {
|
|
5593
|
-
const b = E,
|
|
5593
|
+
const b = E, Le = O({
|
|
5594
5594
|
frameHeight: b.frameHeight,
|
|
5595
5595
|
frameWidth: b.frameWidth,
|
|
5596
5596
|
framesEncoded: b.framesEncoded,
|
|
@@ -5613,13 +5613,13 @@ class jm extends lt {
|
|
|
5613
5613
|
scalabilityMode: b.scalabilityMode,
|
|
5614
5614
|
powerEfficientEncoder: b.powerEfficientEncoder
|
|
5615
5615
|
}, V);
|
|
5616
|
-
d.outboundVideoRtp.set(M.id,
|
|
5616
|
+
d.outboundVideoRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(R, ye, Le);
|
|
5617
5617
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
5618
|
-
const b = E,
|
|
5618
|
+
const b = E, Le = O({
|
|
5619
5619
|
retransmittedBytesSent: b.retransmittedBytesSent,
|
|
5620
5620
|
retransmittedPacketsSent: b.retransmittedPacketsSent
|
|
5621
5621
|
}, V);
|
|
5622
|
-
d.outboundAudioRtp.set(M.id,
|
|
5622
|
+
d.outboundAudioRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(R, ye, Le);
|
|
5623
5623
|
}
|
|
5624
5624
|
} else
|
|
5625
5625
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -5650,7 +5650,7 @@ class jm extends lt {
|
|
|
5650
5650
|
inboundVideoRtpId: [],
|
|
5651
5651
|
inboundAudioRtpId: []
|
|
5652
5652
|
});
|
|
5653
|
-
const
|
|
5653
|
+
const Me = {
|
|
5654
5654
|
bytesReceived: E.bytesReceived,
|
|
5655
5655
|
packetsReceived: E.packetsReceived,
|
|
5656
5656
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -5690,7 +5690,7 @@ class jm extends lt {
|
|
|
5690
5690
|
freezeCount: V.freezeCount || 0,
|
|
5691
5691
|
pauseCount: V.pauseCount || 0,
|
|
5692
5692
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
5693
|
-
},
|
|
5693
|
+
}, Me);
|
|
5694
5694
|
b.score = Bm({
|
|
5695
5695
|
frameWidth: b.frameWidth || 0,
|
|
5696
5696
|
framesDecoded: (b.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -5726,7 +5726,7 @@ class jm extends lt {
|
|
|
5726
5726
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
5727
5727
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
5728
5728
|
playoutId: V.playoutId
|
|
5729
|
-
},
|
|
5729
|
+
}, Me);
|
|
5730
5730
|
b.score = Fm({
|
|
5731
5731
|
concealmentEvents: (b.concealmentEvents || 0) - (((X = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : X.concealmentEvents) || 0),
|
|
5732
5732
|
packetsLost: (b.packetsLost || 0) - (((oe = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : oe.packetsLost) || 0),
|
|
@@ -5750,7 +5750,7 @@ class jm extends lt {
|
|
|
5750
5750
|
}
|
|
5751
5751
|
}
|
|
5752
5752
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
5753
|
-
var R, $, ye,
|
|
5753
|
+
var R, $, ye, Me, V, b, Le, Aa, Ma, Da, Oa, Na, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga;
|
|
5754
5754
|
if (M.outboundVideoRtpId.length > 0) {
|
|
5755
5755
|
const me = [];
|
|
5756
5756
|
M.outboundVideoRtpId.forEach((Ol) => {
|
|
@@ -5763,14 +5763,14 @@ class jm extends lt {
|
|
|
5763
5763
|
jitter: ((R = ne.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
5764
5764
|
isScreenShare: this.screenShareProducers.has(E),
|
|
5765
5765
|
packetsSent: (ne.packetsSent || 0) - ((($ = this.videoProducerToStatsMap.get(E)) == null ? void 0 : $.packetsSent) || 0),
|
|
5766
|
-
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (
|
|
5766
|
+
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),
|
|
5767
5767
|
framesEncoded: (ne.framesEncoded || 0) - (((b = this.videoProducerToStatsMap.get(E)) == null ? void 0 : b.framesEncoded) || 0)
|
|
5768
5768
|
}), _.set(E, {
|
|
5769
5769
|
score: +(ne.score * 10).toFixed(),
|
|
5770
5770
|
frameWidth: ne.frameWidth || 0,
|
|
5771
5771
|
frameHeight: ne.frameHeight || 0,
|
|
5772
5772
|
framesPerSecond: ne.framesPerSecond || 0,
|
|
5773
|
-
jitter: ((
|
|
5773
|
+
jitter: ((Le = ne.remoteData) == null ? void 0 : Le.jitter) || 0,
|
|
5774
5774
|
isScreenShare: this.screenShareProducers.has(E),
|
|
5775
5775
|
packetsLostPercentage: Zc({
|
|
5776
5776
|
packetsSent: (ne.packetsSent || 0) - (((Aa = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Aa.packetsSent) || 0),
|
|
@@ -6204,8 +6204,8 @@ class Gm extends jm {
|
|
|
6204
6204
|
d.staleProducerStreamMap = true;
|
|
6205
6205
|
break;
|
|
6206
6206
|
}
|
|
6207
|
-
const
|
|
6208
|
-
if (((A =
|
|
6207
|
+
const Me = this.callStatsInstance.producers.get(R);
|
|
6208
|
+
if (((A = Me == null ? void 0 : Me.track) == null ? void 0 : A.readyState) === "ended")
|
|
6209
6209
|
break;
|
|
6210
6210
|
d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
|
|
6211
6211
|
outboundVideoRtpId: [],
|
|
@@ -6223,7 +6223,7 @@ class Gm extends jm {
|
|
|
6223
6223
|
totalPacketSendDelay: E.totalPacketSendDelay || 0
|
|
6224
6224
|
};
|
|
6225
6225
|
if (E.mediaType === "video" || E.kind === "video") {
|
|
6226
|
-
const b = E,
|
|
6226
|
+
const b = E, Le = O({
|
|
6227
6227
|
frameHeight: b.frameHeight,
|
|
6228
6228
|
frameWidth: b.frameWidth,
|
|
6229
6229
|
framesEncoded: b.framesEncoded,
|
|
@@ -6246,13 +6246,13 @@ class Gm extends jm {
|
|
|
6246
6246
|
scalabilityMode: b.scalabilityMode,
|
|
6247
6247
|
powerEfficientEncoder: b.powerEfficientEncoder
|
|
6248
6248
|
}, V);
|
|
6249
|
-
d.outboundVideoRtp.set(M.id,
|
|
6249
|
+
d.outboundVideoRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(R, ye, Le);
|
|
6250
6250
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
6251
|
-
const b = E,
|
|
6251
|
+
const b = E, Le = O({
|
|
6252
6252
|
retransmittedBytesSent: b.retransmittedBytesSent,
|
|
6253
6253
|
retransmittedPacketsSent: b.retransmittedPacketsSent
|
|
6254
6254
|
}, V);
|
|
6255
|
-
d.outboundAudioRtp.set(M.id,
|
|
6255
|
+
d.outboundAudioRtp.set(M.id, Le), d.producerStreamMap.get(R).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(R, ye, Le);
|
|
6256
6256
|
}
|
|
6257
6257
|
} else
|
|
6258
6258
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -6283,7 +6283,7 @@ class Gm extends jm {
|
|
|
6283
6283
|
inboundVideoRtpId: [],
|
|
6284
6284
|
inboundAudioRtpId: []
|
|
6285
6285
|
});
|
|
6286
|
-
const
|
|
6286
|
+
const Me = {
|
|
6287
6287
|
bytesReceived: E.bytesReceived,
|
|
6288
6288
|
packetsReceived: E.packetsReceived,
|
|
6289
6289
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -6323,7 +6323,7 @@ class Gm extends jm {
|
|
|
6323
6323
|
freezeCount: V.freezeCount || 0,
|
|
6324
6324
|
pauseCount: V.pauseCount || 0,
|
|
6325
6325
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
6326
|
-
},
|
|
6326
|
+
}, Me);
|
|
6327
6327
|
b.score = Bm({
|
|
6328
6328
|
frameWidth: b.frameWidth || 0,
|
|
6329
6329
|
framesDecoded: (b.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
|
|
@@ -6359,7 +6359,7 @@ class Gm extends jm {
|
|
|
6359
6359
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
6360
6360
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
6361
6361
|
playoutId: V.playoutId
|
|
6362
|
-
},
|
|
6362
|
+
}, Me);
|
|
6363
6363
|
b.score = Fm({
|
|
6364
6364
|
concealmentEvents: (b.concealmentEvents || 0) - (((X = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : X.concealmentEvents) || 0),
|
|
6365
6365
|
packetsLost: (b.packetsLost || 0) - (((oe = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : oe.packetsLost) || 0),
|
|
@@ -6383,7 +6383,7 @@ class Gm extends jm {
|
|
|
6383
6383
|
}
|
|
6384
6384
|
}
|
|
6385
6385
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
6386
|
-
var R, $, ye,
|
|
6386
|
+
var R, $, ye, Me, V, b, Le, Aa, Ma, Da, Oa, Na, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga;
|
|
6387
6387
|
if (M.outboundVideoRtpId.length > 0) {
|
|
6388
6388
|
const me = [];
|
|
6389
6389
|
M.outboundVideoRtpId.forEach((Ol) => {
|
|
@@ -6396,14 +6396,14 @@ class Gm extends jm {
|
|
|
6396
6396
|
jitter: ((R = ne.remoteData) == null ? void 0 : R.jitter) || 0,
|
|
6397
6397
|
isScreenShare: this.screenShareProducers.has(E),
|
|
6398
6398
|
packetsSent: (ne.packetsSent || 0) - ((($ = this.videoProducerToStatsMap.get(E)) == null ? void 0 : $.packetsSent) || 0),
|
|
6399
|
-
packetsLost: (((ye = ne.remoteData) == null ? void 0 : ye.packetsLost) || 0) - (((V = (
|
|
6399
|
+
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),
|
|
6400
6400
|
framesEncoded: (ne.framesEncoded || 0) - (((b = this.videoProducerToStatsMap.get(E)) == null ? void 0 : b.framesEncoded) || 0)
|
|
6401
6401
|
}), _.set(E, {
|
|
6402
6402
|
score: +(ne.score * 10).toFixed(),
|
|
6403
6403
|
frameWidth: ne.frameWidth || 0,
|
|
6404
6404
|
frameHeight: ne.frameHeight || 0,
|
|
6405
6405
|
framesPerSecond: ne.framesPerSecond || 0,
|
|
6406
|
-
jitter: ((
|
|
6406
|
+
jitter: ((Le = ne.remoteData) == null ? void 0 : Le.jitter) || 0,
|
|
6407
6407
|
isScreenShare: this.screenShareProducers.has(E),
|
|
6408
6408
|
packetsLostPercentage: Zc({
|
|
6409
6409
|
packetsSent: (ne.packetsSent || 0) - (((Aa = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Aa.packetsSent) || 0),
|
|
@@ -7575,7 +7575,7 @@ function ST(s) {
|
|
|
7575
7575
|
return yT.call(s);
|
|
7576
7576
|
}
|
|
7577
7577
|
var ET = "[object Null]", _T = "[object Undefined]", Fh = Hr ? Hr.toStringTag : void 0;
|
|
7578
|
-
function
|
|
7578
|
+
function Gi(s) {
|
|
7579
7579
|
return s == null ? s === void 0 ? _T : ET : Fh && Fh in Object(s) ? vT(s) : ST(s);
|
|
7580
7580
|
}
|
|
7581
7581
|
function Ts(s) {
|
|
@@ -7586,7 +7586,7 @@ var PT = "[object AsyncFunction]", CT = "[object Function]", RT = "[object Gener
|
|
|
7586
7586
|
function Qu(s) {
|
|
7587
7587
|
if (!Ts(s))
|
|
7588
7588
|
return false;
|
|
7589
|
-
var t =
|
|
7589
|
+
var t = Gi(s);
|
|
7590
7590
|
return t == CT || t == RT || t == PT || t == wT;
|
|
7591
7591
|
}
|
|
7592
7592
|
var bT = ys["__core-js_shared__"];
|
|
@@ -7599,7 +7599,7 @@ function kT(s) {
|
|
|
7599
7599
|
return !!Bh && Bh in s;
|
|
7600
7600
|
}
|
|
7601
7601
|
var IT = Function.prototype, AT = IT.toString;
|
|
7602
|
-
function
|
|
7602
|
+
function Wi(s) {
|
|
7603
7603
|
if (s != null) {
|
|
7604
7604
|
try {
|
|
7605
7605
|
return AT.call(s);
|
|
@@ -7619,18 +7619,18 @@ function UT(s) {
|
|
|
7619
7619
|
if (!Ts(s) || kT(s))
|
|
7620
7620
|
return false;
|
|
7621
7621
|
var t = Qu(s) ? xT : DT;
|
|
7622
|
-
return t.test(
|
|
7622
|
+
return t.test(Wi(s));
|
|
7623
7623
|
}
|
|
7624
7624
|
function $T(s, t) {
|
|
7625
7625
|
return s == null ? void 0 : s[t];
|
|
7626
7626
|
}
|
|
7627
|
-
function
|
|
7627
|
+
function Ji(s, t) {
|
|
7628
7628
|
var e = $T(s, t);
|
|
7629
7629
|
return UT(e) ? e : void 0;
|
|
7630
7630
|
}
|
|
7631
|
-
var FT =
|
|
7631
|
+
var FT = Ji(ys, "Map");
|
|
7632
7632
|
const fo = FT;
|
|
7633
|
-
var BT =
|
|
7633
|
+
var BT = Ji(Object, "create");
|
|
7634
7634
|
const vo = BT;
|
|
7635
7635
|
function HT() {
|
|
7636
7636
|
this.__data__ = vo ? vo(null) : {}, this.size = 0;
|
|
@@ -7658,23 +7658,23 @@ function XT(s, t) {
|
|
|
7658
7658
|
var e = this.__data__;
|
|
7659
7659
|
return this.size += this.has(s) ? 0 : 1, e[s] = vo && t === void 0 ? QT : t, this;
|
|
7660
7660
|
}
|
|
7661
|
-
function
|
|
7661
|
+
function Hi(s) {
|
|
7662
7662
|
var t = -1, e = s == null ? 0 : s.length;
|
|
7663
7663
|
for (this.clear(); ++t < e; ) {
|
|
7664
7664
|
var r = s[t];
|
|
7665
7665
|
this.set(r[0], r[1]);
|
|
7666
7666
|
}
|
|
7667
7667
|
}
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7668
|
+
Hi.prototype.clear = HT;
|
|
7669
|
+
Hi.prototype.delete = qT;
|
|
7670
|
+
Hi.prototype.get = JT;
|
|
7671
|
+
Hi.prototype.has = YT;
|
|
7672
|
+
Hi.prototype.set = XT;
|
|
7673
7673
|
function ZT() {
|
|
7674
7674
|
this.size = 0, this.__data__ = {
|
|
7675
|
-
hash: new
|
|
7675
|
+
hash: new Hi(),
|
|
7676
7676
|
map: new (fo || dr)(),
|
|
7677
|
-
string: new
|
|
7677
|
+
string: new Hi()
|
|
7678
7678
|
};
|
|
7679
7679
|
}
|
|
7680
7680
|
function ey(s) {
|
|
@@ -7699,18 +7699,18 @@ function iy(s, t) {
|
|
|
7699
7699
|
var e = Tl(this, s), r = e.size;
|
|
7700
7700
|
return e.set(s, t), this.size += e.size == r ? 0 : 1, this;
|
|
7701
7701
|
}
|
|
7702
|
-
function
|
|
7702
|
+
function Ki(s) {
|
|
7703
7703
|
var t = -1, e = s == null ? 0 : s.length;
|
|
7704
7704
|
for (this.clear(); ++t < e; ) {
|
|
7705
7705
|
var r = s[t];
|
|
7706
7706
|
this.set(r[0], r[1]);
|
|
7707
7707
|
}
|
|
7708
7708
|
}
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7709
|
+
Ki.prototype.clear = ZT;
|
|
7710
|
+
Ki.prototype.delete = ty;
|
|
7711
|
+
Ki.prototype.get = sy;
|
|
7712
|
+
Ki.prototype.has = ry;
|
|
7713
|
+
Ki.prototype.set = iy;
|
|
7714
7714
|
var ny = 200;
|
|
7715
7715
|
function ay(s, t) {
|
|
7716
7716
|
var e = this.__data__;
|
|
@@ -7718,7 +7718,7 @@ function ay(s, t) {
|
|
|
7718
7718
|
var r = e.__data__;
|
|
7719
7719
|
if (!fo || r.length < ny - 1)
|
|
7720
7720
|
return r.push([s, t]), this.size = ++e.size, this;
|
|
7721
|
-
e = this.__data__ = new
|
|
7721
|
+
e = this.__data__ = new Ki(r);
|
|
7722
7722
|
}
|
|
7723
7723
|
return e.set(s, t), this.size = e.size, this;
|
|
7724
7724
|
}
|
|
@@ -7738,7 +7738,7 @@ function oy(s, t) {
|
|
|
7738
7738
|
}
|
|
7739
7739
|
var cy = function() {
|
|
7740
7740
|
try {
|
|
7741
|
-
var s =
|
|
7741
|
+
var s = Ji(Object, "defineProperty");
|
|
7742
7742
|
return s({}, "", {}), s;
|
|
7743
7743
|
} catch (t) {
|
|
7744
7744
|
}
|
|
@@ -7776,7 +7776,7 @@ function Os(s) {
|
|
|
7776
7776
|
}
|
|
7777
7777
|
var hy = "[object Arguments]";
|
|
7778
7778
|
function Hh(s) {
|
|
7779
|
-
return Os(s) &&
|
|
7779
|
+
return Os(s) && Gi(s) == hy;
|
|
7780
7780
|
}
|
|
7781
7781
|
var zm = Object.prototype, py = zm.hasOwnProperty, my = zm.propertyIsEnumerable, gy = Hh(function() {
|
|
7782
7782
|
return arguments;
|
|
@@ -7804,7 +7804,7 @@ var Cy = "[object Arguments]", Ry = "[object Array]", wy = "[object Boolean]", b
|
|
|
7804
7804
|
_e[$y] = _e[Fy] = _e[By] = _e[Hy] = _e[qy] = _e[jy] = _e[Gy] = _e[Wy] = _e[Jy] = true;
|
|
7805
7805
|
_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;
|
|
7806
7806
|
function Ky(s) {
|
|
7807
|
-
return Os(s) && Xm(s.length) && !!_e[
|
|
7807
|
+
return Os(s) && Xm(s.length) && !!_e[Gi(s)];
|
|
7808
7808
|
}
|
|
7809
7809
|
function Zu(s) {
|
|
7810
7810
|
return function(t) {
|
|
@@ -7938,17 +7938,17 @@ function Xl(s) {
|
|
|
7938
7938
|
function ES(s) {
|
|
7939
7939
|
return dg(s, Sc, cg);
|
|
7940
7940
|
}
|
|
7941
|
-
var _S =
|
|
7941
|
+
var _S = Ji(ys, "DataView");
|
|
7942
7942
|
const Zl = _S;
|
|
7943
|
-
var PS =
|
|
7943
|
+
var PS = Ji(ys, "Promise");
|
|
7944
7944
|
const eu = PS;
|
|
7945
|
-
var CS =
|
|
7945
|
+
var CS = Ji(ys, "Set");
|
|
7946
7946
|
const tu = CS;
|
|
7947
|
-
var RS =
|
|
7947
|
+
var RS = Ji(ys, "WeakMap");
|
|
7948
7948
|
const su = RS;
|
|
7949
|
-
var Yh = "[object Map]", wS = "[object Object]", Qh = "[object Promise]", Xh = "[object Set]", Zh = "[object WeakMap]", ep = "[object DataView]", bS =
|
|
7949
|
+
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;
|
|
7950
7950
|
(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) {
|
|
7951
|
-
var t =
|
|
7951
|
+
var t = Gi(s), e = t == wS ? s.constructor : void 0, r = e ? Wi(e) : "";
|
|
7952
7952
|
if (r)
|
|
7953
7953
|
switch (r) {
|
|
7954
7954
|
case bS:
|
|
@@ -8102,7 +8102,7 @@ function ih(s) {
|
|
|
8102
8102
|
}
|
|
8103
8103
|
var jE = "[object Symbol]";
|
|
8104
8104
|
function GE(s) {
|
|
8105
|
-
return typeof s == "symbol" || Os(s) &&
|
|
8105
|
+
return typeof s == "symbol" || Os(s) && Gi(s) == jE;
|
|
8106
8106
|
}
|
|
8107
8107
|
var WE = Object.defineProperty, JE = (s, t) => {
|
|
8108
8108
|
for (var e in t)
|
|
@@ -8788,7 +8788,7 @@ function M_(s) {
|
|
|
8788
8788
|
}
|
|
8789
8789
|
var D_ = "[object Object]", O_ = Function.prototype, N_ = Object.prototype, Sg = O_.toString, L_ = N_.hasOwnProperty, V_ = Sg.call(Object);
|
|
8790
8790
|
function x_(s) {
|
|
8791
|
-
if (!Os(s) ||
|
|
8791
|
+
if (!Os(s) || Gi(s) != D_)
|
|
8792
8792
|
return false;
|
|
8793
8793
|
var t = sh(s);
|
|
8794
8794
|
if (t === null)
|
|
@@ -8805,7 +8805,7 @@ function F_(s) {
|
|
|
8805
8805
|
}
|
|
8806
8806
|
function nd(s) {
|
|
8807
8807
|
var t = -1, e = s == null ? 0 : s.length;
|
|
8808
|
-
for (this.__data__ = new
|
|
8808
|
+
for (this.__data__ = new Ki(); ++t < e; )
|
|
8809
8809
|
this.add(s[t]);
|
|
8810
8810
|
}
|
|
8811
8811
|
nd.prototype.add = nd.prototype.push = $_;
|
|
@@ -9480,21 +9480,21 @@ function _a(s, t) {
|
|
|
9480
9480
|
function HP({ baseURI: s }) {
|
|
9481
9481
|
return s != null && s.includes("preprod.dyte") ? oo.PREPROD : s != null && s.includes("devel.dyte") ? oo.DEVEL : oo.PROD;
|
|
9482
9482
|
}
|
|
9483
|
-
function
|
|
9483
|
+
function hn({ servicePrefix: s, baseURI: t }) {
|
|
9484
9484
|
return `${s}.${t}`;
|
|
9485
9485
|
}
|
|
9486
9486
|
function Dg(s) {
|
|
9487
9487
|
const t = s.getValue("baseURI");
|
|
9488
9488
|
return {
|
|
9489
|
-
location:
|
|
9489
|
+
location: hn({
|
|
9490
9490
|
servicePrefix: "location",
|
|
9491
9491
|
baseURI: t
|
|
9492
9492
|
}),
|
|
9493
|
-
locationLegacy:
|
|
9493
|
+
locationLegacy: hn({
|
|
9494
9494
|
servicePrefix: "location-legacy",
|
|
9495
9495
|
baseURI: t
|
|
9496
9496
|
}),
|
|
9497
|
-
daCollector:
|
|
9497
|
+
daCollector: hn({
|
|
9498
9498
|
servicePrefix: "da-collector",
|
|
9499
9499
|
baseURI: t
|
|
9500
9500
|
})
|
|
@@ -9563,10 +9563,10 @@ class WP {
|
|
|
9563
9563
|
return this.mostRecentPeerId;
|
|
9564
9564
|
}
|
|
9565
9565
|
}
|
|
9566
|
-
const
|
|
9566
|
+
const Fi = new WP(), ae = class {
|
|
9567
9567
|
static get logsEndpoint() {
|
|
9568
|
-
const t =
|
|
9569
|
-
return `https://${
|
|
9568
|
+
const t = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9569
|
+
return `https://${hn({
|
|
9570
9570
|
servicePrefix: "api-silos",
|
|
9571
9571
|
baseURI: t.getValue("baseURI")
|
|
9572
9572
|
})}/otel/logs`;
|
|
@@ -9614,7 +9614,7 @@ const $i = new WP(), ae = class {
|
|
|
9614
9614
|
}
|
|
9615
9615
|
static addLogInCurrentSpan(t, e, r = {}, i = false) {
|
|
9616
9616
|
r != null && r.error && Object.assign(r, { error: Bc(r.error) });
|
|
9617
|
-
const n =
|
|
9617
|
+
const n = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9618
9618
|
if (MP(n) && (kP(r) ? console[t]("DyteInternalLogs:: ", t, e) : console[t](
|
|
9619
9619
|
"DyteInternalLogs:: ",
|
|
9620
9620
|
t,
|
|
@@ -9646,7 +9646,7 @@ const $i = new WP(), ae = class {
|
|
|
9646
9646
|
}
|
|
9647
9647
|
}
|
|
9648
9648
|
static sendOtelLogsToNewRelic(t) {
|
|
9649
|
-
const e =
|
|
9649
|
+
const e = Fi.getContext(ae.meetingMetadata.peerId);
|
|
9650
9650
|
fetch(ae.logsEndpoint, {
|
|
9651
9651
|
method: "POST",
|
|
9652
9652
|
headers: {
|
|
@@ -9906,7 +9906,7 @@ ${this.message}`;
|
|
|
9906
9906
|
r && r.endsWith("00") && (n = true), n && l.error("DyteError", {
|
|
9907
9907
|
error: { message: this.message, name: this.name, code: r }
|
|
9908
9908
|
});
|
|
9909
|
-
const o =
|
|
9909
|
+
const o = Fi.getContext(Fi.getMostRecentPeerId());
|
|
9910
9910
|
if (o) {
|
|
9911
9911
|
const c = o.getValue("onError");
|
|
9912
9912
|
try {
|
|
@@ -10192,15 +10192,15 @@ const fp = 1080, vp = 1920, ZP = (s, t, e, r, i, n) => {
|
|
|
10192
10192
|
let g = d * m, T = h * m, _, P, A, C, L = 1;
|
|
10193
10193
|
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];
|
|
10194
10194
|
};
|
|
10195
|
-
var qt,
|
|
10195
|
+
var qt, fn, tt, jt, De, ns, Fs, mt, xe, vn, Tn, Bs, yn;
|
|
10196
10196
|
const kh = class extends Ut {
|
|
10197
10197
|
constructor(e, r, i, n) {
|
|
10198
10198
|
super();
|
|
10199
10199
|
f(this, qt, void 0);
|
|
10200
|
-
f(this,
|
|
10200
|
+
f(this, fn, void 0);
|
|
10201
10201
|
f(this, tt, void 0);
|
|
10202
10202
|
f(this, jt, void 0);
|
|
10203
|
-
f(this,
|
|
10203
|
+
f(this, De, {
|
|
10204
10204
|
height: fp,
|
|
10205
10205
|
width: vp
|
|
10206
10206
|
});
|
|
@@ -10213,13 +10213,13 @@ const kh = class extends Ut {
|
|
|
10213
10213
|
});
|
|
10214
10214
|
f(this, Fs, void 0);
|
|
10215
10215
|
f(this, mt, {});
|
|
10216
|
-
f(this,
|
|
10217
|
-
f(this, fn, void 0);
|
|
10216
|
+
f(this, xe, void 0);
|
|
10218
10217
|
f(this, vn, void 0);
|
|
10218
|
+
f(this, Tn, void 0);
|
|
10219
10219
|
f(this, Bs, void 0);
|
|
10220
|
-
f(this,
|
|
10220
|
+
f(this, yn, false);
|
|
10221
10221
|
p(this, "cleanupEventListeners", () => {
|
|
10222
|
-
a(this,
|
|
10222
|
+
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());
|
|
10223
10223
|
});
|
|
10224
10224
|
p(this, "enablePipMediaControls", () => {
|
|
10225
10225
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
@@ -10234,7 +10234,7 @@ const kh = class extends Ut {
|
|
|
10234
10234
|
e2 === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
10235
10235
|
});
|
|
10236
10236
|
p(this, "eventCallback", (e2) => {
|
|
10237
|
-
e2 === "CAMERA" && (a(this,
|
|
10237
|
+
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());
|
|
10238
10238
|
});
|
|
10239
10239
|
p(this, "unmountEvents", () => {
|
|
10240
10240
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
@@ -10249,7 +10249,7 @@ const kh = class extends Ut {
|
|
|
10249
10249
|
p(this, "disable", (e2 = false) => {
|
|
10250
10250
|
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();
|
|
10251
10251
|
});
|
|
10252
|
-
v(this,
|
|
10252
|
+
v(this, fn, e), v(this, Bs, "idle"), v(this, xe, r), v(this, ns, {
|
|
10253
10253
|
brand: r.config.designTokens.colors.brand[500],
|
|
10254
10254
|
background: r.config.designTokens.colors.background[1e3],
|
|
10255
10255
|
text: r.config.designTokens.colors.text,
|
|
@@ -10271,10 +10271,10 @@ const kh = class extends Ut {
|
|
|
10271
10271
|
return u(this, null, function* () {
|
|
10272
10272
|
switch (e) {
|
|
10273
10273
|
case "handRaise":
|
|
10274
|
-
v(this,
|
|
10274
|
+
v(this, Tn, r);
|
|
10275
10275
|
break;
|
|
10276
10276
|
case "pin":
|
|
10277
|
-
v(this,
|
|
10277
|
+
v(this, vn, r);
|
|
10278
10278
|
break;
|
|
10279
10279
|
}
|
|
10280
10280
|
});
|
|
@@ -10283,10 +10283,10 @@ const kh = class extends Ut {
|
|
|
10283
10283
|
return u(this, null, function* () {
|
|
10284
10284
|
switch (e) {
|
|
10285
10285
|
case "handRaise":
|
|
10286
|
-
v(this,
|
|
10286
|
+
v(this, Tn, yield Ac(r));
|
|
10287
10287
|
break;
|
|
10288
10288
|
case "pin":
|
|
10289
|
-
v(this,
|
|
10289
|
+
v(this, vn, yield Ac(r));
|
|
10290
10290
|
break;
|
|
10291
10291
|
}
|
|
10292
10292
|
});
|
|
@@ -10303,11 +10303,11 @@ const kh = class extends Ut {
|
|
|
10303
10303
|
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));
|
|
10304
10304
|
}
|
|
10305
10305
|
setupEventListeners() {
|
|
10306
|
-
a(this,
|
|
10306
|
+
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());
|
|
10307
10307
|
}
|
|
10308
10308
|
createCanvas() {
|
|
10309
10309
|
const e = document.createElement("canvas");
|
|
10310
|
-
e.height = a(this,
|
|
10310
|
+
e.height = a(this, De).height, e.width = a(this, De).width, v(this, qt, e);
|
|
10311
10311
|
}
|
|
10312
10312
|
setupMediaSessionEvents() {
|
|
10313
10313
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", () => {
|
|
@@ -10315,12 +10315,12 @@ const kh = class extends Ut {
|
|
|
10315
10315
|
}), this.mountAudioEvents(), this.mountVideoEvents());
|
|
10316
10316
|
}
|
|
10317
10317
|
mountAudioEvents() {
|
|
10318
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this,
|
|
10318
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this, xe).permissions.canProduceAudio && navigator.mediaSession.setActionHandler("togglemicrophone", () => {
|
|
10319
10319
|
this.eventCallback("MIC");
|
|
10320
10320
|
});
|
|
10321
10321
|
}
|
|
10322
10322
|
mountVideoEvents() {
|
|
10323
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this,
|
|
10323
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this, xe).permissions.canProduceVideo && navigator.mediaSession.setActionHandler("togglecamera", () => {
|
|
10324
10324
|
this.eventCallback("CAMERA");
|
|
10325
10325
|
});
|
|
10326
10326
|
}
|
|
@@ -10370,7 +10370,7 @@ const kh = class extends Ut {
|
|
|
10370
10370
|
o - c * 2
|
|
10371
10371
|
), h += o + c, _.restore();
|
|
10372
10372
|
};
|
|
10373
|
-
e.pinned && g(a(this,
|
|
10373
|
+
e.pinned && g(a(this, vn)), e.handRaised && g(a(this, Tn));
|
|
10374
10374
|
}
|
|
10375
10375
|
drawTile(e, r, i) {
|
|
10376
10376
|
var h, m;
|
|
@@ -10378,9 +10378,9 @@ const kh = class extends Ut {
|
|
|
10378
10378
|
return;
|
|
10379
10379
|
const n = a(this, qt).getContext("2d"), o = this.getSources();
|
|
10380
10380
|
let c = 0, d = 0;
|
|
10381
|
-
for (; c < a(this,
|
|
10381
|
+
for (; c < a(this, De).height - 5; ) {
|
|
10382
10382
|
let g = 0;
|
|
10383
|
-
for (; g < a(this,
|
|
10383
|
+
for (; g < a(this, De).width - 5 && d < i; ) {
|
|
10384
10384
|
if ((h = o[d]) != null && h.enabled) {
|
|
10385
10385
|
const T = o[d].element, [_, P, A, C, L, H, B, F] = ZP(
|
|
10386
10386
|
g,
|
|
@@ -10402,21 +10402,21 @@ const kh = class extends Ut {
|
|
|
10402
10402
|
switch (e) {
|
|
10403
10403
|
case 0:
|
|
10404
10404
|
case 1:
|
|
10405
|
-
return [a(this,
|
|
10405
|
+
return [a(this, De).width, a(this, De).height];
|
|
10406
10406
|
case 2:
|
|
10407
|
-
return [Math.floor(a(this,
|
|
10407
|
+
return [Math.floor(a(this, De).width / 2), a(this, De).height];
|
|
10408
10408
|
case 3:
|
|
10409
10409
|
case 4:
|
|
10410
|
-
return [Math.floor(a(this,
|
|
10410
|
+
return [Math.floor(a(this, De).width / 2), Math.floor(a(this, De).height / 2)];
|
|
10411
10411
|
case 5:
|
|
10412
10412
|
case 6:
|
|
10413
|
-
return [Math.floor(a(this,
|
|
10413
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 2)];
|
|
10414
10414
|
case 7:
|
|
10415
10415
|
case 8:
|
|
10416
10416
|
case 9:
|
|
10417
|
-
return [Math.floor(a(this,
|
|
10417
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 3)];
|
|
10418
10418
|
default:
|
|
10419
|
-
return [Math.floor(a(this,
|
|
10419
|
+
return [Math.floor(a(this, De).width / 3), Math.floor(a(this, De).height / 2)];
|
|
10420
10420
|
}
|
|
10421
10421
|
}
|
|
10422
10422
|
paintCanvas() {
|
|
@@ -10427,13 +10427,13 @@ const kh = class extends Ut {
|
|
|
10427
10427
|
}
|
|
10428
10428
|
isSupported() {
|
|
10429
10429
|
var e;
|
|
10430
|
-
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this,
|
|
10430
|
+
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this, xe).config) == null ? void 0 : e.viewType) !== "LIVESTREAM";
|
|
10431
10431
|
}
|
|
10432
10432
|
get isActive() {
|
|
10433
10433
|
return document.pictureInPictureElement !== null;
|
|
10434
10434
|
}
|
|
10435
10435
|
cleanup() {
|
|
10436
|
-
if (v(this,
|
|
10436
|
+
if (v(this, yn, false), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), a(this, tt))
|
|
10437
10437
|
try {
|
|
10438
10438
|
document.body.removeChild(a(this, tt));
|
|
10439
10439
|
} catch (e) {
|
|
@@ -10443,14 +10443,14 @@ const kh = class extends Ut {
|
|
|
10443
10443
|
init({ height: e, width: r } = {}) {
|
|
10444
10444
|
if (!this.isSupported())
|
|
10445
10445
|
throw l.error("DytePip.unsupported"), new Error("Picture-in-picture is not available in this environment");
|
|
10446
|
-
if (a(this,
|
|
10446
|
+
if (a(this, yn))
|
|
10447
10447
|
return;
|
|
10448
|
-
v(this,
|
|
10448
|
+
v(this, yn, true), this.createCanvas(), this.setupMediaSessionEvents();
|
|
10449
10449
|
const i = document.createElement("video");
|
|
10450
|
-
v(this,
|
|
10450
|
+
v(this, De, {
|
|
10451
10451
|
height: e != null ? e : fp,
|
|
10452
10452
|
width: r != null ? r : vp
|
|
10453
|
-
}), i.height = a(this,
|
|
10453
|
+
}), 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 = () => {
|
|
10454
10454
|
try {
|
|
10455
10455
|
this.emit("pipStarted"), a(this, jt).onleavepictureinpicture = () => {
|
|
10456
10456
|
this.emit("pipEnded");
|
|
@@ -10524,7 +10524,7 @@ const kh = class extends Ut {
|
|
|
10524
10524
|
v(this, mt, {});
|
|
10525
10525
|
}
|
|
10526
10526
|
enable() {
|
|
10527
|
-
v(this, Bs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this,
|
|
10527
|
+
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 = () => {
|
|
10528
10528
|
a(this, jt).requestPictureInPicture().then(() => {
|
|
10529
10529
|
v(this, Bs, "active");
|
|
10530
10530
|
});
|
|
@@ -10534,7 +10534,7 @@ const kh = class extends Ut {
|
|
|
10534
10534
|
}
|
|
10535
10535
|
};
|
|
10536
10536
|
let ou = kh;
|
|
10537
|
-
qt = /* @__PURE__ */ new WeakMap(),
|
|
10537
|
+
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();
|
|
10538
10538
|
var or;
|
|
10539
10539
|
(function(s) {
|
|
10540
10540
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -12213,10 +12213,10 @@ class fw extends MessageType {
|
|
|
12213
12213
|
}
|
|
12214
12214
|
}
|
|
12215
12215
|
const vw = new fw();
|
|
12216
|
-
var
|
|
12216
|
+
var Bi;
|
|
12217
12217
|
(function(s) {
|
|
12218
12218
|
s[s.BROWSER = 0] = "BROWSER", s[s.TRACK = 1] = "TRACK", s[s.COMPOSITE = 2] = "COMPOSITE";
|
|
12219
|
-
})(
|
|
12219
|
+
})(Bi || (Bi = {}));
|
|
12220
12220
|
var rr;
|
|
12221
12221
|
(function(s) {
|
|
12222
12222
|
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";
|
|
@@ -12319,7 +12319,7 @@ class Ew extends MessageType {
|
|
|
12319
12319
|
]);
|
|
12320
12320
|
}
|
|
12321
12321
|
}
|
|
12322
|
-
const
|
|
12322
|
+
const en = new Ew();
|
|
12323
12323
|
class _w extends MessageType {
|
|
12324
12324
|
constructor() {
|
|
12325
12325
|
super("socket.room.PeerStatusUpdate", [
|
|
@@ -12430,7 +12430,7 @@ class kw extends MessageType {
|
|
|
12430
12430
|
kind: "scalar",
|
|
12431
12431
|
T: 9
|
|
12432
12432
|
},
|
|
12433
|
-
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
12433
|
+
{ no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Bi] },
|
|
12434
12434
|
{
|
|
12435
12435
|
no: 3,
|
|
12436
12436
|
name: "recording_status",
|
|
@@ -13588,7 +13588,7 @@ class ok extends MessageType {
|
|
|
13588
13588
|
]);
|
|
13589
13589
|
}
|
|
13590
13590
|
}
|
|
13591
|
-
const
|
|
13591
|
+
const zi = new ok();
|
|
13592
13592
|
class ck extends MessageType {
|
|
13593
13593
|
constructor() {
|
|
13594
13594
|
super("socket.chat.GetPaginatedChatMessageRoomRequest", [
|
|
@@ -13631,7 +13631,7 @@ const dk = new ck();
|
|
|
13631
13631
|
class lk extends MessageType {
|
|
13632
13632
|
constructor() {
|
|
13633
13633
|
super("socket.chat.GetPaginatedChatMessageRoomResponse", [
|
|
13634
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
13634
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => zi },
|
|
13635
13635
|
{
|
|
13636
13636
|
no: 2,
|
|
13637
13637
|
name: "next",
|
|
@@ -13645,7 +13645,7 @@ const uk = new lk();
|
|
|
13645
13645
|
class hk extends MessageType {
|
|
13646
13646
|
constructor() {
|
|
13647
13647
|
super("socket.chat.GetChatMessagesResponse", [
|
|
13648
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
13648
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => zi }
|
|
13649
13649
|
]);
|
|
13650
13650
|
}
|
|
13651
13651
|
}
|
|
@@ -13672,7 +13672,7 @@ const mk = new pk();
|
|
|
13672
13672
|
class gk extends MessageType {
|
|
13673
13673
|
constructor() {
|
|
13674
13674
|
super("socket.chat.SendChatMessageToRoomResponse", [
|
|
13675
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13675
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13676
13676
|
]);
|
|
13677
13677
|
}
|
|
13678
13678
|
}
|
|
@@ -13706,7 +13706,7 @@ const vk = new fk();
|
|
|
13706
13706
|
class Tk extends MessageType {
|
|
13707
13707
|
constructor() {
|
|
13708
13708
|
super("socket.chat.SendChatMessageToPeersResponse", [
|
|
13709
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13709
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13710
13710
|
]);
|
|
13711
13711
|
}
|
|
13712
13712
|
}
|
|
@@ -13739,7 +13739,7 @@ const Sk = new yk();
|
|
|
13739
13739
|
class Ek extends MessageType {
|
|
13740
13740
|
constructor() {
|
|
13741
13741
|
super("socket.chat.SendChatMessageToChannelResponse", [
|
|
13742
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13742
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13743
13743
|
]);
|
|
13744
13744
|
}
|
|
13745
13745
|
}
|
|
@@ -13840,7 +13840,7 @@ const Oc = new wk();
|
|
|
13840
13840
|
class bk extends MessageType {
|
|
13841
13841
|
constructor() {
|
|
13842
13842
|
super("socket.chat.EditChatMessageResponse", [
|
|
13843
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
13843
|
+
{ no: 1, name: "message", kind: "message", T: () => zi }
|
|
13844
13844
|
]);
|
|
13845
13845
|
}
|
|
13846
13846
|
}
|
|
@@ -14084,7 +14084,7 @@ const qk = new Hk();
|
|
|
14084
14084
|
class jk extends MessageType {
|
|
14085
14085
|
constructor() {
|
|
14086
14086
|
super("socket.chat.LatestMessageAndUnreadCount", [
|
|
14087
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
14087
|
+
{ no: 1, name: "message", kind: "message", T: () => zi },
|
|
14088
14088
|
{
|
|
14089
14089
|
no: 2,
|
|
14090
14090
|
name: "unread_count",
|
|
@@ -14901,7 +14901,7 @@ class ZI extends MessageType {
|
|
|
14901
14901
|
kind: "scalar",
|
|
14902
14902
|
T: 9
|
|
14903
14903
|
},
|
|
14904
|
-
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType",
|
|
14904
|
+
{ no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", Bi] }
|
|
14905
14905
|
]);
|
|
14906
14906
|
}
|
|
14907
14907
|
}
|
|
@@ -15303,16 +15303,16 @@ const fu = (sm = class {
|
|
|
15303
15303
|
});
|
|
15304
15304
|
}
|
|
15305
15305
|
}, yr = /* @__PURE__ */ new WeakMap(), sm);
|
|
15306
|
-
let
|
|
15306
|
+
let qi = fu;
|
|
15307
15307
|
uh([
|
|
15308
15308
|
y.trace("ChatChannelHandler.createChannel")
|
|
15309
|
-
],
|
|
15309
|
+
], qi.prototype, "createChannel", 1);
|
|
15310
15310
|
uh([
|
|
15311
15311
|
y.trace("ChatChannelHandler.updateChannel")
|
|
15312
|
-
],
|
|
15312
|
+
], qi.prototype, "updateChannel", 1);
|
|
15313
15313
|
uh([
|
|
15314
15314
|
y.trace("ChatChannelHandler.getChannelMembers")
|
|
15315
|
-
],
|
|
15315
|
+
], qi.prototype, "getChannelMembers", 1);
|
|
15316
15316
|
var TA = Object.defineProperty, yA = Object.getOwnPropertyDescriptor, Es = (s, t, e, r) => {
|
|
15317
15317
|
for (var i = r > 1 ? void 0 : r ? yA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
15318
15318
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -15443,7 +15443,7 @@ class ts {
|
|
|
15443
15443
|
const t = yield a(this, st).sendMessagePromise(
|
|
15444
15444
|
Ie.getAllChatChannels
|
|
15445
15445
|
);
|
|
15446
|
-
return Ns.fromBinary(t.payload).chatChannels.map(
|
|
15446
|
+
return Ns.fromBinary(t.payload).chatChannels.map(qi.formatChannel);
|
|
15447
15447
|
} catch (t) {
|
|
15448
15448
|
return [];
|
|
15449
15449
|
}
|
|
@@ -16801,7 +16801,7 @@ const Qr = (im = class {
|
|
|
16801
16801
|
), this.chatChannelSocketHandler.on(
|
|
16802
16802
|
si.createChatChannel,
|
|
16803
16803
|
(s) => {
|
|
16804
|
-
const [t] = s.chatChannels, e =
|
|
16804
|
+
const [t] = s.chatChannels, e = qi.formatChannel(t);
|
|
16805
16805
|
this.chat.channels.push(e), this.chat.emit("channelCreate", e);
|
|
16806
16806
|
}
|
|
16807
16807
|
), this.chatSocketHandler.on(
|
|
@@ -16820,7 +16820,7 @@ const Qr = (im = class {
|
|
|
16820
16820
|
), this.chatChannelSocketHandler.on(
|
|
16821
16821
|
si.updateChatChannel,
|
|
16822
16822
|
(s) => {
|
|
16823
|
-
const [t] = s.chatChannels, e =
|
|
16823
|
+
const [t] = s.chatChannels, e = qi.formatChannel(t);
|
|
16824
16824
|
this.chat.channels = this.chat.channels.map((r) => r.id === e.id ? e : r), this.chat.emit("channelUpdate", e);
|
|
16825
16825
|
}
|
|
16826
16826
|
);
|
|
@@ -16834,23 +16834,23 @@ var VA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, UA = (s, t
|
|
|
16834
16834
|
for (var i = r > 1 ? void 0 : r ? xA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16835
16835
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16836
16836
|
return r && i && VA(t, e, i), i;
|
|
16837
|
-
}, Sd, Qg, Ed, Xg,
|
|
16837
|
+
}, Sd, Qg, Ed, Xg, Sn, En, _o, nm;
|
|
16838
16838
|
let yu = (nm = class extends Ut {
|
|
16839
16839
|
constructor(t, e, r) {
|
|
16840
16840
|
super();
|
|
16841
16841
|
f(this, Sd);
|
|
16842
16842
|
f(this, Ed);
|
|
16843
16843
|
p(this, "items");
|
|
16844
|
-
f(this, yn, void 0);
|
|
16845
16844
|
f(this, Sn, void 0);
|
|
16845
|
+
f(this, En, void 0);
|
|
16846
16846
|
f(this, _o, void 0);
|
|
16847
|
-
v(this, _o, t), v(this,
|
|
16847
|
+
v(this, _o, t), v(this, Sn, e), v(this, En, r), this.items = [];
|
|
16848
16848
|
}
|
|
16849
16849
|
create(t, e, r = false, i = false) {
|
|
16850
16850
|
return u(this, null, function* () {
|
|
16851
16851
|
if (!a(this, Ed, Xg))
|
|
16852
16852
|
throw new w("Can't create polls without joining room", "0705");
|
|
16853
|
-
if (!a(this,
|
|
16853
|
+
if (!a(this, Sn).permissions.polls.canCreate) {
|
|
16854
16854
|
l.error("DytePolls::create::permission_denied");
|
|
16855
16855
|
return;
|
|
16856
16856
|
}
|
|
@@ -16869,7 +16869,7 @@ let yu = (nm = class extends Ut {
|
|
|
16869
16869
|
});
|
|
16870
16870
|
return;
|
|
16871
16871
|
}
|
|
16872
|
-
yield a(this,
|
|
16872
|
+
yield a(this, En).createPoll(
|
|
16873
16873
|
t,
|
|
16874
16874
|
e,
|
|
16875
16875
|
r,
|
|
@@ -16879,11 +16879,11 @@ let yu = (nm = class extends Ut {
|
|
|
16879
16879
|
}
|
|
16880
16880
|
vote(t, e) {
|
|
16881
16881
|
return u(this, null, function* () {
|
|
16882
|
-
if (!a(this,
|
|
16882
|
+
if (!a(this, Sn).permissions.polls.canVote) {
|
|
16883
16883
|
l.error("DytePolls::vote::permission_denied");
|
|
16884
16884
|
return;
|
|
16885
16885
|
}
|
|
16886
|
-
yield a(this,
|
|
16886
|
+
yield a(this, En).votePoll(t, e);
|
|
16887
16887
|
});
|
|
16888
16888
|
}
|
|
16889
16889
|
}, Sd = /* @__PURE__ */ new WeakSet(), Qg = function() {
|
|
@@ -16891,7 +16891,7 @@ let yu = (nm = class extends Ut {
|
|
|
16891
16891
|
}, Ed = /* @__PURE__ */ new WeakSet(), Xg = function() {
|
|
16892
16892
|
var t;
|
|
16893
16893
|
return ((t = a(this, Sd, Qg)) == null ? void 0 : t.socketJoined) === true;
|
|
16894
|
-
},
|
|
16894
|
+
}, Sn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), nm);
|
|
16895
16895
|
yu = UA([
|
|
16896
16896
|
ut("0700")
|
|
16897
16897
|
], yu);
|
|
@@ -16899,32 +16899,32 @@ var $A = Object.defineProperty, FA = Object.getOwnPropertyDescriptor, BA = (s, t
|
|
|
16899
16899
|
for (var i = r > 1 ? void 0 : r ? FA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16900
16900
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
16901
16901
|
return r && i && $A(t, e, i), i;
|
|
16902
|
-
},
|
|
16903
|
-
const
|
|
16902
|
+
}, _n, ci, am;
|
|
16903
|
+
const tn = (am = class {
|
|
16904
16904
|
constructor(s, t, e) {
|
|
16905
16905
|
p(this, "polls");
|
|
16906
|
-
f(this,
|
|
16906
|
+
f(this, _n, void 0);
|
|
16907
16907
|
f(this, ci, void 0);
|
|
16908
|
-
this.polls = new yu(s, t, e), v(this,
|
|
16908
|
+
this.polls = new yu(s, t, e), v(this, _n, t), v(this, ci, e), this.setupEvents();
|
|
16909
16909
|
}
|
|
16910
16910
|
static init(s, t, e) {
|
|
16911
16911
|
return u(this, null, function* () {
|
|
16912
|
-
return new
|
|
16912
|
+
return new tn(s, t, e);
|
|
16913
16913
|
});
|
|
16914
16914
|
}
|
|
16915
16915
|
canViewPolls() {
|
|
16916
|
-
return a(this,
|
|
16916
|
+
return a(this, _n).permissions.polls.canView;
|
|
16917
16917
|
}
|
|
16918
16918
|
setupEvents() {
|
|
16919
16919
|
const s = {
|
|
16920
16920
|
[xs.createPoll]: (r) => {
|
|
16921
|
-
r.poll && this.updatePoll(
|
|
16921
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16922
16922
|
},
|
|
16923
16923
|
[xs.updatePoll]: (r) => {
|
|
16924
|
-
r.poll && this.updatePoll(
|
|
16924
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16925
16925
|
},
|
|
16926
16926
|
[xs.votePoll]: (r) => {
|
|
16927
|
-
r.poll && this.updatePoll(
|
|
16927
|
+
r.poll && this.updatePoll(tn.formatSocketServicePoll(r.poll));
|
|
16928
16928
|
}
|
|
16929
16929
|
}, t = () => {
|
|
16930
16930
|
k.on(I.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
@@ -16939,7 +16939,7 @@ const en = (am = class {
|
|
|
16939
16939
|
a(this, ci).removeListeners(r);
|
|
16940
16940
|
});
|
|
16941
16941
|
};
|
|
16942
|
-
a(this,
|
|
16942
|
+
a(this, _n).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
|
|
16943
16943
|
var i;
|
|
16944
16944
|
(i = r == null ? void 0 : r.polls) != null && i.canView ? (yield this.getPolls(), t()) : (this.polls.items = [], e());
|
|
16945
16945
|
})), this.canViewPolls() && t();
|
|
@@ -16965,7 +16965,7 @@ const en = (am = class {
|
|
|
16965
16965
|
return;
|
|
16966
16966
|
const { polls: t } = XI.fromBinary(s.payload);
|
|
16967
16967
|
this.polls.items = t.map(
|
|
16968
|
-
(e) =>
|
|
16968
|
+
(e) => tn.formatSocketServicePoll(e)
|
|
16969
16969
|
);
|
|
16970
16970
|
});
|
|
16971
16971
|
}
|
|
@@ -16989,8 +16989,8 @@ const en = (am = class {
|
|
|
16989
16989
|
voted: s.votes
|
|
16990
16990
|
};
|
|
16991
16991
|
}
|
|
16992
|
-
},
|
|
16993
|
-
let Zg =
|
|
16992
|
+
}, _n = /* @__PURE__ */ new WeakMap(), ci = /* @__PURE__ */ new WeakMap(), am);
|
|
16993
|
+
let Zg = tn;
|
|
16994
16994
|
BA([
|
|
16995
16995
|
y.trace("PollController.setupEvents")
|
|
16996
16996
|
], Zg.prototype, "setupEvents", 1);
|
|
@@ -16998,21 +16998,21 @@ var HA = Object.defineProperty, qA = Object.getOwnPropertyDescriptor, jA = (s, t
|
|
|
16998
16998
|
for (var i = r > 1 ? void 0 : r ? qA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
16999
16999
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17000
17000
|
return r && i && HA(t, e, i), i;
|
|
17001
|
-
}, ef = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(ef || {}),
|
|
17001
|
+
}, ef = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(ef || {}), Pn, Po, Eu, di, Co, om;
|
|
17002
17002
|
let Su = (om = class extends Ut {
|
|
17003
17003
|
constructor(t, e, r, i, n) {
|
|
17004
17004
|
super();
|
|
17005
17005
|
f(this, Po);
|
|
17006
17006
|
p(this, "selfActiveTab");
|
|
17007
17007
|
p(this, "broadcastTabChanges");
|
|
17008
|
-
f(this,
|
|
17008
|
+
f(this, Pn, void 0);
|
|
17009
17009
|
f(this, di, void 0);
|
|
17010
17010
|
f(this, Co, void 0);
|
|
17011
17011
|
p(this, "viewType");
|
|
17012
17012
|
p(this, "meetingStartedTimestamp");
|
|
17013
17013
|
p(this, "meetingTitle");
|
|
17014
17014
|
p(this, "sessionId");
|
|
17015
|
-
v(this,
|
|
17015
|
+
v(this, Pn, t), v(this, di, e), this.viewType = r, v(this, Co, i), this.meetingTitle = n, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
17016
17016
|
}
|
|
17017
17017
|
get socketState() {
|
|
17018
17018
|
return a(this, Po, Eu).socketState;
|
|
@@ -17021,7 +17021,7 @@ let Su = (om = class extends Ut {
|
|
|
17021
17021
|
return a(this, Po, Eu).mediaState;
|
|
17022
17022
|
}
|
|
17023
17023
|
get meetingId() {
|
|
17024
|
-
return a(this,
|
|
17024
|
+
return a(this, Pn).getValue("meetingId");
|
|
17025
17025
|
}
|
|
17026
17026
|
setBroadcastTabChanges(t) {
|
|
17027
17027
|
if (!a(this, di).permissions.canSpotlight)
|
|
@@ -17045,8 +17045,8 @@ let Su = (om = class extends Ut {
|
|
|
17045
17045
|
currentTab: this.selfActiveTab
|
|
17046
17046
|
});
|
|
17047
17047
|
}
|
|
17048
|
-
},
|
|
17049
|
-
return a(this,
|
|
17048
|
+
}, Pn = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakSet(), Eu = function() {
|
|
17049
|
+
return a(this, Pn).getValue("connectionHandler");
|
|
17050
17050
|
}, di = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), om);
|
|
17051
17051
|
Su = jA([
|
|
17052
17052
|
ut("0800")
|
|
@@ -17145,13 +17145,13 @@ var KA = Object.defineProperty, zA = Object.getOwnPropertyDescriptor, YA = (s, t
|
|
|
17145
17145
|
for (var i = r > 1 ? void 0 : r ? zA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17146
17146
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17147
17147
|
return r && i && KA(t, e, i), i;
|
|
17148
|
-
}, Sr,
|
|
17148
|
+
}, Sr, Cn, _d, cm;
|
|
17149
17149
|
const sf = (cm = class {
|
|
17150
17150
|
constructor(s, t, e, r, i, n) {
|
|
17151
17151
|
p(this, "meta");
|
|
17152
17152
|
p(this, "ai");
|
|
17153
17153
|
f(this, Sr, void 0);
|
|
17154
|
-
f(this,
|
|
17154
|
+
f(this, Cn, void 0);
|
|
17155
17155
|
p(this, "aiSocketHandler");
|
|
17156
17156
|
f(this, _d, void 0);
|
|
17157
17157
|
v(this, _d, s), this.meta = new Su(
|
|
@@ -17160,7 +17160,7 @@ const sf = (cm = class {
|
|
|
17160
17160
|
t.config.viewType,
|
|
17161
17161
|
e,
|
|
17162
17162
|
n
|
|
17163
|
-
), this.ai = r, v(this, Sr, t), v(this,
|
|
17163
|
+
), this.ai = r, v(this, Sr, t), v(this, Cn, e), this.aiSocketHandler = i, t.config.viewType !== At.Chat && this.setupEvents();
|
|
17164
17164
|
}
|
|
17165
17165
|
static init(s, t, e, r, i) {
|
|
17166
17166
|
return u(this, null, function* () {
|
|
@@ -17209,13 +17209,13 @@ const sf = (cm = class {
|
|
|
17209
17209
|
({ score: s }) => {
|
|
17210
17210
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
17211
17211
|
}
|
|
17212
|
-
), a(this, Sr).permissions.canSpotlight && (l.info("DyteMetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this,
|
|
17212
|
+
), a(this, Sr).permissions.canSpotlight && (l.info("DyteMetaController::Asserting Spotlight"), this.meta.selfActiveTab && a(this, Cn).broadcastMessage("spotlight", {
|
|
17213
17213
|
userId: a(this, Sr).userId,
|
|
17214
17214
|
currentTab: this.meta.selfActiveTab
|
|
17215
17215
|
})), k.on(
|
|
17216
17216
|
I.PEER_JOINED_INTERNAL,
|
|
17217
17217
|
(s) => u(this, null, function* () {
|
|
17218
|
-
a(this, Sr).permissions.canSpotlight && this.meta.selfActiveTab && a(this,
|
|
17218
|
+
a(this, Sr).permissions.canSpotlight && this.meta.selfActiveTab && a(this, Cn).broadcastToPeers("spotlight", [s.id], {
|
|
17219
17219
|
userId: a(this, Sr).userId,
|
|
17220
17220
|
currentTab: this.meta.selfActiveTab
|
|
17221
17221
|
});
|
|
@@ -17285,28 +17285,28 @@ const sf = (cm = class {
|
|
|
17285
17285
|
l.debug(`${t} Received transcript for peer ${n} - ${o}: ${c}`);
|
|
17286
17286
|
});
|
|
17287
17287
|
}
|
|
17288
|
-
}, Sr = /* @__PURE__ */ new WeakMap(),
|
|
17288
|
+
}, Sr = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), _d = /* @__PURE__ */ new WeakMap(), cm);
|
|
17289
17289
|
let rf = sf;
|
|
17290
17290
|
YA([
|
|
17291
17291
|
y.trace("MetaController.setupEvents")
|
|
17292
17292
|
], rf.prototype, "setupEvents", 1);
|
|
17293
|
-
var QA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor,
|
|
17293
|
+
var QA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor, Yi = (s, t, e, r) => {
|
|
17294
17294
|
for (var i = r > 1 ? void 0 : r ? XA(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
17295
17295
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17296
17296
|
return r && i && QA(t, e, i), i;
|
|
17297
|
-
}, Gt,
|
|
17297
|
+
}, Gt, Rn, ce, Ro, Cs, as, wo, _u, wn, Gc;
|
|
17298
17298
|
class Gr extends Ut {
|
|
17299
17299
|
constructor(e, r, i, n, o) {
|
|
17300
17300
|
super();
|
|
17301
17301
|
f(this, wo);
|
|
17302
|
-
f(this,
|
|
17302
|
+
f(this, wn);
|
|
17303
17303
|
f(this, Gt, void 0);
|
|
17304
|
-
f(this,
|
|
17304
|
+
f(this, Rn, void 0);
|
|
17305
17305
|
f(this, ce, void 0);
|
|
17306
17306
|
f(this, Ro, void 0);
|
|
17307
17307
|
f(this, Cs, void 0);
|
|
17308
17308
|
f(this, as, void 0);
|
|
17309
|
-
v(this, as, e), v(this, Gt, n), v(this,
|
|
17309
|
+
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();
|
|
17310
17310
|
}
|
|
17311
17311
|
get status() {
|
|
17312
17312
|
return a(this, as).getValue("stageStatus");
|
|
@@ -17364,17 +17364,17 @@ class Gr extends Ut {
|
|
|
17364
17364
|
"2006"
|
|
17365
17365
|
);
|
|
17366
17366
|
if (a(this, ce).permissions.stageAccess === G.Allowed) {
|
|
17367
|
-
x(this,
|
|
17367
|
+
x(this, wn, Gc).call(this, "ACCEPTED_TO_JOIN_STAGE");
|
|
17368
17368
|
return;
|
|
17369
17369
|
}
|
|
17370
|
-
a(this, Gt).requestAccess(), x(this,
|
|
17370
|
+
a(this, Gt).requestAccess(), x(this, wn, Gc).call(this, "REQUESTED_TO_JOIN_STAGE");
|
|
17371
17371
|
});
|
|
17372
17372
|
}
|
|
17373
17373
|
cancelRequestAccess() {
|
|
17374
17374
|
return u(this, null, function* () {
|
|
17375
17375
|
if (!a(this, ce).permissions.stageEnabled)
|
|
17376
17376
|
throw l.error("DyteStage::stage_disabled"), new w("Stage is disabled", "2003");
|
|
17377
|
-
a(this, Gt).cancelRequestAccess(), x(this,
|
|
17377
|
+
a(this, Gt).cancelRequestAccess(), x(this, wn, Gc).call(this, "OFF_STAGE");
|
|
17378
17378
|
});
|
|
17379
17379
|
}
|
|
17380
17380
|
grantAccess(e) {
|
|
@@ -17408,8 +17408,8 @@ class Gr extends Ut {
|
|
|
17408
17408
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || a(this, ce).permissions.stageAccess === G.NotAllowed)
|
|
17409
17409
|
throw new w(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
17410
17410
|
if (yield a(this, Gt).joinStage(), e === At.Livestream) {
|
|
17411
|
-
yield a(this,
|
|
17412
|
-
const { peers: r } = yield a(this,
|
|
17411
|
+
yield a(this, Rn).joinRoom(a(this, ce));
|
|
17412
|
+
const { peers: r } = yield a(this, Rn).getStagePeers();
|
|
17413
17413
|
k.emit(I.SOCKET_PEERS, r);
|
|
17414
17414
|
}
|
|
17415
17415
|
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);
|
|
@@ -17439,32 +17439,32 @@ class Gr extends Ut {
|
|
|
17439
17439
|
});
|
|
17440
17440
|
}
|
|
17441
17441
|
}
|
|
17442
|
-
Gt = /* @__PURE__ */ new WeakMap(),
|
|
17442
|
+
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() {
|
|
17443
17443
|
return a(this, as).getValue("roomNodeClient");
|
|
17444
|
-
},
|
|
17444
|
+
}, wn = /* @__PURE__ */ new WeakSet(), Gc = function(e) {
|
|
17445
17445
|
return u(this, null, function* () {
|
|
17446
17446
|
this.status !== e && a(this, as).setValue("stageStatus", e);
|
|
17447
17447
|
});
|
|
17448
17448
|
};
|
|
17449
|
-
|
|
17449
|
+
Yi([
|
|
17450
17450
|
y.trace("DyteStage.getStageRequests")
|
|
17451
17451
|
], Gr.prototype, "getAccessRequests", 1);
|
|
17452
|
-
|
|
17452
|
+
Yi([
|
|
17453
17453
|
y.trace("DyteStage.requestAccess")
|
|
17454
17454
|
], Gr.prototype, "requestAccess", 1);
|
|
17455
|
-
|
|
17455
|
+
Yi([
|
|
17456
17456
|
y.trace("DyteStage.cancelRequestAccess")
|
|
17457
17457
|
], Gr.prototype, "cancelRequestAccess", 1);
|
|
17458
|
-
|
|
17458
|
+
Yi([
|
|
17459
17459
|
y.trace("DyteStage.grantAccess")
|
|
17460
17460
|
], Gr.prototype, "grantAccess", 1);
|
|
17461
|
-
|
|
17461
|
+
Yi([
|
|
17462
17462
|
y.trace("DyteStage.denyAccess")
|
|
17463
17463
|
], Gr.prototype, "denyAccess", 1);
|
|
17464
|
-
|
|
17464
|
+
Yi([
|
|
17465
17465
|
y.trace("DyteStage.joinStage")
|
|
17466
17466
|
], Gr.prototype, "join", 1);
|
|
17467
|
-
|
|
17467
|
+
Yi([
|
|
17468
17468
|
y.trace("DyteStage.leaveStage")
|
|
17469
17469
|
], Gr.prototype, "leave", 1);
|
|
17470
17470
|
function ZA(s) {
|
|
@@ -17598,7 +17598,7 @@ var rM = Object.defineProperty, iM = Object.getOwnPropertyDescriptor, _l = (s, t
|
|
|
17598
17598
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17599
17599
|
return r && i && rM(t, e, i), i;
|
|
17600
17600
|
};
|
|
17601
|
-
const
|
|
17601
|
+
const Oe = {
|
|
17602
17602
|
getPeer: 14,
|
|
17603
17603
|
getPeers: 15,
|
|
17604
17604
|
chatMessage: 16,
|
|
@@ -17612,7 +17612,7 @@ const De = {
|
|
|
17612
17612
|
stageStatusUpdate: 25,
|
|
17613
17613
|
peerStageStatusUpdate: 26
|
|
17614
17614
|
};
|
|
17615
|
-
var rt, Lt,
|
|
17615
|
+
var rt, Lt, bn, kn, qs, In, ui, An, dm;
|
|
17616
17616
|
let Pa = (dm = class extends Ra {
|
|
17617
17617
|
constructor(t, {
|
|
17618
17618
|
baseURL: e,
|
|
@@ -17637,8 +17637,8 @@ let Pa = (dm = class extends Ra {
|
|
|
17637
17637
|
p(this, "id");
|
|
17638
17638
|
p(this, "name");
|
|
17639
17639
|
f(this, Lt, void 0);
|
|
17640
|
-
f(this, wn, void 0);
|
|
17641
17640
|
f(this, bn, void 0);
|
|
17641
|
+
f(this, kn, void 0);
|
|
17642
17642
|
p(this, "organizationId");
|
|
17643
17643
|
p(this, "picture");
|
|
17644
17644
|
p(this, "private");
|
|
@@ -17649,13 +17649,13 @@ let Pa = (dm = class extends Ra {
|
|
|
17649
17649
|
p(this, "updatedAt");
|
|
17650
17650
|
f(this, qs, void 0);
|
|
17651
17651
|
p(this, "config");
|
|
17652
|
-
f(this,
|
|
17652
|
+
f(this, In, void 0);
|
|
17653
17653
|
p(this, "active");
|
|
17654
17654
|
p(this, "iframes");
|
|
17655
17655
|
p(this, "enabledBy");
|
|
17656
17656
|
f(this, ui, void 0);
|
|
17657
|
-
f(this,
|
|
17658
|
-
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,
|
|
17657
|
+
f(this, An, void 0);
|
|
17658
|
+
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);
|
|
17659
17659
|
}
|
|
17660
17660
|
sendIframeEvent(t) {
|
|
17661
17661
|
this.iframes.size && this.iframes.forEach((e) => {
|
|
@@ -17742,28 +17742,28 @@ let Pa = (dm = class extends Ra {
|
|
|
17742
17742
|
a(this, rt).storeDelete(this.id, r.store, i);
|
|
17743
17743
|
break;
|
|
17744
17744
|
}
|
|
17745
|
-
case
|
|
17745
|
+
case Oe.chatMessage: {
|
|
17746
17746
|
const {
|
|
17747
17747
|
messagePayload: c,
|
|
17748
17748
|
peerIds: d
|
|
17749
17749
|
} = r;
|
|
17750
|
-
if (!a(this,
|
|
17750
|
+
if (!a(this, kn)) {
|
|
17751
17751
|
this.sendIframeEvent({
|
|
17752
|
-
type:
|
|
17752
|
+
type: Oe.chatMessage,
|
|
17753
17753
|
uuid: e.uuid,
|
|
17754
17754
|
payload: { error: "Chat is disabled for this room." }
|
|
17755
17755
|
});
|
|
17756
17756
|
return;
|
|
17757
17757
|
}
|
|
17758
17758
|
try {
|
|
17759
|
-
yield a(this,
|
|
17760
|
-
type:
|
|
17759
|
+
yield a(this, kn).sendMessage(c, d), this.sendIframeEvent({
|
|
17760
|
+
type: Oe.chatMessage,
|
|
17761
17761
|
uuid: e.uuid,
|
|
17762
17762
|
payload: { success: true }
|
|
17763
17763
|
});
|
|
17764
17764
|
} catch (h) {
|
|
17765
17765
|
this.sendIframeEvent({
|
|
17766
|
-
type:
|
|
17766
|
+
type: Oe.chatMessage,
|
|
17767
17767
|
uuid: e.uuid,
|
|
17768
17768
|
payload: {
|
|
17769
17769
|
error: h
|
|
@@ -17772,7 +17772,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17772
17772
|
}
|
|
17773
17773
|
break;
|
|
17774
17774
|
}
|
|
17775
|
-
case
|
|
17775
|
+
case Oe.getPeer: {
|
|
17776
17776
|
let c;
|
|
17777
17777
|
const { peerId: d } = r, h = q(O({}, a(this, Lt)), {
|
|
17778
17778
|
id: a(this, Lt).id,
|
|
@@ -17780,47 +17780,47 @@ let Pa = (dm = class extends Ra {
|
|
|
17780
17780
|
isHidden: a(this, Lt).permissions.hiddenParticipant,
|
|
17781
17781
|
stageStatus: a(this, Lt).stageStatus
|
|
17782
17782
|
});
|
|
17783
|
-
d ? (c = a(this,
|
|
17784
|
-
type:
|
|
17783
|
+
d ? (c = a(this, bn).joined.get(r.peerId), a(this, Lt).id === d && (c = h)) : c = h, this.sendIframeEvent({
|
|
17784
|
+
type: Oe.getPeer,
|
|
17785
17785
|
payload: { peer: c && cd(c) },
|
|
17786
17786
|
uuid: e.uuid
|
|
17787
17787
|
});
|
|
17788
17788
|
break;
|
|
17789
17789
|
}
|
|
17790
|
-
case
|
|
17791
|
-
const c = a(this,
|
|
17790
|
+
case Oe.getPeers: {
|
|
17791
|
+
const c = a(this, bn).joined.toArray().map((d) => cd(d));
|
|
17792
17792
|
this.sendIframeEvent({
|
|
17793
|
-
type:
|
|
17793
|
+
type: Oe.getPeers,
|
|
17794
17794
|
payload: { peers: c },
|
|
17795
17795
|
uuid: e.uuid
|
|
17796
17796
|
});
|
|
17797
17797
|
break;
|
|
17798
17798
|
}
|
|
17799
|
-
case
|
|
17799
|
+
case Oe.getPluginInitiator: {
|
|
17800
17800
|
this.sendIframeEvent({
|
|
17801
|
-
type:
|
|
17801
|
+
type: Oe.getPluginInitiator,
|
|
17802
17802
|
payload: { enabledBy: this.enabledBy },
|
|
17803
17803
|
uuid: e.uuid
|
|
17804
17804
|
});
|
|
17805
17805
|
break;
|
|
17806
17806
|
}
|
|
17807
|
-
case
|
|
17807
|
+
case Oe.getDisplayTitle: {
|
|
17808
17808
|
this.sendIframeEvent({
|
|
17809
|
-
type:
|
|
17810
|
-
payload: { displayTitle: a(this,
|
|
17809
|
+
type: Oe.getDisplayTitle,
|
|
17810
|
+
payload: { displayTitle: a(this, An) },
|
|
17811
17811
|
uuid: e.uuid
|
|
17812
17812
|
});
|
|
17813
17813
|
break;
|
|
17814
17814
|
}
|
|
17815
|
-
case
|
|
17815
|
+
case Oe.getRoomName: {
|
|
17816
17816
|
this.sendIframeEvent({
|
|
17817
|
-
type:
|
|
17817
|
+
type: Oe.getRoomName,
|
|
17818
17818
|
payload: { roomName: a(this, ui).getValue("meetingId") },
|
|
17819
17819
|
uuid: e.uuid
|
|
17820
17820
|
});
|
|
17821
17821
|
break;
|
|
17822
17822
|
}
|
|
17823
|
-
case
|
|
17823
|
+
case Oe.customPluginEventToParent: {
|
|
17824
17824
|
this.emit(e.payload.eventName, e.payload.data);
|
|
17825
17825
|
break;
|
|
17826
17826
|
}
|
|
@@ -17837,7 +17837,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17837
17837
|
}
|
|
17838
17838
|
}
|
|
17839
17839
|
}), this.sendIframeEvent({
|
|
17840
|
-
type:
|
|
17840
|
+
type: Oe.sendData,
|
|
17841
17841
|
uuid: "",
|
|
17842
17842
|
payload: t
|
|
17843
17843
|
}));
|
|
@@ -17849,7 +17849,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17849
17849
|
}
|
|
17850
17850
|
addPluginView(t, e = "default") {
|
|
17851
17851
|
var o;
|
|
17852
|
-
if (!a(this,
|
|
17852
|
+
if (!a(this, In))
|
|
17853
17853
|
throw l.error(
|
|
17854
17854
|
"DytePlugin::addPluginView::no_auth_token_set_for_plugin"
|
|
17855
17855
|
), new w("No auth token set for plugin.", "0602");
|
|
@@ -17857,12 +17857,12 @@ let Pa = (dm = class extends Ra {
|
|
|
17857
17857
|
throw l.error("DytePlugin::addPluginView::iframe_was_not_provided"), new w("Iframe was not provided.", "0603");
|
|
17858
17858
|
this.removePluginView(e);
|
|
17859
17859
|
const r = t, i = new URL(this.baseURL), n = {
|
|
17860
|
-
auth: a(this,
|
|
17860
|
+
auth: a(this, In),
|
|
17861
17861
|
parent: navigator.isReactNative ? this.baseURL : window.location.origin,
|
|
17862
17862
|
backend: a(this, ui).getValue("apiBase"),
|
|
17863
17863
|
pluginId: this.id,
|
|
17864
17864
|
roomName: (o = a(this, ui).getValue("meetingId")) != null ? o : "",
|
|
17865
|
-
displayTitle: a(this,
|
|
17865
|
+
displayTitle: a(this, An)
|
|
17866
17866
|
};
|
|
17867
17867
|
if (Object.keys(n).forEach((c) => {
|
|
17868
17868
|
i.searchParams.set(c, n[c]);
|
|
@@ -17897,7 +17897,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17897
17897
|
activateForSelf() {
|
|
17898
17898
|
return u(this, null, function* () {
|
|
17899
17899
|
const t = dt(), e = yield t.authorizePlugin(this.id);
|
|
17900
|
-
v(this,
|
|
17900
|
+
v(this, In, e), v(this, qs, new Date());
|
|
17901
17901
|
try {
|
|
17902
17902
|
const r = yield t.getPluginConfig(this.baseURL);
|
|
17903
17903
|
this.config = r;
|
|
@@ -17944,7 +17944,7 @@ let Pa = (dm = class extends Ra {
|
|
|
17944
17944
|
}), v(this, qs, void 0)));
|
|
17945
17945
|
});
|
|
17946
17946
|
}
|
|
17947
|
-
}, rt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(),
|
|
17947
|
+
}, 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);
|
|
17948
17948
|
_l([
|
|
17949
17949
|
Mt({ maxInvocations: 5, period: 1 })
|
|
17950
17950
|
], Pa.prototype, "sendData", 1);
|
|
@@ -17957,7 +17957,7 @@ _l([
|
|
|
17957
17957
|
Pa = _l([
|
|
17958
17958
|
ut("0600")
|
|
17959
17959
|
], Pa);
|
|
17960
|
-
var
|
|
17960
|
+
var Ue, hi;
|
|
17961
17961
|
class af extends Map {
|
|
17962
17962
|
constructor(e) {
|
|
17963
17963
|
const {
|
|
@@ -17966,54 +17966,54 @@ class af extends Map {
|
|
|
17966
17966
|
onClearEvent: n
|
|
17967
17967
|
} = e;
|
|
17968
17968
|
super();
|
|
17969
|
-
f(this,
|
|
17969
|
+
f(this, Ue, void 0);
|
|
17970
17970
|
f(this, hi, void 0);
|
|
17971
17971
|
p(this, "onAddEvent");
|
|
17972
17972
|
p(this, "onDeleteEvent");
|
|
17973
17973
|
p(this, "onClearEvent");
|
|
17974
|
-
v(this,
|
|
17974
|
+
v(this, Ue, new Ra()), this.onAddEvent = r, this.onDeleteEvent = i, this.onClearEvent = n, v(this, hi, /* @__PURE__ */ new Map());
|
|
17975
17975
|
}
|
|
17976
17976
|
emit(e, ...r) {
|
|
17977
|
-
return a(this,
|
|
17977
|
+
return a(this, Ue).emit(e, ...r);
|
|
17978
17978
|
}
|
|
17979
17979
|
on(e, r) {
|
|
17980
|
-
return a(this,
|
|
17980
|
+
return a(this, Ue).on(e, r);
|
|
17981
17981
|
}
|
|
17982
17982
|
addListener(e, r) {
|
|
17983
|
-
return a(this,
|
|
17983
|
+
return a(this, Ue).addListener(e, r);
|
|
17984
17984
|
}
|
|
17985
17985
|
off(e, r) {
|
|
17986
|
-
return a(this,
|
|
17986
|
+
return a(this, Ue).off(e, r);
|
|
17987
17987
|
}
|
|
17988
17988
|
once(e, r) {
|
|
17989
|
-
return a(this,
|
|
17989
|
+
return a(this, Ue).once(e, r);
|
|
17990
17990
|
}
|
|
17991
17991
|
prependListener(e, r) {
|
|
17992
|
-
return a(this,
|
|
17992
|
+
return a(this, Ue).prependListener(e, r);
|
|
17993
17993
|
}
|
|
17994
17994
|
prependOnceListener(e, r) {
|
|
17995
|
-
return a(this,
|
|
17995
|
+
return a(this, Ue).prependOnceListener(e, r);
|
|
17996
17996
|
}
|
|
17997
17997
|
removeListener(e, r) {
|
|
17998
|
-
return a(this,
|
|
17998
|
+
return a(this, Ue).removeListener(e, r);
|
|
17999
17999
|
}
|
|
18000
18000
|
removeAllListeners(e) {
|
|
18001
|
-
return a(this,
|
|
18001
|
+
return a(this, Ue).removeAllListeners(e);
|
|
18002
18002
|
}
|
|
18003
18003
|
listeners(e) {
|
|
18004
|
-
return a(this,
|
|
18004
|
+
return a(this, Ue).listeners(e);
|
|
18005
18005
|
}
|
|
18006
18006
|
listenerCount(e) {
|
|
18007
|
-
return a(this,
|
|
18007
|
+
return a(this, Ue).listenerCount(e);
|
|
18008
18008
|
}
|
|
18009
18009
|
getMaxListeners() {
|
|
18010
|
-
return a(this,
|
|
18010
|
+
return a(this, Ue).getMaxListeners();
|
|
18011
18011
|
}
|
|
18012
18012
|
setMaxListeners(e) {
|
|
18013
|
-
return a(this,
|
|
18013
|
+
return a(this, Ue).setMaxListeners(e);
|
|
18014
18014
|
}
|
|
18015
18015
|
eventNames() {
|
|
18016
|
-
return a(this,
|
|
18016
|
+
return a(this, Ue).eventNames();
|
|
18017
18017
|
}
|
|
18018
18018
|
add(e, r = true) {
|
|
18019
18019
|
return this.set(e.id, e, r);
|
|
@@ -18022,7 +18022,7 @@ class af extends Map {
|
|
|
18022
18022
|
const n = super.set(e, r), o = (c, ...d) => {
|
|
18023
18023
|
this.emit(c, r, ...d);
|
|
18024
18024
|
};
|
|
18025
|
-
return a(this, hi).set(e, o), r.on("*", o), i && a(this,
|
|
18025
|
+
return a(this, hi).set(e, o), r.on("*", o), i && a(this, Ue).emit(this.onAddEvent, r), n;
|
|
18026
18026
|
}
|
|
18027
18027
|
delete(e, r = true, i = false) {
|
|
18028
18028
|
const n = this.get(e);
|
|
@@ -18030,20 +18030,20 @@ class af extends Map {
|
|
|
18030
18030
|
return false;
|
|
18031
18031
|
n.removeListener("*", a(this, hi).get(e));
|
|
18032
18032
|
const o = super.delete(e);
|
|
18033
|
-
return i && n.removeAllListeners(), r && a(this,
|
|
18033
|
+
return i && n.removeAllListeners(), r && a(this, Ue).emit(this.onDeleteEvent, n), o;
|
|
18034
18034
|
}
|
|
18035
18035
|
clear(e = true, r = false) {
|
|
18036
18036
|
this.forEach((n) => {
|
|
18037
18037
|
n.removeListener("*", a(this, hi).get(n.id)), r && n.removeAllListeners();
|
|
18038
18038
|
});
|
|
18039
18039
|
const i = super.clear();
|
|
18040
|
-
return e && a(this,
|
|
18040
|
+
return e && a(this, Ue).emit(this.onClearEvent), i;
|
|
18041
18041
|
}
|
|
18042
18042
|
toArray() {
|
|
18043
18043
|
return Array.from(this.values());
|
|
18044
18044
|
}
|
|
18045
18045
|
}
|
|
18046
|
-
|
|
18046
|
+
Ue = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap();
|
|
18047
18047
|
class Hp extends af {
|
|
18048
18048
|
constructor() {
|
|
18049
18049
|
super({
|
|
@@ -18077,14 +18077,14 @@ var cM = Object.defineProperty, dM = Object.getOwnPropertyDescriptor, Pl = (s, t
|
|
|
18077
18077
|
for (var i = r > 1 ? void 0 : r ? dM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18078
18078
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18079
18079
|
return r && i && cM(t, e, i), i;
|
|
18080
|
-
}, Wt,
|
|
18080
|
+
}, Wt, Mn, ko, lm;
|
|
18081
18081
|
const of = (lm = class {
|
|
18082
18082
|
constructor(s, t, e, r) {
|
|
18083
18083
|
p(this, "plugins");
|
|
18084
18084
|
f(this, Wt, void 0);
|
|
18085
|
-
f(this,
|
|
18085
|
+
f(this, Mn, void 0);
|
|
18086
18086
|
f(this, ko, void 0);
|
|
18087
|
-
v(this, Wt, t), v(this,
|
|
18087
|
+
v(this, Wt, t), v(this, Mn, e), v(this, ko, s), this.plugins = r, this.setupEvents();
|
|
18088
18088
|
}
|
|
18089
18089
|
static init(s, t, e, r, i, n, o, c) {
|
|
18090
18090
|
return u(this, null, function* () {
|
|
@@ -18245,34 +18245,34 @@ const of = (lm = class {
|
|
|
18245
18245
|
storeName: s.storeName
|
|
18246
18246
|
});
|
|
18247
18247
|
})
|
|
18248
|
-
), a(this,
|
|
18248
|
+
), a(this, Mn).on(
|
|
18249
18249
|
Ie.sendMessageToPeers,
|
|
18250
18250
|
(s) => {
|
|
18251
18251
|
const t = fs == null ? void 0 : fs.formatSocketServiceMessage(
|
|
18252
18252
|
s.message
|
|
18253
18253
|
);
|
|
18254
|
-
this.broadcastIframeEvent(
|
|
18254
|
+
this.broadcastIframeEvent(Oe.chatMessage, { message: t });
|
|
18255
18255
|
}
|
|
18256
|
-
), a(this,
|
|
18256
|
+
), a(this, Mn).on(
|
|
18257
18257
|
Ie.sendMessageToRoom,
|
|
18258
18258
|
(s) => {
|
|
18259
18259
|
const t = fs == null ? void 0 : fs.formatSocketServiceMessage(
|
|
18260
18260
|
s.message
|
|
18261
18261
|
);
|
|
18262
|
-
this.broadcastIframeEvent(
|
|
18262
|
+
this.broadcastIframeEvent(Oe.chatMessage, { message: t });
|
|
18263
18263
|
}
|
|
18264
18264
|
), k.on(I.PEER_JOINED_INTERNAL, (s) => {
|
|
18265
18265
|
const t = cd(s);
|
|
18266
|
-
this.broadcastIframeEvent(
|
|
18266
|
+
this.broadcastIframeEvent(Oe.peerJoined, t);
|
|
18267
18267
|
}), k.on(I.PEER_CLOSED, (s) => {
|
|
18268
|
-
this.broadcastIframeEvent(
|
|
18268
|
+
this.broadcastIframeEvent(Oe.peerLeft, s);
|
|
18269
18269
|
}), k.on(I.UPDATE_PEER_STAGE_STATUS, (s) => {
|
|
18270
|
-
this.broadcastIframeEvent(
|
|
18270
|
+
this.broadcastIframeEvent(Oe.peerStageStatusUpdate, s);
|
|
18271
18271
|
}), a(this, ko).subscribe("stageStatus", (s) => {
|
|
18272
|
-
this.broadcastIframeEvent(
|
|
18272
|
+
this.broadcastIframeEvent(Oe.stageStatusUpdate, s);
|
|
18273
18273
|
});
|
|
18274
18274
|
}
|
|
18275
|
-
}, Wt = /* @__PURE__ */ new WeakMap(),
|
|
18275
|
+
}, Wt = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), lm);
|
|
18276
18276
|
let _c = of;
|
|
18277
18277
|
Pl([
|
|
18278
18278
|
y.trace("PluginController.getRoomPlugins")
|
|
@@ -18363,16 +18363,16 @@ var uM = Object.defineProperty, hM = Object.getOwnPropertyDescriptor, Pc = (s, t
|
|
|
18363
18363
|
for (var i = r > 1 ? void 0 : r ? hM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18364
18364
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18365
18365
|
return r && i && uM(t, e, i), i;
|
|
18366
|
-
},
|
|
18367
|
-
let
|
|
18366
|
+
}, Dn, Io, On, Wc, um;
|
|
18367
|
+
let ji = (um = class extends Ut {
|
|
18368
18368
|
constructor(t, e) {
|
|
18369
18369
|
super();
|
|
18370
|
-
f(this,
|
|
18371
|
-
f(this,
|
|
18370
|
+
f(this, On);
|
|
18371
|
+
f(this, Dn, void 0);
|
|
18372
18372
|
f(this, Io, void 0);
|
|
18373
18373
|
p(this, "recordingPeerIds", []);
|
|
18374
18374
|
p(this, "recordings", []);
|
|
18375
|
-
v(this, Io, t), v(this,
|
|
18375
|
+
v(this, Io, t), v(this, Dn, e);
|
|
18376
18376
|
}
|
|
18377
18377
|
get recordingState() {
|
|
18378
18378
|
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";
|
|
@@ -18382,7 +18382,7 @@ let qi = (um = class extends Ut {
|
|
|
18382
18382
|
}
|
|
18383
18383
|
start(t) {
|
|
18384
18384
|
return u(this, null, function* () {
|
|
18385
|
-
if (!a(this,
|
|
18385
|
+
if (!a(this, Dn).permissions.canRecord)
|
|
18386
18386
|
throw l.error("DyteRecording::start::permission_denied"), new w("User does not have permission to start recording", "1001");
|
|
18387
18387
|
if ((t == null ? void 0 : t.allowMultiple) !== true && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))
|
|
18388
18388
|
throw l.error("DyteRecording::start::recording_in_progress", {
|
|
@@ -18409,22 +18409,22 @@ let qi = (um = class extends Ut {
|
|
|
18409
18409
|
}
|
|
18410
18410
|
stop(t) {
|
|
18411
18411
|
return u(this, null, function* () {
|
|
18412
|
-
yield x(this,
|
|
18412
|
+
yield x(this, On, Wc).call(this, "stop", ["RECORDING", "PAUSED"], t);
|
|
18413
18413
|
});
|
|
18414
18414
|
}
|
|
18415
18415
|
pause(t) {
|
|
18416
18416
|
return u(this, null, function* () {
|
|
18417
|
-
yield x(this,
|
|
18417
|
+
yield x(this, On, Wc).call(this, "pause", ["RECORDING"], t);
|
|
18418
18418
|
});
|
|
18419
18419
|
}
|
|
18420
18420
|
resume(t) {
|
|
18421
18421
|
return u(this, null, function* () {
|
|
18422
|
-
yield x(this,
|
|
18422
|
+
yield x(this, On, Wc).call(this, "resume", ["PAUSED"], t);
|
|
18423
18423
|
});
|
|
18424
18424
|
}
|
|
18425
|
-
},
|
|
18425
|
+
}, Dn = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakSet(), Wc = function(t, e, r) {
|
|
18426
18426
|
return u(this, null, function* () {
|
|
18427
|
-
if (!a(this,
|
|
18427
|
+
if (!a(this, Dn).permissions.canRecord)
|
|
18428
18428
|
throw l.error("DyteRecording::stop::permission_denied"), new w("User does not have permission to stop recording", "1001");
|
|
18429
18429
|
let i = [];
|
|
18430
18430
|
if (r !== void 0) {
|
|
@@ -18457,19 +18457,19 @@ let qi = (um = class extends Ut {
|
|
|
18457
18457
|
}, um);
|
|
18458
18458
|
Pc([
|
|
18459
18459
|
y.trace("DyteRecording.start")
|
|
18460
|
-
],
|
|
18460
|
+
], ji.prototype, "start", 1);
|
|
18461
18461
|
Pc([
|
|
18462
18462
|
y.trace("DyteRecording.stop")
|
|
18463
|
-
],
|
|
18463
|
+
], ji.prototype, "stop", 1);
|
|
18464
18464
|
Pc([
|
|
18465
18465
|
y.trace("DyteRecording.stop")
|
|
18466
|
-
],
|
|
18466
|
+
], ji.prototype, "pause", 1);
|
|
18467
18467
|
Pc([
|
|
18468
18468
|
y.trace("DyteRecording.stop")
|
|
18469
|
-
],
|
|
18470
|
-
|
|
18469
|
+
], ji.prototype, "resume", 1);
|
|
18470
|
+
ji = Pc([
|
|
18471
18471
|
ut("1000")
|
|
18472
|
-
],
|
|
18472
|
+
], ji);
|
|
18473
18473
|
var pM = Object.defineProperty, mM = Object.getOwnPropertyDescriptor, gM = (s, t, e, r) => {
|
|
18474
18474
|
for (var i = r > 1 ? void 0 : r ? mM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18475
18475
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -18480,18 +18480,18 @@ class cf {
|
|
|
18480
18480
|
p(this, "recording");
|
|
18481
18481
|
p(this, "room");
|
|
18482
18482
|
f(this, Pd, void 0);
|
|
18483
|
-
v(this, Pd, t), this.recording = new
|
|
18483
|
+
v(this, Pd, t), this.recording = new ji(t, e), this.room = r, this.setupEvents();
|
|
18484
18484
|
}
|
|
18485
18485
|
getRecordingTypeFromProtoType(t) {
|
|
18486
18486
|
let e;
|
|
18487
18487
|
switch (t) {
|
|
18488
|
-
case
|
|
18488
|
+
case Bi.BROWSER:
|
|
18489
18489
|
e = "BROWSER";
|
|
18490
18490
|
break;
|
|
18491
|
-
case
|
|
18491
|
+
case Bi.COMPOSITE:
|
|
18492
18492
|
e = "COMPOSITE";
|
|
18493
18493
|
break;
|
|
18494
|
-
case
|
|
18494
|
+
case Bi.TRACK:
|
|
18495
18495
|
e = "TRACK";
|
|
18496
18496
|
break;
|
|
18497
18497
|
default:
|
|
@@ -19146,7 +19146,7 @@ const qp = {
|
|
|
19146
19146
|
}), e[n][1];
|
|
19147
19147
|
};
|
|
19148
19148
|
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 || {});
|
|
19149
|
-
const CM = c_(),
|
|
19149
|
+
const CM = c_(), Zi = vs(
|
|
19150
19150
|
CM.config.media
|
|
19151
19151
|
);
|
|
19152
19152
|
function RM(s) {
|
|
@@ -19270,15 +19270,15 @@ var kM = Object.defineProperty, IM = Object.getOwnPropertyDescriptor, _s = (s, t
|
|
|
19270
19270
|
for (var i = r > 1 ? void 0 : r ? IM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
19271
19271
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
19272
19272
|
return r && i && kM(t, e, i), i;
|
|
19273
|
-
},
|
|
19273
|
+
}, Nn, Kt, wd, hm;
|
|
19274
19274
|
let xt = (hm = class extends bM {
|
|
19275
19275
|
constructor(t, e) {
|
|
19276
19276
|
super();
|
|
19277
19277
|
p(this, "availableDevices");
|
|
19278
|
-
f(this,
|
|
19278
|
+
f(this, Nn, void 0);
|
|
19279
19279
|
f(this, Kt, void 0);
|
|
19280
19280
|
f(this, wd, void 0);
|
|
19281
|
-
v(this, wd, t), v(this, Kt, new wM(t, e)), v(this,
|
|
19281
|
+
v(this, wd, t), v(this, Kt, new wM(t, e)), v(this, Nn, new AbortController()), this.availableDevices = [], this.getAvailableDevices();
|
|
19282
19282
|
}
|
|
19283
19283
|
get constraintsBuilder() {
|
|
19284
19284
|
return a(this, Kt);
|
|
@@ -19286,7 +19286,7 @@ let xt = (hm = class extends bM {
|
|
|
19286
19286
|
destruct() {
|
|
19287
19287
|
return u(this, null, function* () {
|
|
19288
19288
|
var t;
|
|
19289
|
-
(t = a(this,
|
|
19289
|
+
(t = a(this, Nn)) == null || t.abort();
|
|
19290
19290
|
});
|
|
19291
19291
|
}
|
|
19292
19292
|
handlePermissionErrors(t, e) {
|
|
@@ -19558,11 +19558,11 @@ let xt = (hm = class extends bM {
|
|
|
19558
19558
|
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);
|
|
19559
19559
|
}
|
|
19560
19560
|
}),
|
|
19561
|
-
{ signal: a(this,
|
|
19561
|
+
{ signal: a(this, Nn).signal }
|
|
19562
19562
|
);
|
|
19563
19563
|
});
|
|
19564
19564
|
}
|
|
19565
|
-
},
|
|
19565
|
+
}, Nn = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), wd = /* @__PURE__ */ new WeakMap(), hm);
|
|
19566
19566
|
_s([
|
|
19567
19567
|
y.trace("WebMediaInterface.destruct")
|
|
19568
19568
|
], xt.prototype, "destruct", 1);
|
|
@@ -20022,20 +20022,20 @@ fh([
|
|
|
20022
20022
|
y.trace("AudioMediaHandler.conditionallyChangeTrack")
|
|
20023
20023
|
], Cl.prototype, "conditionallyChangeTrack", 1);
|
|
20024
20024
|
const FM = Cl;
|
|
20025
|
-
var
|
|
20025
|
+
var Ln;
|
|
20026
20026
|
class BM {
|
|
20027
20027
|
constructor(t) {
|
|
20028
|
-
f(this,
|
|
20028
|
+
f(this, Ln, void 0);
|
|
20029
20029
|
p(this, "currentDevice");
|
|
20030
|
-
v(this,
|
|
20030
|
+
v(this, Ln, t);
|
|
20031
20031
|
}
|
|
20032
20032
|
setupSpeaker(t) {
|
|
20033
20033
|
return u(this, null, function* () {
|
|
20034
20034
|
var i, n;
|
|
20035
|
-
if (!(a(this,
|
|
20035
|
+
if (!(a(this, Ln) instanceof df))
|
|
20036
20036
|
return;
|
|
20037
20037
|
let e = t;
|
|
20038
|
-
if (t || ([e] = (yield a(this,
|
|
20038
|
+
if (t || ([e] = (yield a(this, Ln).getAvailableDevicesByKind(
|
|
20039
20039
|
"audiooutput"
|
|
20040
20040
|
)).filter((c) => !Cu(c))), !e)
|
|
20041
20041
|
throw new w("No speaker found", "1608");
|
|
@@ -20053,7 +20053,7 @@ class BM {
|
|
|
20053
20053
|
});
|
|
20054
20054
|
}
|
|
20055
20055
|
}
|
|
20056
|
-
|
|
20056
|
+
Ln = /* @__PURE__ */ new WeakMap();
|
|
20057
20057
|
const HM = BM;
|
|
20058
20058
|
class qM extends Ra {
|
|
20059
20059
|
constructor(e) {
|
|
@@ -20126,15 +20126,15 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, Rl = (s, t
|
|
|
20126
20126
|
for (var i = r > 1 ? void 0 : r ? WM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20127
20127
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20128
20128
|
return r && i && GM(t, e, i), i;
|
|
20129
|
-
},
|
|
20129
|
+
}, Vn, Mo;
|
|
20130
20130
|
class Cc extends uf {
|
|
20131
20131
|
constructor(e, r, i) {
|
|
20132
20132
|
super(e, r, i);
|
|
20133
|
-
f(this,
|
|
20133
|
+
f(this, Vn, void 0);
|
|
20134
20134
|
f(this, Mo, {
|
|
20135
20135
|
disablePerFrameCanvasRendering: false
|
|
20136
20136
|
});
|
|
20137
|
-
v(this,
|
|
20137
|
+
v(this, Vn, new EM());
|
|
20138
20138
|
}
|
|
20139
20139
|
onSetDevice(e) {
|
|
20140
20140
|
return u(this, null, function* () {
|
|
@@ -20192,7 +20192,7 @@ class Cc extends uf {
|
|
|
20192
20192
|
return;
|
|
20193
20193
|
}
|
|
20194
20194
|
try {
|
|
20195
|
-
this.transformedMediaTrack = yield a(this,
|
|
20195
|
+
this.transformedMediaTrack = yield a(this, Vn).getTransformedVideoTrack(
|
|
20196
20196
|
this.middlewares,
|
|
20197
20197
|
this.mediaTrack,
|
|
20198
20198
|
a(this, Mo)
|
|
@@ -20228,7 +20228,7 @@ class Cc extends uf {
|
|
|
20228
20228
|
});
|
|
20229
20229
|
}
|
|
20230
20230
|
terminateMiddlewareWebWorker() {
|
|
20231
|
-
a(this,
|
|
20231
|
+
a(this, Vn).terminateMiddlewareWebWorker();
|
|
20232
20232
|
}
|
|
20233
20233
|
onTrackEnded() {
|
|
20234
20234
|
return u(this, null, function* () {
|
|
@@ -20252,7 +20252,7 @@ class Cc extends uf {
|
|
|
20252
20252
|
});
|
|
20253
20253
|
}
|
|
20254
20254
|
}
|
|
20255
|
-
|
|
20255
|
+
Vn = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap();
|
|
20256
20256
|
Rl([
|
|
20257
20257
|
y.trace("VideoMediaHandler.setTransformedTrack")
|
|
20258
20258
|
], Cc.prototype, "setTransformedTrack", 1);
|
|
@@ -20268,25 +20268,25 @@ Rl([
|
|
|
20268
20268
|
const JM = Cc, Wp = vs(
|
|
20269
20269
|
nh()
|
|
20270
20270
|
);
|
|
20271
|
-
var Ct, gi, Do,
|
|
20272
|
-
const
|
|
20271
|
+
var Ct, gi, Do, xn;
|
|
20272
|
+
const on = class {
|
|
20273
20273
|
constructor(t) {
|
|
20274
20274
|
f(this, Ct, void 0);
|
|
20275
20275
|
f(this, gi, void 0);
|
|
20276
20276
|
f(this, Do, void 0);
|
|
20277
|
-
f(this,
|
|
20277
|
+
f(this, xn, void 0);
|
|
20278
20278
|
if (!t)
|
|
20279
20279
|
throw new w("Could not load preset.", "0904");
|
|
20280
|
-
v(this, Ct, t.config), v(this, Do, t.name), v(this, gi, t.ui || vs(nh().ui)), v(this,
|
|
20280
|
+
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);
|
|
20281
20281
|
}
|
|
20282
20282
|
static fromResponse(t) {
|
|
20283
|
-
return new
|
|
20283
|
+
return new on(t);
|
|
20284
20284
|
}
|
|
20285
20285
|
static default() {
|
|
20286
|
-
return new
|
|
20286
|
+
return new on(Wp);
|
|
20287
20287
|
}
|
|
20288
20288
|
static init(t, e = true) {
|
|
20289
|
-
return !t || e ? new
|
|
20289
|
+
return !t || e ? new on(Wp) : new on(t);
|
|
20290
20290
|
}
|
|
20291
20291
|
get setupScreen() {
|
|
20292
20292
|
return {
|
|
@@ -20345,7 +20345,7 @@ const an = class {
|
|
|
20345
20345
|
return [];
|
|
20346
20346
|
}
|
|
20347
20347
|
get disabledPlugins() {
|
|
20348
|
-
return Object.keys(a(this,
|
|
20348
|
+
return Object.keys(a(this, xn)).filter((t) => a(this, xn)[t].disabled);
|
|
20349
20349
|
}
|
|
20350
20350
|
get designTokens() {
|
|
20351
20351
|
return a(this, gi).designTokens;
|
|
@@ -20357,16 +20357,16 @@ const an = class {
|
|
|
20357
20357
|
var t, e, r, i, n, o, c, d, h, m, g, T, _, P, A, C, L, H, B, F, Q, X, oe, et;
|
|
20358
20358
|
return {
|
|
20359
20359
|
audio: {
|
|
20360
|
-
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 :
|
|
20361
|
-
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 :
|
|
20360
|
+
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,
|
|
20361
|
+
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
|
|
20362
20362
|
},
|
|
20363
20363
|
video: {
|
|
20364
|
-
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 :
|
|
20365
|
-
frameRate: (C = (A = (P = (_ = a(this, Ct)) == null ? void 0 : _.media) == null ? void 0 : P.video) == null ? void 0 : A.frameRate) != null ? C :
|
|
20364
|
+
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,
|
|
20365
|
+
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
|
|
20366
20366
|
},
|
|
20367
20367
|
screenshare: {
|
|
20368
|
-
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 :
|
|
20369
|
-
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 :
|
|
20368
|
+
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,
|
|
20369
|
+
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
|
|
20370
20370
|
}
|
|
20371
20371
|
};
|
|
20372
20372
|
}
|
|
@@ -20374,22 +20374,22 @@ const an = class {
|
|
|
20374
20374
|
return a(this, Do);
|
|
20375
20375
|
}
|
|
20376
20376
|
};
|
|
20377
|
-
let Ru =
|
|
20378
|
-
Ct = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(),
|
|
20377
|
+
let Ru = on;
|
|
20378
|
+
Ct = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap();
|
|
20379
20379
|
var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, hf = (s, t, e, r) => {
|
|
20380
20380
|
for (var i = r > 1 ? void 0 : r ? zM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20381
20381
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20382
20382
|
return r && i && KM(t, e, i), i;
|
|
20383
|
-
},
|
|
20383
|
+
}, Un;
|
|
20384
20384
|
class vh extends Ut {
|
|
20385
20385
|
constructor(e) {
|
|
20386
20386
|
super();
|
|
20387
|
-
f(this,
|
|
20387
|
+
f(this, Un, void 0);
|
|
20388
20388
|
p(this, "state", "IDLE");
|
|
20389
20389
|
p(this, "playbackUrl");
|
|
20390
20390
|
p(this, "ingestionCredentials");
|
|
20391
20391
|
p(this, "viewerCount");
|
|
20392
|
-
v(this,
|
|
20392
|
+
v(this, Un, e), this.viewerCount = 0;
|
|
20393
20393
|
}
|
|
20394
20394
|
setLivestreamState(e) {
|
|
20395
20395
|
const r = this.state;
|
|
@@ -20402,7 +20402,7 @@ class vh extends Ut {
|
|
|
20402
20402
|
return u(this, arguments, function* (e = {
|
|
20403
20403
|
manualIngestion: false
|
|
20404
20404
|
}) {
|
|
20405
|
-
if (!a(this,
|
|
20405
|
+
if (!a(this, Un).permissions.canLivestream)
|
|
20406
20406
|
throw l.error("DyteLivestream::start::permission_denied"), new w(
|
|
20407
20407
|
"User does not have permission to start livestreaming",
|
|
20408
20408
|
"1901"
|
|
@@ -20423,7 +20423,7 @@ class vh extends Ut {
|
|
|
20423
20423
|
}
|
|
20424
20424
|
stop() {
|
|
20425
20425
|
return u(this, null, function* () {
|
|
20426
|
-
if (!a(this,
|
|
20426
|
+
if (!a(this, Un).permissions.canLivestream)
|
|
20427
20427
|
throw l.error("DyteLivestream::stop::permission_denied"), new w(
|
|
20428
20428
|
"User does not have permission to stop livestreaming",
|
|
20429
20429
|
"1901"
|
|
@@ -20440,7 +20440,7 @@ class vh extends Ut {
|
|
|
20440
20440
|
});
|
|
20441
20441
|
}
|
|
20442
20442
|
}
|
|
20443
|
-
|
|
20443
|
+
Un = /* @__PURE__ */ new WeakMap();
|
|
20444
20444
|
hf([
|
|
20445
20445
|
y.trace("livestream.start")
|
|
20446
20446
|
], vh.prototype, "start", 1);
|
|
@@ -20451,14 +20451,14 @@ var YM = Object.defineProperty, QM = Object.getOwnPropertyDescriptor, XM = (s, t
|
|
|
20451
20451
|
for (var i = r > 1 ? void 0 : r ? QM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
20452
20452
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20453
20453
|
return r && i && YM(t, e, i), i;
|
|
20454
|
-
},
|
|
20454
|
+
}, $n, Fn, js;
|
|
20455
20455
|
class pf {
|
|
20456
20456
|
constructor(t, e) {
|
|
20457
20457
|
p(this, "livestream");
|
|
20458
|
-
f(this, Un, void 0);
|
|
20459
20458
|
f(this, $n, void 0);
|
|
20459
|
+
f(this, Fn, void 0);
|
|
20460
20460
|
f(this, js, void 0);
|
|
20461
|
-
v(this,
|
|
20461
|
+
v(this, Fn, t), this.livestream = new vh(t), v(this, js, e), this.setupEvents();
|
|
20462
20462
|
}
|
|
20463
20463
|
fetchInitialLivestreamingState() {
|
|
20464
20464
|
return u(this, null, function* () {
|
|
@@ -20477,7 +20477,7 @@ class pf {
|
|
|
20477
20477
|
(t) => u(this, null, function* () {
|
|
20478
20478
|
this.livestream.playbackUrl = t.playbackUrl, this.livestream.setLivestreamState("LIVESTREAMING");
|
|
20479
20479
|
try {
|
|
20480
|
-
a(this,
|
|
20480
|
+
a(this, Fn).permissions.canLivestream && (yield this.fetchInitialLivestreamingState());
|
|
20481
20481
|
} catch (e) {
|
|
20482
20482
|
l.error("Error: LivestreamController.fetchLivestream during startedLivestream re-fetch");
|
|
20483
20483
|
}
|
|
@@ -20488,7 +20488,7 @@ class pf {
|
|
|
20488
20488
|
if (t.manualIngest) {
|
|
20489
20489
|
this.livestream.setLivestreamState("WAITING_ON_MANUAL_INGESTION");
|
|
20490
20490
|
try {
|
|
20491
|
-
a(this,
|
|
20491
|
+
a(this, Fn).permissions.canLivestream && (yield this.fetchInitialLivestreamingState());
|
|
20492
20492
|
} catch (e) {
|
|
20493
20493
|
l.error("Error: LivestreamController.fetchLivestream during livestreamingInvoked re-fetch");
|
|
20494
20494
|
}
|
|
@@ -20507,10 +20507,10 @@ class pf {
|
|
|
20507
20507
|
I.PEER_JOINED_INTERNAL,
|
|
20508
20508
|
(t) => u(this, null, function* () {
|
|
20509
20509
|
var e;
|
|
20510
|
-
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === true && t.recorderType === "LIVESTREAMER" && (v(this,
|
|
20510
|
+
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === true && t.recorderType === "LIVESTREAMER" && (v(this, $n, t.id), this.livestream.setLivestreamState("LIVESTREAMING"));
|
|
20511
20511
|
})
|
|
20512
20512
|
), k.on(I.PEER_CLOSED, (t) => {
|
|
20513
|
-
t.id === a(this,
|
|
20513
|
+
t.id === a(this, $n) && (v(this, $n, void 0), this.livestream.setLivestreamState("IDLE"));
|
|
20514
20514
|
}), k.onAsync(I.LEAVE_MEDIA_ROOM, () => u(this, null, function* () {
|
|
20515
20515
|
this.livestream.playbackUrl || (l.info("Fetching livestreaming state on leave stage"), yield this.fetchInitialLivestreamingState());
|
|
20516
20516
|
})), k.on(I.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
|
|
@@ -20522,7 +20522,7 @@ class pf {
|
|
|
20522
20522
|
}));
|
|
20523
20523
|
}
|
|
20524
20524
|
}
|
|
20525
|
-
|
|
20525
|
+
$n = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap();
|
|
20526
20526
|
XM([
|
|
20527
20527
|
y.trace("LivestreamController.setupEvents")
|
|
20528
20528
|
], pf.prototype, "setupEvents", 1);
|
|
@@ -20773,7 +20773,7 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, Ia = (s, t
|
|
|
20773
20773
|
return r && i && s0(t, e, i), i;
|
|
20774
20774
|
};
|
|
20775
20775
|
const i0 = 0.8, n0 = 1.2;
|
|
20776
|
-
var
|
|
20776
|
+
var Bn, Hn, wr, Ti, Xa, yi, Za, Id, ff, Gs, Lo, br, Si, eo, Ws, Ad, Vo, bu, pm;
|
|
20777
20777
|
let cr = (pm = class extends Ut {
|
|
20778
20778
|
constructor(t, e, r, i) {
|
|
20779
20779
|
super();
|
|
@@ -20798,9 +20798,9 @@ let cr = (pm = class extends Ut {
|
|
|
20798
20798
|
p(this, "screenShareEnabled");
|
|
20799
20799
|
p(this, "producers");
|
|
20800
20800
|
p(this, "manualProducerConfig");
|
|
20801
|
-
f(this, Fn, void 0);
|
|
20802
|
-
p(this, "supportsRemoteControl", false);
|
|
20803
20801
|
f(this, Bn, void 0);
|
|
20802
|
+
p(this, "supportsRemoteControl", false);
|
|
20803
|
+
f(this, Hn, void 0);
|
|
20804
20804
|
p(this, "presetName");
|
|
20805
20805
|
f(this, wr, void 0);
|
|
20806
20806
|
f(this, Gs, void 0);
|
|
@@ -20841,16 +20841,16 @@ let cr = (pm = class extends Ut {
|
|
|
20841
20841
|
producers: B,
|
|
20842
20842
|
metadata: F
|
|
20843
20843
|
} = e;
|
|
20844
|
-
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,
|
|
20844
|
+
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 = {
|
|
20845
20845
|
audio: void 0,
|
|
20846
20846
|
video: void 0
|
|
20847
|
-
}, this.producers = B != null ? B : [], this.presetName = F == null ? void 0 : F.preset_name, v(this,
|
|
20847
|
+
}, 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);
|
|
20848
20848
|
}
|
|
20849
20849
|
get clientSpecificId() {
|
|
20850
20850
|
return this.customParticipantId;
|
|
20851
20851
|
}
|
|
20852
20852
|
get stageStatus() {
|
|
20853
|
-
return a(this,
|
|
20853
|
+
return a(this, Hn);
|
|
20854
20854
|
}
|
|
20855
20855
|
setVideoEnabled(t, e = true) {
|
|
20856
20856
|
this.videoEnabled = t, e && (l.info("DyteParticipant::setVideoEnabled::videoUpdate", O({}, ri(this))), this.emit("videoUpdate", {
|
|
@@ -20893,7 +20893,7 @@ let cr = (pm = class extends Ut {
|
|
|
20893
20893
|
}
|
|
20894
20894
|
setIsPinned(t, e = true) {
|
|
20895
20895
|
var i;
|
|
20896
|
-
v(this,
|
|
20896
|
+
v(this, Bn, t);
|
|
20897
20897
|
const r = t ? "pinned" : "unpinned";
|
|
20898
20898
|
(i = a(this, Si, eo)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
20899
20899
|
}
|
|
@@ -20964,10 +20964,10 @@ let cr = (pm = class extends Ut {
|
|
|
20964
20964
|
});
|
|
20965
20965
|
}
|
|
20966
20966
|
setStageStatus(t) {
|
|
20967
|
-
v(this,
|
|
20967
|
+
v(this, Hn, t), this.emit("stageStatusUpdate", this);
|
|
20968
20968
|
}
|
|
20969
20969
|
get isPinned() {
|
|
20970
|
-
return a(this,
|
|
20970
|
+
return a(this, Bn);
|
|
20971
20971
|
}
|
|
20972
20972
|
registerVideoElement(t) {
|
|
20973
20973
|
var r, i, n, o;
|
|
@@ -21006,7 +21006,7 @@ let cr = (pm = class extends Ut {
|
|
|
21006
21006
|
t.srcObject = void 0;
|
|
21007
21007
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
21008
21008
|
}
|
|
21009
|
-
},
|
|
21009
|
+
}, Bn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakSet(), Xa = function() {
|
|
21010
21010
|
return a(this, wr).getValue("roomNodeClient");
|
|
21011
21011
|
}, yi = /* @__PURE__ */ new WeakSet(), Za = function() {
|
|
21012
21012
|
return a(this, wr).getValue("connectionHandler").mediaJoined;
|
|
@@ -21158,13 +21158,13 @@ var d0 = Object.defineProperty, l0 = Object.getOwnPropertyDescriptor, Bt = (s, t
|
|
|
21158
21158
|
return r && i && d0(t, e, i), i;
|
|
21159
21159
|
};
|
|
21160
21160
|
const u0 = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
21161
|
-
var zt, Ei, to, _i, so,
|
|
21161
|
+
var zt, Ei, to, _i, so, qn, Jc, Pi, Rt, mm;
|
|
21162
21162
|
let Et = (mm = class extends Ut {
|
|
21163
21163
|
constructor(t, e, r) {
|
|
21164
21164
|
super();
|
|
21165
21165
|
f(this, Ei);
|
|
21166
21166
|
f(this, _i);
|
|
21167
|
-
f(this,
|
|
21167
|
+
f(this, qn);
|
|
21168
21168
|
p(this, "waitlisted");
|
|
21169
21169
|
p(this, "joined");
|
|
21170
21170
|
p(this, "active");
|
|
@@ -21213,7 +21213,7 @@ let Et = (mm = class extends Ut {
|
|
|
21213
21213
|
setMaxActiveParticipantsCount(t) {
|
|
21214
21214
|
if (t < 0 || t > 24)
|
|
21215
21215
|
throw new w("0 <= Max active participants count limit <= 24", "1203");
|
|
21216
|
-
a(this, zt).setValue("maxPreferredStreams", t), a(this,
|
|
21216
|
+
a(this, zt).setValue("maxPreferredStreams", t), a(this, qn, Jc) && k.emit(I.UPDATE_ACTIVE);
|
|
21217
21217
|
}
|
|
21218
21218
|
get pageCount() {
|
|
21219
21219
|
if (this.viewMode === "PAGINATED") {
|
|
@@ -21425,7 +21425,7 @@ let Et = (mm = class extends Ut {
|
|
|
21425
21425
|
return u(this, null, function* () {
|
|
21426
21426
|
if (l.info("DyteParticipants::disable_all_audio", {
|
|
21427
21427
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
21428
|
-
}), !a(this,
|
|
21428
|
+
}), !a(this, qn, Jc))
|
|
21429
21429
|
throw new w("Can`t disable all audio without joining room", "1205");
|
|
21430
21430
|
if (a(this, Pi).permissions.canAllowParticipantAudio)
|
|
21431
21431
|
return a(this, Ei, to).muteAll(t);
|
|
@@ -21439,7 +21439,7 @@ let Et = (mm = class extends Ut {
|
|
|
21439
21439
|
}
|
|
21440
21440
|
disableAllVideo() {
|
|
21441
21441
|
return u(this, null, function* () {
|
|
21442
|
-
if (l.info("DyteParticipants::disable_all_video"), !a(this,
|
|
21442
|
+
if (l.info("DyteParticipants::disable_all_video"), !a(this, qn, Jc))
|
|
21443
21443
|
throw new w("Can`t disable all video without joining room", "1205");
|
|
21444
21444
|
if (a(this, Pi).permissions.canAllowParticipantVideo)
|
|
21445
21445
|
return a(this, Ei, to).muteAllVideo();
|
|
@@ -21524,7 +21524,7 @@ let Et = (mm = class extends Ut {
|
|
|
21524
21524
|
}, _i = /* @__PURE__ */ new WeakSet(), so = function() {
|
|
21525
21525
|
var t;
|
|
21526
21526
|
return ((t = a(this, zt).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === true;
|
|
21527
|
-
},
|
|
21527
|
+
}, qn = /* @__PURE__ */ new WeakSet(), Jc = function() {
|
|
21528
21528
|
var t;
|
|
21529
21529
|
return ((t = a(this, zt).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === true;
|
|
21530
21530
|
}, Pi = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), mm);
|
|
@@ -21570,11 +21570,11 @@ Bt([
|
|
|
21570
21570
|
Et = Bt([
|
|
21571
21571
|
ut("1200")
|
|
21572
21572
|
], Et);
|
|
21573
|
-
var
|
|
21573
|
+
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) => {
|
|
21574
21574
|
for (var i = r > 1 ? void 0 : r ? p0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
21575
21575
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
21576
21576
|
return r && i && h0(t, e, i), i;
|
|
21577
|
-
}, Js,
|
|
21577
|
+
}, Js, jn, Gn, Ci, Wn, gm;
|
|
21578
21578
|
const Kc = (gm = class {
|
|
21579
21579
|
constructor(s, t, e, r) {
|
|
21580
21580
|
p(this, "participants");
|
|
@@ -21587,10 +21587,10 @@ const Kc = (gm = class {
|
|
|
21587
21587
|
p(this, "context");
|
|
21588
21588
|
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
21589
21589
|
f(this, Js, { mode: "ACTIVE_GRID", page: 0 });
|
|
21590
|
-
f(this, qn, new ii());
|
|
21591
21590
|
f(this, jn, new ii());
|
|
21591
|
+
f(this, Gn, new ii());
|
|
21592
21592
|
f(this, Ci, false);
|
|
21593
|
-
f(this,
|
|
21593
|
+
f(this, Wn, false);
|
|
21594
21594
|
p(this, "updateConsumerSpatialLayers", ah(() => {
|
|
21595
21595
|
const s2 = {}, t2 = new Map(this.maxSpatialLayerUpdates);
|
|
21596
21596
|
this.maxSpatialLayerUpdates.clear(), Array.from(t2.entries()).forEach(([e2, r2]) => {
|
|
@@ -21616,11 +21616,11 @@ const Kc = (gm = class {
|
|
|
21616
21616
|
}
|
|
21617
21617
|
}));
|
|
21618
21618
|
switch (this.context = s, this.roomSocketHandler = e, this.participants = new Et(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), r) {
|
|
21619
|
-
case
|
|
21619
|
+
case Ae.HIVE: {
|
|
21620
21620
|
this.events = es;
|
|
21621
21621
|
break;
|
|
21622
21622
|
}
|
|
21623
|
-
case
|
|
21623
|
+
case Ae.CF: {
|
|
21624
21624
|
this.events = gs;
|
|
21625
21625
|
break;
|
|
21626
21626
|
}
|
|
@@ -21872,7 +21872,7 @@ const Kc = (gm = class {
|
|
|
21872
21872
|
const { page: e, createAllConsumers: r } = t != null ? t : {};
|
|
21873
21873
|
s && a(this, Js).mode !== s && (a(this, Js).mode = s), e && a(this, Js).page !== e && (a(this, Js).page = e);
|
|
21874
21874
|
const { mode: i, page: n } = a(this, Js);
|
|
21875
|
-
switch (r && (a(this,
|
|
21875
|
+
switch (r && (a(this, jn).clear(), a(this, Gn).clear()), i) {
|
|
21876
21876
|
case "PAGINATED": {
|
|
21877
21877
|
if (!n)
|
|
21878
21878
|
return;
|
|
@@ -21903,24 +21903,24 @@ const Kc = (gm = class {
|
|
|
21903
21903
|
if (((d = (c = (o = this.context.getValue("connectionHandler")) == null ? void 0 : o.mediaState) == null ? void 0 : c.recv) == null ? void 0 : d.state) !== "connected")
|
|
21904
21904
|
return;
|
|
21905
21905
|
if (a(this, Ci)) {
|
|
21906
|
-
v(this,
|
|
21906
|
+
v(this, Wn, true);
|
|
21907
21907
|
return;
|
|
21908
21908
|
}
|
|
21909
|
-
v(this, Ci, true), v(this,
|
|
21909
|
+
v(this, Ci, true), v(this, Wn, false);
|
|
21910
21910
|
const [s, t] = Kc.mapDiff(
|
|
21911
|
-
a(this,
|
|
21911
|
+
a(this, jn),
|
|
21912
21912
|
this.participants.videoSubscribed
|
|
21913
21913
|
);
|
|
21914
21914
|
this.updateParticipantsMap(
|
|
21915
|
-
a(this,
|
|
21915
|
+
a(this, jn),
|
|
21916
21916
|
this.participants.videoSubscribed.toArray().filter(({ videoEnabled: h }) => !!h).map(({ id: h }) => h)
|
|
21917
21917
|
);
|
|
21918
21918
|
const [e, r] = Kc.mapDiff(
|
|
21919
|
-
a(this,
|
|
21919
|
+
a(this, Gn),
|
|
21920
21920
|
this.participants.audioSubscribed
|
|
21921
21921
|
);
|
|
21922
21922
|
this.updateParticipantsMap(
|
|
21923
|
-
a(this,
|
|
21923
|
+
a(this, Gn),
|
|
21924
21924
|
this.participants.audioSubscribed.toArray().filter(({ audioEnabled: h }) => !!h).map(({ id: h }) => h)
|
|
21925
21925
|
);
|
|
21926
21926
|
const i = [
|
|
@@ -21935,7 +21935,7 @@ const Kc = (gm = class {
|
|
|
21935
21935
|
} finally {
|
|
21936
21936
|
v(this, Ci, false);
|
|
21937
21937
|
}
|
|
21938
|
-
a(this,
|
|
21938
|
+
a(this, Wn) && this.syncConsumers();
|
|
21939
21939
|
});
|
|
21940
21940
|
}
|
|
21941
21941
|
static mapDiff(s, t) {
|
|
@@ -22450,40 +22450,40 @@ const Kc = (gm = class {
|
|
|
22450
22450
|
volume: 1
|
|
22451
22451
|
})), t && this.updateSubscriptions(this.participants.viewMode);
|
|
22452
22452
|
}
|
|
22453
|
-
}, Js = /* @__PURE__ */ new WeakMap(),
|
|
22453
|
+
}, Js = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), gm);
|
|
22454
22454
|
let lr = Kc;
|
|
22455
|
-
|
|
22455
|
+
Qi([
|
|
22456
22456
|
y.trace("ParticipantController.setupEvents")
|
|
22457
22457
|
], lr.prototype, "setupEvents", 1);
|
|
22458
|
-
|
|
22458
|
+
Qi([
|
|
22459
22459
|
y.trace("ParticipantController.setupEvents")
|
|
22460
22460
|
], lr.prototype, "setupEventsGlobal", 1);
|
|
22461
|
-
|
|
22461
|
+
Qi([
|
|
22462
22462
|
y.trace("ParticipantController.processMedia")
|
|
22463
22463
|
], lr.prototype, "processMedia", 1);
|
|
22464
|
-
|
|
22464
|
+
Qi([
|
|
22465
22465
|
y.trace("ParticipantController.processConsumerClosed")
|
|
22466
22466
|
], lr.prototype, "processConsumerClosed", 1);
|
|
22467
|
-
|
|
22467
|
+
Qi([
|
|
22468
22468
|
y.trace("ParticipantController.processConsumerResumed")
|
|
22469
22469
|
], lr.prototype, "processConsumerResumed", 1);
|
|
22470
|
-
|
|
22470
|
+
Qi([
|
|
22471
22471
|
y.trace("ParticipantController.processConsumerPaused")
|
|
22472
22472
|
], lr.prototype, "processConsumerPaused", 1);
|
|
22473
|
-
|
|
22473
|
+
Qi([
|
|
22474
22474
|
y.trace("ParticipantController.processNewConsumer")
|
|
22475
22475
|
], lr.prototype, "processNewConsumer", 1);
|
|
22476
22476
|
const ge = vs(
|
|
22477
22477
|
nh().permissions
|
|
22478
22478
|
);
|
|
22479
|
-
var j,
|
|
22480
|
-
const
|
|
22479
|
+
var j, Jn, Kn, Md, gt, Ot;
|
|
22480
|
+
const cn = class extends Ut {
|
|
22481
22481
|
constructor(e, r, i, n = false) {
|
|
22482
22482
|
super();
|
|
22483
22483
|
f(this, gt);
|
|
22484
22484
|
f(this, j, void 0);
|
|
22485
|
-
f(this, Wn, void 0);
|
|
22486
22485
|
f(this, Jn, void 0);
|
|
22486
|
+
f(this, Kn, void 0);
|
|
22487
22487
|
f(this, Md, (e2) => {
|
|
22488
22488
|
var m, g, T;
|
|
22489
22489
|
const h = e2, {
|
|
@@ -22530,28 +22530,28 @@ const on = class extends Ut {
|
|
|
22530
22530
|
});
|
|
22531
22531
|
if (!r)
|
|
22532
22532
|
throw l.error("DytePermissionsPreset::load_preset_permissions_failed"), new w("Could not load preset permissions.", "0904");
|
|
22533
|
-
v(this,
|
|
22533
|
+
v(this, Kn, e), v(this, Jn, i), v(this, j, r), n && this.setupEvents();
|
|
22534
22534
|
}
|
|
22535
22535
|
setupEvents() {
|
|
22536
22536
|
k.on(I.UPDATE_PERMISSIONS, a(this, Md));
|
|
22537
22537
|
}
|
|
22538
22538
|
static fromResponse(e, r, i) {
|
|
22539
|
-
return new
|
|
22539
|
+
return new cn(i, e, r, true);
|
|
22540
22540
|
}
|
|
22541
22541
|
static default(e, r) {
|
|
22542
|
-
return new
|
|
22542
|
+
return new cn(e, ge, r);
|
|
22543
22543
|
}
|
|
22544
22544
|
static init(e, r, i) {
|
|
22545
22545
|
let n;
|
|
22546
|
-
return i ? n = new
|
|
22546
|
+
return i ? n = new cn(e, i, r, true) : n = new cn(e, ge, r), n;
|
|
22547
22547
|
}
|
|
22548
22548
|
get mediaRoomType() {
|
|
22549
|
-
const { sfu: e } = a(this,
|
|
22550
|
-
return e ===
|
|
22549
|
+
const { sfu: e } = a(this, Kn).getValue("roomNodeOptions");
|
|
22550
|
+
return e === Ae.CF ? "CF" : "HIVE";
|
|
22551
22551
|
}
|
|
22552
22552
|
get stageEnabled() {
|
|
22553
22553
|
var e;
|
|
22554
|
-
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this,
|
|
22554
|
+
return ((e = a(this, j)) == null ? void 0 : e.stageEnabled) || a(this, Jn) === At.Webinar || a(this, Jn) === At.Livestream;
|
|
22555
22555
|
}
|
|
22556
22556
|
get acceptStageRequests() {
|
|
22557
22557
|
var e, r;
|
|
@@ -22715,9 +22715,9 @@ const on = class extends Ut {
|
|
|
22715
22715
|
return a(this, j).transcriptionEnabled;
|
|
22716
22716
|
}
|
|
22717
22717
|
};
|
|
22718
|
-
let ku =
|
|
22719
|
-
j = /* @__PURE__ */ new WeakMap(),
|
|
22720
|
-
return a(this,
|
|
22718
|
+
let ku = cn;
|
|
22719
|
+
j = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), Md = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), Ot = function() {
|
|
22720
|
+
return a(this, Kn).getValue("stageStatus");
|
|
22721
22721
|
};
|
|
22722
22722
|
var Ku;
|
|
22723
22723
|
class m0 extends Ut {
|
|
@@ -23055,22 +23055,22 @@ var g0 = Object.defineProperty, f0 = Object.getOwnPropertyDescriptor, _t = (s, t
|
|
|
23055
23055
|
for (var i = r > 1 ? void 0 : r ? f0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
23056
23056
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23057
23057
|
return r && i && g0(t, e, i), i;
|
|
23058
|
-
},
|
|
23058
|
+
}, zn, ft, Yn, ws, Ks, Xr, je, Qe, $e, He, Qn, Xn, xo, Iu, fm;
|
|
23059
23059
|
let Ye = (fm = class extends m0 {
|
|
23060
23060
|
constructor(t, e, r, i, n) {
|
|
23061
23061
|
var o;
|
|
23062
23062
|
super();
|
|
23063
23063
|
f(this, Ks);
|
|
23064
23064
|
f(this, je);
|
|
23065
|
-
f(this,
|
|
23065
|
+
f(this, $e);
|
|
23066
23066
|
f(this, xo);
|
|
23067
23067
|
p(this, "name");
|
|
23068
23068
|
p(this, "picture");
|
|
23069
23069
|
p(this, "customParticipantId");
|
|
23070
23070
|
p(this, "waitlistStatus");
|
|
23071
|
-
f(this, Kn, void 0);
|
|
23072
|
-
f(this, ft, void 0);
|
|
23073
23071
|
f(this, zn, void 0);
|
|
23072
|
+
f(this, ft, void 0);
|
|
23073
|
+
f(this, Yn, void 0);
|
|
23074
23074
|
p(this, "role");
|
|
23075
23075
|
p(this, "userId");
|
|
23076
23076
|
p(this, "organizationId");
|
|
@@ -23080,9 +23080,9 @@ let Ye = (fm = class extends m0 {
|
|
|
23080
23080
|
p(this, "hidden", false);
|
|
23081
23081
|
p(this, "presetName");
|
|
23082
23082
|
p(this, "roomState", "init");
|
|
23083
|
-
f(this, Yn, /* @__PURE__ */ new Set());
|
|
23084
23083
|
f(this, Qn, /* @__PURE__ */ new Set());
|
|
23085
|
-
|
|
23084
|
+
f(this, Xn, /* @__PURE__ */ new Set());
|
|
23085
|
+
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);
|
|
23086
23086
|
}
|
|
23087
23087
|
get stageStatus() {
|
|
23088
23088
|
return a(this, ws).getValue("stageStatus");
|
|
@@ -23111,7 +23111,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23111
23111
|
}
|
|
23112
23112
|
setupEvents() {
|
|
23113
23113
|
this.on("videoUpdate", x(this, xo, Iu)), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23114
|
-
if (l.info("DyteSelf::setupEvents::AUDIO_TRACK_CHANGE", O({}, ri(this))), a(this,
|
|
23114
|
+
if (l.info("DyteSelf::setupEvents::AUDIO_TRACK_CHANGE", O({}, ri(this))), a(this, $e, He) && this.audioEnabled)
|
|
23115
23115
|
try {
|
|
23116
23116
|
yield a(this, je, Qe).shareMic(this.audioTrack);
|
|
23117
23117
|
} catch (t) {
|
|
@@ -23124,9 +23124,9 @@ let Ye = (fm = class extends m0 {
|
|
|
23124
23124
|
audioTrack: this.audioTrack
|
|
23125
23125
|
});
|
|
23126
23126
|
})), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23127
|
-
if (l.info("DyteSelf::setupEvents::VIDEO_TRACK_CHANGE", O({}, ri(this))), a(this,
|
|
23127
|
+
if (l.info("DyteSelf::setupEvents::VIDEO_TRACK_CHANGE", O({}, ri(this))), a(this, $e, He) && this.rawVideoTrack === void 0)
|
|
23128
23128
|
l.info("DyteSelf::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
23129
|
-
else if (this.videoEnabled && a(this,
|
|
23129
|
+
else if (this.videoEnabled && a(this, $e, He))
|
|
23130
23130
|
try {
|
|
23131
23131
|
const t = yield a(this, je, Qe).shareWebcam(this.videoTrack);
|
|
23132
23132
|
t && t.id !== this.videoTrack.id && z.hasFeature(se.EXP_RESHARE) && (yield a(this, je, Qe).shareWebcam(this.videoTrack));
|
|
@@ -23149,7 +23149,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23149
23149
|
), this.localMediaHandler.on("DEVICE_LIST_UPDATED", (t) => {
|
|
23150
23150
|
this.emit("deviceListUpdate", t);
|
|
23151
23151
|
}), this.localMediaHandler.on("SCREENSHARE_TRACK_CHANGE", () => u(this, null, function* () {
|
|
23152
|
-
if (!a(this,
|
|
23152
|
+
if (!a(this, $e, He)) {
|
|
23153
23153
|
l.error(
|
|
23154
23154
|
"DyteSelf.SCREENSHARE_TRACK_CHANGE.LocalMediaInitialized_WithoutRoomNode"
|
|
23155
23155
|
);
|
|
@@ -23177,7 +23177,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23177
23177
|
}), this.localMediaHandler.on("FORCE_MUTE_AUDIO", () => {
|
|
23178
23178
|
this.disableAudio();
|
|
23179
23179
|
}), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => u(this, null, function* () {
|
|
23180
|
-
a(this,
|
|
23180
|
+
a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23181
23181
|
videoEnabled: this.videoEnabled,
|
|
23182
23182
|
videoTrack: this.videoTrack
|
|
23183
23183
|
}), W.videoOff();
|
|
@@ -23190,11 +23190,11 @@ let Ye = (fm = class extends m0 {
|
|
|
23190
23190
|
return a(this, ft);
|
|
23191
23191
|
}
|
|
23192
23192
|
get config() {
|
|
23193
|
-
return a(this,
|
|
23193
|
+
return a(this, zn);
|
|
23194
23194
|
}
|
|
23195
23195
|
get roomJoined() {
|
|
23196
23196
|
var t;
|
|
23197
|
-
return a(this,
|
|
23197
|
+
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);
|
|
23198
23198
|
}
|
|
23199
23199
|
setName(t) {
|
|
23200
23200
|
if (!t)
|
|
@@ -23219,7 +23219,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23219
23219
|
enableAudio(t) {
|
|
23220
23220
|
return u(this, null, function* () {
|
|
23221
23221
|
if (this.permissions.canProduceAudio !== G.NotAllowed && !(a(this, ft).canProduceAudio === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
|
|
23222
|
-
if (W.audioOn(), yield this.localMediaHandler.enableAudio(t), a(this,
|
|
23222
|
+
if (W.audioOn(), yield this.localMediaHandler.enableAudio(t), a(this, $e, He) && this.stageStatus === "ON_STAGE") {
|
|
23223
23223
|
if (this.audioTrack)
|
|
23224
23224
|
try {
|
|
23225
23225
|
yield a(this, je, Qe).shareMic(this.audioTrack);
|
|
@@ -23242,7 +23242,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23242
23242
|
enableVideo(t) {
|
|
23243
23243
|
return u(this, null, function* () {
|
|
23244
23244
|
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) {
|
|
23245
|
-
if (W.videoOn(), yield this.localMediaHandler.enableVideo(t), a(this,
|
|
23245
|
+
if (W.videoOn(), yield this.localMediaHandler.enableVideo(t), a(this, $e, He) && this.stageStatus === "ON_STAGE")
|
|
23246
23246
|
try {
|
|
23247
23247
|
yield a(this, je, Qe).shareWebcam(this.videoTrack);
|
|
23248
23248
|
} catch (e) {
|
|
@@ -23266,7 +23266,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23266
23266
|
}
|
|
23267
23267
|
enableScreenShare() {
|
|
23268
23268
|
return u(this, null, function* () {
|
|
23269
|
-
if (!a(this,
|
|
23269
|
+
if (!a(this, $e, He))
|
|
23270
23270
|
throw new w("Can`t enable screenshare without joining room", "1105");
|
|
23271
23271
|
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)) {
|
|
23272
23272
|
try {
|
|
@@ -23295,7 +23295,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23295
23295
|
}
|
|
23296
23296
|
disableAudio() {
|
|
23297
23297
|
return u(this, null, function* () {
|
|
23298
|
-
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this,
|
|
23298
|
+
this.audioEnabled && (this.localMediaHandler.disableAudio(), a(this, $e, He) && a(this, je, Qe).muteSelf(), this.emit("audioUpdate", {
|
|
23299
23299
|
audioEnabled: this.audioEnabled,
|
|
23300
23300
|
audioTrack: this.audioTrack
|
|
23301
23301
|
}), W.audioOff());
|
|
@@ -23303,7 +23303,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23303
23303
|
}
|
|
23304
23304
|
disableVideo() {
|
|
23305
23305
|
return u(this, null, function* () {
|
|
23306
|
-
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this,
|
|
23306
|
+
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23307
23307
|
videoEnabled: this.videoEnabled,
|
|
23308
23308
|
videoTrack: this.videoTrack
|
|
23309
23309
|
}), W.videoOff());
|
|
@@ -23311,7 +23311,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23311
23311
|
}
|
|
23312
23312
|
disableScreenShare() {
|
|
23313
23313
|
return u(this, null, function* () {
|
|
23314
|
-
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this,
|
|
23314
|
+
this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), a(this, $e, He) && (yield a(this, je, Qe).disableScreenShare()), this.emit("screenShareUpdate", {
|
|
23315
23315
|
screenShareEnabled: this.screenShareEnabled,
|
|
23316
23316
|
screenShareTracks: this.screenShareTracks
|
|
23317
23317
|
}));
|
|
@@ -23322,36 +23322,36 @@ let Ye = (fm = class extends m0 {
|
|
|
23322
23322
|
}
|
|
23323
23323
|
setIsPinned(t, e = true) {
|
|
23324
23324
|
var i;
|
|
23325
|
-
v(this,
|
|
23325
|
+
v(this, Yn, t);
|
|
23326
23326
|
const r = t ? "pinned" : "unpinned";
|
|
23327
23327
|
(i = a(this, Ks, Xr)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
23328
23328
|
}
|
|
23329
23329
|
get isPinned() {
|
|
23330
|
-
return a(this,
|
|
23330
|
+
return a(this, Yn);
|
|
23331
23331
|
}
|
|
23332
23332
|
pin() {
|
|
23333
23333
|
return u(this, null, function* () {
|
|
23334
|
-
if (!a(this,
|
|
23334
|
+
if (!a(this, $e, He))
|
|
23335
23335
|
throw new w("Can`t pin participants without joining room", "1105");
|
|
23336
23336
|
return this.show(), a(this, je, Qe).pinPeer(this.id);
|
|
23337
23337
|
});
|
|
23338
23338
|
}
|
|
23339
23339
|
unpin() {
|
|
23340
23340
|
return u(this, null, function* () {
|
|
23341
|
-
if (!a(this,
|
|
23341
|
+
if (!a(this, $e, He))
|
|
23342
23342
|
throw new w("Can`t unpin participants without joining room", "1105");
|
|
23343
23343
|
return a(this, je, Qe).pinPeer(null);
|
|
23344
23344
|
});
|
|
23345
23345
|
}
|
|
23346
23346
|
hide() {
|
|
23347
23347
|
return u(this, null, function* () {
|
|
23348
|
-
if (!a(this,
|
|
23348
|
+
if (!a(this, $e, He))
|
|
23349
23349
|
throw new w("Can`t toggle participant tile without joining room", "1105");
|
|
23350
23350
|
this.hidden = true, this.emit("toggleTile", { hidden: this.hidden });
|
|
23351
23351
|
});
|
|
23352
23352
|
}
|
|
23353
23353
|
show() {
|
|
23354
|
-
if (!a(this,
|
|
23354
|
+
if (!a(this, $e, He))
|
|
23355
23355
|
throw new w("Can`t toggle participant tile without joining room", "1105");
|
|
23356
23356
|
this.hidden = false, this.emit("toggleTile", { hidden: this.hidden });
|
|
23357
23357
|
}
|
|
@@ -23368,7 +23368,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23368
23368
|
try {
|
|
23369
23369
|
yield this.localMediaHandler.setAudioDevice(t);
|
|
23370
23370
|
} catch (o) {
|
|
23371
|
-
a(this,
|
|
23371
|
+
a(this, $e, He) && (yield a(this, je, Qe).muteSelf()), this.emit("audioUpdate", {
|
|
23372
23372
|
audioEnabled: this.audioEnabled,
|
|
23373
23373
|
audioTrack: this.audioTrack
|
|
23374
23374
|
});
|
|
@@ -23381,7 +23381,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23381
23381
|
try {
|
|
23382
23382
|
yield this.localMediaHandler.setVideoDevice(t);
|
|
23383
23383
|
} catch (o) {
|
|
23384
|
-
a(this,
|
|
23384
|
+
a(this, $e, He) && (yield a(this, je, Qe).pauseWebcam()), this.emit("videoUpdate", {
|
|
23385
23385
|
videoEnabled: this.videoEnabled,
|
|
23386
23386
|
videoTrack: this.videoTrack
|
|
23387
23387
|
});
|
|
@@ -23396,7 +23396,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23396
23396
|
}
|
|
23397
23397
|
registerVideoElement(t, e = false) {
|
|
23398
23398
|
var r, i;
|
|
23399
|
-
t && (e ? a(this,
|
|
23399
|
+
t && (e ? a(this, Qn).add(t) : a(this, Xn).add(t), this.updateVideo(t), e || (i = a(this, Ks, Xr)) == null || i.addSource(
|
|
23400
23400
|
this.id,
|
|
23401
23401
|
t,
|
|
23402
23402
|
this.videoEnabled,
|
|
@@ -23411,7 +23411,7 @@ let Ye = (fm = class extends m0 {
|
|
|
23411
23411
|
a(this, Ks, Xr).removeSource(this.id);
|
|
23412
23412
|
return;
|
|
23413
23413
|
}
|
|
23414
|
-
t.srcObject = void 0, e ? a(this,
|
|
23414
|
+
t.srcObject = void 0, e ? a(this, Qn).delete(t) : (a(this, Xn).delete(t), a(this, Ks, Xr).removeSource(this.id));
|
|
23415
23415
|
}
|
|
23416
23416
|
updateVideo(t, e = false) {
|
|
23417
23417
|
var r, i, n;
|
|
@@ -23427,15 +23427,15 @@ let Ye = (fm = class extends m0 {
|
|
|
23427
23427
|
t.srcObject = void 0, e || (n = a(this, Ks, Xr)) == null || n.disableSource(this.id);
|
|
23428
23428
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
23429
23429
|
}
|
|
23430
|
-
},
|
|
23430
|
+
}, zn = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakSet(), Xr = function() {
|
|
23431
23431
|
return a(this, ws).getValue("pip");
|
|
23432
23432
|
}, je = /* @__PURE__ */ new WeakSet(), Qe = function() {
|
|
23433
23433
|
return a(this, ws).getValue("roomNodeClient");
|
|
23434
|
-
},
|
|
23434
|
+
}, $e = /* @__PURE__ */ new WeakSet(), He = function() {
|
|
23435
23435
|
var t;
|
|
23436
23436
|
return ((t = a(this, ws).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === true;
|
|
23437
|
-
},
|
|
23438
|
-
Array.from(a(this,
|
|
23437
|
+
}, Qn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakSet(), Iu = function() {
|
|
23438
|
+
Array.from(a(this, Xn)).forEach((t) => this.updateVideo(t, false)), Array.from(a(this, Qn)).forEach((t) => this.updateVideo(t, true));
|
|
23439
23439
|
}, fm);
|
|
23440
23440
|
_t([
|
|
23441
23441
|
y.trace("DyteSelf.cleanupEvents")
|
|
@@ -23557,7 +23557,7 @@ const Tf = (vm = class {
|
|
|
23557
23557
|
Nw.toBinary(t)
|
|
23558
23558
|
);
|
|
23559
23559
|
try {
|
|
23560
|
-
const { peer: i } =
|
|
23560
|
+
const { peer: i } = en.fromBinary((yield e).payload);
|
|
23561
23561
|
a(this, Uo).getValue("connectionHandler").socketJoined = true, k.emit(I.SOCKET_SERVICE_ROOM_JOINED, { peer: i });
|
|
23562
23562
|
const n = this.getRoomState(), o = this.getRoomPeersNonPaginated(), [{ room: c }, { peers: d }] = yield Promise.all([n, o]);
|
|
23563
23563
|
return k.emit(I.ROOM_STATE, c), k.emit(I.SOCKET_PEERS, d), { peer: i };
|
|
@@ -23643,7 +23643,7 @@ const Tf = (vm = class {
|
|
|
23643
23643
|
U.getPeerInfo,
|
|
23644
23644
|
Bg.toBinary({ peerId: s })
|
|
23645
23645
|
);
|
|
23646
|
-
t =
|
|
23646
|
+
t = en.fromBinary(e.payload);
|
|
23647
23647
|
} catch (e) {
|
|
23648
23648
|
l.error("getPeerInfo::binary_decode_error", { error: e });
|
|
23649
23649
|
}
|
|
@@ -23817,7 +23817,7 @@ const Tf = (vm = class {
|
|
|
23817
23817
|
case U.leaveRoom:
|
|
23818
23818
|
case U.kick:
|
|
23819
23819
|
case U.kickAll: {
|
|
23820
|
-
e =
|
|
23820
|
+
e = en.fromBinary.bind(en), r = en.create();
|
|
23821
23821
|
break;
|
|
23822
23822
|
}
|
|
23823
23823
|
case U.getWaitingRoomRequests: {
|
|
@@ -24099,7 +24099,7 @@ class C0 {
|
|
|
24099
24099
|
f(this, We, void 0);
|
|
24100
24100
|
p(this, "events");
|
|
24101
24101
|
p(this, "sfuType");
|
|
24102
|
-
v(this, We, t), this.sfuType = e, this.events = e ===
|
|
24102
|
+
v(this, We, t), this.sfuType = e, this.events = e === Ae.CF ? gs : es;
|
|
24103
24103
|
}
|
|
24104
24104
|
joinRoom(t, e, r, i = false, n = null) {
|
|
24105
24105
|
return u(this, null, function* () {
|
|
@@ -24150,7 +24150,7 @@ class C0 {
|
|
|
24150
24150
|
}
|
|
24151
24151
|
consume(t) {
|
|
24152
24152
|
return u(this, null, function* () {
|
|
24153
|
-
if (this.sfuType ===
|
|
24153
|
+
if (this.sfuType === Ae.HIVE)
|
|
24154
24154
|
throw new Error("Hive does not support socket consumer operations");
|
|
24155
24155
|
const e = (yield a(this, We).sendMessagePromise(
|
|
24156
24156
|
this.events.consume,
|
|
@@ -24173,7 +24173,7 @@ class C0 {
|
|
|
24173
24173
|
}
|
|
24174
24174
|
closeConsumer(t) {
|
|
24175
24175
|
return u(this, null, function* () {
|
|
24176
|
-
if (this.sfuType ===
|
|
24176
|
+
if (this.sfuType === Ae.HIVE)
|
|
24177
24177
|
throw new Error("Hive does not support socket consumer operations");
|
|
24178
24178
|
return (yield a(this, We).sendMessagePromise(
|
|
24179
24179
|
this.events.closeConsumer,
|
|
@@ -24183,7 +24183,7 @@ class C0 {
|
|
|
24183
24183
|
}
|
|
24184
24184
|
updateConsumersSimulcastConfig(t) {
|
|
24185
24185
|
return u(this, null, function* () {
|
|
24186
|
-
if (this.sfuType ===
|
|
24186
|
+
if (this.sfuType === Ae.HIVE)
|
|
24187
24187
|
throw new Error("Method not implemented");
|
|
24188
24188
|
return (yield a(this, We).sendMessagePromise(
|
|
24189
24189
|
this.events.updateConsumersSimulcastConfig,
|
|
@@ -24324,6 +24324,7 @@ class Sh extends wl {
|
|
|
24324
24324
|
p(this, "enableHighBitrate", false);
|
|
24325
24325
|
p(this, "enableStereo", false);
|
|
24326
24326
|
p(this, "enableDtx", true);
|
|
24327
|
+
p(this, "sfu", Ae.HIVE);
|
|
24327
24328
|
}
|
|
24328
24329
|
get midTransceiverMap() {
|
|
24329
24330
|
return this._mapMidTransceiver;
|
|
@@ -24372,12 +24373,13 @@ class Sh extends wl {
|
|
|
24372
24373
|
}
|
|
24373
24374
|
connect() {
|
|
24374
24375
|
return u(this, null, function* () {
|
|
24375
|
-
|
|
24376
|
-
|
|
24377
|
-
|
|
24378
|
-
|
|
24379
|
-
|
|
24380
|
-
|
|
24376
|
+
let e;
|
|
24377
|
+
this.sfu === Ae.CF ? this.pc.addTransceiver("video", { direction: "sendonly" }) : e = this.pc.createDataChannel("dyte");
|
|
24378
|
+
const r = yield this.pc.createOffer();
|
|
24379
|
+
return yield this.pc.setLocalDescription(r), l.info(`connect offer: ${JSON.stringify(r)}`), {
|
|
24380
|
+
offerSdp: r,
|
|
24381
|
+
callback: (n) => u(this, null, function* () {
|
|
24382
|
+
l.debug(`${this.name}::connect() | calling pc.setRemoteDescription() [answer:${JSON.stringify(n)}]`), yield this.pc.setRemoteDescription(n), e == null || e.close();
|
|
24381
24383
|
})
|
|
24382
24384
|
};
|
|
24383
24385
|
});
|
|
@@ -24879,7 +24881,7 @@ Fo = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), bs = /*
|
|
|
24879
24881
|
}));
|
|
24880
24882
|
}
|
|
24881
24883
|
};
|
|
24882
|
-
var os,
|
|
24884
|
+
var os, Zn, ea, wi, Yt, Xe, Ir, ta, Vt, rs;
|
|
24883
24885
|
class b0 extends wl {
|
|
24884
24886
|
constructor(e) {
|
|
24885
24887
|
var r, i;
|
|
@@ -24891,14 +24893,14 @@ class b0 extends wl {
|
|
|
24891
24893
|
p(this, "kind");
|
|
24892
24894
|
p(this, "appData");
|
|
24893
24895
|
p(this, "rtpSender");
|
|
24894
|
-
f(this, Xn, void 0);
|
|
24895
24896
|
f(this, Zn, void 0);
|
|
24897
|
+
f(this, ea, void 0);
|
|
24896
24898
|
f(this, wi, void 0);
|
|
24897
24899
|
f(this, Yt, false);
|
|
24898
24900
|
f(this, Xe, void 0);
|
|
24899
24901
|
f(this, Ir, void 0);
|
|
24900
|
-
f(this,
|
|
24901
|
-
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,
|
|
24902
|
+
f(this, ta, void 0);
|
|
24903
|
+
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();
|
|
24902
24904
|
}
|
|
24903
24905
|
get closed() {
|
|
24904
24906
|
return a(this, Yt);
|
|
@@ -24910,7 +24912,7 @@ class b0 extends wl {
|
|
|
24910
24912
|
return a(this, Ir);
|
|
24911
24913
|
}
|
|
24912
24914
|
get maxSpatialLayer() {
|
|
24913
|
-
return a(this,
|
|
24915
|
+
return a(this, ta);
|
|
24914
24916
|
}
|
|
24915
24917
|
close(e) {
|
|
24916
24918
|
return u(this, null, function* () {
|
|
@@ -24932,21 +24934,21 @@ class b0 extends wl {
|
|
|
24932
24934
|
});
|
|
24933
24935
|
}
|
|
24934
24936
|
pause() {
|
|
24935
|
-
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,
|
|
24937
|
+
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");
|
|
24936
24938
|
}
|
|
24937
24939
|
resume() {
|
|
24938
24940
|
if (l.debug("Producer::resume()", a(this, Vt, rs)), a(this, Yt)) {
|
|
24939
24941
|
l.error("Producer::resume() | Producer closed", a(this, Vt, rs));
|
|
24940
24942
|
return;
|
|
24941
24943
|
}
|
|
24942
|
-
v(this, Ir, false), a(this, Xe) && a(this,
|
|
24944
|
+
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");
|
|
24943
24945
|
}
|
|
24944
24946
|
replaceTrack(r) {
|
|
24945
24947
|
return u(this, arguments, function* ({
|
|
24946
24948
|
track: e
|
|
24947
24949
|
}) {
|
|
24948
24950
|
if (l.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, a(this, Vt, rs)), a(this, Yt)) {
|
|
24949
|
-
if (e && a(this,
|
|
24951
|
+
if (e && a(this, Zn))
|
|
24950
24952
|
try {
|
|
24951
24953
|
e.stop();
|
|
24952
24954
|
} catch (i) {
|
|
@@ -24972,7 +24974,7 @@ class b0 extends wl {
|
|
|
24972
24974
|
throw new yo("not a video Producer");
|
|
24973
24975
|
if (typeof e != "number")
|
|
24974
24976
|
throw new TypeError("invalid spatialLayer");
|
|
24975
|
-
yield a(this, os).setMaxSpatialLayer(this.localId, e), v(this,
|
|
24977
|
+
yield a(this, os).setMaxSpatialLayer(this.localId, e), v(this, ta, e);
|
|
24976
24978
|
});
|
|
24977
24979
|
}
|
|
24978
24980
|
setRtpEncodingParameters(e) {
|
|
@@ -24994,7 +24996,7 @@ class b0 extends wl {
|
|
|
24994
24996
|
var e;
|
|
24995
24997
|
if (a(this, Xe))
|
|
24996
24998
|
try {
|
|
24997
|
-
a(this, Xe).removeEventListener("ended", this._onTrackEnded), a(this,
|
|
24999
|
+
a(this, Xe).removeEventListener("ended", this._onTrackEnded), a(this, Zn) && a(this, Xe).stop();
|
|
24998
25000
|
} catch (r) {
|
|
24999
25001
|
l.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, q(O({}, a(this, Vt, rs)), {
|
|
25000
25002
|
error: r
|
|
@@ -25002,7 +25004,7 @@ class b0 extends wl {
|
|
|
25002
25004
|
}
|
|
25003
25005
|
}
|
|
25004
25006
|
}
|
|
25005
|
-
os = /* @__PURE__ */ new WeakMap(),
|
|
25007
|
+
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() {
|
|
25006
25008
|
return {
|
|
25007
25009
|
producer: {
|
|
25008
25010
|
id: this.id,
|
|
@@ -25030,7 +25032,7 @@ function Pf(s) {
|
|
|
25030
25032
|
return k0(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
|
|
25031
25033
|
}
|
|
25032
25034
|
var Ar;
|
|
25033
|
-
const
|
|
25035
|
+
const dn = class extends lt.EventEmitter {
|
|
25034
25036
|
constructor(e, r, i) {
|
|
25035
25037
|
super();
|
|
25036
25038
|
p(this, "channel");
|
|
@@ -25039,14 +25041,14 @@ const cn = class extends lt.EventEmitter {
|
|
|
25039
25041
|
f(this, Ar, /* @__PURE__ */ new Map());
|
|
25040
25042
|
p(this, "respond", (e2, r2, i2 = false) => {
|
|
25041
25043
|
let n;
|
|
25042
|
-
i2 ? n =
|
|
25044
|
+
i2 ? n = dn.createErrorResponse(e2, r2) : n = dn.createResponse(e2, r2), this.channel.send(JSON.stringify(n));
|
|
25043
25045
|
});
|
|
25044
25046
|
p(this, "notify", (e2) => {
|
|
25045
|
-
const r2 =
|
|
25047
|
+
const r2 = dn.createNotification(e2);
|
|
25046
25048
|
this.channel.send(JSON.stringify(r2));
|
|
25047
25049
|
});
|
|
25048
25050
|
p(this, "request", (e2) => u(this, null, function* () {
|
|
25049
|
-
const r2 =
|
|
25051
|
+
const r2 = dn.createRequest(e2), i2 = new Promise((n, o) => {
|
|
25050
25052
|
const { id: d } = r2.payload._bolt, h = {
|
|
25051
25053
|
id: d,
|
|
25052
25054
|
method: r2.type,
|
|
@@ -25114,7 +25116,7 @@ const cn = class extends lt.EventEmitter {
|
|
|
25114
25116
|
this.label = r, this.transportId = i, this.channel = e, this.queue = /* @__PURE__ */ new Map();
|
|
25115
25117
|
}
|
|
25116
25118
|
};
|
|
25117
|
-
let Zr =
|
|
25119
|
+
let Zr = dn;
|
|
25118
25120
|
Ar = /* @__PURE__ */ new WeakMap(), p(Zr, "createRequest", (e) => {
|
|
25119
25121
|
var r;
|
|
25120
25122
|
if ((r = e.payload) != null && r._bolt)
|
|
@@ -25169,8 +25171,8 @@ Ar = /* @__PURE__ */ new WeakMap(), p(Zr, "createRequest", (e) => {
|
|
|
25169
25171
|
}
|
|
25170
25172
|
}));
|
|
25171
25173
|
const hd = "transport closed";
|
|
25172
|
-
var
|
|
25173
|
-
const
|
|
25174
|
+
var bi;
|
|
25175
|
+
const ln = class extends wl {
|
|
25174
25176
|
constructor(e, {
|
|
25175
25177
|
id: r,
|
|
25176
25178
|
direction: i,
|
|
@@ -25186,7 +25188,7 @@ const dn = class extends wl {
|
|
|
25186
25188
|
super();
|
|
25187
25189
|
p(this, "awaitQueue");
|
|
25188
25190
|
p(this, "observer");
|
|
25189
|
-
f(this,
|
|
25191
|
+
f(this, bi, void 0);
|
|
25190
25192
|
p(this, "id");
|
|
25191
25193
|
p(this, "serverId");
|
|
25192
25194
|
p(this, "direction");
|
|
@@ -25204,9 +25206,9 @@ const dn = class extends wl {
|
|
|
25204
25206
|
p(this, "consumerTrackEvents");
|
|
25205
25207
|
p(this, "unknownTracksMap");
|
|
25206
25208
|
p(this, "appData");
|
|
25207
|
-
l.debug(`constructor() [id: ${r}, direction: ${i}]`), v(this,
|
|
25209
|
+
l.debug(`constructor() [id: ${r}, direction: ${i}]`), v(this, bi, e), this.id = r, this.direction = i;
|
|
25208
25210
|
const T = R0(h, {});
|
|
25209
|
-
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({
|
|
25211
|
+
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({
|
|
25210
25212
|
onTrackHandler: this._ontrack.bind(this),
|
|
25211
25213
|
direction: i,
|
|
25212
25214
|
iceServers: o,
|
|
@@ -25314,7 +25316,7 @@ const dn = class extends wl {
|
|
|
25314
25316
|
this.setServerId(n), yield i(o);
|
|
25315
25317
|
})), !(yield this.transportConnectionPromise))
|
|
25316
25318
|
throw new Error("ice connection failed");
|
|
25317
|
-
if (a(this,
|
|
25319
|
+
if (a(this, bi) === Ae.HIVE && !(yield this.isEventsDCReady))
|
|
25318
25320
|
throw new Error("events datachannel not open");
|
|
25319
25321
|
} catch (r) {
|
|
25320
25322
|
throw l.error("transport failed to connect:", { error: r }), r;
|
|
@@ -25485,19 +25487,19 @@ const dn = class extends wl {
|
|
|
25485
25487
|
closeConsumers(e, r) {
|
|
25486
25488
|
return u(this, null, function* () {
|
|
25487
25489
|
try {
|
|
25488
|
-
const i = e.map((h) => h.transceiver.mid), n =
|
|
25490
|
+
const i = e.map((h) => h.transceiver.mid), n = ln.parseCodecAndFmtpMappings(
|
|
25489
25491
|
this.handler.pc.remoteDescription,
|
|
25490
25492
|
i
|
|
25491
|
-
), o =
|
|
25493
|
+
), o = ln.parseHeaderExtensionMappings(
|
|
25492
25494
|
this.handler.pc.remoteDescription
|
|
25493
25495
|
);
|
|
25494
25496
|
l.info("Stopping transceivers", { consumerIds: e.map(({ id: h }) => h) }), e.forEach((h) => h.close(void 0, true));
|
|
25495
25497
|
let c = yield this.handler.pc.createOffer();
|
|
25496
|
-
l.info("Created offer for closing consumers", { sdp: c.sdp }), c =
|
|
25498
|
+
l.info("Created offer for closing consumers", { sdp: c.sdp }), c = ln.setCodecAndFmtpMappings(
|
|
25497
25499
|
c,
|
|
25498
25500
|
i,
|
|
25499
25501
|
n
|
|
25500
|
-
), c =
|
|
25502
|
+
), c = ln.setHeaderExtensionMappings(
|
|
25501
25503
|
c,
|
|
25502
25504
|
o
|
|
25503
25505
|
), 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");
|
|
@@ -25538,7 +25540,7 @@ const dn = class extends wl {
|
|
|
25538
25540
|
const { track: r, transceiver: i, streams: n } = e;
|
|
25539
25541
|
l.info(`track event received [trackId: ${r.id}] [mid: ${i.mid}]`);
|
|
25540
25542
|
let o;
|
|
25541
|
-
a(this,
|
|
25543
|
+
a(this, bi) === Ae.HIVE ? o = `${n[0].id}:${r.kind}` : o = `${i.mid}:${r.kind}`, r.addEventListener("ended", () => {
|
|
25542
25544
|
l.info(`rtc consumer track ended [trackId: ${r.id}]`), this.unknownTracksMap.delete(o);
|
|
25543
25545
|
});
|
|
25544
25546
|
const c = this.consumerTrackEvents.get(o);
|
|
@@ -25643,8 +25645,8 @@ const dn = class extends wl {
|
|
|
25643
25645
|
});
|
|
25644
25646
|
}
|
|
25645
25647
|
};
|
|
25646
|
-
let Du =
|
|
25647
|
-
|
|
25648
|
+
let Du = ln;
|
|
25649
|
+
bi = /* @__PURE__ */ new WeakMap();
|
|
25648
25650
|
function I0() {
|
|
25649
25651
|
if (typeof navigator == "object" && navigator.product === "ReactNative") {
|
|
25650
25652
|
if (typeof RTCPeerConnection == "undefined") {
|
|
@@ -25731,7 +25733,7 @@ class A0 {
|
|
|
25731
25733
|
}
|
|
25732
25734
|
Ho = /* @__PURE__ */ new WeakMap();
|
|
25733
25735
|
const M0 = 2e3;
|
|
25734
|
-
var cs, sa, nt, at, qo, jo,
|
|
25736
|
+
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;
|
|
25735
25737
|
class D0 extends lt.EventEmitter {
|
|
25736
25738
|
constructor(e, r, i) {
|
|
25737
25739
|
super();
|
|
@@ -25752,7 +25754,7 @@ class D0 extends lt.EventEmitter {
|
|
|
25752
25754
|
f(this, at, void 0);
|
|
25753
25755
|
f(this, qo, void 0);
|
|
25754
25756
|
f(this, jo, void 0);
|
|
25755
|
-
f(this,
|
|
25757
|
+
f(this, ki, void 0);
|
|
25756
25758
|
f(this, ra, void 0);
|
|
25757
25759
|
f(this, ia, void 0);
|
|
25758
25760
|
f(this, na, {
|
|
@@ -25762,27 +25764,27 @@ class D0 extends lt.EventEmitter {
|
|
|
25762
25764
|
},
|
|
25763
25765
|
lastConnectionTime: 0
|
|
25764
25766
|
});
|
|
25765
|
-
f(this,
|
|
25767
|
+
f(this, Ii, void 0);
|
|
25766
25768
|
f(this, Is, "all");
|
|
25767
25769
|
f(this, aa, void 0);
|
|
25768
|
-
switch (v(this, cs, e), v(this,
|
|
25769
|
-
case
|
|
25770
|
+
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) {
|
|
25771
|
+
case Ae.CF: {
|
|
25770
25772
|
v(this, ia, gs);
|
|
25771
25773
|
break;
|
|
25772
25774
|
}
|
|
25773
|
-
case
|
|
25775
|
+
case Ae.HIVE:
|
|
25774
25776
|
default: {
|
|
25775
25777
|
v(this, ia, es);
|
|
25776
25778
|
break;
|
|
25777
25779
|
}
|
|
25778
25780
|
}
|
|
25779
25781
|
a(this, oa, zc).mediaState = {
|
|
25780
|
-
send: { state:
|
|
25781
|
-
recv: { state:
|
|
25782
|
+
send: { state: pn.NEW },
|
|
25783
|
+
recv: { state: pn.NEW }
|
|
25782
25784
|
}, (_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);
|
|
25783
25785
|
}
|
|
25784
25786
|
get socket() {
|
|
25785
|
-
return a(this,
|
|
25787
|
+
return a(this, ki);
|
|
25786
25788
|
}
|
|
25787
25789
|
get socketHandler() {
|
|
25788
25790
|
return a(this, ra);
|
|
@@ -25843,10 +25845,10 @@ class D0 extends lt.EventEmitter {
|
|
|
25843
25845
|
throw new Error("Method not implemented.");
|
|
25844
25846
|
}
|
|
25845
25847
|
}
|
|
25846
|
-
cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), qo = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(),
|
|
25848
|
+
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() {
|
|
25847
25849
|
return a(this, cs).getValue("connectionHandler");
|
|
25848
25850
|
}, Go = /* @__PURE__ */ new WeakSet(), Ou = function() {
|
|
25849
|
-
v(this,
|
|
25851
|
+
v(this, Ii, {
|
|
25850
25852
|
send: void 0,
|
|
25851
25853
|
recv: void 0
|
|
25852
25854
|
});
|
|
@@ -25867,7 +25869,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25867
25869
|
config: {
|
|
25868
25870
|
enableHighBitrate: (h = (d = (c = a(this, cs).getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? h : false,
|
|
25869
25871
|
enableStereo: (T = (g = (m = a(this, cs).getValue("defaults").mediaConfiguration) == null ? void 0 : m.audio) == null ? void 0 : g.enableStereo) != null ? T : false,
|
|
25870
|
-
enableDtx: a(this, aa) ===
|
|
25872
|
+
enableDtx: a(this, aa) === Ae.HIVE ? true : !!P
|
|
25871
25873
|
},
|
|
25872
25874
|
iceTransportPolicy: a(this, Is)
|
|
25873
25875
|
});
|
|
@@ -25923,7 +25925,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25923
25925
|
const { id: r, direction: i } = e;
|
|
25924
25926
|
if (l.info(`Connecting ${i} transport`, {
|
|
25925
25927
|
transport: { id: r, type: i }
|
|
25926
|
-
}), !a(this,
|
|
25928
|
+
}), !a(this, ki).isConnected)
|
|
25927
25929
|
throw new ni("Socket is not connected");
|
|
25928
25930
|
if (e.connectionState === "closed")
|
|
25929
25931
|
throw new ni("Transport is closed");
|
|
@@ -25982,15 +25984,15 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
25982
25984
|
}
|
|
25983
25985
|
);
|
|
25984
25986
|
const o = () => {
|
|
25985
|
-
const c = a(this,
|
|
25986
|
-
c !== void 0 && (clearTimeout(c), a(this,
|
|
25987
|
+
const c = a(this, Ii)[r];
|
|
25988
|
+
c !== void 0 && (clearTimeout(c), a(this, Ii)[r] = void 0);
|
|
25987
25989
|
};
|
|
25988
25990
|
switch (n) {
|
|
25989
25991
|
case "connected":
|
|
25990
25992
|
o(), a(this, na).lastConnectionTime = performance.now();
|
|
25991
25993
|
break;
|
|
25992
25994
|
case "disconnected":
|
|
25993
|
-
a(this,
|
|
25995
|
+
a(this, Ii)[r] = setTimeout(() => u(this, null, function* () {
|
|
25994
25996
|
yield x(this, Jo, Lu).call(this, e.direction);
|
|
25995
25997
|
}), M0);
|
|
25996
25998
|
break;
|
|
@@ -26061,7 +26063,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
26061
26063
|
return u(this, null, function* () {
|
|
26062
26064
|
switch (l.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: true }), z.hasFeature(
|
|
26063
26065
|
se.HIVE_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
26064
|
-
) && a(this,
|
|
26066
|
+
) && 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) {
|
|
26065
26067
|
case "send": {
|
|
26066
26068
|
l.info("Transport reconnected", { transport: a(this, nt) }), k.emit(I.RESET_PRODUCER_STATE);
|
|
26067
26069
|
break;
|
|
@@ -26074,7 +26076,7 @@ cs = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), nt = /*
|
|
|
26074
26076
|
l.warn("Unknown transport direction", { transport: { type: e } });
|
|
26075
26077
|
}
|
|
26076
26078
|
x(this, Ko, Vu).call(this, {
|
|
26077
|
-
state:
|
|
26079
|
+
state: pn.CONNECTED,
|
|
26078
26080
|
direction: e
|
|
26079
26081
|
});
|
|
26080
26082
|
});
|
|
@@ -26373,7 +26375,7 @@ class Ph {
|
|
|
26373
26375
|
});
|
|
26374
26376
|
}
|
|
26375
26377
|
}
|
|
26376
|
-
var zo,
|
|
26378
|
+
var zo, Ai, Mr, ca, Yo, ds, Bd, zs, da, Qo, xu, Hd, Mf, qd, Df, jd, Of, Gd, Nf;
|
|
26377
26379
|
class L0 extends D0 {
|
|
26378
26380
|
constructor(e, r, i) {
|
|
26379
26381
|
super(e, r, i);
|
|
@@ -26383,7 +26385,7 @@ class L0 extends D0 {
|
|
|
26383
26385
|
f(this, jd);
|
|
26384
26386
|
f(this, Gd);
|
|
26385
26387
|
f(this, zo, void 0);
|
|
26386
|
-
f(this,
|
|
26388
|
+
f(this, Ai, void 0);
|
|
26387
26389
|
f(this, Mr, void 0);
|
|
26388
26390
|
f(this, ca, void 0);
|
|
26389
26391
|
f(this, Yo, void 0);
|
|
@@ -26399,7 +26401,7 @@ class L0 extends D0 {
|
|
|
26399
26401
|
v(this, Yo, new Ph(this.socketHandler));
|
|
26400
26402
|
}), this.recvTransportConnectedCallback = (n) => u(this, null, function* () {
|
|
26401
26403
|
switch (a(this, ca).clear(), this.nodeType) {
|
|
26402
|
-
case
|
|
26404
|
+
case Ae.CF: {
|
|
26403
26405
|
v(this, ds, new N0(
|
|
26404
26406
|
this.events,
|
|
26405
26407
|
n,
|
|
@@ -26408,7 +26410,7 @@ class L0 extends D0 {
|
|
|
26408
26410
|
));
|
|
26409
26411
|
break;
|
|
26410
26412
|
}
|
|
26411
|
-
case
|
|
26413
|
+
case Ae.HIVE:
|
|
26412
26414
|
default:
|
|
26413
26415
|
v(this, ds, new O0(n));
|
|
26414
26416
|
}
|
|
@@ -26418,7 +26420,7 @@ class L0 extends D0 {
|
|
|
26418
26420
|
return super.socketHandler;
|
|
26419
26421
|
}
|
|
26420
26422
|
get producers() {
|
|
26421
|
-
return a(this,
|
|
26423
|
+
return a(this, Ai);
|
|
26422
26424
|
}
|
|
26423
26425
|
get consumers() {
|
|
26424
26426
|
return a(this, Mr);
|
|
@@ -26427,7 +26429,7 @@ class L0 extends D0 {
|
|
|
26427
26429
|
return a(this, ca);
|
|
26428
26430
|
}
|
|
26429
26431
|
reset() {
|
|
26430
|
-
v(this,
|
|
26432
|
+
v(this, Ai, /* @__PURE__ */ new Map()), v(this, Mr, /* @__PURE__ */ new Map()), v(this, ca, /* @__PURE__ */ new Map());
|
|
26431
26433
|
}
|
|
26432
26434
|
createProducer(e, r) {
|
|
26433
26435
|
return u(this, null, function* () {
|
|
@@ -26462,7 +26464,7 @@ class L0 extends D0 {
|
|
|
26462
26464
|
});
|
|
26463
26465
|
}
|
|
26464
26466
|
closeAllProducers() {
|
|
26465
|
-
return Promise.all(Array.from(a(this,
|
|
26467
|
+
return Promise.all(Array.from(a(this, Ai).entries()).map(([, e]) => e.close()));
|
|
26466
26468
|
}
|
|
26467
26469
|
createConsumer(e) {
|
|
26468
26470
|
return this.createConsumers([e]);
|
|
@@ -26495,7 +26497,7 @@ class L0 extends D0 {
|
|
|
26495
26497
|
});
|
|
26496
26498
|
}
|
|
26497
26499
|
}
|
|
26498
|
-
zo = /* @__PURE__ */ new WeakMap(),
|
|
26500
|
+
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() {
|
|
26499
26501
|
return u(this, null, function* () {
|
|
26500
26502
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
26501
26503
|
throw new Error("Recv transport is closed");
|
|
@@ -26564,7 +26566,7 @@ zo = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Mr = /*
|
|
|
26564
26566
|
this.producers.delete(e.id), r();
|
|
26565
26567
|
})), e.on("trackended", () => {
|
|
26566
26568
|
l.info("producer::trackended", { producer: q(O({}, e), { status: "UNKNOWN" }) });
|
|
26567
|
-
}), a(this,
|
|
26569
|
+
}), a(this, Ai).set(e.id, e);
|
|
26568
26570
|
}, jd = /* @__PURE__ */ new WeakSet(), Of = function(e) {
|
|
26569
26571
|
return u(this, null, function* () {
|
|
26570
26572
|
try {
|
|
@@ -26589,7 +26591,7 @@ zo = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Mr = /*
|
|
|
26589
26591
|
peerId: e.peerId
|
|
26590
26592
|
});
|
|
26591
26593
|
};
|
|
26592
|
-
var Xo, Zo, ec, la, ua, ha, tc, sc, pa, wt, ls, us,
|
|
26594
|
+
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;
|
|
26593
26595
|
const Yd = class {
|
|
26594
26596
|
constructor({
|
|
26595
26597
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -26617,8 +26619,8 @@ const Yd = class {
|
|
|
26617
26619
|
f(this, wt, void 0);
|
|
26618
26620
|
f(this, ls, void 0);
|
|
26619
26621
|
f(this, us, false);
|
|
26620
|
-
f(this, Ai, 0);
|
|
26621
26622
|
f(this, Mi, 0);
|
|
26623
|
+
f(this, Di, 0);
|
|
26622
26624
|
f(this, Ys, []);
|
|
26623
26625
|
f(this, rc, void 0);
|
|
26624
26626
|
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);
|
|
@@ -26629,10 +26631,10 @@ const Yd = class {
|
|
|
26629
26631
|
processAudioChunk(t) {
|
|
26630
26632
|
var o, c;
|
|
26631
26633
|
const e = x(o = Yd, Kd, xf).call(o, t), r = x(c = Yd, zd, Uf).call(c, t);
|
|
26632
|
-
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,
|
|
26634
|
+
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) };
|
|
26633
26635
|
}
|
|
26634
26636
|
reset() {
|
|
26635
|
-
v(this, us, false), v(this,
|
|
26637
|
+
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, []);
|
|
26636
26638
|
}
|
|
26637
26639
|
getThresholdInfo() {
|
|
26638
26640
|
return {
|
|
@@ -26643,7 +26645,7 @@ const Yd = class {
|
|
|
26643
26645
|
}
|
|
26644
26646
|
};
|
|
26645
26647
|
let ro = Yd;
|
|
26646
|
-
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(),
|
|
26648
|
+
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) {
|
|
26647
26649
|
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(
|
|
26648
26650
|
a(this, tc),
|
|
26649
26651
|
Math.min(a(this, sc), a(this, wt))
|
|
@@ -26666,7 +26668,7 @@ Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), ec = /*
|
|
|
26666
26668
|
return e;
|
|
26667
26669
|
}, f(ro, Kd), f(ro, zd);
|
|
26668
26670
|
const V0 = 60, x0 = 400;
|
|
26669
|
-
var Qs, Xs, hs, Dr, Or, ma,
|
|
26671
|
+
var Qs, Xs, hs, Dr, Or, ma, Oi, ga, Zs, Nr, fa, Qd, $f, ic, Uu, Xd, Ff, Zd, Bf;
|
|
26670
26672
|
const go = class {
|
|
26671
26673
|
constructor(t) {
|
|
26672
26674
|
f(this, Qd);
|
|
@@ -26677,7 +26679,7 @@ const go = class {
|
|
|
26677
26679
|
f(this, Dr, void 0);
|
|
26678
26680
|
f(this, Or, void 0);
|
|
26679
26681
|
f(this, ma, void 0);
|
|
26680
|
-
f(this,
|
|
26682
|
+
f(this, Oi, void 0);
|
|
26681
26683
|
f(this, ga, void 0);
|
|
26682
26684
|
f(this, Zs, void 0);
|
|
26683
26685
|
f(this, Nr, void 0);
|
|
@@ -26699,7 +26701,7 @@ const go = class {
|
|
|
26699
26701
|
return;
|
|
26700
26702
|
const { energy: t } = x(this, Qd, $f).call(this), e = x(i = go, ic, Uu).call(i, t);
|
|
26701
26703
|
let r = 0.9;
|
|
26702
|
-
a(this, fa) !== e && a(this, fa) ? r = 0.9 : e ? r = 0.3 : r = 0.5, v(this,
|
|
26704
|
+
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);
|
|
26703
26705
|
}), V0)), a(this, Xs) && clearInterval$1(a(this, Xs)), v(this, Xs, setInterval$1(
|
|
26704
26706
|
x(this, Xd, Ff).bind(this),
|
|
26705
26707
|
x0
|
|
@@ -26714,7 +26716,7 @@ const go = class {
|
|
|
26714
26716
|
}
|
|
26715
26717
|
};
|
|
26716
26718
|
let io = go;
|
|
26717
|
-
Qs = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(),
|
|
26719
|
+
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() {
|
|
26718
26720
|
var o;
|
|
26719
26721
|
a(this, Dr).state === "suspended" && a(this, Dr).resume().then(() => {
|
|
26720
26722
|
l.debug("AudioActivityReporter: AudioContext forced resumed");
|
|
@@ -26725,13 +26727,13 @@ Qs = /* @__PURE__ */ new WeakMap(), Xs = /* @__PURE__ */ new WeakMap(), hs = /*
|
|
|
26725
26727
|
a(this, Or).getFloatTimeDomainData(t);
|
|
26726
26728
|
const { energy: e, isVoice: r } = a(this, ga).processAudioChunk(t), i = x(o = go, Zd, Bf).call(o, e);
|
|
26727
26729
|
return z.hasFeature(se.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && l.debug(
|
|
26728
|
-
`AudioActivityReporter: producer: ${a(this, hs)}, energy: ${a(this,
|
|
26730
|
+
`AudioActivityReporter: producer: ${a(this, hs)}, energy: ${a(this, Oi)},
|
|
26729
26731
|
slogScale: ${i}, isVoice: ${r}, minEnergy: ${a(this, Zs)},
|
|
26730
26732
|
maxEnergy: ${a(this, Nr)}`
|
|
26731
26733
|
), 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 });
|
|
26732
26734
|
}, ic = /* @__PURE__ */ new WeakSet(), Uu = function(t) {
|
|
26733
26735
|
return t < 5;
|
|
26734
|
-
}, Xd = /* @__PURE__ */ new WeakSet(), Ff = function(t = a(this,
|
|
26736
|
+
}, Xd = /* @__PURE__ */ new WeakSet(), Ff = function(t = a(this, Oi)) {
|
|
26735
26737
|
var r;
|
|
26736
26738
|
if (!a(this, hs) || !t) {
|
|
26737
26739
|
z.hasFeature(se.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && l.debug(`AudioActivityReporter: No producerId or energy to report: ${a(this, hs)}`);
|
|
@@ -26808,7 +26810,7 @@ var F0 = Object.defineProperty, B0 = Object.getOwnPropertyDescriptor, pe = (s, t
|
|
|
26808
26810
|
return r && i && F0(t, e, i), i;
|
|
26809
26811
|
};
|
|
26810
26812
|
const Ps = ["video/VP9", "video/VP8"];
|
|
26811
|
-
var nc, ac, ot, J, va, As, vt,
|
|
26813
|
+
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;
|
|
26812
26814
|
const Hf = (Yl = class {
|
|
26813
26815
|
constructor(s, t, e) {
|
|
26814
26816
|
f(this, Lr);
|
|
@@ -26820,7 +26822,7 @@ const Hf = (Yl = class {
|
|
|
26820
26822
|
f(this, nl);
|
|
26821
26823
|
f(this, al);
|
|
26822
26824
|
f(this, Ze);
|
|
26823
|
-
f(this,
|
|
26825
|
+
f(this, $i);
|
|
26824
26826
|
f(this, ol);
|
|
26825
26827
|
f(this, cl);
|
|
26826
26828
|
f(this, dl);
|
|
@@ -26834,15 +26836,15 @@ const Hf = (Yl = class {
|
|
|
26834
26836
|
f(this, va, void 0);
|
|
26835
26837
|
f(this, As, void 0);
|
|
26836
26838
|
f(this, vt, void 0);
|
|
26837
|
-
f(this, Oi, void 0);
|
|
26838
26839
|
f(this, Ni, void 0);
|
|
26839
26840
|
f(this, Li, void 0);
|
|
26841
|
+
f(this, Vi, void 0);
|
|
26840
26842
|
f(this, oc, void 0);
|
|
26841
26843
|
f(this, Qt, null);
|
|
26842
26844
|
f(this, er, void 0);
|
|
26843
26845
|
f(this, cc, void 0);
|
|
26844
|
-
f(this, Vi, void 0);
|
|
26845
26846
|
f(this, xi, void 0);
|
|
26847
|
+
f(this, Ui, void 0);
|
|
26846
26848
|
f(this, Tt, void 0);
|
|
26847
26849
|
f(this, bt, void 0);
|
|
26848
26850
|
var i, n;
|
|
@@ -26850,17 +26852,17 @@ const Hf = (Yl = class {
|
|
|
26850
26852
|
const {
|
|
26851
26853
|
socket: r
|
|
26852
26854
|
} = e;
|
|
26853
|
-
this.mediaJoined = false, v(this,
|
|
26855
|
+
this.mediaJoined = false, v(this, xi, /* @__PURE__ */ new Map([
|
|
26854
26856
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26855
26857
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26856
|
-
])), v(this,
|
|
26858
|
+
])), v(this, Ui, /* @__PURE__ */ new Map([
|
|
26857
26859
|
["video/VP9", /* @__PURE__ */ new Set()],
|
|
26858
26860
|
["video/VP8", /* @__PURE__ */ new Set()]
|
|
26859
|
-
])), v(this, As, t), v(this, ot, r), v(this,
|
|
26861
|
+
])), 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(
|
|
26860
26862
|
a(this, J).socketHandler.audioActivity.bind(a(this, J).socketHandler)
|
|
26861
26863
|
)), this.e2ee = (n = (i = s.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : false, this.handleSocketEvents(), this.handleCallstatsEvents(), v(this, oc, ah(
|
|
26862
26864
|
() => u(this, null, function* () {
|
|
26863
|
-
if (!a(this, Lr,
|
|
26865
|
+
if (!a(this, Lr, sn).mediaJoinAttempted)
|
|
26864
26866
|
return;
|
|
26865
26867
|
const { roomJoined: o } = yield this.joinRoom(
|
|
26866
26868
|
a(this, ac),
|
|
@@ -26878,19 +26880,19 @@ const Hf = (Yl = class {
|
|
|
26878
26880
|
return this.context.getValue("peerId");
|
|
26879
26881
|
}
|
|
26880
26882
|
get mediaJoined() {
|
|
26881
|
-
return a(this, Lr,
|
|
26883
|
+
return a(this, Lr, sn).mediaJoined;
|
|
26882
26884
|
}
|
|
26883
26885
|
set mediaJoined(s) {
|
|
26884
|
-
a(this, Lr,
|
|
26886
|
+
a(this, Lr, sn).mediaJoined = s;
|
|
26885
26887
|
}
|
|
26886
26888
|
reset() {
|
|
26887
|
-
a(this, J).closeAllProducers(), a(this, J).closeAllConsumers(), a(this, Tt).clear(), a(this, er).clear(), v(this, Qt, null), a(this,
|
|
26889
|
+
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());
|
|
26888
26890
|
}
|
|
26889
26891
|
joinRoom(n, o) {
|
|
26890
26892
|
return u(this, arguments, function* (s, t, e = false, r = false, i = {}) {
|
|
26891
|
-
a(this, Lr,
|
|
26893
|
+
a(this, Lr, sn).mediaJoinAttempted = true, v(this, Ni, true), e && this.reset();
|
|
26892
26894
|
try {
|
|
26893
|
-
return yield a(this,
|
|
26895
|
+
return yield a(this, Vi).push(
|
|
26894
26896
|
() => x(this, el, qf).call(this, s, t, r, i),
|
|
26895
26897
|
"joinRoom"
|
|
26896
26898
|
);
|
|
@@ -26916,7 +26918,7 @@ const Hf = (Yl = class {
|
|
|
26916
26918
|
leaveRoom() {
|
|
26917
26919
|
return u(this, null, function* () {
|
|
26918
26920
|
var t;
|
|
26919
|
-
a(this, J).stopAllTransports(), v(this,
|
|
26921
|
+
a(this, J).stopAllTransports(), v(this, Li, false), a(this, Lr, sn).mediaJoinAttempted = false;
|
|
26920
26922
|
const s = {
|
|
26921
26923
|
closeRoom: false
|
|
26922
26924
|
};
|
|
@@ -26970,7 +26972,7 @@ const Hf = (Yl = class {
|
|
|
26970
26972
|
}
|
|
26971
26973
|
return this._shareWebcam(s, t);
|
|
26972
26974
|
}
|
|
26973
|
-
const i = x(this, dl, Xf).call(this, s, t), n = _a(this.context, "disableSimulcast"), o = a(this, As) ===
|
|
26975
|
+
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;
|
|
26974
26976
|
!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(
|
|
26975
26977
|
se.TRACK_HINT
|
|
26976
26978
|
));
|
|
@@ -26980,7 +26982,7 @@ const Hf = (Yl = class {
|
|
|
26980
26982
|
i,
|
|
26981
26983
|
c
|
|
26982
26984
|
);
|
|
26983
|
-
return x(this,
|
|
26985
|
+
return x(this, $i, no).call(this, e, d.then((h) => h.id)), d.then((h) => h.track);
|
|
26984
26986
|
});
|
|
26985
26987
|
}
|
|
26986
26988
|
shareWebcam(s) {
|
|
@@ -26997,7 +26999,7 @@ const Hf = (Yl = class {
|
|
|
26997
26999
|
var e, r;
|
|
26998
27000
|
return ((r = (e = a(this, va).sender) == null ? void 0 : e.video) == null ? void 0 : r.codecs.findIndex(
|
|
26999
27001
|
(i) => i.mimeType === t
|
|
27000
|
-
)) >= 0 && a(this,
|
|
27002
|
+
)) >= 0 && a(this, Ui).get(t).size > 0 ? (l.debug(
|
|
27001
27003
|
`Calling _shareWebcam with video codec: ${t}`
|
|
27002
27004
|
), this._shareWebcam(s, t)) : s;
|
|
27003
27005
|
})
|
|
@@ -27028,7 +27030,7 @@ const Hf = (Yl = class {
|
|
|
27028
27030
|
r,
|
|
27029
27031
|
i
|
|
27030
27032
|
);
|
|
27031
|
-
x(this,
|
|
27033
|
+
x(this, $i, no).call(this, fe.SCREENSHARE_VIDEO, n.then((c) => c.id));
|
|
27032
27034
|
let o;
|
|
27033
27035
|
if (e) {
|
|
27034
27036
|
const c = {
|
|
@@ -27040,13 +27042,13 @@ const Hf = (Yl = class {
|
|
|
27040
27042
|
supportsRemoteControl: Ce.isElectron()
|
|
27041
27043
|
},
|
|
27042
27044
|
stopTracks: false,
|
|
27043
|
-
zeroRtpOnPause: a(this, As) !==
|
|
27045
|
+
zeroRtpOnPause: a(this, As) !== Ae.CF
|
|
27044
27046
|
}, d = () => {
|
|
27045
27047
|
};
|
|
27046
27048
|
o = a(this, J).createProducer(
|
|
27047
27049
|
c,
|
|
27048
27050
|
d
|
|
27049
|
-
), x(this,
|
|
27051
|
+
), x(this, $i, no).call(this, fe.SCREENSHARE_AUDIO, o.then((h) => h.id));
|
|
27050
27052
|
}
|
|
27051
27053
|
yield Promise.all([n, o || Promise.resolve()]), W.screenShareStart();
|
|
27052
27054
|
});
|
|
@@ -27076,7 +27078,7 @@ const Hf = (Yl = class {
|
|
|
27076
27078
|
e,
|
|
27077
27079
|
r
|
|
27078
27080
|
);
|
|
27079
|
-
x(this,
|
|
27081
|
+
x(this, $i, no).call(this, fe.MIC, i.then((n) => n.id)), yield i.then((n) => {
|
|
27080
27082
|
a(this, bt) && (a(this, bt).audioTrack = n.track, a(this, bt).producerId = n.id, a(this, bt).start());
|
|
27081
27083
|
});
|
|
27082
27084
|
} catch (t) {
|
|
@@ -27301,7 +27303,7 @@ const Hf = (Yl = class {
|
|
|
27301
27303
|
return;
|
|
27302
27304
|
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(
|
|
27303
27305
|
(n) => n.mimeType === Ps[0]
|
|
27304
|
-
)) >= 0 && a(this,
|
|
27306
|
+
)) >= 0 && a(this, xi).get(Ps[0]).has(r) && i.mimeType !== Ps[0]) {
|
|
27305
27307
|
l.warn(`Ignoring producer: ${i.producerId}`);
|
|
27306
27308
|
return;
|
|
27307
27309
|
}
|
|
@@ -27408,7 +27410,7 @@ const Hf = (Yl = class {
|
|
|
27408
27410
|
), a(this, ot).on(
|
|
27409
27411
|
a(this, vt).mediaRoomTerminationBroadcastResponse,
|
|
27410
27412
|
() => {
|
|
27411
|
-
!this.mediaJoined && !a(this,
|
|
27413
|
+
!this.mediaJoined && !a(this, Ni) && !a(this, Li) || (l.warn(
|
|
27412
27414
|
"media hub termination broadcast received, rejoining room"
|
|
27413
27415
|
), k.emit(I.ROOM_NODE_DISCONNECTED), a(this, oc).call(this));
|
|
27414
27416
|
}
|
|
@@ -27449,7 +27451,7 @@ const Hf = (Yl = class {
|
|
|
27449
27451
|
if (((r = (e = t == null ? void 0 : t.receiver) == null ? void 0 : e.video) == null ? void 0 : r.codecs.findIndex(
|
|
27450
27452
|
(d) => d.mimeType === c
|
|
27451
27453
|
)) >= 0 || o === Ps.length - 1) {
|
|
27452
|
-
a(this,
|
|
27454
|
+
a(this, Ui).get(c).add(s);
|
|
27453
27455
|
break;
|
|
27454
27456
|
}
|
|
27455
27457
|
}
|
|
@@ -27458,17 +27460,17 @@ const Hf = (Yl = class {
|
|
|
27458
27460
|
if (((n = (i = t == null ? void 0 : t.sender) == null ? void 0 : i.video) == null ? void 0 : n.codecs.findIndex(
|
|
27459
27461
|
(d) => d.mimeType === c
|
|
27460
27462
|
)) >= 0 || o === Ps.length - 1) {
|
|
27461
|
-
a(this,
|
|
27463
|
+
a(this, xi).get(c).add(s);
|
|
27462
27464
|
break;
|
|
27463
27465
|
}
|
|
27464
27466
|
}
|
|
27465
27467
|
}
|
|
27466
27468
|
handlePeerLeaving(s) {
|
|
27467
|
-
z.hasFeature(se.FORCE_VIDEO_CODEC) || (a(this,
|
|
27469
|
+
z.hasFeature(se.FORCE_VIDEO_CODEC) || (a(this, xi).forEach((t) => t.delete(s)), a(this, Ui).forEach((t, e) => {
|
|
27468
27470
|
t.delete(s), t.size === 0 && this.disableWebcam(e);
|
|
27469
27471
|
}));
|
|
27470
27472
|
}
|
|
27471
|
-
}, 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(),
|
|
27473
|
+
}, 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() {
|
|
27472
27474
|
return this.context.getValue("connectionHandler");
|
|
27473
27475
|
}, el = /* @__PURE__ */ new WeakSet(), qf = function(s, t, e, r) {
|
|
27474
27476
|
return u(this, null, function* () {
|
|
@@ -27486,7 +27488,7 @@ const Hf = (Yl = class {
|
|
|
27486
27488
|
try {
|
|
27487
27489
|
this.mediaJoined = true;
|
|
27488
27490
|
const { roomState: s } = yield a(this, J).socketHandler.notifySelfJoinComplete();
|
|
27489
|
-
return v(this, nc, s.roomUuid), v(this,
|
|
27491
|
+
return v(this, nc, s.roomUuid), v(this, Li, true), v(this, Ni, false), true;
|
|
27490
27492
|
} catch (s) {
|
|
27491
27493
|
return l.error("Error completing room join", { error: s }), this.mediaJoined = false, false;
|
|
27492
27494
|
}
|
|
@@ -27567,7 +27569,7 @@ const Hf = (Yl = class {
|
|
|
27567
27569
|
});
|
|
27568
27570
|
}, al = /* @__PURE__ */ new WeakSet(), zf = function(s) {
|
|
27569
27571
|
return u(this, null, function* () {
|
|
27570
|
-
if (!(a(this, As) ===
|
|
27572
|
+
if (!(a(this, As) === Ae.HIVE || !z.hasFeature(
|
|
27571
27573
|
se.PRECREATE_PRODUCERS
|
|
27572
27574
|
) || !s))
|
|
27573
27575
|
try {
|
|
@@ -27583,7 +27585,7 @@ const Hf = (Yl = class {
|
|
|
27583
27585
|
});
|
|
27584
27586
|
}, Ze = /* @__PURE__ */ new WeakSet(), pt = function(s) {
|
|
27585
27587
|
return a(this, Tt).get(s);
|
|
27586
|
-
},
|
|
27588
|
+
}, $i = /* @__PURE__ */ new WeakSet(), no = function(s, t) {
|
|
27587
27589
|
return a(this, Tt).set(s, t);
|
|
27588
27590
|
}, ol = /* @__PURE__ */ new WeakSet(), Yf = function(s) {
|
|
27589
27591
|
return a(this, Tt).delete(s);
|
|
@@ -27604,7 +27606,7 @@ const Hf = (Yl = class {
|
|
|
27604
27606
|
e2ee: this.e2ee
|
|
27605
27607
|
},
|
|
27606
27608
|
stopTracks: false,
|
|
27607
|
-
zeroRtpOnPause: a(this, As) !==
|
|
27609
|
+
zeroRtpOnPause: a(this, As) !== Ae.CF
|
|
27608
27610
|
};
|
|
27609
27611
|
}, dl = /* @__PURE__ */ new WeakSet(), Xf = function(s, t) {
|
|
27610
27612
|
return {
|
|
@@ -27725,7 +27727,7 @@ function ev(s) {
|
|
|
27725
27727
|
}
|
|
27726
27728
|
s.setValue("roomNodeClient", void 0);
|
|
27727
27729
|
}
|
|
27728
|
-
var H0 = Object.defineProperty, q0 = Object.getOwnPropertyDescriptor,
|
|
27730
|
+
var H0 = Object.defineProperty, q0 = Object.getOwnPropertyDescriptor, Xi = (s, t, e, r) => {
|
|
27729
27731
|
for (var i = r > 1 ? void 0 : r ? q0(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
27730
27732
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27731
27733
|
return r && i && H0(t, e, i), i;
|
|
@@ -27865,7 +27867,7 @@ const tv = (Tm = class {
|
|
|
27865
27867
|
if (this.self.roomState === "disconnected")
|
|
27866
27868
|
return;
|
|
27867
27869
|
let { peerId: t } = this;
|
|
27868
|
-
s && z.hasFeature(se.REFRESH_ID_ON_DISCONNECTION) && (t = v4()), a(this, Vr).updateURL(t), y.resetPeerId(t), dt().setHeader("dyte-tracing-id", t),
|
|
27870
|
+
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" });
|
|
27869
27871
|
}), k.on(I.SOCKET_SERVICE_FAILED, () => {
|
|
27870
27872
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
27871
27873
|
}), a(this, ps).on(U.waitingRoomRequestAccepted, () => {
|
|
@@ -28004,25 +28006,25 @@ const tv = (Tm = class {
|
|
|
28004
28006
|
return a(this, ct).getValue("roomNodeClient");
|
|
28005
28007
|
}, Tm);
|
|
28006
28008
|
let Jr = tv;
|
|
28007
|
-
|
|
28009
|
+
Xi([
|
|
28008
28010
|
y.trace("SelfController.resetSelf")
|
|
28009
28011
|
], Jr.prototype, "resetSelf", 1);
|
|
28010
|
-
|
|
28012
|
+
Xi([
|
|
28011
28013
|
y.trace("SelfController.setupEvents")
|
|
28012
28014
|
], Jr.prototype, "setupEvents", 1);
|
|
28013
|
-
|
|
28015
|
+
Xi([
|
|
28014
28016
|
y.trace("SelfController.joinRoom")
|
|
28015
28017
|
], Jr.prototype, "joinRoom", 1);
|
|
28016
|
-
|
|
28018
|
+
Xi([
|
|
28017
28019
|
y.trace("SelfController.leaveRoom")
|
|
28018
28020
|
], Jr.prototype, "leaveRoom", 1);
|
|
28019
|
-
|
|
28021
|
+
Xi([
|
|
28020
28022
|
y.trace("SelfController.joinMediaRoom")
|
|
28021
28023
|
], Jr.prototype, "joinMediaRoom", 1);
|
|
28022
|
-
|
|
28024
|
+
Xi([
|
|
28023
28025
|
y.trace("SelfController.leaveMediaRoom")
|
|
28024
28026
|
], Jr.prototype, "leaveMediaRoom", 1);
|
|
28025
|
-
|
|
28027
|
+
Xi([
|
|
28026
28028
|
y.trace("SelfController.init")
|
|
28027
28029
|
], Jr, "init", 1);
|
|
28028
28030
|
var lc;
|
|
@@ -28255,7 +28257,7 @@ class K0 {
|
|
|
28255
28257
|
U.getPeerInfo,
|
|
28256
28258
|
Bg.toBinary({ peerId: t })
|
|
28257
28259
|
);
|
|
28258
|
-
return
|
|
28260
|
+
return en.fromBinary(e.payload);
|
|
28259
28261
|
});
|
|
28260
28262
|
}
|
|
28261
28263
|
}
|
|
@@ -28455,10 +28457,10 @@ var Y0 = Object.defineProperty, Q0 = (s, t, e) => t in s ? Y0(s, t, { enumerable
|
|
|
28455
28457
|
set exports(s) {
|
|
28456
28458
|
pd = s;
|
|
28457
28459
|
}
|
|
28458
|
-
},
|
|
28460
|
+
}, mn = typeof Reflect == "object" ? Reflect : null, zp = mn && typeof mn.apply == "function" ? mn.apply : function(s, t, e) {
|
|
28459
28461
|
return Function.prototype.apply.call(s, t, e);
|
|
28460
28462
|
}, Yc;
|
|
28461
|
-
|
|
28463
|
+
mn && typeof mn.ownKeys == "function" ? Yc = mn.ownKeys : Object.getOwnPropertySymbols ? Yc = function(s) {
|
|
28462
28464
|
return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s));
|
|
28463
28465
|
} : Yc = function(s) {
|
|
28464
28466
|
return Object.getOwnPropertyNames(s);
|
|
@@ -28777,26 +28779,26 @@ class dD {
|
|
|
28777
28779
|
ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap();
|
|
28778
28780
|
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 || {});
|
|
28779
28781
|
const lD = "2", uD = "3";
|
|
28780
|
-
var
|
|
28782
|
+
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;
|
|
28781
28783
|
class hD {
|
|
28782
28784
|
constructor(t, e) {
|
|
28783
28785
|
var Q;
|
|
28784
|
-
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,
|
|
28786
|
+
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);
|
|
28785
28787
|
var r, i, n, o, c, d, h, m, g;
|
|
28786
|
-
de(this,
|
|
28788
|
+
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, {
|
|
28787
28789
|
code: void 0,
|
|
28788
28790
|
reason: void 0
|
|
28789
|
-
}), de(this,
|
|
28791
|
+
}), de(this, Fe, (Q = D(this, Re).logger) != null ? Q : new dD(D(this, Re).debug ? "debug" : "info")), de(this, Ls, new cD());
|
|
28790
28792
|
}
|
|
28791
28793
|
get readyState() {
|
|
28792
28794
|
var t;
|
|
28793
|
-
return (t = D(this,
|
|
28795
|
+
return (t = D(this, Ne)) == null ? void 0 : t.readyState;
|
|
28794
28796
|
}
|
|
28795
28797
|
get url() {
|
|
28796
|
-
return D(this,
|
|
28798
|
+
return D(this, rn);
|
|
28797
28799
|
}
|
|
28798
28800
|
updateURL(t) {
|
|
28799
|
-
de(this,
|
|
28801
|
+
de(this, rn, t), we(this, ju, mv).call(this);
|
|
28800
28802
|
}
|
|
28801
28803
|
get config() {
|
|
28802
28804
|
return D(this, Re);
|
|
@@ -28818,37 +28820,37 @@ class hD {
|
|
|
28818
28820
|
0,
|
|
28819
28821
|
1
|
|
28820
28822
|
].includes(this.readyState)) {
|
|
28821
|
-
D(this,
|
|
28823
|
+
D(this, Fe).debug("Websocket was already connecting or connected.");
|
|
28822
28824
|
return;
|
|
28823
28825
|
}
|
|
28824
28826
|
if (D(this, ir) !== false)
|
|
28825
28827
|
return new Promise((e, r) => {
|
|
28826
|
-
we(this,
|
|
28828
|
+
we(this, gn, po).call(this), we(this, mo, vd).call(this);
|
|
28827
28829
|
try {
|
|
28828
|
-
de(this,
|
|
28830
|
+
de(this, Ne, new WebSocket(we(this, Fu, hv).call(this, D(this, rn)))), D(this, Ne).binaryType = "arraybuffer", D(this, Fe).debug("Connecting");
|
|
28829
28831
|
const i = setTimeout(() => {
|
|
28830
|
-
D(this,
|
|
28832
|
+
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(
|
|
28831
28833
|
"reconnecting"
|
|
28832
28834
|
), we(this, uo, Xc).call(this)), r(new Error("Connection timed out!"));
|
|
28833
28835
|
}, D(this, Re).connectionTimeout);
|
|
28834
|
-
D(this,
|
|
28835
|
-
D(this,
|
|
28836
|
+
D(this, Ne).onopen = () => {
|
|
28837
|
+
D(this, Fe).debug(`Ready State: ${uv[D(this, Ne).readyState]}`), i && clearTimeout(i), we(this, fd, Gu).call(this), de(this, $r, {
|
|
28836
28838
|
code: void 0,
|
|
28837
28839
|
reason: void 0
|
|
28838
28840
|
}), D(this, Ke).emit(
|
|
28839
28841
|
"connected"
|
|
28840
28842
|
), D(this, Re).flushOnReconnect && this.flush(), e();
|
|
28841
|
-
}, D(this,
|
|
28843
|
+
}, D(this, Ne).onclose = (n) => {
|
|
28842
28844
|
try {
|
|
28843
28845
|
i && clearTimeout(i);
|
|
28844
28846
|
const { code: o, reason: c } = n;
|
|
28845
|
-
r(c), D(this,
|
|
28847
|
+
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);
|
|
28846
28848
|
} catch (o) {
|
|
28847
28849
|
we(this, ao, Qc).call(this, o);
|
|
28848
28850
|
}
|
|
28849
|
-
}, D(this,
|
|
28851
|
+
}, D(this, Ne).onerror = (n) => {
|
|
28850
28852
|
we(this, ao, Qc).call(this, n);
|
|
28851
|
-
}, D(this,
|
|
28853
|
+
}, D(this, Ne).onmessage = (n) => we(this, Bu, pv).call(this, n);
|
|
28852
28854
|
} catch (i) {
|
|
28853
28855
|
we(this, ao, Qc).call(this, i, r);
|
|
28854
28856
|
}
|
|
@@ -28857,8 +28859,8 @@ class hD {
|
|
|
28857
28859
|
}
|
|
28858
28860
|
send(t, e, r, i) {
|
|
28859
28861
|
const n = { event: t, id: e, payload: r, metadata: i };
|
|
28860
|
-
if (D(this, Re).queueOnDisconnect && (!D(this,
|
|
28861
|
-
return D(this,
|
|
28862
|
+
if (D(this, Re).queueOnDisconnect && (!D(this, Ne) || D(this, Ne).readyState !== 1))
|
|
28863
|
+
return D(this, Fe).debug("Queuing message since socket is not connected!", n), D(this, fr).push(n), false;
|
|
28862
28864
|
const o = lv.encode(n);
|
|
28863
28865
|
return we(this, ho, gd).call(this, o);
|
|
28864
28866
|
}
|
|
@@ -28896,13 +28898,13 @@ class hD {
|
|
|
28896
28898
|
);
|
|
28897
28899
|
}
|
|
28898
28900
|
disconnect() {
|
|
28899
|
-
de(this, ir, false), we(this,
|
|
28901
|
+
de(this, ir, false), we(this, gn, po).call(this), this.removeAllListeners(), de(this, $r, {
|
|
28900
28902
|
code: 1e3,
|
|
28901
28903
|
reason: "Sockrates disconnect method called"
|
|
28902
|
-
}), D(this,
|
|
28904
|
+
}), D(this, Ne).close(1e3, "Sockrates disconnect method called.");
|
|
28903
28905
|
}
|
|
28904
28906
|
}
|
|
28905
|
-
|
|
28907
|
+
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) {
|
|
28906
28908
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
28907
28909
|
return s;
|
|
28908
28910
|
if (s.startsWith("https://"))
|
|
@@ -28911,27 +28913,27 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28911
28913
|
return `ws://${s.substring(7)}`;
|
|
28912
28914
|
throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
|
|
28913
28915
|
}, ao = /* @__PURE__ */ new WeakSet(), Qc = function(s, t) {
|
|
28914
|
-
D(this,
|
|
28916
|
+
D(this, Fe).error("Error:", { error: s }), D(this, Ke).emit("errored", { error: s }), t == null || t(s);
|
|
28915
28917
|
}, Bu = /* @__PURE__ */ new WeakSet(), pv = function(s) {
|
|
28916
28918
|
if (we(this, fd, Gu).call(this), s.data === lD) {
|
|
28917
|
-
D(this,
|
|
28919
|
+
D(this, Fe).debug("Received ping from server"), we(this, ho, gd).call(this, uD);
|
|
28918
28920
|
return;
|
|
28919
28921
|
}
|
|
28920
28922
|
const t = lv.decode(s.data), { id: e, payload: r } = t;
|
|
28921
|
-
D(this,
|
|
28923
|
+
D(this, Fe).debug("Received message", { event: t.event, messageID: e }), D(this, Ke).emit(t.event.toString(), { id: e, payload: r });
|
|
28922
28924
|
}, Hu = /* @__PURE__ */ new WeakSet(), Xp = function() {
|
|
28923
|
-
return D(this,
|
|
28925
|
+
return D(this, Ne).readyState === 1;
|
|
28924
28926
|
}, md = /* @__PURE__ */ new WeakSet(), qu = function(s, t) {
|
|
28925
28927
|
de(this, $r, { reason: t, code: s }), D(this, Ke).emit("disconnected", { code: s, reason: t });
|
|
28926
28928
|
}, ju = /* @__PURE__ */ new WeakSet(), mv = function() {
|
|
28927
28929
|
const { reason: s, code: t } = D(this, $r);
|
|
28928
|
-
t && t !== 1e3 && D(this, ir) && D(this, Re).autoReconnect && !D(this, ms) && (D(this,
|
|
28930
|
+
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(
|
|
28929
28931
|
"reconnecting"
|
|
28930
28932
|
), we(this, uo, Xc).call(this));
|
|
28931
28933
|
}, uo = /* @__PURE__ */ new WeakSet(), Xc = function(s = true) {
|
|
28932
28934
|
return u(this, null, function* () {
|
|
28933
28935
|
if (s && D(this, ms)) {
|
|
28934
|
-
D(this,
|
|
28936
|
+
D(this, Fe).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
28935
28937
|
return;
|
|
28936
28938
|
}
|
|
28937
28939
|
if (D(this, ms) || D(this, Ls).reset(), D(this, Re).maxReconnectionAttempts !== null && D(this, Ls).getAttempts() >= D(this, Re).maxReconnectionAttempts) {
|
|
@@ -28940,11 +28942,11 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28940
28942
|
), de(this, ms, false);
|
|
28941
28943
|
return;
|
|
28942
28944
|
}
|
|
28943
|
-
de(this, ms, true), we(this, mo, vd).call(this), we(this,
|
|
28945
|
+
de(this, ms, true), we(this, mo, vd).call(this), we(this, gn, po).call(this);
|
|
28944
28946
|
try {
|
|
28945
28947
|
if (yield D(this, Ls).wait(), D(this, ir) === false)
|
|
28946
28948
|
return;
|
|
28947
|
-
if (D(this,
|
|
28949
|
+
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))
|
|
28948
28950
|
throw Error("Reconnect Failed");
|
|
28949
28951
|
de(this, ms, false), de(this, $r, {
|
|
28950
28952
|
code: void 0,
|
|
@@ -28953,26 +28955,26 @@ Oe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Re = /*
|
|
|
28953
28955
|
"reconnected"
|
|
28954
28956
|
);
|
|
28955
28957
|
} catch (t) {
|
|
28956
|
-
D(this,
|
|
28958
|
+
D(this, Fe).debug("Failed to reconnect."), D(this, Ke).emit("reconnectFailure", { attempt: D(this, Ls).getAttempts() }), we(this, uo, Xc).call(this, false);
|
|
28957
28959
|
}
|
|
28958
28960
|
});
|
|
28959
28961
|
}, ho = /* @__PURE__ */ new WeakSet(), gd = function(s) {
|
|
28960
28962
|
try {
|
|
28961
|
-
return D(this,
|
|
28963
|
+
return D(this, Ne).send(s), true;
|
|
28962
28964
|
} catch (t) {
|
|
28963
|
-
return D(this,
|
|
28965
|
+
return D(this, Fe).error(t.message), false;
|
|
28964
28966
|
}
|
|
28965
28967
|
}, fd = /* @__PURE__ */ new WeakSet(), Gu = function() {
|
|
28966
|
-
this.config.disconnectOnPingTimeout && (D(this,
|
|
28968
|
+
this.config.disconnectOnPingTimeout && (D(this, Fe).debug("Resetting ping timeout"), we(this, gn, po).call(this), de(this, nn, setTimeout(() => {
|
|
28967
28969
|
var s;
|
|
28968
|
-
D(this,
|
|
28970
|
+
D(this, Fe).debug("Disconnecting the socket due to ping timeout"), de(this, ir, true);
|
|
28969
28971
|
const t = 3002, e = "Ping timeout";
|
|
28970
|
-
(s = D(this,
|
|
28972
|
+
(s = D(this, Ne)) == null || s.close(t, e), we(this, md, qu).call(this, t, e);
|
|
28971
28973
|
}, D(this, Re).pingTimeout)));
|
|
28972
|
-
},
|
|
28973
|
-
D(this,
|
|
28974
|
+
}, gn = /* @__PURE__ */ new WeakSet(), po = function() {
|
|
28975
|
+
D(this, nn) && (clearTimeout(D(this, nn)), de(this, nn, void 0));
|
|
28974
28976
|
}, mo = /* @__PURE__ */ new WeakSet(), vd = function() {
|
|
28975
|
-
D(this,
|
|
28977
|
+
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);
|
|
28976
28978
|
};
|
|
28977
28979
|
var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Il = (s, t, e, r) => {
|
|
28978
28980
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
@@ -28980,7 +28982,7 @@ var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Il = (s, t
|
|
|
28980
28982
|
return r && i && pD(t, e, i), i;
|
|
28981
28983
|
};
|
|
28982
28984
|
const Zp = 65535, gD = 3e3;
|
|
28983
|
-
var xr, be, ke,
|
|
28985
|
+
var xr, be, ke, Ve, Xt, sr, hc, Wu, pc, Ju, ym;
|
|
28984
28986
|
const gv = (ym = class {
|
|
28985
28987
|
constructor(s, {
|
|
28986
28988
|
peerId: t,
|
|
@@ -29010,10 +29012,10 @@ const gv = (ym = class {
|
|
|
29010
29012
|
})), this.handleSocketConnectionEvents();
|
|
29011
29013
|
}
|
|
29012
29014
|
get joinAttempted() {
|
|
29013
|
-
return a(this, ke,
|
|
29015
|
+
return a(this, ke, Ve).socketJoinAttempted;
|
|
29014
29016
|
}
|
|
29015
29017
|
set joinAttempted(s) {
|
|
29016
|
-
a(this, ke,
|
|
29018
|
+
a(this, ke, Ve).socketJoinAttempted = s;
|
|
29017
29019
|
}
|
|
29018
29020
|
get peerId() {
|
|
29019
29021
|
return a(this, sr).getValue("peerId");
|
|
@@ -29022,14 +29024,14 @@ const gv = (ym = class {
|
|
|
29022
29024
|
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));
|
|
29023
29025
|
}
|
|
29024
29026
|
static getSocketEdgeDomain(s) {
|
|
29025
|
-
return
|
|
29027
|
+
return hn({ servicePrefix: "socket-edge", baseURI: s });
|
|
29026
29028
|
}
|
|
29027
29029
|
get url() {
|
|
29028
29030
|
return a(this, xr);
|
|
29029
29031
|
}
|
|
29030
29032
|
connect() {
|
|
29031
29033
|
return u(this, null, function* () {
|
|
29032
|
-
a(this, ke,
|
|
29034
|
+
a(this, ke, Ve).socketJoinAttempted = true, yield a(this, be).connect(), a(this, ke, Ve).socketJoinAttempted = true, a(this, ke, Ve).socketState = {
|
|
29033
29035
|
state: "connected",
|
|
29034
29036
|
reconnected: false,
|
|
29035
29037
|
reconnectionAttempt: void 0
|
|
@@ -29038,7 +29040,7 @@ const gv = (ym = class {
|
|
|
29038
29040
|
}
|
|
29039
29041
|
disconnect() {
|
|
29040
29042
|
return u(this, null, function* () {
|
|
29041
|
-
a(this, ke,
|
|
29043
|
+
a(this, ke, Ve).socketJoinAttempted = false, a(this, be).disconnect(), a(this, ke, Ve).socketJoinAttempted = true, a(this, ke, Ve).socketState = {
|
|
29042
29044
|
state: "disconnected",
|
|
29043
29045
|
reconnected: false,
|
|
29044
29046
|
reconnectionAttempt: void 0
|
|
@@ -29145,45 +29147,45 @@ const gv = (ym = class {
|
|
|
29145
29147
|
}
|
|
29146
29148
|
handleSocketConnectionEvents() {
|
|
29147
29149
|
this.onStateEvent("connected", () => u(this, null, function* () {
|
|
29148
|
-
l.info("SocketService::Connected to socket-edge"), a(this, Xt) && (clearTimeout(a(this, Xt)), v(this, Xt, void 0)), a(this, ke,
|
|
29150
|
+
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");
|
|
29149
29151
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
29150
29152
|
var i;
|
|
29151
29153
|
l.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: y.location.country });
|
|
29152
|
-
const { recv: e, send: r } = (i = a(this, ke,
|
|
29153
|
-
e != null && e.state && (e == null ? void 0 : e.state) !==
|
|
29154
|
+
const { recv: e, send: r } = (i = a(this, ke, Ve).mediaState) != null ? i : {};
|
|
29155
|
+
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(
|
|
29154
29156
|
I.SOCKET_SERVICE_DISCONNECTED,
|
|
29155
29157
|
{
|
|
29156
|
-
joinAttempted: a(this, ke,
|
|
29158
|
+
joinAttempted: a(this, ke, Ve).joinAttempted
|
|
29157
29159
|
}
|
|
29158
29160
|
) : v(this, Xt, setTimeout(() => {
|
|
29159
29161
|
k.emit(
|
|
29160
29162
|
I.SOCKET_SERVICE_DISCONNECTED,
|
|
29161
|
-
{ joinAttempted: a(this, ke,
|
|
29163
|
+
{ joinAttempted: a(this, ke, Ve).joinAttempted }
|
|
29162
29164
|
), v(this, Xt, void 0);
|
|
29163
|
-
}, gD)), a(this, ke,
|
|
29165
|
+
}, gD)), a(this, ke, Ve).updateSocketConnectionState("disconnected");
|
|
29164
29166
|
}), this.onStateEvent("reconnecting", () => u(this, null, function* () {
|
|
29165
|
-
l.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke,
|
|
29167
|
+
l.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke, Ve).updateSocketConnectionState("reconnecting");
|
|
29166
29168
|
})), this.onStateEvent("reconnectAttempt", (t) => u(this, [t], function* ({ attempt: s }) {
|
|
29167
29169
|
l.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
29168
29170
|
socket: {
|
|
29169
29171
|
retryAttempt: s
|
|
29170
29172
|
}
|
|
29171
|
-
}), a(this, ke,
|
|
29173
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnectAttempt", s);
|
|
29172
29174
|
})), this.onStateEvent("reconnectFailure", ({ attempt: s }) => {
|
|
29173
29175
|
l.info("SocketService::Reconnect attempt to socket-edge failed", {
|
|
29174
29176
|
socket: {
|
|
29175
29177
|
retryAttempt: s
|
|
29176
29178
|
}
|
|
29177
|
-
}), a(this, ke,
|
|
29179
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnectFailure", s);
|
|
29178
29180
|
}), this.onStateEvent("reconnected", () => u(this, null, function* () {
|
|
29179
|
-
l.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, ke,
|
|
29180
|
-
wasJoinAttempted: a(this, ke,
|
|
29181
|
-
}), a(this, ke,
|
|
29181
|
+
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, {
|
|
29182
|
+
wasJoinAttempted: a(this, ke, Ve).mediaJoinAttempted
|
|
29183
|
+
}), a(this, ke, Ve).updateSocketConnectionState("reconnected");
|
|
29182
29184
|
})), this.onStateEvent("failed", () => u(this, null, function* () {
|
|
29183
|
-
l.info("SocketService::Failed to connect to socket-edge", { country: y.location.country }), k.emit(I.SOCKET_SERVICE_FAILED), a(this, ke,
|
|
29185
|
+
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");
|
|
29184
29186
|
}));
|
|
29185
29187
|
}
|
|
29186
|
-
}, xr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(),
|
|
29188
|
+
}, xr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(), Ve = function() {
|
|
29187
29189
|
return a(this, sr).getValue("connectionHandler");
|
|
29188
29190
|
}, Xt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakSet(), Wu = function(s) {
|
|
29189
29191
|
let t = gv.getSocketEdgeDomain(a(this, sr).getValue("baseURI"));
|
|
@@ -29319,7 +29321,7 @@ var fD = Object.defineProperty, vD = Object.getOwnPropertyDescriptor, Al = (s, t
|
|
|
29319
29321
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
29320
29322
|
return r && i && fD(t, e, i), i;
|
|
29321
29323
|
};
|
|
29322
|
-
const
|
|
29324
|
+
const an = class {
|
|
29323
29325
|
constructor(s, t) {
|
|
29324
29326
|
p(this, "apiBase");
|
|
29325
29327
|
p(this, "selfController");
|
|
@@ -29359,10 +29361,10 @@ const nn = class {
|
|
|
29359
29361
|
c.setRoomName(i), c.setRoomUUID(i), c.setOrganizationId(n), c.setHeader("dyte-tracing-id", t), s.setValue("apiClient", c);
|
|
29360
29362
|
const d = new lM();
|
|
29361
29363
|
s.setValue("connectionHandler", d);
|
|
29362
|
-
const h =
|
|
29363
|
-
let _ =
|
|
29364
|
+
const h = an.createSocketService(s), m = h.connect(), g = c.getUserDetails(), T = c.getPlugins();
|
|
29365
|
+
let _ = Ae.HIVE, P, A = "";
|
|
29364
29366
|
try {
|
|
29365
|
-
yield
|
|
29367
|
+
yield an.setupFlagsmith(s);
|
|
29366
29368
|
} catch (X) {
|
|
29367
29369
|
l.error("Failed to setup flagsmith", { error: X });
|
|
29368
29370
|
}
|
|
@@ -29383,7 +29385,7 @@ const nn = class {
|
|
|
29383
29385
|
s,
|
|
29384
29386
|
C.viewType,
|
|
29385
29387
|
P.preset.permissions
|
|
29386
|
-
), H =
|
|
29388
|
+
), H = an.setupControllers(
|
|
29387
29389
|
h,
|
|
29388
29390
|
s,
|
|
29389
29391
|
P,
|
|
@@ -29392,7 +29394,7 @@ const nn = class {
|
|
|
29392
29394
|
C,
|
|
29393
29395
|
L
|
|
29394
29396
|
);
|
|
29395
|
-
ZA(C) && ((F =
|
|
29397
|
+
ZA(C) && ((F = an.createRoomNodeClient(s, h).initializeConnection(
|
|
29396
29398
|
P.participant.name,
|
|
29397
29399
|
i,
|
|
29398
29400
|
false,
|
|
@@ -29404,7 +29406,7 @@ const nn = class {
|
|
|
29404
29406
|
);
|
|
29405
29407
|
})), y.location.country = (Q = c.ipInfo) == null ? void 0 : Q.country;
|
|
29406
29408
|
const { controllers: B } = yield H;
|
|
29407
|
-
return QP(), new
|
|
29409
|
+
return QP(), new an(e, B);
|
|
29408
29410
|
});
|
|
29409
29411
|
}
|
|
29410
29412
|
static setupFlagsmith(s) {
|
|
@@ -29428,7 +29430,7 @@ const nn = class {
|
|
|
29428
29430
|
isReactNative: navigator.isReactNative
|
|
29429
29431
|
});
|
|
29430
29432
|
try {
|
|
29431
|
-
const h = (d = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || d ?
|
|
29433
|
+
const h = (d = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || d ? hn({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
29432
29434
|
yield z.identify(
|
|
29433
29435
|
`${nu.PEER}_${t}`,
|
|
29434
29436
|
JSON.parse(JSON.stringify(c)),
|
|
@@ -29448,12 +29450,12 @@ const nn = class {
|
|
|
29448
29450
|
}
|
|
29449
29451
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
29450
29452
|
return u(this, null, function* () {
|
|
29451
|
-
var
|
|
29453
|
+
var Me, V, b;
|
|
29452
29454
|
const c = t.getValue("modules"), { participant: d } = e, h = t.getValue("defaults"), { sfu: m } = t.getValue("roomNodeOptions"), { viewType: g, mediaConstraints: { audio: T } } = n;
|
|
29453
29455
|
t.setValue("viewType", g), t.setValue("defaults", O({
|
|
29454
29456
|
mediaConfiguration: {
|
|
29455
29457
|
audio: {
|
|
29456
|
-
enableHighBitrate: (
|
|
29458
|
+
enableHighBitrate: (Me = T.enableHighBitrate) != null ? Me : false,
|
|
29457
29459
|
enableStereo: (V = T.enableStereo) != null ? V : false
|
|
29458
29460
|
}
|
|
29459
29461
|
}
|
|
@@ -29461,7 +29463,7 @@ const nn = class {
|
|
|
29461
29463
|
let _, P, A, C, L, H, B, F;
|
|
29462
29464
|
const Q = new G0(s);
|
|
29463
29465
|
Pe.socketService = s;
|
|
29464
|
-
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
|
|
29466
|
+
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(
|
|
29465
29467
|
t,
|
|
29466
29468
|
Pt,
|
|
29467
29469
|
d,
|
|
@@ -29509,10 +29511,10 @@ const nn = class {
|
|
|
29509
29511
|
"The plugin module cannot be initialized without the `participant` module",
|
|
29510
29512
|
"0102"
|
|
29511
29513
|
);
|
|
29512
|
-
const
|
|
29514
|
+
const Le = yield r;
|
|
29513
29515
|
C = yield _c.init(
|
|
29514
29516
|
t,
|
|
29515
|
-
|
|
29517
|
+
Le,
|
|
29516
29518
|
ur,
|
|
29517
29519
|
oe,
|
|
29518
29520
|
P == null ? void 0 : P.chat,
|
|
@@ -29522,8 +29524,8 @@ const nn = class {
|
|
|
29522
29524
|
);
|
|
29523
29525
|
}
|
|
29524
29526
|
if (c.pip) {
|
|
29525
|
-
const
|
|
29526
|
-
t.setValue("pip",
|
|
29527
|
+
const Le = yield ou._init(t, E.self);
|
|
29528
|
+
t.setValue("pip", Le);
|
|
29527
29529
|
}
|
|
29528
29530
|
}
|
|
29529
29531
|
const ye = {
|
|
@@ -29570,7 +29572,7 @@ const nn = class {
|
|
|
29570
29572
|
});
|
|
29571
29573
|
}
|
|
29572
29574
|
};
|
|
29573
|
-
let bc =
|
|
29575
|
+
let bc = an;
|
|
29574
29576
|
Al([
|
|
29575
29577
|
y.trace("Controller.init")
|
|
29576
29578
|
], bc, "init", 1);
|
|
@@ -29941,9 +29943,9 @@ let jr = (Sm = class {
|
|
|
29941
29943
|
}
|
|
29942
29944
|
static setupContext(t, e, r, i) {
|
|
29943
29945
|
var c;
|
|
29944
|
-
const n =
|
|
29946
|
+
const n = Fi.createContext(t, e), o = O(O({}, BP), e == null ? void 0 : e.modules);
|
|
29945
29947
|
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 || (() => {
|
|
29946
|
-
})), n.setValue("cachedUserDetails", vs(e.cachedUserDetails)), n.setValue("sdkVersion", "3.0.2-staging.
|
|
29948
|
+
})), n.setValue("cachedUserDetails", vs(e.cachedUserDetails)), n.setValue("sdkVersion", "3.0.2-staging.5"), n;
|
|
29947
29949
|
}
|
|
29948
29950
|
join() {
|
|
29949
29951
|
return u(this, null, function* () {
|