@cloudflare/realtimekit 1.2.4-staging.4 → 1.2.4-staging.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +2 -2
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +258 -260
- package/dist/index.es5.js +253 -259
- package/dist/index.rn.js +8 -8
- package/package.json +1 -1
package/dist/index.es5.js
CHANGED
|
@@ -5604,7 +5604,7 @@ var AP = /* @__PURE__ */ function() {
|
|
|
5604
5604
|
Object.keys(Ll).forEach(function(o) {
|
|
5605
5605
|
Ll[o] = "{".concat(IP[o.slice(0, 2)], "} ").concat(Ll[o]);
|
|
5606
5606
|
});
|
|
5607
|
-
var
|
|
5607
|
+
var F = /* @__PURE__ */ function(o) {
|
|
5608
5608
|
function t(e, r) {
|
|
5609
5609
|
var n, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
5610
5610
|
P(this, t), n = R(this, t, [e]), n.code = void 0, n.code = r, n.name = "ClientError", n.message = "[ERR".concat(n.code, "]: ").concat(Ll[n.code], `
|
|
@@ -5628,10 +5628,10 @@ var j = /* @__PURE__ */ function(o) {
|
|
|
5628
5628
|
return A(t, o), S(t);
|
|
5629
5629
|
}(/* @__PURE__ */ Ws(Error));
|
|
5630
5630
|
function Pl(o, t, e, r) {
|
|
5631
|
-
if (r instanceof
|
|
5631
|
+
if (r instanceof F)
|
|
5632
5632
|
throw r;
|
|
5633
5633
|
if (r instanceof t) {
|
|
5634
|
-
var n = new
|
|
5634
|
+
var n = new F(r.message, e);
|
|
5635
5635
|
throw n.stack = r.stack, n;
|
|
5636
5636
|
} else
|
|
5637
5637
|
throw r;
|
|
@@ -5726,9 +5726,9 @@ function OP() {
|
|
|
5726
5726
|
}, o);
|
|
5727
5727
|
})));
|
|
5728
5728
|
}
|
|
5729
|
-
var
|
|
5729
|
+
var j = /* @__PURE__ */ function(o) {
|
|
5730
5730
|
return o.NEW_PRODUCER = "NEW_PRODUCER", o.ROOM_NODE_CONNECTION_ERROR = "ROOM_NODE_CONNECTION_ERROR", o.SOCKET_SERVICE_ROOM_JOINED = "SOCKET_SERVICE_ROOM_JOINED", o.SOCKET_SERVICE_RECONNECTED = "SOCKET_SERVICE_RECONNECTED", o.SOCKET_SERVICE_DISCONNECTED = "SOCKET_SERVICE_DISCONNECTED", o.SOCKET_SERVICE_FAILED = "SOCKET_SERVICE_FAILED", o.SOCKET_STATE_UPDATE = "SOCKET_STATE_UPDATE", o.ROOM_NODE_RECONNECTED = "ROOM_NODE_RECONNECTED", o.ROOM_NODE_DISCONNECTED = "ROOM_NODE_DISCONNECTED", o.ROOM_NODE_FAILED = "ROOM_NODE_FAILED", o.TRANSPORT_STATE_UPDATE = "TRANSPORT_STATE_UPDATE", o.PRODUCER_SCORE_UPDATE = "PRODUCER_SCORE_UPDATE", o.CONSUMER_SCORE_UPDATE = "CONSUMER_SCORE_UPDATE", o.PRODUCER_STATUS_UPDATE = "PRODUCER_STATUS_UPDATE", o.CONSUMER_STATUS_UPDATE = "CONSUMER_STATUS_UPDATE", o.LOW_CONSUMER_SCORE = "LOW_CONSUMER_SCORE", o.MEDIA_PERMISSION_ERROR = "MEDIA_PERMISSION_ERROR", o.MEDIA_PERMISSION_UPDATE = "MEDIA_PERMISSION_UPDATE", o.MESSAGE = "websocket/message", o.ROOM_MESSAGE = "websocket/room-message", o.PEER_JOINED_INTERNAL = "peer/joined-internal", o.PEER_CLOSED = "websocket/peer-closed", o.CONSUMER_CLOSED = "websocket/consumer-closed", o.CONSUMER_PAUSED = "websocket/consumer-paused", o.CONSUMER_RESUMED = "websocket/consumer-resumed", o.PRODUCER_CLOSED = "websocket/producer-closed", o.NEW_CONSUMER = "websocket/new-consumer", o.PRODUCER_SCORE = "websocket/producer-score", o.CONSUMER_SCORE = "websocket/consumer-score", o.PRODUCER_TOGGLE = "cf/producer-toggle", o.UPDATE_ACTIVE = "media/update-active", o.RESET_PRODUCER_STATE = "cf/reset-producer-state", o.ROOM_STATE = "sockethub/room-state", o.GET_STAGE_REQUESTS = "GET_STAGE_REQUESTS", o.UPDATE_STAGE_REQUESTS = "UPDATE_STAGE_REQUESTS", o.KICK_PEER = "KICK_PEER", o.UPDATE_PEER_STAGE_STATUS = "UPDATE_PEER_STAGE_STATUS", o.JOIN_MEDIA_ROOM = "JOIN_MEDIA_ROOM", o.LEAVE_MEDIA_ROOM = "LEAVE_MEDIA_ROOM", o.PIP_HANGUP = "PIP_HANGUP", o.E2EE_ACTIVE_PRODUCER = "E2EE_ACTIVE_PRODUCER", o.E2EE_INACTIVE_PRODUCER = "E2EE_INACTIVE_PRODUCER", o.E2EE_ACTIVE_CONSUMER = "E2EE_ACTIVE_CONSUMER", o.E2EE_INACTIVE_CONSUMER = "E2EE_INACTIVE_CONSUMER", o.SOCKET_PEERS = "SOCKET_PEERS", o.UPDATE_PERMISSIONS = "UPDATE_PERMISSIONS", o.MAX_SPATIAL_LAYER_CHANGE = "MAX_SPATIAL_LAYER_CHANGE", o.MUTE_SELF = "MUTE_SELF", o.MUTE_SELF_VIDEO = "MUTE_SELF_VIDEO", o;
|
|
5731
|
-
}(
|
|
5731
|
+
}(j || {}), Fo = /* @__PURE__ */ function(o) {
|
|
5732
5732
|
function t(e) {
|
|
5733
5733
|
var r;
|
|
5734
5734
|
return P(this, t), r = R(this, t), r.logger = void 0, r.logger = e, Ce(t, "setMaxListeners", r, 3)([25]), r;
|
|
@@ -5850,7 +5850,7 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
|
|
|
5850
5850
|
}, i.handlePipMediaControls = function(u) {
|
|
5851
5851
|
u === "ON_STAGE" ? i.enablePipMediaControls() : i.unmountEvents();
|
|
5852
5852
|
}, i.eventCallback = function(u) {
|
|
5853
|
-
u === "CAMERA" && (l(i, De)[De].videoEnabled ? l(i, De)[De].disableVideo() : l(i, De)[De].enableVideo(), i.emit("cameraToggled")), u === "MIC" && (l(i, De)[De].audioEnabled ? l(i, De)[De].disableAudio() : l(i, De)[De].enableAudio(), i.emit("micToggled")), u === "END" && (l(i, pa)[pa].getValue("peerSessionStore").emit(
|
|
5853
|
+
u === "CAMERA" && (l(i, De)[De].videoEnabled ? l(i, De)[De].disableVideo() : l(i, De)[De].enableVideo(), i.emit("cameraToggled")), u === "MIC" && (l(i, De)[De].audioEnabled ? l(i, De)[De].disableAudio() : l(i, De)[De].enableAudio(), i.emit("micToggled")), u === "END" && (l(i, pa)[pa].getValue("peerSessionStore").emit(j.PIP_HANGUP), i.cleanupEventListeners(), i.emit("hangup"), i.cleanup());
|
|
5854
5854
|
}, i.unmountEvents = function() {
|
|
5855
5855
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
5856
5856
|
}, i.animate = function() {
|
|
@@ -11181,9 +11181,9 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11181
11181
|
L.next = 14;
|
|
11182
11182
|
break;
|
|
11183
11183
|
}
|
|
11184
|
-
throw new
|
|
11184
|
+
throw new F("Unknown network error occurred", "0011");
|
|
11185
11185
|
case 14:
|
|
11186
|
-
throw ((O = L.t0.config) === null || O === void 0 ? void 0 : O.url) !== T.logsEndpoint && r.logger.error("xhr::fetch", { error: L.t0, networkCall: { status: L.t0.status, statusText: L.t0.statusText, baseURL: ((I = L.t0.config) === null || I === void 0 ? void 0 : I.baseURL) || r.requests.defaults.baseURL, url: (_ = L.t0.config) === null || _ === void 0 ? void 0 : _.url, retries: (V = L.t0.config) === null || V === void 0 ? void 0 : V.retry, method: (U = L.t0.config) === null || U === void 0 ? void 0 : U.method, isOnline: navigator.onLine ? "online" : "offline" } }), new
|
|
11186
|
+
throw ((O = L.t0.config) === null || O === void 0 ? void 0 : O.url) !== T.logsEndpoint && r.logger.error("xhr::fetch", { error: L.t0, networkCall: { status: L.t0.status, statusText: L.t0.statusText, baseURL: ((I = L.t0.config) === null || I === void 0 ? void 0 : I.baseURL) || r.requests.defaults.baseURL, url: (_ = L.t0.config) === null || _ === void 0 ? void 0 : _.url, retries: (V = L.t0.config) === null || V === void 0 ? void 0 : V.retry, method: (U = L.t0.config) === null || U === void 0 ? void 0 : U.method, isOnline: navigator.onLine ? "online" : "offline" } }), new F(L.t0.message || "Network request failed", "0011");
|
|
11187
11187
|
case 16:
|
|
11188
11188
|
case "end":
|
|
11189
11189
|
return L.stop();
|
|
@@ -11583,7 +11583,7 @@ var pv = /* @__PURE__ */ function() {
|
|
|
11583
11583
|
case 6:
|
|
11584
11584
|
return i = u.sent, u.abrupt("return", { transcript: i.data });
|
|
11585
11585
|
case 10:
|
|
11586
|
-
throw u.prev = 10, u.t0 = u.catch(3), new
|
|
11586
|
+
throw u.prev = 10, u.t0 = u.catch(3), new F("Cant fetch transcript s3 url", "1801");
|
|
11587
11587
|
case 13:
|
|
11588
11588
|
case "end":
|
|
11589
11589
|
return u.stop();
|
|
@@ -11656,7 +11656,7 @@ function $t(o, t) {
|
|
|
11656
11656
|
return n.value = function() {
|
|
11657
11657
|
var u = Date.now(), c = t ? this[t] : o;
|
|
11658
11658
|
if (u - s > c.period * 1e3 && (s = u, i = 0), i >= c.maxInvocations)
|
|
11659
|
-
throw new
|
|
11659
|
+
throw new F("Method rate limit ".concat(c.maxInvocations, " invocations/").concat(c.period, "sec exceeded"), "0013");
|
|
11660
11660
|
i += 1;
|
|
11661
11661
|
for (var d = arguments.length, p = new Array(d), v = 0; v < d; v++)
|
|
11662
11662
|
p[v] = arguments[v];
|
|
@@ -11736,7 +11736,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11736
11736
|
g.next = 2;
|
|
11737
11737
|
break;
|
|
11738
11738
|
}
|
|
11739
|
-
throw new
|
|
11739
|
+
throw new F("Max character limit breached", "0503");
|
|
11740
11740
|
case 2:
|
|
11741
11741
|
if (!(i && i.length > 0)) {
|
|
11742
11742
|
g.next = 8;
|
|
@@ -11746,7 +11746,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11746
11746
|
g.next = 6;
|
|
11747
11747
|
break;
|
|
11748
11748
|
}
|
|
11749
|
-
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new
|
|
11749
|
+
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new F("Could not send message to private chat.", "0501");
|
|
11750
11750
|
case 6:
|
|
11751
11751
|
g.next = 11;
|
|
11752
11752
|
break;
|
|
@@ -11755,13 +11755,13 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11755
11755
|
g.next = 11;
|
|
11756
11756
|
break;
|
|
11757
11757
|
}
|
|
11758
|
-
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new
|
|
11758
|
+
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new F("Could not send message to public chat.", "0501");
|
|
11759
11759
|
case 11:
|
|
11760
11760
|
if (a) {
|
|
11761
11761
|
g.next = 14;
|
|
11762
11762
|
break;
|
|
11763
11763
|
}
|
|
11764
|
-
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new
|
|
11764
|
+
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new F("Message can not be empty.", "0502");
|
|
11765
11765
|
case 14:
|
|
11766
11766
|
if (!s) {
|
|
11767
11767
|
g.next = 17;
|
|
@@ -11839,7 +11839,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11839
11839
|
}), b.push(l(this, z)[z].userId)), l(this, Ae)[Ae].sendMessage(k, St.IMAGE, i), T.next = 36;
|
|
11840
11840
|
break;
|
|
11841
11841
|
case 33:
|
|
11842
|
-
throw T.prev = 33, T.t0 = T.catch(16), new
|
|
11842
|
+
throw T.prev = 33, T.t0 = T.catch(16), new F("Error sending image message.", "0500", this.logger);
|
|
11843
11843
|
case 36:
|
|
11844
11844
|
case "end":
|
|
11845
11845
|
return T.stop();
|
|
@@ -11899,7 +11899,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11899
11899
|
}), y.push(l(this, z)[z].userId)), b = JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), l(this, Ae)[Ae].sendMessage(b, St.FILE, i), T.next = 33;
|
|
11900
11900
|
break;
|
|
11901
11901
|
case 30:
|
|
11902
|
-
throw T.prev = 30, T.t0 = T.catch(12), new
|
|
11902
|
+
throw T.prev = 30, T.t0 = T.catch(12), new F("Error sending file message.", "0500", this.logger);
|
|
11903
11903
|
case 33:
|
|
11904
11904
|
case "end":
|
|
11905
11905
|
return T.stop();
|
|
@@ -11991,7 +11991,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
11991
11991
|
case 11:
|
|
11992
11992
|
return x.abrupt("return", { link: Y, type: $.type, name: $.name, size: $.size });
|
|
11993
11993
|
case 14:
|
|
11994
|
-
throw x.prev = 14, x.t0 = x.catch(0), new
|
|
11994
|
+
throw x.prev = 14, x.t0 = x.catch(0), new F("Error sending image message.", "0500", d.logger);
|
|
11995
11995
|
case 17:
|
|
11996
11996
|
case "end":
|
|
11997
11997
|
return x.stop();
|
|
@@ -12128,7 +12128,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12128
12128
|
v.next = 2;
|
|
12129
12129
|
break;
|
|
12130
12130
|
}
|
|
12131
|
-
throw new
|
|
12131
|
+
throw new F("Not permitted to edit messages", "0501");
|
|
12132
12132
|
case 2:
|
|
12133
12133
|
if (!(!((c = l(this, z)[z].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.canSend) || !((d = l(this, z)[z].permissions) !== null && d !== void 0 && (d = d.chatPublic) !== null && d !== void 0 && d.text))) {
|
|
12134
12134
|
v.next = 5;
|
|
@@ -12185,7 +12185,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12185
12185
|
l(this, Ae)[Ae].editMessage(a, f, St.IMAGE, s), y.next = 25;
|
|
12186
12186
|
break;
|
|
12187
12187
|
case 22:
|
|
12188
|
-
throw y.prev = 22, y.t0 = y.catch(10), new
|
|
12188
|
+
throw y.prev = 22, y.t0 = y.catch(10), new F("Error editing image message.", "0500", this.logger);
|
|
12189
12189
|
case 25:
|
|
12190
12190
|
case "end":
|
|
12191
12191
|
return y.stop();
|
|
@@ -12222,7 +12222,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12222
12222
|
l(this, Ae)[Ae].editMessage(a, JSON.stringify({ link: v, name: i.name, size: "size" in i ? i.size : 0 }), St.FILE, s), k.next = 21;
|
|
12223
12223
|
break;
|
|
12224
12224
|
case 18:
|
|
12225
|
-
throw k.prev = 18, k.t0 = k.catch(6), new
|
|
12225
|
+
throw k.prev = 18, k.t0 = k.catch(6), new F("Error editing file message.", "0500", this.logger);
|
|
12226
12226
|
case 21:
|
|
12227
12227
|
case "end":
|
|
12228
12228
|
return k.stop();
|
|
@@ -12272,7 +12272,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12272
12272
|
c.next = 2;
|
|
12273
12273
|
break;
|
|
12274
12274
|
}
|
|
12275
|
-
throw new
|
|
12275
|
+
throw new F("Not permitted to delete messages", "0501");
|
|
12276
12276
|
case 2:
|
|
12277
12277
|
l(this, Ae)[Ae].deleteMessage(a, i);
|
|
12278
12278
|
case 3:
|
|
@@ -12331,24 +12331,18 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12331
12331
|
u.next = 2;
|
|
12332
12332
|
break;
|
|
12333
12333
|
}
|
|
12334
|
-
throw new
|
|
12334
|
+
throw new F("Can`t pin message without joining room", "0505");
|
|
12335
12335
|
case 2:
|
|
12336
|
-
if (l(this, z)[z].permissions.pinParticipant) {
|
|
12337
|
-
u.next = 4;
|
|
12338
|
-
break;
|
|
12339
|
-
}
|
|
12340
|
-
throw new j("You do not have permission to pin messages.", "0501");
|
|
12341
|
-
case 4:
|
|
12342
12336
|
if (i = this.messages.find(function(c) {
|
|
12343
12337
|
return c.id === a;
|
|
12344
12338
|
}), !i) {
|
|
12345
|
-
u.next =
|
|
12339
|
+
u.next = 6;
|
|
12346
12340
|
break;
|
|
12347
12341
|
}
|
|
12348
12342
|
return l(this, Ae)[Ae].setPinState(i, !0), u.abrupt("return");
|
|
12349
|
-
case
|
|
12350
|
-
throw new
|
|
12351
|
-
case
|
|
12343
|
+
case 6:
|
|
12344
|
+
throw new F("No message found with id: ".concat(a), "0504");
|
|
12345
|
+
case 7:
|
|
12352
12346
|
case "end":
|
|
12353
12347
|
return u.stop();
|
|
12354
12348
|
}
|
|
@@ -12369,13 +12363,13 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12369
12363
|
u.next = 2;
|
|
12370
12364
|
break;
|
|
12371
12365
|
}
|
|
12372
|
-
throw new
|
|
12366
|
+
throw new F("Can`t unpin message without joining room", "0505");
|
|
12373
12367
|
case 2:
|
|
12374
12368
|
if (l(this, z)[z].permissions.pinParticipant) {
|
|
12375
12369
|
u.next = 4;
|
|
12376
12370
|
break;
|
|
12377
12371
|
}
|
|
12378
|
-
throw new
|
|
12372
|
+
throw new F("You do not have permission to unpin messages.", "0501");
|
|
12379
12373
|
case 4:
|
|
12380
12374
|
if (i = this.messages.find(function(c) {
|
|
12381
12375
|
return c.id === a;
|
|
@@ -12385,7 +12379,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12385
12379
|
}
|
|
12386
12380
|
return l(this, Ae)[Ae].setPinState(i, !1), u.abrupt("return");
|
|
12387
12381
|
case 8:
|
|
12388
|
-
throw new
|
|
12382
|
+
throw new F("No message found with id: ".concat(a), "0504");
|
|
12389
12383
|
case 9:
|
|
12390
12384
|
case "end":
|
|
12391
12385
|
return u.stop();
|
|
@@ -12481,25 +12475,25 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12481
12475
|
g.next = 5;
|
|
12482
12476
|
break;
|
|
12483
12477
|
}
|
|
12484
|
-
throw new
|
|
12478
|
+
throw new F("Not permitted to create channels", "0501");
|
|
12485
12479
|
case 5:
|
|
12486
12480
|
if (!(u.visibility === "public" && !(c.canCreate === "PUBLIC" || c.canCreate === "ALL"))) {
|
|
12487
12481
|
g.next = 7;
|
|
12488
12482
|
break;
|
|
12489
12483
|
}
|
|
12490
|
-
throw new
|
|
12484
|
+
throw new F("Not permitted to create public channels", "0501");
|
|
12491
12485
|
case 7:
|
|
12492
12486
|
if (!(u.visibility === "private" && !(c.canCreate === "PRIVATE" || c.canCreate === "ALL"))) {
|
|
12493
12487
|
g.next = 9;
|
|
12494
12488
|
break;
|
|
12495
12489
|
}
|
|
12496
|
-
throw new
|
|
12490
|
+
throw new F("Not permitted to create private channels", "0501");
|
|
12497
12491
|
case 9:
|
|
12498
12492
|
if (!(!a || a.trim().length === 0)) {
|
|
12499
12493
|
g.next = 11;
|
|
12500
12494
|
break;
|
|
12501
12495
|
}
|
|
12502
|
-
throw new
|
|
12496
|
+
throw new F("channel name cannot be empty.", "0510");
|
|
12503
12497
|
case 11:
|
|
12504
12498
|
return d = Pe(/* @__PURE__ */ new Set([].concat(Pe(i), [l(this, z)[z].userId]))), g.next = 14, l(this, Jn)[Jn].createChannel(a.trim(), d, u.displayPictureUrl, u.visibility, u.isDirectMessage);
|
|
12505
12499
|
case 14:
|
|
@@ -12520,11 +12514,11 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12520
12514
|
}), p = (a = l(this, z)[z].permissions) === null || a === void 0 ? void 0 : a.chatChannel;
|
|
12521
12515
|
if (p) {
|
|
12522
12516
|
if (p.canUpdate === "NONE")
|
|
12523
|
-
throw new
|
|
12517
|
+
throw new F("Not permitted to update channels", "0501");
|
|
12524
12518
|
if (d.visibility === "public" && !(p.canUpdate === "PUBLIC" || p.canUpdate === "ALL"))
|
|
12525
|
-
throw new
|
|
12519
|
+
throw new F("Not permitted to update public channels", "0501");
|
|
12526
12520
|
if (d.visibility === "private" && !(p.canUpdate === "PRIVATE" || p.canUpdate === "ALL"))
|
|
12527
|
-
throw new
|
|
12521
|
+
throw new F("Not permitted to update private channels", "0501");
|
|
12528
12522
|
}
|
|
12529
12523
|
var v = { memberIds: (i = n.memberIds) !== null && i !== void 0 ? i : d.memberIds, displayName: (s = n.displayName) !== null && s !== void 0 ? s : d.displayName, displayPictureUrl: (u = n.displayPictureUrl) !== null && u !== void 0 ? u : d.displayPictureUrl, visibility: (c = n.visibility) !== null && c !== void 0 ? c : d.visibility };
|
|
12530
12524
|
return l(this, Jn)[Jn].updateChannel(r, v);
|
|
@@ -12573,7 +12567,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
|
|
|
12573
12567
|
for (; ; )
|
|
12574
12568
|
switch (u.prev = u.next) {
|
|
12575
12569
|
case 0:
|
|
12576
|
-
throw new
|
|
12570
|
+
throw new F("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
|
|
12577
12571
|
case 1:
|
|
12578
12572
|
case "end":
|
|
12579
12573
|
return u.stop();
|
|
@@ -12703,7 +12697,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
|
|
|
12703
12697
|
return e;
|
|
12704
12698
|
}() }, { key: "setupEvents", value: function() {
|
|
12705
12699
|
var e = this;
|
|
12706
|
-
l(this, Kn)[Kn].getValue("peerSessionStore").on(
|
|
12700
|
+
l(this, Kn)[Kn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
12707
12701
|
return h().wrap(function(a) {
|
|
12708
12702
|
for (; ; )
|
|
12709
12703
|
switch (a.prev = a.next) {
|
|
@@ -12842,7 +12836,7 @@ var bI = Object.defineProperty, TI = Object.getOwnPropertyDescriptor, wI = funct
|
|
|
12842
12836
|
p.next = 4;
|
|
12843
12837
|
break;
|
|
12844
12838
|
}
|
|
12845
|
-
throw new
|
|
12839
|
+
throw new F("Can't create polls without joining room", "0705");
|
|
12846
12840
|
case 4:
|
|
12847
12841
|
if (l(this, Za)[Za].permissions.polls.canCreate) {
|
|
12848
12842
|
p.next = 7;
|
|
@@ -12941,13 +12935,13 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
|
|
|
12941
12935
|
}, [$a.votePoll]: function(i) {
|
|
12942
12936
|
i.poll && e.updatePoll(To.formatSocketServicePoll(i.poll));
|
|
12943
12937
|
} }, n = function() {
|
|
12944
|
-
l(e, dn)[dn].getValue("peerSessionStore").on(
|
|
12938
|
+
l(e, dn)[dn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
|
|
12945
12939
|
e.getPolls();
|
|
12946
12940
|
}), Object.keys(r).map(Number).forEach(function(s) {
|
|
12947
12941
|
l(e, zn)[zn].on(s, r[s]);
|
|
12948
12942
|
});
|
|
12949
12943
|
}, a = function() {
|
|
12950
|
-
l(e, dn)[dn].getValue("peerSessionStore").on(
|
|
12944
|
+
l(e, dn)[dn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
|
|
12951
12945
|
e.getPolls();
|
|
12952
12946
|
}), Object.keys(r).map(Number).forEach(function(s) {
|
|
12953
12947
|
l(e, zn)[zn].removeListeners(s);
|
|
@@ -13083,7 +13077,7 @@ var AI = Object.defineProperty, II = Object.getOwnPropertyDescriptor, MI = funct
|
|
|
13083
13077
|
key: "setBroadcastTabChanges",
|
|
13084
13078
|
value: function(r) {
|
|
13085
13079
|
if (!l(this, Yn)[Yn].permissions.canSpotlight)
|
|
13086
|
-
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new
|
|
13080
|
+
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new F("User does not have permission to toggle spotlight", "0801");
|
|
13087
13081
|
this.broadcastTabChanges = r, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
|
|
13088
13082
|
}
|
|
13089
13083
|
/**
|
|
@@ -13274,20 +13268,20 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
|
|
|
13274
13268
|
e != null && e.currentTab && ((r = this.meta.selfActiveTab) === null || r === void 0 ? void 0 : r.id) !== e.currentTab.id && (this.meta.setSelfActiveTab(e.currentTab, hg.Meeting), this.meta.emit("activeTabUpdate", e.currentTab));
|
|
13275
13269
|
} }, { key: "setupEvents", value: function() {
|
|
13276
13270
|
var e = this;
|
|
13277
|
-
l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13271
|
+
l(this, Or)[Or].getValue("peerSessionStore").on(j.TRANSPORT_STATE_UPDATE, function(r) {
|
|
13278
13272
|
e.meta.emit("mediaConnectionUpdate", r);
|
|
13279
|
-
}), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13273
|
+
}), l(this, Or)[Or].getValue("peerSessionStore").on(j.SOCKET_STATE_UPDATE, function(r) {
|
|
13280
13274
|
e.meta.emit("socketConnectionUpdate", r);
|
|
13281
|
-
}), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13275
|
+
}), l(this, Or)[Or].getValue("peerSessionStore").on(j.ROOM_STATE, function(r) {
|
|
13282
13276
|
var n = r.createdAt, a = r.roomUuid, i = e.meta.meetingStartedTimestamp;
|
|
13283
13277
|
if (a && (e.meta.sessionId = a), n && !i) {
|
|
13284
13278
|
var s = new Date(n * 1e3);
|
|
13285
13279
|
e.meta.meetingStartedTimestamp = s, e.meta.emit("meetingStartTimeUpdate", { meetingStartedTimestamp: e.meta.meetingStartedTimestamp });
|
|
13286
13280
|
}
|
|
13287
|
-
}), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13281
|
+
}), l(this, Or)[Or].getValue("peerSessionStore").on(j.PRODUCER_SCORE_UPDATE, function(r) {
|
|
13288
13282
|
var n = r.score;
|
|
13289
13283
|
n < 5 && e.meta.emit("poorConnection", { score: n });
|
|
13290
|
-
}), l(this, pn)[pn].permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && l(this, ri)[ri].broadcastMessage("spotlight", { userId: l(this, pn)[pn].userId, currentTab: this.meta.selfActiveTab })), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13284
|
+
}), l(this, pn)[pn].permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && l(this, ri)[ri].broadcastMessage("spotlight", { userId: l(this, pn)[pn].userId, currentTab: this.meta.selfActiveTab })), l(this, Or)[Or].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
|
|
13291
13285
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
13292
13286
|
return h().wrap(function(s) {
|
|
13293
13287
|
for (; ; )
|
|
@@ -13303,7 +13297,7 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
|
|
|
13303
13297
|
return function(n) {
|
|
13304
13298
|
return r.apply(this, arguments);
|
|
13305
13299
|
};
|
|
13306
|
-
}()), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13300
|
+
}()), l(this, Or)[Or].getValue("peerSessionStore").on(j.ROOM_MESSAGE, function(r) {
|
|
13307
13301
|
var n, a, i;
|
|
13308
13302
|
if ("type" in r) {
|
|
13309
13303
|
if (r.type !== "spotlight")
|
|
@@ -13316,7 +13310,7 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
|
|
|
13316
13310
|
} else
|
|
13317
13311
|
return;
|
|
13318
13312
|
e.logger.info("Spotlight Assertion Received", { spotlight: { spotlighter: { id: i.userId }, currentTab: { id: (n = i.currentTab) === null || n === void 0 ? void 0 : n.id, type: (a = i.currentTab) === null || a === void 0 ? void 0 : a.type } } }), e.conditionallySetActiveTab(i);
|
|
13319
|
-
}), l(this, Or)[Or].getValue("peerSessionStore").on(
|
|
13313
|
+
}), l(this, Or)[Or].getValue("peerSessionStore").on(j.MESSAGE, function(r) {
|
|
13320
13314
|
var n, a, i;
|
|
13321
13315
|
if ("type" in r) {
|
|
13322
13316
|
if (r.type !== "spotlight")
|
|
@@ -13437,7 +13431,7 @@ var Zo = {}, Ka = {
|
|
|
13437
13431
|
/**
|
|
13438
13432
|
* NOTE(ishita1805): Update stageRequests when socket sends them.
|
|
13439
13433
|
*/
|
|
13440
|
-
[
|
|
13434
|
+
[j.GET_STAGE_REQUESTS]: function() {
|
|
13441
13435
|
var s = m(/* @__PURE__ */ h().mark(function u(c) {
|
|
13442
13436
|
return h().wrap(function(p) {
|
|
13443
13437
|
for (; ; )
|
|
@@ -13458,7 +13452,7 @@ var Zo = {}, Ka = {
|
|
|
13458
13452
|
* NOTE(ishita1805): Update stageRequests when a peer
|
|
13459
13453
|
* who has requested leaves/joins the meeting
|
|
13460
13454
|
*/
|
|
13461
|
-
[
|
|
13455
|
+
[j.UPDATE_STAGE_REQUESTS]: function() {
|
|
13462
13456
|
var s = m(/* @__PURE__ */ h().mark(function u(c) {
|
|
13463
13457
|
var d, p, v, f;
|
|
13464
13458
|
return h().wrap(function(k) {
|
|
@@ -13493,9 +13487,9 @@ var Zo = {}, Ka = {
|
|
|
13493
13487
|
}), l(this, oe)[oe].permissions.acceptStageRequests && a();
|
|
13494
13488
|
} }, { key: "getAccessRequests", value: function() {
|
|
13495
13489
|
if (!l(this, oe)[oe].permissions.stageEnabled)
|
|
13496
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13490
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13497
13491
|
if (!l(this, oe)[oe].permissions.acceptStageRequests)
|
|
13498
|
-
throw this.logger.error("Stage::get_access_request::permission_denied"), new
|
|
13492
|
+
throw this.logger.error("Stage::get_access_request::permission_denied"), new F("You do not have permission to perform this action", "2001");
|
|
13499
13493
|
var r = l(this, xo)[xo].joined.toArray().filter(function(n) {
|
|
13500
13494
|
return n.stageStatus === "REQUESTED_TO_JOIN_STAGE";
|
|
13501
13495
|
}).map(function(n) {
|
|
@@ -13512,13 +13506,13 @@ var Zo = {}, Ka = {
|
|
|
13512
13506
|
i.next = 3;
|
|
13513
13507
|
break;
|
|
13514
13508
|
}
|
|
13515
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13509
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13516
13510
|
case 3:
|
|
13517
13511
|
if (this.status === "OFF_STAGE") {
|
|
13518
13512
|
i.next = 5;
|
|
13519
13513
|
break;
|
|
13520
13514
|
}
|
|
13521
|
-
throw new
|
|
13515
|
+
throw new F("Unable to request access you are currently ".concat(this.status), "2006");
|
|
13522
13516
|
case 5:
|
|
13523
13517
|
if (l(this, oe)[oe].permissions.stageAccess !== te.Allowed) {
|
|
13524
13518
|
i.next = 8;
|
|
@@ -13549,7 +13543,7 @@ var Zo = {}, Ka = {
|
|
|
13549
13543
|
i.next = 3;
|
|
13550
13544
|
break;
|
|
13551
13545
|
}
|
|
13552
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13546
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13553
13547
|
case 3:
|
|
13554
13548
|
l(this, Qr)[Qr].cancelRequestAccess(), l(this, cs)[cs]("OFF_STAGE");
|
|
13555
13549
|
case 5:
|
|
@@ -13570,11 +13564,11 @@ var Zo = {}, Ka = {
|
|
|
13570
13564
|
key: "grantAccess",
|
|
13571
13565
|
value: function(r) {
|
|
13572
13566
|
if (!l(this, oe)[oe].roomJoined)
|
|
13573
|
-
throw new
|
|
13567
|
+
throw new F("Can`t grant for participant without joining room");
|
|
13574
13568
|
if (!l(this, oe)[oe].permissions.stageEnabled)
|
|
13575
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13569
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13576
13570
|
if (!l(this, oe)[oe].permissions.acceptStageRequests)
|
|
13577
|
-
throw this.logger.error("Stage::grant_access::permission_denied"), new
|
|
13571
|
+
throw this.logger.error("Stage::grant_access::permission_denied"), new F("You do not have permission to perform this action", "2001");
|
|
13578
13572
|
return l(this, Qr)[Qr].grantAccess(r);
|
|
13579
13573
|
}
|
|
13580
13574
|
/**
|
|
@@ -13584,11 +13578,11 @@ var Zo = {}, Ka = {
|
|
|
13584
13578
|
key: "denyAccess",
|
|
13585
13579
|
value: function(r) {
|
|
13586
13580
|
if (!l(this, oe)[oe].roomJoined)
|
|
13587
|
-
throw new
|
|
13581
|
+
throw new F("Can`t rejectRequestToJoinStage for participant without joining room", "2005");
|
|
13588
13582
|
if (!l(this, oe)[oe].permissions.stageEnabled)
|
|
13589
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13583
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13590
13584
|
if (!l(this, oe)[oe].permissions.acceptStageRequests)
|
|
13591
|
-
throw this.logger.error("Stage::deny_access::permission_denied"), new
|
|
13585
|
+
throw this.logger.error("Stage::deny_access::permission_denied"), new F("You do not have permission to perform this action", "2001");
|
|
13592
13586
|
return l(this, Qr)[Qr].denyAccess(r);
|
|
13593
13587
|
}
|
|
13594
13588
|
/**
|
|
@@ -13607,13 +13601,13 @@ var Zo = {}, Ka = {
|
|
|
13607
13601
|
s.next = 3;
|
|
13608
13602
|
break;
|
|
13609
13603
|
}
|
|
13610
|
-
throw new
|
|
13604
|
+
throw new F("You are already on stage.", "2006");
|
|
13611
13605
|
case 3:
|
|
13612
13606
|
if (!(this.status !== "ACCEPTED_TO_JOIN_STAGE" || l(this, oe)[oe].permissions.stageAccess === te.NotAllowed)) {
|
|
13613
13607
|
s.next = 5;
|
|
13614
13608
|
break;
|
|
13615
13609
|
}
|
|
13616
|
-
throw new
|
|
13610
|
+
throw new F("Unable to join stage you are currently ".concat(this.status), "2006");
|
|
13617
13611
|
case 5:
|
|
13618
13612
|
return l(this, Ge)[Ge].setValue("stageStatus", "ON_STAGE", !1), s.next = 8, l(this, Qr)[Qr].joinStage();
|
|
13619
13613
|
case 8:
|
|
@@ -13648,17 +13642,17 @@ var Zo = {}, Ka = {
|
|
|
13648
13642
|
i.next = 3;
|
|
13649
13643
|
break;
|
|
13650
13644
|
}
|
|
13651
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13645
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13652
13646
|
case 3:
|
|
13653
13647
|
if (this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE") {
|
|
13654
13648
|
i.next = 5;
|
|
13655
13649
|
break;
|
|
13656
13650
|
}
|
|
13657
|
-
throw new
|
|
13651
|
+
throw new F("Unable to leave stage you are currently ".concat(this.status), "2006");
|
|
13658
13652
|
case 5:
|
|
13659
13653
|
return l(this, oe)[oe].setIsPinned(!1), l(this, Ge)[Ge].setValue("stageStatus", "OFF_STAGE", !1), i.next = 9, l(this, Qr)[Qr].leaveStage(l(this, oe)[oe].userId);
|
|
13660
13654
|
case 9:
|
|
13661
|
-
return i.prev = 9, i.next = 12, l(this, Ge)[Ge].getValue("peerSessionStore").emitAsync(
|
|
13655
|
+
return i.prev = 9, i.next = 12, l(this, Ge)[Ge].getValue("peerSessionStore").emitAsync(j.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
13662
13656
|
case 12:
|
|
13663
13657
|
i.next = 17;
|
|
13664
13658
|
break;
|
|
@@ -13693,19 +13687,19 @@ var Zo = {}, Ka = {
|
|
|
13693
13687
|
s.next = 2;
|
|
13694
13688
|
break;
|
|
13695
13689
|
}
|
|
13696
|
-
throw new
|
|
13690
|
+
throw new F("Can`t kick participant without joining room", "2005");
|
|
13697
13691
|
case 2:
|
|
13698
13692
|
if (l(this, oe)[oe].permissions.stageEnabled) {
|
|
13699
13693
|
s.next = 5;
|
|
13700
13694
|
break;
|
|
13701
13695
|
}
|
|
13702
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
13696
|
+
throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
|
|
13703
13697
|
case 5:
|
|
13704
13698
|
if (l(this, oe)[oe].permissions.acceptStageRequests) {
|
|
13705
13699
|
s.next = 8;
|
|
13706
13700
|
break;
|
|
13707
13701
|
}
|
|
13708
|
-
throw this.logger.error("Stage::kick::permission_denied"), new
|
|
13702
|
+
throw this.logger.error("Stage::kick::permission_denied"), new F("You do not have permissions for kick", "2001");
|
|
13709
13703
|
case 8:
|
|
13710
13704
|
return s.abrupt("return", l(this, Qr)[Qr].kick(a));
|
|
13711
13705
|
case 9:
|
|
@@ -13820,7 +13814,7 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
|
|
|
13820
13814
|
}
|
|
13821
13815
|
return c.abrupt("return");
|
|
13822
13816
|
case 2:
|
|
13823
|
-
return s = (i = a == null ? void 0 : a.stageRequests) !== null && i !== void 0 ? i : [], c.next = 5, l(e, gr)[gr].getValue("peerSessionStore").emitAsync(
|
|
13817
|
+
return s = (i = a == null ? void 0 : a.stageRequests) !== null && i !== void 0 ? i : [], c.next = 5, l(e, gr)[gr].getValue("peerSessionStore").emitAsync(j.GET_STAGE_REQUESTS, s);
|
|
13824
13818
|
case 5:
|
|
13825
13819
|
l(e, ru)[ru] < s.length && s.length > 0 && e.stage.emit("newStageRequest", { count: s.length }), l(e, ru)[ru] = s.length, e.stage.emit("stageAccessRequestUpdate", s);
|
|
13826
13820
|
case 8:
|
|
@@ -13910,15 +13904,15 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
|
|
|
13910
13904
|
u.t0 = n.stageType, u.next = u.t0 === 1 ? 8 : u.t0 === 2 ? 11 : u.t0 === 3 ? 13 : (u.t0 === 0 || u.t0 === 4, 15);
|
|
13911
13905
|
break;
|
|
13912
13906
|
case 8:
|
|
13913
|
-
return a.setStageStatus("ON_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(
|
|
13907
|
+
return a.setStageStatus("ON_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
|
|
13914
13908
|
case 11:
|
|
13915
13909
|
return a.setStageStatus("ACCEPTED_TO_JOIN_STAGE"), u.abrupt("break", 18);
|
|
13916
13910
|
case 13:
|
|
13917
13911
|
return a.setStageStatus("REQUESTED_TO_JOIN_STAGE"), u.abrupt("break", 18);
|
|
13918
13912
|
case 15:
|
|
13919
|
-
return a.setStageStatus("OFF_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(
|
|
13913
|
+
return a.setStageStatus("OFF_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
|
|
13920
13914
|
case 18:
|
|
13921
|
-
l(this, gr)[gr].getValue("peerSessionStore").emit(
|
|
13915
|
+
l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_PEER_STAGE_STATUS, { id: a.id, status: a.stageStatus });
|
|
13922
13916
|
case 19:
|
|
13923
13917
|
case "end":
|
|
13924
13918
|
return u.stop();
|
|
@@ -14063,9 +14057,9 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
|
|
|
14063
14057
|
value: function(r) {
|
|
14064
14058
|
var n, a = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default";
|
|
14065
14059
|
if (!l(this, ai)[ai])
|
|
14066
|
-
throw this.logger.error("Plugin::addPluginView::no_auth_token_set_for_plugin"), new
|
|
14060
|
+
throw this.logger.error("Plugin::addPluginView::no_auth_token_set_for_plugin"), new F("No auth token set for plugin.", "0602");
|
|
14067
14061
|
if (!r)
|
|
14068
|
-
throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new
|
|
14062
|
+
throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new F("Iframe was not provided.", "0603");
|
|
14069
14063
|
this.removePluginView(i);
|
|
14070
14064
|
var s = r, u = new URL(this.baseURL), c = { auth: l(this, ai)[ai], parent: navigator.isReactNative ? this.baseURL : window.location.origin, backend: l(this, hn)[hn].getValue("apiBase"), pluginId: this.id, roomName: (n = l(this, hn)[hn].getValue("meetingId")) !== null && n !== void 0 ? n : "", displayTitle: l(this, ii)[ii] };
|
|
14071
14065
|
if (Object.keys(c).forEach(function(p) {
|
|
@@ -14445,7 +14439,7 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
|
|
|
14445
14439
|
return;
|
|
14446
14440
|
}
|
|
14447
14441
|
e.plugins.active.delete(a);
|
|
14448
|
-
}), l(this, et)[et].getValue("peerSessionStore").onAsync(
|
|
14442
|
+
}), l(this, et)[et].getValue("peerSessionStore").onAsync(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
14449
14443
|
return h().wrap(function(a) {
|
|
14450
14444
|
for (; ; )
|
|
14451
14445
|
switch (a.prev = a.next) {
|
|
@@ -14602,12 +14596,12 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
|
|
|
14602
14596
|
}), l(this, si)[si].on(Ir.sendMessageToRoom, function(r) {
|
|
14603
14597
|
var n = yn == null ? void 0 : yn.formatSocketPeerMessage(r.message);
|
|
14604
14598
|
e.broadcastIframeEvent(Lr.chatMessage, { message: n });
|
|
14605
|
-
}), l(this, et)[et].getValue("peerSessionStore").on(
|
|
14599
|
+
}), l(this, et)[et].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, function(r) {
|
|
14606
14600
|
var n = rc(r);
|
|
14607
14601
|
e.broadcastIframeEvent(Lr.peerJoined, n);
|
|
14608
|
-
}), l(this, et)[et].getValue("peerSessionStore").on(
|
|
14602
|
+
}), l(this, et)[et].getValue("peerSessionStore").on(j.PEER_CLOSED, function(r) {
|
|
14609
14603
|
e.broadcastIframeEvent(Lr.peerLeft, r);
|
|
14610
|
-
}), l(this, et)[et].getValue("peerSessionStore").on(
|
|
14604
|
+
}), l(this, et)[et].getValue("peerSessionStore").on(j.UPDATE_PEER_STAGE_STATUS, function(r) {
|
|
14611
14605
|
e.broadcastIframeEvent(Lr.peerStageStatusUpdate, r);
|
|
14612
14606
|
}), l(this, et)[et].subscribe("stageStatus", function(r) {
|
|
14613
14607
|
e.broadcastIframeEvent(Lr.stageStatusUpdate, r);
|
|
@@ -14669,7 +14663,7 @@ var tu = /* @__PURE__ */ C("context"), xI = /* @__PURE__ */ function() {
|
|
|
14669
14663
|
n = { state: "failed", reconnected: a, reconnectionAttempt: void 0 }, this.socketJoined = !1;
|
|
14670
14664
|
break;
|
|
14671
14665
|
}
|
|
14672
|
-
n && (l(this, tu)[tu].getValue("peerSessionStore").emit(
|
|
14666
|
+
n && (l(this, tu)[tu].getValue("peerSessionStore").emit(j.SOCKET_STATE_UPDATE, n), this.socketState = n);
|
|
14673
14667
|
} }]);
|
|
14674
14668
|
}(), eM = Object.defineProperty, rM = Object.getOwnPropertyDescriptor, sl = function(t, e, r, n) {
|
|
14675
14669
|
for (var a = n > 1 ? void 0 : n ? rM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
|
|
@@ -14707,20 +14701,20 @@ var tu = /* @__PURE__ */ C("context"), xI = /* @__PURE__ */ function() {
|
|
|
14707
14701
|
v.next = 3;
|
|
14708
14702
|
break;
|
|
14709
14703
|
}
|
|
14710
|
-
throw this.logger.error("Recording::start::permission_denied"), new
|
|
14704
|
+
throw this.logger.error("Recording::start::permission_denied"), new F("User does not have permission to start recording", "1001");
|
|
14711
14705
|
case 3:
|
|
14712
14706
|
if (!((a == null ? void 0 : a.allowMultiple) !== !0 && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))) {
|
|
14713
14707
|
v.next = 6;
|
|
14714
14708
|
break;
|
|
14715
14709
|
}
|
|
14716
|
-
throw this.logger.error("Recording::start::recording_in_progress", { recording: { state: this.recordingState } }), new
|
|
14710
|
+
throw this.logger.error("Recording::start::recording_in_progress", { recording: { state: this.recordingState } }), new F("Cant start recording, recordingState irregular: ".concat(this.recordingState), "1005");
|
|
14717
14711
|
case 6:
|
|
14718
14712
|
return v.prev = 6, i = ht(), s = l(this, oi)[oi].getValue("defaults"), u = s.recording, c = u === void 0 ? {} : u, v.next = 11, i.startRecording(c, a == null ? void 0 : a.allowMultiple);
|
|
14719
14713
|
case 11:
|
|
14720
14714
|
d = v.sent, this.updateRecordings([].concat(Pe(this.recordings), [{ id: d, state: "STARTING", type: "BROWSER" }])), v.next = 19;
|
|
14721
14715
|
break;
|
|
14722
14716
|
case 15:
|
|
14723
|
-
throw v.prev = 15, v.t0 = v.catch(6), this.logger.error("Recording::stop::recording_failed_to_start", { error: v.t0 }), new
|
|
14717
|
+
throw v.prev = 15, v.t0 = v.catch(6), this.logger.error("Recording::stop::recording_failed_to_start", { error: v.t0 }), new F("Error while starting recording", "1000", this.logger);
|
|
14724
14718
|
case 19:
|
|
14725
14719
|
case "end":
|
|
14726
14720
|
return v.stop();
|
|
@@ -14798,7 +14792,7 @@ function jd() {
|
|
|
14798
14792
|
u.next = 3;
|
|
14799
14793
|
break;
|
|
14800
14794
|
}
|
|
14801
|
-
throw this.logger.error("Recording::stop::permission_denied"), new
|
|
14795
|
+
throw this.logger.error("Recording::stop::permission_denied"), new F("User does not have permission to stop recording", "1001");
|
|
14802
14796
|
case 3:
|
|
14803
14797
|
if (a = [], r === void 0) {
|
|
14804
14798
|
u.next = 14;
|
|
@@ -14810,7 +14804,7 @@ function jd() {
|
|
|
14810
14804
|
u.next = 8;
|
|
14811
14805
|
break;
|
|
14812
14806
|
}
|
|
14813
|
-
throw new
|
|
14807
|
+
throw new F("Could not find the specified recording", "1004");
|
|
14814
14808
|
case 8:
|
|
14815
14809
|
if (!e.includes(i.state)) {
|
|
14816
14810
|
u.next = 11;
|
|
@@ -14837,7 +14831,7 @@ function jd() {
|
|
|
14837
14831
|
k.next = 13;
|
|
14838
14832
|
break;
|
|
14839
14833
|
case 8:
|
|
14840
|
-
throw k.prev = 8, k.t0 = k.catch(2), n.logger.error("Recording::stop::recording_failed_to_stop", { error: k.t0 }), p.state !== v && (p.state = v, n.emit("recordingUpdate", v)), new
|
|
14834
|
+
throw k.prev = 8, k.t0 = k.catch(2), n.logger.error("Recording::stop::recording_failed_to_stop", { error: k.t0 }), p.state !== v && (p.state = v, n.emit("recordingUpdate", v)), new F("Error while stopping recording", "1000", n.logger);
|
|
14841
14835
|
case 13:
|
|
14842
14836
|
case "end":
|
|
14843
14837
|
return k.stop();
|
|
@@ -14903,7 +14897,7 @@ var nM = Object.defineProperty, aM = Object.getOwnPropertyDescriptor, iM = funct
|
|
|
14903
14897
|
return r;
|
|
14904
14898
|
} }, { key: "setupEvents", value: function() {
|
|
14905
14899
|
var e = this;
|
|
14906
|
-
l(this, va)[va].getValue("peerSessionStore").on(
|
|
14900
|
+
l(this, va)[va].getValue("peerSessionStore").on(j.ROOM_STATE, function(r) {
|
|
14907
14901
|
r.activeRecordings.length !== 0 ? e.recording.updateRecordings(r.activeRecordings.map(function(n) {
|
|
14908
14902
|
var a = e.getRecordingTypeFromProtoType(n.recordingType);
|
|
14909
14903
|
return { id: n.recordingId, state: n.recordingStatus, type: a };
|
|
@@ -16002,7 +15996,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16002
15996
|
return r;
|
|
16003
15997
|
}() }, { key: "handlePermissionErrors", value: function(r, n) {
|
|
16004
15998
|
var a = Al(r, n.name, n.message);
|
|
16005
|
-
return this.permissions[r] = a, l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
15999
|
+
return this.permissions[r] = a, l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_ERROR, { message: a, constraints: n.constraints, kind: r }), a;
|
|
16006
16000
|
} }, { key: "getAudioAndVideoTrack", value: function() {
|
|
16007
16001
|
var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
|
|
16008
16002
|
var s, u, c, d, p, v, f, g, k, y, b, E, T, w, O, I, _;
|
|
@@ -16032,9 +16026,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16032
16026
|
case 29:
|
|
16033
16027
|
w = U.sent;
|
|
16034
16028
|
case 30:
|
|
16035
|
-
return l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16029
|
+
return l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), U.abrupt("return", { audioTrack: T, videoTrack: w });
|
|
16036
16030
|
case 35:
|
|
16037
|
-
throw U.prev = 35, U.t0 = U.catch(0), this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: U.t0 }), new
|
|
16031
|
+
throw U.prev = 35, U.t0 = U.catch(0), this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: U.t0 }), new F("Couldnt fetch audio and video track", "1605");
|
|
16038
16032
|
case 39:
|
|
16039
16033
|
case "end":
|
|
16040
16034
|
return U.stop();
|
|
@@ -16058,7 +16052,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16058
16052
|
E.next = 7;
|
|
16059
16053
|
break;
|
|
16060
16054
|
}
|
|
16061
|
-
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16055
|
+
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), new F("No audio devices available", "1606");
|
|
16062
16056
|
case 7:
|
|
16063
16057
|
return v = !!((u = p) !== null && u !== void 0 && u.find(function(T) {
|
|
16064
16058
|
return T.deviceId === i;
|
|
@@ -16099,9 +16093,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16099
16093
|
};
|
|
16100
16094
|
}(), E.prev = 10, E.next = 13, k(f);
|
|
16101
16095
|
case 13:
|
|
16102
|
-
return y = E.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16096
|
+
return y = E.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), E.abrupt("return", y);
|
|
16103
16097
|
case 19:
|
|
16104
|
-
throw E.prev = 19, E.t0 = E.catch(10), E.t0.constraints && this.handlePermissionErrors("audio", E.t0), new
|
|
16098
|
+
throw E.prev = 19, E.t0 = E.catch(10), E.t0.constraints && this.handlePermissionErrors("audio", E.t0), new F(E.t0.message, "1601");
|
|
16105
16099
|
case 23:
|
|
16106
16100
|
case "end":
|
|
16107
16101
|
return E.stop();
|
|
@@ -16142,7 +16136,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16142
16136
|
w.next = 21;
|
|
16143
16137
|
break;
|
|
16144
16138
|
}
|
|
16145
|
-
throw this.permissions.video = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16139
|
+
throw this.permissions.video = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), new F("No video devices available", "1607");
|
|
16146
16140
|
case 21:
|
|
16147
16141
|
return f = !!(v != null && v.find(function(O) {
|
|
16148
16142
|
return O.deviceId === a;
|
|
@@ -16181,9 +16175,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16181
16175
|
};
|
|
16182
16176
|
}(), w.prev = 24, b = l(this, Gr)[Gr].getVideoConstraints(g), w.next = 28, y(b);
|
|
16183
16177
|
case 28:
|
|
16184
|
-
return E = w.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16178
|
+
return E = w.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), w.abrupt("return", E);
|
|
16185
16179
|
case 33:
|
|
16186
|
-
throw w.prev = 33, w.t3 = w.catch(24), w.t3.constraints && this.handlePermissionErrors("video", w.t3), new
|
|
16180
|
+
throw w.prev = 33, w.t3 = w.catch(24), w.t3.constraints && this.handlePermissionErrors("video", w.t3), new F(w.t3.message, "1602");
|
|
16187
16181
|
case 37:
|
|
16188
16182
|
case "end":
|
|
16189
16183
|
return w.stop();
|
|
@@ -16236,9 +16230,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16236
16230
|
};
|
|
16237
16231
|
}(), d.prev = 1, s = l(this, Gr)[Gr].getScreenShareConstraints(), d.next = 5, i(s);
|
|
16238
16232
|
case 5:
|
|
16239
|
-
return u = d.sent, this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(
|
|
16233
|
+
return u = d.sent, this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.screenshare, kind: "screenshare" })), d.abrupt("return", { audioTrack: u.getAudioTracks()[0], videoTrack: u.getVideoTracks()[0] });
|
|
16240
16234
|
case 10:
|
|
16241
|
-
throw d.prev = 10, d.t0 = d.catch(1), d.t0.constraints && this.handlePermissionErrors("screenshare", d.t0), new
|
|
16235
|
+
throw d.prev = 10, d.t0 = d.catch(1), d.t0.constraints && this.handlePermissionErrors("screenshare", d.t0), new F(d.t0.message, "1612");
|
|
16242
16236
|
case 14:
|
|
16243
16237
|
case "end":
|
|
16244
16238
|
return d.stop();
|
|
@@ -16354,7 +16348,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16354
16348
|
return a === c;
|
|
16355
16349
|
}));
|
|
16356
16350
|
case 6:
|
|
16357
|
-
throw s.prev = 6, s.t0 = s.catch(0), this.logger.error("enumerate_devices_failed", { error: s.t0 }), new
|
|
16351
|
+
throw s.prev = 6, s.t0 = s.catch(0), this.logger.error("enumerate_devices_failed", { error: s.t0 }), new F("Failed to get available devices by kind", "1609");
|
|
16358
16352
|
case 10:
|
|
16359
16353
|
case "end":
|
|
16360
16354
|
return s.stop();
|
|
@@ -16378,7 +16372,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
|
|
|
16378
16372
|
return c.deviceId === a;
|
|
16379
16373
|
})[0]);
|
|
16380
16374
|
case 7:
|
|
16381
|
-
throw u.prev = 7, u.t0 = u.catch(0), this.logger.error("enumerate_devices_failed", { error: u.t0 }), new
|
|
16375
|
+
throw u.prev = 7, u.t0 = u.catch(0), this.logger.error("enumerate_devices_failed", { error: u.t0 }), new F("Failed to get device", "1609");
|
|
16382
16376
|
case 11:
|
|
16383
16377
|
case "end":
|
|
16384
16378
|
return u.stop();
|
|
@@ -16675,7 +16669,7 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, wg = funct
|
|
|
16675
16669
|
i.next = 14;
|
|
16676
16670
|
break;
|
|
16677
16671
|
case 9:
|
|
16678
|
-
throw i.prev = 9, i.t0 = i.catch(0), this.logger.error("".concat(this.constructorName, ".unmuteTrack.error"), { error: i.t0 }), this.disableTrack(), new
|
|
16672
|
+
throw i.prev = 9, i.t0 = i.catch(0), this.logger.error("".concat(this.constructorName, ".unmuteTrack.error"), { error: i.t0 }), this.disableTrack(), new F("Failed to unmute track", "1611");
|
|
16679
16673
|
case 14:
|
|
16680
16674
|
case "end":
|
|
16681
16675
|
return i.stop();
|
|
@@ -16753,7 +16747,7 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, wg = funct
|
|
|
16753
16747
|
c.next = 4;
|
|
16754
16748
|
break;
|
|
16755
16749
|
}
|
|
16756
|
-
throw this.logger.warn("".concat(this.constructorName, ".setDevice No device received")), new
|
|
16750
|
+
throw this.logger.warn("".concat(this.constructorName, ".setDevice No device received")), new F("No device received!", "1603");
|
|
16757
16751
|
case 4:
|
|
16758
16752
|
return this.userSelectedDevice = a.deviceId, s && this.setUserPreferredDevice(a.deviceId), c.next = 8, this.onSetDevice(a);
|
|
16759
16753
|
case 8:
|
|
@@ -16892,13 +16886,13 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
|
|
|
16892
16886
|
u.next = 3;
|
|
16893
16887
|
break;
|
|
16894
16888
|
}
|
|
16895
|
-
throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new
|
|
16889
|
+
throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new F("No device received!", "1603");
|
|
16896
16890
|
case 3:
|
|
16897
16891
|
if (a.kind === "audioinput") {
|
|
16898
16892
|
u.next = 6;
|
|
16899
16893
|
break;
|
|
16900
16894
|
}
|
|
16901
|
-
throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new
|
|
16895
|
+
throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new F("Non audio device received while setting device!", "1603");
|
|
16902
16896
|
case 6:
|
|
16903
16897
|
return u.prev = 6, i = this.trackEnabled, this.disableTrack(), u.t0 = this, u.next = 12, this.mediaInterface.getAudioTrack(!i, this.userSelectedDevice);
|
|
16904
16898
|
case 12:
|
|
@@ -16907,7 +16901,7 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
|
|
|
16907
16901
|
u.next = 22;
|
|
16908
16902
|
break;
|
|
16909
16903
|
case 17:
|
|
16910
|
-
throw u.prev = 17, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new
|
|
16904
|
+
throw u.prev = 17, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new F(u.t2.message, "1604");
|
|
16911
16905
|
case 22:
|
|
16912
16906
|
case "end":
|
|
16913
16907
|
return u.stop();
|
|
@@ -17163,7 +17157,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17163
17157
|
y.next = 13;
|
|
17164
17158
|
break;
|
|
17165
17159
|
}
|
|
17166
|
-
throw new
|
|
17160
|
+
throw new F("No speaker found", "1608");
|
|
17167
17161
|
case 13:
|
|
17168
17162
|
if (((i = this.currentDevice) === null || i === void 0 ? void 0 : i.deviceId) !== d.deviceId) {
|
|
17169
17163
|
y.next = 15;
|
|
@@ -17238,7 +17232,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17238
17232
|
}
|
|
17239
17233
|
return d.abrupt("return");
|
|
17240
17234
|
case 11:
|
|
17241
|
-
this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", l(this, iu)[iu].getValue("peerSessionStore").emit(
|
|
17235
|
+
this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", l(this, iu)[iu].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.mediaInterface.permissions.screenshare, kind: "screenshare" })), d.next = 16;
|
|
17242
17236
|
break;
|
|
17243
17237
|
case 14:
|
|
17244
17238
|
d.prev = 14, d.t0 = d.catch(0);
|
|
@@ -17266,13 +17260,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17266
17260
|
u.next = 2;
|
|
17267
17261
|
break;
|
|
17268
17262
|
}
|
|
17269
|
-
throw new
|
|
17263
|
+
throw new F("No media track enabled!", "1610");
|
|
17270
17264
|
case 2:
|
|
17271
17265
|
if (i = this.mediaInterface, i.constraintsBuilder) {
|
|
17272
17266
|
u.next = 5;
|
|
17273
17267
|
break;
|
|
17274
17268
|
}
|
|
17275
|
-
throw new
|
|
17269
|
+
throw new F("update constraints not supported for non web clients", "1100", this.logger);
|
|
17276
17270
|
case 5:
|
|
17277
17271
|
try {
|
|
17278
17272
|
this.videoMediaTrack.applyConstraints(i.constraintsBuilder.getUpdatedVideoConstraints(a)), this.addMediaTrackListeners();
|
|
@@ -17320,13 +17314,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17320
17314
|
s.next = 3;
|
|
17321
17315
|
break;
|
|
17322
17316
|
}
|
|
17323
|
-
throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new
|
|
17317
|
+
throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new F("No device received!", "1603");
|
|
17324
17318
|
case 3:
|
|
17325
17319
|
if (a.kind === "videoinput") {
|
|
17326
17320
|
s.next = 6;
|
|
17327
17321
|
break;
|
|
17328
17322
|
}
|
|
17329
|
-
throw this.logger.warn("VideoMediaHandler.setDevice Received non video device", { devices: [a] }), new
|
|
17323
|
+
throw this.logger.warn("VideoMediaHandler.setDevice Received non video device", { devices: [a] }), new F("Non video device received while setting video device!", "1603");
|
|
17330
17324
|
case 6:
|
|
17331
17325
|
if (this.mediaTrack && this.mediaTrack.enabled) {
|
|
17332
17326
|
s.next = 10;
|
|
@@ -17341,7 +17335,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17341
17335
|
s.next = 25;
|
|
17342
17336
|
break;
|
|
17343
17337
|
case 20:
|
|
17344
|
-
throw s.prev = 20, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new
|
|
17338
|
+
throw s.prev = 20, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new F("Failed to change device", "1600", this.logger);
|
|
17345
17339
|
case 25:
|
|
17346
17340
|
case "end":
|
|
17347
17341
|
return s.stop();
|
|
@@ -17443,13 +17437,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
|
|
|
17443
17437
|
u.next = 2;
|
|
17444
17438
|
break;
|
|
17445
17439
|
}
|
|
17446
|
-
throw new
|
|
17440
|
+
throw new F("No media track enabled!", "1610");
|
|
17447
17441
|
case 2:
|
|
17448
17442
|
if (i = this.mediaInterface, i.constraintsBuilder) {
|
|
17449
17443
|
u.next = 5;
|
|
17450
17444
|
break;
|
|
17451
17445
|
}
|
|
17452
|
-
throw new
|
|
17446
|
+
throw new F("update constraints not supported for non web clients", "1100", this.logger);
|
|
17453
17447
|
case 5:
|
|
17454
17448
|
return u.prev = 5, this._mediaTrack.applyConstraints(i.constraintsBuilder.getUpdatedVideoConstraints(a)), u.next = 9, this.setTransformedTrack();
|
|
17455
17449
|
case 9:
|
|
@@ -17555,7 +17549,7 @@ Rc([D.trace("VideoMediaHandler.conditionallyChangeTrack")], ol.prototype, "condi
|
|
|
17555
17549
|
var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__ */ C("theme"), ou = /* @__PURE__ */ C("name"), ps = /* @__PURE__ */ C("pluginsConfig"), HM = /* @__PURE__ */ function() {
|
|
17556
17550
|
function o(t) {
|
|
17557
17551
|
if (P(this, o), Object.defineProperty(this, Rr, { writable: !0, value: void 0 }), Object.defineProperty(this, ka, { writable: !0, value: void 0 }), Object.defineProperty(this, ou, { writable: !0, value: void 0 }), Object.defineProperty(this, ps, { writable: !0, value: void 0 }), !t)
|
|
17558
|
-
throw new
|
|
17552
|
+
throw new F("Could not load preset.", "0904");
|
|
17559
17553
|
l(this, Rr)[Rr] = t.config, l(this, ou)[ou] = t.name, l(this, ka)[ka] = t.ui || Un(Np().ui), l(this, ps)[ps] = t.permissions.plugins.config;
|
|
17560
17554
|
}
|
|
17561
17555
|
return S(o, [{
|
|
@@ -17731,14 +17725,14 @@ var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__
|
|
|
17731
17725
|
v.next = 4;
|
|
17732
17726
|
break;
|
|
17733
17727
|
}
|
|
17734
|
-
throw this.logger.error("Livestream::start::permission_denied"), new
|
|
17728
|
+
throw this.logger.error("Livestream::start::permission_denied"), new F("User does not have permission to start livestreaming", "1901");
|
|
17735
17729
|
case 4:
|
|
17736
17730
|
return this.setLivestreamState("STARTING"), v.prev = 5, i = ht(), v.next = 9, i.startLivestreaming(a);
|
|
17737
17731
|
case 9:
|
|
17738
17732
|
s = v.sent, u = s.playbackUrl, c = s.ingestionCredentials, this.playbackUrl = u, this.ingestionCredentials = c, a != null && a.manualIngestion && this.setLivestreamState("WAITING_ON_MANUAL_INGESTION"), v.next = 22;
|
|
17739
17733
|
break;
|
|
17740
17734
|
case 17:
|
|
17741
|
-
throw v.prev = 17, v.t0 = v.catch(5), this.logger.error("Recording::stop::livestream_failed_to_start", { error: v.t0 }), this.setLivestreamState("IDLE"), new
|
|
17735
|
+
throw v.prev = 17, v.t0 = v.catch(5), this.logger.error("Recording::stop::livestream_failed_to_start", { error: v.t0 }), this.setLivestreamState("IDLE"), new F("Error while starting livestream", "1900", this.logger);
|
|
17742
17736
|
case 22:
|
|
17743
17737
|
case "end":
|
|
17744
17738
|
return v.stop();
|
|
@@ -17760,20 +17754,20 @@ var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__
|
|
|
17760
17754
|
s.next = 3;
|
|
17761
17755
|
break;
|
|
17762
17756
|
}
|
|
17763
|
-
throw this.logger.error("Livestream::stop::permission_denied"), new
|
|
17757
|
+
throw this.logger.error("Livestream::stop::permission_denied"), new F("User does not have permission to stop livestreaming", "1901");
|
|
17764
17758
|
case 3:
|
|
17765
17759
|
if (!(this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")) {
|
|
17766
17760
|
s.next = 6;
|
|
17767
17761
|
break;
|
|
17768
17762
|
}
|
|
17769
|
-
throw this.logger.error("Livestream::stop::inconsistent_state"), new
|
|
17763
|
+
throw this.logger.error("Livestream::stop::inconsistent_state"), new F("Livestream not started yet", "1902");
|
|
17770
17764
|
case 6:
|
|
17771
17765
|
return s.prev = 6, this.setLivestreamState("STOPPING"), a = ht(), s.next = 11, a.stopLivestreaming();
|
|
17772
17766
|
case 11:
|
|
17773
17767
|
s.next = 18;
|
|
17774
17768
|
break;
|
|
17775
17769
|
case 13:
|
|
17776
|
-
throw s.prev = 13, s.t0 = s.catch(6), this.logger.error("Livestream::stop::livestream_failed_to_stop", { error: s.t0 }), this.setLivestreamState("STOPPING"), new
|
|
17770
|
+
throw s.prev = 13, s.t0 = s.catch(6), this.logger.error("Livestream::stop::livestream_failed_to_stop", { error: s.t0 }), this.setLivestreamState("STOPPING"), new F("Error while stopping livestream", "1900", this.logger);
|
|
17777
17771
|
case 18:
|
|
17778
17772
|
case "end":
|
|
17779
17773
|
return s.stop();
|
|
@@ -17897,7 +17891,7 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
|
|
|
17897
17891
|
e.livestream.setLivestreamState("IDLE"), e.livestream.playbackUrl = void 0;
|
|
17898
17892
|
}), l(this, Jt)[Jt].on(Q.roomPeerCount, function(r) {
|
|
17899
17893
|
e.livestream.viewerCount = r.count, e.livestream.emit("viewerCountUpdate", r.count);
|
|
17900
|
-
}), l(this, bt)[bt].getValue("peerSessionStore").on(
|
|
17894
|
+
}), l(this, bt)[bt].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
|
|
17901
17895
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
17902
17896
|
var i;
|
|
17903
17897
|
return h().wrap(function(u) {
|
|
@@ -17914,9 +17908,9 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
|
|
|
17914
17908
|
return function(n) {
|
|
17915
17909
|
return r.apply(this, arguments);
|
|
17916
17910
|
};
|
|
17917
|
-
}()), l(this, bt)[bt].getValue("peerSessionStore").on(
|
|
17911
|
+
}()), l(this, bt)[bt].getValue("peerSessionStore").on(j.PEER_CLOSED, function(r) {
|
|
17918
17912
|
r.id === l(e, vs)[vs] && (l(e, vs)[vs] = void 0, e.livestream.setLivestreamState("IDLE"));
|
|
17919
|
-
}), l(this, bt)[bt].getValue("peerSessionStore").onAsync(
|
|
17913
|
+
}), l(this, bt)[bt].getValue("peerSessionStore").onAsync(j.LEAVE_MEDIA_ROOM, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
17920
17914
|
return h().wrap(function(a) {
|
|
17921
17915
|
for (; ; )
|
|
17922
17916
|
switch (a.prev = a.next) {
|
|
@@ -17938,7 +17932,7 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
|
|
|
17938
17932
|
return a.stop();
|
|
17939
17933
|
}
|
|
17940
17934
|
}, r, null, [[3, 8]]);
|
|
17941
|
-
}))), l(this, bt)[bt].getValue("peerSessionStore").on(
|
|
17935
|
+
}))), l(this, bt)[bt].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
17942
17936
|
return h().wrap(function(a) {
|
|
17943
17937
|
for (; ; )
|
|
17944
17938
|
switch (a.prev = a.next) {
|
|
@@ -18289,7 +18283,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18289
18283
|
var $ = U.clientWidth, L = U.clientHeight, H = i.videoTrack.getSettings(), Y = H.width, q = H.height;
|
|
18290
18284
|
if (!(!Y || !q)) {
|
|
18291
18285
|
var B = q / L, x = Y / $, we = Math.max(B, x);
|
|
18292
|
-
we > t_ && l(i, _t)[_t] === 1 ? (l(i, _t)[_t] = 0, l(i, Nr)[Nr].getValue("peerSessionStore").emit(
|
|
18286
|
+
we > t_ && l(i, _t)[_t] === 1 ? (l(i, _t)[_t] = 0, l(i, Nr)[Nr].getValue("peerSessionStore").emit(j.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] })) : we < r_ && l(i, _t)[_t] === 0 && (l(i, _t)[_t] = 1, l(i, Nr)[Nr].getValue("peerSessionStore").emit(j.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] }));
|
|
18293
18287
|
}
|
|
18294
18288
|
}
|
|
18295
18289
|
}, 2e3) }), l(i, Nr)[Nr] = e;
|
|
@@ -18359,13 +18353,13 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18359
18353
|
i.next = 2;
|
|
18360
18354
|
break;
|
|
18361
18355
|
}
|
|
18362
|
-
throw new
|
|
18356
|
+
throw new F("Can`t pin participant without joining room", "1205");
|
|
18363
18357
|
case 2:
|
|
18364
18358
|
if (l(this, Mt)[Mt].permissions.pinParticipant) {
|
|
18365
18359
|
i.next = 4;
|
|
18366
18360
|
break;
|
|
18367
18361
|
}
|
|
18368
|
-
throw new
|
|
18362
|
+
throw new F("You do not have permission to pin participants.", "1201");
|
|
18369
18363
|
case 4:
|
|
18370
18364
|
return i.abrupt("return", l(this, Qn)[Qn].pinPeer(this.id));
|
|
18371
18365
|
case 5:
|
|
@@ -18388,13 +18382,13 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18388
18382
|
i.next = 2;
|
|
18389
18383
|
break;
|
|
18390
18384
|
}
|
|
18391
|
-
throw new
|
|
18385
|
+
throw new F("Can`t unpin participant without joining room", "1205");
|
|
18392
18386
|
case 2:
|
|
18393
18387
|
if (l(this, Mt)[Mt].permissions.pinParticipant) {
|
|
18394
18388
|
i.next = 4;
|
|
18395
18389
|
break;
|
|
18396
18390
|
}
|
|
18397
|
-
throw new
|
|
18391
|
+
throw new F("You do not have permission to unpin participants.", "1201");
|
|
18398
18392
|
case 4:
|
|
18399
18393
|
return i.abrupt("return", l(this, Qn)[Qn].pinPeer(null));
|
|
18400
18394
|
case 5:
|
|
@@ -18423,7 +18417,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18423
18417
|
s.next = 4;
|
|
18424
18418
|
break;
|
|
18425
18419
|
}
|
|
18426
|
-
throw new
|
|
18420
|
+
throw new F("Can`t disable participant audio without joining room", "1205");
|
|
18427
18421
|
case 4:
|
|
18428
18422
|
if (!l(this, Mt)[Mt].permissions.canDisableParticipantAudio) {
|
|
18429
18423
|
s.next = 6;
|
|
@@ -18431,7 +18425,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18431
18425
|
}
|
|
18432
18426
|
return s.abrupt("return", l(this, Qn)[Qn].disableAudio(a));
|
|
18433
18427
|
case 6:
|
|
18434
|
-
throw this.logger.error("Participant::unauthorized_disable_audio", { participant: { id: a } }), new
|
|
18428
|
+
throw this.logger.error("Participant::unauthorized_disable_audio", { participant: { id: a } }), new F("Unauthorized: User does not have permission to disable participant audio.", "1201");
|
|
18435
18429
|
case 8:
|
|
18436
18430
|
case "end":
|
|
18437
18431
|
return s.stop();
|
|
@@ -18453,17 +18447,17 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18453
18447
|
s.next = 4;
|
|
18454
18448
|
break;
|
|
18455
18449
|
}
|
|
18456
|
-
throw new
|
|
18450
|
+
throw new F("Can`t kick participant without joining room", "1205");
|
|
18457
18451
|
case 4:
|
|
18458
18452
|
if (!l(this, Mt)[Mt].permissions.kickParticipant) {
|
|
18459
18453
|
s.next = 8;
|
|
18460
18454
|
break;
|
|
18461
18455
|
}
|
|
18462
|
-
return s.next = 7, l(this, Nr)[Nr].getValue("peerSessionStore").emitAsync(
|
|
18456
|
+
return s.next = 7, l(this, Nr)[Nr].getValue("peerSessionStore").emitAsync(j.KICK_PEER, { peerId: a });
|
|
18463
18457
|
case 7:
|
|
18464
18458
|
return s.abrupt("return");
|
|
18465
18459
|
case 8:
|
|
18466
|
-
throw this.logger.error("Participant::unauthorized_kick", { participant: { id: a } }), new
|
|
18460
|
+
throw this.logger.error("Participant::unauthorized_kick", { participant: { id: a } }), new F("Unauthorized: User does not have permission to kick participants.", "1201");
|
|
18467
18461
|
case 10:
|
|
18468
18462
|
case "end":
|
|
18469
18463
|
return s.stop();
|
|
@@ -18485,7 +18479,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18485
18479
|
s.next = 4;
|
|
18486
18480
|
break;
|
|
18487
18481
|
}
|
|
18488
|
-
throw new
|
|
18482
|
+
throw new F("Can`t disable participant video without joining room", "1205");
|
|
18489
18483
|
case 4:
|
|
18490
18484
|
if (!l(this, Mt)[Mt].permissions.canDisableParticipantVideo) {
|
|
18491
18485
|
s.next = 6;
|
|
@@ -18493,7 +18487,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
|
|
|
18493
18487
|
}
|
|
18494
18488
|
return s.abrupt("return", l(this, Qn)[Qn].disableVideo(a));
|
|
18495
18489
|
case 6:
|
|
18496
|
-
throw this.logger.error("Participant::unauthorized_disable_video", { participant: { id: a } }), new
|
|
18490
|
+
throw this.logger.error("Participant::unauthorized_disable_video", { participant: { id: a } }), new F("Unauthorized: User does not have permission to disable participant video.", "1201");
|
|
18497
18491
|
case 8:
|
|
18498
18492
|
case "end":
|
|
18499
18493
|
return s.stop();
|
|
@@ -18767,7 +18761,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18767
18761
|
key: "setupEvents",
|
|
18768
18762
|
value: function() {
|
|
18769
18763
|
var r = this;
|
|
18770
|
-
l(this, me)[me].getValue("peerSessionStore").on(
|
|
18764
|
+
l(this, me)[me].getValue("peerSessionStore").on(j.E2EE_ACTIVE_CONSUMER, function(a) {
|
|
18771
18765
|
var i, s = a.peerId;
|
|
18772
18766
|
((i = l(r, me)[me].getValue("modules").e2ee) === null || i === void 0 ? void 0 : i.enabled) !== !0 && r.emit("media_decode_error", { reason: "Got encrypted media for participantId ".concat(s, ", but encryption wasn't enabled in init.defaults"), code: "1702" });
|
|
18773
18767
|
});
|
|
@@ -18804,8 +18798,8 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18804
18798
|
key: "setMaxActiveParticipantsCount",
|
|
18805
18799
|
value: function(r) {
|
|
18806
18800
|
if (r < 0 || r > 24)
|
|
18807
|
-
throw new
|
|
18808
|
-
l(this, me)[me].setValue("maxPreferredStreams", r), l(this, pi)[pi] && l(this, me)[me].getValue("peerSessionStore").emit(
|
|
18801
|
+
throw new F("0 <= Max active participants count limit <= 24", "1203");
|
|
18802
|
+
l(this, me)[me].setValue("maxPreferredStreams", r), l(this, pi)[pi] && l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
18809
18803
|
}
|
|
18810
18804
|
/**
|
|
18811
18805
|
* Returns the number of pages that are available in the meeting in PAGINATED mode.
|
|
@@ -18832,7 +18826,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18832
18826
|
value: function(r) {
|
|
18833
18827
|
var n, a;
|
|
18834
18828
|
if (!l(this, xn)[xn])
|
|
18835
|
-
throw new
|
|
18829
|
+
throw new F("Can`t accept waiting room request without joining room", "1205");
|
|
18836
18830
|
var i = (n = (a = this.waitlisted.get(r)) === null || a === void 0 ? void 0 : a.userId) !== null && n !== void 0 ? n : r;
|
|
18837
18831
|
return l(this, wr)[wr].acceptWaitingRoomRequest([i]);
|
|
18838
18832
|
}
|
|
@@ -18874,7 +18868,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18874
18868
|
d.next = 2;
|
|
18875
18869
|
break;
|
|
18876
18870
|
}
|
|
18877
|
-
throw new
|
|
18871
|
+
throw new F("Can`t reject waiting room request without joining room", "1205");
|
|
18878
18872
|
case 2:
|
|
18879
18873
|
u = (i = (s = this.waitlisted.get(a)) === null || s === void 0 ? void 0 : s.userId) !== null && i !== void 0 ? i : a, l(this, wr)[wr].rejectWaitingRoomRequest([u]);
|
|
18880
18874
|
case 4:
|
|
@@ -18902,7 +18896,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18902
18896
|
u.next = 5;
|
|
18903
18897
|
break;
|
|
18904
18898
|
}
|
|
18905
|
-
throw this.logger.error("Participants::setViewMode::invalid_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), new
|
|
18899
|
+
throw this.logger.error("Participants::setViewMode::invalid_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), new F("Invalid view mode: ".concat(a, ". Try ACTIVE_GRID, PAGINATED or MANUAL."), "1207");
|
|
18906
18900
|
case 5:
|
|
18907
18901
|
if (this.viewMode !== a) {
|
|
18908
18902
|
u.next = 8;
|
|
@@ -18910,7 +18904,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18910
18904
|
}
|
|
18911
18905
|
return this.logger.info("Participants::setViewMode::view_mode_same_as_previous"), u.abrupt("return");
|
|
18912
18906
|
case 8:
|
|
18913
|
-
this.viewMode = a, a === "PAGINATED" ? (this.currentPage = 1, l(this, me)[me].getValue("peerSessionStore").emit(
|
|
18907
|
+
this.viewMode = a, a === "PAGINATED" ? (this.currentPage = 1, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "ACTIVE_GRID" ? (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "MANUAL" && (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })), this.emit("viewModeChanged", { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount });
|
|
18914
18908
|
case 11:
|
|
18915
18909
|
case "end":
|
|
18916
18910
|
return u.stop();
|
|
@@ -18937,12 +18931,12 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18937
18931
|
d.next = 3;
|
|
18938
18932
|
break;
|
|
18939
18933
|
}
|
|
18940
|
-
throw new
|
|
18934
|
+
throw new F("MANUAL subscription mode was not activated.", "1206");
|
|
18941
18935
|
case 3:
|
|
18942
18936
|
a.forEach(function(p) {
|
|
18943
18937
|
var v = i.joined.get(p);
|
|
18944
18938
|
v && (s.includes("audio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { audio: !0 }), i.audioSubscribed.has(v.id) || i.audioSubscribed.add(v)), s.includes("video") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { video: !0 }), i.videoSubscribed.has(v.id) || i.videoSubscribed.add(v)), s.includes("screenshareAudio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareAudio: !0 }), i.audioSubscribed.has(v.id) || i.audioSubscribed.add(v)), s.includes("screenshareVideo") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareVideo: !0 }), i.videoSubscribed.has(v.id) || i.videoSubscribed.add(v)));
|
|
18945
|
-
}), l(this, me)[me].getValue("peerSessionStore").emit(
|
|
18939
|
+
}), l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
18946
18940
|
case 5:
|
|
18947
18941
|
case "end":
|
|
18948
18942
|
return d.stop();
|
|
@@ -18964,12 +18958,12 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
18964
18958
|
d.next = 3;
|
|
18965
18959
|
break;
|
|
18966
18960
|
}
|
|
18967
|
-
throw new
|
|
18961
|
+
throw new F("MANUAL subscription mode was not activated.", "1206");
|
|
18968
18962
|
case 3:
|
|
18969
18963
|
a.forEach(function(p) {
|
|
18970
18964
|
var v = i.joined.get(p);
|
|
18971
18965
|
v && (s.includes("audio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { audio: !1 }), v.manualProducerConfig.screenshareAudio || i.audioSubscribed.delete(v.id)), s.includes("video") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { video: !1 }), v.manualProducerConfig.screenshareVideo || i.videoSubscribed.delete(v.id)), s.includes("screenshareAudio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareAudio: !1 }), v.manualProducerConfig.audio || i.audioSubscribed.delete(v.id)), s.includes("screenshareVideo") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareVideo: !1 }), v.manualProducerConfig.video || i.videoSubscribed.delete(v.id)));
|
|
18972
|
-
}), l(this, me)[me].getValue("peerSessionStore").emit(
|
|
18966
|
+
}), l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
18973
18967
|
case 5:
|
|
18974
18968
|
case "end":
|
|
18975
18969
|
return d.stop();
|
|
@@ -19009,9 +19003,9 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19009
19003
|
s.next = 6;
|
|
19010
19004
|
break;
|
|
19011
19005
|
}
|
|
19012
|
-
throw this.logger.error("Participants::invalid_page_number"), new
|
|
19006
|
+
throw this.logger.error("Participants::invalid_page_number"), new F("Invalid page: ".concat(a, ". Page must be an integer and greater than 0 and less than or equal to .pageCount"), "1202");
|
|
19013
19007
|
case 6:
|
|
19014
|
-
this.currentPage = a, l(this, me)[me].getValue("peerSessionStore").emit(
|
|
19008
|
+
this.currentPage = a, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: a }), this.emit("pageChanged", { viewMode: this.viewMode, currentPage: this.currentPage, pageCount: this.pageCount });
|
|
19015
19009
|
case 9:
|
|
19016
19010
|
case "end":
|
|
19017
19011
|
return s.stop();
|
|
@@ -19032,7 +19026,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19032
19026
|
s.next = 3;
|
|
19033
19027
|
break;
|
|
19034
19028
|
}
|
|
19035
|
-
throw new
|
|
19029
|
+
throw new F("Can`t disable all audio without joining room", "1205");
|
|
19036
19030
|
case 3:
|
|
19037
19031
|
if (!l(this, ea)[ea].permissions.canAllowParticipantAudio) {
|
|
19038
19032
|
s.next = 5;
|
|
@@ -19040,7 +19034,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19040
19034
|
}
|
|
19041
19035
|
return s.abrupt("return", l(this, ho)[ho].muteAll(a));
|
|
19042
19036
|
case 5:
|
|
19043
|
-
throw this.logger.error("Participants::unauthorized_disable_all_audio", { actions: { disableAllAudio: { allowUnmute: a } } }), new
|
|
19037
|
+
throw this.logger.error("Participants::unauthorized_disable_all_audio", { actions: { disableAllAudio: { allowUnmute: a } } }), new F("Unauthorized: User does not have permission to disable peer audio.", "1201");
|
|
19044
19038
|
case 7:
|
|
19045
19039
|
case "end":
|
|
19046
19040
|
return s.stop();
|
|
@@ -19061,7 +19055,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19061
19055
|
i.next = 3;
|
|
19062
19056
|
break;
|
|
19063
19057
|
}
|
|
19064
|
-
throw new
|
|
19058
|
+
throw new F("Can`t disable all video without joining room", "1205");
|
|
19065
19059
|
case 3:
|
|
19066
19060
|
if (!l(this, ea)[ea].permissions.canAllowParticipantVideo) {
|
|
19067
19061
|
i.next = 5;
|
|
@@ -19069,7 +19063,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19069
19063
|
}
|
|
19070
19064
|
return i.abrupt("return", l(this, ho)[ho].muteAllVideo());
|
|
19071
19065
|
case 5:
|
|
19072
|
-
throw this.logger.error("Participants::unauthorized_disable_all_video"), new
|
|
19066
|
+
throw this.logger.error("Participants::unauthorized_disable_all_video"), new F("Unauthorized: User does not have permission to disable peer video.", "1201");
|
|
19073
19067
|
case 7:
|
|
19074
19068
|
case "end":
|
|
19075
19069
|
return i.stop();
|
|
@@ -19120,7 +19114,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19120
19114
|
for (; ; )
|
|
19121
19115
|
switch (s.prev = s.next) {
|
|
19122
19116
|
case 0:
|
|
19123
|
-
return s.next = 2, l(this, me)[me].getValue("peerSessionStore").emitAsync(
|
|
19117
|
+
return s.next = 2, l(this, me)[me].getValue("peerSessionStore").emitAsync(j.KICK_PEER, { peerId: a });
|
|
19124
19118
|
case 2:
|
|
19125
19119
|
case "end":
|
|
19126
19120
|
return s.stop();
|
|
@@ -19142,13 +19136,13 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19142
19136
|
u.next = 4;
|
|
19143
19137
|
break;
|
|
19144
19138
|
}
|
|
19145
|
-
throw new
|
|
19139
|
+
throw new F("Can`t kick all without joining room", "1205");
|
|
19146
19140
|
case 4:
|
|
19147
19141
|
if (l(this, ea)[ea].permissions.kickParticipant) {
|
|
19148
19142
|
u.next = 7;
|
|
19149
19143
|
break;
|
|
19150
19144
|
}
|
|
19151
|
-
throw this.logger.error("Participants::unauthorized_kick_all"), new
|
|
19145
|
+
throw this.logger.error("Participants::unauthorized_kick_all"), new F("Unauthorized: User does not have permission to kick peers.", "1201");
|
|
19152
19146
|
case 7:
|
|
19153
19147
|
i = l(this, me)[me].getValue("flagsmith").hasFeature(ye.PROPAGATE_KICK_ALL), l(this, wr)[wr].kickAll(i);
|
|
19154
19148
|
case 9:
|
|
@@ -19172,13 +19166,13 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19172
19166
|
d.next = 3;
|
|
19173
19167
|
break;
|
|
19174
19168
|
}
|
|
19175
|
-
throw new
|
|
19169
|
+
throw new F("Can`t broadcast message without joining room", "1205");
|
|
19176
19170
|
case 3:
|
|
19177
19171
|
if (a != null && a.trim()) {
|
|
19178
19172
|
d.next = 5;
|
|
19179
19173
|
break;
|
|
19180
19174
|
}
|
|
19181
|
-
throw new
|
|
19175
|
+
throw new F("`type` must be a non-empty string.", "1209");
|
|
19182
19176
|
case 5:
|
|
19183
19177
|
if (!s) {
|
|
19184
19178
|
d.next = 17;
|
|
@@ -19256,7 +19250,7 @@ var lu = /* @__PURE__ */ function(o) {
|
|
|
19256
19250
|
d.next = 4;
|
|
19257
19251
|
break;
|
|
19258
19252
|
}
|
|
19259
|
-
throw new
|
|
19253
|
+
throw new F("Cannot update permissions, no valid userIDs found", "1204");
|
|
19260
19254
|
case 4:
|
|
19261
19255
|
l(this, wr)[wr].updatePermissions(u, i);
|
|
19262
19256
|
case 5:
|
|
@@ -19398,7 +19392,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19398
19392
|
key: "setupEvents",
|
|
19399
19393
|
value: function() {
|
|
19400
19394
|
var e = this;
|
|
19401
|
-
this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on(
|
|
19395
|
+
this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on(j.SOCKET_PEERS, /* @__PURE__ */ function() {
|
|
19402
19396
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
19403
19397
|
var i, s;
|
|
19404
19398
|
return h().wrap(function(c) {
|
|
@@ -19437,18 +19431,18 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19437
19431
|
return e.onParticipantMediaJoined(v, f, g);
|
|
19438
19432
|
});
|
|
19439
19433
|
var u = a != null ? a : {}, c = u.audioPeers, d = u.compulsoryPeers;
|
|
19440
|
-
i.pinnedPeerIds.length !== 0 && e.onParticipantPinned(i.pinnedPeerIds[0]), e.computeActivateParticipants(c != null ? c : [], d), e.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), e.context.getValue("peerSessionStore").emit(
|
|
19441
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19434
|
+
i.pinnedPeerIds.length !== 0 && e.onParticipantPinned(i.pinnedPeerIds[0]), e.computeActivateParticipants(c != null ? c : [], d), e.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), e.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { createAllConsumers: !0 });
|
|
19435
|
+
}), this.context.getValue("peerSessionStore").on(j.MAX_SPATIAL_LAYER_CHANGE, function(r) {
|
|
19442
19436
|
var n = r.peerId, a = r.maxSpatialLayer, i = e.videoPeerConsumerMap.get(n);
|
|
19443
19437
|
i && (e.context.getValue("flagsmith").hasFeature(ye.DISABLE_LAYER_SWITCH) || (e.maxSpatialLayerUpdates.set(i, a), e.updateConsumerSpatialLayers()));
|
|
19444
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19438
|
+
}), this.context.getValue("peerSessionStore").on(j.NEW_PRODUCER, function(r) {
|
|
19445
19439
|
var n = r.peerId, a = r.producer, i = e.participants.joined.get(n);
|
|
19446
19440
|
if (!i) {
|
|
19447
19441
|
e.logger.warn("ParticipantController::NEW_PRODUCER::participant not found", { producer: { id: a == null ? void 0 : a.producerId, kind: a == null ? void 0 : a.kind, status: "not_initialized", appData: { screenShare: a == null ? void 0 : a.screenShare } }, participant: { id: n } });
|
|
19448
19442
|
return;
|
|
19449
19443
|
}
|
|
19450
19444
|
i.producers.push(a), e.logger.info("ParticipantController::NEW_PRODUCER::producer_added_to_participant", { producer: { id: a == null ? void 0 : a.producerId, peerId: n, kind: a == null ? void 0 : a.kind, status: "not_initialized", appData: { screenShare: a == null ? void 0 : a.screenShare } } }), (a == null ? void 0 : a.kind) === "audio" && e.participants.audioSubscribed.get(n) || (a == null ? void 0 : a.kind) === "video" && e.participants.videoSubscribed.get(n) || a != null && a.screenShare ? (e.logger.info("NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ".concat(a.producerId, ", Peer: ").concat(n, ", Kind: ").concat(a.kind, ", ScreenShare: ").concat(a.screenShare, ", ConsumersSyncing: ").concat(l(e, rt)[rt], ", VideoSub: ").concat(a.kind === "video" ? e.participants.videoSubscribed.has(n) : "N/A", ", AudioSub: ").concat(a.kind === "audio" ? e.participants.audioSubscribed.has(n) : "N/A")), e.scheduleSyncConsumers({ source: "NEW_PRODUCER_AUTO" })) : e.logger.info("ParticipantController::NEW_PRODUCER::not_consuming_producer_auto", { producer: { id: a == null ? void 0 : a.producerId, peerId: n, kind: a == null ? void 0 : a.kind, status: "UNKNOWN", appData: { screenShare: a == null ? void 0 : a.screenShare } } });
|
|
19451
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19445
|
+
}), this.context.getValue("peerSessionStore").on(j.PRODUCER_CLOSED, function(r) {
|
|
19452
19446
|
var n = r.peerId, a = r.producerId, i = e.participants.joined.get(n);
|
|
19453
19447
|
if (!i) {
|
|
19454
19448
|
e.logger.warn("ParticipantController::NEW_PRODUCER::participant not found", { participant: { id: n } });
|
|
@@ -19457,14 +19451,14 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19457
19451
|
i.producers = i.producers.filter(function(s) {
|
|
19458
19452
|
return s.producerId !== a;
|
|
19459
19453
|
});
|
|
19460
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19454
|
+
}), this.context.getValue("peerSessionStore").on(j.PRODUCER_TOGGLE, function(r) {
|
|
19461
19455
|
var n = r.peerId, a = r.producerId, i = r.paused, s = r.kind, u = e.participants.joined.get(n);
|
|
19462
19456
|
if (u) {
|
|
19463
19457
|
s === "audio" && u.setAudioEnabled(!i);
|
|
19464
19458
|
var c = u.producers.find(function(d) {
|
|
19465
19459
|
return d.producerId === a;
|
|
19466
19460
|
});
|
|
19467
|
-
c && (c.pause = i), s === "video" && e.context.getValue("peerSessionStore").emit(
|
|
19461
|
+
c && (c.pause = i), s === "video" && e.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: e.participants.viewMode, page: e.participants.currentPage });
|
|
19468
19462
|
}
|
|
19469
19463
|
}), this.roomSocketHandler.on(this.events.globalPeerPinBroadcast, function(r) {
|
|
19470
19464
|
var n;
|
|
@@ -19744,7 +19738,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19744
19738
|
return u % 2 ? "*" : s;
|
|
19745
19739
|
}).join("") } }), this.logger.info("onParticipantMediaJoined: peer ".concat(e, " has joined media room. Processing.")), r.forEach(function(s) {
|
|
19746
19740
|
s.kind === la.AUDIO && !s.screenShare ? i.setAudioEnabled(!s.pause) : s.kind === la.VIDEO && !s.screenShare && (i.setVideoEnabled(!s.pause), a.updatePipSource(i.id, !s.pause)), i.producers.push(N(N({}, s), {}, { producingTransportId: s.producingTransportId, kind: s.kind === la.AUDIO ? "audio" : "video", producingPeerId: e, mimeType: s.mimeType }));
|
|
19747
|
-
}), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(ye.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit(
|
|
19741
|
+
}), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(ye.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19748
19742
|
}
|
|
19749
19743
|
}
|
|
19750
19744
|
/**
|
|
@@ -19801,26 +19795,26 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19801
19795
|
}), this.roomSocketHandler.on(Q.leaveRoom, function(r) {
|
|
19802
19796
|
var n = r.peer.peerId;
|
|
19803
19797
|
e.selectedPeers.delete(n, e.context), e.onParticipantLeave(n);
|
|
19804
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19798
|
+
}), this.context.getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
|
|
19805
19799
|
e.self.permissions.acceptWaitingRequests && e.roomSocketHandler.getWaitingRoomRequests();
|
|
19806
19800
|
}), this.self.permissions.on("permissionsUpdate", function(r) {
|
|
19807
19801
|
var n = r.acceptWaitingRequests;
|
|
19808
19802
|
n !== void 0 && (n ? e.roomSocketHandler.getWaitingRoomRequests() : e.participants.waitlisted.clear());
|
|
19809
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19803
|
+
}), this.context.getValue("peerSessionStore").on(j.SOCKET_SERVICE_DISCONNECTED, function() {
|
|
19810
19804
|
e.participants.joined.clear(), e.participants.videoSubscribed.clear(), e.participants.audioSubscribed.clear(), e.participants.pinned.clear(), e.participants.currentPage = 0, e.participants.viewMode = "ACTIVE_GRID", e.participants.emit("viewModeChanged", { viewMode: "ACTIVE_GRID", currentPage: e.participants.currentPage, pageCount: e.participants.pageCount });
|
|
19811
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19805
|
+
}), this.context.getValue("peerSessionStore").on(j.CONSUMER_PAUSED, function(r) {
|
|
19812
19806
|
var n = r.id;
|
|
19813
19807
|
e.processConsumerPaused(n);
|
|
19814
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19808
|
+
}), this.context.getValue("peerSessionStore").on(j.CONSUMER_RESUMED, function(r) {
|
|
19815
19809
|
var n = r.id;
|
|
19816
19810
|
e.processConsumerResumed(n);
|
|
19817
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19811
|
+
}), this.context.getValue("peerSessionStore").on(j.NEW_CONSUMER, function(r) {
|
|
19818
19812
|
var n = r.id;
|
|
19819
19813
|
e.processNewConsumer(n);
|
|
19820
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19814
|
+
}), this.context.getValue("peerSessionStore").on(j.CONSUMER_CLOSED, function(r) {
|
|
19821
19815
|
var n = r.id;
|
|
19822
19816
|
e.processConsumerClosed(n);
|
|
19823
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19817
|
+
}), this.context.getValue("peerSessionStore").on(j.ROOM_MESSAGE, /* @__PURE__ */ function() {
|
|
19824
19818
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
19825
19819
|
var i, s, u;
|
|
19826
19820
|
return h().wrap(function(d) {
|
|
@@ -19837,7 +19831,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19837
19831
|
return function(n) {
|
|
19838
19832
|
return r.apply(this, arguments);
|
|
19839
19833
|
};
|
|
19840
|
-
}()), this.context.getValue("peerSessionStore").on(
|
|
19834
|
+
}()), this.context.getValue("peerSessionStore").on(j.MESSAGE, /* @__PURE__ */ function() {
|
|
19841
19835
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
19842
19836
|
var i, s, u;
|
|
19843
19837
|
return h().wrap(function(d) {
|
|
@@ -19860,13 +19854,13 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19860
19854
|
return function(n) {
|
|
19861
19855
|
return r.apply(this, arguments);
|
|
19862
19856
|
};
|
|
19863
|
-
}()), this.context.getValue("peerSessionStore").on(
|
|
19857
|
+
}()), this.context.getValue("peerSessionStore").on(j.LOW_CONSUMER_SCORE, function(r) {
|
|
19864
19858
|
var n = r.peerId, a = r.score, i = r.kind, s = e.participants.joined.get(n);
|
|
19865
19859
|
s && (s.emit("poorConnection", { score: a, kind: i }), e.participants.emit("poorConnection", { participantId: n, score: a, kind: i }));
|
|
19866
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19860
|
+
}), this.context.getValue("peerSessionStore").on(j.CONSUMER_SCORE_UPDATE, function(r) {
|
|
19867
19861
|
var n, a = r.score, i = r.kind, s = r.appData, u = r.peerId, c = r.scoreStats, d = i === "video" && ((n = s == null ? void 0 : s.screenShare) !== null && n !== void 0 ? n : !1), p = e.participants.joined.get(u);
|
|
19868
19862
|
p && (p.emit("mediaScoreUpdate", { kind: i, isScreenshare: d, score: a, participantId: u, scoreStats: c }), e.participants.emit("mediaScoreUpdate", { kind: i, isScreenshare: d, score: a, participantId: u, scoreStats: c }));
|
|
19869
|
-
}), this.context.getValue("peerSessionStore").onAsync(
|
|
19863
|
+
}), this.context.getValue("peerSessionStore").onAsync(j.KICK_PEER, /* @__PURE__ */ function() {
|
|
19870
19864
|
var r = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
19871
19865
|
var i, s;
|
|
19872
19866
|
return h().wrap(function(c) {
|
|
@@ -19885,7 +19879,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19885
19879
|
return function(n) {
|
|
19886
19880
|
return r.apply(this, arguments);
|
|
19887
19881
|
};
|
|
19888
|
-
}()), this.context.getValue("peerSessionStore").on(
|
|
19882
|
+
}()), this.context.getValue("peerSessionStore").on(j.UPDATE_ACTIVE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
19889
19883
|
var n, a, i, s, u = arguments;
|
|
19890
19884
|
return h().wrap(function(d) {
|
|
19891
19885
|
for (; ; )
|
|
@@ -19945,7 +19939,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19945
19939
|
for (; ; )
|
|
19946
19940
|
switch (c.prev = c.next) {
|
|
19947
19941
|
case 0:
|
|
19948
|
-
this.logger.info("onParticipantSocketJoined: peer ".concat(n.id, " has joined socket edge. Processing.")), this.self.id !== n.id && !((a = n.flags) !== null && a !== void 0 && a.recorder) && !((i = n.flags) !== null && i !== void 0 && i.hidden_participant) && !((s = n.flags) !== null && s !== void 0 && s.hiddenParticipant) && (this.participants.videoSubscribed.delete(n.id), this.participants.audioSubscribed.delete(n.id), this.participants.joined.add(n), this.participants.waitlisted.delete(n.id), n.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(
|
|
19942
|
+
this.logger.info("onParticipantSocketJoined: peer ".concat(n.id, " has joined socket edge. Processing.")), this.self.id !== n.id && !((a = n.flags) !== null && a !== void 0 && a.recorder) && !((i = n.flags) !== null && i !== void 0 && i.hidden_participant) && !((s = n.flags) !== null && s !== void 0 && s.hiddenParticipant) && (this.participants.videoSubscribed.delete(n.id), this.participants.audioSubscribed.delete(n.id), this.participants.joined.add(n), this.participants.waitlisted.delete(n.id), n.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(j.UPDATE_STAGE_REQUESTS, { request: { displayName: n.name, userId: n.userId, peerId: n.id }, add: !0 })), this.context.getValue("peerSessionStore").emit(j.PEER_JOINED_INTERNAL, n);
|
|
19949
19943
|
case 3:
|
|
19950
19944
|
case "end":
|
|
19951
19945
|
return c.stop();
|
|
@@ -19963,7 +19957,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19963
19957
|
for (; ; )
|
|
19964
19958
|
switch (d.prev = d.next) {
|
|
19965
19959
|
case 0:
|
|
19966
|
-
a = this.participants.joined.get(n), this.participants.joined.delete(n, !0, !0), this.participants.pinned.delete(n, !0, !0), this.participants.waitlisted.delete(n, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(n), this.roomNodeClient.closeConsumers(a == null ? void 0 : a.producers)), a && a.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(
|
|
19960
|
+
a = this.participants.joined.get(n), this.participants.joined.delete(n, !0, !0), this.participants.pinned.delete(n, !0, !0), this.participants.waitlisted.delete(n, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(n), this.roomNodeClient.closeConsumers(a == null ? void 0 : a.producers)), a && a.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(j.UPDATE_STAGE_REQUESTS, { request: { displayName: a.name, userId: a.userId, peerId: a.id }, add: !1 }), i = this.participants.currentPage, s = this.maxPreferredStreams * (i - 1), u = this.participants.videoSubscribed.get(n), this.participants.viewMode === "MANUAL" ? this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i }) : s === 0 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.joined.size <= s ? i === 2 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.setPage(i - 1) : u && this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i });
|
|
19967
19961
|
case 10:
|
|
19968
19962
|
case "end":
|
|
19969
19963
|
return d.stop();
|
|
@@ -19989,7 +19983,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
19989
19983
|
p && (p.consumer = { id: e, peerId: a, kind: void 0, appData: s, paused: u, producerId: c, rtpReceiver: void 0, localId: void 0 });
|
|
19990
19984
|
var v = [];
|
|
19991
19985
|
s && s.screenShare ? (d.setScreenShareEnabled(!1), this.context.getValue("callstats").consumerSharedMediaState(e, { screen: !1 }), d.screenShareTracks.video && v.push(d.screenShareTracks.video.id), d.screenShareTracks.audio && v.push(d.screenShareTracks.audio.id), d.screenShareTracks = { audio: void 0, video: void 0 }) : i === "audio" ? (d.setAudioEnabled(!1), d.audioTrack && v.push(d.audioTrack.id), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !1 }), d.audioTrack = void 0) : i === "video" && (d.setVideoEnabled(!1), this.updatePipSource(d.id, !1), d.videoTrack && v.push(d.videoTrack.id), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !1 }), d.videoTrack = void 0), s.e2ee && v.forEach(function(f) {
|
|
19992
|
-
r.context.getValue("peerSessionStore").emit(
|
|
19986
|
+
r.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_CONSUMER, { peerId: a, trackId: f });
|
|
19993
19987
|
});
|
|
19994
19988
|
}
|
|
19995
19989
|
} }, { key: "processConsumerResumed", value: function(e) {
|
|
@@ -20001,7 +19995,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
20001
19995
|
var f = v.producers.find(function(k) {
|
|
20002
19996
|
return k.producerId === c;
|
|
20003
19997
|
});
|
|
20004
|
-
if (f && (f.consumer = { id: e, peerId: n, kind: a, appData: i, paused: u, producerId: c, rtpReceiver: d, localId: p }), i.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
19998
|
+
if (f && (f.consumer = { id: e, peerId: n, kind: a, appData: i, paused: u, producerId: c, rtpReceiver: d, localId: p }), i.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s }), i.screenShare) {
|
|
20005
19999
|
var g;
|
|
20006
20000
|
a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), v.setScreenShareEnabled(!0), (g = this.context) === null || g === void 0 || g.getValue("callstats").consumerSharedMediaState(e, { screen: !0 });
|
|
20007
20001
|
return;
|
|
@@ -20019,7 +20013,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
20019
20013
|
var f = v.producers.find(function(g) {
|
|
20020
20014
|
return g.producerId === c;
|
|
20021
20015
|
});
|
|
20022
|
-
f && (f.consumer = { id: e, peerId: n, kind: a, appData: s, paused: u, producerId: c, rtpReceiver: d, localId: p }), i && s.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
20016
|
+
f && (f.consumer = { id: e, peerId: n, kind: a, appData: s, paused: u, producerId: c, rtpReceiver: d, localId: p }), i && s.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_CONSUMER, { peerId: n, trackId: i.id }), a === "video" ? (v.videoTrack = i, v.setVideoEnabled(!1), this.updatePipSource(v.id, !1), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !1 })) : a === "audio" && (v.audioTrack = i, v.setAudioEnabled(v.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: v.audioEnabled }));
|
|
20023
20017
|
}
|
|
20024
20018
|
}
|
|
20025
20019
|
} }, { key: "processNewConsumer", value: function(e) {
|
|
@@ -20035,7 +20029,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
20035
20029
|
a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), (!i || this.self.permissions.isRecorder || this.context.getValue("flagsmith").hasFeature(ye.SCREEENSHARE_ERR_HACK)) && v.setScreenShareEnabled(!0), u.supportsRemoteControl && (v.supportsRemoteControl = !0), this.participants.broadcastMessage("screenshareConsumerCreated", { producerId: c, peerId: n, screenShare: !0, consumerId: e, consumerPeerId: this.self.id }), this.logger.info("ParticipantController::newScreenshareConsumer::screenshareConsumerCreated", { consumer: { id: e, peerId: n, kind: a, remotelyPaused: i, appData: u, producerId: c } });
|
|
20036
20030
|
return;
|
|
20037
20031
|
}
|
|
20038
|
-
a === "video" ? (v.videoTrack = s, i || (v.setVideoEnabled(!0), this.updatePipSource(v.id, !0)), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !i })) : a === "audio" && (v.audioTrack = s, i || v.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !i })), !i && u.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
20032
|
+
a === "video" ? (v.videoTrack = s, i || (v.setVideoEnabled(!0), this.updatePipSource(v.id, !0)), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !i })) : a === "audio" && (v.audioTrack = s, i || v.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !i })), !i && u.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s });
|
|
20039
20033
|
}
|
|
20040
20034
|
}
|
|
20041
20035
|
} }, { key: "onSelectedPeers", value: (
|
|
@@ -20079,7 +20073,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
|
|
|
20079
20073
|
peerId: a,
|
|
20080
20074
|
volume: 1
|
|
20081
20075
|
// priority
|
|
20082
|
-
})), n && this.context.getValue("peerSessionStore").emit(
|
|
20076
|
+
})), n && this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
20083
20077
|
}
|
|
20084
20078
|
} }], [{ key: "formatSocketPeerMessage", value: function(e) {
|
|
20085
20079
|
var r, n, a, i, s, u;
|
|
@@ -20122,13 +20116,13 @@ var ar = Un(Np().permissions), G = /* @__PURE__ */ C("permissions"), gs = /* @__
|
|
|
20122
20116
|
}
|
|
20123
20117
|
v && (yi(l(a, G)[G].plugins, v), a.emit("pluginsUpdate")), f && (yi(l(a, G)[G].polls, f), a.emit("pollsUpdate")), Object.keys(k).length !== 0 && yi(l(a, G)[G], k), a.emit("permissionsUpdate", c);
|
|
20124
20118
|
} }), !r)
|
|
20125
|
-
throw a.logger.error("PermissionPreset::load_preset_permissions_failed"), new
|
|
20119
|
+
throw a.logger.error("PermissionPreset::load_preset_permissions_failed"), new F("Could not load preset permissions.", "0904");
|
|
20126
20120
|
return l(a, Ms)[Ms] = e, l(a, gs)[gs] = n, l(a, G)[G] = r, i && a.setupEvents(), a;
|
|
20127
20121
|
}
|
|
20128
20122
|
return A(t, o), S(t, [{
|
|
20129
20123
|
key: "setupEvents",
|
|
20130
20124
|
value: function() {
|
|
20131
|
-
l(this, Ms)[Ms].getValue("peerSessionStore").on(
|
|
20125
|
+
l(this, Ms)[Ms].getValue("peerSessionStore").on(j.UPDATE_PERMISSIONS, l(this, rd)[rd]);
|
|
20132
20126
|
}
|
|
20133
20127
|
/** @deprecated. Use init() */
|
|
20134
20128
|
}, {
|
|
@@ -20559,7 +20553,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20559
20553
|
if (u = function(b, E) {
|
|
20560
20554
|
a.mediaPermissions[b] = E;
|
|
20561
20555
|
var T = { message: a.mediaPermissions[b], kind: b };
|
|
20562
|
-
E === "DENIED" ? l(a, jr)[jr].getValue("peerSessionStore").emit(
|
|
20556
|
+
E === "DENIED" ? l(a, jr)[jr].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_ERROR, T) : l(a, jr)[jr].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, T);
|
|
20563
20557
|
}, br.getName() !== "firefox") {
|
|
20564
20558
|
k.next = 3;
|
|
20565
20559
|
break;
|
|
@@ -20670,7 +20664,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20670
20664
|
case 21:
|
|
20671
20665
|
this.localMediaHandler = new Nt(u, i.constraints, u == null || (f = u.getValue("defaults")) === null || f === void 0 ? void 0 : f.isNonPreferredDevice, u == null || (g = u.getValue("defaults")) === null || g === void 0 ? void 0 : g.autoSwitchAudioDevice);
|
|
20672
20666
|
case 22:
|
|
20673
|
-
if (u == null || u.getValue("peerSessionStore").on(
|
|
20667
|
+
if (u == null || u.getValue("peerSessionStore").on(j.MEDIA_PERMISSION_UPDATE, /* @__PURE__ */ function() {
|
|
20674
20668
|
var _ = m(/* @__PURE__ */ h().mark(function V(U) {
|
|
20675
20669
|
return h().wrap(function(L) {
|
|
20676
20670
|
for (; ; )
|
|
@@ -20699,7 +20693,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
20699
20693
|
return function(V) {
|
|
20700
20694
|
return _.apply(this, arguments);
|
|
20701
20695
|
};
|
|
20702
|
-
}()), u == null || u.getValue("peerSessionStore").on(
|
|
20696
|
+
}()), u == null || u.getValue("peerSessionStore").on(j.MEDIA_PERMISSION_ERROR, /* @__PURE__ */ function() {
|
|
20703
20697
|
var _ = m(/* @__PURE__ */ h().mark(function V(U) {
|
|
20704
20698
|
var $, L, H;
|
|
20705
20699
|
return h().wrap(function(q) {
|
|
@@ -21423,7 +21417,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21423
21417
|
*/
|
|
21424
21418
|
function(r) {
|
|
21425
21419
|
if (!r)
|
|
21426
|
-
throw new
|
|
21420
|
+
throw new F("Name cannot be empty.", "1103");
|
|
21427
21421
|
this.name = r;
|
|
21428
21422
|
}
|
|
21429
21423
|
) }, { key: "setupTracks", value: function() {
|
|
@@ -21610,7 +21604,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21610
21604
|
s.next = 2;
|
|
21611
21605
|
break;
|
|
21612
21606
|
}
|
|
21613
|
-
throw new
|
|
21607
|
+
throw new F("Unsupported", "1102");
|
|
21614
21608
|
case 2:
|
|
21615
21609
|
return s.next = 4, this.localMediaHandler.updateVideoConstraints(a);
|
|
21616
21610
|
case 4:
|
|
@@ -21633,7 +21627,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21633
21627
|
i.next = 2;
|
|
21634
21628
|
break;
|
|
21635
21629
|
}
|
|
21636
|
-
throw new
|
|
21630
|
+
throw new F("Can`t enable screenshare without joining room", "1105");
|
|
21637
21631
|
case 2:
|
|
21638
21632
|
if (l(this, ur)[ur].canProduceScreenshare !== te.NotAllowed) {
|
|
21639
21633
|
i.next = 4;
|
|
@@ -21691,7 +21685,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21691
21685
|
s.next = 2;
|
|
21692
21686
|
break;
|
|
21693
21687
|
}
|
|
21694
|
-
throw new
|
|
21688
|
+
throw new F("Unsupported", "1102");
|
|
21695
21689
|
case 2:
|
|
21696
21690
|
return s.next = 4, this.localMediaHandler.updateScreenshareConstraints(a);
|
|
21697
21691
|
case 4:
|
|
@@ -21836,7 +21830,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21836
21830
|
i.next = 2;
|
|
21837
21831
|
break;
|
|
21838
21832
|
}
|
|
21839
|
-
throw new
|
|
21833
|
+
throw new F("Can`t pin participants without joining room", "1105");
|
|
21840
21834
|
case 2:
|
|
21841
21835
|
return this.show(), i.abrupt("return", l(this, Ve)[Ve].pinPeer(this.id));
|
|
21842
21836
|
case 4:
|
|
@@ -21859,7 +21853,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21859
21853
|
i.next = 2;
|
|
21860
21854
|
break;
|
|
21861
21855
|
}
|
|
21862
|
-
throw new
|
|
21856
|
+
throw new F("Can`t unpin participants without joining room", "1105");
|
|
21863
21857
|
case 2:
|
|
21864
21858
|
return i.abrupt("return", l(this, Ve)[Ve].pinPeer(null));
|
|
21865
21859
|
case 3:
|
|
@@ -21882,7 +21876,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21882
21876
|
i.next = 2;
|
|
21883
21877
|
break;
|
|
21884
21878
|
}
|
|
21885
|
-
throw new
|
|
21879
|
+
throw new F("Can`t toggle participant tile without joining room", "1105");
|
|
21886
21880
|
case 2:
|
|
21887
21881
|
this.hidden = !0, this.emit("toggleTile", { hidden: this.hidden });
|
|
21888
21882
|
case 4:
|
|
@@ -21897,7 +21891,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21897
21891
|
return r;
|
|
21898
21892
|
}() }, { key: "show", value: function() {
|
|
21899
21893
|
if (!l(this, Me)[Me])
|
|
21900
|
-
throw new
|
|
21894
|
+
throw new F("Can`t toggle participant tile without joining room", "1105");
|
|
21901
21895
|
this.hidden = !1, this.emit("toggleTile", { hidden: this.hidden });
|
|
21902
21896
|
} }, { key: "setDevice", value: function() {
|
|
21903
21897
|
var e = m(/* @__PURE__ */ h().mark(function n(a) {
|
|
@@ -21910,7 +21904,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21910
21904
|
p.next = 2;
|
|
21911
21905
|
break;
|
|
21912
21906
|
}
|
|
21913
|
-
throw new
|
|
21907
|
+
throw new F("No device selected", "1104");
|
|
21914
21908
|
case 2:
|
|
21915
21909
|
if (c = this.getCurrentDevices(), !(a.deviceId && ((c == null || (i = c.audio) === null || i === void 0 ? void 0 : i.deviceId) === a.deviceId || (c == null || (s = c.video) === null || s === void 0 ? void 0 : s.deviceId) === a.deviceId || (c == null || (u = c.speaker) === null || u === void 0 ? void 0 : u.deviceId) === a.deviceId))) {
|
|
21916
21910
|
p.next = 7;
|
|
@@ -21920,7 +21914,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
|
|
|
21920
21914
|
p.next = 7;
|
|
21921
21915
|
break;
|
|
21922
21916
|
}
|
|
21923
|
-
throw new
|
|
21917
|
+
throw new F("Cannot set device currently in use", "1106");
|
|
21924
21918
|
case 7:
|
|
21925
21919
|
p.t0 = a.kind, p.next = p.t0 === "audioinput" ? 10 : p.t0 === "audiooutput" ? 22 : p.t0 === "videoinput" ? 25 : 37;
|
|
21926
21920
|
break;
|
|
@@ -22204,19 +22198,19 @@ var qd = /* @__PURE__ */ function(o) {
|
|
|
22204
22198
|
return P(this, t), r = R(this, t, [e]), r.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
|
|
22205
22199
|
}
|
|
22206
22200
|
return A(t, o), S(t);
|
|
22207
|
-
}(
|
|
22201
|
+
}(F), kn = /* @__PURE__ */ function(o) {
|
|
22208
22202
|
function t(e) {
|
|
22209
22203
|
var r;
|
|
22210
22204
|
return P(this, t), r = R(this, t, [e]), r.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
|
|
22211
22205
|
}
|
|
22212
22206
|
return A(t, o), S(t);
|
|
22213
|
-
}(
|
|
22207
|
+
}(F), qs = /* @__PURE__ */ function(o) {
|
|
22214
22208
|
function t(e) {
|
|
22215
22209
|
var r;
|
|
22216
22210
|
return P(this, t), r = R(this, t, [e]), r.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, kn) : r.stack = new Error(e).stack, r;
|
|
22217
22211
|
}
|
|
22218
22212
|
return A(t, o), S(t);
|
|
22219
|
-
}(
|
|
22213
|
+
}(F), yv = function(t) {
|
|
22220
22214
|
return new Promise(function(e) {
|
|
22221
22215
|
return setTimeout(e, t);
|
|
22222
22216
|
});
|
|
@@ -24887,9 +24881,9 @@ function ep() {
|
|
|
24887
24881
|
n.t0 = t, n.next = n.t0 === "send" ? 9 : n.t0 === "recv" ? 12 : 15;
|
|
24888
24882
|
break;
|
|
24889
24883
|
case 9:
|
|
24890
|
-
return this.logger.info("Transport reconnected", { transport: l(this, sr)[sr] }), this.context.getValue("peerSessionStore").emit(
|
|
24884
|
+
return this.logger.info("Transport reconnected", { transport: l(this, sr)[sr] }), this.context.getValue("peerSessionStore").emit(j.RESET_PRODUCER_STATE), n.abrupt("break", 16);
|
|
24891
24885
|
case 12:
|
|
24892
|
-
return this.logger.info("Transport reconnected", { transport: l(this, or)[or] }), this.context.getValue("peerSessionStore").emit(
|
|
24886
|
+
return this.logger.info("Transport reconnected", { transport: l(this, or)[or] }), this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { createAllConsumers: !0 }), n.abrupt("break", 16);
|
|
24893
24887
|
case 15:
|
|
24894
24888
|
this.logger.warn("Unknown transport direction", { transport: { type: t } });
|
|
24895
24889
|
case 16:
|
|
@@ -24903,7 +24897,7 @@ function ep() {
|
|
|
24903
24897
|
}
|
|
24904
24898
|
function dO(o) {
|
|
24905
24899
|
var t = o.state, e = o.direction;
|
|
24906
|
-
l(this, Ns)[Ns].mediaState[e] = { state: t }, this.context.getValue("peerSessionStore").emit(
|
|
24900
|
+
l(this, Ns)[Ns].mediaState[e] = { state: t }, this.context.getValue("peerSessionStore").emit(j.TRANSPORT_STATE_UPDATE, N({ transport: e }, l(this, Ns)[Ns].mediaState[e]));
|
|
24907
24901
|
}
|
|
24908
24902
|
var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /* @__PURE__ */ function() {
|
|
24909
24903
|
function o(t, e, r, n, a) {
|
|
@@ -25152,7 +25146,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
25152
25146
|
case 2:
|
|
25153
25147
|
return d.prev = 2, d.next = 5, this.sendTransport.produce(a, l(this, ld)[ld].bind(this));
|
|
25154
25148
|
case 5:
|
|
25155
|
-
return u = d.sent, (s = a.appData) !== null && s !== void 0 && s.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
25149
|
+
return u = d.sent, (s = a.appData) !== null && s !== void 0 && s.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, u), l(this, cd)[cd](u, i), d.abrupt("return", u);
|
|
25156
25150
|
case 11:
|
|
25157
25151
|
throw d.prev = 11, d.t0 = d.catch(2), this.logger.error("Failed to create producer", { error: d.t0 }), l(this, ud)[ud].producerCreationFailureCount += 1, d.t0;
|
|
25158
25152
|
case 16:
|
|
@@ -25180,7 +25174,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
|
|
|
25180
25174
|
case 4:
|
|
25181
25175
|
return i != null && i.stopTrack && s.track.stop(), d.prev = 5, d.next = 8, this.sendTransport.closeProducer(s);
|
|
25182
25176
|
case 8:
|
|
25183
|
-
(u = this.context.getValue("modules").e2ee) !== null && u !== void 0 && u.enabled && this.context.getValue("peerSessionStore").emit(
|
|
25177
|
+
(u = this.context.getValue("modules").e2ee) !== null && u !== void 0 && u.enabled && this.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_PRODUCER, s), d.next = 14;
|
|
25184
25178
|
break;
|
|
25185
25179
|
case 11:
|
|
25186
25180
|
d.prev = 11, d.t0 = d.catch(5), this.logger.error("Failed to close producer on server", { error: d.t0, producer: s });
|
|
@@ -25399,7 +25393,7 @@ function kO(o) {
|
|
|
25399
25393
|
for (; ; )
|
|
25400
25394
|
switch (i.prev = i.next) {
|
|
25401
25395
|
case 0:
|
|
25402
|
-
t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t, $n)[$n].delete(o.id), t.context.getValue("peerSessionStore").emit(
|
|
25396
|
+
t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t, $n)[$n].delete(o.id), t.context.getValue("peerSessionStore").emit(j.CONSUMER_CLOSED, { id: o.id });
|
|
25403
25397
|
case 3:
|
|
25404
25398
|
case "end":
|
|
25405
25399
|
return i.stop();
|
|
@@ -25409,7 +25403,7 @@ function kO(o) {
|
|
|
25409
25403
|
return function(r) {
|
|
25410
25404
|
return e.apply(this, arguments);
|
|
25411
25405
|
};
|
|
25412
|
-
}()), l(this, $n)[$n].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(
|
|
25406
|
+
}()), l(this, $n)[$n].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(j.NEW_CONSUMER, { id: o.id, appData: o.appData, peerId: o.peerId });
|
|
25413
25407
|
}
|
|
25414
25408
|
var ku = /* @__PURE__ */ C("zeroCrossingThreshold"), bu = /* @__PURE__ */ C("minVoiceDuration"), Tu = /* @__PURE__ */ C("hangoverFrames"), Ts = /* @__PURE__ */ C("initialEnergyThreshold"), Vs = /* @__PURE__ */ C("noiseAdaptationRate"), Us = /* @__PURE__ */ C("voiceAdaptationRate"), Vu = /* @__PURE__ */ C("minEnergyThreshold"), Uu = /* @__PURE__ */ C("maxEnergyThreshold"), ws = /* @__PURE__ */ C("energyRatioThreshold"), Mr = /* @__PURE__ */ C("currentEnergyThreshold"), dt = /* @__PURE__ */ C("backgroundNoiseEnergy"), ct = /* @__PURE__ */ C("voiceDetected"), Ea = /* @__PURE__ */ C("consecutiveVoiceFrames"), Ca = /* @__PURE__ */ C("hangoverCount"), en = /* @__PURE__ */ C("noiseEnergyHistory"), ju = /* @__PURE__ */ C("noiseHistorySize"), dd = /* @__PURE__ */ C("updateEnergyThreshold"), pd = /* @__PURE__ */ C("updateNoiseEstimate"), ip = /* @__PURE__ */ C("calculateEnergy"), sp = /* @__PURE__ */ C("calculateZeroCrossingRate"), Yp = /* @__PURE__ */ function() {
|
|
25415
25409
|
function o() {
|
|
@@ -25714,7 +25708,7 @@ var _O = function() {
|
|
|
25714
25708
|
case 2:
|
|
25715
25709
|
return p.next = 4, a.joinRoom(l(a, Ro)[Ro], l(a, Co)[Co], !0, !0);
|
|
25716
25710
|
case 4:
|
|
25717
|
-
u = p.sent, c = u.roomJoined, c && (a.context.getValue("peerSessionStore").emit(
|
|
25711
|
+
u = p.sent, c = u.roomJoined, c && (a.context.getValue("peerSessionStore").emit(j.RESET_PRODUCER_STATE), a.context.getValue("peerSessionStore").emit(j.ROOM_NODE_RECONNECTED));
|
|
25718
25712
|
case 7:
|
|
25719
25713
|
case "end":
|
|
25720
25714
|
return p.stop();
|
|
@@ -25761,7 +25755,7 @@ var _O = function() {
|
|
|
25761
25755
|
case 9:
|
|
25762
25756
|
return d = f.sent, f.abrupt("return", d);
|
|
25763
25757
|
case 13:
|
|
25764
|
-
return f.prev = 13, f.t0 = f.catch(6), this.logger.error("Error in room joining process", { error: f.t0 }), this.context.getValue("peerSessionStore").emit(
|
|
25758
|
+
return f.prev = 13, f.t0 = f.catch(6), this.logger.error("Error in room joining process", { error: f.t0 }), this.context.getValue("peerSessionStore").emit(j.ROOM_NODE_FAILED), f.abrupt("return", { roomJoined: !1 });
|
|
25765
25759
|
case 18:
|
|
25766
25760
|
case "end":
|
|
25767
25761
|
return f.stop();
|
|
@@ -26088,7 +26082,7 @@ var _O = function() {
|
|
|
26088
26082
|
f.next = 33;
|
|
26089
26083
|
break;
|
|
26090
26084
|
case 30:
|
|
26091
|
-
throw f.prev = 30, f.t0 = f.catch(0), new
|
|
26085
|
+
throw f.prev = 30, f.t0 = f.catch(0), new F(f.t0);
|
|
26092
26086
|
case 33:
|
|
26093
26087
|
case "end":
|
|
26094
26088
|
return f.stop();
|
|
@@ -26183,7 +26177,7 @@ var _O = function() {
|
|
|
26183
26177
|
}
|
|
26184
26178
|
return this.logger.info("resumeMic::mic_producer_already_resumed"), u.abrupt("return");
|
|
26185
26179
|
case 10:
|
|
26186
|
-
a.resume(), a.appData.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
26180
|
+
a.resume(), a.appData.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, a), i = { producerId: a.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(i));
|
|
26187
26181
|
case 14:
|
|
26188
26182
|
case "end":
|
|
26189
26183
|
return u.stop();
|
|
@@ -26215,7 +26209,7 @@ var _O = function() {
|
|
|
26215
26209
|
}
|
|
26216
26210
|
return this.logger.info("resumeWebcam::webcam_producer_already_resumed"), d.abrupt("return");
|
|
26217
26211
|
case 11:
|
|
26218
|
-
i.resume(), i.appData.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
26212
|
+
i.resume(), i.appData.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, i), s = { producerId: i.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(s));
|
|
26219
26213
|
case 15:
|
|
26220
26214
|
case "end":
|
|
26221
26215
|
return d.stop();
|
|
@@ -26567,7 +26561,7 @@ var _O = function() {
|
|
|
26567
26561
|
return;
|
|
26568
26562
|
}
|
|
26569
26563
|
}
|
|
26570
|
-
n.logger.info("producer created broadcast: ".concat(d, ", producer state: ").concat(p)), n.context.getValue("peerSessionStore").emit(
|
|
26564
|
+
n.logger.info("producer created broadcast: ".concat(d, ", producer state: ").concat(p)), n.context.getValue("peerSessionStore").emit(j.NEW_PRODUCER, { peerId: d, producer: N(N({}, p), {}, { kind: p.kind === la.AUDIO ? "audio" : "video", producingPeerId: d }) });
|
|
26571
26565
|
} catch (f) {
|
|
26572
26566
|
n.logger.error("error in peer-producer-create-broadcast", { error: f });
|
|
26573
26567
|
}
|
|
@@ -26579,14 +26573,14 @@ var _O = function() {
|
|
|
26579
26573
|
if (y)
|
|
26580
26574
|
return;
|
|
26581
26575
|
var b = f === la.AUDIO ? "audio" : "video";
|
|
26582
|
-
if (n.logger.info("producer toggle broadcast: ".concat(d, ", producerId: ").concat(k, ", kind:").concat(b, ", paused:").concat(g, " payload: ").concat(JSON.stringify(zh.fromBinary(u)))), d === n.peerId && p !== n.peerId && g && n.context.getValue("peerSessionStore").emit(b === "audio" ?
|
|
26576
|
+
if (n.logger.info("producer toggle broadcast: ".concat(d, ", producerId: ").concat(k, ", kind:").concat(b, ", paused:").concat(g, " payload: ").concat(JSON.stringify(zh.fromBinary(u)))), d === n.peerId && p !== n.peerId && g && n.context.getValue("peerSessionStore").emit(b === "audio" ? j.MUTE_SELF : j.MUTE_SELF_VIDEO), d === n.peerId)
|
|
26583
26577
|
return;
|
|
26584
|
-
n.context.getValue("peerSessionStore").emit(
|
|
26578
|
+
n.context.getValue("peerSessionStore").emit(j.PRODUCER_TOGGLE, { peerId: d, producerId: k, paused: g, kind: b });
|
|
26585
26579
|
var E = Array.from(n.getConsumers().values()).filter(function(T) {
|
|
26586
26580
|
return T.producerId === k;
|
|
26587
26581
|
});
|
|
26588
26582
|
E.forEach(function(T) {
|
|
26589
|
-
T.kind === "video" && g || T.paused !== g && (n.logger.debug("consumer state mismatched for ".concat(T.id, ". updating consumer pause state ").concat(T.paused, " to ").concat(g)), g ? (T.pause(), n.context.getValue("peerSessionStore").emit(
|
|
26583
|
+
T.kind === "video" && g || T.paused !== g && (n.logger.debug("consumer state mismatched for ".concat(T.id, ". updating consumer pause state ").concat(T.paused, " to ").concat(g)), g ? (T.pause(), n.context.getValue("peerSessionStore").emit(j.CONSUMER_PAUSED, { id: T.id })) : (T.resume(), n.context.getValue("peerSessionStore").emit(j.CONSUMER_RESUMED, { id: T.id })));
|
|
26590
26584
|
});
|
|
26591
26585
|
} catch (T) {
|
|
26592
26586
|
n.logger.error("error in producer toggle broadcast handler", { error: T });
|
|
@@ -26600,7 +26594,7 @@ var _O = function() {
|
|
|
26600
26594
|
return;
|
|
26601
26595
|
n.logger.info("peer left broadcast:".concat(d)), l(n, Dt)[Dt].delete(d), l(n, W)[W].consumers.forEach(function(p) {
|
|
26602
26596
|
p.peerId === d && p.close();
|
|
26603
|
-
}), n.context.getValue("peerSessionStore").emit(
|
|
26597
|
+
}), n.context.getValue("peerSessionStore").emit(j.PEER_CLOSED, { id: d });
|
|
26604
26598
|
} catch (p) {
|
|
26605
26599
|
n.logger.error("error in peer left broadcast", { error: p });
|
|
26606
26600
|
}
|
|
@@ -26611,14 +26605,14 @@ var _O = function() {
|
|
|
26611
26605
|
var c = HE.fromBinary(u), d = c.participantId, p = c.producerState.producerId;
|
|
26612
26606
|
if (d === n.peerId)
|
|
26613
26607
|
return;
|
|
26614
|
-
n.logger.info("producer closed broadcast:".concat(d)), n.context.getValue("peerSessionStore").emit(
|
|
26608
|
+
n.logger.info("producer closed broadcast:".concat(d)), n.context.getValue("peerSessionStore").emit(j.PRODUCER_CLOSED, { peerId: d, producerId: p });
|
|
26615
26609
|
var v = l(n, W)[W].producerIdToConsumerIdMap.get(p);
|
|
26616
26610
|
if (!v) {
|
|
26617
26611
|
n.logger.warn("no consumer found for producer:".concat(p));
|
|
26618
26612
|
return;
|
|
26619
26613
|
}
|
|
26620
26614
|
n.logger.info("closing consumer ".concat(v, ", producer id: ").concat(p)), l(n, W)[W].closeConsumer(v).then(function() {
|
|
26621
|
-
n.logger.info("closed consumer: ".concat(v)), l(n, W)[W].producerIdToConsumerIdMap.delete(p), n.context.getValue("peerSessionStore").emit(
|
|
26615
|
+
n.logger.info("closed consumer: ".concat(v)), l(n, W)[W].producerIdToConsumerIdMap.delete(p), n.context.getValue("peerSessionStore").emit(j.CONSUMER_CLOSED, { id: v });
|
|
26622
26616
|
}).catch(function(f) {
|
|
26623
26617
|
n.logger.error("error closing consumer", { error: f });
|
|
26624
26618
|
});
|
|
@@ -26626,7 +26620,7 @@ var _O = function() {
|
|
|
26626
26620
|
n.logger.error("error on producer close broadcast", { error: f });
|
|
26627
26621
|
}
|
|
26628
26622
|
}), l(this, Xe)[Xe].on(l(this, lr)[lr].mediaRoomTerminationBroadcastResponse, function() {
|
|
26629
|
-
!n.mediaJoined && !l(n, oa)[oa] && !l(n, ua)[ua] || (n.logger.warn("media hub termination broadcast received, rejoining room"), n.context.getValue("peerSessionStore").emit(
|
|
26623
|
+
!n.mediaJoined && !l(n, oa)[oa] && !l(n, ua)[ua] || (n.logger.warn("media hub termination broadcast received, rejoining room"), n.context.getValue("peerSessionStore").emit(j.ROOM_NODE_DISCONNECTED), l(n, fo)[fo]());
|
|
26630
26624
|
});
|
|
26631
26625
|
case 5:
|
|
26632
26626
|
case "end":
|
|
@@ -26643,14 +26637,14 @@ var _O = function() {
|
|
|
26643
26637
|
this.context.getValue("callstats").onConsumerScore(function(r) {
|
|
26644
26638
|
r.forEach(function(n, a) {
|
|
26645
26639
|
var i = l(e, W)[W].consumers.get(a);
|
|
26646
|
-
i && e.context.getValue("peerSessionStore").emit(
|
|
26640
|
+
i && e.context.getValue("peerSessionStore").emit(j.CONSUMER_SCORE_UPDATE, { id: a, kind: i.kind, peerId: i.peerId, score: n.score, scoreStats: n });
|
|
26647
26641
|
});
|
|
26648
26642
|
}), this.context.getValue("callstats").onProducerScore(function(r) {
|
|
26649
26643
|
r.forEach(function(n, a) {
|
|
26650
26644
|
var i = Array.from(l(e, W)[W].producers.values()).find(function(s) {
|
|
26651
26645
|
return s.id === a;
|
|
26652
26646
|
});
|
|
26653
|
-
i && e.context.getValue("peerSessionStore").emit(
|
|
26647
|
+
i && e.context.getValue("peerSessionStore").emit(j.PRODUCER_SCORE_UPDATE, { id: a, kind: i.kind, appData: i.appData, score: n.score, scoreStats: n });
|
|
26654
26648
|
});
|
|
26655
26649
|
});
|
|
26656
26650
|
} }, { key: "handlePeerCapabilities", value: function(e, r) {
|
|
@@ -27084,7 +27078,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27084
27078
|
return e;
|
|
27085
27079
|
}() }, { key: "setupEvents", value: function() {
|
|
27086
27080
|
var e = this;
|
|
27087
|
-
l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27081
|
+
l(this, Z)[Z].getValue("peerSessionStore").on(j.RESET_PRODUCER_STATE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
27088
27082
|
return h().wrap(function(a) {
|
|
27089
27083
|
for (; ; )
|
|
27090
27084
|
switch (a.prev = a.next) {
|
|
@@ -27101,16 +27095,16 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27101
27095
|
return a.stop();
|
|
27102
27096
|
}
|
|
27103
27097
|
}, r);
|
|
27104
|
-
}))), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27098
|
+
}))), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_RECONNECTED, function() {
|
|
27105
27099
|
e.self.roomState = "joined", e.self.emit("roomJoined", { reconnected: !0 });
|
|
27106
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27100
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_DISCONNECTED, function() {
|
|
27107
27101
|
e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
|
|
27108
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27102
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_FAILED, function() {
|
|
27109
27103
|
e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
|
|
27110
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27104
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_RECONNECTED, function(r) {
|
|
27111
27105
|
var n = r.wasJoinAttempted;
|
|
27112
27106
|
n === !1 && (e.self.roomState = "init"), e.resetSelf(n);
|
|
27113
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27107
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_DISCONNECTED, function(r) {
|
|
27114
27108
|
var n = r.joinAttempted;
|
|
27115
27109
|
if (e.self.roomState !== "disconnected") {
|
|
27116
27110
|
var a = e.peerId;
|
|
@@ -27120,13 +27114,13 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27120
27114
|
var s = ht();
|
|
27121
27115
|
s.setHeader("tracing-id", a), Ha.remapContext(a, l(e, Z)[Z]), e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" });
|
|
27122
27116
|
}
|
|
27123
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27117
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_FAILED, function() {
|
|
27124
27118
|
e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
|
|
27125
27119
|
}), l(this, tt)[tt].on(Q.waitingRoomRequestAccepted, function() {
|
|
27126
27120
|
e.waitlistAcceptHandler();
|
|
27127
27121
|
}), l(this, tt)[tt].on($l.updateUserPreset, function(r) {
|
|
27128
27122
|
r.updatePeersPresets.forEach(function(n) {
|
|
27129
|
-
n.userIds === e.self.userId && l(e, Z)[Z].getValue("peerSessionStore").emit(
|
|
27123
|
+
n.userIds === e.self.userId && l(e, Z)[Z].getValue("peerSessionStore").emit(j.UPDATE_PERMISSIONS, n.patch);
|
|
27130
27124
|
});
|
|
27131
27125
|
}), l(this, tt)[tt].on(Q.waitingRoomRequestDenied, function() {
|
|
27132
27126
|
e.waitlistRejectedHandler();
|
|
@@ -27134,10 +27128,10 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27134
27128
|
e.kickHandler({ kickType: "kick" });
|
|
27135
27129
|
}), l(this, tt)[tt].on(Q.kickAll, function() {
|
|
27136
27130
|
e.kickHandler({ kickType: "kickAll" });
|
|
27137
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").onAsync(
|
|
27131
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").onAsync(j.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(j.PRODUCER_SCORE_UPDATE, function(r) {
|
|
27138
27132
|
var n, a = r.score, i = r.kind, s = r.appData, u = r.scoreStats, c = (n = s == null ? void 0 : s.screenShare) !== null && n !== void 0 ? n : !1;
|
|
27139
27133
|
e.self.emit("mediaScoreUpdate", { kind: i, isScreenshare: c, score: a, participantId: e.self.id, scoreStats: u });
|
|
27140
|
-
}), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27134
|
+
}), l(this, Z)[Z].getValue("peerSessionStore").on(j.MUTE_SELF, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
27141
27135
|
return h().wrap(function(a) {
|
|
27142
27136
|
for (; ; )
|
|
27143
27137
|
switch (a.prev = a.next) {
|
|
@@ -27154,7 +27148,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27154
27148
|
return a.stop();
|
|
27155
27149
|
}
|
|
27156
27150
|
}, r);
|
|
27157
|
-
}))), l(this, Z)[Z].getValue("peerSessionStore").on(
|
|
27151
|
+
}))), l(this, Z)[Z].getValue("peerSessionStore").on(j.MUTE_SELF_VIDEO, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
27158
27152
|
return h().wrap(function(a) {
|
|
27159
27153
|
for (; ; )
|
|
27160
27154
|
switch (a.prev = a.next) {
|
|
@@ -27171,7 +27165,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27171
27165
|
return a.stop();
|
|
27172
27166
|
}
|
|
27173
27167
|
}, r);
|
|
27174
|
-
}))), l(this, Z)[Z].getValue("peerSessionStore").onAsync(
|
|
27168
|
+
}))), l(this, Z)[Z].getValue("peerSessionStore").onAsync(j.LEAVE_MEDIA_ROOM, this.leaveMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(j.PIP_HANGUP, this.leaveRoom.bind(this));
|
|
27175
27169
|
} }, { key: "joinRoom", value: function() {
|
|
27176
27170
|
var t = m(/* @__PURE__ */ h().mark(function r() {
|
|
27177
27171
|
var n, a, i, s, u = arguments;
|
|
@@ -27286,7 +27280,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
|
|
|
27286
27280
|
this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: n }), w.next = 36;
|
|
27287
27281
|
break;
|
|
27288
27282
|
case 32:
|
|
27289
|
-
throw w.prev = 32, w.t3 = w.catch(2), this.logger.error("Error:SelfController.mediaRoomJoin", { error: w.t3 }), new
|
|
27283
|
+
throw w.prev = 32, w.t3 = w.catch(2), this.logger.error("Error:SelfController.mediaRoomJoin", { error: w.t3 }), new F("Error: could not join media room", "0002");
|
|
27290
27284
|
case 36:
|
|
27291
27285
|
case "end":
|
|
27292
27286
|
return w.stop();
|
|
@@ -27576,11 +27570,11 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
|
|
|
27576
27570
|
case 0:
|
|
27577
27571
|
return this.socket.joinAttempted = !0, i = { capabilities: [], peer: { displayName: (a = n.name) !== null && a !== void 0 ? a : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, s = this.socket.sendMessagePromise(Q.joinRoom, gC.toBinary(i)), b.prev = 3, b.t0 = bo, b.next = 7, s;
|
|
27578
27572
|
case 7:
|
|
27579
|
-
return b.t1 = b.sent.payload, u = b.t0.fromBinary.call(b.t0, b.t1), c = u.peer, l(this, Hr)[Hr].getValue("connectionHandler").socketJoined = !0, l(this, Hr)[Hr].getValue("peerSessionStore").emit(
|
|
27573
|
+
return b.t1 = b.sent.payload, u = b.t0.fromBinary.call(b.t0, b.t1), c = u.peer, l(this, Hr)[Hr].getValue("connectionHandler").socketJoined = !0, l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_ROOM_JOINED, { peer: c }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), b.next = 16, Promise.all([d, p]);
|
|
27580
27574
|
case 16:
|
|
27581
|
-
return v = b.sent, f = He(v, 2), g = f[0].room, k = f[1].peers, l(this, Hr)[Hr].getValue("peerSessionStore").emit(
|
|
27575
|
+
return v = b.sent, f = He(v, 2), g = f[0].room, k = f[1].peers, l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.ROOM_STATE, g), l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.SOCKET_PEERS, k), b.abrupt("return", { peer: c });
|
|
27582
27576
|
case 25:
|
|
27583
|
-
throw b.prev = 25, b.t2 = b.catch(3), this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b.t2 }), new
|
|
27577
|
+
throw b.prev = 25, b.t2 = b.catch(3), this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b.t2 }), new F("Error: RoomSocketHandler.joinRoom failed.", "0002", this.logger, b.t2);
|
|
27584
27578
|
case 29:
|
|
27585
27579
|
case "end":
|
|
27586
27580
|
return b.stop();
|
|
@@ -27941,7 +27935,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
|
|
|
27941
27935
|
var n = r.payload;
|
|
27942
27936
|
try {
|
|
27943
27937
|
var a = Xo.fromBinary(n);
|
|
27944
|
-
l(e, Hr)[Hr].getValue("peerSessionStore").emit(
|
|
27938
|
+
l(e, Hr)[Hr].getValue("peerSessionStore").emit(j.ROOM_MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
|
|
27945
27939
|
} catch (i) {
|
|
27946
27940
|
e.logger.error("failed to decode broadcast message:", i);
|
|
27947
27941
|
}
|
|
@@ -27949,7 +27943,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
|
|
|
27949
27943
|
var n = r.payload;
|
|
27950
27944
|
try {
|
|
27951
27945
|
var a = Xo.fromBinary(n);
|
|
27952
|
-
l(e, Hr)[Hr].getValue("peerSessionStore").emit(
|
|
27946
|
+
l(e, Hr)[Hr].getValue("peerSessionStore").emit(j.MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
|
|
27953
27947
|
} catch (i) {
|
|
27954
27948
|
e.logger.error("failed to decode peer broadcast message:", i);
|
|
27955
27949
|
}
|
|
@@ -28952,7 +28946,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
28952
28946
|
function o(t, e) {
|
|
28953
28947
|
var r, n = e.peerId, a = e.meetingId, i = e.authToken, s = e.capabilities;
|
|
28954
28948
|
if (P(this, o), Object.defineProperty(this, mo, { value: ID }), Object.defineProperty(this, go, { value: AD }), Object.defineProperty(this, Te, { get: RD, set: void 0 }), Object.defineProperty(this, fn, { writable: !0, value: void 0 }), Object.defineProperty(this, be, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, Jr, { writable: !0, value: void 0 }), Object.defineProperty(this, Je, { writable: !0, value: void 0 }), !n || !a || !i)
|
|
28955
|
-
throw new
|
|
28949
|
+
throw new F("peerId, meetingId, or authToken can not be empty", "0404");
|
|
28956
28950
|
l(this, Jr)[Jr] = void 0, l(this, Je)[Je] = t, this.capabilities = s, this.roomName = a, this.authToken = i, l(this, fn)[fn] = l(this, go)[go](n), l(this, be)[be] = new PD(l(this, fn)[fn], { autoReconnect: !0, disconnectOnPingTimeout: (r = s.includes("PING")) !== null && r !== void 0 ? r : !1, queueOnDisconnect: !0, flushOnReconnect: !1, logger: this.logger }), this.handleSocketConnectionEvents();
|
|
28957
28951
|
}
|
|
28958
28952
|
return S(o, [{ key: "joinAttempted", get: function() {
|
|
@@ -29075,8 +29069,8 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
29075
29069
|
var n, a = r.code, i = r.reason;
|
|
29076
29070
|
e.logger.info("SocketService::Disconnected from socket-edge", { error: { code: a, reason: i }, country: D.location.country });
|
|
29077
29071
|
var s = (n = l(e, Te)[Te].mediaState) !== null && n !== void 0 ? n : {}, u = s.recv, c = s.send;
|
|
29078
|
-
u != null && u.state && (u == null ? void 0 : u.state) !== Uo.CONNECTED || c != null && c.state && (c == null ? void 0 : c.state) !== Uo.CONNECTED ? l(e, Je)[Je].getValue("peerSessionStore").emit(
|
|
29079
|
-
l(e, Je)[Je].getValue("peerSessionStore").emit(
|
|
29072
|
+
u != null && u.state && (u == null ? void 0 : u.state) !== Uo.CONNECTED || c != null && c.state && (c == null ? void 0 : c.state) !== Uo.CONNECTED ? l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }) : l(e, Jr)[Jr] = setTimeout(function() {
|
|
29073
|
+
l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }), l(e, Jr)[Jr] = void 0;
|
|
29080
29074
|
}, CD), l(e, Te)[Te].updateSocketConnectionState("disconnected");
|
|
29081
29075
|
}), this.onStateEvent("reconnecting", /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
|
|
29082
29076
|
return h().wrap(function(a) {
|
|
@@ -29114,7 +29108,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
29114
29108
|
for (; ; )
|
|
29115
29109
|
switch (a.prev = a.next) {
|
|
29116
29110
|
case 0:
|
|
29117
|
-
e.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: l(e, Te)[Te].mediaJoinAttempted } }), l(e, Jr)[Jr] && (clearTimeout(l(e, Jr)[Jr]), l(e, Jr)[Jr] = void 0), l(e, Je)[Je].getValue("peerSessionStore").emit(
|
|
29111
|
+
e.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: l(e, Te)[Te].mediaJoinAttempted } }), l(e, Jr)[Jr] && (clearTimeout(l(e, Jr)[Jr]), l(e, Jr)[Jr] = void 0), l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_RECONNECTED, { wasJoinAttempted: l(e, Te)[Te].mediaJoinAttempted }), l(e, Te)[Te].updateSocketConnectionState("reconnected");
|
|
29118
29112
|
case 4:
|
|
29119
29113
|
case "end":
|
|
29120
29114
|
return a.stop();
|
|
@@ -29125,7 +29119,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
|
|
|
29125
29119
|
for (; ; )
|
|
29126
29120
|
switch (a.prev = a.next) {
|
|
29127
29121
|
case 0:
|
|
29128
|
-
e.logger.info("SocketService::Failed to connect to socket-edge", { country: D.location.country }), l(e, Je)[Je].getValue("peerSessionStore").emit(
|
|
29122
|
+
e.logger.info("SocketService::Failed to connect to socket-edge", { country: D.location.country }), l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_FAILED), l(e, Te)[Te].updateSocketConnectionState("failed");
|
|
29129
29123
|
case 3:
|
|
29130
29124
|
case "end":
|
|
29131
29125
|
return a.stop();
|
|
@@ -29644,7 +29638,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
|
|
|
29644
29638
|
B.next = 4;
|
|
29645
29639
|
break;
|
|
29646
29640
|
}
|
|
29647
|
-
throw new
|
|
29641
|
+
throw new F("Browser not supported", "0010", f, !0);
|
|
29648
29642
|
case 4:
|
|
29649
29643
|
return g = cI(n, { authToken: c, baseURL: u, cachedUserDetails: v }), g.setRoomName(d), g.setRoomUUID(d), g.setOrganizationId(p), g.setHeader("tracing-id", s), n.setValue("apiClient", g), k = new xI(n), n.setValue("connectionHandler", k), y = So.createSocketService(n), b = y.connect(), E = g.getUserDetails(), T = g.getPlugins(), O = "", B.prev = 17, B.next = 20, So.setupFlagsmith(n);
|
|
29650
29644
|
case 20:
|
|
@@ -29763,7 +29757,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
|
|
|
29763
29757
|
Re.next = 46;
|
|
29764
29758
|
break;
|
|
29765
29759
|
}
|
|
29766
|
-
throw new
|
|
29760
|
+
throw new F("The plugin module cannot be initialized without the `participant` module", "0102");
|
|
29767
29761
|
case 46:
|
|
29768
29762
|
return Re.next = 48, s;
|
|
29769
29763
|
case 48:
|
|
@@ -29866,7 +29860,7 @@ function jD(o, t) {
|
|
|
29866
29860
|
var s = "https://".concat(Fs({ servicePrefix: "api", baseURI: i }));
|
|
29867
29861
|
return { meetingId: r, orgId: n, participantId: a, baseURI: i, apiBase: s };
|
|
29868
29862
|
} catch (u) {
|
|
29869
|
-
throw new
|
|
29863
|
+
throw new F("Invalid auth token", "0004");
|
|
29870
29864
|
}
|
|
29871
29865
|
}
|
|
29872
29866
|
var _n = /* @__PURE__ */ C("audioEl"), Ra = /* @__PURE__ */ C("stream"), Aa = /* @__PURE__ */ C("tracks"), Gu = /* @__PURE__ */ C("onError"), fd = /* @__PURE__ */ C("runErrorCallbacks"), FD = /* @__PURE__ */ function() {
|