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