@cloudflare/realtimekit 1.4.0-staging.3 → 1.4.0-staging.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ClientMock.d.ts +13 -0
- package/dist/EncryptionManager.cjs.js +1 -1
- package/dist/EncryptionManager.d.ts +5007 -0
- package/dist/EncryptionManager.es.js +253 -253
- package/dist/browser.js +4 -4
- package/dist/dependencies.txt +2 -2
- package/dist/index.cjs.js +10 -10
- package/dist/index.d.ts +5019 -0
- package/dist/index.es.js +740 -701
- package/dist/index.es5.js +330 -318
- package/dist/index.rn.js +8 -8
- package/dist/ts3.4/dist/ClientMock.d.ts +11 -0
- package/dist/ts3.4/dist/EncryptionManager.d.ts +4960 -0
- package/dist/ts3.4/dist/index.d.ts +4958 -0
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -18,7 +18,7 @@ var Bc = (s, t) => {
|
|
|
18
18
|
t.indexOf(r) < 0 && Fh.call(s, r) && (e[r] = s[r]);
|
|
19
19
|
return e;
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
var p = (s, t, e) => (Wl(s, typeof t != "symbol" ? t + "" : t, e), e), Jl = (s, t, e) => {
|
|
22
22
|
if (!t.has(s))
|
|
23
23
|
throw TypeError("Cannot " + e);
|
|
24
24
|
};
|
|
@@ -168,10 +168,10 @@ function YS(s) {
|
|
|
168
168
|
}
|
|
169
169
|
class QS {
|
|
170
170
|
constructor() {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
p(this, "_bowser");
|
|
172
|
+
p(this, "_name");
|
|
173
|
+
p(this, "_version");
|
|
174
|
+
p(this, "getDeviceInfo", () => ({
|
|
175
175
|
isMobile: this.isMobile(),
|
|
176
176
|
browserName: this._bowser.getBrowserName(),
|
|
177
177
|
osName: this._bowser.getOSName(),
|
|
@@ -645,8 +645,8 @@ oe.prototype.emit = function(t) {
|
|
|
645
645
|
if (typeof d == "function")
|
|
646
646
|
qh(d, this, e);
|
|
647
647
|
else
|
|
648
|
-
for (var l = d.length,
|
|
649
|
-
qh(
|
|
648
|
+
for (var l = d.length, h = zg(d, l), r = 0; r < l; ++r)
|
|
649
|
+
qh(h[r], this, e);
|
|
650
650
|
return !0;
|
|
651
651
|
};
|
|
652
652
|
function Gg(s, t, e, r) {
|
|
@@ -858,7 +858,7 @@ const av = /* @__PURE__ */ new Map([
|
|
|
858
858
|
]);
|
|
859
859
|
class ov {
|
|
860
860
|
constructor() {
|
|
861
|
-
|
|
861
|
+
p(this, "events");
|
|
862
862
|
this.events = [];
|
|
863
863
|
}
|
|
864
864
|
add(t) {
|
|
@@ -871,30 +871,40 @@ class ov {
|
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
class cv extends ot {
|
|
874
|
-
constructor({ logger: e, peerId: r, apiHostnames: i }) {
|
|
874
|
+
constructor({ logger: e, peerId: r, apiHostnames: i, authToken: n }) {
|
|
875
875
|
super();
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
this
|
|
876
|
+
p(this, "logger");
|
|
877
|
+
p(this, "peerId");
|
|
878
|
+
p(this, "eventStore");
|
|
879
|
+
p(this, "apiEndpoint");
|
|
880
|
+
p(this, "authToken");
|
|
881
|
+
this.logger = e, this.peerId = r, this.authToken = n, this.apiEndpoint = `https://${i.daCollector}/api/v1/message`, this.eventStore = new ov();
|
|
881
882
|
}
|
|
882
883
|
sendEventsChunkToServer(e) {
|
|
883
884
|
return u(this, null, function* () {
|
|
884
|
-
var i;
|
|
885
885
|
const r = {
|
|
886
886
|
payload: e,
|
|
887
887
|
peerId: this.peerId
|
|
888
|
-
};
|
|
888
|
+
}, i = new AbortController(), n = setTimeout(() => i.abort(), 3e3);
|
|
889
889
|
try {
|
|
890
890
|
return yield fetch(this.apiEndpoint, {
|
|
891
891
|
method: "POST",
|
|
892
|
-
|
|
892
|
+
headers: {
|
|
893
|
+
"Content-Type": "application/json",
|
|
894
|
+
Authorization: `Bearer ${this.authToken}`
|
|
895
|
+
},
|
|
896
|
+
body: JSON.stringify(r),
|
|
897
|
+
signal: i.signal
|
|
893
898
|
}), !0;
|
|
894
|
-
} catch (
|
|
895
|
-
return this.logger.error("callStats::sendEventsChunkToServer::catch", {
|
|
896
|
-
this.
|
|
899
|
+
} catch (o) {
|
|
900
|
+
return this.logger.error("callStats::sendEventsChunkToServer::catch", {
|
|
901
|
+
peerId: this.peerId,
|
|
902
|
+
endpoint: this.apiEndpoint,
|
|
903
|
+
error: o instanceof Error ? o.message : String(o),
|
|
904
|
+
stack: o instanceof Error ? o.stack : void 0
|
|
897
905
|
}), !1;
|
|
906
|
+
} finally {
|
|
907
|
+
clearTimeout(n);
|
|
898
908
|
}
|
|
899
909
|
});
|
|
900
910
|
}
|
|
@@ -905,7 +915,13 @@ class cv extends ot {
|
|
|
905
915
|
return u(this, null, function* () {
|
|
906
916
|
var r;
|
|
907
917
|
const e = this.eventStore.flush();
|
|
908
|
-
|
|
918
|
+
if ((r = e == null ? void 0 : e.entries) != null && r.length) {
|
|
919
|
+
const i = yield this.sendEventsChunkToServer(e);
|
|
920
|
+
return i || e.entries.forEach((n) => {
|
|
921
|
+
this.eventStore.add(n);
|
|
922
|
+
}), i;
|
|
923
|
+
}
|
|
924
|
+
return !1;
|
|
909
925
|
});
|
|
910
926
|
}
|
|
911
927
|
}
|
|
@@ -993,7 +1009,7 @@ function im({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
993
1009
|
}), l = dv({
|
|
994
1010
|
frameWidth: s,
|
|
995
1011
|
isScreenShare: n
|
|
996
|
-
}),
|
|
1012
|
+
}), h = lv({
|
|
997
1013
|
framesPerSecond: t,
|
|
998
1014
|
isScreenShare: n
|
|
999
1015
|
}), g = uv({
|
|
@@ -1002,7 +1018,7 @@ function im({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsSent: r,
|
|
|
1002
1018
|
});
|
|
1003
1019
|
return tm({
|
|
1004
1020
|
isLowQualityVideo: l,
|
|
1005
|
-
isVideoLagging:
|
|
1021
|
+
isVideoLagging: h,
|
|
1006
1022
|
isVideoStuck: g,
|
|
1007
1023
|
jitterQuality: d,
|
|
1008
1024
|
packetsLostQuality: c
|
|
@@ -1064,7 +1080,7 @@ function om({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
1064
1080
|
}), l = gv({
|
|
1065
1081
|
frameWidth: s,
|
|
1066
1082
|
isScreenShare: n
|
|
1067
|
-
}),
|
|
1083
|
+
}), h = pv({
|
|
1068
1084
|
framesPerSecond: t,
|
|
1069
1085
|
isScreenShare: n
|
|
1070
1086
|
}), g = hv({
|
|
@@ -1073,7 +1089,7 @@ function om({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
1073
1089
|
});
|
|
1074
1090
|
return tm({
|
|
1075
1091
|
isLowQualityVideo: l,
|
|
1076
|
-
isVideoLagging:
|
|
1092
|
+
isVideoLagging: h,
|
|
1077
1093
|
isVideoStuck: g,
|
|
1078
1094
|
jitterQuality: d,
|
|
1079
1095
|
packetsLostQuality: c
|
|
@@ -1081,11 +1097,11 @@ function om({ frameWidth: s, framesPerSecond: t, packetsLost: e, packetsReceived
|
|
|
1081
1097
|
}
|
|
1082
1098
|
class pr {
|
|
1083
1099
|
constructor(t) {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1100
|
+
p(this, "pc1");
|
|
1101
|
+
p(this, "pc2");
|
|
1102
|
+
p(this, "constrainVideoBitrateKbps");
|
|
1103
|
+
p(this, "constrainOfferToRemoveVideoFec", !1);
|
|
1104
|
+
p(this, "iceCandidateFilter");
|
|
1089
1105
|
const e = new RTCPeerConnection(t), r = new RTCPeerConnection(t);
|
|
1090
1106
|
this.pc1 = e, this.pc2 = r, this.iceCandidateFilter = pr.noFilter, this.pc1.addEventListener("icecandidate", this.onIceCandidate.bind(this, this.pc2)), this.pc2.addEventListener("icecandidate", this.onIceCandidate.bind(this, this.pc1));
|
|
1091
1107
|
}
|
|
@@ -1177,8 +1193,8 @@ b=AS:${this.constrainVideoBitrateKbps}\r
|
|
|
1177
1193
|
class cm extends ot {
|
|
1178
1194
|
constructor(e) {
|
|
1179
1195
|
super();
|
|
1180
|
-
|
|
1181
|
-
|
|
1196
|
+
p(this, "call");
|
|
1197
|
+
p(this, "timeOut");
|
|
1182
1198
|
this.call = new pr(e);
|
|
1183
1199
|
}
|
|
1184
1200
|
start(e = 1e4) {
|
|
@@ -1195,21 +1211,21 @@ const mv = 8, fv = 1 / 1e3;
|
|
|
1195
1211
|
class Sv extends cm {
|
|
1196
1212
|
constructor(e) {
|
|
1197
1213
|
super(e);
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1214
|
+
p(this, "senderChannel");
|
|
1215
|
+
p(this, "recieveChannel");
|
|
1216
|
+
p(this, "startTime");
|
|
1217
|
+
p(this, "lastBitrateMeasureTime");
|
|
1218
|
+
p(this, "sentPayloadBytes", 0);
|
|
1219
|
+
p(this, "recievedPayloadBytes", 0);
|
|
1220
|
+
p(this, "lastReceivedPayloadBytes", 0);
|
|
1221
|
+
p(this, "stopSending", !1);
|
|
1222
|
+
p(this, "testProgress", 0);
|
|
1223
|
+
p(this, "samplePacket", "");
|
|
1224
|
+
p(this, "finalBitrateSum", 0);
|
|
1225
|
+
p(this, "bitRateSampels", 0);
|
|
1226
|
+
p(this, "maxNumberOfPacketsToSend", 0);
|
|
1227
|
+
p(this, "bytesToKeepBuffered", 0);
|
|
1228
|
+
p(this, "testDurationSeconds", 5);
|
|
1213
1229
|
this.call.setIceCandidateFilter(pr.isNotHostCandidate), this.senderChannel = this.call.pc1.createDataChannel(null);
|
|
1214
1230
|
for (let r = 0; r < 1024 * 256; r += 1)
|
|
1215
1231
|
this.samplePacket += "h";
|
|
@@ -1256,8 +1272,8 @@ class Sv extends cm {
|
|
|
1256
1272
|
class rh extends cm {
|
|
1257
1273
|
constructor(e, r = pr.noFilter) {
|
|
1258
1274
|
super(e);
|
|
1259
|
-
|
|
1260
|
-
|
|
1275
|
+
p(this, "ch1");
|
|
1276
|
+
p(this, "ch2");
|
|
1261
1277
|
this.call.setIceCandidateFilter(r);
|
|
1262
1278
|
const i = this.call.pc1.createDataChannel(null);
|
|
1263
1279
|
this.ch1 = i, i.addEventListener("open", () => {
|
|
@@ -1303,16 +1319,16 @@ class yv extends rh {
|
|
|
1303
1319
|
}
|
|
1304
1320
|
class Ev {
|
|
1305
1321
|
constructor() {
|
|
1306
|
-
|
|
1322
|
+
p(this, "ipInformation", null);
|
|
1307
1323
|
}
|
|
1308
1324
|
getIPDetails(i) {
|
|
1309
1325
|
return u(this, arguments, function* ({ peerId: t, apiHostnames: e, logger: r }) {
|
|
1310
1326
|
var n, o, c;
|
|
1311
1327
|
if (!this.ipInformation) {
|
|
1312
1328
|
try {
|
|
1313
|
-
const d = `https://${e.location}`,
|
|
1314
|
-
if (((n =
|
|
1315
|
-
return this.ipInformation =
|
|
1329
|
+
const d = `https://${e.location}`, h = yield (yield fetch(d)).json();
|
|
1330
|
+
if (((n = h.loc) == null ? void 0 : n.length) > 5)
|
|
1331
|
+
return this.ipInformation = h, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = zr(this.ipInformation.ip)), h;
|
|
1316
1332
|
throw Error("Insufficient data");
|
|
1317
1333
|
} catch (d) {
|
|
1318
1334
|
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
@@ -1358,46 +1374,46 @@ function Kh(s) {
|
|
|
1358
1374
|
}
|
|
1359
1375
|
class lm {
|
|
1360
1376
|
constructor() {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1377
|
+
p(this, "transport");
|
|
1378
|
+
p(this, "candidatePair");
|
|
1379
|
+
p(this, "outboundVideoRtp", /* @__PURE__ */ new Map());
|
|
1380
|
+
p(this, "inboundVideoRtp", /* @__PURE__ */ new Map());
|
|
1381
|
+
p(this, "outboundAudioRtp", /* @__PURE__ */ new Map());
|
|
1382
|
+
p(this, "inboundAudioRtp", /* @__PURE__ */ new Map());
|
|
1383
|
+
p(this, "remoteInboundRtp", /* @__PURE__ */ new Map());
|
|
1384
|
+
p(this, "producerStreamMap", /* @__PURE__ */ new Map());
|
|
1385
|
+
p(this, "consumerStreamMap", /* @__PURE__ */ new Map());
|
|
1386
|
+
p(this, "staleProducerStreamMap", !1);
|
|
1387
|
+
p(this, "staleConsumerStreamMap", !1);
|
|
1372
1388
|
}
|
|
1373
1389
|
}
|
|
1374
1390
|
class um extends ot {
|
|
1375
1391
|
constructor() {
|
|
1376
1392
|
super();
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1393
|
+
p(this, "observer");
|
|
1394
|
+
p(this, "outboundProducerMap", /* @__PURE__ */ new Map());
|
|
1395
|
+
p(this, "inboundConsumerMap", /* @__PURE__ */ new Map());
|
|
1396
|
+
p(this, "consumerPeerIdMap", /* @__PURE__ */ new Map());
|
|
1397
|
+
p(this, "pausedConsumerMap", /* @__PURE__ */ new Map());
|
|
1398
|
+
p(this, "pausedProducerMap", /* @__PURE__ */ new Map());
|
|
1399
|
+
p(this, "overallProducingTransportsStatsMap", {});
|
|
1400
|
+
p(this, "overallConsumingTransportsStatsMap", {});
|
|
1401
|
+
p(this, "overallConsumersStatsMap", {});
|
|
1402
|
+
p(this, "overallProducersStatsMap", {});
|
|
1403
|
+
p(this, "videoProducerToStatsMap", /* @__PURE__ */ new Map());
|
|
1404
|
+
p(this, "audioProducerToStatsMap", /* @__PURE__ */ new Map());
|
|
1405
|
+
p(this, "videoConsumerToStatsMap", /* @__PURE__ */ new Map());
|
|
1406
|
+
p(this, "audioConsumerToStatsMap", /* @__PURE__ */ new Map());
|
|
1407
|
+
p(this, "consumerIdsWithFreezedVideo", /* @__PURE__ */ new Set());
|
|
1408
|
+
p(this, "consumerIdsWithFreezedAudio", /* @__PURE__ */ new Set());
|
|
1409
|
+
p(this, "producerIdsWithFreezedVideo", /* @__PURE__ */ new Set());
|
|
1410
|
+
p(this, "producerIdsWithFreezedAudio", /* @__PURE__ */ new Set());
|
|
1411
|
+
p(this, "freezedProducingTransportIds", /* @__PURE__ */ new Set());
|
|
1412
|
+
p(this, "freezedConsumingTransportIds", /* @__PURE__ */ new Set());
|
|
1413
|
+
p(this, "screenShareProducers", /* @__PURE__ */ new Set());
|
|
1414
|
+
p(this, "screenShareConsumers", /* @__PURE__ */ new Set());
|
|
1415
|
+
p(this, "ipDetails");
|
|
1416
|
+
p(this, "callStatsInstance");
|
|
1401
1417
|
this.observer = new ot();
|
|
1402
1418
|
}
|
|
1403
1419
|
registerProducer(e) {
|
|
@@ -1434,13 +1450,13 @@ class um extends ot {
|
|
|
1434
1450
|
r.totalAudioPacketsSent === i.packetsSent ? (this.producerIdsWithFreezedAudio.add(e), this.callStatsInstance && n.audio && (this.callStatsInstance.logger.debug("callStats::measurements::producerAudioFreezed", { producerId: e }), this.callStatsInstance.eventHandler.emit("producer_audio_status", "pause", e))) : (r.totalAudioPacketsSent = i.packetsSent, this.producerIdsWithFreezedAudio.has(e) && (this.producerIdsWithFreezedAudio.delete(e), this.callStatsInstance && n.audio && (this.callStatsInstance.logger.debug("callStats::measurements::producerAudioDefreezed", { producerId: e }), this.callStatsInstance.eventHandler.emit("producer_audio_status", "resume", e))));
|
|
1435
1451
|
}
|
|
1436
1452
|
processProducingTransportStats(e, r, i) {
|
|
1437
|
-
var
|
|
1438
|
-
const n = ((
|
|
1453
|
+
var h;
|
|
1454
|
+
const n = ((h = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : h.currentUserMediaStates) || {}, { audio: o, video: c, screen: d } = n, l = o || c || d;
|
|
1439
1455
|
r.totalPacketsSent === i.packetsSent ? (this.freezedProducingTransportIds.add(e), this.callStatsInstance && l && (this.callStatsInstance.logger.debug("callStats::measurements::producingTransportFreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("producing_transport_status", "pause", e))) : (r.totalPacketsSent = i.packetsSent, this.freezedProducingTransportIds.has(e) && (this.freezedProducingTransportIds.delete(e), this.callStatsInstance && l && (this.callStatsInstance.logger.debug("callStats::measurements::producingTransportDefreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("producing_transport_status", "resume", e))));
|
|
1440
1456
|
}
|
|
1441
1457
|
processConsumingTransportStats(e, r, i) {
|
|
1442
1458
|
var c, d;
|
|
1443
|
-
const o = !!Array.from(((d = (c = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : c.consumerSharedMediaStatesMap) == null ? void 0 : d.values()) || []).reduce((l,
|
|
1459
|
+
const o = !!Array.from(((d = (c = this == null ? void 0 : this.callStatsInstance) == null ? void 0 : c.consumerSharedMediaStatesMap) == null ? void 0 : d.values()) || []).reduce((l, h) => l || h.audio || h.video || h.screen, !1);
|
|
1444
1460
|
r.totalPacketsReceived === i.packetsSent ? (this.freezedConsumingTransportIds.add(e), this.callStatsInstance && o && (this.callStatsInstance.logger.debug("callStats::measurements::consumingTransportFreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("consuming_transport_status", "pause", e))) : (r.totalPacketsReceived = i.packetsSent, this.freezedConsumingTransportIds.has(e) && (this.freezedConsumingTransportIds.delete(e), this.callStatsInstance && o && (this.callStatsInstance.logger.debug("callStats::measurements::consumingTransportDefreezed", { transportId: e }), this.callStatsInstance.eventHandler.emit("consuming_transport_status", "resume", e))));
|
|
1445
1461
|
}
|
|
1446
1462
|
registerConsumer(e) {
|
|
@@ -1520,7 +1536,7 @@ class um extends ot {
|
|
|
1520
1536
|
}
|
|
1521
1537
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
1522
1538
|
var C, _, I, M, U, L, B, G, se, Ge, ns, si, as;
|
|
1523
|
-
const c = e, d = new lm(), l = r.length ? new Set(r) : void 0,
|
|
1539
|
+
const c = e, d = new lm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1524
1540
|
for (const A of c.values()) {
|
|
1525
1541
|
if (l) {
|
|
1526
1542
|
if (l.size === 0)
|
|
@@ -1532,7 +1548,7 @@ class um extends ot {
|
|
|
1532
1548
|
}
|
|
1533
1549
|
switch (A.type) {
|
|
1534
1550
|
case "local-candidate": {
|
|
1535
|
-
|
|
1551
|
+
h.push(this.getIceCandidateStats(A));
|
|
1536
1552
|
break;
|
|
1537
1553
|
}
|
|
1538
1554
|
case "remote-candidate": {
|
|
@@ -1858,7 +1874,7 @@ class um extends ot {
|
|
|
1858
1874
|
}), this.audioProducerToStatsMap.set(y, le);
|
|
1859
1875
|
}
|
|
1860
1876
|
}), f.forEach((A) => {
|
|
1861
|
-
const y =
|
|
1877
|
+
const y = h.find((F) => F.id === A.localCandidateId ? (A.localCandidateId = F.id, F) : null), R = g.find((F) => F.id === A.remoteCandidateId ? (A.remoteCandidateId = F.id, F) : null);
|
|
1862
1878
|
y && (A.localCandidateType = y.type, A.localCandidateAddress = zr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = zr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = zr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
|
|
1863
1879
|
}), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
1864
1880
|
// candidateStats: result.candidatePair,
|
|
@@ -1914,10 +1930,10 @@ class um extends ot {
|
|
|
1914
1930
|
transportId: e.id,
|
|
1915
1931
|
consuming: r,
|
|
1916
1932
|
producing: i
|
|
1917
|
-
},
|
|
1933
|
+
}, h = d.staleProducerStreamMap ? void 0 : this.getProducerStatsFromReport(d), g = d.staleConsumerStreamMap ? void 0 : this.getConsumerStatsFromReport(d);
|
|
1918
1934
|
return {
|
|
1919
1935
|
transportReport: l,
|
|
1920
|
-
producerReport:
|
|
1936
|
+
producerReport: h,
|
|
1921
1937
|
consumerReport: g
|
|
1922
1938
|
};
|
|
1923
1939
|
});
|
|
@@ -1981,29 +1997,29 @@ class um extends ot {
|
|
|
1981
1997
|
try {
|
|
1982
1998
|
const r = {
|
|
1983
1999
|
iceServers: e || Jh
|
|
1984
|
-
}, i = new Promise((
|
|
2000
|
+
}, i = new Promise((h, g) => {
|
|
1985
2001
|
try {
|
|
1986
2002
|
const f = new vv(r);
|
|
1987
|
-
f.addListener("done",
|
|
1988
|
-
|
|
2003
|
+
f.addListener("done", h), f.addListener("failed", () => {
|
|
2004
|
+
h({ connectivity: !1 });
|
|
1989
2005
|
}), f.start(2e3);
|
|
1990
2006
|
} catch (f) {
|
|
1991
2007
|
g(f);
|
|
1992
2008
|
}
|
|
1993
|
-
}), n = new Promise((
|
|
2009
|
+
}), n = new Promise((h, g) => {
|
|
1994
2010
|
try {
|
|
1995
2011
|
const f = new Tv(r);
|
|
1996
|
-
f.addListener("done",
|
|
1997
|
-
|
|
2012
|
+
f.addListener("done", h), f.addListener("failed", () => {
|
|
2013
|
+
h({ connectivity: !1 });
|
|
1998
2014
|
}), f.start(2e3);
|
|
1999
2015
|
} catch (f) {
|
|
2000
2016
|
g(f);
|
|
2001
2017
|
}
|
|
2002
|
-
}), o = new Promise((
|
|
2018
|
+
}), o = new Promise((h, g) => {
|
|
2003
2019
|
try {
|
|
2004
2020
|
const f = new yv(r);
|
|
2005
|
-
f.addListener("done",
|
|
2006
|
-
|
|
2021
|
+
f.addListener("done", h), f.addListener("failed", () => {
|
|
2022
|
+
h({ connectivity: !1 });
|
|
2007
2023
|
}), f.start(2e3);
|
|
2008
2024
|
} catch (f) {
|
|
2009
2025
|
g(f);
|
|
@@ -2117,8 +2133,8 @@ class Pv extends um {
|
|
|
2117
2133
|
class hm extends um {
|
|
2118
2134
|
constructor() {
|
|
2119
2135
|
super(...arguments);
|
|
2120
|
-
|
|
2121
|
-
|
|
2136
|
+
p(this, "producerMap", /* @__PURE__ */ new Map());
|
|
2137
|
+
p(this, "consumerMap", /* @__PURE__ */ new Map());
|
|
2122
2138
|
}
|
|
2123
2139
|
registerProducer(e) {
|
|
2124
2140
|
return u(this, null, function* () {
|
|
@@ -2174,7 +2190,7 @@ class hm extends um {
|
|
|
2174
2190
|
}
|
|
2175
2191
|
parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
|
|
2176
2192
|
var C, _, I, M, U, L, B, G, se, Ge, ns, si, as;
|
|
2177
|
-
const c = e, d = new lm(), l = r.length ? new Set(r) : void 0,
|
|
2193
|
+
const c = e, d = new lm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2178
2194
|
for (const A of c.values()) {
|
|
2179
2195
|
if (l) {
|
|
2180
2196
|
if (l.size === 0)
|
|
@@ -2186,7 +2202,7 @@ class hm extends um {
|
|
|
2186
2202
|
}
|
|
2187
2203
|
switch (A.type) {
|
|
2188
2204
|
case "local-candidate": {
|
|
2189
|
-
|
|
2205
|
+
h.push(this.getIceCandidateStats(A));
|
|
2190
2206
|
break;
|
|
2191
2207
|
}
|
|
2192
2208
|
case "remote-candidate": {
|
|
@@ -2508,7 +2524,7 @@ class hm extends um {
|
|
|
2508
2524
|
}), this.audioProducerToStatsMap.set(y, le);
|
|
2509
2525
|
}
|
|
2510
2526
|
}), f.forEach((A) => {
|
|
2511
|
-
const y =
|
|
2527
|
+
const y = h.find((F) => F.id === A.localCandidateId ? (A.localCandidateId = F.id, F) : null), R = g.find((F) => F.id === A.remoteCandidateId ? (A.remoteCandidateId = F.id, F) : null);
|
|
2512
2528
|
y && (A.localCandidateType = y.type, A.localCandidateAddress = zr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = zr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = zr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
|
|
2513
2529
|
}), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
2514
2530
|
// candidateStats: result.candidatePair,
|
|
@@ -2540,14 +2556,14 @@ class hm extends um {
|
|
|
2540
2556
|
const r = [];
|
|
2541
2557
|
try {
|
|
2542
2558
|
e.producerStreamMap.forEach((i, n) => {
|
|
2543
|
-
const o = this.producerMap.get(n), c = o.track.getSettings(), d = i.outboundVideoRtpId.map((
|
|
2544
|
-
const g = e.outboundVideoRtp.get(
|
|
2559
|
+
const o = this.producerMap.get(n), c = o.track.getSettings(), d = i.outboundVideoRtpId.map((h) => {
|
|
2560
|
+
const g = e.outboundVideoRtp.get(h);
|
|
2545
2561
|
return g.frameHeight || (g.frameHeight = c.height, g.frameWidth = c.width, g.framesPerSecond = c.frameRate), g;
|
|
2546
2562
|
}), l = {
|
|
2547
2563
|
producerId: n,
|
|
2548
2564
|
appData: o.appData,
|
|
2549
2565
|
videoStats: d,
|
|
2550
|
-
audioStats: i.outboundAudioRtpId.map((
|
|
2566
|
+
audioStats: i.outboundAudioRtpId.map((h) => e.outboundAudioRtp.get(h))
|
|
2551
2567
|
};
|
|
2552
2568
|
r.push(l);
|
|
2553
2569
|
});
|
|
@@ -2559,8 +2575,8 @@ class hm extends um {
|
|
|
2559
2575
|
getConsumerStatsFromParsedConsumerStats(e, r, i) {
|
|
2560
2576
|
let n;
|
|
2561
2577
|
try {
|
|
2562
|
-
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(i), l = r == null ? void 0 : r.inboundVideoRtpId.map((
|
|
2563
|
-
const f = this.consumerMap.get(i).track.getSettings(), v = e.inboundVideoRtp.get(
|
|
2578
|
+
const { peerId: o, producerId: c, appData: d } = this.consumerPeerIdMap.get(i), l = r == null ? void 0 : r.inboundVideoRtpId.map((h) => {
|
|
2579
|
+
const f = this.consumerMap.get(i).track.getSettings(), v = e.inboundVideoRtp.get(h);
|
|
2564
2580
|
return v.frameHeight || (v.frameHeight = f.height, v.frameWidth = f.width, v.framesPerSecond = f.frameRate), v;
|
|
2565
2581
|
});
|
|
2566
2582
|
n = {
|
|
@@ -2569,7 +2585,7 @@ class hm extends um {
|
|
|
2569
2585
|
producerId: c,
|
|
2570
2586
|
appData: d,
|
|
2571
2587
|
videoStats: l,
|
|
2572
|
-
audioStats: r == null ? void 0 : r.inboundAudioRtpId.map((
|
|
2588
|
+
audioStats: r == null ? void 0 : r.inboundAudioRtpId.map((h) => e.inboundAudioRtp.get(h))
|
|
2573
2589
|
};
|
|
2574
2590
|
} catch (o) {
|
|
2575
2591
|
console.error("getConsumerStatsFromParsedConsumerStats: ", o, e);
|
|
@@ -2642,25 +2658,27 @@ var Y = globalThis && globalThis.__decorate || function(s, t, e, r) {
|
|
|
2642
2658
|
};
|
|
2643
2659
|
const Q = console;
|
|
2644
2660
|
let K = class extends ot {
|
|
2645
|
-
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = ho.PROD, n, o, c, d) {
|
|
2661
|
+
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = ho.PROD, n, o, c, d, l) {
|
|
2646
2662
|
super();
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2663
|
+
p(this, "observer");
|
|
2664
|
+
p(this, "eventHandler");
|
|
2665
|
+
p(this, "measurements");
|
|
2666
|
+
p(this, "producingTransport");
|
|
2667
|
+
p(this, "consumingTransport");
|
|
2668
|
+
p(this, "producers", /* @__PURE__ */ new Map());
|
|
2669
|
+
p(this, "consumers", /* @__PURE__ */ new Map());
|
|
2670
|
+
p(this, "iceServers");
|
|
2671
|
+
p(this, "connectionInfoPromise");
|
|
2672
|
+
p(this, "pingStatsTimeout");
|
|
2673
|
+
p(this, "logger");
|
|
2674
|
+
p(this, "env");
|
|
2675
|
+
p(this, "apiHostnames");
|
|
2676
|
+
p(this, "peerId");
|
|
2677
|
+
p(this, "consumerSharedMediaStatesMap", /* @__PURE__ */ new Map());
|
|
2678
|
+
p(this, "currentUserMediaStates", {});
|
|
2679
|
+
if (!l)
|
|
2680
|
+
throw Error("authToken is missing but required to initialize CallStats!");
|
|
2681
|
+
switch (this.env = i, this.apiHostnames = d, this.logger = o, this.peerId = c, this.eventHandler = new cv({ logger: o, peerId: c, apiHostnames: d, authToken: l }), this.logger.debug("callStats::engineName: ", { engineName: r }), r) {
|
|
2664
2682
|
case "Blink":
|
|
2665
2683
|
this.measurements = new Pv();
|
|
2666
2684
|
break;
|
|
@@ -2673,10 +2691,10 @@ let K = class extends ot {
|
|
|
2673
2691
|
default:
|
|
2674
2692
|
throw Error(`Unknown engineName! ${r}`);
|
|
2675
2693
|
}
|
|
2676
|
-
this.measurements.callStatsInstance = this, this.registerProducer = this.registerProducer.bind(this), this.registerConsumer = this.registerConsumer.bind(this), this.observer = new ot(), this.measurements.observer.on("consumer_score", (
|
|
2677
|
-
o.debug(`callStats::consumer_score ${[...
|
|
2678
|
-
}), this.measurements.observer.on("producer_score", (
|
|
2679
|
-
o.debug(`callStats::producer_score ${[...
|
|
2694
|
+
this.measurements.callStatsInstance = this, this.registerProducer = this.registerProducer.bind(this), this.registerConsumer = this.registerConsumer.bind(this), this.observer = new ot(), this.measurements.observer.on("consumer_score", (h) => {
|
|
2695
|
+
o.debug(`callStats::consumer_score ${[...h.entries()]}`), this.eventHandler.emit("consumer_score", h);
|
|
2696
|
+
}), this.measurements.observer.on("producer_score", (h) => {
|
|
2697
|
+
o.debug(`callStats::producer_score ${[...h.entries()]}`), this.eventHandler.emit("producer_score", h);
|
|
2680
2698
|
});
|
|
2681
2699
|
}
|
|
2682
2700
|
registerIceServers(e) {
|
|
@@ -3235,23 +3253,34 @@ const Rv = K;
|
|
|
3235
3253
|
class pm extends ot {
|
|
3236
3254
|
constructor() {
|
|
3237
3255
|
super(...arguments);
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3256
|
+
p(this, "stats");
|
|
3257
|
+
p(this, "peerId");
|
|
3258
|
+
p(this, "backend");
|
|
3259
|
+
p(this, "iceServers");
|
|
3260
|
+
p(this, "initialized", !1);
|
|
3261
|
+
p(this, "stalled", !1);
|
|
3244
3262
|
// Initialization will never occur
|
|
3245
|
-
|
|
3246
|
-
|
|
3263
|
+
p(this, "ipInformation");
|
|
3264
|
+
p(this, "logger");
|
|
3247
3265
|
}
|
|
3248
|
-
initialize(
|
|
3249
|
-
return u(this, arguments, function* ({ peerId: e, engineName: r, env: i = ho.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags: c, logger: d = console, apiHostnames: l, skipConnectivityChecks:
|
|
3250
|
-
var
|
|
3266
|
+
initialize(f) {
|
|
3267
|
+
return u(this, arguments, function* ({ peerId: e, engineName: r, env: i = ho.PROD, iceServers: n, apiBase: o = "https://api.cluster.dyte.in", flags: c, logger: d = console, apiHostnames: l, skipConnectivityChecks: h = !1, authToken: g }) {
|
|
3268
|
+
var v, E, C;
|
|
3251
3269
|
try {
|
|
3252
|
-
this.peerId = e, this.logger = d,
|
|
3253
|
-
|
|
3254
|
-
|
|
3270
|
+
if (this.peerId = e, this.logger = d, !g) {
|
|
3271
|
+
this.logger.error("callStats::initialize", {
|
|
3272
|
+
event: "auth_token_missing",
|
|
3273
|
+
peerId: this.peerId
|
|
3274
|
+
}), this.stallCallStats();
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3277
|
+
this.ipInformation = yield dm.getIPDetails({ peerId: e, apiHostnames: l, logger: d }), this.backend = new Rv(o, r, i, c, d, e, l, g), this.iceServers = n, (v = this.backend) == null || v.registerIceServers(this.iceServers), this.initialized = !0, (C = (E = this.backend) == null ? void 0 : E.eventHandler) == null || C.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(h);
|
|
3278
|
+
} catch (_) {
|
|
3279
|
+
this.logger.error("callStats::CallStatsIntegration", {
|
|
3280
|
+
peerId: this.peerId,
|
|
3281
|
+
error: _ instanceof Error ? _.message : String(_),
|
|
3282
|
+
stack: _ instanceof Error ? _.stack : void 0
|
|
3283
|
+
}), this.stallCallStats();
|
|
3255
3284
|
}
|
|
3256
3285
|
});
|
|
3257
3286
|
}
|
|
@@ -3507,7 +3536,7 @@ class pm extends ot {
|
|
|
3507
3536
|
ivsPlayerEvent(e, r) {
|
|
3508
3537
|
const i = new Date();
|
|
3509
3538
|
this.onSafeInitialization(() => {
|
|
3510
|
-
var n, o, c, d, l,
|
|
3539
|
+
var n, o, c, d, l, h, g, f, v, E, C;
|
|
3511
3540
|
switch (e) {
|
|
3512
3541
|
case "PlayerRebuffering":
|
|
3513
3542
|
(n = this.backend) == null || n.sendIVSPlayerRebufferEvent(i);
|
|
@@ -3525,7 +3554,7 @@ class pm extends ot {
|
|
|
3525
3554
|
(l = this.backend) == null || l.sendIVSPlayerInitializedEvent(i);
|
|
3526
3555
|
break;
|
|
3527
3556
|
case "PlayerWorkerError":
|
|
3528
|
-
(
|
|
3557
|
+
(h = this.backend) == null || h.sendIVSPlayerWorkerErrorEvent(i);
|
|
3529
3558
|
break;
|
|
3530
3559
|
case "PlayerError":
|
|
3531
3560
|
(g = this.backend) == null || g.sendIVSPlayerErrorEvent(r, i);
|
|
@@ -4141,8 +4170,8 @@ function go(s, t, e, r, i, n) {
|
|
|
4141
4170
|
return o;
|
|
4142
4171
|
if (!is(s))
|
|
4143
4172
|
return s;
|
|
4144
|
-
var
|
|
4145
|
-
if (
|
|
4173
|
+
var h = Ut(s);
|
|
4174
|
+
if (h) {
|
|
4146
4175
|
if (o = oE(s), !c)
|
|
4147
4176
|
return Rm(s, o);
|
|
4148
4177
|
} else {
|
|
@@ -4167,7 +4196,7 @@ function go(s, t, e, r, i, n) {
|
|
|
4167
4196
|
}) : UE(s) && s.forEach(function(_, I) {
|
|
4168
4197
|
o.set(I, go(_, t, e, I, s, n));
|
|
4169
4198
|
});
|
|
4170
|
-
var E = l ? d ? Ky : cu : d ? Mc : Il, C =
|
|
4199
|
+
var E = l ? d ? Ky : cu : d ? Mc : Il, C = h ? void 0 : E(s);
|
|
4171
4200
|
return NT(C || s, function(_, I) {
|
|
4172
4201
|
C && (I = _, _ = s[I]), fm(o, I, go(_, t, e, I, s, n));
|
|
4173
4202
|
}), o;
|
|
@@ -4277,8 +4306,8 @@ function OP(s = []) {
|
|
|
4277
4306
|
}
|
|
4278
4307
|
var $m = class {
|
|
4279
4308
|
constructor(s = Um) {
|
|
4280
|
-
|
|
4281
|
-
|
|
4309
|
+
p(this, "flags", {});
|
|
4310
|
+
p(this, "environmentKey", null);
|
|
4282
4311
|
this.environmentKey = s;
|
|
4283
4312
|
}
|
|
4284
4313
|
identifyAndFetchFlagsWithRetry(c) {
|
|
@@ -4294,8 +4323,8 @@ var $m = class {
|
|
|
4294
4323
|
const d = JSON.parse(JSON.stringify(n)), l = Object.entries(d).map((g) => ({
|
|
4295
4324
|
trait_key: g[0],
|
|
4296
4325
|
trait_value: g[1]
|
|
4297
|
-
})),
|
|
4298
|
-
for (const g of
|
|
4326
|
+
})), h = [s, t, t];
|
|
4327
|
+
for (const g of h)
|
|
4299
4328
|
try {
|
|
4300
4329
|
const f = new AbortController(), v = setTimeout(() => f.abort(), r), E = `_${(Math.random() + 1).toString(36).substring(2)}`, C = yield fetch(`https://${g}/api/v1/identities/`, {
|
|
4301
4330
|
method: "POST",
|
|
@@ -4357,7 +4386,7 @@ var UP = (s, t, e) => {
|
|
|
4357
4386
|
if (t == 0)
|
|
4358
4387
|
r = i = n = e;
|
|
4359
4388
|
else {
|
|
4360
|
-
const o = (l,
|
|
4389
|
+
const o = (l, h, g) => (g < 0 && (g += 1), g > 1 && (g -= 1), g < 0.16666666666666666 ? l + (h - l) * 6 * g : g < 0.5 ? h : g < 0.6666666666666666 ? l + (h - l) * (0.6666666666666666 - g) * 6 : l), c = e < 0.5 ? e * (1 + t) : e + t - e * t, d = 2 * e - c;
|
|
4361
4390
|
r = o(d, c, s + 1 / 3), i = o(d, c, s), n = o(d, c, s - 1 / 3);
|
|
4362
4391
|
}
|
|
4363
4392
|
return [Math.round(r * 255), Math.round(i * 255), Math.round(n * 255)];
|
|
@@ -4388,15 +4417,15 @@ var UP = (s, t, e) => {
|
|
|
4388
4417
|
const r = (i) => i.toString(16).padStart(2, "0");
|
|
4389
4418
|
return `#${r(s)}${r(t)}${r(e)}`;
|
|
4390
4419
|
}, Bm = (s, t = Fm, e = 0.4) => {
|
|
4391
|
-
const r = [], [i, n, o] = xP(s), [c, d, l] = $P(i, n, o),
|
|
4392
|
-
|
|
4420
|
+
const r = [], [i, n, o] = xP(s), [c, d, l] = $P(i, n, o), h = Math.round(l * 100);
|
|
4421
|
+
h > 70 ? e = 0.8 : h > 60 ? e = 0.9 : h < 10 ? e = 0.075 : h < 42 && (e = 0.3);
|
|
4393
4422
|
const g = t.findIndex((_) => _ === 0);
|
|
4394
4423
|
if (g === -1)
|
|
4395
4424
|
throw new Error("Invalid reducer provided, it must contain atleast one zero");
|
|
4396
|
-
const f = 5 - g, v = g + 1, E = (100 -
|
|
4425
|
+
const f = 5 - g, v = g + 1, E = (100 - h) / f, C = h / v;
|
|
4397
4426
|
for (const _ of t) {
|
|
4398
4427
|
let I;
|
|
4399
|
-
_ < 0 ? I =
|
|
4428
|
+
_ < 0 ? I = h + _ * C * e : _ > 0 ? I = h + _ * E * e : I = h;
|
|
4400
4429
|
const [M, U, L] = UP(c, d, I / 100);
|
|
4401
4430
|
r.push(FP(M, U, L));
|
|
4402
4431
|
}
|
|
@@ -4822,8 +4851,8 @@ const xh = class extends ot.EventEmitter {
|
|
|
4822
4851
|
super();
|
|
4823
4852
|
m(this, Hs, void 0);
|
|
4824
4853
|
m(this, qs, void 0);
|
|
4825
|
-
|
|
4826
|
-
|
|
4854
|
+
p(this, "asyncPromiseTimeout");
|
|
4855
|
+
p(this, "logger");
|
|
4827
4856
|
this.logger = e, S(this, Hs, /* @__PURE__ */ new Map()), S(this, qs, /* @__PURE__ */ new Map()), this.asyncPromiseTimeout = 8e3;
|
|
4828
4857
|
}
|
|
4829
4858
|
emitAsync(e, ...r) {
|
|
@@ -5034,9 +5063,9 @@ function Gm(s, t, e, r, i, n) {
|
|
|
5034
5063
|
var o = e & N_, c = s.length, d = t.length;
|
|
5035
5064
|
if (c != d && !(o && d > c))
|
|
5036
5065
|
return !1;
|
|
5037
|
-
var l = n.get(s),
|
|
5038
|
-
if (l &&
|
|
5039
|
-
return l == t &&
|
|
5066
|
+
var l = n.get(s), h = n.get(t);
|
|
5067
|
+
if (l && h)
|
|
5068
|
+
return l == t && h == s;
|
|
5040
5069
|
var g = -1, f = !0, v = e & V_ ? new Co() : void 0;
|
|
5041
5070
|
for (n.set(s, t), n.set(t, s); ++g < c; ) {
|
|
5042
5071
|
var E = s[g], C = t[g];
|
|
@@ -5103,8 +5132,8 @@ function Y_(s, t, e, r, i, n, o) {
|
|
|
5103
5132
|
if (l)
|
|
5104
5133
|
return l == t;
|
|
5105
5134
|
r |= U_, o.set(s, t);
|
|
5106
|
-
var
|
|
5107
|
-
return o.delete(s),
|
|
5135
|
+
var h = Gm(c(s), c(t), r, i, n, o);
|
|
5136
|
+
return o.delete(s), h;
|
|
5108
5137
|
case J_:
|
|
5109
5138
|
if (Yl)
|
|
5110
5139
|
return Yl.call(s) == Yl.call(t);
|
|
@@ -5113,8 +5142,8 @@ function Y_(s, t, e, r, i, n, o) {
|
|
|
5113
5142
|
}
|
|
5114
5143
|
var Q_ = 1, X_ = Object.prototype, Z_ = X_.hasOwnProperty;
|
|
5115
5144
|
function eC(s, t, e, r, i, n) {
|
|
5116
|
-
var o = e & Q_, c = cu(s), d = c.length, l = cu(t),
|
|
5117
|
-
if (d !=
|
|
5145
|
+
var o = e & Q_, c = cu(s), d = c.length, l = cu(t), h = l.length;
|
|
5146
|
+
if (d != h && !o)
|
|
5118
5147
|
return !1;
|
|
5119
5148
|
for (var g = d; g--; ) {
|
|
5120
5149
|
var f = c[g];
|
|
@@ -5147,16 +5176,16 @@ var tC = 1, _p = "[object Arguments]", Cp = "[object Array]", Hc = "[object Obje
|
|
|
5147
5176
|
function rC(s, t, e, r, i, n) {
|
|
5148
5177
|
var o = Ut(s), c = Ut(t), d = o ? Cp : Ia(s), l = c ? Cp : Ia(t);
|
|
5149
5178
|
d = d == _p ? Hc : d, l = l == _p ? Hc : l;
|
|
5150
|
-
var
|
|
5179
|
+
var h = d == Hc, g = l == Hc, f = d == l;
|
|
5151
5180
|
if (f && ba(s)) {
|
|
5152
5181
|
if (!ba(t))
|
|
5153
5182
|
return !1;
|
|
5154
|
-
o = !0,
|
|
5183
|
+
o = !0, h = !1;
|
|
5155
5184
|
}
|
|
5156
|
-
if (f && !
|
|
5185
|
+
if (f && !h)
|
|
5157
5186
|
return n || (n = new Es()), o || bl(s) ? Gm(s, t, e, r, i, n) : Y_(s, t, d, e, r, i, n);
|
|
5158
5187
|
if (!(e & tC)) {
|
|
5159
|
-
var v =
|
|
5188
|
+
var v = h && Rp.call(s, "__wrapped__"), E = g && Rp.call(t, "__wrapped__");
|
|
5160
5189
|
if (v || E) {
|
|
5161
5190
|
var C = v ? s.value() : s, _ = E ? t.value() : t;
|
|
5162
5191
|
return n || (n = new Es()), i(C, _, e, r, n);
|
|
@@ -5179,15 +5208,15 @@ function aC(s, t, e, r) {
|
|
|
5179
5208
|
}
|
|
5180
5209
|
for (; ++i < n; ) {
|
|
5181
5210
|
c = e[i];
|
|
5182
|
-
var d = c[0], l = s[d],
|
|
5211
|
+
var d = c[0], l = s[d], h = c[1];
|
|
5183
5212
|
if (o && c[2]) {
|
|
5184
5213
|
if (l === void 0 && !(d in s))
|
|
5185
5214
|
return !1;
|
|
5186
5215
|
} else {
|
|
5187
5216
|
var g = new Es();
|
|
5188
5217
|
if (r)
|
|
5189
|
-
var f = r(l,
|
|
5190
|
-
if (!(f === void 0 ? Dl(
|
|
5218
|
+
var f = r(l, h, d, s, t, g);
|
|
5219
|
+
if (!(f === void 0 ? Dl(h, l, iC | nC, r, g) : f))
|
|
5191
5220
|
return !1;
|
|
5192
5221
|
}
|
|
5193
5222
|
}
|
|
@@ -5261,16 +5290,16 @@ var EC = function() {
|
|
|
5261
5290
|
const Ql = EC;
|
|
5262
5291
|
var PC = "Expected a function", _C = Math.max, CC = Math.min;
|
|
5263
5292
|
function vh(s, t, e) {
|
|
5264
|
-
var r, i, n, o, c, d, l = 0,
|
|
5293
|
+
var r, i, n, o, c, d, l = 0, h = !1, g = !1, f = !0;
|
|
5265
5294
|
if (typeof s != "function")
|
|
5266
5295
|
throw new TypeError(PC);
|
|
5267
|
-
t = yp(t) || 0, is(e) && (
|
|
5296
|
+
t = yp(t) || 0, is(e) && (h = !!e.leading, g = "maxWait" in e, n = g ? _C(yp(e.maxWait) || 0, t) : n, f = "trailing" in e ? !!e.trailing : f);
|
|
5268
5297
|
function v(G) {
|
|
5269
5298
|
var se = r, Ge = i;
|
|
5270
5299
|
return r = i = void 0, l = G, o = s.apply(Ge, se), o;
|
|
5271
5300
|
}
|
|
5272
5301
|
function E(G) {
|
|
5273
|
-
return l = G, c = setTimeout(I, t),
|
|
5302
|
+
return l = G, c = setTimeout(I, t), h ? v(G) : o;
|
|
5274
5303
|
}
|
|
5275
5304
|
function C(G) {
|
|
5276
5305
|
var se = G - d, Ge = G - l, ns = t - se;
|
|
@@ -5326,12 +5355,12 @@ function bC(s, t, e, r, i, n, o) {
|
|
|
5326
5355
|
pu(s, e, l);
|
|
5327
5356
|
return;
|
|
5328
5357
|
}
|
|
5329
|
-
var
|
|
5358
|
+
var h = n ? n(c, d, e + "", s, t, o) : void 0, g = h === void 0;
|
|
5330
5359
|
if (g) {
|
|
5331
5360
|
var f = Ut(d), v = !f && ba(d), E = !f && !v && bl(d);
|
|
5332
|
-
|
|
5361
|
+
h = d, f || v || E ? Ut(c) ? h = c : RC(c) ? h = Rm(c) : v ? (g = !1, h = Cm(d, !0)) : E ? (g = !1, h = Am(d, !0)) : h = [] : b_(d) || _o(d) ? (h = c, _o(c) ? h = wC(c) : (!is(c) || ih(c)) && (h = Mm(d))) : g = !1;
|
|
5333
5362
|
}
|
|
5334
|
-
g && (o.set(d,
|
|
5363
|
+
g && (o.set(d, h), i(h, d, r, n, o), o.delete(d)), pu(s, e, h);
|
|
5335
5364
|
}
|
|
5336
5365
|
function Km(s, t, e, r, i) {
|
|
5337
5366
|
s !== t && yC(t, function(n, o) {
|
|
@@ -5390,14 +5419,14 @@ function zm(s, t, e) {
|
|
|
5390
5419
|
d = t ? [] : c;
|
|
5391
5420
|
e:
|
|
5392
5421
|
for (; ++r < n; ) {
|
|
5393
|
-
var
|
|
5394
|
-
if (
|
|
5422
|
+
var h = s[r], g = t ? t(h) : h;
|
|
5423
|
+
if (h = e || h !== 0 ? h : 0, o && g === g) {
|
|
5395
5424
|
for (var f = d.length; f--; )
|
|
5396
5425
|
if (d[f] === g)
|
|
5397
5426
|
continue e;
|
|
5398
|
-
t && d.push(g), c.push(
|
|
5427
|
+
t && d.push(g), c.push(h);
|
|
5399
5428
|
} else
|
|
5400
|
-
i(d, g, e) || (d !== c && d.push(g), c.push(
|
|
5429
|
+
i(d, g, e) || (d !== c && d.push(g), c.push(h));
|
|
5401
5430
|
}
|
|
5402
5431
|
return c;
|
|
5403
5432
|
}
|
|
@@ -5580,16 +5609,16 @@ function wp(s, t, e = {}, r = "") {
|
|
|
5580
5609
|
}
|
|
5581
5610
|
class P {
|
|
5582
5611
|
constructor() {
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5612
|
+
p(this, "logsCache", []);
|
|
5613
|
+
p(this, "logsProcessorTimer");
|
|
5614
|
+
p(this, "tracingEnabled", !0);
|
|
5615
|
+
p(this, "initialized", !1);
|
|
5587
5616
|
/**
|
|
5588
5617
|
* NOTE(ravindra-cloudflare)
|
|
5589
5618
|
* Periodically send logs to Log Aggregator. Current period: 7 secs
|
|
5590
5619
|
*/
|
|
5591
|
-
|
|
5592
|
-
|
|
5620
|
+
p(this, "logsProcessingInterval", 7e3);
|
|
5621
|
+
p(this, "logExclusionList", [
|
|
5593
5622
|
"message",
|
|
5594
5623
|
"websocket/message",
|
|
5595
5624
|
"roomMessage",
|
|
@@ -5608,7 +5637,7 @@ class P {
|
|
|
5608
5637
|
"websocket/plugin-data",
|
|
5609
5638
|
"websocket/plugin-internal-data"
|
|
5610
5639
|
]);
|
|
5611
|
-
|
|
5640
|
+
p(this, "meetingMetadata", {});
|
|
5612
5641
|
}
|
|
5613
5642
|
get logsEndpoint() {
|
|
5614
5643
|
const t = lr.getContext(this.meetingMetadata.peerId);
|
|
@@ -5639,16 +5668,16 @@ class P {
|
|
|
5639
5668
|
if (!l || !l.initialized || navigator.isReactNative || !l.tracingEnabled || (f = lr.getContext(l.meetingMetadata.peerId)) != null && f.getValue("flagsmith").hasFeature(te.SKIP_OTEL_TRACES))
|
|
5640
5669
|
return o.apply(this, d);
|
|
5641
5670
|
l.addLogInCurrentSpan("info", t, e);
|
|
5642
|
-
const
|
|
5671
|
+
const h = performance.now(), g = o.apply(this, d);
|
|
5643
5672
|
return Promise.resolve(g).then(() => {
|
|
5644
5673
|
const v = performance.now();
|
|
5645
|
-
v -
|
|
5646
|
-
execTime: v -
|
|
5674
|
+
v - h > 10 && l.addLogInCurrentSpan("info", `${t}_timing`, {
|
|
5675
|
+
execTime: v - h
|
|
5647
5676
|
});
|
|
5648
5677
|
}).catch(() => {
|
|
5649
5678
|
const v = performance.now();
|
|
5650
5679
|
l.addLogInCurrentSpan("info", `${t}_timing`, {
|
|
5651
|
-
execTime: v -
|
|
5680
|
+
execTime: v - h
|
|
5652
5681
|
});
|
|
5653
5682
|
}), g;
|
|
5654
5683
|
}, n;
|
|
@@ -5741,15 +5770,15 @@ class P {
|
|
|
5741
5770
|
}
|
|
5742
5771
|
}
|
|
5743
5772
|
function YC(s) {
|
|
5744
|
-
const t = O({}, s), e = /* @__PURE__ */ new Map(), r = (l,
|
|
5773
|
+
const t = O({}, s), e = /* @__PURE__ */ new Map(), r = (l, h) => (e.has(l) || e.set(l, /* @__PURE__ */ new Set()), e.get(l).add(h), () => {
|
|
5745
5774
|
var g;
|
|
5746
|
-
return (g = e.get(l)) == null ? void 0 : g.delete(
|
|
5747
|
-
}), i = (l,
|
|
5775
|
+
return (g = e.get(l)) == null ? void 0 : g.delete(h);
|
|
5776
|
+
}), i = (l, h) => {
|
|
5748
5777
|
var g;
|
|
5749
|
-
(g = e.get(l)) == null || g.delete(
|
|
5778
|
+
(g = e.get(l)) == null || g.delete(h);
|
|
5750
5779
|
}, n = (l) => {
|
|
5751
|
-
var
|
|
5752
|
-
(
|
|
5780
|
+
var h;
|
|
5781
|
+
(h = e.get(l)) == null || h.forEach((g) => {
|
|
5753
5782
|
try {
|
|
5754
5783
|
g(t[l]);
|
|
5755
5784
|
} catch (f) {
|
|
@@ -5760,8 +5789,8 @@ function YC(s) {
|
|
|
5760
5789
|
subscribe: r,
|
|
5761
5790
|
unsubscribe: i,
|
|
5762
5791
|
notify: n,
|
|
5763
|
-
setValue: (l,
|
|
5764
|
-
t[l] =
|
|
5792
|
+
setValue: (l, h, g = !0) => {
|
|
5793
|
+
t[l] = h, g && n(l);
|
|
5765
5794
|
},
|
|
5766
5795
|
getValue: (l) => t[l],
|
|
5767
5796
|
getAllValues: () => t
|
|
@@ -5769,12 +5798,12 @@ function YC(s) {
|
|
|
5769
5798
|
}
|
|
5770
5799
|
class QC {
|
|
5771
5800
|
constructor() {
|
|
5772
|
-
|
|
5801
|
+
p(this, "contexts", /* @__PURE__ */ new Map());
|
|
5773
5802
|
/**
|
|
5774
5803
|
* @deprecated
|
|
5775
5804
|
* Returns the most recent peer id with which Client.init was called
|
|
5776
5805
|
*/
|
|
5777
|
-
|
|
5806
|
+
p(this, "mostRecentPeerId", null);
|
|
5778
5807
|
}
|
|
5779
5808
|
createContext(t, e) {
|
|
5780
5809
|
if (this.contexts.has(t))
|
|
@@ -5925,7 +5954,7 @@ Object.keys(td).forEach((s) => {
|
|
|
5925
5954
|
class k extends Error {
|
|
5926
5955
|
constructor(e, r, i = void 0, n = !1) {
|
|
5927
5956
|
super(e);
|
|
5928
|
-
|
|
5957
|
+
p(this, "code");
|
|
5929
5958
|
this.code = r, this.name = "ClientError";
|
|
5930
5959
|
const o = this.code ? `[ERR${this.code}]` : "[ERR]", c = this.code ? td[this.code] : "";
|
|
5931
5960
|
this.message = `${o}: ${c}
|
|
@@ -5937,9 +5966,9 @@ ${this.message}`;
|
|
|
5937
5966
|
});
|
|
5938
5967
|
const l = lr.getContext(lr.getMostRecentPeerId());
|
|
5939
5968
|
if (l) {
|
|
5940
|
-
const
|
|
5969
|
+
const h = l.getValue("onError");
|
|
5941
5970
|
try {
|
|
5942
|
-
|
|
5971
|
+
h(this);
|
|
5943
5972
|
} catch (g) {
|
|
5944
5973
|
}
|
|
5945
5974
|
}
|
|
@@ -6051,7 +6080,7 @@ var w = /* @__PURE__ */ ((s) => (s.NEW_PRODUCER = "NEW_PRODUCER", s.ROOM_NODE_CO
|
|
|
6051
6080
|
class Da extends ot.EventEmitter {
|
|
6052
6081
|
constructor(e) {
|
|
6053
6082
|
super();
|
|
6054
|
-
|
|
6083
|
+
p(this, "logger");
|
|
6055
6084
|
this.logger = e, super.setMaxListeners(25);
|
|
6056
6085
|
}
|
|
6057
6086
|
emit(e, ...r) {
|
|
@@ -6113,7 +6142,7 @@ class Da extends ot.EventEmitter {
|
|
|
6113
6142
|
class Bt extends ot.EventEmitter {
|
|
6114
6143
|
constructor(e) {
|
|
6115
6144
|
super();
|
|
6116
|
-
|
|
6145
|
+
p(this, "logger");
|
|
6117
6146
|
this.logger = e, super.setMaxListeners(25);
|
|
6118
6147
|
}
|
|
6119
6148
|
emit(e, ...r) {
|
|
@@ -6177,8 +6206,8 @@ function sR(s, t = 2) {
|
|
|
6177
6206
|
}
|
|
6178
6207
|
const kp = 1080, Ip = 1920, rR = (s, t, e, r, i, n) => {
|
|
6179
6208
|
let o = 0.5, c = 0.5;
|
|
6180
|
-
const d = i, l = n,
|
|
6181
|
-
let g = d *
|
|
6209
|
+
const d = i, l = n, h = Math.min(e / d, r / l);
|
|
6210
|
+
let g = d * h, f = l * h, v, E, C, _, I = 1;
|
|
6182
6211
|
return g < e && (I = e / g), Math.abs(I - 1) < 1e-14 && f < r && (I = r / f), g *= I, f *= I, C = d / (g / e), _ = l / (f / r), v = (d - C) * o, E = (l - _) * c, v < 0 && (v = 0), E < 0 && (E = 0), C > d && (C = d), _ > l && (_ = l), [v, E, C, _, s, t, e, r];
|
|
6183
6212
|
};
|
|
6184
6213
|
var Gt, ui, tt, Wt, we, ds, js, lt, De, kn, In, Gs, An;
|
|
@@ -6214,28 +6243,28 @@ const Uh = class extends Bt {
|
|
|
6214
6243
|
m(this, In, void 0);
|
|
6215
6244
|
m(this, Gs, void 0);
|
|
6216
6245
|
m(this, An, !1);
|
|
6217
|
-
|
|
6246
|
+
p(this, "cleanupEventListeners", () => {
|
|
6218
6247
|
a(this, ui).unsubscribe("stageStatus", this.handlePipMediaControls), a(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, De).removeListener("roomLeft", () => this.disable());
|
|
6219
6248
|
});
|
|
6220
|
-
|
|
6249
|
+
p(this, "enablePipMediaControls", () => {
|
|
6221
6250
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
6222
6251
|
});
|
|
6223
|
-
|
|
6252
|
+
p(this, "onSelfVideoUpdateListener", ({ videoEnabled: e }) => {
|
|
6224
6253
|
this.updateMediaSession("CAMERA", e);
|
|
6225
6254
|
});
|
|
6226
|
-
|
|
6255
|
+
p(this, "onSelfAudioUpdateListener", ({ audioEnabled: e }) => {
|
|
6227
6256
|
this.updateMediaSession("MIC", e);
|
|
6228
6257
|
});
|
|
6229
|
-
|
|
6258
|
+
p(this, "handlePipMediaControls", (e) => {
|
|
6230
6259
|
e === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
6231
6260
|
});
|
|
6232
|
-
|
|
6261
|
+
p(this, "eventCallback", (e) => {
|
|
6233
6262
|
e === "CAMERA" && (a(this, De).videoEnabled ? a(this, De).disableVideo() : a(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (a(this, De).audioEnabled ? a(this, De).disableAudio() : a(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (a(this, ui).getValue("peerSessionStore").emit(w.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
6234
6263
|
});
|
|
6235
|
-
|
|
6264
|
+
p(this, "unmountEvents", () => {
|
|
6236
6265
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
6237
6266
|
});
|
|
6238
|
-
|
|
6267
|
+
p(this, "animate", () => {
|
|
6239
6268
|
if (!this.isActive && a(this, Gs) === "active") {
|
|
6240
6269
|
this.disable(!0);
|
|
6241
6270
|
return;
|
|
@@ -6245,7 +6274,7 @@ const Uh = class extends Bt {
|
|
|
6245
6274
|
/**
|
|
6246
6275
|
* Disable PiP
|
|
6247
6276
|
*/
|
|
6248
|
-
|
|
6277
|
+
p(this, "disable", (e = !1) => {
|
|
6249
6278
|
S(this, Gs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(a(this, js)), e !== !0 && document.body.removeChild(a(this, tt)), S(this, js, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6250
6279
|
});
|
|
6251
6280
|
S(this, ui, e), S(this, Gs, "idle"), S(this, De, r), S(this, ds, {
|
|
@@ -6337,38 +6366,38 @@ const Uh = class extends Bt {
|
|
|
6337
6366
|
drawEmptyTile(e, r, i, n) {
|
|
6338
6367
|
if (a(this, Gt) === void 0)
|
|
6339
6368
|
return;
|
|
6340
|
-
const o = a(this, Gt).getContext("2d"), c = a(this, Gt).width, d = 0, l = 0,
|
|
6341
|
-
o.fillStyle = I || M ? a(this, ds).videoBackground : a(this, ds).background, o.strokeStyle = a(this, ds).brand, o.beginPath(), o.moveTo(C + l, _), o.arcTo(C +
|
|
6342
|
-
C +
|
|
6369
|
+
const o = a(this, Gt).getContext("2d"), c = a(this, Gt).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, f = Math.floor(c / h), v = Math.floor(e / f), C = e % f * (h + d) + d, _ = v * (g + d) + d, { displayText: I, image: M } = n != null ? n : {};
|
|
6370
|
+
o.fillStyle = I || M ? a(this, ds).videoBackground : a(this, ds).background, o.strokeStyle = a(this, ds).brand, o.beginPath(), o.moveTo(C + l, _), o.arcTo(C + h, _, C + h, _ + l, l), o.arcTo(
|
|
6371
|
+
C + h,
|
|
6343
6372
|
_ + g,
|
|
6344
|
-
C +
|
|
6373
|
+
C + h - l,
|
|
6345
6374
|
_ + g,
|
|
6346
6375
|
l
|
|
6347
6376
|
), o.arcTo(C, _ + g, C, _ + g - l, l), o.arcTo(C, _, C + l, _, l), o.closePath(), o.fill(), o.stroke();
|
|
6348
|
-
const U =
|
|
6377
|
+
const U = h / 6, L = h / 2 + C, B = g / 2 + _;
|
|
6349
6378
|
o.save(), (I || M) && (o.beginPath(), o.arc(L, B, U, 0, Math.PI * 2), o.fillStyle = a(this, ds).brand, o.fill(), M ? (o.clip(), o.drawImage(
|
|
6350
6379
|
M,
|
|
6351
6380
|
L - U,
|
|
6352
6381
|
B - U,
|
|
6353
6382
|
U * 2,
|
|
6354
6383
|
U * 2
|
|
6355
|
-
), o.restore()) : I && (o.fillStyle = a(this, ds).textOnBrand, o.font = `${U / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(I, L, B)), this.drawIcons(n, C, _, Math.max(
|
|
6384
|
+
), o.restore()) : I && (o.fillStyle = a(this, ds).textOnBrand, o.font = `${U / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(I, L, B)), this.drawIcons(n, C, _, Math.max(h, g)));
|
|
6356
6385
|
}
|
|
6357
6386
|
drawIcons(e, r, i, n) {
|
|
6358
6387
|
const o = Math.min(Math.max(n * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
6359
6388
|
let l = r + c;
|
|
6360
|
-
const
|
|
6389
|
+
const h = i + c, g = (f) => {
|
|
6361
6390
|
const v = a(this, Gt).getContext("2d");
|
|
6362
|
-
v.save(), v.fillStyle = a(this, ds).background, v.beginPath(), v.moveTo(l + d,
|
|
6391
|
+
v.save(), v.fillStyle = a(this, ds).background, v.beginPath(), v.moveTo(l + d, h), v.arcTo(l + o, h, l + o, h + d, d), v.arcTo(
|
|
6363
6392
|
l + o,
|
|
6364
|
-
|
|
6393
|
+
h + o,
|
|
6365
6394
|
l + o - d,
|
|
6366
|
-
|
|
6395
|
+
h + o,
|
|
6367
6396
|
d
|
|
6368
|
-
), v.arcTo(l,
|
|
6397
|
+
), v.arcTo(l, h + o, l, h + o - d, d), v.arcTo(l, h, l + d, h, d), v.closePath(), v.fill(), typeof f == "string" ? (v.font = `${o / 1.5}px sans-serif`, v.fillStyle = a(this, ds).text, v.textAlign = "center", v.textBaseline = "top", v.fillText(f, o / 2 + l, h + c)) : v.drawImage(
|
|
6369
6398
|
f,
|
|
6370
6399
|
l + c,
|
|
6371
|
-
|
|
6400
|
+
h + c,
|
|
6372
6401
|
o - c * 2,
|
|
6373
6402
|
o - c * 2
|
|
6374
6403
|
), l += o + c, v.restore();
|
|
@@ -6376,7 +6405,7 @@ const Uh = class extends Bt {
|
|
|
6376
6405
|
e.pinned && g(a(this, kn)), e.handRaised && g(a(this, In)), e.reaction && g(e.reaction);
|
|
6377
6406
|
}
|
|
6378
6407
|
drawTile(e, r, i) {
|
|
6379
|
-
var l,
|
|
6408
|
+
var l, h;
|
|
6380
6409
|
if (a(this, Gt) === void 0)
|
|
6381
6410
|
return;
|
|
6382
6411
|
const n = a(this, Gt).getContext("2d"), o = this.getSources();
|
|
@@ -6393,7 +6422,7 @@ const Uh = class extends Bt {
|
|
|
6393
6422
|
f.videoWidth,
|
|
6394
6423
|
f.videoHeight
|
|
6395
6424
|
);
|
|
6396
|
-
((
|
|
6425
|
+
((h = f == null ? void 0 : f.classList) == null ? void 0 : h.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(f, v, E, C, _, -1 * I, M, -1 * U, L), n.restore()) : n.drawImage(f, v, E, C, _, I, M, U, L), this.drawIcons(o[d], I, M, Math.max(U, L));
|
|
6397
6426
|
} else
|
|
6398
6427
|
this.drawEmptyTile(d, e, r, o[d]);
|
|
6399
6428
|
d += 1, g += e;
|
|
@@ -11982,7 +12011,7 @@ function Td(s, t = {}) {
|
|
|
11982
12011
|
}
|
|
11983
12012
|
class Zp {
|
|
11984
12013
|
constructor(t) {
|
|
11985
|
-
|
|
12014
|
+
p(this, "defaults");
|
|
11986
12015
|
this.defaults = {
|
|
11987
12016
|
baseURL: t.baseURL,
|
|
11988
12017
|
headers: { common: {} },
|
|
@@ -12010,7 +12039,7 @@ class Zp {
|
|
|
12010
12039
|
method: e,
|
|
12011
12040
|
headers: i,
|
|
12012
12041
|
body: e !== "GET" && e !== "HEAD" && t.data ? o : void 0
|
|
12013
|
-
}, d = t.timeout || this.defaults.timeout, l = t.retry !== void 0 ? t.retry : this.defaults.retry,
|
|
12042
|
+
}, d = t.timeout || this.defaults.timeout, l = t.retry !== void 0 ? t.retry : this.defaults.retry, h = t.retryDelay || this.defaults.retryDelay;
|
|
12014
12043
|
try {
|
|
12015
12044
|
const f = new AbortController(), v = setTimeout(() => f.abort(), d);
|
|
12016
12045
|
c.signal = f.signal;
|
|
@@ -12035,7 +12064,7 @@ class Zp {
|
|
|
12035
12064
|
return M;
|
|
12036
12065
|
} catch (f) {
|
|
12037
12066
|
if (f instanceof Error && l > 0)
|
|
12038
|
-
return yield new Promise((v) => setTimeout(v,
|
|
12067
|
+
return yield new Promise((v) => setTimeout(v, h)), this.defaults.baseURL === li.apiBase.prod ? this.defaults.baseURL = li.apiBase.prodAlternate : this.defaults.baseURL === li.apiBase.prodAlternate && (this.defaults.baseURL = li.apiBase.prod), this.request(j(O({}, t), {
|
|
12039
12068
|
retry: l - 1
|
|
12040
12069
|
}));
|
|
12041
12070
|
throw f;
|
|
@@ -12072,17 +12101,17 @@ class Zp {
|
|
|
12072
12101
|
const SM = 3, vM = 30, TM = 8e3;
|
|
12073
12102
|
class yM {
|
|
12074
12103
|
constructor(t, e) {
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12104
|
+
p(this, "fetchClient");
|
|
12105
|
+
p(this, "requests");
|
|
12106
|
+
p(this, "roomName");
|
|
12107
|
+
p(this, "roomUUID");
|
|
12108
|
+
p(this, "authToken");
|
|
12109
|
+
p(this, "organizationId");
|
|
12110
|
+
p(this, "iceServers");
|
|
12111
|
+
p(this, "pluginInformation");
|
|
12112
|
+
p(this, "userDetails");
|
|
12113
|
+
p(this, "roomDetails");
|
|
12114
|
+
p(this, "context");
|
|
12086
12115
|
this.context = t;
|
|
12087
12116
|
const {
|
|
12088
12117
|
timeout: r = TM,
|
|
@@ -12107,19 +12136,19 @@ class yM {
|
|
|
12107
12136
|
responseType: "json"
|
|
12108
12137
|
}), this.setAuthToken(c, { bearer: !0 });
|
|
12109
12138
|
const l = this.requests.request.bind(this.requests);
|
|
12110
|
-
this.requests.request = (
|
|
12139
|
+
this.requests.request = (h) => u(this, null, function* () {
|
|
12111
12140
|
var f, v, E, C, _;
|
|
12112
12141
|
const g = t.getValue("telemetry");
|
|
12113
12142
|
try {
|
|
12114
12143
|
g.injectContext(this.requests.defaults.headers.common);
|
|
12115
|
-
const I = yield l(
|
|
12116
|
-
return
|
|
12144
|
+
const I = yield l(h);
|
|
12145
|
+
return h.url !== g.logsEndpoint && this.logger.debug("xhr::fetch", {
|
|
12117
12146
|
networkCall: {
|
|
12118
12147
|
status: I.status,
|
|
12119
12148
|
statusText: I.statusText,
|
|
12120
|
-
baseURL:
|
|
12121
|
-
url:
|
|
12122
|
-
method:
|
|
12149
|
+
baseURL: h.baseURL || this.requests.defaults.baseURL,
|
|
12150
|
+
url: h.url,
|
|
12151
|
+
method: h.method
|
|
12123
12152
|
}
|
|
12124
12153
|
}), I;
|
|
12125
12154
|
} catch (I) {
|
|
@@ -12173,7 +12202,7 @@ class Cs extends yM {
|
|
|
12173
12202
|
* @access private
|
|
12174
12203
|
* Not for external use
|
|
12175
12204
|
*/
|
|
12176
|
-
|
|
12205
|
+
p(this, "telemetry");
|
|
12177
12206
|
this.telemetry = e.getValue("telemetry"), this.setHeader("x-realtimekit-version", e.getValue("sdkVersion"));
|
|
12178
12207
|
}
|
|
12179
12208
|
getICEServers() {
|
|
@@ -12187,14 +12216,14 @@ class Cs extends yM {
|
|
|
12187
12216
|
}
|
|
12188
12217
|
getPlugins() {
|
|
12189
12218
|
return u(this, null, function* () {
|
|
12190
|
-
var n, o, c, d, l,
|
|
12219
|
+
var n, o, c, d, l, h, g;
|
|
12191
12220
|
if (this.pluginInformation)
|
|
12192
12221
|
return this.pluginInformation;
|
|
12193
12222
|
const { plugins: e } = (yield this.requests.get("/v2/plugins/user")).data.data, r = ((o = (n = this.context.getValue("flagsmith").getValue(te.V1_PLUGINS)) == null ? void 0 : n.toString()) == null ? void 0 : o.split(",")) || [], i = e.reduce(
|
|
12194
12223
|
(f, v) => (f[r.includes(v.id) ? "v1" : "v2"].push(j(O({}, v), { name: v.name.replace("v2", "") })), f),
|
|
12195
12224
|
{ v1: [], v2: [] }
|
|
12196
12225
|
);
|
|
12197
|
-
return (l = (d = (c = this.context.getValue("modules")) == null ? void 0 : c.devTools) == null ? void 0 : d.plugins) != null && l.length && ((g = (
|
|
12226
|
+
return (l = (d = (c = this.context.getValue("modules")) == null ? void 0 : c.devTools) == null ? void 0 : d.plugins) != null && l.length && ((g = (h = this.context.getValue("modules")) == null ? void 0 : h.devTools) == null || g.plugins.forEach((f) => {
|
|
12198
12227
|
var E, C, _;
|
|
12199
12228
|
const v = j(O({}, Za), {
|
|
12200
12229
|
tags: [...Za.tags],
|
|
@@ -12409,9 +12438,9 @@ function wt(s, t) {
|
|
|
12409
12438
|
const n = i.value;
|
|
12410
12439
|
let o = 0, c = Date.now();
|
|
12411
12440
|
return i.value = function(...d) {
|
|
12412
|
-
const l = Date.now(),
|
|
12413
|
-
if (l - c >
|
|
12414
|
-
throw new k(`Method rate limit ${
|
|
12441
|
+
const l = Date.now(), h = t ? this[t] : s;
|
|
12442
|
+
if (l - c > h.period * 1e3 && (c = l, o = 0), o >= h.maxInvocations)
|
|
12443
|
+
throw new k(`Method rate limit ${h.maxInvocations} invocations/${h.period}sec exceeded`, "0013");
|
|
12415
12444
|
return o += 1, n.apply(this, d);
|
|
12416
12445
|
}, i;
|
|
12417
12446
|
};
|
|
@@ -12448,12 +12477,12 @@ let $t = (mg = class extends Bt {
|
|
|
12448
12477
|
*
|
|
12449
12478
|
* An array of chat messages.
|
|
12450
12479
|
*/
|
|
12451
|
-
|
|
12480
|
+
p(this, "messages");
|
|
12452
12481
|
m(this, re, void 0);
|
|
12453
12482
|
m(this, hi, void 0);
|
|
12454
12483
|
m(this, We, void 0);
|
|
12455
12484
|
m(this, Dn, void 0);
|
|
12456
|
-
|
|
12485
|
+
p(this, "maxTextLimit", 2e3);
|
|
12457
12486
|
S(this, Dn, t), S(this, We, e), S(this, re, r), S(this, hi, i), this.messages = [];
|
|
12458
12487
|
}
|
|
12459
12488
|
/**
|
|
@@ -12512,7 +12541,7 @@ let $t = (mg = class extends Bt {
|
|
|
12512
12541
|
if (!t)
|
|
12513
12542
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new k("Message can not be empty.", "0502");
|
|
12514
12543
|
let r = [];
|
|
12515
|
-
e && e.length > 0 && (e.push(a(this, re).id), r = a(this, hi).joined.toArray().filter((
|
|
12544
|
+
e && e.length > 0 && (e.push(a(this, re).id), r = a(this, hi).joined.toArray().filter((h) => e.includes(h.id)).map((h) => h.userId), r.push(a(this, re).userId)), a(this, We).sendMessage(
|
|
12516
12545
|
t,
|
|
12517
12546
|
ss.TEXT,
|
|
12518
12547
|
e
|
|
@@ -12544,15 +12573,15 @@ let $t = (mg = class extends Bt {
|
|
|
12544
12573
|
return;
|
|
12545
12574
|
}
|
|
12546
12575
|
try {
|
|
12547
|
-
const
|
|
12548
|
-
yield
|
|
12576
|
+
const h = vt(), { getLocation: g, putLocation: f } = yield h.getPresignedUrls(t.name);
|
|
12577
|
+
yield h.uploadFile(t, f);
|
|
12549
12578
|
let v = [];
|
|
12550
12579
|
e && e.length > 0 && (e.push(a(this, re).id), v = a(this, hi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), v.push(a(this, re).userId)), a(this, We).sendMessage(
|
|
12551
12580
|
g,
|
|
12552
12581
|
ss.IMAGE,
|
|
12553
12582
|
e
|
|
12554
12583
|
);
|
|
12555
|
-
} catch (
|
|
12584
|
+
} catch (h) {
|
|
12556
12585
|
throw new k("Error sending image message.", "0500", this.logger);
|
|
12557
12586
|
}
|
|
12558
12587
|
});
|
|
@@ -12578,12 +12607,12 @@ let $t = (mg = class extends Bt {
|
|
|
12578
12607
|
return;
|
|
12579
12608
|
}
|
|
12580
12609
|
try {
|
|
12581
|
-
const l = vt(), { getLocation:
|
|
12610
|
+
const l = vt(), { getLocation: h, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12582
12611
|
yield l.uploadFile(t, g);
|
|
12583
12612
|
let f = [];
|
|
12584
12613
|
e && e.length > 0 && (e.push(a(this, re).id), f = a(this, hi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), f.push(a(this, re).userId));
|
|
12585
12614
|
const v = JSON.stringify({
|
|
12586
|
-
link:
|
|
12615
|
+
link: h,
|
|
12587
12616
|
name: t.name,
|
|
12588
12617
|
size: "size" in t ? t.size : 0
|
|
12589
12618
|
});
|
|
@@ -12620,13 +12649,13 @@ let $t = (mg = class extends Bt {
|
|
|
12620
12649
|
*/
|
|
12621
12650
|
sendCustomMessage(t, e) {
|
|
12622
12651
|
return u(this, null, function* () {
|
|
12623
|
-
var n, o, c, d, l,
|
|
12652
|
+
var n, o, c, d, l, h, g, f, v, E, C, _, I, M, U;
|
|
12624
12653
|
if (e && e.length > 0) {
|
|
12625
12654
|
if (!((n = a(this, re).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, re).permissions) != null && o.chatPrivate.files) || !((c = a(this, re).permissions) != null && c.chatPrivate.text)) {
|
|
12626
12655
|
this.logger.error("sendCustomMessage::private_chat_permission_denied");
|
|
12627
12656
|
return;
|
|
12628
12657
|
}
|
|
12629
|
-
} else if (!((l = (d = a(this, re).permissions) == null ? void 0 : d.chatPublic) != null && l.canSend) || !((g = (
|
|
12658
|
+
} else if (!((l = (d = a(this, re).permissions) == null ? void 0 : d.chatPublic) != null && l.canSend) || !((g = (h = a(this, re).permissions) == null ? void 0 : h.chatPublic) != null && g.files) || !((v = (f = a(this, re).permissions) == null ? void 0 : f.chatPublic) != null && v.text)) {
|
|
12630
12659
|
this.logger.error("sendCustomMessage::permission_denied");
|
|
12631
12660
|
return;
|
|
12632
12661
|
}
|
|
@@ -12713,8 +12742,8 @@ let $t = (mg = class extends Bt {
|
|
|
12713
12742
|
return;
|
|
12714
12743
|
}
|
|
12715
12744
|
try {
|
|
12716
|
-
const d = vt(), { getLocation: l, putLocation:
|
|
12717
|
-
yield d.uploadFile(e,
|
|
12745
|
+
const d = vt(), { getLocation: l, putLocation: h } = yield d.getPresignedUrls(e.name);
|
|
12746
|
+
yield d.uploadFile(e, h), a(this, We).editMessage(
|
|
12718
12747
|
t,
|
|
12719
12748
|
l,
|
|
12720
12749
|
ss.IMAGE
|
|
@@ -12969,9 +12998,9 @@ var bM = Object.defineProperty, kM = Object.getOwnPropertyDescriptor, IM = (s, t
|
|
|
12969
12998
|
}, pi, fg;
|
|
12970
12999
|
const _r = (fg = class {
|
|
12971
13000
|
constructor(s, t, e, r) {
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
13001
|
+
p(this, "chat");
|
|
13002
|
+
p(this, "chatSocketHandler");
|
|
13003
|
+
p(this, "self");
|
|
12975
13004
|
m(this, pi, void 0);
|
|
12976
13005
|
S(this, pi, s), this.chatSocketHandler = t, this.chat = new $t(
|
|
12977
13006
|
s,
|
|
@@ -13178,7 +13207,7 @@ let bu = (Sg = class extends Bt {
|
|
|
13178
13207
|
/**
|
|
13179
13208
|
* An array of poll items.
|
|
13180
13209
|
*/
|
|
13181
|
-
|
|
13210
|
+
p(this, "items");
|
|
13182
13211
|
m(this, On, void 0);
|
|
13183
13212
|
m(this, Nn, void 0);
|
|
13184
13213
|
m(this, ko, void 0);
|
|
@@ -13252,7 +13281,7 @@ var OM = Object.defineProperty, NM = Object.getOwnPropertyDescriptor, VM = (s, t
|
|
|
13252
13281
|
}, kr, Vn, gi, vg;
|
|
13253
13282
|
const pn = (vg = class {
|
|
13254
13283
|
constructor(s, t, e) {
|
|
13255
|
-
|
|
13284
|
+
p(this, "polls");
|
|
13256
13285
|
m(this, kr, void 0);
|
|
13257
13286
|
m(this, Vn, void 0);
|
|
13258
13287
|
m(this, gi, void 0);
|
|
@@ -13379,11 +13408,11 @@ let ku = (Tg = class extends Bt {
|
|
|
13379
13408
|
/**
|
|
13380
13409
|
* Represents the current active tab
|
|
13381
13410
|
*/
|
|
13382
|
-
|
|
13411
|
+
p(this, "selfActiveTab");
|
|
13383
13412
|
/**
|
|
13384
13413
|
* Represents whether current user is spotlighted
|
|
13385
13414
|
*/
|
|
13386
|
-
|
|
13415
|
+
p(this, "broadcastTabChanges");
|
|
13387
13416
|
m(this, Ln, void 0);
|
|
13388
13417
|
m(this, mi, void 0);
|
|
13389
13418
|
m(this, Ao, void 0);
|
|
@@ -13391,19 +13420,19 @@ let ku = (Tg = class extends Bt {
|
|
|
13391
13420
|
* The `viewType` tells the type of the meeting
|
|
13392
13421
|
* possible values are: GROUP_CALL| LIVESTREAM | CHAT | AUDIO_ROOM
|
|
13393
13422
|
*/
|
|
13394
|
-
|
|
13423
|
+
p(this, "viewType");
|
|
13395
13424
|
/**
|
|
13396
13425
|
* The timestamp of the time when the meeting started.
|
|
13397
13426
|
*/
|
|
13398
|
-
|
|
13427
|
+
p(this, "meetingStartedTimestamp");
|
|
13399
13428
|
/**
|
|
13400
13429
|
* The title of the meeting.
|
|
13401
13430
|
*/
|
|
13402
|
-
|
|
13431
|
+
p(this, "meetingTitle");
|
|
13403
13432
|
/**
|
|
13404
13433
|
* (Experimental) The sessionId this meeting object is part of.
|
|
13405
13434
|
*/
|
|
13406
|
-
|
|
13435
|
+
p(this, "sessionId");
|
|
13407
13436
|
S(this, Ln, t), S(this, mi, e), this.viewType = r, S(this, Ao, i), this.meetingTitle = n, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
13408
13437
|
}
|
|
13409
13438
|
get socketState() {
|
|
@@ -13473,7 +13502,7 @@ let Yr = (yg = class extends Bt {
|
|
|
13473
13502
|
constructor(t) {
|
|
13474
13503
|
const e = t.getValue("logger");
|
|
13475
13504
|
super(e);
|
|
13476
|
-
|
|
13505
|
+
p(this, "transcripts");
|
|
13477
13506
|
m(this, Mo, void 0);
|
|
13478
13507
|
S(this, Mo, t), this.transcripts = [];
|
|
13479
13508
|
}
|
|
@@ -13568,11 +13597,11 @@ var HM = Object.defineProperty, qM = Object.getOwnPropertyDescriptor, jM = (s, t
|
|
|
13568
13597
|
}, Ir, xn, Dt, Eg;
|
|
13569
13598
|
const Ef = (Eg = class {
|
|
13570
13599
|
constructor(s, t, e, r, i, n) {
|
|
13571
|
-
|
|
13572
|
-
|
|
13600
|
+
p(this, "meta");
|
|
13601
|
+
p(this, "ai");
|
|
13573
13602
|
m(this, Ir, void 0);
|
|
13574
13603
|
m(this, xn, void 0);
|
|
13575
|
-
|
|
13604
|
+
p(this, "aiSocketHandler");
|
|
13576
13605
|
m(this, Dt, void 0);
|
|
13577
13606
|
S(this, Dt, s), this.meta = new ku(
|
|
13578
13607
|
s,
|
|
@@ -13762,8 +13791,8 @@ const to = {}, Tr = {
|
|
|
13762
13791
|
const o = n.value;
|
|
13763
13792
|
return n.value = function(...d) {
|
|
13764
13793
|
var E, C;
|
|
13765
|
-
const l = (C = (this == null ? void 0 : this.peerId) || ((E = d[0]) == null ? void 0 : E.authToken)) != null ? C : "",
|
|
13766
|
-
if (to[
|
|
13794
|
+
const l = (C = (this == null ? void 0 : this.peerId) || ((E = d[0]) == null ? void 0 : E.authToken)) != null ? C : "", h = `${t}-${l}`, g = this == null ? void 0 : this.logger;
|
|
13795
|
+
if (to[h]) {
|
|
13767
13796
|
const _ = new Error(
|
|
13768
13797
|
`Unsupported concurrent calls on method: ${s}.`
|
|
13769
13798
|
);
|
|
@@ -13773,19 +13802,19 @@ const to = {}, Tr = {
|
|
|
13773
13802
|
},
|
|
13774
13803
|
locker: {
|
|
13775
13804
|
methodName: s,
|
|
13776
|
-
lockName:
|
|
13805
|
+
lockName: h
|
|
13777
13806
|
}
|
|
13778
13807
|
}), _;
|
|
13779
13808
|
}
|
|
13780
|
-
to[
|
|
13809
|
+
to[h] = !0;
|
|
13781
13810
|
const f = setTimeout(
|
|
13782
|
-
() => delete to[
|
|
13811
|
+
() => delete to[h],
|
|
13783
13812
|
e
|
|
13784
13813
|
), v = o.apply(this, d);
|
|
13785
13814
|
return Promise.resolve(v).then(() => {
|
|
13786
|
-
delete to[
|
|
13815
|
+
delete to[h], clearTimeout(f);
|
|
13787
13816
|
}).catch(() => {
|
|
13788
|
-
delete to[
|
|
13817
|
+
delete to[h], clearTimeout(f);
|
|
13789
13818
|
}), v;
|
|
13790
13819
|
}, n;
|
|
13791
13820
|
};
|
|
@@ -14048,7 +14077,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, YM = (s, t
|
|
|
14048
14077
|
}, Ar, ls, Mr, No, ut;
|
|
14049
14078
|
class _f {
|
|
14050
14079
|
constructor(t, e, r, i, n) {
|
|
14051
|
-
|
|
14080
|
+
p(this, "stage");
|
|
14052
14081
|
m(this, Ar, void 0);
|
|
14053
14082
|
m(this, ls, void 0);
|
|
14054
14083
|
m(this, Mr, void 0);
|
|
@@ -14209,7 +14238,7 @@ let Ma = (Pg = class extends Da {
|
|
|
14209
14238
|
organizationId: c,
|
|
14210
14239
|
picture: d,
|
|
14211
14240
|
private: l,
|
|
14212
|
-
published:
|
|
14241
|
+
published: h,
|
|
14213
14242
|
staggered: g,
|
|
14214
14243
|
tags: f,
|
|
14215
14244
|
type: v,
|
|
@@ -14218,31 +14247,31 @@ let Ma = (Pg = class extends Da {
|
|
|
14218
14247
|
const L = t.getValue("logger");
|
|
14219
14248
|
super(L);
|
|
14220
14249
|
m(this, st, void 0);
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14250
|
+
p(this, "baseURL");
|
|
14251
|
+
p(this, "createdAt");
|
|
14252
|
+
p(this, "description");
|
|
14253
|
+
p(this, "id");
|
|
14254
|
+
p(this, "name");
|
|
14226
14255
|
m(this, Ot, void 0);
|
|
14227
14256
|
m(this, $n, void 0);
|
|
14228
14257
|
m(this, Fn, void 0);
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14258
|
+
p(this, "organizationId");
|
|
14259
|
+
p(this, "picture");
|
|
14260
|
+
p(this, "private");
|
|
14261
|
+
p(this, "published");
|
|
14262
|
+
p(this, "staggered");
|
|
14263
|
+
p(this, "tags");
|
|
14264
|
+
p(this, "type");
|
|
14265
|
+
p(this, "updatedAt");
|
|
14237
14266
|
m(this, Ws, void 0);
|
|
14238
|
-
|
|
14267
|
+
p(this, "config");
|
|
14239
14268
|
m(this, Bn, void 0);
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14269
|
+
p(this, "active");
|
|
14270
|
+
p(this, "iframes");
|
|
14271
|
+
p(this, "enabledBy");
|
|
14243
14272
|
m(this, Dr, void 0);
|
|
14244
14273
|
m(this, Hn, void 0);
|
|
14245
|
-
S(this, Dr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, S(this, Ot, _), this.organizationId = c, this.picture = d, this.private = l, this.published =
|
|
14274
|
+
S(this, Dr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = n, this.name = o, S(this, Ot, _), this.organizationId = c, this.picture = d, this.private = l, this.published = h, this.staggered = g, this.tags = f, this.type = v, this.updatedAt = new Date(E), this.active = !1, this.iframes = /* @__PURE__ */ new Map(), S(this, st, C), S(this, $n, I), S(this, Fn, M), this.enabledBy = "", S(this, Hn, U);
|
|
14246
14275
|
}
|
|
14247
14276
|
/**
|
|
14248
14277
|
* @access private
|
|
@@ -14600,9 +14629,9 @@ class Cf extends Map {
|
|
|
14600
14629
|
super();
|
|
14601
14630
|
m(this, Oe, void 0);
|
|
14602
14631
|
m(this, fi, void 0);
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14632
|
+
p(this, "onAddEvent");
|
|
14633
|
+
p(this, "onDeleteEvent");
|
|
14634
|
+
p(this, "onClearEvent");
|
|
14606
14635
|
S(this, Oe, new Da(r)), this.onAddEvent = i, this.onDeleteEvent = n, this.onClearEvent = o, S(this, fi, /* @__PURE__ */ new Map());
|
|
14607
14636
|
}
|
|
14608
14637
|
emit(e, ...r) {
|
|
@@ -14703,11 +14732,11 @@ let Mu = class {
|
|
|
14703
14732
|
/**
|
|
14704
14733
|
* All plugins accessible by the current user.
|
|
14705
14734
|
*/
|
|
14706
|
-
|
|
14735
|
+
p(this, "all");
|
|
14707
14736
|
/**
|
|
14708
14737
|
* All plugins that are currently enabled in the room.
|
|
14709
14738
|
*/
|
|
14710
|
-
|
|
14739
|
+
p(this, "active");
|
|
14711
14740
|
this.all = new eg(s), this.active = new eg(s);
|
|
14712
14741
|
}
|
|
14713
14742
|
};
|
|
@@ -14721,7 +14750,7 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, Vl = (s, t
|
|
|
14721
14750
|
}, Kt, qn, us, _g;
|
|
14722
14751
|
const Rf = (_g = class {
|
|
14723
14752
|
constructor(s, t, e, r) {
|
|
14724
|
-
|
|
14753
|
+
p(this, "plugins");
|
|
14725
14754
|
m(this, Kt, void 0);
|
|
14726
14755
|
m(this, qn, void 0);
|
|
14727
14756
|
m(this, us, void 0);
|
|
@@ -14744,10 +14773,10 @@ const Rf = (_g = class {
|
|
|
14744
14773
|
static init(s, t, e, r, i, n, o, c) {
|
|
14745
14774
|
return u(this, null, function* () {
|
|
14746
14775
|
const d = s.getValue("logger"), l = new Mu(d);
|
|
14747
|
-
return t.forEach((
|
|
14776
|
+
return t.forEach((h) => {
|
|
14748
14777
|
const g = new Ma(
|
|
14749
14778
|
s,
|
|
14750
|
-
|
|
14779
|
+
h,
|
|
14751
14780
|
e,
|
|
14752
14781
|
n,
|
|
14753
14782
|
o,
|
|
@@ -14944,12 +14973,12 @@ Vl([
|
|
|
14944
14973
|
var Vo;
|
|
14945
14974
|
class i0 {
|
|
14946
14975
|
constructor(t) {
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14976
|
+
p(this, "mediaJoined");
|
|
14977
|
+
p(this, "socketJoined");
|
|
14978
|
+
p(this, "socketJoinAttempted");
|
|
14979
|
+
p(this, "mediaJoinAttempted");
|
|
14980
|
+
p(this, "socketState");
|
|
14981
|
+
p(this, "mediaState");
|
|
14953
14982
|
m(this, Vo, void 0);
|
|
14954
14983
|
this.mediaJoined = !1, this.socketJoined = !1, this.socketJoinAttempted = !1, this.mediaJoinAttempted = !1, this.socketState = {
|
|
14955
14984
|
state: void 0,
|
|
@@ -15029,8 +15058,8 @@ let rn = (Cg = class extends Bt {
|
|
|
15029
15058
|
m(this, Wn);
|
|
15030
15059
|
m(this, jn, void 0);
|
|
15031
15060
|
m(this, Gn, void 0);
|
|
15032
|
-
|
|
15033
|
-
|
|
15061
|
+
p(this, "recordingPeerIds", []);
|
|
15062
|
+
p(this, "recordings", []);
|
|
15034
15063
|
S(this, Gn, t), S(this, jn, e);
|
|
15035
15064
|
}
|
|
15036
15065
|
get recordingState() {
|
|
@@ -15143,8 +15172,8 @@ var o0 = Object.defineProperty, c0 = Object.getOwnPropertyDescriptor, d0 = (s, t
|
|
|
15143
15172
|
}, Si;
|
|
15144
15173
|
class wf {
|
|
15145
15174
|
constructor(t, e, r) {
|
|
15146
|
-
|
|
15147
|
-
|
|
15175
|
+
p(this, "recording");
|
|
15176
|
+
p(this, "room");
|
|
15148
15177
|
m(this, Si, void 0);
|
|
15149
15178
|
S(this, Si, t), this.recording = new rn(t, e), this.room = r, this.setupEvents();
|
|
15150
15179
|
}
|
|
@@ -15236,20 +15265,30 @@ class l0 {
|
|
|
15236
15265
|
}
|
|
15237
15266
|
vi = new WeakMap();
|
|
15238
15267
|
class _h {
|
|
15239
|
-
constructor(t, e, r) {
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
this
|
|
15268
|
+
constructor(t, e, r, i) {
|
|
15269
|
+
/**
|
|
15270
|
+
* The participant authToken passed to `RealtimeKitClient.init()`.
|
|
15271
|
+
* Can be used for troubleshooting.
|
|
15272
|
+
*/
|
|
15273
|
+
p(this, "authToken");
|
|
15274
|
+
p(this, "logger");
|
|
15275
|
+
p(this, "features");
|
|
15276
|
+
p(this, "browserSpecs");
|
|
15277
|
+
p(this, "callStats");
|
|
15278
|
+
this.authToken = t, this.logger = e, this.features = r, this.browserSpecs = _e, this.callStats = i;
|
|
15245
15279
|
}
|
|
15246
15280
|
static init(t) {
|
|
15247
|
-
return new _h(
|
|
15281
|
+
return new _h(
|
|
15282
|
+
t.getValue("authToken"),
|
|
15283
|
+
t.getValue("logger"),
|
|
15284
|
+
new l0(t),
|
|
15285
|
+
t.getValue("callstats")
|
|
15286
|
+
);
|
|
15248
15287
|
}
|
|
15249
15288
|
}
|
|
15250
15289
|
class Ch {
|
|
15251
15290
|
constructor(t) {
|
|
15252
|
-
|
|
15291
|
+
p(this, "internals");
|
|
15253
15292
|
this.internals = t;
|
|
15254
15293
|
}
|
|
15255
15294
|
static init(t) {
|
|
@@ -15275,8 +15314,8 @@ class bt extends Da {
|
|
|
15275
15314
|
m(this, zt, void 0);
|
|
15276
15315
|
m(this, Lo, void 0);
|
|
15277
15316
|
m(this, be, void 0);
|
|
15278
|
-
|
|
15279
|
-
|
|
15317
|
+
p(this, "audioUpdateInProgress");
|
|
15318
|
+
p(this, "videoUpdateInProgress");
|
|
15280
15319
|
S(this, be, e), this.audioUpdateInProgress = !1, this.videoUpdateInProgress = !1, S(this, Be, new bf(e, r)), S(this, Se, new V0(
|
|
15281
15320
|
e,
|
|
15282
15321
|
a(this, Be),
|
|
@@ -15383,8 +15422,8 @@ class bt extends Da {
|
|
|
15383
15422
|
const d = yield this.getDeviceById(n.getSettings().deviceId);
|
|
15384
15423
|
a(this, be).getValue("callstats").selectedDevice("AUDIO", d);
|
|
15385
15424
|
}
|
|
15386
|
-
(c = a(this, Js).currentDevice) != null && c.deviceId && a(this, be).getValue("callstats").selectedDevice("SPEAKER", a(this, Js).currentDevice), a(this, Be).onDeviceChange((d, l,
|
|
15387
|
-
this.onDeviceChange(l,
|
|
15425
|
+
(c = a(this, Js).currentDevice) != null && c.deviceId && a(this, be).getValue("callstats").selectedDevice("SPEAKER", a(this, Js).currentDevice), a(this, Be).onDeviceChange((d, l, h) => {
|
|
15426
|
+
this.onDeviceChange(l, h);
|
|
15388
15427
|
});
|
|
15389
15428
|
});
|
|
15390
15429
|
}
|
|
@@ -15905,11 +15944,11 @@ const f0 = {
|
|
|
15905
15944
|
}
|
|
15906
15945
|
]]
|
|
15907
15946
|
], v0 = (s, t) => {
|
|
15908
|
-
var d, l,
|
|
15947
|
+
var d, l, h;
|
|
15909
15948
|
const e = (d = s == null ? void 0 : s.getValue("overrides")) == null ? void 0 : d.simulcastConfig;
|
|
15910
15949
|
if ((l = e == null ? void 0 : e.encodings) != null && l.length)
|
|
15911
15950
|
return e.encodings;
|
|
15912
|
-
const r = "getSettings" in t && t.getSettings().width || "getConstraints" in t && t.getConstraints().width || "originalSettings" in t && ((
|
|
15951
|
+
const r = "getSettings" in t && t.getSettings().width || "getConstraints" in t && t.getConstraints().width || "originalSettings" in t && ((h = t.originalSettings) == null ? void 0 : h.width), i = S0, n = i.map(([g]) => g).sort((g, f) => g - f);
|
|
15913
15952
|
let o = Number.MAX_VALUE, c = 0;
|
|
15914
15953
|
return n.forEach((g, f) => {
|
|
15915
15954
|
Math.abs(g - r) < o && (o = Math.abs(g - r), c = f);
|
|
@@ -15933,9 +15972,9 @@ class E0 {
|
|
|
15933
15972
|
m(this, yi, void 0);
|
|
15934
15973
|
m(this, Or, void 0);
|
|
15935
15974
|
// eslint-disable-next-line class-methods-use-this
|
|
15936
|
-
|
|
15937
|
-
var l,
|
|
15938
|
-
const t = (l = a(this, yi)) == null ? void 0 : l.screenshare, e = (g = (
|
|
15975
|
+
p(this, "getScreenShareConstraints", () => {
|
|
15976
|
+
var l, h, g, f, v, E, C, _, I, M, U;
|
|
15977
|
+
const t = (l = a(this, yi)) == null ? void 0 : l.screenshare, e = (g = (h = t == null ? void 0 : t.width) == null ? void 0 : h.max) != null ? g : 1920, r = (v = (f = t == null ? void 0 : t.height) == null ? void 0 : f.max) != null ? v : 1080, i = (C = (E = t == null ? void 0 : t.frameRate) == null ? void 0 : E.max) != null ? C : 5;
|
|
15939
15978
|
let n = (I = (_ = t == null ? void 0 : t.frameRate) == null ? void 0 : _.ideal) != null ? I : 5;
|
|
15940
15979
|
const o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
15941
15980
|
a(this, Or).getValue("flagsmith").getValue(te.VAL_MIN_FRAMERATE) && (n = parseInt(
|
|
@@ -15962,8 +16001,8 @@ class E0 {
|
|
|
15962
16001
|
};
|
|
15963
16002
|
});
|
|
15964
16003
|
// eslint-disable-next-line class-methods-use-this
|
|
15965
|
-
|
|
15966
|
-
var n, o, c, d, l,
|
|
16004
|
+
p(this, "getAudioConstraints", (t) => {
|
|
16005
|
+
var n, o, c, d, l, h, g;
|
|
15967
16006
|
const e = {}, r = (n = a(this, yi)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
15968
16007
|
return _e.isFirefox() || _e.isWebKitBased() ? (e.audio = {
|
|
15969
16008
|
deviceId: t,
|
|
@@ -15973,12 +16012,12 @@ class E0 {
|
|
|
15973
16012
|
channelCount: i
|
|
15974
16013
|
}, e) : (e.audio = {
|
|
15975
16014
|
autoGainControl: (l = r == null ? void 0 : r.autoGainControl) != null ? l : !0,
|
|
15976
|
-
echoCancellation: (
|
|
16015
|
+
echoCancellation: (h = r == null ? void 0 : r.echoCancellation) != null ? h : !0,
|
|
15977
16016
|
noiseSuppression: (g = r == null ? void 0 : r.noiseSupression) != null ? g : !0,
|
|
15978
16017
|
channelCount: i
|
|
15979
16018
|
}, t && (e.audio.deviceId = { exact: t }), e);
|
|
15980
16019
|
});
|
|
15981
|
-
|
|
16020
|
+
p(this, "getVideoConstraints", (t) => {
|
|
15982
16021
|
var o, c, d;
|
|
15983
16022
|
const e = {}, r = (o = a(this, yi)) == null ? void 0 : o.video, i = I_(f0);
|
|
15984
16023
|
let n = i.vga;
|
|
@@ -16000,14 +16039,14 @@ yi = new WeakMap(), Or = new WeakMap();
|
|
|
16000
16039
|
class nu extends Error {
|
|
16001
16040
|
constructor(e, r, i) {
|
|
16002
16041
|
super(r);
|
|
16003
|
-
|
|
16004
|
-
|
|
16042
|
+
p(this, "constraints");
|
|
16043
|
+
p(this, "name");
|
|
16005
16044
|
this.name = e, this.constraints = i;
|
|
16006
16045
|
}
|
|
16007
16046
|
}
|
|
16008
16047
|
class P0 {
|
|
16009
16048
|
constructor() {
|
|
16010
|
-
|
|
16049
|
+
p(this, "permissions");
|
|
16011
16050
|
this.permissions = {
|
|
16012
16051
|
audio: "NOT_REQUESTED",
|
|
16013
16052
|
video: "NOT_REQUESTED",
|
|
@@ -16084,15 +16123,15 @@ let Ft = (Rg = class extends P0 {
|
|
|
16084
16123
|
const c = yield this.getAudioInputDevices(), d = yield this.getVideoInputDevices(), l = !!(c != null && c.find(
|
|
16085
16124
|
(M) => M.deviceId === t
|
|
16086
16125
|
));
|
|
16087
|
-
let
|
|
16088
|
-
t && l ?
|
|
16126
|
+
let h;
|
|
16127
|
+
t && l ? h = t : c && ((r = c[0]) != null && r.deviceId) && (h = (i = c[0]) == null ? void 0 : i.deviceId);
|
|
16089
16128
|
const g = !!(d != null && d.find(
|
|
16090
16129
|
(M) => M.deviceId === e
|
|
16091
16130
|
));
|
|
16092
16131
|
let f;
|
|
16093
16132
|
e && g ? f = e : d && ((n = d[0]) != null && n.deviceId) && (f = (o = d[0]) == null ? void 0 : o.deviceId);
|
|
16094
16133
|
const v = {
|
|
16095
|
-
audio: a(this, Yt).getAudioConstraints(
|
|
16134
|
+
audio: a(this, Yt).getAudioConstraints(h).audio,
|
|
16096
16135
|
video: a(this, Yt).getVideoConstraints(f).video
|
|
16097
16136
|
};
|
|
16098
16137
|
this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
@@ -16137,27 +16176,27 @@ let Ft = (Rg = class extends P0 {
|
|
|
16137
16176
|
let n;
|
|
16138
16177
|
e && i ? n = e : (c = r[0]) != null && c.deviceId && (n = (d = r[0]) == null ? void 0 : d.deviceId);
|
|
16139
16178
|
const o = (l) => u(this, null, function* () {
|
|
16140
|
-
let
|
|
16179
|
+
let h;
|
|
16141
16180
|
try {
|
|
16142
|
-
r = r.filter((f) => f.deviceId !== l),
|
|
16143
|
-
constraints: JSON.stringify(
|
|
16181
|
+
r = r.filter((f) => f.deviceId !== l), h = a(this, Yt).getAudioConstraints(l), this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
16182
|
+
constraints: JSON.stringify(h)
|
|
16144
16183
|
});
|
|
16145
|
-
const [g] = (yield navigator.mediaDevices.getUserMedia(
|
|
16184
|
+
const [g] = (yield navigator.mediaDevices.getUserMedia(h)).getAudioTracks();
|
|
16146
16185
|
return this.logger.info("getUserMediaWithoutTimeout::received_user_media", {
|
|
16147
|
-
constraints: JSON.stringify(
|
|
16186
|
+
constraints: JSON.stringify(h)
|
|
16148
16187
|
}), g;
|
|
16149
16188
|
} catch (g) {
|
|
16150
16189
|
const f = zc(
|
|
16151
16190
|
"audio",
|
|
16152
16191
|
g.name,
|
|
16153
16192
|
g.message
|
|
16154
|
-
), v = new nu(g.name, g.message,
|
|
16193
|
+
), v = new nu(g.name, g.message, h);
|
|
16155
16194
|
if (f === "COULD_NOT_START") {
|
|
16156
16195
|
const E = r.shift();
|
|
16157
16196
|
if (!E)
|
|
16158
16197
|
throw v;
|
|
16159
16198
|
this.logger.info("getAudioTrack::gum_failed", {
|
|
16160
|
-
constraints: JSON.stringify(
|
|
16199
|
+
constraints: JSON.stringify(h),
|
|
16161
16200
|
error: g
|
|
16162
16201
|
});
|
|
16163
16202
|
const C = a(this, Yt).getAudioConstraints(
|
|
@@ -16183,7 +16222,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16183
16222
|
}
|
|
16184
16223
|
getVideoTrack(t) {
|
|
16185
16224
|
return u(this, null, function* () {
|
|
16186
|
-
var l,
|
|
16225
|
+
var l, h, g;
|
|
16187
16226
|
const e = a(this, Ne).getValue("flagsmith").hasFeature(te.OBS_QUALITY), r = (l = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : l.includes("OBS Virtual"), i = e && r, n = yield this.getVideoInputDevices();
|
|
16188
16227
|
if (!(n != null && n.length))
|
|
16189
16228
|
throw this.permissions.video = "NO_DEVICES_AVAILABLE", a(this, Ne).getValue("peerSessionStore").emit(w.MEDIA_PERMISSION_UPDATE, {
|
|
@@ -16194,7 +16233,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16194
16233
|
(f) => f.deviceId === t
|
|
16195
16234
|
));
|
|
16196
16235
|
let c;
|
|
16197
|
-
t && o ? c = t : (
|
|
16236
|
+
t && o ? c = t : (h = n[0]) != null && h.deviceId && (c = (g = n[0]) == null ? void 0 : g.deviceId);
|
|
16198
16237
|
const d = (f) => u(this, null, function* () {
|
|
16199
16238
|
try {
|
|
16200
16239
|
let v = f;
|
|
@@ -16312,11 +16351,11 @@ let Ft = (Rg = class extends P0 {
|
|
|
16312
16351
|
return n.includes("front") || n.includes("user") || n.includes("selfie") ? !0 : !(n.includes("back") || n.includes("rear") || n.includes("environment"));
|
|
16313
16352
|
};
|
|
16314
16353
|
return t.sort((i, n) => {
|
|
16315
|
-
var
|
|
16354
|
+
var h, g;
|
|
16316
16355
|
const o = e(i), c = e(n);
|
|
16317
16356
|
if (o !== c)
|
|
16318
16357
|
return o - c;
|
|
16319
|
-
const d = i.deviceId === "default" || ((
|
|
16358
|
+
const d = i.deviceId === "default" || ((h = i.label) == null ? void 0 : h.toLowerCase().includes("default")), l = n.deviceId === "default" || ((g = n.label) == null ? void 0 : g.toLowerCase().includes("default"));
|
|
16320
16359
|
if (d && !l)
|
|
16321
16360
|
return -1;
|
|
16322
16361
|
if (!d && l)
|
|
@@ -16374,7 +16413,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16374
16413
|
navigator.mediaDevices.addEventListener(
|
|
16375
16414
|
"devicechange",
|
|
16376
16415
|
(r) => u(this, null, function* () {
|
|
16377
|
-
var l,
|
|
16416
|
+
var l, h;
|
|
16378
16417
|
const i = (g) => `${g.kind}-${g.label}-${g.deviceId}-${g.groupId}`, n = new Set(
|
|
16379
16418
|
e.map((g) => i(g))
|
|
16380
16419
|
), o = yield this.getAvailableDevices(), c = new Set(
|
|
@@ -16388,7 +16427,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16388
16427
|
),
|
|
16389
16428
|
devices: o
|
|
16390
16429
|
};
|
|
16391
|
-
if (e = o, (l = d.added) != null && l.length || (
|
|
16430
|
+
if (e = o, (l = d.added) != null && l.length || (h = d.removed) != null && h.length) {
|
|
16392
16431
|
this.logger.info("repopulated_full_device_list", {
|
|
16393
16432
|
devices: JSON.stringify(o)
|
|
16394
16433
|
});
|
|
@@ -16479,9 +16518,9 @@ const bf = Ft, en = {
|
|
|
16479
16518
|
}, b0 = typeof AudioContext != "undefined" ? AudioContext : null;
|
|
16480
16519
|
class Rh {
|
|
16481
16520
|
constructor(t) {
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
|
|
16521
|
+
p(this, "_AudioContext");
|
|
16522
|
+
p(this, "audioContext");
|
|
16523
|
+
p(this, "_audioContextRefContainers");
|
|
16485
16524
|
const e = O({ AudioContext: b0 }, t);
|
|
16486
16525
|
Object.defineProperties(this, {
|
|
16487
16526
|
_AudioContext: {
|
|
@@ -16559,28 +16598,28 @@ let Ed = class extends Da {
|
|
|
16559
16598
|
var o;
|
|
16560
16599
|
const n = t.getValue("logger");
|
|
16561
16600
|
super(n);
|
|
16562
|
-
|
|
16601
|
+
p(this, "constructorName", this.constructor.name);
|
|
16563
16602
|
// Will be set in case user has explicity used Self.setDevice
|
|
16564
16603
|
// to set the device.
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16604
|
+
p(this, "userSelectedDevice");
|
|
16605
|
+
p(this, "mediaInterface");
|
|
16606
|
+
p(this, "isNonPreferredDevice");
|
|
16607
|
+
p(this, "_mediaTrack");
|
|
16608
|
+
p(this, "transformedMediaTrack");
|
|
16609
|
+
p(this, "middlewares", []);
|
|
16610
|
+
p(this, "currentDevice");
|
|
16611
|
+
p(this, "userPreferredDeviceKey", `Realtimekit::${this.constructorName}::UserDeviceID`);
|
|
16612
|
+
p(this, "setUserPreferredDevice", (t) => en.setItem(
|
|
16574
16613
|
this.userPreferredDeviceKey,
|
|
16575
16614
|
t,
|
|
16576
16615
|
this.logger
|
|
16577
16616
|
));
|
|
16578
|
-
|
|
16617
|
+
p(this, "getUserPreferredDevice", () => en.getItem(
|
|
16579
16618
|
this.userPreferredDeviceKey,
|
|
16580
16619
|
this.logger
|
|
16581
16620
|
));
|
|
16582
|
-
|
|
16583
|
-
|
|
16621
|
+
p(this, "isCustomTrack", !1);
|
|
16622
|
+
p(this, "context");
|
|
16584
16623
|
this.context = t, this.mediaInterface = e, r && this.setMediaTrack(r), this.userSelectedDevice = (o = this.getUserPreferredDevice()) != null ? o : void 0, this.isNonPreferredDevice = i, this.onTrackEnded = this.onTrackEnded.bind(this), this.onTrackMuted = this.onTrackMuted.bind(this);
|
|
16585
16624
|
}
|
|
16586
16625
|
/**
|
|
@@ -16882,14 +16921,14 @@ class Ll extends If {
|
|
|
16882
16921
|
this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack");
|
|
16883
16922
|
const c = r.getSettings().deviceId;
|
|
16884
16923
|
return n.filter((l) => l.deviceId !== c).some((l) => u(this, null, function* () {
|
|
16885
|
-
var
|
|
16924
|
+
var h;
|
|
16886
16925
|
if (r = yield this.mediaInterface.getAudioTrack(
|
|
16887
16926
|
!1,
|
|
16888
16927
|
l.deviceId
|
|
16889
16928
|
), !(yield sg(this.logger, r))) {
|
|
16890
|
-
const g = (
|
|
16929
|
+
const g = (h = o == null ? void 0 : o.devices.concat({
|
|
16891
16930
|
label: r.label
|
|
16892
|
-
})) != null ?
|
|
16931
|
+
})) != null ? h : [{ label: r.label }];
|
|
16893
16932
|
return en.setItem(au, JSON.stringify({
|
|
16894
16933
|
devices: g
|
|
16895
16934
|
}), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), !0;
|
|
@@ -16913,15 +16952,15 @@ var Ei;
|
|
|
16913
16952
|
class L0 {
|
|
16914
16953
|
constructor(t, e) {
|
|
16915
16954
|
m(this, Ei, void 0);
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16955
|
+
p(this, "currentDevice");
|
|
16956
|
+
p(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
|
|
16957
|
+
p(this, "logger");
|
|
16958
|
+
p(this, "setUserPreferredDevice", (t) => en.setItem(
|
|
16920
16959
|
this.userPreferredDeviceKey,
|
|
16921
16960
|
t,
|
|
16922
16961
|
this.logger
|
|
16923
16962
|
));
|
|
16924
|
-
|
|
16963
|
+
p(this, "getUserPreferredDevice", () => en.getItem(
|
|
16925
16964
|
this.userPreferredDeviceKey,
|
|
16926
16965
|
this.logger
|
|
16927
16966
|
));
|
|
@@ -16941,7 +16980,7 @@ class L0 {
|
|
|
16941
16980
|
let n = t;
|
|
16942
16981
|
if (t || ([n] = (yield a(this, Ei).getAvailableDevicesByKind(
|
|
16943
16982
|
"audiooutput"
|
|
16944
|
-
)).filter((
|
|
16983
|
+
)).filter((h) => !yd(h))), !n)
|
|
16945
16984
|
throw new k("No speaker found", "1608");
|
|
16946
16985
|
if (((c = this.currentDevice) == null ? void 0 : c.deviceId) === n.deviceId)
|
|
16947
16986
|
return;
|
|
@@ -16951,7 +16990,7 @@ class L0 {
|
|
|
16951
16990
|
if (typeof l.sinkId != "undefined" && this.currentDevice.deviceId && l.sinkId !== this.currentDevice.deviceId)
|
|
16952
16991
|
try {
|
|
16953
16992
|
yield l.setSinkId(this.currentDevice.deviceId);
|
|
16954
|
-
} catch (
|
|
16993
|
+
} catch (h) {
|
|
16955
16994
|
}
|
|
16956
16995
|
}));
|
|
16957
16996
|
});
|
|
@@ -16964,9 +17003,9 @@ class U0 extends Da {
|
|
|
16964
17003
|
constructor(e, r) {
|
|
16965
17004
|
const i = e.getValue("logger");
|
|
16966
17005
|
super(i);
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
17006
|
+
p(this, "mediaInterface");
|
|
17007
|
+
p(this, "audioMediaTrack");
|
|
17008
|
+
p(this, "videoMediaTrack");
|
|
16970
17009
|
m(this, Uo, void 0);
|
|
16971
17010
|
S(this, Uo, e), this.mediaInterface = r;
|
|
16972
17011
|
}
|
|
@@ -17332,14 +17371,14 @@ const Tn = class {
|
|
|
17332
17371
|
return (i = (r = (e = (t = a(this, ht)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
|
|
17333
17372
|
}
|
|
17334
17373
|
get mediaConstraints() {
|
|
17335
|
-
var t, e, r, i, n, o, c, d, l,
|
|
17374
|
+
var t, e, r, i, n, o, c, d, l, h, g, f, v, E, C, _, I, M, U, L, B, G, se, Ge;
|
|
17336
17375
|
return {
|
|
17337
17376
|
audio: {
|
|
17338
17377
|
enableStereo: (i = (r = (e = (t = a(this, ht)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : un.audio.enableStereo,
|
|
17339
17378
|
enableHighBitrate: (d = (c = (o = (n = a(this, ht)) == null ? void 0 : n.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : un.audio.enableHighBitrate
|
|
17340
17379
|
},
|
|
17341
17380
|
video: {
|
|
17342
|
-
quality: (f = (g = (
|
|
17381
|
+
quality: (f = (g = (h = (l = a(this, ht)) == null ? void 0 : l.media) == null ? void 0 : h.video) == null ? void 0 : g.quality) != null ? f : un.video.quality,
|
|
17343
17382
|
frameRate: (_ = (C = (E = (v = a(this, ht)) == null ? void 0 : v.media) == null ? void 0 : E.video) == null ? void 0 : C.frameRate) != null ? _ : un.video.frameRate
|
|
17344
17383
|
},
|
|
17345
17384
|
screenshare: {
|
|
@@ -17368,10 +17407,10 @@ class bh extends Bt {
|
|
|
17368
17407
|
const i = e.getValue("logger");
|
|
17369
17408
|
super(i);
|
|
17370
17409
|
m(this, Yn, void 0);
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17410
|
+
p(this, "state", "IDLE");
|
|
17411
|
+
p(this, "playbackUrl");
|
|
17412
|
+
p(this, "ingestionCredentials");
|
|
17413
|
+
p(this, "viewerCount");
|
|
17375
17414
|
m(this, Bo, void 0);
|
|
17376
17415
|
S(this, Yn, r), S(this, Bo, e), this.viewerCount = 0;
|
|
17377
17416
|
}
|
|
@@ -17448,7 +17487,7 @@ var G0 = Object.defineProperty, W0 = Object.getOwnPropertyDescriptor, J0 = (s, t
|
|
|
17448
17487
|
}, Qn, Xn, Ks, ks;
|
|
17449
17488
|
class Mf {
|
|
17450
17489
|
constructor(t, e, r) {
|
|
17451
|
-
|
|
17490
|
+
p(this, "livestream");
|
|
17452
17491
|
m(this, Qn, void 0);
|
|
17453
17492
|
m(this, Xn, void 0);
|
|
17454
17493
|
m(this, Ks, void 0);
|
|
@@ -17556,19 +17595,19 @@ class Na {
|
|
|
17556
17595
|
*/
|
|
17557
17596
|
constructor({ name: t, socketHandler: e, meetingId: r }) {
|
|
17558
17597
|
m(this, Od);
|
|
17559
|
-
|
|
17598
|
+
p(this, "name", "");
|
|
17560
17599
|
m(this, rt, {});
|
|
17561
17600
|
m(this, Nr, "");
|
|
17562
17601
|
m(this, Vr, void 0);
|
|
17563
|
-
|
|
17602
|
+
p(this, "rateLimitConfig", {
|
|
17564
17603
|
maxInvocations: 5,
|
|
17565
17604
|
period: 1
|
|
17566
17605
|
});
|
|
17567
|
-
|
|
17606
|
+
p(this, "bulkRateLimitConfig", {
|
|
17568
17607
|
maxInvocations: 5,
|
|
17569
17608
|
period: 1
|
|
17570
17609
|
});
|
|
17571
|
-
|
|
17610
|
+
p(this, "listeners", {});
|
|
17572
17611
|
this.name = t, S(this, Vr, e), S(this, Nr, r);
|
|
17573
17612
|
}
|
|
17574
17613
|
/**
|
|
@@ -17744,7 +17783,7 @@ class Y0 {
|
|
|
17744
17783
|
constructor(t, e) {
|
|
17745
17784
|
m(this, Ho);
|
|
17746
17785
|
m(this, Nd);
|
|
17747
|
-
|
|
17786
|
+
p(this, "stores", /* @__PURE__ */ new Map());
|
|
17748
17787
|
m(this, _i, void 0);
|
|
17749
17788
|
m(this, Ci, "");
|
|
17750
17789
|
m(this, qo, void 0);
|
|
@@ -17804,7 +17843,7 @@ _i = new WeakMap(), Ci = new WeakMap(), Ho = new WeakSet(), Ou = function() {
|
|
|
17804
17843
|
});
|
|
17805
17844
|
};
|
|
17806
17845
|
function ci(s) {
|
|
17807
|
-
var t, e, r, i, n, o, c, d, l,
|
|
17846
|
+
var t, e, r, i, n, o, c, d, l, h, g, f, v;
|
|
17808
17847
|
return s ? {
|
|
17809
17848
|
media: {
|
|
17810
17849
|
audio: {
|
|
@@ -17825,7 +17864,7 @@ function ci(s) {
|
|
|
17825
17864
|
trackId: (l = (d = s.screenShareTracks) == null ? void 0 : d.audio) == null ? void 0 : l.id
|
|
17826
17865
|
},
|
|
17827
17866
|
video: {
|
|
17828
|
-
enabled: (g = (
|
|
17867
|
+
enabled: (g = (h = s.screenShareTracks) == null ? void 0 : h.video) == null ? void 0 : g.enabled,
|
|
17829
17868
|
trackId: (v = (f = s.screenShareTracks) == null ? void 0 : f.video) == null ? void 0 : v.id
|
|
17830
17869
|
}
|
|
17831
17870
|
}
|
|
@@ -17868,61 +17907,61 @@ let mr = (wg = class extends Bt {
|
|
|
17868
17907
|
* The peer ID of the participant.
|
|
17869
17908
|
* The participants are indexed by this ID in the participant map.
|
|
17870
17909
|
*/
|
|
17871
|
-
|
|
17910
|
+
p(this, "id");
|
|
17872
17911
|
/**
|
|
17873
17912
|
* The user ID of the participant.
|
|
17874
17913
|
*/
|
|
17875
|
-
|
|
17914
|
+
p(this, "userId");
|
|
17876
17915
|
/**
|
|
17877
17916
|
* The name of the participant.
|
|
17878
17917
|
*/
|
|
17879
|
-
|
|
17918
|
+
p(this, "name");
|
|
17880
17919
|
/**
|
|
17881
17920
|
* The picture of the participant.
|
|
17882
17921
|
*/
|
|
17883
|
-
|
|
17884
|
-
|
|
17922
|
+
p(this, "picture");
|
|
17923
|
+
p(this, "isHost");
|
|
17885
17924
|
/**
|
|
17886
17925
|
* The custom id of the participant set during Add Participant REST API
|
|
17887
17926
|
*/
|
|
17888
|
-
|
|
17889
|
-
|
|
17927
|
+
p(this, "customParticipantId");
|
|
17928
|
+
p(this, "flags");
|
|
17890
17929
|
/**
|
|
17891
17930
|
* The device configuration of the participant.
|
|
17892
17931
|
*/
|
|
17893
|
-
|
|
17932
|
+
p(this, "device");
|
|
17894
17933
|
/**
|
|
17895
17934
|
* The participant's video track.
|
|
17896
17935
|
*/
|
|
17897
|
-
|
|
17936
|
+
p(this, "videoTrack");
|
|
17898
17937
|
/**
|
|
17899
17938
|
* The participant's audio track.
|
|
17900
17939
|
*/
|
|
17901
|
-
|
|
17940
|
+
p(this, "audioTrack");
|
|
17902
17941
|
/**
|
|
17903
17942
|
* The participant's screenshare video and audio track.
|
|
17904
17943
|
*/
|
|
17905
|
-
|
|
17944
|
+
p(this, "screenShareTracks");
|
|
17906
17945
|
/**
|
|
17907
17946
|
* This is true if the participant's video is enabled.
|
|
17908
17947
|
*/
|
|
17909
|
-
|
|
17948
|
+
p(this, "videoEnabled");
|
|
17910
17949
|
/**
|
|
17911
17950
|
* This is true if the participant's audio is enabled.
|
|
17912
17951
|
*/
|
|
17913
|
-
|
|
17952
|
+
p(this, "audioEnabled");
|
|
17914
17953
|
/**
|
|
17915
17954
|
* This is true if the participant is screensharing.
|
|
17916
17955
|
*/
|
|
17917
|
-
|
|
17956
|
+
p(this, "screenShareEnabled");
|
|
17918
17957
|
/**
|
|
17919
17958
|
* producers created by participant
|
|
17920
17959
|
*/
|
|
17921
|
-
|
|
17960
|
+
p(this, "producers");
|
|
17922
17961
|
/**
|
|
17923
17962
|
* producer config passed during manual subscription
|
|
17924
17963
|
*/
|
|
17925
|
-
|
|
17964
|
+
p(this, "manualProducerConfig");
|
|
17926
17965
|
/**
|
|
17927
17966
|
* This is true if the participant is pinned.
|
|
17928
17967
|
*/
|
|
@@ -17930,7 +17969,7 @@ let mr = (wg = class extends Bt {
|
|
|
17930
17969
|
/**
|
|
17931
17970
|
* This is true if the participant supports remote control.
|
|
17932
17971
|
*/
|
|
17933
|
-
|
|
17972
|
+
p(this, "supportsRemoteControl", !1);
|
|
17934
17973
|
/**
|
|
17935
17974
|
* Represents the participants current stage status
|
|
17936
17975
|
*/
|
|
@@ -17938,7 +17977,7 @@ let mr = (wg = class extends Bt {
|
|
|
17938
17977
|
/**
|
|
17939
17978
|
* The preset of the participant.
|
|
17940
17979
|
*/
|
|
17941
|
-
|
|
17980
|
+
p(this, "presetName");
|
|
17942
17981
|
m(this, Nt, void 0);
|
|
17943
17982
|
m(this, zs, void 0);
|
|
17944
17983
|
m(this, jo, void 0);
|
|
@@ -17970,7 +18009,7 @@ let mr = (wg = class extends Bt {
|
|
|
17970
18009
|
userId: c,
|
|
17971
18010
|
displayName: d,
|
|
17972
18011
|
device: l,
|
|
17973
|
-
picture:
|
|
18012
|
+
picture: h,
|
|
17974
18013
|
isHost: g,
|
|
17975
18014
|
flags: f,
|
|
17976
18015
|
clientSpecificId: v,
|
|
@@ -17983,7 +18022,7 @@ let mr = (wg = class extends Bt {
|
|
|
17983
18022
|
producers: L,
|
|
17984
18023
|
metadata: B
|
|
17985
18024
|
} = e;
|
|
17986
|
-
this.id = o, this.userId = c, this.name = d, this.device = l, this.picture =
|
|
18025
|
+
this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = f, this.manualProducerConfig = HC, S(this, ea, E != null ? E : "ON_STAGE"), this.customParticipantId = C != null ? C : v, this.audioEnabled = !_, this.audioTrack = I, this.videoEnabled = M, this.videoTrack = U, this.screenShareTracks = {
|
|
17987
18026
|
audio: void 0,
|
|
17988
18027
|
video: void 0
|
|
17989
18028
|
}, this.producers = L != null ? L : [], this.presetName = B == null ? void 0 : B.preset_name, S(this, Zn, !1), S(this, zs, r), S(this, jo, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), x(this, Go, Nu).call(this);
|
|
@@ -18308,8 +18347,8 @@ class tD extends Da {
|
|
|
18308
18347
|
$r = new WeakMap();
|
|
18309
18348
|
class sD {
|
|
18310
18349
|
constructor() {
|
|
18311
|
-
|
|
18312
|
-
|
|
18350
|
+
p(this, "_orderedArray");
|
|
18351
|
+
p(this, "_map");
|
|
18313
18352
|
this._map = /* @__PURE__ */ new Map(), this._orderedArray = [];
|
|
18314
18353
|
}
|
|
18315
18354
|
add(t, e) {
|
|
@@ -18335,8 +18374,8 @@ class sD {
|
|
|
18335
18374
|
}
|
|
18336
18375
|
class rD {
|
|
18337
18376
|
constructor() {
|
|
18338
|
-
|
|
18339
|
-
|
|
18377
|
+
p(this, "_activeSpeakerPeers");
|
|
18378
|
+
p(this, "_compulsoryPeers");
|
|
18340
18379
|
this._activeSpeakerPeers = new sD(), this._compulsoryPeers = /* @__PURE__ */ new Set();
|
|
18341
18380
|
}
|
|
18342
18381
|
add(t, e, r) {
|
|
@@ -18417,37 +18456,37 @@ let Tt = (bg = class extends Bt {
|
|
|
18417
18456
|
/**
|
|
18418
18457
|
* Returns a list of participants waiting to join the meeting.
|
|
18419
18458
|
*/
|
|
18420
|
-
|
|
18459
|
+
p(this, "waitlisted");
|
|
18421
18460
|
/**
|
|
18422
18461
|
* Returns a list of all participants in the meeting.
|
|
18423
18462
|
*/
|
|
18424
|
-
|
|
18463
|
+
p(this, "joined");
|
|
18425
18464
|
/**
|
|
18426
18465
|
* @deprecated
|
|
18427
18466
|
* Returns a list of participants whose streams are currently consumed.
|
|
18428
18467
|
*/
|
|
18429
|
-
|
|
18468
|
+
p(this, "active");
|
|
18430
18469
|
/**
|
|
18431
18470
|
* Returns a list of participants whose video streams are currently consumed.
|
|
18432
18471
|
*/
|
|
18433
|
-
|
|
18472
|
+
p(this, "videoSubscribed");
|
|
18434
18473
|
/**
|
|
18435
18474
|
* Returns a list of participants whose audio streams are currently consumed.
|
|
18436
18475
|
*/
|
|
18437
|
-
|
|
18476
|
+
p(this, "audioSubscribed");
|
|
18438
18477
|
/**
|
|
18439
18478
|
* Returns a list of participants who have been pinned.
|
|
18440
18479
|
*/
|
|
18441
|
-
|
|
18480
|
+
p(this, "pinned");
|
|
18442
18481
|
/**
|
|
18443
18482
|
* Returns all added participants irrespective of whether they are currently
|
|
18444
18483
|
* in the meeting or not
|
|
18445
18484
|
*/
|
|
18446
|
-
|
|
18485
|
+
p(this, "all");
|
|
18447
18486
|
m(this, ye, void 0);
|
|
18448
18487
|
m(this, Ii, void 0);
|
|
18449
18488
|
m(this, Et, void 0);
|
|
18450
|
-
|
|
18489
|
+
p(this, "rateLimitConfig", {
|
|
18451
18490
|
maxInvocations: 5,
|
|
18452
18491
|
period: 1
|
|
18453
18492
|
});
|
|
@@ -18462,20 +18501,20 @@ let Tt = (bg = class extends Bt {
|
|
|
18462
18501
|
* just once, and the participants in the map will only change if the page number is
|
|
18463
18502
|
* changed by the user using setPage(page).
|
|
18464
18503
|
*/
|
|
18465
|
-
|
|
18504
|
+
p(this, "viewMode");
|
|
18466
18505
|
/**
|
|
18467
18506
|
* This indicates the current page that has been set by the user in PAGINATED mode.
|
|
18468
18507
|
* If the meeting is in ACTIVE_GRID mode, this value will be 0.
|
|
18469
18508
|
*/
|
|
18470
|
-
|
|
18509
|
+
p(this, "currentPage");
|
|
18471
18510
|
/**
|
|
18472
18511
|
* This stores the `participantId` of the last participant who spoke in the meeting.
|
|
18473
18512
|
*/
|
|
18474
|
-
|
|
18513
|
+
p(this, "lastActiveSpeaker");
|
|
18475
18514
|
/**
|
|
18476
18515
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18477
18516
|
*/
|
|
18478
|
-
|
|
18517
|
+
p(this, "selectedPeers", xf);
|
|
18479
18518
|
S(this, ye, t), S(this, Ii, e), S(this, Et, r), this.waitlisted = new so(i), this.joined = new so(i), this.videoSubscribed = new so(i), this.audioSubscribed = new so(i), this.active = this.videoSubscribed, this.pinned = new so(i), this.all = new tD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18480
18519
|
}
|
|
18481
18520
|
/**
|
|
@@ -18872,19 +18911,19 @@ var oD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, dn = (s, t
|
|
|
18872
18911
|
}, Qt, hs, sa, kg;
|
|
18873
18912
|
const Uf = (kg = class {
|
|
18874
18913
|
constructor(s, t, e) {
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18914
|
+
p(this, "participants");
|
|
18915
|
+
p(this, "self");
|
|
18916
|
+
p(this, "selectedPeers", xf);
|
|
18917
|
+
p(this, "maxSpatialLayerUpdates", /* @__PURE__ */ new Map());
|
|
18918
|
+
p(this, "consumerPeerMap");
|
|
18919
|
+
p(this, "events");
|
|
18920
|
+
p(this, "roomSocketHandler");
|
|
18921
|
+
p(this, "context");
|
|
18922
|
+
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
18884
18923
|
m(this, Qt, { mode: "ACTIVE_GRID", page: 0 });
|
|
18885
18924
|
m(this, hs, !1);
|
|
18886
18925
|
m(this, sa, !1);
|
|
18887
|
-
|
|
18926
|
+
p(this, "updateConsumerSpatialLayers", vh(() => {
|
|
18888
18927
|
const s = {}, t = new Map(this.maxSpatialLayerUpdates);
|
|
18889
18928
|
this.maxSpatialLayerUpdates.clear(), Array.from(t.entries()).forEach(([e, r]) => {
|
|
18890
18929
|
s[r] === void 0 && (s[r] = {
|
|
@@ -18896,7 +18935,7 @@ const Uf = (kg = class {
|
|
|
18896
18935
|
this.logger.log(`Switching max spatial layer to ${r.layer}`, { consumerIds: r.consumerIds }), this.roomNodeClient.switchConsumersToLayer(r.consumerIds, r.layer);
|
|
18897
18936
|
});
|
|
18898
18937
|
}, 2e3));
|
|
18899
|
-
|
|
18938
|
+
p(this, "updateConsumers", (s, t) => u(this, null, function* () {
|
|
18900
18939
|
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${a(this, hs)}`);
|
|
18901
18940
|
try {
|
|
18902
18941
|
s.length !== 0 && (this.logger.info(`updateConsumers: Creating consumers for ${s.length} producers: [${s.map((e) => e.producerId).join(", ")}]`), yield this.roomNodeClient.createConsumers(s), this.logger.info("updateConsumers: Successfully created consumers."));
|
|
@@ -19146,15 +19185,15 @@ const Uf = (kg = class {
|
|
|
19146
19185
|
}
|
|
19147
19186
|
selectActivePeers(s) {
|
|
19148
19187
|
const t = /* @__PURE__ */ new Map(), e = Array.from(
|
|
19149
|
-
this.participants.joined.toArray().filter((
|
|
19150
|
-
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((
|
|
19151
|
-
r.concat(i).filter((
|
|
19188
|
+
this.participants.joined.toArray().filter((h) => h.stageStatus === "ON_STAGE").map((h) => (t.set(h.id, !0), h.id))
|
|
19189
|
+
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((h, g) => (g.stageStatus !== "ON_STAGE" ? this.participants.pinned.delete(g.id) : h.push(g.id), h), []), n = this.self.stageStatus === "ON_STAGE" ? 1 : 0, o = s - n, c = new Set(
|
|
19190
|
+
r.concat(i).filter((h) => h !== this.self.id && t.has(h))
|
|
19152
19191
|
);
|
|
19153
19192
|
let d = Array.from(c);
|
|
19154
19193
|
const l = o - c.size;
|
|
19155
19194
|
if (l >= 0) {
|
|
19156
|
-
const
|
|
19157
|
-
d = Array.from(c).concat(
|
|
19195
|
+
const h = e.filter((g) => !c.has(g) && g !== this.self.id).slice(0, l);
|
|
19196
|
+
d = Array.from(c).concat(h);
|
|
19158
19197
|
} else
|
|
19159
19198
|
d = d.slice(0, o);
|
|
19160
19199
|
return d;
|
|
@@ -19235,7 +19274,7 @@ const Uf = (kg = class {
|
|
|
19235
19274
|
*/
|
|
19236
19275
|
syncConsumers() {
|
|
19237
19276
|
return u(this, null, function* () {
|
|
19238
|
-
var o, c, d, l,
|
|
19277
|
+
var o, c, d, l, h;
|
|
19239
19278
|
if (((d = (c = (o = this.context.getValue("connectionHandler")) == null ? void 0 : o.mediaState) == null ? void 0 : c.recv) == null ? void 0 : d.state) !== "connected") {
|
|
19240
19279
|
this.logger.info("syncConsumers: Connection not ready, exiting.");
|
|
19241
19280
|
return;
|
|
@@ -19271,7 +19310,7 @@ const Uf = (kg = class {
|
|
|
19271
19310
|
(g) => !(e != null && e.has(g.producerId))
|
|
19272
19311
|
), i = [];
|
|
19273
19312
|
let n = Array.from(
|
|
19274
|
-
(
|
|
19313
|
+
(h = e == null ? void 0 : e.values()) != null ? h : []
|
|
19275
19314
|
).map((g) => g.peerId);
|
|
19276
19315
|
n = FC(n), n == null || n.forEach((g) => {
|
|
19277
19316
|
var v;
|
|
@@ -19590,26 +19629,26 @@ const Uf = (kg = class {
|
|
|
19590
19629
|
producerId: o
|
|
19591
19630
|
}
|
|
19592
19631
|
}), {};
|
|
19593
|
-
const
|
|
19594
|
-
return r === "video" &&
|
|
19632
|
+
const h = i;
|
|
19633
|
+
return r === "video" && h.screenShare !== !0 && this.videoPeerConsumerMap.set(e, s), this.logger.info("ParticipantController::processMedia", {
|
|
19595
19634
|
consumer: {
|
|
19596
19635
|
id: s,
|
|
19597
19636
|
peerId: e,
|
|
19598
19637
|
kind: r,
|
|
19599
|
-
appData:
|
|
19638
|
+
appData: h,
|
|
19600
19639
|
remotelyPaused: d,
|
|
19601
19640
|
producerId: o
|
|
19602
19641
|
}
|
|
19603
19642
|
}), this.consumerPeerMap.set(s, {
|
|
19604
19643
|
type: r,
|
|
19605
19644
|
peerId: e,
|
|
19606
|
-
appData:
|
|
19645
|
+
appData: h,
|
|
19607
19646
|
remotelyPaused: d,
|
|
19608
19647
|
producerId: o
|
|
19609
19648
|
}), {
|
|
19610
19649
|
peerId: e,
|
|
19611
19650
|
kind: r,
|
|
19612
|
-
appData:
|
|
19651
|
+
appData: h,
|
|
19613
19652
|
remotelyPaused: d,
|
|
19614
19653
|
track: n,
|
|
19615
19654
|
producerId: o,
|
|
@@ -19685,10 +19724,10 @@ const Uf = (kg = class {
|
|
|
19685
19724
|
producerId: c
|
|
19686
19725
|
}
|
|
19687
19726
|
});
|
|
19688
|
-
const
|
|
19689
|
-
if (!
|
|
19727
|
+
const h = this.participants.joined.get(e);
|
|
19728
|
+
if (!h)
|
|
19690
19729
|
return;
|
|
19691
|
-
const g =
|
|
19730
|
+
const g = h.producers.find((v) => v.producerId === c);
|
|
19692
19731
|
if (g && (g.consumer = {
|
|
19693
19732
|
id: s,
|
|
19694
19733
|
peerId: e,
|
|
@@ -19699,11 +19738,11 @@ const Uf = (kg = class {
|
|
|
19699
19738
|
rtpReceiver: d,
|
|
19700
19739
|
localId: l
|
|
19701
19740
|
}), i.e2ee && this.context.getValue("peerSessionStore").emit(w.E2EE_ACTIVE_CONSUMER, { peerId: e, rtpReceiver: d, track: n }), i.screenShare) {
|
|
19702
|
-
r === "video" ?
|
|
19741
|
+
r === "video" ? h.screenShareTracks.video = n : r === "audio" && (h.screenShareTracks.audio = n), h.setScreenShareEnabled(!0), (f = this.context) == null || f.getValue("callstats").consumerSharedMediaState(s, { screen: !0 });
|
|
19703
19742
|
return;
|
|
19704
19743
|
}
|
|
19705
|
-
r === "video" ? (
|
|
19706
|
-
audio:
|
|
19744
|
+
r === "video" ? (h.videoTrack = n, h.setVideoEnabled(!0), this.updatePipSource(h.id, !0), this.context.getValue("callstats").consumerSharedMediaState(s, { video: !0 })) : r === "audio" && (h.audioTrack = n, h.setAudioEnabled(h.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
19745
|
+
audio: h.audioEnabled
|
|
19707
19746
|
}));
|
|
19708
19747
|
}
|
|
19709
19748
|
processConsumerPaused(s) {
|
|
@@ -19735,8 +19774,8 @@ const Uf = (kg = class {
|
|
|
19735
19774
|
const l = this.participants.joined.get(t);
|
|
19736
19775
|
if (!l)
|
|
19737
19776
|
return;
|
|
19738
|
-
const
|
|
19739
|
-
|
|
19777
|
+
const h = l.producers.find((g) => g.producerId === o);
|
|
19778
|
+
h && (h.consumer = {
|
|
19740
19779
|
id: s,
|
|
19741
19780
|
peerId: t,
|
|
19742
19781
|
kind: e,
|
|
@@ -19775,8 +19814,8 @@ const Uf = (kg = class {
|
|
|
19775
19814
|
const l = this.participants.joined.get(t);
|
|
19776
19815
|
if (!l)
|
|
19777
19816
|
return;
|
|
19778
|
-
const
|
|
19779
|
-
if (
|
|
19817
|
+
const h = l.producers.find((g) => g.producerId === o);
|
|
19818
|
+
if (h && (h.consumer = {
|
|
19780
19819
|
id: s,
|
|
19781
19820
|
peerId: t,
|
|
19782
19821
|
kind: e,
|
|
@@ -19901,7 +19940,7 @@ const yn = class extends Bt {
|
|
|
19901
19940
|
m(this, ra, void 0);
|
|
19902
19941
|
m(this, ia, void 0);
|
|
19903
19942
|
m(this, $d, (e) => {
|
|
19904
|
-
var
|
|
19943
|
+
var h, g, f;
|
|
19905
19944
|
const l = e, {
|
|
19906
19945
|
chat: r,
|
|
19907
19946
|
connectedMeetings: i,
|
|
@@ -19934,7 +19973,7 @@ const yn = class extends Bt {
|
|
|
19934
19973
|
video: void 0,
|
|
19935
19974
|
screenshare: void 0
|
|
19936
19975
|
};
|
|
19937
|
-
(
|
|
19976
|
+
(h = c.audio) != null && h.canProduce && (E.audio = {
|
|
19938
19977
|
canProduce: v(c.audio.canProduce)
|
|
19939
19978
|
}), (g = c.video) != null && g.canProduce && (E.video = {
|
|
19940
19979
|
canProduce: v(c.video.canProduce)
|
|
@@ -20298,32 +20337,32 @@ class $f extends Bt {
|
|
|
20298
20337
|
*/
|
|
20299
20338
|
constructor(e, r) {
|
|
20300
20339
|
super(r);
|
|
20301
|
-
|
|
20340
|
+
p(this, "localMediaHandler");
|
|
20302
20341
|
m(this, Vt, void 0);
|
|
20303
20342
|
S(this, Vt, e);
|
|
20304
20343
|
}
|
|
20305
20344
|
updatePermission() {
|
|
20306
20345
|
return u(this, null, function* () {
|
|
20307
20346
|
var d, l;
|
|
20308
|
-
const e = (
|
|
20309
|
-
this.mediaPermissions[
|
|
20310
|
-
const f = { message: this.mediaPermissions[
|
|
20347
|
+
const e = (h, g) => {
|
|
20348
|
+
this.mediaPermissions[h] = g;
|
|
20349
|
+
const f = { message: this.mediaPermissions[h], kind: h };
|
|
20311
20350
|
g === "DENIED" ? a(this, Vt).getValue("peerSessionStore").emit(w.MEDIA_PERMISSION_ERROR, f) : a(this, Vt).getValue("peerSessionStore").emit(w.MEDIA_PERMISSION_UPDATE, f);
|
|
20312
20351
|
};
|
|
20313
20352
|
if (_e.getName() === "firefox")
|
|
20314
20353
|
return;
|
|
20315
20354
|
const r = "microphone", i = "camera", n = yield (d = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : d.query({ name: r }), o = yield (l = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : l.query({
|
|
20316
20355
|
name: i
|
|
20317
|
-
}), c = (
|
|
20356
|
+
}), c = (h, g) => {
|
|
20318
20357
|
switch (g) {
|
|
20319
20358
|
case "granted":
|
|
20320
|
-
e(
|
|
20359
|
+
e(h, "ACCEPTED");
|
|
20321
20360
|
break;
|
|
20322
20361
|
case "denied":
|
|
20323
|
-
e(
|
|
20362
|
+
e(h, "DENIED");
|
|
20324
20363
|
break;
|
|
20325
20364
|
case "prompt":
|
|
20326
|
-
e(
|
|
20365
|
+
e(h, "NOT_REQUESTED");
|
|
20327
20366
|
break;
|
|
20328
20367
|
}
|
|
20329
20368
|
this.localMediaHandler.repopulateAvailableDevices();
|
|
@@ -20368,7 +20407,7 @@ class $f extends Bt {
|
|
|
20368
20407
|
*/
|
|
20369
20408
|
init() {
|
|
20370
20409
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
20371
|
-
var n, o, c, d, l,
|
|
20410
|
+
var n, o, c, d, l, h, g;
|
|
20372
20411
|
if (_e.init(), i && S(this, Vt, i), !this.localMediaHandler)
|
|
20373
20412
|
try {
|
|
20374
20413
|
let f = !0;
|
|
@@ -20422,7 +20461,7 @@ class $f extends Bt {
|
|
|
20422
20461
|
), f) {
|
|
20423
20462
|
this.logger.info(`Setting up SelfMedia streams using media handler. audio:${(d = e == null ? void 0 : e.audio) != null ? d : !0} video:${(l = e == null ? void 0 : e.video) != null ? l : !0}`);
|
|
20424
20463
|
const v = this.localMediaHandler.setupStreams({
|
|
20425
|
-
video: (
|
|
20464
|
+
video: (h = e == null ? void 0 : e.video) != null ? h : !0,
|
|
20426
20465
|
audio: (g = e == null ? void 0 : e.audio) != null ? g : !0
|
|
20427
20466
|
});
|
|
20428
20467
|
r || (yield v);
|
|
@@ -20718,22 +20757,22 @@ let Qe = (Ig = class extends $f {
|
|
|
20718
20757
|
*/
|
|
20719
20758
|
m(this, Ve);
|
|
20720
20759
|
m(this, Jo);
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20760
|
+
p(this, "name");
|
|
20761
|
+
p(this, "picture");
|
|
20762
|
+
p(this, "customParticipantId");
|
|
20763
|
+
p(this, "waitlistStatus");
|
|
20725
20764
|
m(this, na, void 0);
|
|
20726
20765
|
m(this, gt, void 0);
|
|
20727
20766
|
m(this, aa, void 0);
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20767
|
+
p(this, "role");
|
|
20768
|
+
p(this, "userId");
|
|
20769
|
+
p(this, "organizationId");
|
|
20770
|
+
p(this, "supportsRemoteControl", !1);
|
|
20771
|
+
p(this, "device");
|
|
20733
20772
|
m(this, Ue, void 0);
|
|
20734
|
-
|
|
20773
|
+
p(this, "hidden", !1);
|
|
20735
20774
|
/* Name of the preset used to join the meeting */
|
|
20736
|
-
|
|
20775
|
+
p(this, "presetName");
|
|
20737
20776
|
/**
|
|
20738
20777
|
* Returns the current state of room
|
|
20739
20778
|
* init - Inital State
|
|
@@ -20744,7 +20783,7 @@ let Qe = (Ig = class extends $f {
|
|
|
20744
20783
|
* left - User left the meeting
|
|
20745
20784
|
* ended - The meeting was ended
|
|
20746
20785
|
*/
|
|
20747
|
-
|
|
20786
|
+
p(this, "roomState", "init");
|
|
20748
20787
|
m(this, ca, /* @__PURE__ */ new Set());
|
|
20749
20788
|
m(this, da, /* @__PURE__ */ new Set());
|
|
20750
20789
|
S(this, Ue, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = (c = e.customParticipantId) != null ? c : e.clientSpecificId, this.waitlistStatus = "none", S(this, gt, r), S(this, na, i), this.hidden = !1, S(this, aa, !1), this.organizationId = e.organizationId, this.supportsRemoteControl = _e.isElectron(), this.device = _e.getDeviceInfo(), this.presetName = n, this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), x(this, Jo, xu).call(this);
|
|
@@ -20777,13 +20816,13 @@ let Qe = (Ig = class extends $f {
|
|
|
20777
20816
|
var f, v, E, C, _, I;
|
|
20778
20817
|
let c = (v = (f = t.getValue("defaults")) == null ? void 0 : f.audio) != null ? v : !0, d = (C = (E = t.getValue("defaults")) == null ? void 0 : E.video) != null ? C : !0;
|
|
20779
20818
|
r.canProduceAudio !== "ALLOWED" && (c = !1), r.canProduceVideo !== "ALLOWED" && (d = !1);
|
|
20780
|
-
const l = new Qe(t, e, r, i, n),
|
|
20781
|
-
Pr(
|
|
20819
|
+
const l = new Qe(t, e, r, i, n), h = y0(i.mediaConstraints);
|
|
20820
|
+
Pr(h, (_ = t.getValue("defaults")) == null ? void 0 : _.mediaConfiguration);
|
|
20782
20821
|
const g = (I = t.getValue("defaults")) == null ? void 0 : I.mediaHandler;
|
|
20783
20822
|
return g && (g.context = t), yield l.init({
|
|
20784
20823
|
audio: c,
|
|
20785
20824
|
video: d,
|
|
20786
|
-
constraints:
|
|
20825
|
+
constraints: h
|
|
20787
20826
|
}, o, t), l.setupEvents(), l;
|
|
20788
20827
|
});
|
|
20789
20828
|
}
|
|
@@ -21265,11 +21304,11 @@ var Ko;
|
|
|
21265
21304
|
class Uu {
|
|
21266
21305
|
constructor(t, e = !1) {
|
|
21267
21306
|
// Queue of pending tasks (map of PendingTasks indexed by id).
|
|
21268
|
-
|
|
21307
|
+
p(this, "pendingTasks", /* @__PURE__ */ new Map());
|
|
21269
21308
|
// Incrementing PendingTask id.
|
|
21270
|
-
|
|
21309
|
+
p(this, "nextTaskId", 0);
|
|
21271
21310
|
// Whether stop() method is stopping all pending tasks.
|
|
21272
|
-
|
|
21311
|
+
p(this, "stopping", !1);
|
|
21273
21312
|
m(this, Ko, void 0);
|
|
21274
21313
|
this.log = e, S(this, Ko, { info: e && t ? t.info : () => {
|
|
21275
21314
|
} });
|
|
@@ -21392,12 +21431,12 @@ function Ff(s, t) {
|
|
|
21392
21431
|
delayTime: 10
|
|
21393
21432
|
}, t);
|
|
21394
21433
|
let c = 0, d, l = !1;
|
|
21395
|
-
const
|
|
21434
|
+
const h = (g) => {
|
|
21396
21435
|
l = !0, r(g);
|
|
21397
21436
|
};
|
|
21398
21437
|
for (; c < n; ) {
|
|
21399
21438
|
try {
|
|
21400
|
-
const g = yield s(c,
|
|
21439
|
+
const g = yield s(c, h);
|
|
21401
21440
|
return e(g);
|
|
21402
21441
|
} catch (g) {
|
|
21403
21442
|
if (d = g, l)
|
|
@@ -21451,7 +21490,7 @@ var Ke;
|
|
|
21451
21490
|
class mD {
|
|
21452
21491
|
constructor(t) {
|
|
21453
21492
|
m(this, Ke, void 0);
|
|
21454
|
-
|
|
21493
|
+
p(this, "events");
|
|
21455
21494
|
S(this, Ke, t), this.events = ys;
|
|
21456
21495
|
}
|
|
21457
21496
|
joinRoom(t, e, r, i = !1) {
|
|
@@ -21686,20 +21725,20 @@ class Ah extends Ul {
|
|
|
21686
21725
|
constructor() {
|
|
21687
21726
|
super(...arguments);
|
|
21688
21727
|
/** Local stream for sending general media tracks. */
|
|
21689
|
-
|
|
21728
|
+
p(this, "_sendWebStream", new MediaStream());
|
|
21690
21729
|
/** Local stream for sending screenshare tracks. */
|
|
21691
|
-
|
|
21730
|
+
p(this, "_sendScreenShareStream", new MediaStream());
|
|
21692
21731
|
/** Handler direction. */
|
|
21693
|
-
|
|
21732
|
+
p(this, "_direction");
|
|
21694
21733
|
/** RTCPeerConnection instance. */
|
|
21695
|
-
|
|
21734
|
+
p(this, "pc");
|
|
21696
21735
|
/** Got transport local and remote parameters. */
|
|
21697
|
-
|
|
21736
|
+
p(this, "_transportReady", !1);
|
|
21698
21737
|
// Map of RTCTransceivers indexed by MID.
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21738
|
+
p(this, "_mapMidTransceiver", /* @__PURE__ */ new Map());
|
|
21739
|
+
p(this, "enableHighBitrate", !1);
|
|
21740
|
+
p(this, "enableStereo", !1);
|
|
21741
|
+
p(this, "enableDtx", !0);
|
|
21703
21742
|
}
|
|
21704
21743
|
get midTransceiverMap() {
|
|
21705
21744
|
return this._mapMidTransceiver;
|
|
@@ -21987,7 +22026,7 @@ class Mh extends Ah {
|
|
|
21987
22026
|
this.logger.debug("creating new transceiver");
|
|
21988
22027
|
const l = RTCRtpSender.getCapabilities(typeof t == "string" ? t : t.kind);
|
|
21989
22028
|
this.logger.info(`senders available params: ${JSON.stringify(l)}`);
|
|
21990
|
-
const
|
|
22029
|
+
const h = [];
|
|
21991
22030
|
r && r.length && r.forEach((g) => {
|
|
21992
22031
|
var v;
|
|
21993
22032
|
const f = l.codecs.find((E) => E.mimeType.includes(g.name));
|
|
@@ -21998,15 +22037,15 @@ class Mh extends Ah {
|
|
|
21998
22037
|
const C = Array.from(new Set(E).values());
|
|
21999
22038
|
f.sdpFmtpLine = C.join(";");
|
|
22000
22039
|
}
|
|
22001
|
-
|
|
22002
|
-
}), this.logger.info(`selected codecs: ${JSON.stringify(
|
|
22040
|
+
h.push(f);
|
|
22041
|
+
}), this.logger.info(`selected codecs: ${JSON.stringify(h)}`), o.setCodecPreferences(h);
|
|
22003
22042
|
}
|
|
22004
22043
|
const c = yield this.pc.createOffer();
|
|
22005
22044
|
if (yield this.pc.setLocalDescription(c), r && r.findIndex(({ name: l }) => l === "opus") >= 0) {
|
|
22006
|
-
const { enableDtx: l, enableStereo:
|
|
22045
|
+
const { enableDtx: l, enableStereo: h } = this, g = this.enableHighBitrate ? h ? 128e3 : 64e3 : h ? 64e3 : 32e3;
|
|
22007
22046
|
c.sdp = c.sdp.replace(
|
|
22008
22047
|
"minptime=10;useinbandfec=1",
|
|
22009
|
-
`minptime=10;useinbandfec=1;${l ? "usedtx=1;" : ""}${
|
|
22048
|
+
`minptime=10;useinbandfec=1;${l ? "usedtx=1;" : ""}${h ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${g}`
|
|
22010
22049
|
), c.sdp += `a=rtcp-fb:111 nack\r
|
|
22011
22050
|
`;
|
|
22012
22051
|
}
|
|
@@ -22039,7 +22078,7 @@ class Pd extends Ah {
|
|
|
22039
22078
|
// eslint-disable-next-line no-useless-constructor
|
|
22040
22079
|
constructor(e, r) {
|
|
22041
22080
|
super(e);
|
|
22042
|
-
|
|
22081
|
+
p(this, "supportsSendEncodings", !1);
|
|
22043
22082
|
this.supportsSendEncodings = r.supportsSendEncodings;
|
|
22044
22083
|
}
|
|
22045
22084
|
/**
|
|
@@ -22078,16 +22117,16 @@ class Pd extends Ah {
|
|
|
22078
22117
|
var L;
|
|
22079
22118
|
const E = cs.parse(f), C = E.media[E.media.length - 1], _ = C.rtp.filter((B) => v.some((G) => G.name === B.codec)), I = C.fmtp.filter((B) => _.some((G) => G.payload === B.payload)), M = (L = C.rtcpFb) == null ? void 0 : L.filter((B) => _.some((G) => G.payload === B.payload)), U = _.map((B) => B.payload);
|
|
22080
22119
|
return E.media[E.media.length - 1].rtp = _, E.media[E.media.length - 1].fmtp = I, E.media[E.media.length - 1].rtcpFb = M, E.media[E.media.length - 1].payloads = U.join(" "), cs.write(E);
|
|
22081
|
-
},
|
|
22082
|
-
if (
|
|
22120
|
+
}, h = yield this.pc.createOffer();
|
|
22121
|
+
if (h.sdp = l(h.sdp, i), this.logger.debug(`send() | calling pc.setLocalDescription() [offer:${JSON.stringify(h)}]`), yield this.pc.setLocalDescription(h), e === "audio" || e.kind === "audio") {
|
|
22083
22122
|
const { enableDtx: f, enableStereo: v } = this, E = this.enableHighBitrate ? v ? 128e3 : 64e3 : v ? 64e3 : 32e3;
|
|
22084
|
-
|
|
22123
|
+
h.sdp = h.sdp.replace(
|
|
22085
22124
|
"minptime=10;useinbandfec=1",
|
|
22086
22125
|
`minptime=10;useinbandfec=1;${f ? "usedtx=1;" : ""}${v ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${E}`
|
|
22087
22126
|
);
|
|
22088
22127
|
}
|
|
22089
22128
|
return this.midTransceiverMap.set(d.mid, d), {
|
|
22090
|
-
offerSdp:
|
|
22129
|
+
offerSdp: h,
|
|
22091
22130
|
callback: (f) => u(this, null, function* () {
|
|
22092
22131
|
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(f)}]`), yield this.pc.setRemoteDescription(f), d.mid;
|
|
22093
22132
|
}),
|
|
@@ -22213,40 +22252,40 @@ class SD extends Ul {
|
|
|
22213
22252
|
/**
|
|
22214
22253
|
* Associated transciever RTCRtpSender object
|
|
22215
22254
|
*/
|
|
22216
|
-
|
|
22255
|
+
p(this, "rtpReceiver");
|
|
22217
22256
|
/**
|
|
22218
22257
|
* Consumer ID
|
|
22219
22258
|
*/
|
|
22220
|
-
|
|
22259
|
+
p(this, "id");
|
|
22221
22260
|
/**
|
|
22222
22261
|
* Consumer's local ID
|
|
22223
22262
|
*/
|
|
22224
|
-
|
|
22263
|
+
p(this, "localId");
|
|
22225
22264
|
/**
|
|
22226
22265
|
* Producer ID associated with this consumer
|
|
22227
22266
|
*/
|
|
22228
|
-
|
|
22267
|
+
p(this, "producerId");
|
|
22229
22268
|
/**
|
|
22230
22269
|
* Transport ID of the producing transport on the producing peer
|
|
22231
22270
|
*/
|
|
22232
|
-
|
|
22271
|
+
p(this, "producingTransportId");
|
|
22233
22272
|
/**
|
|
22234
22273
|
* Mime type of the consumer stream
|
|
22235
22274
|
*/
|
|
22236
|
-
|
|
22275
|
+
p(this, "mimeType");
|
|
22237
22276
|
/**
|
|
22238
22277
|
* The track associated with this consumer
|
|
22239
22278
|
*/
|
|
22240
|
-
|
|
22279
|
+
p(this, "track");
|
|
22241
22280
|
/**
|
|
22242
22281
|
* Producing peer id corresponding to this consumer
|
|
22243
22282
|
*/
|
|
22244
|
-
|
|
22283
|
+
p(this, "peerId");
|
|
22245
22284
|
/**
|
|
22246
22285
|
* Custom data attached to this consumer
|
|
22247
22286
|
*/
|
|
22248
|
-
|
|
22249
|
-
|
|
22287
|
+
p(this, "appData");
|
|
22288
|
+
p(this, "transceiver");
|
|
22250
22289
|
/**
|
|
22251
22290
|
* RTCRtpReceiver associated with the consumer
|
|
22252
22291
|
*/
|
|
@@ -22350,11 +22389,11 @@ class vD extends Ul {
|
|
|
22350
22389
|
/**
|
|
22351
22390
|
* Producer ID.
|
|
22352
22391
|
*/
|
|
22353
|
-
|
|
22392
|
+
p(this, "id");
|
|
22354
22393
|
/**
|
|
22355
22394
|
* Local ID.
|
|
22356
22395
|
*/
|
|
22357
|
-
|
|
22396
|
+
p(this, "localId");
|
|
22358
22397
|
/**
|
|
22359
22398
|
* Associated RTCRtpSender.
|
|
22360
22399
|
*/
|
|
@@ -22362,15 +22401,15 @@ class vD extends Ul {
|
|
|
22362
22401
|
/**
|
|
22363
22402
|
* Kind of media on to this producer
|
|
22364
22403
|
*/
|
|
22365
|
-
|
|
22404
|
+
p(this, "kind");
|
|
22366
22405
|
/**
|
|
22367
22406
|
* App custom data.
|
|
22368
22407
|
*/
|
|
22369
|
-
|
|
22408
|
+
p(this, "appData");
|
|
22370
22409
|
/**
|
|
22371
22410
|
* Associated transciever RTCRtpSender object
|
|
22372
22411
|
*/
|
|
22373
|
-
|
|
22412
|
+
p(this, "rtpSender");
|
|
22374
22413
|
/**
|
|
22375
22414
|
* Whether the Producer should call stop() in given tracks.
|
|
22376
22415
|
*/
|
|
@@ -22558,61 +22597,61 @@ var Br, jd, Di;
|
|
|
22558
22597
|
const En = class extends ot.EventEmitter {
|
|
22559
22598
|
constructor(e, r, i, n) {
|
|
22560
22599
|
super();
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
|
|
22600
|
+
p(this, "channel");
|
|
22601
|
+
p(this, "queue");
|
|
22602
|
+
p(this, "serverProtocolVersion");
|
|
22564
22603
|
m(this, Br, /* @__PURE__ */ new Map());
|
|
22565
22604
|
m(this, jd, void 0);
|
|
22566
22605
|
m(this, Di, void 0);
|
|
22567
|
-
|
|
22606
|
+
p(this, "respond", (e, r, i = !1) => {
|
|
22568
22607
|
let n;
|
|
22569
22608
|
i ? n = En.createErrorResponse(e, r) : n = En.createResponse(e, r), this.channel.send(JSON.stringify(n));
|
|
22570
22609
|
});
|
|
22571
|
-
|
|
22610
|
+
p(this, "notify", (e) => {
|
|
22572
22611
|
const r = En.createNotification(e);
|
|
22573
22612
|
this.channel.send(JSON.stringify(r));
|
|
22574
22613
|
});
|
|
22575
|
-
|
|
22614
|
+
p(this, "request", (e) => u(this, null, function* () {
|
|
22576
22615
|
const r = En.createRequest(e), i = new Promise((n, o) => {
|
|
22577
22616
|
const { id: d } = r.payload._bolt, l = {
|
|
22578
22617
|
id: d,
|
|
22579
22618
|
method: r.type,
|
|
22580
|
-
resolve: (
|
|
22581
|
-
this.queue.delete(d) && (clearTimeout(l.timer), n(
|
|
22619
|
+
resolve: (h) => {
|
|
22620
|
+
this.queue.delete(d) && (clearTimeout(l.timer), n(h));
|
|
22582
22621
|
},
|
|
22583
22622
|
timer: setTimeout(() => {
|
|
22584
22623
|
this.queue.delete(d) && o(new Error(`request timeout for message id: ${d}`));
|
|
22585
22624
|
}, 2e4),
|
|
22586
|
-
cancel: (
|
|
22587
|
-
this.queue.delete(d) && (clearTimeout(l.timer), o(
|
|
22625
|
+
cancel: (h) => {
|
|
22626
|
+
this.queue.delete(d) && (clearTimeout(l.timer), o(h));
|
|
22588
22627
|
}
|
|
22589
22628
|
};
|
|
22590
22629
|
this.queue.set(d, l);
|
|
22591
22630
|
});
|
|
22592
22631
|
return this.channel.send(JSON.stringify(r)), i;
|
|
22593
22632
|
}));
|
|
22594
|
-
|
|
22633
|
+
p(this, "send", (e) => {
|
|
22595
22634
|
const r = JSON.stringify(e), i = 16384;
|
|
22596
22635
|
if (r.length > i) {
|
|
22597
22636
|
const n = i - 200, o = Math.ceil(r.length / n), c = [];
|
|
22598
22637
|
for (let l = 0; l < o; l += 1) {
|
|
22599
|
-
const
|
|
22600
|
-
c.push(r.slice(
|
|
22638
|
+
const h = l * n, g = (l + 1) * n;
|
|
22639
|
+
c.push(r.slice(h, g));
|
|
22601
22640
|
}
|
|
22602
22641
|
const d = tn();
|
|
22603
22642
|
for (let l = 0; l < o; l += 1) {
|
|
22604
|
-
const
|
|
22643
|
+
const h = c[l], f = JSON.stringify({
|
|
22605
22644
|
id: d,
|
|
22606
22645
|
count: o,
|
|
22607
22646
|
chunkIndex: l,
|
|
22608
|
-
chunk:
|
|
22647
|
+
chunk: h
|
|
22609
22648
|
});
|
|
22610
22649
|
a(this, Di).debug(`Sending message chunk over dc: ${f}`), this.channel.send(f);
|
|
22611
22650
|
}
|
|
22612
22651
|
} else
|
|
22613
22652
|
a(this, Di).debug(`Sending message over dc: ${r}`), this.channel.send(r);
|
|
22614
22653
|
});
|
|
22615
|
-
|
|
22654
|
+
p(this, "processMessage", (e) => {
|
|
22616
22655
|
var i;
|
|
22617
22656
|
a(this, Br).has(e.id) || a(this, Br).set(e.id, []);
|
|
22618
22657
|
const r = a(this, Br).get(e.id);
|
|
@@ -22630,11 +22669,11 @@ const En = class extends ot.EventEmitter {
|
|
|
22630
22669
|
return c;
|
|
22631
22670
|
}
|
|
22632
22671
|
});
|
|
22633
|
-
|
|
22672
|
+
p(this, "processResponseMsg", (e) => {
|
|
22634
22673
|
const { id: r } = e.payload._bolt, i = this.queue.get(r);
|
|
22635
22674
|
return i ? (a(this, Di).debug(`resolving pending request with id: ${r}, complete response: ${JSON.stringify(e)}`), e.type === "error" ? i.cancel(ng(e)) : i.resolve(ng(e)), !0) : !1;
|
|
22636
22675
|
});
|
|
22637
|
-
|
|
22676
|
+
p(this, "processBoltHandshake", (e) => {
|
|
22638
22677
|
var r, i;
|
|
22639
22678
|
return e.type === "_bolt" || e.type === "handshake" ? (this.respond((i = (r = e.payload._bolt) == null ? void 0 : r.id) != null ? i : ou(8), { type: "_bolt", payload: { message: "pong" } }), !0) : !1;
|
|
22640
22679
|
});
|
|
@@ -22642,7 +22681,7 @@ const En = class extends ot.EventEmitter {
|
|
|
22642
22681
|
}
|
|
22643
22682
|
};
|
|
22644
22683
|
let ni = En;
|
|
22645
|
-
Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(),
|
|
22684
|
+
Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), p(ni, "createRequest", (e) => {
|
|
22646
22685
|
var r;
|
|
22647
22686
|
if ((r = e.payload) != null && r._bolt)
|
|
22648
22687
|
throw new Error("rpc fields are internal values");
|
|
@@ -22656,7 +22695,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22656
22695
|
}
|
|
22657
22696
|
})
|
|
22658
22697
|
};
|
|
22659
|
-
}),
|
|
22698
|
+
}), p(ni, "createResponse", (e, r) => {
|
|
22660
22699
|
var i;
|
|
22661
22700
|
if ((i = r.payload) != null && i._bolt)
|
|
22662
22701
|
throw new Error("rpc fields are internal values");
|
|
@@ -22670,7 +22709,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22670
22709
|
}
|
|
22671
22710
|
})
|
|
22672
22711
|
};
|
|
22673
|
-
}),
|
|
22712
|
+
}), p(ni, "createNotification", (e) => {
|
|
22674
22713
|
var r;
|
|
22675
22714
|
if ((r = e.payload) != null && r._bolt)
|
|
22676
22715
|
throw new Error("rpc fields are internal values");
|
|
@@ -22684,7 +22723,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22684
22723
|
}
|
|
22685
22724
|
})
|
|
22686
22725
|
};
|
|
22687
|
-
}),
|
|
22726
|
+
}), p(ni, "createErrorResponse", (e, r) => ({
|
|
22688
22727
|
type: "error",
|
|
22689
22728
|
payload: {
|
|
22690
22729
|
error: r.message,
|
|
@@ -22706,39 +22745,39 @@ const Pn = class extends Ul {
|
|
|
22706
22745
|
iceTransportPolicy: c,
|
|
22707
22746
|
proprietaryConstraints: d,
|
|
22708
22747
|
additionalSettings: l,
|
|
22709
|
-
appData:
|
|
22748
|
+
appData: h,
|
|
22710
22749
|
config: g
|
|
22711
22750
|
}) {
|
|
22712
22751
|
var C, _, I;
|
|
22713
22752
|
super(e);
|
|
22714
|
-
|
|
22715
|
-
|
|
22753
|
+
p(this, "awaitQueue");
|
|
22754
|
+
p(this, "observer");
|
|
22716
22755
|
// Id.
|
|
22717
|
-
|
|
22718
|
-
|
|
22756
|
+
p(this, "id");
|
|
22757
|
+
p(this, "serverId");
|
|
22719
22758
|
// Direction.
|
|
22720
|
-
|
|
22759
|
+
p(this, "direction");
|
|
22721
22760
|
// SCTP max message size if enabled, null otherwise.
|
|
22722
|
-
|
|
22761
|
+
p(this, "maxSctpMessageSize");
|
|
22723
22762
|
// RTC handler isntance.
|
|
22724
|
-
|
|
22763
|
+
p(this, "handler");
|
|
22725
22764
|
// Transport connection state.
|
|
22726
|
-
|
|
22765
|
+
p(this, "connectionState", "new");
|
|
22727
22766
|
// Producers map
|
|
22728
|
-
|
|
22767
|
+
p(this, "producers");
|
|
22729
22768
|
// Consumers map
|
|
22730
|
-
|
|
22769
|
+
p(this, "consumers");
|
|
22731
22770
|
// Datachannels map
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22771
|
+
p(this, "datachannels");
|
|
22772
|
+
p(this, "connected", !1);
|
|
22773
|
+
p(this, "eventsDCReadyPromise");
|
|
22774
|
+
p(this, "eventsDCReadyPromiseResolver");
|
|
22775
|
+
p(this, "eventsDCFailureTimer");
|
|
22776
|
+
p(this, "transportConnectionPromise");
|
|
22777
|
+
p(this, "consumerTrackEvents");
|
|
22778
|
+
p(this, "unknownTracksMap");
|
|
22740
22779
|
// App custom data.
|
|
22741
|
-
|
|
22780
|
+
p(this, "appData");
|
|
22742
22781
|
m(this, Oi, void 0);
|
|
22743
22782
|
S(this, Oi, e);
|
|
22744
22783
|
const f = e.getValue("logger");
|
|
@@ -22751,7 +22790,7 @@ const Pn = class extends Ul {
|
|
|
22751
22790
|
iceTransportPolicy: c,
|
|
22752
22791
|
additionalSettings: l,
|
|
22753
22792
|
proprietaryConstraints: d
|
|
22754
|
-
}), this.appData =
|
|
22793
|
+
}), this.appData = h || {};
|
|
22755
22794
|
const E = 3e4;
|
|
22756
22795
|
this.transportConnectionPromise = new Promise((M) => {
|
|
22757
22796
|
const U = setTimeout(() => {
|
|
@@ -22909,7 +22948,7 @@ const Pn = class extends Ul {
|
|
|
22909
22948
|
codecOptions: c,
|
|
22910
22949
|
stopTracks: d = !0,
|
|
22911
22950
|
disableTrackOnPause: l = !0,
|
|
22912
|
-
zeroRtpOnPause:
|
|
22951
|
+
zeroRtpOnPause: h = !1,
|
|
22913
22952
|
appData: g = {}
|
|
22914
22953
|
} = e;
|
|
22915
22954
|
this.logger.debug(`produce() [track:${n.id}]`);
|
|
@@ -22942,7 +22981,7 @@ const Pn = class extends Ul {
|
|
|
22942
22981
|
track: n,
|
|
22943
22982
|
stopTracks: d,
|
|
22944
22983
|
disableTrackOnPause: l,
|
|
22945
|
-
zeroRtpOnPause:
|
|
22984
|
+
zeroRtpOnPause: h,
|
|
22946
22985
|
appData: g,
|
|
22947
22986
|
handler: this.handler,
|
|
22948
22987
|
rtpSender: E
|
|
@@ -22981,15 +23020,15 @@ const Pn = class extends Ul {
|
|
|
22981
23020
|
sessionDescription: c,
|
|
22982
23021
|
failedProducers: d
|
|
22983
23022
|
} = yield r(e);
|
|
22984
|
-
o.forEach((
|
|
22985
|
-
n[g] = this.createConsumerObjectAndWaitForTrack(j(O({},
|
|
23023
|
+
o.forEach((h, g) => {
|
|
23024
|
+
n[g] = this.createConsumerObjectAndWaitForTrack(j(O({}, h), {
|
|
22986
23025
|
producerId: g
|
|
22987
23026
|
}));
|
|
22988
23027
|
}), c && (this.logger.info("Session description found, sending negotiation request"), yield i(c));
|
|
22989
23028
|
const l = [];
|
|
22990
23029
|
return yield Promise.all(Object.entries(n).map(
|
|
22991
|
-
([
|
|
22992
|
-
this.logger.error(`Failed to create consumer object, producer: ${
|
|
23030
|
+
([h, g]) => g.then((f) => l.push(f)).catch(() => {
|
|
23031
|
+
this.logger.error(`Failed to create consumer object, producer: ${h}`, {
|
|
22993
23032
|
error: { message: "This should not happen" },
|
|
22994
23033
|
transport: { serverId: this.serverId }
|
|
22995
23034
|
});
|
|
@@ -23124,7 +23163,7 @@ const Pn = class extends Ul {
|
|
|
23124
23163
|
streamId: c,
|
|
23125
23164
|
paused: d,
|
|
23126
23165
|
screenShare: l,
|
|
23127
|
-
appData:
|
|
23166
|
+
appData: h,
|
|
23128
23167
|
kind: g,
|
|
23129
23168
|
mimeType: f
|
|
23130
23169
|
} = e, v = `${c}:${g}`, E = j(O({}, e), {
|
|
@@ -23151,7 +23190,7 @@ const Pn = class extends Ul {
|
|
|
23151
23190
|
producingPeerId: n,
|
|
23152
23191
|
producingTransportId: o,
|
|
23153
23192
|
handler: this.handler,
|
|
23154
|
-
appData: j(O({},
|
|
23193
|
+
appData: j(O({}, h), { screenShare: l, peerId: n }),
|
|
23155
23194
|
rtpReceiver: B.receiver,
|
|
23156
23195
|
mimeType: f
|
|
23157
23196
|
});
|
|
@@ -23242,7 +23281,7 @@ var Xs, Ni;
|
|
|
23242
23281
|
class PD {
|
|
23243
23282
|
constructor(t, { handlerName: e, handlerFactory: r } = {}) {
|
|
23244
23283
|
// RTC handler factory.
|
|
23245
|
-
|
|
23284
|
+
p(this, "handlerFactory");
|
|
23246
23285
|
m(this, Xs, void 0);
|
|
23247
23286
|
m(this, Ni, void 0);
|
|
23248
23287
|
const i = t.getValue("logger");
|
|
@@ -23315,7 +23354,7 @@ class CD extends ot.EventEmitter {
|
|
|
23315
23354
|
m(this, Yd);
|
|
23316
23355
|
m(this, rc);
|
|
23317
23356
|
m(this, ic);
|
|
23318
|
-
|
|
23357
|
+
p(this, "context");
|
|
23319
23358
|
m(this, pa, void 0);
|
|
23320
23359
|
m(this, it, void 0);
|
|
23321
23360
|
m(this, nt, void 0);
|
|
@@ -23422,7 +23461,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Xo = new WeakMap(),
|
|
|
23422
23461
|
});
|
|
23423
23462
|
}, Gd = new WeakSet(), jf = function(e) {
|
|
23424
23463
|
return u(this, null, function* () {
|
|
23425
|
-
var o, c, d, l,
|
|
23464
|
+
var o, c, d, l, h, g, f, v;
|
|
23426
23465
|
(Aa(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(te.FORCE_RELAY)) && S(this, Ms, "relay"), this.logger.info(`ICE Transport Policy set to ${a(this, Ms)}`);
|
|
23427
23466
|
const n = yield vt().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
23428
23467
|
if (e.send) {
|
|
@@ -23436,7 +23475,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Xo = new WeakMap(),
|
|
|
23436
23475
|
},
|
|
23437
23476
|
config: {
|
|
23438
23477
|
enableHighBitrate: (l = (d = (c = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? l : !1,
|
|
23439
|
-
enableStereo: (f = (g = (
|
|
23478
|
+
enableStereo: (f = (g = (h = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : h.audio) == null ? void 0 : g.enableStereo) != null ? f : !1,
|
|
23440
23479
|
enableDtx: !!E
|
|
23441
23480
|
},
|
|
23442
23481
|
iceTransportPolicy: a(this, Ms)
|
|
@@ -23670,16 +23709,16 @@ class RD {
|
|
|
23670
23709
|
throw new Error("List of producers is required");
|
|
23671
23710
|
const e = /* @__PURE__ */ new Map(), r = [];
|
|
23672
23711
|
t.forEach((d) => {
|
|
23673
|
-
const { producingPeerId: l, producerId:
|
|
23712
|
+
const { producingPeerId: l, producerId: h, producingTransportId: g } = d, f = {
|
|
23674
23713
|
simulcast: {
|
|
23675
23714
|
preferredRid: "f",
|
|
23676
23715
|
priorityOrdering: "asciibetical",
|
|
23677
23716
|
ridNotAvailable: "asciibetical"
|
|
23678
23717
|
}
|
|
23679
23718
|
};
|
|
23680
|
-
e.set(
|
|
23719
|
+
e.set(h, l), r.push(O({
|
|
23681
23720
|
producingPeerId: l,
|
|
23682
|
-
producerId:
|
|
23721
|
+
producerId: h,
|
|
23683
23722
|
producingTransportId: g
|
|
23684
23723
|
}, f));
|
|
23685
23724
|
});
|
|
@@ -23690,13 +23729,13 @@ class RD {
|
|
|
23690
23729
|
t.forEach((d) => n.set(d.producerId, d));
|
|
23691
23730
|
const o = /* @__PURE__ */ new Map(), c = [];
|
|
23692
23731
|
return Object.entries(i.consumerStateMap).forEach(([d, l]) => {
|
|
23693
|
-
const
|
|
23694
|
-
if (!
|
|
23732
|
+
const h = n.get(d);
|
|
23733
|
+
if (!h)
|
|
23695
23734
|
return;
|
|
23696
23735
|
if (l.errorCode) {
|
|
23697
23736
|
a(this, Zt).warn(`Consumer request failed for producer ${d}`, {
|
|
23698
23737
|
error: { message: l.errorCode }
|
|
23699
|
-
}), c.push(j(O({},
|
|
23738
|
+
}), c.push(j(O({}, h), { errorCode: l.errorCode }));
|
|
23700
23739
|
return;
|
|
23701
23740
|
}
|
|
23702
23741
|
let g = {};
|
|
@@ -23706,14 +23745,14 @@ class RD {
|
|
|
23706
23745
|
}
|
|
23707
23746
|
o.set(d, {
|
|
23708
23747
|
consumerId: l.consumerId,
|
|
23709
|
-
producingTransportId:
|
|
23710
|
-
producingPeerId:
|
|
23711
|
-
kind:
|
|
23712
|
-
paused:
|
|
23748
|
+
producingTransportId: h.producingTransportId,
|
|
23749
|
+
producingPeerId: h.producingPeerId,
|
|
23750
|
+
kind: h.kind,
|
|
23751
|
+
paused: h.pause,
|
|
23713
23752
|
streamId: l.producerTrack.streamId,
|
|
23714
23753
|
trackId: l.producerTrack.trackId,
|
|
23715
|
-
screenShare:
|
|
23716
|
-
mimeType:
|
|
23754
|
+
screenShare: h.screenShare,
|
|
23755
|
+
mimeType: h.mimeType,
|
|
23717
23756
|
appData: g
|
|
23718
23757
|
});
|
|
23719
23758
|
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers: c };
|
|
@@ -23824,8 +23863,8 @@ class Oh {
|
|
|
23824
23863
|
screenShare: (f = i.screenShare) != null ? f : !1,
|
|
23825
23864
|
mimeType: `${e}/${(v = n[0]) == null ? void 0 : v.name}`,
|
|
23826
23865
|
producingTransportId: o
|
|
23827
|
-
}, { answer:
|
|
23828
|
-
return { answer:
|
|
23866
|
+
}, { answer: h, producerId: g } = yield this.socketHandler.produce(l);
|
|
23867
|
+
return { answer: h, producerId: g };
|
|
23829
23868
|
});
|
|
23830
23869
|
}
|
|
23831
23870
|
}
|
|
@@ -23966,7 +24005,7 @@ xi = new WeakMap(), Hr = new WeakMap(), Sa = new WeakMap(), nc = new WeakMap(),
|
|
|
23966
24005
|
);
|
|
23967
24006
|
if (o.forEach(x(this, sl, Zf).bind(this)), c != null && c.length) {
|
|
23968
24007
|
this.logger.error("Failed to create consumers for producers", { producers: c });
|
|
23969
|
-
const d = c.filter(({ errorCode: l, producerId:
|
|
24008
|
+
const d = c.filter(({ errorCode: l, producerId: h }) => l === "not_found_track_error" ? (this.logger.error(`Track not found for producer: ${h}. This will not be retried.`), !1) : l === "backend_error" ? (this.logger.error("Unrecoverable error: backend error"), !1) : !0);
|
|
23970
24009
|
S(this, Zs, a(this, Zs).concat(d)), S(this, va, setTimeout(
|
|
23971
24010
|
x(this, ac, Gu).bind(this),
|
|
23972
24011
|
e
|
|
@@ -24007,11 +24046,11 @@ xi = new WeakMap(), Hr = new WeakMap(), Sa = new WeakMap(), nc = new WeakMap(),
|
|
|
24007
24046
|
}
|
|
24008
24047
|
};
|
|
24009
24048
|
try {
|
|
24010
|
-
const l = yield this.socketHandler.closeProducer(d),
|
|
24049
|
+
const l = yield this.socketHandler.closeProducer(d), h = {
|
|
24011
24050
|
sdp: l == null ? void 0 : l.sdp,
|
|
24012
24051
|
type: l == null ? void 0 : l.type
|
|
24013
24052
|
};
|
|
24014
|
-
this.logger.info("producer::closed", { producer: j(O({}, e), { status: "closed" }) }), n({ answer:
|
|
24053
|
+
this.logger.info("producer::closed", { producer: j(O({}, e), { status: "closed" }) }), n({ answer: h });
|
|
24015
24054
|
} catch (l) {
|
|
24016
24055
|
this.logger.error("producer close error", l);
|
|
24017
24056
|
}
|
|
@@ -24056,7 +24095,7 @@ const ol = class {
|
|
|
24056
24095
|
minEnergyThreshold: c = 5e-3,
|
|
24057
24096
|
maxEnergyThreshold: d = 0.2,
|
|
24058
24097
|
energyRatioThreshold: l = 1.5,
|
|
24059
|
-
noiseHistorySize:
|
|
24098
|
+
noiseHistorySize: h = 50
|
|
24060
24099
|
} = {}) {
|
|
24061
24100
|
/**
|
|
24062
24101
|
* Update the energy threshold based on current noise conditions
|
|
@@ -24086,7 +24125,7 @@ const ol = class {
|
|
|
24086
24125
|
m(this, $i, 0);
|
|
24087
24126
|
m(this, er, []);
|
|
24088
24127
|
m(this, hc, void 0);
|
|
24089
|
-
S(this, Ta, t), S(this, Pt, t), S(this, oc, e), S(this, cc, r), S(this, dc, i), S(this, ya, n), S(this, Ea, o), S(this, lc, c), S(this, uc, d), S(this, Pa, l), S(this, hc,
|
|
24128
|
+
S(this, Ta, t), S(this, Pt, t), S(this, oc, e), S(this, cc, r), S(this, dc, i), S(this, ya, n), S(this, Ea, o), S(this, lc, c), S(this, uc, d), S(this, Pa, l), S(this, hc, h), S(this, gs, t / 2);
|
|
24090
24129
|
}
|
|
24091
24130
|
get voiceDetected() {
|
|
24092
24131
|
return a(this, ms);
|
|
@@ -24144,7 +24183,7 @@ oc = new WeakMap(), cc = new WeakMap(), dc = new WeakMap(), Ta = new WeakMap(),
|
|
|
24144
24183
|
var pc;
|
|
24145
24184
|
class ag {
|
|
24146
24185
|
constructor(t) {
|
|
24147
|
-
|
|
24186
|
+
p(this, "RNAudioSampleHandler");
|
|
24148
24187
|
m(this, pc, void 0);
|
|
24149
24188
|
S(this, pc, t);
|
|
24150
24189
|
const { RNAudioSampleHandlerImpl: e } = navigator;
|
|
@@ -24175,8 +24214,8 @@ pc = new WeakMap();
|
|
|
24175
24214
|
var gc;
|
|
24176
24215
|
class og {
|
|
24177
24216
|
constructor(t) {
|
|
24178
|
-
|
|
24179
|
-
|
|
24217
|
+
p(this, "audioContext");
|
|
24218
|
+
p(this, "analyser");
|
|
24180
24219
|
m(this, gc, void 0);
|
|
24181
24220
|
S(this, gc, t), this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 2048;
|
|
24182
24221
|
}
|
|
@@ -24398,9 +24437,9 @@ class ae {
|
|
|
24398
24437
|
m(this, Sl);
|
|
24399
24438
|
m(this, vl);
|
|
24400
24439
|
m(this, Tl);
|
|
24401
|
-
|
|
24402
|
-
|
|
24403
|
-
|
|
24440
|
+
p(this, "context");
|
|
24441
|
+
p(this, "authToken");
|
|
24442
|
+
p(this, "e2ee");
|
|
24404
24443
|
m(this, Sc, void 0);
|
|
24405
24444
|
m(this, vc, void 0);
|
|
24406
24445
|
m(this, at, void 0);
|
|
@@ -24571,11 +24610,11 @@ class ae {
|
|
|
24571
24610
|
c || d && d.disable || !((C = (E = this.context) == null ? void 0 : E.getValue("theme")) != null && C.isSimulcastEnabled) ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), o.encodings = v0(this.context, t), this.logger.info(`Simulcast encodings: ${JSON.stringify(o.encodings)}`)), this.context.getValue("flagsmith").hasFeature(te.TRACK_HINT) && (o.track.contentHint = this.context.getValue("flagsmith").getValue(
|
|
24572
24611
|
te.TRACK_HINT
|
|
24573
24612
|
));
|
|
24574
|
-
const
|
|
24613
|
+
const h = () => {
|
|
24575
24614
|
this.logger.info("Disabling video due to the producer closure"), a(this, ft).delete(r);
|
|
24576
24615
|
}, g = a(this, W).createProducer(
|
|
24577
24616
|
o,
|
|
24578
|
-
|
|
24617
|
+
h
|
|
24579
24618
|
);
|
|
24580
24619
|
return x(this, Wi, lo).call(this, r, g.then((_) => _.id)), g.then((_) => _.track);
|
|
24581
24620
|
});
|
|
@@ -24642,7 +24681,7 @@ class ae {
|
|
|
24642
24681
|
c = a(this, W).createProducer(
|
|
24643
24682
|
d,
|
|
24644
24683
|
l
|
|
24645
|
-
), x(this, Wi, lo).call(this, ue.SCREENSHARE_AUDIO, c.then((
|
|
24684
|
+
), x(this, Wi, lo).call(this, ue.SCREENSHARE_AUDIO, c.then((h) => h.id));
|
|
24646
24685
|
}
|
|
24647
24686
|
yield Promise.all([o, c || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
24648
24687
|
});
|
|
@@ -24945,13 +24984,13 @@ class ae {
|
|
|
24945
24984
|
kind: d
|
|
24946
24985
|
}), Array.from(
|
|
24947
24986
|
this.getConsumers().values()
|
|
24948
|
-
).filter((
|
|
24949
|
-
|
|
24950
|
-
`consumer state mismatched for ${
|
|
24951
|
-
), n ? (
|
|
24952
|
-
id:
|
|
24953
|
-
})) : (
|
|
24954
|
-
id:
|
|
24987
|
+
).filter((h) => h.producerId === o).forEach((h) => {
|
|
24988
|
+
h.kind === "video" && n || h.paused !== n && (this.logger.debug(
|
|
24989
|
+
`consumer state mismatched for ${h.id}. updating consumer pause state ${h.paused} to ${n}`
|
|
24990
|
+
), n ? (h.pause(), this.context.getValue("peerSessionStore").emit(w.CONSUMER_PAUSED, {
|
|
24991
|
+
id: h.id
|
|
24992
|
+
})) : (h.resume(), this.context.getValue("peerSessionStore").emit(w.CONSUMER_RESUMED, {
|
|
24993
|
+
id: h.id
|
|
24955
24994
|
})));
|
|
24956
24995
|
});
|
|
24957
24996
|
} catch (e) {
|
|
@@ -25334,10 +25373,10 @@ const vS = (Ag = class {
|
|
|
25334
25373
|
constructor(s, t, e, r) {
|
|
25335
25374
|
// eslint-disable-next-line class-methods-use-this
|
|
25336
25375
|
m(this, St);
|
|
25337
|
-
|
|
25338
|
-
|
|
25376
|
+
p(this, "self");
|
|
25377
|
+
p(this, "authToken");
|
|
25339
25378
|
m(this, Ji, void 0);
|
|
25340
|
-
|
|
25379
|
+
p(this, "viewType");
|
|
25341
25380
|
m(this, Ss, void 0);
|
|
25342
25381
|
m(this, Z, void 0);
|
|
25343
25382
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
@@ -25376,7 +25415,7 @@ const vS = (Ag = class {
|
|
|
25376
25415
|
s.setValue("self", d);
|
|
25377
25416
|
const l = s.getValue("logger");
|
|
25378
25417
|
if (navigator.product !== "ReactNative") {
|
|
25379
|
-
const
|
|
25418
|
+
const h = !s.getValue("flagsmith").hasFeature(te.PRECALL_BANDWIDTH_TEST);
|
|
25380
25419
|
setTimeout(() => u(this, null, function* () {
|
|
25381
25420
|
const g = yield d.getAllDevices();
|
|
25382
25421
|
l.info("populated_full_device_list", {
|
|
@@ -25392,7 +25431,7 @@ const vS = (Ag = class {
|
|
|
25392
25431
|
flags: s.getValue("flagsmith").getAllFlags(),
|
|
25393
25432
|
logger: l,
|
|
25394
25433
|
apiHostnames: GC(s),
|
|
25395
|
-
skipConnectivityChecks:
|
|
25434
|
+
skipConnectivityChecks: h,
|
|
25396
25435
|
authToken: s.getValue("authToken")
|
|
25397
25436
|
}), l.info("Callstats:: initialized");
|
|
25398
25437
|
} catch (f) {
|
|
@@ -25585,7 +25624,7 @@ const vS = (Ag = class {
|
|
|
25585
25624
|
peerId: t
|
|
25586
25625
|
});
|
|
25587
25626
|
}
|
|
25588
|
-
const { canProduceAudio: d, canProduceVideo: l, canProduceScreenshare:
|
|
25627
|
+
const { canProduceAudio: d, canProduceVideo: l, canProduceScreenshare: h } = this.self.permissions, { roomJoined: g, error: f } = (o = yield (n = a(this, St, At)) == null ? void 0 : n.joinRoom(
|
|
25589
25628
|
this.self.name,
|
|
25590
25629
|
r,
|
|
25591
25630
|
s,
|
|
@@ -25593,7 +25632,7 @@ const vS = (Ag = class {
|
|
|
25593
25632
|
{
|
|
25594
25633
|
canProduceAudio: d,
|
|
25595
25634
|
canProduceVideo: l,
|
|
25596
|
-
canProduceScreenshare:
|
|
25635
|
+
canProduceScreenshare: h
|
|
25597
25636
|
}
|
|
25598
25637
|
)) != null ? o : {};
|
|
25599
25638
|
if (!g)
|
|
@@ -25792,7 +25831,7 @@ var FD = Object.defineProperty, BD = Object.getOwnPropertyDescriptor, HD = (s, t
|
|
|
25792
25831
|
}, xt;
|
|
25793
25832
|
class TS {
|
|
25794
25833
|
constructor(t, e) {
|
|
25795
|
-
|
|
25834
|
+
p(this, "socket");
|
|
25796
25835
|
m(this, xt, void 0);
|
|
25797
25836
|
S(this, xt, t), this.socket = e, this.handleSocketEvents(), a(this, xt).setValue("roomSocketHandler", this);
|
|
25798
25837
|
}
|
|
@@ -26848,8 +26887,8 @@ class oO {
|
|
|
26848
26887
|
constructor(t, e) {
|
|
26849
26888
|
var f, v, E, C, _, I, M, U, L, B;
|
|
26850
26889
|
fe(this, Ku), fe(this, uo), fe(this, zu), fe(this, Yu), fe(this, Rd), fe(this, Xu), fe(this, mo), fe(this, fo), fe(this, bd), fe(this, bn), fe(this, vo), fe(this, Ie, void 0), fe(this, fn, void 0), fe(this, Ee, void 0), fe(this, Le, void 0), fe(this, wr, void 0), fe(this, Ye, void 0), fe(this, dr, void 0), fe(this, Kr, void 0), fe(this, Ts, void 0), fe(this, Sn, void 0), fe(this, Fs, void 0);
|
|
26851
|
-
var r, i, n, o, c, d, l,
|
|
26852
|
-
ne(this, fn, t), ne(this, wr, []), ne(this, Ye, new Cd()), ne(this, dr, !0), ne(this, Ts, !1), ne(this, Ee, e != null ? e : {}), (f = (r = D(this, Ee)).autoReconnect) != null || (r.autoReconnect = !0), (v = (i = D(this, Ee)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (E = (n = D(this, Ee)).pingTimeout) != null || (n.pingTimeout = 3e4), (C = (o = D(this, Ee)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (_ = (c = D(this, Ee)).debug) != null || (c.debug = !0), (I = (d = D(this, Ee)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (M = (l = D(this, Ee)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (U = (
|
|
26890
|
+
var r, i, n, o, c, d, l, h, g;
|
|
26891
|
+
ne(this, fn, t), ne(this, wr, []), ne(this, Ye, new Cd()), ne(this, dr, !0), ne(this, Ts, !1), ne(this, Ee, e != null ? e : {}), (f = (r = D(this, Ee)).autoReconnect) != null || (r.autoReconnect = !0), (v = (i = D(this, Ee)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (E = (n = D(this, Ee)).pingTimeout) != null || (n.pingTimeout = 3e4), (C = (o = D(this, Ee)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (_ = (c = D(this, Ee)).debug) != null || (c.debug = !0), (I = (d = D(this, Ee)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (M = (l = D(this, Ee)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (U = (h = D(this, Ee)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (L = (g = D(this, Ee)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Kr, {
|
|
26853
26892
|
code: void 0,
|
|
26854
26893
|
reason: void 0
|
|
26855
26894
|
}), ne(this, Le, (B = D(this, Ee).logger) != null ? B : new iO(D(this, Ee).debug ? "debug" : "info")), ne(this, Fs, new rO());
|
|
@@ -27119,9 +27158,9 @@ const OS = (Mg = class {
|
|
|
27119
27158
|
m(this, wc);
|
|
27120
27159
|
m(this, Gr, void 0);
|
|
27121
27160
|
m(this, Ce, void 0);
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27161
|
+
p(this, "roomName");
|
|
27162
|
+
p(this, "authToken");
|
|
27163
|
+
p(this, "capabilities");
|
|
27125
27164
|
m(this, ts, void 0);
|
|
27126
27165
|
m(this, ze, void 0);
|
|
27127
27166
|
var n;
|
|
@@ -27227,8 +27266,8 @@ const OS = (Mg = class {
|
|
|
27227
27266
|
ys.errorResponse,
|
|
27228
27267
|
C
|
|
27229
27268
|
);
|
|
27230
|
-
}, l = r != null ? r : x(this, wc, th).call(this),
|
|
27231
|
-
a(this, ze).getValue("telemetry").injectContext(
|
|
27269
|
+
}, l = r != null ? r : x(this, wc, th).call(this), h = {};
|
|
27270
|
+
a(this, ze).getValue("telemetry").injectContext(h);
|
|
27232
27271
|
const f = ({
|
|
27233
27272
|
id: E,
|
|
27234
27273
|
payload: C
|
|
@@ -27261,7 +27300,7 @@ const OS = (Mg = class {
|
|
|
27261
27300
|
s,
|
|
27262
27301
|
l,
|
|
27263
27302
|
e,
|
|
27264
|
-
new TextEncoder().encode(JSON.stringify(
|
|
27303
|
+
new TextEncoder().encode(JSON.stringify(h))
|
|
27265
27304
|
);
|
|
27266
27305
|
}
|
|
27267
27306
|
);
|
|
@@ -27360,7 +27399,7 @@ Bl([
|
|
|
27360
27399
|
], Uc.prototype, "sendMessagePromiseWithTimeout", 1);
|
|
27361
27400
|
class uO {
|
|
27362
27401
|
constructor(t) {
|
|
27363
|
-
|
|
27402
|
+
p(this, "socketService");
|
|
27364
27403
|
this.socketService = t;
|
|
27365
27404
|
}
|
|
27366
27405
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -27473,8 +27512,8 @@ class NS extends Bt {
|
|
|
27473
27512
|
constructor(e) {
|
|
27474
27513
|
const r = e.getValue("logger");
|
|
27475
27514
|
super(r);
|
|
27476
|
-
|
|
27477
|
-
|
|
27515
|
+
p(this, "meetings", []);
|
|
27516
|
+
p(this, "parentMeeting", null);
|
|
27478
27517
|
m(this, vs, void 0);
|
|
27479
27518
|
S(this, vs, e);
|
|
27480
27519
|
}
|
|
@@ -27624,7 +27663,7 @@ var mO = Object.defineProperty, fO = Object.getOwnPropertyDescriptor, Lh = (s, t
|
|
|
27624
27663
|
}, pe, Dg;
|
|
27625
27664
|
const VS = (Dg = class {
|
|
27626
27665
|
constructor(s) {
|
|
27627
|
-
|
|
27666
|
+
p(this, "connectedMeetings");
|
|
27628
27667
|
m(this, pe, void 0);
|
|
27629
27668
|
S(this, pe, s), this.connectedMeetings = new NS(s);
|
|
27630
27669
|
}
|
|
@@ -27779,29 +27818,29 @@ var SO = Object.defineProperty, vO = Object.getOwnPropertyDescriptor, ql = (s, t
|
|
|
27779
27818
|
};
|
|
27780
27819
|
const vn = class {
|
|
27781
27820
|
constructor(s, t, e) {
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27790
|
-
|
|
27791
|
-
|
|
27792
|
-
|
|
27793
|
-
|
|
27794
|
-
|
|
27821
|
+
p(this, "apiBase");
|
|
27822
|
+
p(this, "selfController");
|
|
27823
|
+
p(this, "pollController");
|
|
27824
|
+
p(this, "chatController");
|
|
27825
|
+
p(this, "metaController");
|
|
27826
|
+
p(this, "storesManager");
|
|
27827
|
+
p(this, "stageController");
|
|
27828
|
+
p(this, "pluginController");
|
|
27829
|
+
p(this, "internalsController");
|
|
27830
|
+
p(this, "recordingController");
|
|
27831
|
+
p(this, "livestreamController");
|
|
27832
|
+
p(this, "participantController");
|
|
27833
|
+
p(this, "connectedMeetingsController");
|
|
27795
27834
|
/**
|
|
27796
27835
|
* @access private
|
|
27797
27836
|
* Not for external use
|
|
27798
27837
|
*/
|
|
27799
|
-
|
|
27838
|
+
p(this, "telemetry");
|
|
27800
27839
|
/**
|
|
27801
27840
|
* @access private
|
|
27802
27841
|
* Not for external use
|
|
27803
27842
|
*/
|
|
27804
|
-
|
|
27843
|
+
p(this, "logger");
|
|
27805
27844
|
this.apiBase = s, this.storesManager = t.storesManager, this.metaController = t.metaController, this.selfController = t.selfController, this.chatController = t.chatController, this.pollController = t.pollController, this.stageController = t.stageController, this.pluginController = t.pluginController, this.recordingController = t.recordingController, this.internalsController = t.internalsController, this.participantController = t.participantController, this.livestreamController = t.livestreamController, this.connectedMeetingsController = t.connectedMeetingsController, this.telemetry = e.getValue("telemetry"), this.logger = e.getValue("logger");
|
|
27806
27845
|
}
|
|
27807
27846
|
static init(s) {
|
|
@@ -27829,10 +27868,10 @@ const vn = class {
|
|
|
27829
27868
|
d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(n), d.setHeader("tracing-id", t), s.setValue("apiClient", d);
|
|
27830
27869
|
const l = new i0(s);
|
|
27831
27870
|
s.setValue("connectionHandler", l);
|
|
27832
|
-
let
|
|
27871
|
+
let h = "", g = "", f = null;
|
|
27833
27872
|
c.info("CF SFU is being used.");
|
|
27834
27873
|
try {
|
|
27835
|
-
f = yield d.getUserDetails(),
|
|
27874
|
+
f = yield d.getUserDetails(), h = ((L = f.meeting) == null ? void 0 : L.title) || "", g = ((B = f.socket) == null ? void 0 : B.baseUri) || s.getValue("baseURI"), s.setValue("presetName", f.preset.name), s.setValue("socketBaseURI", g), c.info(`Socket Base URI ${g} is being used`);
|
|
27836
27875
|
} catch (se) {
|
|
27837
27876
|
throw c.error("Failed to get user details", { error: se }), new k("SDK initialization failed: /participant-details API request failed", "0001");
|
|
27838
27877
|
}
|
|
@@ -27861,7 +27900,7 @@ const vn = class {
|
|
|
27861
27900
|
s,
|
|
27862
27901
|
f,
|
|
27863
27902
|
C,
|
|
27864
|
-
|
|
27903
|
+
h,
|
|
27865
27904
|
_,
|
|
27866
27905
|
I
|
|
27867
27906
|
);
|
|
@@ -27902,7 +27941,7 @@ const vn = class {
|
|
|
27902
27941
|
isReactNative: navigator.isReactNative
|
|
27903
27942
|
});
|
|
27904
27943
|
try {
|
|
27905
|
-
const
|
|
27944
|
+
const h = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? Xi({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
27906
27945
|
yield s.getValue("flagsmith").identify(
|
|
27907
27946
|
`${mu.PEER}_${t}`,
|
|
27908
27947
|
JSON.parse(JSON.stringify(d)),
|
|
@@ -27910,14 +27949,14 @@ const vn = class {
|
|
|
27910
27949
|
// force evaluate
|
|
27911
27950
|
5e3,
|
|
27912
27951
|
// timeout
|
|
27913
|
-
|
|
27952
|
+
h,
|
|
27914
27953
|
o
|
|
27915
27954
|
), o.info(
|
|
27916
27955
|
"flagsmith::allFlags",
|
|
27917
27956
|
{ flags: JSON.stringify(s.getValue("flagsmith").getAllFlags()) },
|
|
27918
27957
|
!0
|
|
27919
27958
|
);
|
|
27920
|
-
} catch (
|
|
27959
|
+
} catch (h) {
|
|
27921
27960
|
o.error("Failed to fetch flagsmith flags");
|
|
27922
27961
|
}
|
|
27923
27962
|
});
|
|
@@ -27925,7 +27964,7 @@ const vn = class {
|
|
|
27925
27964
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
27926
27965
|
return u(this, null, function* () {
|
|
27927
27966
|
var V, b, xe;
|
|
27928
|
-
const c = t.getValue("modules"), { participant: d } = e, l = t.getValue("defaults"),
|
|
27967
|
+
const c = t.getValue("modules"), { participant: d } = e, l = t.getValue("defaults"), h = t.getValue("logger"), { viewType: g, mediaConstraints: { audio: f } } = n;
|
|
27929
27968
|
t.setValue("viewType", g), t.setValue("defaults", O({
|
|
27930
27969
|
mediaConfiguration: {
|
|
27931
27970
|
audio: {
|
|
@@ -27958,7 +27997,7 @@ const vn = class {
|
|
|
27958
27997
|
t,
|
|
27959
27998
|
R.self,
|
|
27960
27999
|
as
|
|
27961
|
-
)), (xe = c.e2ee) != null && xe.enabled && c.e2ee.manager.init(
|
|
28000
|
+
)), (xe = c.e2ee) != null && xe.enabled && c.e2ee.manager.init(h, t.getValue("peerSessionStore")), c.chat && (E = yield rs.init(
|
|
27962
28001
|
t,
|
|
27963
28002
|
ns,
|
|
27964
28003
|
R.self,
|
|
@@ -28065,9 +28104,9 @@ ql([
|
|
|
28065
28104
|
], $c, "createSocketService", 1);
|
|
28066
28105
|
class TO {
|
|
28067
28106
|
constructor() {
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28107
|
+
p(this, "battery");
|
|
28108
|
+
p(this, "logger");
|
|
28109
|
+
p(this, "init", (t) => u(this, null, function* () {
|
|
28071
28110
|
this.logger = t;
|
|
28072
28111
|
try {
|
|
28073
28112
|
"getBattery" in navigator && (this.battery = yield navigator.getBattery(), this.battery.addEventListener("chargingchange", this.updateChargeInfo), this.battery.addEventListener("levelchange", this.updateLevelInfo), this.updateLevelInfo(), this.updateChargeInfo());
|
|
@@ -28075,20 +28114,20 @@ class TO {
|
|
|
28075
28114
|
t.error("Error getting battery", e);
|
|
28076
28115
|
}
|
|
28077
28116
|
}));
|
|
28078
|
-
|
|
28117
|
+
p(this, "updateChargeInfo", () => {
|
|
28079
28118
|
var t;
|
|
28080
28119
|
this.logger.log(
|
|
28081
28120
|
`Battery charging? ${(t = this.battery) != null && t.charging ? "Yes" : "No"}`
|
|
28082
28121
|
);
|
|
28083
28122
|
});
|
|
28084
|
-
|
|
28123
|
+
p(this, "updateLevelInfo", () => {
|
|
28085
28124
|
if (!this.battery) {
|
|
28086
28125
|
this.logger.log("Battery level: Not known");
|
|
28087
28126
|
return;
|
|
28088
28127
|
}
|
|
28089
28128
|
this.logger.log(`Battery level: ${this.battery.level * 100}%`);
|
|
28090
28129
|
});
|
|
28091
|
-
|
|
28130
|
+
p(this, "cleanup", () => {
|
|
28092
28131
|
var t, e;
|
|
28093
28132
|
"getBattery" in navigator && ((t = this.battery) == null || t.removeEventListener(
|
|
28094
28133
|
"chargingchange",
|
|
@@ -28236,7 +28275,7 @@ let Qr = (Og = class {
|
|
|
28236
28275
|
${(U = t.authToken) == null ? void 0 : U.slice(-10)}`
|
|
28237
28276
|
})
|
|
28238
28277
|
});
|
|
28239
|
-
const
|
|
28278
|
+
const h = yield $c.init(c), g = new Qr(c, h);
|
|
28240
28279
|
return c.setValue("meeting", g), g;
|
|
28241
28280
|
});
|
|
28242
28281
|
}
|
|
@@ -28253,7 +28292,7 @@ let Qr = (Og = class {
|
|
|
28253
28292
|
video: !0
|
|
28254
28293
|
};
|
|
28255
28294
|
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", jC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
|
|
28256
|
-
})), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0-staging.
|
|
28295
|
+
})), n.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), n.setValue("sdkVersion", "1.4.0-staging.5"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new PO()), n;
|
|
28257
28296
|
}
|
|
28258
28297
|
join() {
|
|
28259
28298
|
return u(this, null, function* () {
|