@cloudflare/realtimekit 2.0.1-staging.2 → 2.0.2-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 +1 -1
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +66 -99
- package/dist/index.es5.js +382 -306
- package/dist/index.rn.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3604,7 +3604,7 @@ class Rv {
|
|
|
3604
3604
|
m(this, So, void 0);
|
|
3605
3605
|
}
|
|
3606
3606
|
/**
|
|
3607
|
-
* @
|
|
3607
|
+
* @private
|
|
3608
3608
|
* Not for external use
|
|
3609
3609
|
*/
|
|
3610
3610
|
get telemetry() {
|
|
@@ -6154,12 +6154,6 @@ const kp = 1080, Ap = 1920, ZC = (s, t, e, r, i, n) => {
|
|
|
6154
6154
|
};
|
|
6155
6155
|
var Ut, ni, Qe, $t, we, es, Ns, it, Me, Sn, vn, Ls, Tn;
|
|
6156
6156
|
const xh = class extends Ot {
|
|
6157
|
-
/**
|
|
6158
|
-
* @param {Context} context
|
|
6159
|
-
* @param {Self} self
|
|
6160
|
-
* @param {(string|HTMLImageElement)} [pin]
|
|
6161
|
-
* @param {(string|HTMLImageElement)} [handraise]
|
|
6162
|
-
*/
|
|
6163
6157
|
constructor(e, r, i, n) {
|
|
6164
6158
|
const o = e.getValue("logger");
|
|
6165
6159
|
super(o);
|
|
@@ -6185,27 +6179,35 @@ const xh = class extends Ot {
|
|
|
6185
6179
|
m(this, vn, void 0);
|
|
6186
6180
|
m(this, Ls, void 0);
|
|
6187
6181
|
m(this, Tn, !1);
|
|
6182
|
+
/** @access private */
|
|
6188
6183
|
p(this, "cleanupEventListeners", () => {
|
|
6189
6184
|
a(this, ni).unsubscribe("stageStatus", this.handlePipMediaControls), a(this, Me).removeListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Me).removeListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Me).removeListener("roomLeft", () => this.disable());
|
|
6190
6185
|
});
|
|
6186
|
+
/** @access private */
|
|
6191
6187
|
p(this, "enablePipMediaControls", () => {
|
|
6192
6188
|
this.mountAudioEvents(), this.mountVideoEvents();
|
|
6193
6189
|
});
|
|
6190
|
+
/** @access private */
|
|
6194
6191
|
p(this, "onSelfVideoUpdateListener", ({ videoEnabled: e }) => {
|
|
6195
6192
|
this.updateMediaSession("CAMERA", e);
|
|
6196
6193
|
});
|
|
6194
|
+
/** @access private */
|
|
6197
6195
|
p(this, "onSelfAudioUpdateListener", ({ audioEnabled: e }) => {
|
|
6198
6196
|
this.updateMediaSession("MIC", e);
|
|
6199
6197
|
});
|
|
6198
|
+
/** @access private */
|
|
6200
6199
|
p(this, "handlePipMediaControls", (e) => {
|
|
6201
6200
|
e === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
|
|
6202
6201
|
});
|
|
6202
|
+
/** @access private */
|
|
6203
6203
|
p(this, "eventCallback", (e) => {
|
|
6204
6204
|
e === "CAMERA" && (a(this, Me).videoEnabled ? a(this, Me).disableVideo() : a(this, Me).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (a(this, Me).audioEnabled ? a(this, Me).disableAudio() : a(this, Me).enableAudio(), this.emit("micToggled")), e === "END" && (a(this, ni).getValue("peerSessionStore").emit(b.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
|
|
6205
6205
|
});
|
|
6206
|
+
/** @access private */
|
|
6206
6207
|
p(this, "unmountEvents", () => {
|
|
6207
6208
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
|
|
6208
6209
|
});
|
|
6210
|
+
/** @access private */
|
|
6209
6211
|
p(this, "animate", () => {
|
|
6210
6212
|
if (!this.isActive && a(this, Ls) === "active") {
|
|
6211
6213
|
this.disable(!0);
|
|
@@ -6241,6 +6243,7 @@ const xh = class extends Ot {
|
|
|
6241
6243
|
return new xh(e, r, i, n);
|
|
6242
6244
|
});
|
|
6243
6245
|
}
|
|
6246
|
+
/** @access private */
|
|
6244
6247
|
setupIcon(e, r) {
|
|
6245
6248
|
return u(this, null, function* () {
|
|
6246
6249
|
switch (e) {
|
|
@@ -6265,6 +6268,7 @@ const xh = class extends Ot {
|
|
|
6265
6268
|
}
|
|
6266
6269
|
});
|
|
6267
6270
|
}
|
|
6271
|
+
/** @access private */
|
|
6268
6272
|
constructImage(e) {
|
|
6269
6273
|
const r = new Image(), i = new Blob([e], { type: "image/svg+xml" }), n = window.URL.createObjectURL(i);
|
|
6270
6274
|
return new Promise((o) => {
|
|
@@ -6273,31 +6277,38 @@ const xh = class extends Ot {
|
|
|
6273
6277
|
}, r.src = n;
|
|
6274
6278
|
});
|
|
6275
6279
|
}
|
|
6280
|
+
/** @access private */
|
|
6276
6281
|
createVideoContainer() {
|
|
6277
6282
|
S(this, Qe, document.createElement("div")), a(this, Qe).style.width = "0.1px", a(this, Qe).style.height = "0.1px", a(this, Qe).style.overflow = "hidden", a(this, Qe).style.position = "absolute", a(this, Qe).style.bottom = "0", a(this, Qe).style.right = "0", a(this, Qe).style.opacity = "0", a(this, Qe).appendChild(a(this, $t));
|
|
6278
6283
|
}
|
|
6284
|
+
/** @access private */
|
|
6279
6285
|
setupEventListeners() {
|
|
6280
6286
|
a(this, ni).subscribe("stageStatus", this.handlePipMediaControls), a(this, Me).addListener("videoUpdate", this.onSelfVideoUpdateListener), a(this, Me).addListener("audioUpdate", this.onSelfAudioUpdateListener), a(this, Me).addListener("roomLeft", () => this.disable());
|
|
6281
6287
|
}
|
|
6288
|
+
/** @access private */
|
|
6282
6289
|
createCanvas() {
|
|
6283
6290
|
const e = document.createElement("canvas");
|
|
6284
6291
|
e.height = a(this, we).height, e.width = a(this, we).width, S(this, Ut, e);
|
|
6285
6292
|
}
|
|
6293
|
+
/** @access private */
|
|
6286
6294
|
setupMediaSessionEvents() {
|
|
6287
6295
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", () => {
|
|
6288
6296
|
this.eventCallback("END");
|
|
6289
6297
|
}), this.mountAudioEvents(), this.mountVideoEvents());
|
|
6290
6298
|
}
|
|
6299
|
+
/** @access private */
|
|
6291
6300
|
mountAudioEvents() {
|
|
6292
6301
|
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || a(this, Me).permissions.canProduceAudio && navigator.mediaSession.setActionHandler("togglemicrophone", () => {
|
|
6293
6302
|
this.eventCallback("MIC");
|
|
6294
6303
|
});
|
|
6295
6304
|
}
|
|
6305
|
+
/** @access private */
|
|
6296
6306
|
mountVideoEvents() {
|
|
6297
6307
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || a(this, Me).permissions.canProduceVideo && navigator.mediaSession.setActionHandler("togglecamera", () => {
|
|
6298
6308
|
this.eventCallback("CAMERA");
|
|
6299
6309
|
});
|
|
6300
6310
|
}
|
|
6311
|
+
/** @access private */
|
|
6301
6312
|
getSources() {
|
|
6302
6313
|
const r = Object.values(a(this, it)).reduce(
|
|
6303
6314
|
(i, n) => (i[n.pinned ? "pinned" : "regular"].push(n), i),
|
|
@@ -6305,6 +6316,7 @@ const xh = class extends Ot {
|
|
|
6305
6316
|
);
|
|
6306
6317
|
return [...r.pinned, ...r.regular];
|
|
6307
6318
|
}
|
|
6319
|
+
/** @access private */
|
|
6308
6320
|
drawEmptyTile(e, r, i, n) {
|
|
6309
6321
|
if (a(this, Ut) === void 0)
|
|
6310
6322
|
return;
|
|
@@ -6325,6 +6337,7 @@ const xh = class extends Ot {
|
|
|
6325
6337
|
U * 2
|
|
6326
6338
|
), o.restore()) : R && (o.fillStyle = a(this, es).textOnBrand, o.font = `${U / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(R, B, F)), this.drawIcons(n, _, w, Math.max(h, g)));
|
|
6327
6339
|
}
|
|
6340
|
+
/** @access private */
|
|
6328
6341
|
drawIcons(e, r, i, n) {
|
|
6329
6342
|
const o = Math.min(Math.max(n * 0.15, 100), 200), d = o * 0.2, c = o * 0.2;
|
|
6330
6343
|
let l = r + d;
|
|
@@ -6346,6 +6359,7 @@ const xh = class extends Ot {
|
|
|
6346
6359
|
};
|
|
6347
6360
|
e.pinned && g(a(this, Sn)), e.handRaised && g(a(this, vn)), e.reaction && g(e.reaction);
|
|
6348
6361
|
}
|
|
6362
|
+
/** @access private */
|
|
6349
6363
|
drawTile(e, r, i) {
|
|
6350
6364
|
var l, h;
|
|
6351
6365
|
if (a(this, Ut) === void 0)
|
|
@@ -6372,6 +6386,7 @@ const xh = class extends Ot {
|
|
|
6372
6386
|
d += r;
|
|
6373
6387
|
}
|
|
6374
6388
|
}
|
|
6389
|
+
/** @access private */
|
|
6375
6390
|
calcGridElemSize(e) {
|
|
6376
6391
|
switch (e) {
|
|
6377
6392
|
case 0:
|
|
@@ -6393,6 +6408,7 @@ const xh = class extends Ot {
|
|
|
6393
6408
|
return [Math.floor(a(this, we).width / 3), Math.floor(a(this, we).height / 2)];
|
|
6394
6409
|
}
|
|
6395
6410
|
}
|
|
6411
|
+
/** @access private */
|
|
6396
6412
|
paintCanvas() {
|
|
6397
6413
|
let e = this.getSources().length;
|
|
6398
6414
|
e !== 1 && (e = e % 2 > 0 ? e + 1 : e);
|
|
@@ -6406,6 +6422,7 @@ const xh = class extends Ot {
|
|
|
6406
6422
|
get isActive() {
|
|
6407
6423
|
return document.pictureInPictureElement !== null;
|
|
6408
6424
|
}
|
|
6425
|
+
/** @access private */
|
|
6409
6426
|
cleanup() {
|
|
6410
6427
|
if (S(this, Tn, !1), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), a(this, Qe))
|
|
6411
6428
|
try {
|
|
@@ -6440,6 +6457,7 @@ const xh = class extends Ot {
|
|
|
6440
6457
|
}
|
|
6441
6458
|
}, this.createVideoContainer(), this.paintCanvas();
|
|
6442
6459
|
}
|
|
6460
|
+
/** @access private */
|
|
6443
6461
|
updateMediaSession(e, r) {
|
|
6444
6462
|
navigator.mediaSession !== void 0 && (e === "CAMERA" && navigator.mediaSession.setCameraActive !== void 0 && navigator.mediaSession.setCameraActive(r), e === "MIC" && navigator.mediaSession.setMicrophoneActive !== void 0 && navigator.mediaSession.setMicrophoneActive(r));
|
|
6445
6463
|
}
|
|
@@ -6452,6 +6470,7 @@ const xh = class extends Ot {
|
|
|
6452
6470
|
disableSource(e) {
|
|
6453
6471
|
a(this, it)[e] !== void 0 && (a(this, it)[e].enabled = !1);
|
|
6454
6472
|
}
|
|
6473
|
+
/** @access private */
|
|
6455
6474
|
generateAvatar(e, r) {
|
|
6456
6475
|
return u(this, null, function* () {
|
|
6457
6476
|
if (!r)
|
|
@@ -12362,12 +12381,6 @@ var h0 = Object.defineProperty, p0 = Object.getOwnPropertyDescriptor, bs = (s, t
|
|
|
12362
12381
|
const g0 = ["text", "image", "file", "custom", "poll"], Yc = { maxInvocations: 180, period: 60 };
|
|
12363
12382
|
var te, ai, Je, En, Ed, pf, vo, yu, pg;
|
|
12364
12383
|
let zt = (pg = class extends Ot {
|
|
12365
|
-
/**
|
|
12366
|
-
* @param {Context} context
|
|
12367
|
-
* @param {ChatSocketHandler} chatSocketHandler
|
|
12368
|
-
* @param {Self} self
|
|
12369
|
-
* @param {Participants} participants
|
|
12370
|
-
*/
|
|
12371
12384
|
constructor(t, e, r, i) {
|
|
12372
12385
|
const n = t.getValue("logger");
|
|
12373
12386
|
super(n);
|
|
@@ -12395,7 +12408,7 @@ let zt = (pg = class extends Ot {
|
|
|
12395
12408
|
S(this, En, t), S(this, Je, e), S(this, te, r), S(this, ai, i), this.messages = [];
|
|
12396
12409
|
}
|
|
12397
12410
|
/**
|
|
12398
|
-
* @
|
|
12411
|
+
* @private
|
|
12399
12412
|
* Not for external use
|
|
12400
12413
|
*/
|
|
12401
12414
|
get telemetry() {
|
|
@@ -12412,6 +12425,7 @@ let zt = (pg = class extends Ot {
|
|
|
12412
12425
|
* @param {MessagePayload} message - Message payload to send.
|
|
12413
12426
|
* @param {string[]} [participantIds] - Participant ids to send the message to.
|
|
12414
12427
|
*/
|
|
12428
|
+
/** @access private */
|
|
12415
12429
|
sendMessageInternal(t, e) {
|
|
12416
12430
|
return u(this, null, function* () {
|
|
12417
12431
|
switch (t.type) {
|
|
@@ -12437,6 +12451,7 @@ let zt = (pg = class extends Ot {
|
|
|
12437
12451
|
* @param {string} message - Text message to send.
|
|
12438
12452
|
* @param {string[]} [peerIds] - Peer ids to send the message to.
|
|
12439
12453
|
*/
|
|
12454
|
+
/** @access private */
|
|
12440
12455
|
sendTextMessageInternal(t, e) {
|
|
12441
12456
|
return u(this, null, function* () {
|
|
12442
12457
|
var i, n, o, d, c, l;
|
|
@@ -12461,6 +12476,7 @@ let zt = (pg = class extends Ot {
|
|
|
12461
12476
|
* @param {(File|ReactNativeFile)} image - Image file to send.
|
|
12462
12477
|
* @param {string[]} [peerIds] - Peer ids to send the message to.
|
|
12463
12478
|
*/
|
|
12479
|
+
/** @access private */
|
|
12464
12480
|
sendImageMessageInternal(t, e) {
|
|
12465
12481
|
return u(this, null, function* () {
|
|
12466
12482
|
var i, n, o, d, c, l;
|
|
@@ -12499,6 +12515,7 @@ let zt = (pg = class extends Ot {
|
|
|
12499
12515
|
* @param {(File|ReactNativeFile)} file - File to send.
|
|
12500
12516
|
* @param {string[]} [peerIds] - Peer ids to send the message to.
|
|
12501
12517
|
*/
|
|
12518
|
+
/** @access private */
|
|
12502
12519
|
sendFileMessageInternal(t, e) {
|
|
12503
12520
|
return u(this, null, function* () {
|
|
12504
12521
|
var r, i, n, o, d, c;
|
|
@@ -13246,13 +13263,6 @@ var C0 = Object.defineProperty, w0 = Object.getOwnPropertyDescriptor, R0 = (s, t
|
|
|
13246
13263
|
return r && i && C0(t, e, i), i;
|
|
13247
13264
|
}, Sf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Sf || {}), wn, yo, _u, di, Eo, Sg;
|
|
13248
13265
|
let Pu = (Sg = class extends Ot {
|
|
13249
|
-
/**
|
|
13250
|
-
* @param {Context} context
|
|
13251
|
-
* @param {Self} self
|
|
13252
|
-
* @param {string} viewType
|
|
13253
|
-
* @param {RoomSocketHandler} roomSocketHandler
|
|
13254
|
-
* @param {string} meetingTitle
|
|
13255
|
-
*/
|
|
13256
13266
|
constructor(t, e, r, i, n) {
|
|
13257
13267
|
const o = t.getValue("logger");
|
|
13258
13268
|
super(o);
|
|
@@ -13324,6 +13334,7 @@ let Pu = (Sg = class extends Ot {
|
|
|
13324
13334
|
}
|
|
13325
13335
|
}), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = a(this, di).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
|
|
13326
13336
|
}
|
|
13337
|
+
/** @access private */
|
|
13327
13338
|
assertActiveTabToRoom() {
|
|
13328
13339
|
a(this, Eo).broadcastMessage("spotlight", {
|
|
13329
13340
|
userId: a(this, di).userId,
|
|
@@ -13359,7 +13370,7 @@ let qr = (vg = class extends Ot {
|
|
|
13359
13370
|
S(this, Po, t), this.transcripts = [];
|
|
13360
13371
|
}
|
|
13361
13372
|
/**
|
|
13362
|
-
* @
|
|
13373
|
+
* @private
|
|
13363
13374
|
* Not for external use
|
|
13364
13375
|
*/
|
|
13365
13376
|
get telemetry() {
|
|
@@ -13678,13 +13689,6 @@ var O0 = Object.defineProperty, N0 = Object.getOwnPropertyDescriptor, Qi = (s, t
|
|
|
13678
13689
|
return r && i && O0(t, e, i), i;
|
|
13679
13690
|
}, Bt, Cd, ie, _o, ms, Ue, Co, Cu, bn, Qc;
|
|
13680
13691
|
class Kr extends Ot {
|
|
13681
|
-
/**
|
|
13682
|
-
* @param {Context} context
|
|
13683
|
-
* @param {Self} self
|
|
13684
|
-
* @param {Participants} participants
|
|
13685
|
-
* @param {StageSocketHandler} stageSocketHandler
|
|
13686
|
-
* @param {RoomSocketHandler} roomSocketHandler
|
|
13687
|
-
*/
|
|
13688
13692
|
constructor(e, r, i, n, o) {
|
|
13689
13693
|
const d = e.getValue("logger");
|
|
13690
13694
|
super(d);
|
|
@@ -13703,7 +13707,7 @@ class Kr extends Ot {
|
|
|
13703
13707
|
S(this, Ue, e), S(this, Bt, n), S(this, Cd, o), S(this, ie, r), S(this, _o, i), S(this, ms, []), this.setupEvents();
|
|
13704
13708
|
}
|
|
13705
13709
|
/**
|
|
13706
|
-
* @
|
|
13710
|
+
* @private
|
|
13707
13711
|
* Not for external use
|
|
13708
13712
|
*/
|
|
13709
13713
|
get telemetry() {
|
|
@@ -13712,6 +13716,7 @@ class Kr extends Ot {
|
|
|
13712
13716
|
get status() {
|
|
13713
13717
|
return a(this, Ue).getValue("stageStatus");
|
|
13714
13718
|
}
|
|
13719
|
+
/** @access private */
|
|
13715
13720
|
setupEvents() {
|
|
13716
13721
|
const e = {
|
|
13717
13722
|
/**
|
|
@@ -14082,18 +14087,12 @@ let go = (yg = class extends Ta {
|
|
|
14082
14087
|
return a(this, bo);
|
|
14083
14088
|
}
|
|
14084
14089
|
/**
|
|
14085
|
-
* @
|
|
14090
|
+
* @private
|
|
14086
14091
|
* Not for external use
|
|
14087
14092
|
*/
|
|
14088
14093
|
get telemetry() {
|
|
14089
14094
|
return a(this, Ro).getValue("telemetry");
|
|
14090
14095
|
}
|
|
14091
|
-
/**
|
|
14092
|
-
* @param {Context} context
|
|
14093
|
-
* @param {ClientPluginConfig} config
|
|
14094
|
-
* @param {Store} activePluginsStore
|
|
14095
|
-
* @param {Self} self
|
|
14096
|
-
*/
|
|
14097
14096
|
set activePluginsStore(t) {
|
|
14098
14097
|
S(this, Vs, t);
|
|
14099
14098
|
}
|
|
@@ -14274,9 +14273,6 @@ var H0 = Object.defineProperty, F0 = Object.getOwnPropertyDescriptor, q0 = (s, t
|
|
|
14274
14273
|
return r && i && H0(t, e, i), i;
|
|
14275
14274
|
};
|
|
14276
14275
|
let wu = class {
|
|
14277
|
-
/**
|
|
14278
|
-
* @param {Logger} logger
|
|
14279
|
-
*/
|
|
14280
14276
|
constructor(s) {
|
|
14281
14277
|
/**
|
|
14282
14278
|
* All plugins accessible by the current user.
|
|
@@ -14518,7 +14514,7 @@ let Ji = (Pg = class extends Ot {
|
|
|
14518
14514
|
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";
|
|
14519
14515
|
}
|
|
14520
14516
|
/**
|
|
14521
|
-
* @
|
|
14517
|
+
* @private
|
|
14522
14518
|
* Not for external use
|
|
14523
14519
|
*/
|
|
14524
14520
|
get telemetry() {
|
|
@@ -16663,9 +16659,6 @@ const MM = Ic, eg = _s(
|
|
|
16663
16659
|
);
|
|
16664
16660
|
var at, Ti, Vo, Nn;
|
|
16665
16661
|
const cn = class {
|
|
16666
|
-
/**
|
|
16667
|
-
* @param {PresetV2CamelCased} preset
|
|
16668
|
-
*/
|
|
16669
16662
|
constructor(t) {
|
|
16670
16663
|
m(this, at, void 0);
|
|
16671
16664
|
m(this, Ti, void 0);
|
|
@@ -16682,7 +16675,9 @@ const cn = class {
|
|
|
16682
16675
|
static fromResponse(t) {
|
|
16683
16676
|
return new cn(t);
|
|
16684
16677
|
}
|
|
16685
|
-
/**
|
|
16678
|
+
/**
|
|
16679
|
+
* @deprecated. Use init()
|
|
16680
|
+
*/
|
|
16686
16681
|
static default() {
|
|
16687
16682
|
return new cn(eg);
|
|
16688
16683
|
}
|
|
@@ -16843,10 +16838,6 @@ var DM = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, If = (s, t
|
|
|
16843
16838
|
return r && i && DM(t, e, i), i;
|
|
16844
16839
|
}, Ln, xo;
|
|
16845
16840
|
class wh extends Ot {
|
|
16846
|
-
/**
|
|
16847
|
-
* @param {Context} context
|
|
16848
|
-
* @param {Self} self
|
|
16849
|
-
*/
|
|
16850
16841
|
constructor(e, r) {
|
|
16851
16842
|
const i = e.getValue("logger");
|
|
16852
16843
|
super(i);
|
|
@@ -16859,19 +16850,21 @@ class wh extends Ot {
|
|
|
16859
16850
|
S(this, Ln, r), S(this, xo, e), this.viewerCount = 0;
|
|
16860
16851
|
}
|
|
16861
16852
|
/**
|
|
16862
|
-
* @
|
|
16853
|
+
* @private
|
|
16863
16854
|
* Not for external use
|
|
16864
16855
|
*/
|
|
16865
16856
|
get telemetry() {
|
|
16866
16857
|
return a(this, xo).getValue("telemetry");
|
|
16867
16858
|
}
|
|
16868
16859
|
/**
|
|
16860
|
+
* @access private
|
|
16869
16861
|
* @param {LivestreamState} livestreamState
|
|
16870
16862
|
*/
|
|
16871
16863
|
setLivestreamState(e) {
|
|
16872
16864
|
const r = this.state;
|
|
16873
16865
|
this.state = e, r !== e && this.emitCurrentLivestreamState();
|
|
16874
16866
|
}
|
|
16867
|
+
/** @access private */
|
|
16875
16868
|
emitCurrentLivestreamState() {
|
|
16876
16869
|
this.emit("livestreamUpdate", this.state);
|
|
16877
16870
|
}
|
|
@@ -17031,12 +17024,6 @@ var xM = Object.defineProperty, UM = Object.getOwnPropertyDescriptor, Mc = (s, t
|
|
|
17031
17024
|
return r && i && xM(t, e, i), i;
|
|
17032
17025
|
}, Ke, Cr, wr, bd, Df;
|
|
17033
17026
|
class Ea {
|
|
17034
|
-
/**
|
|
17035
|
-
* @param {Object} args
|
|
17036
|
-
* @param {string} args.name
|
|
17037
|
-
* @param {StoresSocketHandler} args.socketHandler
|
|
17038
|
-
* @param {string} args.meetingId
|
|
17039
|
-
*/
|
|
17040
17027
|
constructor({ name: t, socketHandler: e, meetingId: r }) {
|
|
17041
17028
|
m(this, bd);
|
|
17042
17029
|
p(this, "name", "");
|
|
@@ -17071,6 +17058,7 @@ class Ea {
|
|
|
17071
17058
|
));
|
|
17072
17059
|
});
|
|
17073
17060
|
}
|
|
17061
|
+
/** @access private */
|
|
17074
17062
|
remoteSet(t, e) {
|
|
17075
17063
|
a(this, wr).storeInsertKeys(a(this, Cr), this.name, [{ key: t, payload: e }]);
|
|
17076
17064
|
}
|
|
@@ -17344,12 +17332,6 @@ var BM = Object.defineProperty, HM = Object.getOwnPropertyDescriptor, Pa = (s, t
|
|
|
17344
17332
|
const FM = 0.8, qM = 1.2;
|
|
17345
17333
|
var Un, $n, wt, yi, ja, kr, rn, Ei, Ga, Ad, Nf, $s, Bo, Ar, Pi, Wa, Bs, Id, Ho, Mu, Md, Lf, Dd, Vf, Cg;
|
|
17346
17334
|
let ir = (Cg = class extends Ot {
|
|
17347
|
-
/**
|
|
17348
|
-
* @param {Context} context
|
|
17349
|
-
* @param {IParticipant} participant
|
|
17350
|
-
* @param {Self} self
|
|
17351
|
-
* @param {RoomSocketHandler} roomSocket
|
|
17352
|
-
*/
|
|
17353
17335
|
constructor(t, e, r, i) {
|
|
17354
17336
|
const n = t.getValue("logger");
|
|
17355
17337
|
super(n);
|
|
@@ -17387,7 +17369,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17387
17369
|
p(this, "picture");
|
|
17388
17370
|
p(this, "isHost");
|
|
17389
17371
|
/**
|
|
17390
|
-
* The custom id of the participant set during
|
|
17372
|
+
* The custom id of the participant set during https://developers.cloudflare.com/api/resources/realtime_kit/subresources/meetings/methods/add_participant REST API
|
|
17391
17373
|
*/
|
|
17392
17374
|
p(this, "customParticipantId");
|
|
17393
17375
|
p(this, "flags");
|
|
@@ -17496,13 +17478,14 @@ let ir = (Cg = class extends Ot {
|
|
|
17496
17478
|
return a(this, $n);
|
|
17497
17479
|
}
|
|
17498
17480
|
/**
|
|
17499
|
-
* @
|
|
17481
|
+
* @private
|
|
17500
17482
|
* Not for external use
|
|
17501
17483
|
*/
|
|
17502
17484
|
get telemetry() {
|
|
17503
17485
|
return a(this, wt).getValue("telemetry");
|
|
17504
17486
|
}
|
|
17505
17487
|
/**
|
|
17488
|
+
* @access private
|
|
17506
17489
|
* @param {boolean} videoEnabled
|
|
17507
17490
|
* @param {boolean} [emitEvent=true]
|
|
17508
17491
|
*/
|
|
@@ -17513,6 +17496,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17513
17496
|
}));
|
|
17514
17497
|
}
|
|
17515
17498
|
/**
|
|
17499
|
+
* @access private
|
|
17516
17500
|
* @param {boolean} audioEnabled
|
|
17517
17501
|
* @param {boolean} [emitEvent=true]
|
|
17518
17502
|
*/
|
|
@@ -17523,6 +17507,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17523
17507
|
}));
|
|
17524
17508
|
}
|
|
17525
17509
|
/**
|
|
17510
|
+
* @access private
|
|
17526
17511
|
* @param {boolean} screenShareEnabled
|
|
17527
17512
|
* @param {boolean} [emitEvent=true]
|
|
17528
17513
|
*/
|
|
@@ -17532,6 +17517,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17532
17517
|
screenShareTracks: this.screenShareTracks
|
|
17533
17518
|
});
|
|
17534
17519
|
}
|
|
17520
|
+
/** @access private */
|
|
17535
17521
|
setupEvents() {
|
|
17536
17522
|
this.on("videoUpdate", V(this, Ho, Mu)), a(this, kr, rn) && (this.on("audioUpdate", V(this, Md, Lf)), this.on("screenShareUpdate", V(this, Dd, Vf)));
|
|
17537
17523
|
}
|
|
@@ -17563,9 +17549,9 @@ let ir = (Cg = class extends Ot {
|
|
|
17563
17549
|
}
|
|
17564
17550
|
/**
|
|
17565
17551
|
* @access private
|
|
17566
|
-
* Not for external use
|
|
17567
17552
|
* @param {boolean} isPinned
|
|
17568
17553
|
* @param {boolean} [emitEvent=true]
|
|
17554
|
+
* Not for external use.
|
|
17569
17555
|
*/
|
|
17570
17556
|
setIsPinned(t, e = !0) {
|
|
17571
17557
|
var i;
|
|
@@ -17684,6 +17670,7 @@ let ir = (Cg = class extends Ot {
|
|
|
17684
17670
|
* Internal method, do not use
|
|
17685
17671
|
* @param {HTMLVideoElement} e
|
|
17686
17672
|
*/
|
|
17673
|
+
/** @access private */
|
|
17687
17674
|
updateVideo(t) {
|
|
17688
17675
|
var e;
|
|
17689
17676
|
if (this.videoEnabled) {
|
|
@@ -17736,10 +17723,6 @@ ir = Pa([
|
|
|
17736
17723
|
rt("1200")
|
|
17737
17724
|
], ir);
|
|
17738
17725
|
class qa extends Pf {
|
|
17739
|
-
/**
|
|
17740
|
-
* @param {Logger} logger
|
|
17741
|
-
* @param {MapEvents} [options]
|
|
17742
|
-
*/
|
|
17743
17726
|
constructor(t, e) {
|
|
17744
17727
|
const {
|
|
17745
17728
|
onAddEvent: r = "participantJoined",
|
|
@@ -17872,6 +17855,7 @@ class WM {
|
|
|
17872
17855
|
get activeSpeakerPeers() {
|
|
17873
17856
|
return Array.from(this._activeSpeakerPeers);
|
|
17874
17857
|
}
|
|
17858
|
+
/** @access private */
|
|
17875
17859
|
_removeFromCompulsoryPeer(t) {
|
|
17876
17860
|
this._compulsoryPeers.delete(t);
|
|
17877
17861
|
}
|
|
@@ -17885,14 +17869,6 @@ var JM = Object.defineProperty, KM = Object.getOwnPropertyDescriptor, ks = (s, t
|
|
|
17885
17869
|
const zM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
17886
17870
|
var be, Fo, Du, _i, Ja, Bn, Zc, Ci, ht, wg;
|
|
17887
17871
|
let Yt = (wg = class extends Ot {
|
|
17888
|
-
/**
|
|
17889
|
-
* This constructs a new Participant object and maintains
|
|
17890
|
-
* the maps of active/joined/waitlisted/pinned/selectedPeers maps.
|
|
17891
|
-
* self : Self
|
|
17892
|
-
* @param {Context} context
|
|
17893
|
-
* @param {Self} self
|
|
17894
|
-
* @param {RoomSocketHandler} roomSocketHandler
|
|
17895
|
-
*/
|
|
17896
17872
|
constructor(t, e, r) {
|
|
17897
17873
|
const i = t.getValue("logger");
|
|
17898
17874
|
super(i);
|
|
@@ -17986,7 +17962,7 @@ let Yt = (wg = class extends Ot {
|
|
|
17986
17962
|
this.rateLimitConfig.maxInvocations = t, this.rateLimitConfig.period = e;
|
|
17987
17963
|
}
|
|
17988
17964
|
/**
|
|
17989
|
-
* @
|
|
17965
|
+
* @private
|
|
17990
17966
|
* Not for external use
|
|
17991
17967
|
*/
|
|
17992
17968
|
get telemetry() {
|
|
@@ -19414,6 +19390,7 @@ const Nd = class extends Ot {
|
|
|
19414
19390
|
throw this.logger.error("PermissionPreset::load_preset_permissions_failed"), new k("Could not load preset permissions.", "0904");
|
|
19415
19391
|
S(this, qn, e), S(this, Fn, i), S(this, Y, r), n && this.setupEvents();
|
|
19416
19392
|
}
|
|
19393
|
+
/** @access private */
|
|
19417
19394
|
setupEvents() {
|
|
19418
19395
|
a(this, qn).getValue("peerSessionStore").on(b.UPDATE_PERMISSIONS, a(this, Od));
|
|
19419
19396
|
}
|
|
@@ -19668,10 +19645,6 @@ Y = new WeakMap(), Fn = new WeakMap(), qn = new WeakMap(), Od = new WeakMap(), o
|
|
|
19668
19645
|
};
|
|
19669
19646
|
var Rt;
|
|
19670
19647
|
class $f extends Ot {
|
|
19671
|
-
/**
|
|
19672
|
-
* @param {Context} context
|
|
19673
|
-
* @param {Logger} logger
|
|
19674
|
-
*/
|
|
19675
19648
|
constructor(e, r) {
|
|
19676
19649
|
super(r);
|
|
19677
19650
|
p(this, "localMediaHandler");
|
|
@@ -19734,14 +19707,7 @@ class $f extends Ot {
|
|
|
19734
19707
|
var e;
|
|
19735
19708
|
return (e = a(this, Rt)) == null ? void 0 : e.getValue("peerId");
|
|
19736
19709
|
}
|
|
19737
|
-
/**
|
|
19738
|
-
* @param {Object} options
|
|
19739
|
-
* @param {boolean} [options.video]
|
|
19740
|
-
* @param {boolean} [options.audio]
|
|
19741
|
-
* @param {MediaConstraints} [options.constraints]
|
|
19742
|
-
* @param {boolean} [skipAwaits=false]
|
|
19743
|
-
* @param {Context} [context=null]
|
|
19744
|
-
*/
|
|
19710
|
+
/** @access private */
|
|
19745
19711
|
init() {
|
|
19746
19712
|
return u(this, arguments, function* (e = {}, r = !1, i = null) {
|
|
19747
19713
|
var n, o, d, c, l, h, g;
|
|
@@ -20125,7 +20091,7 @@ let We = (bg = class extends $f {
|
|
|
20125
20091
|
S(this, Be, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = e.customParticipantId, this.waitlistStatus = "none", S(this, ct, r), S(this, jn, i), this.hidden = !1, S(this, Gn, !1), this.organizationId = e.organizationId, this.supportsRemoteControl = Se.isElectron(), this.device = Se.getDeviceInfo(), this.presetName = n, this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), V(this, qo, Nu).call(this);
|
|
20126
20092
|
}
|
|
20127
20093
|
/**
|
|
20128
|
-
* @
|
|
20094
|
+
* @private
|
|
20129
20095
|
* Not for external use
|
|
20130
20096
|
*/
|
|
20131
20097
|
get telemetry() {
|
|
@@ -20165,6 +20131,7 @@ let We = (bg = class extends $f {
|
|
|
20165
20131
|
cleanupEvents() {
|
|
20166
20132
|
this.removeAllListeners("videoUpdate"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("VIDEO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_LIST_UPDATED"), this.localMediaHandler.removeAllListeners("SCREENSHARE_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("SCREENSHARE_ENDED"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_SILENT"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_AUDIO"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_VIDEO"), a(this, ct).removeAllListeners("permissionsUpdate");
|
|
20167
20133
|
}
|
|
20134
|
+
/** @access private */
|
|
20168
20135
|
setupEvents() {
|
|
20169
20136
|
this.on("videoUpdate", V(this, qo, Nu));
|
|
20170
20137
|
const t = a(this, Wn, ed);
|
|
@@ -20405,6 +20372,8 @@ let We = (bg = class extends $f {
|
|
|
20405
20372
|
}
|
|
20406
20373
|
/**
|
|
20407
20374
|
* @access private
|
|
20375
|
+
* @param {boolean} isPinned
|
|
20376
|
+
* @param {boolean} [emitEvent=true]
|
|
20408
20377
|
* Not for external use.
|
|
20409
20378
|
*/
|
|
20410
20379
|
setIsPinned(t, e = !0) {
|
|
@@ -20522,6 +20491,7 @@ let We = (bg = class extends $f {
|
|
|
20522
20491
|
/**
|
|
20523
20492
|
* Internal method, do not use
|
|
20524
20493
|
*/
|
|
20494
|
+
/** @access private */
|
|
20525
20495
|
updateVideo(t, e = !1) {
|
|
20526
20496
|
var r, i, n;
|
|
20527
20497
|
if (this.videoEnabled) {
|
|
@@ -26632,9 +26602,6 @@ var XD = Object.defineProperty, ZD = Object.getOwnPropertyDescriptor, eO = (s, t
|
|
|
26632
26602
|
return r && i && XD(t, e, i), i;
|
|
26633
26603
|
}, It;
|
|
26634
26604
|
class OS extends Ot {
|
|
26635
|
-
/**
|
|
26636
|
-
* @param {Context} context
|
|
26637
|
-
*/
|
|
26638
26605
|
constructor(e) {
|
|
26639
26606
|
const r = e.getValue("logger");
|
|
26640
26607
|
super(r);
|
|
@@ -26646,6 +26613,7 @@ class OS extends Ot {
|
|
|
26646
26613
|
get isActive() {
|
|
26647
26614
|
return this.meetings.length !== 0;
|
|
26648
26615
|
}
|
|
26616
|
+
/** @access private */
|
|
26649
26617
|
validateAlterAction() {
|
|
26650
26618
|
const e = a(this, It).getValue("self").permissions.connectedMeetings;
|
|
26651
26619
|
if (!(e != null && e.canAlterConnectedMeetings))
|
|
@@ -26653,6 +26621,7 @@ class OS extends Ot {
|
|
|
26653
26621
|
"You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset."
|
|
26654
26622
|
);
|
|
26655
26623
|
}
|
|
26624
|
+
/** @access private */
|
|
26656
26625
|
validateMoveAction(e, r) {
|
|
26657
26626
|
var c;
|
|
26658
26627
|
if (!(r != null && r.length))
|
|
@@ -26775,6 +26744,7 @@ class OS extends Ot {
|
|
|
26775
26744
|
return n.success ? (this.logger.info(`Moved connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`), this.moveSuccessHandler(e, r, i.map((o) => o.id))) : this.logger.error(`Failed to move connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`), n;
|
|
26776
26745
|
});
|
|
26777
26746
|
}
|
|
26747
|
+
/** @access private */
|
|
26778
26748
|
moveSuccessHandler(e, r, i) {
|
|
26779
26749
|
const n = /* @__PURE__ */ new Map();
|
|
26780
26750
|
[
|
|
@@ -27318,10 +27288,6 @@ var dO = Object.defineProperty, lO = Object.getOwnPropertyDescriptor, xl = (s, t
|
|
|
27318
27288
|
return r && i && dO(t, e, i), i;
|
|
27319
27289
|
}, Ne, qi, Mg;
|
|
27320
27290
|
let Gr = (Mg = class {
|
|
27321
|
-
/**
|
|
27322
|
-
* @param {IContext} context
|
|
27323
|
-
* @param {Controller} controller
|
|
27324
|
-
*/
|
|
27325
27291
|
constructor(t, e) {
|
|
27326
27292
|
m(this, Ne, void 0);
|
|
27327
27293
|
m(this, qi, void 0);
|
|
@@ -27384,6 +27350,7 @@ let Gr = (Mg = class {
|
|
|
27384
27350
|
});
|
|
27385
27351
|
}
|
|
27386
27352
|
/**
|
|
27353
|
+
* @access private
|
|
27387
27354
|
* @param {string} peerId
|
|
27388
27355
|
* @param {ClientOptions} options
|
|
27389
27356
|
* @param {string} meetingId
|
|
@@ -27396,7 +27363,7 @@ let Gr = (Mg = class {
|
|
|
27396
27363
|
video: !0
|
|
27397
27364
|
};
|
|
27398
27365
|
return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (c = e.overrides) != null ? c : {}), n.setValue("env", AC({ baseURI: i.baseURI })), n.setValue("defaults", d), n.setValue("onError", e.onError || (() => {
|
|
27399
|
-
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.
|
|
27366
|
+
})), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.2-staging.1"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new cO()), n;
|
|
27400
27367
|
}
|
|
27401
27368
|
join() {
|
|
27402
27369
|
return u(this, null, function* () {
|