@cloudflare/realtimekit 2.0.3-staging.8 → 2.0.3-staging.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ClientMock.cjs.js +1 -1
- package/dist/ClientMock.es.js +9 -1
- package/dist/EncryptionManager.d.ts +5 -0
- package/dist/browser.js +7 -7
- package/dist/dependencies.txt +2 -2
- package/dist/index.cjs.js +7 -7
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +768 -737
- package/dist/index.es5.js +328 -294
- package/dist/index.rn.js +7 -7
- package/dist/ts3.4/dist/EncryptionManager.d.ts +5 -0
- package/dist/ts3.4/dist/index.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -780,10 +780,10 @@ function xv(s, t) {
|
|
|
780
780
|
function a() {
|
|
781
781
|
typeof s.removeListener == "function" && s.removeListener("error", i), e([].slice.call(arguments));
|
|
782
782
|
}
|
|
783
|
-
_m(s, t, a, { once: !0 }), t !== "error" &&
|
|
783
|
+
_m(s, t, a, { once: !0 }), t !== "error" && $v(s, i, { once: !0 });
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function $v(s, t, e) {
|
|
787
787
|
typeof s.on == "function" && _m(s, "error", t, e);
|
|
788
788
|
}
|
|
789
789
|
function _m(s, t, e, r) {
|
|
@@ -804,7 +804,7 @@ var L;
|
|
|
804
804
|
(function(s) {
|
|
805
805
|
s.PRECALL_TEST_BEGIN = "precall_begin", s.PRECALL_TEST_COMPLETE = "precall_end", s.CALL_JOIN_BEGIN = "call_join", s.NET_QUALITY_TEST_BEGIN = "net_quality_test_begin", s.NET_QUALITY_TEST_END = "net_quality_test_end", s.WEBSOCKET_CONNECTED = "websocket_connected", s.TRANSPORT_CONNECTED = "transport_connected", s.AUDIO_ON = "audio_on", s.AUDIO_OFF = "audio_off", s.VIDEO_ON = "video_on", s.VIDEO_OFF = "video_off", s.PARTICIPANT_ROLE = "participant_role", s.PING_STAT = "ping_stat", s.DISCONNECT = "disconnect", s.RECONNECT_ATTEMPT = "reconnect_attempt", s.SCREENSHARE_START_REQUESTED = "screenshare_start_requested", s.SCREENSHARE_STARTED = "screenshare_started", s.SCREENSHARE_STOPPED = "screenshare_stopped", s.TAB_CHANGE = "tab_change", s.BROWSER_BACKGROUNDED = "browser_backgrounded", s.BROWSER_FOREGROUNDED = "browser_foregrounded", s.DOMINANT_SPEAKER = "dominant_speaker", s.AUDIO_DEVICES_UPDATES = "audio_devices_updates", s.VIDEO_DEVICES_UPDATES = "video_devices_updates", s.SPEAKER_DEVICES_UPDATES = "speaker_devices_updates", s.SELECTED_MICROHPONE_UPDATE = "selected_microphone_update", s.SELECTED_CAMERA_UPDATE = "selected_camera_update", s.SELECTED_SPEAKER_UPDATE = "selected_speaker_update", s.EXPECTED_VIDEO_RESOLUTION = "expected_video_resolution", s.EXPECTED_SCREENSHARE_RESOLUTION = "expected_screenshare_resolution", s.MEDIA_PERMISSION = "media_permission", s.LEGACY_SWITCH = "legacy_switch", s.AUDIO_PLAY_FAILED = "audio_play_failed", s.VIDEO_PLAY_FAILED = "video_play_failed", s.AUDIO_TRACK_MUTED = "audio_track_muted", s.VIDEO_TRACK_MUTED = "video_track_muted", s.IVS_PLAYER_REBUFFERING = "ivs_player_rebuffering", s.IVS_PLAYER_AUDIO_BLOCKED = "ivs_player_audio_blocked", s.IVS_PLAYER_PLAYBACK_BLOCKED = "ivs_player_playback_blocked", s.IVS_PLAYER_ERROR = "ivs_player_error", s.IVS_PLAYER_RECOVERABLE_ERROR = "ivs_player_recoverable_error", s.IVS_PLAYER_WORKER_ERROR = "ivs_player_worker_error", s.IVS_PLAYER_NETWORK_UNAVAILABLE = "ivs_player_network_unavailable", s.LIVESTREAM_LATENCY = "livestream_latency", s.IVS_PLAYER_ANALYTICS_EVENT = "ivs_player_analytics_event", s.IVS_PLAYER_PLAYBACK_RATE_CHANGED = "ivs_player_playback_rate_changed", s.IVS_PLAYER_QUALITY_CHANGED = "ivs_player_quality_changed", s.IVS_PLAYER_INITIALIZED = "ivs_player_initialized";
|
|
806
806
|
})(L || (L = {}));
|
|
807
|
-
const
|
|
807
|
+
const Uv = /* @__PURE__ */ new Map([
|
|
808
808
|
[L.PRECALL_TEST_BEGIN, J.MINOR_EVENT],
|
|
809
809
|
[L.PRECALL_TEST_COMPLETE, J.MINOR_EVENT],
|
|
810
810
|
[L.CALL_JOIN_BEGIN, J.MAJOR_EVENT],
|
|
@@ -910,7 +910,7 @@ class Bv extends mt {
|
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
912
|
callEvent(e) {
|
|
913
|
-
e.timestamp = new Date(), this.eventStore.add(e), this.emit(e.event, e.metaData),
|
|
913
|
+
e.timestamp = new Date(), this.eventStore.add(e), this.emit(e.event, e.metaData), Uv.get(e.event) === J.MAJOR_EVENT && this.flush();
|
|
914
914
|
}
|
|
915
915
|
flush() {
|
|
916
916
|
return u(this, null, function* () {
|
|
@@ -943,7 +943,7 @@ var yp;
|
|
|
943
943
|
(function(s) {
|
|
944
944
|
s[s.INIT = 0] = "INIT", s[s.ACCEPTED = 1] = "ACCEPTED", s[s.DENIED = 2] = "DENIED", s[s.SYS_DENIED = 3] = "SYS_DENIED", s[s.FAILED = 4] = "FAILED", s[s.NOTFOUND = 5] = "NOTFOUND", s[s.NOT_APPLICABLE = 6] = "NOT_APPLICABLE";
|
|
945
945
|
})(yp || (yp = {}));
|
|
946
|
-
function
|
|
946
|
+
function Xr(s) {
|
|
947
947
|
return s ? s.split(".").slice(0, 2).concat(["0", "0"]).join(".") : "";
|
|
948
948
|
}
|
|
949
949
|
function wd({ packetsLost: s, packetsSent: t }) {
|
|
@@ -1329,7 +1329,7 @@ class eT {
|
|
|
1329
1329
|
try {
|
|
1330
1330
|
const d = `https://${e.location}`, h = yield (yield fetch(d)).json();
|
|
1331
1331
|
if (((a = h.loc) == null ? void 0 : a.length) > 5)
|
|
1332
|
-
return this.ipInformation = h, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip =
|
|
1332
|
+
return this.ipInformation = h, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip)), h;
|
|
1333
1333
|
throw Error("Insufficient data");
|
|
1334
1334
|
} catch (d) {
|
|
1335
1335
|
r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
|
|
@@ -1338,7 +1338,7 @@ class eT {
|
|
|
1338
1338
|
const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
|
|
1339
1339
|
method: "POST"
|
|
1340
1340
|
});
|
|
1341
|
-
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip =
|
|
1341
|
+
this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip));
|
|
1342
1342
|
} catch (d) {
|
|
1343
1343
|
r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
|
|
1344
1344
|
}
|
|
@@ -1373,7 +1373,7 @@ function Pp(s) {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
1376
|
-
class
|
|
1376
|
+
class $m {
|
|
1377
1377
|
constructor() {
|
|
1378
1378
|
p(this, "transport");
|
|
1379
1379
|
p(this, "candidatePair");
|
|
@@ -1388,7 +1388,7 @@ class Um {
|
|
|
1388
1388
|
p(this, "staleConsumerStreamMap", !1);
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
class
|
|
1391
|
+
class Um extends mt {
|
|
1392
1392
|
constructor() {
|
|
1393
1393
|
super();
|
|
1394
1394
|
p(this, "observer");
|
|
@@ -1536,8 +1536,8 @@ class $m extends mt {
|
|
|
1536
1536
|
}) || e[e.length - 1];
|
|
1537
1537
|
}
|
|
1538
1538
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
1539
|
-
var k, R, A, x, O,
|
|
1540
|
-
const c = e, d = new
|
|
1539
|
+
var k, R, A, x, O, $, H, F, X, ee, Ke, it, Ct;
|
|
1540
|
+
const c = e, d = new $m(), l = r.length ? new Set(r) : void 0, h = [], g = [], S = [], y = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1541
1541
|
for (const I of c.values()) {
|
|
1542
1542
|
if (l) {
|
|
1543
1543
|
if (l.size === 0)
|
|
@@ -1779,7 +1779,7 @@ class $m extends mt {
|
|
|
1779
1779
|
framesPerSecond: b.framesPerSecond || 0,
|
|
1780
1780
|
packetsLostPercentage: Rd({
|
|
1781
1781
|
packetsLost: (b.packetsLost || 0) - (((O = this.videoConsumerToStatsMap.get(_)) == null ? void 0 : O.packetsLost) || 0),
|
|
1782
|
-
packetsReceived: (b.packetsReceived || 0) - (((
|
|
1782
|
+
packetsReceived: (b.packetsReceived || 0) - ((($ = this.videoConsumerToStatsMap.get(_)) == null ? void 0 : $.packetsReceived) || 0)
|
|
1783
1783
|
}),
|
|
1784
1784
|
jitter: b.jitter || 0,
|
|
1785
1785
|
isScreenShare: this.screenShareConsumers.has(_),
|
|
@@ -1825,7 +1825,7 @@ class $m extends mt {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
1827
|
if (d.producerStreamMap.forEach((I, T) => {
|
|
1828
|
-
var _, B, Te, _e, V, b, Ae, Ma, Da, Oa, Na, La, Va, xa,
|
|
1828
|
+
var _, B, Te, _e, V, b, Ae, Ma, Da, Oa, Na, La, Va, xa, $a, Ua, Ha, Ba, Fa, qa, ja, Ga, Wa;
|
|
1829
1829
|
if (I.outboundVideoRtpId.length > 0) {
|
|
1830
1830
|
const he = [];
|
|
1831
1831
|
I.outboundVideoRtpId.forEach((du) => {
|
|
@@ -1860,7 +1860,7 @@ class $m extends mt {
|
|
|
1860
1860
|
const he = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
1861
1861
|
he.score = Mm({
|
|
1862
1862
|
packetsSent: (he.packetsSent || 0) - (((Va = this.audioProducerToStatsMap.get(T)) == null ? void 0 : Va.packetsSent) || 0),
|
|
1863
|
-
packetsLost: (((xa = he.remoteData) == null ? void 0 : xa.packetsLost) || 0) - (((
|
|
1863
|
+
packetsLost: (((xa = he.remoteData) == null ? void 0 : xa.packetsLost) || 0) - (((Ua = ($a = this.audioProducerToStatsMap.get(T)) == null ? void 0 : $a.remoteData) == null ? void 0 : Ua.packetsLost) || 0),
|
|
1864
1864
|
jitter: ((Ha = he.remoteData) == null ? void 0 : Ha.jitter) || 0
|
|
1865
1865
|
}), y.set(T, {
|
|
1866
1866
|
score: +(he.score * 10).toFixed(),
|
|
@@ -1876,7 +1876,7 @@ class $m extends mt {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}), S.forEach((I) => {
|
|
1878
1878
|
const T = h.find((B) => B.id === I.localCandidateId ? (I.localCandidateId = B.id, B) : null), _ = g.find((B) => B.id === I.remoteCandidateId ? (I.remoteCandidateId = B.id, B) : null);
|
|
1879
|
-
T && (I.localCandidateType = T.type, I.localCandidateAddress =
|
|
1879
|
+
T && (I.localCandidateType = T.type, I.localCandidateAddress = Xr(T.address), I.localCandidatePort = T.port, I.localCandidateProtocol = T.protocol, I.localCandidateUrl = T.url, I.localCandidateNetworkType = T.networkType, I.localCandidateRelatedAddress = Xr(T.relatedAddress), I.localCandidateRelatedPort = T.relatedPort), _ && (I.remoteCandidateType = _.type, I.remoteCandidateAddress = Xr(_.address), I.remoteCandidatePort = _.port, I.remoteCandidateProtocol = _.protocol, I.remoteCandidateUrl = _.url);
|
|
1880
1880
|
}), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
1881
1881
|
// candidateStats: result.candidatePair,
|
|
1882
1882
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
@@ -2129,9 +2129,9 @@ class $m extends mt {
|
|
|
2129
2129
|
});
|
|
2130
2130
|
}
|
|
2131
2131
|
}
|
|
2132
|
-
class tT extends
|
|
2132
|
+
class tT extends Um {
|
|
2133
2133
|
}
|
|
2134
|
-
class Hm extends
|
|
2134
|
+
class Hm extends Um {
|
|
2135
2135
|
constructor() {
|
|
2136
2136
|
super(...arguments);
|
|
2137
2137
|
p(this, "producerMap", /* @__PURE__ */ new Map());
|
|
@@ -2190,8 +2190,8 @@ class Hm extends $m {
|
|
|
2190
2190
|
};
|
|
2191
2191
|
}
|
|
2192
2192
|
parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
|
|
2193
|
-
var k, R, A, x, O,
|
|
2194
|
-
const c = e, d = new
|
|
2193
|
+
var k, R, A, x, O, $, H, F, X, ee, Ke, it, Ct;
|
|
2194
|
+
const c = e, d = new $m(), l = r.length ? new Set(r) : void 0, h = [], g = [], S = [], y = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
2195
2195
|
for (const I of c.values()) {
|
|
2196
2196
|
if (l) {
|
|
2197
2197
|
if (l.size === 0)
|
|
@@ -2429,7 +2429,7 @@ class Hm extends $m {
|
|
|
2429
2429
|
framesPerSecond: b.framesPerSecond || 0,
|
|
2430
2430
|
packetsLostPercentage: Rd({
|
|
2431
2431
|
packetsLost: (b.packetsLost || 0) - (((O = this.videoConsumerToStatsMap.get(_)) == null ? void 0 : O.packetsLost) || 0),
|
|
2432
|
-
packetsReceived: (b.packetsReceived || 0) - (((
|
|
2432
|
+
packetsReceived: (b.packetsReceived || 0) - ((($ = this.videoConsumerToStatsMap.get(_)) == null ? void 0 : $.packetsReceived) || 0)
|
|
2433
2433
|
}),
|
|
2434
2434
|
jitter: b.jitter || 0,
|
|
2435
2435
|
isScreenShare: this.screenShareConsumers.has(_),
|
|
@@ -2475,7 +2475,7 @@ class Hm extends $m {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
if (d.producerStreamMap.forEach((I, T) => {
|
|
2478
|
-
var _, B, Te, _e, V, b, Ae, Ma, Da, Oa, Na, La, Va, xa,
|
|
2478
|
+
var _, B, Te, _e, V, b, Ae, Ma, Da, Oa, Na, La, Va, xa, $a, Ua, Ha, Ba, Fa, qa, ja, Ga, Wa;
|
|
2479
2479
|
if (I.outboundVideoRtpId.length > 0) {
|
|
2480
2480
|
const he = [];
|
|
2481
2481
|
I.outboundVideoRtpId.forEach((du) => {
|
|
@@ -2510,7 +2510,7 @@ class Hm extends $m {
|
|
|
2510
2510
|
const he = d.outboundAudioRtp.get(I.outboundAudioRtpId[0]);
|
|
2511
2511
|
he.score = Mm({
|
|
2512
2512
|
packetsSent: (he.packetsSent || 0) - (((Va = this.audioProducerToStatsMap.get(T)) == null ? void 0 : Va.packetsSent) || 0),
|
|
2513
|
-
packetsLost: (((xa = he.remoteData) == null ? void 0 : xa.packetsLost) || 0) - (((
|
|
2513
|
+
packetsLost: (((xa = he.remoteData) == null ? void 0 : xa.packetsLost) || 0) - (((Ua = ($a = this.audioProducerToStatsMap.get(T)) == null ? void 0 : $a.remoteData) == null ? void 0 : Ua.packetsLost) || 0),
|
|
2514
2514
|
jitter: ((Ha = he.remoteData) == null ? void 0 : Ha.jitter) || 0
|
|
2515
2515
|
}), y.set(T, {
|
|
2516
2516
|
score: +(he.score * 10).toFixed(),
|
|
@@ -2526,7 +2526,7 @@ class Hm extends $m {
|
|
|
2526
2526
|
}
|
|
2527
2527
|
}), S.forEach((I) => {
|
|
2528
2528
|
const T = h.find((B) => B.id === I.localCandidateId ? (I.localCandidateId = B.id, B) : null), _ = g.find((B) => B.id === I.remoteCandidateId ? (I.remoteCandidateId = B.id, B) : null);
|
|
2529
|
-
T && (I.localCandidateType = T.type, I.localCandidateAddress =
|
|
2529
|
+
T && (I.localCandidateType = T.type, I.localCandidateAddress = Xr(T.address), I.localCandidatePort = T.port, I.localCandidateProtocol = T.protocol, I.localCandidateUrl = T.url, I.localCandidateNetworkType = T.networkType, I.localCandidateRelatedAddress = Xr(T.relatedAddress), I.localCandidateRelatedPort = T.relatedPort), _ && (I.remoteCandidateType = _.type, I.remoteCandidateAddress = Xr(_.address), I.remoteCandidatePort = _.port, I.remoteCandidateProtocol = _.protocol, I.remoteCandidateUrl = _.url);
|
|
2530
2530
|
}), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
|
|
2531
2531
|
// candidateStats: result.candidatePair,
|
|
2532
2532
|
bytesReceived: d.candidatePair.bytesReceived,
|
|
@@ -3811,15 +3811,15 @@ class xt extends mt.EventEmitter {
|
|
|
3811
3811
|
return super.listenerCount(e);
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
-
var xs,
|
|
3814
|
+
var xs, $s;
|
|
3815
3815
|
class oT extends mt.EventEmitter {
|
|
3816
3816
|
constructor(e) {
|
|
3817
3817
|
super();
|
|
3818
3818
|
m(this, xs, void 0);
|
|
3819
|
-
m(this,
|
|
3819
|
+
m(this, $s, void 0);
|
|
3820
3820
|
p(this, "asyncPromiseTimeout");
|
|
3821
3821
|
p(this, "logger");
|
|
3822
|
-
this.logger = e, f(this, xs, /* @__PURE__ */ new Map()), f(this,
|
|
3822
|
+
this.logger = e, f(this, xs, /* @__PURE__ */ new Map()), f(this, $s, /* @__PURE__ */ new Map()), this.asyncPromiseTimeout = 8e3;
|
|
3823
3823
|
}
|
|
3824
3824
|
emit(e, ...r) {
|
|
3825
3825
|
return yo(this, e, r, this.logger);
|
|
@@ -3827,7 +3827,7 @@ class oT extends mt.EventEmitter {
|
|
|
3827
3827
|
emitAsync(e, ...r) {
|
|
3828
3828
|
return u(this, null, function* () {
|
|
3829
3829
|
n(this, xs).set(e, []);
|
|
3830
|
-
const i = n(this,
|
|
3830
|
+
const i = n(this, $s).get(e).map(
|
|
3831
3831
|
() => new Promise((a) => {
|
|
3832
3832
|
n(this, xs).get(e).push(a);
|
|
3833
3833
|
})
|
|
@@ -3854,16 +3854,16 @@ class oT extends mt.EventEmitter {
|
|
|
3854
3854
|
const c = (d = i.get(e)) == null ? void 0 : d.shift();
|
|
3855
3855
|
c == null || c();
|
|
3856
3856
|
});
|
|
3857
|
-
return n(this,
|
|
3857
|
+
return n(this, $s).get(e) || n(this, $s).set(e, []), n(this, $s).get(e).push(a), super.on(e, a);
|
|
3858
3858
|
}
|
|
3859
3859
|
/**
|
|
3860
3860
|
* removes all attached listeners
|
|
3861
3861
|
*/
|
|
3862
3862
|
reset() {
|
|
3863
|
-
f(this, xs, /* @__PURE__ */ new Map()), f(this,
|
|
3863
|
+
f(this, xs, /* @__PURE__ */ new Map()), f(this, $s, /* @__PURE__ */ new Map()), super.removeAllListeners();
|
|
3864
3864
|
}
|
|
3865
3865
|
}
|
|
3866
|
-
xs = new WeakMap(),
|
|
3866
|
+
xs = new WeakMap(), $s = new WeakMap();
|
|
3867
3867
|
var cT = typeof global == "object" && global && global.Object === Object && global;
|
|
3868
3868
|
const Fm = cT;
|
|
3869
3869
|
var dT = typeof self == "object" && self && self.Object === Object && self, lT = Fm || dT || Function("return this")();
|
|
@@ -3963,11 +3963,11 @@ var Ip = function() {
|
|
|
3963
3963
|
function xT(s) {
|
|
3964
3964
|
return !!Ip && Ip in s;
|
|
3965
3965
|
}
|
|
3966
|
-
var
|
|
3966
|
+
var $T = Function.prototype, UT = $T.toString;
|
|
3967
3967
|
function an(s) {
|
|
3968
3968
|
if (s != null) {
|
|
3969
3969
|
try {
|
|
3970
|
-
return
|
|
3970
|
+
return UT.call(s);
|
|
3971
3971
|
} catch (t) {
|
|
3972
3972
|
}
|
|
3973
3973
|
try {
|
|
@@ -4186,9 +4186,9 @@ function My() {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
var Km = typeof exports == "object" && exports && !exports.nodeType && exports, Np = Km && typeof module == "object" && module && !module.nodeType && module, Dy = Np && Np.exports === Km, Lp = Dy ? gs.Buffer : void 0, Oy = Lp ? Lp.isBuffer : void 0, Ny = Oy || My;
|
|
4188
4188
|
const Ca = Ny;
|
|
4189
|
-
var Ly = "[object Arguments]", Vy = "[object Array]", xy = "[object Boolean]",
|
|
4189
|
+
var Ly = "[object Arguments]", Vy = "[object Array]", xy = "[object Boolean]", $y = "[object Date]", Uy = "[object Error]", Hy = "[object Function]", By = "[object Map]", Fy = "[object Number]", qy = "[object Object]", jy = "[object RegExp]", Gy = "[object Set]", Wy = "[object String]", Jy = "[object WeakMap]", Ky = "[object ArrayBuffer]", zy = "[object DataView]", Yy = "[object Float32Array]", Qy = "[object Float64Array]", Xy = "[object Int8Array]", Zy = "[object Int16Array]", eE = "[object Int32Array]", tE = "[object Uint8Array]", sE = "[object Uint8ClampedArray]", rE = "[object Uint16Array]", iE = "[object Uint32Array]", Se = {};
|
|
4190
4190
|
Se[Yy] = Se[Qy] = Se[Xy] = Se[Zy] = Se[eE] = Se[tE] = Se[sE] = Se[rE] = Se[iE] = !0;
|
|
4191
|
-
Se[Ly] = Se[Vy] = Se[Ky] = Se[xy] = Se[zy] = Se[
|
|
4191
|
+
Se[Ly] = Se[Vy] = Se[Ky] = Se[xy] = Se[zy] = Se[$y] = Se[Uy] = Se[Hy] = Se[By] = Se[Fy] = Se[qy] = Se[jy] = Se[Gy] = Se[Wy] = Se[Jy] = !1;
|
|
4192
4192
|
function nE(s) {
|
|
4193
4193
|
return Is(s) && Vh(s.length) && !!Se[nn(s)];
|
|
4194
4194
|
}
|
|
@@ -4257,7 +4257,7 @@ function Gc(s) {
|
|
|
4257
4257
|
return jc(s) ? Ym(s, !0) : vE(s);
|
|
4258
4258
|
}
|
|
4259
4259
|
var TE = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, yE = /^\w*$/;
|
|
4260
|
-
function
|
|
4260
|
+
function $h(s, t) {
|
|
4261
4261
|
if (Lt(s))
|
|
4262
4262
|
return !1;
|
|
4263
4263
|
var e = typeof s;
|
|
@@ -4324,10 +4324,10 @@ function xE(s) {
|
|
|
4324
4324
|
var t = this.__data__, e = zl(t, s);
|
|
4325
4325
|
return e < 0 ? void 0 : t[e][1];
|
|
4326
4326
|
}
|
|
4327
|
-
function
|
|
4327
|
+
function $E(s) {
|
|
4328
4328
|
return zl(this.__data__, s) > -1;
|
|
4329
4329
|
}
|
|
4330
|
-
function
|
|
4330
|
+
function UE(s, t) {
|
|
4331
4331
|
var e = this.__data__, r = zl(e, s);
|
|
4332
4332
|
return r < 0 ? (++this.size, e.push([s, t])) : e[r][1] = t, this;
|
|
4333
4333
|
}
|
|
@@ -4341,8 +4341,8 @@ function ur(s) {
|
|
|
4341
4341
|
ur.prototype.clear = OE;
|
|
4342
4342
|
ur.prototype.delete = VE;
|
|
4343
4343
|
ur.prototype.get = xE;
|
|
4344
|
-
ur.prototype.has =
|
|
4345
|
-
ur.prototype.set =
|
|
4344
|
+
ur.prototype.has = $E;
|
|
4345
|
+
ur.prototype.set = UE;
|
|
4346
4346
|
var HE = on(gs, "Map");
|
|
4347
4347
|
const _o = HE;
|
|
4348
4348
|
function BE() {
|
|
@@ -4387,7 +4387,7 @@ hr.prototype.get = jE;
|
|
|
4387
4387
|
hr.prototype.has = GE;
|
|
4388
4388
|
hr.prototype.set = WE;
|
|
4389
4389
|
var JE = "Expected a function";
|
|
4390
|
-
function
|
|
4390
|
+
function Uh(s, t) {
|
|
4391
4391
|
if (typeof s != "function" || t != null && typeof t != "function")
|
|
4392
4392
|
throw new TypeError(JE);
|
|
4393
4393
|
var e = function() {
|
|
@@ -4397,12 +4397,12 @@ function $h(s, t) {
|
|
|
4397
4397
|
var o = s.apply(this, r);
|
|
4398
4398
|
return e.cache = a.set(i, o) || a, o;
|
|
4399
4399
|
};
|
|
4400
|
-
return e.cache = new (
|
|
4400
|
+
return e.cache = new (Uh.Cache || hr)(), e;
|
|
4401
4401
|
}
|
|
4402
|
-
|
|
4402
|
+
Uh.Cache = hr;
|
|
4403
4403
|
var KE = 500;
|
|
4404
4404
|
function zE(s) {
|
|
4405
|
-
var t =
|
|
4405
|
+
var t = Uh(s, function(r) {
|
|
4406
4406
|
return e.size === KE && e.clear(), r;
|
|
4407
4407
|
}), e = t.cache;
|
|
4408
4408
|
return t;
|
|
@@ -4418,7 +4418,7 @@ function eP(s) {
|
|
|
4418
4418
|
return s == null ? "" : jm(s);
|
|
4419
4419
|
}
|
|
4420
4420
|
function Zm(s, t) {
|
|
4421
|
-
return Lt(s) ? s :
|
|
4421
|
+
return Lt(s) ? s : $h(s, t) ? [s] : ZE(eP(s));
|
|
4422
4422
|
}
|
|
4423
4423
|
var tP = 1 / 0;
|
|
4424
4424
|
function Ql(s) {
|
|
@@ -4493,11 +4493,11 @@ function fP(s, t) {
|
|
|
4493
4493
|
function SP(s, t) {
|
|
4494
4494
|
return s && qc(t, Gc(t), s);
|
|
4495
4495
|
}
|
|
4496
|
-
var rf = typeof exports == "object" && exports && !exports.nodeType && exports, xp = rf && typeof module == "object" && module && !module.nodeType && module, vP = xp && xp.exports === rf,
|
|
4496
|
+
var rf = typeof exports == "object" && exports && !exports.nodeType && exports, xp = rf && typeof module == "object" && module && !module.nodeType && module, vP = xp && xp.exports === rf, $p = vP ? gs.Buffer : void 0, Up = $p ? $p.allocUnsafe : void 0;
|
|
4497
4497
|
function nf(s, t) {
|
|
4498
4498
|
if (t)
|
|
4499
4499
|
return s.slice();
|
|
4500
|
-
var e = s.length, r =
|
|
4500
|
+
var e = s.length, r = Up ? Up(e) : new s.constructor(e);
|
|
4501
4501
|
return s.copy(r), r;
|
|
4502
4502
|
}
|
|
4503
4503
|
function TP(s, t) {
|
|
@@ -4544,8 +4544,8 @@ var AP = on(gs, "Promise");
|
|
|
4544
4544
|
const Mu = AP;
|
|
4545
4545
|
var IP = on(gs, "Set");
|
|
4546
4546
|
const Pn = IP;
|
|
4547
|
-
var Bp = "[object Map]", MP = "[object Object]", Fp = "[object Promise]", qp = "[object Set]", jp = "[object WeakMap]", Gp = "[object DataView]", DP = an(Iu), OP = an(_o), NP = an(Mu), LP = an(Pn), VP = an(ku),
|
|
4548
|
-
(Iu &&
|
|
4547
|
+
var Bp = "[object Map]", MP = "[object Object]", Fp = "[object Promise]", qp = "[object Set]", jp = "[object WeakMap]", Gp = "[object DataView]", DP = an(Iu), OP = an(_o), NP = an(Mu), LP = an(Pn), VP = an(ku), ai = nn;
|
|
4548
|
+
(Iu && ai(new Iu(new ArrayBuffer(1))) != Gp || _o && ai(new _o()) != Bp || Mu && ai(Mu.resolve()) != Fp || Pn && ai(new Pn()) != qp || ku && ai(new ku()) != jp) && (ai = function(s) {
|
|
4549
4549
|
var t = nn(s), e = t == MP ? s.constructor : void 0, r = e ? an(e) : "";
|
|
4550
4550
|
if (r)
|
|
4551
4551
|
switch (r) {
|
|
@@ -4562,11 +4562,11 @@ var Bp = "[object Map]", MP = "[object Object]", Fp = "[object Promise]", qp = "
|
|
|
4562
4562
|
}
|
|
4563
4563
|
return t;
|
|
4564
4564
|
});
|
|
4565
|
-
const Ra =
|
|
4566
|
-
var xP = Object.prototype,
|
|
4567
|
-
function
|
|
4565
|
+
const Ra = ai;
|
|
4566
|
+
var xP = Object.prototype, $P = xP.hasOwnProperty;
|
|
4567
|
+
function UP(s) {
|
|
4568
4568
|
var t = s.length, e = new s.constructor(t);
|
|
4569
|
-
return t && typeof s[0] == "string" &&
|
|
4569
|
+
return t && typeof s[0] == "string" && $P.call(s, "index") && (e.index = s.index, e.input = s.input), e;
|
|
4570
4570
|
}
|
|
4571
4571
|
var HP = gs.Uint8Array;
|
|
4572
4572
|
const Ad = HP;
|
|
@@ -4640,8 +4640,8 @@ function f_(s) {
|
|
|
4640
4640
|
}
|
|
4641
4641
|
var zp = wa && wa.isSet, S_ = zp ? xh(zp) : f_;
|
|
4642
4642
|
const v_ = S_;
|
|
4643
|
-
var T_ = 1, y_ = 2, E_ = 4, uf = "[object Arguments]", P_ = "[object Array]", __ = "[object Boolean]", C_ = "[object Date]", w_ = "[object Error]", hf = "[object Function]", R_ = "[object GeneratorFunction]", b_ = "[object Map]", k_ = "[object Number]", pf = "[object Object]", A_ = "[object RegExp]", I_ = "[object Set]", M_ = "[object String]", D_ = "[object Symbol]", O_ = "[object WeakMap]", N_ = "[object ArrayBuffer]", L_ = "[object DataView]", V_ = "[object Float32Array]", x_ = "[object Float64Array]",
|
|
4644
|
-
me[uf] = me[P_] = me[N_] = me[L_] = me[__] = me[C_] = me[V_] = me[x_] = me[
|
|
4643
|
+
var T_ = 1, y_ = 2, E_ = 4, uf = "[object Arguments]", P_ = "[object Array]", __ = "[object Boolean]", C_ = "[object Date]", w_ = "[object Error]", hf = "[object Function]", R_ = "[object GeneratorFunction]", b_ = "[object Map]", k_ = "[object Number]", pf = "[object Object]", A_ = "[object RegExp]", I_ = "[object Set]", M_ = "[object String]", D_ = "[object Symbol]", O_ = "[object WeakMap]", N_ = "[object ArrayBuffer]", L_ = "[object DataView]", V_ = "[object Float32Array]", x_ = "[object Float64Array]", $_ = "[object Int8Array]", U_ = "[object Int16Array]", H_ = "[object Int32Array]", B_ = "[object Uint8Array]", F_ = "[object Uint8ClampedArray]", q_ = "[object Uint16Array]", j_ = "[object Uint32Array]", me = {};
|
|
4644
|
+
me[uf] = me[P_] = me[N_] = me[L_] = me[__] = me[C_] = me[V_] = me[x_] = me[$_] = me[U_] = me[H_] = me[b_] = me[k_] = me[pf] = me[A_] = me[I_] = me[M_] = me[D_] = me[B_] = me[F_] = me[q_] = me[j_] = !0;
|
|
4645
4645
|
me[w_] = me[hf] = me[O_] = !1;
|
|
4646
4646
|
function uo(s, t, e, r, i, a) {
|
|
4647
4647
|
var o, c = t & T_, d = t & y_, l = t & E_;
|
|
@@ -4651,7 +4651,7 @@ function uo(s, t, e, r, i, a) {
|
|
|
4651
4651
|
return s;
|
|
4652
4652
|
var h = Lt(s);
|
|
4653
4653
|
if (h) {
|
|
4654
|
-
if (o =
|
|
4654
|
+
if (o = UP(s), !c)
|
|
4655
4655
|
return Gm(s, o);
|
|
4656
4656
|
} else {
|
|
4657
4657
|
var g = Ra(s), S = g == hf || g == R_;
|
|
@@ -4820,8 +4820,8 @@ function TC(s, t, e, r, i, a) {
|
|
|
4820
4820
|
R || (R = S == "constructor");
|
|
4821
4821
|
}
|
|
4822
4822
|
if (k && !R) {
|
|
4823
|
-
var
|
|
4824
|
-
|
|
4823
|
+
var $ = s.constructor, H = t.constructor;
|
|
4824
|
+
$ != H && "constructor" in s && "constructor" in t && !(typeof $ == "function" && $ instanceof $ && typeof H == "function" && H instanceof H) && (k = !1);
|
|
4825
4825
|
}
|
|
4826
4826
|
return a.delete(s), a.delete(t), k;
|
|
4827
4827
|
}
|
|
@@ -4914,7 +4914,7 @@ function IC(s, t) {
|
|
|
4914
4914
|
}
|
|
4915
4915
|
var MC = 1, DC = 2;
|
|
4916
4916
|
function OC(s, t) {
|
|
4917
|
-
return
|
|
4917
|
+
return $h(s) && ff(t) ? Sf(Ql(s), t) : function(e) {
|
|
4918
4918
|
var r = sP(e, s);
|
|
4919
4919
|
return r === void 0 && r === t ? IC(e, s) : Xl(t, r, MC | DC);
|
|
4920
4920
|
};
|
|
@@ -4930,12 +4930,12 @@ function LC(s) {
|
|
|
4930
4930
|
};
|
|
4931
4931
|
}
|
|
4932
4932
|
function VC(s) {
|
|
4933
|
-
return
|
|
4933
|
+
return $h(s) ? NC(Ql(s)) : LC(s);
|
|
4934
4934
|
}
|
|
4935
4935
|
function xC(s) {
|
|
4936
4936
|
return typeof s == "function" ? s : s == null ? Dh : typeof s == "object" ? Lt(s) ? OC(s[0], s[1]) : bC(s) : VC(s);
|
|
4937
4937
|
}
|
|
4938
|
-
function
|
|
4938
|
+
function $C(s) {
|
|
4939
4939
|
return function(t, e, r) {
|
|
4940
4940
|
for (var i = -1, a = Object(t), o = r(t), c = o.length; c--; ) {
|
|
4941
4941
|
var d = o[s ? c : ++i];
|
|
@@ -4945,8 +4945,8 @@ function UC(s) {
|
|
|
4945
4945
|
return t;
|
|
4946
4946
|
};
|
|
4947
4947
|
}
|
|
4948
|
-
var
|
|
4949
|
-
const HC =
|
|
4948
|
+
var UC = $C();
|
|
4949
|
+
const HC = UC;
|
|
4950
4950
|
var BC = function() {
|
|
4951
4951
|
return gs.Date.now();
|
|
4952
4952
|
};
|
|
@@ -4984,7 +4984,7 @@ function Gh(s, t, e) {
|
|
|
4984
4984
|
function O() {
|
|
4985
4985
|
c !== void 0 && clearTimeout(c), l = 0, r = d = i = c = void 0;
|
|
4986
4986
|
}
|
|
4987
|
-
function
|
|
4987
|
+
function $() {
|
|
4988
4988
|
return c === void 0 ? o : x(fu());
|
|
4989
4989
|
}
|
|
4990
4990
|
function H() {
|
|
@@ -4997,7 +4997,7 @@ function Gh(s, t, e) {
|
|
|
4997
4997
|
}
|
|
4998
4998
|
return c === void 0 && (c = setTimeout(A, t)), o;
|
|
4999
4999
|
}
|
|
5000
|
-
return H.cancel = O, H.flush =
|
|
5000
|
+
return H.cancel = O, H.flush = $, H;
|
|
5001
5001
|
}
|
|
5002
5002
|
function Du(s, t, e) {
|
|
5003
5003
|
(e !== void 0 && !Fc(s[t], e) || e === void 0 && !(t in s)) && Lh(s, t, e);
|
|
@@ -5174,7 +5174,7 @@ const hw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
5174
5174
|
o(), window.URL.revokeObjectURL(i);
|
|
5175
5175
|
}, r.src = i;
|
|
5176
5176
|
});
|
|
5177
|
-
},
|
|
5177
|
+
}, hi = {
|
|
5178
5178
|
logs: "https://api.realtime.cloudflare.com/logs/otel/logs",
|
|
5179
5179
|
mock: {
|
|
5180
5180
|
url: "https://api.realtime.cloudflare.com/mock",
|
|
@@ -5194,7 +5194,7 @@ const hw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
|
|
|
5194
5194
|
}, gw = /\b(?:1[7-9](?:\.\d+)?|[2-9]\d(?:\.\d+)?|[1-9]\d{2,}(?:\.\d+)?)\b/, Nu = "__rtk_plugins__", mw = [Nu];
|
|
5195
5195
|
function yf(s) {
|
|
5196
5196
|
var r, i, a;
|
|
5197
|
-
const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(
|
|
5197
|
+
const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(hi.baseURI.staging)), e = !!((a = (i = s == null ? void 0 : s.getValue("modules")) == null ? void 0 : i.devTools) != null && a.logs);
|
|
5198
5198
|
return t || e;
|
|
5199
5199
|
}
|
|
5200
5200
|
function fw(s, t) {
|
|
@@ -5295,7 +5295,7 @@ class P {
|
|
|
5295
5295
|
return this.compressionSupported;
|
|
5296
5296
|
}
|
|
5297
5297
|
get logsEndpoint() {
|
|
5298
|
-
const t =
|
|
5298
|
+
const t = Zr.getContext(this.meetingMetadata.peerId);
|
|
5299
5299
|
return `${Wh({
|
|
5300
5300
|
servicePrefix: "logs",
|
|
5301
5301
|
baseURI: t.getValue("baseURI")
|
|
@@ -5356,7 +5356,7 @@ class P {
|
|
|
5356
5356
|
}
|
|
5357
5357
|
addLogInCurrentSpan(t, e, r = {}, i = !1) {
|
|
5358
5358
|
r != null && r.error && Object.assign(r, { error: ld(r.error) });
|
|
5359
|
-
const a =
|
|
5359
|
+
const a = Zr.getContext(this.meetingMetadata.peerId);
|
|
5360
5360
|
if (yf(a) && (ZC(r) ? console[t]("InternalLogs:: ", t, e) : console[t](
|
|
5361
5361
|
"InternalLogs:: ",
|
|
5362
5362
|
t,
|
|
@@ -5402,7 +5402,7 @@ class P {
|
|
|
5402
5402
|
8e3
|
|
5403
5403
|
);
|
|
5404
5404
|
try {
|
|
5405
|
-
const o =
|
|
5405
|
+
const o = Zr.getContext(this.meetingMetadata.peerId), c = JSON.stringify({
|
|
5406
5406
|
meetingMetadata: tg(
|
|
5407
5407
|
o,
|
|
5408
5408
|
"sendOtelLogsToNewRelic",
|
|
@@ -5530,7 +5530,7 @@ class vw {
|
|
|
5530
5530
|
return this.mostRecentPeerId;
|
|
5531
5531
|
}
|
|
5532
5532
|
}
|
|
5533
|
-
const
|
|
5533
|
+
const Zr = new vw(), Tw = {
|
|
5534
5534
|
"00": "Client",
|
|
5535
5535
|
"01": "Controller",
|
|
5536
5536
|
"02": "RoomNodeClient",
|
|
@@ -5661,7 +5661,7 @@ ${this.message}`;
|
|
|
5661
5661
|
r && r.endsWith("00") && i && (d = !0), d && i.error("ClientError", {
|
|
5662
5662
|
error: { message: this.message, name: this.name, code: r }
|
|
5663
5663
|
});
|
|
5664
|
-
const l =
|
|
5664
|
+
const l = Zr.getContext(Zr.getMostRecentPeerId());
|
|
5665
5665
|
if (l) {
|
|
5666
5666
|
const h = l.getValue("onError");
|
|
5667
5667
|
try {
|
|
@@ -5787,8 +5787,8 @@ var _w = (s, t, e) => {
|
|
|
5787
5787
|
for (const R of t) {
|
|
5788
5788
|
let A;
|
|
5789
5789
|
R < 0 ? A = h + R * k * e : R > 0 ? A = h + R * E * e : A = h;
|
|
5790
|
-
const [x, O,
|
|
5791
|
-
r.push(ww(x, O,
|
|
5790
|
+
const [x, O, $] = _w(c, d, A / 100);
|
|
5791
|
+
r.push(ww(x, O, $));
|
|
5792
5792
|
}
|
|
5793
5793
|
return r;
|
|
5794
5794
|
}, rg = {
|
|
@@ -6184,13 +6184,13 @@ const ig = 1080, ng = 1920, Nw = (s, t, e, r, i, a) => {
|
|
|
6184
6184
|
let g = d * h, S = l * h, y, E, k, R, A = 1;
|
|
6185
6185
|
return g < e && (A = e / g), Math.abs(A - 1) < 1e-14 && S < r && (A = r / S), g *= A, S *= A, k = d / (g / e), R = l / (S / r), y = (d - k) * o, E = (l - R) * c, y < 0 && (y = 0), E < 0 && (E = 0), k > d && (k = d), R > l && (R = l), [y, E, k, R, s, t, e, r];
|
|
6186
6186
|
};
|
|
6187
|
-
var Ft,
|
|
6187
|
+
var Ft, pi, tt, qt, we, rs, Us, at, Ie, Rn, bn, Hs, kn;
|
|
6188
6188
|
const gp = class extends xt {
|
|
6189
6189
|
constructor(e, r, i, a) {
|
|
6190
6190
|
const o = e.getValue("logger");
|
|
6191
6191
|
super(o);
|
|
6192
6192
|
m(this, Ft, void 0);
|
|
6193
|
-
m(this,
|
|
6193
|
+
m(this, pi, void 0);
|
|
6194
6194
|
m(this, tt, void 0);
|
|
6195
6195
|
m(this, qt, void 0);
|
|
6196
6196
|
m(this, we, {
|
|
@@ -6204,7 +6204,7 @@ const gp = class extends xt {
|
|
|
6204
6204
|
videoBackground: "#191919",
|
|
6205
6205
|
textOnBrand: "#EEEEEE"
|
|
6206
6206
|
});
|
|
6207
|
-
m(this,
|
|
6207
|
+
m(this, Us, void 0);
|
|
6208
6208
|
m(this, at, {});
|
|
6209
6209
|
m(this, Ie, void 0);
|
|
6210
6210
|
m(this, Rn, void 0);
|
|
@@ -6213,7 +6213,7 @@ const gp = class extends xt {
|
|
|
6213
6213
|
m(this, kn, !1);
|
|
6214
6214
|
/** @access private */
|
|
6215
6215
|
p(this, "cleanupEventListeners", () => {
|
|
6216
|
-
n(this,
|
|
6216
|
+
n(this, pi).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, Ie).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, Ie).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, Ie).removeListener("roomLeft", () => this.disable());
|
|
6217
6217
|
});
|
|
6218
6218
|
/** @access private */
|
|
6219
6219
|
p(this, "enablePipMediaControls", () => {
|
|
@@ -6233,7 +6233,7 @@ const gp = class extends xt {
|
|
|
6233
6233
|
});
|
|
6234
6234
|
/** @access private */
|
|
6235
6235
|
p(this, "eventCallback", (e) => {
|
|
6236
|
-
e === "CAMERA" && (n(this, Ie).videoEnabled ? n(this, Ie).disableVideo() : n(this, Ie).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, Ie).audioEnabled ? n(this, Ie).disableAudio() : n(this, Ie).enableAudio(), this.emit("micToggled")), e === "END" && (n(this,
|
|
6236
|
+
e === "CAMERA" && (n(this, Ie).videoEnabled ? n(this, Ie).disableVideo() : n(this, Ie).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, Ie).audioEnabled ? n(this, Ie).disableAudio() : n(this, Ie).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, pi).getValue("peerSessionStore").emit(C.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
6237
6237
|
});
|
|
6238
6238
|
/** @access private */
|
|
6239
6239
|
p(this, "unmountEvents", () => {
|
|
@@ -6245,15 +6245,15 @@ const gp = class extends xt {
|
|
|
6245
6245
|
this.disable(!0);
|
|
6246
6246
|
return;
|
|
6247
6247
|
}
|
|
6248
|
-
n(this, at) !== void 0 && this.paintCanvas(), n(this,
|
|
6248
|
+
n(this, at) !== void 0 && this.paintCanvas(), n(this, Us) !== void 0 && f(this, Us, requestAnimationFrame(() => this.animate()));
|
|
6249
6249
|
});
|
|
6250
6250
|
/**
|
|
6251
6251
|
* Disable PiP
|
|
6252
6252
|
*/
|
|
6253
6253
|
p(this, "disable", (e = !1) => {
|
|
6254
|
-
f(this, Hs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this,
|
|
6254
|
+
f(this, Hs, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, Us)), e !== !0 && document.body.removeChild(n(this, tt)), f(this, Us, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
|
|
6255
6255
|
});
|
|
6256
|
-
f(this,
|
|
6256
|
+
f(this, pi, e), f(this, Hs, "idle"), f(this, Ie, r), f(this, rs, {
|
|
6257
6257
|
brand: r.config.designTokens.colors.brand[500],
|
|
6258
6258
|
background: r.config.designTokens.colors.background[1e3],
|
|
6259
6259
|
text: r.config.designTokens.colors.text,
|
|
@@ -6315,7 +6315,7 @@ const gp = class extends xt {
|
|
|
6315
6315
|
}
|
|
6316
6316
|
/** @access private */
|
|
6317
6317
|
setupEventListeners() {
|
|
6318
|
-
n(this,
|
|
6318
|
+
n(this, pi).subscribe("stageStatus", this.handlePipMediaControls), n(this, Ie).addListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, Ie).addListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, Ie).addListener("roomLeft", () => this.disable());
|
|
6319
6319
|
}
|
|
6320
6320
|
/** @access private */
|
|
6321
6321
|
createCanvas() {
|
|
@@ -6360,14 +6360,14 @@ const gp = class extends xt {
|
|
|
6360
6360
|
R + g,
|
|
6361
6361
|
l
|
|
6362
6362
|
), o.arcTo(k, R + g, k, R + g - l, l), o.arcTo(k, R, k + l, R, l), o.closePath(), o.fill(), o.stroke();
|
|
6363
|
-
const O = h / 6,
|
|
6364
|
-
o.save(), (A || x) && (o.beginPath(), o.arc(
|
|
6363
|
+
const O = h / 6, $ = h / 2 + k, H = g / 2 + R;
|
|
6364
|
+
o.save(), (A || x) && (o.beginPath(), o.arc($, H, O, 0, Math.PI * 2), o.fillStyle = n(this, rs).brand, o.fill(), x ? (o.clip(), o.drawImage(
|
|
6365
6365
|
x,
|
|
6366
|
-
|
|
6366
|
+
$ - O,
|
|
6367
6367
|
H - O,
|
|
6368
6368
|
O * 2,
|
|
6369
6369
|
O * 2
|
|
6370
|
-
), o.restore()) : A && (o.fillStyle = n(this, rs).textOnBrand, o.font = `${O / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(A,
|
|
6370
|
+
), o.restore()) : A && (o.fillStyle = n(this, rs).textOnBrand, o.font = `${O / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(A, $, H)), this.drawIcons(a, k, R, Math.max(h, g)));
|
|
6371
6371
|
}
|
|
6372
6372
|
/** @access private */
|
|
6373
6373
|
drawIcons(e, r, i, a) {
|
|
@@ -6402,7 +6402,7 @@ const gp = class extends xt {
|
|
|
6402
6402
|
let g = 0;
|
|
6403
6403
|
for (; g < n(this, we).width - 5 && d < i; ) {
|
|
6404
6404
|
if ((l = o[d]) != null && l.enabled) {
|
|
6405
|
-
const S = o[d].element, [y, E, k, R, A, x, O,
|
|
6405
|
+
const S = o[d].element, [y, E, k, R, A, x, O, $] = Nw(
|
|
6406
6406
|
g,
|
|
6407
6407
|
c,
|
|
6408
6408
|
e,
|
|
@@ -6410,7 +6410,7 @@ const gp = class extends xt {
|
|
|
6410
6410
|
S.videoWidth,
|
|
6411
6411
|
S.videoHeight
|
|
6412
6412
|
);
|
|
6413
|
-
((h = S == null ? void 0 : S.classList) == null ? void 0 : h.contains("mirror")) ? (a.save(), a.scale(-1, 1), a.drawImage(S, y, E, k, R, -1 * A, x, -1 * O,
|
|
6413
|
+
((h = S == null ? void 0 : S.classList) == null ? void 0 : h.contains("mirror")) ? (a.save(), a.scale(-1, 1), a.drawImage(S, y, E, k, R, -1 * A, x, -1 * O, $), a.restore()) : a.drawImage(S, y, E, k, R, A, x, O, $), this.drawIcons(o[d], A, x, Math.max(O, $));
|
|
6414
6414
|
} else
|
|
6415
6415
|
this.drawEmptyTile(d, e, r, o[d]);
|
|
6416
6416
|
d += 1, g += e;
|
|
@@ -6461,7 +6461,7 @@ const gp = class extends xt {
|
|
|
6461
6461
|
document.body.removeChild(n(this, tt));
|
|
6462
6462
|
} catch (e) {
|
|
6463
6463
|
}
|
|
6464
|
-
this.removeAllSources(), f(this, Ft, void 0), f(this, qt, void 0), f(this,
|
|
6464
|
+
this.removeAllSources(), f(this, Ft, void 0), f(this, qt, void 0), f(this, Us, void 0);
|
|
6465
6465
|
}
|
|
6466
6466
|
/**
|
|
6467
6467
|
* Initialize PiP and prepare sources
|
|
@@ -6585,7 +6585,7 @@ const gp = class extends xt {
|
|
|
6585
6585
|
* Enable PiP
|
|
6586
6586
|
*/
|
|
6587
6587
|
enable() {
|
|
6588
|
-
f(this, Hs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", n(this, Ie).videoEnabled), this.updateMediaSession("MIC", n(this, Ie).audioEnabled), document.body.appendChild(n(this, tt)), f(this,
|
|
6588
|
+
f(this, Hs, "activating"), this.setupEventListeners(), this.updateMediaSession("CAMERA", n(this, Ie).videoEnabled), this.updateMediaSession("MIC", n(this, Ie).audioEnabled), document.body.appendChild(n(this, tt)), f(this, Us, requestAnimationFrame(() => this.animate())), n(this, qt).onloadedmetadata = () => {
|
|
6589
6589
|
n(this, qt).requestPictureInPicture().then(() => {
|
|
6590
6590
|
f(this, Hs, "active");
|
|
6591
6591
|
});
|
|
@@ -6595,7 +6595,7 @@ const gp = class extends xt {
|
|
|
6595
6595
|
}
|
|
6596
6596
|
};
|
|
6597
6597
|
let Lu = gp;
|
|
6598
|
-
Ft = new WeakMap(),
|
|
6598
|
+
Ft = new WeakMap(), pi = new WeakMap(), tt = new WeakMap(), qt = new WeakMap(), we = new WeakMap(), rs = new WeakMap(), Us = new WeakMap(), at = new WeakMap(), Ie = new WeakMap(), Rn = new WeakMap(), bn = new WeakMap(), Hs = new WeakMap(), kn = new WeakMap();
|
|
6599
6599
|
var dr;
|
|
6600
6600
|
(function(s) {
|
|
6601
6601
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -6671,7 +6671,7 @@ class Vw extends v {
|
|
|
6671
6671
|
}
|
|
6672
6672
|
}
|
|
6673
6673
|
const xw = new Vw();
|
|
6674
|
-
class
|
|
6674
|
+
class $w extends v {
|
|
6675
6675
|
constructor() {
|
|
6676
6676
|
super("media.Fingerprint", [
|
|
6677
6677
|
{
|
|
@@ -6691,8 +6691,8 @@ class Uw extends v {
|
|
|
6691
6691
|
]);
|
|
6692
6692
|
}
|
|
6693
6693
|
}
|
|
6694
|
-
new
|
|
6695
|
-
class
|
|
6694
|
+
new $w();
|
|
6695
|
+
class Uw extends v {
|
|
6696
6696
|
constructor() {
|
|
6697
6697
|
super("media.SessionDescription", [
|
|
6698
6698
|
{ no: 1, name: "target", kind: "enum", T: () => ["media.Target", dr] },
|
|
@@ -6713,7 +6713,7 @@ class $w extends v {
|
|
|
6713
6713
|
]);
|
|
6714
6714
|
}
|
|
6715
6715
|
}
|
|
6716
|
-
const ms = new
|
|
6716
|
+
const ms = new Uw();
|
|
6717
6717
|
class Hw extends v {
|
|
6718
6718
|
constructor() {
|
|
6719
6719
|
super("media.ProducerPayload", [
|
|
@@ -7540,7 +7540,7 @@ class VR extends v {
|
|
|
7540
7540
|
}
|
|
7541
7541
|
}
|
|
7542
7542
|
const xR = new VR();
|
|
7543
|
-
class
|
|
7543
|
+
class $R extends v {
|
|
7544
7544
|
constructor() {
|
|
7545
7545
|
super("media.edge.ConsumerCloseRequest", [
|
|
7546
7546
|
{
|
|
@@ -7563,7 +7563,7 @@ class UR extends v {
|
|
|
7563
7563
|
]);
|
|
7564
7564
|
}
|
|
7565
7565
|
}
|
|
7566
|
-
const
|
|
7566
|
+
const UR = new $R();
|
|
7567
7567
|
class HR extends v {
|
|
7568
7568
|
constructor() {
|
|
7569
7569
|
super("media.edge.KickPeerRequest", [
|
|
@@ -8091,7 +8091,15 @@ const Ab = new kb();
|
|
|
8091
8091
|
class Ib extends v {
|
|
8092
8092
|
constructor() {
|
|
8093
8093
|
super("media.edge.PeerJoinBroadcastResponse", [
|
|
8094
|
-
{ no: 1, name: "participant", kind: "message", T: () => Mf }
|
|
8094
|
+
{ no: 1, name: "participant", kind: "message", T: () => Mf },
|
|
8095
|
+
{
|
|
8096
|
+
no: 2,
|
|
8097
|
+
name: "producer_handover_from_peer_id",
|
|
8098
|
+
kind: "scalar",
|
|
8099
|
+
opt: !0,
|
|
8100
|
+
T: 9
|
|
8101
|
+
/*ScalarType.STRING*/
|
|
8102
|
+
}
|
|
8095
8103
|
]);
|
|
8096
8104
|
}
|
|
8097
8105
|
}
|
|
@@ -8195,7 +8203,7 @@ class xb extends v {
|
|
|
8195
8203
|
}
|
|
8196
8204
|
}
|
|
8197
8205
|
const ug = new xb();
|
|
8198
|
-
class
|
|
8206
|
+
class $b extends v {
|
|
8199
8207
|
constructor() {
|
|
8200
8208
|
super("media.edge.PeerProducerCloseBroadcastResponse", [
|
|
8201
8209
|
{
|
|
@@ -8209,7 +8217,7 @@ class Ub extends v {
|
|
|
8209
8217
|
]);
|
|
8210
8218
|
}
|
|
8211
8219
|
}
|
|
8212
|
-
const
|
|
8220
|
+
const Ub = new $b();
|
|
8213
8221
|
class Hb extends v {
|
|
8214
8222
|
constructor() {
|
|
8215
8223
|
super("media.edge.PeerLeaveBroadcastResponse", [
|
|
@@ -8223,7 +8231,7 @@ class Hb extends v {
|
|
|
8223
8231
|
]);
|
|
8224
8232
|
}
|
|
8225
8233
|
}
|
|
8226
|
-
const
|
|
8234
|
+
const $u = new Hb();
|
|
8227
8235
|
class Bb extends v {
|
|
8228
8236
|
constructor() {
|
|
8229
8237
|
super("media.edge.GlobalPeerPinningBroadcastResponse", [
|
|
@@ -8518,10 +8526,10 @@ var rr;
|
|
|
8518
8526
|
(function(s) {
|
|
8519
8527
|
s[s.UNSPECIFIED = 0] = "UNSPECIFIED", s[s.ON_STAGE = 1] = "ON_STAGE", s[s.APPROVED_STAGE = 2] = "APPROVED_STAGE", s[s.REQUESTED_STAGE = 3] = "REQUESTED_STAGE", s[s.OFF_STAGE = 4] = "OFF_STAGE";
|
|
8520
8528
|
})(rr || (rr = {}));
|
|
8521
|
-
var
|
|
8529
|
+
var Uu;
|
|
8522
8530
|
(function(s) {
|
|
8523
8531
|
s[s.NONE = 0] = "NONE", s[s.RECORDER = 1] = "RECORDER", s[s.LIVESTREAMER = 2] = "LIVESTREAMER";
|
|
8524
|
-
})(
|
|
8532
|
+
})(Uu || (Uu = {}));
|
|
8525
8533
|
var Hu;
|
|
8526
8534
|
(function(s) {
|
|
8527
8535
|
s[s.PEERS = 0] = "PEERS", s[s.ROOMS = 1] = "ROOMS";
|
|
@@ -9087,15 +9095,15 @@ class xk extends v {
|
|
|
9087
9095
|
]);
|
|
9088
9096
|
}
|
|
9089
9097
|
}
|
|
9090
|
-
const
|
|
9091
|
-
class
|
|
9098
|
+
const $k = new xk();
|
|
9099
|
+
class Uk extends v {
|
|
9092
9100
|
constructor() {
|
|
9093
9101
|
super("socket.room.DisableConnectedRoomsRequest", [
|
|
9094
|
-
{ no: 1, name: "payloads", kind: "message", repeat: 1, T: () =>
|
|
9102
|
+
{ no: 1, name: "payloads", kind: "message", repeat: 1, T: () => $k }
|
|
9095
9103
|
]);
|
|
9096
9104
|
}
|
|
9097
9105
|
}
|
|
9098
|
-
const Hk = new
|
|
9106
|
+
const Hk = new Uk();
|
|
9099
9107
|
class Bk extends v {
|
|
9100
9108
|
constructor() {
|
|
9101
9109
|
super("socket.room.DisableConnectedRoomsResponse", [
|
|
@@ -9461,10 +9469,10 @@ var Bu;
|
|
|
9461
9469
|
(function(s) {
|
|
9462
9470
|
s[s.NONE = 0] = "NONE", s[s.SKIP = 1] = "SKIP", s[s.ON_PRIVILEGED_USER_ENTRY = 2] = "ON_PRIVILEGED_USER_ENTRY", s[s.SKIP_ON_ACCEPT = 3] = "SKIP_ON_ACCEPT";
|
|
9463
9471
|
})(Bu || (Bu = {}));
|
|
9464
|
-
var
|
|
9472
|
+
var Yr;
|
|
9465
9473
|
(function(s) {
|
|
9466
9474
|
s[s.NONE = 0] = "NONE", s[s.ALLOWED = 1] = "ALLOWED", s[s.NOT_ALLOWED = 2] = "NOT_ALLOWED", s[s.CAN_REQUEST = 3] = "CAN_REQUEST";
|
|
9467
|
-
})(
|
|
9475
|
+
})(Yr || (Yr = {}));
|
|
9468
9476
|
class pA extends v {
|
|
9469
9477
|
constructor() {
|
|
9470
9478
|
super("socket.preset.PollsPermissionUpdate", [
|
|
@@ -9632,8 +9640,8 @@ const CA = new _A();
|
|
|
9632
9640
|
class wA extends v {
|
|
9633
9641
|
constructor() {
|
|
9634
9642
|
super("socket.preset.StreamPermission", [
|
|
9635
|
-
{ no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType",
|
|
9636
|
-
{ no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType",
|
|
9643
|
+
{ no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Yr, "STREAM_PERMISSION_TYPE_"] },
|
|
9644
|
+
{ no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Yr, "STREAM_PERMISSION_TYPE_"] }
|
|
9637
9645
|
]);
|
|
9638
9646
|
}
|
|
9639
9647
|
}
|
|
@@ -9759,7 +9767,7 @@ class kA extends v {
|
|
|
9759
9767
|
T: 8
|
|
9760
9768
|
/*ScalarType.BOOL*/
|
|
9761
9769
|
},
|
|
9762
|
-
{ no: 18, name: "recorder_type", kind: "enum", opt: !0, T: () => ["socket.room.RecorderType",
|
|
9770
|
+
{ no: 18, name: "recorder_type", kind: "enum", opt: !0, T: () => ["socket.room.RecorderType", Uu, "RECORDER_TYPE_"] },
|
|
9763
9771
|
{
|
|
9764
9772
|
no: 19,
|
|
9765
9773
|
name: "hidden_participant",
|
|
@@ -9864,15 +9872,15 @@ class VA extends v {
|
|
|
9864
9872
|
}
|
|
9865
9873
|
}
|
|
9866
9874
|
const xA = new VA();
|
|
9867
|
-
class
|
|
9875
|
+
class $A extends v {
|
|
9868
9876
|
constructor() {
|
|
9869
9877
|
super("socket.preset.UpdatePeersPresetResponse", [
|
|
9870
9878
|
{ no: 1, name: "update_peers_presets", kind: "message", repeat: 1, T: () => Vf }
|
|
9871
9879
|
]);
|
|
9872
9880
|
}
|
|
9873
9881
|
}
|
|
9874
|
-
const yg = new
|
|
9875
|
-
class
|
|
9882
|
+
const yg = new $A();
|
|
9883
|
+
class UA extends v {
|
|
9876
9884
|
constructor() {
|
|
9877
9885
|
super("socket.preset.PeerUserIDMap", [
|
|
9878
9886
|
{
|
|
@@ -9892,7 +9900,7 @@ class $A extends v {
|
|
|
9892
9900
|
]);
|
|
9893
9901
|
}
|
|
9894
9902
|
}
|
|
9895
|
-
const HA = new
|
|
9903
|
+
const HA = new UA();
|
|
9896
9904
|
class BA extends v {
|
|
9897
9905
|
constructor() {
|
|
9898
9906
|
super("socket.preset.BulkUpdatePeerPresetRequest", [
|
|
@@ -10013,7 +10021,7 @@ class qA extends v {
|
|
|
10013
10021
|
]);
|
|
10014
10022
|
}
|
|
10015
10023
|
}
|
|
10016
|
-
const
|
|
10024
|
+
const si = new qA();
|
|
10017
10025
|
class jA extends v {
|
|
10018
10026
|
constructor() {
|
|
10019
10027
|
super("socket.chat.GetPaginatedChatMessageFilters", [
|
|
@@ -10085,7 +10093,7 @@ const JA = new WA();
|
|
|
10085
10093
|
class KA extends v {
|
|
10086
10094
|
constructor() {
|
|
10087
10095
|
super("socket.chat.GetPaginatedChatMessageRoomResponse", [
|
|
10088
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10096
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => si },
|
|
10089
10097
|
{
|
|
10090
10098
|
no: 2,
|
|
10091
10099
|
name: "next",
|
|
@@ -10100,7 +10108,7 @@ const zA = new KA();
|
|
|
10100
10108
|
class YA extends v {
|
|
10101
10109
|
constructor() {
|
|
10102
10110
|
super("socket.chat.GetChatMessagesResponse", [
|
|
10103
|
-
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () =>
|
|
10111
|
+
{ no: 1, name: "messages", kind: "message", repeat: 1, T: () => si }
|
|
10104
10112
|
]);
|
|
10105
10113
|
}
|
|
10106
10114
|
}
|
|
@@ -10129,7 +10137,7 @@ const XA = new QA();
|
|
|
10129
10137
|
class ZA extends v {
|
|
10130
10138
|
constructor() {
|
|
10131
10139
|
super("socket.chat.SendChatMessageToRoomResponse", [
|
|
10132
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10140
|
+
{ no: 1, name: "message", kind: "message", T: () => si }
|
|
10133
10141
|
]);
|
|
10134
10142
|
}
|
|
10135
10143
|
}
|
|
@@ -10166,7 +10174,7 @@ const tI = new eI();
|
|
|
10166
10174
|
class sI extends v {
|
|
10167
10175
|
constructor() {
|
|
10168
10176
|
super("socket.chat.SendChatMessageToPeersResponse", [
|
|
10169
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10177
|
+
{ no: 1, name: "message", kind: "message", T: () => si }
|
|
10170
10178
|
]);
|
|
10171
10179
|
}
|
|
10172
10180
|
}
|
|
@@ -10202,7 +10210,7 @@ new rI();
|
|
|
10202
10210
|
class iI extends v {
|
|
10203
10211
|
constructor() {
|
|
10204
10212
|
super("socket.chat.SendChatMessageToChannelResponse", [
|
|
10205
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10213
|
+
{ no: 1, name: "message", kind: "message", T: () => si }
|
|
10206
10214
|
]);
|
|
10207
10215
|
}
|
|
10208
10216
|
}
|
|
@@ -10307,7 +10315,7 @@ class dI extends v {
|
|
|
10307
10315
|
T: 9
|
|
10308
10316
|
/*ScalarType.STRING*/
|
|
10309
10317
|
},
|
|
10310
|
-
{ no: 4, name: "message", kind: "message", T: () =>
|
|
10318
|
+
{ no: 4, name: "message", kind: "message", T: () => si }
|
|
10311
10319
|
]);
|
|
10312
10320
|
}
|
|
10313
10321
|
}
|
|
@@ -10315,7 +10323,7 @@ const id = new dI();
|
|
|
10315
10323
|
class lI extends v {
|
|
10316
10324
|
constructor() {
|
|
10317
10325
|
super("socket.chat.EditChatMessageResponse", [
|
|
10318
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10326
|
+
{ no: 1, name: "message", kind: "message", T: () => si }
|
|
10319
10327
|
]);
|
|
10320
10328
|
}
|
|
10321
10329
|
}
|
|
@@ -10586,7 +10594,7 @@ new EI();
|
|
|
10586
10594
|
class PI extends v {
|
|
10587
10595
|
constructor() {
|
|
10588
10596
|
super("socket.chat.LatestMessageAndUnreadCount", [
|
|
10589
|
-
{ no: 1, name: "message", kind: "message", T: () =>
|
|
10597
|
+
{ no: 1, name: "message", kind: "message", T: () => si },
|
|
10590
10598
|
{
|
|
10591
10599
|
no: 2,
|
|
10592
10600
|
name: "unread_count",
|
|
@@ -10868,7 +10876,7 @@ class xI extends v {
|
|
|
10868
10876
|
}
|
|
10869
10877
|
}
|
|
10870
10878
|
new xI();
|
|
10871
|
-
class
|
|
10879
|
+
class $I extends v {
|
|
10872
10880
|
constructor() {
|
|
10873
10881
|
super("socket.plugin.StoreKeys", [
|
|
10874
10882
|
{
|
|
@@ -10889,8 +10897,8 @@ class UI extends v {
|
|
|
10889
10897
|
]);
|
|
10890
10898
|
}
|
|
10891
10899
|
}
|
|
10892
|
-
const Yh = new
|
|
10893
|
-
class
|
|
10900
|
+
const Yh = new $I();
|
|
10901
|
+
class UI extends v {
|
|
10894
10902
|
constructor() {
|
|
10895
10903
|
super("socket.plugin.PluginStoreInsertKeysRequest", [
|
|
10896
10904
|
{
|
|
@@ -10911,7 +10919,7 @@ class $I extends v {
|
|
|
10911
10919
|
]);
|
|
10912
10920
|
}
|
|
10913
10921
|
}
|
|
10914
|
-
const HI = new
|
|
10922
|
+
const HI = new UI();
|
|
10915
10923
|
class BI extends v {
|
|
10916
10924
|
constructor() {
|
|
10917
10925
|
super("socket.plugin.PluginStoreGetKeysRequest", [
|
|
@@ -11336,7 +11344,7 @@ class l0 extends v {
|
|
|
11336
11344
|
]);
|
|
11337
11345
|
}
|
|
11338
11346
|
}
|
|
11339
|
-
const
|
|
11347
|
+
const $f = new l0();
|
|
11340
11348
|
class u0 extends v {
|
|
11341
11349
|
constructor() {
|
|
11342
11350
|
super("socket.polls.PollOption", [
|
|
@@ -11459,7 +11467,7 @@ const v0 = new S0();
|
|
|
11459
11467
|
class T0 extends v {
|
|
11460
11468
|
constructor() {
|
|
11461
11469
|
super("socket.polls.UpdatePollResponse", [
|
|
11462
|
-
{ no: 1, name: "poll", kind: "message", T: () =>
|
|
11470
|
+
{ no: 1, name: "poll", kind: "message", T: () => $f }
|
|
11463
11471
|
]);
|
|
11464
11472
|
}
|
|
11465
11473
|
}
|
|
@@ -11467,7 +11475,7 @@ const _u = new T0();
|
|
|
11467
11475
|
class y0 extends v {
|
|
11468
11476
|
constructor() {
|
|
11469
11477
|
super("socket.polls.GetPollsResponse", [
|
|
11470
|
-
{ no: 1, name: "polls", kind: "message", repeat: 1, T: () =>
|
|
11478
|
+
{ no: 1, name: "polls", kind: "message", repeat: 1, T: () => $f }
|
|
11471
11479
|
]);
|
|
11472
11480
|
}
|
|
11473
11481
|
}
|
|
@@ -11762,7 +11770,7 @@ const b0 = 0, k0 = 1, A0 = 2, I0 = 3, M0 = 5, D0 = {
|
|
|
11762
11770
|
getPolls: 1,
|
|
11763
11771
|
votePoll: 2,
|
|
11764
11772
|
updatePoll: 3
|
|
11765
|
-
},
|
|
11773
|
+
}, Uf = {
|
|
11766
11774
|
unknown: 0,
|
|
11767
11775
|
createWebRTCTransport: 1,
|
|
11768
11776
|
produce: 2,
|
|
@@ -11809,15 +11817,15 @@ function Jc(s, t) {
|
|
|
11809
11817
|
function Hf(s, t) {
|
|
11810
11818
|
return Object.keys(s).reduce((e, r) => (e[r] = t | s[r], e), {});
|
|
11811
11819
|
}
|
|
11812
|
-
const
|
|
11820
|
+
const U = Jc(b0, D0), Ge = Jc(k0, O0), Ls = Jc(
|
|
11813
11821
|
A0,
|
|
11814
11822
|
N0
|
|
11815
|
-
), Vs = Jc(I0, L0), _r = Hf(
|
|
11823
|
+
), Vs = Jc(I0, L0), _r = Hf(Uf, 16777216), hs = Hf(Uf, 50331648), hd = Jc(
|
|
11816
11824
|
M0,
|
|
11817
11825
|
V0
|
|
11818
11826
|
);
|
|
11819
|
-
var x0 = Object.defineProperty,
|
|
11820
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
11827
|
+
var x0 = Object.defineProperty, $0 = Object.getOwnPropertyDescriptor, ri = (s, t, e, r) => {
|
|
11828
|
+
for (var i = r > 1 ? void 0 : r ? $0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
11821
11829
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
11822
11830
|
return r && i && x0(t, e, i), i;
|
|
11823
11831
|
}, Qt = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Qt || {}), Rt, An;
|
|
@@ -12003,31 +12011,31 @@ class pr {
|
|
|
12003
12011
|
}
|
|
12004
12012
|
}
|
|
12005
12013
|
Rt = new WeakMap(), An = new WeakMap();
|
|
12006
|
-
|
|
12014
|
+
ri([
|
|
12007
12015
|
P.trace("SocketService.getChatMessages")
|
|
12008
12016
|
], pr.prototype, "getChatMessages", 1);
|
|
12009
|
-
|
|
12017
|
+
ri([
|
|
12010
12018
|
P.trace("SocketService.getChatMessagesPaginated")
|
|
12011
12019
|
], pr.prototype, "getChatMessagesPaginated", 1);
|
|
12012
|
-
|
|
12020
|
+
ri([
|
|
12013
12021
|
P.trace("SocketService.sendMessageToRoom")
|
|
12014
12022
|
], pr.prototype, "sendMessageToRoom", 1);
|
|
12015
|
-
|
|
12023
|
+
ri([
|
|
12016
12024
|
P.trace("SocketService.sendMessageToPeers")
|
|
12017
12025
|
], pr.prototype, "sendMessageToPeers", 1);
|
|
12018
|
-
|
|
12026
|
+
ri([
|
|
12019
12027
|
P.trace("SocketService.sendMessage")
|
|
12020
12028
|
], pr.prototype, "sendMessage", 1);
|
|
12021
|
-
|
|
12029
|
+
ri([
|
|
12022
12030
|
P.trace("SocketService.editMessage")
|
|
12023
12031
|
], pr.prototype, "editMessage", 1);
|
|
12024
|
-
|
|
12032
|
+
ri([
|
|
12025
12033
|
P.trace("SocketService.deleteMessage")
|
|
12026
12034
|
], pr.prototype, "deleteMessage", 1);
|
|
12027
|
-
|
|
12035
|
+
ri([
|
|
12028
12036
|
P.trace("SocketService.searchMessages")
|
|
12029
12037
|
], pr.prototype, "searchMessages", 1);
|
|
12030
|
-
function
|
|
12038
|
+
function U0(s) {
|
|
12031
12039
|
return s.replace(
|
|
12032
12040
|
/([-_]\w)/g,
|
|
12033
12041
|
(t) => t[1].toUpperCase()
|
|
@@ -12042,7 +12050,7 @@ function ks(s) {
|
|
|
12042
12050
|
);
|
|
12043
12051
|
const t = {};
|
|
12044
12052
|
return Object.keys(s).forEach((e) => {
|
|
12045
|
-
const r = om(e) ? e :
|
|
12053
|
+
const r = om(e) ? e : U0(e);
|
|
12046
12054
|
t[r] = ks(s[e]);
|
|
12047
12055
|
}), t;
|
|
12048
12056
|
}
|
|
@@ -12126,8 +12134,8 @@ class Rg {
|
|
|
12126
12134
|
const R = E.headers.get("content-type");
|
|
12127
12135
|
R && R.includes("application/json") ? k = yield E.json() : k = yield E.text();
|
|
12128
12136
|
const A = {};
|
|
12129
|
-
E.headers.forEach((O,
|
|
12130
|
-
A[
|
|
12137
|
+
E.headers.forEach((O, $) => {
|
|
12138
|
+
A[$] = O;
|
|
12131
12139
|
});
|
|
12132
12140
|
const x = {
|
|
12133
12141
|
data: k,
|
|
@@ -12141,7 +12149,7 @@ class Rg {
|
|
|
12141
12149
|
return x;
|
|
12142
12150
|
} catch (S) {
|
|
12143
12151
|
if (S instanceof Error && l > 0)
|
|
12144
|
-
return yield new Promise((y) => setTimeout(y, h)), this.defaults.baseURL ===
|
|
12152
|
+
return yield new Promise((y) => setTimeout(y, h)), this.defaults.baseURL === hi.apiBase.prod ? this.defaults.baseURL = hi.apiBase.prodAlternate : this.defaults.baseURL === hi.apiBase.prodAlternate && (this.defaults.baseURL = hi.apiBase.prod), this.request(W(N({}, t), {
|
|
12145
12153
|
retry: l - 1
|
|
12146
12154
|
}));
|
|
12147
12155
|
throw S;
|
|
@@ -12193,7 +12201,7 @@ class j0 {
|
|
|
12193
12201
|
timeout: r = q0,
|
|
12194
12202
|
retry: i = B0,
|
|
12195
12203
|
retryDelay: a = F0,
|
|
12196
|
-
baseURL: o =
|
|
12204
|
+
baseURL: o = hi.apiBase.prod,
|
|
12197
12205
|
authToken: c,
|
|
12198
12206
|
cachedUserDetails: d
|
|
12199
12207
|
} = e || {};
|
|
@@ -12466,7 +12474,7 @@ const ka = {
|
|
|
12466
12474
|
maxInvocations: 5,
|
|
12467
12475
|
period: 1
|
|
12468
12476
|
};
|
|
12469
|
-
function
|
|
12477
|
+
function $t(s, t) {
|
|
12470
12478
|
return function(e, r, i) {
|
|
12471
12479
|
const a = i.value;
|
|
12472
12480
|
let o = 0, c = Date.now();
|
|
@@ -12484,7 +12492,7 @@ var K0 = Object.defineProperty, z0 = Object.getOwnPropertyDescriptor, Ds = (s, t
|
|
|
12484
12492
|
return r && i && K0(t, e, i), i;
|
|
12485
12493
|
};
|
|
12486
12494
|
const Y0 = ["text", "image", "file", "custom", "poll"], pd = { maxInvocations: 180, period: 60 };
|
|
12487
|
-
var se,
|
|
12495
|
+
var se, gi, ze, In, Bd, Ff, Ao, ju, qg;
|
|
12488
12496
|
let Zt = (qg = class extends xt {
|
|
12489
12497
|
constructor(t, e, r, i) {
|
|
12490
12498
|
const a = t.getValue("logger");
|
|
@@ -12506,11 +12514,11 @@ let Zt = (qg = class extends xt {
|
|
|
12506
12514
|
*/
|
|
12507
12515
|
p(this, "messages");
|
|
12508
12516
|
m(this, se, void 0);
|
|
12509
|
-
m(this,
|
|
12517
|
+
m(this, gi, void 0);
|
|
12510
12518
|
m(this, ze, void 0);
|
|
12511
12519
|
m(this, In, void 0);
|
|
12512
12520
|
p(this, "maxTextLimit", 2e3);
|
|
12513
|
-
f(this, In, t), f(this, ze, e), f(this, se, r), f(this,
|
|
12521
|
+
f(this, In, t), f(this, ze, e), f(this, se, r), f(this, gi, i), this.messages = [];
|
|
12514
12522
|
}
|
|
12515
12523
|
/**
|
|
12516
12524
|
* @private
|
|
@@ -12570,7 +12578,7 @@ let Zt = (qg = class extends xt {
|
|
|
12570
12578
|
if (!t)
|
|
12571
12579
|
throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new w("Message can not be empty.", "0502");
|
|
12572
12580
|
let r = [];
|
|
12573
|
-
e && e.length > 0 && (e.push(n(this, se).id), r = n(this,
|
|
12581
|
+
e && e.length > 0 && (e.push(n(this, se).id), r = n(this, gi).joined.toArray().filter((h) => e.includes(h.id)).map((h) => h.userId), r.push(n(this, se).userId)), n(this, ze).sendMessage(
|
|
12574
12582
|
t,
|
|
12575
12583
|
Qt.TEXT,
|
|
12576
12584
|
e
|
|
@@ -12606,7 +12614,7 @@ let Zt = (qg = class extends xt {
|
|
|
12606
12614
|
const h = Nt(), { getLocation: g, putLocation: S } = yield h.getPresignedUrls(t.name);
|
|
12607
12615
|
yield h.uploadFile(t, S);
|
|
12608
12616
|
let y = [];
|
|
12609
|
-
e && e.length > 0 && (e.push(n(this, se).id), y = n(this,
|
|
12617
|
+
e && e.length > 0 && (e.push(n(this, se).id), y = n(this, gi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), y.push(n(this, se).userId)), n(this, ze).sendMessage(
|
|
12610
12618
|
g,
|
|
12611
12619
|
Qt.IMAGE,
|
|
12612
12620
|
e
|
|
@@ -12641,7 +12649,7 @@ let Zt = (qg = class extends xt {
|
|
|
12641
12649
|
const l = Nt(), { getLocation: h, putLocation: g } = yield l.getPresignedUrls(t.name);
|
|
12642
12650
|
yield l.uploadFile(t, g);
|
|
12643
12651
|
let S = [];
|
|
12644
|
-
e && e.length > 0 && (e.push(n(this, se).id), S = n(this,
|
|
12652
|
+
e && e.length > 0 && (e.push(n(this, se).id), S = n(this, gi).joined.toArray().filter((E) => e.includes(E.id)).map((E) => E.userId), S.push(n(this, se).userId));
|
|
12645
12653
|
const y = JSON.stringify({
|
|
12646
12654
|
link: h,
|
|
12647
12655
|
name: t.name,
|
|
@@ -12690,29 +12698,29 @@ let Zt = (qg = class extends xt {
|
|
|
12690
12698
|
this.logger.error("sendCustomMessage::permission_denied");
|
|
12691
12699
|
return;
|
|
12692
12700
|
}
|
|
12693
|
-
const r = (
|
|
12701
|
+
const r = ($) => u(this, null, function* () {
|
|
12694
12702
|
try {
|
|
12695
|
-
if (typeof
|
|
12696
|
-
return { link:
|
|
12697
|
-
const H = Nt(), { getLocation: F, putLocation: X } = yield H.getPresignedUrls(
|
|
12698
|
-
return yield H.uploadFile(
|
|
12703
|
+
if (typeof $ == "string")
|
|
12704
|
+
return { link: $ };
|
|
12705
|
+
const H = Nt(), { getLocation: F, putLocation: X } = yield H.getPresignedUrls($.name);
|
|
12706
|
+
return yield H.uploadFile($, X), {
|
|
12699
12707
|
link: F,
|
|
12700
|
-
type:
|
|
12701
|
-
name:
|
|
12702
|
-
size:
|
|
12708
|
+
type: $.type,
|
|
12709
|
+
name: $.name,
|
|
12710
|
+
size: $.size
|
|
12703
12711
|
};
|
|
12704
12712
|
} catch (H) {
|
|
12705
12713
|
throw new w("Error sending image message.", "0500", this.logger);
|
|
12706
12714
|
}
|
|
12707
12715
|
}), i = W(N({}, t), {
|
|
12708
|
-
files: yield Promise.all((k = (E = t.files) != null ? E : []) == null ? void 0 : k.map((
|
|
12709
|
-
return r(
|
|
12716
|
+
files: yield Promise.all((k = (E = t.files) != null ? E : []) == null ? void 0 : k.map(($) => u(this, null, function* () {
|
|
12717
|
+
return r($);
|
|
12710
12718
|
}))),
|
|
12711
|
-
images: yield Promise.all((A = (R = t.images) != null ? R : []) == null ? void 0 : A.map((
|
|
12712
|
-
return r(
|
|
12719
|
+
images: yield Promise.all((A = (R = t.images) != null ? R : []) == null ? void 0 : A.map(($) => u(this, null, function* () {
|
|
12720
|
+
return r($);
|
|
12713
12721
|
}))),
|
|
12714
|
-
videos: yield Promise.all((O = (x = t.videos) != null ? x : []) == null ? void 0 : O.map((
|
|
12715
|
-
return r(
|
|
12722
|
+
videos: yield Promise.all((O = (x = t.videos) != null ? x : []) == null ? void 0 : O.map(($) => u(this, null, function* () {
|
|
12723
|
+
return r($);
|
|
12716
12724
|
})))
|
|
12717
12725
|
});
|
|
12718
12726
|
n(this, ze).sendMessage(
|
|
@@ -12926,26 +12934,26 @@ let Zt = (qg = class extends xt {
|
|
|
12926
12934
|
);
|
|
12927
12935
|
});
|
|
12928
12936
|
}
|
|
12929
|
-
}, se = new WeakMap(),
|
|
12937
|
+
}, se = new WeakMap(), gi = new WeakMap(), ze = new WeakMap(), In = new WeakMap(), Bd = new WeakSet(), Ff = function() {
|
|
12930
12938
|
return n(this, In).getValue("connectionHandler");
|
|
12931
12939
|
}, Ao = new WeakSet(), ju = function() {
|
|
12932
12940
|
return n(this, Bd, Ff).socketJoined === !0;
|
|
12933
12941
|
}, qg);
|
|
12934
12942
|
Ds([
|
|
12935
12943
|
P.trace("Chat.sendTextMessage"),
|
|
12936
|
-
|
|
12944
|
+
$t(pd)
|
|
12937
12945
|
], Zt.prototype, "sendTextMessage", 1);
|
|
12938
12946
|
Ds([
|
|
12939
12947
|
P.trace("Chat.sendImageMessage"),
|
|
12940
|
-
|
|
12948
|
+
$t({ maxInvocations: 20, period: 60 })
|
|
12941
12949
|
], Zt.prototype, "sendImageMessage", 1);
|
|
12942
12950
|
Ds([
|
|
12943
12951
|
P.trace("Chat.sendFileMessage"),
|
|
12944
|
-
|
|
12952
|
+
$t({ maxInvocations: 20, period: 60 })
|
|
12945
12953
|
], Zt.prototype, "sendFileMessage", 1);
|
|
12946
12954
|
Ds([
|
|
12947
12955
|
P.trace("Chat.sendMessage"),
|
|
12948
|
-
|
|
12956
|
+
$t({ maxInvocations: 180, period: 60 })
|
|
12949
12957
|
], Zt.prototype, "sendMessage", 1);
|
|
12950
12958
|
Ds([
|
|
12951
12959
|
P.trace("Chat.editTextMessage")
|
|
@@ -12969,14 +12977,14 @@ var Q0 = Object.defineProperty, X0 = Object.getOwnPropertyDescriptor, Z0 = (s, t
|
|
|
12969
12977
|
for (var i = r > 1 ? void 0 : r ? X0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
12970
12978
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
12971
12979
|
return r && i && Q0(t, e, i), i;
|
|
12972
|
-
},
|
|
12980
|
+
}, mi, jg;
|
|
12973
12981
|
const Tr = (jg = class {
|
|
12974
12982
|
constructor(s, t, e, r) {
|
|
12975
12983
|
p(this, "chat");
|
|
12976
12984
|
p(this, "chatSocketHandler");
|
|
12977
12985
|
p(this, "self");
|
|
12978
|
-
m(this,
|
|
12979
|
-
f(this,
|
|
12986
|
+
m(this, mi, void 0);
|
|
12987
|
+
f(this, mi, s), this.chatSocketHandler = t, this.chat = new Zt(
|
|
12980
12988
|
s,
|
|
12981
12989
|
t,
|
|
12982
12990
|
e,
|
|
@@ -12988,14 +12996,14 @@ const Tr = (jg = class {
|
|
|
12988
12996
|
* Not for external use
|
|
12989
12997
|
*/
|
|
12990
12998
|
get telemetry() {
|
|
12991
|
-
return n(this,
|
|
12999
|
+
return n(this, mi).getValue("telemetry");
|
|
12992
13000
|
}
|
|
12993
13001
|
/**
|
|
12994
13002
|
* @access private
|
|
12995
13003
|
* Not for external use
|
|
12996
13004
|
*/
|
|
12997
13005
|
get logger() {
|
|
12998
|
-
return n(this,
|
|
13006
|
+
return n(this, mi).getValue("logger");
|
|
12999
13007
|
}
|
|
13000
13008
|
static init(s, t, e, r) {
|
|
13001
13009
|
return u(this, null, function* () {
|
|
@@ -13082,7 +13090,7 @@ const Tr = (jg = class {
|
|
|
13082
13090
|
});
|
|
13083
13091
|
}
|
|
13084
13092
|
setupEvents() {
|
|
13085
|
-
n(this,
|
|
13093
|
+
n(this, mi).getValue("peerSessionStore").on(
|
|
13086
13094
|
C.SOCKET_SERVICE_ROOM_JOINED,
|
|
13087
13095
|
() => u(this, null, function* () {
|
|
13088
13096
|
this.getChatMessages();
|
|
@@ -13158,7 +13166,7 @@ const Tr = (jg = class {
|
|
|
13158
13166
|
}
|
|
13159
13167
|
);
|
|
13160
13168
|
}
|
|
13161
|
-
},
|
|
13169
|
+
}, mi = new WeakMap(), jg);
|
|
13162
13170
|
let ho = Tr;
|
|
13163
13171
|
Z0([
|
|
13164
13172
|
P.trace("ChatController.setupEvents")
|
|
@@ -13252,14 +13260,14 @@ var rM = Object.defineProperty, iM = Object.getOwnPropertyDescriptor, nM = (s, t
|
|
|
13252
13260
|
for (var i = r > 1 ? void 0 : r ? iM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13253
13261
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13254
13262
|
return r && i && rM(t, e, i), i;
|
|
13255
|
-
}, Rr, On,
|
|
13263
|
+
}, Rr, On, fi, Wg;
|
|
13256
13264
|
const pn = (Wg = class {
|
|
13257
13265
|
constructor(s, t, e) {
|
|
13258
13266
|
p(this, "polls");
|
|
13259
13267
|
m(this, Rr, void 0);
|
|
13260
13268
|
m(this, On, void 0);
|
|
13261
|
-
m(this,
|
|
13262
|
-
this.polls = new Gu(s, t, e), f(this, On, t), f(this, Rr, s), f(this,
|
|
13269
|
+
m(this, fi, void 0);
|
|
13270
|
+
this.polls = new Gu(s, t, e), f(this, On, t), f(this, Rr, s), f(this, fi, e), this.setupEvents();
|
|
13263
13271
|
}
|
|
13264
13272
|
/**
|
|
13265
13273
|
* @access private
|
|
@@ -13298,13 +13306,13 @@ const pn = (Wg = class {
|
|
|
13298
13306
|
n(this, Rr).getValue("peerSessionStore").on(C.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13299
13307
|
this.getPolls();
|
|
13300
13308
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13301
|
-
n(this,
|
|
13309
|
+
n(this, fi).on(r, s[r]);
|
|
13302
13310
|
});
|
|
13303
13311
|
}, e = () => {
|
|
13304
13312
|
n(this, Rr).getValue("peerSessionStore").on(C.SOCKET_SERVICE_ROOM_JOINED, () => {
|
|
13305
13313
|
this.getPolls();
|
|
13306
13314
|
}), Object.keys(s).map(Number).forEach((r) => {
|
|
13307
|
-
n(this,
|
|
13315
|
+
n(this, fi).removeListeners(r);
|
|
13308
13316
|
});
|
|
13309
13317
|
};
|
|
13310
13318
|
n(this, On).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
|
|
@@ -13328,7 +13336,7 @@ const pn = (Wg = class {
|
|
|
13328
13336
|
}
|
|
13329
13337
|
getPolls() {
|
|
13330
13338
|
return u(this, null, function* () {
|
|
13331
|
-
const s = yield n(this,
|
|
13339
|
+
const s = yield n(this, fi).getPolls();
|
|
13332
13340
|
if (!(s != null && s.payload))
|
|
13333
13341
|
return;
|
|
13334
13342
|
const { polls: t } = E0.fromBinary(s.payload);
|
|
@@ -13357,7 +13365,7 @@ const pn = (Wg = class {
|
|
|
13357
13365
|
voted: s.votes
|
|
13358
13366
|
};
|
|
13359
13367
|
}
|
|
13360
|
-
}, Rr = new WeakMap(), On = new WeakMap(),
|
|
13368
|
+
}, Rr = new WeakMap(), On = new WeakMap(), fi = new WeakMap(), Wg);
|
|
13361
13369
|
let Gf = pn;
|
|
13362
13370
|
nM([
|
|
13363
13371
|
P.trace("PollController.setupEvents")
|
|
@@ -13366,7 +13374,7 @@ var aM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, cM = (s, t
|
|
|
13366
13374
|
for (var i = r > 1 ? void 0 : r ? oM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13367
13375
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13368
13376
|
return r && i && aM(t, e, i), i;
|
|
13369
|
-
}, Wf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Wf || {}), Nn, Mo, Ju,
|
|
13377
|
+
}, Wf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Wf || {}), Nn, Mo, Ju, Si, Do, Jg;
|
|
13370
13378
|
let Wu = (Jg = class extends xt {
|
|
13371
13379
|
constructor(t, e, r, i, a) {
|
|
13372
13380
|
const o = t.getValue("logger");
|
|
@@ -13381,7 +13389,7 @@ let Wu = (Jg = class extends xt {
|
|
|
13381
13389
|
*/
|
|
13382
13390
|
p(this, "broadcastTabChanges");
|
|
13383
13391
|
m(this, Nn, void 0);
|
|
13384
|
-
m(this,
|
|
13392
|
+
m(this, Si, void 0);
|
|
13385
13393
|
m(this, Do, void 0);
|
|
13386
13394
|
/**
|
|
13387
13395
|
* The `viewType` tells the type of the meeting
|
|
@@ -13400,7 +13408,7 @@ let Wu = (Jg = class extends xt {
|
|
|
13400
13408
|
* (Experimental) The sessionId this meeting object is part of.
|
|
13401
13409
|
*/
|
|
13402
13410
|
p(this, "sessionId");
|
|
13403
|
-
f(this, Nn, t), f(this,
|
|
13411
|
+
f(this, Nn, t), f(this, Si, e), this.viewType = r, f(this, Do, i), this.meetingTitle = a, this.broadcastTabChanges = e.permissions.canSpotlight;
|
|
13404
13412
|
}
|
|
13405
13413
|
get socketState() {
|
|
13406
13414
|
return n(this, Mo, Ju).socketState;
|
|
@@ -13419,7 +13427,7 @@ let Wu = (Jg = class extends xt {
|
|
|
13419
13427
|
* @param {boolean} broadcastTabChanges
|
|
13420
13428
|
*/
|
|
13421
13429
|
setBroadcastTabChanges(t) {
|
|
13422
|
-
if (!n(this,
|
|
13430
|
+
if (!n(this, Si).permissions.canSpotlight)
|
|
13423
13431
|
throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new w("User does not have permission to toggle spotlight", "0801");
|
|
13424
13432
|
this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
|
|
13425
13433
|
}
|
|
@@ -13437,18 +13445,18 @@ let Wu = (Jg = class extends xt {
|
|
|
13437
13445
|
type: t.type
|
|
13438
13446
|
}
|
|
13439
13447
|
}
|
|
13440
|
-
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this,
|
|
13448
|
+
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this, Si).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
|
|
13441
13449
|
}
|
|
13442
13450
|
/** @access private */
|
|
13443
13451
|
assertActiveTabToRoom() {
|
|
13444
13452
|
n(this, Do).broadcastMessage("spotlight", {
|
|
13445
|
-
userId: n(this,
|
|
13453
|
+
userId: n(this, Si).userId,
|
|
13446
13454
|
currentTab: this.selfActiveTab
|
|
13447
13455
|
});
|
|
13448
13456
|
}
|
|
13449
13457
|
}, Nn = new WeakMap(), Mo = new WeakSet(), Ju = function() {
|
|
13450
13458
|
return n(this, Nn).getValue("connectionHandler");
|
|
13451
|
-
},
|
|
13459
|
+
}, Si = new WeakMap(), Do = new WeakMap(), Jg);
|
|
13452
13460
|
Wu = cM([
|
|
13453
13461
|
rt("0800")
|
|
13454
13462
|
], Wu);
|
|
@@ -13466,7 +13474,7 @@ var lM = Object.defineProperty, uM = Object.getOwnPropertyDescriptor, Jf = (s, t
|
|
|
13466
13474
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13467
13475
|
return r && i && lM(t, e, i), i;
|
|
13468
13476
|
}, Oo, Kg;
|
|
13469
|
-
let
|
|
13477
|
+
let ei = (Kg = class extends xt {
|
|
13470
13478
|
constructor(t) {
|
|
13471
13479
|
const e = t.getValue("logger");
|
|
13472
13480
|
super(e);
|
|
@@ -13483,7 +13491,7 @@ let Zr = (Kg = class extends xt {
|
|
|
13483
13491
|
}
|
|
13484
13492
|
static init(t, e) {
|
|
13485
13493
|
return u(this, null, function* () {
|
|
13486
|
-
const r = new
|
|
13494
|
+
const r = new ei(t), i = t.getValue("logger");
|
|
13487
13495
|
try {
|
|
13488
13496
|
e && r.getActiveTranscript();
|
|
13489
13497
|
} catch (a) {
|
|
@@ -13525,13 +13533,13 @@ let Zr = (Kg = class extends xt {
|
|
|
13525
13533
|
*/
|
|
13526
13534
|
static parseTranscripts(t) {
|
|
13527
13535
|
return t ? t.split(`
|
|
13528
|
-
`).map((e) =>
|
|
13536
|
+
`).map((e) => ei.parseTranscript(e, !1)).filter(Boolean) : [];
|
|
13529
13537
|
}
|
|
13530
13538
|
getActiveTranscript() {
|
|
13531
13539
|
return u(this, null, function* () {
|
|
13532
13540
|
try {
|
|
13533
13541
|
const t = Nt(), { transcript: e } = yield t.getActiveTranscript();
|
|
13534
|
-
this.transcripts =
|
|
13542
|
+
this.transcripts = ei.parseTranscripts(e);
|
|
13535
13543
|
} catch (t) {
|
|
13536
13544
|
}
|
|
13537
13545
|
});
|
|
@@ -13554,10 +13562,10 @@ let Zr = (Kg = class extends xt {
|
|
|
13554
13562
|
}, Oo = new WeakMap(), Kg);
|
|
13555
13563
|
Jf([
|
|
13556
13564
|
P.trace("Ai.getActiveTranscript")
|
|
13557
|
-
],
|
|
13558
|
-
|
|
13565
|
+
], ei.prototype, "getActiveTranscript", 1);
|
|
13566
|
+
ei = Jf([
|
|
13559
13567
|
rt("0000")
|
|
13560
|
-
],
|
|
13568
|
+
], ei);
|
|
13561
13569
|
var hM = Object.defineProperty, pM = Object.getOwnPropertyDescriptor, gM = (s, t, e, r) => {
|
|
13562
13570
|
for (var i = r > 1 ? void 0 : r ? pM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
13563
13571
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -13598,7 +13606,7 @@ const Kf = (zg = class {
|
|
|
13598
13606
|
*/
|
|
13599
13607
|
static init(s, t, e, r, i) {
|
|
13600
13608
|
return u(this, null, function* () {
|
|
13601
|
-
const a = yield
|
|
13609
|
+
const a = yield ei.init(s, t.permissions.transcriptionEnabled);
|
|
13602
13610
|
return new Kf(
|
|
13603
13611
|
s,
|
|
13604
13612
|
t,
|
|
@@ -13704,7 +13712,7 @@ const Kf = (zg = class {
|
|
|
13704
13712
|
}
|
|
13705
13713
|
}), this.conditionallySetActiveTab(t);
|
|
13706
13714
|
}
|
|
13707
|
-
), this.aiSocketHandler.on(
|
|
13715
|
+
), this.aiSocketHandler.on(U.transcript, (s) => {
|
|
13708
13716
|
const {
|
|
13709
13717
|
meetingId: t,
|
|
13710
13718
|
transcript: e,
|
|
@@ -13712,7 +13720,7 @@ const Kf = (zg = class {
|
|
|
13712
13720
|
} = s;
|
|
13713
13721
|
let i;
|
|
13714
13722
|
try {
|
|
13715
|
-
i =
|
|
13723
|
+
i = ei.parseTranscript(e, r);
|
|
13716
13724
|
} catch (d) {
|
|
13717
13725
|
this.logger.error(`Failed to parse transcript: ${e}`, d);
|
|
13718
13726
|
}
|
|
@@ -13793,7 +13801,7 @@ var mM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, cn = (s, t
|
|
|
13793
13801
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
13794
13802
|
return r && i && mM(t, e, i), i;
|
|
13795
13803
|
}, jt, jd, ae, No, Ss, xe, Lo, Ku, Vn, gd;
|
|
13796
|
-
class
|
|
13804
|
+
class ii extends xt {
|
|
13797
13805
|
constructor(e, r, i, a, o) {
|
|
13798
13806
|
const c = e.getValue("logger");
|
|
13799
13807
|
super(c);
|
|
@@ -13989,19 +13997,19 @@ jt = new WeakMap(), jd = new WeakMap(), ae = new WeakMap(), No = new WeakMap(),
|
|
|
13989
13997
|
};
|
|
13990
13998
|
cn([
|
|
13991
13999
|
P.trace("Stage.getStageRequests")
|
|
13992
|
-
],
|
|
14000
|
+
], ii.prototype, "getAccessRequests", 1);
|
|
13993
14001
|
cn([
|
|
13994
14002
|
P.trace("Stage.requestAccess")
|
|
13995
|
-
],
|
|
14003
|
+
], ii.prototype, "requestAccess", 1);
|
|
13996
14004
|
cn([
|
|
13997
14005
|
P.trace("Stage.cancelRequestAccess")
|
|
13998
|
-
],
|
|
14006
|
+
], ii.prototype, "cancelRequestAccess", 1);
|
|
13999
14007
|
cn([
|
|
14000
14008
|
P.trace("Stage.grantAccess")
|
|
14001
|
-
],
|
|
14009
|
+
], ii.prototype, "grantAccess", 1);
|
|
14002
14010
|
cn([
|
|
14003
14011
|
P.trace("Stage.denyAccess")
|
|
14004
|
-
],
|
|
14012
|
+
], ii.prototype, "denyAccess", 1);
|
|
14005
14013
|
cn([
|
|
14006
14014
|
mr.executeWithLock({
|
|
14007
14015
|
methodName: "joinStage",
|
|
@@ -14009,10 +14017,10 @@ cn([
|
|
|
14009
14017
|
timeout: 5e3
|
|
14010
14018
|
}),
|
|
14011
14019
|
P.trace("Stage.joinStage")
|
|
14012
|
-
],
|
|
14020
|
+
], ii.prototype, "join", 1);
|
|
14013
14021
|
cn([
|
|
14014
14022
|
P.trace("Stage.leaveStage")
|
|
14015
|
-
],
|
|
14023
|
+
], ii.prototype, "leave", 1);
|
|
14016
14024
|
function SM(s) {
|
|
14017
14025
|
return !(s.viewType === "LIVESTREAM" || s.viewType === "CHAT");
|
|
14018
14026
|
}
|
|
@@ -14045,7 +14053,7 @@ class Yf {
|
|
|
14045
14053
|
m(this, Ar, void 0);
|
|
14046
14054
|
m(this, Vo, 0);
|
|
14047
14055
|
m(this, ot, void 0);
|
|
14048
|
-
f(this, ot, t), this.stage = new
|
|
14056
|
+
f(this, ot, t), this.stage = new ii(
|
|
14049
14057
|
t,
|
|
14050
14058
|
i,
|
|
14051
14059
|
a,
|
|
@@ -14070,14 +14078,14 @@ class Yf {
|
|
|
14070
14078
|
setupEvents() {
|
|
14071
14079
|
n(this, ot).subscribe("stageStatus", (t) => {
|
|
14072
14080
|
this.stage.emit("stageStatusUpdate", t);
|
|
14073
|
-
}), n(this, Ar).on(
|
|
14081
|
+
}), n(this, Ar).on(U.grantStageAccess, () => {
|
|
14074
14082
|
n(this, kr).permissions.stageAccess !== G.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
|
|
14075
|
-
}), n(this, Ar).on(
|
|
14083
|
+
}), n(this, Ar).on(U.peerStageStatusUpdate, (t) => {
|
|
14076
14084
|
t !== void 0 && (t.peerId === n(this, kr).id ? this.selfStageStatusHandler(t) : this.peerStageStatusHandler(t));
|
|
14077
|
-
}), n(this, Ar).on(
|
|
14085
|
+
}), n(this, Ar).on(U.denyStageAccess, () => {
|
|
14078
14086
|
n(this, kr).permissions.stageAccess !== G.Allowed && (this.stage.emit("stageRequestRejected"), this.setStageStatus("OFF_STAGE"));
|
|
14079
14087
|
}), n(this, Ar).on(
|
|
14080
|
-
|
|
14088
|
+
U.getStageRequests,
|
|
14081
14089
|
(t) => u(this, null, function* () {
|
|
14082
14090
|
var r;
|
|
14083
14091
|
if (n(this, kr).permissions.stageAccess !== G.Allowed)
|
|
@@ -14165,7 +14173,7 @@ var EM = Object.defineProperty, PM = Object.getOwnPropertyDescriptor, Xh = (s, t
|
|
|
14165
14173
|
for (var i = r > 1 ? void 0 : r ? PM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14166
14174
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14167
14175
|
return r && i && EM(t, e, i), i;
|
|
14168
|
-
},
|
|
14176
|
+
}, vi, Bs, xo, $o, Ti, Yg;
|
|
14169
14177
|
let Ro = (Yg = class extends ba {
|
|
14170
14178
|
constructor(t, e, r, i) {
|
|
14171
14179
|
const a = t.getValue("logger");
|
|
@@ -14174,22 +14182,22 @@ let Ro = (Yg = class extends ba {
|
|
|
14174
14182
|
p(this, "icon");
|
|
14175
14183
|
p(this, "id");
|
|
14176
14184
|
p(this, "permissions");
|
|
14177
|
-
m(this,
|
|
14185
|
+
m(this, vi, void 0);
|
|
14178
14186
|
m(this, Bs, void 0);
|
|
14179
14187
|
m(this, xo, void 0);
|
|
14180
|
-
m(this,
|
|
14181
|
-
m(this,
|
|
14188
|
+
m(this, $o, void 0);
|
|
14189
|
+
m(this, Ti, void 0);
|
|
14182
14190
|
p(this, "active");
|
|
14183
14191
|
p(this, "enabledBy");
|
|
14184
14192
|
f(this, xo, t);
|
|
14185
14193
|
const o = t.getValue("meetingId");
|
|
14186
|
-
this.id = `${o}:${e.id}`, this.name = e.name, this.icon = e.icon, f(this,
|
|
14194
|
+
this.id = `${o}:${e.id}`, this.name = e.name, this.icon = e.icon, f(this, $o, e.component), this.permissions = e.permissions, f(this, vi, i), f(this, Bs, r), this.active = !1, this.enabledBy = "";
|
|
14187
14195
|
}
|
|
14188
14196
|
/**
|
|
14189
14197
|
* The component for this plugin, as provided in the plugin config.
|
|
14190
14198
|
*/
|
|
14191
14199
|
get component() {
|
|
14192
|
-
return n(this,
|
|
14200
|
+
return n(this, $o);
|
|
14193
14201
|
}
|
|
14194
14202
|
/**
|
|
14195
14203
|
* @private
|
|
@@ -14207,7 +14215,7 @@ let Ro = (Yg = class extends ba {
|
|
|
14207
14215
|
*/
|
|
14208
14216
|
// NOTE: Enable this plugin for the current user (called by controller on remote activation).
|
|
14209
14217
|
activateForSelf() {
|
|
14210
|
-
f(this,
|
|
14218
|
+
f(this, Ti, new Date()), this.active = !0, this.emit("stateUpdate", {
|
|
14211
14219
|
active: this.active,
|
|
14212
14220
|
pluginId: this.id
|
|
14213
14221
|
}), this.emit("enabled");
|
|
@@ -14218,7 +14226,7 @@ let Ro = (Yg = class extends ba {
|
|
|
14218
14226
|
*/
|
|
14219
14227
|
// NOTE: Disable this plugin for the current user.
|
|
14220
14228
|
deactivateForSelf() {
|
|
14221
|
-
f(this,
|
|
14229
|
+
f(this, Ti, void 0), this.active = !1, this.emit("stateUpdate", {
|
|
14222
14230
|
active: this.active,
|
|
14223
14231
|
pluginId: this.id
|
|
14224
14232
|
}), this.emit("closed");
|
|
@@ -14233,8 +14241,8 @@ let Ro = (Yg = class extends ba {
|
|
|
14233
14241
|
name: this.name,
|
|
14234
14242
|
icon: this.icon,
|
|
14235
14243
|
id: this.id,
|
|
14236
|
-
enabledBy: n(this,
|
|
14237
|
-
}), this.enabledBy = n(this,
|
|
14244
|
+
enabledBy: n(this, vi).id
|
|
14245
|
+
}), this.enabledBy = n(this, vi).id, this.activateForSelf(), this.logger.info("plugin::activated", {
|
|
14238
14246
|
plugin: {
|
|
14239
14247
|
id: this.id,
|
|
14240
14248
|
enabledBy: this.enabledBy,
|
|
@@ -14247,11 +14255,11 @@ let Ro = (Yg = class extends ba {
|
|
|
14247
14255
|
deactivate() {
|
|
14248
14256
|
return u(this, null, function* () {
|
|
14249
14257
|
var e;
|
|
14250
|
-
if (!this.active || !((e = this.permissions) != null && e.canDeactivate) && this.enabledBy !== n(this,
|
|
14258
|
+
if (!this.active || !((e = this.permissions) != null && e.canDeactivate) && this.enabledBy !== n(this, vi).id)
|
|
14251
14259
|
return;
|
|
14252
14260
|
if (!n(this, Bs))
|
|
14253
14261
|
throw new w("Cannot deactivate plugin: active plugins store is not available yet.", "0604");
|
|
14254
|
-
const t = n(this,
|
|
14262
|
+
const t = n(this, Ti) ? new Date().getTime() - n(this, Ti).getTime() : 0;
|
|
14255
14263
|
yield n(this, Bs).set(this.id, null), this.deactivateForSelf(), this.logger.info("plugin::deactivated", {
|
|
14256
14264
|
plugin: {
|
|
14257
14265
|
id: this.id,
|
|
@@ -14261,7 +14269,7 @@ let Ro = (Yg = class extends ba {
|
|
|
14261
14269
|
});
|
|
14262
14270
|
});
|
|
14263
14271
|
}
|
|
14264
|
-
},
|
|
14272
|
+
}, vi = new WeakMap(), Bs = new WeakMap(), xo = new WeakMap(), $o = new WeakMap(), Ti = new WeakMap(), Yg);
|
|
14265
14273
|
Xh([
|
|
14266
14274
|
P.trace("Plugin.activatePlugin")
|
|
14267
14275
|
], Ro.prototype, "activate", 1);
|
|
@@ -14271,7 +14279,7 @@ Xh([
|
|
|
14271
14279
|
Ro = Xh([
|
|
14272
14280
|
rt("0600")
|
|
14273
14281
|
], Ro);
|
|
14274
|
-
var Me,
|
|
14282
|
+
var Me, yi;
|
|
14275
14283
|
class Qf extends Map {
|
|
14276
14284
|
constructor(e, r = void 0) {
|
|
14277
14285
|
const {
|
|
@@ -14281,11 +14289,11 @@ class Qf extends Map {
|
|
|
14281
14289
|
} = e;
|
|
14282
14290
|
super();
|
|
14283
14291
|
m(this, Me, void 0);
|
|
14284
|
-
m(this,
|
|
14292
|
+
m(this, yi, void 0);
|
|
14285
14293
|
p(this, "onAddEvent");
|
|
14286
14294
|
p(this, "onDeleteEvent");
|
|
14287
14295
|
p(this, "onClearEvent");
|
|
14288
|
-
f(this, Me, new ba(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this,
|
|
14296
|
+
f(this, Me, new ba(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this, yi, /* @__PURE__ */ new Map());
|
|
14289
14297
|
}
|
|
14290
14298
|
emit(e, ...r) {
|
|
14291
14299
|
return n(this, Me).emit(e, ...r);
|
|
@@ -14336,19 +14344,19 @@ class Qf extends Map {
|
|
|
14336
14344
|
const a = super.set(e, r), o = (c, ...d) => {
|
|
14337
14345
|
this.emit(c, r, ...d);
|
|
14338
14346
|
};
|
|
14339
|
-
return n(this,
|
|
14347
|
+
return n(this, yi).set(e, o), r.on("*", o), i && n(this, Me).emit(this.onAddEvent, r), a;
|
|
14340
14348
|
}
|
|
14341
14349
|
delete(e, r = !0, i = !1) {
|
|
14342
14350
|
const a = this.get(e);
|
|
14343
14351
|
if (!a)
|
|
14344
14352
|
return !1;
|
|
14345
|
-
a.removeListener("*", n(this,
|
|
14353
|
+
a.removeListener("*", n(this, yi).get(e));
|
|
14346
14354
|
const o = super.delete(e);
|
|
14347
14355
|
return i && a.removeAllListeners(), r && n(this, Me).emit(this.onDeleteEvent, a), o;
|
|
14348
14356
|
}
|
|
14349
14357
|
clear(e = !0, r = !1) {
|
|
14350
14358
|
this.forEach((a) => {
|
|
14351
|
-
a.removeListener("*", n(this,
|
|
14359
|
+
a.removeListener("*", n(this, yi).get(a.id)), r && a.removeAllListeners();
|
|
14352
14360
|
});
|
|
14353
14361
|
const i = super.clear();
|
|
14354
14362
|
return e && n(this, Me).emit(this.onClearEvent), i;
|
|
@@ -14357,7 +14365,7 @@ class Qf extends Map {
|
|
|
14357
14365
|
return Array.from(this.values());
|
|
14358
14366
|
}
|
|
14359
14367
|
}
|
|
14360
|
-
Me = new WeakMap(),
|
|
14368
|
+
Me = new WeakMap(), yi = new WeakMap();
|
|
14361
14369
|
class bg extends Qf {
|
|
14362
14370
|
constructor(t) {
|
|
14363
14371
|
super({
|
|
@@ -14397,18 +14405,18 @@ var RM = Object.defineProperty, bM = Object.getOwnPropertyDescriptor, kM = (s, t
|
|
|
14397
14405
|
for (var i = r > 1 ? void 0 : r ? bM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14398
14406
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14399
14407
|
return r && i && RM(t, e, i), i;
|
|
14400
|
-
}, ns, xn, Ir,
|
|
14408
|
+
}, ns, xn, Ir, Ei, Gd, Zf, Uo, Yu, Ho, Qu, Bo, Xu, Qg;
|
|
14401
14409
|
const Xf = (Qg = class {
|
|
14402
14410
|
constructor(s, t, e, r) {
|
|
14403
14411
|
m(this, Gd);
|
|
14404
|
-
m(this,
|
|
14412
|
+
m(this, Uo);
|
|
14405
14413
|
m(this, Ho);
|
|
14406
14414
|
m(this, Bo);
|
|
14407
14415
|
p(this, "plugins");
|
|
14408
14416
|
m(this, ns, void 0);
|
|
14409
14417
|
m(this, xn, void 0);
|
|
14410
14418
|
m(this, Ir, void 0);
|
|
14411
|
-
m(this,
|
|
14419
|
+
m(this, Ei, null);
|
|
14412
14420
|
f(this, Ir, s), this.plugins = t, f(this, xn, e), f(this, ns, r), this.setupEvents();
|
|
14413
14421
|
}
|
|
14414
14422
|
/**
|
|
@@ -14449,7 +14457,7 @@ const Xf = (Qg = class {
|
|
|
14449
14457
|
});
|
|
14450
14458
|
}
|
|
14451
14459
|
cleanup() {
|
|
14452
|
-
D(this,
|
|
14460
|
+
D(this, Uo, Yu).call(this);
|
|
14453
14461
|
}
|
|
14454
14462
|
setupEvents() {
|
|
14455
14463
|
this.plugins.all.on(
|
|
@@ -14472,22 +14480,22 @@ const Xf = (Qg = class {
|
|
|
14472
14480
|
yield D(this, Ho, Qu).call(this), this.logger.debug("[SOCKET_SERVICE_ROOM_JOINED] resolved request to sync active plugins.");
|
|
14473
14481
|
}));
|
|
14474
14482
|
}
|
|
14475
|
-
}, ns = new WeakMap(), xn = new WeakMap(), Ir = new WeakMap(),
|
|
14483
|
+
}, ns = new WeakMap(), xn = new WeakMap(), Ir = new WeakMap(), Ei = new WeakMap(), Gd = new WeakSet(), Zf = function() {
|
|
14476
14484
|
const s = n(this, Ir).getValue("peerSessionStore"), t = (e) => u(this, null, function* () {
|
|
14477
14485
|
if (e.state === "connected" && !n(this, ns))
|
|
14478
14486
|
try {
|
|
14479
|
-
f(this, ns, yield n(this, xn).create(Nu, !0)), D(this,
|
|
14487
|
+
f(this, ns, yield n(this, xn).create(Nu, !0)), D(this, Uo, Yu).call(this), this.plugins.all.toArray().forEach((r) => {
|
|
14480
14488
|
r.activePluginsStore = n(this, ns);
|
|
14481
14489
|
}), D(this, Bo, Xu).call(this), this.logger.info("Active plugins store created after socket connected"), yield D(this, Ho, Qu).call(this);
|
|
14482
14490
|
} catch (r) {
|
|
14483
14491
|
this.logger.error("Failed to create active plugins store after socket connected, will retry on next reconnect", { error: r });
|
|
14484
14492
|
}
|
|
14485
14493
|
});
|
|
14486
|
-
s.on(C.SOCKET_STATE_UPDATE, t), f(this,
|
|
14494
|
+
s.on(C.SOCKET_STATE_UPDATE, t), f(this, Ei, () => {
|
|
14487
14495
|
s.off(C.SOCKET_STATE_UPDATE, t);
|
|
14488
14496
|
});
|
|
14489
|
-
},
|
|
14490
|
-
n(this,
|
|
14497
|
+
}, Uo = new WeakSet(), Yu = function() {
|
|
14498
|
+
n(this, Ei) && (n(this, Ei).call(this), f(this, Ei, null));
|
|
14491
14499
|
}, Ho = new WeakSet(), Qu = function() {
|
|
14492
14500
|
return u(this, null, function* () {
|
|
14493
14501
|
try {
|
|
@@ -14605,17 +14613,17 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, Kc = (s, t
|
|
|
14605
14613
|
return r && i && IM(t, e, i), i;
|
|
14606
14614
|
};
|
|
14607
14615
|
const kg = "Cannot start recording: another recording is already in progress.";
|
|
14608
|
-
var
|
|
14616
|
+
var $n, Un, Hn, md, Xg;
|
|
14609
14617
|
let rn = (Xg = class extends xt {
|
|
14610
14618
|
constructor(t, e) {
|
|
14611
14619
|
const r = t.getValue("logger");
|
|
14612
14620
|
super(r);
|
|
14613
14621
|
m(this, Hn);
|
|
14614
|
-
m(this, Un, void 0);
|
|
14615
14622
|
m(this, $n, void 0);
|
|
14623
|
+
m(this, Un, void 0);
|
|
14616
14624
|
p(this, "recordingPeerIds", []);
|
|
14617
14625
|
p(this, "recordings", []);
|
|
14618
|
-
f(this,
|
|
14626
|
+
f(this, Un, t), f(this, $n, e);
|
|
14619
14627
|
}
|
|
14620
14628
|
get recordingState() {
|
|
14621
14629
|
return this.recordings.some((t) => t.state === "RECORDING") ? "RECORDING" : this.recordings.some((t) => t.state === "PAUSED") ? "PAUSED" : this.recordings.some((t) => t.state === "STARTING") ? "STARTING" : this.recordings.some((t) => t.state === "STOPPING") ? "STOPPING" : "IDLE";
|
|
@@ -14625,14 +14633,14 @@ let rn = (Xg = class extends xt {
|
|
|
14625
14633
|
* Not for external use
|
|
14626
14634
|
*/
|
|
14627
14635
|
get telemetry() {
|
|
14628
|
-
return n(this,
|
|
14636
|
+
return n(this, Un).getValue("telemetry");
|
|
14629
14637
|
}
|
|
14630
14638
|
updateRecordings(t) {
|
|
14631
14639
|
this.recordings = t, this.emit("recordingUpdate", this.recordingState);
|
|
14632
14640
|
}
|
|
14633
14641
|
start(t) {
|
|
14634
14642
|
return u(this, null, function* () {
|
|
14635
|
-
if (!n(this,
|
|
14643
|
+
if (!n(this, $n).permissions.canRecord)
|
|
14636
14644
|
throw this.logger.error("Recording::start::permission_denied"), new w("User does not have permission to start recording", "1001");
|
|
14637
14645
|
if ((t == null ? void 0 : t.allowMultiple) !== !0 && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))
|
|
14638
14646
|
throw this.logger.error("Recording::start::recording_in_progress", {
|
|
@@ -14641,7 +14649,7 @@ let rn = (Xg = class extends xt {
|
|
|
14641
14649
|
}
|
|
14642
14650
|
}), new w(kg, "1005");
|
|
14643
14651
|
try {
|
|
14644
|
-
const e = Nt(), { recording: r = {} } = n(this,
|
|
14652
|
+
const e = Nt(), { recording: r = {} } = n(this, Un).getValue("defaults"), i = yield e.startRecording(r, t == null ? void 0 : t.allowMultiple);
|
|
14645
14653
|
this.updateRecordings([...this.recordings, {
|
|
14646
14654
|
id: i,
|
|
14647
14655
|
state: "STARTING",
|
|
@@ -14669,9 +14677,9 @@ let rn = (Xg = class extends xt {
|
|
|
14669
14677
|
yield D(this, Hn, md).call(this, "resume", ["PAUSED"], t);
|
|
14670
14678
|
});
|
|
14671
14679
|
}
|
|
14672
|
-
},
|
|
14680
|
+
}, $n = new WeakMap(), Un = new WeakMap(), Hn = new WeakSet(), md = function(t, e, r) {
|
|
14673
14681
|
return u(this, null, function* () {
|
|
14674
|
-
if (!n(this,
|
|
14682
|
+
if (!n(this, $n).permissions.canRecord)
|
|
14675
14683
|
throw this.logger.error("Recording::stop::permission_denied"), new w("User does not have permission to stop recording", "1001");
|
|
14676
14684
|
let i = [];
|
|
14677
14685
|
if (r !== void 0) {
|
|
@@ -14721,27 +14729,27 @@ var DM = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, NM = (s, t
|
|
|
14721
14729
|
for (var i = r > 1 ? void 0 : r ? OM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14722
14730
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14723
14731
|
return r && i && DM(t, e, i), i;
|
|
14724
|
-
},
|
|
14732
|
+
}, Pi;
|
|
14725
14733
|
class tS {
|
|
14726
14734
|
constructor(t, e, r) {
|
|
14727
14735
|
p(this, "recording");
|
|
14728
14736
|
p(this, "room");
|
|
14729
|
-
m(this,
|
|
14730
|
-
f(this,
|
|
14737
|
+
m(this, Pi, void 0);
|
|
14738
|
+
f(this, Pi, t), this.recording = new rn(t, e), this.room = r, this.setupEvents();
|
|
14731
14739
|
}
|
|
14732
14740
|
/**
|
|
14733
14741
|
* @access private
|
|
14734
14742
|
* Not for external use
|
|
14735
14743
|
*/
|
|
14736
14744
|
get telemetry() {
|
|
14737
|
-
return n(this,
|
|
14745
|
+
return n(this, Pi).getValue("telemetry");
|
|
14738
14746
|
}
|
|
14739
14747
|
/**
|
|
14740
14748
|
* @access private
|
|
14741
14749
|
* Not for external use
|
|
14742
14750
|
*/
|
|
14743
14751
|
get logger() {
|
|
14744
|
-
return n(this,
|
|
14752
|
+
return n(this, Pi).getValue("logger");
|
|
14745
14753
|
}
|
|
14746
14754
|
// eslint-disable-next-line class-methods-use-this
|
|
14747
14755
|
getRecordingTypeFromProtoType(t) {
|
|
@@ -14762,14 +14770,14 @@ class tS {
|
|
|
14762
14770
|
return e;
|
|
14763
14771
|
}
|
|
14764
14772
|
setupEvents() {
|
|
14765
|
-
n(this,
|
|
14773
|
+
n(this, Pi).getValue("peerSessionStore").on(C.ROOM_STATE, (t) => {
|
|
14766
14774
|
t.activeRecordings.length !== 0 ? this.recording.updateRecordings(
|
|
14767
14775
|
t.activeRecordings.map((e) => {
|
|
14768
14776
|
const r = this.getRecordingTypeFromProtoType(e.recordingType);
|
|
14769
14777
|
return { id: e.recordingId, state: e.recordingStatus, type: r };
|
|
14770
14778
|
})
|
|
14771
14779
|
) : this.recording.recordings.length && this.recording.updateRecordings([]);
|
|
14772
|
-
}), this.room.on(
|
|
14780
|
+
}), this.room.on(U.recordingStarted, (t) => {
|
|
14773
14781
|
let e = !1;
|
|
14774
14782
|
const r = [...this.recording.recordings];
|
|
14775
14783
|
if (r.forEach((i) => {
|
|
@@ -14783,41 +14791,41 @@ class tS {
|
|
|
14783
14791
|
});
|
|
14784
14792
|
}
|
|
14785
14793
|
this.recording.updateRecordings(r);
|
|
14786
|
-
}), this.room.on(
|
|
14794
|
+
}), this.room.on(U.recordingPaused, (t) => {
|
|
14787
14795
|
const e = [...this.recording.recordings];
|
|
14788
14796
|
e.forEach((r) => {
|
|
14789
14797
|
r.id === t.recordingId && (r.state = "PAUSED");
|
|
14790
14798
|
}), this.recording.updateRecordings(e);
|
|
14791
|
-
}), this.room.on(
|
|
14799
|
+
}), this.room.on(U.recordingStopped, (t) => {
|
|
14792
14800
|
const e = [...this.recording.recordings.filter((r) => r.id !== t.recordingId)];
|
|
14793
14801
|
this.recording.updateRecordings(e);
|
|
14794
14802
|
});
|
|
14795
14803
|
}
|
|
14796
14804
|
}
|
|
14797
|
-
|
|
14805
|
+
Pi = new WeakMap();
|
|
14798
14806
|
NM([
|
|
14799
14807
|
P.trace("RecordingController.setupEvents")
|
|
14800
14808
|
], tS.prototype, "setupEvents", 1);
|
|
14801
|
-
var
|
|
14809
|
+
var _i;
|
|
14802
14810
|
class LM {
|
|
14803
14811
|
constructor(t) {
|
|
14804
|
-
m(this,
|
|
14805
|
-
f(this,
|
|
14812
|
+
m(this, _i, void 0);
|
|
14813
|
+
f(this, _i, t);
|
|
14806
14814
|
}
|
|
14807
14815
|
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
14808
14816
|
hasFeature(t) {
|
|
14809
|
-
return n(this,
|
|
14817
|
+
return n(this, _i).getValue("logger").warn("Unimplemented method: meeting.__internals__.hasFeature called"), !1;
|
|
14810
14818
|
}
|
|
14811
14819
|
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
14812
14820
|
getFeatureValue(t) {
|
|
14813
|
-
return n(this,
|
|
14821
|
+
return n(this, _i).getValue("logger").warn("Unimplemented method: meeting.__internals__.getFeatureValue called"), null;
|
|
14814
14822
|
}
|
|
14815
14823
|
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
14816
14824
|
getAllFeatures() {
|
|
14817
|
-
return n(this,
|
|
14825
|
+
return n(this, _i).getValue("logger").warn("Unimplemented method: meeting.__internals__.getAllFeatures called"), {};
|
|
14818
14826
|
}
|
|
14819
14827
|
}
|
|
14820
|
-
|
|
14828
|
+
_i = new WeakMap();
|
|
14821
14829
|
class Zh {
|
|
14822
14830
|
constructor(t, e, r, i) {
|
|
14823
14831
|
/**
|
|
@@ -14852,7 +14860,7 @@ class ep {
|
|
|
14852
14860
|
});
|
|
14853
14861
|
}
|
|
14854
14862
|
}
|
|
14855
|
-
var VM = Object.defineProperty, xM = Object.getOwnPropertyDescriptor,
|
|
14863
|
+
var VM = Object.defineProperty, xM = Object.getOwnPropertyDescriptor, Ut = (s, t, e, r) => {
|
|
14856
14864
|
for (var i = r > 1 ? void 0 : r ? xM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
14857
14865
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
14858
14866
|
return r && i && VM(t, e, i), i;
|
|
@@ -15217,43 +15225,43 @@ class _t extends ba {
|
|
|
15217
15225
|
}
|
|
15218
15226
|
}
|
|
15219
15227
|
Le = new WeakMap(), fe = new WeakMap(), pe = new WeakMap(), Fs = new WeakMap(), Gt = new WeakMap(), qo = new WeakMap(), Re = new WeakMap();
|
|
15220
|
-
|
|
15228
|
+
Ut([
|
|
15221
15229
|
P.trace("MediaHandler.setupStreams")
|
|
15222
15230
|
], _t.prototype, "setupStreams", 1);
|
|
15223
|
-
|
|
15231
|
+
Ut([
|
|
15224
15232
|
P.trace("MediaHandler.enableAudio")
|
|
15225
15233
|
], _t.prototype, "enableAudio", 1);
|
|
15226
|
-
|
|
15234
|
+
Ut([
|
|
15227
15235
|
P.trace("MediaHandler.disableAudio")
|
|
15228
15236
|
], _t.prototype, "disableAudio", 1);
|
|
15229
|
-
|
|
15237
|
+
Ut([
|
|
15230
15238
|
P.trace("MediaHandler.setAudioDevice")
|
|
15231
15239
|
], _t.prototype, "setAudioDevice", 1);
|
|
15232
|
-
|
|
15240
|
+
Ut([
|
|
15233
15241
|
P.trace("MediaHandler.enableVideo")
|
|
15234
15242
|
], _t.prototype, "enableVideo", 1);
|
|
15235
|
-
|
|
15243
|
+
Ut([
|
|
15236
15244
|
P.trace("MediaHandler.disableVideo")
|
|
15237
15245
|
], _t.prototype, "disableVideo", 1);
|
|
15238
|
-
|
|
15246
|
+
Ut([
|
|
15239
15247
|
P.trace("MediaHandler.setVideoDevice")
|
|
15240
15248
|
], _t.prototype, "setVideoDevice", 1);
|
|
15241
|
-
|
|
15249
|
+
Ut([
|
|
15242
15250
|
P.trace("MediaHandler.updateVideoConstraints")
|
|
15243
15251
|
], _t.prototype, "updateVideoConstraints", 1);
|
|
15244
|
-
|
|
15252
|
+
Ut([
|
|
15245
15253
|
P.trace("MediaHandler.enableScreenShare")
|
|
15246
15254
|
], _t.prototype, "enableScreenShare", 1);
|
|
15247
|
-
|
|
15255
|
+
Ut([
|
|
15248
15256
|
P.trace("MediaHandler.disableScreenShare")
|
|
15249
15257
|
], _t.prototype, "disableScreenShare", 1);
|
|
15250
|
-
|
|
15258
|
+
Ut([
|
|
15251
15259
|
P.trace("MediaHandler.updateScreenshareConstraints")
|
|
15252
15260
|
], _t.prototype, "updateScreenshareConstraints", 1);
|
|
15253
|
-
|
|
15261
|
+
Ut([
|
|
15254
15262
|
P.trace("MediaHandler.destruct")
|
|
15255
15263
|
], _t.prototype, "destruct", 1);
|
|
15256
|
-
|
|
15264
|
+
Ut([
|
|
15257
15265
|
P.trace("MediaHandler.onDeviceChange")
|
|
15258
15266
|
], _t.prototype, "onDeviceChange", 1);
|
|
15259
15267
|
function od(s, t, e) {
|
|
@@ -15288,7 +15296,7 @@ function od(s, t, e) {
|
|
|
15288
15296
|
return "COULD_NOT_START";
|
|
15289
15297
|
}
|
|
15290
15298
|
}
|
|
15291
|
-
const
|
|
15299
|
+
const $M = [
|
|
15292
15300
|
"virtual",
|
|
15293
15301
|
"emulator",
|
|
15294
15302
|
"krisp",
|
|
@@ -15319,11 +15327,11 @@ const UM = [
|
|
|
15319
15327
|
function Od(s) {
|
|
15320
15328
|
var e, r;
|
|
15321
15329
|
const t = (e = s.label) == null ? void 0 : e.toLowerCase();
|
|
15322
|
-
return ((r = ve._bowser) == null ? void 0 : r.getOSName()) === "macOS" && t.includes("iphone") ? !0 :
|
|
15330
|
+
return ((r = ve._bowser) == null ? void 0 : r.getOSName()) === "macOS" && t.includes("iphone") ? !0 : $M.some(
|
|
15323
15331
|
(i) => t == null ? void 0 : t.includes(i)
|
|
15324
15332
|
);
|
|
15325
15333
|
}
|
|
15326
|
-
function
|
|
15334
|
+
function UM(s, t, e) {
|
|
15327
15335
|
return u(this, null, function* () {
|
|
15328
15336
|
if (!(t != null && t.length))
|
|
15329
15337
|
return e;
|
|
@@ -15345,10 +15353,10 @@ function $M(s, t, e) {
|
|
|
15345
15353
|
return c.stream.getAudioTracks()[0];
|
|
15346
15354
|
});
|
|
15347
15355
|
}
|
|
15348
|
-
var
|
|
15356
|
+
var Ci, jo;
|
|
15349
15357
|
class HM {
|
|
15350
15358
|
constructor(t) {
|
|
15351
|
-
m(this,
|
|
15359
|
+
m(this, Ci, void 0);
|
|
15352
15360
|
m(this, jo, void 0);
|
|
15353
15361
|
f(this, jo, t);
|
|
15354
15362
|
}
|
|
@@ -15360,9 +15368,9 @@ class HM {
|
|
|
15360
15368
|
return n(this, jo).getValue("logger");
|
|
15361
15369
|
}
|
|
15362
15370
|
terminateMiddlewareWebWorker() {
|
|
15363
|
-
if (n(this,
|
|
15371
|
+
if (n(this, Ci))
|
|
15364
15372
|
try {
|
|
15365
|
-
co.clearInterval(n(this,
|
|
15373
|
+
co.clearInterval(n(this, Ci)), f(this, Ci, void 0);
|
|
15366
15374
|
} catch (t) {
|
|
15367
15375
|
this.logger.debug("WorkerTimers::terminateMiddlewareWebWorker::failed");
|
|
15368
15376
|
}
|
|
@@ -15413,7 +15421,7 @@ class HM {
|
|
|
15413
15421
|
o.addEventListener(
|
|
15414
15422
|
"play",
|
|
15415
15423
|
() => {
|
|
15416
|
-
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this,
|
|
15424
|
+
i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this, Ci, co.setInterval(
|
|
15417
15425
|
l,
|
|
15418
15426
|
50
|
|
15419
15427
|
));
|
|
@@ -15427,7 +15435,7 @@ class HM {
|
|
|
15427
15435
|
});
|
|
15428
15436
|
}
|
|
15429
15437
|
}
|
|
15430
|
-
|
|
15438
|
+
Ci = new WeakMap(), jo = new WeakMap();
|
|
15431
15439
|
const BM = {
|
|
15432
15440
|
qvga: { width: { ideal: 320 }, height: { ideal: 240 }, frameRate: { ideal: 30 } },
|
|
15433
15441
|
vga: { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 30 } },
|
|
@@ -15520,15 +15528,15 @@ function GM(s) {
|
|
|
15520
15528
|
enableHighBitrate: (r = s.audio.enableHighBitrate) != null ? r : !1
|
|
15521
15529
|
}), t.video = s.video.quality, t;
|
|
15522
15530
|
}
|
|
15523
|
-
var
|
|
15531
|
+
var wi, Wd;
|
|
15524
15532
|
class WM {
|
|
15525
15533
|
constructor(t, e) {
|
|
15526
|
-
m(this,
|
|
15534
|
+
m(this, wi, void 0);
|
|
15527
15535
|
m(this, Wd, void 0);
|
|
15528
15536
|
// eslint-disable-next-line class-methods-use-this
|
|
15529
15537
|
p(this, "getScreenShareConstraints", () => {
|
|
15530
15538
|
var l, h, g, S, y, E, k, R, A;
|
|
15531
|
-
const t = (l = n(this,
|
|
15539
|
+
const t = (l = n(this, wi)) == null ? void 0 : l.screenshare, e = (g = (h = t == null ? void 0 : t.width) == null ? void 0 : h.max) != null ? g : 1920, r = (y = (S = t == null ? void 0 : t.height) == null ? void 0 : S.max) != null ? y : 1080, i = (k = (E = t == null ? void 0 : t.frameRate) == null ? void 0 : E.max) != null ? k : 5, a = (A = (R = t == null ? void 0 : t.frameRate) == null ? void 0 : R.ideal) != null ? A : 5, o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
|
|
15532
15540
|
let d = {
|
|
15533
15541
|
width: { max: e },
|
|
15534
15542
|
height: { max: r },
|
|
@@ -15545,7 +15553,7 @@ class WM {
|
|
|
15545
15553
|
// eslint-disable-next-line class-methods-use-this
|
|
15546
15554
|
p(this, "getAudioConstraints", (t) => {
|
|
15547
15555
|
var a, o, c, d, l, h, g;
|
|
15548
|
-
const e = {}, r = (a = n(this,
|
|
15556
|
+
const e = {}, r = (a = n(this, wi)) == null ? void 0 : a.audio, i = r != null && r.enableStereo ? 2 : 1;
|
|
15549
15557
|
return ve.isFirefox() || ve.isWebKitBased() ? (e.audio = {
|
|
15550
15558
|
deviceId: t,
|
|
15551
15559
|
autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : !0,
|
|
@@ -15561,7 +15569,7 @@ class WM {
|
|
|
15561
15569
|
});
|
|
15562
15570
|
p(this, "getVideoConstraints", (t) => {
|
|
15563
15571
|
var o, c, d;
|
|
15564
|
-
const e = {}, r = (o = n(this,
|
|
15572
|
+
const e = {}, r = (o = n(this, wi)) == null ? void 0 : o.video, i = W_(BM);
|
|
15565
15573
|
let a = i.vga;
|
|
15566
15574
|
if (typeof r == "string") {
|
|
15567
15575
|
const l = i[r];
|
|
@@ -15570,14 +15578,14 @@ class WM {
|
|
|
15570
15578
|
r !== void 0 && (a.height.ideal = r.height.ideal, a.width.ideal = r.width.ideal, a.frameRate.ideal = (d = (c = r.frameRate) == null ? void 0 : c.ideal) != null ? d : 30);
|
|
15571
15579
|
return e.video = a, typeof e.video == "boolean" || (t ? e.video.deviceId = { exact: t } : e.video.facingMode = "user"), e;
|
|
15572
15580
|
});
|
|
15573
|
-
f(this, Wd, t), f(this,
|
|
15581
|
+
f(this, Wd, t), f(this, wi, e);
|
|
15574
15582
|
}
|
|
15575
15583
|
// eslint-disable-next-line class-methods-use-this
|
|
15576
15584
|
getUpdatedVideoConstraints(t) {
|
|
15577
15585
|
return t;
|
|
15578
15586
|
}
|
|
15579
15587
|
}
|
|
15580
|
-
|
|
15588
|
+
wi = new WeakMap(), Wd = new WeakMap();
|
|
15581
15589
|
class Cu extends Error {
|
|
15582
15590
|
constructor(e, r, i) {
|
|
15583
15591
|
super(r);
|
|
@@ -15618,28 +15626,28 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, fs = (s, t
|
|
|
15618
15626
|
for (var i = r > 1 ? void 0 : r ? zM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
15619
15627
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
15620
15628
|
return r && i && KM(t, e, i), i;
|
|
15621
|
-
}, Bn, Wt,
|
|
15629
|
+
}, Bn, Wt, $e, Zg;
|
|
15622
15630
|
let Vt = (Zg = class extends JM {
|
|
15623
15631
|
constructor(t, e) {
|
|
15624
15632
|
super();
|
|
15625
15633
|
m(this, Bn, void 0);
|
|
15626
15634
|
m(this, Wt, void 0);
|
|
15627
|
-
m(this,
|
|
15628
|
-
f(this,
|
|
15635
|
+
m(this, $e, void 0);
|
|
15636
|
+
f(this, $e, t), f(this, Wt, new WM(t, e)), f(this, Bn, new AbortController());
|
|
15629
15637
|
}
|
|
15630
15638
|
/**
|
|
15631
15639
|
* @access private
|
|
15632
15640
|
* Not for external use
|
|
15633
15641
|
*/
|
|
15634
15642
|
get telemetry() {
|
|
15635
|
-
return n(this,
|
|
15643
|
+
return n(this, $e).getValue("telemetry");
|
|
15636
15644
|
}
|
|
15637
15645
|
/**
|
|
15638
15646
|
* @access private
|
|
15639
15647
|
* Not for external use
|
|
15640
15648
|
*/
|
|
15641
15649
|
get logger() {
|
|
15642
|
-
return n(this,
|
|
15650
|
+
return n(this, $e).getValue("logger");
|
|
15643
15651
|
}
|
|
15644
15652
|
get constraintsBuilder() {
|
|
15645
15653
|
return n(this, Wt);
|
|
@@ -15652,7 +15660,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15652
15660
|
}
|
|
15653
15661
|
handlePermissionErrors(t, e) {
|
|
15654
15662
|
const r = od(t, e.name, e.message);
|
|
15655
|
-
return this.permissions[t] = r, n(this,
|
|
15663
|
+
return this.permissions[t] = r, n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_ERROR, {
|
|
15656
15664
|
message: r,
|
|
15657
15665
|
constraints: e.constraints,
|
|
15658
15666
|
kind: t
|
|
@@ -15691,10 +15699,10 @@ let Vt = (Zg = class extends JM {
|
|
|
15691
15699
|
const x = (yield this.getVideoInputDevices()).find((O) => O.label.includes("OBS Virtual"));
|
|
15692
15700
|
R = yield this.getVideoTrack(x.deviceId);
|
|
15693
15701
|
}
|
|
15694
|
-
return n(this,
|
|
15702
|
+
return n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15695
15703
|
message: this.permissions.audio,
|
|
15696
15704
|
kind: "audio"
|
|
15697
|
-
}), n(this,
|
|
15705
|
+
}), n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15698
15706
|
message: this.permissions.video,
|
|
15699
15707
|
kind: "video"
|
|
15700
15708
|
}), { audioTrack: k, videoTrack: R };
|
|
@@ -15708,7 +15716,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15708
15716
|
var c, d;
|
|
15709
15717
|
let r = yield this.getAudioInputDevices();
|
|
15710
15718
|
if (!(r != null && r.length))
|
|
15711
|
-
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this,
|
|
15719
|
+
throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15712
15720
|
message: this.permissions.audio,
|
|
15713
15721
|
kind: "audio"
|
|
15714
15722
|
}), new w("No audio devices available", "1606");
|
|
@@ -15753,7 +15761,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15753
15761
|
});
|
|
15754
15762
|
try {
|
|
15755
15763
|
const l = yield o(a);
|
|
15756
|
-
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this,
|
|
15764
|
+
return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15757
15765
|
message: this.permissions.audio,
|
|
15758
15766
|
kind: "audio"
|
|
15759
15767
|
})), l;
|
|
@@ -15767,7 +15775,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15767
15775
|
var c, d, l;
|
|
15768
15776
|
const e = (c = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : c.includes("OBS Virtual"), r = yield this.getVideoInputDevices();
|
|
15769
15777
|
if (!(r != null && r.length))
|
|
15770
|
-
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this,
|
|
15778
|
+
throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15771
15779
|
message: this.permissions.video,
|
|
15772
15780
|
kind: "video"
|
|
15773
15781
|
}), new w("No video devices available", "1607");
|
|
@@ -15823,7 +15831,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15823
15831
|
});
|
|
15824
15832
|
try {
|
|
15825
15833
|
const h = n(this, Wt).getVideoConstraints(a), g = yield o(h);
|
|
15826
|
-
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this,
|
|
15834
|
+
return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15827
15835
|
message: this.permissions.video,
|
|
15828
15836
|
kind: "video"
|
|
15829
15837
|
})), g;
|
|
@@ -15838,7 +15846,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15838
15846
|
try {
|
|
15839
15847
|
this.logger.info("getDisplayMediaWithoutTimeout::requesting_display_media", {
|
|
15840
15848
|
constraints: JSON.stringify(e)
|
|
15841
|
-
}), n(this,
|
|
15849
|
+
}), n(this, $e).getValue("callstats").screenShareRequested();
|
|
15842
15850
|
const r = yield navigator.mediaDevices.getDisplayMedia(
|
|
15843
15851
|
e
|
|
15844
15852
|
);
|
|
@@ -15860,7 +15868,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15860
15868
|
});
|
|
15861
15869
|
try {
|
|
15862
15870
|
const e = n(this, Wt).getScreenShareConstraints(), r = yield t(e);
|
|
15863
|
-
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this,
|
|
15871
|
+
return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, $e).getValue("peerSessionStore").emit(C.MEDIA_PERMISSION_UPDATE, {
|
|
15864
15872
|
message: this.permissions.screenshare,
|
|
15865
15873
|
kind: "screenshare"
|
|
15866
15874
|
})), {
|
|
@@ -15974,7 +15982,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15974
15982
|
devices: JSON.stringify(o)
|
|
15975
15983
|
});
|
|
15976
15984
|
const g = [...d.added, ...d.removed];
|
|
15977
|
-
g.some((S) => S.kind === "audioinput") && n(this,
|
|
15985
|
+
g.some((S) => S.kind === "audioinput") && n(this, $e).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((S) => S.kind === "audioinput")), g.some((S) => S.kind === "videoinput") && n(this, $e).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((S) => S.kind === "videoinput")), g.some((S) => S.kind === "audiooutput") && n(this, $e).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((S) => S.kind === "audiooutput")), t(r, d, !1);
|
|
15978
15986
|
}
|
|
15979
15987
|
}),
|
|
15980
15988
|
{ signal: n(this, Bn).signal }
|
|
@@ -15982,7 +15990,7 @@ let Vt = (Zg = class extends JM {
|
|
|
15982
15990
|
}
|
|
15983
15991
|
});
|
|
15984
15992
|
}
|
|
15985
|
-
}, Bn = new WeakMap(), Wt = new WeakMap(),
|
|
15993
|
+
}, Bn = new WeakMap(), Wt = new WeakMap(), $e = new WeakMap(), Zg);
|
|
15986
15994
|
fs([
|
|
15987
15995
|
P.trace("WebMediaInterface.destruct")
|
|
15988
15996
|
], Vt.prototype, "destruct", 1);
|
|
@@ -16410,7 +16418,7 @@ class eu extends iS {
|
|
|
16410
16418
|
return;
|
|
16411
16419
|
}
|
|
16412
16420
|
try {
|
|
16413
|
-
this.transformedMediaTrack = yield
|
|
16421
|
+
this.transformedMediaTrack = yield UM(
|
|
16414
16422
|
this.context,
|
|
16415
16423
|
this.middlewares,
|
|
16416
16424
|
this.mediaTrack
|
|
@@ -16492,10 +16500,10 @@ sp([
|
|
|
16492
16500
|
P.trace("AudioMediaHandler.conditionallyChangeTrack")
|
|
16493
16501
|
], eu.prototype, "conditionallyChangeTrack", 1);
|
|
16494
16502
|
const aD = eu;
|
|
16495
|
-
var
|
|
16503
|
+
var Ri;
|
|
16496
16504
|
class oD {
|
|
16497
16505
|
constructor(t, e) {
|
|
16498
|
-
m(this,
|
|
16506
|
+
m(this, Ri, void 0);
|
|
16499
16507
|
p(this, "currentDevice");
|
|
16500
16508
|
p(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
|
|
16501
16509
|
p(this, "logger");
|
|
@@ -16508,21 +16516,21 @@ class oD {
|
|
|
16508
16516
|
this.userPreferredDeviceKey,
|
|
16509
16517
|
this.logger
|
|
16510
16518
|
));
|
|
16511
|
-
f(this,
|
|
16519
|
+
f(this, Ri, e), this.logger = t.getValue("logger");
|
|
16512
16520
|
}
|
|
16513
16521
|
setPreferredSpeaker() {
|
|
16514
16522
|
return u(this, null, function* () {
|
|
16515
|
-
const t = this.getUserPreferredDevice(), e = yield n(this,
|
|
16523
|
+
const t = this.getUserPreferredDevice(), e = yield n(this, Ri).getAudioOutputDevices(), r = e == null ? void 0 : e.find((i) => i.deviceId === t);
|
|
16516
16524
|
yield this.setupSpeaker(r, { saveDevicePreference: !1 });
|
|
16517
16525
|
});
|
|
16518
16526
|
}
|
|
16519
16527
|
setupSpeaker(r, i) {
|
|
16520
16528
|
return u(this, arguments, function* (t, { saveDevicePreference: e }) {
|
|
16521
16529
|
var c, d;
|
|
16522
|
-
if (!(n(this,
|
|
16530
|
+
if (!(n(this, Ri) instanceof sS))
|
|
16523
16531
|
return;
|
|
16524
16532
|
let a = t;
|
|
16525
|
-
if (t || ([a] = (yield n(this,
|
|
16533
|
+
if (t || ([a] = (yield n(this, Ri).getAvailableDevicesByKind(
|
|
16526
16534
|
"audiooutput"
|
|
16527
16535
|
)).filter((h) => !Od(h))), !a)
|
|
16528
16536
|
throw new w("No speaker found", "1608");
|
|
@@ -16540,7 +16548,7 @@ class oD {
|
|
|
16540
16548
|
});
|
|
16541
16549
|
}
|
|
16542
16550
|
}
|
|
16543
|
-
|
|
16551
|
+
Ri = new WeakMap();
|
|
16544
16552
|
const cD = oD;
|
|
16545
16553
|
var Go;
|
|
16546
16554
|
class dD extends ba {
|
|
@@ -16761,16 +16769,16 @@ tu([
|
|
|
16761
16769
|
const pD = zc, Mg = ks(
|
|
16762
16770
|
Jh()
|
|
16763
16771
|
);
|
|
16764
|
-
var ct,
|
|
16772
|
+
var ct, bi, Jo, qn;
|
|
16765
16773
|
const Tn = class {
|
|
16766
16774
|
constructor(t) {
|
|
16767
16775
|
m(this, ct, void 0);
|
|
16768
|
-
m(this,
|
|
16776
|
+
m(this, bi, void 0);
|
|
16769
16777
|
m(this, Jo, void 0);
|
|
16770
16778
|
m(this, qn, void 0);
|
|
16771
16779
|
if (!t)
|
|
16772
16780
|
throw new w("Could not load preset.", "0904");
|
|
16773
|
-
f(this, ct, t.config), f(this, Jo, t.name), f(this,
|
|
16781
|
+
f(this, ct, t.config), f(this, Jo, t.name), f(this, bi, t.ui || ks(Jh().ui)), f(this, qn, t.permissions.plugins.config);
|
|
16774
16782
|
}
|
|
16775
16783
|
/**
|
|
16776
16784
|
* @deprecated. Use init()
|
|
@@ -16847,7 +16855,7 @@ const Tn = class {
|
|
|
16847
16855
|
return {
|
|
16848
16856
|
isEnabled: !0,
|
|
16849
16857
|
elements: {
|
|
16850
|
-
logo: n(this,
|
|
16858
|
+
logo: n(this, bi).designTokens.logo,
|
|
16851
16859
|
timer: !0,
|
|
16852
16860
|
title: !0,
|
|
16853
16861
|
participantCount: !0,
|
|
@@ -16904,17 +16912,17 @@ const Tn = class {
|
|
|
16904
16912
|
return Object.keys(n(this, qn)).filter((t) => n(this, qn)[t].disabled);
|
|
16905
16913
|
}
|
|
16906
16914
|
get designTokens() {
|
|
16907
|
-
return n(this,
|
|
16915
|
+
return n(this, bi).designTokens;
|
|
16908
16916
|
}
|
|
16909
16917
|
get configDiff() {
|
|
16910
|
-
return n(this,
|
|
16918
|
+
return n(this, bi).configDiff;
|
|
16911
16919
|
}
|
|
16912
16920
|
get isSimulcastEnabled() {
|
|
16913
16921
|
var t, e, r, i;
|
|
16914
16922
|
return (i = (r = (e = (t = n(this, ct)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
|
|
16915
16923
|
}
|
|
16916
16924
|
get mediaConstraints() {
|
|
16917
|
-
var t, e, r, i, a, o, c, d, l, h, g, S, y, E, k, R, A, x, O,
|
|
16925
|
+
var t, e, r, i, a, o, c, d, l, h, g, S, y, E, k, R, A, x, O, $, H, F, X, ee;
|
|
16918
16926
|
return {
|
|
16919
16927
|
audio: {
|
|
16920
16928
|
enableStereo: (i = (r = (e = (t = n(this, ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : un.audio.enableStereo,
|
|
@@ -16925,7 +16933,7 @@ const Tn = class {
|
|
|
16925
16933
|
frameRate: (R = (k = (E = (y = n(this, ct)) == null ? void 0 : y.media) == null ? void 0 : E.video) == null ? void 0 : k.frameRate) != null ? R : un.video.frameRate
|
|
16926
16934
|
},
|
|
16927
16935
|
screenshare: {
|
|
16928
|
-
quality: (
|
|
16936
|
+
quality: ($ = (O = (x = (A = n(this, ct)) == null ? void 0 : A.media) == null ? void 0 : x.screenshare) == null ? void 0 : O.quality) != null ? $ : un.screenshare.quality,
|
|
16929
16937
|
frameRate: (ee = (X = (F = (H = n(this, ct)) == null ? void 0 : H.media) == null ? void 0 : F.screenshare) == null ? void 0 : X.frameRate) != null ? ee : un.screenshare.frameRate
|
|
16930
16938
|
}
|
|
16931
16939
|
};
|
|
@@ -16935,7 +16943,7 @@ const Tn = class {
|
|
|
16935
16943
|
}
|
|
16936
16944
|
};
|
|
16937
16945
|
let Zu = Tn;
|
|
16938
|
-
ct = new WeakMap(),
|
|
16946
|
+
ct = new WeakMap(), bi = new WeakMap(), Jo = new WeakMap(), qn = new WeakMap();
|
|
16939
16947
|
var gD = Object.defineProperty, mD = Object.getOwnPropertyDescriptor, nS = (s, t, e, r) => {
|
|
16940
16948
|
for (var i = r > 1 ? void 0 : r ? mD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
16941
16949
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
@@ -17062,7 +17070,7 @@ class aS {
|
|
|
17062
17070
|
}
|
|
17063
17071
|
setupEvents() {
|
|
17064
17072
|
n(this, qs).on(
|
|
17065
|
-
|
|
17073
|
+
U.startedLivestream,
|
|
17066
17074
|
(t) => u(this, null, function* () {
|
|
17067
17075
|
this.livestream.playbackUrl = t.playbackUrl, this.livestream.setLivestreamState("LIVESTREAMING");
|
|
17068
17076
|
try {
|
|
@@ -17072,7 +17080,7 @@ class aS {
|
|
|
17072
17080
|
}
|
|
17073
17081
|
})
|
|
17074
17082
|
), n(this, qs).on(
|
|
17075
|
-
|
|
17083
|
+
U.livestreamingInvoked,
|
|
17076
17084
|
(t) => u(this, null, function* () {
|
|
17077
17085
|
if (t.manualIngest) {
|
|
17078
17086
|
this.livestream.setLivestreamState("WAITING_ON_MANUAL_INGESTION");
|
|
@@ -17083,12 +17091,12 @@ class aS {
|
|
|
17083
17091
|
}
|
|
17084
17092
|
}
|
|
17085
17093
|
})
|
|
17086
|
-
), n(this, qs).on(
|
|
17094
|
+
), n(this, qs).on(U.stoppedLivestream, () => {
|
|
17087
17095
|
this.livestream.setLivestreamState("IDLE"), this.livestream.playbackUrl = void 0, this.livestream.ingestionCredentials = void 0;
|
|
17088
|
-
}), n(this, qs).on(
|
|
17096
|
+
}), n(this, qs).on(U.erroredLivestream, () => {
|
|
17089
17097
|
this.livestream.setLivestreamState("IDLE"), this.livestream.playbackUrl = void 0;
|
|
17090
17098
|
}), n(this, qs).on(
|
|
17091
|
-
|
|
17099
|
+
U.roomPeerCount,
|
|
17092
17100
|
(t) => {
|
|
17093
17101
|
this.livestream.viewerCount = t.count, this.livestream.emit("viewerCountUpdate", t.count);
|
|
17094
17102
|
}
|
|
@@ -17306,19 +17314,19 @@ Ye = new WeakMap(), Mr = new WeakMap(), Dr = new WeakMap(), Jd = new WeakSet(),
|
|
|
17306
17314
|
this.set(t, i, r);
|
|
17307
17315
|
};
|
|
17308
17316
|
Yc([
|
|
17309
|
-
|
|
17317
|
+
$t(ka, "rateLimitConfig")
|
|
17310
17318
|
], Aa.prototype, "remoteSet", 1);
|
|
17311
17319
|
Yc([
|
|
17312
|
-
|
|
17320
|
+
$t(ka, "bulkRateLimitConfig")
|
|
17313
17321
|
], Aa.prototype, "bulkSet", 1);
|
|
17314
17322
|
Yc([
|
|
17315
|
-
|
|
17323
|
+
$t(ka, "rateLimitConfig")
|
|
17316
17324
|
], Aa.prototype, "update", 1);
|
|
17317
17325
|
Yc([
|
|
17318
|
-
|
|
17326
|
+
$t(ka, "rateLimitConfig")
|
|
17319
17327
|
], Aa.prototype, "delete", 1);
|
|
17320
17328
|
Yc([
|
|
17321
|
-
|
|
17329
|
+
$t(ka, "bulkRateLimitConfig")
|
|
17322
17330
|
], Aa.prototype, "bulkDelete", 1);
|
|
17323
17331
|
var Or, Nr, zo, eh, Yo, as, Kd, cS;
|
|
17324
17332
|
class ED {
|
|
@@ -17399,7 +17407,7 @@ Or = new WeakMap(), Nr = new WeakMap(), zo = new WeakSet(), eh = function() {
|
|
|
17399
17407
|
);
|
|
17400
17408
|
});
|
|
17401
17409
|
};
|
|
17402
|
-
function
|
|
17410
|
+
function ui(s) {
|
|
17403
17411
|
var t, e, r, i, a, o, c, d, l, h, g, S, y;
|
|
17404
17412
|
return s ? {
|
|
17405
17413
|
media: {
|
|
@@ -17434,23 +17442,23 @@ var PD = Object.defineProperty, _D = Object.getOwnPropertyDescriptor, Ia = (s, t
|
|
|
17434
17442
|
return r && i && PD(t, e, i), i;
|
|
17435
17443
|
};
|
|
17436
17444
|
const CD = 0.8, wD = 1.2;
|
|
17437
|
-
var Jn, Kn, kt,
|
|
17445
|
+
var Jn, Kn, kt, ki, Xa, Lr, gn, Ai, Za, zd, dS, js, Qo, Vr, Ii, eo, Gs, Yd, Xo, th, Qd, lS, Xd, uS, em;
|
|
17438
17446
|
let lr = (em = class extends xt {
|
|
17439
17447
|
constructor(t, e, r, i) {
|
|
17440
17448
|
const a = t.getValue("logger");
|
|
17441
17449
|
super(a);
|
|
17442
17450
|
// eslint-disable-next-line class-methods-use-this
|
|
17443
|
-
m(this,
|
|
17451
|
+
m(this, ki);
|
|
17444
17452
|
m(this, Lr);
|
|
17445
17453
|
/**
|
|
17446
17454
|
* Returns true if the local participant has joined the meeting.
|
|
17447
17455
|
*/
|
|
17448
|
-
m(this,
|
|
17456
|
+
m(this, Ai);
|
|
17449
17457
|
/**
|
|
17450
17458
|
* Returns true if the local participant has joined the meeting.
|
|
17451
17459
|
*/
|
|
17452
17460
|
m(this, zd);
|
|
17453
|
-
m(this,
|
|
17461
|
+
m(this, Ii);
|
|
17454
17462
|
m(this, Xo);
|
|
17455
17463
|
m(this, Qd);
|
|
17456
17464
|
m(this, Xd);
|
|
@@ -17570,12 +17578,12 @@ let lr = (em = class extends xt {
|
|
|
17570
17578
|
videoEnabled: A = !1,
|
|
17571
17579
|
videoTrack: x,
|
|
17572
17580
|
producers: O,
|
|
17573
|
-
metadata:
|
|
17581
|
+
metadata: $
|
|
17574
17582
|
} = e;
|
|
17575
17583
|
this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = S, this.manualProducerConfig = cw, f(this, Kn, y != null ? y : "ON_STAGE"), this.customParticipantId = E, this.audioEnabled = !k, this.audioTrack = R, this.videoEnabled = A, this.videoTrack = x, this.screenShareTracks = {
|
|
17576
17584
|
audio: void 0,
|
|
17577
17585
|
video: void 0
|
|
17578
|
-
}, this.producers = O != null ? O : [], this.presetName =
|
|
17586
|
+
}, this.producers = O != null ? O : [], this.presetName = $ == null ? void 0 : $.preset_name, f(this, Jn, !1), f(this, js, r), f(this, Qo, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), D(this, Xo, th).call(this);
|
|
17579
17587
|
}
|
|
17580
17588
|
/** Denotes the participants's current stage status. */
|
|
17581
17589
|
get stageStatus() {
|
|
@@ -17594,7 +17602,7 @@ let lr = (em = class extends xt {
|
|
|
17594
17602
|
* @param {boolean} [emitEvent=true]
|
|
17595
17603
|
*/
|
|
17596
17604
|
setVideoEnabled(t, e = !0) {
|
|
17597
|
-
this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", N({},
|
|
17605
|
+
this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", N({}, ui(this))), this.emit("videoUpdate", {
|
|
17598
17606
|
videoEnabled: this.videoEnabled,
|
|
17599
17607
|
videoTrack: this.videoTrack
|
|
17600
17608
|
}));
|
|
@@ -17605,7 +17613,7 @@ let lr = (em = class extends xt {
|
|
|
17605
17613
|
* @param {boolean} [emitEvent=true]
|
|
17606
17614
|
*/
|
|
17607
17615
|
setAudioEnabled(t, e = !0) {
|
|
17608
|
-
this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", N({},
|
|
17616
|
+
this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", N({}, ui(this))), this.emit("audioUpdate", {
|
|
17609
17617
|
audioEnabled: this.audioEnabled,
|
|
17610
17618
|
audioTrack: this.audioTrack
|
|
17611
17619
|
}));
|
|
@@ -17631,11 +17639,11 @@ let lr = (em = class extends xt {
|
|
|
17631
17639
|
*/
|
|
17632
17640
|
pin() {
|
|
17633
17641
|
return u(this, null, function* () {
|
|
17634
|
-
if (!n(this,
|
|
17642
|
+
if (!n(this, Ai, Za))
|
|
17635
17643
|
throw new w("Can`t pin participant without joining room", "1205");
|
|
17636
17644
|
if (!n(this, js).permissions.pinParticipant)
|
|
17637
17645
|
throw new w("You do not have permission to pin participants.", "1201");
|
|
17638
|
-
return n(this,
|
|
17646
|
+
return n(this, ki, Xa).pinPeer(this.id);
|
|
17639
17647
|
});
|
|
17640
17648
|
}
|
|
17641
17649
|
/**
|
|
@@ -17644,11 +17652,11 @@ let lr = (em = class extends xt {
|
|
|
17644
17652
|
*/
|
|
17645
17653
|
unpin() {
|
|
17646
17654
|
return u(this, null, function* () {
|
|
17647
|
-
if (!n(this,
|
|
17655
|
+
if (!n(this, Ai, Za))
|
|
17648
17656
|
throw new w("Can`t unpin participant without joining room", "1205");
|
|
17649
17657
|
if (!n(this, js).permissions.pinParticipant)
|
|
17650
17658
|
throw new w("You do not have permission to unpin participants.", "1201");
|
|
17651
|
-
return n(this,
|
|
17659
|
+
return n(this, ki, Xa).pinPeer(null);
|
|
17652
17660
|
});
|
|
17653
17661
|
}
|
|
17654
17662
|
/**
|
|
@@ -17661,20 +17669,20 @@ let lr = (em = class extends xt {
|
|
|
17661
17669
|
var i;
|
|
17662
17670
|
f(this, Jn, t);
|
|
17663
17671
|
const r = t ? "pinned" : "unpinned";
|
|
17664
|
-
(i = n(this,
|
|
17672
|
+
(i = n(this, Ii, eo)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
17665
17673
|
}
|
|
17666
17674
|
disableAudio() {
|
|
17667
17675
|
return u(this, null, function* () {
|
|
17668
17676
|
const t = this.id;
|
|
17669
17677
|
if (this.logger.info("Participant::disable_audio", {
|
|
17670
17678
|
participant: { id: t }
|
|
17671
|
-
}), !n(this,
|
|
17679
|
+
}), !n(this, Ai, Za))
|
|
17672
17680
|
throw new w(
|
|
17673
17681
|
"Can`t disable participant audio without joining room",
|
|
17674
17682
|
"1205"
|
|
17675
17683
|
);
|
|
17676
17684
|
if (n(this, js).permissions.canDisableParticipantAudio)
|
|
17677
|
-
return n(this,
|
|
17685
|
+
return n(this, ki, Xa).disableAudio(t);
|
|
17678
17686
|
throw this.logger.error("Participant::unauthorized_disable_audio", {
|
|
17679
17687
|
participant: { id: t }
|
|
17680
17688
|
}), new w(
|
|
@@ -17709,13 +17717,13 @@ let lr = (em = class extends xt {
|
|
|
17709
17717
|
const t = this.id;
|
|
17710
17718
|
if (this.logger.info("Participant::disable_video", {
|
|
17711
17719
|
participant: { id: t }
|
|
17712
|
-
}), !n(this,
|
|
17720
|
+
}), !n(this, Ai, Za))
|
|
17713
17721
|
throw new w(
|
|
17714
17722
|
"Can`t disable participant video without joining room",
|
|
17715
17723
|
"1205"
|
|
17716
17724
|
);
|
|
17717
17725
|
if (n(this, js).permissions.canDisableParticipantVideo)
|
|
17718
|
-
return n(this,
|
|
17726
|
+
return n(this, ki, Xa).disableVideo(t);
|
|
17719
17727
|
throw this.logger.error("Participant::unauthorized_disable_video", {
|
|
17720
17728
|
participant: { id: t }
|
|
17721
17729
|
}), new w(
|
|
@@ -17749,7 +17757,7 @@ let lr = (em = class extends xt {
|
|
|
17749
17757
|
if (!t)
|
|
17750
17758
|
return;
|
|
17751
17759
|
let e;
|
|
17752
|
-
(i = (r = n(this, Vr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, Yd).call(this, t)), e.observe(t)), n(this, Vr).set(t, { observer: e }), this.updateVideo(t), (o = n(this,
|
|
17760
|
+
(i = (r = n(this, Vr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, Yd).call(this, t)), e.observe(t)), n(this, Vr).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Ii, eo)) == null || o.addSource(
|
|
17753
17761
|
this.id,
|
|
17754
17762
|
t,
|
|
17755
17763
|
this.videoEnabled,
|
|
@@ -17765,10 +17773,10 @@ let lr = (em = class extends xt {
|
|
|
17765
17773
|
deregisterVideoElement(t) {
|
|
17766
17774
|
var e, r, i, a;
|
|
17767
17775
|
if (!t) {
|
|
17768
|
-
(e = n(this,
|
|
17776
|
+
(e = n(this, Ii, eo)) == null || e.removeSource(this.id);
|
|
17769
17777
|
return;
|
|
17770
17778
|
}
|
|
17771
|
-
t.srcObject = void 0, (i = (r = n(this, Vr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Vr).delete(t), (a = n(this,
|
|
17779
|
+
t.srcObject = void 0, (i = (r = n(this, Vr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Vr).delete(t), (a = n(this, Ii, eo)) == null || a.removeSource(this.id);
|
|
17772
17780
|
}
|
|
17773
17781
|
/**
|
|
17774
17782
|
* Internal method, do not use
|
|
@@ -17789,15 +17797,15 @@ let lr = (em = class extends xt {
|
|
|
17789
17797
|
t.srcObject = void 0;
|
|
17790
17798
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
17791
17799
|
}
|
|
17792
|
-
}, Jn = new WeakMap(), Kn = new WeakMap(), kt = new WeakMap(),
|
|
17800
|
+
}, Jn = new WeakMap(), Kn = new WeakMap(), kt = new WeakMap(), ki = new WeakSet(), Xa = function() {
|
|
17793
17801
|
return n(this, kt).getValue("roomNodeClient");
|
|
17794
17802
|
}, Lr = new WeakSet(), gn = function() {
|
|
17795
17803
|
return n(this, kt).getValue("audioPlayback");
|
|
17796
|
-
},
|
|
17804
|
+
}, Ai = new WeakSet(), Za = function() {
|
|
17797
17805
|
return n(this, kt).getValue("connectionHandler").mediaJoined;
|
|
17798
17806
|
}, zd = new WeakSet(), dS = function() {
|
|
17799
17807
|
return n(this, kt).getValue("connectionHandler").socketJoined;
|
|
17800
|
-
}, js = new WeakMap(), Qo = new WeakMap(), Vr = new WeakMap(),
|
|
17808
|
+
}, js = new WeakMap(), Qo = new WeakMap(), Vr = new WeakMap(), Ii = new WeakSet(), eo = function() {
|
|
17801
17809
|
return n(this, kt).getValue("pip");
|
|
17802
17810
|
}, Gs = new WeakMap(), Yd = new WeakMap(), Xo = new WeakSet(), th = function() {
|
|
17803
17811
|
Array.from(n(this, Vr).keys()).forEach(this.updateVideo);
|
|
@@ -17975,7 +17983,7 @@ var AD = Object.defineProperty, ID = Object.getOwnPropertyDescriptor, Os = (s, t
|
|
|
17975
17983
|
return r && i && AD(t, e, i), i;
|
|
17976
17984
|
};
|
|
17977
17985
|
const MD = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
17978
|
-
var be, Zo, sh,
|
|
17986
|
+
var be, Zo, sh, Mi, to, zn, fd, Di, St, tm;
|
|
17979
17987
|
let es = (tm = class extends xt {
|
|
17980
17988
|
constructor(t, e, r) {
|
|
17981
17989
|
const i = t.getValue("logger");
|
|
@@ -17989,7 +17997,7 @@ let es = (tm = class extends xt {
|
|
|
17989
17997
|
/**
|
|
17990
17998
|
* Returns true if the local participant has joined the meeting.
|
|
17991
17999
|
*/
|
|
17992
|
-
m(this,
|
|
18000
|
+
m(this, Mi);
|
|
17993
18001
|
/**
|
|
17994
18002
|
* Returns true if the local participant has joined the meeting.
|
|
17995
18003
|
*/
|
|
@@ -18024,7 +18032,7 @@ let es = (tm = class extends xt {
|
|
|
18024
18032
|
*/
|
|
18025
18033
|
p(this, "all");
|
|
18026
18034
|
m(this, be, void 0);
|
|
18027
|
-
m(this,
|
|
18035
|
+
m(this, Di, void 0);
|
|
18028
18036
|
m(this, St, void 0);
|
|
18029
18037
|
p(this, "rateLimitConfig", {
|
|
18030
18038
|
maxInvocations: 5,
|
|
@@ -18055,7 +18063,7 @@ let es = (tm = class extends xt {
|
|
|
18055
18063
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18056
18064
|
*/
|
|
18057
18065
|
p(this, "selectedPeers", hS);
|
|
18058
|
-
f(this, be, t), f(this,
|
|
18066
|
+
f(this, be, t), f(this, Di, e), f(this, St, r), this.waitlisted = new Qa(i), this.joined = new Qa(i), this.videoSubscribed = new Qa(i), this.audioSubscribed = new Qa(i), this.active = this.videoSubscribed, this.pinned = new Qa(i), this.all = new RD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18059
18067
|
}
|
|
18060
18068
|
/**
|
|
18061
18069
|
* Return the controls for Picture-in-Picture
|
|
@@ -18134,7 +18142,7 @@ let es = (tm = class extends xt {
|
|
|
18134
18142
|
*/
|
|
18135
18143
|
acceptWaitingRoomRequest(t) {
|
|
18136
18144
|
var r, i;
|
|
18137
|
-
if (!n(this,
|
|
18145
|
+
if (!n(this, Mi, to))
|
|
18138
18146
|
throw new w(
|
|
18139
18147
|
"Can`t accept waiting room request without joining room",
|
|
18140
18148
|
"1205"
|
|
@@ -18165,7 +18173,7 @@ let es = (tm = class extends xt {
|
|
|
18165
18173
|
rejectWaitingRoomRequest(t) {
|
|
18166
18174
|
return u(this, null, function* () {
|
|
18167
18175
|
var r, i;
|
|
18168
|
-
if (!n(this,
|
|
18176
|
+
if (!n(this, Mi, to))
|
|
18169
18177
|
throw new w(
|
|
18170
18178
|
"Can`t reject waiting room request without joining room",
|
|
18171
18179
|
"1205"
|
|
@@ -18297,7 +18305,7 @@ let es = (tm = class extends xt {
|
|
|
18297
18305
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
18298
18306
|
}), !n(this, zn, fd))
|
|
18299
18307
|
throw new w("Can`t disable all audio without joining room", "1205");
|
|
18300
|
-
if (n(this,
|
|
18308
|
+
if (n(this, Di).permissions.canAllowParticipantAudio)
|
|
18301
18309
|
return n(this, Zo, sh).muteAll(t);
|
|
18302
18310
|
throw this.logger.error("Participants::unauthorized_disable_all_audio", {
|
|
18303
18311
|
actions: { disableAllAudio: { allowUnmute: t } }
|
|
@@ -18311,7 +18319,7 @@ let es = (tm = class extends xt {
|
|
|
18311
18319
|
return u(this, null, function* () {
|
|
18312
18320
|
if (this.logger.info("Participants::disable_all_video"), !n(this, zn, fd))
|
|
18313
18321
|
throw new w("Can`t disable all video without joining room", "1205");
|
|
18314
|
-
if (n(this,
|
|
18322
|
+
if (n(this, Di).permissions.canAllowParticipantVideo)
|
|
18315
18323
|
return n(this, Zo, sh).muteAllVideo();
|
|
18316
18324
|
throw this.logger.error("Participants::unauthorized_disable_all_video"), new w(
|
|
18317
18325
|
"Unauthorized: User does not have permission to disable peer video.",
|
|
@@ -18321,9 +18329,9 @@ let es = (tm = class extends xt {
|
|
|
18321
18329
|
}
|
|
18322
18330
|
kickAll() {
|
|
18323
18331
|
return u(this, null, function* () {
|
|
18324
|
-
if (this.logger.info("Participants::kick_all"), n(this, be).getValue("viewType") !== "LIVESTREAM" && !n(this,
|
|
18332
|
+
if (this.logger.info("Participants::kick_all"), n(this, be).getValue("viewType") !== "LIVESTREAM" && !n(this, Mi, to))
|
|
18325
18333
|
throw new w("Can`t kick all without joining room", "1205");
|
|
18326
|
-
if (!n(this,
|
|
18334
|
+
if (!n(this, Di).permissions.kickParticipant)
|
|
18327
18335
|
throw this.logger.error("Participants::unauthorized_kick_all"), new w(
|
|
18328
18336
|
"Unauthorized: User does not have permission to kick peers.",
|
|
18329
18337
|
"1201"
|
|
@@ -18334,7 +18342,7 @@ let es = (tm = class extends xt {
|
|
|
18334
18342
|
}
|
|
18335
18343
|
broadcastMessage(t, e, r) {
|
|
18336
18344
|
return u(this, null, function* () {
|
|
18337
|
-
if (this.logger.info("Participants::broadcastMessage"), !n(this,
|
|
18345
|
+
if (this.logger.info("Participants::broadcastMessage"), !n(this, Mi, to))
|
|
18338
18346
|
throw new w("Can`t broadcast message without joining room", "1205");
|
|
18339
18347
|
if (!(t != null && t.trim()))
|
|
18340
18348
|
throw new w("`type` must be a non-empty string.", "1209");
|
|
@@ -18378,13 +18386,13 @@ let es = (tm = class extends xt {
|
|
|
18378
18386
|
}
|
|
18379
18387
|
}, be = new WeakMap(), Zo = new WeakSet(), sh = function() {
|
|
18380
18388
|
return n(this, be).getValue("roomNodeClient");
|
|
18381
|
-
},
|
|
18389
|
+
}, Mi = new WeakSet(), to = function() {
|
|
18382
18390
|
var t;
|
|
18383
18391
|
return ((t = n(this, be).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0;
|
|
18384
18392
|
}, zn = new WeakSet(), fd = function() {
|
|
18385
18393
|
var t;
|
|
18386
18394
|
return ((t = n(this, be).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
18387
|
-
},
|
|
18395
|
+
}, Di = new WeakMap(), St = new WeakMap(), tm);
|
|
18388
18396
|
Os([
|
|
18389
18397
|
P.trace("Participants.setViewMode")
|
|
18390
18398
|
], es.prototype, "setViewMode", 1);
|
|
@@ -18402,15 +18410,15 @@ Os([
|
|
|
18402
18410
|
], es.prototype, "kickAll", 1);
|
|
18403
18411
|
Os([
|
|
18404
18412
|
P.trace("Participants.broadcastMessage"),
|
|
18405
|
-
|
|
18413
|
+
$t(ka, "rateLimitConfig")
|
|
18406
18414
|
], es.prototype, "broadcastMessage", 1);
|
|
18407
18415
|
Os([
|
|
18408
18416
|
P.trace("Participants.getAllJoinedPeers"),
|
|
18409
|
-
|
|
18417
|
+
$t({ maxInvocations: 10, period: 60 })
|
|
18410
18418
|
], es.prototype, "getAllJoinedPeers", 1);
|
|
18411
18419
|
Os([
|
|
18412
18420
|
P.trace("Participant.updatePermissions"),
|
|
18413
|
-
|
|
18421
|
+
$t({ maxInvocations: 1e3, period: 60 })
|
|
18414
18422
|
], es.prototype, "updatePermissions", 1);
|
|
18415
18423
|
Os([
|
|
18416
18424
|
P.trace("Participants.getParticipantsInMeetingPreJoin")
|
|
@@ -18422,7 +18430,7 @@ var DD = Object.defineProperty, OD = Object.getOwnPropertyDescriptor, dn = (s, t
|
|
|
18422
18430
|
for (var i = r > 1 ? void 0 : r ? OD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
18423
18431
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
18424
18432
|
return r && i && DD(t, e, i), i;
|
|
18425
|
-
}, Jt, os,
|
|
18433
|
+
}, Jt, os, $r, sm;
|
|
18426
18434
|
const pS = (sm = class {
|
|
18427
18435
|
constructor(s, t, e) {
|
|
18428
18436
|
p(this, "participants");
|
|
@@ -18436,7 +18444,7 @@ const pS = (sm = class {
|
|
|
18436
18444
|
p(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
|
|
18437
18445
|
m(this, Jt, { mode: "ACTIVE_GRID", page: 0 });
|
|
18438
18446
|
m(this, os, !1);
|
|
18439
|
-
m(this,
|
|
18447
|
+
m(this, $r, !1);
|
|
18440
18448
|
p(this, "updateConsumerSpatialLayers", Gh(() => {
|
|
18441
18449
|
const s = {}, t = new Map(this.maxSpatialLayerUpdates);
|
|
18442
18450
|
this.maxSpatialLayerUpdates.clear(), Array.from(t.entries()).forEach(([e, r]) => {
|
|
@@ -18494,32 +18502,47 @@ const pS = (sm = class {
|
|
|
18494
18502
|
get logger() {
|
|
18495
18503
|
return this.context.getValue("logger");
|
|
18496
18504
|
}
|
|
18505
|
+
handleSocketPeers(s) {
|
|
18506
|
+
const t = this.participants.joined.size > 0;
|
|
18507
|
+
this.participants.videoSubscribed.clear(), this.participants.audioSubscribed.clear(), this.participants.pinned.clear(), this.participants.joined.clear(), this.participants.currentPage = 0, this.participants.viewMode = "ACTIVE_GRID", t && this.participants.emit("viewModeChanged", {
|
|
18508
|
+
viewMode: "ACTIVE_GRID",
|
|
18509
|
+
currentPage: this.participants.currentPage,
|
|
18510
|
+
pageCount: this.participants.pageCount
|
|
18511
|
+
});
|
|
18512
|
+
const e = new Set(this.roomSocketHandler.socket.replacedPeerIds);
|
|
18513
|
+
s == null || s.forEach((r) => {
|
|
18514
|
+
!r.waitlisted && !e.has(r.peerId) && this.onParticipantSocketJoined(this.createParticipantObjFromSocketPeer(r));
|
|
18515
|
+
});
|
|
18516
|
+
}
|
|
18517
|
+
handlePeerJoinedBroadcast({
|
|
18518
|
+
participant: s,
|
|
18519
|
+
producerHandoverFromPeerId: t
|
|
18520
|
+
}) {
|
|
18521
|
+
var r;
|
|
18522
|
+
if (!s)
|
|
18523
|
+
return;
|
|
18524
|
+
const e = (r = s.producerStates) != null ? r : [];
|
|
18525
|
+
this.logger.info(`peer ${s.peerId} has joined media room with producerStates: ${JSON.stringify(e)}`, {
|
|
18526
|
+
participant: {
|
|
18527
|
+
id: s.peerId,
|
|
18528
|
+
maskedName: [...s.displayName || ""].map((i, a) => a % 2 ? "*" : i).join("")
|
|
18529
|
+
}
|
|
18530
|
+
}), t && t !== s.peerId && e.length > 0 && (this.logger.info(`Producer handover detected from ${t} to ${s.peerId} for producer ids ${e.map(({ producerId: i }) => i).join(",")}`), this.context.getValue("peerSessionStore").emit(C.PRODUCER_HANDOVER, {
|
|
18531
|
+
oldPeerId: t,
|
|
18532
|
+
newPeerId: s.peerId,
|
|
18533
|
+
producerIds: e.map(({ producerId: i }) => i)
|
|
18534
|
+
})), this.onParticipantMediaJoined(s.peerId, e);
|
|
18535
|
+
}
|
|
18497
18536
|
setupEvents() {
|
|
18498
18537
|
this.roomSocketHandler.on(
|
|
18499
|
-
|
|
18538
|
+
U.getWaitingRoomRequests,
|
|
18500
18539
|
this.waitingRoomRequestHandler.bind(this)
|
|
18501
|
-
), this.context.getValue("peerSessionStore").on(
|
|
18502
|
-
|
|
18503
|
-
this.
|
|
18504
|
-
|
|
18505
|
-
currentPage: this.participants.currentPage,
|
|
18506
|
-
pageCount: this.participants.pageCount
|
|
18507
|
-
}), s == null || s.forEach((e) => {
|
|
18508
|
-
e.waitlisted || this.onParticipantSocketJoined(this.createParticipantObjFromSocketPeer(e));
|
|
18509
|
-
});
|
|
18510
|
-
}), this.roomSocketHandler.on(
|
|
18540
|
+
), this.context.getValue("peerSessionStore").on(
|
|
18541
|
+
C.SOCKET_PEERS,
|
|
18542
|
+
this.handleSocketPeers.bind(this)
|
|
18543
|
+
), this.roomSocketHandler.on(
|
|
18511
18544
|
this.events.peerJoinedBroadcast,
|
|
18512
|
-
(
|
|
18513
|
-
this.logger.info("PEER_INFO:::MEDIA_JOIN", {
|
|
18514
|
-
participant: {
|
|
18515
|
-
id: s.peerId,
|
|
18516
|
-
maskedName: [...(s == null ? void 0 : s.displayName) || ""].map((t, e) => e % 2 ? "*" : t).join("")
|
|
18517
|
-
}
|
|
18518
|
-
}), this.onParticipantMediaJoined(
|
|
18519
|
-
s.peerId,
|
|
18520
|
-
s.producerStates
|
|
18521
|
-
);
|
|
18522
|
-
}
|
|
18545
|
+
this.handlePeerJoinedBroadcast.bind(this)
|
|
18523
18546
|
), this.roomSocketHandler.on(
|
|
18524
18547
|
this.events.selfJoinComplete,
|
|
18525
18548
|
({ participants: s, selectedPeers: t, roomState: e }) => {
|
|
@@ -18804,25 +18827,25 @@ const pS = (sm = class {
|
|
|
18804
18827
|
return;
|
|
18805
18828
|
}
|
|
18806
18829
|
if (n(this, os)) {
|
|
18807
|
-
f(this,
|
|
18830
|
+
f(this, $r, !0), this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting.");
|
|
18808
18831
|
return;
|
|
18809
18832
|
}
|
|
18810
|
-
this.logger.info("syncConsumers: Starting sync operation."), f(this, os, !0), f(this,
|
|
18833
|
+
this.logger.info("syncConsumers: Starting sync operation."), f(this, os, !0), f(this, $r, !1);
|
|
18811
18834
|
let t = [];
|
|
18812
18835
|
this.participants.videoSubscribed.forEach((O) => {
|
|
18813
18836
|
var F, X;
|
|
18814
|
-
const
|
|
18815
|
-
|
|
18837
|
+
const $ = this.participants.joined.get(O.id), H = (X = (F = O.producers) == null ? void 0 : F.filter((ee) => ee.kind === "video")) != null ? X : [];
|
|
18838
|
+
$ && (H != null && H.length) && H.forEach((ee) => {
|
|
18816
18839
|
var Ct, I, T, _;
|
|
18817
|
-
const Ke = ((I = (Ct =
|
|
18840
|
+
const Ke = ((I = (Ct = $.manualProducerConfig) == null ? void 0 : Ct.video) != null ? I : !0) && ee.kind === "video" && !ee.screenShare, it = ((_ = (T = $.manualProducerConfig) == null ? void 0 : T.screenshareVideo) != null ? _ : !0) && ee.kind === "video" && ee.screenShare;
|
|
18818
18841
|
(Ke || it) && (ee.pause || t.push(ee));
|
|
18819
18842
|
});
|
|
18820
18843
|
}), this.participants.audioSubscribed.forEach((O) => {
|
|
18821
18844
|
var F, X;
|
|
18822
|
-
const
|
|
18823
|
-
|
|
18845
|
+
const $ = this.participants.joined.get(O.id), H = (X = (F = O.producers) == null ? void 0 : F.filter((ee) => ee.kind === "audio")) != null ? X : [];
|
|
18846
|
+
$ && (H != null && H.length) && H.forEach((ee) => {
|
|
18824
18847
|
var Ct, I, T, _;
|
|
18825
|
-
const Ke = ((I = (Ct =
|
|
18848
|
+
const Ke = ((I = (Ct = $.manualProducerConfig) == null ? void 0 : Ct.audio) != null ? I : !0) && ee.kind === "audio" && !ee.screenShare, it = ((_ = (T = $.manualProducerConfig) == null ? void 0 : T.screenshareAudio) != null ? _ : !0) && ee.kind === "audio" && ee.screenShare;
|
|
18826
18849
|
(Ke || it) && t.push(ee);
|
|
18827
18850
|
});
|
|
18828
18851
|
}), t = ow(t, (O) => O.producerId);
|
|
@@ -18839,8 +18862,8 @@ const pS = (sm = class {
|
|
|
18839
18862
|
t.filter(
|
|
18840
18863
|
(O) => !O.consumer && i.has(O.producerId)
|
|
18841
18864
|
).forEach((O) => {
|
|
18842
|
-
const
|
|
18843
|
-
|
|
18865
|
+
const $ = i.get(O.producerId);
|
|
18866
|
+
$ && (this.logger.info(`syncConsumers: remapping existing consumer ${$.id} to producer ${O.producerId}`), this.processNewConsumer($.id));
|
|
18844
18867
|
});
|
|
18845
18868
|
let c = [], d = Array.from(
|
|
18846
18869
|
r.values()
|
|
@@ -18849,12 +18872,12 @@ const pS = (sm = class {
|
|
|
18849
18872
|
).filter((O) => this.participants.joined.has(O.peerId)).map((O) => O.peerId);
|
|
18850
18873
|
l = aw(l), l == null || l.forEach((O) => {
|
|
18851
18874
|
var H;
|
|
18852
|
-
const
|
|
18853
|
-
if (
|
|
18875
|
+
const $ = this.participants.joined.get(O);
|
|
18876
|
+
if (!$) {
|
|
18854
18877
|
this.logger.warn(`Peer with ${O} doesn't exist in joined list but producers of it are being consumed.`);
|
|
18855
18878
|
return;
|
|
18856
18879
|
}
|
|
18857
|
-
(H =
|
|
18880
|
+
(H = $.producers) != null && H.length && $.producers.forEach((F) => {
|
|
18858
18881
|
const X = F.consumer && r.has(F.consumer.id);
|
|
18859
18882
|
!e.has(F.producerId) && (i.has(F.producerId) || X) && c.push(F);
|
|
18860
18883
|
});
|
|
@@ -18878,9 +18901,9 @@ const pS = (sm = class {
|
|
|
18878
18901
|
} catch (O) {
|
|
18879
18902
|
this.logger.error("syncConsumers: updateConsumers failed with error.", { error: O });
|
|
18880
18903
|
} finally {
|
|
18881
|
-
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, os, !1), (x = s == null ? void 0 : s.socketState) != null && x.state && s.socketState.state !== "connected" && f(this,
|
|
18904
|
+
this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, os, !1), (x = s == null ? void 0 : s.socketState) != null && x.state && s.socketState.state !== "connected" && f(this, $r, !0);
|
|
18882
18905
|
}
|
|
18883
|
-
n(this,
|
|
18906
|
+
n(this, $r) && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
|
|
18884
18907
|
});
|
|
18885
18908
|
}
|
|
18886
18909
|
computeActivateParticipants(s, t) {
|
|
@@ -18928,12 +18951,16 @@ const pS = (sm = class {
|
|
|
18928
18951
|
maskedName: [...(e == null ? void 0 : e.name) || ""].map((r, i) => i % 2 ? "*" : r).join("")
|
|
18929
18952
|
}
|
|
18930
18953
|
}), this.logger.info(`onParticipantMediaJoined: peer ${s} has joined media room. Processing.`), t.forEach((r) => {
|
|
18931
|
-
r.kind === or.AUDIO && !r.screenShare ? e.setAudioEnabled(!r.pause) : r.kind === or.VIDEO && !r.screenShare && (e.setVideoEnabled(!r.pause), this.updatePipSource(e.id, !r.pause))
|
|
18954
|
+
r.kind === or.AUDIO && !r.screenShare ? e.setAudioEnabled(!r.pause) : r.kind === or.VIDEO && !r.screenShare && (e.setVideoEnabled(!r.pause), this.updatePipSource(e.id, !r.pause));
|
|
18955
|
+
const i = W(N({}, r), {
|
|
18932
18956
|
producingTransportId: r.producingTransportId,
|
|
18933
18957
|
kind: r.kind === or.AUDIO ? "audio" : "video",
|
|
18934
18958
|
producingPeerId: s,
|
|
18935
18959
|
mimeType: r.mimeType
|
|
18936
|
-
})
|
|
18960
|
+
}), a = e.producers.find(
|
|
18961
|
+
({ producerId: o }) => o === i.producerId
|
|
18962
|
+
);
|
|
18963
|
+
a ? Object.assign(a, i) : e.producers.push(i);
|
|
18937
18964
|
}), this.logger.info(`onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ${s}`), this.context.getValue("peerSessionStore").emit(C.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
18938
18965
|
}
|
|
18939
18966
|
/**
|
|
@@ -19033,12 +19060,14 @@ const pS = (sm = class {
|
|
|
19033
19060
|
appData: h.appData,
|
|
19034
19061
|
peerId: e
|
|
19035
19062
|
});
|
|
19063
|
+
}), this.logger.info(`Removing old peer ${t} locally after handover.`), this.onParticipantLeave(t).catch((h) => {
|
|
19064
|
+
this.logger.error("Failed to remove old peer locally after handover", { error: h });
|
|
19036
19065
|
});
|
|
19037
19066
|
}
|
|
19038
19067
|
setupEventsGlobal() {
|
|
19039
|
-
this.roomSocketHandler.on(
|
|
19068
|
+
this.roomSocketHandler.on(U.joinRoom, ({ peer: s }) => {
|
|
19040
19069
|
s.waitlisted || (this.logger.info("Processing socket join", { peers: s.peerId }), this.onParticipantSocketJoined(this.createParticipantObjFromSocketPeer(s)), this.logger.info("Processed socket join", { peers: s.peerId }));
|
|
19041
|
-
}), this.roomSocketHandler.on(
|
|
19070
|
+
}), this.roomSocketHandler.on(U.leaveRoom, (s) => u(this, null, function* () {
|
|
19042
19071
|
const { peerId: t } = s.peer;
|
|
19043
19072
|
this.logger.info(`peer ${t} left the meeting. Removing it from selected peers`), this.selectedPeers.delete(t, this.context), this.onParticipantLeave(t);
|
|
19044
19073
|
})), this.context.getValue("peerSessionStore").on(
|
|
@@ -19050,7 +19079,7 @@ const pS = (sm = class {
|
|
|
19050
19079
|
const { acceptWaitingRequests: t } = s;
|
|
19051
19080
|
t !== void 0 && (t ? this.roomSocketHandler.getWaitingRoomRequests() : this.participants.waitlisted.clear());
|
|
19052
19081
|
}), this.context.getValue("peerSessionStore").on(C.SOCKET_SERVICE_DISCONNECTED, () => {
|
|
19053
|
-
f(this,
|
|
19082
|
+
f(this, $r, !0), this.logger.info("Socket disconnected — keeping participants visible for seamless reconnection");
|
|
19054
19083
|
}), this.context.getValue("peerSessionStore").on(
|
|
19055
19084
|
C.CONSUMER_PAUSED,
|
|
19056
19085
|
({ id: s }) => {
|
|
@@ -19497,7 +19526,7 @@ const pS = (sm = class {
|
|
|
19497
19526
|
// priority
|
|
19498
19527
|
})), t && this.context.getValue("peerSessionStore").emit(C.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
|
|
19499
19528
|
}
|
|
19500
|
-
}, Jt = new WeakMap(), os = new WeakMap(),
|
|
19529
|
+
}, Jt = new WeakMap(), os = new WeakMap(), $r = new WeakMap(), sm);
|
|
19501
19530
|
let fr = pS;
|
|
19502
19531
|
dn([
|
|
19503
19532
|
P.trace("ParticipantController.setupEvents")
|
|
@@ -19550,13 +19579,13 @@ const el = class extends xt {
|
|
|
19550
19579
|
if (r && (r.private && vr(n(this, Y).chat.private, r.private), r.public && vr(n(this, Y).chat.public, r.public), this.emit("chatUpdate")), i && vr(n(this, Y).connectedMeetings, i), c) {
|
|
19551
19580
|
const y = (k) => {
|
|
19552
19581
|
switch (k) {
|
|
19553
|
-
case
|
|
19582
|
+
case Yr.NONE:
|
|
19554
19583
|
return G.Allowed;
|
|
19555
|
-
case
|
|
19584
|
+
case Yr.ALLOWED:
|
|
19556
19585
|
return G.Allowed;
|
|
19557
|
-
case
|
|
19586
|
+
case Yr.NOT_ALLOWED:
|
|
19558
19587
|
return G.NotAllowed;
|
|
19559
|
-
case
|
|
19588
|
+
case Yr.CAN_REQUEST:
|
|
19560
19589
|
return G.CanRequest;
|
|
19561
19590
|
default:
|
|
19562
19591
|
return;
|
|
@@ -20235,7 +20264,7 @@ var ND = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, ft = (s, t
|
|
|
20235
20264
|
for (var i = r > 1 ? void 0 : r ? LD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
20236
20265
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20237
20266
|
return r && i && ND(t, e, i), i;
|
|
20238
|
-
}, Xn, lt, Zn,
|
|
20267
|
+
}, Xn, lt, Zn, Ue, Ws, oi, He, Ze, ea, Sd, De, Ne, ta, sa, ec, ih, rm;
|
|
20239
20268
|
let Je = (rm = class extends gS {
|
|
20240
20269
|
constructor(t, e, r, i, a) {
|
|
20241
20270
|
const o = t.getValue("logger");
|
|
@@ -20261,7 +20290,7 @@ let Je = (rm = class extends gS {
|
|
|
20261
20290
|
p(this, "organizationId");
|
|
20262
20291
|
p(this, "supportsRemoteControl", !1);
|
|
20263
20292
|
p(this, "device");
|
|
20264
|
-
m(this,
|
|
20293
|
+
m(this, Ue, void 0);
|
|
20265
20294
|
p(this, "hidden", !1);
|
|
20266
20295
|
/* Name of the preset used to join the meeting */
|
|
20267
20296
|
p(this, "presetName");
|
|
@@ -20278,17 +20307,17 @@ let Je = (rm = class extends gS {
|
|
|
20278
20307
|
p(this, "roomState", "init");
|
|
20279
20308
|
m(this, ta, /* @__PURE__ */ new Set());
|
|
20280
20309
|
m(this, sa, /* @__PURE__ */ new Set());
|
|
20281
|
-
f(this,
|
|
20310
|
+
f(this, Ue, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = e.customParticipantId, this.waitlistStatus = "none", f(this, lt, r), f(this, Xn, i), this.hidden = !1, f(this, Zn, !1), this.organizationId = e.organizationId, this.supportsRemoteControl = ve.isElectron(), this.device = ve.getDeviceInfo(), this.presetName = a, this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), D(this, ec, ih).call(this);
|
|
20282
20311
|
}
|
|
20283
20312
|
/**
|
|
20284
20313
|
* @private
|
|
20285
20314
|
* Not for external use
|
|
20286
20315
|
*/
|
|
20287
20316
|
get telemetry() {
|
|
20288
|
-
return n(this,
|
|
20317
|
+
return n(this, Ue).getValue("telemetry");
|
|
20289
20318
|
}
|
|
20290
20319
|
get stageStatus() {
|
|
20291
|
-
return n(this,
|
|
20320
|
+
return n(this, Ue).getValue("stageStatus");
|
|
20292
20321
|
}
|
|
20293
20322
|
get producers() {
|
|
20294
20323
|
var t, e;
|
|
@@ -20301,7 +20330,7 @@ let Je = (rm = class extends gS {
|
|
|
20301
20330
|
* when using identifiers in Locker.
|
|
20302
20331
|
* We might want to look at deprecating the `id` sometime later. */
|
|
20303
20332
|
get peerId() {
|
|
20304
|
-
return n(this,
|
|
20333
|
+
return n(this, Ue).getValue("peerId");
|
|
20305
20334
|
}
|
|
20306
20335
|
static __init__(t, e, r, i, a, o = !1) {
|
|
20307
20336
|
return u(this, null, function* () {
|
|
@@ -20328,7 +20357,7 @@ let Je = (rm = class extends gS {
|
|
|
20328
20357
|
t && t.onError((e) => {
|
|
20329
20358
|
this.emit("autoplayError", e);
|
|
20330
20359
|
}), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
20331
|
-
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", N({},
|
|
20360
|
+
if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", N({}, ui(this))), n(this, De, Ne) && this.audioEnabled)
|
|
20332
20361
|
try {
|
|
20333
20362
|
yield n(this, He, Ze).shareMic(this.audioTrack);
|
|
20334
20363
|
} catch (e) {
|
|
@@ -20341,7 +20370,7 @@ let Je = (rm = class extends gS {
|
|
|
20341
20370
|
audioTrack: this.audioTrack
|
|
20342
20371
|
});
|
|
20343
20372
|
})), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
|
|
20344
|
-
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", N({},
|
|
20373
|
+
if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", N({}, ui(this))), n(this, De, Ne) && this.rawVideoTrack === void 0)
|
|
20345
20374
|
this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
|
|
20346
20375
|
else if (this.videoEnabled && n(this, De, Ne))
|
|
20347
20376
|
try {
|
|
@@ -20383,15 +20412,15 @@ let Je = (rm = class extends gS {
|
|
|
20383
20412
|
}
|
|
20384
20413
|
), this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare());
|
|
20385
20414
|
}
|
|
20386
|
-
this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", N({},
|
|
20415
|
+
this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", N({}, ui(this))), this.emit("screenShareUpdate", {
|
|
20387
20416
|
screenShareEnabled: this.screenShareEnabled,
|
|
20388
20417
|
screenShareTracks: this.screenShareTracks
|
|
20389
20418
|
});
|
|
20390
20419
|
})), this.localMediaHandler.on("SCREENSHARE_ENDED", () => u(this, null, function* () {
|
|
20391
|
-
this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", N({},
|
|
20420
|
+
this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", N({}, ui(this)));
|
|
20392
20421
|
})), this.localMediaHandler.on("AUDIO_TRACK_SILENT", () => {
|
|
20393
20422
|
var e;
|
|
20394
|
-
(e = n(this,
|
|
20423
|
+
(e = n(this, Ue)) == null || e.getValue("callstats").mediaTrackMuted("AUDIO");
|
|
20395
20424
|
}), this.localMediaHandler.on("FORCE_MUTE_AUDIO", () => {
|
|
20396
20425
|
this.disableAudio();
|
|
20397
20426
|
}), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => u(this, null, function* () {
|
|
@@ -20399,7 +20428,7 @@ let Je = (rm = class extends gS {
|
|
|
20399
20428
|
n(this, De, Ne) && (yield n(this, He, Ze).pauseWebcam()), this.emit("videoUpdate", {
|
|
20400
20429
|
videoEnabled: this.videoEnabled,
|
|
20401
20430
|
videoTrack: this.videoTrack
|
|
20402
|
-
}), (e = n(this,
|
|
20431
|
+
}), (e = n(this, Ue)) == null || e.getValue("callstats").videoOff();
|
|
20403
20432
|
})), n(this, lt).on("permissionsUpdate", (e) => {
|
|
20404
20433
|
var r, i, a;
|
|
20405
20434
|
(r = e == null ? void 0 : e.media) != null && r.audio && n(this, lt).canProduceAudio !== G.Allowed && (this.disableAudio(), this.logger.info(`Disabled audio due to dynamic preset change: canProduceAudio: ${this.permissions.canProduceAudio}`)), (i = e == null ? void 0 : e.media) != null && i.video && n(this, lt).canProduceVideo !== G.Allowed && (this.disableVideo(), this.logger.info(`Disabled video due to dynamic preset change: canProduceVideo: ${this.permissions.canProduceVideo}`)), (a = e == null ? void 0 : e.media) != null && a.screenshare && n(this, lt).canProduceScreenshare !== G.Allowed && (this.disableScreenShare(), this.logger.info(`Disabled screenshare due to dynamic preset change: canProduceScreenshare: ${this.permissions.canProduceScreenshare}`));
|
|
@@ -20422,7 +20451,7 @@ let Je = (rm = class extends gS {
|
|
|
20422
20451
|
*/
|
|
20423
20452
|
get roomJoined() {
|
|
20424
20453
|
var t;
|
|
20425
|
-
return n(this, Xn).viewType === ar.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this,
|
|
20454
|
+
return n(this, Xn).viewType === ar.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this, Ue).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0 : n(this, De, Ne);
|
|
20426
20455
|
}
|
|
20427
20456
|
/**
|
|
20428
20457
|
* The name of the user can be set by calling this method.
|
|
@@ -20454,7 +20483,7 @@ let Je = (rm = class extends gS {
|
|
|
20454
20483
|
return u(this, null, function* () {
|
|
20455
20484
|
var e;
|
|
20456
20485
|
if (this.permissions.canProduceAudio !== G.NotAllowed && !(n(this, lt).canProduceAudio === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
|
|
20457
|
-
if ((e = n(this,
|
|
20486
|
+
if ((e = n(this, Ue)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this, De, Ne) && this.stageStatus === "ON_STAGE") {
|
|
20458
20487
|
if (this.audioTrack)
|
|
20459
20488
|
try {
|
|
20460
20489
|
yield n(this, He, Ze).shareMic(this.audioTrack);
|
|
@@ -20477,7 +20506,7 @@ let Je = (rm = class extends gS {
|
|
|
20477
20506
|
return u(this, null, function* () {
|
|
20478
20507
|
var e;
|
|
20479
20508
|
if (n(this, lt).canProduceVideo !== G.NotAllowed && !(n(this, lt).canProduceVideo === G.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
|
|
20480
|
-
if ((e = n(this,
|
|
20509
|
+
if ((e = n(this, Ue)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this, De, Ne) && this.stageStatus === "ON_STAGE")
|
|
20481
20510
|
try {
|
|
20482
20511
|
yield n(this, He, Ze).shareWebcam(this.videoTrack);
|
|
20483
20512
|
} catch (r) {
|
|
@@ -20488,7 +20517,7 @@ let Je = (rm = class extends gS {
|
|
|
20488
20517
|
this.emit("videoUpdate", {
|
|
20489
20518
|
videoEnabled: this.videoEnabled,
|
|
20490
20519
|
videoTrack: this.videoTrack
|
|
20491
|
-
}), this.logger.info("Self.enableVideo", N({},
|
|
20520
|
+
}), this.logger.info("Self.enableVideo", N({}, ui(this)));
|
|
20492
20521
|
}
|
|
20493
20522
|
});
|
|
20494
20523
|
}
|
|
@@ -20534,7 +20563,7 @@ let Je = (rm = class extends gS {
|
|
|
20534
20563
|
this.audioEnabled && (this.localMediaHandler.disableAudio(), n(this, De, Ne) && n(this, He, Ze).muteSelf(), this.emit("audioUpdate", {
|
|
20535
20564
|
audioEnabled: this.audioEnabled,
|
|
20536
20565
|
audioTrack: this.audioTrack
|
|
20537
|
-
}), (t = n(this,
|
|
20566
|
+
}), (t = n(this, Ue)) == null || t.getValue("callstats").audioOff());
|
|
20538
20567
|
});
|
|
20539
20568
|
}
|
|
20540
20569
|
disableVideo() {
|
|
@@ -20543,7 +20572,7 @@ let Je = (rm = class extends gS {
|
|
|
20543
20572
|
this.videoEnabled && (yield this.localMediaHandler.disableVideo(), n(this, De, Ne) && (yield n(this, He, Ze).pauseWebcam()), this.emit("videoUpdate", {
|
|
20544
20573
|
videoEnabled: this.videoEnabled,
|
|
20545
20574
|
videoTrack: this.videoTrack
|
|
20546
|
-
}), (t = n(this,
|
|
20575
|
+
}), (t = n(this, Ue)) == null || t.getValue("callstats").videoOff());
|
|
20547
20576
|
});
|
|
20548
20577
|
}
|
|
20549
20578
|
disableScreenShare() {
|
|
@@ -20570,7 +20599,7 @@ let Je = (rm = class extends gS {
|
|
|
20570
20599
|
var i;
|
|
20571
20600
|
f(this, Zn, t);
|
|
20572
20601
|
const r = t ? "pinned" : "unpinned";
|
|
20573
|
-
(i = n(this, Ws,
|
|
20602
|
+
(i = n(this, Ws, oi)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
|
|
20574
20603
|
}
|
|
20575
20604
|
/**
|
|
20576
20605
|
* Returns true if the current user is pinned.
|
|
@@ -20661,7 +20690,7 @@ let Je = (rm = class extends gS {
|
|
|
20661
20690
|
}
|
|
20662
20691
|
registerVideoElement(t, e = !1) {
|
|
20663
20692
|
var r, i;
|
|
20664
|
-
t && (e ? n(this, ta).add(t) : n(this, sa).add(t), this.updateVideo(t), e || (i = n(this, Ws,
|
|
20693
|
+
t && (e ? n(this, ta).add(t) : n(this, sa).add(t), this.updateVideo(t), e || (i = n(this, Ws, oi)) == null || i.addSource(
|
|
20665
20694
|
this.id,
|
|
20666
20695
|
t,
|
|
20667
20696
|
this.videoEnabled,
|
|
@@ -20673,10 +20702,10 @@ let Je = (rm = class extends gS {
|
|
|
20673
20702
|
}
|
|
20674
20703
|
deregisterVideoElement(t, e = !1) {
|
|
20675
20704
|
if (!t) {
|
|
20676
|
-
n(this, Ws,
|
|
20705
|
+
n(this, Ws, oi).removeSource(this.id);
|
|
20677
20706
|
return;
|
|
20678
20707
|
}
|
|
20679
|
-
t.srcObject = void 0, e ? n(this, ta).delete(t) : (n(this, sa).delete(t), n(this, Ws,
|
|
20708
|
+
t.srcObject = void 0, e ? n(this, ta).delete(t) : (n(this, sa).delete(t), n(this, Ws, oi).removeSource(this.id));
|
|
20680
20709
|
}
|
|
20681
20710
|
/**
|
|
20682
20711
|
* Internal method, do not use
|
|
@@ -20691,20 +20720,20 @@ let Je = (rm = class extends gS {
|
|
|
20691
20720
|
if ((o == null ? void 0 : o.id) === this.videoTrack.id)
|
|
20692
20721
|
return;
|
|
20693
20722
|
const c = new MediaStream();
|
|
20694
|
-
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, Ws,
|
|
20723
|
+
c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, Ws, oi)) == null || i.enableSource(this.id);
|
|
20695
20724
|
} else
|
|
20696
|
-
t.srcObject = void 0, e || (a = n(this, Ws,
|
|
20725
|
+
t.srcObject = void 0, e || (a = n(this, Ws, oi)) == null || a.disableSource(this.id);
|
|
20697
20726
|
t.style.display = this.videoEnabled ? "block" : "none";
|
|
20698
20727
|
}
|
|
20699
|
-
}, Xn = new WeakMap(), lt = new WeakMap(), Zn = new WeakMap(),
|
|
20700
|
-
return n(this,
|
|
20728
|
+
}, Xn = new WeakMap(), lt = new WeakMap(), Zn = new WeakMap(), Ue = new WeakMap(), Ws = new WeakSet(), oi = function() {
|
|
20729
|
+
return n(this, Ue).getValue("pip");
|
|
20701
20730
|
}, He = new WeakSet(), Ze = function() {
|
|
20702
|
-
return n(this,
|
|
20731
|
+
return n(this, Ue).getValue("roomNodeClient");
|
|
20703
20732
|
}, ea = new WeakSet(), Sd = function() {
|
|
20704
|
-
return n(this,
|
|
20733
|
+
return n(this, Ue).getValue("audioPlayback");
|
|
20705
20734
|
}, De = new WeakSet(), Ne = function() {
|
|
20706
20735
|
var t;
|
|
20707
|
-
return ((t = n(this,
|
|
20736
|
+
return ((t = n(this, Ue).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
20708
20737
|
}, ta = new WeakMap(), sa = new WeakMap(), ec = new WeakSet(), ih = function() {
|
|
20709
20738
|
Array.from(n(this, sa)).forEach((t) => this.updateVideo(t, !1)), Array.from(n(this, ta)).forEach((t) => this.updateVideo(t, !0));
|
|
20710
20739
|
}, rm);
|
|
@@ -20960,7 +20989,7 @@ function cd(s) {
|
|
|
20960
20989
|
headerExtensions: xD(s.headerExtensions ? s.headerExtensions : [])
|
|
20961
20990
|
};
|
|
20962
20991
|
}
|
|
20963
|
-
function
|
|
20992
|
+
function $D(s) {
|
|
20964
20993
|
const t = RTCRtpReceiver.getCapabilities("audio"), e = RTCRtpReceiver.getCapabilities("video"), r = RTCRtpSender.getCapabilities("audio"), i = RTCRtpSender.getCapabilities("video");
|
|
20965
20994
|
s && (e.codecs = e.codecs.filter(({ mimeType: d }) => s === d), i.codecs = i.codecs.filter(({ mimeType: d }) => s === d));
|
|
20966
20995
|
const a = {
|
|
@@ -21023,10 +21052,10 @@ class su extends mt.EventEmitter {
|
|
|
21023
21052
|
}
|
|
21024
21053
|
}
|
|
21025
21054
|
sc = new WeakMap();
|
|
21026
|
-
function
|
|
21055
|
+
function UD(s, t) {
|
|
21027
21056
|
return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
|
|
21028
21057
|
}
|
|
21029
|
-
var rc,
|
|
21058
|
+
var rc, Oi, Ts, tl, ys, yr, ic, ah, sl, fS, rl, SS;
|
|
21030
21059
|
class HD extends su {
|
|
21031
21060
|
constructor(e, r) {
|
|
21032
21061
|
var i;
|
|
@@ -21076,10 +21105,10 @@ class HD extends su {
|
|
|
21076
21105
|
* RTCRtpReceiver associated with the consumer
|
|
21077
21106
|
*/
|
|
21078
21107
|
m(this, rc, void 0);
|
|
21079
|
-
m(this,
|
|
21108
|
+
m(this, Oi, void 0);
|
|
21080
21109
|
m(this, Ts, void 0);
|
|
21081
21110
|
m(this, tl, void 0);
|
|
21082
|
-
this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Ts, !1), this.producerId = r.producerId, this.track = r.track, f(this,
|
|
21111
|
+
this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Ts, !1), this.producerId = r.producerId, this.track = r.track, f(this, Oi, (i = r.paused) != null ? i : !1), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, D(this, sl, fS).call(this), f(this, tl, e);
|
|
21083
21112
|
}
|
|
21084
21113
|
/**
|
|
21085
21114
|
* Indicates whether this consumer is closed
|
|
@@ -21097,7 +21126,7 @@ class HD extends su {
|
|
|
21097
21126
|
* Indicates whether the consumer is paused
|
|
21098
21127
|
*/
|
|
21099
21128
|
get paused() {
|
|
21100
|
-
return n(this,
|
|
21129
|
+
return n(this, Oi);
|
|
21101
21130
|
}
|
|
21102
21131
|
reassignPeer(e) {
|
|
21103
21132
|
this.peerId = e;
|
|
@@ -21126,7 +21155,7 @@ class HD extends su {
|
|
|
21126
21155
|
this.logger.error("consumer::pause() | Consumer closed", n(this, ys, yr));
|
|
21127
21156
|
return;
|
|
21128
21157
|
}
|
|
21129
|
-
f(this,
|
|
21158
|
+
f(this, Oi, !0), this.track.enabled = !1, this.safeEmit("pause");
|
|
21130
21159
|
}
|
|
21131
21160
|
/**
|
|
21132
21161
|
* Resumes receiving media.
|
|
@@ -21136,10 +21165,10 @@ class HD extends su {
|
|
|
21136
21165
|
this.logger.error("Consumer::resume() | Consumer closed", n(this, ys, yr));
|
|
21137
21166
|
return;
|
|
21138
21167
|
}
|
|
21139
|
-
f(this,
|
|
21168
|
+
f(this, Oi, !1), this.track.enabled = !0, this.safeEmit("resume");
|
|
21140
21169
|
}
|
|
21141
21170
|
}
|
|
21142
|
-
rc = new WeakMap(),
|
|
21171
|
+
rc = new WeakMap(), Oi = new WeakMap(), Ts = new WeakMap(), tl = new WeakMap(), ys = new WeakSet(), yr = function() {
|
|
21143
21172
|
return {
|
|
21144
21173
|
consumer: {
|
|
21145
21174
|
id: this.id,
|
|
@@ -21161,7 +21190,7 @@ rc = new WeakMap(), Di = new WeakMap(), Ts = new WeakMap(), tl = new WeakMap(),
|
|
|
21161
21190
|
}));
|
|
21162
21191
|
}
|
|
21163
21192
|
};
|
|
21164
|
-
var cs, ra, ia,
|
|
21193
|
+
var cs, ra, ia, Ni, Kt, Qe, Ur, na, il, It, ts;
|
|
21165
21194
|
class BD extends su {
|
|
21166
21195
|
/**
|
|
21167
21196
|
* @emits transportclose
|
|
@@ -21210,13 +21239,13 @@ class BD extends su {
|
|
|
21210
21239
|
/**
|
|
21211
21240
|
* Specify if we should replace the RTCRtpSender.track with null when paused.
|
|
21212
21241
|
*/
|
|
21213
|
-
m(this,
|
|
21242
|
+
m(this, Ni, void 0);
|
|
21214
21243
|
m(this, Kt, !1);
|
|
21215
21244
|
m(this, Qe, void 0);
|
|
21216
|
-
m(this,
|
|
21245
|
+
m(this, Ur, void 0);
|
|
21217
21246
|
m(this, na, void 0);
|
|
21218
21247
|
m(this, il, void 0);
|
|
21219
|
-
this.id = r.id, this.localId = r.localId, f(this, Qe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this,
|
|
21248
|
+
this.id = r.id, this.localId = r.localId, f(this, Qe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, Ur, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, na, void 0), f(this, ra, r.stopTracks), f(this, ia, r.disableTrackOnPause), f(this, Ni, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, cs, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, il, e);
|
|
21220
21249
|
}
|
|
21221
21250
|
/**
|
|
21222
21251
|
* Whether the Producer is closed.
|
|
@@ -21234,7 +21263,7 @@ class BD extends su {
|
|
|
21234
21263
|
* Whether the Producer is paused.
|
|
21235
21264
|
*/
|
|
21236
21265
|
get paused() {
|
|
21237
|
-
return n(this,
|
|
21266
|
+
return n(this, Ur);
|
|
21238
21267
|
}
|
|
21239
21268
|
/**
|
|
21240
21269
|
* Max spatial layer.
|
|
@@ -21273,7 +21302,7 @@ class BD extends su {
|
|
|
21273
21302
|
* Pauses sending media.
|
|
21274
21303
|
*/
|
|
21275
21304
|
pause() {
|
|
21276
|
-
this.logger.debug("Producer::pause()", n(this, It, ts)), n(this, Kt) && this.logger.error("Producer::pause() | Producer closed", n(this, It, ts)), f(this,
|
|
21305
|
+
this.logger.debug("Producer::pause()", n(this, It, ts)), n(this, Kt) && this.logger.error("Producer::pause() | Producer closed", n(this, It, ts)), f(this, Ur, !0), n(this, Qe) && n(this, ia) && (n(this, Qe).enabled = !1), n(this, Ni) && n(this, cs).replaceTrack(this.localId, null), this.emit("pause");
|
|
21277
21306
|
}
|
|
21278
21307
|
/**
|
|
21279
21308
|
* Resumes sending media.
|
|
@@ -21283,7 +21312,7 @@ class BD extends su {
|
|
|
21283
21312
|
this.logger.error("Producer::resume() | Producer closed", n(this, It, ts));
|
|
21284
21313
|
return;
|
|
21285
21314
|
}
|
|
21286
|
-
f(this,
|
|
21315
|
+
f(this, Ur, !1), n(this, Qe) && n(this, ia) && (n(this, Qe).enabled = !0), n(this, Ni) && n(this, cs).replaceTrack(this.localId, n(this, Qe)), this.emit("resume");
|
|
21287
21316
|
}
|
|
21288
21317
|
/**
|
|
21289
21318
|
* Replaces the current track with a new one or null.
|
|
@@ -21308,7 +21337,7 @@ class BD extends su {
|
|
|
21308
21337
|
this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, It, ts));
|
|
21309
21338
|
return;
|
|
21310
21339
|
}
|
|
21311
|
-
(!n(this,
|
|
21340
|
+
(!n(this, Ni) || !n(this, Ur)) && (yield n(this, cs).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Qe, e), this._handleTrack();
|
|
21312
21341
|
});
|
|
21313
21342
|
}
|
|
21314
21343
|
/**
|
|
@@ -21355,7 +21384,7 @@ class BD extends su {
|
|
|
21355
21384
|
}
|
|
21356
21385
|
}
|
|
21357
21386
|
}
|
|
21358
|
-
cs = new WeakMap(), ra = new WeakMap(), ia = new WeakMap(),
|
|
21387
|
+
cs = new WeakMap(), ra = new WeakMap(), ia = new WeakMap(), Ni = new WeakMap(), Kt = new WeakMap(), Qe = new WeakMap(), Ur = new WeakMap(), na = new WeakMap(), il = new WeakMap(), It = new WeakSet(), ts = function() {
|
|
21359
21388
|
return {
|
|
21360
21389
|
producer: {
|
|
21361
21390
|
id: this.id,
|
|
@@ -21407,7 +21436,7 @@ const yn = class extends su {
|
|
|
21407
21436
|
f(this, aa, e);
|
|
21408
21437
|
const S = e.getValue("logger");
|
|
21409
21438
|
S.debug(`constructor() [id: ${r}, direction: ${i}]`), this.id = r, this.direction = i;
|
|
21410
|
-
const y =
|
|
21439
|
+
const y = UD(l, {});
|
|
21411
21440
|
delete y.iceServers, delete y.iceTransportPolicy, delete y.bundlePolicy, delete y.rtcpMuxPolicy, delete y.sdpSemantics, this.producers = /* @__PURE__ */ new Map(), this.consumers = /* @__PURE__ */ new Map(), this.consumerTrackEvents = /* @__PURE__ */ new Map(), this.unknownTracksMap = /* @__PURE__ */ new Map(), this.awaitQueue = new nh(S, !0), this.handler = a(), this.handler.enableHighBitrate = (k = g == null ? void 0 : g.enableHighBitrate) != null ? k : !1, this.handler.enableStereo = (R = g == null ? void 0 : g.enableStereo) != null ? R : !1, this.handler.enableDtx = (A = g == null ? void 0 : g.enableDtx) != null ? A : !0, this.handler.init({
|
|
21412
21441
|
onTrackHandler: this._ontrack.bind(this),
|
|
21413
21442
|
direction: i,
|
|
@@ -21541,7 +21570,7 @@ const yn = class extends su {
|
|
|
21541
21570
|
encodings: o,
|
|
21542
21571
|
codecOptions: c,
|
|
21543
21572
|
screenShare: g == null ? void 0 : g.screenShare
|
|
21544
|
-
}), { answer: O, producerId:
|
|
21573
|
+
}), { answer: O, producerId: $ } = yield r(
|
|
21545
21574
|
{
|
|
21546
21575
|
offer: k,
|
|
21547
21576
|
kind: a.kind,
|
|
@@ -21551,7 +21580,7 @@ const yn = class extends su {
|
|
|
21551
21580
|
producingTransportId: this.serverId
|
|
21552
21581
|
}
|
|
21553
21582
|
), H = yield R(O);
|
|
21554
|
-
return { producerId:
|
|
21583
|
+
return { producerId: $, localId: H, rtpSender: A };
|
|
21555
21584
|
}), "Transport.produce");
|
|
21556
21585
|
return this.createProducerObject({
|
|
21557
21586
|
id: S,
|
|
@@ -21735,12 +21764,12 @@ const yn = class extends su {
|
|
|
21735
21764
|
return new Promise((k, R) => u(this, null, function* () {
|
|
21736
21765
|
const A = setTimeout(() => {
|
|
21737
21766
|
this.logger.warn(`Timed out waiting for track event ${y} producingPeerId: ${a}`), this.consumerTrackEvents.delete(y), E.isTimedout = !0, R(E);
|
|
21738
|
-
}, 5e3), x = (
|
|
21767
|
+
}, 5e3), x = ($, H) => {
|
|
21739
21768
|
try {
|
|
21740
|
-
if (
|
|
21769
|
+
if ($.readyState === "ended")
|
|
21741
21770
|
clearTimeout(A), R(E);
|
|
21742
21771
|
else {
|
|
21743
|
-
const F =
|
|
21772
|
+
const F = $;
|
|
21744
21773
|
F.enabled = !0, this.handler.midTransceiverMap.set(H.mid, H);
|
|
21745
21774
|
const X = new HD(n(this, aa), {
|
|
21746
21775
|
id: r,
|
|
@@ -21870,7 +21899,7 @@ class FD {
|
|
|
21870
21899
|
return u(this, null, function* () {
|
|
21871
21900
|
return (yield n(this, Be).sendMessagePromise(
|
|
21872
21901
|
this.events.closeConsumer,
|
|
21873
|
-
|
|
21902
|
+
UR.toBinary(t)
|
|
21874
21903
|
)).payload;
|
|
21875
21904
|
});
|
|
21876
21905
|
}
|
|
@@ -21929,7 +21958,7 @@ class FD {
|
|
|
21929
21958
|
/**
|
|
21930
21959
|
* Does not use mediaEventSlugs is the same irrespective of the SFU
|
|
21931
21960
|
*/
|
|
21932
|
-
|
|
21961
|
+
U.kickAll,
|
|
21933
21962
|
If.toBinary(t)
|
|
21934
21963
|
);
|
|
21935
21964
|
});
|
|
@@ -21945,7 +21974,7 @@ class FD {
|
|
|
21945
21974
|
/**
|
|
21946
21975
|
* Does not use mediaEventSlugs is the same irrespective of the SFU
|
|
21947
21976
|
*/
|
|
21948
|
-
|
|
21977
|
+
U.kick,
|
|
21949
21978
|
Lf.toBinary(t)
|
|
21950
21979
|
);
|
|
21951
21980
|
});
|
|
@@ -22330,8 +22359,8 @@ class Vd extends ap {
|
|
|
22330
22359
|
S.encodings = r, yield d.sender.setParameters(S);
|
|
22331
22360
|
}
|
|
22332
22361
|
const l = (S, y) => {
|
|
22333
|
-
var
|
|
22334
|
-
const E = ss.parse(S), k = E.media[E.media.length - 1], R = k.rtp.filter((H) => y.some((F) => F.name === H.codec)), A = k.fmtp.filter((H) => R.some((F) => F.payload === H.payload)), x = (
|
|
22362
|
+
var $;
|
|
22363
|
+
const E = ss.parse(S), k = E.media[E.media.length - 1], R = k.rtp.filter((H) => y.some((F) => F.name === H.codec)), A = k.fmtp.filter((H) => R.some((F) => F.payload === H.payload)), x = ($ = k.rtcpFb) == null ? void 0 : $.filter((H) => R.some((F) => F.payload === H.payload)), O = R.map((H) => H.payload);
|
|
22335
22364
|
return E.media[E.media.length - 1].rtp = R, E.media[E.media.length - 1].fmtp = A, E.media[E.media.length - 1].rtcpFb = x, E.media[E.media.length - 1].payloads = O.join(" "), ss.write(E);
|
|
22336
22365
|
}, h = yield this.pc.createOffer();
|
|
22337
22366
|
if (h.sdp = l(h.sdp, i), this.logger.debug(`[SDP] send() | calling pc.setLocalDescription() [offer:${JSON.stringify(h)}]`), yield this.pc.setLocalDescription(h), e === "audio" || e.kind === "audio") {
|
|
@@ -22468,15 +22497,15 @@ function qD(s) {
|
|
|
22468
22497
|
}
|
|
22469
22498
|
s.warn("Device::this._detectDevice() | unknown device");
|
|
22470
22499
|
}
|
|
22471
|
-
var Js,
|
|
22500
|
+
var Js, Li;
|
|
22472
22501
|
class jD {
|
|
22473
22502
|
constructor(t, { handlerName: e, handlerFactory: r } = {}) {
|
|
22474
22503
|
// RTC handler factory.
|
|
22475
22504
|
p(this, "handlerFactory");
|
|
22476
22505
|
m(this, Js, void 0);
|
|
22477
|
-
m(this,
|
|
22506
|
+
m(this, Li, void 0);
|
|
22478
22507
|
const i = t.getValue("logger");
|
|
22479
|
-
if (i.debug("constructor()"), f(this, Js, t), f(this,
|
|
22508
|
+
if (i.debug("constructor()"), f(this, Js, t), f(this, Li, i), e && r)
|
|
22480
22509
|
throw new TypeError(
|
|
22481
22510
|
"just one of handlerName or handlerInterface can be given"
|
|
22482
22511
|
);
|
|
@@ -22484,9 +22513,9 @@ class jD {
|
|
|
22484
22513
|
this.handlerFactory = r;
|
|
22485
22514
|
else {
|
|
22486
22515
|
if (e)
|
|
22487
|
-
n(this,
|
|
22488
|
-
else if (e = qD(n(this,
|
|
22489
|
-
n(this,
|
|
22516
|
+
n(this, Li).debug(`Device::constructor() | handler given: ${e}`);
|
|
22517
|
+
else if (e = qD(n(this, Li)), e)
|
|
22518
|
+
n(this, Li).debug(`Device::constructor() | detected handler: ${e}`);
|
|
22490
22519
|
else
|
|
22491
22520
|
throw new Error("device not supported");
|
|
22492
22521
|
switch (e) {
|
|
@@ -22528,9 +22557,9 @@ class jD {
|
|
|
22528
22557
|
}));
|
|
22529
22558
|
}
|
|
22530
22559
|
}
|
|
22531
|
-
Js = new WeakMap(),
|
|
22560
|
+
Js = new WeakMap(), Li = new WeakMap();
|
|
22532
22561
|
const GD = 2e3;
|
|
22533
|
-
var oa, Fe, qe, nc, ac,
|
|
22562
|
+
var oa, Fe, qe, nc, ac, Vi, ca, oc, da, xi, Es, la, vd, cc, ch, nl, vS, dc, dh, al, TS, ol, yS, cl, ES, dl, PS, ll, _S, lc, lh, Hr, mn;
|
|
22534
22563
|
class WD extends mt.EventEmitter {
|
|
22535
22564
|
constructor(e, r) {
|
|
22536
22565
|
super();
|
|
@@ -22551,7 +22580,7 @@ class WD extends mt.EventEmitter {
|
|
|
22551
22580
|
m(this, qe, void 0);
|
|
22552
22581
|
m(this, nc, void 0);
|
|
22553
22582
|
m(this, ac, void 0);
|
|
22554
|
-
m(this,
|
|
22583
|
+
m(this, Vi, void 0);
|
|
22555
22584
|
m(this, ca, void 0);
|
|
22556
22585
|
m(this, oc, void 0);
|
|
22557
22586
|
m(this, da, {
|
|
@@ -22561,9 +22590,9 @@ class WD extends mt.EventEmitter {
|
|
|
22561
22590
|
},
|
|
22562
22591
|
lastConnectionTime: 0
|
|
22563
22592
|
});
|
|
22564
|
-
m(this,
|
|
22593
|
+
m(this, xi, void 0);
|
|
22565
22594
|
m(this, Es, "all");
|
|
22566
|
-
this.context = e, f(this,
|
|
22595
|
+
this.context = e, f(this, Vi, r), f(this, oa, new jD(e)), f(this, ca, new FD(r)), f(this, oc, hs), n(this, la, vd).mediaState = {
|
|
22567
22596
|
send: { state: wr.NEW },
|
|
22568
22597
|
recv: { state: wr.NEW }
|
|
22569
22598
|
}, wo(this.context, "forceRelay") && f(this, Es, "relay"), this.logger.info(`ICE Transport Policy initially set to ${n(this, Es)}`), D(this, cc, ch).call(this);
|
|
@@ -22583,7 +22612,7 @@ class WD extends mt.EventEmitter {
|
|
|
22583
22612
|
return this.context.getValue("logger");
|
|
22584
22613
|
}
|
|
22585
22614
|
get socket() {
|
|
22586
|
-
return n(this,
|
|
22615
|
+
return n(this, Vi);
|
|
22587
22616
|
}
|
|
22588
22617
|
get socketHandler() {
|
|
22589
22618
|
return n(this, ca);
|
|
@@ -22643,10 +22672,10 @@ class WD extends mt.EventEmitter {
|
|
|
22643
22672
|
throw new Error("Method not implemented.");
|
|
22644
22673
|
}
|
|
22645
22674
|
}
|
|
22646
|
-
oa = new WeakMap(), Fe = new WeakMap(), qe = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(),
|
|
22675
|
+
oa = new WeakMap(), Fe = new WeakMap(), qe = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(), Vi = new WeakMap(), ca = new WeakMap(), oc = new WeakMap(), da = new WeakMap(), xi = new WeakMap(), Es = new WeakMap(), la = new WeakSet(), vd = function() {
|
|
22647
22676
|
return this.context.getValue("connectionHandler");
|
|
22648
22677
|
}, cc = new WeakSet(), ch = function() {
|
|
22649
|
-
f(this,
|
|
22678
|
+
f(this, xi, {
|
|
22650
22679
|
send: void 0,
|
|
22651
22680
|
recv: void 0
|
|
22652
22681
|
});
|
|
@@ -22714,7 +22743,7 @@ oa = new WeakMap(), Fe = new WeakMap(), qe = new WeakMap(), nc = new WeakMap(),
|
|
|
22714
22743
|
const { id: r, direction: i } = e;
|
|
22715
22744
|
if (this.logger.info(`Connecting ${i} transport`, {
|
|
22716
22745
|
transport: { id: r, type: i }
|
|
22717
|
-
}), !n(this,
|
|
22746
|
+
}), !n(this, Vi).isConnected)
|
|
22718
22747
|
throw new Cr("Socket is not connected");
|
|
22719
22748
|
if (e.connectionState === "closed")
|
|
22720
22749
|
throw new Cr("Transport is closed");
|
|
@@ -22791,15 +22820,15 @@ oa = new WeakMap(), Fe = new WeakMap(), qe = new WeakMap(), nc = new WeakMap(),
|
|
|
22791
22820
|
}
|
|
22792
22821
|
);
|
|
22793
22822
|
const o = () => {
|
|
22794
|
-
const c = n(this,
|
|
22795
|
-
c !== void 0 && (clearTimeout(c), n(this,
|
|
22823
|
+
const c = n(this, xi)[r];
|
|
22824
|
+
c !== void 0 && (clearTimeout(c), n(this, xi)[r] = void 0);
|
|
22796
22825
|
};
|
|
22797
22826
|
switch (a) {
|
|
22798
22827
|
case "connected":
|
|
22799
22828
|
o(), n(this, da).lastConnectionTime = performance.now();
|
|
22800
22829
|
break;
|
|
22801
22830
|
case "disconnected":
|
|
22802
|
-
n(this,
|
|
22831
|
+
n(this, xi)[r] = setTimeout(() => u(this, null, function* () {
|
|
22803
22832
|
this.logger.warn(`${r} transport is in disconnected state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield D(this, lc, lh).call(this, e.direction);
|
|
22804
22833
|
}), GD);
|
|
22805
22834
|
break;
|
|
@@ -22835,7 +22864,7 @@ oa = new WeakMap(), Fe = new WeakMap(), qe = new WeakMap(), nc = new WeakMap(),
|
|
|
22835
22864
|
});
|
|
22836
22865
|
}, lc = new WeakSet(), lh = function(e) {
|
|
22837
22866
|
return u(this, null, function* () {
|
|
22838
|
-
switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: !0 }), n(this,
|
|
22867
|
+
switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: !0 }), n(this, Vi).isConnected && n(this, da).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, Es, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
|
|
22839
22868
|
case "send": {
|
|
22840
22869
|
this.logger.info("Transport reconnected", { transport: n(this, Fe) }), this.context.getValue("peerSessionStore").emit(C.RESET_PRODUCER_STATE);
|
|
22841
22870
|
break;
|
|
@@ -23050,7 +23079,7 @@ function KD(s) {
|
|
|
23050
23079
|
return {};
|
|
23051
23080
|
}
|
|
23052
23081
|
}
|
|
23053
|
-
var
|
|
23082
|
+
var $i, Br, ua, uc, Ps, hl, Ks, ha, hc, uh, pl, CS, gl, wS, ml, RS, fl, bS;
|
|
23054
23083
|
class zD extends WD {
|
|
23055
23084
|
constructor(e, r) {
|
|
23056
23085
|
super(e, r);
|
|
@@ -23059,7 +23088,7 @@ class zD extends WD {
|
|
|
23059
23088
|
m(this, gl);
|
|
23060
23089
|
m(this, ml);
|
|
23061
23090
|
m(this, fl);
|
|
23062
|
-
m(this,
|
|
23091
|
+
m(this, $i, void 0);
|
|
23063
23092
|
m(this, Br, void 0);
|
|
23064
23093
|
m(this, ua, void 0);
|
|
23065
23094
|
m(this, uc, void 0);
|
|
@@ -23087,7 +23116,7 @@ class zD extends WD {
|
|
|
23087
23116
|
return super.socketHandler;
|
|
23088
23117
|
}
|
|
23089
23118
|
get producers() {
|
|
23090
|
-
return n(this,
|
|
23119
|
+
return n(this, $i);
|
|
23091
23120
|
}
|
|
23092
23121
|
get consumers() {
|
|
23093
23122
|
return n(this, Br);
|
|
@@ -23103,7 +23132,7 @@ class zD extends WD {
|
|
|
23103
23132
|
return this.context.getValue("logger");
|
|
23104
23133
|
}
|
|
23105
23134
|
reset() {
|
|
23106
|
-
f(this,
|
|
23135
|
+
f(this, $i, /* @__PURE__ */ new Map()), f(this, Br, /* @__PURE__ */ new Map()), f(this, ua, /* @__PURE__ */ new Map());
|
|
23107
23136
|
}
|
|
23108
23137
|
createProducer(e, r) {
|
|
23109
23138
|
return u(this, null, function* () {
|
|
@@ -23138,7 +23167,7 @@ class zD extends WD {
|
|
|
23138
23167
|
});
|
|
23139
23168
|
}
|
|
23140
23169
|
closeAllProducers() {
|
|
23141
|
-
return Promise.all(Array.from(n(this,
|
|
23170
|
+
return Promise.all(Array.from(n(this, $i).entries()).map(([, e]) => e.close()));
|
|
23142
23171
|
}
|
|
23143
23172
|
createConsumer(e) {
|
|
23144
23173
|
return this.createConsumers([e]);
|
|
@@ -23168,7 +23197,7 @@ class zD extends WD {
|
|
|
23168
23197
|
});
|
|
23169
23198
|
}
|
|
23170
23199
|
}
|
|
23171
|
-
|
|
23200
|
+
$i = new WeakMap(), Br = new WeakMap(), ua = new WeakMap(), uc = new WeakMap(), Ps = new WeakMap(), hl = new WeakMap(), Ks = new WeakMap(), ha = new WeakMap(), hc = new WeakSet(), uh = function() {
|
|
23172
23201
|
return u(this, null, function* () {
|
|
23173
23202
|
if (!this.recvTransport || this.recvTransport.closed)
|
|
23174
23203
|
throw new Error("Recv transport is closed");
|
|
@@ -23240,7 +23269,7 @@ xi = new WeakMap(), Br = new WeakMap(), ua = new WeakMap(), uc = new WeakMap(),
|
|
|
23240
23269
|
this.producers.delete(e.id), r();
|
|
23241
23270
|
})), e.on("trackended", () => {
|
|
23242
23271
|
this.logger.info("producer::trackended", { producer: W(N({}, e), { status: "UNKNOWN" }) });
|
|
23243
|
-
}), n(this,
|
|
23272
|
+
}), n(this, $i).set(e.id, e);
|
|
23244
23273
|
}, ml = new WeakSet(), RS = function(e) {
|
|
23245
23274
|
return u(this, null, function* () {
|
|
23246
23275
|
try {
|
|
@@ -23265,7 +23294,7 @@ xi = new WeakMap(), Br = new WeakMap(), ua = new WeakMap(), uc = new WeakMap(),
|
|
|
23265
23294
|
peerId: e.peerId
|
|
23266
23295
|
});
|
|
23267
23296
|
};
|
|
23268
|
-
var pc, gc, mc, pa, ga, ma, fc, Sc, fa, vt, ds, ls, Ui,
|
|
23297
|
+
var pc, gc, mc, pa, ga, ma, fc, Sc, fa, vt, ds, ls, Ui, Hi, zs, vc, Sl, kS, vl, AS, Tl, IS, yl, MS;
|
|
23269
23298
|
const El = class {
|
|
23270
23299
|
constructor({
|
|
23271
23300
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -23304,7 +23333,7 @@ const El = class {
|
|
|
23304
23333
|
m(this, ds, void 0);
|
|
23305
23334
|
m(this, ls, !1);
|
|
23306
23335
|
m(this, Ui, 0);
|
|
23307
|
-
m(this,
|
|
23336
|
+
m(this, Hi, 0);
|
|
23308
23337
|
m(this, zs, []);
|
|
23309
23338
|
m(this, vc, void 0);
|
|
23310
23339
|
f(this, pa, t), f(this, vt, t), f(this, pc, e), f(this, gc, r), f(this, mc, i), f(this, ga, a), f(this, ma, o), f(this, fc, c), f(this, Sc, d), f(this, fa, l), f(this, vc, h), f(this, ds, t / 2);
|
|
@@ -23320,13 +23349,13 @@ const El = class {
|
|
|
23320
23349
|
processAudioChunk(t) {
|
|
23321
23350
|
var o, c;
|
|
23322
23351
|
const e = D(o = El, Tl, IS).call(o, t), r = D(c = El, yl, MS).call(c, t);
|
|
23323
|
-
return D(this, Sl, kS).call(this, e), e / n(this, ds) > n(this, fa) && e > n(this, vt) && r > n(this, pc) ? (f(this, Ui, n(this, Ui) + 1), f(this,
|
|
23352
|
+
return D(this, Sl, kS).call(this, e), e / n(this, ds) > n(this, fa) && e > n(this, vt) && r > n(this, pc) ? (f(this, Ui, n(this, Ui) + 1), f(this, Hi, n(this, mc)), n(this, Ui) >= n(this, gc) && f(this, ls, !0)) : (f(this, Ui, 0), n(this, Hi) > 0 ? f(this, Hi, n(this, Hi) - 1) : n(this, ls) && f(this, ls, !1), n(this, ls) || D(this, vl, AS).call(this, e)), { energy: e, isVoice: n(this, ls) };
|
|
23324
23353
|
}
|
|
23325
23354
|
/**
|
|
23326
23355
|
* Reset the detector state
|
|
23327
23356
|
*/
|
|
23328
23357
|
reset() {
|
|
23329
|
-
f(this, ls, !1), f(this, Ui, 0), f(this,
|
|
23358
|
+
f(this, ls, !1), f(this, Ui, 0), f(this, Hi, 0), f(this, vt, n(this, pa)), f(this, ds, n(this, pa) / 2), f(this, zs, []);
|
|
23330
23359
|
}
|
|
23331
23360
|
/**
|
|
23332
23361
|
* Get current adaptive threshold values for debugging/visualization
|
|
@@ -23340,7 +23369,7 @@ const El = class {
|
|
|
23340
23369
|
}
|
|
23341
23370
|
};
|
|
23342
23371
|
let so = El;
|
|
23343
|
-
pc = new WeakMap(), gc = new WeakMap(), mc = new WeakMap(), pa = new WeakMap(), ga = new WeakMap(), ma = new WeakMap(), fc = new WeakMap(), Sc = new WeakMap(), fa = new WeakMap(), vt = new WeakMap(), ds = new WeakMap(), ls = new WeakMap(), Ui = new WeakMap(),
|
|
23372
|
+
pc = new WeakMap(), gc = new WeakMap(), mc = new WeakMap(), pa = new WeakMap(), ga = new WeakMap(), ma = new WeakMap(), fc = new WeakMap(), Sc = new WeakMap(), fa = new WeakMap(), vt = new WeakMap(), ds = new WeakMap(), ls = new WeakMap(), Ui = new WeakMap(), Hi = new WeakMap(), zs = new WeakMap(), vc = new WeakMap(), Sl = new WeakSet(), kS = function(t) {
|
|
23344
23373
|
n(this, ls) ? f(this, vt, n(this, ma) * n(this, vt) + (1 - n(this, ma)) * t) : f(this, vt, n(this, ga) * n(this, vt) + (1 - n(this, ga)) * n(this, ds)), f(this, vt, Math.max(
|
|
23345
23374
|
n(this, fc),
|
|
23346
23375
|
Math.min(n(this, Sc), n(this, vt))
|
|
@@ -23439,7 +23468,7 @@ class DS {
|
|
|
23439
23468
|
}
|
|
23440
23469
|
}
|
|
23441
23470
|
const YD = 60, QD = 400;
|
|
23442
|
-
var Ys, Qs, Xs, Ec, Sa, va, Fr,
|
|
23471
|
+
var Ys, Qs, Xs, Ec, Sa, va, Fr, Bi, Ta, Fi, Zs, _s, Pc, hh, Pl, OS, _c, ph, Cc, gh, _l, NS;
|
|
23443
23472
|
const vo = class {
|
|
23444
23473
|
constructor(t, e) {
|
|
23445
23474
|
m(this, Pc);
|
|
@@ -23452,21 +23481,21 @@ const vo = class {
|
|
|
23452
23481
|
m(this, Sa, void 0);
|
|
23453
23482
|
m(this, va, void 0);
|
|
23454
23483
|
m(this, Fr, void 0);
|
|
23455
|
-
m(this, Hi, void 0);
|
|
23456
|
-
m(this, Ta, void 0);
|
|
23457
23484
|
m(this, Bi, void 0);
|
|
23485
|
+
m(this, Ta, void 0);
|
|
23486
|
+
m(this, Fi, void 0);
|
|
23458
23487
|
m(this, Zs, void 0);
|
|
23459
23488
|
m(this, _s, void 0);
|
|
23460
|
-
this.reportRequest = e, f(this,
|
|
23489
|
+
this.reportRequest = e, f(this, Fi, t), f(this, va, new so());
|
|
23461
23490
|
const { isReactNative: r } = navigator;
|
|
23462
|
-
f(this, Zs, r ? new Og(n(this,
|
|
23491
|
+
f(this, Zs, r ? new Og(n(this, Fi)) : new Ng(n(this, Fi))), f(this, _s, r ? DS : co);
|
|
23463
23492
|
}
|
|
23464
23493
|
/**
|
|
23465
23494
|
* @access private
|
|
23466
23495
|
* Not for external use
|
|
23467
23496
|
*/
|
|
23468
23497
|
get logger() {
|
|
23469
|
-
return n(this,
|
|
23498
|
+
return n(this, Fi).getValue("logger");
|
|
23470
23499
|
}
|
|
23471
23500
|
set producerId(t) {
|
|
23472
23501
|
f(this, Xs, t);
|
|
@@ -23492,7 +23521,7 @@ const vo = class {
|
|
|
23492
23521
|
}
|
|
23493
23522
|
};
|
|
23494
23523
|
let ro = vo;
|
|
23495
|
-
Ys = new WeakMap(), Qs = new WeakMap(), Xs = new WeakMap(), Ec = new WeakMap(), Sa = new WeakMap(), va = new WeakMap(), Fr = new WeakMap(),
|
|
23524
|
+
Ys = new WeakMap(), Qs = new WeakMap(), Xs = new WeakMap(), Ec = new WeakMap(), Sa = new WeakMap(), va = new WeakMap(), Fr = new WeakMap(), Bi = new WeakMap(), Ta = new WeakMap(), Fi = new WeakMap(), Zs = new WeakMap(), _s = new WeakMap(), Pc = new WeakSet(), hh = function() {
|
|
23496
23525
|
var i;
|
|
23497
23526
|
if (!n(this, Ec) || !n(this, Xs))
|
|
23498
23527
|
return;
|
|
@@ -23502,7 +23531,7 @@ Ys = new WeakMap(), Qs = new WeakMap(), Xs = new WeakMap(), Ec = new WeakMap(),
|
|
|
23502
23531
|
}, Pl = new WeakSet(), OS = function() {
|
|
23503
23532
|
var o;
|
|
23504
23533
|
const { samples: t } = n(this, Zs), { energy: e, isVoice: r } = n(this, va).processAudioChunk(t), i = D(o = vo, _l, NS).call(o, e);
|
|
23505
|
-
return i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, Fr) || i < n(this, Fr)) && f(this, Fr, i), (!n(this,
|
|
23534
|
+
return i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, Fr) || i < n(this, Fr)) && f(this, Fr, i), (!n(this, Bi) || i > n(this, Bi)) && f(this, Bi, i), { energy: (i - n(this, Fr)) / (n(this, Bi) - n(this, Fr)) * 10 || 0, isVoice: r });
|
|
23506
23535
|
}, _c = new WeakSet(), ph = function(t) {
|
|
23507
23536
|
return t < 5;
|
|
23508
23537
|
}, Cc = new WeakSet(), gh = function(t = n(this, Sa)) {
|
|
@@ -23523,7 +23552,7 @@ var XD = Object.defineProperty, ZD = Object.getOwnPropertyDescriptor, oe = (s, t
|
|
|
23523
23552
|
for (var i = r > 1 ? void 0 : r ? ZD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
23524
23553
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23525
23554
|
return r && i && XD(t, e, i), i;
|
|
23526
|
-
}, wc, Rc, st, q, Cl, ut,
|
|
23555
|
+
}, wc, Rc, st, q, Cl, ut, qi, ji, Gi, bc, Mt, er, ht, Tt, tr, ci, wl, LS, Rl, VS, bl, xS, kc, mh, kl, $S, Al, US, Xe, nt, Wi, io, Il, HS, Ml, BS, Dl, FS, Ol, qS;
|
|
23527
23556
|
class ne {
|
|
23528
23557
|
constructor(t, e) {
|
|
23529
23558
|
m(this, tr);
|
|
@@ -23555,7 +23584,7 @@ class ne {
|
|
|
23555
23584
|
*/
|
|
23556
23585
|
m(this, Al);
|
|
23557
23586
|
m(this, Xe);
|
|
23558
|
-
m(this,
|
|
23587
|
+
m(this, Wi);
|
|
23559
23588
|
m(this, Il);
|
|
23560
23589
|
m(this, Ml);
|
|
23561
23590
|
m(this, Dl);
|
|
@@ -23569,9 +23598,9 @@ class ne {
|
|
|
23569
23598
|
m(this, q, void 0);
|
|
23570
23599
|
m(this, Cl, void 0);
|
|
23571
23600
|
m(this, ut, void 0);
|
|
23572
|
-
m(this, Fi, void 0);
|
|
23573
23601
|
m(this, qi, void 0);
|
|
23574
23602
|
m(this, ji, void 0);
|
|
23603
|
+
m(this, Gi, void 0);
|
|
23575
23604
|
m(this, bc, void 0);
|
|
23576
23605
|
m(this, Mt, null);
|
|
23577
23606
|
m(this, er, void 0);
|
|
@@ -23582,12 +23611,12 @@ class ne {
|
|
|
23582
23611
|
const {
|
|
23583
23612
|
socket: r
|
|
23584
23613
|
} = e;
|
|
23585
|
-
this.mediaJoined = !1, f(this, st, r), f(this,
|
|
23614
|
+
this.mediaJoined = !1, f(this, st, r), f(this, qi, !1), f(this, q, new zD(t, r)), f(this, ut, n(this, q).events), f(this, er, /* @__PURE__ */ new Set()), f(this, ht, /* @__PURE__ */ new Map()), f(this, ji, !1), f(this, Gi, new nh(t.getValue("logger"))), f(this, Tt, new ro(
|
|
23586
23615
|
this.context,
|
|
23587
23616
|
n(this, q).socketHandler.audioActivity.bind(n(this, q).socketHandler)
|
|
23588
23617
|
)), this.e2ee = (a = (i = t.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? a : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, bc, Gh(
|
|
23589
23618
|
() => u(this, null, function* () {
|
|
23590
|
-
if (!n(this, tr,
|
|
23619
|
+
if (!n(this, tr, ci).mediaJoinAttempted)
|
|
23591
23620
|
return;
|
|
23592
23621
|
const { roomJoined: o } = yield this.joinRoom(
|
|
23593
23622
|
n(this, Rc),
|
|
@@ -23618,19 +23647,19 @@ class ne {
|
|
|
23618
23647
|
return this.context.getValue("logger");
|
|
23619
23648
|
}
|
|
23620
23649
|
get mediaJoined() {
|
|
23621
|
-
return n(this, tr,
|
|
23650
|
+
return n(this, tr, ci).mediaJoined;
|
|
23622
23651
|
}
|
|
23623
23652
|
set mediaJoined(t) {
|
|
23624
|
-
n(this, tr,
|
|
23653
|
+
n(this, tr, ci).mediaJoined = t;
|
|
23625
23654
|
}
|
|
23626
23655
|
reset({ resetTransportQueue: t }) {
|
|
23627
|
-
this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, q).closeAllProducers(), n(this, q).closeAllConsumers(), n(this, ht).clear(), n(this, er).clear(), f(this, Mt, null), t && n(this,
|
|
23656
|
+
this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, q).closeAllProducers(), n(this, q).closeAllConsumers(), n(this, ht).clear(), n(this, er).clear(), f(this, Mt, null), t && n(this, Gi).stop(), n(this, q).stopAllTransports(), n(this, q).reset(), t && f(this, Gi, new nh());
|
|
23628
23657
|
}
|
|
23629
23658
|
joinRoom(a, o) {
|
|
23630
23659
|
return u(this, arguments, function* (t, e, r = !1, i = {}) {
|
|
23631
|
-
n(this, tr,
|
|
23660
|
+
n(this, tr, ci).mediaJoinAttempted = !0, f(this, qi, !0);
|
|
23632
23661
|
try {
|
|
23633
|
-
return yield n(this,
|
|
23662
|
+
return yield n(this, Gi).push(
|
|
23634
23663
|
() => D(this, wl, LS).call(this, t, e, r, i),
|
|
23635
23664
|
"joinRoom"
|
|
23636
23665
|
);
|
|
@@ -23667,7 +23696,7 @@ class ne {
|
|
|
23667
23696
|
}
|
|
23668
23697
|
leaveRoom() {
|
|
23669
23698
|
return u(this, null, function* () {
|
|
23670
|
-
n(this, q).stopAllTransports(), f(this,
|
|
23699
|
+
n(this, q).stopAllTransports(), f(this, ji, !1), n(this, tr, ci).mediaJoinAttempted = !1;
|
|
23671
23700
|
const t = {
|
|
23672
23701
|
closeRoom: !1
|
|
23673
23702
|
};
|
|
@@ -23736,7 +23765,7 @@ class ne {
|
|
|
23736
23765
|
i,
|
|
23737
23766
|
d
|
|
23738
23767
|
);
|
|
23739
|
-
return D(this,
|
|
23768
|
+
return D(this, Wi, io).call(this, e, l.then((E) => E.id)), l.then((E) => E.track);
|
|
23740
23769
|
});
|
|
23741
23770
|
}
|
|
23742
23771
|
shareWebcam(t) {
|
|
@@ -23768,7 +23797,7 @@ class ne {
|
|
|
23768
23797
|
l,
|
|
23769
23798
|
h
|
|
23770
23799
|
);
|
|
23771
|
-
D(this,
|
|
23800
|
+
D(this, Wi, io).call(this, ye.SCREENSHARE_VIDEO, g.then((S) => S.id)), d.push(g);
|
|
23772
23801
|
}
|
|
23773
23802
|
if (r)
|
|
23774
23803
|
if (c && !c.closed)
|
|
@@ -23789,7 +23818,7 @@ class ne {
|
|
|
23789
23818
|
l,
|
|
23790
23819
|
h
|
|
23791
23820
|
);
|
|
23792
|
-
D(this,
|
|
23821
|
+
D(this, Wi, io).call(this, ye.SCREENSHARE_AUDIO, g.then((S) => S.id)), d.push(g);
|
|
23793
23822
|
}
|
|
23794
23823
|
yield Promise.all(d), this.context.getValue("callstats").screenShareStart();
|
|
23795
23824
|
});
|
|
@@ -23819,7 +23848,7 @@ class ne {
|
|
|
23819
23848
|
r,
|
|
23820
23849
|
i
|
|
23821
23850
|
);
|
|
23822
|
-
D(this,
|
|
23851
|
+
D(this, Wi, io).call(this, ye.MIC, a.then((o) => o.id)), yield a.then((o) => {
|
|
23823
23852
|
n(this, Tt) && (n(this, Tt).audioTrack = o.track, n(this, Tt).producerId = o.id, n(this, Tt).start());
|
|
23824
23853
|
});
|
|
23825
23854
|
} catch (e) {
|
|
@@ -24089,7 +24118,7 @@ class ne {
|
|
|
24089
24118
|
), n(this, st).on(n(this, ut).peerLeaveBroadcast, (e) => u(this, [e], function* ({ payload: t }) {
|
|
24090
24119
|
if (this.mediaJoined)
|
|
24091
24120
|
try {
|
|
24092
|
-
const { participantId: r } =
|
|
24121
|
+
const { participantId: r } = $u.fromBinary(t);
|
|
24093
24122
|
if (r === this.peerId)
|
|
24094
24123
|
return;
|
|
24095
24124
|
this.logger.info(`peer left broadcast:${r}`), n(this, er).delete(r), n(this, q).consumers.forEach(
|
|
@@ -24108,7 +24137,7 @@ class ne {
|
|
|
24108
24137
|
const {
|
|
24109
24138
|
participantId: e,
|
|
24110
24139
|
producerState: { producerId: r }
|
|
24111
|
-
} =
|
|
24140
|
+
} = Ub.fromBinary(t);
|
|
24112
24141
|
if (e === this.peerId)
|
|
24113
24142
|
return;
|
|
24114
24143
|
this.logger.info(`producer closed broadcast:${e}`), this.context.getValue("peerSessionStore").emit(C.PRODUCER_CLOSED, {
|
|
@@ -24136,7 +24165,7 @@ class ne {
|
|
|
24136
24165
|
), n(this, st).on(
|
|
24137
24166
|
n(this, ut).mediaRoomTerminationBroadcastResponse,
|
|
24138
24167
|
() => {
|
|
24139
|
-
!this.mediaJoined && !n(this,
|
|
24168
|
+
!this.mediaJoined && !n(this, qi) && !n(this, ji) || (this.logger.warn(
|
|
24140
24169
|
"media hub termination broadcast received, rejoining room"
|
|
24141
24170
|
), this.context.getValue("peerSessionStore").emit(C.ROOM_NODE_DISCONNECTED), n(this, bc).call(this));
|
|
24142
24171
|
}
|
|
@@ -24171,7 +24200,7 @@ class ne {
|
|
|
24171
24200
|
});
|
|
24172
24201
|
}
|
|
24173
24202
|
}
|
|
24174
|
-
wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), Cl = new WeakMap(), ut = new WeakMap(),
|
|
24203
|
+
wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), Cl = new WeakMap(), ut = new WeakMap(), qi = new WeakMap(), ji = new WeakMap(), Gi = new WeakMap(), bc = new WeakMap(), Mt = new WeakMap(), er = new WeakMap(), ht = new WeakMap(), Tt = new WeakMap(), tr = new WeakSet(), ci = function() {
|
|
24175
24204
|
return this.context.getValue("connectionHandler");
|
|
24176
24205
|
}, wl = new WeakSet(), LS = function(t, e, r, i) {
|
|
24177
24206
|
return u(this, null, function* () {
|
|
@@ -24179,7 +24208,7 @@ wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), C
|
|
|
24179
24208
|
f(this, Rc, t);
|
|
24180
24209
|
let a = !1;
|
|
24181
24210
|
if (r) {
|
|
24182
|
-
const { recv: c, send: d } = (o = n(this, tr,
|
|
24211
|
+
const { recv: c, send: d } = (o = n(this, tr, ci).mediaState) != null ? o : {};
|
|
24183
24212
|
(d == null ? void 0 : d.state) === wr.CONNECTED && (c == null ? void 0 : c.state) === wr.CONNECTED ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), f(this, Mt, null), a = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }));
|
|
24184
24213
|
}
|
|
24185
24214
|
try {
|
|
@@ -24197,7 +24226,7 @@ wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), C
|
|
|
24197
24226
|
try {
|
|
24198
24227
|
this.mediaJoined = !0;
|
|
24199
24228
|
const { roomState: t } = yield n(this, q).socketHandler.notifySelfJoinComplete();
|
|
24200
|
-
return f(this, wc, t.roomUuid), f(this,
|
|
24229
|
+
return f(this, wc, t.roomUuid), f(this, ji, !0), f(this, qi, !1), { joined: !0 };
|
|
24201
24230
|
} catch (t) {
|
|
24202
24231
|
return this.logger.error("Error completing room join", { error: t }), this.mediaJoined = !1, { joined: !1, error: t };
|
|
24203
24232
|
}
|
|
@@ -24228,16 +24257,16 @@ wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), C
|
|
|
24228
24257
|
}, kc = new WeakSet(), mh = function(t, e, r, i, a = !1) {
|
|
24229
24258
|
return u(this, null, function* () {
|
|
24230
24259
|
try {
|
|
24231
|
-
const o = D(this, kl,
|
|
24232
|
-
yield D(this, Al,
|
|
24260
|
+
const o = D(this, kl, $S).call(this);
|
|
24261
|
+
yield D(this, Al, US).call(this, t, e, r, o), a ? this.logger.info("MediaNodeClient: reusing existing transports on rejoin") : yield n(this, q).setupTransports({ send: !0, recv: !0 });
|
|
24233
24262
|
} catch (o) {
|
|
24234
24263
|
throw this.logger.error("Failed to initialize connection", { error: o }), o;
|
|
24235
24264
|
}
|
|
24236
24265
|
});
|
|
24237
|
-
}, kl = new WeakSet(),
|
|
24238
|
-
const t =
|
|
24266
|
+
}, kl = new WeakSet(), $S = function() {
|
|
24267
|
+
const t = $D("video/VP8");
|
|
24239
24268
|
return f(this, Cl, t), t;
|
|
24240
|
-
}, Al = new WeakSet(),
|
|
24269
|
+
}, Al = new WeakSet(), US = function(t, e, r, i) {
|
|
24241
24270
|
return u(this, null, function* () {
|
|
24242
24271
|
yield mS(
|
|
24243
24272
|
(a, o) => u(this, null, function* () {
|
|
@@ -24268,7 +24297,7 @@ wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), C
|
|
|
24268
24297
|
});
|
|
24269
24298
|
}, Xe = new WeakSet(), nt = function(t) {
|
|
24270
24299
|
return n(this, ht).get(t);
|
|
24271
|
-
},
|
|
24300
|
+
}, Wi = new WeakSet(), io = function(t, e) {
|
|
24272
24301
|
return n(this, ht).set(t, e);
|
|
24273
24302
|
}, Il = new WeakSet(), HS = function(t) {
|
|
24274
24303
|
return n(this, ht).delete(t);
|
|
@@ -24277,21 +24306,20 @@ wc = new WeakMap(), Rc = new WeakMap(), st = new WeakMap(), q = new WeakMap(), C
|
|
|
24277
24306
|
producerState: e,
|
|
24278
24307
|
producerHandoverFromPeerId: r
|
|
24279
24308
|
}) {
|
|
24280
|
-
var
|
|
24281
|
-
|
|
24282
|
-
|
|
24283
|
-
|
|
24284
|
-
|
|
24285
|
-
|
|
24286
|
-
}
|
|
24309
|
+
var a;
|
|
24310
|
+
if (this.logger.info(
|
|
24311
|
+
`producer created broadcast: ${t}, producer state: ${JSON.stringify(e)}.`
|
|
24312
|
+
), r) {
|
|
24313
|
+
this.logger.info("Producer handover received in peerProducerCreateBroadcast. Skipping event.");
|
|
24314
|
+
return;
|
|
24315
|
+
}
|
|
24316
|
+
if (t === this.peerId || !e)
|
|
24287
24317
|
return;
|
|
24288
|
-
const
|
|
24289
|
-
this.
|
|
24290
|
-
`producer created broadcast: ${t}, producer state: ${e}`
|
|
24291
|
-
), this.context.getValue("peerSessionStore").emit(C.NEW_PRODUCER, {
|
|
24318
|
+
const i = (a = e.mimeType) != null ? a : e.kind === or.AUDIO ? "audio/opus" : "video/VP8";
|
|
24319
|
+
this.context.getValue("peerSessionStore").emit(C.NEW_PRODUCER, {
|
|
24292
24320
|
peerId: t,
|
|
24293
24321
|
producer: W(N({}, e), {
|
|
24294
|
-
mimeType:
|
|
24322
|
+
mimeType: i,
|
|
24295
24323
|
kind: e.kind === or.AUDIO ? "audio" : "video",
|
|
24296
24324
|
producingPeerId: t
|
|
24297
24325
|
})
|
|
@@ -24612,17 +24640,17 @@ const GS = (im = class {
|
|
|
24612
24640
|
this.self.roomState !== "disconnected" && (this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" }));
|
|
24613
24641
|
}), n(this, te).getValue("peerSessionStore").on(C.SOCKET_SERVICE_FAILED, () => {
|
|
24614
24642
|
this.logger.error("Socket reconnection failed after exhausting all attempts. SDK re-initialization is required."), this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
|
|
24615
|
-
}), n(this, Yt).on(
|
|
24643
|
+
}), n(this, Yt).on(U.waitingRoomRequestAccepted, () => {
|
|
24616
24644
|
this.waitlistAcceptHandler();
|
|
24617
24645
|
}), n(this, Yt).on(hd.updateUserPreset, (s) => {
|
|
24618
24646
|
s.updatePeersPresets.forEach((t) => {
|
|
24619
24647
|
t.userIds === this.self.userId && n(this, te).getValue("peerSessionStore").emit(C.UPDATE_PERMISSIONS, t.patch);
|
|
24620
24648
|
});
|
|
24621
|
-
}), n(this, Yt).on(
|
|
24649
|
+
}), n(this, Yt).on(U.waitingRoomRequestDenied, () => {
|
|
24622
24650
|
this.waitlistRejectedHandler();
|
|
24623
|
-
}), n(this, Yt).on(
|
|
24651
|
+
}), n(this, Yt).on(U.kick, () => {
|
|
24624
24652
|
this.kickHandler({ kickType: "kick" });
|
|
24625
|
-
}), n(this, Yt).on(
|
|
24653
|
+
}), n(this, Yt).on(U.kickAll, () => {
|
|
24626
24654
|
this.kickHandler({ kickType: "kickAll" });
|
|
24627
24655
|
}), n(this, te).getValue("peerSessionStore").onAsync(C.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), n(this, te).getValue("peerSessionStore").on(
|
|
24628
24656
|
C.PRODUCER_SCORE_UPDATE,
|
|
@@ -24748,28 +24776,28 @@ const GS = (im = class {
|
|
|
24748
24776
|
}, Ac = new WeakMap(), Yt = new WeakMap(), te = new WeakMap(), yt = new WeakSet(), Ht = function() {
|
|
24749
24777
|
return n(this, te).getValue("roomNodeClient");
|
|
24750
24778
|
}, im);
|
|
24751
|
-
let
|
|
24779
|
+
let ni = GS;
|
|
24752
24780
|
ln([
|
|
24753
24781
|
P.trace("SelfController.resetSelf")
|
|
24754
|
-
],
|
|
24782
|
+
], ni.prototype, "resetSelf", 1);
|
|
24755
24783
|
ln([
|
|
24756
24784
|
P.trace("SelfController.setupEvents")
|
|
24757
|
-
],
|
|
24785
|
+
], ni.prototype, "setupEvents", 1);
|
|
24758
24786
|
ln([
|
|
24759
24787
|
P.trace("SelfController.joinRoom")
|
|
24760
|
-
],
|
|
24788
|
+
], ni.prototype, "joinRoom", 1);
|
|
24761
24789
|
ln([
|
|
24762
24790
|
P.trace("SelfController.leaveRoom")
|
|
24763
|
-
],
|
|
24791
|
+
], ni.prototype, "leaveRoom", 1);
|
|
24764
24792
|
ln([
|
|
24765
24793
|
P.trace("SelfController.joinMediaRoom")
|
|
24766
|
-
],
|
|
24794
|
+
], ni.prototype, "joinMediaRoom", 1);
|
|
24767
24795
|
ln([
|
|
24768
24796
|
P.trace("SelfController.leaveMediaRoom")
|
|
24769
|
-
],
|
|
24797
|
+
], ni.prototype, "leaveMediaRoom", 1);
|
|
24770
24798
|
ln([
|
|
24771
24799
|
P.trace("SelfController.init")
|
|
24772
|
-
],
|
|
24800
|
+
], ni, "init", 1);
|
|
24773
24801
|
var Ic;
|
|
24774
24802
|
class rO {
|
|
24775
24803
|
constructor(t) {
|
|
@@ -24778,8 +24806,8 @@ class rO {
|
|
|
24778
24806
|
}
|
|
24779
24807
|
on(t, e) {
|
|
24780
24808
|
let r;
|
|
24781
|
-
t ===
|
|
24782
|
-
if (t ===
|
|
24809
|
+
t === U.roomPeerCount ? r = gg.fromBinary.bind(gg) : r = Pg.fromBinary.bind(Pg), n(this, Ic).on(t, ({ payload: i }) => {
|
|
24810
|
+
if (t === U.roomPeerCount && !i)
|
|
24783
24811
|
return;
|
|
24784
24812
|
const a = r(i);
|
|
24785
24813
|
e(a);
|
|
@@ -24804,7 +24832,7 @@ class iO {
|
|
|
24804
24832
|
on(t, e) {
|
|
24805
24833
|
let r, i;
|
|
24806
24834
|
switch (t) {
|
|
24807
|
-
case
|
|
24835
|
+
case U.transcript: {
|
|
24808
24836
|
r = Su.fromBinary.bind(
|
|
24809
24837
|
Su
|
|
24810
24838
|
), i = Su.create();
|
|
@@ -24964,7 +24992,7 @@ class WS {
|
|
|
24964
24992
|
},
|
|
24965
24993
|
roomUuid: ""
|
|
24966
24994
|
}, r = this.socket.sendMessagePromise(
|
|
24967
|
-
|
|
24995
|
+
U.joinRoom,
|
|
24968
24996
|
fk.toBinary(e)
|
|
24969
24997
|
);
|
|
24970
24998
|
try {
|
|
@@ -24983,7 +25011,7 @@ class WS {
|
|
|
24983
25011
|
return u(this, null, function* () {
|
|
24984
25012
|
try {
|
|
24985
25013
|
return eA.fromBinary(
|
|
24986
|
-
(yield this.socket.sendMessagePromise(
|
|
25014
|
+
(yield this.socket.sendMessagePromise(U.getAllAddedParticipants)).payload
|
|
24987
25015
|
).participants.map(
|
|
24988
25016
|
(i) => {
|
|
24989
25017
|
var a = i, { id: e } = a, r = Zc(a, ["id"]);
|
|
@@ -25005,7 +25033,7 @@ class WS {
|
|
|
25005
25033
|
limit: e,
|
|
25006
25034
|
offset: r
|
|
25007
25035
|
}, o = yield this.socket.sendMessagePromise(
|
|
25008
|
-
|
|
25036
|
+
U.getRoomPeersInfo,
|
|
25009
25037
|
ak.toBinary(a)
|
|
25010
25038
|
);
|
|
25011
25039
|
i = vu.fromBinary(o.payload);
|
|
@@ -25020,7 +25048,7 @@ class WS {
|
|
|
25020
25048
|
let t;
|
|
25021
25049
|
try {
|
|
25022
25050
|
const e = yield this.socket.sendMessagePromise(
|
|
25023
|
-
|
|
25051
|
+
U.getRoomPeersInfo
|
|
25024
25052
|
);
|
|
25025
25053
|
t = vu.fromBinary(e.payload);
|
|
25026
25054
|
} catch (e) {
|
|
@@ -25038,7 +25066,7 @@ class WS {
|
|
|
25038
25066
|
let t;
|
|
25039
25067
|
try {
|
|
25040
25068
|
const e = yield this.socket.sendMessagePromise(
|
|
25041
|
-
|
|
25069
|
+
U.getRoomPeersInfo
|
|
25042
25070
|
);
|
|
25043
25071
|
t = vu.fromBinary(e.payload);
|
|
25044
25072
|
} catch (e) {
|
|
@@ -25052,7 +25080,7 @@ class WS {
|
|
|
25052
25080
|
let e;
|
|
25053
25081
|
try {
|
|
25054
25082
|
const r = yield this.socket.sendMessagePromise(
|
|
25055
|
-
|
|
25083
|
+
U.getPeerInfo,
|
|
25056
25084
|
Of.toBinary({ peerId: t })
|
|
25057
25085
|
);
|
|
25058
25086
|
e = hn.fromBinary(r.payload);
|
|
@@ -25066,7 +25094,7 @@ class WS {
|
|
|
25066
25094
|
return u(this, null, function* () {
|
|
25067
25095
|
let t = mg.create();
|
|
25068
25096
|
try {
|
|
25069
|
-
const e = yield this.socket.sendMessagePromise(
|
|
25097
|
+
const e = yield this.socket.sendMessagePromise(U.getRoomInfo);
|
|
25070
25098
|
t = mg.fromBinary(e.payload);
|
|
25071
25099
|
} catch (e) {
|
|
25072
25100
|
this.logger.error("getRoomState::binary_decode_error", { error: e });
|
|
@@ -25078,7 +25106,7 @@ class WS {
|
|
|
25078
25106
|
return u(this, null, function* () {
|
|
25079
25107
|
let t = Tg.create();
|
|
25080
25108
|
try {
|
|
25081
|
-
const e = yield this.socket.sendMessagePromise(
|
|
25109
|
+
const e = yield this.socket.sendMessagePromise(U.getRoomStageState);
|
|
25082
25110
|
t = Tg.fromBinary(e.payload);
|
|
25083
25111
|
} catch (e) {
|
|
25084
25112
|
this.logger.error("getRoomStageState::binary_decode_error", { error: e });
|
|
@@ -25096,7 +25124,7 @@ class WS {
|
|
|
25096
25124
|
// broadcast to all in all cases, this field has no value
|
|
25097
25125
|
};
|
|
25098
25126
|
return this.socket.sendMessagePromise(
|
|
25099
|
-
|
|
25127
|
+
U.broadcastMessage,
|
|
25100
25128
|
za.toBinary(r)
|
|
25101
25129
|
);
|
|
25102
25130
|
});
|
|
@@ -25113,7 +25141,7 @@ class WS {
|
|
|
25113
25141
|
// meetings
|
|
25114
25142
|
};
|
|
25115
25143
|
return this.socket.sendMessagePromise(
|
|
25116
|
-
|
|
25144
|
+
U.broadcastToEntity,
|
|
25117
25145
|
za.toBinary(i)
|
|
25118
25146
|
);
|
|
25119
25147
|
});
|
|
@@ -25130,7 +25158,7 @@ class WS {
|
|
|
25130
25158
|
// peers
|
|
25131
25159
|
};
|
|
25132
25160
|
return this.socket.sendMessage(
|
|
25133
|
-
|
|
25161
|
+
U.broadcastToEntity,
|
|
25134
25162
|
za.toBinary(i)
|
|
25135
25163
|
);
|
|
25136
25164
|
});
|
|
@@ -25146,7 +25174,7 @@ class WS {
|
|
|
25146
25174
|
}
|
|
25147
25175
|
};
|
|
25148
25176
|
return this.socket.sendMessage(
|
|
25149
|
-
|
|
25177
|
+
U.leaveRoom,
|
|
25150
25178
|
vk.toBinary(e)
|
|
25151
25179
|
);
|
|
25152
25180
|
}
|
|
@@ -25156,7 +25184,7 @@ class WS {
|
|
|
25156
25184
|
peerIds: [t]
|
|
25157
25185
|
};
|
|
25158
25186
|
this.socket.sendMessage(
|
|
25159
|
-
|
|
25187
|
+
U.kick,
|
|
25160
25188
|
Lf.toBinary(e)
|
|
25161
25189
|
);
|
|
25162
25190
|
});
|
|
@@ -25167,20 +25195,20 @@ class WS {
|
|
|
25167
25195
|
propagateKickAcrossRooms: t
|
|
25168
25196
|
};
|
|
25169
25197
|
this.socket.sendMessage(
|
|
25170
|
-
|
|
25198
|
+
U.kickAll,
|
|
25171
25199
|
If.toBinary(e)
|
|
25172
25200
|
);
|
|
25173
25201
|
});
|
|
25174
25202
|
}
|
|
25175
25203
|
getWaitingRoomRequests() {
|
|
25176
|
-
this.socket.sendMessage(
|
|
25204
|
+
this.socket.sendMessage(U.getWaitingRoomRequests);
|
|
25177
25205
|
}
|
|
25178
25206
|
acceptWaitingRoomRequest(t) {
|
|
25179
25207
|
const e = {
|
|
25180
25208
|
userIds: t
|
|
25181
25209
|
};
|
|
25182
25210
|
this.socket.sendMessage(
|
|
25183
|
-
|
|
25211
|
+
U.acceptWaitingRoomRequests,
|
|
25184
25212
|
aA.toBinary(e)
|
|
25185
25213
|
);
|
|
25186
25214
|
}
|
|
@@ -25189,7 +25217,7 @@ class WS {
|
|
|
25189
25217
|
userIds: t
|
|
25190
25218
|
};
|
|
25191
25219
|
this.socket.sendMessage(
|
|
25192
|
-
|
|
25220
|
+
U.denyWaitingRoomRequests,
|
|
25193
25221
|
cA.toBinary(e)
|
|
25194
25222
|
);
|
|
25195
25223
|
}
|
|
@@ -25210,7 +25238,7 @@ class WS {
|
|
|
25210
25238
|
});
|
|
25211
25239
|
}
|
|
25212
25240
|
handleSocketEvents() {
|
|
25213
|
-
this.socket.on(
|
|
25241
|
+
this.socket.on(U.broadcastMessage, ({ payload: t }) => {
|
|
25214
25242
|
try {
|
|
25215
25243
|
const e = za.fromBinary(t);
|
|
25216
25244
|
n(this, Dt).getValue("peerSessionStore").emit(C.ROOM_MESSAGE, {
|
|
@@ -25221,7 +25249,7 @@ class WS {
|
|
|
25221
25249
|
} catch (e) {
|
|
25222
25250
|
this.logger.error("failed to decode broadcast message:", e);
|
|
25223
25251
|
}
|
|
25224
|
-
}), this.socket.on(
|
|
25252
|
+
}), this.socket.on(U.broadcastToEntity, ({ payload: t }) => {
|
|
25225
25253
|
try {
|
|
25226
25254
|
const e = za.fromBinary(t);
|
|
25227
25255
|
n(this, Dt).getValue("peerSessionStore").emit(C.MESSAGE, {
|
|
@@ -25237,20 +25265,20 @@ class WS {
|
|
|
25237
25265
|
on(t, e) {
|
|
25238
25266
|
let r, i;
|
|
25239
25267
|
switch (t) {
|
|
25240
|
-
case
|
|
25241
|
-
case
|
|
25242
|
-
case
|
|
25243
|
-
case
|
|
25268
|
+
case U.joinRoom:
|
|
25269
|
+
case U.leaveRoom:
|
|
25270
|
+
case U.kick:
|
|
25271
|
+
case U.kickAll: {
|
|
25244
25272
|
r = hn.fromBinary.bind(hn), i = hn.create();
|
|
25245
25273
|
break;
|
|
25246
25274
|
}
|
|
25247
|
-
case
|
|
25275
|
+
case U.getWaitingRoomRequests: {
|
|
25248
25276
|
r = (a, o) => a ? vg.fromBinary(a, o) : { requests: [] }, i = vg.create();
|
|
25249
25277
|
break;
|
|
25250
25278
|
}
|
|
25251
|
-
case
|
|
25252
|
-
case
|
|
25253
|
-
case
|
|
25279
|
+
case U.recordingPaused:
|
|
25280
|
+
case U.recordingStarted:
|
|
25281
|
+
case U.recordingStopped: {
|
|
25254
25282
|
r = wg.fromBinary.bind(wg);
|
|
25255
25283
|
break;
|
|
25256
25284
|
}
|
|
@@ -25285,7 +25313,7 @@ class WS {
|
|
|
25285
25313
|
}
|
|
25286
25314
|
case hs.leaveRoom:
|
|
25287
25315
|
case _r.leaveRoom: {
|
|
25288
|
-
r =
|
|
25316
|
+
r = $u.fromBinary.bind($u);
|
|
25289
25317
|
break;
|
|
25290
25318
|
}
|
|
25291
25319
|
}
|
|
@@ -25333,16 +25361,16 @@ class lO {
|
|
|
25333
25361
|
getStageRequests() {
|
|
25334
25362
|
return u(this, null, function* () {
|
|
25335
25363
|
const { payload: t } = yield n(this, Et).sendMessagePromise(
|
|
25336
|
-
|
|
25364
|
+
U.getStageRequests
|
|
25337
25365
|
);
|
|
25338
25366
|
return t ? Pu.fromBinary(t) : { stageRequests: [] };
|
|
25339
25367
|
});
|
|
25340
25368
|
}
|
|
25341
25369
|
requestAccess() {
|
|
25342
|
-
n(this, Et).sendMessage(
|
|
25370
|
+
n(this, Et).sendMessage(U.requestStageAccess);
|
|
25343
25371
|
}
|
|
25344
25372
|
cancelRequestAccess() {
|
|
25345
|
-
n(this, Et).sendMessage(
|
|
25373
|
+
n(this, Et).sendMessage(U.cancelStageRequest);
|
|
25346
25374
|
}
|
|
25347
25375
|
grantAccess(t) {
|
|
25348
25376
|
return u(this, null, function* () {
|
|
@@ -25350,7 +25378,7 @@ class lO {
|
|
|
25350
25378
|
userIds: t
|
|
25351
25379
|
};
|
|
25352
25380
|
n(this, Et).sendMessage(
|
|
25353
|
-
|
|
25381
|
+
U.grantStageAccess,
|
|
25354
25382
|
a0.toBinary(e)
|
|
25355
25383
|
);
|
|
25356
25384
|
});
|
|
@@ -25361,17 +25389,17 @@ class lO {
|
|
|
25361
25389
|
userIds: t
|
|
25362
25390
|
};
|
|
25363
25391
|
n(this, Et).sendMessage(
|
|
25364
|
-
|
|
25392
|
+
U.denyStageAccess,
|
|
25365
25393
|
c0.toBinary(e)
|
|
25366
25394
|
);
|
|
25367
25395
|
});
|
|
25368
25396
|
}
|
|
25369
25397
|
joinStage() {
|
|
25370
25398
|
return n(this, Et).sendMessagePromise(
|
|
25371
|
-
|
|
25399
|
+
U.joinStage,
|
|
25372
25400
|
void 0,
|
|
25373
25401
|
void 0,
|
|
25374
|
-
|
|
25402
|
+
U.peerStageStatusUpdate
|
|
25375
25403
|
);
|
|
25376
25404
|
}
|
|
25377
25405
|
leaveStage(t) {
|
|
@@ -25379,10 +25407,10 @@ class lO {
|
|
|
25379
25407
|
userIds: [t]
|
|
25380
25408
|
};
|
|
25381
25409
|
return n(this, Et).sendMessagePromise(
|
|
25382
|
-
|
|
25410
|
+
U.leaveStage,
|
|
25383
25411
|
Cg.toBinary(e),
|
|
25384
25412
|
void 0,
|
|
25385
|
-
|
|
25413
|
+
U.peerStageStatusUpdate
|
|
25386
25414
|
);
|
|
25387
25415
|
}
|
|
25388
25416
|
kick(t) {
|
|
@@ -25390,33 +25418,33 @@ class lO {
|
|
|
25390
25418
|
userIds: t
|
|
25391
25419
|
};
|
|
25392
25420
|
return n(this, Et).sendMessagePromise(
|
|
25393
|
-
|
|
25421
|
+
U.leaveStage,
|
|
25394
25422
|
Cg.toBinary(e)
|
|
25395
25423
|
);
|
|
25396
25424
|
}
|
|
25397
25425
|
on(t, e) {
|
|
25398
25426
|
let r;
|
|
25399
25427
|
switch (t) {
|
|
25400
|
-
case
|
|
25401
|
-
case
|
|
25428
|
+
case U.grantStageAccess:
|
|
25429
|
+
case U.denyStageAccess: {
|
|
25402
25430
|
r = void 0;
|
|
25403
25431
|
break;
|
|
25404
25432
|
}
|
|
25405
|
-
case
|
|
25433
|
+
case U.getStagePeers: {
|
|
25406
25434
|
r = _g.fromBinary.bind(
|
|
25407
25435
|
_g
|
|
25408
25436
|
);
|
|
25409
25437
|
break;
|
|
25410
25438
|
}
|
|
25411
|
-
case
|
|
25412
|
-
case
|
|
25413
|
-
case
|
|
25439
|
+
case U.getStageRequests:
|
|
25440
|
+
case U.requestStageAccess:
|
|
25441
|
+
case U.cancelStageRequest: {
|
|
25414
25442
|
r = Pu.fromBinary.bind(
|
|
25415
25443
|
Pu
|
|
25416
25444
|
);
|
|
25417
25445
|
break;
|
|
25418
25446
|
}
|
|
25419
|
-
case
|
|
25447
|
+
case U.peerStageStatusUpdate: {
|
|
25420
25448
|
r = pg.fromBinary.bind(pg);
|
|
25421
25449
|
break;
|
|
25422
25450
|
}
|
|
@@ -25431,7 +25459,7 @@ class lO {
|
|
|
25431
25459
|
getPeerInfo(t) {
|
|
25432
25460
|
return u(this, null, function* () {
|
|
25433
25461
|
const e = yield n(this, Et).sendMessagePromise(
|
|
25434
|
-
|
|
25462
|
+
U.getPeerInfo,
|
|
25435
25463
|
Of.toBinary({ peerId: t })
|
|
25436
25464
|
);
|
|
25437
25465
|
return hn.fromBinary(e.payload);
|
|
@@ -25827,34 +25855,34 @@ const Sr = {
|
|
|
25827
25855
|
warn: 2,
|
|
25828
25856
|
error: 3
|
|
25829
25857
|
};
|
|
25830
|
-
var
|
|
25858
|
+
var di, li;
|
|
25831
25859
|
class wO {
|
|
25832
25860
|
constructor(t) {
|
|
25833
|
-
ce(this,
|
|
25861
|
+
ce(this, di, void 0), ce(this, li, void 0), re(this, di, console), re(this, li, t);
|
|
25834
25862
|
}
|
|
25835
25863
|
debug(...t) {
|
|
25836
|
-
Sr[M(this,
|
|
25864
|
+
Sr[M(this, li)] > Sr.debug || M(this, di).debug("[Sockrates]:", ...t);
|
|
25837
25865
|
}
|
|
25838
25866
|
info(...t) {
|
|
25839
|
-
Sr[M(this,
|
|
25867
|
+
Sr[M(this, li)] > Sr.info || M(this, di).info("[Sockrates]:", ...t);
|
|
25840
25868
|
}
|
|
25841
25869
|
warn(...t) {
|
|
25842
|
-
Sr[M(this,
|
|
25870
|
+
Sr[M(this, li)] > Sr.warn || M(this, di).warn("[Sockrates]:", ...t);
|
|
25843
25871
|
}
|
|
25844
25872
|
error(...t) {
|
|
25845
|
-
Sr[M(this,
|
|
25873
|
+
Sr[M(this, li)] > Sr.error || M(this, di).error("[Sockrates]:", ...t);
|
|
25846
25874
|
}
|
|
25847
25875
|
}
|
|
25848
|
-
|
|
25876
|
+
di = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap();
|
|
25849
25877
|
var sv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(sv || {});
|
|
25850
|
-
const
|
|
25851
|
-
var ke, fn, de, Pe, Pr, We, ir,
|
|
25878
|
+
const $g = "2", Ug = "3";
|
|
25879
|
+
var ke, fn, de, Pe, Pr, We, ir, Qr, us, Sn, vn, Ns, fh, rv, no, yd, Sh, iv, Ed, Ru, $d, vh, Th, nv, po, Pd, Cn, go, Ud, yh, wn, mo, Eh, av, fo, _d, So, Hd;
|
|
25852
25880
|
class RO {
|
|
25853
25881
|
constructor(t, e) {
|
|
25854
|
-
var E, k, R, A, x, O,
|
|
25855
|
-
ce(this, fh), ce(this, no), ce(this, Sh), ce(this, Ed), ce(this,
|
|
25882
|
+
var E, k, R, A, x, O, $, H, F, X, ee, Ke;
|
|
25883
|
+
ce(this, fh), ce(this, no), ce(this, Sh), ce(this, Ed), ce(this, $d), ce(this, Th), ce(this, po), ce(this, Cn), ce(this, Ud), ce(this, wn), ce(this, Eh), ce(this, fo), ce(this, So), ce(this, ke, void 0), ce(this, fn, void 0), ce(this, de, void 0), ce(this, Pe, void 0), ce(this, Pr, void 0), ce(this, We, void 0), ce(this, ir, void 0), ce(this, Qr, void 0), ce(this, us, void 0), ce(this, Sn, void 0), ce(this, vn, void 0), ce(this, Ns, void 0);
|
|
25856
25884
|
var r, i, a, o, c, d, l, h, g, S, y;
|
|
25857
|
-
re(this, fn, t), re(this, Pr, []), re(this, We, new xd()), re(this, ir, !0), re(this, us, !1), re(this, de, e != null ? e : {}), (E = (r = M(this, de)).autoReconnect) != null || (r.autoReconnect = !0), (k = (i = M(this, de)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (R = (a = M(this, de)).pingTimeout) != null || (a.pingTimeout = 3e4), (A = (o = M(this, de)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (x = (c = M(this, de)).debug) != null || (c.debug = !0), (O = (d = M(this, de)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (
|
|
25885
|
+
re(this, fn, t), re(this, Pr, []), re(this, We, new xd()), re(this, ir, !0), re(this, us, !1), re(this, de, e != null ? e : {}), (E = (r = M(this, de)).autoReconnect) != null || (r.autoReconnect = !0), (k = (i = M(this, de)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (R = (a = M(this, de)).pingTimeout) != null || (a.pingTimeout = 3e4), (A = (o = M(this, de)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (x = (c = M(this, de)).debug) != null || (c.debug = !0), (O = (d = M(this, de)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), ($ = (l = M(this, de)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (H = (h = M(this, de)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (F = (g = M(this, de)).flushOnReconnect) != null || (g.flushOnReconnect = !1), (X = (S = M(this, de)).clientInitiatedPings) != null || (S.clientInitiatedPings = !1), (ee = (y = M(this, de)).clientInitiatedPingInterval) != null || (y.clientInitiatedPingInterval = 3e4), re(this, Qr, {
|
|
25858
25886
|
code: void 0,
|
|
25859
25887
|
reason: void 0
|
|
25860
25888
|
}), re(this, Pe, (Ke = M(this, de).logger) != null ? Ke : new wO(M(this, de).debug ? "debug" : "info")), re(this, Ns, new CO());
|
|
@@ -25925,7 +25953,7 @@ class RO {
|
|
|
25925
25953
|
), ie(this, po, Pd).call(this)), r(new Error("Connection timed out!"));
|
|
25926
25954
|
}, M(this, de).connectionTimeout);
|
|
25927
25955
|
M(this, ke).onopen = () => {
|
|
25928
|
-
M(this, Pe).debug(`Ready State: ${sv[M(this, ke).readyState]}`), i && clearTimeout(i), ie(this,
|
|
25956
|
+
M(this, Pe).debug(`Ready State: ${sv[M(this, ke).readyState]}`), i && clearTimeout(i), ie(this, Ud, yh).call(this), ie(this, Eh, av).call(this), re(this, Qr, {
|
|
25929
25957
|
code: void 0,
|
|
25930
25958
|
reason: void 0
|
|
25931
25959
|
}), M(this, We).emit(
|
|
@@ -25936,7 +25964,7 @@ class RO {
|
|
|
25936
25964
|
try {
|
|
25937
25965
|
i && clearTimeout(i);
|
|
25938
25966
|
const { code: o, reason: c } = a;
|
|
25939
|
-
r(c), M(this, Pe).debug("Socket closed. Close event:", { event: a }), M(this, Pe).debug(`Connection closed code: ${o}`), M(this, Pe).debug(`Connection closed reason: ${c}`), M(this, us) || ie(this,
|
|
25967
|
+
r(c), M(this, Pe).debug("Socket closed. Close event:", { event: a }), M(this, Pe).debug(`Connection closed code: ${o}`), M(this, Pe).debug(`Connection closed reason: ${c}`), M(this, us) || ie(this, $d, vh).call(this, o, c);
|
|
25940
25968
|
} catch (o) {
|
|
25941
25969
|
ie(this, no, yd).call(this, o);
|
|
25942
25970
|
}
|
|
@@ -26024,13 +26052,13 @@ class RO {
|
|
|
26024
26052
|
* Disconnect the socket.
|
|
26025
26053
|
*/
|
|
26026
26054
|
disconnect() {
|
|
26027
|
-
re(this, ir, !1), ie(this, wn, mo).call(this), ie(this, fo, _d).call(this), this.removeAllListeners(), re(this,
|
|
26055
|
+
re(this, ir, !1), ie(this, wn, mo).call(this), ie(this, fo, _d).call(this), this.removeAllListeners(), re(this, Qr, {
|
|
26028
26056
|
code: 1e3,
|
|
26029
26057
|
reason: "Sockrates disconnect method called"
|
|
26030
26058
|
}), M(this, ke).close(1e3, "Sockrates disconnect method called.");
|
|
26031
26059
|
}
|
|
26032
26060
|
}
|
|
26033
|
-
ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(),
|
|
26061
|
+
ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), fh = /* @__PURE__ */ new WeakSet(), rv = function(s) {
|
|
26034
26062
|
if (s.startsWith("ws://") || s.startsWith("wss://"))
|
|
26035
26063
|
return s;
|
|
26036
26064
|
if (s.startsWith("https://"))
|
|
@@ -26041,11 +26069,11 @@ ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /*
|
|
|
26041
26069
|
}, no = /* @__PURE__ */ new WeakSet(), yd = function(s, t) {
|
|
26042
26070
|
M(this, Pe).error("Error:", { error: s }), M(this, We).emit("errored", { error: s }), t == null || t(s);
|
|
26043
26071
|
}, Sh = /* @__PURE__ */ new WeakSet(), iv = function(s) {
|
|
26044
|
-
if (ie(this,
|
|
26045
|
-
M(this, Pe).debug("Received ping from server"), ie(this, Cn, go).call(this,
|
|
26072
|
+
if (ie(this, Ud, yh).call(this), s.data === $g) {
|
|
26073
|
+
M(this, Pe).debug("Received ping from server"), ie(this, Cn, go).call(this, Ug);
|
|
26046
26074
|
return;
|
|
26047
26075
|
}
|
|
26048
|
-
if (s.data ===
|
|
26076
|
+
if (s.data === Ug) {
|
|
26049
26077
|
M(this, Pe).debug("Received pong from server");
|
|
26050
26078
|
return;
|
|
26051
26079
|
}
|
|
@@ -26053,10 +26081,10 @@ ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /*
|
|
|
26053
26081
|
M(this, Pe).debug("Received message", { event: t.event, messageID: e }), M(this, We).emit(t.event.toString(), { id: e, payload: r });
|
|
26054
26082
|
}, Ed = /* @__PURE__ */ new WeakSet(), Ru = function() {
|
|
26055
26083
|
return M(this, ke).readyState === 1;
|
|
26056
|
-
},
|
|
26057
|
-
re(this,
|
|
26084
|
+
}, $d = /* @__PURE__ */ new WeakSet(), vh = function(s, t) {
|
|
26085
|
+
re(this, Qr, { reason: t, code: s }), M(this, We).emit("disconnected", { code: s, reason: t });
|
|
26058
26086
|
}, Th = /* @__PURE__ */ new WeakSet(), nv = function() {
|
|
26059
|
-
const { reason: s, code: t } = M(this,
|
|
26087
|
+
const { reason: s, code: t } = M(this, Qr);
|
|
26060
26088
|
t && t !== 1e3 && M(this, ir) && M(this, de).autoReconnect && !M(this, us) && (M(this, Pe).debug(`Triggering reconnection due to ${s}.`), M(this, We).emit(
|
|
26061
26089
|
"reconnecting"
|
|
26062
26090
|
/* reconnecting */
|
|
@@ -26080,7 +26108,7 @@ ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /*
|
|
|
26080
26108
|
return;
|
|
26081
26109
|
if (M(this, Pe).debug(`Reconnection attempt ${M(this, Ns).getAttempts()}`), M(this, We).emit("reconnectAttempt", { attempt: M(this, Ns).getAttempts() }), yield this.connect(), !ie(this, Ed, Ru).call(this))
|
|
26082
26110
|
throw Error("Reconnect Failed");
|
|
26083
|
-
re(this, us, !1), re(this,
|
|
26111
|
+
re(this, us, !1), re(this, Qr, {
|
|
26084
26112
|
code: void 0,
|
|
26085
26113
|
reason: void 0
|
|
26086
26114
|
}), M(this, We).emit(
|
|
@@ -26097,18 +26125,18 @@ ke = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), de = /*
|
|
|
26097
26125
|
} catch (t) {
|
|
26098
26126
|
return M(this, Pe).error(t.message), !1;
|
|
26099
26127
|
}
|
|
26100
|
-
},
|
|
26128
|
+
}, Ud = /* @__PURE__ */ new WeakSet(), yh = function() {
|
|
26101
26129
|
this.config.disconnectOnPingTimeout && (M(this, Pe).debug("Resetting ping timeout"), ie(this, wn, mo).call(this), re(this, Sn, setTimeout(() => {
|
|
26102
26130
|
var s;
|
|
26103
26131
|
M(this, Pe).debug("Disconnecting the socket due to ping timeout"), re(this, ir, !0);
|
|
26104
26132
|
const t = 3002, e = "Ping timeout";
|
|
26105
|
-
(s = M(this, ke)) == null || s.close(t, e), ie(this,
|
|
26133
|
+
(s = M(this, ke)) == null || s.close(t, e), ie(this, $d, vh).call(this, t, e);
|
|
26106
26134
|
}, M(this, de).pingTimeout)));
|
|
26107
26135
|
}, wn = /* @__PURE__ */ new WeakSet(), mo = function() {
|
|
26108
26136
|
M(this, Sn) && (clearTimeout(M(this, Sn)), re(this, Sn, void 0));
|
|
26109
26137
|
}, Eh = /* @__PURE__ */ new WeakSet(), av = function() {
|
|
26110
26138
|
ie(this, fo, _d).call(this), M(this, de).clientInitiatedPings && re(this, vn, setInterval(() => {
|
|
26111
|
-
ie(this, Ed, Ru).call(this) && (M(this, Pe).debug("Sending client-initiated ping"), ie(this, Cn, go).call(this,
|
|
26139
|
+
ie(this, Ed, Ru).call(this) && (M(this, Pe).debug("Sending client-initiated ping"), ie(this, Cn, go).call(this, $g));
|
|
26112
26140
|
}, M(this, de).clientInitiatedPingInterval));
|
|
26113
26141
|
}, fo = /* @__PURE__ */ new WeakSet(), _d = function() {
|
|
26114
26142
|
M(this, vn) && (clearInterval(M(this, vn)), re(this, vn, void 0));
|
|
@@ -26124,7 +26152,7 @@ function bO(s, t) {
|
|
|
26124
26152
|
const { meetingId: e, orgId: r, participantId: i } = JSON.parse(atob(s.split(".")[1]));
|
|
26125
26153
|
if (!e)
|
|
26126
26154
|
throw Error(`Received V1 auth token ${s}`);
|
|
26127
|
-
let a =
|
|
26155
|
+
let a = hi.baseURI.prod;
|
|
26128
26156
|
t && (a = t);
|
|
26129
26157
|
const o = `https://${Id({ servicePrefix: "api", baseURI: a })}`;
|
|
26130
26158
|
return {
|
|
@@ -26144,7 +26172,7 @@ var kO = Object.defineProperty, AO = Object.getOwnPropertyDescriptor, nu = (s, t
|
|
|
26144
26172
|
return r && i && kO(t, e, i), i;
|
|
26145
26173
|
};
|
|
26146
26174
|
const Hg = 65535, IO = 3, MO = 15e3, DO = 8e3, OO = 50, NO = 1e3, LO = 1e4;
|
|
26147
|
-
var Cs, Pa, Ee, je, et,
|
|
26175
|
+
var Cs, Pa, Ee, je, et, jr, Gr, Ji, Ki, Wr, ws, Rs, Jr, zi, pt, Kr, gt, Ve, Oc, Ph, Nl, dv, Ll, lv, Vl, uv, Nc, _h, Lc, Ch, Yi, ao, xl, bu, hv, $l, pv, Vc, wh, xc, Rh, $c, bh, Ul, gv, Uc, kh, Hc, Ah;
|
|
26148
26176
|
const cv = (bu = class {
|
|
26149
26177
|
constructor(s, {
|
|
26150
26178
|
peerId: t,
|
|
@@ -26160,12 +26188,12 @@ const cv = (bu = class {
|
|
|
26160
26188
|
m(this, Nc);
|
|
26161
26189
|
m(this, Lc);
|
|
26162
26190
|
m(this, Yi);
|
|
26163
|
-
m(this,
|
|
26191
|
+
m(this, $l);
|
|
26164
26192
|
m(this, Vc);
|
|
26165
26193
|
m(this, xc);
|
|
26166
|
-
m(this, Uc);
|
|
26167
|
-
m(this, $l);
|
|
26168
26194
|
m(this, $c);
|
|
26195
|
+
m(this, Ul);
|
|
26196
|
+
m(this, Uc);
|
|
26169
26197
|
m(this, Hc);
|
|
26170
26198
|
m(this, Cs, void 0);
|
|
26171
26199
|
m(this, Pa, void 0);
|
|
@@ -26173,17 +26201,17 @@ const cv = (bu = class {
|
|
|
26173
26201
|
p(this, "roomName");
|
|
26174
26202
|
p(this, "authToken");
|
|
26175
26203
|
p(this, "capabilities");
|
|
26176
|
-
m(this,
|
|
26177
|
-
m(this,
|
|
26204
|
+
m(this, jr, []);
|
|
26205
|
+
m(this, Gr, void 0);
|
|
26178
26206
|
m(this, Ji, !1);
|
|
26179
26207
|
m(this, Ki, void 0);
|
|
26180
|
-
m(this,
|
|
26208
|
+
m(this, Wr, void 0);
|
|
26181
26209
|
m(this, ws, void 0);
|
|
26182
26210
|
m(this, Rs, void 0);
|
|
26183
|
-
m(this,
|
|
26211
|
+
m(this, Jr, void 0);
|
|
26184
26212
|
m(this, zi, void 0);
|
|
26185
26213
|
m(this, pt, 0);
|
|
26186
|
-
m(this,
|
|
26214
|
+
m(this, Kr, void 0);
|
|
26187
26215
|
m(this, gt, !0);
|
|
26188
26216
|
m(this, Ve, void 0);
|
|
26189
26217
|
if (!t || !e || !r)
|
|
@@ -26224,13 +26252,16 @@ const cv = (bu = class {
|
|
|
26224
26252
|
get peerId() {
|
|
26225
26253
|
return n(this, Ve).getValue("peerId");
|
|
26226
26254
|
}
|
|
26255
|
+
get replacedPeerIds() {
|
|
26256
|
+
return n(this, jr).filter((s) => s !== this.peerId);
|
|
26257
|
+
}
|
|
26227
26258
|
updateCallstatsPeerId(s) {
|
|
26228
26259
|
const t = n(this, Ve).getValue("callstats");
|
|
26229
26260
|
t.peerId = s, t.backend && (t.backend.peerId = s, t.backend.eventHandler && Object.assign(t.backend.eventHandler, { peerId: s }));
|
|
26230
26261
|
}
|
|
26231
26262
|
updateURL(s) {
|
|
26232
26263
|
var t;
|
|
26233
|
-
f(this, Cs, D(this, Oc, Ph).call(this, s)), f(this, Pa, s), n(this, Ve).getValue("telemetry").resetPeerId(s), (t = n(this, Ve).getValue("apiClient")) == null || t.setHeader("tracing-id", s), this.updateCallstatsPeerId(s),
|
|
26264
|
+
f(this, Cs, D(this, Oc, Ph).call(this, s)), f(this, Pa, s), n(this, Ve).getValue("telemetry").resetPeerId(s), (t = n(this, Ve).getValue("apiClient")) == null || t.setHeader("tracing-id", s), this.updateCallstatsPeerId(s), Zr.remapContext(s, n(this, Ve)), this.logger.info(`Attempting websocket connection with URL: ${n(this, Yi, ao)}`), n(this, Ee).updateURL(n(this, Cs));
|
|
26234
26265
|
}
|
|
26235
26266
|
get url() {
|
|
26236
26267
|
return n(this, Cs);
|
|
@@ -26249,7 +26280,7 @@ const cv = (bu = class {
|
|
|
26249
26280
|
reconnectionAttempt: void 0
|
|
26250
26281
|
};
|
|
26251
26282
|
} catch (e) {
|
|
26252
|
-
throw this.logger.error(`Websocket connection failed with URL: ${n(this, Yi, ao)}`, { error: e }), n(this, gt) && s === n(this, pt) && D(this,
|
|
26283
|
+
throw this.logger.error(`Websocket connection failed with URL: ${n(this, Yi, ao)}`, { error: e }), n(this, gt) && s === n(this, pt) && D(this, $c, bh).call(this, s), e;
|
|
26253
26284
|
}
|
|
26254
26285
|
});
|
|
26255
26286
|
}
|
|
@@ -26268,7 +26299,7 @@ const cv = (bu = class {
|
|
|
26268
26299
|
}
|
|
26269
26300
|
}
|
|
26270
26301
|
sendMessage(s, t, e) {
|
|
26271
|
-
if (!n(this,
|
|
26302
|
+
if (!n(this, Uc, kh))
|
|
26272
26303
|
return !1;
|
|
26273
26304
|
const r = {};
|
|
26274
26305
|
return n(this, Ve).getValue("telemetry").injectContext(r), n(this, Ee).send(
|
|
@@ -26295,7 +26326,7 @@ const cv = (bu = class {
|
|
|
26295
26326
|
messageId: r,
|
|
26296
26327
|
resp: i
|
|
26297
26328
|
}) {
|
|
26298
|
-
if (!n(this,
|
|
26329
|
+
if (!n(this, Uc, kh))
|
|
26299
26330
|
return Promise.reject(new Error("Socket is not connected for the current peer ID"));
|
|
26300
26331
|
const a = i != null ? i : s;
|
|
26301
26332
|
return new Promise(
|
|
@@ -26323,10 +26354,10 @@ const cv = (bu = class {
|
|
|
26323
26354
|
} catch (O) {
|
|
26324
26355
|
x = new Error("failed to parse error message", { cause: O });
|
|
26325
26356
|
try {
|
|
26326
|
-
const
|
|
26327
|
-
x = new Error(
|
|
26328
|
-
} catch (
|
|
26329
|
-
x = new Error("failed to parse error message", { cause:
|
|
26357
|
+
const $ = Zb.fromBinary(A);
|
|
26358
|
+
x = new Error($.message);
|
|
26359
|
+
} catch ($) {
|
|
26360
|
+
x = new Error("failed to parse error message", { cause: $ });
|
|
26330
26361
|
}
|
|
26331
26362
|
}
|
|
26332
26363
|
c(x), l(E, y);
|
|
@@ -26368,15 +26399,15 @@ const cv = (bu = class {
|
|
|
26368
26399
|
var s;
|
|
26369
26400
|
this.logger.info(`Websocket connected with URL: ${n(this, Yi, ao)}`), (s = n(this, ws)) != null || f(this, ws, this.peerId), n(this, je, et).updateSocketConnectionState("connected");
|
|
26370
26401
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
26371
|
-
!n(this, gt) || n(this,
|
|
26402
|
+
!n(this, gt) || n(this, Kr) === n(this, pt) || (this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t } }), n(this, je, et).updateSocketConnectionState("disconnected"), n(this, Ve).getValue("peerSessionStore").emit(
|
|
26372
26403
|
C.SOCKET_SERVICE_DISCONNECTED,
|
|
26373
26404
|
{ joinAttempted: n(this, je, et).joinAttempted }
|
|
26374
|
-
), D(this,
|
|
26405
|
+
), D(this, $c, bh).call(this, n(this, pt)));
|
|
26375
26406
|
});
|
|
26376
26407
|
}
|
|
26377
26408
|
}, Cs = new WeakMap(), Pa = new WeakMap(), Ee = new WeakMap(), je = new WeakSet(), et = function() {
|
|
26378
26409
|
return n(this, Ve).getValue("connectionHandler");
|
|
26379
|
-
},
|
|
26410
|
+
}, jr = new WeakMap(), Gr = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), Wr = new WeakMap(), ws = new WeakMap(), Rs = new WeakMap(), Jr = new WeakMap(), zi = new WeakMap(), pt = new WeakMap(), Kr = new WeakMap(), gt = new WeakMap(), Ve = new WeakMap(), Oc = new WeakSet(), Ph = function(s) {
|
|
26380
26411
|
let t = Wh({
|
|
26381
26412
|
servicePrefix: "ws",
|
|
26382
26413
|
baseURI: n(this, Ve).getValue("baseURI")
|
|
@@ -26391,7 +26422,7 @@ const cv = (bu = class {
|
|
|
26391
26422
|
peerID: s,
|
|
26392
26423
|
authToken: this.authToken,
|
|
26393
26424
|
useMediaV2: !0
|
|
26394
|
-
}, n(this,
|
|
26425
|
+
}, n(this, jr).length > 0 && { oldPeerIds: n(this, jr).join(",") }), {
|
|
26395
26426
|
ping: this.capabilities.includes("PING"),
|
|
26396
26427
|
capabilities: this.capabilities.map((a) => Md[a]).join(" "),
|
|
26397
26428
|
joinWithDetails: !0,
|
|
@@ -26414,7 +26445,7 @@ const cv = (bu = class {
|
|
|
26414
26445
|
return;
|
|
26415
26446
|
const t = {}, e = typeof AbortController == "function" ? new AbortController() : void 0;
|
|
26416
26447
|
let r;
|
|
26417
|
-
f(this, Ji, !0), f(this,
|
|
26448
|
+
f(this, Ji, !0), f(this, Wr, t), f(this, Ki, e);
|
|
26418
26449
|
try {
|
|
26419
26450
|
e && (r = n(this, Rs).setTimeout(
|
|
26420
26451
|
() => e.abort(),
|
|
@@ -26428,26 +26459,26 @@ const cv = (bu = class {
|
|
|
26428
26459
|
networkCall: { status: i.status, url: s }
|
|
26429
26460
|
});
|
|
26430
26461
|
} catch (i) {
|
|
26431
|
-
n(this,
|
|
26462
|
+
n(this, Wr) === t && this.logger.warn("SocketService::API ping request failed", {
|
|
26432
26463
|
error: i,
|
|
26433
26464
|
networkCall: { url: s }
|
|
26434
26465
|
});
|
|
26435
26466
|
} finally {
|
|
26436
|
-
r !== void 0 && n(this, Rs).clearTimeout(r), n(this,
|
|
26467
|
+
r !== void 0 && n(this, Rs).clearTimeout(r), n(this, Wr) === t && (f(this, Ji, !1), f(this, Wr, void 0), f(this, Ki, void 0));
|
|
26437
26468
|
}
|
|
26438
26469
|
});
|
|
26439
26470
|
}, Vl = new WeakSet(), uv = function() {
|
|
26440
|
-
n(this,
|
|
26471
|
+
n(this, Gr) === void 0 && f(this, Gr, n(this, Rs).setInterval(
|
|
26441
26472
|
() => D(this, Ll, lv).call(this),
|
|
26442
26473
|
MO
|
|
26443
26474
|
));
|
|
26444
26475
|
}, Nc = new WeakSet(), _h = function() {
|
|
26445
26476
|
var s;
|
|
26446
|
-
n(this,
|
|
26477
|
+
n(this, Gr) !== void 0 && n(this, Rs).clearInterval(n(this, Gr)), (s = n(this, Ki)) == null || s.abort(), f(this, Gr, void 0), f(this, Ji, !1), f(this, Wr, void 0), f(this, Ki, void 0);
|
|
26447
26478
|
}, Lc = new WeakSet(), Ch = function(s) {
|
|
26448
|
-
f(this,
|
|
26479
|
+
f(this, jr, [
|
|
26449
26480
|
s,
|
|
26450
|
-
...n(this,
|
|
26481
|
+
...n(this, jr).filter((t) => t !== s)
|
|
26451
26482
|
].slice(0, IO));
|
|
26452
26483
|
}, Yi = new WeakSet(), ao = function() {
|
|
26453
26484
|
const s = new URL(n(this, Cs)), t = s.searchParams.get("authToken");
|
|
@@ -26458,27 +26489,27 @@ const cv = (bu = class {
|
|
|
26458
26489
|
NO * uu(2, s - 1)
|
|
26459
26490
|
);
|
|
26460
26491
|
return Math.floor(Math.random() * (t + 1));
|
|
26461
|
-
},
|
|
26492
|
+
}, $l = new WeakSet(), pv = function(s) {
|
|
26462
26493
|
return new Promise((t) => {
|
|
26463
26494
|
var e;
|
|
26464
|
-
f(this, zi, t), f(this,
|
|
26465
|
-
f(this,
|
|
26495
|
+
f(this, zi, t), f(this, Jr, n(this, Rs).setTimeout(() => {
|
|
26496
|
+
f(this, Jr, void 0), f(this, zi, void 0), t();
|
|
26466
26497
|
}, D(e = cv, xl, hv).call(e, s)));
|
|
26467
26498
|
});
|
|
26468
26499
|
}, Vc = new WeakSet(), wh = function() {
|
|
26469
26500
|
var s;
|
|
26470
|
-
n(this,
|
|
26501
|
+
n(this, Jr) !== void 0 && (n(this, Rs).clearTimeout(n(this, Jr)), f(this, Jr, void 0)), (s = n(this, zi)) == null || s.call(this), f(this, zi, void 0);
|
|
26471
26502
|
}, xc = new WeakSet(), Rh = function(s, t) {
|
|
26472
26503
|
!n(this, gt) || s !== n(this, pt) || (t && this.logger.error("SocketService::Reconnect loop failed", { error: t }), f(this, gt, !1), D(this, Nc, _h).call(this), f(this, ws, void 0), n(this, je, et).updateSocketConnectionState("failed"), n(this, Ve).getValue("peerSessionStore").emit(C.SOCKET_SERVICE_FAILED));
|
|
26473
|
-
},
|
|
26474
|
-
!n(this, gt) || n(this,
|
|
26504
|
+
}, $c = new WeakSet(), bh = function(s) {
|
|
26505
|
+
!n(this, gt) || n(this, Kr) === s || (f(this, Kr, s), n(this, je, et).updateSocketConnectionState("reconnecting"), D(this, Ul, gv).call(this, s).catch(
|
|
26475
26506
|
(t) => D(this, xc, Rh).call(this, s, t)
|
|
26476
26507
|
));
|
|
26477
|
-
},
|
|
26508
|
+
}, Ul = new WeakSet(), gv = function(s) {
|
|
26478
26509
|
return u(this, null, function* () {
|
|
26479
26510
|
try {
|
|
26480
26511
|
for (let t = 1; t <= OO; t += 1) {
|
|
26481
|
-
if (!n(this, gt) || s !== n(this, pt) || (yield D(this,
|
|
26512
|
+
if (!n(this, gt) || s !== n(this, pt) || (yield D(this, $l, pv).call(this, t), !n(this, gt) || s !== n(this, pt)))
|
|
26482
26513
|
return;
|
|
26483
26514
|
this.updateURL(_a()), this.logger.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
26484
26515
|
socket: { retryAttempt: t }
|
|
@@ -26510,10 +26541,10 @@ const cv = (bu = class {
|
|
|
26510
26541
|
}
|
|
26511
26542
|
D(this, xc, Rh).call(this, s);
|
|
26512
26543
|
} finally {
|
|
26513
|
-
n(this,
|
|
26544
|
+
n(this, Kr) === s && f(this, Kr, void 0);
|
|
26514
26545
|
}
|
|
26515
26546
|
});
|
|
26516
|
-
},
|
|
26547
|
+
}, Uc = new WeakSet(), kh = function() {
|
|
26517
26548
|
return this.isConnected && n(this, Pa) === this.peerId;
|
|
26518
26549
|
}, Hc = new WeakSet(), Ah = function() {
|
|
26519
26550
|
return `${this.peerId}-${(Math.random() + 1).toString(36).substring(7)}`;
|
|
@@ -26583,7 +26614,7 @@ class VO {
|
|
|
26583
26614
|
getConnectedRoomsDump() {
|
|
26584
26615
|
return u(this, null, function* () {
|
|
26585
26616
|
const t = yield this.socketService.sendMessagePromise(
|
|
26586
|
-
|
|
26617
|
+
U.getConnectedRoomsDump
|
|
26587
26618
|
);
|
|
26588
26619
|
return this.handleConnectedRoomsDumpRaw(t);
|
|
26589
26620
|
});
|
|
@@ -26591,7 +26622,7 @@ class VO {
|
|
|
26591
26622
|
createConnectedRooms(t) {
|
|
26592
26623
|
return u(this, null, function* () {
|
|
26593
26624
|
const { payload: e } = yield this.socketService.sendMessagePromise(
|
|
26594
|
-
|
|
26625
|
+
U.createConnectedRooms,
|
|
26595
26626
|
Ik.toBinary({ payloads: t })
|
|
26596
26627
|
);
|
|
26597
26628
|
return Sg.fromBinary(e).payloads.map((i) => ({
|
|
@@ -26608,7 +26639,7 @@ class VO {
|
|
|
26608
26639
|
disableConnectedRooms(t) {
|
|
26609
26640
|
return u(this, null, function* () {
|
|
26610
26641
|
const e = t.map((i) => ({ id: i })), r = yield this.socketService.sendMessagePromise(
|
|
26611
|
-
|
|
26642
|
+
U.deleteConnectedRooms,
|
|
26612
26643
|
Hk.toBinary({ payloads: e })
|
|
26613
26644
|
);
|
|
26614
26645
|
return this.handleConnectedRoomsDeletedRaw(
|
|
@@ -26620,7 +26651,7 @@ class VO {
|
|
|
26620
26651
|
return u(this, null, function* () {
|
|
26621
26652
|
try {
|
|
26622
26653
|
const e = yield this.socketService.sendMessagePromise(
|
|
26623
|
-
|
|
26654
|
+
U.movePeers,
|
|
26624
26655
|
Kk.toBinary({
|
|
26625
26656
|
sourceMeetingId: t.sourceMeetingId,
|
|
26626
26657
|
destinationMeetingId: t.destinationMeetingId,
|
|
@@ -26634,8 +26665,8 @@ class VO {
|
|
|
26634
26665
|
});
|
|
26635
26666
|
}
|
|
26636
26667
|
}
|
|
26637
|
-
var xO = Object.defineProperty,
|
|
26638
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
26668
|
+
var xO = Object.defineProperty, $O = Object.getOwnPropertyDescriptor, UO = (s, t, e, r) => {
|
|
26669
|
+
for (var i = r > 1 ? void 0 : r ? $O(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
26639
26670
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
26640
26671
|
return r && i && xO(t, e, i), i;
|
|
26641
26672
|
}, Ot;
|
|
@@ -26814,8 +26845,8 @@ class mv extends xt {
|
|
|
26814
26845
|
}
|
|
26815
26846
|
}
|
|
26816
26847
|
Ot = new WeakMap();
|
|
26817
|
-
|
|
26818
|
-
|
|
26848
|
+
UO([
|
|
26849
|
+
$t({ maxInvocations: 60, period: 60 })
|
|
26819
26850
|
], mv.prototype, "getConnectedMeetings", 1);
|
|
26820
26851
|
var HO = Object.defineProperty, BO = Object.getOwnPropertyDescriptor, hp = (s, t, e, r) => {
|
|
26821
26852
|
for (var i = r > 1 ? void 0 : r ? BO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
@@ -26856,19 +26887,19 @@ const fv = (nm = class {
|
|
|
26856
26887
|
}
|
|
26857
26888
|
setupEvents() {
|
|
26858
26889
|
n(this, ge).getValue("connectedMeetingsSocketHandler").socketService.on(
|
|
26859
|
-
|
|
26890
|
+
U.getConnectedRoomsDump,
|
|
26860
26891
|
this.handleConnectedRoomsDump.bind(this)
|
|
26861
26892
|
), n(this, ge).getValue("connectedMeetingsSocketHandler").socketService.on(
|
|
26862
|
-
|
|
26893
|
+
U.transferPeer,
|
|
26863
26894
|
this.handleTransferPeer.bind(this)
|
|
26864
26895
|
), n(this, ge).getValue("connectedMeetingsSocketHandler").socketService.on(
|
|
26865
|
-
|
|
26896
|
+
U.movedPeer,
|
|
26866
26897
|
this.handleMovedPeer.bind(this)
|
|
26867
26898
|
), n(this, ge).getValue("connectedMeetingsSocketHandler").socketService.on(
|
|
26868
|
-
|
|
26899
|
+
U.connectedRoomsUpdated,
|
|
26869
26900
|
this.handleConnectedRoomsUpdated.bind(this)
|
|
26870
26901
|
), n(this, ge).getValue("connectedMeetingsSocketHandler").socketService.on(
|
|
26871
|
-
|
|
26902
|
+
U.connectedRoomsDeleted,
|
|
26872
26903
|
this.handleConnectedRoomsDeleted.bind(this)
|
|
26873
26904
|
);
|
|
26874
26905
|
}
|
|
@@ -27003,7 +27034,7 @@ const oo = class {
|
|
|
27003
27034
|
}
|
|
27004
27035
|
static init(s) {
|
|
27005
27036
|
return u(this, null, function* () {
|
|
27006
|
-
var O,
|
|
27037
|
+
var O, $;
|
|
27007
27038
|
const {
|
|
27008
27039
|
peerId: t,
|
|
27009
27040
|
apiBase: e,
|
|
@@ -27062,12 +27093,12 @@ const oo = class {
|
|
|
27062
27093
|
k,
|
|
27063
27094
|
R
|
|
27064
27095
|
);
|
|
27065
|
-
SM(k) && ((
|
|
27096
|
+
SM(k) && (($ = oo.createRoomNodeClient(s, S).initializeConnection(
|
|
27066
27097
|
g.participant.name,
|
|
27067
27098
|
i,
|
|
27068
27099
|
!1,
|
|
27069
27100
|
R
|
|
27070
|
-
)) == null ||
|
|
27101
|
+
)) == null || $.catch((F) => {
|
|
27071
27102
|
c.error(
|
|
27072
27103
|
"[Controller]: Failed to queue partial media room promise:",
|
|
27073
27104
|
{ error: F }
|
|
@@ -27089,12 +27120,12 @@ const oo = class {
|
|
|
27089
27120
|
}
|
|
27090
27121
|
}
|
|
27091
27122
|
}, d)), t.setValue("maxPreferredStreams", ve.isMobile() ? i.maxVideoStreams.mobile : i.maxVideoStreams.desktop);
|
|
27092
|
-
let S, y, E, k, R, A, x, O,
|
|
27123
|
+
let S, y, E, k, R, A, x, O, $;
|
|
27093
27124
|
const H = new iO(t, s), F = new VO(
|
|
27094
27125
|
s
|
|
27095
27126
|
);
|
|
27096
27127
|
t.setValue("connectedMeetingsSocketHandler", F);
|
|
27097
|
-
const X = new ru(t, s), ee = new pr(t, s), Ke = new lO(s), it = new WS(t, s), Ct = new uO(t, s), I = new rO(s), T = yield
|
|
27128
|
+
const X = new ru(t, s), ee = new pr(t, s), Ke = new lO(s), it = new WS(t, s), Ct = new uO(t, s), I = new rO(s), T = yield ni.init(
|
|
27098
27129
|
t,
|
|
27099
27130
|
it,
|
|
27100
27131
|
c,
|
|
@@ -27152,7 +27183,7 @@ const oo = class {
|
|
|
27152
27183
|
B
|
|
27153
27184
|
);
|
|
27154
27185
|
}
|
|
27155
|
-
if (o.connectedMeetings && (
|
|
27186
|
+
if (o.connectedMeetings && ($ = yield au.init(
|
|
27156
27187
|
t
|
|
27157
27188
|
)), o.pip) {
|
|
27158
27189
|
const Ae = yield Lu._init(t, T.self);
|
|
@@ -27173,7 +27204,7 @@ const oo = class {
|
|
|
27173
27204
|
internalsController: R,
|
|
27174
27205
|
livestreamController: x,
|
|
27175
27206
|
participantController: O,
|
|
27176
|
-
connectedMeetingsController:
|
|
27207
|
+
connectedMeetingsController: $
|
|
27177
27208
|
}
|
|
27178
27209
|
};
|
|
27179
27210
|
});
|
|
@@ -27246,15 +27277,15 @@ class jO {
|
|
|
27246
27277
|
}
|
|
27247
27278
|
}
|
|
27248
27279
|
const Bg = new jO();
|
|
27249
|
-
var
|
|
27280
|
+
var zr, Qi, Xi, Bc, Hl, Sv;
|
|
27250
27281
|
class GO {
|
|
27251
27282
|
constructor() {
|
|
27252
27283
|
m(this, Hl);
|
|
27253
|
-
m(this,
|
|
27284
|
+
m(this, zr, new Audio());
|
|
27254
27285
|
m(this, Qi, new MediaStream());
|
|
27255
27286
|
m(this, Xi, /* @__PURE__ */ new Map());
|
|
27256
27287
|
m(this, Bc, void 0);
|
|
27257
|
-
n(this,
|
|
27288
|
+
n(this, zr).srcObject = n(this, Qi), n(this, zr).autoplay = !0;
|
|
27258
27289
|
}
|
|
27259
27290
|
playTracks(t) {
|
|
27260
27291
|
return u(this, null, function* () {
|
|
@@ -27264,7 +27295,7 @@ class GO {
|
|
|
27264
27295
|
});
|
|
27265
27296
|
}
|
|
27266
27297
|
setSpeakerDevice(t) {
|
|
27267
|
-
typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this,
|
|
27298
|
+
typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, zr).setSinkId(t);
|
|
27268
27299
|
}
|
|
27269
27300
|
removeTrack(t) {
|
|
27270
27301
|
const e = n(this, Xi).get(t);
|
|
@@ -27272,7 +27303,7 @@ class GO {
|
|
|
27272
27303
|
}
|
|
27273
27304
|
play() {
|
|
27274
27305
|
return u(this, null, function* () {
|
|
27275
|
-
return n(this,
|
|
27306
|
+
return n(this, zr).srcObject = n(this, Qi), n(this, zr).play().catch((t) => {
|
|
27276
27307
|
D(this, Hl, Sv).call(this, t);
|
|
27277
27308
|
});
|
|
27278
27309
|
});
|
|
@@ -27281,7 +27312,7 @@ class GO {
|
|
|
27281
27312
|
f(this, Bc, t);
|
|
27282
27313
|
}
|
|
27283
27314
|
}
|
|
27284
|
-
|
|
27315
|
+
zr = new WeakMap(), Qi = new WeakMap(), Xi = new WeakMap(), Bc = new WeakMap(), Hl = new WeakSet(), Sv = function(t) {
|
|
27285
27316
|
var e;
|
|
27286
27317
|
(e = n(this, Bc)) == null || e.call(this, t);
|
|
27287
27318
|
};
|
|
@@ -27311,7 +27342,7 @@ var JO = Object.defineProperty, KO = Object.getOwnPropertyDescriptor, cu = (s, t
|
|
|
27311
27342
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
27312
27343
|
return r && i && JO(t, e, i), i;
|
|
27313
27344
|
}, Oe, Zi, am;
|
|
27314
|
-
let
|
|
27345
|
+
let ti = (am = class {
|
|
27315
27346
|
constructor(t, e) {
|
|
27316
27347
|
m(this, Oe, void 0);
|
|
27317
27348
|
m(this, Zi, void 0);
|
|
@@ -27331,7 +27362,7 @@ let ei = (am = class {
|
|
|
27331
27362
|
static initMedia() {
|
|
27332
27363
|
return u(this, arguments, function* (t = {}, e = !1, r = void 0) {
|
|
27333
27364
|
var d;
|
|
27334
|
-
const i = (d = r == null ? void 0 : r.peerId) != null ? d : _a(), a =
|
|
27365
|
+
const i = (d = r == null ? void 0 : r.peerId) != null ? d : _a(), a = Zr.createContext(i, {
|
|
27335
27366
|
peerId: i
|
|
27336
27367
|
}), o = a.getValue("logger");
|
|
27337
27368
|
o.init(a);
|
|
@@ -27347,7 +27378,7 @@ let ei = (am = class {
|
|
|
27347
27378
|
if ((k = o.baseURI) != null && k.includes("dyte.io"))
|
|
27348
27379
|
throw new w("Dyte Base URIs are no longer supported. Use RealtimeKit Base URIs.", "0001");
|
|
27349
27380
|
window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
|
|
27350
|
-
const c =
|
|
27381
|
+
const c = ti.setupContext(
|
|
27351
27382
|
e,
|
|
27352
27383
|
t,
|
|
27353
27384
|
a,
|
|
@@ -27368,7 +27399,7 @@ let ei = (am = class {
|
|
|
27368
27399
|
authToken: ov(t.authToken)
|
|
27369
27400
|
})
|
|
27370
27401
|
});
|
|
27371
|
-
const h = yield ou.init(c), g = new
|
|
27402
|
+
const h = yield ou.init(c), g = new ti(c, h);
|
|
27372
27403
|
return c.setValue("meeting", g), g;
|
|
27373
27404
|
});
|
|
27374
27405
|
}
|
|
@@ -27381,12 +27412,12 @@ let ei = (am = class {
|
|
|
27381
27412
|
*/
|
|
27382
27413
|
static setupContext(t, e, r, i) {
|
|
27383
27414
|
var d, l;
|
|
27384
|
-
const a =
|
|
27415
|
+
const a = Zr.createContext(t, e), o = N(N({}, dw), e == null ? void 0 : e.modules), c = e.defaults || {
|
|
27385
27416
|
audio: !0,
|
|
27386
27417
|
video: !0
|
|
27387
27418
|
};
|
|
27388
27419
|
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 || (() => {
|
|
27389
|
-
})), a.setValue("cachedUserDetails", ks(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.3-staging.
|
|
27420
|
+
})), a.setValue("cachedUserDetails", ks(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.3-staging.9"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new WO()), a;
|
|
27390
27421
|
}
|
|
27391
27422
|
join() {
|
|
27392
27423
|
return u(this, null, function* () {
|
|
@@ -27512,10 +27543,10 @@ cu([
|
|
|
27512
27543
|
lockName: "Client.join",
|
|
27513
27544
|
timeout: 3e3
|
|
27514
27545
|
})
|
|
27515
|
-
],
|
|
27546
|
+
], ti.prototype, "join", 1);
|
|
27516
27547
|
cu([
|
|
27517
27548
|
rt("0003")
|
|
27518
|
-
],
|
|
27549
|
+
], ti.prototype, "leave", 1);
|
|
27519
27550
|
cu([
|
|
27520
27551
|
rt("0001"),
|
|
27521
27552
|
mr.executeWithLock({
|
|
@@ -27523,11 +27554,11 @@ cu([
|
|
|
27523
27554
|
lockName: "Client.init",
|
|
27524
27555
|
timeout: 3e3
|
|
27525
27556
|
})
|
|
27526
|
-
],
|
|
27527
|
-
|
|
27557
|
+
], ti, "init", 1);
|
|
27558
|
+
ti = cu([
|
|
27528
27559
|
rt("0000")
|
|
27529
|
-
],
|
|
27530
|
-
const zO =
|
|
27560
|
+
], ti);
|
|
27561
|
+
const zO = ti;
|
|
27531
27562
|
export {
|
|
27532
27563
|
zO as default
|
|
27533
27564
|
};
|