@cloudflare/realtimekit 2.0.3 → 2.0.4-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +5 -5
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +109 -108
- package/dist/index.es5.js +116 -116
- package/dist/index.rn.js +5 -5
- package/package.json +2 -3
package/dist/index.es.js
CHANGED
|
@@ -565,12 +565,12 @@ class Qv extends Yv {
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
const Pe = new Qv();
|
|
568
|
-
var
|
|
568
|
+
var yt = {}, Xv = {
|
|
569
569
|
get exports() {
|
|
570
|
-
return
|
|
570
|
+
return yt;
|
|
571
571
|
},
|
|
572
572
|
set exports(s) {
|
|
573
|
-
|
|
573
|
+
yt = s;
|
|
574
574
|
}
|
|
575
575
|
}, kn = typeof Reflect == "object" ? Reflect : null, Vp = kn && typeof kn.apply == "function" ? kn.apply : function(t, e, r) {
|
|
576
576
|
return Function.prototype.apply.call(t, e, r);
|
|
@@ -590,7 +590,7 @@ function he() {
|
|
|
590
590
|
he.init.call(this);
|
|
591
591
|
}
|
|
592
592
|
Xv.exports = he;
|
|
593
|
-
|
|
593
|
+
yt.once = rT;
|
|
594
594
|
he.EventEmitter = he;
|
|
595
595
|
he.prototype._events = void 0;
|
|
596
596
|
he.prototype._eventsCount = 0;
|
|
@@ -871,7 +871,7 @@ class aT {
|
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
class oT extends
|
|
874
|
+
class oT extends yt {
|
|
875
875
|
constructor({ logger: e, peerId: r, apiHostnames: i, authToken: a }) {
|
|
876
876
|
super();
|
|
877
877
|
p(this, "logger");
|
|
@@ -1191,7 +1191,7 @@ b=AS:${this.constrainVideoBitrateKbps}\r
|
|
|
1191
1191
|
this.pc1.close(), this.pc2.close();
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
class sf extends
|
|
1194
|
+
class sf extends yt {
|
|
1195
1195
|
constructor(e) {
|
|
1196
1196
|
super();
|
|
1197
1197
|
p(this, "call");
|
|
@@ -1388,7 +1388,7 @@ class nf {
|
|
|
1388
1388
|
p(this, "staleConsumerStreamMap", !1);
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
class af extends
|
|
1391
|
+
class af extends yt {
|
|
1392
1392
|
constructor() {
|
|
1393
1393
|
super();
|
|
1394
1394
|
p(this, "observer");
|
|
@@ -1415,7 +1415,7 @@ class af extends Tt {
|
|
|
1415
1415
|
p(this, "screenShareConsumers", /* @__PURE__ */ new Set());
|
|
1416
1416
|
p(this, "ipDetails");
|
|
1417
1417
|
p(this, "callStatsInstance");
|
|
1418
|
-
this.observer = new
|
|
1418
|
+
this.observer = new yt();
|
|
1419
1419
|
}
|
|
1420
1420
|
registerProducer(e) {
|
|
1421
1421
|
return u(this, null, function* () {
|
|
@@ -2658,7 +2658,7 @@ var z = globalThis && globalThis.__decorate || function(s, t, e, r) {
|
|
|
2658
2658
|
return i > 3 && a && Object.defineProperty(t, e, a), a;
|
|
2659
2659
|
};
|
|
2660
2660
|
const Y = console;
|
|
2661
|
-
let q = class extends
|
|
2661
|
+
let q = class extends yt {
|
|
2662
2662
|
constructor(e = "https://api.testingv3.dyte.in", r = "Blink", i = qm.PROD, a, o, c, d, l) {
|
|
2663
2663
|
super();
|
|
2664
2664
|
p(this, "observer");
|
|
@@ -2692,7 +2692,7 @@ let q = class extends Tt {
|
|
|
2692
2692
|
default:
|
|
2693
2693
|
throw Error(`Unknown engineName! ${r}`);
|
|
2694
2694
|
}
|
|
2695
|
-
this.measurements.callStatsInstance = this, this.registerProducer = this.registerProducer.bind(this), this.registerConsumer = this.registerConsumer.bind(this), this.observer = new
|
|
2695
|
+
this.measurements.callStatsInstance = this, this.registerProducer = this.registerProducer.bind(this), this.registerConsumer = this.registerConsumer.bind(this), this.observer = new yt(), this.measurements.observer.on("consumer_score", (h) => {
|
|
2696
2696
|
o.debug(`callStats::consumer_score ${[...h.entries()]}`), this.eventHandler.emit("consumer_score", h);
|
|
2697
2697
|
}), this.measurements.observer.on("producer_score", (h) => {
|
|
2698
2698
|
o.debug(`callStats::producer_score ${[...h.entries()]}`), this.eventHandler.emit("producer_score", h);
|
|
@@ -3251,7 +3251,7 @@ q = z([
|
|
|
3251
3251
|
wT(TypeError, (s, t) => Y.error(t, s))
|
|
3252
3252
|
], q);
|
|
3253
3253
|
const _T = q;
|
|
3254
|
-
class cf extends
|
|
3254
|
+
class cf extends yt {
|
|
3255
3255
|
constructor() {
|
|
3256
3256
|
super(...arguments);
|
|
3257
3257
|
p(this, "stats");
|
|
@@ -3687,7 +3687,7 @@ function ko(s, t, e, r) {
|
|
|
3687
3687
|
}
|
|
3688
3688
|
}), i.length > 0;
|
|
3689
3689
|
}
|
|
3690
|
-
class Oa extends
|
|
3690
|
+
class Oa extends yt.EventEmitter {
|
|
3691
3691
|
constructor(e) {
|
|
3692
3692
|
super();
|
|
3693
3693
|
p(this, "logger");
|
|
@@ -3749,7 +3749,7 @@ class Oa extends Tt.EventEmitter {
|
|
|
3749
3749
|
return super.listenerCount(e);
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
|
-
class Bt extends
|
|
3752
|
+
class Bt extends yt.EventEmitter {
|
|
3753
3753
|
constructor(e) {
|
|
3754
3754
|
super();
|
|
3755
3755
|
p(this, "logger");
|
|
@@ -3812,7 +3812,7 @@ class Bt extends Tt.EventEmitter {
|
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
3814
|
var Gs, Ws;
|
|
3815
|
-
class bT extends
|
|
3815
|
+
class bT extends yt.EventEmitter {
|
|
3816
3816
|
constructor(e) {
|
|
3817
3817
|
super();
|
|
3818
3818
|
m(this, Gs, void 0);
|
|
@@ -6182,12 +6182,12 @@ const _g = 1080, Cg = 1920, eR = (s, t, e, r, i, a) => {
|
|
|
6182
6182
|
let g = d * h, S = l * h, y, E, k, b, O = 1;
|
|
6183
6183
|
return g < e && (O = e / g), Math.abs(O - 1) < 1e-14 && S < r && (O = r / S), g *= O, S *= O, k = d / (g / e), b = l / (S / r), y = (d - k) * o, E = (l - b) * c, y < 0 && (y = 0), E < 0 && (E = 0), k > d && (k = d), b > l && (b = l), [y, E, k, b, s, t, e, r];
|
|
6184
6184
|
};
|
|
6185
|
-
var
|
|
6185
|
+
var Pt, Nr, nt, Wt, be, Jt, Js, $e, De, On, Nn, Ln, Ks, Vn, Qd, $o;
|
|
6186
6186
|
const Op = class extends Bt {
|
|
6187
6187
|
constructor(e, r, i, a) {
|
|
6188
6188
|
const o = e.getValue("logger");
|
|
6189
6189
|
super(o);
|
|
6190
|
-
m(this,
|
|
6190
|
+
m(this, Pt, void 0);
|
|
6191
6191
|
m(this, Nr, void 0);
|
|
6192
6192
|
m(this, nt, void 0);
|
|
6193
6193
|
m(this, Wt, void 0);
|
|
@@ -6331,7 +6331,7 @@ const Op = class extends Bt {
|
|
|
6331
6331
|
/** @access private */
|
|
6332
6332
|
createCanvas() {
|
|
6333
6333
|
const e = document.createElement("canvas");
|
|
6334
|
-
e.height = n(this, be).height, e.width = n(this, be).width, f(this,
|
|
6334
|
+
e.height = n(this, be).height, e.width = n(this, be).width, f(this, Pt, e);
|
|
6335
6335
|
}
|
|
6336
6336
|
/** @access private */
|
|
6337
6337
|
setupMediaSessionEvents() {
|
|
@@ -6361,9 +6361,9 @@ const Op = class extends Bt {
|
|
|
6361
6361
|
}
|
|
6362
6362
|
/** @access private */
|
|
6363
6363
|
drawEmptyTile(e, r, i, a) {
|
|
6364
|
-
if (n(this,
|
|
6364
|
+
if (n(this, Pt) === void 0)
|
|
6365
6365
|
return;
|
|
6366
|
-
const o = n(this,
|
|
6366
|
+
const o = n(this, Pt).getContext("2d"), c = n(this, Pt).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, S = Math.floor(c / h), y = Math.floor(e / S), k = e % S * (h + d) + d, b = y * (g + d) + d, { displayText: O, image: D } = a != null ? a : {};
|
|
6367
6367
|
o.fillStyle = O || D ? n(this, Jt).videoBackground : n(this, Jt).background, o.strokeStyle = n(this, Jt).brand, o.beginPath(), o.moveTo(k + l, b), o.arcTo(k + h, b, k + h, b + l, l), o.arcTo(
|
|
6368
6368
|
k + h,
|
|
6369
6369
|
b + g,
|
|
@@ -6385,7 +6385,7 @@ const Op = class extends Bt {
|
|
|
6385
6385
|
const o = Math.min(Math.max(a * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
|
|
6386
6386
|
let l = r + c;
|
|
6387
6387
|
const h = i + c, g = (S) => {
|
|
6388
|
-
const y = n(this,
|
|
6388
|
+
const y = n(this, Pt).getContext("2d");
|
|
6389
6389
|
y.save(), y.fillStyle = n(this, Jt).background, y.beginPath(), y.moveTo(l + d, h), y.arcTo(l + o, h, l + o, h + d, d), y.arcTo(
|
|
6390
6390
|
l + o,
|
|
6391
6391
|
h + o,
|
|
@@ -6405,10 +6405,10 @@ const Op = class extends Bt {
|
|
|
6405
6405
|
/** @access private */
|
|
6406
6406
|
drawTile(e, r, i) {
|
|
6407
6407
|
var l, h;
|
|
6408
|
-
if (n(this,
|
|
6408
|
+
if (n(this, Pt) === void 0)
|
|
6409
6409
|
return;
|
|
6410
|
-
const a = n(this,
|
|
6411
|
-
a.fillStyle = n(this, Jt).background, a.fillRect(0, 0, n(this,
|
|
6410
|
+
const a = n(this, Pt).getContext("2d");
|
|
6411
|
+
a.fillStyle = n(this, Jt).background, a.fillRect(0, 0, n(this, Pt).width, n(this, Pt).height);
|
|
6412
6412
|
const o = this.getSources();
|
|
6413
6413
|
let c = 0, d = 0;
|
|
6414
6414
|
for (; c < n(this, be).height - 5; ) {
|
|
@@ -6474,7 +6474,7 @@ const Op = class extends Bt {
|
|
|
6474
6474
|
document.body.removeChild(n(this, nt));
|
|
6475
6475
|
} catch (e) {
|
|
6476
6476
|
}
|
|
6477
|
-
this.removeAllSources(), f(this,
|
|
6477
|
+
this.removeAllSources(), f(this, Pt, void 0), f(this, Wt, void 0), f(this, Js, void 0);
|
|
6478
6478
|
}
|
|
6479
6479
|
/**
|
|
6480
6480
|
* Initialize PiP and prepare sources
|
|
@@ -6492,7 +6492,7 @@ const Op = class extends Bt {
|
|
|
6492
6492
|
f(this, be, {
|
|
6493
6493
|
height: e != null ? e : _g,
|
|
6494
6494
|
width: r != null ? r : Cg
|
|
6495
|
-
}), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this,
|
|
6495
|
+
}), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this, Pt).captureStream(24), f(this, Wt, i), n(this, Wt).onloadedmetadata = () => {
|
|
6496
6496
|
try {
|
|
6497
6497
|
this.emit("pipStarted"), n(this, Wt).onleavepictureinpicture = () => {
|
|
6498
6498
|
this.emit("pipEnded");
|
|
@@ -6608,7 +6608,7 @@ const Op = class extends Bt {
|
|
|
6608
6608
|
}
|
|
6609
6609
|
};
|
|
6610
6610
|
let Qu = Op;
|
|
6611
|
-
|
|
6611
|
+
Pt = new WeakMap(), Nr = new WeakMap(), nt = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), Jt = new WeakMap(), Js = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), On = new WeakMap(), Nn = new WeakMap(), Ln = new WeakMap(), Ks = new WeakMap(), Vn = new WeakMap(), Qd = new WeakMap(), $o = new WeakMap();
|
|
6612
6612
|
var fr;
|
|
6613
6613
|
(function(s) {
|
|
6614
6614
|
s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
|
|
@@ -17990,7 +17990,7 @@ var zD = Object.defineProperty, YD = Object.getOwnPropertyDescriptor, Bs = (s, t
|
|
|
17990
17990
|
return r && i && zD(t, e, i), i;
|
|
17991
17991
|
};
|
|
17992
17992
|
const QD = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
17993
|
-
var Ie, cc, Th, Vi, oo, ra, Rd, $i,
|
|
17993
|
+
var Ie, cc, Th, Vi, oo, ra, Rd, $i, wt, Em;
|
|
17994
17994
|
let is = (Em = class extends Bt {
|
|
17995
17995
|
constructor(t, e, r) {
|
|
17996
17996
|
const i = t.getValue("logger");
|
|
@@ -18040,7 +18040,7 @@ let is = (Em = class extends Bt {
|
|
|
18040
18040
|
p(this, "all");
|
|
18041
18041
|
m(this, Ie, void 0);
|
|
18042
18042
|
m(this, $i, void 0);
|
|
18043
|
-
m(this,
|
|
18043
|
+
m(this, wt, void 0);
|
|
18044
18044
|
p(this, "rateLimitConfig", {
|
|
18045
18045
|
maxInvocations: 5,
|
|
18046
18046
|
period: 1
|
|
@@ -18070,7 +18070,7 @@ let is = (Em = class extends Bt {
|
|
|
18070
18070
|
* Keeps a list of all participants who have been present in the selected peers list.
|
|
18071
18071
|
*/
|
|
18072
18072
|
p(this, "selectedPeers", AS);
|
|
18073
|
-
f(this, Ie, t), f(this, $i, e), f(this,
|
|
18073
|
+
f(this, Ie, t), f(this, $i, e), f(this, wt, r), this.waitlisted = new ro(i), this.joined = new ro(i), this.videoSubscribed = new ro(i), this.audioSubscribed = new ro(i), this.active = this.videoSubscribed, this.pinned = new ro(i), this.all = new WD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
|
|
18074
18074
|
}
|
|
18075
18075
|
/**
|
|
18076
18076
|
* Return the controls for Picture-in-Picture
|
|
@@ -18155,7 +18155,7 @@ let is = (Em = class extends Bt {
|
|
|
18155
18155
|
"1205"
|
|
18156
18156
|
);
|
|
18157
18157
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
18158
|
-
return n(this,
|
|
18158
|
+
return n(this, wt).acceptWaitingRoomRequest([e]);
|
|
18159
18159
|
}
|
|
18160
18160
|
/**
|
|
18161
18161
|
* We need a new event for socket service events
|
|
@@ -18169,7 +18169,7 @@ let is = (Em = class extends Bt {
|
|
|
18169
18169
|
var i, a;
|
|
18170
18170
|
return (a = (i = this.waitlisted.get(r)) == null ? void 0 : i.userId) != null ? a : r;
|
|
18171
18171
|
});
|
|
18172
|
-
return n(this,
|
|
18172
|
+
return n(this, wt).acceptWaitingRoomRequest(e);
|
|
18173
18173
|
});
|
|
18174
18174
|
}
|
|
18175
18175
|
/**
|
|
@@ -18186,7 +18186,7 @@ let is = (Em = class extends Bt {
|
|
|
18186
18186
|
"1205"
|
|
18187
18187
|
);
|
|
18188
18188
|
const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
|
|
18189
|
-
n(this,
|
|
18189
|
+
n(this, wt).rejectWaitingRoomRequest([e]);
|
|
18190
18190
|
});
|
|
18191
18191
|
}
|
|
18192
18192
|
setViewMode(t) {
|
|
@@ -18344,7 +18344,7 @@ let is = (Em = class extends Bt {
|
|
|
18344
18344
|
"1201"
|
|
18345
18345
|
);
|
|
18346
18346
|
const e = !0;
|
|
18347
|
-
n(this,
|
|
18347
|
+
n(this, wt).kickAll(e);
|
|
18348
18348
|
});
|
|
18349
18349
|
}
|
|
18350
18350
|
broadcastMessage(t, e, r) {
|
|
@@ -18355,7 +18355,7 @@ let is = (Em = class extends Bt {
|
|
|
18355
18355
|
throw new R("`type` must be a non-empty string.", "1209");
|
|
18356
18356
|
if (r)
|
|
18357
18357
|
if ("meetingIds" in r)
|
|
18358
|
-
yield n(this,
|
|
18358
|
+
yield n(this, wt).broadcastToMeetings(t, r.meetingIds, e);
|
|
18359
18359
|
else {
|
|
18360
18360
|
let i = [];
|
|
18361
18361
|
"participantIds" in r ? i = r.participantIds : i = this.joined.toArray().filter(
|
|
@@ -18363,15 +18363,15 @@ let is = (Em = class extends Bt {
|
|
|
18363
18363
|
var o;
|
|
18364
18364
|
return (o = r.presetNames) == null ? void 0 : o.includes(a.presetName);
|
|
18365
18365
|
}
|
|
18366
|
-
).map((a) => a.id), yield n(this,
|
|
18366
|
+
).map((a) => a.id), yield n(this, wt).broadcastToPeers(t, i, e);
|
|
18367
18367
|
}
|
|
18368
18368
|
else
|
|
18369
|
-
yield n(this,
|
|
18369
|
+
yield n(this, wt).broadcastMessage(t, e);
|
|
18370
18370
|
});
|
|
18371
18371
|
}
|
|
18372
18372
|
getAllJoinedPeers(t, e, r) {
|
|
18373
18373
|
return u(this, null, function* () {
|
|
18374
|
-
return (yield n(this,
|
|
18374
|
+
return (yield n(this, wt).getRoomPeers(t, e, r)).peers.map(wr.formatSocketPeerMessage);
|
|
18375
18375
|
});
|
|
18376
18376
|
}
|
|
18377
18377
|
/**
|
|
@@ -18383,12 +18383,12 @@ let is = (Em = class extends Bt {
|
|
|
18383
18383
|
const r = this.joined.toArray().filter((a) => t.includes(a.id)).map((a) => a.userId), i = [...new Set(r)];
|
|
18384
18384
|
if (!i.length)
|
|
18385
18385
|
throw new R("Cannot update permissions, no valid userIDs found", "1204");
|
|
18386
|
-
n(this,
|
|
18386
|
+
n(this, wt).updatePermissions(i, e);
|
|
18387
18387
|
});
|
|
18388
18388
|
}
|
|
18389
18389
|
getParticipantsInMeetingPreJoin() {
|
|
18390
18390
|
return u(this, null, function* () {
|
|
18391
|
-
return n(this,
|
|
18391
|
+
return n(this, wt).getRoomPeersNonPaginated();
|
|
18392
18392
|
});
|
|
18393
18393
|
}
|
|
18394
18394
|
}, Ie = new WeakMap(), cc = new WeakSet(), Th = function() {
|
|
@@ -18399,7 +18399,7 @@ let is = (Em = class extends Bt {
|
|
|
18399
18399
|
}, ra = new WeakSet(), Rd = function() {
|
|
18400
18400
|
var t;
|
|
18401
18401
|
return ((t = n(this, Ie).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
|
|
18402
|
-
}, $i = new WeakMap(),
|
|
18402
|
+
}, $i = new WeakMap(), wt = new WeakMap(), Em);
|
|
18403
18403
|
Bs([
|
|
18404
18404
|
P.trace("Participants.setViewMode")
|
|
18405
18405
|
], is.prototype, "setViewMode", 1);
|
|
@@ -20405,7 +20405,7 @@ class LS extends Bt {
|
|
|
20405
20405
|
}
|
|
20406
20406
|
}
|
|
20407
20407
|
Ot = new WeakMap();
|
|
20408
|
-
var sO = Object.defineProperty, rO = Object.getOwnPropertyDescriptor,
|
|
20408
|
+
var sO = Object.defineProperty, rO = Object.getOwnPropertyDescriptor, Et = (s, t, e, r) => {
|
|
20409
20409
|
for (var i = r > 1 ? void 0 : r ? rO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
20410
20410
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
20411
20411
|
return r && i && sO(t, e, i), i;
|
|
@@ -20882,22 +20882,22 @@ let Qe = (wm = class extends LS {
|
|
|
20882
20882
|
}, da = new WeakMap(), la = new WeakMap(), lc = new WeakSet(), Ph = function() {
|
|
20883
20883
|
Array.from(n(this, la)).forEach((t) => this.updateVideo(t, !1)), Array.from(n(this, da)).forEach((t) => this.updateVideo(t, !0));
|
|
20884
20884
|
}, wm);
|
|
20885
|
-
|
|
20885
|
+
Et([
|
|
20886
20886
|
P.trace("Self.cleanupEvents")
|
|
20887
20887
|
], Qe.prototype, "cleanupEvents", 1);
|
|
20888
|
-
|
|
20888
|
+
Et([
|
|
20889
20889
|
P.trace("Self.setupEvents")
|
|
20890
20890
|
], Qe.prototype, "setupEvents", 1);
|
|
20891
|
-
|
|
20891
|
+
Et([
|
|
20892
20892
|
P.trace("Self.setupTracks")
|
|
20893
20893
|
], Qe.prototype, "setupTracks", 1);
|
|
20894
|
-
|
|
20894
|
+
Et([
|
|
20895
20895
|
P.trace("Self.destructMediaHandler")
|
|
20896
20896
|
], Qe.prototype, "destructMediaHandler", 1);
|
|
20897
|
-
|
|
20897
|
+
Et([
|
|
20898
20898
|
P.trace("Self.removeDocumentEventListeners")
|
|
20899
20899
|
], Qe.prototype, "removeDocumentEventListeners", 1);
|
|
20900
|
-
|
|
20900
|
+
Et([
|
|
20901
20901
|
Pr.executeWithLock({
|
|
20902
20902
|
methodName: "meeting.self.enableAudio",
|
|
20903
20903
|
lockName: "Self.toggleAudio",
|
|
@@ -20905,7 +20905,7 @@ yt([
|
|
|
20905
20905
|
}),
|
|
20906
20906
|
P.trace("Self.enableAudio")
|
|
20907
20907
|
], Qe.prototype, "enableAudio", 1);
|
|
20908
|
-
|
|
20908
|
+
Et([
|
|
20909
20909
|
Pr.executeWithLock({
|
|
20910
20910
|
methodName: "meeting.self.enableVideo",
|
|
20911
20911
|
lockName: "Self.toggleVideo",
|
|
@@ -20913,10 +20913,10 @@ yt([
|
|
|
20913
20913
|
}),
|
|
20914
20914
|
P.trace("Self.enableVideo")
|
|
20915
20915
|
], Qe.prototype, "enableVideo", 1);
|
|
20916
|
-
|
|
20916
|
+
Et([
|
|
20917
20917
|
P.trace("Self.updateVideoConstraints")
|
|
20918
20918
|
], Qe.prototype, "updateVideoConstraints", 1);
|
|
20919
|
-
|
|
20919
|
+
Et([
|
|
20920
20920
|
P.trace("Self.enableScreenShare"),
|
|
20921
20921
|
Pr.executeWithLock({
|
|
20922
20922
|
methodName: "meeting.self.enableScreenShare",
|
|
@@ -20924,10 +20924,10 @@ yt([
|
|
|
20924
20924
|
timeout: 3e3
|
|
20925
20925
|
})
|
|
20926
20926
|
], Qe.prototype, "enableScreenShare", 1);
|
|
20927
|
-
|
|
20927
|
+
Et([
|
|
20928
20928
|
P.trace("Self.updateScreenshareConstraints")
|
|
20929
20929
|
], Qe.prototype, "updateScreenshareConstraints", 1);
|
|
20930
|
-
|
|
20930
|
+
Et([
|
|
20931
20931
|
Pr.executeWithLock({
|
|
20932
20932
|
methodName: "meeting.self.disableAudio",
|
|
20933
20933
|
lockName: "Self.toggleAudio",
|
|
@@ -20935,7 +20935,7 @@ yt([
|
|
|
20935
20935
|
}),
|
|
20936
20936
|
P.trace("Self.disableAudio")
|
|
20937
20937
|
], Qe.prototype, "disableAudio", 1);
|
|
20938
|
-
|
|
20938
|
+
Et([
|
|
20939
20939
|
Pr.executeWithLock({
|
|
20940
20940
|
methodName: "meeting.self.disableVideo",
|
|
20941
20941
|
lockName: "Self.toggleVideo",
|
|
@@ -20943,7 +20943,7 @@ yt([
|
|
|
20943
20943
|
}),
|
|
20944
20944
|
P.trace("Self.disableVideo")
|
|
20945
20945
|
], Qe.prototype, "disableVideo", 1);
|
|
20946
|
-
|
|
20946
|
+
Et([
|
|
20947
20947
|
Pr.executeWithLock({
|
|
20948
20948
|
methodName: "meeting.self.disableScreenShare",
|
|
20949
20949
|
lockName: "Self.toggleScreenShare",
|
|
@@ -20951,10 +20951,10 @@ yt([
|
|
|
20951
20951
|
}),
|
|
20952
20952
|
P.trace("Self.disableScreenShare")
|
|
20953
20953
|
], Qe.prototype, "disableScreenShare", 1);
|
|
20954
|
-
|
|
20954
|
+
Et([
|
|
20955
20955
|
P.trace("Self.setDevice")
|
|
20956
20956
|
], Qe.prototype, "setDevice", 1);
|
|
20957
|
-
Qe =
|
|
20957
|
+
Qe = Et([
|
|
20958
20958
|
at("1100")
|
|
20959
20959
|
], Qe);
|
|
20960
20960
|
class wp extends Error {
|
|
@@ -21150,7 +21150,7 @@ function aO(s) {
|
|
|
21150
21150
|
};
|
|
21151
21151
|
}
|
|
21152
21152
|
var hc;
|
|
21153
|
-
class vu extends
|
|
21153
|
+
class vu extends yt.EventEmitter {
|
|
21154
21154
|
constructor(e) {
|
|
21155
21155
|
super();
|
|
21156
21156
|
m(this, hc, void 0);
|
|
@@ -22695,7 +22695,7 @@ class pO {
|
|
|
22695
22695
|
tr = new WeakMap(), Fi = new WeakMap();
|
|
22696
22696
|
const gO = 2e3;
|
|
22697
22697
|
var ma, We, Je, mc, fc, ji, fa, Sc, Sa, qi, Cs, Rs, kr, vc, Rh, El, xS, Tc, bh, Pl, US, wl, HS, _l, BS, Cl, FS, Rl, jS, yc, kh, bs, Ir;
|
|
22698
|
-
class mO extends
|
|
22698
|
+
class mO extends yt.EventEmitter {
|
|
22699
22699
|
constructor(e, r) {
|
|
22700
22700
|
super();
|
|
22701
22701
|
m(this, Rs);
|
|
@@ -23428,7 +23428,7 @@ Gi = new WeakMap(), ks = new WeakMap(), Ec = new WeakMap(), Is = new WeakMap(),
|
|
|
23428
23428
|
peerId: e.peerId
|
|
23429
23429
|
});
|
|
23430
23430
|
};
|
|
23431
|
-
var wc, _c, Cc, Ta, ya, Ea, Rc, bc, Pa,
|
|
23431
|
+
var wc, _c, Cc, Ta, ya, Ea, Rc, bc, Pa, _t, us, hs, Wi, Ji, rr, kc, Ol, KS, Nl, zS, Ll, YS, Vl, QS;
|
|
23432
23432
|
const $l = class {
|
|
23433
23433
|
constructor({
|
|
23434
23434
|
initialEnergyThreshold: t = 0.015,
|
|
@@ -23463,14 +23463,14 @@ const $l = class {
|
|
|
23463
23463
|
m(this, bc, void 0);
|
|
23464
23464
|
m(this, Pa, void 0);
|
|
23465
23465
|
// State variables
|
|
23466
|
-
m(this,
|
|
23466
|
+
m(this, _t, void 0);
|
|
23467
23467
|
m(this, us, void 0);
|
|
23468
23468
|
m(this, hs, !1);
|
|
23469
23469
|
m(this, Wi, 0);
|
|
23470
23470
|
m(this, Ji, 0);
|
|
23471
23471
|
m(this, rr, []);
|
|
23472
23472
|
m(this, kc, void 0);
|
|
23473
|
-
f(this, Ta, t), f(this,
|
|
23473
|
+
f(this, Ta, t), f(this, _t, t), f(this, wc, e), f(this, _c, r), f(this, Cc, i), f(this, ya, a), f(this, Ea, o), f(this, Rc, c), f(this, bc, d), f(this, Pa, l), f(this, kc, h), f(this, us, t / 2);
|
|
23474
23474
|
}
|
|
23475
23475
|
get voiceDetected() {
|
|
23476
23476
|
return n(this, hs);
|
|
@@ -23483,33 +23483,33 @@ const $l = class {
|
|
|
23483
23483
|
processAudioChunk(t) {
|
|
23484
23484
|
var o, c;
|
|
23485
23485
|
const e = I(o = $l, Ll, YS).call(o, t), r = I(c = $l, Vl, QS).call(c, t);
|
|
23486
|
-
return I(this, Ol, KS).call(this, e), e / n(this, us) > n(this, Pa) && e > n(this,
|
|
23486
|
+
return I(this, Ol, KS).call(this, e), e / n(this, us) > n(this, Pa) && e > n(this, _t) && r > n(this, wc) ? (f(this, Wi, n(this, Wi) + 1), f(this, Ji, n(this, Cc)), n(this, Wi) >= n(this, _c) && f(this, hs, !0)) : (f(this, Wi, 0), n(this, Ji) > 0 ? f(this, Ji, n(this, Ji) - 1) : n(this, hs) && f(this, hs, !1), n(this, hs) || I(this, Nl, zS).call(this, e)), { energy: e, isVoice: n(this, hs) };
|
|
23487
23487
|
}
|
|
23488
23488
|
/**
|
|
23489
23489
|
* Reset the detector state
|
|
23490
23490
|
*/
|
|
23491
23491
|
reset() {
|
|
23492
|
-
f(this, hs, !1), f(this, Wi, 0), f(this, Ji, 0), f(this,
|
|
23492
|
+
f(this, hs, !1), f(this, Wi, 0), f(this, Ji, 0), f(this, _t, n(this, Ta)), f(this, us, n(this, Ta) / 2), f(this, rr, []);
|
|
23493
23493
|
}
|
|
23494
23494
|
/**
|
|
23495
23495
|
* Get current adaptive threshold values for debugging/visualization
|
|
23496
23496
|
*/
|
|
23497
23497
|
getThresholdInfo() {
|
|
23498
23498
|
return {
|
|
23499
|
-
currentEnergyThreshold: n(this,
|
|
23499
|
+
currentEnergyThreshold: n(this, _t),
|
|
23500
23500
|
backgroundNoiseEnergy: n(this, us),
|
|
23501
23501
|
energyRatioThreshold: n(this, Pa)
|
|
23502
23502
|
};
|
|
23503
23503
|
}
|
|
23504
23504
|
};
|
|
23505
23505
|
let uo = $l;
|
|
23506
|
-
wc = new WeakMap(), _c = new WeakMap(), Cc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), Rc = new WeakMap(), bc = new WeakMap(), Pa = new WeakMap(),
|
|
23507
|
-
n(this, hs) ? f(this,
|
|
23506
|
+
wc = new WeakMap(), _c = new WeakMap(), Cc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), Rc = new WeakMap(), bc = new WeakMap(), Pa = new WeakMap(), _t = new WeakMap(), us = new WeakMap(), hs = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), rr = new WeakMap(), kc = new WeakMap(), Ol = new WeakSet(), KS = function(t) {
|
|
23507
|
+
n(this, hs) ? f(this, _t, n(this, Ea) * n(this, _t) + (1 - n(this, Ea)) * t) : f(this, _t, n(this, ya) * n(this, _t) + (1 - n(this, ya)) * n(this, us)), f(this, _t, Math.max(
|
|
23508
23508
|
n(this, Rc),
|
|
23509
|
-
Math.min(n(this, bc), n(this,
|
|
23509
|
+
Math.min(n(this, bc), n(this, _t))
|
|
23510
23510
|
));
|
|
23511
23511
|
}, Nl = new WeakSet(), zS = function(t) {
|
|
23512
|
-
if (t < n(this,
|
|
23512
|
+
if (t < n(this, _t) * 1.2)
|
|
23513
23513
|
if (n(this, rr).push(t), n(this, rr).length > n(this, kc) && n(this, rr).shift(), n(this, rr).length >= 10) {
|
|
23514
23514
|
const e = [...n(this, rr)].sort((i, a) => i - a), r = Math.floor(e.length / 2);
|
|
23515
23515
|
f(this, us, e[r]);
|
|
@@ -23686,7 +23686,7 @@ var EO = Object.defineProperty, PO = Object.getOwnPropertyDescriptor, ge = (s, t
|
|
|
23686
23686
|
for (var i = r > 1 ? void 0 : r ? PO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
23687
23687
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
23688
23688
|
return r && i && EO(t, e, i), i;
|
|
23689
|
-
}, Lc, Vc, Ke, j, Hl, gt, cr, Yi, Qi, $c, Lt, dr, mt,
|
|
23689
|
+
}, Lc, Vc, Ke, j, Hl, gt, cr, Yi, Qi, $c, Lt, dr, mt, ft, lr, gi, xc, Oh, Bl, tv, Fl, sv, jl, rv, Uc, Nh, ql, iv, Gl, nv, tt, ot, Xi, po, Wl, av, Jl, ov, Kl, cv, zl, dv;
|
|
23690
23690
|
class ce {
|
|
23691
23691
|
constructor(t, e) {
|
|
23692
23692
|
m(this, lr);
|
|
@@ -23740,13 +23740,13 @@ class ce {
|
|
|
23740
23740
|
m(this, Lt, null);
|
|
23741
23741
|
m(this, dr, void 0);
|
|
23742
23742
|
m(this, mt, void 0);
|
|
23743
|
-
m(this,
|
|
23743
|
+
m(this, ft, void 0);
|
|
23744
23744
|
var i, a;
|
|
23745
23745
|
this.context = t;
|
|
23746
23746
|
const {
|
|
23747
23747
|
socket: r
|
|
23748
23748
|
} = e;
|
|
23749
|
-
this.mediaJoined = !1, f(this, Ke, r), f(this, cr, !1), f(this, j, new vO(t, r)), f(this, gt, n(this, j).events), f(this, dr, /* @__PURE__ */ new Set()), f(this, mt, /* @__PURE__ */ new Map()), f(this, Yi, !1), f(this, Qi, new wh(t.getValue("logger"))), f(this,
|
|
23749
|
+
this.mediaJoined = !1, f(this, Ke, r), f(this, cr, !1), f(this, j, new vO(t, r)), f(this, gt, n(this, j).events), f(this, dr, /* @__PURE__ */ new Set()), f(this, mt, /* @__PURE__ */ new Map()), f(this, Yi, !1), f(this, Qi, new wh(t.getValue("logger"))), f(this, ft, new ho(
|
|
23750
23750
|
this.context,
|
|
23751
23751
|
n(this, j).socketHandler.audioActivity.bind(n(this, j).socketHandler)
|
|
23752
23752
|
)), this.e2ee = (a = (i = t.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? a : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, $c, lp(
|
|
@@ -23833,7 +23833,8 @@ class ce {
|
|
|
23833
23833
|
}
|
|
23834
23834
|
leaveRoom() {
|
|
23835
23835
|
return u(this, null, function* () {
|
|
23836
|
-
|
|
23836
|
+
var r;
|
|
23837
|
+
(r = n(this, ft)) == null || r.stop(), n(this, j).stopAllTransports(), f(this, Yi, !1), n(this, lr, gi).mediaJoinAttempted = !1;
|
|
23837
23838
|
const t = {
|
|
23838
23839
|
closeRoom: !1
|
|
23839
23840
|
};
|
|
@@ -23842,11 +23843,11 @@ class ce {
|
|
|
23842
23843
|
n(this, gt).leaveRoom,
|
|
23843
23844
|
UR.toBinary(t)
|
|
23844
23845
|
) || this.logger.warn("MediaNodeClient.leaveRoom: media leave was not sent");
|
|
23845
|
-
} catch (
|
|
23846
|
-
this.logger.error("MediaNodeClient.leaveRoom: media leave failed", { error:
|
|
23846
|
+
} catch (i) {
|
|
23847
|
+
this.logger.error("MediaNodeClient.leaveRoom: media leave failed", { error: i });
|
|
23847
23848
|
}
|
|
23848
|
-
this.context.getValue("callstats").callEnded(), this.context.getValue("telemetry").destruct().catch((
|
|
23849
|
-
this.logger.error("leaveRoom::telemetry_destruct_failed", { error:
|
|
23849
|
+
this.context.getValue("callstats").callEnded(), this.context.getValue("telemetry").destruct().catch((i) => {
|
|
23850
|
+
this.logger.error("leaveRoom::telemetry_destruct_failed", { error: i });
|
|
23850
23851
|
});
|
|
23851
23852
|
});
|
|
23852
23853
|
}
|
|
@@ -23959,7 +23960,7 @@ class ce {
|
|
|
23959
23960
|
if (n(this, j).producers.has(o)) {
|
|
23960
23961
|
const c = n(this, j).producers.get(o);
|
|
23961
23962
|
if (!c.closed) {
|
|
23962
|
-
yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this,
|
|
23963
|
+
yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this, ft) && (n(this, ft).audioTrack = t, n(this, ft).producerId = o, n(this, ft).start(!0));
|
|
23963
23964
|
return;
|
|
23964
23965
|
}
|
|
23965
23966
|
yield n(this, j).closeProducer(o, { stopTrack: !1 });
|
|
@@ -23974,7 +23975,7 @@ class ce {
|
|
|
23974
23975
|
i
|
|
23975
23976
|
);
|
|
23976
23977
|
I(this, Xi, po).call(this, we.MIC, a.then((o) => o.id)), yield a.then((o) => {
|
|
23977
|
-
n(this,
|
|
23978
|
+
n(this, ft) && (n(this, ft).audioTrack = o.track, n(this, ft).producerId = o.id, n(this, ft).start());
|
|
23978
23979
|
});
|
|
23979
23980
|
} catch (e) {
|
|
23980
23981
|
throw new R(e);
|
|
@@ -23993,7 +23994,7 @@ class ce {
|
|
|
23993
23994
|
this.logger.info("pauseMic::mic_producer_already_paused");
|
|
23994
23995
|
return;
|
|
23995
23996
|
}
|
|
23996
|
-
e.pause(), (i = n(this,
|
|
23997
|
+
e.pause(), (i = n(this, ft)) == null || i.stop();
|
|
23997
23998
|
const r = {
|
|
23998
23999
|
producerId: e.id,
|
|
23999
24000
|
pause: !0
|
|
@@ -24076,7 +24077,7 @@ class ce {
|
|
|
24076
24077
|
return u(this, null, function* () {
|
|
24077
24078
|
var e;
|
|
24078
24079
|
const t = yield I(this, tt, ot).call(this, we.MIC);
|
|
24079
|
-
t && (yield n(this, j).closeProducer(t)), (e = n(this,
|
|
24080
|
+
t && (yield n(this, j).closeProducer(t)), (e = n(this, ft)) == null || e.stop(), n(this, mt).delete(we.MIC);
|
|
24080
24081
|
});
|
|
24081
24082
|
}
|
|
24082
24083
|
disableScreenShare() {
|
|
@@ -24305,7 +24306,7 @@ class ce {
|
|
|
24305
24306
|
});
|
|
24306
24307
|
}
|
|
24307
24308
|
}
|
|
24308
|
-
Lc = new WeakMap(), Vc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), gt = new WeakMap(), cr = new WeakMap(), Yi = new WeakMap(), Qi = new WeakMap(), $c = new WeakMap(), Lt = new WeakMap(), dr = new WeakMap(), mt = new WeakMap(),
|
|
24309
|
+
Lc = new WeakMap(), Vc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), gt = new WeakMap(), cr = new WeakMap(), Yi = new WeakMap(), Qi = new WeakMap(), $c = new WeakMap(), Lt = new WeakMap(), dr = new WeakMap(), mt = new WeakMap(), ft = new WeakMap(), lr = new WeakSet(), gi = function() {
|
|
24309
24310
|
return this.context.getValue("connectionHandler");
|
|
24310
24311
|
}, xc = new WeakSet(), Oh = function(t) {
|
|
24311
24312
|
this.mediaJoined = !1, f(this, cr, !1), n(this, Ke).isConnected && this.peerId === t && this.context.getValue("peerSessionStore").emit(_.MEDIA_ROOM_JOIN_FAILED);
|
|
@@ -24578,14 +24579,14 @@ var _O = Object.defineProperty, CO = Object.getOwnPropertyDescriptor, vn = (s, t
|
|
|
24578
24579
|
for (var i = r > 1 ? void 0 : r ? CO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
|
|
24579
24580
|
(o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
|
|
24580
24581
|
return r && i && _O(t, e, i), i;
|
|
24581
|
-
}, Ra, es, Z,
|
|
24582
|
+
}, Ra, es, Z, St, It, _m;
|
|
24582
24583
|
const uv = (_m = class {
|
|
24583
24584
|
/**
|
|
24584
24585
|
* Use await SelfController.init(roomNodeClient) instead
|
|
24585
24586
|
*/
|
|
24586
24587
|
constructor(s, t, e, r) {
|
|
24587
24588
|
// eslint-disable-next-line class-methods-use-this
|
|
24588
|
-
m(this,
|
|
24589
|
+
m(this, St);
|
|
24589
24590
|
p(this, "self");
|
|
24590
24591
|
p(this, "authToken");
|
|
24591
24592
|
m(this, Ra, void 0);
|
|
@@ -24675,7 +24676,7 @@ const uv = (_m = class {
|
|
|
24675
24676
|
if (e.canProduceAudio === W.Allowed && r)
|
|
24676
24677
|
if ((s == null ? void 0 : s.readyState) === "live")
|
|
24677
24678
|
try {
|
|
24678
|
-
yield n(this,
|
|
24679
|
+
yield n(this, St, It).shareMic(s), this.self.audioEnabled || n(this, St, It).pauseMic();
|
|
24679
24680
|
} catch (d) {
|
|
24680
24681
|
this.self.disableAudio();
|
|
24681
24682
|
}
|
|
@@ -24684,7 +24685,7 @@ const uv = (_m = class {
|
|
|
24684
24685
|
if (e.canProduceVideo === W.Allowed && i)
|
|
24685
24686
|
if ((t == null ? void 0 : t.readyState) === "live")
|
|
24686
24687
|
try {
|
|
24687
|
-
yield n(this,
|
|
24688
|
+
yield n(this, St, It).shareWebcam(t), this.self.videoEnabled || n(this, St, It).pauseWebcam();
|
|
24688
24689
|
} catch (d) {
|
|
24689
24690
|
this.self.disableVideo();
|
|
24690
24691
|
}
|
|
@@ -24694,7 +24695,7 @@ const uv = (_m = class {
|
|
|
24694
24695
|
const d = o.video, l = o.audio;
|
|
24695
24696
|
if ((d == null ? void 0 : d.readyState) === "live")
|
|
24696
24697
|
try {
|
|
24697
|
-
yield (c = n(this,
|
|
24698
|
+
yield (c = n(this, St, It)) == null ? void 0 : c.shareScreen({
|
|
24698
24699
|
video: d,
|
|
24699
24700
|
audio: (l == null ? void 0 : l.readyState) === "live" ? l : void 0
|
|
24700
24701
|
});
|
|
@@ -24736,7 +24737,7 @@ const uv = (_m = class {
|
|
|
24736
24737
|
return u(this, null, function* () {
|
|
24737
24738
|
var r;
|
|
24738
24739
|
const { wasSocketJoinAttempted: t, wasMediaJoinAttempted: e } = s;
|
|
24739
|
-
n(this, Z).getValue("callstats").callEnded(), t || e ? (this.logger.info(`Resetting Self post reconnect. Peer has earlier tried joining the ${e ? "media room" : "socket room only"}. Not closing transports.`), yield this.joinRoom({ reconnected: !0, joinAttempts: s })) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (r = n(this,
|
|
24740
|
+
n(this, Z).getValue("callstats").callEnded(), t || e ? (this.logger.info(`Resetting Self post reconnect. Peer has earlier tried joining the ${e ? "media room" : "socket room only"}. Not closing transports.`), yield this.joinRoom({ reconnected: !0, joinAttempts: s })) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (r = n(this, St, It)) == null || r.reset({ resetTransportQueue: !0 }));
|
|
24740
24741
|
});
|
|
24741
24742
|
}
|
|
24742
24743
|
setupEvents() {
|
|
@@ -24842,7 +24843,7 @@ const uv = (_m = class {
|
|
|
24842
24843
|
throw this.logger.error("SelfController.joinRoom: socket join failed", { error: r }), new R("Check the network and try again.", "0002");
|
|
24843
24844
|
}
|
|
24844
24845
|
if (this.viewType === ms.Livestream && (t != null && t.wasSocketJoinAttempted) && !t.wasMediaJoinAttempted && n(this, Z).getValue("stageStatus") !== "ON_STAGE") {
|
|
24845
|
-
this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (e = n(this,
|
|
24846
|
+
this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (e = n(this, St, It)) == null || e.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s }), n(this, Z).notify("stageStatus");
|
|
24846
24847
|
return;
|
|
24847
24848
|
}
|
|
24848
24849
|
try {
|
|
@@ -24891,7 +24892,7 @@ const uv = (_m = class {
|
|
|
24891
24892
|
peerId: t
|
|
24892
24893
|
});
|
|
24893
24894
|
}
|
|
24894
|
-
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this,
|
|
24895
|
+
const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this, St, It)) == null ? void 0 : a.joinRoom(
|
|
24895
24896
|
this.self.name,
|
|
24896
24897
|
r,
|
|
24897
24898
|
s,
|
|
@@ -24912,7 +24913,7 @@ const uv = (_m = class {
|
|
|
24912
24913
|
leaveMediaRoom(s) {
|
|
24913
24914
|
return u(this, null, function* () {
|
|
24914
24915
|
const t = n(this, Z).getValue("viewType");
|
|
24915
|
-
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === ms.Webinar) && n(this,
|
|
24916
|
+
s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === ms.Webinar) && n(this, St, It) && (n(this, St, It).mediaJoined && s !== "disconnected" && (yield n(this, St, It).leaveRoom()), !(s === "stageLeft" && t === ms.Livestream) && (n(this, St, It).mediaJoined = !1));
|
|
24916
24917
|
});
|
|
24917
24918
|
}
|
|
24918
24919
|
cleanupSelf() {
|
|
@@ -24920,7 +24921,7 @@ const uv = (_m = class {
|
|
|
24920
24921
|
yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
|
|
24921
24922
|
});
|
|
24922
24923
|
}
|
|
24923
|
-
}, Ra = new WeakMap(), es = new WeakMap(), Z = new WeakMap(),
|
|
24924
|
+
}, Ra = new WeakMap(), es = new WeakMap(), Z = new WeakMap(), St = new WeakSet(), It = function() {
|
|
24924
24925
|
return n(this, Z).getValue("roomNodeClient");
|
|
24925
24926
|
}, _m);
|
|
24926
24927
|
let ui = uv;
|
|
@@ -26319,7 +26320,7 @@ var QO = Object.defineProperty, XO = Object.getOwnPropertyDescriptor, Eu = (s, t
|
|
|
26319
26320
|
return r && i && QO(t, e, i), i;
|
|
26320
26321
|
};
|
|
26321
26322
|
const am = 65535, ZO = 3, e1 = 15e3, t1 = 8e3, s1 = 50, r1 = 1e3, i1 = 1e4;
|
|
26322
|
-
var Ms, Ia, _e, st, ct, Qr, Xr, Zi, en, Zr, Ds, Os, ei, tn,
|
|
26323
|
+
var Ms, Ia, _e, st, ct, Qr, Xr, Zi, en, Zr, Ds, Os, ei, tn, vt, ti, Tt, Ue, jc, Bh, Yl, Iv, Ql, Av, Xl, Mv, qc, Fh, Gc, jh, sn, mo, Zl, ju, Dv, eu, Ov, Wc, qh, Jc, Gh, Kc, Wh, tu, Nv, zc, Jh, Yc, Kh;
|
|
26323
26324
|
const kv = (ju = class {
|
|
26324
26325
|
constructor(s, {
|
|
26325
26326
|
peerId: t,
|
|
@@ -26357,9 +26358,9 @@ const kv = (ju = class {
|
|
|
26357
26358
|
m(this, Os, void 0);
|
|
26358
26359
|
m(this, ei, void 0);
|
|
26359
26360
|
m(this, tn, void 0);
|
|
26360
|
-
m(this,
|
|
26361
|
+
m(this, vt, 0);
|
|
26361
26362
|
m(this, ti, void 0);
|
|
26362
|
-
m(this,
|
|
26363
|
+
m(this, Tt, !0);
|
|
26363
26364
|
m(this, Ue, void 0);
|
|
26364
26365
|
if (!t || !e || !r)
|
|
26365
26366
|
throw new R("peerId, meetingId, or authToken can not be empty", "0404");
|
|
@@ -26417,10 +26418,10 @@ const kv = (ju = class {
|
|
|
26417
26418
|
connect() {
|
|
26418
26419
|
return u(this, null, function* () {
|
|
26419
26420
|
var t;
|
|
26420
|
-
const s = n(this,
|
|
26421
|
-
f(this,
|
|
26421
|
+
const s = n(this, vt) + 1;
|
|
26422
|
+
f(this, vt, s), I(this, Wc, qh).call(this), f(this, Tt, !0), I(this, Xl, Mv).call(this);
|
|
26422
26423
|
try {
|
|
26423
|
-
if (yield n(this, _e).connect(), !n(this,
|
|
26424
|
+
if (yield n(this, _e).connect(), !n(this, Tt) || s !== n(this, vt))
|
|
26424
26425
|
throw new Error("Socket connection was canceled");
|
|
26425
26426
|
I(this, Gc, jh).call(this, this.peerId), (t = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, ct).socketState = {
|
|
26426
26427
|
state: "connected",
|
|
@@ -26428,12 +26429,12 @@ const kv = (ju = class {
|
|
|
26428
26429
|
reconnectionAttempt: void 0
|
|
26429
26430
|
};
|
|
26430
26431
|
} catch (e) {
|
|
26431
|
-
throw this.logger.error(`Websocket connection failed with URL: ${n(this, sn, mo)}`, { error: e }), n(this,
|
|
26432
|
+
throw this.logger.error(`Websocket connection failed with URL: ${n(this, sn, mo)}`, { error: e }), n(this, Tt) && s === n(this, vt) && I(this, Kc, Wh).call(this, s), e;
|
|
26432
26433
|
}
|
|
26433
26434
|
});
|
|
26434
26435
|
}
|
|
26435
26436
|
disconnect() {
|
|
26436
|
-
f(this,
|
|
26437
|
+
f(this, vt, n(this, vt) + 1), f(this, Tt, !1), I(this, Wc, qh).call(this), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, _e).disconnect(), n(this, st, ct).socketState = {
|
|
26437
26438
|
state: "disconnected",
|
|
26438
26439
|
reconnected: !1,
|
|
26439
26440
|
reconnectionAttempt: void 0
|
|
@@ -26547,15 +26548,15 @@ const kv = (ju = class {
|
|
|
26547
26548
|
var s;
|
|
26548
26549
|
this.logger.info(`Websocket connected with URL: ${n(this, sn, mo)}`), (s = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, ct).updateSocketConnectionState("connected");
|
|
26549
26550
|
})), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
|
|
26550
|
-
!n(this,
|
|
26551
|
+
!n(this, Tt) || n(this, ti) === n(this, vt) || (this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t } }), n(this, st, ct).updateSocketConnectionState("disconnected"), n(this, Ue).getValue("peerSessionStore").emit(
|
|
26551
26552
|
_.SOCKET_SERVICE_DISCONNECTED,
|
|
26552
26553
|
{ joinAttempted: n(this, st, ct).joinAttempted }
|
|
26553
|
-
), I(this, Kc, Wh).call(this, n(this,
|
|
26554
|
+
), I(this, Kc, Wh).call(this, n(this, vt)));
|
|
26554
26555
|
});
|
|
26555
26556
|
}
|
|
26556
26557
|
}, Ms = new WeakMap(), Ia = new WeakMap(), _e = new WeakMap(), st = new WeakSet(), ct = function() {
|
|
26557
26558
|
return n(this, Ue).getValue("connectionHandler");
|
|
26558
|
-
}, Qr = new WeakMap(), Xr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Zr = new WeakMap(), Ds = new WeakMap(), Os = new WeakMap(), ei = new WeakMap(), tn = new WeakMap(),
|
|
26559
|
+
}, Qr = new WeakMap(), Xr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Zr = new WeakMap(), Ds = new WeakMap(), Os = new WeakMap(), ei = new WeakMap(), tn = new WeakMap(), vt = new WeakMap(), ti = new WeakMap(), Tt = new WeakMap(), Ue = new WeakMap(), jc = new WeakSet(), Bh = function(s) {
|
|
26559
26560
|
let t = up({
|
|
26560
26561
|
servicePrefix: "ws",
|
|
26561
26562
|
baseURI: n(this, Ue).getValue("baseURI")
|
|
@@ -26648,22 +26649,22 @@ const kv = (ju = class {
|
|
|
26648
26649
|
var s;
|
|
26649
26650
|
n(this, ei) !== void 0 && (n(this, Os).clearTimeout(n(this, ei)), f(this, ei, void 0)), (s = n(this, tn)) == null || s.call(this), f(this, tn, void 0);
|
|
26650
26651
|
}, Jc = new WeakSet(), Gh = function(s, t) {
|
|
26651
|
-
!n(this,
|
|
26652
|
+
!n(this, Tt) || s !== n(this, vt) || (t && this.logger.error("SocketService::Reconnect loop failed", { error: t }), f(this, Tt, !1), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, st, ct).updateSocketConnectionState("failed"), n(this, Ue).getValue("peerSessionStore").emit(_.SOCKET_SERVICE_FAILED));
|
|
26652
26653
|
}, Kc = new WeakSet(), Wh = function(s) {
|
|
26653
|
-
!n(this,
|
|
26654
|
+
!n(this, Tt) || n(this, ti) === s || (f(this, ti, s), n(this, st, ct).updateSocketConnectionState("reconnecting"), I(this, tu, Nv).call(this, s).catch(
|
|
26654
26655
|
(t) => I(this, Jc, Gh).call(this, s, t)
|
|
26655
26656
|
));
|
|
26656
26657
|
}, tu = new WeakSet(), Nv = function(s) {
|
|
26657
26658
|
return u(this, null, function* () {
|
|
26658
26659
|
try {
|
|
26659
26660
|
for (let t = 1; t <= s1; t += 1) {
|
|
26660
|
-
if (!n(this,
|
|
26661
|
+
if (!n(this, Tt) || s !== n(this, vt) || (yield I(this, eu, Ov).call(this, t), !n(this, Tt) || s !== n(this, vt)))
|
|
26661
26662
|
return;
|
|
26662
26663
|
this.updateURL(ln()), this.logger.info("SocketService::Attempting to reconnect to socket-edge", {
|
|
26663
26664
|
socket: { retryAttempt: t }
|
|
26664
26665
|
}), n(this, st, ct).updateSocketConnectionState("reconnectAttempt", t);
|
|
26665
26666
|
try {
|
|
26666
|
-
if (yield n(this, _e).connect(!0), !n(this,
|
|
26667
|
+
if (yield n(this, _e).connect(!0), !n(this, Tt) || s !== n(this, vt))
|
|
26667
26668
|
return;
|
|
26668
26669
|
if (!this.isConnected)
|
|
26669
26670
|
throw new Error("Reconnect failed");
|
|
@@ -26676,7 +26677,7 @@ const kv = (ju = class {
|
|
|
26676
26677
|
);
|
|
26677
26678
|
return;
|
|
26678
26679
|
} catch (e) {
|
|
26679
|
-
if (!n(this,
|
|
26680
|
+
if (!n(this, Tt) || s !== n(this, vt))
|
|
26680
26681
|
return;
|
|
26681
26682
|
this.logger.error(
|
|
26682
26683
|
`Websocket connection retry attempt ${t} failed with URL: ${n(this, sn, mo)}`,
|
|
@@ -27568,7 +27569,7 @@ let oi = (Rm = class {
|
|
|
27568
27569
|
video: !0
|
|
27569
27570
|
};
|
|
27570
27571
|
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", AC({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
|
|
27571
|
-
})), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.
|
|
27572
|
+
})), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.4-staging.1"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new m1()), a;
|
|
27572
27573
|
}
|
|
27573
27574
|
join() {
|
|
27574
27575
|
return u(this, null, function* () {
|