@cloudflare/realtimekit-react 0.5.0-staging.109 → 0.5.0-staging.111
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 +11 -11
- package/dist/index.es.js +336 -318
- 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", {
|
|
@@ -26516,8 +26528,14 @@ ha = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), Vr = /*
|
|
|
26516
26528
|
));
|
|
26517
26529
|
}
|
|
26518
26530
|
} catch (i) {
|
|
26519
|
-
if (u.error("failed to consume on transport", { error: i }), i.errorCode === "internal_error" && i.errorDescription === "Backend error") {
|
|
26520
|
-
u.error(
|
|
26531
|
+
if (u.error("failed to consume on transport", { error: i }), i.errorCode === "internal_error" && i.errorDescription === "Backend error" || i.errorCode === "invalid_session_description") {
|
|
26532
|
+
u.error(
|
|
26533
|
+
"Irrecoverable error, closing current recvTransport to create a new one",
|
|
26534
|
+
{
|
|
26535
|
+
transport: this.recvTransport,
|
|
26536
|
+
error: { code: i.errorCode, message: i.errorDescription }
|
|
26537
|
+
}
|
|
26538
|
+
);
|
|
26521
26539
|
try {
|
|
26522
26540
|
this.stopTransports({ recv: true });
|
|
26523
26541
|
} catch (n) {
|
|
@@ -26935,7 +26953,7 @@ class oe {
|
|
|
26935
26953
|
peerId: this.peerId,
|
|
26936
26954
|
roomUUID: e,
|
|
26937
26955
|
roomViewType: "groupCall",
|
|
26938
|
-
deviceInfo: j(O({},
|
|
26956
|
+
deviceInfo: j(O({}, Pe.getDeviceInfo()), {
|
|
26939
26957
|
userAgent: navigator.userAgent,
|
|
26940
26958
|
memory: navigator.deviceMemory,
|
|
26941
26959
|
cpus: navigator.hardwareConcurrency
|
|
@@ -27095,7 +27113,7 @@ class oe {
|
|
|
27095
27113
|
appData: {
|
|
27096
27114
|
screenShare: true,
|
|
27097
27115
|
e2ee: this.e2ee,
|
|
27098
|
-
supportsRemoteControl:
|
|
27116
|
+
supportsRemoteControl: Pe.isElectron()
|
|
27099
27117
|
},
|
|
27100
27118
|
stopTracks: false
|
|
27101
27119
|
}, n = () => {
|
|
@@ -27113,7 +27131,7 @@ class oe {
|
|
|
27113
27131
|
appData: {
|
|
27114
27132
|
screenShare: true,
|
|
27115
27133
|
e2ee: this.e2ee,
|
|
27116
|
-
supportsRemoteControl:
|
|
27134
|
+
supportsRemoteControl: Pe.isElectron()
|
|
27117
27135
|
},
|
|
27118
27136
|
stopTracks: false,
|
|
27119
27137
|
zeroRtpOnPause: true
|
|
@@ -27738,7 +27756,7 @@ const zf = (fm = class {
|
|
|
27738
27756
|
try {
|
|
27739
27757
|
yield J.initialize({
|
|
27740
27758
|
peerId: o,
|
|
27741
|
-
engineName:
|
|
27759
|
+
engineName: Pe.getDeviceInfo().engineName,
|
|
27742
27760
|
env: s.getValue("env"),
|
|
27743
27761
|
iceServers: yield n.getICEServers(),
|
|
27744
27762
|
apiBase: s.getValue("apiBase"),
|
|
@@ -28414,11 +28432,11 @@ Ge = /* @__PURE__ */ new WeakMap();
|
|
|
28414
28432
|
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
28433
|
if (!t.has(s))
|
|
28416
28434
|
throw TypeError("Cannot " + e);
|
|
28417
|
-
}, D = (s, t, e) => (Ch(s, t, "read from private field"), e ? e.call(s) : t.get(s)),
|
|
28435
|
+
}, D = (s, t, e) => (Ch(s, t, "read from private field"), e ? e.call(s) : t.get(s)), ye = (s, t, e) => {
|
|
28418
28436
|
if (t.has(s))
|
|
28419
28437
|
throw TypeError("Cannot add the same private member more than once");
|
|
28420
28438
|
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),
|
|
28439
|
+
}, 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
28440
|
get exports() {
|
|
28423
28441
|
return Td;
|
|
28424
28442
|
},
|
|
@@ -28697,7 +28715,7 @@ function iD(s, t) {
|
|
|
28697
28715
|
var Tr;
|
|
28698
28716
|
class nD {
|
|
28699
28717
|
constructor(t = {}) {
|
|
28700
|
-
z0(this, "opts"),
|
|
28718
|
+
z0(this, "opts"), ye(this, Tr, void 0), this.opts = {
|
|
28701
28719
|
initialTimeout: t.initialTimeout || 1e3,
|
|
28702
28720
|
maxTimeout: t.maxTimeout || 1e4,
|
|
28703
28721
|
factor: t.factor || 2
|
|
@@ -28729,7 +28747,7 @@ const gr = {
|
|
|
28729
28747
|
var ai, oi;
|
|
28730
28748
|
class aD {
|
|
28731
28749
|
constructor(t) {
|
|
28732
|
-
|
|
28750
|
+
ye(this, ai, void 0), ye(this, oi, void 0), le(this, ai, console), le(this, oi, t);
|
|
28733
28751
|
}
|
|
28734
28752
|
debug(...t) {
|
|
28735
28753
|
gr[D(this, oi)] > gr.debug || D(this, ai).debug("[Sockrates]:", ...t);
|
|
@@ -28747,35 +28765,35 @@ class aD {
|
|
|
28747
28765
|
ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap();
|
|
28748
28766
|
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
28767
|
const oD = "2", cD = "3";
|
|
28750
|
-
var
|
|
28768
|
+
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
28769
|
class dD {
|
|
28752
28770
|
constructor(t, e) {
|
|
28753
28771
|
var q;
|
|
28754
|
-
|
|
28772
|
+
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
28773
|
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,
|
|
28774
|
+
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
28775
|
code: void 0,
|
|
28758
28776
|
reason: void 0
|
|
28759
|
-
}), le(this, Ue, (q = D(this,
|
|
28777
|
+
}), le(this, Ue, (q = D(this, Re).logger) != null ? q : new aD(D(this, Re).debug ? "debug" : "info")), le(this, Vs, new nD());
|
|
28760
28778
|
}
|
|
28761
28779
|
get readyState() {
|
|
28762
28780
|
var t;
|
|
28763
|
-
return (t = D(this,
|
|
28781
|
+
return (t = D(this, De)) == null ? void 0 : t.readyState;
|
|
28764
28782
|
}
|
|
28765
28783
|
get url() {
|
|
28766
28784
|
return D(this, dn);
|
|
28767
28785
|
}
|
|
28768
28786
|
updateURL(t) {
|
|
28769
|
-
le(this, dn, t),
|
|
28787
|
+
le(this, dn, t), we(this, ju, cv).call(this);
|
|
28770
28788
|
}
|
|
28771
28789
|
get config() {
|
|
28772
|
-
return D(this,
|
|
28790
|
+
return D(this, Re);
|
|
28773
28791
|
}
|
|
28774
28792
|
get sendQueue() {
|
|
28775
28793
|
return D(this, yr);
|
|
28776
28794
|
}
|
|
28777
28795
|
flush() {
|
|
28778
|
-
if (!D(this,
|
|
28796
|
+
if (!D(this, Re).queueOnDisconnect)
|
|
28779
28797
|
return false;
|
|
28780
28798
|
const t = [];
|
|
28781
28799
|
return D(this, yr).forEach((e) => {
|
|
@@ -28793,50 +28811,50 @@ class dD {
|
|
|
28793
28811
|
}
|
|
28794
28812
|
if (D(this, ir) !== false)
|
|
28795
28813
|
return new Promise((e, r) => {
|
|
28796
|
-
|
|
28814
|
+
we(this, Sn, vo).call(this), we(this, To, _d).call(this);
|
|
28797
28815
|
try {
|
|
28798
|
-
le(this,
|
|
28816
|
+
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
28817
|
const i = setTimeout(() => {
|
|
28800
|
-
D(this, Ue).debug("Connection timeout. Closing socket"), le(this, ir, true),
|
|
28818
|
+
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
28819
|
"reconnecting"
|
|
28802
|
-
),
|
|
28803
|
-
}, D(this,
|
|
28804
|
-
D(this,
|
|
28805
|
-
D(this, Ue).debug(`Ready State: ${nv[D(this,
|
|
28820
|
+
), we(this, go, ed).call(this)), r(new Error("Connection timed out!"));
|
|
28821
|
+
}, D(this, Re).connectionTimeout);
|
|
28822
|
+
D(this, De).onopen = () => {
|
|
28823
|
+
D(this, Ue).debug(`Ready State: ${nv[D(this, De).readyState]}`), i && clearTimeout(i), we(this, Ed, Gu).call(this), le(this, Wr, {
|
|
28806
28824
|
code: void 0,
|
|
28807
28825
|
reason: void 0
|
|
28808
28826
|
}), D(this, Je).emit(
|
|
28809
28827
|
"connected"
|
|
28810
|
-
), D(this,
|
|
28811
|
-
}, D(this,
|
|
28828
|
+
), D(this, Re).flushOnReconnect && this.flush(), e();
|
|
28829
|
+
}, D(this, De).onclose = (n) => {
|
|
28812
28830
|
try {
|
|
28813
28831
|
i && clearTimeout(i);
|
|
28814
28832
|
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) ||
|
|
28833
|
+
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
28834
|
} catch (o) {
|
|
28817
|
-
|
|
28835
|
+
we(this, uo, Zc).call(this, o);
|
|
28818
28836
|
}
|
|
28819
|
-
}, D(this,
|
|
28820
|
-
|
|
28821
|
-
}, D(this,
|
|
28837
|
+
}, D(this, De).onerror = (n) => {
|
|
28838
|
+
we(this, uo, Zc).call(this, n);
|
|
28839
|
+
}, D(this, De).onmessage = (n) => we(this, Bu, ov).call(this, n);
|
|
28822
28840
|
} catch (i) {
|
|
28823
|
-
|
|
28841
|
+
we(this, uo, Zc).call(this, i, r);
|
|
28824
28842
|
}
|
|
28825
28843
|
});
|
|
28826
28844
|
});
|
|
28827
28845
|
}
|
|
28828
28846
|
send(t, e, r, i) {
|
|
28829
28847
|
const n = { event: t, id: e, payload: r, metadata: i };
|
|
28830
|
-
if (D(this,
|
|
28848
|
+
if (D(this, Re).queueOnDisconnect && (!D(this, De) || D(this, De).readyState !== 1))
|
|
28831
28849
|
return D(this, Ue).debug("Queuing message since socket is not connected!", n), D(this, yr).push(n), false;
|
|
28832
28850
|
const o = iv.encode(n);
|
|
28833
|
-
return
|
|
28851
|
+
return we(this, fo, Sd).call(this, o);
|
|
28834
28852
|
}
|
|
28835
28853
|
emit(t, e, r, i) {
|
|
28836
28854
|
return this.send(t, e, r, i);
|
|
28837
28855
|
}
|
|
28838
28856
|
sendRaw(t) {
|
|
28839
|
-
return
|
|
28857
|
+
return we(this, fo, Sd).call(this, t);
|
|
28840
28858
|
}
|
|
28841
28859
|
receive(t, e) {
|
|
28842
28860
|
return D(this, Je).on(t.toString(), e);
|
|
@@ -28866,13 +28884,13 @@ class dD {
|
|
|
28866
28884
|
);
|
|
28867
28885
|
}
|
|
28868
28886
|
disconnect() {
|
|
28869
|
-
le(this, ir, false),
|
|
28887
|
+
le(this, ir, false), we(this, Sn, vo).call(this), this.removeAllListeners(), le(this, Wr, {
|
|
28870
28888
|
code: 1e3,
|
|
28871
28889
|
reason: "Sockrates disconnect method called"
|
|
28872
|
-
}), D(this,
|
|
28890
|
+
}), D(this, De).close(1e3, "Sockrates disconnect method called.");
|
|
28873
28891
|
}
|
|
28874
28892
|
}
|
|
28875
|
-
|
|
28893
|
+
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
28894
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
28877
28895
|
return s;
|
|
28878
28896
|
if (s.startsWith("https://"))
|
|
@@ -28883,38 +28901,38 @@ Me = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), Ce = /*
|
|
|
28883
28901
|
}, uo = /* @__PURE__ */ new WeakSet(), Zc = function(s, t) {
|
|
28884
28902
|
D(this, Ue).error("Error:", { error: s }), D(this, Je).emit("errored", { error: s }), t == null || t(s);
|
|
28885
28903
|
}, Bu = /* @__PURE__ */ new WeakSet(), ov = function(s) {
|
|
28886
|
-
if (
|
|
28887
|
-
D(this, Ue).debug("Received ping from server"),
|
|
28904
|
+
if (we(this, Ed, Gu).call(this), s.data === oD) {
|
|
28905
|
+
D(this, Ue).debug("Received ping from server"), we(this, fo, Sd).call(this, cD);
|
|
28888
28906
|
return;
|
|
28889
28907
|
}
|
|
28890
28908
|
const t = iv.decode(s.data), { id: e, payload: r } = t;
|
|
28891
28909
|
D(this, Ue).debug("Received message", { event: t.event, messageID: e }), D(this, Je).emit(t.event.toString(), { id: e, payload: r });
|
|
28892
28910
|
}, Hu = /* @__PURE__ */ new WeakSet(), Qp = function() {
|
|
28893
|
-
return D(this,
|
|
28911
|
+
return D(this, De).readyState === 1;
|
|
28894
28912
|
}, yd = /* @__PURE__ */ new WeakSet(), qu = function(s, t) {
|
|
28895
28913
|
le(this, Wr, { reason: t, code: s }), D(this, Je).emit("disconnected", { code: s, reason: t });
|
|
28896
28914
|
}, ju = /* @__PURE__ */ new WeakSet(), cv = function() {
|
|
28897
28915
|
const { reason: s, code: t } = D(this, Wr);
|
|
28898
|
-
t && t !== 1e3 && D(this, ir) && D(this,
|
|
28916
|
+
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
28917
|
"reconnecting"
|
|
28900
|
-
),
|
|
28918
|
+
), we(this, go, ed).call(this));
|
|
28901
28919
|
}, go = /* @__PURE__ */ new WeakSet(), ed = function(s = true) {
|
|
28902
28920
|
return l(this, null, function* () {
|
|
28903
28921
|
if (s && D(this, hs)) {
|
|
28904
28922
|
D(this, Ue).debug("Reconnect called when already in a reconnect loop. Ignoring.");
|
|
28905
28923
|
return;
|
|
28906
28924
|
}
|
|
28907
|
-
if (D(this, hs) || D(this, Vs).reset(), D(this,
|
|
28925
|
+
if (D(this, hs) || D(this, Vs).reset(), D(this, Re).maxReconnectionAttempts !== null && D(this, Vs).getAttempts() >= D(this, Re).maxReconnectionAttempts) {
|
|
28908
28926
|
D(this, Je).emit(
|
|
28909
28927
|
"failed"
|
|
28910
28928
|
), le(this, hs, false);
|
|
28911
28929
|
return;
|
|
28912
28930
|
}
|
|
28913
|
-
le(this, hs, true),
|
|
28931
|
+
le(this, hs, true), we(this, To, _d).call(this), we(this, Sn, vo).call(this);
|
|
28914
28932
|
try {
|
|
28915
28933
|
if (yield D(this, Vs).wait(), D(this, ir) === false)
|
|
28916
28934
|
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(), !
|
|
28935
|
+
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
28936
|
throw Error("Reconnect Failed");
|
|
28919
28937
|
le(this, hs, false), le(this, Wr, {
|
|
28920
28938
|
code: void 0,
|
|
@@ -28923,26 +28941,26 @@ Me = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), Ce = /*
|
|
|
28923
28941
|
"reconnected"
|
|
28924
28942
|
);
|
|
28925
28943
|
} catch (t) {
|
|
28926
|
-
D(this, Ue).debug("Failed to reconnect."), D(this, Je).emit("reconnectFailure", { attempt: D(this, Vs).getAttempts() }),
|
|
28944
|
+
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
28945
|
}
|
|
28928
28946
|
});
|
|
28929
28947
|
}, fo = /* @__PURE__ */ new WeakSet(), Sd = function(s) {
|
|
28930
28948
|
try {
|
|
28931
|
-
return D(this,
|
|
28949
|
+
return D(this, De).send(s), true;
|
|
28932
28950
|
} catch (t) {
|
|
28933
28951
|
return D(this, Ue).error(t.message), false;
|
|
28934
28952
|
}
|
|
28935
28953
|
}, Ed = /* @__PURE__ */ new WeakSet(), Gu = function() {
|
|
28936
|
-
this.config.disconnectOnPingTimeout && (D(this, Ue).debug("Resetting ping timeout"),
|
|
28954
|
+
this.config.disconnectOnPingTimeout && (D(this, Ue).debug("Resetting ping timeout"), we(this, Sn, vo).call(this), le(this, ln, setTimeout(() => {
|
|
28937
28955
|
var s;
|
|
28938
28956
|
D(this, Ue).debug("Disconnecting the socket due to ping timeout"), le(this, ir, true);
|
|
28939
28957
|
const t = 3002, e = "Ping timeout";
|
|
28940
|
-
(s = D(this,
|
|
28941
|
-
}, D(this,
|
|
28958
|
+
(s = D(this, De)) == null || s.close(t, e), we(this, yd, qu).call(this, t, e);
|
|
28959
|
+
}, D(this, Re).pingTimeout)));
|
|
28942
28960
|
}, Sn = /* @__PURE__ */ new WeakSet(), vo = function() {
|
|
28943
28961
|
D(this, ln) && (clearTimeout(D(this, ln)), le(this, ln, void 0));
|
|
28944
28962
|
}, To = /* @__PURE__ */ new WeakSet(), _d = function() {
|
|
28945
|
-
D(this,
|
|
28963
|
+
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
28964
|
};
|
|
28947
28965
|
var lD = Object.defineProperty, uD = Object.getOwnPropertyDescriptor, Al = (s, t, e, r) => {
|
|
28948
28966
|
for (var i = r > 1 ? void 0 : r ? uD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
@@ -28950,7 +28968,7 @@ var lD = Object.defineProperty, uD = Object.getOwnPropertyDescriptor, Al = (s, t
|
|
|
28950
28968
|
return r && i && lD(t, e, i), i;
|
|
28951
28969
|
};
|
|
28952
28970
|
const Xp = 65535, hD = 3e3;
|
|
28953
|
-
var jr,
|
|
28971
|
+
var jr, be, ke, Ne, Yt, sr, hc, Wu, pc, Ju, vm;
|
|
28954
28972
|
const dv = (vm = class {
|
|
28955
28973
|
constructor(s, {
|
|
28956
28974
|
peerId: t,
|
|
@@ -28958,11 +28976,11 @@ const dv = (vm = class {
|
|
|
28958
28976
|
authToken: r,
|
|
28959
28977
|
capabilities: i
|
|
28960
28978
|
}) {
|
|
28961
|
-
f(this,
|
|
28979
|
+
f(this, ke);
|
|
28962
28980
|
f(this, hc);
|
|
28963
28981
|
f(this, pc);
|
|
28964
28982
|
f(this, jr, void 0);
|
|
28965
|
-
f(this,
|
|
28983
|
+
f(this, be, void 0);
|
|
28966
28984
|
p(this, "roomName");
|
|
28967
28985
|
p(this, "authToken");
|
|
28968
28986
|
p(this, "capabilities");
|
|
@@ -28971,7 +28989,7 @@ const dv = (vm = class {
|
|
|
28971
28989
|
var n;
|
|
28972
28990
|
if (!t || !e || !r)
|
|
28973
28991
|
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,
|
|
28992
|
+
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
28993
|
autoReconnect: true,
|
|
28976
28994
|
disconnectOnPingTimeout: (n = i.includes("PING")) != null ? n : false,
|
|
28977
28995
|
queueOnDisconnect: true,
|
|
@@ -28980,16 +28998,16 @@ const dv = (vm = class {
|
|
|
28980
28998
|
})), this.handleSocketConnectionEvents();
|
|
28981
28999
|
}
|
|
28982
29000
|
get joinAttempted() {
|
|
28983
|
-
return a(this,
|
|
29001
|
+
return a(this, ke, Ne).socketJoinAttempted;
|
|
28984
29002
|
}
|
|
28985
29003
|
set joinAttempted(s) {
|
|
28986
|
-
a(this,
|
|
29004
|
+
a(this, ke, Ne).socketJoinAttempted = s;
|
|
28987
29005
|
}
|
|
28988
29006
|
get peerId() {
|
|
28989
29007
|
return a(this, sr).getValue("peerId");
|
|
28990
29008
|
}
|
|
28991
29009
|
updateURL(s) {
|
|
28992
|
-
s !== this.peerId && (v(this, jr, $(this, hc, Wu).call(this, s)), u.debug("SocketService:: Connection URL updated.")), a(this,
|
|
29010
|
+
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
29011
|
}
|
|
28994
29012
|
static getSocketEdgeDomain(s) {
|
|
28995
29013
|
return Tn({ servicePrefix: "socket-edge", baseURI: s });
|
|
@@ -28999,7 +29017,7 @@ const dv = (vm = class {
|
|
|
28999
29017
|
}
|
|
29000
29018
|
connect() {
|
|
29001
29019
|
return l(this, null, function* () {
|
|
29002
|
-
a(this,
|
|
29020
|
+
a(this, ke, Ne).socketJoinAttempted = true, yield a(this, be).connect(), a(this, ke, Ne).socketJoinAttempted = true, a(this, ke, Ne).socketState = {
|
|
29003
29021
|
state: "connected",
|
|
29004
29022
|
reconnected: false,
|
|
29005
29023
|
reconnectionAttempt: void 0
|
|
@@ -29008,7 +29026,7 @@ const dv = (vm = class {
|
|
|
29008
29026
|
}
|
|
29009
29027
|
disconnect() {
|
|
29010
29028
|
return l(this, null, function* () {
|
|
29011
|
-
a(this,
|
|
29029
|
+
a(this, ke, Ne).socketJoinAttempted = false, a(this, be).disconnect(), a(this, ke, Ne).socketJoinAttempted = true, a(this, ke, Ne).socketState = {
|
|
29012
29030
|
state: "disconnected",
|
|
29013
29031
|
reconnected: false,
|
|
29014
29032
|
reconnectionAttempt: void 0
|
|
@@ -29017,14 +29035,14 @@ const dv = (vm = class {
|
|
|
29017
29035
|
}
|
|
29018
29036
|
get isConnected() {
|
|
29019
29037
|
try {
|
|
29020
|
-
return a(this,
|
|
29038
|
+
return a(this, be).readyState === 1;
|
|
29021
29039
|
} catch (s) {
|
|
29022
29040
|
return false;
|
|
29023
29041
|
}
|
|
29024
29042
|
}
|
|
29025
29043
|
sendMessage(s, t, e) {
|
|
29026
29044
|
const r = {};
|
|
29027
|
-
return y.injectContext(r), a(this,
|
|
29045
|
+
return y.injectContext(r), a(this, be).send(
|
|
29028
29046
|
s,
|
|
29029
29047
|
e != null ? e : $(this, pc, Ju).call(this),
|
|
29030
29048
|
t,
|
|
@@ -29052,10 +29070,10 @@ const dv = (vm = class {
|
|
|
29052
29070
|
return new Promise(
|
|
29053
29071
|
(o, c) => {
|
|
29054
29072
|
const d = (_, P) => {
|
|
29055
|
-
a(this,
|
|
29073
|
+
a(this, be).removeListener(n, _), a(this, be).removeListener(Xp, P), a(this, be).removeListener(
|
|
29056
29074
|
Xt.errorResponse,
|
|
29057
29075
|
P
|
|
29058
|
-
), a(this,
|
|
29076
|
+
), a(this, be).removeListener(
|
|
29059
29077
|
ps.errorResponse,
|
|
29060
29078
|
P
|
|
29061
29079
|
);
|
|
@@ -29087,9 +29105,9 @@ const dv = (vm = class {
|
|
|
29087
29105
|
}) => {
|
|
29088
29106
|
h === _ && (o({ id: _, payload: P }), d(T, g));
|
|
29089
29107
|
};
|
|
29090
|
-
a(this,
|
|
29108
|
+
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
29109
|
d(T, g), c(new Error(`request timeout for callback eventId:${s}`));
|
|
29092
|
-
}, t), a(this,
|
|
29110
|
+
}, t), a(this, be).send(
|
|
29093
29111
|
s,
|
|
29094
29112
|
h,
|
|
29095
29113
|
e,
|
|
@@ -29099,61 +29117,61 @@ const dv = (vm = class {
|
|
|
29099
29117
|
);
|
|
29100
29118
|
}
|
|
29101
29119
|
on(s, t) {
|
|
29102
|
-
a(this,
|
|
29120
|
+
a(this, be).on(s, t);
|
|
29103
29121
|
}
|
|
29104
29122
|
onStateEvent(s, t) {
|
|
29105
|
-
a(this,
|
|
29123
|
+
a(this, be).on(s, t);
|
|
29106
29124
|
}
|
|
29107
29125
|
removeListener(s, t) {
|
|
29108
|
-
a(this,
|
|
29126
|
+
a(this, be).removeListener(s, t);
|
|
29109
29127
|
}
|
|
29110
29128
|
removeListeners(s) {
|
|
29111
|
-
a(this,
|
|
29129
|
+
a(this, be).removeListeners(s);
|
|
29112
29130
|
}
|
|
29113
29131
|
flush() {
|
|
29114
|
-
return a(this,
|
|
29132
|
+
return a(this, be).flush();
|
|
29115
29133
|
}
|
|
29116
29134
|
handleSocketConnectionEvents() {
|
|
29117
29135
|
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,
|
|
29136
|
+
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
29137
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
29120
29138
|
var i;
|
|
29121
29139
|
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,
|
|
29140
|
+
const { recv: e, send: r } = (i = a(this, ke, Ne).mediaState) != null ? i : {};
|
|
29123
29141
|
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
29142
|
A.SOCKET_SERVICE_DISCONNECTED,
|
|
29125
29143
|
{
|
|
29126
|
-
joinAttempted: a(this,
|
|
29144
|
+
joinAttempted: a(this, ke, Ne).joinAttempted
|
|
29127
29145
|
}
|
|
29128
29146
|
) : v(this, Yt, setTimeout(() => {
|
|
29129
29147
|
I.emit(
|
|
29130
29148
|
A.SOCKET_SERVICE_DISCONNECTED,
|
|
29131
|
-
{ joinAttempted: a(this,
|
|
29149
|
+
{ joinAttempted: a(this, ke, Ne).joinAttempted }
|
|
29132
29150
|
), v(this, Yt, void 0);
|
|
29133
|
-
}, hD)), a(this,
|
|
29151
|
+
}, hD)), a(this, ke, Ne).updateSocketConnectionState("disconnected");
|
|
29134
29152
|
}), this.onStateEvent("reconnecting", () => l(this, null, function* () {
|
|
29135
|
-
u.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this,
|
|
29153
|
+
u.info("SocketService::Reconnecting to socket-edge", { country: y.location.country }), a(this, ke, Ne).updateSocketConnectionState("reconnecting");
|
|
29136
29154
|
})), this.onStateEvent("reconnectAttempt", (t) => l(this, [t], function* ({ attempt: s }) {
|
|
29137
29155
|
u.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
29138
29156
|
socket: {
|
|
29139
29157
|
retryAttempt: s
|
|
29140
29158
|
}
|
|
29141
|
-
}), a(this,
|
|
29159
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnectAttempt", s);
|
|
29142
29160
|
})), this.onStateEvent("reconnectFailure", ({ attempt: s }) => {
|
|
29143
29161
|
u.info("SocketService::Reconnect attempt to socket-edge failed", {
|
|
29144
29162
|
socket: {
|
|
29145
29163
|
retryAttempt: s
|
|
29146
29164
|
}
|
|
29147
|
-
}), a(this,
|
|
29165
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnectFailure", s);
|
|
29148
29166
|
}), 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,
|
|
29167
|
+
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, {
|
|
29168
|
+
wasJoinAttempted: a(this, ke, Ne).mediaJoinAttempted
|
|
29169
|
+
}), a(this, ke, Ne).updateSocketConnectionState("reconnected");
|
|
29152
29170
|
})), 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,
|
|
29171
|
+
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
29172
|
}));
|
|
29155
29173
|
}
|
|
29156
|
-
}, jr = /* @__PURE__ */ new WeakMap(),
|
|
29174
|
+
}, jr = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakSet(), Ne = function() {
|
|
29157
29175
|
return a(this, sr).getValue("connectionHandler");
|
|
29158
29176
|
}, Yt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakSet(), Wu = function(s) {
|
|
29159
29177
|
let t = dv.getSocketEdgeDomain(a(this, sr).getValue("baseURI"));
|
|
@@ -29281,8 +29299,8 @@ const Er = class {
|
|
|
29281
29299
|
});
|
|
29282
29300
|
}
|
|
29283
29301
|
};
|
|
29284
|
-
let
|
|
29285
|
-
p(
|
|
29302
|
+
let _e = Er;
|
|
29303
|
+
p(_e, "socketService"), p(_e, "currentMeetingId");
|
|
29286
29304
|
var pD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, Ml = (s, t, e, r) => {
|
|
29287
29305
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
29288
29306
|
(o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -29315,7 +29333,7 @@ const un = class {
|
|
|
29315
29333
|
organizationId: n,
|
|
29316
29334
|
cachedUserDetails: o
|
|
29317
29335
|
} = s.getAllValues();
|
|
29318
|
-
if (I.reset(), md.cleanup(), Kf(s),
|
|
29336
|
+
if (I.reset(), md.cleanup(), Kf(s), Pe.isSupported() === false)
|
|
29319
29337
|
throw new w("Browser not supported", "0010", true);
|
|
29320
29338
|
const c = EA(
|
|
29321
29339
|
s,
|
|
@@ -29387,7 +29405,7 @@ const un = class {
|
|
|
29387
29405
|
presetName: s.getValue("presetName"),
|
|
29388
29406
|
meetingHash: o,
|
|
29389
29407
|
roomName: i
|
|
29390
|
-
},
|
|
29408
|
+
}, Pe.getDeviceInfo()), {
|
|
29391
29409
|
isReactNative: navigator.isReactNative
|
|
29392
29410
|
});
|
|
29393
29411
|
try {
|
|
@@ -29426,10 +29444,10 @@ const un = class {
|
|
|
29426
29444
|
g,
|
|
29427
29445
|
c.permissions
|
|
29428
29446
|
);
|
|
29429
|
-
t.setValue("maxPreferredStreams",
|
|
29447
|
+
t.setValue("maxPreferredStreams", Pe.isMobile() ? n.maxVideoStreams.mobile : n.maxVideoStreams.desktop);
|
|
29430
29448
|
let P, b, R, L, H, B, F, q;
|
|
29431
29449
|
const ie = new H0(s);
|
|
29432
|
-
|
|
29450
|
+
_e.socketService = s;
|
|
29433
29451
|
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
29452
|
t,
|
|
29435
29453
|
ts,
|
|
@@ -29495,7 +29513,7 @@ const un = class {
|
|
|
29495
29513
|
t.setValue("pip", Ns);
|
|
29496
29514
|
}
|
|
29497
29515
|
}
|
|
29498
|
-
const
|
|
29516
|
+
const Oe = {
|
|
29499
29517
|
storesManager: new KM(t, pr),
|
|
29500
29518
|
pollController: P,
|
|
29501
29519
|
selfController: C,
|
|
@@ -29511,7 +29529,7 @@ const un = class {
|
|
|
29511
29529
|
return {
|
|
29512
29530
|
theme: n,
|
|
29513
29531
|
permissions: _,
|
|
29514
|
-
controllers:
|
|
29532
|
+
controllers: Oe
|
|
29515
29533
|
};
|
|
29516
29534
|
});
|
|
29517
29535
|
}
|
|
@@ -29573,7 +29591,7 @@ class lv extends xt {
|
|
|
29573
29591
|
return this.meetings.length !== 0;
|
|
29574
29592
|
}
|
|
29575
29593
|
get currentMeetingId() {
|
|
29576
|
-
return
|
|
29594
|
+
return _e.currentMeetingId;
|
|
29577
29595
|
}
|
|
29578
29596
|
validateConnectedMeetingsAction() {
|
|
29579
29597
|
if (!this.supportsConnectedMeetings)
|
|
@@ -29582,12 +29600,12 @@ class lv extends xt {
|
|
|
29582
29600
|
}
|
|
29583
29601
|
getConnectedMeetings() {
|
|
29584
29602
|
return l(this, null, function* () {
|
|
29585
|
-
return this.validateConnectedMeetingsAction(), yield
|
|
29603
|
+
return this.validateConnectedMeetingsAction(), yield _e.getConnectedRoomsDump();
|
|
29586
29604
|
});
|
|
29587
29605
|
}
|
|
29588
29606
|
createMeetings(e) {
|
|
29589
29607
|
return l(this, null, function* () {
|
|
29590
|
-
return this.validateConnectedMeetingsAction(), (yield
|
|
29608
|
+
return this.validateConnectedMeetingsAction(), (yield _e.createConnectedRooms(
|
|
29591
29609
|
e
|
|
29592
29610
|
)).map((i) => ({
|
|
29593
29611
|
id: i.id,
|
|
@@ -29597,7 +29615,7 @@ class lv extends xt {
|
|
|
29597
29615
|
}
|
|
29598
29616
|
updateMeetings(e) {
|
|
29599
29617
|
return l(this, null, function* () {
|
|
29600
|
-
this.validateConnectedMeetingsAction(), yield
|
|
29618
|
+
this.validateConnectedMeetingsAction(), yield _e.updateConnectedRooms(
|
|
29601
29619
|
e.map((r) => ({ meetingId: r.id, title: r.title }))
|
|
29602
29620
|
);
|
|
29603
29621
|
});
|
|
@@ -29610,7 +29628,7 @@ class lv extends xt {
|
|
|
29610
29628
|
this.parentMeeting.id,
|
|
29611
29629
|
n.participants.map((o) => o.id)
|
|
29612
29630
|
) : Promise.resolve());
|
|
29613
|
-
return yield Promise.all(r), yield
|
|
29631
|
+
return yield Promise.all(r), yield _e.disableConnectedRooms(
|
|
29614
29632
|
e
|
|
29615
29633
|
);
|
|
29616
29634
|
});
|
|
@@ -29618,7 +29636,7 @@ class lv extends xt {
|
|
|
29618
29636
|
moveParticipants(e, r, i) {
|
|
29619
29637
|
return l(this, null, function* () {
|
|
29620
29638
|
this.validateConnectedMeetingsAction();
|
|
29621
|
-
const n = yield
|
|
29639
|
+
const n = yield _e.movePeersBetweenRooms(
|
|
29622
29640
|
{
|
|
29623
29641
|
sourceMeetingId: e,
|
|
29624
29642
|
destinationMeetingId: r,
|
|
@@ -29633,7 +29651,7 @@ class lv extends xt {
|
|
|
29633
29651
|
moveParticipantsWithCustomPreset(e, r, i) {
|
|
29634
29652
|
return l(this, null, function* () {
|
|
29635
29653
|
this.validateConnectedMeetingsAction();
|
|
29636
|
-
const n = yield
|
|
29654
|
+
const n = yield _e.movePeersBetweenRooms(
|
|
29637
29655
|
{
|
|
29638
29656
|
sourceMeetingId: e,
|
|
29639
29657
|
destinationMeetingId: r,
|
|
@@ -29701,31 +29719,31 @@ const Sr = (Ql = class {
|
|
|
29701
29719
|
)), Sr.instance;
|
|
29702
29720
|
}
|
|
29703
29721
|
setCurrentMeeting(s) {
|
|
29704
|
-
v(this, Qt, s),
|
|
29722
|
+
v(this, Qt, s), _e.currentMeetingId = s.meta.meetingId;
|
|
29705
29723
|
}
|
|
29706
29724
|
getConnectedMeetings() {
|
|
29707
29725
|
this.connectedMeetings.getConnectedMeetings();
|
|
29708
29726
|
}
|
|
29709
29727
|
setupEvents() {
|
|
29710
|
-
|
|
29728
|
+
_e.socketService && (_e.socketService.on(
|
|
29711
29729
|
x.getConnectedRoomsDump,
|
|
29712
29730
|
this.handleConnectedRoomsDump.bind(this)
|
|
29713
|
-
),
|
|
29731
|
+
), _e.socketService.on(
|
|
29714
29732
|
x.transferPeer,
|
|
29715
29733
|
this.handleTransferPeer.bind(this)
|
|
29716
|
-
),
|
|
29734
|
+
), _e.socketService.on(
|
|
29717
29735
|
x.movedPeer,
|
|
29718
29736
|
this.handleMovedPeer.bind(this)
|
|
29719
|
-
),
|
|
29737
|
+
), _e.socketService.on(
|
|
29720
29738
|
x.connectedRoomsUpdated,
|
|
29721
29739
|
this.handleConnectedRoomsUpdated.bind(this)
|
|
29722
|
-
),
|
|
29740
|
+
), _e.socketService.on(
|
|
29723
29741
|
x.connectedRoomsDeleted,
|
|
29724
29742
|
this.handleConnectedRoomsDeleted.bind(this)
|
|
29725
29743
|
));
|
|
29726
29744
|
}
|
|
29727
29745
|
handleTransferPeer(s) {
|
|
29728
|
-
const t =
|
|
29746
|
+
const t = _e.handleTransferPeerRaw(s);
|
|
29729
29747
|
return this.switchMeeting(t);
|
|
29730
29748
|
}
|
|
29731
29749
|
switchMeeting(e) {
|
|
@@ -29747,7 +29765,7 @@ const Sr = (Ql = class {
|
|
|
29747
29765
|
} catch (h) {
|
|
29748
29766
|
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
29767
|
}
|
|
29750
|
-
|
|
29768
|
+
_e.socketService = void 0, u.info(`ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ${t}`);
|
|
29751
29769
|
const i = yield CD.init(j(O({}, a(this, Ca)), {
|
|
29752
29770
|
cachedUserDetails: null,
|
|
29753
29771
|
defaults: j(O(O({}, a(this, Ca).defaults), r), {
|
|
@@ -29766,7 +29784,7 @@ const Sr = (Ql = class {
|
|
|
29766
29784
|
});
|
|
29767
29785
|
}
|
|
29768
29786
|
handleConnectedRoomsDump(s) {
|
|
29769
|
-
const t =
|
|
29787
|
+
const t = _e.handleConnectedRoomsDumpRaw(s);
|
|
29770
29788
|
this.connectedMeetings.meetings = t.meetings.map((e) => ({
|
|
29771
29789
|
id: e.id,
|
|
29772
29790
|
title: e.title,
|
|
@@ -29778,10 +29796,10 @@ const Sr = (Ql = class {
|
|
|
29778
29796
|
}, this.emitStateUpdate();
|
|
29779
29797
|
}
|
|
29780
29798
|
handleMovedPeer(s) {
|
|
29781
|
-
return
|
|
29799
|
+
return _e.handleMovedPeerRaw(s);
|
|
29782
29800
|
}
|
|
29783
29801
|
handleConnectedRoomsUpdated(s) {
|
|
29784
|
-
const t =
|
|
29802
|
+
const t = _e.handleConnectedRoomsUpdatedRaw(s), e = /* @__PURE__ */ new Map();
|
|
29785
29803
|
this.connectedMeetings.meetings.forEach((r) => {
|
|
29786
29804
|
e.set(r.id, r);
|
|
29787
29805
|
}), t.forEach((r) => {
|
|
@@ -29789,7 +29807,7 @@ const Sr = (Ql = class {
|
|
|
29789
29807
|
}), this.connectedMeetings.meetings = Array.from(e.values()), this.emitStateUpdate();
|
|
29790
29808
|
}
|
|
29791
29809
|
handleConnectedRoomsDeleted(s) {
|
|
29792
|
-
const e =
|
|
29810
|
+
const e = _e.handleConnectedRoomsDeletedRaw(s).map((r) => r.id);
|
|
29793
29811
|
this.connectedMeetings.meetings = this.connectedMeetings.meetings.filter(
|
|
29794
29812
|
(r) => !e.includes(r.id)
|
|
29795
29813
|
), this.emitStateUpdate();
|
|
@@ -29887,7 +29905,7 @@ let Xr = (Tm = class {
|
|
|
29887
29905
|
static init(t) {
|
|
29888
29906
|
return l(this, null, function* () {
|
|
29889
29907
|
var m, g, _, P, b, R, L;
|
|
29890
|
-
GP(),
|
|
29908
|
+
GP(), Pe.init();
|
|
29891
29909
|
const e = (g = (m = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : m.peerId) != null ? g : v4();
|
|
29892
29910
|
Zp.init();
|
|
29893
29911
|
const { authToken: r, baseURI: i } = t, T = ED(r, i), { meetingId: n } = T, o = Ya(T, ["meetingId"]);
|