@cloudflare/realtimekit-react 0.5.0-staging.109 → 0.5.0-staging.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -10
- package/dist/index.es.js +328 -316
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -5499,7 +5499,7 @@ class Hm extends ut {
|
|
|
5499
5499
|
break;
|
|
5500
5500
|
}
|
|
5501
5501
|
case "candidate-pair": {
|
|
5502
|
-
const { nominated: E } = M, { selected: C } = M, U = M,
|
|
5502
|
+
const { nominated: E } = M, { selected: C } = M, U = M, Ce = {
|
|
5503
5503
|
nominated: E != null ? E : C,
|
|
5504
5504
|
currentRoundTripTime: U.currentRoundTripTime,
|
|
5505
5505
|
totalRoundTripTime: U.totalRoundTripTime,
|
|
@@ -5516,7 +5516,7 @@ class Hm extends ut {
|
|
|
5516
5516
|
packetsReceived: U.packetsReceived,
|
|
5517
5517
|
packetsDiscardedOnSend: U.packetsDiscardedOnSend
|
|
5518
5518
|
};
|
|
5519
|
-
T.push(
|
|
5519
|
+
T.push(Ce), (M.nominated === true || M.selected === true) && (d.candidatePair = Ce);
|
|
5520
5520
|
break;
|
|
5521
5521
|
}
|
|
5522
5522
|
case "transport": {
|
|
@@ -5572,14 +5572,14 @@ class Hm extends ut {
|
|
|
5572
5572
|
totalVideoPacketsSent: 0,
|
|
5573
5573
|
totalAudioPacketsSent: 0
|
|
5574
5574
|
});
|
|
5575
|
-
const
|
|
5575
|
+
const Ce = this.overallProducersStatsMap[C];
|
|
5576
5576
|
if (["video", "audio"].includes(E.mediaType) || ["video", "audio"].includes(E.kind)) {
|
|
5577
5577
|
if (!this.outboundProducerMap.has(M.id)) {
|
|
5578
5578
|
d.staleProducerStreamMap = true;
|
|
5579
5579
|
break;
|
|
5580
5580
|
}
|
|
5581
|
-
const
|
|
5582
|
-
if (((b =
|
|
5581
|
+
const Oe = this.callStatsInstance.producers.get(C);
|
|
5582
|
+
if (((b = Oe == null ? void 0 : Oe.track) == null ? void 0 : b.readyState) === "ended")
|
|
5583
5583
|
break;
|
|
5584
5584
|
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
5585
5585
|
outboundVideoRtpId: [],
|
|
@@ -5620,13 +5620,13 @@ class Hm extends ut {
|
|
|
5620
5620
|
scalabilityMode: k.scalabilityMode,
|
|
5621
5621
|
powerEfficientEncoder: k.powerEfficientEncoder
|
|
5622
5622
|
}, V);
|
|
5623
|
-
d.outboundVideoRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(C,
|
|
5623
|
+
d.outboundVideoRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(C, Ce, Fe);
|
|
5624
5624
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
5625
5625
|
const k = E, Fe = O({
|
|
5626
5626
|
retransmittedBytesSent: k.retransmittedBytesSent,
|
|
5627
5627
|
retransmittedPacketsSent: k.retransmittedPacketsSent
|
|
5628
5628
|
}, V);
|
|
5629
|
-
d.outboundAudioRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(C,
|
|
5629
|
+
d.outboundAudioRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(C, Ce, Fe);
|
|
5630
5630
|
}
|
|
5631
5631
|
} else
|
|
5632
5632
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -5647,7 +5647,7 @@ class Hm extends ut {
|
|
|
5647
5647
|
totalVideoPacketsReceived: 0,
|
|
5648
5648
|
totalAudioPacketsReceived: 0
|
|
5649
5649
|
});
|
|
5650
|
-
const
|
|
5650
|
+
const Ce = this.overallConsumersStatsMap[C];
|
|
5651
5651
|
if (["video", "audio"].includes(E.mediaType) || ["video", "audio"].includes(E.kind)) {
|
|
5652
5652
|
if (!this.inboundConsumerMap.has(M.id)) {
|
|
5653
5653
|
d.staleConsumerStreamMap = true;
|
|
@@ -5657,7 +5657,7 @@ class Hm extends ut {
|
|
|
5657
5657
|
inboundVideoRtpId: [],
|
|
5658
5658
|
inboundAudioRtpId: []
|
|
5659
5659
|
});
|
|
5660
|
-
const
|
|
5660
|
+
const Oe = {
|
|
5661
5661
|
bytesReceived: E.bytesReceived,
|
|
5662
5662
|
packetsReceived: E.packetsReceived,
|
|
5663
5663
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -5697,7 +5697,7 @@ class Hm extends ut {
|
|
|
5697
5697
|
freezeCount: V.freezeCount || 0,
|
|
5698
5698
|
pauseCount: V.pauseCount || 0,
|
|
5699
5699
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
5700
|
-
},
|
|
5700
|
+
}, Oe);
|
|
5701
5701
|
k.score = $m({
|
|
5702
5702
|
frameWidth: k.frameWidth || 0,
|
|
5703
5703
|
framesDecoded: (k.framesDecoded || 0) - (((R = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : R.framesDecoded) || 0),
|
|
@@ -5718,7 +5718,7 @@ class Hm extends ut {
|
|
|
5718
5718
|
jitter: k.jitter || 0,
|
|
5719
5719
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
5720
5720
|
bitrate: ((k.bytesReceived || 0) - (((q = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : q.bytesReceived) || 0)) * 8 / 7
|
|
5721
|
-
}), this.videoConsumerToStatsMap.set(C, k), d.inboundVideoRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundVideoRtpId.push(M.id), this.processInboundConsumerVideoStats(C,
|
|
5721
|
+
}), this.videoConsumerToStatsMap.set(C, k), d.inboundVideoRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundVideoRtpId.push(M.id), this.processInboundConsumerVideoStats(C, Ce, k);
|
|
5722
5722
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
5723
5723
|
const V = E, k = O({
|
|
5724
5724
|
audioLevel: V.audioLevel,
|
|
@@ -5733,7 +5733,7 @@ class Hm extends ut {
|
|
|
5733
5733
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
5734
5734
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
5735
5735
|
playoutId: V.playoutId
|
|
5736
|
-
},
|
|
5736
|
+
}, Oe);
|
|
5737
5737
|
k.score = Um({
|
|
5738
5738
|
concealmentEvents: (k.concealmentEvents || 0) - (((ie = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ie.concealmentEvents) || 0),
|
|
5739
5739
|
packetsLost: (k.packetsLost || 0) - (((pe = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : pe.packetsLost) || 0),
|
|
@@ -5748,7 +5748,7 @@ class Hm extends ut {
|
|
|
5748
5748
|
jitter: k.jitter || 0,
|
|
5749
5749
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
5750
5750
|
bitrate: ((k.bytesReceived || 0) - (((pr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : pr.bytesReceived) || 0)) * 8 / 7
|
|
5751
|
-
}), this.audioConsumerToStatsMap.set(C, k), d.inboundAudioRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundAudioRtpId.push(M.id), this.processInboundConsumerAudioStats(C,
|
|
5751
|
+
}), this.audioConsumerToStatsMap.set(C, k), d.inboundAudioRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundAudioRtpId.push(M.id), this.processInboundConsumerAudioStats(C, Ce, k);
|
|
5752
5752
|
}
|
|
5753
5753
|
} else
|
|
5754
5754
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -5757,7 +5757,7 @@ class Hm extends ut {
|
|
|
5757
5757
|
}
|
|
5758
5758
|
}
|
|
5759
5759
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
5760
|
-
var C, U,
|
|
5760
|
+
var C, U, Ce, Oe, V, k, Fe, Ns, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga, Wa, Ja, Ka, za;
|
|
5761
5761
|
if (M.outboundVideoRtpId.length > 0) {
|
|
5762
5762
|
const me = [];
|
|
5763
5763
|
M.outboundVideoRtpId.forEach((Nl) => {
|
|
@@ -5770,7 +5770,7 @@ class Hm extends ut {
|
|
|
5770
5770
|
jitter: ((C = ne.remoteData) == null ? void 0 : C.jitter) || 0,
|
|
5771
5771
|
isScreenShare: this.screenShareProducers.has(E),
|
|
5772
5772
|
packetsSent: (ne.packetsSent || 0) - (((U = this.videoProducerToStatsMap.get(E)) == null ? void 0 : U.packetsSent) || 0),
|
|
5773
|
-
packetsLost: (((
|
|
5773
|
+
packetsLost: (((Ce = ne.remoteData) == null ? void 0 : Ce.packetsLost) || 0) - (((V = (Oe = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Oe.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
5774
5774
|
framesEncoded: (ne.framesEncoded || 0) - (((k = this.videoProducerToStatsMap.get(E)) == null ? void 0 : k.framesEncoded) || 0)
|
|
5775
5775
|
}), _.set(E, {
|
|
5776
5776
|
score: +(ne.score * 10).toFixed(),
|
|
@@ -6132,7 +6132,7 @@ class qm extends Hm {
|
|
|
6132
6132
|
break;
|
|
6133
6133
|
}
|
|
6134
6134
|
case "candidate-pair": {
|
|
6135
|
-
const { nominated: E } = M, { selected: C } = M, U = M,
|
|
6135
|
+
const { nominated: E } = M, { selected: C } = M, U = M, Ce = {
|
|
6136
6136
|
nominated: E != null ? E : C,
|
|
6137
6137
|
currentRoundTripTime: U.currentRoundTripTime,
|
|
6138
6138
|
totalRoundTripTime: U.totalRoundTripTime,
|
|
@@ -6149,7 +6149,7 @@ class qm extends Hm {
|
|
|
6149
6149
|
packetsReceived: U.packetsReceived,
|
|
6150
6150
|
packetsDiscardedOnSend: U.packetsDiscardedOnSend
|
|
6151
6151
|
};
|
|
6152
|
-
T.push(
|
|
6152
|
+
T.push(Ce), (M.nominated === true || M.selected === true) && (d.candidatePair = Ce);
|
|
6153
6153
|
break;
|
|
6154
6154
|
}
|
|
6155
6155
|
case "transport": {
|
|
@@ -6205,14 +6205,14 @@ class qm extends Hm {
|
|
|
6205
6205
|
totalVideoPacketsSent: 0,
|
|
6206
6206
|
totalAudioPacketsSent: 0
|
|
6207
6207
|
});
|
|
6208
|
-
const
|
|
6208
|
+
const Ce = this.overallProducersStatsMap[C];
|
|
6209
6209
|
if (["video", "audio"].includes(E.mediaType) || ["video", "audio"].includes(E.kind)) {
|
|
6210
6210
|
if (!this.outboundProducerMap.has(M.id)) {
|
|
6211
6211
|
d.staleProducerStreamMap = true;
|
|
6212
6212
|
break;
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6215
|
-
if (((b =
|
|
6214
|
+
const Oe = this.callStatsInstance.producers.get(C);
|
|
6215
|
+
if (((b = Oe == null ? void 0 : Oe.track) == null ? void 0 : b.readyState) === "ended")
|
|
6216
6216
|
break;
|
|
6217
6217
|
d.producerStreamMap.has(C) || d.producerStreamMap.set(C, {
|
|
6218
6218
|
outboundVideoRtpId: [],
|
|
@@ -6253,13 +6253,13 @@ class qm extends Hm {
|
|
|
6253
6253
|
scalabilityMode: k.scalabilityMode,
|
|
6254
6254
|
powerEfficientEncoder: k.powerEfficientEncoder
|
|
6255
6255
|
}, V);
|
|
6256
|
-
d.outboundVideoRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(C,
|
|
6256
|
+
d.outboundVideoRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundVideoRtpId.push(M.id), this.processOutboundProducerVideoStats(C, Ce, Fe);
|
|
6257
6257
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
6258
6258
|
const k = E, Fe = O({
|
|
6259
6259
|
retransmittedBytesSent: k.retransmittedBytesSent,
|
|
6260
6260
|
retransmittedPacketsSent: k.retransmittedPacketsSent
|
|
6261
6261
|
}, V);
|
|
6262
|
-
d.outboundAudioRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(C,
|
|
6262
|
+
d.outboundAudioRtp.set(M.id, Fe), d.producerStreamMap.get(C).outboundAudioRtpId.push(M.id), this.processOutboundProducerAudioStats(C, Ce, Fe);
|
|
6263
6263
|
}
|
|
6264
6264
|
} else
|
|
6265
6265
|
this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -6280,7 +6280,7 @@ class qm extends Hm {
|
|
|
6280
6280
|
totalVideoPacketsReceived: 0,
|
|
6281
6281
|
totalAudioPacketsReceived: 0
|
|
6282
6282
|
});
|
|
6283
|
-
const
|
|
6283
|
+
const Ce = this.overallConsumersStatsMap[C];
|
|
6284
6284
|
if (["video", "audio"].includes(E.mediaType) || ["video", "audio"].includes(E.kind)) {
|
|
6285
6285
|
if (!this.inboundConsumerMap.has(M.id)) {
|
|
6286
6286
|
d.staleConsumerStreamMap = true;
|
|
@@ -6290,7 +6290,7 @@ class qm extends Hm {
|
|
|
6290
6290
|
inboundVideoRtpId: [],
|
|
6291
6291
|
inboundAudioRtpId: []
|
|
6292
6292
|
});
|
|
6293
|
-
const
|
|
6293
|
+
const Oe = {
|
|
6294
6294
|
bytesReceived: E.bytesReceived,
|
|
6295
6295
|
packetsReceived: E.packetsReceived,
|
|
6296
6296
|
packetsLost: E.packetsLost >= 0 ? E.packetsLost : 0,
|
|
@@ -6330,7 +6330,7 @@ class qm extends Hm {
|
|
|
6330
6330
|
freezeCount: V.freezeCount || 0,
|
|
6331
6331
|
pauseCount: V.pauseCount || 0,
|
|
6332
6332
|
powerEfficientDecoder: V.powerEfficientDecoder
|
|
6333
|
-
},
|
|
6333
|
+
}, Oe);
|
|
6334
6334
|
k.score = $m({
|
|
6335
6335
|
frameWidth: k.frameWidth || 0,
|
|
6336
6336
|
framesDecoded: (k.framesDecoded || 0) - (((R = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : R.framesDecoded) || 0),
|
|
@@ -6351,7 +6351,7 @@ class qm extends Hm {
|
|
|
6351
6351
|
jitter: k.jitter || 0,
|
|
6352
6352
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6353
6353
|
bitrate: ((k.bytesReceived || 0) - (((q = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : q.bytesReceived) || 0)) * 8 / 7
|
|
6354
|
-
}), this.videoConsumerToStatsMap.set(C, k), d.inboundVideoRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundVideoRtpId.push(M.id), this.processInboundConsumerVideoStats(C,
|
|
6354
|
+
}), this.videoConsumerToStatsMap.set(C, k), d.inboundVideoRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundVideoRtpId.push(M.id), this.processInboundConsumerVideoStats(C, Ce, k);
|
|
6355
6355
|
} else if (E.mediaType === "audio" || E.kind === "audio") {
|
|
6356
6356
|
const V = E, k = O({
|
|
6357
6357
|
audioLevel: V.audioLevel,
|
|
@@ -6366,7 +6366,7 @@ class qm extends Hm {
|
|
|
6366
6366
|
removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
|
|
6367
6367
|
silentConcealedSamples: V.silentConcealedSamples || 0,
|
|
6368
6368
|
playoutId: V.playoutId
|
|
6369
|
-
},
|
|
6369
|
+
}, Oe);
|
|
6370
6370
|
k.score = Um({
|
|
6371
6371
|
concealmentEvents: (k.concealmentEvents || 0) - (((ie = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : ie.concealmentEvents) || 0),
|
|
6372
6372
|
packetsLost: (k.packetsLost || 0) - (((pe = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : pe.packetsLost) || 0),
|
|
@@ -6381,7 +6381,7 @@ class qm extends Hm {
|
|
|
6381
6381
|
jitter: k.jitter || 0,
|
|
6382
6382
|
isScreenShare: this.screenShareConsumers.has(C),
|
|
6383
6383
|
bitrate: ((k.bytesReceived || 0) - (((pr = this.audioConsumerToStatsMap.get(C)) == null ? void 0 : pr.bytesReceived) || 0)) * 8 / 7
|
|
6384
|
-
}), this.audioConsumerToStatsMap.set(C, k), d.inboundAudioRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundAudioRtpId.push(M.id), this.processInboundConsumerAudioStats(C,
|
|
6384
|
+
}), this.audioConsumerToStatsMap.set(C, k), d.inboundAudioRtp.set(M.id, k), d.consumerStreamMap.get(C).inboundAudioRtpId.push(M.id), this.processInboundConsumerAudioStats(C, Ce, k);
|
|
6385
6385
|
}
|
|
6386
6386
|
} else
|
|
6387
6387
|
this.callStatsInstance.logger.error(`Callstats: Unknown Inbound-rtp. mediatype: ${E.mediaType} kind: ${E.kind}`);
|
|
@@ -6390,7 +6390,7 @@ class qm extends Hm {
|
|
|
6390
6390
|
}
|
|
6391
6391
|
}
|
|
6392
6392
|
if (d.producerStreamMap.forEach((M, E) => {
|
|
6393
|
-
var C, U,
|
|
6393
|
+
var C, U, Ce, Oe, V, k, Fe, Ns, La, Va, xa, Ua, $a, Fa, Ba, Ha, qa, ja, Ga, Wa, Ja, Ka, za;
|
|
6394
6394
|
if (M.outboundVideoRtpId.length > 0) {
|
|
6395
6395
|
const me = [];
|
|
6396
6396
|
M.outboundVideoRtpId.forEach((Nl) => {
|
|
@@ -6403,7 +6403,7 @@ class qm extends Hm {
|
|
|
6403
6403
|
jitter: ((C = ne.remoteData) == null ? void 0 : C.jitter) || 0,
|
|
6404
6404
|
isScreenShare: this.screenShareProducers.has(E),
|
|
6405
6405
|
packetsSent: (ne.packetsSent || 0) - (((U = this.videoProducerToStatsMap.get(E)) == null ? void 0 : U.packetsSent) || 0),
|
|
6406
|
-
packetsLost: (((
|
|
6406
|
+
packetsLost: (((Ce = ne.remoteData) == null ? void 0 : Ce.packetsLost) || 0) - (((V = (Oe = this.videoProducerToStatsMap.get(E)) == null ? void 0 : Oe.remoteData) == null ? void 0 : V.packetsLost) || 0),
|
|
6407
6407
|
framesEncoded: (ne.framesEncoded || 0) - (((k = this.videoProducerToStatsMap.get(E)) == null ? void 0 : k.framesEncoded) || 0)
|
|
6408
6408
|
}), _.set(E, {
|
|
6409
6409
|
score: +(ne.score * 10).toFixed(),
|
|
@@ -7923,11 +7923,11 @@ var Ey = 9007199254740991;
|
|
|
7923
7923
|
function eg(s) {
|
|
7924
7924
|
return typeof s == "number" && s > -1 && s % 1 == 0 && s <= Ey;
|
|
7925
7925
|
}
|
|
7926
|
-
var _y = "[object Arguments]", Py = "[object Array]", Cy = "[object Boolean]", Ry = "[object Date]", wy = "[object Error]", by = "[object Function]", ky = "[object Map]", Iy = "[object Number]", Ay = "[object Object]", My = "[object RegExp]", Dy = "[object Set]", Oy = "[object String]", Ny = "[object WeakMap]", Ly = "[object ArrayBuffer]", Vy = "[object DataView]", xy = "[object Float32Array]", Uy = "[object Float64Array]", $y = "[object Int8Array]", Fy = "[object Int16Array]", By = "[object Int32Array]", Hy = "[object Uint8Array]", qy = "[object Uint8ClampedArray]", jy = "[object Uint16Array]", Gy = "[object Uint32Array]",
|
|
7927
|
-
|
|
7928
|
-
|
|
7926
|
+
var _y = "[object Arguments]", Py = "[object Array]", Cy = "[object Boolean]", Ry = "[object Date]", wy = "[object Error]", by = "[object Function]", ky = "[object Map]", Iy = "[object Number]", Ay = "[object Object]", My = "[object RegExp]", Dy = "[object Set]", Oy = "[object String]", Ny = "[object WeakMap]", Ly = "[object ArrayBuffer]", Vy = "[object DataView]", xy = "[object Float32Array]", Uy = "[object Float64Array]", $y = "[object Int8Array]", Fy = "[object Int16Array]", By = "[object Int32Array]", Hy = "[object Uint8Array]", qy = "[object Uint8ClampedArray]", jy = "[object Uint16Array]", Gy = "[object Uint32Array]", Ee = {};
|
|
7927
|
+
Ee[xy] = Ee[Uy] = Ee[$y] = Ee[Fy] = Ee[By] = Ee[Hy] = Ee[qy] = Ee[jy] = Ee[Gy] = true;
|
|
7928
|
+
Ee[_y] = Ee[Py] = Ee[Ly] = Ee[Cy] = Ee[Vy] = Ee[Ry] = Ee[wy] = Ee[by] = Ee[ky] = Ee[Iy] = Ee[Ay] = Ee[My] = Ee[Dy] = Ee[Oy] = Ee[Ny] = false;
|
|
7929
7929
|
function Wy(s) {
|
|
7930
|
-
return Os(s) && eg(s.length) && !!
|
|
7930
|
+
return Os(s) && eg(s.length) && !!Ee[Ki(s)];
|
|
7931
7931
|
}
|
|
7932
7932
|
function Zu(s) {
|
|
7933
7933
|
return function(t) {
|
|
@@ -8179,9 +8179,9 @@ function uE(s) {
|
|
|
8179
8179
|
}
|
|
8180
8180
|
var ip = wa && wa.isSet, hE = ip ? Zu(ip) : uE;
|
|
8181
8181
|
const pE = hE;
|
|
8182
|
-
var mE = 1, gE = 2, fE = 4, mg = "[object Arguments]", vE = "[object Array]", TE = "[object Boolean]", yE = "[object Date]", SE = "[object Error]", gg = "[object Function]", EE = "[object GeneratorFunction]", _E = "[object Map]", PE = "[object Number]", fg = "[object Object]", CE = "[object RegExp]", RE = "[object Set]", wE = "[object String]", bE = "[object Symbol]", kE = "[object WeakMap]", IE = "[object ArrayBuffer]", AE = "[object DataView]", ME = "[object Float32Array]", DE = "[object Float64Array]", OE = "[object Int8Array]", NE = "[object Int16Array]", LE = "[object Int32Array]", VE = "[object Uint8Array]", xE = "[object Uint8ClampedArray]", UE = "[object Uint16Array]", $E = "[object Uint32Array]",
|
|
8183
|
-
|
|
8184
|
-
|
|
8182
|
+
var mE = 1, gE = 2, fE = 4, mg = "[object Arguments]", vE = "[object Array]", TE = "[object Boolean]", yE = "[object Date]", SE = "[object Error]", gg = "[object Function]", EE = "[object GeneratorFunction]", _E = "[object Map]", PE = "[object Number]", fg = "[object Object]", CE = "[object RegExp]", RE = "[object Set]", wE = "[object String]", bE = "[object Symbol]", kE = "[object WeakMap]", IE = "[object ArrayBuffer]", AE = "[object DataView]", ME = "[object Float32Array]", DE = "[object Float64Array]", OE = "[object Int8Array]", NE = "[object Int16Array]", LE = "[object Int32Array]", VE = "[object Uint8Array]", xE = "[object Uint8ClampedArray]", UE = "[object Uint16Array]", $E = "[object Uint32Array]", Te = {};
|
|
8183
|
+
Te[mg] = Te[vE] = Te[IE] = Te[AE] = Te[TE] = Te[yE] = Te[ME] = Te[DE] = Te[OE] = Te[NE] = Te[LE] = Te[_E] = Te[PE] = Te[fg] = Te[CE] = Te[RE] = Te[wE] = Te[bE] = Te[VE] = Te[xE] = Te[UE] = Te[$E] = true;
|
|
8184
|
+
Te[SE] = Te[gg] = Te[kE] = false;
|
|
8185
8185
|
function Hc(s, t, e, r, i, n) {
|
|
8186
8186
|
var o, c = t & mE, d = t & gE, h = t & fE;
|
|
8187
8187
|
if (e && (o = i ? e(s, r, i, n) : e(s)), o !== void 0)
|
|
@@ -8200,7 +8200,7 @@ function Hc(s, t, e, r, i, n) {
|
|
|
8200
8200
|
if (o = d || T ? {} : pg(s), !c)
|
|
8201
8201
|
return d ? TS(s, cS(o, s)) : mS(s, rS(o, s));
|
|
8202
8202
|
} else {
|
|
8203
|
-
if (!
|
|
8203
|
+
if (!Te[g])
|
|
8204
8204
|
return i ? s : {};
|
|
8205
8205
|
o = rE(s, g, c);
|
|
8206
8206
|
}
|
|
@@ -9561,7 +9561,7 @@ class xP extends VP {
|
|
|
9561
9561
|
return this.isMobile && this._bowser.getOSName() === "iOS";
|
|
9562
9562
|
}
|
|
9563
9563
|
}
|
|
9564
|
-
const
|
|
9564
|
+
const Pe = new xP(), UP = {
|
|
9565
9565
|
audio: true,
|
|
9566
9566
|
video: true,
|
|
9567
9567
|
screenshareAudio: true,
|
|
@@ -9699,7 +9699,7 @@ const Hi = new jP(), ae = class {
|
|
|
9699
9699
|
}
|
|
9700
9700
|
static init(t, e) {
|
|
9701
9701
|
const r = t.getValue("peerId");
|
|
9702
|
-
ae.tracingEnabled = e, ae.meetingMetadata.peerId = r, ae.meetingMetadata.sdkVersion = t.getValue("sdkVersion"), ae.meetingMetadata.deviceInfo =
|
|
9702
|
+
ae.tracingEnabled = e, ae.meetingMetadata.peerId = r, ae.meetingMetadata.sdkVersion = t.getValue("sdkVersion"), ae.meetingMetadata.deviceInfo = Pe.getDeviceInfo(), ae.meetingMetadata.visitedUrl = !navigator.isReactNative && typeof window != "undefined" && window.location.href, navigator.isReactNative || document.addEventListener(
|
|
9703
9703
|
"visibilitychange",
|
|
9704
9704
|
ae.processCachedLogs
|
|
9705
9705
|
), ae.logsProcessorTimer = setInterval(
|
|
@@ -10159,7 +10159,7 @@ let cu = wh;
|
|
|
10159
10159
|
$s = /* @__PURE__ */ new WeakMap(), Fs = /* @__PURE__ */ new WeakMap();
|
|
10160
10160
|
const I = new cu();
|
|
10161
10161
|
function zP() {
|
|
10162
|
-
|
|
10162
|
+
Pe.isElectron() && window.dyteElectronGetDisplayMediaSource && (navigator.mediaDevices.getDisplayMedia = () => l(this, null, function* () {
|
|
10163
10163
|
const s = yield window.dyteElectronGetDisplayMediaSource(
|
|
10164
10164
|
{
|
|
10165
10165
|
types: ["window", "screen"]
|
|
@@ -10315,7 +10315,7 @@ const gp = 1080, fp = 1920, QP = (s, t, e, r, i, n) => {
|
|
|
10315
10315
|
let g = d * m, T = h * m, _, P, b, R, L = 1;
|
|
10316
10316
|
return g < e && (L = e / g), Math.abs(L - 1) < 1e-14 && T < r && (L = r / T), g *= L, T *= L, b = d / (g / e), R = h / (T / r), _ = (d - b) * o, P = (h - R) * c, _ < 0 && (_ = 0), P < 0 && (P = 0), b > d && (b = d), R > h && (R = h), [_, P, b, R, s, t, e, r];
|
|
10317
10317
|
};
|
|
10318
|
-
var Ht, En, rt, qt,
|
|
10318
|
+
var Ht, En, rt, qt, Ae, ns, Bs, gt, Le, _n, Pn, Hs, Cn;
|
|
10319
10319
|
const bh = class extends xt {
|
|
10320
10320
|
constructor(e, r, i, n) {
|
|
10321
10321
|
super();
|
|
@@ -10323,7 +10323,7 @@ const bh = class extends xt {
|
|
|
10323
10323
|
f(this, En, void 0);
|
|
10324
10324
|
f(this, rt, void 0);
|
|
10325
10325
|
f(this, qt, void 0);
|
|
10326
|
-
f(this,
|
|
10326
|
+
f(this, Ae, {
|
|
10327
10327
|
height: gp,
|
|
10328
10328
|
width: fp
|
|
10329
10329
|
});
|
|
@@ -10336,13 +10336,13 @@ const bh = class extends xt {
|
|
|
10336
10336
|
});
|
|
10337
10337
|
f(this, Bs, void 0);
|
|
10338
10338
|
f(this, gt, {});
|
|
10339
|
-
f(this,
|
|
10339
|
+
f(this, Le, void 0);
|
|
10340
10340
|
f(this, _n, void 0);
|
|
10341
10341
|
f(this, Pn, void 0);
|
|
10342
10342
|
f(this, Hs, void 0);
|
|
10343
10343
|
f(this, Cn, false);
|
|
10344
10344
|
p(this, "cleanupEventListeners", () => {
|
|
10345
|
-
a(this, En).unsubscribe("stageStatus", this.handlePipMediaControls), a(this,
|
|
10345
|
+
a(this, En).unsubscribe("stageStatus", this.handlePipMediaControls), a(this, Le).removeListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Le).removeListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Le).removeListener("roomLeft", () => this.disable());
|
|
10346
10346
|
});
|
|
10347
10347
|
p(this, "enablePipMediaControls", () => {
|
|
10348
10348
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
@@ -10357,7 +10357,7 @@ const bh = class extends xt {
|
|
|
10357
10357
|
e2 === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
10358
10358
|
});
|
|
10359
10359
|
p(this, "eventCallback", (e2) => {
|
|
10360
|
-
e2 === "CAMERA" && (a(this,
|
|
10360
|
+
e2 === "CAMERA" && (a(this, Le).videoEnabled ? a(this, Le).disableVideo() : a(this, Le).enableVideo(), this.emit("cameraToggled")), e2 === "MIC" && (a(this, Le).audioEnabled ? a(this, Le).disableAudio() : a(this, Le).enableAudio(), this.emit("micToggled")), e2 === "END" && (I.emit(A.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
10361
10361
|
});
|
|
10362
10362
|
p(this, "unmountEvents", () => {
|
|
10363
10363
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
@@ -10372,7 +10372,7 @@ const bh = class extends xt {
|
|
|
10372
10372
|
p(this, "disable", (e2 = false) => {
|
|
10373
10373
|
v(this, Hs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, Bs)), e2 !== true && document.body.removeChild(a(this, rt)), v(this, Bs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
10374
10374
|
});
|
|
10375
|
-
v(this, En, e), v(this, Hs, "idle"), v(this,
|
|
10375
|
+
v(this, En, e), v(this, Hs, "idle"), v(this, Le, r), v(this, ns, {
|
|
10376
10376
|
brand: r.config.designTokens.colors.brand[500],
|
|
10377
10377
|
background: r.config.designTokens.colors.background[1e3],
|
|
10378
10378
|
text: r.config.designTokens.colors.text,
|
|
@@ -10426,11 +10426,11 @@ const bh = class extends xt {
|
|
|
10426
10426
|
v(this, rt, document.createElement("div")), a(this, rt).style.width = "0.1px", a(this, rt).style.height = "0.1px", a(this, rt).style.overflow = "hidden", a(this, rt).style.position = "absolute", a(this, rt).style.bottom = "0", a(this, rt).style.right = "0", a(this, rt).style.opacity = "0", a(this, rt).appendChild(a(this, qt));
|
|
10427
10427
|
}
|
|
10428
10428
|
setupEventListeners() {
|
|
10429
|
-
a(this, En).subscribe("stageStatus", this.handlePipMediaControls), a(this,
|
|
10429
|
+
a(this, En).subscribe("stageStatus", this.handlePipMediaControls), a(this, Le).addListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Le).addListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Le).addListener("roomLeft", () => this.disable());
|
|
10430
10430
|
}
|
|
10431
10431
|
createCanvas() {
|
|
10432
10432
|
const e = document.createElement("canvas");
|
|
10433
|
-
e.height = a(this,
|
|
10433
|
+
e.height = a(this, Ae).height, e.width = a(this, Ae).width, v(this, Ht, e);
|
|
10434
10434
|
}
|
|
10435
10435
|
setupMediaSessionEvents() {
|
|
10436
10436
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", () => {
|
|
@@ -10438,12 +10438,12 @@ const bh = class extends xt {
|
|
|
10438
10438
|
}), this.mountAudioEvents(), this.mountVideoEvents());
|
|
10439
10439
|
}
|
|
10440
10440
|
mountAudioEvents() {
|
|
10441
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this,
|
|
10441
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this, Le).permissions.canProduceAudio && navigator.mediaSession.setActionHandler("togglemicrophone", () => {
|
|
10442
10442
|
this.eventCallback("MIC");
|
|
10443
10443
|
});
|
|
10444
10444
|
}
|
|
10445
10445
|
mountVideoEvents() {
|
|
10446
|
-
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this,
|
|
10446
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this, Le).permissions.canProduceVideo && navigator.mediaSession.setActionHandler("togglecamera", () => {
|
|
10447
10447
|
this.eventCallback("CAMERA");
|
|
10448
10448
|
});
|
|
10449
10449
|
}
|
|
@@ -10501,9 +10501,9 @@ const bh = class extends xt {
|
|
|
10501
10501
|
return;
|
|
10502
10502
|
const n = a(this, Ht).getContext("2d"), o = this.getSources();
|
|
10503
10503
|
let c = 0, d = 0;
|
|
10504
|
-
for (; c < a(this,
|
|
10504
|
+
for (; c < a(this, Ae).height - 5; ) {
|
|
10505
10505
|
let g = 0;
|
|
10506
|
-
for (; g < a(this,
|
|
10506
|
+
for (; g < a(this, Ae).width - 5 && d < i; ) {
|
|
10507
10507
|
if ((h = o[d]) != null && h.enabled) {
|
|
10508
10508
|
const T = o[d].element, [_, P, b, R, L, H, B, F] = QP(
|
|
10509
10509
|
g,
|
|
@@ -10525,21 +10525,21 @@ const bh = class extends xt {
|
|
|
10525
10525
|
switch (e) {
|
|
10526
10526
|
case 0:
|
|
10527
10527
|
case 1:
|
|
10528
|
-
return [a(this,
|
|
10528
|
+
return [a(this, Ae).width, a(this, Ae).height];
|
|
10529
10529
|
case 2:
|
|
10530
|
-
return [Math.floor(a(this,
|
|
10530
|
+
return [Math.floor(a(this, Ae).width / 2), a(this, Ae).height];
|
|
10531
10531
|
case 3:
|
|
10532
10532
|
case 4:
|
|
10533
|
-
return [Math.floor(a(this,
|
|
10533
|
+
return [Math.floor(a(this, Ae).width / 2), Math.floor(a(this, Ae).height / 2)];
|
|
10534
10534
|
case 5:
|
|
10535
10535
|
case 6:
|
|
10536
|
-
return [Math.floor(a(this,
|
|
10536
|
+
return [Math.floor(a(this, Ae).width / 3), Math.floor(a(this, Ae).height / 2)];
|
|
10537
10537
|
case 7:
|
|
10538
10538
|
case 8:
|
|
10539
10539
|
case 9:
|
|
10540
|
-
return [Math.floor(a(this,
|
|
10540
|
+
return [Math.floor(a(this, Ae).width / 3), Math.floor(a(this, Ae).height / 3)];
|
|
10541
10541
|
default:
|
|
10542
|
-
return [Math.floor(a(this,
|
|
10542
|
+
return [Math.floor(a(this, Ae).width / 3), Math.floor(a(this, Ae).height / 2)];
|
|
10543
10543
|
}
|
|
10544
10544
|
}
|
|
10545
10545
|
paintCanvas() {
|
|
@@ -10550,7 +10550,7 @@ const bh = class extends xt {
|
|
|
10550
10550
|
}
|
|
10551
10551
|
isSupported() {
|
|
10552
10552
|
var e;
|
|
10553
|
-
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this,
|
|
10553
|
+
return !!window.chrome && document.pictureInPictureEnabled && ((e = a(this, Le).config) == null ? void 0 : e.viewType) !== "LIVESTREAM";
|
|
10554
10554
|
}
|
|
10555
10555
|
get isActive() {
|
|
10556
10556
|
return document.pictureInPictureElement !== null;
|
|
@@ -10570,10 +10570,10 @@ const bh = class extends xt {
|
|
|
10570
10570
|
return;
|
|
10571
10571
|
v(this, Cn, true), this.createCanvas(), this.setupMediaSessionEvents();
|
|
10572
10572
|
const i = document.createElement("video");
|
|
10573
|
-
v(this,
|
|
10573
|
+
v(this, Ae, {
|
|
10574
10574
|
height: e != null ? e : gp,
|
|
10575
10575
|
width: r != null ? r : fp
|
|
10576
|
-
}), i.height = a(this,
|
|
10576
|
+
}), i.height = a(this, Ae).height, i.width = a(this, Ae).width, i.autoplay = true, i.muted = true, i.srcObject = a(this, Ht).captureStream(24), v(this, qt, i), a(this, qt).onloadedmetadata = () => {
|
|
10577
10577
|
try {
|
|
10578
10578
|
this.emit("pipStarted"), a(this, qt).onleavepictureinpicture = () => {
|
|
10579
10579
|
this.emit("pipEnded");
|
|
@@ -10647,7 +10647,7 @@ const bh = class extends xt {
|
|
|
10647
10647
|
v(this, gt, {});
|
|
10648
10648
|
}
|
|
10649
10649
|
enable() {
|
|
10650
|
-
v(this, Hs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this,
|
|
10650
|
+
v(this, Hs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", a(this, Le).videoEnabled), this.updateMediaSession("MIC", a(this, Le).audioEnabled), document.body.appendChild(a(this, rt)), v(this, Bs, requestAnimationFrame(() => this.animate())), a(this, qt).onloadedmetadata = () => {
|
|
10651
10651
|
a(this, qt).requestPictureInPicture().then(() => {
|
|
10652
10652
|
v(this, Hs, "active");
|
|
10653
10653
|
});
|
|
@@ -10657,7 +10657,7 @@ const bh = class extends xt {
|
|
|
10657
10657
|
}
|
|
10658
10658
|
};
|
|
10659
10659
|
let du = bh;
|
|
10660
|
-
Ht = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(),
|
|
10660
|
+
Ht = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), ns = /* @__PURE__ */ new WeakMap(), Bs = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Hs = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap();
|
|
10661
10661
|
var cr;
|
|
10662
10662
|
(function(s) {
|
|
10663
10663
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -15230,7 +15230,7 @@ function Ma(s, t) {
|
|
|
15230
15230
|
function zg(s, t) {
|
|
15231
15231
|
return Object.keys(s).reduce((e, r) => (e[r] = t | s[r], e), {});
|
|
15232
15232
|
}
|
|
15233
|
-
const x = Ma(QI, rA),
|
|
15233
|
+
const x = Ma(QI, rA), Ie = Ma(XI, iA), z = Ma(
|
|
15234
15234
|
ZI,
|
|
15235
15235
|
nA
|
|
15236
15236
|
), Us = Ma(eA, aA), ci = Ma(
|
|
@@ -15369,7 +15369,7 @@ class Zt {
|
|
|
15369
15369
|
v(this, it, t);
|
|
15370
15370
|
}
|
|
15371
15371
|
getChatMessages() {
|
|
15372
|
-
return a(this, it).sendMessagePromise(
|
|
15372
|
+
return a(this, it).sendMessagePromise(Ie.getMessages);
|
|
15373
15373
|
}
|
|
15374
15374
|
getChatMessagesPaginated(t, e, r, i = 0, n = "") {
|
|
15375
15375
|
return l(this, null, function* () {
|
|
@@ -15380,7 +15380,7 @@ class Zt {
|
|
|
15380
15380
|
reversed: r,
|
|
15381
15381
|
channelId: n
|
|
15382
15382
|
}, c = yield a(this, it).sendMessagePromise(
|
|
15383
|
-
|
|
15383
|
+
Ie.getPaginatedMessages,
|
|
15384
15384
|
sk.toBinary(o)
|
|
15385
15385
|
);
|
|
15386
15386
|
return c.payload ? ik.fromBinary(
|
|
@@ -15397,7 +15397,7 @@ class Zt {
|
|
|
15397
15397
|
payload: t
|
|
15398
15398
|
};
|
|
15399
15399
|
a(this, it).sendMessage(
|
|
15400
|
-
|
|
15400
|
+
Ie.sendMessageToRoom,
|
|
15401
15401
|
ok.toBinary(r)
|
|
15402
15402
|
);
|
|
15403
15403
|
}
|
|
@@ -15408,7 +15408,7 @@ class Zt {
|
|
|
15408
15408
|
payload: t
|
|
15409
15409
|
};
|
|
15410
15410
|
a(this, it).sendMessage(
|
|
15411
|
-
|
|
15411
|
+
Ie.sendMessageToPeers,
|
|
15412
15412
|
lk.toBinary(i)
|
|
15413
15413
|
);
|
|
15414
15414
|
}
|
|
@@ -15419,7 +15419,7 @@ class Zt {
|
|
|
15419
15419
|
payload: t
|
|
15420
15420
|
};
|
|
15421
15421
|
a(this, it).sendMessage(
|
|
15422
|
-
|
|
15422
|
+
Ie.sendMessageToChannel,
|
|
15423
15423
|
pk.toBinary(i)
|
|
15424
15424
|
);
|
|
15425
15425
|
}
|
|
@@ -15439,7 +15439,7 @@ class Zt {
|
|
|
15439
15439
|
};
|
|
15440
15440
|
i && (o.channelId = i), n !== void 0 && (o.pinned = n);
|
|
15441
15441
|
const c = yield a(this, it).sendMessagePromise(
|
|
15442
|
-
|
|
15442
|
+
Ie.editMessage,
|
|
15443
15443
|
fk.toBinary(o)
|
|
15444
15444
|
);
|
|
15445
15445
|
return Lc.fromBinary(c.payload).message;
|
|
@@ -15452,7 +15452,7 @@ class Zt {
|
|
|
15452
15452
|
};
|
|
15453
15453
|
e && (r.channelId = e);
|
|
15454
15454
|
const i = yield a(this, it).sendMessagePromise(
|
|
15455
|
-
|
|
15455
|
+
Ie.deleteMessage,
|
|
15456
15456
|
_k.toBinary(r)
|
|
15457
15457
|
), n = Vc.fromBinary(i.payload);
|
|
15458
15458
|
return O({
|
|
@@ -15473,7 +15473,7 @@ class Zt {
|
|
|
15473
15473
|
e.channelId && (r.channelId = e.channelId);
|
|
15474
15474
|
try {
|
|
15475
15475
|
const c = yield a(this, it).sendMessagePromise(
|
|
15476
|
-
|
|
15476
|
+
Ie.searchChannelMessages,
|
|
15477
15477
|
Rk.toBinary(r)
|
|
15478
15478
|
);
|
|
15479
15479
|
return Wg.fromBinary(c.payload).messages;
|
|
@@ -15486,7 +15486,7 @@ class Zt {
|
|
|
15486
15486
|
return l(this, null, function* () {
|
|
15487
15487
|
try {
|
|
15488
15488
|
const t = yield a(this, it).sendMessagePromise(
|
|
15489
|
-
|
|
15489
|
+
Ie.getAllChatChannels
|
|
15490
15490
|
);
|
|
15491
15491
|
return Ls.fromBinary(t.payload).chatChannels.map(Wi.formatChannel);
|
|
15492
15492
|
} catch (t) {
|
|
@@ -15497,7 +15497,7 @@ class Zt {
|
|
|
15497
15497
|
markLastReadMessage(t, e) {
|
|
15498
15498
|
return l(this, null, function* () {
|
|
15499
15499
|
const r = yield a(this, it).sendMessagePromise(
|
|
15500
|
-
|
|
15500
|
+
Ie.markChannelIndexAsRead,
|
|
15501
15501
|
bk.toBinary({
|
|
15502
15502
|
channelId: t,
|
|
15503
15503
|
userId: e.userId,
|
|
@@ -15514,7 +15514,7 @@ class Zt {
|
|
|
15514
15514
|
pinned: e,
|
|
15515
15515
|
channelId: t.channelId
|
|
15516
15516
|
}, i = yield a(this, it).sendMessagePromise(
|
|
15517
|
-
|
|
15517
|
+
Ie.pinMessage,
|
|
15518
15518
|
Tk.toBinary(r)
|
|
15519
15519
|
);
|
|
15520
15520
|
return Nc.fromBinary(i.payload);
|
|
@@ -15523,31 +15523,31 @@ class Zt {
|
|
|
15523
15523
|
on(t, e) {
|
|
15524
15524
|
let r, i;
|
|
15525
15525
|
switch (t) {
|
|
15526
|
-
case
|
|
15526
|
+
case Ie.sendMessageToRoom: {
|
|
15527
15527
|
r = jl.fromBinary.bind(
|
|
15528
15528
|
jl
|
|
15529
15529
|
), i = jl.create();
|
|
15530
15530
|
break;
|
|
15531
15531
|
}
|
|
15532
|
-
case
|
|
15532
|
+
case Ie.sendMessageToPeers: {
|
|
15533
15533
|
r = Gl.fromBinary.bind(
|
|
15534
15534
|
Gl
|
|
15535
15535
|
), i = Gl.create();
|
|
15536
15536
|
break;
|
|
15537
15537
|
}
|
|
15538
|
-
case
|
|
15538
|
+
case Ie.editMessage: {
|
|
15539
15539
|
r = Lc.fromBinary.bind(
|
|
15540
15540
|
Lc
|
|
15541
15541
|
), i = Lc.create();
|
|
15542
15542
|
break;
|
|
15543
15543
|
}
|
|
15544
|
-
case
|
|
15544
|
+
case Ie.pinMessage: {
|
|
15545
15545
|
r = Nc.fromBinary.bind(
|
|
15546
15546
|
Nc
|
|
15547
15547
|
), i = Nc.create();
|
|
15548
15548
|
break;
|
|
15549
15549
|
}
|
|
15550
|
-
case
|
|
15550
|
+
case Ie.deleteMessage: {
|
|
15551
15551
|
r = Vc.fromBinary.bind(
|
|
15552
15552
|
Vc
|
|
15553
15553
|
), i = Vc.create();
|
|
@@ -16772,7 +16772,7 @@ const ii = (rm = class {
|
|
|
16772
16772
|
this.getChatMessages();
|
|
16773
16773
|
})
|
|
16774
16774
|
), this.chatSocketHandler.on(
|
|
16775
|
-
|
|
16775
|
+
Ie.sendMessageToRoom,
|
|
16776
16776
|
(s) => {
|
|
16777
16777
|
const t = ii.formatSocketServiceMessage(
|
|
16778
16778
|
s.message
|
|
@@ -16790,7 +16790,7 @@ const ii = (rm = class {
|
|
|
16790
16790
|
});
|
|
16791
16791
|
}
|
|
16792
16792
|
), this.chatSocketHandler.on(
|
|
16793
|
-
|
|
16793
|
+
Ie.sendMessageToPeers,
|
|
16794
16794
|
(s) => {
|
|
16795
16795
|
const t = ii.formatSocketServiceMessage(
|
|
16796
16796
|
s.message
|
|
@@ -16802,7 +16802,7 @@ const ii = (rm = class {
|
|
|
16802
16802
|
});
|
|
16803
16803
|
}
|
|
16804
16804
|
), this.chatSocketHandler.on(
|
|
16805
|
-
|
|
16805
|
+
Ie.editMessage,
|
|
16806
16806
|
(s) => {
|
|
16807
16807
|
const t = ii.formatSocketServiceMessage(
|
|
16808
16808
|
s.message
|
|
@@ -16823,7 +16823,7 @@ const ii = (rm = class {
|
|
|
16823
16823
|
}));
|
|
16824
16824
|
}
|
|
16825
16825
|
), this.chatSocketHandler.on(
|
|
16826
|
-
|
|
16826
|
+
Ie.deleteMessage,
|
|
16827
16827
|
(s) => {
|
|
16828
16828
|
if (s.channelId) {
|
|
16829
16829
|
this.chat.emit("chatUpdate", {
|
|
@@ -16850,7 +16850,7 @@ const ii = (rm = class {
|
|
|
16850
16850
|
this.chat.channels.push(e), this.chat.emit("channelCreate", e);
|
|
16851
16851
|
}
|
|
16852
16852
|
), this.chatSocketHandler.on(
|
|
16853
|
-
|
|
16853
|
+
Ie.pinMessage,
|
|
16854
16854
|
(s) => {
|
|
16855
16855
|
const t = this.chat.messages.findIndex((r) => r.id === s.chatId);
|
|
16856
16856
|
if (t === -1)
|
|
@@ -17643,7 +17643,7 @@ var YA = Object.defineProperty, QA = Object.getOwnPropertyDescriptor, El = (s, t
|
|
|
17643
17643
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
17644
17644
|
return r && i && YA(t, e, i), i;
|
|
17645
17645
|
};
|
|
17646
|
-
const
|
|
17646
|
+
const Me = {
|
|
17647
17647
|
getPeer: 14,
|
|
17648
17648
|
getPeers: 15,
|
|
17649
17649
|
chatMessage: 16,
|
|
@@ -17787,14 +17787,14 @@ let ka = (cm = class extends Aa {
|
|
|
17787
17787
|
a(this, nt).storeDelete(this.id, r.store, i);
|
|
17788
17788
|
break;
|
|
17789
17789
|
}
|
|
17790
|
-
case
|
|
17790
|
+
case Me.chatMessage: {
|
|
17791
17791
|
const {
|
|
17792
17792
|
messagePayload: c,
|
|
17793
17793
|
peerIds: d
|
|
17794
17794
|
} = r;
|
|
17795
17795
|
if (!a(this, On)) {
|
|
17796
17796
|
this.sendIframeEvent({
|
|
17797
|
-
type:
|
|
17797
|
+
type: Me.chatMessage,
|
|
17798
17798
|
uuid: e.uuid,
|
|
17799
17799
|
payload: { error: "Chat is disabled for this room." }
|
|
17800
17800
|
});
|
|
@@ -17802,13 +17802,13 @@ let ka = (cm = class extends Aa {
|
|
|
17802
17802
|
}
|
|
17803
17803
|
try {
|
|
17804
17804
|
yield a(this, On).sendMessage(c, d), this.sendIframeEvent({
|
|
17805
|
-
type:
|
|
17805
|
+
type: Me.chatMessage,
|
|
17806
17806
|
uuid: e.uuid,
|
|
17807
17807
|
payload: { success: true }
|
|
17808
17808
|
});
|
|
17809
17809
|
} catch (h) {
|
|
17810
17810
|
this.sendIframeEvent({
|
|
17811
|
-
type:
|
|
17811
|
+
type: Me.chatMessage,
|
|
17812
17812
|
uuid: e.uuid,
|
|
17813
17813
|
payload: {
|
|
17814
17814
|
error: h
|
|
@@ -17817,7 +17817,7 @@ let ka = (cm = class extends Aa {
|
|
|
17817
17817
|
}
|
|
17818
17818
|
break;
|
|
17819
17819
|
}
|
|
17820
|
-
case
|
|
17820
|
+
case Me.getPeer: {
|
|
17821
17821
|
let c;
|
|
17822
17822
|
const { peerId: d } = r, h = j(O({}, a(this, Ot)), {
|
|
17823
17823
|
id: a(this, Ot).id,
|
|
@@ -17826,46 +17826,46 @@ let ka = (cm = class extends Aa {
|
|
|
17826
17826
|
stageStatus: a(this, Ot).stageStatus
|
|
17827
17827
|
});
|
|
17828
17828
|
d ? (c = a(this, Dn).joined.get(r.peerId), a(this, Ot).id === d && (c = h)) : c = h, this.sendIframeEvent({
|
|
17829
|
-
type:
|
|
17829
|
+
type: Me.getPeer,
|
|
17830
17830
|
payload: { peer: c && hd(c) },
|
|
17831
17831
|
uuid: e.uuid
|
|
17832
17832
|
});
|
|
17833
17833
|
break;
|
|
17834
17834
|
}
|
|
17835
|
-
case
|
|
17835
|
+
case Me.getPeers: {
|
|
17836
17836
|
const c = a(this, Dn).joined.toArray().map((d) => hd(d));
|
|
17837
17837
|
this.sendIframeEvent({
|
|
17838
|
-
type:
|
|
17838
|
+
type: Me.getPeers,
|
|
17839
17839
|
payload: { peers: c },
|
|
17840
17840
|
uuid: e.uuid
|
|
17841
17841
|
});
|
|
17842
17842
|
break;
|
|
17843
17843
|
}
|
|
17844
|
-
case
|
|
17844
|
+
case Me.getPluginInitiator: {
|
|
17845
17845
|
this.sendIframeEvent({
|
|
17846
|
-
type:
|
|
17846
|
+
type: Me.getPluginInitiator,
|
|
17847
17847
|
payload: { enabledBy: this.enabledBy },
|
|
17848
17848
|
uuid: e.uuid
|
|
17849
17849
|
});
|
|
17850
17850
|
break;
|
|
17851
17851
|
}
|
|
17852
|
-
case
|
|
17852
|
+
case Me.getDisplayTitle: {
|
|
17853
17853
|
this.sendIframeEvent({
|
|
17854
|
-
type:
|
|
17854
|
+
type: Me.getDisplayTitle,
|
|
17855
17855
|
payload: { displayTitle: a(this, Ln) },
|
|
17856
17856
|
uuid: e.uuid
|
|
17857
17857
|
});
|
|
17858
17858
|
break;
|
|
17859
17859
|
}
|
|
17860
|
-
case
|
|
17860
|
+
case Me.getRoomName: {
|
|
17861
17861
|
this.sendIframeEvent({
|
|
17862
|
-
type:
|
|
17862
|
+
type: Me.getRoomName,
|
|
17863
17863
|
payload: { roomName: a(this, vi).getValue("meetingId") },
|
|
17864
17864
|
uuid: e.uuid
|
|
17865
17865
|
});
|
|
17866
17866
|
break;
|
|
17867
17867
|
}
|
|
17868
|
-
case
|
|
17868
|
+
case Me.customPluginEventToParent: {
|
|
17869
17869
|
this.emit(e.payload.eventName, e.payload.data);
|
|
17870
17870
|
break;
|
|
17871
17871
|
}
|
|
@@ -17882,7 +17882,7 @@ let ka = (cm = class extends Aa {
|
|
|
17882
17882
|
}
|
|
17883
17883
|
}
|
|
17884
17884
|
}), this.sendIframeEvent({
|
|
17885
|
-
type:
|
|
17885
|
+
type: Me.sendData,
|
|
17886
17886
|
uuid: "",
|
|
17887
17887
|
payload: t
|
|
17888
17888
|
}));
|
|
@@ -18002,7 +18002,7 @@ El([
|
|
|
18002
18002
|
ka = El([
|
|
18003
18003
|
ht("0600")
|
|
18004
18004
|
], ka);
|
|
18005
|
-
var
|
|
18005
|
+
var Ve, Ti;
|
|
18006
18006
|
class of extends Map {
|
|
18007
18007
|
constructor(e) {
|
|
18008
18008
|
const {
|
|
@@ -18011,54 +18011,54 @@ class of extends Map {
|
|
|
18011
18011
|
onClearEvent: n
|
|
18012
18012
|
} = e;
|
|
18013
18013
|
super();
|
|
18014
|
-
f(this,
|
|
18014
|
+
f(this, Ve, void 0);
|
|
18015
18015
|
f(this, Ti, void 0);
|
|
18016
18016
|
p(this, "onAddEvent");
|
|
18017
18017
|
p(this, "onDeleteEvent");
|
|
18018
18018
|
p(this, "onClearEvent");
|
|
18019
|
-
v(this,
|
|
18019
|
+
v(this, Ve, new Aa()), this.onAddEvent = r, this.onDeleteEvent = i, this.onClearEvent = n, v(this, Ti, /* @__PURE__ */ new Map());
|
|
18020
18020
|
}
|
|
18021
18021
|
emit(e, ...r) {
|
|
18022
|
-
return a(this,
|
|
18022
|
+
return a(this, Ve).emit(e, ...r);
|
|
18023
18023
|
}
|
|
18024
18024
|
on(e, r) {
|
|
18025
|
-
return a(this,
|
|
18025
|
+
return a(this, Ve).on(e, r);
|
|
18026
18026
|
}
|
|
18027
18027
|
addListener(e, r) {
|
|
18028
|
-
return a(this,
|
|
18028
|
+
return a(this, Ve).addListener(e, r);
|
|
18029
18029
|
}
|
|
18030
18030
|
off(e, r) {
|
|
18031
|
-
return a(this,
|
|
18031
|
+
return a(this, Ve).off(e, r);
|
|
18032
18032
|
}
|
|
18033
18033
|
once(e, r) {
|
|
18034
|
-
return a(this,
|
|
18034
|
+
return a(this, Ve).once(e, r);
|
|
18035
18035
|
}
|
|
18036
18036
|
prependListener(e, r) {
|
|
18037
|
-
return a(this,
|
|
18037
|
+
return a(this, Ve).prependListener(e, r);
|
|
18038
18038
|
}
|
|
18039
18039
|
prependOnceListener(e, r) {
|
|
18040
|
-
return a(this,
|
|
18040
|
+
return a(this, Ve).prependOnceListener(e, r);
|
|
18041
18041
|
}
|
|
18042
18042
|
removeListener(e, r) {
|
|
18043
|
-
return a(this,
|
|
18043
|
+
return a(this, Ve).removeListener(e, r);
|
|
18044
18044
|
}
|
|
18045
18045
|
removeAllListeners(e) {
|
|
18046
|
-
return a(this,
|
|
18046
|
+
return a(this, Ve).removeAllListeners(e);
|
|
18047
18047
|
}
|
|
18048
18048
|
listeners(e) {
|
|
18049
|
-
return a(this,
|
|
18049
|
+
return a(this, Ve).listeners(e);
|
|
18050
18050
|
}
|
|
18051
18051
|
listenerCount(e) {
|
|
18052
|
-
return a(this,
|
|
18052
|
+
return a(this, Ve).listenerCount(e);
|
|
18053
18053
|
}
|
|
18054
18054
|
getMaxListeners() {
|
|
18055
|
-
return a(this,
|
|
18055
|
+
return a(this, Ve).getMaxListeners();
|
|
18056
18056
|
}
|
|
18057
18057
|
setMaxListeners(e) {
|
|
18058
|
-
return a(this,
|
|
18058
|
+
return a(this, Ve).setMaxListeners(e);
|
|
18059
18059
|
}
|
|
18060
18060
|
eventNames() {
|
|
18061
|
-
return a(this,
|
|
18061
|
+
return a(this, Ve).eventNames();
|
|
18062
18062
|
}
|
|
18063
18063
|
add(e, r = true) {
|
|
18064
18064
|
return this.set(e.id, e, r);
|
|
@@ -18067,7 +18067,7 @@ class of extends Map {
|
|
|
18067
18067
|
const n = super.set(e, r), o = (c, ...d) => {
|
|
18068
18068
|
this.emit(c, r, ...d);
|
|
18069
18069
|
};
|
|
18070
|
-
return a(this, Ti).set(e, o), r.on("*", o), i && a(this,
|
|
18070
|
+
return a(this, Ti).set(e, o), r.on("*", o), i && a(this, Ve).emit(this.onAddEvent, r), n;
|
|
18071
18071
|
}
|
|
18072
18072
|
delete(e, r = true, i = false) {
|
|
18073
18073
|
const n = this.get(e);
|
|
@@ -18075,20 +18075,20 @@ class of extends Map {
|
|
|
18075
18075
|
return false;
|
|
18076
18076
|
n.removeListener("*", a(this, Ti).get(e));
|
|
18077
18077
|
const o = super.delete(e);
|
|
18078
|
-
return i && n.removeAllListeners(), r && a(this,
|
|
18078
|
+
return i && n.removeAllListeners(), r && a(this, Ve).emit(this.onDeleteEvent, n), o;
|
|
18079
18079
|
}
|
|
18080
18080
|
clear(e = true, r = false) {
|
|
18081
18081
|
this.forEach((n) => {
|
|
18082
18082
|
n.removeListener("*", a(this, Ti).get(n.id)), r && n.removeAllListeners();
|
|
18083
18083
|
});
|
|
18084
18084
|
const i = super.clear();
|
|
18085
|
-
return e && a(this,
|
|
18085
|
+
return e && a(this, Ve).emit(this.onClearEvent), i;
|
|
18086
18086
|
}
|
|
18087
18087
|
toArray() {
|
|
18088
18088
|
return Array.from(this.values());
|
|
18089
18089
|
}
|
|
18090
18090
|
}
|
|
18091
|
-
|
|
18091
|
+
Ve = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap();
|
|
18092
18092
|
class Bp extends of {
|
|
18093
18093
|
constructor() {
|
|
18094
18094
|
super({
|
|
@@ -18291,30 +18291,30 @@ const cf = (dm = class {
|
|
|
18291
18291
|
});
|
|
18292
18292
|
})
|
|
18293
18293
|
), a(this, Vn).on(
|
|
18294
|
-
|
|
18294
|
+
Ie.sendMessageToPeers,
|
|
18295
18295
|
(s) => {
|
|
18296
18296
|
const t = ms == null ? void 0 : ms.formatSocketServiceMessage(
|
|
18297
18297
|
s.message
|
|
18298
18298
|
);
|
|
18299
|
-
this.broadcastIframeEvent(
|
|
18299
|
+
this.broadcastIframeEvent(Me.chatMessage, { message: t });
|
|
18300
18300
|
}
|
|
18301
18301
|
), a(this, Vn).on(
|
|
18302
|
-
|
|
18302
|
+
Ie.sendMessageToRoom,
|
|
18303
18303
|
(s) => {
|
|
18304
18304
|
const t = ms == null ? void 0 : ms.formatSocketServiceMessage(
|
|
18305
18305
|
s.message
|
|
18306
18306
|
);
|
|
18307
|
-
this.broadcastIframeEvent(
|
|
18307
|
+
this.broadcastIframeEvent(Me.chatMessage, { message: t });
|
|
18308
18308
|
}
|
|
18309
18309
|
), I.on(A.PEER_JOINED_INTERNAL, (s) => {
|
|
18310
18310
|
const t = hd(s);
|
|
18311
|
-
this.broadcastIframeEvent(
|
|
18311
|
+
this.broadcastIframeEvent(Me.peerJoined, t);
|
|
18312
18312
|
}), I.on(A.PEER_CLOSED, (s) => {
|
|
18313
|
-
this.broadcastIframeEvent(
|
|
18313
|
+
this.broadcastIframeEvent(Me.peerLeft, s);
|
|
18314
18314
|
}), I.on(A.UPDATE_PEER_STAGE_STATUS, (s) => {
|
|
18315
|
-
this.broadcastIframeEvent(
|
|
18315
|
+
this.broadcastIframeEvent(Me.peerStageStatusUpdate, s);
|
|
18316
18316
|
}), a(this, Do).subscribe("stageStatus", (s) => {
|
|
18317
|
-
this.broadcastIframeEvent(
|
|
18317
|
+
this.broadcastIframeEvent(Me.stageStatusUpdate, s);
|
|
18318
18318
|
});
|
|
18319
18319
|
}
|
|
18320
18320
|
}, Gt = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), dm);
|
|
@@ -18599,7 +18599,7 @@ class hh {
|
|
|
18599
18599
|
p(this, "features");
|
|
18600
18600
|
p(this, "browserSpecs");
|
|
18601
18601
|
p(this, "callStats");
|
|
18602
|
-
this.logger = t, this.features = e, this.browserSpecs =
|
|
18602
|
+
this.logger = t, this.features = e, this.browserSpecs = Pe, this.callStats = r;
|
|
18603
18603
|
}
|
|
18604
18604
|
static init(t) {
|
|
18605
18605
|
return new hh(u, dM, t);
|
|
@@ -18621,24 +18621,24 @@ var lM = Object.defineProperty, uM = Object.getOwnPropertyDescriptor, $t = (s, t
|
|
|
18621
18621
|
for (var i = r > 1 ? void 0 : r ? uM(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
18622
18622
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18623
18623
|
return r && i && lM(t, e, i), i;
|
|
18624
|
-
}, qe,
|
|
18624
|
+
}, qe, Se, ve, ws, Wt, No, Id;
|
|
18625
18625
|
class Mt extends Aa {
|
|
18626
18626
|
constructor(e, r, i = wu, n = true) {
|
|
18627
18627
|
super();
|
|
18628
18628
|
f(this, qe, void 0);
|
|
18629
|
-
f(this,
|
|
18630
|
-
f(this,
|
|
18629
|
+
f(this, Se, void 0);
|
|
18630
|
+
f(this, ve, void 0);
|
|
18631
18631
|
f(this, ws, void 0);
|
|
18632
18632
|
f(this, Wt, void 0);
|
|
18633
18633
|
f(this, No, void 0);
|
|
18634
18634
|
f(this, Id, void 0);
|
|
18635
18635
|
p(this, "audioUpdateInProgress");
|
|
18636
18636
|
p(this, "videoUpdateInProgress");
|
|
18637
|
-
v(this, Id, e), this.audioUpdateInProgress = false, this.videoUpdateInProgress = false, v(this, qe, new lf(e, r)), v(this,
|
|
18637
|
+
v(this, Id, e), this.audioUpdateInProgress = false, this.videoUpdateInProgress = false, v(this, qe, new lf(e, r)), v(this, Se, new OM(
|
|
18638
18638
|
a(this, qe),
|
|
18639
18639
|
void 0,
|
|
18640
18640
|
i
|
|
18641
|
-
)), v(this,
|
|
18641
|
+
)), v(this, ve, new FM(
|
|
18642
18642
|
a(this, qe),
|
|
18643
18643
|
void 0,
|
|
18644
18644
|
i
|
|
@@ -18646,13 +18646,13 @@ class Mt extends Aa {
|
|
|
18646
18646
|
a(this, qe)
|
|
18647
18647
|
)), v(this, ws, new LM(
|
|
18648
18648
|
a(this, qe)
|
|
18649
|
-
)), v(this, No, n), a(this,
|
|
18649
|
+
)), v(this, No, n), a(this, Se).on("trackMuted", this.onAudioTrackMuted.bind(this)), a(this, Se).on(
|
|
18650
18650
|
"trackChanged",
|
|
18651
18651
|
this.onAudioTrackChanged.bind(this)
|
|
18652
|
-
), a(this,
|
|
18652
|
+
), a(this, ve).on(
|
|
18653
18653
|
"trackChanged",
|
|
18654
18654
|
this.onVideoTrackChanged.bind(this)
|
|
18655
|
-
), a(this,
|
|
18655
|
+
), a(this, ve).on("trackEnded", this.onVideoTrackEnded.bind(this)), a(this, Wt).on(
|
|
18656
18656
|
"trackEnded",
|
|
18657
18657
|
this.onScreenShareEnded.bind(this)
|
|
18658
18658
|
), this.onVisibilityChange = this.onVisibilityChange.bind(this), document.addEventListener("visibilitychange", this.onVisibilityChange);
|
|
@@ -18678,8 +18678,8 @@ class Mt extends Aa {
|
|
|
18678
18678
|
if (e && r)
|
|
18679
18679
|
try {
|
|
18680
18680
|
const d = yield a(this, qe).getAudioAndVideoTrack(
|
|
18681
|
-
a(this,
|
|
18682
|
-
a(this,
|
|
18681
|
+
a(this, Se).userSelectedDevice,
|
|
18682
|
+
a(this, ve).userSelectedDevice
|
|
18683
18683
|
);
|
|
18684
18684
|
n = d.audioTrack, o = d.videoTrack;
|
|
18685
18685
|
} catch (d) {
|
|
@@ -18694,7 +18694,7 @@ class Mt extends Aa {
|
|
|
18694
18694
|
try {
|
|
18695
18695
|
n = yield a(this, qe).getAudioTrack(
|
|
18696
18696
|
false,
|
|
18697
|
-
a(this,
|
|
18697
|
+
a(this, Se).userSelectedDevice
|
|
18698
18698
|
);
|
|
18699
18699
|
} catch (d) {
|
|
18700
18700
|
u.error("LocalMediaHandler::init::Failed to get audio track", {
|
|
@@ -18704,14 +18704,14 @@ class Mt extends Aa {
|
|
|
18704
18704
|
if (!o && r)
|
|
18705
18705
|
try {
|
|
18706
18706
|
o = yield a(this, qe).getVideoTrack(
|
|
18707
|
-
a(this,
|
|
18707
|
+
a(this, ve).userSelectedDevice
|
|
18708
18708
|
);
|
|
18709
18709
|
} catch (d) {
|
|
18710
18710
|
u.error("LocalMediaHandler::init::Failed to get video track", {
|
|
18711
18711
|
error: d
|
|
18712
18712
|
});
|
|
18713
18713
|
}
|
|
18714
|
-
e && !n && J.audioOff(), r && !o && J.videoOff(), yield a(this,
|
|
18714
|
+
e && !n && J.audioOff(), r && !o && J.videoOff(), yield a(this, Se).setMediaTrack(n), yield a(this, ve).setMediaTrack(o);
|
|
18715
18715
|
try {
|
|
18716
18716
|
yield a(this, ws).setupSpeaker();
|
|
18717
18717
|
} catch (d) {
|
|
@@ -18731,8 +18731,8 @@ class Mt extends Aa {
|
|
|
18731
18731
|
}
|
|
18732
18732
|
getCurrentDevices() {
|
|
18733
18733
|
return {
|
|
18734
|
-
audio: a(this,
|
|
18735
|
-
video: a(this,
|
|
18734
|
+
audio: a(this, Se).currentDevice,
|
|
18735
|
+
video: a(this, ve).currentDevice,
|
|
18736
18736
|
speaker: a(this, ws).currentDevice
|
|
18737
18737
|
};
|
|
18738
18738
|
}
|
|
@@ -18752,21 +18752,21 @@ class Mt extends Aa {
|
|
|
18752
18752
|
this.emit("AUDIO_TRACK_CHANGE");
|
|
18753
18753
|
}
|
|
18754
18754
|
get rawAudioTrack() {
|
|
18755
|
-
return a(this,
|
|
18755
|
+
return a(this, Se).mediaTrack;
|
|
18756
18756
|
}
|
|
18757
18757
|
get audioTrack() {
|
|
18758
|
-
return a(this,
|
|
18758
|
+
return a(this, Se).transformedMediaTrack;
|
|
18759
18759
|
}
|
|
18760
18760
|
get audioEnabled() {
|
|
18761
|
-
return a(this,
|
|
18761
|
+
return a(this, Se).trackEnabled;
|
|
18762
18762
|
}
|
|
18763
|
-
enableAudio() {
|
|
18763
|
+
enableAudio(e) {
|
|
18764
18764
|
return l(this, null, function* () {
|
|
18765
18765
|
if (!this.audioUpdateInProgress) {
|
|
18766
18766
|
this.audioUpdateInProgress = true;
|
|
18767
18767
|
try {
|
|
18768
|
-
yield a(this,
|
|
18769
|
-
} catch (
|
|
18768
|
+
e ? yield a(this, Se).enableTrack(false, e) : yield a(this, Se).unmuteTrack();
|
|
18769
|
+
} catch (r) {
|
|
18770
18770
|
} finally {
|
|
18771
18771
|
this.audioUpdateInProgress = false;
|
|
18772
18772
|
}
|
|
@@ -18774,14 +18774,14 @@ class Mt extends Aa {
|
|
|
18774
18774
|
});
|
|
18775
18775
|
}
|
|
18776
18776
|
disableAudio() {
|
|
18777
|
-
a(this,
|
|
18777
|
+
a(this, Se).mediaTrack && !a(this, Se).isCustomTrack ? a(this, Se).muteTrack() : a(this, Se).disableTrack();
|
|
18778
18778
|
}
|
|
18779
18779
|
getAudioDevices(e) {
|
|
18780
18780
|
return a(this, qe).getAudioInputDevices(e);
|
|
18781
18781
|
}
|
|
18782
18782
|
setAudioDevice(e) {
|
|
18783
18783
|
return l(this, null, function* () {
|
|
18784
|
-
yield a(this,
|
|
18784
|
+
yield a(this, Se).setDevice(e), e != null && e.deviceId && J.selectedDevice("AUDIO", e), this.emit("AUDIO_TRACK_CHANGE"), this.emit("DEVICE_CHANGE", { device: e });
|
|
18785
18785
|
});
|
|
18786
18786
|
}
|
|
18787
18787
|
setupSpeaker() {
|
|
@@ -18799,21 +18799,21 @@ class Mt extends Aa {
|
|
|
18799
18799
|
this.emit("VIDEO_TRACK_CHANGE");
|
|
18800
18800
|
}
|
|
18801
18801
|
get rawVideoTrack() {
|
|
18802
|
-
return a(this,
|
|
18802
|
+
return a(this, ve).mediaTrack;
|
|
18803
18803
|
}
|
|
18804
18804
|
get videoTrack() {
|
|
18805
|
-
return a(this,
|
|
18805
|
+
return a(this, ve).transformedMediaTrack;
|
|
18806
18806
|
}
|
|
18807
18807
|
get videoEnabled() {
|
|
18808
|
-
return a(this,
|
|
18808
|
+
return a(this, ve).trackEnabled;
|
|
18809
18809
|
}
|
|
18810
|
-
enableVideo() {
|
|
18810
|
+
enableVideo(e) {
|
|
18811
18811
|
return l(this, null, function* () {
|
|
18812
18812
|
if (!this.videoUpdateInProgress) {
|
|
18813
18813
|
this.videoUpdateInProgress = true;
|
|
18814
18814
|
try {
|
|
18815
|
-
yield a(this,
|
|
18816
|
-
} catch (
|
|
18815
|
+
e ? yield a(this, ve).enableTrack(false, e) : yield a(this, ve).unmuteTrack();
|
|
18816
|
+
} catch (r) {
|
|
18817
18817
|
} finally {
|
|
18818
18818
|
this.videoUpdateInProgress = false;
|
|
18819
18819
|
}
|
|
@@ -18821,19 +18821,19 @@ class Mt extends Aa {
|
|
|
18821
18821
|
});
|
|
18822
18822
|
}
|
|
18823
18823
|
disableVideo() {
|
|
18824
|
-
a(this,
|
|
18824
|
+
a(this, ve).disableTrack();
|
|
18825
18825
|
}
|
|
18826
18826
|
getVideoDevices(e) {
|
|
18827
18827
|
return a(this, qe).getVideoInputDevices(e);
|
|
18828
18828
|
}
|
|
18829
18829
|
setVideoDevice(e) {
|
|
18830
18830
|
return l(this, null, function* () {
|
|
18831
|
-
yield a(this,
|
|
18831
|
+
yield a(this, ve).setDevice(e), e != null && e.deviceId && J.selectedDevice("VIDEO", e), this.emit("VIDEO_TRACK_CHANGE"), this.emit("DEVICE_CHANGE", { device: e });
|
|
18832
18832
|
});
|
|
18833
18833
|
}
|
|
18834
18834
|
updateVideoConstraints(e) {
|
|
18835
18835
|
return l(this, null, function* () {
|
|
18836
|
-
yield a(this,
|
|
18836
|
+
yield a(this, ve).updateConstraints(e);
|
|
18837
18837
|
});
|
|
18838
18838
|
}
|
|
18839
18839
|
onScreenShareEnded() {
|
|
@@ -18867,28 +18867,28 @@ class Mt extends Aa {
|
|
|
18867
18867
|
return a(this, qe).getAudioOutputDevices(e);
|
|
18868
18868
|
}
|
|
18869
18869
|
addAudioMiddleware(e) {
|
|
18870
|
-
return a(this,
|
|
18870
|
+
return a(this, Se).addMiddleware(e);
|
|
18871
18871
|
}
|
|
18872
18872
|
removeAudioMiddleware(e) {
|
|
18873
|
-
return a(this,
|
|
18873
|
+
return a(this, Se).removeMiddleware(e);
|
|
18874
18874
|
}
|
|
18875
18875
|
removeAllAudioMiddlewares() {
|
|
18876
|
-
return a(this,
|
|
18876
|
+
return a(this, Se).removeAllMiddlewares();
|
|
18877
18877
|
}
|
|
18878
18878
|
addVideoMiddleware(e) {
|
|
18879
|
-
return a(this,
|
|
18879
|
+
return a(this, ve).addMiddleware(e);
|
|
18880
18880
|
}
|
|
18881
18881
|
removeVideoMiddleware(e) {
|
|
18882
|
-
return a(this,
|
|
18882
|
+
return a(this, ve).removeMiddleware(e);
|
|
18883
18883
|
}
|
|
18884
18884
|
removeAllVideoMiddlewares() {
|
|
18885
|
-
return a(this,
|
|
18885
|
+
return a(this, ve).removeAllMiddlewares();
|
|
18886
18886
|
}
|
|
18887
18887
|
setVideoMiddlewareGlobalConfig(e) {
|
|
18888
|
-
return a(this,
|
|
18888
|
+
return a(this, ve).setVideoMiddlewareGlobalConfig(e);
|
|
18889
18889
|
}
|
|
18890
18890
|
destruct() {
|
|
18891
|
-
a(this,
|
|
18891
|
+
a(this, Se).disableTrack(), a(this, ve).disableTrack(), a(this, ve).terminateMiddlewareWebWorker(), a(this, Wt).disableScreenShare(), a(this, qe).destruct();
|
|
18892
18892
|
}
|
|
18893
18893
|
onDeviceChange(e, r) {
|
|
18894
18894
|
return l(this, null, function* () {
|
|
@@ -18909,10 +18909,10 @@ class Mt extends Aa {
|
|
|
18909
18909
|
this.destruct();
|
|
18910
18910
|
}
|
|
18911
18911
|
removeAudioTrack() {
|
|
18912
|
-
a(this,
|
|
18912
|
+
a(this, Se).disableTrack();
|
|
18913
18913
|
}
|
|
18914
18914
|
removeVideoTrack() {
|
|
18915
|
-
a(this,
|
|
18915
|
+
a(this, ve).disableTrack(), a(this, ve).terminateMiddlewareWebWorker();
|
|
18916
18916
|
}
|
|
18917
18917
|
removeDocumentEventListeners() {
|
|
18918
18918
|
return l(this, null, function* () {
|
|
@@ -18920,7 +18920,7 @@ class Mt extends Aa {
|
|
|
18920
18920
|
});
|
|
18921
18921
|
}
|
|
18922
18922
|
}
|
|
18923
|
-
qe = /* @__PURE__ */ new WeakMap(),
|
|
18923
|
+
qe = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), No = /* @__PURE__ */ new WeakMap(), Id = /* @__PURE__ */ new WeakMap();
|
|
18924
18924
|
$t([
|
|
18925
18925
|
y.trace("MediaHandler.setupStreams")
|
|
18926
18926
|
], Mt.prototype, "setupStreams", 1);
|
|
@@ -18962,7 +18962,7 @@ $t([
|
|
|
18962
18962
|
], Mt.prototype, "onDeviceChange", 1);
|
|
18963
18963
|
function xc(s, t, e) {
|
|
18964
18964
|
switch (true) {
|
|
18965
|
-
case
|
|
18965
|
+
case Pe.isChromiumBased():
|
|
18966
18966
|
switch (t) {
|
|
18967
18967
|
case "NotAllowedError":
|
|
18968
18968
|
return e.includes("by system") ? "SYSTEM_DENIED" : s === "screenshare" ? "CANCELED" : "DENIED";
|
|
@@ -18970,14 +18970,14 @@ function xc(s, t, e) {
|
|
|
18970
18970
|
default:
|
|
18971
18971
|
return "COULD_NOT_START";
|
|
18972
18972
|
}
|
|
18973
|
-
case
|
|
18973
|
+
case Pe.isSafari():
|
|
18974
18974
|
switch (t) {
|
|
18975
18975
|
case "NotAllowedError":
|
|
18976
18976
|
return "DENIED";
|
|
18977
18977
|
default:
|
|
18978
18978
|
return "COULD_NOT_START";
|
|
18979
18979
|
}
|
|
18980
|
-
case
|
|
18980
|
+
case Pe.isFirefox():
|
|
18981
18981
|
switch (t) {
|
|
18982
18982
|
case "NotFoundError":
|
|
18983
18983
|
case "NotReadableError":
|
|
@@ -19015,7 +19015,7 @@ const hM = [
|
|
|
19015
19015
|
function wu(s) {
|
|
19016
19016
|
var e, r;
|
|
19017
19017
|
const t = (e = s.label) == null ? void 0 : e.toLowerCase();
|
|
19018
|
-
return ((r =
|
|
19018
|
+
return ((r = Pe._bowser) == null ? void 0 : r.getOSName()) === "macOS" && t.includes("iphone") ? (u.log("isVirtualDevice::ignore_macos_continuity"), true) : hM.some(
|
|
19019
19019
|
(i) => t == null ? void 0 : t.includes(i)
|
|
19020
19020
|
);
|
|
19021
19021
|
}
|
|
@@ -19238,7 +19238,7 @@ class yM {
|
|
|
19238
19238
|
p(this, "getAudioConstraints", (t2) => {
|
|
19239
19239
|
var n, o, c, d, h, m, g, T;
|
|
19240
19240
|
const e2 = {}, r = (n = a(this, Si)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
19241
|
-
return
|
|
19241
|
+
return Pe.isFirefox() || Pe.isWebKitBased() ? (e2.audio = {
|
|
19242
19242
|
deviceId: t2,
|
|
19243
19243
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : true,
|
|
19244
19244
|
echoCancellation: (c = r == null ? void 0 : r.echoCancellation) != null ? c : true,
|
|
@@ -19260,7 +19260,7 @@ class yM {
|
|
|
19260
19260
|
let i = Hp.vga;
|
|
19261
19261
|
if (typeof r == "string" ? i = Hp[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
|
|
19262
19262
|
ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
|
|
19263
|
-
},
|
|
19263
|
+
}, Pe.isChromiumBased() && (i.frameRate.max = 30), Y.hasFeature(se.VIDEO_CONSTRAINTS)) {
|
|
19264
19264
|
const h = (d = Y.getValue(
|
|
19265
19265
|
se.VIDEO_CONSTRAINTS
|
|
19266
19266
|
)) == null ? void 0 : d.toString();
|
|
@@ -19578,7 +19578,7 @@ let Vt = (um = class extends SM {
|
|
|
19578
19578
|
}
|
|
19579
19579
|
onDeviceChange(t) {
|
|
19580
19580
|
return l(this, null, function* () {
|
|
19581
|
-
|
|
19581
|
+
Pe.supportsDeviceChangeEvent() && navigator.mediaDevices.addEventListener(
|
|
19582
19582
|
"devicechange",
|
|
19583
19583
|
(e) => l(this, null, function* () {
|
|
19584
19584
|
var h, m;
|
|
@@ -19772,11 +19772,12 @@ let pd = class extends Aa {
|
|
|
19772
19772
|
t2
|
|
19773
19773
|
));
|
|
19774
19774
|
p(this, "getUserPreferredDevice", () => mo.getItem(this.userPreferredDeviceKey));
|
|
19775
|
-
|
|
19775
|
+
p(this, "isCustomTrack", false);
|
|
19776
|
+
this.mediaInterface = t, e && (this._mediaTrack = e), this.userSelectedDevice = (i = this.getUserPreferredDevice()) != null ? i : void 0, this.isNonPreferredDevice = r, this.onTrackEnded = this.onTrackEnded.bind(this), this.onTrackMuted = this.onTrackMuted.bind(this);
|
|
19776
19777
|
}
|
|
19777
19778
|
disableTrack() {
|
|
19778
19779
|
var t, e;
|
|
19779
|
-
this.removeMediaTrackListeners(), (t = this._mediaTrack) == null || t.stop(), this._mediaTrack = void 0, (e = this.transformedMediaTrack) == null || e.stop(), this.transformedMediaTrack = void 0;
|
|
19780
|
+
this.removeMediaTrackListeners(), this.isCustomTrack || (t = this._mediaTrack) == null || t.stop(), this._mediaTrack = void 0, (e = this.transformedMediaTrack) == null || e.stop(), this.transformedMediaTrack = void 0;
|
|
19780
19781
|
}
|
|
19781
19782
|
get mediaTrack() {
|
|
19782
19783
|
return this._mediaTrack;
|
|
@@ -19856,7 +19857,7 @@ let pd = class extends Aa {
|
|
|
19856
19857
|
}
|
|
19857
19858
|
addMiddleware(t) {
|
|
19858
19859
|
return l(this, null, function* () {
|
|
19859
|
-
if (
|
|
19860
|
+
if (Pe.isWebKitBased() && !Y.hasFeature(se.ALLOW_SAFARI_MEDIA_MIDDLEWARES))
|
|
19860
19861
|
return {
|
|
19861
19862
|
success: false,
|
|
19862
19863
|
message: "Middlewares are not supported in this WebKit engine based browser."
|
|
@@ -19960,17 +19961,22 @@ class Pl extends hf {
|
|
|
19960
19961
|
}
|
|
19961
19962
|
});
|
|
19962
19963
|
}
|
|
19963
|
-
enableTrack(t) {
|
|
19964
|
+
enableTrack(t, e) {
|
|
19964
19965
|
return l(this, null, function* () {
|
|
19965
19966
|
if (this.trackEnabled) {
|
|
19966
19967
|
u.warn("AudioMediaHandler.enableTrack Track already enabled!");
|
|
19967
19968
|
return;
|
|
19968
19969
|
}
|
|
19969
|
-
|
|
19970
|
+
if (e) {
|
|
19971
|
+
this.isCustomTrack = true, yield this.setMediaTrack(e);
|
|
19972
|
+
return;
|
|
19973
|
+
}
|
|
19974
|
+
this.isCustomTrack = false;
|
|
19975
|
+
const r = yield this.mediaInterface.getAudioTrack(
|
|
19970
19976
|
t,
|
|
19971
19977
|
this.userSelectedDevice
|
|
19972
19978
|
);
|
|
19973
|
-
yield this.setMediaTrack(
|
|
19979
|
+
yield this.setMediaTrack(r);
|
|
19974
19980
|
});
|
|
19975
19981
|
}
|
|
19976
19982
|
setTransformedTrack(t) {
|
|
@@ -20147,7 +20153,7 @@ class VM extends Aa {
|
|
|
20147
20153
|
(e = this.videoMediaTrack) == null || e.addEventListener(
|
|
20148
20154
|
"ended",
|
|
20149
20155
|
this.onTrackEnded.bind(this)
|
|
20150
|
-
),
|
|
20156
|
+
), Pe.isWebKitBased() && ((r = this.videoMediaTrack) == null || r.addEventListener(
|
|
20151
20157
|
"mute",
|
|
20152
20158
|
this.onTrackEnded.bind(this)
|
|
20153
20159
|
));
|
|
@@ -20206,15 +20212,21 @@ class Cc extends hf {
|
|
|
20206
20212
|
}
|
|
20207
20213
|
});
|
|
20208
20214
|
}
|
|
20209
|
-
enableTrack() {
|
|
20215
|
+
enableTrack(e, r) {
|
|
20210
20216
|
return l(this, null, function* () {
|
|
20211
20217
|
if (this.trackEnabled) {
|
|
20212
20218
|
u.warn("VideoMediaHandler.enableTrack Track already enabled!");
|
|
20213
20219
|
return;
|
|
20214
20220
|
}
|
|
20215
|
-
|
|
20216
|
-
yield this.
|
|
20221
|
+
if (r) {
|
|
20222
|
+
this.isCustomTrack = true, yield this.setMediaTrack(r);
|
|
20223
|
+
return;
|
|
20224
|
+
}
|
|
20225
|
+
this.isCustomTrack = false;
|
|
20226
|
+
const i = yield this.mediaInterface.getVideoTrack(
|
|
20227
|
+
this.userSelectedDevice
|
|
20217
20228
|
);
|
|
20229
|
+
yield this.setMediaTrack(i);
|
|
20218
20230
|
});
|
|
20219
20231
|
}
|
|
20220
20232
|
setTransformedTrack(e) {
|
|
@@ -22742,7 +22754,7 @@ class o0 extends xt {
|
|
|
22742
22754
|
const T = { message: this.mediaPermissions[m], kind: m };
|
|
22743
22755
|
g === "DENIED" ? I.emit(A.MEDIA_PERMISSION_ERROR, T) : I.emit(A.MEDIA_PERMISSION_UPDATE, T);
|
|
22744
22756
|
};
|
|
22745
|
-
if (
|
|
22757
|
+
if (Pe.getName() === "firefox")
|
|
22746
22758
|
return;
|
|
22747
22759
|
const r = "microphone", i = "camera", n = yield (d = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : d.query({ name: r }), o = yield (h = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : h.query({
|
|
22748
22760
|
name: i
|
|
@@ -22787,7 +22799,7 @@ class o0 extends xt {
|
|
|
22787
22799
|
init() {
|
|
22788
22800
|
return l(this, arguments, function* (e = {}, r = false, i = null) {
|
|
22789
22801
|
var n, o, c, d, h, m;
|
|
22790
|
-
if (
|
|
22802
|
+
if (Pe.init(), !this.localMediaHandler)
|
|
22791
22803
|
try {
|
|
22792
22804
|
let g = true;
|
|
22793
22805
|
if (i != null && i.getValue("defaults").mediaHandler)
|
|
@@ -23090,7 +23102,7 @@ let Ye = (mm = class extends o0 {
|
|
|
23090
23102
|
p(this, "roomState", "init");
|
|
23091
23103
|
f(this, ea, /* @__PURE__ */ new Set());
|
|
23092
23104
|
f(this, ta, /* @__PURE__ */ new Set());
|
|
23093
|
-
v(this, bs, 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, vt, r), v(this, Xn, i), this.hidden = false, v(this, Zn, false), this.organizationId = e.organizationId, this.supportsRemoteControl =
|
|
23105
|
+
v(this, bs, 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, vt, r), v(this, Xn, i), this.hidden = false, v(this, Zn, false), this.organizationId = e.organizationId, this.supportsRemoteControl = Pe.isElectron(), this.device = Pe.getDeviceInfo(), this.presetName = n, i.viewType !== Et.Chat && this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), $(this, Bo, Mu).call(this);
|
|
23094
23106
|
}
|
|
23095
23107
|
get stageStatus() {
|
|
23096
23108
|
return a(this, bs).getValue("stageStatus");
|
|
@@ -23224,16 +23236,16 @@ let Ye = (mm = class extends o0 {
|
|
|
23224
23236
|
return this.localMediaHandler.removeDocumentEventListeners();
|
|
23225
23237
|
});
|
|
23226
23238
|
}
|
|
23227
|
-
enableAudio() {
|
|
23239
|
+
enableAudio(t) {
|
|
23228
23240
|
return l(this, null, function* () {
|
|
23229
23241
|
if (this.permissions.canProduceAudio !== K.NotAllowed && !(a(this, vt).canProduceAudio === K.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
|
|
23230
|
-
if (J.audioOn(), yield this.localMediaHandler.enableAudio(), a(this, xe, He) && this.stageStatus === "ON_STAGE") {
|
|
23242
|
+
if (J.audioOn(), yield this.localMediaHandler.enableAudio(t), a(this, xe, He) && this.stageStatus === "ON_STAGE") {
|
|
23231
23243
|
if (this.audioTrack)
|
|
23232
23244
|
try {
|
|
23233
23245
|
yield a(this, je, Xe).shareMic(this.audioTrack);
|
|
23234
|
-
} catch (
|
|
23246
|
+
} catch (e) {
|
|
23235
23247
|
u.error("DyteSelf::enableAudio::Error while sharing mic", {
|
|
23236
|
-
error:
|
|
23248
|
+
error: e
|
|
23237
23249
|
}), this.localMediaHandler.disableAudio();
|
|
23238
23250
|
}
|
|
23239
23251
|
if (!this.audioEnabled)
|
|
@@ -23247,15 +23259,15 @@ let Ye = (mm = class extends o0 {
|
|
|
23247
23259
|
}
|
|
23248
23260
|
});
|
|
23249
23261
|
}
|
|
23250
|
-
enableVideo() {
|
|
23262
|
+
enableVideo(t) {
|
|
23251
23263
|
return l(this, null, function* () {
|
|
23252
23264
|
if (a(this, vt).canProduceVideo !== K.NotAllowed && !(a(this, vt).canProduceVideo === K.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
|
|
23253
|
-
if (J.videoOn(), yield this.localMediaHandler.enableVideo(), a(this, xe, He) && this.stageStatus === "ON_STAGE")
|
|
23265
|
+
if (J.videoOn(), yield this.localMediaHandler.enableVideo(t), a(this, xe, He) && this.stageStatus === "ON_STAGE")
|
|
23254
23266
|
try {
|
|
23255
23267
|
yield a(this, je, Xe).shareWebcam(this.videoTrack);
|
|
23256
|
-
} catch (
|
|
23268
|
+
} catch (e) {
|
|
23257
23269
|
u.error("DyteSelf::enableVideo::Error while sharing video", {
|
|
23258
|
-
error:
|
|
23270
|
+
error: e
|
|
23259
23271
|
}), this.videoEnabled && this.localMediaHandler.disableVideo();
|
|
23260
23272
|
}
|
|
23261
23273
|
this.emit("videoUpdate", {
|
|
@@ -26935,7 +26947,7 @@ class oe {
|
|
|
26935
26947
|
peerId: this.peerId,
|
|
26936
26948
|
roomUUID: e,
|
|
26937
26949
|
roomViewType: "groupCall",
|
|
26938
|
-
deviceInfo: j(O({},
|
|
26950
|
+
deviceInfo: j(O({}, Pe.getDeviceInfo()), {
|
|
26939
26951
|
userAgent: navigator.userAgent,
|
|
26940
26952
|
memory: navigator.deviceMemory,
|
|
26941
26953
|
cpus: navigator.hardwareConcurrency
|
|
@@ -27095,7 +27107,7 @@ class oe {
|
|
|
27095
27107
|
appData: {
|
|
27096
27108
|
screenShare: true,
|
|
27097
27109
|
e2ee: this.e2ee,
|
|
27098
|
-
supportsRemoteControl:
|
|
27110
|
+
supportsRemoteControl: Pe.isElectron()
|
|
27099
27111
|
},
|
|
27100
27112
|
stopTracks: false
|
|
27101
27113
|
}, n = () => {
|
|
@@ -27113,7 +27125,7 @@ class oe {
|
|
|
27113
27125
|
appData: {
|
|
27114
27126
|
screenShare: true,
|
|
27115
27127
|
e2ee: this.e2ee,
|
|
27116
|
-
supportsRemoteControl:
|
|
27128
|
+
supportsRemoteControl: Pe.isElectron()
|
|
27117
27129
|
},
|
|
27118
27130
|
stopTracks: false,
|
|
27119
27131
|
zeroRtpOnPause: true
|
|
@@ -27738,7 +27750,7 @@ const zf = (fm = class {
|
|
|
27738
27750
|
try {
|
|
27739
27751
|
yield J.initialize({
|
|
27740
27752
|
peerId: o,
|
|
27741
|
-
engineName:
|
|
27753
|
+
engineName: Pe.getDeviceInfo().engineName,
|
|
27742
27754
|
env: s.getValue("env"),
|
|
27743
27755
|
iceServers: yield n.getICEServers(),
|
|
27744
27756
|
apiBase: s.getValue("apiBase"),
|
|
@@ -28414,11 +28426,11 @@ Ge = /* @__PURE__ */ new WeakMap();
|
|
|
28414
28426
|
var J0 = Object.defineProperty, K0 = (s, t, e) => t in s ? J0(s, t, { enumerable: true, configurable: true, writable: true, value: e }) : s[t] = e, z0 = (s, t, e) => (K0(s, typeof t != "symbol" ? t + "" : t, e), e), Ch = (s, t, e) => {
|
|
28415
28427
|
if (!t.has(s))
|
|
28416
28428
|
throw TypeError("Cannot " + e);
|
|
28417
|
-
}, D = (s, t, e) => (Ch(s, t, "read from private field"), e ? e.call(s) : t.get(s)),
|
|
28429
|
+
}, D = (s, t, e) => (Ch(s, t, "read from private field"), e ? e.call(s) : t.get(s)), ye = (s, t, e) => {
|
|
28418
28430
|
if (t.has(s))
|
|
28419
28431
|
throw TypeError("Cannot add the same private member more than once");
|
|
28420
28432
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
28421
|
-
}, le = (s, t, e, r) => (Ch(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e),
|
|
28433
|
+
}, le = (s, t, e, r) => (Ch(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e), we = (s, t, e) => (Ch(s, t, "access private method"), e), Td = {}, Y0 = {
|
|
28422
28434
|
get exports() {
|
|
28423
28435
|
return Td;
|
|
28424
28436
|
},
|
|
@@ -28697,7 +28709,7 @@ function iD(s, t) {
|
|
|
28697
28709
|
var Tr;
|
|
28698
28710
|
class nD {
|
|
28699
28711
|
constructor(t = {}) {
|
|
28700
|
-
z0(this, "opts"),
|
|
28712
|
+
z0(this, "opts"), ye(this, Tr, void 0), this.opts = {
|
|
28701
28713
|
initialTimeout: t.initialTimeout || 1e3,
|
|
28702
28714
|
maxTimeout: t.maxTimeout || 1e4,
|
|
28703
28715
|
factor: t.factor || 2
|
|
@@ -28729,7 +28741,7 @@ const gr = {
|
|
|
28729
28741
|
var ai, oi;
|
|
28730
28742
|
class aD {
|
|
28731
28743
|
constructor(t) {
|
|
28732
|
-
|
|
28744
|
+
ye(this, ai, void 0), ye(this, oi, void 0), le(this, ai, console), le(this, oi, t);
|
|
28733
28745
|
}
|
|
28734
28746
|
debug(...t) {
|
|
28735
28747
|
gr[D(this, oi)] > gr.debug || D(this, ai).debug("[Sockrates]:", ...t);
|
|
@@ -28747,35 +28759,35 @@ class aD {
|
|
|
28747
28759
|
ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap();
|
|
28748
28760
|
var nv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(nv || {});
|
|
28749
28761
|
const oD = "2", cD = "3";
|
|
28750
|
-
var
|
|
28762
|
+
var De, dn, Re, Ue, yr, Je, ir, Wr, hs, ln, Vs, Fu, av, uo, Zc, Bu, ov, Hu, Qp, yd, qu, ju, cv, go, ed, fo, Sd, Ed, Gu, Sn, vo, To, _d;
|
|
28751
28763
|
class dD {
|
|
28752
28764
|
constructor(t, e) {
|
|
28753
28765
|
var q;
|
|
28754
|
-
|
|
28766
|
+
ye(this, Fu), ye(this, uo), ye(this, Bu), ye(this, Hu), ye(this, yd), ye(this, ju), ye(this, go), ye(this, fo), ye(this, Ed), ye(this, Sn), ye(this, To), ye(this, De, void 0), ye(this, dn, void 0), ye(this, Re, void 0), ye(this, Ue, void 0), ye(this, yr, void 0), ye(this, Je, void 0), ye(this, ir, void 0), ye(this, Wr, void 0), ye(this, hs, void 0), ye(this, ln, void 0), ye(this, Vs, void 0);
|
|
28755
28767
|
var r, i, n, o, c, d, h, m, g;
|
|
28756
|
-
le(this, dn, t), le(this, yr, []), le(this, Je, new Td()), le(this, ir, true), le(this, hs, false), le(this,
|
|
28768
|
+
le(this, dn, t), le(this, yr, []), le(this, Je, new Td()), le(this, ir, true), le(this, hs, false), le(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), le(this, Wr, {
|
|
28757
28769
|
code: void 0,
|
|
28758
28770
|
reason: void 0
|
|
28759
|
-
}), le(this, Ue, (q = D(this,
|
|
28771
|
+
}), le(this, Ue, (q = D(this, Re).logger) != null ? q : new aD(D(this, Re).debug ? "debug" : "info")), le(this, Vs, new nD());
|
|
28760
28772
|
}
|
|
28761
28773
|
get readyState() {
|
|
28762
28774
|
var t;
|
|
28763
|
-
return (t = D(this,
|
|
28775
|
+
return (t = D(this, De)) == null ? void 0 : t.readyState;
|
|
28764
28776
|
}
|
|
28765
28777
|
get url() {
|
|
28766
28778
|
return D(this, dn);
|
|
28767
28779
|
}
|
|
28768
28780
|
updateURL(t) {
|
|
28769
|
-
le(this, dn, t),
|
|
28781
|
+
le(this, dn, t), we(this, ju, cv).call(this);
|
|
28770
28782
|
}
|
|
28771
28783
|
get config() {
|
|
28772
|
-
return D(this,
|
|
28784
|
+
return D(this, Re);
|
|
28773
28785
|
}
|
|
28774
28786
|
get sendQueue() {
|
|
28775
28787
|
return D(this, yr);
|
|
28776
28788
|
}
|
|
28777
28789
|
flush() {
|
|
28778
|
-
if (!D(this,
|
|
28790
|
+
if (!D(this, Re).queueOnDisconnect)
|
|
28779
28791
|
return false;
|
|
28780
28792
|
const t = [];
|
|
28781
28793
|
return D(this, yr).forEach((e) => {
|
|
@@ -28793,50 +28805,50 @@ class dD {
|
|
|
28793
28805
|
}
|
|
28794
28806
|
if (D(this, ir) !== false)
|
|
28795
28807
|
return new Promise((e, r) => {
|
|
28796
|
-
|
|
28808
|
+
we(this, Sn, vo).call(this), we(this, To, _d).call(this);
|
|
28797
28809
|
try {
|
|
28798
|
-
le(this,
|
|
28810
|
+
le(this, De, new WebSocket(we(this, Fu, av).call(this, D(this, dn)))), D(this, De).binaryType = "arraybuffer", D(this, Ue).debug("Connecting");
|
|
28799
28811
|
const i = setTimeout(() => {
|
|
28800
|
-
D(this, Ue).debug("Connection timeout. Closing socket"), le(this, ir, true),
|
|
28812
|
+
D(this, Ue).debug("Connection timeout. Closing socket"), le(this, ir, true), we(this, To, _d).call(this), D(this, De).close(3001, "Connection Timeout"), D(this, Re).autoReconnect && !D(this, hs) && (D(this, Je).emit(
|
|
28801
28813
|
"reconnecting"
|
|
28802
|
-
),
|
|
28803
|
-
}, D(this,
|
|
28804
|
-
D(this,
|
|
28805
|
-
D(this, Ue).debug(`Ready State: ${nv[D(this,
|
|
28814
|
+
), we(this, go, ed).call(this)), r(new Error("Connection timed out!"));
|
|
28815
|
+
}, D(this, Re).connectionTimeout);
|
|
28816
|
+
D(this, De).onopen = () => {
|
|
28817
|
+
D(this, Ue).debug(`Ready State: ${nv[D(this, De).readyState]}`), i && clearTimeout(i), we(this, Ed, Gu).call(this), le(this, Wr, {
|
|
28806
28818
|
code: void 0,
|
|
28807
28819
|
reason: void 0
|
|
28808
28820
|
}), D(this, Je).emit(
|
|
28809
28821
|
"connected"
|
|
28810
|
-
), D(this,
|
|
28811
|
-
}, D(this,
|
|
28822
|
+
), D(this, Re).flushOnReconnect && this.flush(), e();
|
|
28823
|
+
}, D(this, De).onclose = (n) => {
|
|
28812
28824
|
try {
|
|
28813
28825
|
i && clearTimeout(i);
|
|
28814
28826
|
const { code: o, reason: c } = n;
|
|
28815
|
-
r(c), D(this, Ue).debug("Socket closed. Close event:", { event: n }), D(this, Ue).debug(`Connection closed code: ${o}`), D(this, Ue).debug(`Connection closed reason: ${c}`), D(this, hs) ||
|
|
28827
|
+
r(c), D(this, Ue).debug("Socket closed. Close event:", { event: n }), D(this, Ue).debug(`Connection closed code: ${o}`), D(this, Ue).debug(`Connection closed reason: ${c}`), D(this, hs) || we(this, yd, qu).call(this, o, c);
|
|
28816
28828
|
} catch (o) {
|
|
28817
|
-
|
|
28829
|
+
we(this, uo, Zc).call(this, o);
|
|
28818
28830
|
}
|
|
28819
|
-
}, D(this,
|
|
28820
|
-
|
|
28821
|
-
}, D(this,
|
|
28831
|
+
}, D(this, De).onerror = (n) => {
|
|
28832
|
+
we(this, uo, Zc).call(this, n);
|
|
28833
|
+
}, D(this, De).onmessage = (n) => we(this, Bu, ov).call(this, n);
|
|
28822
28834
|
} catch (i) {
|
|
28823
|
-
|
|
28835
|
+
we(this, uo, Zc).call(this, i, r);
|
|
28824
28836
|
}
|
|
28825
28837
|
});
|
|
28826
28838
|
});
|
|
28827
28839
|
}
|
|
28828
28840
|
send(t, e, r, i) {
|
|
28829
28841
|
const n = { event: t, id: e, payload: r, metadata: i };
|
|
28830
|
-
if (D(this,
|
|
28842
|
+
if (D(this, Re).queueOnDisconnect && (!D(this, De) || D(this, De).readyState !== 1))
|
|
28831
28843
|
return D(this, Ue).debug("Queuing message since socket is not connected!", n), D(this, yr).push(n), false;
|
|
28832
28844
|
const o = iv.encode(n);
|
|
28833
|
-
return
|
|
28845
|
+
return we(this, fo, Sd).call(this, o);
|
|
28834
28846
|
}
|
|
28835
28847
|
emit(t, e, r, i) {
|
|
28836
28848
|
return this.send(t, e, r, i);
|
|
28837
28849
|
}
|
|
28838
28850
|
sendRaw(t) {
|
|
28839
|
-
return
|
|
28851
|
+
return we(this, fo, Sd).call(this, t);
|
|
28840
28852
|
}
|
|
28841
28853
|
receive(t, e) {
|
|
28842
28854
|
return D(this, Je).on(t.toString(), e);
|
|
@@ -28866,13 +28878,13 @@ class dD {
|
|
|
28866
28878
|
);
|
|
28867
28879
|
}
|
|
28868
28880
|
disconnect() {
|
|
28869
|
-
le(this, ir, false),
|
|
28881
|
+
le(this, ir, false), we(this, Sn, vo).call(this), this.removeAllListeners(), le(this, Wr, {
|
|
28870
28882
|
code: 1e3,
|
|
28871
28883
|
reason: "Sockrates disconnect method called"
|
|
28872
|
-
}), D(this,
|
|
28884
|
+
}), D(this, De).close(1e3, "Sockrates disconnect method called.");
|
|
28873
28885
|
}
|
|
28874
28886
|
}
|
|
28875
|
-
|
|
28887
|
+
De = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), ln = /* @__PURE__ */ new WeakMap(), Vs = /* @__PURE__ */ new WeakMap(), Fu = /* @__PURE__ */ new WeakSet(), av = function(s) {
|
|
28876
28888
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
28877
28889
|
return s;
|
|
28878
28890
|
if (s.startsWith("https://"))
|
|
@@ -28883,38 +28895,38 @@ Me = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), Ce = /*
|
|
|
28883
28895
|
}, uo = /* @__PURE__ */ new WeakSet(), Zc = function(s, t) {
|
|
28884
28896
|
D(this, Ue).error("Error:", { error: s }), D(this, Je).emit("errored", { error: s }), t == null || t(s);
|
|
28885
28897
|
}, Bu = /* @__PURE__ */ new WeakSet(), ov = function(s) {
|
|
28886
|
-
if (
|
|
28887
|
-
D(this, Ue).debug("Received ping from server"),
|
|
28898
|
+
if (we(this, Ed, Gu).call(this), s.data === oD) {
|
|
28899
|
+
D(this, Ue).debug("Received ping from server"), we(this, fo, Sd).call(this, cD);
|
|
28888
28900
|
return;
|
|
28889
28901
|
}
|
|
28890
28902
|
const t = iv.decode(s.data), { id: e, payload: r } = t;
|
|
28891
28903
|
D(this, Ue).debug("Received message", { event: t.event, messageID: e }), D(this, Je).emit(t.event.toString(), { id: e, payload: r });
|
|
28892
28904
|
}, Hu = /* @__PURE__ */ new WeakSet(), Qp = function() {
|
|
28893
|
-
return D(this,
|
|
28905
|
+
return D(this, De).readyState === 1;
|
|
28894
28906
|
}, yd = /* @__PURE__ */ new WeakSet(), qu = function(s, t) {
|
|
28895
28907
|
le(this, Wr, { reason: t, code: s }), D(this, Je).emit("disconnected", { code: s, reason: t });
|
|
28896
28908
|
}, ju = /* @__PURE__ */ new WeakSet(), cv = function() {
|
|
28897
28909
|
const { reason: s, code: t } = D(this, Wr);
|
|
28898
|
-
t && t !== 1e3 && D(this, ir) && D(this,
|
|
28910
|
+
t && t !== 1e3 && D(this, ir) && D(this, Re).autoReconnect && !D(this, hs) && (D(this, Ue).debug(`Triggering reconnection due to ${s}.`), D(this, Je).emit(
|
|
28899
28911
|
"reconnecting"
|
|
28900
|
-
),
|
|
28912
|
+
), we(this, go, ed).call(this));
|
|
28901
28913
|
}, go = /* @__PURE__ */ new WeakSet(), ed = function(s = true) {
|
|
28902
28914
|
return l(this, null, function* () {
|
|
28903
28915
|
if (s && D(this, hs)) {
|
|
28904
28916
|
D(this, Ue).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
28905
28917
|
return;
|
|
28906
28918
|
}
|
|
28907
|
-
if (D(this, hs) || D(this, Vs).reset(), D(this,
|
|
28919
|
+
if (D(this, hs) || D(this, Vs).reset(), D(this, Re).maxReconnectionAttempts !== null && D(this, Vs).getAttempts() >= D(this, Re).maxReconnectionAttempts) {
|
|
28908
28920
|
D(this, Je).emit(
|
|
28909
28921
|
"failed"
|
|
28910
28922
|
), le(this, hs, false);
|
|
28911
28923
|
return;
|
|
28912
28924
|
}
|
|
28913
|
-
le(this, hs, true),
|
|
28925
|
+
le(this, hs, true), we(this, To, _d).call(this), we(this, Sn, vo).call(this);
|
|
28914
28926
|
try {
|
|
28915
28927
|
if (yield D(this, Vs).wait(), D(this, ir) === false)
|
|
28916
28928
|
return;
|
|
28917
|
-
if (D(this, Ue).debug(`Reconnection attempt ${D(this, Vs).getAttempts()}`), D(this, Je).emit("reconnectAttempt", { attempt: D(this, Vs).getAttempts() }), yield this.connect(), !
|
|
28929
|
+
if (D(this, Ue).debug(`Reconnection attempt ${D(this, Vs).getAttempts()}`), D(this, Je).emit("reconnectAttempt", { attempt: D(this, Vs).getAttempts() }), yield this.connect(), !we(this, Hu, Qp).call(this))
|
|
28918
28930
|
throw Error("Reconnect Failed");
|
|
28919
28931
|
le(this, hs, false), le(this, Wr, {
|
|
28920
28932
|
code: void 0,
|
|
@@ -28923,26 +28935,26 @@ Me = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), Ce = /*
|
|
|
28923
28935
|
"reconnected"
|
|
28924
28936
|
);
|
|
28925
28937
|
} catch (t) {
|
|
28926
|
-
D(this, Ue).debug("Failed to reconnect."), D(this, Je).emit("reconnectFailure", { attempt: D(this, Vs).getAttempts() }),
|
|
28938
|
+
D(this, Ue).debug("Failed to reconnect."), D(this, Je).emit("reconnectFailure", { attempt: D(this, Vs).getAttempts() }), we(this, go, ed).call(this, false);
|
|
28927
28939
|
}
|
|
28928
28940
|
});
|
|
28929
28941
|
}, fo = /* @__PURE__ */ new WeakSet(), Sd = function(s) {
|
|
28930
28942
|
try {
|
|
28931
|
-
return D(this,
|
|
28943
|
+
return D(this, De).send(s), true;
|
|
28932
28944
|
} catch (t) {
|
|
28933
28945
|
return D(this, Ue).error(t.message), false;
|
|
28934
28946
|
}
|
|
28935
28947
|
}, Ed = /* @__PURE__ */ new WeakSet(), Gu = function() {
|
|
28936
|
-
this.config.disconnectOnPingTimeout && (D(this, Ue).debug("Resetting ping timeout"),
|
|
28948
|
+
this.config.disconnectOnPingTimeout && (D(this, Ue).debug("Resetting ping timeout"), we(this, Sn, vo).call(this), le(this, ln, setTimeout(() => {
|
|
28937
28949
|
var s;
|
|
28938
28950
|
D(this, Ue).debug("Disconnecting the socket due to ping timeout"), le(this, ir, true);
|
|
28939
28951
|
const t = 3002, e = "Ping timeout";
|
|
28940
|
-
(s = D(this,
|
|
28941
|
-
}, D(this,
|
|
28952
|
+
(s = D(this, De)) == null || s.close(t, e), we(this, yd, qu).call(this, t, e);
|
|
28953
|
+
}, D(this, Re).pingTimeout)));
|
|
28942
28954
|
}, Sn = /* @__PURE__ */ new WeakSet(), vo = function() {
|
|
28943
28955
|
D(this, ln) && (clearTimeout(D(this, ln)), le(this, ln, void 0));
|
|
28944
28956
|
}, To = /* @__PURE__ */ new WeakSet(), _d = function() {
|
|
28945
|
-
D(this,
|
|
28957
|
+
D(this, De) && (D(this, De).onopen = void 0, D(this, De).onerror = void 0, D(this, De).onmessage = void 0, D(this, De).onclose = void 0);
|
|
28946
28958
|
};
|
|
28947
28959
|
var lD = Object.defineProperty, uD = Object.getOwnPropertyDescriptor, Al = (s, t, e, r) => {
|
|
28948
28960
|
for (var i = r > 1 ? void 0 : r ? uD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
@@ -28950,7 +28962,7 @@ var lD = Object.defineProperty, uD = Object.getOwnPropertyDescriptor, Al = (s, t
|
|
|
28950
28962
|
return r && i && lD(t, e, i), i;
|
|
28951
28963
|
};
|
|
28952
28964
|
const Xp = 65535, hD = 3e3;
|
|
28953
|
-
var jr,
|
|
28965
|
+
var jr, be, ke, Ne, Yt, sr, hc, Wu, pc, Ju, vm;
|
|
28954
28966
|
const dv = (vm = class {
|
|
28955
28967
|
constructor(s, {
|
|
28956
28968
|
peerId: t,
|
|
@@ -28958,11 +28970,11 @@ const dv = (vm = class {
|
|
|
28958
28970
|
authToken: r,
|
|
28959
28971
|
capabilities: i
|
|
28960
28972
|
}) {
|
|
28961
|
-
f(this,
|
|
28973
|
+
f(this, ke);
|
|
28962
28974
|
f(this, hc);
|
|
28963
28975
|
f(this, pc);
|
|
28964
28976
|
f(this, jr, void 0);
|
|
28965
|
-
f(this,
|
|
28977
|
+
f(this, be, void 0);
|
|
28966
28978
|
p(this, "roomName");
|
|
28967
28979
|
p(this, "authToken");
|
|
28968
28980
|
p(this, "capabilities");
|
|
@@ -28971,7 +28983,7 @@ const dv = (vm = class {
|
|
|
28971
28983
|
var n;
|
|
28972
28984
|
if (!t || !e || !r)
|
|
28973
28985
|
throw new w("peerId, meetingId, or authToken can not be empty", "0404");
|
|
28974
|
-
v(this, Yt, void 0), v(this, sr, s), this.capabilities = i, this.roomName = e, this.authToken = r, v(this, jr, $(this, hc, Wu).call(this, t)), v(this,
|
|
28986
|
+
v(this, Yt, void 0), v(this, sr, s), this.capabilities = i, this.roomName = e, this.authToken = r, v(this, jr, $(this, hc, Wu).call(this, t)), v(this, be, new dD(a(this, jr), {
|
|
28975
28987
|
autoReconnect: true,
|
|
28976
28988
|
disconnectOnPingTimeout: (n = i.includes("PING")) != null ? n : false,
|
|
28977
28989
|
queueOnDisconnect: true,
|
|
@@ -28980,16 +28992,16 @@ const dv = (vm = class {
|
|
|
28980
28992
|
})), this.handleSocketConnectionEvents();
|
|
28981
28993
|
}
|
|
28982
28994
|
get joinAttempted() {
|
|
28983
|
-
return a(this,
|
|
28995
|
+
return a(this, ke, Ne).socketJoinAttempted;
|
|
28984
28996
|
}
|
|
28985
28997
|
set joinAttempted(s) {
|
|
28986
|
-
a(this,
|
|
28998
|
+
a(this, ke, Ne).socketJoinAttempted = s;
|
|
28987
28999
|
}
|
|
28988
29000
|
get peerId() {
|
|
28989
29001
|
return a(this, sr).getValue("peerId");
|
|
28990
29002
|
}
|
|
28991
29003
|
updateURL(s) {
|
|
28992
|
-
s !== this.peerId && (v(this, jr, $(this, hc, Wu).call(this, s)), u.debug("SocketService:: Connection URL updated.")), a(this,
|
|
29004
|
+
s !== this.peerId && (v(this, jr, $(this, hc, Wu).call(this, s)), u.debug("SocketService:: Connection URL updated.")), a(this, be).updateURL(a(this, jr));
|
|
28993
29005
|
}
|
|
28994
29006
|
static getSocketEdgeDomain(s) {
|
|
28995
29007
|
return Tn({ servicePrefix: "socket-edge", baseURI: s });
|
|
@@ -28999,7 +29011,7 @@ const dv = (vm = class {
|
|
|
28999
29011
|
}
|
|
29000
29012
|
connect() {
|
|
29001
29013
|
return l(this, null, function* () {
|
|
29002
|
-
a(this,
|
|
29014
|
+
a(this, ke, Ne).socketJoinAttempted = true, yield a(this, be).connect(), a(this, ke, Ne).socketJoinAttempted = true, a(this, ke, Ne).socketState = {
|
|
29003
29015
|
state: "connected",
|
|
29004
29016
|
reconnected: false,
|
|
29005
29017
|
reconnectionAttempt: void 0
|
|
@@ -29008,7 +29020,7 @@ const dv = (vm = class {
|
|
|
29008
29020
|
}
|
|
29009
29021
|
disconnect() {
|
|
29010
29022
|
return l(this, null, function* () {
|
|
29011
|
-
a(this,
|
|
29023
|
+
a(this, ke, Ne).socketJoinAttempted = false, a(this, be).disconnect(), a(this, ke, Ne).socketJoinAttempted = true, a(this, ke, Ne).socketState = {
|
|
29012
29024
|
state: "disconnected",
|
|
29013
29025
|
reconnected: false,
|
|
29014
29026
|
reconnectionAttempt: void 0
|
|
@@ -29017,14 +29029,14 @@ const dv = (vm = class {
|
|
|
29017
29029
|
}
|
|
29018
29030
|
get isConnected() {
|
|
29019
29031
|
try {
|
|
29020
|
-
return a(this,
|
|
29032
|
+
return a(this, be).readyState === 1;
|
|
29021
29033
|
} catch (s) {
|
|
29022
29034
|
return false;
|
|
29023
29035
|
}
|
|
29024
29036
|
}
|
|
29025
29037
|
sendMessage(s, t, e) {
|
|
29026
29038
|
const r = {};
|
|
29027
|
-
return y.injectContext(r), a(this,
|
|
29039
|
+
return y.injectContext(r), a(this, be).send(
|
|
29028
29040
|
s,
|
|
29029
29041
|
e != null ? e : $(this, pc, Ju).call(this),
|
|
29030
29042
|
t,
|
|
@@ -29052,10 +29064,10 @@ const dv = (vm = class {
|
|
|
29052
29064
|
return new Promise(
|
|
29053
29065
|
(o, c) => {
|
|
29054
29066
|
const d = (_, P) => {
|
|
29055
|
-
a(this,
|
|
29067
|
+
a(this, be).removeListener(n, _), a(this, be).removeListener(Xp, P), a(this, be).removeListener(
|
|
29056
29068
|
Xt.errorResponse,
|
|
29057
29069
|
P
|
|
29058
|
-
), a(this,
|
|
29070
|
+
), a(this, be).removeListener(
|
|
29059
29071
|
ps.errorResponse,
|
|
29060
29072
|
P
|
|
29061
29073
|
);
|
|
@@ -29087,9 +29099,9 @@ const dv = (vm = class {
|
|
|
29087
29099
|
}) => {
|
|
29088
29100
|
h === _ && (o({ id: _, payload: P }), d(T, g));
|
|
29089
29101
|
};
|
|
29090
|
-
a(this,
|
|
29102
|
+
a(this, be).on(n, T), a(this, be).on(Xp, g), a(this, be).on(Xt.errorResponse, g), a(this, be).on(ps.errorResponse, g), setTimeout(() => {
|
|
29091
29103
|
d(T, g), c(new Error(`request timeout for callback eventId:${s}`));
|
|
29092
|
-
}, t), a(this,
|
|
29104
|
+
}, t), a(this, be).send(
|
|
29093
29105
|
s,
|
|
29094
29106
|
h,
|
|
29095
29107
|
e,
|
|
@@ -29099,61 +29111,61 @@ const dv = (vm = class {
|
|
|
29099
29111
|
);
|
|
29100
29112
|
}
|
|
29101
29113
|
on(s, t) {
|
|
29102
|
-
a(this,
|
|
29114
|
+
a(this, be).on(s, t);
|
|
29103
29115
|
}
|
|
29104
29116
|
onStateEvent(s, t) {
|
|
29105
|
-
a(this,
|
|
29117
|
+
a(this, be).on(s, t);
|
|
29106
29118
|
}
|
|
29107
29119
|
removeListener(s, t) {
|
|
29108
|
-
a(this,
|
|
29120
|
+
a(this, be).removeListener(s, t);
|
|
29109
29121
|
}
|
|
29110
29122
|
removeListeners(s) {
|
|
29111
|
-
a(this,
|
|
29123
|
+
a(this, be).removeListeners(s);
|
|
29112
29124
|
}
|
|
29113
29125
|
flush() {
|
|
29114
|
-
return a(this,
|
|
29126
|
+
return a(this, be).flush();
|
|
29115
29127
|
}
|
|
29116
29128
|
handleSocketConnectionEvents() {
|
|
29117
29129
|
this.onStateEvent("connected", () => l(this, null, function* () {
|
|
29118
|
-
u.info("SocketService::Connected to socket-edge"), a(this, Yt) && (clearTimeout(a(this, Yt)), v(this, Yt, void 0)), a(this,
|
|
29130
|
+
u.info("SocketService::Connected to socket-edge"), a(this, Yt) && (clearTimeout(a(this, Yt)), v(this, Yt, void 0)), a(this, ke, Ne).updateSocketConnectionState("connected");
|
|
29119
29131
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
29120
29132
|
var i;
|
|
29121
29133
|
u.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: y.location.country });
|
|
29122
|
-
const { recv: e, send: r } = (i = a(this,
|
|
29134
|
+
const { recv: e, send: r } = (i = a(this, ke, Ne).mediaState) != null ? i : {};
|
|
29123
29135
|
e != null && e.state && (e == null ? void 0 : e.state) !== zr.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== zr.CONNECTED ? I.emit(
|
|
29124
29136
|
A.SOCKET_SERVICE_DISCONNECTED,
|
|
29125
29137
|
{
|
|
29126
|
-
joinAttempted: a(this,
|
|
29138
|
+
joinAttempted: a(this, ke, Ne).joinAttempted
|
|
29127
29139
|
}
|
|
29128
29140
|
) : v(this, Yt, setTimeout(() => {
|
|
29129
29141
|
I.emit(
|
|
29130
29142
|
A.SOCKET_SERVICE_DISCONNECTED,
|
|
29131
|
-
{ joinAttempted: a(this,
|
|
29143
|
+
{ joinAttempted: a(this, ke, Ne).joinAttempted }
|
|
29132
29144
|
), v(this, Yt, void 0);
|
|
29133
|
-
}, hD)), a(this,
|
|
29145
|
+
}, hD)), a(this, ke, Ne).updateSocketConnectionState("disconnected");
|
|
29134
29146
|
}), this.onStateEvent("reconnecting", () => l(this, null, function* () {
|
|
29135
|
-
u.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this,
|
|
29147
|
+
u.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke, Ne).updateSocketConnectionState("reconnecting");
|
|
29136
29148
|
})), this.onStateEvent("reconnectAttempt", (t) => l(this, [t], function* ({ attempt: s }) {
|
|
29137
29149
|
u.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
29138
29150
|
socket: {
|
|
29139
29151
|
retryAttempt: s
|
|
29140
29152
|
}
|
|
29141
|
-
}), a(this,
|
|
29153
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnectAttempt", s);
|
|
29142
29154
|
})), this.onStateEvent("reconnectFailure", ({ attempt: s }) => {
|
|
29143
29155
|
u.info("SocketService::Reconnect attempt to socket-edge failed", {
|
|
29144
29156
|
socket: {
|
|
29145
29157
|
retryAttempt: s
|
|
29146
29158
|
}
|
|
29147
|
-
}), a(this,
|
|
29159
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnectFailure", s);
|
|
29148
29160
|
}), this.onStateEvent("reconnected", () => l(this, null, function* () {
|
|
29149
|
-
u.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this,
|
|
29150
|
-
wasJoinAttempted: a(this,
|
|
29151
|
-
}), a(this,
|
|
29161
|
+
u.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: a(this, ke, Ne).mediaJoinAttempted } }), a(this, Yt) && (clearTimeout(a(this, Yt)), v(this, Yt, void 0)), I.emit(A.SOCKET_SERVICE_RECONNECTED, {
|
|
29162
|
+
wasJoinAttempted: a(this, ke, Ne).mediaJoinAttempted
|
|
29163
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnected");
|
|
29152
29164
|
})), this.onStateEvent("failed", () => l(this, null, function* () {
|
|
29153
|
-
u.info("SocketService::Failed to connect to socket-edge", { country: y.location.country }), I.emit(A.SOCKET_SERVICE_FAILED), a(this,
|
|
29165
|
+
u.info("SocketService::Failed to connect to socket-edge", { country: y.location.country }), I.emit(A.SOCKET_SERVICE_FAILED), a(this, ke, Ne).updateSocketConnectionState("failed");
|
|
29154
29166
|
}));
|
|
29155
29167
|
}
|
|
29156
|
-
}, jr = /* @__PURE__ */ new WeakMap(),
|
|
29168
|
+
}, jr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(), Ne = function() {
|
|
29157
29169
|
return a(this, sr).getValue("connectionHandler");
|
|
29158
29170
|
}, Yt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakSet(), Wu = function(s) {
|
|
29159
29171
|
let t = dv.getSocketEdgeDomain(a(this, sr).getValue("baseURI"));
|
|
@@ -29281,8 +29293,8 @@ const Er = class {
|
|
|
29281
29293
|
});
|
|
29282
29294
|
}
|
|
29283
29295
|
};
|
|
29284
|
-
let
|
|
29285
|
-
p(
|
|
29296
|
+
let _e = Er;
|
|
29297
|
+
p(_e, "socketService"), p(_e, "currentMeetingId");
|
|
29286
29298
|
var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Ml = (s, t, e, r) => {
|
|
29287
29299
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
29288
29300
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -29315,7 +29327,7 @@ const un = class {
|
|
|
29315
29327
|
organizationId: n,
|
|
29316
29328
|
cachedUserDetails: o
|
|
29317
29329
|
} = s.getAllValues();
|
|
29318
|
-
if (I.reset(), md.cleanup(), Kf(s),
|
|
29330
|
+
if (I.reset(), md.cleanup(), Kf(s), Pe.isSupported() === false)
|
|
29319
29331
|
throw new w("Browser not supported", "0010", true);
|
|
29320
29332
|
const c = EA(
|
|
29321
29333
|
s,
|
|
@@ -29387,7 +29399,7 @@ const un = class {
|
|
|
29387
29399
|
presetName: s.getValue("presetName"),
|
|
29388
29400
|
meetingHash: o,
|
|
29389
29401
|
roomName: i
|
|
29390
|
-
},
|
|
29402
|
+
}, Pe.getDeviceInfo()), {
|
|
29391
29403
|
isReactNative: navigator.isReactNative
|
|
29392
29404
|
});
|
|
29393
29405
|
try {
|
|
@@ -29426,10 +29438,10 @@ const un = class {
|
|
|
29426
29438
|
g,
|
|
29427
29439
|
c.permissions
|
|
29428
29440
|
);
|
|
29429
|
-
t.setValue("maxPreferredStreams",
|
|
29441
|
+
t.setValue("maxPreferredStreams", Pe.isMobile() ? n.maxVideoStreams.mobile : n.maxVideoStreams.desktop);
|
|
29430
29442
|
let P, b, R, L, H, B, F, q;
|
|
29431
29443
|
const ie = new H0(s);
|
|
29432
|
-
|
|
29444
|
+
_e.socketService = s;
|
|
29433
29445
|
const pe = new kl(s), Qe = new Zt(s), Es = new G0(s), ts = md.create(s, t), pr = new W0(s), M = new B0(s), E = new Wi(s), C = yield ti.init(
|
|
29434
29446
|
t,
|
|
29435
29447
|
ts,
|
|
@@ -29495,7 +29507,7 @@ const un = class {
|
|
|
29495
29507
|
t.setValue("pip", Ns);
|
|
29496
29508
|
}
|
|
29497
29509
|
}
|
|
29498
|
-
const
|
|
29510
|
+
const Oe = {
|
|
29499
29511
|
storesManager: new KM(t, pr),
|
|
29500
29512
|
pollController: P,
|
|
29501
29513
|
selfController: C,
|
|
@@ -29511,7 +29523,7 @@ const un = class {
|
|
|
29511
29523
|
return {
|
|
29512
29524
|
theme: n,
|
|
29513
29525
|
permissions: _,
|
|
29514
|
-
controllers:
|
|
29526
|
+
controllers: Oe
|
|
29515
29527
|
};
|
|
29516
29528
|
});
|
|
29517
29529
|
}
|
|
@@ -29573,7 +29585,7 @@ class lv extends xt {
|
|
|
29573
29585
|
return this.meetings.length !== 0;
|
|
29574
29586
|
}
|
|
29575
29587
|
get currentMeetingId() {
|
|
29576
|
-
return
|
|
29588
|
+
return _e.currentMeetingId;
|
|
29577
29589
|
}
|
|
29578
29590
|
validateConnectedMeetingsAction() {
|
|
29579
29591
|
if (!this.supportsConnectedMeetings)
|
|
@@ -29582,12 +29594,12 @@ class lv extends xt {
|
|
|
29582
29594
|
}
|
|
29583
29595
|
getConnectedMeetings() {
|
|
29584
29596
|
return l(this, null, function* () {
|
|
29585
|
-
return this.validateConnectedMeetingsAction(), yield
|
|
29597
|
+
return this.validateConnectedMeetingsAction(), yield _e.getConnectedRoomsDump();
|
|
29586
29598
|
});
|
|
29587
29599
|
}
|
|
29588
29600
|
createMeetings(e) {
|
|
29589
29601
|
return l(this, null, function* () {
|
|
29590
|
-
return this.validateConnectedMeetingsAction(), (yield
|
|
29602
|
+
return this.validateConnectedMeetingsAction(), (yield _e.createConnectedRooms(
|
|
29591
29603
|
e
|
|
29592
29604
|
)).map((i) => ({
|
|
29593
29605
|
id: i.id,
|
|
@@ -29597,7 +29609,7 @@ class lv extends xt {
|
|
|
29597
29609
|
}
|
|
29598
29610
|
updateMeetings(e) {
|
|
29599
29611
|
return l(this, null, function* () {
|
|
29600
|
-
this.validateConnectedMeetingsAction(), yield
|
|
29612
|
+
this.validateConnectedMeetingsAction(), yield _e.updateConnectedRooms(
|
|
29601
29613
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
29602
29614
|
);
|
|
29603
29615
|
});
|
|
@@ -29610,7 +29622,7 @@ class lv extends xt {
|
|
|
29610
29622
|
this.parentMeeting.id,
|
|
29611
29623
|
n.participants.map((o) => o.id)
|
|
29612
29624
|
) : Promise.resolve());
|
|
29613
|
-
return yield Promise.all(r), yield
|
|
29625
|
+
return yield Promise.all(r), yield _e.disableConnectedRooms(
|
|
29614
29626
|
e
|
|
29615
29627
|
);
|
|
29616
29628
|
});
|
|
@@ -29618,7 +29630,7 @@ class lv extends xt {
|
|
|
29618
29630
|
moveParticipants(e, r, i) {
|
|
29619
29631
|
return l(this, null, function* () {
|
|
29620
29632
|
this.validateConnectedMeetingsAction();
|
|
29621
|
-
const n = yield
|
|
29633
|
+
const n = yield _e.movePeersBetweenRooms(
|
|
29622
29634
|
{
|
|
29623
29635
|
sourceMeetingId: e,
|
|
29624
29636
|
destinationMeetingId: r,
|
|
@@ -29633,7 +29645,7 @@ class lv extends xt {
|
|
|
29633
29645
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
29634
29646
|
return l(this, null, function* () {
|
|
29635
29647
|
this.validateConnectedMeetingsAction();
|
|
29636
|
-
const n = yield
|
|
29648
|
+
const n = yield _e.movePeersBetweenRooms(
|
|
29637
29649
|
{
|
|
29638
29650
|
sourceMeetingId: e,
|
|
29639
29651
|
destinationMeetingId: r,
|
|
@@ -29701,31 +29713,31 @@ const Sr = (Ql = class {
|
|
|
29701
29713
|
)), Sr.instance;
|
|
29702
29714
|
}
|
|
29703
29715
|
setCurrentMeeting(s) {
|
|
29704
|
-
v(this, Qt, s),
|
|
29716
|
+
v(this, Qt, s), _e.currentMeetingId = s.meta.meetingId;
|
|
29705
29717
|
}
|
|
29706
29718
|
getConnectedMeetings() {
|
|
29707
29719
|
this.connectedMeetings.getConnectedMeetings();
|
|
29708
29720
|
}
|
|
29709
29721
|
setupEvents() {
|
|
29710
|
-
|
|
29722
|
+
_e.socketService && (_e.socketService.on(
|
|
29711
29723
|
x.getConnectedRoomsDump,
|
|
29712
29724
|
this.handleConnectedRoomsDump.bind(this)
|
|
29713
|
-
),
|
|
29725
|
+
), _e.socketService.on(
|
|
29714
29726
|
x.transferPeer,
|
|
29715
29727
|
this.handleTransferPeer.bind(this)
|
|
29716
|
-
),
|
|
29728
|
+
), _e.socketService.on(
|
|
29717
29729
|
x.movedPeer,
|
|
29718
29730
|
this.handleMovedPeer.bind(this)
|
|
29719
|
-
),
|
|
29731
|
+
), _e.socketService.on(
|
|
29720
29732
|
x.connectedRoomsUpdated,
|
|
29721
29733
|
this.handleConnectedRoomsUpdated.bind(this)
|
|
29722
|
-
),
|
|
29734
|
+
), _e.socketService.on(
|
|
29723
29735
|
x.connectedRoomsDeleted,
|
|
29724
29736
|
this.handleConnectedRoomsDeleted.bind(this)
|
|
29725
29737
|
));
|
|
29726
29738
|
}
|
|
29727
29739
|
handleTransferPeer(s) {
|
|
29728
|
-
const t =
|
|
29740
|
+
const t = _e.handleTransferPeerRaw(s);
|
|
29729
29741
|
return this.switchMeeting(t);
|
|
29730
29742
|
}
|
|
29731
29743
|
switchMeeting(e) {
|
|
@@ -29747,7 +29759,7 @@ const Sr = (Ql = class {
|
|
|
29747
29759
|
} catch (h) {
|
|
29748
29760
|
u.error(`ConnectedMeetingsController:: switchMeeting:: issues in leaving previous meeting. Meeting Id: ${(o = (n = a(this, Qt)) == null ? void 0 : n.meta) == null ? void 0 : o.meetingId}`, { error: h });
|
|
29749
29761
|
}
|
|
29750
|
-
|
|
29762
|
+
_e.socketService = void 0, u.info(`ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ${t}`);
|
|
29751
29763
|
const i = yield CD.init(j(O({}, a(this, Ca)), {
|
|
29752
29764
|
cachedUserDetails: null,
|
|
29753
29765
|
defaults: j(O(O({}, a(this, Ca).defaults), r), {
|
|
@@ -29766,7 +29778,7 @@ const Sr = (Ql = class {
|
|
|
29766
29778
|
});
|
|
29767
29779
|
}
|
|
29768
29780
|
handleConnectedRoomsDump(s) {
|
|
29769
|
-
const t =
|
|
29781
|
+
const t = _e.handleConnectedRoomsDumpRaw(s);
|
|
29770
29782
|
this.connectedMeetings.meetings = t.meetings.map((e) => ({
|
|
29771
29783
|
id: e.id,
|
|
29772
29784
|
title: e.title,
|
|
@@ -29778,10 +29790,10 @@ const Sr = (Ql = class {
|
|
|
29778
29790
|
}, this.emitStateUpdate();
|
|
29779
29791
|
}
|
|
29780
29792
|
handleMovedPeer(s) {
|
|
29781
|
-
return
|
|
29793
|
+
return _e.handleMovedPeerRaw(s);
|
|
29782
29794
|
}
|
|
29783
29795
|
handleConnectedRoomsUpdated(s) {
|
|
29784
|
-
const t =
|
|
29796
|
+
const t = _e.handleConnectedRoomsUpdatedRaw(s), e = /* @__PURE__ */ new Map();
|
|
29785
29797
|
this.connectedMeetings.meetings.forEach((r) => {
|
|
29786
29798
|
e.set(r.id, r);
|
|
29787
29799
|
}), t.forEach((r) => {
|
|
@@ -29789,7 +29801,7 @@ const Sr = (Ql = class {
|
|
|
29789
29801
|
}), this.connectedMeetings.meetings = Array.from(e.values()), this.emitStateUpdate();
|
|
29790
29802
|
}
|
|
29791
29803
|
handleConnectedRoomsDeleted(s) {
|
|
29792
|
-
const e =
|
|
29804
|
+
const e = _e.handleConnectedRoomsDeletedRaw(s).map((r) => r.id);
|
|
29793
29805
|
this.connectedMeetings.meetings = this.connectedMeetings.meetings.filter(
|
|
29794
29806
|
(r) => !e.includes(r.id)
|
|
29795
29807
|
), this.emitStateUpdate();
|
|
@@ -29887,7 +29899,7 @@ let Xr = (Tm = class {
|
|
|
29887
29899
|
static init(t) {
|
|
29888
29900
|
return l(this, null, function* () {
|
|
29889
29901
|
var m, g, _, P, b, R, L;
|
|
29890
|
-
GP(),
|
|
29902
|
+
GP(), Pe.init();
|
|
29891
29903
|
const e = (g = (m = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : m.peerId) != null ? g : v4();
|
|
29892
29904
|
Zp.init();
|
|
29893
29905
|
const { authToken: r, baseURI: i } = t, T = ED(r, i), { meetingId: n } = T, o = Ya(T, ["meetingId"]);
|