@cloudflare/realtimekit 1.4.0-staging.4 → 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 +3 -3
- 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 +728 -699
- package/dist/index.es5.js +327 -315
- 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
|
}
|
|
@@ -15241,11 +15270,11 @@ class _h {
|
|
|
15241
15270
|
* The participant authToken passed to `RealtimeKitClient.init()`.
|
|
15242
15271
|
* Can be used for troubleshooting.
|
|
15243
15272
|
*/
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15273
|
+
p(this, "authToken");
|
|
15274
|
+
p(this, "logger");
|
|
15275
|
+
p(this, "features");
|
|
15276
|
+
p(this, "browserSpecs");
|
|
15277
|
+
p(this, "callStats");
|
|
15249
15278
|
this.authToken = t, this.logger = e, this.features = r, this.browserSpecs = _e, this.callStats = i;
|
|
15250
15279
|
}
|
|
15251
15280
|
static init(t) {
|
|
@@ -15259,7 +15288,7 @@ class _h {
|
|
|
15259
15288
|
}
|
|
15260
15289
|
class Ch {
|
|
15261
15290
|
constructor(t) {
|
|
15262
|
-
|
|
15291
|
+
p(this, "internals");
|
|
15263
15292
|
this.internals = t;
|
|
15264
15293
|
}
|
|
15265
15294
|
static init(t) {
|
|
@@ -15285,8 +15314,8 @@ class bt extends Da {
|
|
|
15285
15314
|
m(this, zt, void 0);
|
|
15286
15315
|
m(this, Lo, void 0);
|
|
15287
15316
|
m(this, be, void 0);
|
|
15288
|
-
|
|
15289
|
-
|
|
15317
|
+
p(this, "audioUpdateInProgress");
|
|
15318
|
+
p(this, "videoUpdateInProgress");
|
|
15290
15319
|
S(this, be, e), this.audioUpdateInProgress = !1, this.videoUpdateInProgress = !1, S(this, Be, new bf(e, r)), S(this, Se, new V0(
|
|
15291
15320
|
e,
|
|
15292
15321
|
a(this, Be),
|
|
@@ -15393,8 +15422,8 @@ class bt extends Da {
|
|
|
15393
15422
|
const d = yield this.getDeviceById(n.getSettings().deviceId);
|
|
15394
15423
|
a(this, be).getValue("callstats").selectedDevice("AUDIO", d);
|
|
15395
15424
|
}
|
|
15396
|
-
(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,
|
|
15397
|
-
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);
|
|
15398
15427
|
});
|
|
15399
15428
|
});
|
|
15400
15429
|
}
|
|
@@ -15915,11 +15944,11 @@ const f0 = {
|
|
|
15915
15944
|
}
|
|
15916
15945
|
]]
|
|
15917
15946
|
], v0 = (s, t) => {
|
|
15918
|
-
var d, l,
|
|
15947
|
+
var d, l, h;
|
|
15919
15948
|
const e = (d = s == null ? void 0 : s.getValue("overrides")) == null ? void 0 : d.simulcastConfig;
|
|
15920
15949
|
if ((l = e == null ? void 0 : e.encodings) != null && l.length)
|
|
15921
15950
|
return e.encodings;
|
|
15922
|
-
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);
|
|
15923
15952
|
let o = Number.MAX_VALUE, c = 0;
|
|
15924
15953
|
return n.forEach((g, f) => {
|
|
15925
15954
|
Math.abs(g - r) < o && (o = Math.abs(g - r), c = f);
|
|
@@ -15943,9 +15972,9 @@ class E0 {
|
|
|
15943
15972
|
m(this, yi, void 0);
|
|
15944
15973
|
m(this, Or, void 0);
|
|
15945
15974
|
// eslint-disable-next-line class-methods-use-this
|
|
15946
|
-
|
|
15947
|
-
var l,
|
|
15948
|
-
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;
|
|
15949
15978
|
let n = (I = (_ = t == null ? void 0 : t.frameRate) == null ? void 0 : _.ideal) != null ? I : 5;
|
|
15950
15979
|
const o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
15951
15980
|
a(this, Or).getValue("flagsmith").getValue(te.VAL_MIN_FRAMERATE) && (n = parseInt(
|
|
@@ -15972,8 +16001,8 @@ class E0 {
|
|
|
15972
16001
|
};
|
|
15973
16002
|
});
|
|
15974
16003
|
// eslint-disable-next-line class-methods-use-this
|
|
15975
|
-
|
|
15976
|
-
var n, o, c, d, l,
|
|
16004
|
+
p(this, "getAudioConstraints", (t) => {
|
|
16005
|
+
var n, o, c, d, l, h, g;
|
|
15977
16006
|
const e = {}, r = (n = a(this, yi)) == null ? void 0 : n.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
15978
16007
|
return _e.isFirefox() || _e.isWebKitBased() ? (e.audio = {
|
|
15979
16008
|
deviceId: t,
|
|
@@ -15983,12 +16012,12 @@ class E0 {
|
|
|
15983
16012
|
channelCount: i
|
|
15984
16013
|
}, e) : (e.audio = {
|
|
15985
16014
|
autoGainControl: (l = r == null ? void 0 : r.autoGainControl) != null ? l : !0,
|
|
15986
|
-
echoCancellation: (
|
|
16015
|
+
echoCancellation: (h = r == null ? void 0 : r.echoCancellation) != null ? h : !0,
|
|
15987
16016
|
noiseSuppression: (g = r == null ? void 0 : r.noiseSupression) != null ? g : !0,
|
|
15988
16017
|
channelCount: i
|
|
15989
16018
|
}, t && (e.audio.deviceId = { exact: t }), e);
|
|
15990
16019
|
});
|
|
15991
|
-
|
|
16020
|
+
p(this, "getVideoConstraints", (t) => {
|
|
15992
16021
|
var o, c, d;
|
|
15993
16022
|
const e = {}, r = (o = a(this, yi)) == null ? void 0 : o.video, i = I_(f0);
|
|
15994
16023
|
let n = i.vga;
|
|
@@ -16010,14 +16039,14 @@ yi = new WeakMap(), Or = new WeakMap();
|
|
|
16010
16039
|
class nu extends Error {
|
|
16011
16040
|
constructor(e, r, i) {
|
|
16012
16041
|
super(r);
|
|
16013
|
-
|
|
16014
|
-
|
|
16042
|
+
p(this, "constraints");
|
|
16043
|
+
p(this, "name");
|
|
16015
16044
|
this.name = e, this.constraints = i;
|
|
16016
16045
|
}
|
|
16017
16046
|
}
|
|
16018
16047
|
class P0 {
|
|
16019
16048
|
constructor() {
|
|
16020
|
-
|
|
16049
|
+
p(this, "permissions");
|
|
16021
16050
|
this.permissions = {
|
|
16022
16051
|
audio: "NOT_REQUESTED",
|
|
16023
16052
|
video: "NOT_REQUESTED",
|
|
@@ -16094,15 +16123,15 @@ let Ft = (Rg = class extends P0 {
|
|
|
16094
16123
|
const c = yield this.getAudioInputDevices(), d = yield this.getVideoInputDevices(), l = !!(c != null && c.find(
|
|
16095
16124
|
(M) => M.deviceId === t
|
|
16096
16125
|
));
|
|
16097
|
-
let
|
|
16098
|
-
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);
|
|
16099
16128
|
const g = !!(d != null && d.find(
|
|
16100
16129
|
(M) => M.deviceId === e
|
|
16101
16130
|
));
|
|
16102
16131
|
let f;
|
|
16103
16132
|
e && g ? f = e : d && ((n = d[0]) != null && n.deviceId) && (f = (o = d[0]) == null ? void 0 : o.deviceId);
|
|
16104
16133
|
const v = {
|
|
16105
|
-
audio: a(this, Yt).getAudioConstraints(
|
|
16134
|
+
audio: a(this, Yt).getAudioConstraints(h).audio,
|
|
16106
16135
|
video: a(this, Yt).getVideoConstraints(f).video
|
|
16107
16136
|
};
|
|
16108
16137
|
this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", {
|
|
@@ -16147,27 +16176,27 @@ let Ft = (Rg = class extends P0 {
|
|
|
16147
16176
|
let n;
|
|
16148
16177
|
e && i ? n = e : (c = r[0]) != null && c.deviceId && (n = (d = r[0]) == null ? void 0 : d.deviceId);
|
|
16149
16178
|
const o = (l) => u(this, null, function* () {
|
|
16150
|
-
let
|
|
16179
|
+
let h;
|
|
16151
16180
|
try {
|
|
16152
|
-
r = r.filter((f) => f.deviceId !== l),
|
|
16153
|
-
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)
|
|
16154
16183
|
});
|
|
16155
|
-
const [g] = (yield navigator.mediaDevices.getUserMedia(
|
|
16184
|
+
const [g] = (yield navigator.mediaDevices.getUserMedia(h)).getAudioTracks();
|
|
16156
16185
|
return this.logger.info("getUserMediaWithoutTimeout::received_user_media", {
|
|
16157
|
-
constraints: JSON.stringify(
|
|
16186
|
+
constraints: JSON.stringify(h)
|
|
16158
16187
|
}), g;
|
|
16159
16188
|
} catch (g) {
|
|
16160
16189
|
const f = zc(
|
|
16161
16190
|
"audio",
|
|
16162
16191
|
g.name,
|
|
16163
16192
|
g.message
|
|
16164
|
-
), v = new nu(g.name, g.message,
|
|
16193
|
+
), v = new nu(g.name, g.message, h);
|
|
16165
16194
|
if (f === "COULD_NOT_START") {
|
|
16166
16195
|
const E = r.shift();
|
|
16167
16196
|
if (!E)
|
|
16168
16197
|
throw v;
|
|
16169
16198
|
this.logger.info("getAudioTrack::gum_failed", {
|
|
16170
|
-
constraints: JSON.stringify(
|
|
16199
|
+
constraints: JSON.stringify(h),
|
|
16171
16200
|
error: g
|
|
16172
16201
|
});
|
|
16173
16202
|
const C = a(this, Yt).getAudioConstraints(
|
|
@@ -16193,7 +16222,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16193
16222
|
}
|
|
16194
16223
|
getVideoTrack(t) {
|
|
16195
16224
|
return u(this, null, function* () {
|
|
16196
|
-
var l,
|
|
16225
|
+
var l, h, g;
|
|
16197
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();
|
|
16198
16227
|
if (!(n != null && n.length))
|
|
16199
16228
|
throw this.permissions.video = "NO_DEVICES_AVAILABLE", a(this, Ne).getValue("peerSessionStore").emit(w.MEDIA_PERMISSION_UPDATE, {
|
|
@@ -16204,7 +16233,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16204
16233
|
(f) => f.deviceId === t
|
|
16205
16234
|
));
|
|
16206
16235
|
let c;
|
|
16207
|
-
t && o ? c = t : (
|
|
16236
|
+
t && o ? c = t : (h = n[0]) != null && h.deviceId && (c = (g = n[0]) == null ? void 0 : g.deviceId);
|
|
16208
16237
|
const d = (f) => u(this, null, function* () {
|
|
16209
16238
|
try {
|
|
16210
16239
|
let v = f;
|
|
@@ -16322,11 +16351,11 @@ let Ft = (Rg = class extends P0 {
|
|
|
16322
16351
|
return n.includes("front") || n.includes("user") || n.includes("selfie") ? !0 : !(n.includes("back") || n.includes("rear") || n.includes("environment"));
|
|
16323
16352
|
};
|
|
16324
16353
|
return t.sort((i, n) => {
|
|
16325
|
-
var
|
|
16354
|
+
var h, g;
|
|
16326
16355
|
const o = e(i), c = e(n);
|
|
16327
16356
|
if (o !== c)
|
|
16328
16357
|
return o - c;
|
|
16329
|
-
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"));
|
|
16330
16359
|
if (d && !l)
|
|
16331
16360
|
return -1;
|
|
16332
16361
|
if (!d && l)
|
|
@@ -16384,7 +16413,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16384
16413
|
navigator.mediaDevices.addEventListener(
|
|
16385
16414
|
"devicechange",
|
|
16386
16415
|
(r) => u(this, null, function* () {
|
|
16387
|
-
var l,
|
|
16416
|
+
var l, h;
|
|
16388
16417
|
const i = (g) => `${g.kind}-${g.label}-${g.deviceId}-${g.groupId}`, n = new Set(
|
|
16389
16418
|
e.map((g) => i(g))
|
|
16390
16419
|
), o = yield this.getAvailableDevices(), c = new Set(
|
|
@@ -16398,7 +16427,7 @@ let Ft = (Rg = class extends P0 {
|
|
|
16398
16427
|
),
|
|
16399
16428
|
devices: o
|
|
16400
16429
|
};
|
|
16401
|
-
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) {
|
|
16402
16431
|
this.logger.info("repopulated_full_device_list", {
|
|
16403
16432
|
devices: JSON.stringify(o)
|
|
16404
16433
|
});
|
|
@@ -16489,9 +16518,9 @@ const bf = Ft, en = {
|
|
|
16489
16518
|
}, b0 = typeof AudioContext != "undefined" ? AudioContext : null;
|
|
16490
16519
|
class Rh {
|
|
16491
16520
|
constructor(t) {
|
|
16492
|
-
|
|
16493
|
-
|
|
16494
|
-
|
|
16521
|
+
p(this, "_AudioContext");
|
|
16522
|
+
p(this, "audioContext");
|
|
16523
|
+
p(this, "_audioContextRefContainers");
|
|
16495
16524
|
const e = O({ AudioContext: b0 }, t);
|
|
16496
16525
|
Object.defineProperties(this, {
|
|
16497
16526
|
_AudioContext: {
|
|
@@ -16569,28 +16598,28 @@ let Ed = class extends Da {
|
|
|
16569
16598
|
var o;
|
|
16570
16599
|
const n = t.getValue("logger");
|
|
16571
16600
|
super(n);
|
|
16572
|
-
|
|
16601
|
+
p(this, "constructorName", this.constructor.name);
|
|
16573
16602
|
// Will be set in case user has explicity used Self.setDevice
|
|
16574
16603
|
// to set the device.
|
|
16575
|
-
|
|
16576
|
-
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
|
|
16580
|
-
|
|
16581
|
-
|
|
16582
|
-
|
|
16583
|
-
|
|
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(
|
|
16584
16613
|
this.userPreferredDeviceKey,
|
|
16585
16614
|
t,
|
|
16586
16615
|
this.logger
|
|
16587
16616
|
));
|
|
16588
|
-
|
|
16617
|
+
p(this, "getUserPreferredDevice", () => en.getItem(
|
|
16589
16618
|
this.userPreferredDeviceKey,
|
|
16590
16619
|
this.logger
|
|
16591
16620
|
));
|
|
16592
|
-
|
|
16593
|
-
|
|
16621
|
+
p(this, "isCustomTrack", !1);
|
|
16622
|
+
p(this, "context");
|
|
16594
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);
|
|
16595
16624
|
}
|
|
16596
16625
|
/**
|
|
@@ -16892,14 +16921,14 @@ class Ll extends If {
|
|
|
16892
16921
|
this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack");
|
|
16893
16922
|
const c = r.getSettings().deviceId;
|
|
16894
16923
|
return n.filter((l) => l.deviceId !== c).some((l) => u(this, null, function* () {
|
|
16895
|
-
var
|
|
16924
|
+
var h;
|
|
16896
16925
|
if (r = yield this.mediaInterface.getAudioTrack(
|
|
16897
16926
|
!1,
|
|
16898
16927
|
l.deviceId
|
|
16899
16928
|
), !(yield sg(this.logger, r))) {
|
|
16900
|
-
const g = (
|
|
16929
|
+
const g = (h = o == null ? void 0 : o.devices.concat({
|
|
16901
16930
|
label: r.label
|
|
16902
|
-
})) != null ?
|
|
16931
|
+
})) != null ? h : [{ label: r.label }];
|
|
16903
16932
|
return en.setItem(au, JSON.stringify({
|
|
16904
16933
|
devices: g
|
|
16905
16934
|
}), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), !0;
|
|
@@ -16923,15 +16952,15 @@ var Ei;
|
|
|
16923
16952
|
class L0 {
|
|
16924
16953
|
constructor(t, e) {
|
|
16925
16954
|
m(this, Ei, void 0);
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16955
|
+
p(this, "currentDevice");
|
|
16956
|
+
p(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
|
|
16957
|
+
p(this, "logger");
|
|
16958
|
+
p(this, "setUserPreferredDevice", (t) => en.setItem(
|
|
16930
16959
|
this.userPreferredDeviceKey,
|
|
16931
16960
|
t,
|
|
16932
16961
|
this.logger
|
|
16933
16962
|
));
|
|
16934
|
-
|
|
16963
|
+
p(this, "getUserPreferredDevice", () => en.getItem(
|
|
16935
16964
|
this.userPreferredDeviceKey,
|
|
16936
16965
|
this.logger
|
|
16937
16966
|
));
|
|
@@ -16951,7 +16980,7 @@ class L0 {
|
|
|
16951
16980
|
let n = t;
|
|
16952
16981
|
if (t || ([n] = (yield a(this, Ei).getAvailableDevicesByKind(
|
|
16953
16982
|
"audiooutput"
|
|
16954
|
-
)).filter((
|
|
16983
|
+
)).filter((h) => !yd(h))), !n)
|
|
16955
16984
|
throw new k("No speaker found", "1608");
|
|
16956
16985
|
if (((c = this.currentDevice) == null ? void 0 : c.deviceId) === n.deviceId)
|
|
16957
16986
|
return;
|
|
@@ -16961,7 +16990,7 @@ class L0 {
|
|
|
16961
16990
|
if (typeof l.sinkId != "undefined" && this.currentDevice.deviceId && l.sinkId !== this.currentDevice.deviceId)
|
|
16962
16991
|
try {
|
|
16963
16992
|
yield l.setSinkId(this.currentDevice.deviceId);
|
|
16964
|
-
} catch (
|
|
16993
|
+
} catch (h) {
|
|
16965
16994
|
}
|
|
16966
16995
|
}));
|
|
16967
16996
|
});
|
|
@@ -16974,9 +17003,9 @@ class U0 extends Da {
|
|
|
16974
17003
|
constructor(e, r) {
|
|
16975
17004
|
const i = e.getValue("logger");
|
|
16976
17005
|
super(i);
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
17006
|
+
p(this, "mediaInterface");
|
|
17007
|
+
p(this, "audioMediaTrack");
|
|
17008
|
+
p(this, "videoMediaTrack");
|
|
16980
17009
|
m(this, Uo, void 0);
|
|
16981
17010
|
S(this, Uo, e), this.mediaInterface = r;
|
|
16982
17011
|
}
|
|
@@ -17342,14 +17371,14 @@ const Tn = class {
|
|
|
17342
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;
|
|
17343
17372
|
}
|
|
17344
17373
|
get mediaConstraints() {
|
|
17345
|
-
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;
|
|
17346
17375
|
return {
|
|
17347
17376
|
audio: {
|
|
17348
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,
|
|
17349
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
|
|
17350
17379
|
},
|
|
17351
17380
|
video: {
|
|
17352
|
-
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,
|
|
17353
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
|
|
17354
17383
|
},
|
|
17355
17384
|
screenshare: {
|
|
@@ -17378,10 +17407,10 @@ class bh extends Bt {
|
|
|
17378
17407
|
const i = e.getValue("logger");
|
|
17379
17408
|
super(i);
|
|
17380
17409
|
m(this, Yn, void 0);
|
|
17381
|
-
|
|
17382
|
-
|
|
17383
|
-
|
|
17384
|
-
|
|
17410
|
+
p(this, "state", "IDLE");
|
|
17411
|
+
p(this, "playbackUrl");
|
|
17412
|
+
p(this, "ingestionCredentials");
|
|
17413
|
+
p(this, "viewerCount");
|
|
17385
17414
|
m(this, Bo, void 0);
|
|
17386
17415
|
S(this, Yn, r), S(this, Bo, e), this.viewerCount = 0;
|
|
17387
17416
|
}
|
|
@@ -17458,7 +17487,7 @@ var G0 = Object.defineProperty, W0 = Object.getOwnPropertyDescriptor, J0 = (s, t
|
|
|
17458
17487
|
}, Qn, Xn, Ks, ks;
|
|
17459
17488
|
class Mf {
|
|
17460
17489
|
constructor(t, e, r) {
|
|
17461
|
-
|
|
17490
|
+
p(this, "livestream");
|
|
17462
17491
|
m(this, Qn, void 0);
|
|
17463
17492
|
m(this, Xn, void 0);
|
|
17464
17493
|
m(this, Ks, void 0);
|
|
@@ -17566,19 +17595,19 @@ class Na {
|
|
|
17566
17595
|
*/
|
|
17567
17596
|
constructor({ name: t, socketHandler: e, meetingId: r }) {
|
|
17568
17597
|
m(this, Od);
|
|
17569
|
-
|
|
17598
|
+
p(this, "name", "");
|
|
17570
17599
|
m(this, rt, {});
|
|
17571
17600
|
m(this, Nr, "");
|
|
17572
17601
|
m(this, Vr, void 0);
|
|
17573
|
-
|
|
17602
|
+
p(this, "rateLimitConfig", {
|
|
17574
17603
|
maxInvocations: 5,
|
|
17575
17604
|
period: 1
|
|
17576
17605
|
});
|
|
17577
|
-
|
|
17606
|
+
p(this, "bulkRateLimitConfig", {
|
|
17578
17607
|
maxInvocations: 5,
|
|
17579
17608
|
period: 1
|
|
17580
17609
|
});
|
|
17581
|
-
|
|
17610
|
+
p(this, "listeners", {});
|
|
17582
17611
|
this.name = t, S(this, Vr, e), S(this, Nr, r);
|
|
17583
17612
|
}
|
|
17584
17613
|
/**
|
|
@@ -17754,7 +17783,7 @@ class Y0 {
|
|
|
17754
17783
|
constructor(t, e) {
|
|
17755
17784
|
m(this, Ho);
|
|
17756
17785
|
m(this, Nd);
|
|
17757
|
-
|
|
17786
|
+
p(this, "stores", /* @__PURE__ */ new Map());
|
|
17758
17787
|
m(this, _i, void 0);
|
|
17759
17788
|
m(this, Ci, "");
|
|
17760
17789
|
m(this, qo, void 0);
|
|
@@ -17814,7 +17843,7 @@ _i = new WeakMap(), Ci = new WeakMap(), Ho = new WeakSet(), Ou = function() {
|
|
|
17814
17843
|
});
|
|
17815
17844
|
};
|
|
17816
17845
|
function ci(s) {
|
|
17817
|
-
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;
|
|
17818
17847
|
return s ? {
|
|
17819
17848
|
media: {
|
|
17820
17849
|
audio: {
|
|
@@ -17835,7 +17864,7 @@ function ci(s) {
|
|
|
17835
17864
|
trackId: (l = (d = s.screenShareTracks) == null ? void 0 : d.audio) == null ? void 0 : l.id
|
|
17836
17865
|
},
|
|
17837
17866
|
video: {
|
|
17838
|
-
enabled: (g = (
|
|
17867
|
+
enabled: (g = (h = s.screenShareTracks) == null ? void 0 : h.video) == null ? void 0 : g.enabled,
|
|
17839
17868
|
trackId: (v = (f = s.screenShareTracks) == null ? void 0 : f.video) == null ? void 0 : v.id
|
|
17840
17869
|
}
|
|
17841
17870
|
}
|
|
@@ -17878,61 +17907,61 @@ let mr = (wg = class extends Bt {
|
|
|
17878
17907
|
* The peer ID of the participant.
|
|
17879
17908
|
* The participants are indexed by this ID in the participant map.
|
|
17880
17909
|
*/
|
|
17881
|
-
|
|
17910
|
+
p(this, "id");
|
|
17882
17911
|
/**
|
|
17883
17912
|
* The user ID of the participant.
|
|
17884
17913
|
*/
|
|
17885
|
-
|
|
17914
|
+
p(this, "userId");
|
|
17886
17915
|
/**
|
|
17887
17916
|
* The name of the participant.
|
|
17888
17917
|
*/
|
|
17889
|
-
|
|
17918
|
+
p(this, "name");
|
|
17890
17919
|
/**
|
|
17891
17920
|
* The picture of the participant.
|
|
17892
17921
|
*/
|
|
17893
|
-
|
|
17894
|
-
|
|
17922
|
+
p(this, "picture");
|
|
17923
|
+
p(this, "isHost");
|
|
17895
17924
|
/**
|
|
17896
17925
|
* The custom id of the participant set during Add Participant REST API
|
|
17897
17926
|
*/
|
|
17898
|
-
|
|
17899
|
-
|
|
17927
|
+
p(this, "customParticipantId");
|
|
17928
|
+
p(this, "flags");
|
|
17900
17929
|
/**
|
|
17901
17930
|
* The device configuration of the participant.
|
|
17902
17931
|
*/
|
|
17903
|
-
|
|
17932
|
+
p(this, "device");
|
|
17904
17933
|
/**
|
|
17905
17934
|
* The participant's video track.
|
|
17906
17935
|
*/
|
|
17907
|
-
|
|
17936
|
+
p(this, "videoTrack");
|
|
17908
17937
|
/**
|
|
17909
17938
|
* The participant's audio track.
|
|
17910
17939
|
*/
|
|
17911
|
-
|
|
17940
|
+
p(this, "audioTrack");
|
|
17912
17941
|
/**
|
|
17913
17942
|
* The participant's screenshare video and audio track.
|
|
17914
17943
|
*/
|
|
17915
|
-
|
|
17944
|
+
p(this, "screenShareTracks");
|
|
17916
17945
|
/**
|
|
17917
17946
|
* This is true if the participant's video is enabled.
|
|
17918
17947
|
*/
|
|
17919
|
-
|
|
17948
|
+
p(this, "videoEnabled");
|
|
17920
17949
|
/**
|
|
17921
17950
|
* This is true if the participant's audio is enabled.
|
|
17922
17951
|
*/
|
|
17923
|
-
|
|
17952
|
+
p(this, "audioEnabled");
|
|
17924
17953
|
/**
|
|
17925
17954
|
* This is true if the participant is screensharing.
|
|
17926
17955
|
*/
|
|
17927
|
-
|
|
17956
|
+
p(this, "screenShareEnabled");
|
|
17928
17957
|
/**
|
|
17929
17958
|
* producers created by participant
|
|
17930
17959
|
*/
|
|
17931
|
-
|
|
17960
|
+
p(this, "producers");
|
|
17932
17961
|
/**
|
|
17933
17962
|
* producer config passed during manual subscription
|
|
17934
17963
|
*/
|
|
17935
|
-
|
|
17964
|
+
p(this, "manualProducerConfig");
|
|
17936
17965
|
/**
|
|
17937
17966
|
* This is true if the participant is pinned.
|
|
17938
17967
|
*/
|
|
@@ -17940,7 +17969,7 @@ let mr = (wg = class extends Bt {
|
|
|
17940
17969
|
/**
|
|
17941
17970
|
* This is true if the participant supports remote control.
|
|
17942
17971
|
*/
|
|
17943
|
-
|
|
17972
|
+
p(this, "supportsRemoteControl", !1);
|
|
17944
17973
|
/**
|
|
17945
17974
|
* Represents the participants current stage status
|
|
17946
17975
|
*/
|
|
@@ -17948,7 +17977,7 @@ let mr = (wg = class extends Bt {
|
|
|
17948
17977
|
/**
|
|
17949
17978
|
* The preset of the participant.
|
|
17950
17979
|
*/
|
|
17951
|
-
|
|
17980
|
+
p(this, "presetName");
|
|
17952
17981
|
m(this, Nt, void 0);
|
|
17953
17982
|
m(this, zs, void 0);
|
|
17954
17983
|
m(this, jo, void 0);
|
|
@@ -17980,7 +18009,7 @@ let mr = (wg = class extends Bt {
|
|
|
17980
18009
|
userId: c,
|
|
17981
18010
|
displayName: d,
|
|
17982
18011
|
device: l,
|
|
17983
|
-
picture:
|
|
18012
|
+
picture: h,
|
|
17984
18013
|
isHost: g,
|
|
17985
18014
|
flags: f,
|
|
17986
18015
|
clientSpecificId: v,
|
|
@@ -17993,7 +18022,7 @@ let mr = (wg = class extends Bt {
|
|
|
17993
18022
|
producers: L,
|
|
17994
18023
|
metadata: B
|
|
17995
18024
|
} = e;
|
|
17996
|
-
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 = {
|
|
17997
18026
|
audio: void 0,
|
|
17998
18027
|
video: void 0
|
|
17999
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);
|
|
@@ -18318,8 +18347,8 @@ class tD extends Da {
|
|
|
18318
18347
|
$r = new WeakMap();
|
|
18319
18348
|
class sD {
|
|
18320
18349
|
constructor() {
|
|
18321
|
-
|
|
18322
|
-
|
|
18350
|
+
p(this, "_orderedArray");
|
|
18351
|
+
p(this, "_map");
|
|
18323
18352
|
this._map = /* @__PURE__ */ new Map(), this._orderedArray = [];
|
|
18324
18353
|
}
|
|
18325
18354
|
add(t, e) {
|
|
@@ -18345,8 +18374,8 @@ class sD {
|
|
|
18345
18374
|
}
|
|
18346
18375
|
class rD {
|
|
18347
18376
|
constructor() {
|
|
18348
|
-
|
|
18349
|
-
|
|
18377
|
+
p(this, "_activeSpeakerPeers");
|
|
18378
|
+
p(this, "_compulsoryPeers");
|
|
18350
18379
|
this._activeSpeakerPeers = new sD(), this._compulsoryPeers = /* @__PURE__ */ new Set();
|
|
18351
18380
|
}
|
|
18352
18381
|
add(t, e, r) {
|
|
@@ -18427,37 +18456,37 @@ let Tt = (bg = class extends Bt {
|
|
|
18427
18456
|
/**
|
|
18428
18457
|
* Returns a list of participants waiting to join the meeting.
|
|
18429
18458
|
*/
|
|
18430
|
-
|
|
18459
|
+
p(this, "waitlisted");
|
|
18431
18460
|
/**
|
|
18432
18461
|
* Returns a list of all participants in the meeting.
|
|
18433
18462
|
*/
|
|
18434
|
-
|
|
18463
|
+
p(this, "joined");
|
|
18435
18464
|
/**
|
|
18436
18465
|
* @deprecated
|
|
18437
18466
|
* Returns a list of participants whose streams are currently consumed.
|
|
18438
18467
|
*/
|
|
18439
|
-
|
|
18468
|
+
p(this, "active");
|
|
18440
18469
|
/**
|
|
18441
18470
|
* Returns a list of participants whose video streams are currently consumed.
|
|
18442
18471
|
*/
|
|
18443
|
-
|
|
18472
|
+
p(this, "videoSubscribed");
|
|
18444
18473
|
/**
|
|
18445
18474
|
* Returns a list of participants whose audio streams are currently consumed.
|
|
18446
18475
|
*/
|
|
18447
|
-
|
|
18476
|
+
p(this, "audioSubscribed");
|
|
18448
18477
|
/**
|
|
18449
18478
|
* Returns a list of participants who have been pinned.
|
|
18450
18479
|
*/
|
|
18451
|
-
|
|
18480
|
+
p(this, "pinned");
|
|
18452
18481
|
/**
|
|
18453
18482
|
* Returns all added participants irrespective of whether they are currently
|
|
18454
18483
|
* in the meeting or not
|
|
18455
18484
|
*/
|
|
18456
|
-
|
|
18485
|
+
p(this, "all");
|
|
18457
18486
|
m(this, ye, void 0);
|
|
18458
18487
|
m(this, Ii, void 0);
|
|
18459
18488
|
m(this, Et, void 0);
|
|
18460
|
-
|
|
18489
|
+
p(this, "rateLimitConfig", {
|
|
18461
18490
|
maxInvocations: 5,
|
|
18462
18491
|
period: 1
|
|
18463
18492
|
});
|
|
@@ -18472,20 +18501,20 @@ let Tt = (bg = class extends Bt {
|
|
|
18472
18501
|
* just once, and the participants in the map will only change if the page number is
|
|
18473
18502
|
* changed by the user using setPage(page).
|
|
18474
18503
|
*/
|
|
18475
|
-
|
|
18504
|
+
p(this, "viewMode");
|
|
18476
18505
|
/**
|
|
18477
18506
|
* This indicates the current page that has been set by the user in PAGINATED mode.
|
|
18478
18507
|
* If the meeting is in ACTIVE_GRID mode, this value will be 0.
|
|
18479
18508
|
*/
|
|
18480
|
-
|
|
18509
|
+
p(this, "currentPage");
|
|
18481
18510
|
/**
|
|
18482
18511
|
* This stores the `participantId` of the last participant who spoke in the meeting.
|
|
18483
18512
|
*/
|
|
18484
|
-
|
|
18513
|
+
p(this, "lastActiveSpeaker");
|
|
18485
18514
|
/**
|
|
18486
18515
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18487
18516
|
*/
|
|
18488
|
-
|
|
18517
|
+
p(this, "selectedPeers", xf);
|
|
18489
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();
|
|
18490
18519
|
}
|
|
18491
18520
|
/**
|
|
@@ -18882,19 +18911,19 @@ var oD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, dn = (s, t
|
|
|
18882
18911
|
}, Qt, hs, sa, kg;
|
|
18883
18912
|
const Uf = (kg = class {
|
|
18884
18913
|
constructor(s, t, e) {
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18890
|
-
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
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());
|
|
18894
18923
|
m(this, Qt, { mode: "ACTIVE_GRID", page: 0 });
|
|
18895
18924
|
m(this, hs, !1);
|
|
18896
18925
|
m(this, sa, !1);
|
|
18897
|
-
|
|
18926
|
+
p(this, "updateConsumerSpatialLayers", vh(() => {
|
|
18898
18927
|
const s = {}, t = new Map(this.maxSpatialLayerUpdates);
|
|
18899
18928
|
this.maxSpatialLayerUpdates.clear(), Array.from(t.entries()).forEach(([e, r]) => {
|
|
18900
18929
|
s[r] === void 0 && (s[r] = {
|
|
@@ -18906,7 +18935,7 @@ const Uf = (kg = class {
|
|
|
18906
18935
|
this.logger.log(`Switching max spatial layer to ${r.layer}`, { consumerIds: r.consumerIds }), this.roomNodeClient.switchConsumersToLayer(r.consumerIds, r.layer);
|
|
18907
18936
|
});
|
|
18908
18937
|
}, 2e3));
|
|
18909
|
-
|
|
18938
|
+
p(this, "updateConsumers", (s, t) => u(this, null, function* () {
|
|
18910
18939
|
this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${a(this, hs)}`);
|
|
18911
18940
|
try {
|
|
18912
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."));
|
|
@@ -19156,15 +19185,15 @@ const Uf = (kg = class {
|
|
|
19156
19185
|
}
|
|
19157
19186
|
selectActivePeers(s) {
|
|
19158
19187
|
const t = /* @__PURE__ */ new Map(), e = Array.from(
|
|
19159
|
-
this.participants.joined.toArray().filter((
|
|
19160
|
-
), r = this.selectedPeers.peers, i = this.participants.pinned.toArray().reduce((
|
|
19161
|
-
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))
|
|
19162
19191
|
);
|
|
19163
19192
|
let d = Array.from(c);
|
|
19164
19193
|
const l = o - c.size;
|
|
19165
19194
|
if (l >= 0) {
|
|
19166
|
-
const
|
|
19167
|
-
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);
|
|
19168
19197
|
} else
|
|
19169
19198
|
d = d.slice(0, o);
|
|
19170
19199
|
return d;
|
|
@@ -19245,7 +19274,7 @@ const Uf = (kg = class {
|
|
|
19245
19274
|
*/
|
|
19246
19275
|
syncConsumers() {
|
|
19247
19276
|
return u(this, null, function* () {
|
|
19248
|
-
var o, c, d, l,
|
|
19277
|
+
var o, c, d, l, h;
|
|
19249
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") {
|
|
19250
19279
|
this.logger.info("syncConsumers: Connection not ready, exiting.");
|
|
19251
19280
|
return;
|
|
@@ -19281,7 +19310,7 @@ const Uf = (kg = class {
|
|
|
19281
19310
|
(g) => !(e != null && e.has(g.producerId))
|
|
19282
19311
|
), i = [];
|
|
19283
19312
|
let n = Array.from(
|
|
19284
|
-
(
|
|
19313
|
+
(h = e == null ? void 0 : e.values()) != null ? h : []
|
|
19285
19314
|
).map((g) => g.peerId);
|
|
19286
19315
|
n = FC(n), n == null || n.forEach((g) => {
|
|
19287
19316
|
var v;
|
|
@@ -19600,26 +19629,26 @@ const Uf = (kg = class {
|
|
|
19600
19629
|
producerId: o
|
|
19601
19630
|
}
|
|
19602
19631
|
}), {};
|
|
19603
|
-
const
|
|
19604
|
-
return r === "video" &&
|
|
19632
|
+
const h = i;
|
|
19633
|
+
return r === "video" && h.screenShare !== !0 && this.videoPeerConsumerMap.set(e, s), this.logger.info("ParticipantController::processMedia", {
|
|
19605
19634
|
consumer: {
|
|
19606
19635
|
id: s,
|
|
19607
19636
|
peerId: e,
|
|
19608
19637
|
kind: r,
|
|
19609
|
-
appData:
|
|
19638
|
+
appData: h,
|
|
19610
19639
|
remotelyPaused: d,
|
|
19611
19640
|
producerId: o
|
|
19612
19641
|
}
|
|
19613
19642
|
}), this.consumerPeerMap.set(s, {
|
|
19614
19643
|
type: r,
|
|
19615
19644
|
peerId: e,
|
|
19616
|
-
appData:
|
|
19645
|
+
appData: h,
|
|
19617
19646
|
remotelyPaused: d,
|
|
19618
19647
|
producerId: o
|
|
19619
19648
|
}), {
|
|
19620
19649
|
peerId: e,
|
|
19621
19650
|
kind: r,
|
|
19622
|
-
appData:
|
|
19651
|
+
appData: h,
|
|
19623
19652
|
remotelyPaused: d,
|
|
19624
19653
|
track: n,
|
|
19625
19654
|
producerId: o,
|
|
@@ -19695,10 +19724,10 @@ const Uf = (kg = class {
|
|
|
19695
19724
|
producerId: c
|
|
19696
19725
|
}
|
|
19697
19726
|
});
|
|
19698
|
-
const
|
|
19699
|
-
if (!
|
|
19727
|
+
const h = this.participants.joined.get(e);
|
|
19728
|
+
if (!h)
|
|
19700
19729
|
return;
|
|
19701
|
-
const g =
|
|
19730
|
+
const g = h.producers.find((v) => v.producerId === c);
|
|
19702
19731
|
if (g && (g.consumer = {
|
|
19703
19732
|
id: s,
|
|
19704
19733
|
peerId: e,
|
|
@@ -19709,11 +19738,11 @@ const Uf = (kg = class {
|
|
|
19709
19738
|
rtpReceiver: d,
|
|
19710
19739
|
localId: l
|
|
19711
19740
|
}), i.e2ee && this.context.getValue("peerSessionStore").emit(w.E2EE_ACTIVE_CONSUMER, { peerId: e, rtpReceiver: d, track: n }), i.screenShare) {
|
|
19712
|
-
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 });
|
|
19713
19742
|
return;
|
|
19714
19743
|
}
|
|
19715
|
-
r === "video" ? (
|
|
19716
|
-
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
|
|
19717
19746
|
}));
|
|
19718
19747
|
}
|
|
19719
19748
|
processConsumerPaused(s) {
|
|
@@ -19745,8 +19774,8 @@ const Uf = (kg = class {
|
|
|
19745
19774
|
const l = this.participants.joined.get(t);
|
|
19746
19775
|
if (!l)
|
|
19747
19776
|
return;
|
|
19748
|
-
const
|
|
19749
|
-
|
|
19777
|
+
const h = l.producers.find((g) => g.producerId === o);
|
|
19778
|
+
h && (h.consumer = {
|
|
19750
19779
|
id: s,
|
|
19751
19780
|
peerId: t,
|
|
19752
19781
|
kind: e,
|
|
@@ -19785,8 +19814,8 @@ const Uf = (kg = class {
|
|
|
19785
19814
|
const l = this.participants.joined.get(t);
|
|
19786
19815
|
if (!l)
|
|
19787
19816
|
return;
|
|
19788
|
-
const
|
|
19789
|
-
if (
|
|
19817
|
+
const h = l.producers.find((g) => g.producerId === o);
|
|
19818
|
+
if (h && (h.consumer = {
|
|
19790
19819
|
id: s,
|
|
19791
19820
|
peerId: t,
|
|
19792
19821
|
kind: e,
|
|
@@ -19911,7 +19940,7 @@ const yn = class extends Bt {
|
|
|
19911
19940
|
m(this, ra, void 0);
|
|
19912
19941
|
m(this, ia, void 0);
|
|
19913
19942
|
m(this, $d, (e) => {
|
|
19914
|
-
var
|
|
19943
|
+
var h, g, f;
|
|
19915
19944
|
const l = e, {
|
|
19916
19945
|
chat: r,
|
|
19917
19946
|
connectedMeetings: i,
|
|
@@ -19944,7 +19973,7 @@ const yn = class extends Bt {
|
|
|
19944
19973
|
video: void 0,
|
|
19945
19974
|
screenshare: void 0
|
|
19946
19975
|
};
|
|
19947
|
-
(
|
|
19976
|
+
(h = c.audio) != null && h.canProduce && (E.audio = {
|
|
19948
19977
|
canProduce: v(c.audio.canProduce)
|
|
19949
19978
|
}), (g = c.video) != null && g.canProduce && (E.video = {
|
|
19950
19979
|
canProduce: v(c.video.canProduce)
|
|
@@ -20308,32 +20337,32 @@ class $f extends Bt {
|
|
|
20308
20337
|
*/
|
|
20309
20338
|
constructor(e, r) {
|
|
20310
20339
|
super(r);
|
|
20311
|
-
|
|
20340
|
+
p(this, "localMediaHandler");
|
|
20312
20341
|
m(this, Vt, void 0);
|
|
20313
20342
|
S(this, Vt, e);
|
|
20314
20343
|
}
|
|
20315
20344
|
updatePermission() {
|
|
20316
20345
|
return u(this, null, function* () {
|
|
20317
20346
|
var d, l;
|
|
20318
|
-
const e = (
|
|
20319
|
-
this.mediaPermissions[
|
|
20320
|
-
const f = { message: this.mediaPermissions[
|
|
20347
|
+
const e = (h, g) => {
|
|
20348
|
+
this.mediaPermissions[h] = g;
|
|
20349
|
+
const f = { message: this.mediaPermissions[h], kind: h };
|
|
20321
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);
|
|
20322
20351
|
};
|
|
20323
20352
|
if (_e.getName() === "firefox")
|
|
20324
20353
|
return;
|
|
20325
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({
|
|
20326
20355
|
name: i
|
|
20327
|
-
}), c = (
|
|
20356
|
+
}), c = (h, g) => {
|
|
20328
20357
|
switch (g) {
|
|
20329
20358
|
case "granted":
|
|
20330
|
-
e(
|
|
20359
|
+
e(h, "ACCEPTED");
|
|
20331
20360
|
break;
|
|
20332
20361
|
case "denied":
|
|
20333
|
-
e(
|
|
20362
|
+
e(h, "DENIED");
|
|
20334
20363
|
break;
|
|
20335
20364
|
case "prompt":
|
|
20336
|
-
e(
|
|
20365
|
+
e(h, "NOT_REQUESTED");
|
|
20337
20366
|
break;
|
|
20338
20367
|
}
|
|
20339
20368
|
this.localMediaHandler.repopulateAvailableDevices();
|
|
@@ -20378,7 +20407,7 @@ class $f extends Bt {
|
|
|
20378
20407
|
*/
|
|
20379
20408
|
init() {
|
|
20380
20409
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
20381
|
-
var n, o, c, d, l,
|
|
20410
|
+
var n, o, c, d, l, h, g;
|
|
20382
20411
|
if (_e.init(), i && S(this, Vt, i), !this.localMediaHandler)
|
|
20383
20412
|
try {
|
|
20384
20413
|
let f = !0;
|
|
@@ -20432,7 +20461,7 @@ class $f extends Bt {
|
|
|
20432
20461
|
), f) {
|
|
20433
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}`);
|
|
20434
20463
|
const v = this.localMediaHandler.setupStreams({
|
|
20435
|
-
video: (
|
|
20464
|
+
video: (h = e == null ? void 0 : e.video) != null ? h : !0,
|
|
20436
20465
|
audio: (g = e == null ? void 0 : e.audio) != null ? g : !0
|
|
20437
20466
|
});
|
|
20438
20467
|
r || (yield v);
|
|
@@ -20728,22 +20757,22 @@ let Qe = (Ig = class extends $f {
|
|
|
20728
20757
|
*/
|
|
20729
20758
|
m(this, Ve);
|
|
20730
20759
|
m(this, Jo);
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20760
|
+
p(this, "name");
|
|
20761
|
+
p(this, "picture");
|
|
20762
|
+
p(this, "customParticipantId");
|
|
20763
|
+
p(this, "waitlistStatus");
|
|
20735
20764
|
m(this, na, void 0);
|
|
20736
20765
|
m(this, gt, void 0);
|
|
20737
20766
|
m(this, aa, void 0);
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20767
|
+
p(this, "role");
|
|
20768
|
+
p(this, "userId");
|
|
20769
|
+
p(this, "organizationId");
|
|
20770
|
+
p(this, "supportsRemoteControl", !1);
|
|
20771
|
+
p(this, "device");
|
|
20743
20772
|
m(this, Ue, void 0);
|
|
20744
|
-
|
|
20773
|
+
p(this, "hidden", !1);
|
|
20745
20774
|
/* Name of the preset used to join the meeting */
|
|
20746
|
-
|
|
20775
|
+
p(this, "presetName");
|
|
20747
20776
|
/**
|
|
20748
20777
|
* Returns the current state of room
|
|
20749
20778
|
* init - Inital State
|
|
@@ -20754,7 +20783,7 @@ let Qe = (Ig = class extends $f {
|
|
|
20754
20783
|
* left - User left the meeting
|
|
20755
20784
|
* ended - The meeting was ended
|
|
20756
20785
|
*/
|
|
20757
|
-
|
|
20786
|
+
p(this, "roomState", "init");
|
|
20758
20787
|
m(this, ca, /* @__PURE__ */ new Set());
|
|
20759
20788
|
m(this, da, /* @__PURE__ */ new Set());
|
|
20760
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);
|
|
@@ -20787,13 +20816,13 @@ let Qe = (Ig = class extends $f {
|
|
|
20787
20816
|
var f, v, E, C, _, I;
|
|
20788
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;
|
|
20789
20818
|
r.canProduceAudio !== "ALLOWED" && (c = !1), r.canProduceVideo !== "ALLOWED" && (d = !1);
|
|
20790
|
-
const l = new Qe(t, e, r, i, n),
|
|
20791
|
-
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);
|
|
20792
20821
|
const g = (I = t.getValue("defaults")) == null ? void 0 : I.mediaHandler;
|
|
20793
20822
|
return g && (g.context = t), yield l.init({
|
|
20794
20823
|
audio: c,
|
|
20795
20824
|
video: d,
|
|
20796
|
-
constraints:
|
|
20825
|
+
constraints: h
|
|
20797
20826
|
}, o, t), l.setupEvents(), l;
|
|
20798
20827
|
});
|
|
20799
20828
|
}
|
|
@@ -21275,11 +21304,11 @@ var Ko;
|
|
|
21275
21304
|
class Uu {
|
|
21276
21305
|
constructor(t, e = !1) {
|
|
21277
21306
|
// Queue of pending tasks (map of PendingTasks indexed by id).
|
|
21278
|
-
|
|
21307
|
+
p(this, "pendingTasks", /* @__PURE__ */ new Map());
|
|
21279
21308
|
// Incrementing PendingTask id.
|
|
21280
|
-
|
|
21309
|
+
p(this, "nextTaskId", 0);
|
|
21281
21310
|
// Whether stop() method is stopping all pending tasks.
|
|
21282
|
-
|
|
21311
|
+
p(this, "stopping", !1);
|
|
21283
21312
|
m(this, Ko, void 0);
|
|
21284
21313
|
this.log = e, S(this, Ko, { info: e && t ? t.info : () => {
|
|
21285
21314
|
} });
|
|
@@ -21402,12 +21431,12 @@ function Ff(s, t) {
|
|
|
21402
21431
|
delayTime: 10
|
|
21403
21432
|
}, t);
|
|
21404
21433
|
let c = 0, d, l = !1;
|
|
21405
|
-
const
|
|
21434
|
+
const h = (g) => {
|
|
21406
21435
|
l = !0, r(g);
|
|
21407
21436
|
};
|
|
21408
21437
|
for (; c < n; ) {
|
|
21409
21438
|
try {
|
|
21410
|
-
const g = yield s(c,
|
|
21439
|
+
const g = yield s(c, h);
|
|
21411
21440
|
return e(g);
|
|
21412
21441
|
} catch (g) {
|
|
21413
21442
|
if (d = g, l)
|
|
@@ -21461,7 +21490,7 @@ var Ke;
|
|
|
21461
21490
|
class mD {
|
|
21462
21491
|
constructor(t) {
|
|
21463
21492
|
m(this, Ke, void 0);
|
|
21464
|
-
|
|
21493
|
+
p(this, "events");
|
|
21465
21494
|
S(this, Ke, t), this.events = ys;
|
|
21466
21495
|
}
|
|
21467
21496
|
joinRoom(t, e, r, i = !1) {
|
|
@@ -21696,20 +21725,20 @@ class Ah extends Ul {
|
|
|
21696
21725
|
constructor() {
|
|
21697
21726
|
super(...arguments);
|
|
21698
21727
|
/** Local stream for sending general media tracks. */
|
|
21699
|
-
|
|
21728
|
+
p(this, "_sendWebStream", new MediaStream());
|
|
21700
21729
|
/** Local stream for sending screenshare tracks. */
|
|
21701
|
-
|
|
21730
|
+
p(this, "_sendScreenShareStream", new MediaStream());
|
|
21702
21731
|
/** Handler direction. */
|
|
21703
|
-
|
|
21732
|
+
p(this, "_direction");
|
|
21704
21733
|
/** RTCPeerConnection instance. */
|
|
21705
|
-
|
|
21734
|
+
p(this, "pc");
|
|
21706
21735
|
/** Got transport local and remote parameters. */
|
|
21707
|
-
|
|
21736
|
+
p(this, "_transportReady", !1);
|
|
21708
21737
|
// Map of RTCTransceivers indexed by MID.
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21738
|
+
p(this, "_mapMidTransceiver", /* @__PURE__ */ new Map());
|
|
21739
|
+
p(this, "enableHighBitrate", !1);
|
|
21740
|
+
p(this, "enableStereo", !1);
|
|
21741
|
+
p(this, "enableDtx", !0);
|
|
21713
21742
|
}
|
|
21714
21743
|
get midTransceiverMap() {
|
|
21715
21744
|
return this._mapMidTransceiver;
|
|
@@ -21997,7 +22026,7 @@ class Mh extends Ah {
|
|
|
21997
22026
|
this.logger.debug("creating new transceiver");
|
|
21998
22027
|
const l = RTCRtpSender.getCapabilities(typeof t == "string" ? t : t.kind);
|
|
21999
22028
|
this.logger.info(`senders available params: ${JSON.stringify(l)}`);
|
|
22000
|
-
const
|
|
22029
|
+
const h = [];
|
|
22001
22030
|
r && r.length && r.forEach((g) => {
|
|
22002
22031
|
var v;
|
|
22003
22032
|
const f = l.codecs.find((E) => E.mimeType.includes(g.name));
|
|
@@ -22008,15 +22037,15 @@ class Mh extends Ah {
|
|
|
22008
22037
|
const C = Array.from(new Set(E).values());
|
|
22009
22038
|
f.sdpFmtpLine = C.join(";");
|
|
22010
22039
|
}
|
|
22011
|
-
|
|
22012
|
-
}), this.logger.info(`selected codecs: ${JSON.stringify(
|
|
22040
|
+
h.push(f);
|
|
22041
|
+
}), this.logger.info(`selected codecs: ${JSON.stringify(h)}`), o.setCodecPreferences(h);
|
|
22013
22042
|
}
|
|
22014
22043
|
const c = yield this.pc.createOffer();
|
|
22015
22044
|
if (yield this.pc.setLocalDescription(c), r && r.findIndex(({ name: l }) => l === "opus") >= 0) {
|
|
22016
|
-
const { enableDtx: l, enableStereo:
|
|
22045
|
+
const { enableDtx: l, enableStereo: h } = this, g = this.enableHighBitrate ? h ? 128e3 : 64e3 : h ? 64e3 : 32e3;
|
|
22017
22046
|
c.sdp = c.sdp.replace(
|
|
22018
22047
|
"minptime=10;useinbandfec=1",
|
|
22019
|
-
`minptime=10;useinbandfec=1;${l ? "usedtx=1;" : ""}${
|
|
22048
|
+
`minptime=10;useinbandfec=1;${l ? "usedtx=1;" : ""}${h ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${g}`
|
|
22020
22049
|
), c.sdp += `a=rtcp-fb:111 nack\r
|
|
22021
22050
|
`;
|
|
22022
22051
|
}
|
|
@@ -22049,7 +22078,7 @@ class Pd extends Ah {
|
|
|
22049
22078
|
// eslint-disable-next-line no-useless-constructor
|
|
22050
22079
|
constructor(e, r) {
|
|
22051
22080
|
super(e);
|
|
22052
|
-
|
|
22081
|
+
p(this, "supportsSendEncodings", !1);
|
|
22053
22082
|
this.supportsSendEncodings = r.supportsSendEncodings;
|
|
22054
22083
|
}
|
|
22055
22084
|
/**
|
|
@@ -22088,16 +22117,16 @@ class Pd extends Ah {
|
|
|
22088
22117
|
var L;
|
|
22089
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);
|
|
22090
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);
|
|
22091
|
-
},
|
|
22092
|
-
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") {
|
|
22093
22122
|
const { enableDtx: f, enableStereo: v } = this, E = this.enableHighBitrate ? v ? 128e3 : 64e3 : v ? 64e3 : 32e3;
|
|
22094
|
-
|
|
22123
|
+
h.sdp = h.sdp.replace(
|
|
22095
22124
|
"minptime=10;useinbandfec=1",
|
|
22096
22125
|
`minptime=10;useinbandfec=1;${f ? "usedtx=1;" : ""}${v ? "stereo=1;sprop-stereo=1;" : ""}maxaveragebitrate=${E}`
|
|
22097
22126
|
);
|
|
22098
22127
|
}
|
|
22099
22128
|
return this.midTransceiverMap.set(d.mid, d), {
|
|
22100
|
-
offerSdp:
|
|
22129
|
+
offerSdp: h,
|
|
22101
22130
|
callback: (f) => u(this, null, function* () {
|
|
22102
22131
|
return this.logger.debug(`send() | calling pc.setRemoteDescription() [answer:${JSON.stringify(f)}]`), yield this.pc.setRemoteDescription(f), d.mid;
|
|
22103
22132
|
}),
|
|
@@ -22223,40 +22252,40 @@ class SD extends Ul {
|
|
|
22223
22252
|
/**
|
|
22224
22253
|
* Associated transciever RTCRtpSender object
|
|
22225
22254
|
*/
|
|
22226
|
-
|
|
22255
|
+
p(this, "rtpReceiver");
|
|
22227
22256
|
/**
|
|
22228
22257
|
* Consumer ID
|
|
22229
22258
|
*/
|
|
22230
|
-
|
|
22259
|
+
p(this, "id");
|
|
22231
22260
|
/**
|
|
22232
22261
|
* Consumer's local ID
|
|
22233
22262
|
*/
|
|
22234
|
-
|
|
22263
|
+
p(this, "localId");
|
|
22235
22264
|
/**
|
|
22236
22265
|
* Producer ID associated with this consumer
|
|
22237
22266
|
*/
|
|
22238
|
-
|
|
22267
|
+
p(this, "producerId");
|
|
22239
22268
|
/**
|
|
22240
22269
|
* Transport ID of the producing transport on the producing peer
|
|
22241
22270
|
*/
|
|
22242
|
-
|
|
22271
|
+
p(this, "producingTransportId");
|
|
22243
22272
|
/**
|
|
22244
22273
|
* Mime type of the consumer stream
|
|
22245
22274
|
*/
|
|
22246
|
-
|
|
22275
|
+
p(this, "mimeType");
|
|
22247
22276
|
/**
|
|
22248
22277
|
* The track associated with this consumer
|
|
22249
22278
|
*/
|
|
22250
|
-
|
|
22279
|
+
p(this, "track");
|
|
22251
22280
|
/**
|
|
22252
22281
|
* Producing peer id corresponding to this consumer
|
|
22253
22282
|
*/
|
|
22254
|
-
|
|
22283
|
+
p(this, "peerId");
|
|
22255
22284
|
/**
|
|
22256
22285
|
* Custom data attached to this consumer
|
|
22257
22286
|
*/
|
|
22258
|
-
|
|
22259
|
-
|
|
22287
|
+
p(this, "appData");
|
|
22288
|
+
p(this, "transceiver");
|
|
22260
22289
|
/**
|
|
22261
22290
|
* RTCRtpReceiver associated with the consumer
|
|
22262
22291
|
*/
|
|
@@ -22360,11 +22389,11 @@ class vD extends Ul {
|
|
|
22360
22389
|
/**
|
|
22361
22390
|
* Producer ID.
|
|
22362
22391
|
*/
|
|
22363
|
-
|
|
22392
|
+
p(this, "id");
|
|
22364
22393
|
/**
|
|
22365
22394
|
* Local ID.
|
|
22366
22395
|
*/
|
|
22367
|
-
|
|
22396
|
+
p(this, "localId");
|
|
22368
22397
|
/**
|
|
22369
22398
|
* Associated RTCRtpSender.
|
|
22370
22399
|
*/
|
|
@@ -22372,15 +22401,15 @@ class vD extends Ul {
|
|
|
22372
22401
|
/**
|
|
22373
22402
|
* Kind of media on to this producer
|
|
22374
22403
|
*/
|
|
22375
|
-
|
|
22404
|
+
p(this, "kind");
|
|
22376
22405
|
/**
|
|
22377
22406
|
* App custom data.
|
|
22378
22407
|
*/
|
|
22379
|
-
|
|
22408
|
+
p(this, "appData");
|
|
22380
22409
|
/**
|
|
22381
22410
|
* Associated transciever RTCRtpSender object
|
|
22382
22411
|
*/
|
|
22383
|
-
|
|
22412
|
+
p(this, "rtpSender");
|
|
22384
22413
|
/**
|
|
22385
22414
|
* Whether the Producer should call stop() in given tracks.
|
|
22386
22415
|
*/
|
|
@@ -22568,61 +22597,61 @@ var Br, jd, Di;
|
|
|
22568
22597
|
const En = class extends ot.EventEmitter {
|
|
22569
22598
|
constructor(e, r, i, n) {
|
|
22570
22599
|
super();
|
|
22571
|
-
|
|
22572
|
-
|
|
22573
|
-
|
|
22600
|
+
p(this, "channel");
|
|
22601
|
+
p(this, "queue");
|
|
22602
|
+
p(this, "serverProtocolVersion");
|
|
22574
22603
|
m(this, Br, /* @__PURE__ */ new Map());
|
|
22575
22604
|
m(this, jd, void 0);
|
|
22576
22605
|
m(this, Di, void 0);
|
|
22577
|
-
|
|
22606
|
+
p(this, "respond", (e, r, i = !1) => {
|
|
22578
22607
|
let n;
|
|
22579
22608
|
i ? n = En.createErrorResponse(e, r) : n = En.createResponse(e, r), this.channel.send(JSON.stringify(n));
|
|
22580
22609
|
});
|
|
22581
|
-
|
|
22610
|
+
p(this, "notify", (e) => {
|
|
22582
22611
|
const r = En.createNotification(e);
|
|
22583
22612
|
this.channel.send(JSON.stringify(r));
|
|
22584
22613
|
});
|
|
22585
|
-
|
|
22614
|
+
p(this, "request", (e) => u(this, null, function* () {
|
|
22586
22615
|
const r = En.createRequest(e), i = new Promise((n, o) => {
|
|
22587
22616
|
const { id: d } = r.payload._bolt, l = {
|
|
22588
22617
|
id: d,
|
|
22589
22618
|
method: r.type,
|
|
22590
|
-
resolve: (
|
|
22591
|
-
this.queue.delete(d) && (clearTimeout(l.timer), n(
|
|
22619
|
+
resolve: (h) => {
|
|
22620
|
+
this.queue.delete(d) && (clearTimeout(l.timer), n(h));
|
|
22592
22621
|
},
|
|
22593
22622
|
timer: setTimeout(() => {
|
|
22594
22623
|
this.queue.delete(d) && o(new Error(`request timeout for message id: ${d}`));
|
|
22595
22624
|
}, 2e4),
|
|
22596
|
-
cancel: (
|
|
22597
|
-
this.queue.delete(d) && (clearTimeout(l.timer), o(
|
|
22625
|
+
cancel: (h) => {
|
|
22626
|
+
this.queue.delete(d) && (clearTimeout(l.timer), o(h));
|
|
22598
22627
|
}
|
|
22599
22628
|
};
|
|
22600
22629
|
this.queue.set(d, l);
|
|
22601
22630
|
});
|
|
22602
22631
|
return this.channel.send(JSON.stringify(r)), i;
|
|
22603
22632
|
}));
|
|
22604
|
-
|
|
22633
|
+
p(this, "send", (e) => {
|
|
22605
22634
|
const r = JSON.stringify(e), i = 16384;
|
|
22606
22635
|
if (r.length > i) {
|
|
22607
22636
|
const n = i - 200, o = Math.ceil(r.length / n), c = [];
|
|
22608
22637
|
for (let l = 0; l < o; l += 1) {
|
|
22609
|
-
const
|
|
22610
|
-
c.push(r.slice(
|
|
22638
|
+
const h = l * n, g = (l + 1) * n;
|
|
22639
|
+
c.push(r.slice(h, g));
|
|
22611
22640
|
}
|
|
22612
22641
|
const d = tn();
|
|
22613
22642
|
for (let l = 0; l < o; l += 1) {
|
|
22614
|
-
const
|
|
22643
|
+
const h = c[l], f = JSON.stringify({
|
|
22615
22644
|
id: d,
|
|
22616
22645
|
count: o,
|
|
22617
22646
|
chunkIndex: l,
|
|
22618
|
-
chunk:
|
|
22647
|
+
chunk: h
|
|
22619
22648
|
});
|
|
22620
22649
|
a(this, Di).debug(`Sending message chunk over dc: ${f}`), this.channel.send(f);
|
|
22621
22650
|
}
|
|
22622
22651
|
} else
|
|
22623
22652
|
a(this, Di).debug(`Sending message over dc: ${r}`), this.channel.send(r);
|
|
22624
22653
|
});
|
|
22625
|
-
|
|
22654
|
+
p(this, "processMessage", (e) => {
|
|
22626
22655
|
var i;
|
|
22627
22656
|
a(this, Br).has(e.id) || a(this, Br).set(e.id, []);
|
|
22628
22657
|
const r = a(this, Br).get(e.id);
|
|
@@ -22640,11 +22669,11 @@ const En = class extends ot.EventEmitter {
|
|
|
22640
22669
|
return c;
|
|
22641
22670
|
}
|
|
22642
22671
|
});
|
|
22643
|
-
|
|
22672
|
+
p(this, "processResponseMsg", (e) => {
|
|
22644
22673
|
const { id: r } = e.payload._bolt, i = this.queue.get(r);
|
|
22645
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;
|
|
22646
22675
|
});
|
|
22647
|
-
|
|
22676
|
+
p(this, "processBoltHandshake", (e) => {
|
|
22648
22677
|
var r, i;
|
|
22649
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;
|
|
22650
22679
|
});
|
|
@@ -22652,7 +22681,7 @@ const En = class extends ot.EventEmitter {
|
|
|
22652
22681
|
}
|
|
22653
22682
|
};
|
|
22654
22683
|
let ni = En;
|
|
22655
|
-
Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(),
|
|
22684
|
+
Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), p(ni, "createRequest", (e) => {
|
|
22656
22685
|
var r;
|
|
22657
22686
|
if ((r = e.payload) != null && r._bolt)
|
|
22658
22687
|
throw new Error("rpc fields are internal values");
|
|
@@ -22666,7 +22695,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22666
22695
|
}
|
|
22667
22696
|
})
|
|
22668
22697
|
};
|
|
22669
|
-
}),
|
|
22698
|
+
}), p(ni, "createResponse", (e, r) => {
|
|
22670
22699
|
var i;
|
|
22671
22700
|
if ((i = r.payload) != null && i._bolt)
|
|
22672
22701
|
throw new Error("rpc fields are internal values");
|
|
@@ -22680,7 +22709,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22680
22709
|
}
|
|
22681
22710
|
})
|
|
22682
22711
|
};
|
|
22683
|
-
}),
|
|
22712
|
+
}), p(ni, "createNotification", (e) => {
|
|
22684
22713
|
var r;
|
|
22685
22714
|
if ((r = e.payload) != null && r._bolt)
|
|
22686
22715
|
throw new Error("rpc fields are internal values");
|
|
@@ -22694,7 +22723,7 @@ Br = new WeakMap(), jd = new WeakMap(), Di = new WeakMap(), h(ni, "createRequest
|
|
|
22694
22723
|
}
|
|
22695
22724
|
})
|
|
22696
22725
|
};
|
|
22697
|
-
}),
|
|
22726
|
+
}), p(ni, "createErrorResponse", (e, r) => ({
|
|
22698
22727
|
type: "error",
|
|
22699
22728
|
payload: {
|
|
22700
22729
|
error: r.message,
|
|
@@ -22716,39 +22745,39 @@ const Pn = class extends Ul {
|
|
|
22716
22745
|
iceTransportPolicy: c,
|
|
22717
22746
|
proprietaryConstraints: d,
|
|
22718
22747
|
additionalSettings: l,
|
|
22719
|
-
appData:
|
|
22748
|
+
appData: h,
|
|
22720
22749
|
config: g
|
|
22721
22750
|
}) {
|
|
22722
22751
|
var C, _, I;
|
|
22723
22752
|
super(e);
|
|
22724
|
-
|
|
22725
|
-
|
|
22753
|
+
p(this, "awaitQueue");
|
|
22754
|
+
p(this, "observer");
|
|
22726
22755
|
// Id.
|
|
22727
|
-
|
|
22728
|
-
|
|
22756
|
+
p(this, "id");
|
|
22757
|
+
p(this, "serverId");
|
|
22729
22758
|
// Direction.
|
|
22730
|
-
|
|
22759
|
+
p(this, "direction");
|
|
22731
22760
|
// SCTP max message size if enabled, null otherwise.
|
|
22732
|
-
|
|
22761
|
+
p(this, "maxSctpMessageSize");
|
|
22733
22762
|
// RTC handler isntance.
|
|
22734
|
-
|
|
22763
|
+
p(this, "handler");
|
|
22735
22764
|
// Transport connection state.
|
|
22736
|
-
|
|
22765
|
+
p(this, "connectionState", "new");
|
|
22737
22766
|
// Producers map
|
|
22738
|
-
|
|
22767
|
+
p(this, "producers");
|
|
22739
22768
|
// Consumers map
|
|
22740
|
-
|
|
22769
|
+
p(this, "consumers");
|
|
22741
22770
|
// Datachannels map
|
|
22742
|
-
|
|
22743
|
-
|
|
22744
|
-
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
|
|
22749
|
-
|
|
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");
|
|
22750
22779
|
// App custom data.
|
|
22751
|
-
|
|
22780
|
+
p(this, "appData");
|
|
22752
22781
|
m(this, Oi, void 0);
|
|
22753
22782
|
S(this, Oi, e);
|
|
22754
22783
|
const f = e.getValue("logger");
|
|
@@ -22761,7 +22790,7 @@ const Pn = class extends Ul {
|
|
|
22761
22790
|
iceTransportPolicy: c,
|
|
22762
22791
|
additionalSettings: l,
|
|
22763
22792
|
proprietaryConstraints: d
|
|
22764
|
-
}), this.appData =
|
|
22793
|
+
}), this.appData = h || {};
|
|
22765
22794
|
const E = 3e4;
|
|
22766
22795
|
this.transportConnectionPromise = new Promise((M) => {
|
|
22767
22796
|
const U = setTimeout(() => {
|
|
@@ -22919,7 +22948,7 @@ const Pn = class extends Ul {
|
|
|
22919
22948
|
codecOptions: c,
|
|
22920
22949
|
stopTracks: d = !0,
|
|
22921
22950
|
disableTrackOnPause: l = !0,
|
|
22922
|
-
zeroRtpOnPause:
|
|
22951
|
+
zeroRtpOnPause: h = !1,
|
|
22923
22952
|
appData: g = {}
|
|
22924
22953
|
} = e;
|
|
22925
22954
|
this.logger.debug(`produce() [track:${n.id}]`);
|
|
@@ -22952,7 +22981,7 @@ const Pn = class extends Ul {
|
|
|
22952
22981
|
track: n,
|
|
22953
22982
|
stopTracks: d,
|
|
22954
22983
|
disableTrackOnPause: l,
|
|
22955
|
-
zeroRtpOnPause:
|
|
22984
|
+
zeroRtpOnPause: h,
|
|
22956
22985
|
appData: g,
|
|
22957
22986
|
handler: this.handler,
|
|
22958
22987
|
rtpSender: E
|
|
@@ -22991,15 +23020,15 @@ const Pn = class extends Ul {
|
|
|
22991
23020
|
sessionDescription: c,
|
|
22992
23021
|
failedProducers: d
|
|
22993
23022
|
} = yield r(e);
|
|
22994
|
-
o.forEach((
|
|
22995
|
-
n[g] = this.createConsumerObjectAndWaitForTrack(j(O({},
|
|
23023
|
+
o.forEach((h, g) => {
|
|
23024
|
+
n[g] = this.createConsumerObjectAndWaitForTrack(j(O({}, h), {
|
|
22996
23025
|
producerId: g
|
|
22997
23026
|
}));
|
|
22998
23027
|
}), c && (this.logger.info("Session description found, sending negotiation request"), yield i(c));
|
|
22999
23028
|
const l = [];
|
|
23000
23029
|
return yield Promise.all(Object.entries(n).map(
|
|
23001
|
-
([
|
|
23002
|
-
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}`, {
|
|
23003
23032
|
error: { message: "This should not happen" },
|
|
23004
23033
|
transport: { serverId: this.serverId }
|
|
23005
23034
|
});
|
|
@@ -23134,7 +23163,7 @@ const Pn = class extends Ul {
|
|
|
23134
23163
|
streamId: c,
|
|
23135
23164
|
paused: d,
|
|
23136
23165
|
screenShare: l,
|
|
23137
|
-
appData:
|
|
23166
|
+
appData: h,
|
|
23138
23167
|
kind: g,
|
|
23139
23168
|
mimeType: f
|
|
23140
23169
|
} = e, v = `${c}:${g}`, E = j(O({}, e), {
|
|
@@ -23161,7 +23190,7 @@ const Pn = class extends Ul {
|
|
|
23161
23190
|
producingPeerId: n,
|
|
23162
23191
|
producingTransportId: o,
|
|
23163
23192
|
handler: this.handler,
|
|
23164
|
-
appData: j(O({},
|
|
23193
|
+
appData: j(O({}, h), { screenShare: l, peerId: n }),
|
|
23165
23194
|
rtpReceiver: B.receiver,
|
|
23166
23195
|
mimeType: f
|
|
23167
23196
|
});
|
|
@@ -23252,7 +23281,7 @@ var Xs, Ni;
|
|
|
23252
23281
|
class PD {
|
|
23253
23282
|
constructor(t, { handlerName: e, handlerFactory: r } = {}) {
|
|
23254
23283
|
// RTC handler factory.
|
|
23255
|
-
|
|
23284
|
+
p(this, "handlerFactory");
|
|
23256
23285
|
m(this, Xs, void 0);
|
|
23257
23286
|
m(this, Ni, void 0);
|
|
23258
23287
|
const i = t.getValue("logger");
|
|
@@ -23325,7 +23354,7 @@ class CD extends ot.EventEmitter {
|
|
|
23325
23354
|
m(this, Yd);
|
|
23326
23355
|
m(this, rc);
|
|
23327
23356
|
m(this, ic);
|
|
23328
|
-
|
|
23357
|
+
p(this, "context");
|
|
23329
23358
|
m(this, pa, void 0);
|
|
23330
23359
|
m(this, it, void 0);
|
|
23331
23360
|
m(this, nt, void 0);
|
|
@@ -23432,7 +23461,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Xo = new WeakMap(),
|
|
|
23432
23461
|
});
|
|
23433
23462
|
}, Gd = new WeakSet(), jf = function(e) {
|
|
23434
23463
|
return u(this, null, function* () {
|
|
23435
|
-
var o, c, d, l,
|
|
23464
|
+
var o, c, d, l, h, g, f, v;
|
|
23436
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)}`);
|
|
23437
23466
|
const n = yield vt().getICEServers().catch((E) => (this.logger.warn(`failed to get iceservers from server: ${E.message}`), []));
|
|
23438
23467
|
if (e.send) {
|
|
@@ -23446,7 +23475,7 @@ pa = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), Xo = new WeakMap(),
|
|
|
23446
23475
|
},
|
|
23447
23476
|
config: {
|
|
23448
23477
|
enableHighBitrate: (l = (d = (c = this.context.getValue("defaults").mediaConfiguration) == null ? void 0 : c.audio) == null ? void 0 : d.enableHighBitrate) != null ? l : !1,
|
|
23449
|
-
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,
|
|
23450
23479
|
enableDtx: !!E
|
|
23451
23480
|
},
|
|
23452
23481
|
iceTransportPolicy: a(this, Ms)
|
|
@@ -23680,16 +23709,16 @@ class RD {
|
|
|
23680
23709
|
throw new Error("List of producers is required");
|
|
23681
23710
|
const e = /* @__PURE__ */ new Map(), r = [];
|
|
23682
23711
|
t.forEach((d) => {
|
|
23683
|
-
const { producingPeerId: l, producerId:
|
|
23712
|
+
const { producingPeerId: l, producerId: h, producingTransportId: g } = d, f = {
|
|
23684
23713
|
simulcast: {
|
|
23685
23714
|
preferredRid: "f",
|
|
23686
23715
|
priorityOrdering: "asciibetical",
|
|
23687
23716
|
ridNotAvailable: "asciibetical"
|
|
23688
23717
|
}
|
|
23689
23718
|
};
|
|
23690
|
-
e.set(
|
|
23719
|
+
e.set(h, l), r.push(O({
|
|
23691
23720
|
producingPeerId: l,
|
|
23692
|
-
producerId:
|
|
23721
|
+
producerId: h,
|
|
23693
23722
|
producingTransportId: g
|
|
23694
23723
|
}, f));
|
|
23695
23724
|
});
|
|
@@ -23700,13 +23729,13 @@ class RD {
|
|
|
23700
23729
|
t.forEach((d) => n.set(d.producerId, d));
|
|
23701
23730
|
const o = /* @__PURE__ */ new Map(), c = [];
|
|
23702
23731
|
return Object.entries(i.consumerStateMap).forEach(([d, l]) => {
|
|
23703
|
-
const
|
|
23704
|
-
if (!
|
|
23732
|
+
const h = n.get(d);
|
|
23733
|
+
if (!h)
|
|
23705
23734
|
return;
|
|
23706
23735
|
if (l.errorCode) {
|
|
23707
23736
|
a(this, Zt).warn(`Consumer request failed for producer ${d}`, {
|
|
23708
23737
|
error: { message: l.errorCode }
|
|
23709
|
-
}), c.push(j(O({},
|
|
23738
|
+
}), c.push(j(O({}, h), { errorCode: l.errorCode }));
|
|
23710
23739
|
return;
|
|
23711
23740
|
}
|
|
23712
23741
|
let g = {};
|
|
@@ -23716,14 +23745,14 @@ class RD {
|
|
|
23716
23745
|
}
|
|
23717
23746
|
o.set(d, {
|
|
23718
23747
|
consumerId: l.consumerId,
|
|
23719
|
-
producingTransportId:
|
|
23720
|
-
producingPeerId:
|
|
23721
|
-
kind:
|
|
23722
|
-
paused:
|
|
23748
|
+
producingTransportId: h.producingTransportId,
|
|
23749
|
+
producingPeerId: h.producingPeerId,
|
|
23750
|
+
kind: h.kind,
|
|
23751
|
+
paused: h.pause,
|
|
23723
23752
|
streamId: l.producerTrack.streamId,
|
|
23724
23753
|
trackId: l.producerTrack.trackId,
|
|
23725
|
-
screenShare:
|
|
23726
|
-
mimeType:
|
|
23754
|
+
screenShare: h.screenShare,
|
|
23755
|
+
mimeType: h.mimeType,
|
|
23727
23756
|
appData: g
|
|
23728
23757
|
});
|
|
23729
23758
|
}), { consumerStates: o, sessionDescription: i.sessionDescription, failedProducers: c };
|
|
@@ -23834,8 +23863,8 @@ class Oh {
|
|
|
23834
23863
|
screenShare: (f = i.screenShare) != null ? f : !1,
|
|
23835
23864
|
mimeType: `${e}/${(v = n[0]) == null ? void 0 : v.name}`,
|
|
23836
23865
|
producingTransportId: o
|
|
23837
|
-
}, { answer:
|
|
23838
|
-
return { answer:
|
|
23866
|
+
}, { answer: h, producerId: g } = yield this.socketHandler.produce(l);
|
|
23867
|
+
return { answer: h, producerId: g };
|
|
23839
23868
|
});
|
|
23840
23869
|
}
|
|
23841
23870
|
}
|
|
@@ -23976,7 +24005,7 @@ xi = new WeakMap(), Hr = new WeakMap(), Sa = new WeakMap(), nc = new WeakMap(),
|
|
|
23976
24005
|
);
|
|
23977
24006
|
if (o.forEach(x(this, sl, Zf).bind(this)), c != null && c.length) {
|
|
23978
24007
|
this.logger.error("Failed to create consumers for producers", { producers: c });
|
|
23979
|
-
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);
|
|
23980
24009
|
S(this, Zs, a(this, Zs).concat(d)), S(this, va, setTimeout(
|
|
23981
24010
|
x(this, ac, Gu).bind(this),
|
|
23982
24011
|
e
|
|
@@ -24017,11 +24046,11 @@ xi = new WeakMap(), Hr = new WeakMap(), Sa = new WeakMap(), nc = new WeakMap(),
|
|
|
24017
24046
|
}
|
|
24018
24047
|
};
|
|
24019
24048
|
try {
|
|
24020
|
-
const l = yield this.socketHandler.closeProducer(d),
|
|
24049
|
+
const l = yield this.socketHandler.closeProducer(d), h = {
|
|
24021
24050
|
sdp: l == null ? void 0 : l.sdp,
|
|
24022
24051
|
type: l == null ? void 0 : l.type
|
|
24023
24052
|
};
|
|
24024
|
-
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 });
|
|
24025
24054
|
} catch (l) {
|
|
24026
24055
|
this.logger.error("producer close error", l);
|
|
24027
24056
|
}
|
|
@@ -24066,7 +24095,7 @@ const ol = class {
|
|
|
24066
24095
|
minEnergyThreshold: c = 5e-3,
|
|
24067
24096
|
maxEnergyThreshold: d = 0.2,
|
|
24068
24097
|
energyRatioThreshold: l = 1.5,
|
|
24069
|
-
noiseHistorySize:
|
|
24098
|
+
noiseHistorySize: h = 50
|
|
24070
24099
|
} = {}) {
|
|
24071
24100
|
/**
|
|
24072
24101
|
* Update the energy threshold based on current noise conditions
|
|
@@ -24096,7 +24125,7 @@ const ol = class {
|
|
|
24096
24125
|
m(this, $i, 0);
|
|
24097
24126
|
m(this, er, []);
|
|
24098
24127
|
m(this, hc, void 0);
|
|
24099
|
-
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);
|
|
24100
24129
|
}
|
|
24101
24130
|
get voiceDetected() {
|
|
24102
24131
|
return a(this, ms);
|
|
@@ -24154,7 +24183,7 @@ oc = new WeakMap(), cc = new WeakMap(), dc = new WeakMap(), Ta = new WeakMap(),
|
|
|
24154
24183
|
var pc;
|
|
24155
24184
|
class ag {
|
|
24156
24185
|
constructor(t) {
|
|
24157
|
-
|
|
24186
|
+
p(this, "RNAudioSampleHandler");
|
|
24158
24187
|
m(this, pc, void 0);
|
|
24159
24188
|
S(this, pc, t);
|
|
24160
24189
|
const { RNAudioSampleHandlerImpl: e } = navigator;
|
|
@@ -24185,8 +24214,8 @@ pc = new WeakMap();
|
|
|
24185
24214
|
var gc;
|
|
24186
24215
|
class og {
|
|
24187
24216
|
constructor(t) {
|
|
24188
|
-
|
|
24189
|
-
|
|
24217
|
+
p(this, "audioContext");
|
|
24218
|
+
p(this, "analyser");
|
|
24190
24219
|
m(this, gc, void 0);
|
|
24191
24220
|
S(this, gc, t), this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 2048;
|
|
24192
24221
|
}
|
|
@@ -24408,9 +24437,9 @@ class ae {
|
|
|
24408
24437
|
m(this, Sl);
|
|
24409
24438
|
m(this, vl);
|
|
24410
24439
|
m(this, Tl);
|
|
24411
|
-
|
|
24412
|
-
|
|
24413
|
-
|
|
24440
|
+
p(this, "context");
|
|
24441
|
+
p(this, "authToken");
|
|
24442
|
+
p(this, "e2ee");
|
|
24414
24443
|
m(this, Sc, void 0);
|
|
24415
24444
|
m(this, vc, void 0);
|
|
24416
24445
|
m(this, at, void 0);
|
|
@@ -24581,11 +24610,11 @@ class ae {
|
|
|
24581
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(
|
|
24582
24611
|
te.TRACK_HINT
|
|
24583
24612
|
));
|
|
24584
|
-
const
|
|
24613
|
+
const h = () => {
|
|
24585
24614
|
this.logger.info("Disabling video due to the producer closure"), a(this, ft).delete(r);
|
|
24586
24615
|
}, g = a(this, W).createProducer(
|
|
24587
24616
|
o,
|
|
24588
|
-
|
|
24617
|
+
h
|
|
24589
24618
|
);
|
|
24590
24619
|
return x(this, Wi, lo).call(this, r, g.then((_) => _.id)), g.then((_) => _.track);
|
|
24591
24620
|
});
|
|
@@ -24652,7 +24681,7 @@ class ae {
|
|
|
24652
24681
|
c = a(this, W).createProducer(
|
|
24653
24682
|
d,
|
|
24654
24683
|
l
|
|
24655
|
-
), 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));
|
|
24656
24685
|
}
|
|
24657
24686
|
yield Promise.all([o, c || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
|
|
24658
24687
|
});
|
|
@@ -24955,13 +24984,13 @@ class ae {
|
|
|
24955
24984
|
kind: d
|
|
24956
24985
|
}), Array.from(
|
|
24957
24986
|
this.getConsumers().values()
|
|
24958
|
-
).filter((
|
|
24959
|
-
|
|
24960
|
-
`consumer state mismatched for ${
|
|
24961
|
-
), n ? (
|
|
24962
|
-
id:
|
|
24963
|
-
})) : (
|
|
24964
|
-
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
|
|
24965
24994
|
})));
|
|
24966
24995
|
});
|
|
24967
24996
|
} catch (e) {
|
|
@@ -25344,10 +25373,10 @@ const vS = (Ag = class {
|
|
|
25344
25373
|
constructor(s, t, e, r) {
|
|
25345
25374
|
// eslint-disable-next-line class-methods-use-this
|
|
25346
25375
|
m(this, St);
|
|
25347
|
-
|
|
25348
|
-
|
|
25376
|
+
p(this, "self");
|
|
25377
|
+
p(this, "authToken");
|
|
25349
25378
|
m(this, Ji, void 0);
|
|
25350
|
-
|
|
25379
|
+
p(this, "viewType");
|
|
25351
25380
|
m(this, Ss, void 0);
|
|
25352
25381
|
m(this, Z, void 0);
|
|
25353
25382
|
const { socket: i } = e, n = s.getValue("authToken");
|
|
@@ -25386,7 +25415,7 @@ const vS = (Ag = class {
|
|
|
25386
25415
|
s.setValue("self", d);
|
|
25387
25416
|
const l = s.getValue("logger");
|
|
25388
25417
|
if (navigator.product !== "ReactNative") {
|
|
25389
|
-
const
|
|
25418
|
+
const h = !s.getValue("flagsmith").hasFeature(te.PRECALL_BANDWIDTH_TEST);
|
|
25390
25419
|
setTimeout(() => u(this, null, function* () {
|
|
25391
25420
|
const g = yield d.getAllDevices();
|
|
25392
25421
|
l.info("populated_full_device_list", {
|
|
@@ -25402,7 +25431,7 @@ const vS = (Ag = class {
|
|
|
25402
25431
|
flags: s.getValue("flagsmith").getAllFlags(),
|
|
25403
25432
|
logger: l,
|
|
25404
25433
|
apiHostnames: GC(s),
|
|
25405
|
-
skipConnectivityChecks:
|
|
25434
|
+
skipConnectivityChecks: h,
|
|
25406
25435
|
authToken: s.getValue("authToken")
|
|
25407
25436
|
}), l.info("Callstats:: initialized");
|
|
25408
25437
|
} catch (f) {
|
|
@@ -25595,7 +25624,7 @@ const vS = (Ag = class {
|
|
|
25595
25624
|
peerId: t
|
|
25596
25625
|
});
|
|
25597
25626
|
}
|
|
25598
|
-
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(
|
|
25599
25628
|
this.self.name,
|
|
25600
25629
|
r,
|
|
25601
25630
|
s,
|
|
@@ -25603,7 +25632,7 @@ const vS = (Ag = class {
|
|
|
25603
25632
|
{
|
|
25604
25633
|
canProduceAudio: d,
|
|
25605
25634
|
canProduceVideo: l,
|
|
25606
|
-
canProduceScreenshare:
|
|
25635
|
+
canProduceScreenshare: h
|
|
25607
25636
|
}
|
|
25608
25637
|
)) != null ? o : {};
|
|
25609
25638
|
if (!g)
|
|
@@ -25802,7 +25831,7 @@ var FD = Object.defineProperty, BD = Object.getOwnPropertyDescriptor, HD = (s, t
|
|
|
25802
25831
|
}, xt;
|
|
25803
25832
|
class TS {
|
|
25804
25833
|
constructor(t, e) {
|
|
25805
|
-
|
|
25834
|
+
p(this, "socket");
|
|
25806
25835
|
m(this, xt, void 0);
|
|
25807
25836
|
S(this, xt, t), this.socket = e, this.handleSocketEvents(), a(this, xt).setValue("roomSocketHandler", this);
|
|
25808
25837
|
}
|
|
@@ -26858,8 +26887,8 @@ class oO {
|
|
|
26858
26887
|
constructor(t, e) {
|
|
26859
26888
|
var f, v, E, C, _, I, M, U, L, B;
|
|
26860
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);
|
|
26861
|
-
var r, i, n, o, c, d, l,
|
|
26862
|
-
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, {
|
|
26863
26892
|
code: void 0,
|
|
26864
26893
|
reason: void 0
|
|
26865
26894
|
}), ne(this, Le, (B = D(this, Ee).logger) != null ? B : new iO(D(this, Ee).debug ? "debug" : "info")), ne(this, Fs, new rO());
|
|
@@ -27129,9 +27158,9 @@ const OS = (Mg = class {
|
|
|
27129
27158
|
m(this, wc);
|
|
27130
27159
|
m(this, Gr, void 0);
|
|
27131
27160
|
m(this, Ce, void 0);
|
|
27132
|
-
|
|
27133
|
-
|
|
27134
|
-
|
|
27161
|
+
p(this, "roomName");
|
|
27162
|
+
p(this, "authToken");
|
|
27163
|
+
p(this, "capabilities");
|
|
27135
27164
|
m(this, ts, void 0);
|
|
27136
27165
|
m(this, ze, void 0);
|
|
27137
27166
|
var n;
|
|
@@ -27237,8 +27266,8 @@ const OS = (Mg = class {
|
|
|
27237
27266
|
ys.errorResponse,
|
|
27238
27267
|
C
|
|
27239
27268
|
);
|
|
27240
|
-
}, l = r != null ? r : x(this, wc, th).call(this),
|
|
27241
|
-
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);
|
|
27242
27271
|
const f = ({
|
|
27243
27272
|
id: E,
|
|
27244
27273
|
payload: C
|
|
@@ -27271,7 +27300,7 @@ const OS = (Mg = class {
|
|
|
27271
27300
|
s,
|
|
27272
27301
|
l,
|
|
27273
27302
|
e,
|
|
27274
|
-
new TextEncoder().encode(JSON.stringify(
|
|
27303
|
+
new TextEncoder().encode(JSON.stringify(h))
|
|
27275
27304
|
);
|
|
27276
27305
|
}
|
|
27277
27306
|
);
|
|
@@ -27370,7 +27399,7 @@ Bl([
|
|
|
27370
27399
|
], Uc.prototype, "sendMessagePromiseWithTimeout", 1);
|
|
27371
27400
|
class uO {
|
|
27372
27401
|
constructor(t) {
|
|
27373
|
-
|
|
27402
|
+
p(this, "socketService");
|
|
27374
27403
|
this.socketService = t;
|
|
27375
27404
|
}
|
|
27376
27405
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -27483,8 +27512,8 @@ class NS extends Bt {
|
|
|
27483
27512
|
constructor(e) {
|
|
27484
27513
|
const r = e.getValue("logger");
|
|
27485
27514
|
super(r);
|
|
27486
|
-
|
|
27487
|
-
|
|
27515
|
+
p(this, "meetings", []);
|
|
27516
|
+
p(this, "parentMeeting", null);
|
|
27488
27517
|
m(this, vs, void 0);
|
|
27489
27518
|
S(this, vs, e);
|
|
27490
27519
|
}
|
|
@@ -27634,7 +27663,7 @@ var mO = Object.defineProperty, fO = Object.getOwnPropertyDescriptor, Lh = (s, t
|
|
|
27634
27663
|
}, pe, Dg;
|
|
27635
27664
|
const VS = (Dg = class {
|
|
27636
27665
|
constructor(s) {
|
|
27637
|
-
|
|
27666
|
+
p(this, "connectedMeetings");
|
|
27638
27667
|
m(this, pe, void 0);
|
|
27639
27668
|
S(this, pe, s), this.connectedMeetings = new NS(s);
|
|
27640
27669
|
}
|
|
@@ -27789,29 +27818,29 @@ var SO = Object.defineProperty, vO = Object.getOwnPropertyDescriptor, ql = (s, t
|
|
|
27789
27818
|
};
|
|
27790
27819
|
const vn = class {
|
|
27791
27820
|
constructor(s, t, e) {
|
|
27792
|
-
|
|
27793
|
-
|
|
27794
|
-
|
|
27795
|
-
|
|
27796
|
-
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
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");
|
|
27805
27834
|
/**
|
|
27806
27835
|
* @access private
|
|
27807
27836
|
* Not for external use
|
|
27808
27837
|
*/
|
|
27809
|
-
|
|
27838
|
+
p(this, "telemetry");
|
|
27810
27839
|
/**
|
|
27811
27840
|
* @access private
|
|
27812
27841
|
* Not for external use
|
|
27813
27842
|
*/
|
|
27814
|
-
|
|
27843
|
+
p(this, "logger");
|
|
27815
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");
|
|
27816
27845
|
}
|
|
27817
27846
|
static init(s) {
|
|
@@ -27839,10 +27868,10 @@ const vn = class {
|
|
|
27839
27868
|
d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(n), d.setHeader("tracing-id", t), s.setValue("apiClient", d);
|
|
27840
27869
|
const l = new i0(s);
|
|
27841
27870
|
s.setValue("connectionHandler", l);
|
|
27842
|
-
let
|
|
27871
|
+
let h = "", g = "", f = null;
|
|
27843
27872
|
c.info("CF SFU is being used.");
|
|
27844
27873
|
try {
|
|
27845
|
-
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`);
|
|
27846
27875
|
} catch (se) {
|
|
27847
27876
|
throw c.error("Failed to get user details", { error: se }), new k("SDK initialization failed: /participant-details API request failed", "0001");
|
|
27848
27877
|
}
|
|
@@ -27871,7 +27900,7 @@ const vn = class {
|
|
|
27871
27900
|
s,
|
|
27872
27901
|
f,
|
|
27873
27902
|
C,
|
|
27874
|
-
|
|
27903
|
+
h,
|
|
27875
27904
|
_,
|
|
27876
27905
|
I
|
|
27877
27906
|
);
|
|
@@ -27912,7 +27941,7 @@ const vn = class {
|
|
|
27912
27941
|
isReactNative: navigator.isReactNative
|
|
27913
27942
|
});
|
|
27914
27943
|
try {
|
|
27915
|
-
const
|
|
27944
|
+
const h = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? Xi({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
|
|
27916
27945
|
yield s.getValue("flagsmith").identify(
|
|
27917
27946
|
`${mu.PEER}_${t}`,
|
|
27918
27947
|
JSON.parse(JSON.stringify(d)),
|
|
@@ -27920,14 +27949,14 @@ const vn = class {
|
|
|
27920
27949
|
// force evaluate
|
|
27921
27950
|
5e3,
|
|
27922
27951
|
// timeout
|
|
27923
|
-
|
|
27952
|
+
h,
|
|
27924
27953
|
o
|
|
27925
27954
|
), o.info(
|
|
27926
27955
|
"flagsmith::allFlags",
|
|
27927
27956
|
{ flags: JSON.stringify(s.getValue("flagsmith").getAllFlags()) },
|
|
27928
27957
|
!0
|
|
27929
27958
|
);
|
|
27930
|
-
} catch (
|
|
27959
|
+
} catch (h) {
|
|
27931
27960
|
o.error("Failed to fetch flagsmith flags");
|
|
27932
27961
|
}
|
|
27933
27962
|
});
|
|
@@ -27935,7 +27964,7 @@ const vn = class {
|
|
|
27935
27964
|
static setupControllers(s, t, e, r, i, n, o) {
|
|
27936
27965
|
return u(this, null, function* () {
|
|
27937
27966
|
var V, b, xe;
|
|
27938
|
-
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;
|
|
27939
27968
|
t.setValue("viewType", g), t.setValue("defaults", O({
|
|
27940
27969
|
mediaConfiguration: {
|
|
27941
27970
|
audio: {
|
|
@@ -27968,7 +27997,7 @@ const vn = class {
|
|
|
27968
27997
|
t,
|
|
27969
27998
|
R.self,
|
|
27970
27999
|
as
|
|
27971
|
-
)), (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(
|
|
27972
28001
|
t,
|
|
27973
28002
|
ns,
|
|
27974
28003
|
R.self,
|
|
@@ -28075,9 +28104,9 @@ ql([
|
|
|
28075
28104
|
], $c, "createSocketService", 1);
|
|
28076
28105
|
class TO {
|
|
28077
28106
|
constructor() {
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28107
|
+
p(this, "battery");
|
|
28108
|
+
p(this, "logger");
|
|
28109
|
+
p(this, "init", (t) => u(this, null, function* () {
|
|
28081
28110
|
this.logger = t;
|
|
28082
28111
|
try {
|
|
28083
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());
|
|
@@ -28085,20 +28114,20 @@ class TO {
|
|
|
28085
28114
|
t.error("Error getting battery", e);
|
|
28086
28115
|
}
|
|
28087
28116
|
}));
|
|
28088
|
-
|
|
28117
|
+
p(this, "updateChargeInfo", () => {
|
|
28089
28118
|
var t;
|
|
28090
28119
|
this.logger.log(
|
|
28091
28120
|
`Battery charging? ${(t = this.battery) != null && t.charging ? "Yes" : "No"}`
|
|
28092
28121
|
);
|
|
28093
28122
|
});
|
|
28094
|
-
|
|
28123
|
+
p(this, "updateLevelInfo", () => {
|
|
28095
28124
|
if (!this.battery) {
|
|
28096
28125
|
this.logger.log("Battery level: Not known");
|
|
28097
28126
|
return;
|
|
28098
28127
|
}
|
|
28099
28128
|
this.logger.log(`Battery level: ${this.battery.level * 100}%`);
|
|
28100
28129
|
});
|
|
28101
|
-
|
|
28130
|
+
p(this, "cleanup", () => {
|
|
28102
28131
|
var t, e;
|
|
28103
28132
|
"getBattery" in navigator && ((t = this.battery) == null || t.removeEventListener(
|
|
28104
28133
|
"chargingchange",
|
|
@@ -28246,7 +28275,7 @@ let Qr = (Og = class {
|
|
|
28246
28275
|
${(U = t.authToken) == null ? void 0 : U.slice(-10)}`
|
|
28247
28276
|
})
|
|
28248
28277
|
});
|
|
28249
|
-
const
|
|
28278
|
+
const h = yield $c.init(c), g = new Qr(c, h);
|
|
28250
28279
|
return c.setValue("meeting", g), g;
|
|
28251
28280
|
});
|
|
28252
28281
|
}
|
|
@@ -28263,7 +28292,7 @@ let Qr = (Og = class {
|
|
|
28263
28292
|
video: !0
|
|
28264
28293
|
};
|
|
28265
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 || (() => {
|
|
28266
|
-
})), 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;
|
|
28267
28296
|
}
|
|
28268
28297
|
join() {
|
|
28269
28298
|
return u(this, null, function* () {
|