@cloudflare/realtimekit 1.2.4-staging.4 → 1.2.4-staging.6
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 +10 -10
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +257 -261
- package/dist/index.es5.js +255 -267
- package/dist/index.rn.js +8 -8
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -6034,7 +6034,7 @@ const mr = new fw(), vw = {
|
|
|
6034
6034
|
Object.keys(dd).forEach((s) => {
|
|
6035
6035
|
dd[s] = `{${vw[s.slice(0, 2)]}} ${dd[s]}`;
|
|
6036
6036
|
});
|
|
6037
|
-
class
|
|
6037
|
+
class k extends Error {
|
|
6038
6038
|
constructor(e, r, i = void 0, a = !1) {
|
|
6039
6039
|
super(e);
|
|
6040
6040
|
h(this, "code");
|
|
@@ -6061,10 +6061,10 @@ ${this.message}`;
|
|
|
6061
6061
|
}
|
|
6062
6062
|
}
|
|
6063
6063
|
function Qc(s, t, e, r) {
|
|
6064
|
-
if (r instanceof
|
|
6064
|
+
if (r instanceof k)
|
|
6065
6065
|
throw r;
|
|
6066
6066
|
if (r instanceof t) {
|
|
6067
|
-
const i = new
|
|
6067
|
+
const i = new k(r.message, e);
|
|
6068
6068
|
throw i.stack = r.stack, i;
|
|
6069
6069
|
} else
|
|
6070
6070
|
throw r;
|
|
@@ -6157,7 +6157,7 @@ function yw() {
|
|
|
6157
6157
|
);
|
|
6158
6158
|
}));
|
|
6159
6159
|
}
|
|
6160
|
-
var
|
|
6160
|
+
var b = /* @__PURE__ */ ((s) => (s.NEW_PRODUCER = "NEW_PRODUCER", s.ROOM_NODE_CONNECTION_ERROR = "ROOM_NODE_CONNECTION_ERROR", s.SOCKET_SERVICE_ROOM_JOINED = "SOCKET_SERVICE_ROOM_JOINED", s.SOCKET_SERVICE_RECONNECTED = "SOCKET_SERVICE_RECONNECTED", s.SOCKET_SERVICE_DISCONNECTED = "SOCKET_SERVICE_DISCONNECTED", s.SOCKET_SERVICE_FAILED = "SOCKET_SERVICE_FAILED", s.SOCKET_STATE_UPDATE = "SOCKET_STATE_UPDATE", s.ROOM_NODE_RECONNECTED = "ROOM_NODE_RECONNECTED", s.ROOM_NODE_DISCONNECTED = "ROOM_NODE_DISCONNECTED", s.ROOM_NODE_FAILED = "ROOM_NODE_FAILED", s.TRANSPORT_STATE_UPDATE = "TRANSPORT_STATE_UPDATE", s.PRODUCER_SCORE_UPDATE = "PRODUCER_SCORE_UPDATE", s.CONSUMER_SCORE_UPDATE = "CONSUMER_SCORE_UPDATE", s.PRODUCER_STATUS_UPDATE = "PRODUCER_STATUS_UPDATE", s.CONSUMER_STATUS_UPDATE = "CONSUMER_STATUS_UPDATE", s.LOW_CONSUMER_SCORE = "LOW_CONSUMER_SCORE", s.MEDIA_PERMISSION_ERROR = "MEDIA_PERMISSION_ERROR", s.MEDIA_PERMISSION_UPDATE = "MEDIA_PERMISSION_UPDATE", s.MESSAGE = "websocket/message", s.ROOM_MESSAGE = "websocket/room-message", s.PEER_JOINED_INTERNAL = "peer/joined-internal", s.PEER_CLOSED = "websocket/peer-closed", s.CONSUMER_CLOSED = "websocket/consumer-closed", s.CONSUMER_PAUSED = "websocket/consumer-paused", s.CONSUMER_RESUMED = "websocket/consumer-resumed", s.PRODUCER_CLOSED = "websocket/producer-closed", s.NEW_CONSUMER = "websocket/new-consumer", s.PRODUCER_SCORE = "websocket/producer-score", s.CONSUMER_SCORE = "websocket/consumer-score", s.PRODUCER_TOGGLE = "cf/producer-toggle", s.UPDATE_ACTIVE = "media/update-active", s.RESET_PRODUCER_STATE = "cf/reset-producer-state", s.ROOM_STATE = "sockethub/room-state", s.GET_STAGE_REQUESTS = "GET_STAGE_REQUESTS", s.UPDATE_STAGE_REQUESTS = "UPDATE_STAGE_REQUESTS", s.KICK_PEER = "KICK_PEER", s.UPDATE_PEER_STAGE_STATUS = "UPDATE_PEER_STAGE_STATUS", s.JOIN_MEDIA_ROOM = "JOIN_MEDIA_ROOM", s.LEAVE_MEDIA_ROOM = "LEAVE_MEDIA_ROOM", s.PIP_HANGUP = "PIP_HANGUP", s.E2EE_ACTIVE_PRODUCER = "E2EE_ACTIVE_PRODUCER", s.E2EE_INACTIVE_PRODUCER = "E2EE_INACTIVE_PRODUCER", s.E2EE_ACTIVE_CONSUMER = "E2EE_ACTIVE_CONSUMER", s.E2EE_INACTIVE_CONSUMER = "E2EE_INACTIVE_CONSUMER", s.SOCKET_PEERS = "SOCKET_PEERS", s.UPDATE_PERMISSIONS = "UPDATE_PERMISSIONS", s.MAX_SPATIAL_LAYER_CHANGE = "MAX_SPATIAL_LAYER_CHANGE", s.MUTE_SELF = "MUTE_SELF", s.MUTE_SELF_VIDEO = "MUTE_SELF_VIDEO", s))(b || {});
|
|
6161
6161
|
class $a extends lt.EventEmitter {
|
|
6162
6162
|
constructor(e) {
|
|
6163
6163
|
super();
|
|
@@ -6340,7 +6340,7 @@ const Qh = class extends jt {
|
|
|
6340
6340
|
e === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
6341
6341
|
});
|
|
6342
6342
|
h(this, "eventCallback", (e) => {
|
|
6343
|
-
e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, gi).getValue("peerSessionStore").emit(
|
|
6343
|
+
e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, gi).getValue("peerSessionStore").emit(b.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
6344
6344
|
});
|
|
6345
6345
|
h(this, "unmountEvents", () => {
|
|
6346
6346
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
@@ -12416,7 +12416,7 @@ class KM {
|
|
|
12416
12416
|
method: (C = w.config) == null ? void 0 : C.method,
|
|
12417
12417
|
isOnline: navigator.onLine ? "online" : "offline"
|
|
12418
12418
|
}
|
|
12419
|
-
}), new
|
|
12419
|
+
}), new k(w.message || "Network request failed", "0011")) : new k("Unknown network error occurred", "0011");
|
|
12420
12420
|
}
|
|
12421
12421
|
});
|
|
12422
12422
|
}
|
|
@@ -12664,7 +12664,7 @@ class Gt extends KM {
|
|
|
12664
12664
|
try {
|
|
12665
12665
|
return { transcript: (yield this.fetchClient.get(e)).data };
|
|
12666
12666
|
} catch (r) {
|
|
12667
|
-
throw new
|
|
12667
|
+
throw new k("Cant fetch transcript s3 url", "1801");
|
|
12668
12668
|
}
|
|
12669
12669
|
});
|
|
12670
12670
|
}
|
|
@@ -12743,7 +12743,7 @@ function Mt(s, t) {
|
|
|
12743
12743
|
return i.value = function(...d) {
|
|
12744
12744
|
const l = Date.now(), p = t ? this[t] : s;
|
|
12745
12745
|
if (l - c > p.period * 1e3 && (c = l, o = 0), o >= p.maxInvocations)
|
|
12746
|
-
throw new
|
|
12746
|
+
throw new k(`Method rate limit ${p.maxInvocations} invocations/${p.period}sec exceeded`, "0013");
|
|
12747
12747
|
return o += 1, a.apply(this, d);
|
|
12748
12748
|
}, i;
|
|
12749
12749
|
};
|
|
@@ -12846,14 +12846,14 @@ let ze = (Ag = class extends jt {
|
|
|
12846
12846
|
return u(this, null, function* () {
|
|
12847
12847
|
var a, o, c, d, l, p;
|
|
12848
12848
|
if (t.length > this.maxTextLimit)
|
|
12849
|
-
throw new
|
|
12849
|
+
throw new k("Max character limit breached", "0503");
|
|
12850
12850
|
if (e && e.length > 0) {
|
|
12851
12851
|
if (!((a = n(this, Z).permissions) != null && a.chatPrivate.canSend) || !((o = n(this, Z).permissions) != null && o.chatPrivate.text))
|
|
12852
|
-
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new
|
|
12852
|
+
throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new k("Could not send message to private chat.", "0501");
|
|
12853
12853
|
} else if (!((d = (c = n(this, Z).permissions) == null ? void 0 : c.chatPublic) != null && d.canSend) || !((p = (l = n(this, Z).permissions) == null ? void 0 : l.chatPublic) != null && p.text))
|
|
12854
|
-
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new
|
|
12854
|
+
throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new k("Could not send message to public chat.", "0501");
|
|
12855
12855
|
if (!t)
|
|
12856
|
-
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new
|
|
12856
|
+
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new k("Message can not be empty.", "0502");
|
|
12857
12857
|
if (r) {
|
|
12858
12858
|
n(this, Oe).sendMessageToChannel(t, Et.TEXT, r);
|
|
12859
12859
|
return;
|
|
@@ -12911,7 +12911,7 @@ let ze = (Ag = class extends jt {
|
|
|
12911
12911
|
e
|
|
12912
12912
|
);
|
|
12913
12913
|
} catch (g) {
|
|
12914
|
-
throw new
|
|
12914
|
+
throw new k("Error sending image message.", "0500", this.logger);
|
|
12915
12915
|
}
|
|
12916
12916
|
});
|
|
12917
12917
|
}
|
|
@@ -12966,7 +12966,7 @@ let ze = (Ag = class extends jt {
|
|
|
12966
12966
|
e
|
|
12967
12967
|
);
|
|
12968
12968
|
} catch (p) {
|
|
12969
|
-
throw new
|
|
12969
|
+
throw new k("Error sending file message.", "0500", this.logger);
|
|
12970
12970
|
}
|
|
12971
12971
|
});
|
|
12972
12972
|
}
|
|
@@ -13018,7 +13018,7 @@ let ze = (Ag = class extends jt {
|
|
|
13018
13018
|
size: N.size
|
|
13019
13019
|
};
|
|
13020
13020
|
} catch (B) {
|
|
13021
|
-
throw new
|
|
13021
|
+
throw new k("Error sending image message.", "0500", this.logger);
|
|
13022
13022
|
}
|
|
13023
13023
|
}), i = H(D({}, t), {
|
|
13024
13024
|
files: yield Promise.all((_ = (P = t.files) != null ? P : []) == null ? void 0 : _.map((N) => u(this, null, function* () {
|
|
@@ -13057,7 +13057,7 @@ let ze = (Ag = class extends jt {
|
|
|
13057
13057
|
return u(this, null, function* () {
|
|
13058
13058
|
var i, a, o, c, d, l;
|
|
13059
13059
|
if (((a = (i = n(this, Z).permissions) == null ? void 0 : i.chatMessage) == null ? void 0 : a.canEdit) === "NONE")
|
|
13060
|
-
throw new
|
|
13060
|
+
throw new k("Not permitted to edit messages", "0501");
|
|
13061
13061
|
if (!((c = (o = n(this, Z).permissions) == null ? void 0 : o.chatPublic) != null && c.canSend) || !((l = (d = n(this, Z).permissions) == null ? void 0 : d.chatPublic) != null && l.text)) {
|
|
13062
13062
|
this.logger.error("editTextMessage::permission_denied");
|
|
13063
13063
|
return;
|
|
@@ -13100,7 +13100,7 @@ let ze = (Ag = class extends jt {
|
|
|
13100
13100
|
r
|
|
13101
13101
|
);
|
|
13102
13102
|
} catch (l) {
|
|
13103
|
-
throw new
|
|
13103
|
+
throw new k("Error editing image message.", "0500", this.logger);
|
|
13104
13104
|
}
|
|
13105
13105
|
});
|
|
13106
13106
|
}
|
|
@@ -13131,7 +13131,7 @@ let ze = (Ag = class extends jt {
|
|
|
13131
13131
|
r
|
|
13132
13132
|
);
|
|
13133
13133
|
} catch (d) {
|
|
13134
|
-
throw new
|
|
13134
|
+
throw new k("Error editing file message.", "0500", this.logger);
|
|
13135
13135
|
}
|
|
13136
13136
|
});
|
|
13137
13137
|
}
|
|
@@ -13163,7 +13163,7 @@ let ze = (Ag = class extends jt {
|
|
|
13163
13163
|
return u(this, null, function* () {
|
|
13164
13164
|
var r, i;
|
|
13165
13165
|
if (((i = (r = n(this, Z).permissions) == null ? void 0 : r.chatMessage) == null ? void 0 : i.canDelete) === "NONE")
|
|
13166
|
-
throw new
|
|
13166
|
+
throw new k("Not permitted to delete messages", "0501");
|
|
13167
13167
|
n(this, Oe).deleteMessage(t, e);
|
|
13168
13168
|
});
|
|
13169
13169
|
}
|
|
@@ -13196,15 +13196,13 @@ let ze = (Ag = class extends jt {
|
|
|
13196
13196
|
pin(t) {
|
|
13197
13197
|
return u(this, null, function* () {
|
|
13198
13198
|
if (!n(this, No, Lu))
|
|
13199
|
-
throw new
|
|
13200
|
-
if (!n(this, Z).permissions.pinParticipant)
|
|
13201
|
-
throw new b("You do not have permission to pin messages.", "0501");
|
|
13199
|
+
throw new k("Can`t pin message without joining room", "0505");
|
|
13202
13200
|
const e = this.messages.find((r) => r.id === t);
|
|
13203
13201
|
if (e) {
|
|
13204
13202
|
n(this, Oe).setPinState(e, !0);
|
|
13205
13203
|
return;
|
|
13206
13204
|
}
|
|
13207
|
-
throw new
|
|
13205
|
+
throw new k(`No message found with id: ${t}`, "0504");
|
|
13208
13206
|
});
|
|
13209
13207
|
}
|
|
13210
13208
|
/**
|
|
@@ -13214,15 +13212,13 @@ let ze = (Ag = class extends jt {
|
|
|
13214
13212
|
unpin(t) {
|
|
13215
13213
|
return u(this, null, function* () {
|
|
13216
13214
|
if (!n(this, No, Lu))
|
|
13217
|
-
throw new
|
|
13218
|
-
if (!n(this, Z).permissions.pinParticipant)
|
|
13219
|
-
throw new b("You do not have permission to unpin messages.", "0501");
|
|
13215
|
+
throw new k("Can`t unpin message without joining room", "0505");
|
|
13220
13216
|
const e = this.messages.find((r) => r.id === t);
|
|
13221
13217
|
if (e) {
|
|
13222
13218
|
n(this, Oe).setPinState(e, !1);
|
|
13223
13219
|
return;
|
|
13224
13220
|
}
|
|
13225
|
-
throw new
|
|
13221
|
+
throw new k(`No message found with id: ${t}`, "0504");
|
|
13226
13222
|
});
|
|
13227
13223
|
}
|
|
13228
13224
|
fetchMessages(d) {
|
|
@@ -13271,14 +13267,14 @@ let ze = (Ag = class extends jt {
|
|
|
13271
13267
|
const o = (l = n(this, Z).permissions) == null ? void 0 : l.chatChannel;
|
|
13272
13268
|
if (o) {
|
|
13273
13269
|
if (o.canCreate === "NONE")
|
|
13274
|
-
throw new
|
|
13270
|
+
throw new k("Not permitted to create channels", "0501");
|
|
13275
13271
|
if (r.visibility === "public" && !(o.canCreate === "PUBLIC" || o.canCreate === "ALL"))
|
|
13276
|
-
throw new
|
|
13272
|
+
throw new k("Not permitted to create public channels", "0501");
|
|
13277
13273
|
if (r.visibility === "private" && !(o.canCreate === "PRIVATE" || o.canCreate === "ALL"))
|
|
13278
|
-
throw new
|
|
13274
|
+
throw new k("Not permitted to create private channels", "0501");
|
|
13279
13275
|
}
|
|
13280
13276
|
if (!t || t.trim().length === 0)
|
|
13281
|
-
throw new
|
|
13277
|
+
throw new k("channel name cannot be empty.", "0510");
|
|
13282
13278
|
const c = [.../* @__PURE__ */ new Set([...e, n(this, Z).userId])];
|
|
13283
13279
|
return yield n(this, fi).createChannel(
|
|
13284
13280
|
t.trim(),
|
|
@@ -13294,11 +13290,11 @@ let ze = (Ag = class extends jt {
|
|
|
13294
13290
|
const r = this.channels.find((g) => g.id === t), i = (o = n(this, Z).permissions) == null ? void 0 : o.chatChannel;
|
|
13295
13291
|
if (i) {
|
|
13296
13292
|
if (i.canUpdate === "NONE")
|
|
13297
|
-
throw new
|
|
13293
|
+
throw new k("Not permitted to update channels", "0501");
|
|
13298
13294
|
if (r.visibility === "public" && !(i.canUpdate === "PUBLIC" || i.canUpdate === "ALL"))
|
|
13299
|
-
throw new
|
|
13295
|
+
throw new k("Not permitted to update public channels", "0501");
|
|
13300
13296
|
if (r.visibility === "private" && !(i.canUpdate === "PRIVATE" || i.canUpdate === "ALL"))
|
|
13301
|
-
throw new
|
|
13297
|
+
throw new k("Not permitted to update private channels", "0501");
|
|
13302
13298
|
}
|
|
13303
13299
|
const a = {
|
|
13304
13300
|
memberIds: (c = e.memberIds) != null ? c : r.memberIds,
|
|
@@ -13321,7 +13317,7 @@ let ze = (Ag = class extends jt {
|
|
|
13321
13317
|
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
13322
13318
|
searchMessages(t, e) {
|
|
13323
13319
|
return u(this, null, function* () {
|
|
13324
|
-
throw new
|
|
13320
|
+
throw new k("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
|
|
13325
13321
|
});
|
|
13326
13322
|
}
|
|
13327
13323
|
markLastReadMessage(t, e) {
|
|
@@ -13520,7 +13516,7 @@ const ni = (Mg = class {
|
|
|
13520
13516
|
}
|
|
13521
13517
|
setupEvents() {
|
|
13522
13518
|
n(this, vi).getValue("peerSessionStore").on(
|
|
13523
|
-
|
|
13519
|
+
b.SOCKET_SERVICE_ROOM_JOINED,
|
|
13524
13520
|
() => u(this, null, function* () {
|
|
13525
13521
|
this.getChatMessages();
|
|
13526
13522
|
})
|
|
@@ -13662,7 +13658,7 @@ let xu = (Dg = class extends jt {
|
|
|
13662
13658
|
create(t, e, r = !1, i = !1) {
|
|
13663
13659
|
return u(this, null, function* () {
|
|
13664
13660
|
if (!n(this, $d, Of))
|
|
13665
|
-
throw new
|
|
13661
|
+
throw new k("Can't create polls without joining room", "0705");
|
|
13666
13662
|
if (!n(this, Fn).permissions.polls.canCreate) {
|
|
13667
13663
|
this.logger.error("Polls::create::permission_denied");
|
|
13668
13664
|
return;
|
|
@@ -13760,13 +13756,13 @@ const Tn = (Og = class {
|
|
|
13760
13756
|
r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
|
|
13761
13757
|
}
|
|
13762
13758
|
}, t = () => {
|
|
13763
|
-
n(this, Dr).getValue("peerSessionStore").on(
|
|
13759
|
+
n(this, Dr).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13764
13760
|
this.getPolls();
|
|
13765
13761
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13766
13762
|
n(this, Si).on(r, s[r]);
|
|
13767
13763
|
});
|
|
13768
13764
|
}, e = () => {
|
|
13769
|
-
n(this, Dr).getValue("peerSessionStore").on(
|
|
13765
|
+
n(this, Dr).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13770
13766
|
this.getPolls();
|
|
13771
13767
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13772
13768
|
n(this, Si).removeListeners(r);
|
|
@@ -13892,7 +13888,7 @@ let Uu = (Ng = class extends jt {
|
|
|
13892
13888
|
*/
|
|
13893
13889
|
setBroadcastTabChanges(t) {
|
|
13894
13890
|
if (!n(this, Ti).permissions.canSpotlight)
|
|
13895
|
-
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new
|
|
13891
|
+
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new k("User does not have permission to toggle spotlight", "0801");
|
|
13896
13892
|
this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
|
|
13897
13893
|
}
|
|
13898
13894
|
/**
|
|
@@ -14092,16 +14088,16 @@ const xf = (Lg = class {
|
|
|
14092
14088
|
}
|
|
14093
14089
|
setupEvents() {
|
|
14094
14090
|
n(this, Lt).getValue("peerSessionStore").on(
|
|
14095
|
-
|
|
14091
|
+
b.TRANSPORT_STATE_UPDATE,
|
|
14096
14092
|
(s) => {
|
|
14097
14093
|
this.meta.emit("mediaConnectionUpdate", s);
|
|
14098
14094
|
}
|
|
14099
14095
|
), n(this, Lt).getValue("peerSessionStore").on(
|
|
14100
|
-
|
|
14096
|
+
b.SOCKET_STATE_UPDATE,
|
|
14101
14097
|
(s) => {
|
|
14102
14098
|
this.meta.emit("socketConnectionUpdate", s);
|
|
14103
14099
|
}
|
|
14104
|
-
), n(this, Lt).getValue("peerSessionStore").on(
|
|
14100
|
+
), n(this, Lt).getValue("peerSessionStore").on(b.ROOM_STATE, ({ createdAt: s, roomUuid: t }) => {
|
|
14105
14101
|
const e = this.meta.meetingStartedTimestamp;
|
|
14106
14102
|
if (t && (this.meta.sessionId = t), s && !e) {
|
|
14107
14103
|
const r = new Date(s * 1e3);
|
|
@@ -14110,7 +14106,7 @@ const xf = (Lg = class {
|
|
|
14110
14106
|
});
|
|
14111
14107
|
}
|
|
14112
14108
|
}), n(this, Lt).getValue("peerSessionStore").on(
|
|
14113
|
-
|
|
14109
|
+
b.PRODUCER_SCORE_UPDATE,
|
|
14114
14110
|
({ score: s }) => {
|
|
14115
14111
|
s < 5 && this.meta.emit("poorConnection", { score: s });
|
|
14116
14112
|
}
|
|
@@ -14118,7 +14114,7 @@ const xf = (Lg = class {
|
|
|
14118
14114
|
userId: n(this, Or).userId,
|
|
14119
14115
|
currentTab: this.meta.selfActiveTab
|
|
14120
14116
|
})), n(this, Lt).getValue("peerSessionStore").on(
|
|
14121
|
-
|
|
14117
|
+
b.PEER_JOINED_INTERNAL,
|
|
14122
14118
|
(s) => u(this, null, function* () {
|
|
14123
14119
|
n(this, Or).permissions.canSpotlight && this.meta.selfActiveTab && n(this, jn).broadcastToPeers("spotlight", [s.id], {
|
|
14124
14120
|
userId: n(this, Or).userId,
|
|
@@ -14126,7 +14122,7 @@ const xf = (Lg = class {
|
|
|
14126
14122
|
});
|
|
14127
14123
|
})
|
|
14128
14124
|
), n(this, Lt).getValue("peerSessionStore").on(
|
|
14129
|
-
|
|
14125
|
+
b.ROOM_MESSAGE,
|
|
14130
14126
|
(s) => {
|
|
14131
14127
|
var e, r;
|
|
14132
14128
|
let t;
|
|
@@ -14151,7 +14147,7 @@ const xf = (Lg = class {
|
|
|
14151
14147
|
}), this.conditionallySetActiveTab(t);
|
|
14152
14148
|
}
|
|
14153
14149
|
), n(this, Lt).getValue("peerSessionStore").on(
|
|
14154
|
-
|
|
14150
|
+
b.MESSAGE,
|
|
14155
14151
|
(s) => {
|
|
14156
14152
|
var e, r;
|
|
14157
14153
|
let t;
|
|
@@ -14304,14 +14300,14 @@ class ti extends jt {
|
|
|
14304
14300
|
/**
|
|
14305
14301
|
* NOTE(ishita1805): Update stageRequests when socket sends them.
|
|
14306
14302
|
*/
|
|
14307
|
-
[
|
|
14303
|
+
[b.GET_STAGE_REQUESTS]: (a) => u(this, null, function* () {
|
|
14308
14304
|
f(this, Ds, a);
|
|
14309
14305
|
}),
|
|
14310
14306
|
/**
|
|
14311
14307
|
* NOTE(ishita1805): Update stageRequests when a peer
|
|
14312
14308
|
* who has requested leaves/joins the meeting
|
|
14313
14309
|
*/
|
|
14314
|
-
[
|
|
14310
|
+
[b.UPDATE_STAGE_REQUESTS]: (o) => u(this, [o], function* ({ add: a }) {
|
|
14315
14311
|
const c = n(this, Ds).length, { stageRequests: d } = this.getAccessRequests();
|
|
14316
14312
|
(a || d.length > c) && this.emit("newStageRequest", { count: d.length }), this.emit("stageAccessRequestUpdate", d);
|
|
14317
14313
|
})
|
|
@@ -14337,9 +14333,9 @@ class ti extends jt {
|
|
|
14337
14333
|
}
|
|
14338
14334
|
getAccessRequests() {
|
|
14339
14335
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14340
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14336
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14341
14337
|
if (!n(this, ie).permissions.acceptStageRequests)
|
|
14342
|
-
throw this.logger.error("Stage::get_access_request::permission_denied"), new
|
|
14338
|
+
throw this.logger.error("Stage::get_access_request::permission_denied"), new k("You do not have permission to perform this action", "2001");
|
|
14343
14339
|
const e = n(this, $o).joined.toArray().filter(
|
|
14344
14340
|
(r) => r.stageStatus === "REQUESTED_TO_JOIN_STAGE"
|
|
14345
14341
|
).map((r) => ({
|
|
@@ -14352,9 +14348,9 @@ class ti extends jt {
|
|
|
14352
14348
|
requestAccess() {
|
|
14353
14349
|
return u(this, null, function* () {
|
|
14354
14350
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14355
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14351
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14356
14352
|
if (this.status !== "OFF_STAGE")
|
|
14357
|
-
throw new
|
|
14353
|
+
throw new k(
|
|
14358
14354
|
`Unable to request access you are currently ${this.status}`,
|
|
14359
14355
|
"2006"
|
|
14360
14356
|
);
|
|
@@ -14368,7 +14364,7 @@ class ti extends jt {
|
|
|
14368
14364
|
cancelRequestAccess() {
|
|
14369
14365
|
return u(this, null, function* () {
|
|
14370
14366
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14371
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14367
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14372
14368
|
n(this, Qt).cancelRequestAccess(), U(this, Gn, hd).call(this, "OFF_STAGE");
|
|
14373
14369
|
});
|
|
14374
14370
|
}
|
|
@@ -14377,13 +14373,13 @@ class ti extends jt {
|
|
|
14377
14373
|
*/
|
|
14378
14374
|
grantAccess(e) {
|
|
14379
14375
|
if (!n(this, ie).roomJoined)
|
|
14380
|
-
throw new
|
|
14376
|
+
throw new k(
|
|
14381
14377
|
"Can`t grant for participant without joining room"
|
|
14382
14378
|
);
|
|
14383
14379
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14384
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14380
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14385
14381
|
if (!n(this, ie).permissions.acceptStageRequests)
|
|
14386
|
-
throw this.logger.error("Stage::grant_access::permission_denied"), new
|
|
14382
|
+
throw this.logger.error("Stage::grant_access::permission_denied"), new k("You do not have permission to perform this action", "2001");
|
|
14387
14383
|
return n(this, Qt).grantAccess(e);
|
|
14388
14384
|
}
|
|
14389
14385
|
/**
|
|
@@ -14391,14 +14387,14 @@ class ti extends jt {
|
|
|
14391
14387
|
*/
|
|
14392
14388
|
denyAccess(e) {
|
|
14393
14389
|
if (!n(this, ie).roomJoined)
|
|
14394
|
-
throw new
|
|
14390
|
+
throw new k(
|
|
14395
14391
|
"Can`t rejectRequestToJoinStage for participant without joining room",
|
|
14396
14392
|
"2005"
|
|
14397
14393
|
);
|
|
14398
14394
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14399
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14395
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14400
14396
|
if (!n(this, ie).permissions.acceptStageRequests)
|
|
14401
|
-
throw this.logger.error("Stage::deny_access::permission_denied"), new
|
|
14397
|
+
throw this.logger.error("Stage::deny_access::permission_denied"), new k("You do not have permission to perform this action", "2001");
|
|
14402
14398
|
return n(this, Qt).denyAccess(e);
|
|
14403
14399
|
}
|
|
14404
14400
|
/**
|
|
@@ -14411,9 +14407,9 @@ class ti extends jt {
|
|
|
14411
14407
|
return u(this, null, function* () {
|
|
14412
14408
|
const e = n(this, We).getValue("viewType");
|
|
14413
14409
|
if (this.status === "ON_STAGE")
|
|
14414
|
-
throw new
|
|
14410
|
+
throw new k("You are already on stage.", "2006");
|
|
14415
14411
|
if (this.status !== "ACCEPTED_TO_JOIN_STAGE" || n(this, ie).permissions.stageAccess === j.NotAllowed)
|
|
14416
|
-
throw new
|
|
14412
|
+
throw new k(`Unable to join stage you are currently ${this.status}`, "2006");
|
|
14417
14413
|
if (n(this, We).setValue("stageStatus", "ON_STAGE", !1), yield n(this, Qt).joinStage(), e === At.Livestream) {
|
|
14418
14414
|
yield n(this, We).getValue("selfController").joinRoom();
|
|
14419
14415
|
return;
|
|
@@ -14424,12 +14420,12 @@ class ti extends jt {
|
|
|
14424
14420
|
leave() {
|
|
14425
14421
|
return u(this, null, function* () {
|
|
14426
14422
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14427
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14423
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14428
14424
|
if (!(this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE"))
|
|
14429
|
-
throw new
|
|
14425
|
+
throw new k(`Unable to leave stage you are currently ${this.status}`, "2006");
|
|
14430
14426
|
n(this, ie).setIsPinned(!1), n(this, We).setValue("stageStatus", "OFF_STAGE", !1), yield n(this, Qt).leaveStage(n(this, ie).userId);
|
|
14431
14427
|
try {
|
|
14432
|
-
yield n(this, We).getValue("peerSessionStore").emitAsync(
|
|
14428
|
+
yield n(this, We).getValue("peerSessionStore").emitAsync(b.LEAVE_MEDIA_ROOM, "stageLeft");
|
|
14433
14429
|
} catch (e) {
|
|
14434
14430
|
this.logger.error("Stage::leave::emitAsync::failed", { error: e });
|
|
14435
14431
|
}
|
|
@@ -14445,14 +14441,14 @@ class ti extends jt {
|
|
|
14445
14441
|
kick(e) {
|
|
14446
14442
|
return u(this, null, function* () {
|
|
14447
14443
|
if (!n(this, ie).roomJoined)
|
|
14448
|
-
throw new
|
|
14444
|
+
throw new k(
|
|
14449
14445
|
"Can`t kick participant without joining room",
|
|
14450
14446
|
"2005"
|
|
14451
14447
|
);
|
|
14452
14448
|
if (!n(this, ie).permissions.stageEnabled)
|
|
14453
|
-
throw this.logger.error("Stage::stage_disabled"), new
|
|
14449
|
+
throw this.logger.error("Stage::stage_disabled"), new k("Stage is disabled", "2003");
|
|
14454
14450
|
if (!n(this, ie).permissions.acceptStageRequests)
|
|
14455
|
-
throw this.logger.error("Stage::kick::permission_denied"), new
|
|
14451
|
+
throw this.logger.error("Stage::kick::permission_denied"), new k("You do not have permissions for kick", "2001");
|
|
14456
14452
|
return n(this, Qt).kick(e);
|
|
14457
14453
|
});
|
|
14458
14454
|
}
|
|
@@ -14560,7 +14556,7 @@ class $f {
|
|
|
14560
14556
|
if (n(this, Nr).permissions.stageAccess !== j.Allowed)
|
|
14561
14557
|
return;
|
|
14562
14558
|
const e = (r = t == null ? void 0 : t.stageRequests) != null ? r : [];
|
|
14563
|
-
yield n(this, mt).getValue("peerSessionStore").emitAsync(
|
|
14559
|
+
yield n(this, mt).getValue("peerSessionStore").emitAsync(b.GET_STAGE_REQUESTS, e), n(this, Bo) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), f(this, Bo, e.length), this.stage.emit("stageAccessRequestUpdate", e);
|
|
14564
14560
|
})
|
|
14565
14561
|
);
|
|
14566
14562
|
}
|
|
@@ -14613,7 +14609,7 @@ class $f {
|
|
|
14613
14609
|
}
|
|
14614
14610
|
switch (t.stageType) {
|
|
14615
14611
|
case 1:
|
|
14616
|
-
e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(
|
|
14612
|
+
e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
|
|
14617
14613
|
break;
|
|
14618
14614
|
case 2:
|
|
14619
14615
|
e.setStageStatus("ACCEPTED_TO_JOIN_STAGE");
|
|
@@ -14624,10 +14620,10 @@ class $f {
|
|
|
14624
14620
|
case 0:
|
|
14625
14621
|
case 4:
|
|
14626
14622
|
default:
|
|
14627
|
-
e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(
|
|
14623
|
+
e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
|
|
14628
14624
|
break;
|
|
14629
14625
|
}
|
|
14630
|
-
n(this, mt).getValue("peerSessionStore").emit(
|
|
14626
|
+
n(this, mt).getValue("peerSessionStore").emit(b.UPDATE_PEER_STAGE_STATUS, {
|
|
14631
14627
|
id: e.id,
|
|
14632
14628
|
status: e.stageStatus
|
|
14633
14629
|
});
|
|
@@ -14933,9 +14929,9 @@ let Ua = (xg = class extends $a {
|
|
|
14933
14929
|
if (!n(this, Kn))
|
|
14934
14930
|
throw this.logger.error(
|
|
14935
14931
|
"Plugin::addPluginView::no_auth_token_set_for_plugin"
|
|
14936
|
-
), new
|
|
14932
|
+
), new k("No auth token set for plugin.", "0602");
|
|
14937
14933
|
if (!t)
|
|
14938
|
-
throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new
|
|
14934
|
+
throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new k("Iframe was not provided.", "0603");
|
|
14939
14935
|
this.removePluginView(e);
|
|
14940
14936
|
const r = t, i = new URL(this.baseURL), a = {
|
|
14941
14937
|
auth: n(this, Kn),
|
|
@@ -15281,7 +15277,7 @@ const Bf = (Ug = class {
|
|
|
15281
15277
|
}
|
|
15282
15278
|
this.plugins.active.delete(t);
|
|
15283
15279
|
}
|
|
15284
|
-
), n(this, fs).getValue("peerSessionStore").onAsync(
|
|
15280
|
+
), n(this, fs).getValue("peerSessionStore").onAsync(b.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
|
|
15285
15281
|
yield this.getRoomPlugins(), this.logger.debug("[SOCKET_SERVICE_ROOM_JOINED] resolved request to fetch plugins.");
|
|
15286
15282
|
})), n(this, Xt).on(
|
|
15287
15283
|
J.addPlugin,
|
|
@@ -15384,12 +15380,12 @@ const Bf = (Ug = class {
|
|
|
15384
15380
|
);
|
|
15385
15381
|
this.broadcastIframeEvent(Ie.chatMessage, { message: t });
|
|
15386
15382
|
}
|
|
15387
|
-
), n(this, fs).getValue("peerSessionStore").on(
|
|
15383
|
+
), n(this, fs).getValue("peerSessionStore").on(b.PEER_JOINED_INTERNAL, (s) => {
|
|
15388
15384
|
const t = bd(s);
|
|
15389
15385
|
this.broadcastIframeEvent(Ie.peerJoined, t);
|
|
15390
|
-
}), n(this, fs).getValue("peerSessionStore").on(
|
|
15386
|
+
}), n(this, fs).getValue("peerSessionStore").on(b.PEER_CLOSED, (s) => {
|
|
15391
15387
|
this.broadcastIframeEvent(Ie.peerLeft, s);
|
|
15392
|
-
}), n(this, fs).getValue("peerSessionStore").on(
|
|
15388
|
+
}), n(this, fs).getValue("peerSessionStore").on(b.UPDATE_PEER_STAGE_STATUS, (s) => {
|
|
15393
15389
|
this.broadcastIframeEvent(Ie.peerStageStatusUpdate, s);
|
|
15394
15390
|
}), n(this, fs).subscribe("stageStatus", (s) => {
|
|
15395
15391
|
this.broadcastIframeEvent(Ie.stageStatusUpdate, s);
|
|
@@ -15481,7 +15477,7 @@ class O0 {
|
|
|
15481
15477
|
}, this.socketJoined = !1;
|
|
15482
15478
|
break;
|
|
15483
15479
|
}
|
|
15484
|
-
r && (n(this, Ho).getValue("peerSessionStore").emit(
|
|
15480
|
+
r && (n(this, Ho).getValue("peerSessionStore").emit(b.SOCKET_STATE_UPDATE, r), this.socketState = r);
|
|
15485
15481
|
}
|
|
15486
15482
|
}
|
|
15487
15483
|
Ho = new WeakMap();
|
|
@@ -15517,13 +15513,13 @@ let dn = ($g = class extends jt {
|
|
|
15517
15513
|
start(t) {
|
|
15518
15514
|
return u(this, null, function* () {
|
|
15519
15515
|
if (!n(this, Qn).permissions.canRecord)
|
|
15520
|
-
throw this.logger.error("Recording::start::permission_denied"), new
|
|
15516
|
+
throw this.logger.error("Recording::start::permission_denied"), new k("User does not have permission to start recording", "1001");
|
|
15521
15517
|
if ((t == null ? void 0 : t.allowMultiple) !== !0 && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))
|
|
15522
15518
|
throw this.logger.error("Recording::start::recording_in_progress", {
|
|
15523
15519
|
recording: {
|
|
15524
15520
|
state: this.recordingState
|
|
15525
15521
|
}
|
|
15526
|
-
}), new
|
|
15522
|
+
}), new k(
|
|
15527
15523
|
`Cant start recording, recordingState irregular: ${this.recordingState}`,
|
|
15528
15524
|
"1005"
|
|
15529
15525
|
);
|
|
@@ -15537,7 +15533,7 @@ let dn = ($g = class extends jt {
|
|
|
15537
15533
|
} catch (e) {
|
|
15538
15534
|
throw this.logger.error("Recording::stop::recording_failed_to_start", {
|
|
15539
15535
|
error: e
|
|
15540
|
-
}), new
|
|
15536
|
+
}), new k("Error while starting recording", "1000", this.logger);
|
|
15541
15537
|
}
|
|
15542
15538
|
});
|
|
15543
15539
|
}
|
|
@@ -15559,12 +15555,12 @@ let dn = ($g = class extends jt {
|
|
|
15559
15555
|
}, Qn = new WeakMap(), Xn = new WeakMap(), Zn = new WeakSet(), pd = function(t, e, r) {
|
|
15560
15556
|
return u(this, null, function* () {
|
|
15561
15557
|
if (!n(this, Qn).permissions.canRecord)
|
|
15562
|
-
throw this.logger.error("Recording::stop::permission_denied"), new
|
|
15558
|
+
throw this.logger.error("Recording::stop::permission_denied"), new k("User does not have permission to stop recording", "1001");
|
|
15563
15559
|
let i = [];
|
|
15564
15560
|
if (r !== void 0) {
|
|
15565
15561
|
const a = this.recordings.find((o) => o.id === r);
|
|
15566
15562
|
if (a === void 0)
|
|
15567
|
-
throw new
|
|
15563
|
+
throw new k("Could not find the specified recording", "1004");
|
|
15568
15564
|
if (e.includes(a.state)) {
|
|
15569
15565
|
this.logger.error("Recording::stop::recording_not_in_expected_state", {
|
|
15570
15566
|
recording: {
|
|
@@ -15584,7 +15580,7 @@ let dn = ($g = class extends jt {
|
|
|
15584
15580
|
} catch (c) {
|
|
15585
15581
|
throw this.logger.error("Recording::stop::recording_failed_to_stop", {
|
|
15586
15582
|
error: c
|
|
15587
|
-
}), a.state !== o && (a.state = o, this.emit("recordingUpdate", o)), new
|
|
15583
|
+
}), a.state !== o && (a.state = o, this.emit("recordingUpdate", o)), new k("Error while stopping recording", "1000", this.logger);
|
|
15588
15584
|
}
|
|
15589
15585
|
}));
|
|
15590
15586
|
});
|
|
@@ -15649,7 +15645,7 @@ class Hf {
|
|
|
15649
15645
|
return e;
|
|
15650
15646
|
}
|
|
15651
15647
|
setupEvents() {
|
|
15652
|
-
n(this, Ei).getValue("peerSessionStore").on(
|
|
15648
|
+
n(this, Ei).getValue("peerSessionStore").on(b.ROOM_STATE, (t) => {
|
|
15653
15649
|
t.activeRecordings.length !== 0 ? this.recording.updateRecordings(
|
|
15654
15650
|
t.activeRecordings.map((e) => {
|
|
15655
15651
|
const r = this.getRecordingTypeFromProtoType(e.recordingType);
|
|
@@ -16540,7 +16536,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16540
16536
|
}
|
|
16541
16537
|
handlePermissionErrors(t, e) {
|
|
16542
16538
|
const r = sd(t, e.name, e.message);
|
|
16543
|
-
return this.permissions[t] = r, n(this, Ve).getValue("peerSessionStore").emit(
|
|
16539
|
+
return this.permissions[t] = r, n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_ERROR, {
|
|
16544
16540
|
message: r,
|
|
16545
16541
|
constraints: e.constraints,
|
|
16546
16542
|
kind: t
|
|
@@ -16579,15 +16575,15 @@ let qt = (Fg = class extends Y0 {
|
|
|
16579
16575
|
const F = (yield this.getVideoInputDevices()).find((N) => N.label.includes("OBS Virtual"));
|
|
16580
16576
|
C = yield this.getVideoTrack(F.deviceId);
|
|
16581
16577
|
}
|
|
16582
|
-
return n(this, Ve).getValue("peerSessionStore").emit(
|
|
16578
|
+
return n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16583
16579
|
message: this.permissions.audio,
|
|
16584
16580
|
kind: "audio"
|
|
16585
|
-
}), n(this, Ve).getValue("peerSessionStore").emit(
|
|
16581
|
+
}), n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16586
16582
|
message: this.permissions.video,
|
|
16587
16583
|
kind: "video"
|
|
16588
16584
|
}), { audioTrack: _, videoTrack: C };
|
|
16589
16585
|
} catch (c) {
|
|
16590
|
-
throw this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: c }), new
|
|
16586
|
+
throw this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: c }), new k("Couldnt fetch audio and video track", "1605");
|
|
16591
16587
|
}
|
|
16592
16588
|
});
|
|
16593
16589
|
}
|
|
@@ -16596,10 +16592,10 @@ let qt = (Fg = class extends Y0 {
|
|
|
16596
16592
|
var c, d;
|
|
16597
16593
|
let r = yield this.getAudioInputDevices();
|
|
16598
16594
|
if (!(r != null && r.length))
|
|
16599
|
-
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(
|
|
16595
|
+
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16600
16596
|
message: this.permissions.audio,
|
|
16601
16597
|
kind: "audio"
|
|
16602
|
-
}), new
|
|
16598
|
+
}), new k("No audio devices available", "1606");
|
|
16603
16599
|
const i = !!(r != null && r.find(
|
|
16604
16600
|
(l) => l.deviceId === e
|
|
16605
16601
|
));
|
|
@@ -16641,12 +16637,12 @@ let qt = (Fg = class extends Y0 {
|
|
|
16641
16637
|
});
|
|
16642
16638
|
try {
|
|
16643
16639
|
const l = yield o(a);
|
|
16644
|
-
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(
|
|
16640
|
+
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16645
16641
|
message: this.permissions.audio,
|
|
16646
16642
|
kind: "audio"
|
|
16647
16643
|
})), l;
|
|
16648
16644
|
} catch (l) {
|
|
16649
|
-
throw l.constraints && this.handlePermissionErrors("audio", l), new
|
|
16645
|
+
throw l.constraints && this.handlePermissionErrors("audio", l), new k(l.message, "1601");
|
|
16650
16646
|
}
|
|
16651
16647
|
});
|
|
16652
16648
|
}
|
|
@@ -16655,10 +16651,10 @@ let qt = (Fg = class extends Y0 {
|
|
|
16655
16651
|
var l, p, g;
|
|
16656
16652
|
const e = n(this, Ve).getValue("flagsmith").hasFeature(ee.OBS_QUALITY), r = (l = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : l.includes("OBS Virtual"), i = e && r, a = yield this.getVideoInputDevices();
|
|
16657
16653
|
if (!(a != null && a.length))
|
|
16658
|
-
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(
|
|
16654
|
+
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16659
16655
|
message: this.permissions.video,
|
|
16660
16656
|
kind: "video"
|
|
16661
|
-
}), new
|
|
16657
|
+
}), new k("No video devices available", "1607");
|
|
16662
16658
|
const o = !!(a != null && a.find(
|
|
16663
16659
|
(v) => v.deviceId === t
|
|
16664
16660
|
));
|
|
@@ -16711,12 +16707,12 @@ let qt = (Fg = class extends Y0 {
|
|
|
16711
16707
|
});
|
|
16712
16708
|
try {
|
|
16713
16709
|
const v = n(this, es).getVideoConstraints(c), S = yield d(v);
|
|
16714
|
-
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(
|
|
16710
|
+
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16715
16711
|
message: this.permissions.video,
|
|
16716
16712
|
kind: "video"
|
|
16717
16713
|
})), S;
|
|
16718
16714
|
} catch (v) {
|
|
16719
|
-
throw v.constraints && this.handlePermissionErrors("video", v), new
|
|
16715
|
+
throw v.constraints && this.handlePermissionErrors("video", v), new k(v.message, "1602");
|
|
16720
16716
|
}
|
|
16721
16717
|
});
|
|
16722
16718
|
}
|
|
@@ -16748,7 +16744,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16748
16744
|
});
|
|
16749
16745
|
try {
|
|
16750
16746
|
const e = n(this, es).getScreenShareConstraints(), r = yield t(e);
|
|
16751
|
-
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(
|
|
16747
|
+
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
16752
16748
|
message: this.permissions.screenshare,
|
|
16753
16749
|
kind: "screenshare"
|
|
16754
16750
|
})), {
|
|
@@ -16756,7 +16752,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16756
16752
|
videoTrack: r.getVideoTracks()[0]
|
|
16757
16753
|
};
|
|
16758
16754
|
} catch (e) {
|
|
16759
|
-
throw e.constraints && this.handlePermissionErrors("screenshare", e), new
|
|
16755
|
+
throw e.constraints && this.handlePermissionErrors("screenshare", e), new k(e.message, "1612");
|
|
16760
16756
|
}
|
|
16761
16757
|
});
|
|
16762
16758
|
}
|
|
@@ -16821,7 +16817,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16821
16817
|
} catch (e) {
|
|
16822
16818
|
throw this.logger.error("enumerate_devices_failed", {
|
|
16823
16819
|
error: e
|
|
16824
|
-
}), new
|
|
16820
|
+
}), new k("Failed to get available devices by kind", "1609");
|
|
16825
16821
|
}
|
|
16826
16822
|
});
|
|
16827
16823
|
}
|
|
@@ -16832,7 +16828,7 @@ let qt = (Fg = class extends Y0 {
|
|
|
16832
16828
|
} catch (e) {
|
|
16833
16829
|
throw this.logger.error("enumerate_devices_failed", {
|
|
16834
16830
|
error: e
|
|
16835
|
-
}), new
|
|
16831
|
+
}), new k("Failed to get device", "1609");
|
|
16836
16832
|
}
|
|
16837
16833
|
});
|
|
16838
16834
|
}
|
|
@@ -17119,7 +17115,7 @@ let Id = class extends $a {
|
|
|
17119
17115
|
} catch (t) {
|
|
17120
17116
|
throw this.logger.error(`${this.constructorName}.unmuteTrack.error`, {
|
|
17121
17117
|
error: t
|
|
17122
|
-
}), this.disableTrack(), new
|
|
17118
|
+
}), this.disableTrack(), new k("Failed to unmute track", "1611");
|
|
17123
17119
|
}
|
|
17124
17120
|
});
|
|
17125
17121
|
}
|
|
@@ -17157,7 +17153,7 @@ let Id = class extends $a {
|
|
|
17157
17153
|
setDevice(r, i) {
|
|
17158
17154
|
return u(this, arguments, function* (t, { saveDevicePreference: e }) {
|
|
17159
17155
|
if (!t)
|
|
17160
|
-
throw this.logger.warn(`${this.constructorName}.setDevice No device received`), new
|
|
17156
|
+
throw this.logger.warn(`${this.constructorName}.setDevice No device received`), new k("No device received!", "1603");
|
|
17161
17157
|
this.userSelectedDevice = t.deviceId, e && this.setUserPreferredDevice(t.deviceId), yield this.onSetDevice(t);
|
|
17162
17158
|
});
|
|
17163
17159
|
}
|
|
@@ -17249,9 +17245,9 @@ class jl extends Gf {
|
|
|
17249
17245
|
onSetDevice(t) {
|
|
17250
17246
|
return u(this, null, function* () {
|
|
17251
17247
|
if (!t)
|
|
17252
|
-
throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new
|
|
17248
|
+
throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new k("No device received!", "1603");
|
|
17253
17249
|
if (t.kind !== "audioinput")
|
|
17254
|
-
throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new
|
|
17250
|
+
throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new k(
|
|
17255
17251
|
"Non audio device received while setting device!",
|
|
17256
17252
|
"1603"
|
|
17257
17253
|
);
|
|
@@ -17266,7 +17262,7 @@ class jl extends Gf {
|
|
|
17266
17262
|
} catch (e) {
|
|
17267
17263
|
throw this.logger.error("AudioMediaHandler.setDevice.error", {
|
|
17268
17264
|
error: e
|
|
17269
|
-
}), this.disableTrack(), new
|
|
17265
|
+
}), this.disableTrack(), new k(e.message, "1604");
|
|
17270
17266
|
}
|
|
17271
17267
|
});
|
|
17272
17268
|
}
|
|
@@ -17411,7 +17407,7 @@ class lD {
|
|
|
17411
17407
|
if (t || ([a] = (yield n(this, wi).getAvailableDevicesByKind(
|
|
17412
17408
|
"audiooutput"
|
|
17413
17409
|
)).filter((p) => !kd(p))), !a)
|
|
17414
|
-
throw new
|
|
17410
|
+
throw new k("No speaker found", "1608");
|
|
17415
17411
|
if (((c = this.currentDevice) == null ? void 0 : c.deviceId) === a.deviceId)
|
|
17416
17412
|
return;
|
|
17417
17413
|
e && this.setUserPreferredDevice(a.deviceId), this.currentDevice = a;
|
|
@@ -17449,7 +17445,7 @@ class hD extends $a {
|
|
|
17449
17445
|
const { audioTrack: i, videoTrack: a } = yield this.mediaInterface.getScreenShareTracks();
|
|
17450
17446
|
if (this.audioMediaTrack = i, this.videoMediaTrack = a, this.addMediaTrackListeners(), ((r = (e = this.mediaInterface) == null ? void 0 : e.permissions) == null ? void 0 : r.screenshare) === "ACCEPTED")
|
|
17451
17447
|
return;
|
|
17452
|
-
this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", n(this, Go).getValue("peerSessionStore").emit(
|
|
17448
|
+
this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", n(this, Go).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
|
|
17453
17449
|
message: this.mediaInterface.permissions.screenshare,
|
|
17454
17450
|
kind: "screenshare"
|
|
17455
17451
|
}));
|
|
@@ -17464,10 +17460,10 @@ class hD extends $a {
|
|
|
17464
17460
|
updateConstraints(e) {
|
|
17465
17461
|
return u(this, null, function* () {
|
|
17466
17462
|
if (!this.videoMediaTrack)
|
|
17467
|
-
throw new
|
|
17463
|
+
throw new k("No media track enabled!", "1610");
|
|
17468
17464
|
const r = this.mediaInterface;
|
|
17469
17465
|
if (!r.constraintsBuilder)
|
|
17470
|
-
throw new
|
|
17466
|
+
throw new k("update constraints not supported for non web clients", "1100", this.logger);
|
|
17471
17467
|
try {
|
|
17472
17468
|
this.videoMediaTrack.applyConstraints(
|
|
17473
17469
|
r.constraintsBuilder.getUpdatedVideoConstraints(e)
|
|
@@ -17516,11 +17512,11 @@ class jc extends Gf {
|
|
|
17516
17512
|
onSetDevice(e) {
|
|
17517
17513
|
return u(this, null, function* () {
|
|
17518
17514
|
if (!e)
|
|
17519
|
-
throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new
|
|
17515
|
+
throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new k("No device received!", "1603");
|
|
17520
17516
|
if (e.kind !== "videoinput")
|
|
17521
17517
|
throw this.logger.warn("VideoMediaHandler.setDevice Received non video device", {
|
|
17522
17518
|
devices: [e]
|
|
17523
|
-
}), new
|
|
17519
|
+
}), new k(
|
|
17524
17520
|
"Non video device received while setting video device!",
|
|
17525
17521
|
"1603"
|
|
17526
17522
|
);
|
|
@@ -17540,7 +17536,7 @@ class jc extends Gf {
|
|
|
17540
17536
|
} catch (r) {
|
|
17541
17537
|
throw this.logger.error("VideoMediaHandler.setDevice.error", {
|
|
17542
17538
|
error: r
|
|
17543
|
-
}), this.disableTrack(), new
|
|
17539
|
+
}), this.disableTrack(), new k("Failed to change device", "1600", this.logger);
|
|
17544
17540
|
}
|
|
17545
17541
|
});
|
|
17546
17542
|
}
|
|
@@ -17589,10 +17585,10 @@ class jc extends Gf {
|
|
|
17589
17585
|
updateConstraints(e) {
|
|
17590
17586
|
return u(this, null, function* () {
|
|
17591
17587
|
if (!this._mediaTrack)
|
|
17592
|
-
throw new
|
|
17588
|
+
throw new k("No media track enabled!", "1610");
|
|
17593
17589
|
const r = this.mediaInterface;
|
|
17594
17590
|
if (!r.constraintsBuilder)
|
|
17595
|
-
throw new
|
|
17591
|
+
throw new k("update constraints not supported for non web clients", "1100", this.logger);
|
|
17596
17592
|
try {
|
|
17597
17593
|
this._mediaTrack.applyConstraints(
|
|
17598
17594
|
r.constraintsBuilder.getUpdatedVideoConstraints(e)
|
|
@@ -17658,7 +17654,7 @@ const wn = class {
|
|
|
17658
17654
|
m(this, Jo, void 0);
|
|
17659
17655
|
m(this, sa, void 0);
|
|
17660
17656
|
if (!t)
|
|
17661
|
-
throw new
|
|
17657
|
+
throw new k("Could not load preset.", "0904");
|
|
17662
17658
|
f(this, Ct, t.config), f(this, Jo, t.name), f(this, Ri, t.ui || Rs(Rh().ui)), f(this, sa, t.permissions.plugins.config);
|
|
17663
17659
|
}
|
|
17664
17660
|
/**
|
|
@@ -17862,7 +17858,7 @@ class $h extends jt {
|
|
|
17862
17858
|
manualIngestion: !1
|
|
17863
17859
|
}) {
|
|
17864
17860
|
if (!n(this, ra).permissions.canLivestream)
|
|
17865
|
-
throw this.logger.error("Livestream::start::permission_denied"), new
|
|
17861
|
+
throw this.logger.error("Livestream::start::permission_denied"), new k(
|
|
17866
17862
|
"User does not have permission to start livestreaming",
|
|
17867
17863
|
"1901"
|
|
17868
17864
|
);
|
|
@@ -17876,25 +17872,25 @@ class $h extends jt {
|
|
|
17876
17872
|
} catch (r) {
|
|
17877
17873
|
throw this.logger.error("Recording::stop::livestream_failed_to_start", {
|
|
17878
17874
|
error: r
|
|
17879
|
-
}), this.setLivestreamState("IDLE"), new
|
|
17875
|
+
}), this.setLivestreamState("IDLE"), new k("Error while starting livestream", "1900", this.logger);
|
|
17880
17876
|
}
|
|
17881
17877
|
});
|
|
17882
17878
|
}
|
|
17883
17879
|
stop() {
|
|
17884
17880
|
return u(this, null, function* () {
|
|
17885
17881
|
if (!n(this, ra).permissions.canLivestream)
|
|
17886
|
-
throw this.logger.error("Livestream::stop::permission_denied"), new
|
|
17882
|
+
throw this.logger.error("Livestream::stop::permission_denied"), new k(
|
|
17887
17883
|
"User does not have permission to stop livestreaming",
|
|
17888
17884
|
"1901"
|
|
17889
17885
|
);
|
|
17890
17886
|
if (this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")
|
|
17891
|
-
throw this.logger.error("Livestream::stop::inconsistent_state"), new
|
|
17887
|
+
throw this.logger.error("Livestream::stop::inconsistent_state"), new k("Livestream not started yet", "1902");
|
|
17892
17888
|
try {
|
|
17893
17889
|
this.setLivestreamState("STOPPING"), yield dt().stopLivestreaming();
|
|
17894
17890
|
} catch (e) {
|
|
17895
17891
|
throw this.logger.error("Livestream::stop::livestream_failed_to_stop", {
|
|
17896
17892
|
error: e
|
|
17897
|
-
}), this.setLivestreamState("STOPPING"), new
|
|
17893
|
+
}), this.setLivestreamState("STOPPING"), new k("Error while stopping livestream", "1900", this.logger);
|
|
17898
17894
|
}
|
|
17899
17895
|
});
|
|
17900
17896
|
}
|
|
@@ -17978,14 +17974,14 @@ class Jf {
|
|
|
17978
17974
|
this.livestream.viewerCount = t.count, this.livestream.emit("viewerCountUpdate", t.count);
|
|
17979
17975
|
}
|
|
17980
17976
|
), n(this, Ns).getValue("peerSessionStore").on(
|
|
17981
|
-
|
|
17977
|
+
b.PEER_JOINED_INTERNAL,
|
|
17982
17978
|
(t) => u(this, null, function* () {
|
|
17983
17979
|
var e;
|
|
17984
17980
|
((e = t.flags) == null ? void 0 : e.hiddenParticipant) === !0 && t.recorderType === "LIVESTREAMER" && (f(this, ia, t.id), this.livestream.setLivestreamState("LIVESTREAMING"));
|
|
17985
17981
|
})
|
|
17986
|
-
), n(this, Ns).getValue("peerSessionStore").on(
|
|
17982
|
+
), n(this, Ns).getValue("peerSessionStore").on(b.PEER_CLOSED, (t) => {
|
|
17987
17983
|
t.id === n(this, ia) && (f(this, ia, void 0), this.livestream.setLivestreamState("IDLE"));
|
|
17988
|
-
}), n(this, Ns).getValue("peerSessionStore").onAsync(
|
|
17984
|
+
}), n(this, Ns).getValue("peerSessionStore").onAsync(b.LEAVE_MEDIA_ROOM, () => u(this, null, function* () {
|
|
17989
17985
|
if (!this.livestream.playbackUrl) {
|
|
17990
17986
|
this.logger.info("Fetching livestreaming state on leave stage");
|
|
17991
17987
|
try {
|
|
@@ -17994,7 +17990,7 @@ class Jf {
|
|
|
17994
17990
|
this.logger.error("Failed to fetch livestreaming state on leave stage", { error: t });
|
|
17995
17991
|
}
|
|
17996
17992
|
}
|
|
17997
|
-
})), n(this, Ns).getValue("peerSessionStore").on(
|
|
17993
|
+
})), n(this, Ns).getValue("peerSessionStore").on(b.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
|
|
17998
17994
|
try {
|
|
17999
17995
|
yield this.fetchInitialLivestreamingState();
|
|
18000
17996
|
} catch (t) {
|
|
@@ -18421,10 +18417,10 @@ let Tr = (Bg = class extends jt {
|
|
|
18421
18417
|
if (!i || !a)
|
|
18422
18418
|
return;
|
|
18423
18419
|
const o = a / r, c = i / e, d = Math.max(o, c);
|
|
18424
|
-
d > kD && n(this, tr) === 1 ? (f(this, tr, 0), n(this, Ut).getValue("peerSessionStore").emit(
|
|
18420
|
+
d > kD && n(this, tr) === 1 ? (f(this, tr, 0), n(this, Ut).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
18425
18421
|
peerId: this.id,
|
|
18426
18422
|
maxSpatialLayer: n(this, tr)
|
|
18427
|
-
})) : d < bD && n(this, tr) === 0 && (f(this, tr, 1), n(this, Ut).getValue("peerSessionStore").emit(
|
|
18423
|
+
})) : d < bD && n(this, tr) === 0 && (f(this, tr, 1), n(this, Ut).getValue("peerSessionStore").emit(b.MAX_SPATIAL_LAYER_CHANGE, {
|
|
18428
18424
|
peerId: this.id,
|
|
18429
18425
|
maxSpatialLayer: n(this, tr)
|
|
18430
18426
|
}));
|
|
@@ -18511,9 +18507,9 @@ let Tr = (Bg = class extends jt {
|
|
|
18511
18507
|
pin() {
|
|
18512
18508
|
return u(this, null, function* () {
|
|
18513
18509
|
if (!n(this, Ai, po))
|
|
18514
|
-
throw new
|
|
18510
|
+
throw new k("Can`t pin participant without joining room", "1205");
|
|
18515
18511
|
if (!n(this, er).permissions.pinParticipant)
|
|
18516
|
-
throw new
|
|
18512
|
+
throw new k("You do not have permission to pin participants.", "1201");
|
|
18517
18513
|
return n(this, Ii, ho).pinPeer(this.id);
|
|
18518
18514
|
});
|
|
18519
18515
|
}
|
|
@@ -18524,9 +18520,9 @@ let Tr = (Bg = class extends jt {
|
|
|
18524
18520
|
unpin() {
|
|
18525
18521
|
return u(this, null, function* () {
|
|
18526
18522
|
if (!n(this, Ai, po))
|
|
18527
|
-
throw new
|
|
18523
|
+
throw new k("Can`t unpin participant without joining room", "1205");
|
|
18528
18524
|
if (!n(this, er).permissions.pinParticipant)
|
|
18529
|
-
throw new
|
|
18525
|
+
throw new k("You do not have permission to unpin participants.", "1201");
|
|
18530
18526
|
return n(this, Ii, ho).pinPeer(null);
|
|
18531
18527
|
});
|
|
18532
18528
|
}
|
|
@@ -18548,7 +18544,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18548
18544
|
if (this.logger.info("Participant::disable_audio", {
|
|
18549
18545
|
participant: { id: t }
|
|
18550
18546
|
}), !n(this, Ai, po))
|
|
18551
|
-
throw new
|
|
18547
|
+
throw new k(
|
|
18552
18548
|
"Can`t disable participant audio without joining room",
|
|
18553
18549
|
"1205"
|
|
18554
18550
|
);
|
|
@@ -18556,7 +18552,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18556
18552
|
return n(this, Ii, ho).disableAudio(t);
|
|
18557
18553
|
throw this.logger.error("Participant::unauthorized_disable_audio", {
|
|
18558
18554
|
participant: { id: t }
|
|
18559
|
-
}), new
|
|
18555
|
+
}), new k(
|
|
18560
18556
|
"Unauthorized: User does not have permission to disable participant audio.",
|
|
18561
18557
|
"1201"
|
|
18562
18558
|
);
|
|
@@ -18568,16 +18564,16 @@ let Tr = (Bg = class extends jt {
|
|
|
18568
18564
|
if (this.logger.info("Participant::kick", {
|
|
18569
18565
|
participant: { id: t }
|
|
18570
18566
|
}), !n(this, qd, Yf))
|
|
18571
|
-
throw new
|
|
18567
|
+
throw new k("Can`t kick participant without joining room", "1205");
|
|
18572
18568
|
if (n(this, er).permissions.kickParticipant) {
|
|
18573
|
-
yield n(this, Ut).getValue("peerSessionStore").emitAsync(
|
|
18569
|
+
yield n(this, Ut).getValue("peerSessionStore").emitAsync(b.KICK_PEER, {
|
|
18574
18570
|
peerId: t
|
|
18575
18571
|
});
|
|
18576
18572
|
return;
|
|
18577
18573
|
}
|
|
18578
18574
|
throw this.logger.error("Participant::unauthorized_kick", {
|
|
18579
18575
|
participant: { id: t }
|
|
18580
|
-
}), new
|
|
18576
|
+
}), new k(
|
|
18581
18577
|
"Unauthorized: User does not have permission to kick participants.",
|
|
18582
18578
|
"1201"
|
|
18583
18579
|
);
|
|
@@ -18589,7 +18585,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18589
18585
|
if (this.logger.info("Participant::disable_video", {
|
|
18590
18586
|
participant: { id: t }
|
|
18591
18587
|
}), !n(this, Ai, po))
|
|
18592
|
-
throw new
|
|
18588
|
+
throw new k(
|
|
18593
18589
|
"Can`t disable participant video without joining room",
|
|
18594
18590
|
"1205"
|
|
18595
18591
|
);
|
|
@@ -18597,7 +18593,7 @@ let Tr = (Bg = class extends jt {
|
|
|
18597
18593
|
return n(this, Ii, ho).disableVideo(t);
|
|
18598
18594
|
throw this.logger.error("Participant::unauthorized_disable_video", {
|
|
18599
18595
|
participant: { id: t }
|
|
18600
|
-
}), new
|
|
18596
|
+
}), new k(
|
|
18601
18597
|
"Unauthorized: User does not have permission to disable participant video.",
|
|
18602
18598
|
"1201"
|
|
18603
18599
|
);
|
|
@@ -18963,7 +18959,7 @@ let Pt = (Hg = class extends jt {
|
|
|
18963
18959
|
return n(this, Ee).getValue("telemetry");
|
|
18964
18960
|
}
|
|
18965
18961
|
setupEvents() {
|
|
18966
|
-
n(this, Ee).getValue("peerSessionStore").on(
|
|
18962
|
+
n(this, Ee).getValue("peerSessionStore").on(b.E2EE_ACTIVE_CONSUMER, ({ peerId: e }) => {
|
|
18967
18963
|
var r;
|
|
18968
18964
|
((r = n(this, Ee).getValue("modules").e2ee) == null ? void 0 : r.enabled) !== !0 && this.emit("media_decode_error", {
|
|
18969
18965
|
reason: `Got encrypted media for participantId ${e}, but encryption wasn't enabled in init.defaults`,
|
|
@@ -18997,8 +18993,8 @@ let Pt = (Hg = class extends jt {
|
|
|
18997
18993
|
*/
|
|
18998
18994
|
setMaxActiveParticipantsCount(t) {
|
|
18999
18995
|
if (t < 0 || t > 24)
|
|
19000
|
-
throw new
|
|
19001
|
-
n(this, Ee).setValue("maxPreferredStreams", t), n(this, ca, gd) && n(this, Ee).getValue("peerSessionStore").emit(
|
|
18996
|
+
throw new k("0 <= Max active participants count limit <= 24", "1203");
|
|
18997
|
+
n(this, Ee).setValue("maxPreferredStreams", t), n(this, ca, gd) && n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
19002
18998
|
}
|
|
19003
18999
|
/**
|
|
19004
19000
|
* Returns the number of pages that are available in the meeting in PAGINATED mode.
|
|
@@ -19021,7 +19017,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19021
19017
|
acceptWaitingRoomRequest(t) {
|
|
19022
19018
|
var r, i;
|
|
19023
19019
|
if (!n(this, Di, mo))
|
|
19024
|
-
throw new
|
|
19020
|
+
throw new k(
|
|
19025
19021
|
"Can`t accept waiting room request without joining room",
|
|
19026
19022
|
"1205"
|
|
19027
19023
|
);
|
|
@@ -19052,7 +19048,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19052
19048
|
return u(this, null, function* () {
|
|
19053
19049
|
var r, i;
|
|
19054
19050
|
if (!n(this, Di, mo))
|
|
19055
|
-
throw new
|
|
19051
|
+
throw new k(
|
|
19056
19052
|
"Can`t reject waiting room request without joining room",
|
|
19057
19053
|
"1205"
|
|
19058
19054
|
);
|
|
@@ -19077,7 +19073,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19077
19073
|
pageCount: this.pageCount,
|
|
19078
19074
|
maxActiveParticipantsCount: this.maxActiveParticipantsCount
|
|
19079
19075
|
}
|
|
19080
|
-
}), new
|
|
19076
|
+
}), new k(
|
|
19081
19077
|
`Invalid view mode: ${t}. Try ACTIVE_GRID, PAGINATED or MANUAL.`,
|
|
19082
19078
|
"1207"
|
|
19083
19079
|
);
|
|
@@ -19087,7 +19083,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19087
19083
|
);
|
|
19088
19084
|
return;
|
|
19089
19085
|
}
|
|
19090
|
-
this.viewMode = t, t === "PAGINATED" ? (this.currentPage = 1, n(this, Ee).getValue("peerSessionStore").emit(
|
|
19086
|
+
this.viewMode = t, t === "PAGINATED" ? (this.currentPage = 1, n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: t, page: this.currentPage })) : t === "ACTIVE_GRID" ? (this.currentPage = 0, n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: t, page: this.currentPage })) : t === "MANUAL" && (this.currentPage = 0, n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: t, page: this.currentPage })), this.emit("viewModeChanged", {
|
|
19091
19087
|
viewMode: t,
|
|
19092
19088
|
currentPage: this.currentPage,
|
|
19093
19089
|
pageCount: this.pageCount
|
|
@@ -19101,7 +19097,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19101
19097
|
subscribe(r) {
|
|
19102
19098
|
return u(this, arguments, function* (t, e = ["audio", "video", "screenshareAudio", "screenshareVideo"]) {
|
|
19103
19099
|
if (this.viewMode !== "MANUAL")
|
|
19104
|
-
throw new
|
|
19100
|
+
throw new k("MANUAL subscription mode was not activated.", "1206");
|
|
19105
19101
|
t.forEach((i) => {
|
|
19106
19102
|
const a = this.joined.get(i);
|
|
19107
19103
|
a && (e.includes("audio") && (a.manualProducerConfig = H(D({}, a.manualProducerConfig), {
|
|
@@ -19113,7 +19109,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19113
19109
|
}), this.audioSubscribed.has(a.id) || this.audioSubscribed.add(a)), e.includes("screenshareVideo") && (a.manualProducerConfig = H(D({}, a.manualProducerConfig), {
|
|
19114
19110
|
screenshareVideo: !0
|
|
19115
19111
|
}), this.videoSubscribed.has(a.id) || this.videoSubscribed.add(a)));
|
|
19116
|
-
}), n(this, Ee).getValue("peerSessionStore").emit(
|
|
19112
|
+
}), n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
19117
19113
|
});
|
|
19118
19114
|
}
|
|
19119
19115
|
/**
|
|
@@ -19123,7 +19119,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19123
19119
|
unsubscribe(r) {
|
|
19124
19120
|
return u(this, arguments, function* (t, e = ["audio", "video", "screenshareAudio", "screenshareVideo"]) {
|
|
19125
19121
|
if (this.viewMode !== "MANUAL")
|
|
19126
|
-
throw new
|
|
19122
|
+
throw new k("MANUAL subscription mode was not activated.", "1206");
|
|
19127
19123
|
t.forEach((i) => {
|
|
19128
19124
|
const a = this.joined.get(i);
|
|
19129
19125
|
a && (e.includes("audio") && (a.manualProducerConfig = H(D({}, a.manualProducerConfig), {
|
|
@@ -19135,7 +19131,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19135
19131
|
}), a.manualProducerConfig.audio || this.audioSubscribed.delete(a.id)), e.includes("screenshareVideo") && (a.manualProducerConfig = H(D({}, a.manualProducerConfig), {
|
|
19136
19132
|
screenshareVideo: !1
|
|
19137
19133
|
}), a.manualProducerConfig.video || this.videoSubscribed.delete(a.id)));
|
|
19138
|
-
}), n(this, Ee).getValue("peerSessionStore").emit(
|
|
19134
|
+
}), n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
|
|
19139
19135
|
});
|
|
19140
19136
|
}
|
|
19141
19137
|
getPeerIdsForCurrentPage() {
|
|
@@ -19168,8 +19164,8 @@ let Pt = (Hg = class extends jt {
|
|
|
19168
19164
|
}
|
|
19169
19165
|
}), this.viewMode === "PAGINATED") {
|
|
19170
19166
|
if (!Number.isInteger(t))
|
|
19171
|
-
throw this.logger.error("Participants::invalid_page_number"), new
|
|
19172
|
-
this.currentPage = t, n(this, Ee).getValue("peerSessionStore").emit(
|
|
19167
|
+
throw this.logger.error("Participants::invalid_page_number"), new k(`Invalid page: ${t}. Page must be an integer and greater than 0 and less than or equal to .pageCount`, "1202");
|
|
19168
|
+
this.currentPage = t, n(this, Ee).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: t }), this.emit("pageChanged", {
|
|
19173
19169
|
viewMode: this.viewMode,
|
|
19174
19170
|
currentPage: this.currentPage,
|
|
19175
19171
|
pageCount: this.pageCount
|
|
@@ -19182,12 +19178,12 @@ let Pt = (Hg = class extends jt {
|
|
|
19182
19178
|
if (this.logger.info("Participants::disable_all_audio", {
|
|
19183
19179
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
19184
19180
|
}), !n(this, ca, gd))
|
|
19185
|
-
throw new
|
|
19181
|
+
throw new k("Can`t disable all audio without joining room", "1205");
|
|
19186
19182
|
if (n(this, Oi).permissions.canAllowParticipantAudio)
|
|
19187
19183
|
return n(this, Zo, Gu).muteAll(t);
|
|
19188
19184
|
throw this.logger.error("Participants::unauthorized_disable_all_audio", {
|
|
19189
19185
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
19190
|
-
}), new
|
|
19186
|
+
}), new k(
|
|
19191
19187
|
"Unauthorized: User does not have permission to disable peer audio.",
|
|
19192
19188
|
"1201"
|
|
19193
19189
|
);
|
|
@@ -19196,10 +19192,10 @@ let Pt = (Hg = class extends jt {
|
|
|
19196
19192
|
disableAllVideo() {
|
|
19197
19193
|
return u(this, null, function* () {
|
|
19198
19194
|
if (this.logger.info("Participants::disable_all_video"), !n(this, ca, gd))
|
|
19199
|
-
throw new
|
|
19195
|
+
throw new k("Can`t disable all video without joining room", "1205");
|
|
19200
19196
|
if (n(this, Oi).permissions.canAllowParticipantVideo)
|
|
19201
19197
|
return n(this, Zo, Gu).muteAllVideo();
|
|
19202
|
-
throw this.logger.error("Participants::unauthorized_disable_all_video"), new
|
|
19198
|
+
throw this.logger.error("Participants::unauthorized_disable_all_video"), new k(
|
|
19203
19199
|
"Unauthorized: User does not have permission to disable peer video.",
|
|
19204
19200
|
"1201"
|
|
19205
19201
|
);
|
|
@@ -19217,7 +19213,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19217
19213
|
}
|
|
19218
19214
|
kick(t) {
|
|
19219
19215
|
return u(this, null, function* () {
|
|
19220
|
-
yield n(this, Ee).getValue("peerSessionStore").emitAsync(
|
|
19216
|
+
yield n(this, Ee).getValue("peerSessionStore").emitAsync(b.KICK_PEER, {
|
|
19221
19217
|
peerId: t
|
|
19222
19218
|
});
|
|
19223
19219
|
});
|
|
@@ -19225,9 +19221,9 @@ let Pt = (Hg = class extends jt {
|
|
|
19225
19221
|
kickAll() {
|
|
19226
19222
|
return u(this, null, function* () {
|
|
19227
19223
|
if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this, Di, mo))
|
|
19228
|
-
throw new
|
|
19224
|
+
throw new k("Can`t kick all without joining room", "1205");
|
|
19229
19225
|
if (!n(this, Oi).permissions.kickParticipant)
|
|
19230
|
-
throw this.logger.error("Participants::unauthorized_kick_all"), new
|
|
19226
|
+
throw this.logger.error("Participants::unauthorized_kick_all"), new k(
|
|
19231
19227
|
"Unauthorized: User does not have permission to kick peers.",
|
|
19232
19228
|
"1201"
|
|
19233
19229
|
);
|
|
@@ -19238,9 +19234,9 @@ let Pt = (Hg = class extends jt {
|
|
|
19238
19234
|
broadcastMessage(t, e, r) {
|
|
19239
19235
|
return u(this, null, function* () {
|
|
19240
19236
|
if (this.logger.info("Participants::broadcastMessage"), !n(this, Di, mo))
|
|
19241
|
-
throw new
|
|
19237
|
+
throw new k("Can`t broadcast message without joining room", "1205");
|
|
19242
19238
|
if (!(t != null && t.trim()))
|
|
19243
|
-
throw new
|
|
19239
|
+
throw new k("`type` must be a non-empty string.", "1209");
|
|
19244
19240
|
if (r)
|
|
19245
19241
|
if ("meetingIds" in r)
|
|
19246
19242
|
yield n(this, wt).broadcastToMeetings(t, r.meetingIds, e);
|
|
@@ -19270,7 +19266,7 @@ let Pt = (Hg = class extends jt {
|
|
|
19270
19266
|
return u(this, null, function* () {
|
|
19271
19267
|
const r = this.joined.toArray().filter((a) => t.includes(a.id)).map((a) => a.userId), i = [...new Set(r)];
|
|
19272
19268
|
if (!i.length)
|
|
19273
|
-
throw new
|
|
19269
|
+
throw new k("Cannot update permissions, no valid userIDs found", "1204");
|
|
19274
19270
|
n(this, wt).updatePermissions(i, e);
|
|
19275
19271
|
});
|
|
19276
19272
|
}
|
|
@@ -19405,7 +19401,7 @@ const ev = (qg = class {
|
|
|
19405
19401
|
this.roomSocketHandler.on(
|
|
19406
19402
|
$.getWaitingRoomRequests,
|
|
19407
19403
|
this.waitingRoomRequestHandler.bind(this)
|
|
19408
|
-
), this.context.getValue("peerSessionStore").on(
|
|
19404
|
+
), this.context.getValue("peerSessionStore").on(b.SOCKET_PEERS, (s) => u(this, null, function* () {
|
|
19409
19405
|
const t = this.context.getValue("flagsmith").hasFeature(ee.DEBUG_SOCKET_JOIN);
|
|
19410
19406
|
if (t) {
|
|
19411
19407
|
const e = s && (s == null ? void 0 : s.length) < 20 ? {
|
|
@@ -19447,16 +19443,16 @@ const ev = (qg = class {
|
|
|
19447
19443
|
)
|
|
19448
19444
|
);
|
|
19449
19445
|
const { audioPeers: r, compulsoryPeers: i } = t != null ? t : {};
|
|
19450
|
-
e.pinnedPeerIds.length !== 0 && this.onParticipantPinned(e.pinnedPeerIds[0]), this.computeActivateParticipants(r != null ? r : [], i), this.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), this.context.getValue("peerSessionStore").emit(
|
|
19446
|
+
e.pinnedPeerIds.length !== 0 && this.onParticipantPinned(e.pinnedPeerIds[0]), this.computeActivateParticipants(r != null ? r : [], i), this.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { createAllConsumers: !0 });
|
|
19451
19447
|
}
|
|
19452
19448
|
), this.context.getValue("peerSessionStore").on(
|
|
19453
|
-
|
|
19449
|
+
b.MAX_SPATIAL_LAYER_CHANGE,
|
|
19454
19450
|
({ peerId: s, maxSpatialLayer: t }) => {
|
|
19455
19451
|
const e = this.videoPeerConsumerMap.get(s);
|
|
19456
19452
|
e && (this.context.getValue("flagsmith").hasFeature(ee.DISABLE_LAYER_SWITCH) || (this.maxSpatialLayerUpdates.set(e, t), this.updateConsumerSpatialLayers()));
|
|
19457
19453
|
}
|
|
19458
19454
|
), this.context.getValue("peerSessionStore").on(
|
|
19459
|
-
|
|
19455
|
+
b.NEW_PRODUCER,
|
|
19460
19456
|
({ peerId: s, producer: t }) => {
|
|
19461
19457
|
const e = this.participants.joined.get(s);
|
|
19462
19458
|
if (!e) {
|
|
@@ -19501,7 +19497,7 @@ const ev = (qg = class {
|
|
|
19501
19497
|
);
|
|
19502
19498
|
}
|
|
19503
19499
|
), this.context.getValue("peerSessionStore").on(
|
|
19504
|
-
|
|
19500
|
+
b.PRODUCER_CLOSED,
|
|
19505
19501
|
({ peerId: s, producerId: t }) => {
|
|
19506
19502
|
const e = this.participants.joined.get(s);
|
|
19507
19503
|
if (!e) {
|
|
@@ -19518,7 +19514,7 @@ const ev = (qg = class {
|
|
|
19518
19514
|
);
|
|
19519
19515
|
}
|
|
19520
19516
|
), this.context.getValue("peerSessionStore").on(
|
|
19521
|
-
|
|
19517
|
+
b.PRODUCER_TOGGLE,
|
|
19522
19518
|
({
|
|
19523
19519
|
peerId: s,
|
|
19524
19520
|
producerId: t,
|
|
@@ -19531,7 +19527,7 @@ const ev = (qg = class {
|
|
|
19531
19527
|
const a = i.producers.find(
|
|
19532
19528
|
(o) => o.producerId === t
|
|
19533
19529
|
);
|
|
19534
|
-
a && (a.pause = e), r === "video" && this.context.getValue("peerSessionStore").emit(
|
|
19530
|
+
a && (a.pause = e), r === "video" && this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, {
|
|
19535
19531
|
viewMode: this.participants.viewMode,
|
|
19536
19532
|
page: this.participants.currentPage
|
|
19537
19533
|
});
|
|
@@ -19811,7 +19807,7 @@ const ev = (qg = class {
|
|
|
19811
19807
|
producingPeerId: s,
|
|
19812
19808
|
mimeType: i.mimeType
|
|
19813
19809
|
}));
|
|
19814
|
-
}), this.roomNodeClient.handlePeerCapabilities(s, e), this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info(`onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ${s}`), this.context.getValue("peerSessionStore").emit(
|
|
19810
|
+
}), this.roomNodeClient.handlePeerCapabilities(s, e), this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info(`onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ${s}`), this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19815
19811
|
}
|
|
19816
19812
|
/**
|
|
19817
19813
|
* NOTE(roerohan): The following piece of code updates .active and ensures that the positions
|
|
@@ -19875,41 +19871,41 @@ const ev = (qg = class {
|
|
|
19875
19871
|
const { peerId: t } = s.peer;
|
|
19876
19872
|
this.selectedPeers.delete(t, this.context), this.onParticipantLeave(t);
|
|
19877
19873
|
}), this.context.getValue("peerSessionStore").on(
|
|
19878
|
-
|
|
19874
|
+
b.SOCKET_SERVICE_ROOM_JOINED,
|
|
19879
19875
|
() => {
|
|
19880
19876
|
this.self.permissions.acceptWaitingRequests && this.roomSocketHandler.getWaitingRoomRequests();
|
|
19881
19877
|
}
|
|
19882
19878
|
), this.self.permissions.on("permissionsUpdate", (s) => {
|
|
19883
19879
|
const { acceptWaitingRequests: t } = s;
|
|
19884
19880
|
t !== void 0 && (t ? this.roomSocketHandler.getWaitingRoomRequests() : this.participants.waitlisted.clear());
|
|
19885
|
-
}), this.context.getValue("peerSessionStore").on(
|
|
19881
|
+
}), this.context.getValue("peerSessionStore").on(b.SOCKET_SERVICE_DISCONNECTED, () => {
|
|
19886
19882
|
this.participants.joined.clear(), this.participants.videoSubscribed.clear(), this.participants.audioSubscribed.clear(), this.participants.pinned.clear(), this.participants.currentPage = 0, this.participants.viewMode = "ACTIVE_GRID", this.participants.emit("viewModeChanged", {
|
|
19887
19883
|
viewMode: "ACTIVE_GRID",
|
|
19888
19884
|
currentPage: this.participants.currentPage,
|
|
19889
19885
|
pageCount: this.participants.pageCount
|
|
19890
19886
|
});
|
|
19891
19887
|
}), this.context.getValue("peerSessionStore").on(
|
|
19892
|
-
|
|
19888
|
+
b.CONSUMER_PAUSED,
|
|
19893
19889
|
({ id: s }) => {
|
|
19894
19890
|
this.processConsumerPaused(s);
|
|
19895
19891
|
}
|
|
19896
19892
|
), this.context.getValue("peerSessionStore").on(
|
|
19897
|
-
|
|
19893
|
+
b.CONSUMER_RESUMED,
|
|
19898
19894
|
({ id: s }) => {
|
|
19899
19895
|
this.processConsumerResumed(s);
|
|
19900
19896
|
}
|
|
19901
19897
|
), this.context.getValue("peerSessionStore").on(
|
|
19902
|
-
|
|
19898
|
+
b.NEW_CONSUMER,
|
|
19903
19899
|
({ id: s }) => {
|
|
19904
19900
|
this.processNewConsumer(s);
|
|
19905
19901
|
}
|
|
19906
19902
|
), this.context.getValue("peerSessionStore").on(
|
|
19907
|
-
|
|
19903
|
+
b.CONSUMER_CLOSED,
|
|
19908
19904
|
({ id: s }) => {
|
|
19909
19905
|
this.processConsumerClosed(s);
|
|
19910
19906
|
}
|
|
19911
19907
|
), this.context.getValue("peerSessionStore").on(
|
|
19912
|
-
|
|
19908
|
+
b.ROOM_MESSAGE,
|
|
19913
19909
|
(r) => u(this, [r], function* ({
|
|
19914
19910
|
payload: s,
|
|
19915
19911
|
type: t,
|
|
@@ -19922,7 +19918,7 @@ const ev = (qg = class {
|
|
|
19922
19918
|
});
|
|
19923
19919
|
})
|
|
19924
19920
|
), this.context.getValue("peerSessionStore").on(
|
|
19925
|
-
|
|
19921
|
+
b.MESSAGE,
|
|
19926
19922
|
(r) => u(this, [r], function* ({
|
|
19927
19923
|
payload: s,
|
|
19928
19924
|
type: t,
|
|
@@ -19935,7 +19931,7 @@ const ev = (qg = class {
|
|
|
19935
19931
|
});
|
|
19936
19932
|
})
|
|
19937
19933
|
), this.context.getValue("peerSessionStore").on(
|
|
19938
|
-
|
|
19934
|
+
b.LOW_CONSUMER_SCORE,
|
|
19939
19935
|
({
|
|
19940
19936
|
peerId: s,
|
|
19941
19937
|
score: t,
|
|
@@ -19949,7 +19945,7 @@ const ev = (qg = class {
|
|
|
19949
19945
|
}));
|
|
19950
19946
|
}
|
|
19951
19947
|
), this.context.getValue("peerSessionStore").on(
|
|
19952
|
-
|
|
19948
|
+
b.CONSUMER_SCORE_UPDATE,
|
|
19953
19949
|
({
|
|
19954
19950
|
score: s,
|
|
19955
19951
|
kind: t,
|
|
@@ -19973,10 +19969,10 @@ const ev = (qg = class {
|
|
|
19973
19969
|
scoreStats: i
|
|
19974
19970
|
}));
|
|
19975
19971
|
}
|
|
19976
|
-
), this.context.getValue("peerSessionStore").onAsync(
|
|
19972
|
+
), this.context.getValue("peerSessionStore").onAsync(b.KICK_PEER, (t) => u(this, [t], function* ({ peerId: s }) {
|
|
19977
19973
|
const e = this.participants.joined.get(s);
|
|
19978
19974
|
this.roomNodeClient.kick(s), yield this.roomSocketHandler.kick(s), e ? e.emit("kicked") : this.participants.joined.emit("kicked", { id: s });
|
|
19979
|
-
})), this.context.getValue("peerSessionStore").on(
|
|
19975
|
+
})), this.context.getValue("peerSessionStore").on(b.UPDATE_ACTIVE, (...r) => u(this, [...r], function* ({ viewMode: s, page: t, createAllConsumers: e } = { viewMode: "ACTIVE_GRID", page: 0, createAllConsumers: !1 }) {
|
|
19980
19976
|
this.logger.info(`UPDATE_ACTIVE event received - viewMode: ${n(this, ts).mode}, page: ${t}, CreateAllConsumers: ${e}`), e && (this.logger.info(`UPDATE_ACTIVE viewMode: ${s}, Page: ${t}, Removing existing subscriptions.`), this.participants.videoSubscribed.clear(), this.participants.audioSubscribed.clear()), this.updateMediaSubscribedMaps(s, { page: t }), this.scheduleSyncConsumers({ source: "UPDATE_ACTIVE" });
|
|
19981
19977
|
}));
|
|
19982
19978
|
}
|
|
@@ -20004,20 +20000,20 @@ const ev = (qg = class {
|
|
|
20004
20000
|
onParticipantSocketJoined(s) {
|
|
20005
20001
|
return u(this, null, function* () {
|
|
20006
20002
|
var t, e, r;
|
|
20007
|
-
this.logger.info(`onParticipantSocketJoined: peer ${s.id} has joined socket edge. Processing.`), this.self.id !== s.id && !((t = s.flags) != null && t.recorder) && !((e = s.flags) != null && e.hidden_participant) && !((r = s.flags) != null && r.hiddenParticipant) && (this.participants.videoSubscribed.delete(s.id), this.participants.audioSubscribed.delete(s.id), this.participants.joined.add(s), this.participants.waitlisted.delete(s.id), s.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(
|
|
20003
|
+
this.logger.info(`onParticipantSocketJoined: peer ${s.id} has joined socket edge. Processing.`), this.self.id !== s.id && !((t = s.flags) != null && t.recorder) && !((e = s.flags) != null && e.hidden_participant) && !((r = s.flags) != null && r.hiddenParticipant) && (this.participants.videoSubscribed.delete(s.id), this.participants.audioSubscribed.delete(s.id), this.participants.joined.add(s), this.participants.waitlisted.delete(s.id), s.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(b.UPDATE_STAGE_REQUESTS, {
|
|
20008
20004
|
request: {
|
|
20009
20005
|
displayName: s.name,
|
|
20010
20006
|
userId: s.userId,
|
|
20011
20007
|
peerId: s.id
|
|
20012
20008
|
},
|
|
20013
20009
|
add: !0
|
|
20014
|
-
})), this.context.getValue("peerSessionStore").emit(
|
|
20010
|
+
})), this.context.getValue("peerSessionStore").emit(b.PEER_JOINED_INTERNAL, s);
|
|
20015
20011
|
});
|
|
20016
20012
|
}
|
|
20017
20013
|
onParticipantLeave(s) {
|
|
20018
20014
|
return u(this, null, function* () {
|
|
20019
20015
|
const t = this.participants.joined.get(s);
|
|
20020
|
-
this.participants.joined.delete(s, !0, !0), this.participants.pinned.delete(s, !0, !0), this.participants.waitlisted.delete(s, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(s), this.roomNodeClient.closeConsumers(t == null ? void 0 : t.producers)), t && t.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(
|
|
20016
|
+
this.participants.joined.delete(s, !0, !0), this.participants.pinned.delete(s, !0, !0), this.participants.waitlisted.delete(s, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(s), this.roomNodeClient.closeConsumers(t == null ? void 0 : t.producers)), t && t.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(b.UPDATE_STAGE_REQUESTS, {
|
|
20021
20017
|
request: {
|
|
20022
20018
|
displayName: t.name,
|
|
20023
20019
|
userId: t.userId,
|
|
@@ -20026,7 +20022,7 @@ const ev = (qg = class {
|
|
|
20026
20022
|
add: !1
|
|
20027
20023
|
});
|
|
20028
20024
|
const { currentPage: e } = this.participants, r = this.maxPreferredStreams * (e - 1), i = this.participants.videoSubscribed.get(s);
|
|
20029
|
-
this.participants.viewMode === "MANUAL" ? this.context.getValue("peerSessionStore").emit(
|
|
20025
|
+
this.participants.viewMode === "MANUAL" ? this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: e }) : r === 0 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.joined.size <= r ? e === 2 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.setPage(e - 1) : i && this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: e });
|
|
20030
20026
|
});
|
|
20031
20027
|
}
|
|
20032
20028
|
processMedia(s) {
|
|
@@ -20118,7 +20114,7 @@ const ev = (qg = class {
|
|
|
20118
20114
|
video: void 0
|
|
20119
20115
|
}) : e === "audio" ? (o.setAudioEnabled(!1), o.audioTrack && d.push(o.audioTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { audio: !1 }), o.audioTrack = void 0) : e === "video" && (o.setVideoEnabled(!1), this.updatePipSource(o.id, !1), o.videoTrack && d.push(o.videoTrack.id), this.context.getValue("callstats").consumerSharedMediaState(s, { video: !1 }), o.videoTrack = void 0), r.e2ee && d.forEach((l) => {
|
|
20120
20116
|
this.context.getValue("peerSessionStore").emit(
|
|
20121
|
-
|
|
20117
|
+
b.E2EE_INACTIVE_CONSUMER,
|
|
20122
20118
|
{
|
|
20123
20119
|
peerId: t,
|
|
20124
20120
|
trackId: l
|
|
@@ -20163,7 +20159,7 @@ const ev = (qg = class {
|
|
|
20163
20159
|
producerId: c,
|
|
20164
20160
|
rtpReceiver: d,
|
|
20165
20161
|
localId: l
|
|
20166
|
-
}), i.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
20162
|
+
}), i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: e, rtpReceiver: d, track: a }), i.screenShare) {
|
|
20167
20163
|
r === "video" ? p.screenShareTracks.video = a : r === "audio" && (p.screenShareTracks.audio = a), p.setScreenShareEnabled(!0), (v = this.context) == null || v.getValue("callstats").consumerSharedMediaState(s, { screen: !0 });
|
|
20168
20164
|
return;
|
|
20169
20165
|
}
|
|
@@ -20210,7 +20206,7 @@ const ev = (qg = class {
|
|
|
20210
20206
|
producerId: o,
|
|
20211
20207
|
rtpReceiver: c,
|
|
20212
20208
|
localId: d
|
|
20213
|
-
}), r && i.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
20209
|
+
}), r && i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_INACTIVE_CONSUMER, { peerId: t, trackId: r.id }), e === "video" ? (l.videoTrack = r, l.setVideoEnabled(!1), this.updatePipSource(l.id, !1), this.context.getValue("callstats").consumerSharedMediaState(s, { video: !1 })) : e === "audio" && (l.audioTrack = r, l.setAudioEnabled(l.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
20214
20210
|
audio: l.audioEnabled
|
|
20215
20211
|
}));
|
|
20216
20212
|
}
|
|
@@ -20273,7 +20269,7 @@ const ev = (qg = class {
|
|
|
20273
20269
|
video: !r
|
|
20274
20270
|
})) : e === "audio" && (l.audioTrack = i, r || l.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(s, {
|
|
20275
20271
|
audio: !r
|
|
20276
|
-
})), !r && a.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
20272
|
+
})), !r && a.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_CONSUMER, { peerId: t, rtpReceiver: c, track: i });
|
|
20277
20273
|
}
|
|
20278
20274
|
static formatSocketPeerMessage(s) {
|
|
20279
20275
|
var e, r, i, a, o, c;
|
|
@@ -20328,7 +20324,7 @@ const ev = (qg = class {
|
|
|
20328
20324
|
peerId: e,
|
|
20329
20325
|
volume: 1
|
|
20330
20326
|
// priority
|
|
20331
|
-
})), t && this.context.getValue("peerSessionStore").emit(
|
|
20327
|
+
})), t && this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
20332
20328
|
}
|
|
20333
20329
|
}, ts = new WeakMap(), vs = new WeakMap(), da = new WeakMap(), qg);
|
|
20334
20330
|
let _r = ev;
|
|
@@ -20410,11 +20406,11 @@ const Rn = class extends jt {
|
|
|
20410
20406
|
a && (Rr(n(this, q).plugins, a), this.emit("pluginsUpdate")), o && (Rr(n(this, q).polls, o), this.emit("pollsUpdate")), Object.keys(d).length !== 0 && Rr(n(this, q), d), this.emit("permissionsUpdate", e);
|
|
20411
20407
|
});
|
|
20412
20408
|
if (!r)
|
|
20413
|
-
throw this.logger.error("PermissionPreset::load_preset_permissions_failed"), new
|
|
20409
|
+
throw this.logger.error("PermissionPreset::load_preset_permissions_failed"), new k("Could not load preset permissions.", "0904");
|
|
20414
20410
|
f(this, ua, e), f(this, la, i), f(this, q, r), a && this.setupEvents();
|
|
20415
20411
|
}
|
|
20416
20412
|
setupEvents() {
|
|
20417
|
-
n(this, ua).getValue("peerSessionStore").on(
|
|
20413
|
+
n(this, ua).getValue("peerSessionStore").on(b.UPDATE_PERMISSIONS, n(this, Jd));
|
|
20418
20414
|
}
|
|
20419
20415
|
/** @deprecated. Use init() */
|
|
20420
20416
|
static fromResponse(e, r, i) {
|
|
@@ -20781,7 +20777,7 @@ class tv extends jt {
|
|
|
20781
20777
|
const e = (p, g) => {
|
|
20782
20778
|
this.mediaPermissions[p] = g;
|
|
20783
20779
|
const v = { message: this.mediaPermissions[p], kind: p };
|
|
20784
|
-
g === "DENIED" ? n(this, $t).getValue("peerSessionStore").emit(
|
|
20780
|
+
g === "DENIED" ? n(this, $t).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_ERROR, v) : n(this, $t).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, v);
|
|
20785
20781
|
};
|
|
20786
20782
|
if (ye.getName() === "firefox")
|
|
20787
20783
|
return;
|
|
@@ -20858,7 +20854,7 @@ class tv extends jt {
|
|
|
20858
20854
|
(c = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : c.autoSwitchAudioDevice
|
|
20859
20855
|
);
|
|
20860
20856
|
if (i == null || i.getValue("peerSessionStore").on(
|
|
20861
|
-
|
|
20857
|
+
b.MEDIA_PERMISSION_UPDATE,
|
|
20862
20858
|
(S) => u(this, null, function* () {
|
|
20863
20859
|
if (this.populateMediaPermissionsInCallstats({
|
|
20864
20860
|
message: S.message,
|
|
@@ -20877,7 +20873,7 @@ class tv extends jt {
|
|
|
20877
20873
|
this.emit("mediaPermissionUpdate", S);
|
|
20878
20874
|
})
|
|
20879
20875
|
), i == null || i.getValue("peerSessionStore").on(
|
|
20880
|
-
|
|
20876
|
+
b.MEDIA_PERMISSION_ERROR,
|
|
20881
20877
|
(S) => u(this, null, function* () {
|
|
20882
20878
|
const { kind: P, message: _, constraints: C } = S;
|
|
20883
20879
|
this.populateMediaPermissionsInCallstats({
|
|
@@ -21377,7 +21373,7 @@ let Ye = (jg = class extends tv {
|
|
|
21377
21373
|
*/
|
|
21378
21374
|
setName(t) {
|
|
21379
21375
|
if (!t)
|
|
21380
|
-
throw new
|
|
21376
|
+
throw new k("Name cannot be empty.", "1103");
|
|
21381
21377
|
this.name = t;
|
|
21382
21378
|
}
|
|
21383
21379
|
setupTracks() {
|
|
@@ -21440,14 +21436,14 @@ let Ye = (jg = class extends tv {
|
|
|
21440
21436
|
updateVideoConstraints(t) {
|
|
21441
21437
|
return u(this, null, function* () {
|
|
21442
21438
|
if (!this.localMediaHandler.updateVideoConstraints)
|
|
21443
|
-
throw new
|
|
21439
|
+
throw new k("Unsupported", "1102");
|
|
21444
21440
|
yield this.localMediaHandler.updateVideoConstraints(t);
|
|
21445
21441
|
});
|
|
21446
21442
|
}
|
|
21447
21443
|
enableScreenShare() {
|
|
21448
21444
|
return u(this, null, function* () {
|
|
21449
21445
|
if (!n(this, Le, Be))
|
|
21450
|
-
throw new
|
|
21446
|
+
throw new k("Can`t enable screenshare without joining room", "1105");
|
|
21451
21447
|
if (n(this, vt).canProduceScreenshare !== j.NotAllowed && !(n(this, vt).canProduceScreenshare === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
|
|
21452
21448
|
try {
|
|
21453
21449
|
yield n(this, qe, Qe).shareScreen(this.screenShareTracks);
|
|
@@ -21469,7 +21465,7 @@ let Ye = (jg = class extends tv {
|
|
|
21469
21465
|
updateScreenshareConstraints(t) {
|
|
21470
21466
|
return u(this, null, function* () {
|
|
21471
21467
|
if (!this.localMediaHandler.updateScreenshareConstraints)
|
|
21472
|
-
throw new
|
|
21468
|
+
throw new k("Unsupported", "1102");
|
|
21473
21469
|
yield this.localMediaHandler.updateScreenshareConstraints(t);
|
|
21474
21470
|
});
|
|
21475
21471
|
}
|
|
@@ -21528,7 +21524,7 @@ let Ye = (jg = class extends tv {
|
|
|
21528
21524
|
pin() {
|
|
21529
21525
|
return u(this, null, function* () {
|
|
21530
21526
|
if (!n(this, Le, Be))
|
|
21531
|
-
throw new
|
|
21527
|
+
throw new k("Can`t pin participants without joining room", "1105");
|
|
21532
21528
|
return this.show(), n(this, qe, Qe).pinPeer(this.id);
|
|
21533
21529
|
});
|
|
21534
21530
|
}
|
|
@@ -21539,7 +21535,7 @@ let Ye = (jg = class extends tv {
|
|
|
21539
21535
|
unpin() {
|
|
21540
21536
|
return u(this, null, function* () {
|
|
21541
21537
|
if (!n(this, Le, Be))
|
|
21542
|
-
throw new
|
|
21538
|
+
throw new k("Can`t unpin participants without joining room", "1105");
|
|
21543
21539
|
return n(this, qe, Qe).pinPeer(null);
|
|
21544
21540
|
});
|
|
21545
21541
|
}
|
|
@@ -21549,7 +21545,7 @@ let Ye = (jg = class extends tv {
|
|
|
21549
21545
|
hide() {
|
|
21550
21546
|
return u(this, null, function* () {
|
|
21551
21547
|
if (!n(this, Le, Be))
|
|
21552
|
-
throw new
|
|
21548
|
+
throw new k("Can`t toggle participant tile without joining room", "1105");
|
|
21553
21549
|
this.hidden = !0, this.emit("toggleTile", { hidden: this.hidden });
|
|
21554
21550
|
});
|
|
21555
21551
|
}
|
|
@@ -21558,17 +21554,17 @@ let Ye = (jg = class extends tv {
|
|
|
21558
21554
|
*/
|
|
21559
21555
|
show() {
|
|
21560
21556
|
if (!n(this, Le, Be))
|
|
21561
|
-
throw new
|
|
21557
|
+
throw new k("Can`t toggle participant tile without joining room", "1105");
|
|
21562
21558
|
this.hidden = !1, this.emit("toggleTile", { hidden: this.hidden });
|
|
21563
21559
|
}
|
|
21564
21560
|
setDevice(t) {
|
|
21565
21561
|
return u(this, null, function* () {
|
|
21566
21562
|
var r, i, a;
|
|
21567
21563
|
if (!t)
|
|
21568
|
-
throw new
|
|
21564
|
+
throw new k("No device selected", "1104");
|
|
21569
21565
|
const e = this.getCurrentDevices();
|
|
21570
21566
|
if (t.deviceId && (((r = e == null ? void 0 : e.audio) == null ? void 0 : r.deviceId) === t.deviceId || ((i = e == null ? void 0 : e.video) == null ? void 0 : i.deviceId) === t.deviceId || ((a = e == null ? void 0 : e.speaker) == null ? void 0 : a.deviceId) === t.deviceId) && (this.logger.warn("Self.setDevice.setting_to_in_use_device", { devices: [t] }), n(this, Fe).getValue("flagsmith").hasFeature(ee.SKIP_SETTING_IN_USE_DEVICE)))
|
|
21571
|
-
throw new
|
|
21567
|
+
throw new k("Cannot set device currently in use", "1106");
|
|
21572
21568
|
switch (t.kind) {
|
|
21573
21569
|
case "audioinput":
|
|
21574
21570
|
try {
|
|
@@ -21843,17 +21839,17 @@ function $D(s, t) {
|
|
|
21843
21839
|
const e = new Error(t);
|
|
21844
21840
|
return e.name = s, e;
|
|
21845
21841
|
}
|
|
21846
|
-
class Do extends
|
|
21842
|
+
class Do extends k {
|
|
21847
21843
|
constructor(t) {
|
|
21848
21844
|
super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Do) : this.stack = new Error(t).stack;
|
|
21849
21845
|
}
|
|
21850
21846
|
}
|
|
21851
|
-
class It extends
|
|
21847
|
+
class It extends k {
|
|
21852
21848
|
constructor(t) {
|
|
21853
21849
|
super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
|
|
21854
21850
|
}
|
|
21855
21851
|
}
|
|
21856
|
-
class hi extends
|
|
21852
|
+
class hi extends k {
|
|
21857
21853
|
constructor(t) {
|
|
21858
21854
|
super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
|
|
21859
21855
|
}
|
|
@@ -24090,11 +24086,11 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
24090
24086
|
ee.CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
|
|
24091
24087
|
) && n(this, $i).isConnected && n(this, Pa).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, xs, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
|
|
24092
24088
|
case "send": {
|
|
24093
|
-
this.logger.info("Transport reconnected", { transport: n(this, at) }), this.context.getValue("peerSessionStore").emit(
|
|
24089
|
+
this.logger.info("Transport reconnected", { transport: n(this, at) }), this.context.getValue("peerSessionStore").emit(b.RESET_PRODUCER_STATE);
|
|
24094
24090
|
break;
|
|
24095
24091
|
}
|
|
24096
24092
|
case "recv": {
|
|
24097
|
-
this.logger.info("Transport reconnected", { transport: n(this, ot) }), this.context.getValue("peerSessionStore").emit(
|
|
24093
|
+
this.logger.info("Transport reconnected", { transport: n(this, ot) }), this.context.getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { createAllConsumers: !0 });
|
|
24098
24094
|
break;
|
|
24099
24095
|
}
|
|
24100
24096
|
default:
|
|
@@ -24110,7 +24106,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
|
|
|
24110
24106
|
n(this, _a, fd).mediaState[i] = {
|
|
24111
24107
|
state: r
|
|
24112
24108
|
}, this.context.getValue("peerSessionStore").emit(
|
|
24113
|
-
|
|
24109
|
+
b.TRANSPORT_STATE_UPDATE,
|
|
24114
24110
|
D({
|
|
24115
24111
|
transport: i
|
|
24116
24112
|
}, n(this, _a, fd).mediaState[i])
|
|
@@ -24354,7 +24350,7 @@ class eO extends XD {
|
|
|
24354
24350
|
e,
|
|
24355
24351
|
U(this, al, hv).bind(this)
|
|
24356
24352
|
);
|
|
24357
|
-
return (i = e.appData) != null && i.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
24353
|
+
return (i = e.appData) != null && i.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_PRODUCER, a), U(this, ol, pv).call(this, a, r), a;
|
|
24358
24354
|
} catch (a) {
|
|
24359
24355
|
throw this.logger.error("Failed to create producer", { error: a }), n(this, nl).producerCreationFailureCount += 1, a;
|
|
24360
24356
|
}
|
|
@@ -24370,7 +24366,7 @@ class eO extends XD {
|
|
|
24370
24366
|
}
|
|
24371
24367
|
r != null && r.stopTrack && i.track.stop();
|
|
24372
24368
|
try {
|
|
24373
|
-
yield this.sendTransport.closeProducer(i), (a = this.context.getValue("modules").e2ee) != null && a.enabled && this.context.getValue("peerSessionStore").emit(
|
|
24369
|
+
yield this.sendTransport.closeProducer(i), (a = this.context.getValue("modules").e2ee) != null && a.enabled && this.context.getValue("peerSessionStore").emit(b.E2EE_INACTIVE_PRODUCER, i);
|
|
24374
24370
|
} catch (o) {
|
|
24375
24371
|
this.logger.error("Failed to close producer on server", { error: o, producer: i });
|
|
24376
24372
|
}
|
|
@@ -24497,8 +24493,8 @@ Bi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
|
|
|
24497
24493
|
kind: e.kind,
|
|
24498
24494
|
appData: e.appData
|
|
24499
24495
|
}
|
|
24500
|
-
}), n(this, Gr).delete(e.id), this.context.getValue("peerSessionStore").emit(
|
|
24501
|
-
})), n(this, Gr).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(
|
|
24496
|
+
}), n(this, Gr).delete(e.id), this.context.getValue("peerSessionStore").emit(b.CONSUMER_CLOSED, { id: e.id });
|
|
24497
|
+
})), n(this, Gr).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(b.NEW_CONSUMER, {
|
|
24502
24498
|
id: e.id,
|
|
24503
24499
|
appData: e.appData,
|
|
24504
24500
|
peerId: e.peerId
|
|
@@ -24895,7 +24891,7 @@ const _v = (fu = class {
|
|
|
24895
24891
|
!0,
|
|
24896
24892
|
!0
|
|
24897
24893
|
);
|
|
24898
|
-
a && (this.context.getValue("peerSessionStore").emit(
|
|
24894
|
+
a && (this.context.getValue("peerSessionStore").emit(b.RESET_PRODUCER_STATE), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_RECONNECTED));
|
|
24899
24895
|
}),
|
|
24900
24896
|
5e3,
|
|
24901
24897
|
{ leading: !0, maxWait: 1e3 }
|
|
@@ -24936,7 +24932,7 @@ const _v = (fu = class {
|
|
|
24936
24932
|
"joinRoom"
|
|
24937
24933
|
);
|
|
24938
24934
|
} catch (c) {
|
|
24939
|
-
return this.logger.error("Error in room joining process", { error: c }), this.context.getValue("peerSessionStore").emit(
|
|
24935
|
+
return this.logger.error("Error in room joining process", { error: c }), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_FAILED), { roomJoined: !1 };
|
|
24940
24936
|
}
|
|
24941
24937
|
});
|
|
24942
24938
|
}
|
|
@@ -25127,7 +25123,7 @@ const _v = (fu = class {
|
|
|
25127
25123
|
n(this, bt) && (n(this, bt).audioTrack = a.track, n(this, bt).producerId = a.id, n(this, bt).start());
|
|
25128
25124
|
});
|
|
25129
25125
|
} catch (t) {
|
|
25130
|
-
throw new
|
|
25126
|
+
throw new k(t);
|
|
25131
25127
|
}
|
|
25132
25128
|
});
|
|
25133
25129
|
}
|
|
@@ -25185,7 +25181,7 @@ const _v = (fu = class {
|
|
|
25185
25181
|
this.logger.info("resumeMic::mic_producer_already_resumed");
|
|
25186
25182
|
return;
|
|
25187
25183
|
}
|
|
25188
|
-
t.resume(), t.appData.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
25184
|
+
t.resume(), t.appData.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_PRODUCER, t);
|
|
25189
25185
|
const e = {
|
|
25190
25186
|
producerId: t.id,
|
|
25191
25187
|
pause: !1
|
|
@@ -25207,7 +25203,7 @@ const _v = (fu = class {
|
|
|
25207
25203
|
this.logger.info("resumeWebcam::webcam_producer_already_resumed");
|
|
25208
25204
|
return;
|
|
25209
25205
|
}
|
|
25210
|
-
e.resume(), e.appData.e2ee && this.context.getValue("peerSessionStore").emit(
|
|
25206
|
+
e.resume(), e.appData.e2ee && this.context.getValue("peerSessionStore").emit(b.E2EE_ACTIVE_PRODUCER, e);
|
|
25211
25207
|
const r = {
|
|
25212
25208
|
producerId: e.id,
|
|
25213
25209
|
pause: !1
|
|
@@ -25352,7 +25348,7 @@ const _v = (fu = class {
|
|
|
25352
25348
|
}
|
|
25353
25349
|
this.logger.info(
|
|
25354
25350
|
`producer created broadcast: ${r}, producer state: ${i}`
|
|
25355
|
-
), this.context.getValue("peerSessionStore").emit(
|
|
25351
|
+
), this.context.getValue("peerSessionStore").emit(b.NEW_PRODUCER, {
|
|
25356
25352
|
peerId: r,
|
|
25357
25353
|
producer: H(D({}, i), {
|
|
25358
25354
|
kind: i.kind === Fs.AUDIO ? "audio" : "video",
|
|
@@ -25386,10 +25382,10 @@ const _v = (fu = class {
|
|
|
25386
25382
|
if (this.logger.info(
|
|
25387
25383
|
`producer toggle broadcast: ${t}, producerId: ${a}, kind:${c}, paused:${i} payload: ${JSON.stringify(Kp.fromBinary(s))}`
|
|
25388
25384
|
), t === this.peerId && e !== this.peerId && i && this.context.getValue("peerSessionStore").emit(
|
|
25389
|
-
c === "audio" ?
|
|
25385
|
+
c === "audio" ? b.MUTE_SELF : b.MUTE_SELF_VIDEO
|
|
25390
25386
|
), t === this.peerId)
|
|
25391
25387
|
return;
|
|
25392
|
-
this.context.getValue("peerSessionStore").emit(
|
|
25388
|
+
this.context.getValue("peerSessionStore").emit(b.PRODUCER_TOGGLE, {
|
|
25393
25389
|
peerId: t,
|
|
25394
25390
|
producerId: a,
|
|
25395
25391
|
paused: i,
|
|
@@ -25399,9 +25395,9 @@ const _v = (fu = class {
|
|
|
25399
25395
|
).filter((l) => l.producerId === a).forEach((l) => {
|
|
25400
25396
|
l.kind === "video" && i || l.paused !== i && (this.logger.debug(
|
|
25401
25397
|
`consumer state mismatched for ${l.id}. updating consumer pause state ${l.paused} to ${i}`
|
|
25402
|
-
), i ? (l.pause(), this.context.getValue("peerSessionStore").emit(
|
|
25398
|
+
), i ? (l.pause(), this.context.getValue("peerSessionStore").emit(b.CONSUMER_PAUSED, {
|
|
25403
25399
|
id: l.id
|
|
25404
|
-
})) : (l.resume(), this.context.getValue("peerSessionStore").emit(
|
|
25400
|
+
})) : (l.resume(), this.context.getValue("peerSessionStore").emit(b.CONSUMER_RESUMED, {
|
|
25405
25401
|
id: l.id
|
|
25406
25402
|
})));
|
|
25407
25403
|
});
|
|
@@ -25421,7 +25417,7 @@ const _v = (fu = class {
|
|
|
25421
25417
|
(e) => {
|
|
25422
25418
|
e.peerId === t && e.close();
|
|
25423
25419
|
}
|
|
25424
|
-
), this.context.getValue("peerSessionStore").emit(
|
|
25420
|
+
), this.context.getValue("peerSessionStore").emit(b.PEER_CLOSED, { id: t });
|
|
25425
25421
|
} catch (t) {
|
|
25426
25422
|
this.logger.error("error in peer left broadcast", { error: t });
|
|
25427
25423
|
}
|
|
@@ -25436,7 +25432,7 @@ const _v = (fu = class {
|
|
|
25436
25432
|
} = kb.fromBinary(s);
|
|
25437
25433
|
if (t === this.peerId)
|
|
25438
25434
|
return;
|
|
25439
|
-
this.logger.info(`producer closed broadcast:${t}`), this.context.getValue("peerSessionStore").emit(
|
|
25435
|
+
this.logger.info(`producer closed broadcast:${t}`), this.context.getValue("peerSessionStore").emit(b.PRODUCER_CLOSED, {
|
|
25440
25436
|
peerId: t,
|
|
25441
25437
|
producerId: e
|
|
25442
25438
|
});
|
|
@@ -25448,7 +25444,7 @@ const _v = (fu = class {
|
|
|
25448
25444
|
this.logger.info(
|
|
25449
25445
|
`closing consumer ${r}, producer id: ${e}`
|
|
25450
25446
|
), n(this, W).closeConsumer(r).then(() => {
|
|
25451
|
-
this.logger.info(`closed consumer: ${r}`), n(this, W).producerIdToConsumerIdMap.delete(e), this.context.getValue("peerSessionStore").emit(
|
|
25447
|
+
this.logger.info(`closed consumer: ${r}`), n(this, W).producerIdToConsumerIdMap.delete(e), this.context.getValue("peerSessionStore").emit(b.CONSUMER_CLOSED, {
|
|
25452
25448
|
id: r
|
|
25453
25449
|
});
|
|
25454
25450
|
}).catch((i) => {
|
|
@@ -25463,7 +25459,7 @@ const _v = (fu = class {
|
|
|
25463
25459
|
() => {
|
|
25464
25460
|
!this.mediaJoined && !n(this, Gi) && !n(this, Wi) || (this.logger.warn(
|
|
25465
25461
|
"media hub termination broadcast received, rejoining room"
|
|
25466
|
-
), this.context.getValue("peerSessionStore").emit(
|
|
25462
|
+
), this.context.getValue("peerSessionStore").emit(b.ROOM_NODE_DISCONNECTED), n(this, bc).call(this));
|
|
25467
25463
|
}
|
|
25468
25464
|
);
|
|
25469
25465
|
});
|
|
@@ -25472,7 +25468,7 @@ const _v = (fu = class {
|
|
|
25472
25468
|
this.context.getValue("callstats").onConsumerScore((s) => {
|
|
25473
25469
|
s.forEach((t, e) => {
|
|
25474
25470
|
const r = n(this, W).consumers.get(e);
|
|
25475
|
-
r && this.context.getValue("peerSessionStore").emit(
|
|
25471
|
+
r && this.context.getValue("peerSessionStore").emit(b.CONSUMER_SCORE_UPDATE, {
|
|
25476
25472
|
id: e,
|
|
25477
25473
|
kind: r.kind,
|
|
25478
25474
|
peerId: r.peerId,
|
|
@@ -25485,7 +25481,7 @@ const _v = (fu = class {
|
|
|
25485
25481
|
const r = Array.from(n(this, W).producers.values()).find(
|
|
25486
25482
|
(i) => i.id === e
|
|
25487
25483
|
);
|
|
25488
|
-
r && this.context.getValue("peerSessionStore").emit(
|
|
25484
|
+
r && this.context.getValue("peerSessionStore").emit(b.PRODUCER_SCORE_UPDATE, {
|
|
25489
25485
|
id: e,
|
|
25490
25486
|
kind: r.kind,
|
|
25491
25487
|
appData: r.appData,
|
|
@@ -25931,28 +25927,28 @@ const Lv = (Gg = class {
|
|
|
25931
25927
|
});
|
|
25932
25928
|
}
|
|
25933
25929
|
setupEvents() {
|
|
25934
|
-
n(this, te).getValue("peerSessionStore").on(
|
|
25930
|
+
n(this, te).getValue("peerSessionStore").on(b.RESET_PRODUCER_STATE, () => u(this, null, function* () {
|
|
25935
25931
|
this.mediaJoined && this.shareMediaTracks();
|
|
25936
|
-
})), n(this, te).getValue("peerSessionStore").on(
|
|
25932
|
+
})), n(this, te).getValue("peerSessionStore").on(b.ROOM_NODE_RECONNECTED, () => {
|
|
25937
25933
|
this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: !0 });
|
|
25938
|
-
}), n(this, te).getValue("peerSessionStore").on(
|
|
25934
|
+
}), n(this, te).getValue("peerSessionStore").on(b.ROOM_NODE_DISCONNECTED, () => {
|
|
25939
25935
|
this.self.roomState !== "disconnected" && (this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" }));
|
|
25940
|
-
}), n(this, te).getValue("peerSessionStore").on(
|
|
25936
|
+
}), n(this, te).getValue("peerSessionStore").on(b.ROOM_NODE_FAILED, () => {
|
|
25941
25937
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
25942
|
-
}), n(this, te).getValue("peerSessionStore").on(
|
|
25938
|
+
}), n(this, te).getValue("peerSessionStore").on(b.SOCKET_SERVICE_RECONNECTED, ({ wasJoinAttempted: s }) => {
|
|
25943
25939
|
s === !1 && (this.self.roomState = "init"), this.resetSelf(s);
|
|
25944
|
-
}), n(this, te).getValue("peerSessionStore").on(
|
|
25940
|
+
}), n(this, te).getValue("peerSessionStore").on(b.SOCKET_SERVICE_DISCONNECTED, ({ joinAttempted: s }) => {
|
|
25945
25941
|
if (this.self.roomState === "disconnected")
|
|
25946
25942
|
return;
|
|
25947
25943
|
let { peerId: t } = this;
|
|
25948
25944
|
s && n(this, te).getValue("flagsmith").hasFeature(ee.REFRESH_ID_ON_DISCONNECTION) && (t = an()), n(this, Qi).updateURL(t), n(this, te).getValue("telemetry").resetPeerId(t), dt().setHeader("tracing-id", t), mr.remapContext(t, n(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
|
|
25949
|
-
}), n(this, te).getValue("peerSessionStore").on(
|
|
25945
|
+
}), n(this, te).getValue("peerSessionStore").on(b.SOCKET_SERVICE_FAILED, () => {
|
|
25950
25946
|
this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
25951
25947
|
}), n(this, Ps).on($.waitingRoomRequestAccepted, () => {
|
|
25952
25948
|
this.waitlistAcceptHandler();
|
|
25953
25949
|
}), n(this, Ps).on(ld.updateUserPreset, (s) => {
|
|
25954
25950
|
s.updatePeersPresets.forEach((t) => {
|
|
25955
|
-
t.userIds === this.self.userId && n(this, te).getValue("peerSessionStore").emit(
|
|
25951
|
+
t.userIds === this.self.userId && n(this, te).getValue("peerSessionStore").emit(b.UPDATE_PERMISSIONS, t.patch);
|
|
25956
25952
|
});
|
|
25957
25953
|
}), n(this, Ps).on($.waitingRoomRequestDenied, () => {
|
|
25958
25954
|
this.waitlistRejectedHandler();
|
|
@@ -25960,8 +25956,8 @@ const Lv = (Gg = class {
|
|
|
25960
25956
|
this.kickHandler({ kickType: "kick" });
|
|
25961
25957
|
}), n(this, Ps).on($.kickAll, () => {
|
|
25962
25958
|
this.kickHandler({ kickType: "kickAll" });
|
|
25963
|
-
}), n(this, te).getValue("peerSessionStore").onAsync(
|
|
25964
|
-
|
|
25959
|
+
}), n(this, te).getValue("peerSessionStore").onAsync(b.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), n(this, te).getValue("peerSessionStore").on(
|
|
25960
|
+
b.PRODUCER_SCORE_UPDATE,
|
|
25965
25961
|
({
|
|
25966
25962
|
score: s,
|
|
25967
25963
|
kind: t,
|
|
@@ -25978,15 +25974,15 @@ const Lv = (Gg = class {
|
|
|
25978
25974
|
scoreStats: r
|
|
25979
25975
|
});
|
|
25980
25976
|
}
|
|
25981
|
-
), n(this, te).getValue("peerSessionStore").on(
|
|
25977
|
+
), n(this, te).getValue("peerSessionStore").on(b.MUTE_SELF, () => u(this, null, function* () {
|
|
25982
25978
|
this.self.audioEnabled && (yield this.self.disableAudio(), n(this, te).getValue("callstats").audioOff());
|
|
25983
|
-
})), n(this, te).getValue("peerSessionStore").on(
|
|
25979
|
+
})), n(this, te).getValue("peerSessionStore").on(b.MUTE_SELF_VIDEO, () => u(this, null, function* () {
|
|
25984
25980
|
this.self.videoEnabled && (yield this.self.disableVideo(), n(this, te).getValue("callstats").videoOff());
|
|
25985
25981
|
})), n(this, te).getValue("peerSessionStore").onAsync(
|
|
25986
|
-
|
|
25982
|
+
b.LEAVE_MEDIA_ROOM,
|
|
25987
25983
|
this.leaveMediaRoom.bind(this)
|
|
25988
25984
|
), n(this, te).getValue("peerSessionStore").on(
|
|
25989
|
-
|
|
25985
|
+
b.PIP_HANGUP,
|
|
25990
25986
|
this.leaveRoom.bind(this)
|
|
25991
25987
|
);
|
|
25992
25988
|
}
|
|
@@ -26059,7 +26055,7 @@ const Lv = (Gg = class {
|
|
|
26059
26055
|
return;
|
|
26060
26056
|
i === "ON_STAGE" && (yield this.shareMediaTracks()), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s });
|
|
26061
26057
|
} catch (c) {
|
|
26062
|
-
throw this.logger.error("Error:SelfController.mediaRoomJoin", { error: c }), new
|
|
26058
|
+
throw this.logger.error("Error:SelfController.mediaRoomJoin", { error: c }), new k("Error: could not join media room", "0002");
|
|
26063
26059
|
}
|
|
26064
26060
|
});
|
|
26065
26061
|
}
|
|
@@ -26298,13 +26294,13 @@ class xv {
|
|
|
26298
26294
|
);
|
|
26299
26295
|
try {
|
|
26300
26296
|
const { peer: a } = Sn.fromBinary((yield r).payload);
|
|
26301
|
-
n(this, Bt).getValue("connectionHandler").socketJoined = !0, n(this, Bt).getValue("peerSessionStore").emit(
|
|
26297
|
+
n(this, Bt).getValue("connectionHandler").socketJoined = !0, n(this, Bt).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_ROOM_JOINED, { peer: a });
|
|
26302
26298
|
const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
|
|
26303
|
-
return n(this, Bt).getValue("peerSessionStore").emit(
|
|
26299
|
+
return n(this, Bt).getValue("peerSessionStore").emit(b.ROOM_STATE, d), n(this, Bt).getValue("peerSessionStore").emit(b.SOCKET_PEERS, l), { peer: a };
|
|
26304
26300
|
} catch (a) {
|
|
26305
26301
|
throw this.logger.error("RoomSocketHandler.joinRoom.failed", {
|
|
26306
26302
|
error: a
|
|
26307
|
-
}), new
|
|
26303
|
+
}), new k(
|
|
26308
26304
|
"Error: RoomSocketHandler.joinRoom failed.",
|
|
26309
26305
|
"0002",
|
|
26310
26306
|
this.logger,
|
|
@@ -26540,7 +26536,7 @@ class xv {
|
|
|
26540
26536
|
this.socket.on($.broadcastMessage, ({ payload: t }) => {
|
|
26541
26537
|
try {
|
|
26542
26538
|
const e = co.fromBinary(t);
|
|
26543
|
-
n(this, Bt).getValue("peerSessionStore").emit(
|
|
26539
|
+
n(this, Bt).getValue("peerSessionStore").emit(b.ROOM_MESSAGE, {
|
|
26544
26540
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
26545
26541
|
type: e.type,
|
|
26546
26542
|
timestamp: e.timestamp
|
|
@@ -26551,7 +26547,7 @@ class xv {
|
|
|
26551
26547
|
}), this.socket.on($.broadcastToEntity, ({ payload: t }) => {
|
|
26552
26548
|
try {
|
|
26553
26549
|
const e = co.fromBinary(t);
|
|
26554
|
-
n(this, Bt).getValue("peerSessionStore").emit(
|
|
26550
|
+
n(this, Bt).getValue("peerSessionStore").emit(b.MESSAGE, {
|
|
26555
26551
|
payload: JSON.parse(new TextDecoder().decode(e.payload)),
|
|
26556
26552
|
type: e.type,
|
|
26557
26553
|
timestamp: e.timestamp
|
|
@@ -27585,7 +27581,7 @@ const Qv = (Wg = class {
|
|
|
27585
27581
|
m(this, et, void 0);
|
|
27586
27582
|
var a;
|
|
27587
27583
|
if (!t || !e || !r)
|
|
27588
|
-
throw new
|
|
27584
|
+
throw new k("peerId, meetingId, or authToken can not be empty", "0404");
|
|
27589
27585
|
f(this, ns, void 0), f(this, et, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this, Kr, U(this, Nc, lh).call(this, t)), f(this, Ce, new VO(n(this, Kr), {
|
|
27590
27586
|
autoReconnect: !0,
|
|
27591
27587
|
disconnectOnPingTimeout: (a = i.includes("PING")) != null ? a : !1,
|
|
@@ -27748,13 +27744,13 @@ const Qv = (Wg = class {
|
|
|
27748
27744
|
this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: E.location.country });
|
|
27749
27745
|
const { recv: e, send: r } = (i = n(this, we, Me).mediaState) != null ? i : {};
|
|
27750
27746
|
e != null && e.state && (e == null ? void 0 : e.state) !== Mn.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== Mn.CONNECTED ? n(this, et).getValue("peerSessionStore").emit(
|
|
27751
|
-
|
|
27747
|
+
b.SOCKET_SERVICE_DISCONNECTED,
|
|
27752
27748
|
{
|
|
27753
27749
|
joinAttempted: n(this, we, Me).joinAttempted
|
|
27754
27750
|
}
|
|
27755
27751
|
) : f(this, ns, setTimeout(() => {
|
|
27756
27752
|
n(this, et).getValue("peerSessionStore").emit(
|
|
27757
|
-
|
|
27753
|
+
b.SOCKET_SERVICE_DISCONNECTED,
|
|
27758
27754
|
{ joinAttempted: n(this, we, Me).joinAttempted }
|
|
27759
27755
|
), f(this, ns, void 0);
|
|
27760
27756
|
}, UO)), n(this, we, Me).updateSocketConnectionState("disconnected");
|
|
@@ -27773,11 +27769,11 @@ const Qv = (Wg = class {
|
|
|
27773
27769
|
}
|
|
27774
27770
|
}), n(this, we, Me).updateSocketConnectionState("reconnectFailure", s);
|
|
27775
27771
|
}), this.onStateEvent("reconnected", () => u(this, null, function* () {
|
|
27776
|
-
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: n(this, we, Me).mediaJoinAttempted } }), n(this, ns) && (clearTimeout(n(this, ns)), f(this, ns, void 0)), n(this, et).getValue("peerSessionStore").emit(
|
|
27772
|
+
this.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: n(this, we, Me).mediaJoinAttempted } }), n(this, ns) && (clearTimeout(n(this, ns)), f(this, ns, void 0)), n(this, et).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_RECONNECTED, {
|
|
27777
27773
|
wasJoinAttempted: n(this, we, Me).mediaJoinAttempted
|
|
27778
27774
|
}), n(this, we, Me).updateSocketConnectionState("reconnected");
|
|
27779
27775
|
})), this.onStateEvent("failed", () => u(this, null, function* () {
|
|
27780
|
-
this.logger.info("SocketService::Failed to connect to socket-edge", { country: E.location.country }), n(this, et).getValue("peerSessionStore").emit(
|
|
27776
|
+
this.logger.info("SocketService::Failed to connect to socket-edge", { country: E.location.country }), n(this, et).getValue("peerSessionStore").emit(b.SOCKET_SERVICE_FAILED), n(this, we, Me).updateSocketConnectionState("failed");
|
|
27781
27777
|
}));
|
|
27782
27778
|
}
|
|
27783
27779
|
}, Kr = new WeakMap(), Ce = new WeakMap(), we = new WeakSet(), Me = function() {
|
|
@@ -28275,7 +28271,7 @@ const Cn = class {
|
|
|
28275
28271
|
logger: c
|
|
28276
28272
|
} = s.getAllValues();
|
|
28277
28273
|
if (Vv(s), ye.isSupported() === !1)
|
|
28278
|
-
throw new
|
|
28274
|
+
throw new k("Browser not supported", "0010", c, !0);
|
|
28279
28275
|
const d = QM(
|
|
28280
28276
|
s,
|
|
28281
28277
|
{
|
|
@@ -28440,7 +28436,7 @@ const Cn = class {
|
|
|
28440
28436
|
N.participants
|
|
28441
28437
|
)), c.plugin) {
|
|
28442
28438
|
if (!N)
|
|
28443
|
-
throw new
|
|
28439
|
+
throw new k(
|
|
28444
28440
|
"The plugin module cannot be initialized without the `participant` module",
|
|
28445
28441
|
"0102"
|
|
28446
28442
|
);
|
|
@@ -28572,7 +28568,7 @@ function KO(s, t) {
|
|
|
28572
28568
|
apiBase: o
|
|
28573
28569
|
};
|
|
28574
28570
|
} catch (e) {
|
|
28575
|
-
throw new
|
|
28571
|
+
throw new k("Invalid auth token", "0004");
|
|
28576
28572
|
}
|
|
28577
28573
|
}
|
|
28578
28574
|
var zr, Xi, Zi, Lc, kl, eS;
|
|
@@ -28708,7 +28704,7 @@ let ei = (Kg = class {
|
|
|
28708
28704
|
video: !0
|
|
28709
28705
|
};
|
|
28710
28706
|
return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", lw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
28711
|
-
})), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.
|
|
28707
|
+
})), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.6"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
|
|
28712
28708
|
}
|
|
28713
28709
|
join() {
|
|
28714
28710
|
return u(this, null, function* () {
|