@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.es5.js
CHANGED
|
@@ -3528,7 +3528,7 @@ var Mo = /* @__PURE__ */ E("context"), $m = /* @__PURE__ */ function() {
|
|
|
3528
3528
|
}
|
|
3529
3529
|
return P(s, [{ key: "telemetry", get: (
|
|
3530
3530
|
/**
|
|
3531
|
-
* @
|
|
3531
|
+
* @private
|
|
3532
3532
|
* Not for external use
|
|
3533
3533
|
*/
|
|
3534
3534
|
function() {
|
|
@@ -5663,139 +5663,191 @@ var Rp = 1080, _p = 1920, dP = function(r, e, t, n, i, a) {
|
|
|
5663
5663
|
c(a, Ar)[Ar] = "idle", a.cleanupEventListeners(), cancelAnimationFrame(c(a, _r)[_r]), u !== !0 && document.body.removeChild(c(a, Xe)[Xe]), c(a, _r)[_r] = void 0, document.pictureInPictureElement && document.exitPictureInPicture();
|
|
5664
5664
|
}, c(a, zn)[zn] = e, c(a, Ar)[Ar] = "idle", c(a, Ce)[Ce] = t, c(a, Xt)[Xt] = { brand: t.config.designTokens.colors.brand[500], background: t.config.designTokens.colors.background[1e3], text: t.config.designTokens.colors.text, videoBackground: t.config.designTokens.colors.videoBg, textOnBrand: t.config.designTokens.colors.textOnBrand }, n && a.setupIcon("pin", n), i && a.setupIcon("handRaise", i), a;
|
|
5665
5665
|
}
|
|
5666
|
-
return R(r, s), P(r, [{ key: "setupIcon", value:
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5666
|
+
return R(r, s), P(r, [{ key: "setupIcon", value: (
|
|
5667
|
+
/** @access private */
|
|
5668
|
+
function() {
|
|
5669
|
+
var e = m(/* @__PURE__ */ h().m(function n(i, a) {
|
|
5670
|
+
var o;
|
|
5671
|
+
return h().w(function(u) {
|
|
5672
|
+
for (; ; )
|
|
5673
|
+
switch (u.n) {
|
|
5674
|
+
case 0:
|
|
5675
|
+
o = i, u.n = o === "handRaise" ? 1 : o === "pin" ? 2 : 3;
|
|
5676
|
+
break;
|
|
5677
|
+
case 1:
|
|
5678
|
+
return c(this, za)[za] = a, u.a(3, 3);
|
|
5679
|
+
case 2:
|
|
5680
|
+
return c(this, Ka)[Ka] = a, u.a(3, 3);
|
|
5681
|
+
case 3:
|
|
5682
|
+
return u.a(2);
|
|
5683
|
+
}
|
|
5684
|
+
}, n, this);
|
|
5685
|
+
}));
|
|
5686
|
+
function t(n, i) {
|
|
5687
|
+
return e.apply(this, arguments);
|
|
5688
|
+
}
|
|
5689
|
+
return t;
|
|
5690
|
+
}()
|
|
5691
|
+
) }, {
|
|
5692
|
+
key: "overrideIcon",
|
|
5693
|
+
value: function() {
|
|
5694
|
+
var e = m(/* @__PURE__ */ h().m(function n(i, a) {
|
|
5695
|
+
var o;
|
|
5696
|
+
return h().w(function(u) {
|
|
5697
|
+
for (; ; )
|
|
5698
|
+
switch (u.n) {
|
|
5699
|
+
case 0:
|
|
5700
|
+
o = i, u.n = o === "handRaise" ? 1 : o === "pin" ? 3 : 5;
|
|
5701
|
+
break;
|
|
5702
|
+
case 1:
|
|
5703
|
+
return u.n = 2, oc(a);
|
|
5704
|
+
case 2:
|
|
5705
|
+
return c(this, za)[za] = u.v, u.a(3, 5);
|
|
5706
|
+
case 3:
|
|
5707
|
+
return u.n = 4, oc(a);
|
|
5708
|
+
case 4:
|
|
5709
|
+
return c(this, Ka)[Ka] = u.v, u.a(3, 5);
|
|
5710
|
+
case 5:
|
|
5711
|
+
return u.a(2);
|
|
5712
|
+
}
|
|
5713
|
+
}, n, this);
|
|
5714
|
+
}));
|
|
5715
|
+
function t(n, i) {
|
|
5716
|
+
return e.apply(this, arguments);
|
|
5717
|
+
}
|
|
5718
|
+
return t;
|
|
5719
|
+
}()
|
|
5720
|
+
/** @access private */
|
|
5721
|
+
}, {
|
|
5722
|
+
key: "constructImage",
|
|
5723
|
+
value: function(t) {
|
|
5724
|
+
var n = new Image(), i = new Blob([t], { type: "image/svg+xml" }), a = window.URL.createObjectURL(i);
|
|
5725
|
+
return new Promise(function(o) {
|
|
5726
|
+
n.onload = function() {
|
|
5727
|
+
o(n), window.URL.revokeObjectURL(a);
|
|
5728
|
+
}, n.src = a;
|
|
5729
|
+
});
|
|
5686
5730
|
}
|
|
5687
|
-
|
|
5688
|
-
}
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
for (; ; )
|
|
5693
|
-
switch (u.n) {
|
|
5694
|
-
case 0:
|
|
5695
|
-
o = i, u.n = o === "handRaise" ? 1 : o === "pin" ? 3 : 5;
|
|
5696
|
-
break;
|
|
5697
|
-
case 1:
|
|
5698
|
-
return u.n = 2, oc(a);
|
|
5699
|
-
case 2:
|
|
5700
|
-
return c(this, za)[za] = u.v, u.a(3, 5);
|
|
5701
|
-
case 3:
|
|
5702
|
-
return u.n = 4, oc(a);
|
|
5703
|
-
case 4:
|
|
5704
|
-
return c(this, Ka)[Ka] = u.v, u.a(3, 5);
|
|
5705
|
-
case 5:
|
|
5706
|
-
return u.a(2);
|
|
5707
|
-
}
|
|
5708
|
-
}, n, this);
|
|
5709
|
-
}));
|
|
5710
|
-
function t(n, i) {
|
|
5711
|
-
return e.apply(this, arguments);
|
|
5731
|
+
/** @access private */
|
|
5732
|
+
}, {
|
|
5733
|
+
key: "createVideoContainer",
|
|
5734
|
+
value: function() {
|
|
5735
|
+
c(this, Xe)[Xe] = document.createElement("div"), c(this, Xe)[Xe].style.width = "0.1px", c(this, Xe)[Xe].style.height = "0.1px", c(this, Xe)[Xe].style.overflow = "hidden", c(this, Xe)[Xe].style.position = "absolute", c(this, Xe)[Xe].style.bottom = "0", c(this, Xe)[Xe].style.right = "0", c(this, Xe)[Xe].style.opacity = "0", c(this, Xe)[Xe].appendChild(c(this, Ft)[Ft]);
|
|
5712
5736
|
}
|
|
5713
|
-
|
|
5714
|
-
}
|
|
5715
|
-
var n = new Image(), i = new Blob([t], { type: "image/svg+xml" }), a = window.URL.createObjectURL(i);
|
|
5716
|
-
return new Promise(function(o) {
|
|
5717
|
-
n.onload = function() {
|
|
5718
|
-
o(n), window.URL.revokeObjectURL(a);
|
|
5719
|
-
}, n.src = a;
|
|
5720
|
-
});
|
|
5721
|
-
} }, { key: "createVideoContainer", value: function() {
|
|
5722
|
-
c(this, Xe)[Xe] = document.createElement("div"), c(this, Xe)[Xe].style.width = "0.1px", c(this, Xe)[Xe].style.height = "0.1px", c(this, Xe)[Xe].style.overflow = "hidden", c(this, Xe)[Xe].style.position = "absolute", c(this, Xe)[Xe].style.bottom = "0", c(this, Xe)[Xe].style.right = "0", c(this, Xe)[Xe].style.opacity = "0", c(this, Xe)[Xe].appendChild(c(this, Ft)[Ft]);
|
|
5723
|
-
} }, { key: "setupEventListeners", value: function() {
|
|
5737
|
+
/** @access private */
|
|
5738
|
+
}, { key: "setupEventListeners", value: function() {
|
|
5724
5739
|
var t = this;
|
|
5725
5740
|
c(this, zn)[zn].subscribe("stageStatus", this.handlePipMediaControls), c(this, Ce)[Ce].addListener("videoUpdate", this.onSelfVideoUpdateListener), c(this, Ce)[Ce].addListener("audioUpdate", this.onSelfAudioUpdateListener), c(this, Ce)[Ce].addListener("roomLeft", function() {
|
|
5726
5741
|
return t.disable();
|
|
5727
5742
|
});
|
|
5728
|
-
} }, { key: "createCanvas", value:
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5743
|
+
} }, { key: "createCanvas", value: (
|
|
5744
|
+
/** @access private */
|
|
5745
|
+
function() {
|
|
5746
|
+
var t = document.createElement("canvas");
|
|
5747
|
+
t.height = c(this, ke)[ke].height, t.width = c(this, ke)[ke].width, c(this, jt)[jt] = t;
|
|
5748
|
+
}
|
|
5749
|
+
) }, {
|
|
5750
|
+
key: "setupMediaSessionEvents",
|
|
5751
|
+
value: (
|
|
5752
|
+
/** @access private */
|
|
5753
|
+
function() {
|
|
5754
|
+
var t = this;
|
|
5755
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("hangup", function() {
|
|
5756
|
+
t.eventCallback("END");
|
|
5757
|
+
}), this.mountAudioEvents(), this.mountVideoEvents());
|
|
5758
|
+
}
|
|
5759
|
+
)
|
|
5760
|
+
/** @access private */
|
|
5761
|
+
}, {
|
|
5762
|
+
key: "mountAudioEvents",
|
|
5763
|
+
value: function() {
|
|
5764
|
+
var t = this;
|
|
5765
|
+
navigator.mediaSession === void 0 || navigator.mediaSession.setMicrophoneActive === void 0 || c(this, Ce)[Ce].permissions.canProduceAudio && navigator.mediaSession.setActionHandler("togglemicrophone", function() {
|
|
5766
|
+
t.eventCallback("MIC");
|
|
5767
|
+
});
|
|
5768
|
+
}
|
|
5769
|
+
/** @access private */
|
|
5770
|
+
}, { key: "mountVideoEvents", value: function() {
|
|
5742
5771
|
var t = this;
|
|
5743
5772
|
navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || c(this, Ce)[Ce].permissions.canProduceVideo && navigator.mediaSession.setActionHandler("togglecamera", function() {
|
|
5744
5773
|
t.eventCallback("CAMERA");
|
|
5745
5774
|
});
|
|
5746
|
-
} }, {
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
}
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
+
} }, {
|
|
5776
|
+
key: "getSources",
|
|
5777
|
+
value: (
|
|
5778
|
+
/** @access private */
|
|
5779
|
+
function() {
|
|
5780
|
+
var t = Object.values(c(this, at)[at]), n = t.reduce(function(i, a) {
|
|
5781
|
+
return i[a.pinned ? "pinned" : "regular"].push(a), i;
|
|
5782
|
+
}, { pinned: [], regular: [] });
|
|
5783
|
+
return [].concat(_e(n.pinned), _e(n.regular));
|
|
5784
|
+
}
|
|
5785
|
+
)
|
|
5786
|
+
/** @access private */
|
|
5787
|
+
}, {
|
|
5788
|
+
key: "drawEmptyTile",
|
|
5789
|
+
value: function(t, n, i, a) {
|
|
5790
|
+
if (c(this, jt)[jt] !== void 0) {
|
|
5791
|
+
var o = c(this, jt)[jt].getContext("2d"), u = c(this, jt)[jt].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(u / p), g = Math.floor(t / f), y = t % f, k = y * (p + l) + l, w = g * (v + l) + l, T = a != null ? a : {}, S = T.displayText, A = T.image;
|
|
5792
|
+
o.fillStyle = S || A ? c(this, Xt)[Xt].videoBackground : c(this, Xt)[Xt].background, o.strokeStyle = c(this, Xt)[Xt].brand, o.beginPath(), o.moveTo(k + d, w), o.arcTo(k + p, w, k + p, w + d, d), o.arcTo(k + p, w + v, k + p - d, w + v, d), o.arcTo(k, w + v, k, w + v - d, d), o.arcTo(k, w, k + d, w, d), o.closePath(), o.fill(), o.stroke();
|
|
5793
|
+
var M = p / 6, _ = p / 2 + k, O = v / 2 + w;
|
|
5794
|
+
o.save(), (S || A) && (o.beginPath(), o.arc(_, O, M, 0, Math.PI * 2), o.fillStyle = c(this, Xt)[Xt].brand, o.fill(), A ? (o.clip(), o.drawImage(A, _ - M, O - M, M * 2, M * 2), o.restore()) : S && (o.fillStyle = c(this, Xt)[Xt].textOnBrand, o.font = "".concat(M / 2, "px sans-serif"), o.textAlign = "center", o.textBaseline = "middle", o.fillText(S, _, O)), this.drawIcons(a, k, w, Math.max(p, v)));
|
|
5795
|
+
}
|
|
5796
|
+
}
|
|
5797
|
+
/** @access private */
|
|
5798
|
+
}, {
|
|
5799
|
+
key: "drawIcons",
|
|
5800
|
+
value: function(t, n, i, a) {
|
|
5801
|
+
var o = this, u = Math.min(Math.max(a * 0.15, 100), 200), l = u * 0.2, d = u * 0.2, p = n + l, v = i + l, f = function(y) {
|
|
5802
|
+
var k = c(o, jt)[jt].getContext("2d");
|
|
5803
|
+
k.save(), k.fillStyle = c(o, Xt)[Xt].background, k.beginPath(), k.moveTo(p + d, v), k.arcTo(p + u, v, p + u, v + d, d), k.arcTo(p + u, v + u, p + u - d, v + u, d), k.arcTo(p, v + u, p, v + u - d, d), k.arcTo(p, v, p + d, v, d), k.closePath(), k.fill(), typeof y == "string" ? (k.font = "".concat(u / 1.5, "px sans-serif"), k.fillStyle = c(o, Xt)[Xt].text, k.textAlign = "center", k.textBaseline = "top", k.fillText(y, u / 2 + p, v + l)) : k.drawImage(y, p + l, v + l, u - l * 2, u - l * 2), p += u + l, k.restore();
|
|
5804
|
+
};
|
|
5805
|
+
t.pinned && f(c(this, Ka)[Ka]), t.handRaised && f(c(this, za)[za]), t.reaction && f(t.reaction);
|
|
5806
|
+
}
|
|
5807
|
+
/** @access private */
|
|
5808
|
+
}, {
|
|
5809
|
+
key: "drawTile",
|
|
5810
|
+
value: function(t, n, i) {
|
|
5811
|
+
if (c(this, jt)[jt] !== void 0)
|
|
5812
|
+
for (var a = c(this, jt)[jt].getContext("2d"), o = this.getSources(), u = 0, l = 0; u < c(this, ke)[ke].height - 5; ) {
|
|
5813
|
+
for (var d = 0; d < c(this, ke)[ke].width - 5 && l < i; ) {
|
|
5814
|
+
var p;
|
|
5815
|
+
if ((p = o[l]) !== null && p !== void 0 && p.enabled) {
|
|
5816
|
+
var v, f = o[l].element, g = dP(d, u, t, n, f.videoWidth, f.videoHeight), y = Ne(g, 8), k = y[0], w = y[1], T = y[2], S = y[3], A = y[4], M = y[5], _ = y[6], O = y[7], D = f == null || (v = f.classList) === null || v === void 0 ? void 0 : v.contains("mirror");
|
|
5817
|
+
D ? (a.save(), a.scale(-1, 1), a.drawImage(f, k, w, T, S, -1 * A, M, -1 * _, O), a.restore()) : a.drawImage(f, k, w, T, S, A, M, _, O), this.drawIcons(o[l], A, M, Math.max(_, O));
|
|
5818
|
+
} else
|
|
5819
|
+
this.drawEmptyTile(l, t, n, o[l]);
|
|
5820
|
+
l += 1, d += t;
|
|
5821
|
+
}
|
|
5822
|
+
u += n;
|
|
5775
5823
|
}
|
|
5776
|
-
|
|
5824
|
+
}
|
|
5825
|
+
/** @access private */
|
|
5826
|
+
}, {
|
|
5827
|
+
key: "calcGridElemSize",
|
|
5828
|
+
value: function(t) {
|
|
5829
|
+
switch (t) {
|
|
5830
|
+
case 0:
|
|
5831
|
+
case 1:
|
|
5832
|
+
return [c(this, ke)[ke].width, c(this, ke)[ke].height];
|
|
5833
|
+
case 2:
|
|
5834
|
+
return [Math.floor(c(this, ke)[ke].width / 2), c(this, ke)[ke].height];
|
|
5835
|
+
case 3:
|
|
5836
|
+
case 4:
|
|
5837
|
+
return [Math.floor(c(this, ke)[ke].width / 2), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5838
|
+
case 5:
|
|
5839
|
+
case 6:
|
|
5840
|
+
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5841
|
+
case 7:
|
|
5842
|
+
case 8:
|
|
5843
|
+
case 9:
|
|
5844
|
+
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 3)];
|
|
5845
|
+
default:
|
|
5846
|
+
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5777
5847
|
}
|
|
5778
|
-
} }, { key: "calcGridElemSize", value: function(t) {
|
|
5779
|
-
switch (t) {
|
|
5780
|
-
case 0:
|
|
5781
|
-
case 1:
|
|
5782
|
-
return [c(this, ke)[ke].width, c(this, ke)[ke].height];
|
|
5783
|
-
case 2:
|
|
5784
|
-
return [Math.floor(c(this, ke)[ke].width / 2), c(this, ke)[ke].height];
|
|
5785
|
-
case 3:
|
|
5786
|
-
case 4:
|
|
5787
|
-
return [Math.floor(c(this, ke)[ke].width / 2), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5788
|
-
case 5:
|
|
5789
|
-
case 6:
|
|
5790
|
-
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5791
|
-
case 7:
|
|
5792
|
-
case 8:
|
|
5793
|
-
case 9:
|
|
5794
|
-
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 3)];
|
|
5795
|
-
default:
|
|
5796
|
-
return [Math.floor(c(this, ke)[ke].width / 3), Math.floor(c(this, ke)[ke].height / 2)];
|
|
5797
5848
|
}
|
|
5798
|
-
|
|
5849
|
+
/** @access private */
|
|
5850
|
+
}, { key: "paintCanvas", value: function() {
|
|
5799
5851
|
var t = this.getSources().length;
|
|
5800
5852
|
t !== 1 && (t = t % 2 > 0 ? t + 1 : t);
|
|
5801
5853
|
var n = this.calcGridElemSize(t), i = Ne(n, 2), a = i[0], o = i[1];
|
|
@@ -5803,9 +5855,13 @@ var Rp = 1080, _p = 1920, dP = function(r, e, t, n, i, a) {
|
|
|
5803
5855
|
} }, { key: "isSupported", value: function() {
|
|
5804
5856
|
var t;
|
|
5805
5857
|
return !!window.chrome && document.pictureInPictureEnabled && ((t = c(this, Ce)[Ce].config) === null || t === void 0 ? void 0 : t.viewType) !== "LIVESTREAM";
|
|
5806
|
-
} }, { key: "isActive", get: function() {
|
|
5807
|
-
return document.pictureInPictureElement !== null;
|
|
5808
5858
|
} }, {
|
|
5859
|
+
key: "isActive",
|
|
5860
|
+
get: function() {
|
|
5861
|
+
return document.pictureInPictureElement !== null;
|
|
5862
|
+
}
|
|
5863
|
+
/** @access private */
|
|
5864
|
+
}, {
|
|
5809
5865
|
key: "cleanup",
|
|
5810
5866
|
value: function() {
|
|
5811
5867
|
if (c(this, Qa)[Qa] = !1, this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), c(this, Xe)[Xe])
|
|
@@ -5821,24 +5877,28 @@ var Rp = 1080, _p = 1920, dP = function(r, e, t, n, i, a) {
|
|
|
5821
5877
|
* @param {number} [options.height]
|
|
5822
5878
|
* @param {number} [options.width]
|
|
5823
5879
|
*/
|
|
5824
|
-
}, {
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5880
|
+
}, {
|
|
5881
|
+
key: "init",
|
|
5882
|
+
value: function() {
|
|
5883
|
+
var t = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = n.height, a = n.width;
|
|
5884
|
+
if (!this.isSupported())
|
|
5885
|
+
throw this.logger.error("Pip.unsupported"), new Error("Picture-in-picture is not available in this environment");
|
|
5886
|
+
if (!c(this, Qa)[Qa]) {
|
|
5887
|
+
c(this, Qa)[Qa] = !0, this.createCanvas(), this.setupMediaSessionEvents();
|
|
5888
|
+
var o = document.createElement("video");
|
|
5889
|
+
c(this, ke)[ke] = { height: i != null ? i : Rp, width: a != null ? a : _p }, o.height = c(this, ke)[ke].height, o.width = c(this, ke)[ke].width, o.autoplay = !0, o.muted = !0, o.srcObject = c(this, jt)[jt].captureStream(24), c(this, Ft)[Ft] = o, c(this, Ft)[Ft].onloadedmetadata = function() {
|
|
5890
|
+
try {
|
|
5891
|
+
t.emit("pipStarted"), c(t, Ft)[Ft].onleavepictureinpicture = function() {
|
|
5892
|
+
t.emit("pipEnded");
|
|
5893
|
+
};
|
|
5894
|
+
} catch (u) {
|
|
5834
5895
|
t.emit("pipEnded");
|
|
5835
|
-
}
|
|
5836
|
-
}
|
|
5837
|
-
|
|
5838
|
-
}
|
|
5839
|
-
}, this.createVideoContainer(), this.paintCanvas();
|
|
5896
|
+
}
|
|
5897
|
+
}, this.createVideoContainer(), this.paintCanvas();
|
|
5898
|
+
}
|
|
5840
5899
|
}
|
|
5841
|
-
|
|
5900
|
+
/** @access private */
|
|
5901
|
+
}, { key: "updateMediaSession", value: function(t, n) {
|
|
5842
5902
|
navigator.mediaSession !== void 0 && (t === "CAMERA" && navigator.mediaSession.setCameraActive !== void 0 && navigator.mediaSession.setCameraActive(n), t === "MIC" && navigator.mediaSession.setMicrophoneActive !== void 0 && navigator.mediaSession.setMicrophoneActive(n));
|
|
5843
5903
|
} }, {
|
|
5844
5904
|
key: "enableSource",
|
|
@@ -5848,51 +5908,45 @@ var Rp = 1080, _p = 1920, dP = function(r, e, t, n, i, a) {
|
|
|
5848
5908
|
/**
|
|
5849
5909
|
* @param {string} source
|
|
5850
5910
|
*/
|
|
5851
|
-
}, { key: "disableSource", value: function(t) {
|
|
5852
|
-
c(this, at)[at][t] !== void 0 && (c(this, at)[at][t].enabled = !1);
|
|
5853
|
-
} }, {
|
|
5854
|
-
key: "generateAvatar",
|
|
5855
|
-
value: function() {
|
|
5856
|
-
var e = m(/* @__PURE__ */ h().m(function n(i, a) {
|
|
5857
|
-
var o = this, u, l, d, p;
|
|
5858
|
-
return h().w(function(v) {
|
|
5859
|
-
for (; ; )
|
|
5860
|
-
switch (v.p = v.n) {
|
|
5861
|
-
case 0:
|
|
5862
|
-
if (a) {
|
|
5863
|
-
v.n = 1;
|
|
5864
|
-
break;
|
|
5865
|
-
}
|
|
5866
|
-
return v.a(2);
|
|
5867
|
-
case 1:
|
|
5868
|
-
return u = new Image(), v.p = 2, v.n = 3, fetch(a);
|
|
5869
|
-
case 3:
|
|
5870
|
-
return v.n = 4, v.v.blob();
|
|
5871
|
-
case 4:
|
|
5872
|
-
l = v.v, d = window.URL.createObjectURL(l), u.onload = function() {
|
|
5873
|
-
o.updateSource(i, { image: u }), window.URL.revokeObjectURL(d);
|
|
5874
|
-
}, u.src = d, v.n = 6;
|
|
5875
|
-
break;
|
|
5876
|
-
case 5:
|
|
5877
|
-
v.p = 5, p = v.v, this.logger.error("Pip::GenerateAvatar", { error: p });
|
|
5878
|
-
case 6:
|
|
5879
|
-
return v.a(2);
|
|
5880
|
-
}
|
|
5881
|
-
}, n, this, [[2, 5]]);
|
|
5882
|
-
}));
|
|
5883
|
-
function t(n, i) {
|
|
5884
|
-
return e.apply(this, arguments);
|
|
5885
|
-
}
|
|
5886
|
-
return t;
|
|
5887
|
-
}()
|
|
5888
|
-
/**
|
|
5889
|
-
* Add a video source from the participant grid
|
|
5890
|
-
* @param {string} id id for the source (ex. participant id)
|
|
5891
|
-
* @param {HTMLVideoElement} element HTMLVideoElement for the video source
|
|
5892
|
-
* @param {boolean} enabled if source is enabled
|
|
5893
|
-
* @param {?string} [displayText] two character display text
|
|
5894
|
-
*/
|
|
5895
5911
|
}, {
|
|
5912
|
+
key: "disableSource",
|
|
5913
|
+
value: function(t) {
|
|
5914
|
+
c(this, at)[at][t] !== void 0 && (c(this, at)[at][t].enabled = !1);
|
|
5915
|
+
}
|
|
5916
|
+
/** @access private */
|
|
5917
|
+
}, { key: "generateAvatar", value: function() {
|
|
5918
|
+
var e = m(/* @__PURE__ */ h().m(function n(i, a) {
|
|
5919
|
+
var o = this, u, l, d, p;
|
|
5920
|
+
return h().w(function(v) {
|
|
5921
|
+
for (; ; )
|
|
5922
|
+
switch (v.p = v.n) {
|
|
5923
|
+
case 0:
|
|
5924
|
+
if (a) {
|
|
5925
|
+
v.n = 1;
|
|
5926
|
+
break;
|
|
5927
|
+
}
|
|
5928
|
+
return v.a(2);
|
|
5929
|
+
case 1:
|
|
5930
|
+
return u = new Image(), v.p = 2, v.n = 3, fetch(a);
|
|
5931
|
+
case 3:
|
|
5932
|
+
return v.n = 4, v.v.blob();
|
|
5933
|
+
case 4:
|
|
5934
|
+
l = v.v, d = window.URL.createObjectURL(l), u.onload = function() {
|
|
5935
|
+
o.updateSource(i, { image: u }), window.URL.revokeObjectURL(d);
|
|
5936
|
+
}, u.src = d, v.n = 6;
|
|
5937
|
+
break;
|
|
5938
|
+
case 5:
|
|
5939
|
+
v.p = 5, p = v.v, this.logger.error("Pip::GenerateAvatar", { error: p });
|
|
5940
|
+
case 6:
|
|
5941
|
+
return v.a(2);
|
|
5942
|
+
}
|
|
5943
|
+
}, n, this, [[2, 5]]);
|
|
5944
|
+
}));
|
|
5945
|
+
function t(n, i) {
|
|
5946
|
+
return e.apply(this, arguments);
|
|
5947
|
+
}
|
|
5948
|
+
return t;
|
|
5949
|
+
}() }, {
|
|
5896
5950
|
key: "addSource",
|
|
5897
5951
|
value: function(t, n, i) {
|
|
5898
5952
|
var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : void 0, l = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : !1;
|
|
@@ -11177,7 +11231,7 @@ var E_ = Object.defineProperty, C_ = Object.getOwnPropertyDescriptor, Jn = funct
|
|
|
11177
11231
|
key: "telemetry",
|
|
11178
11232
|
get: (
|
|
11179
11233
|
/**
|
|
11180
|
-
* @
|
|
11234
|
+
* @private
|
|
11181
11235
|
* Not for external use
|
|
11182
11236
|
*/
|
|
11183
11237
|
function() {
|
|
@@ -12271,10 +12325,14 @@ var H_ = Object.defineProperty, B_ = Object.getOwnPropertyDescriptor, q_ = funct
|
|
|
12271
12325
|
* @param {ActiveTab} spotlightTab
|
|
12272
12326
|
* @param {TabChangeSource} tabChangeSource
|
|
12273
12327
|
*/
|
|
12274
|
-
}, {
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12328
|
+
}, {
|
|
12329
|
+
key: "setSelfActiveTab",
|
|
12330
|
+
value: function(t, n) {
|
|
12331
|
+
var i;
|
|
12332
|
+
this.logger.info("Spotlight::setActiveTab", { spotlight: { currentTab: { id: t.id, type: t.type } } }), this.selfActiveTab = t, n === 0 && this.emit("selfTabUpdate", t), (i = c(this, On)[On].permissions) !== null && i !== void 0 && i.canSpotlight && this.broadcastTabChanges && n === 0 && this.assertActiveTabToRoom();
|
|
12333
|
+
}
|
|
12334
|
+
/** @access private */
|
|
12335
|
+
}, { key: "assertActiveTabToRoom", value: function() {
|
|
12278
12336
|
c(this, Hs)[Hs].broadcastMessage("spotlight", { userId: c(this, On)[On].userId, currentTab: this.selfActiveTab });
|
|
12279
12337
|
} }]);
|
|
12280
12338
|
}(Gr));
|
|
@@ -12308,7 +12366,7 @@ var J_ = Object.defineProperty, K_ = Object.getOwnPropertyDescriptor, Xf = funct
|
|
|
12308
12366
|
}
|
|
12309
12367
|
return R(r, s), P(r, [{ key: "telemetry", get: (
|
|
12310
12368
|
/**
|
|
12311
|
-
* @
|
|
12369
|
+
* @private
|
|
12312
12370
|
* Not for external use
|
|
12313
12371
|
*/
|
|
12314
12372
|
function() {
|
|
@@ -12595,7 +12653,7 @@ var Lo = {}, Li = {
|
|
|
12595
12653
|
}
|
|
12596
12654
|
return R(r, s), P(r, [{ key: "telemetry", get: (
|
|
12597
12655
|
/**
|
|
12598
|
-
* @
|
|
12656
|
+
* @private
|
|
12599
12657
|
* Not for external use
|
|
12600
12658
|
*/
|
|
12601
12659
|
function() {
|
|
@@ -12603,64 +12661,67 @@ var Lo = {}, Li = {
|
|
|
12603
12661
|
}
|
|
12604
12662
|
) }, { key: "status", get: function() {
|
|
12605
12663
|
return c(this, $e)[$e].getValue("stageStatus");
|
|
12606
|
-
} }, { key: "setupEvents", value:
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
+
} }, { key: "setupEvents", value: (
|
|
12665
|
+
/** @access private */
|
|
12666
|
+
function() {
|
|
12667
|
+
var t = this, n = {
|
|
12668
|
+
/**
|
|
12669
|
+
* NOTE(ishita1805): Update stageRequests when socket sends them.
|
|
12670
|
+
*/
|
|
12671
|
+
[V.GET_STAGE_REQUESTS]: function() {
|
|
12672
|
+
var o = m(/* @__PURE__ */ h().m(function u(l) {
|
|
12673
|
+
return h().w(function(d) {
|
|
12674
|
+
for (; ; )
|
|
12675
|
+
switch (d.n) {
|
|
12676
|
+
case 0:
|
|
12677
|
+
c(t, sr)[sr] = l;
|
|
12678
|
+
case 1:
|
|
12679
|
+
return d.a(2);
|
|
12680
|
+
}
|
|
12681
|
+
}, u);
|
|
12682
|
+
}));
|
|
12683
|
+
return function(u) {
|
|
12684
|
+
return o.apply(this, arguments);
|
|
12685
|
+
};
|
|
12686
|
+
}(),
|
|
12687
|
+
/**
|
|
12688
|
+
* NOTE(ishita1805): Update stageRequests when a peer
|
|
12689
|
+
* who has requested leaves/joins the meeting
|
|
12690
|
+
*/
|
|
12691
|
+
[V.UPDATE_STAGE_REQUESTS]: function() {
|
|
12692
|
+
var o = m(/* @__PURE__ */ h().m(function u(l) {
|
|
12693
|
+
var d, p, v, f;
|
|
12694
|
+
return h().w(function(g) {
|
|
12695
|
+
for (; ; )
|
|
12696
|
+
switch (g.n) {
|
|
12697
|
+
case 0:
|
|
12698
|
+
d = l.add, p = c(t, sr)[sr].length, v = t.getAccessRequests(), f = v.stageRequests, (d || f.length > p) && t.emit("newStageRequest", { count: f.length }), t.emit("stageAccessRequestUpdate", f);
|
|
12699
|
+
case 1:
|
|
12700
|
+
return g.a(2);
|
|
12701
|
+
}
|
|
12702
|
+
}, u);
|
|
12703
|
+
}));
|
|
12704
|
+
return function(u) {
|
|
12705
|
+
return o.apply(this, arguments);
|
|
12706
|
+
};
|
|
12707
|
+
}()
|
|
12708
|
+
}, i = function() {
|
|
12709
|
+
Object.entries(n).forEach(function(u) {
|
|
12710
|
+
var l = Ne(u, 2), d = l[0], p = l[1];
|
|
12711
|
+
c(t, $e)[$e].getValue("peerSessionStore").onAsync(d, p);
|
|
12712
|
+
});
|
|
12713
|
+
}, a = function() {
|
|
12714
|
+
Object.entries(n).forEach(function(u) {
|
|
12715
|
+
var l = Ne(u, 2), d = l[0], p = l[1];
|
|
12716
|
+
c(t, $e)[$e].getValue("peerSessionStore").removeListener(d, p);
|
|
12717
|
+
});
|
|
12718
|
+
};
|
|
12719
|
+
c(this, ie)[ie].permissions.on("permissionsUpdate", function(o) {
|
|
12720
|
+
var u = o.canAcceptProductionRequests;
|
|
12721
|
+
u !== void 0 && (c(t, ie)[ie].permissions.acceptStageRequests ? (i(), c(t, Ht)[Ht].getStageRequests()) : (a(), c(t, sr)[sr] = [], t.emit("stageAccessRequestUpdate", c(t, sr)[sr])));
|
|
12722
|
+
}), c(this, ie)[ie].permissions.acceptStageRequests && i();
|
|
12723
|
+
}
|
|
12724
|
+
) }, { key: "getAccessRequests", value: function() {
|
|
12664
12725
|
if (!c(this, ie)[ie].permissions.stageEnabled)
|
|
12665
12726
|
throw this.logger.error("Stage::stage_disabled"), new $("Stage is disabled", "2003");
|
|
12666
12727
|
if (!c(this, ie)[ie].permissions.acceptStageRequests)
|
|
@@ -13115,21 +13176,12 @@ var aA = Object.defineProperty, sA = Object.getOwnPropertyDescriptor, _h = funct
|
|
|
13115
13176
|
}
|
|
13116
13177
|
)
|
|
13117
13178
|
/**
|
|
13118
|
-
* @
|
|
13179
|
+
* @private
|
|
13119
13180
|
* Not for external use
|
|
13120
13181
|
*/
|
|
13121
|
-
}, {
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
return c(this, qs)[qs].getValue("telemetry");
|
|
13125
|
-
}
|
|
13126
|
-
/**
|
|
13127
|
-
* @param {Context} context
|
|
13128
|
-
* @param {ClientPluginConfig} config
|
|
13129
|
-
* @param {Store} activePluginsStore
|
|
13130
|
-
* @param {Self} self
|
|
13131
|
-
*/
|
|
13132
|
-
}, { key: "activePluginsStore", set: function(t) {
|
|
13182
|
+
}, { key: "telemetry", get: function() {
|
|
13183
|
+
return c(this, qs)[qs].getValue("telemetry");
|
|
13184
|
+
} }, { key: "activePluginsStore", set: function(t) {
|
|
13133
13185
|
c(this, fr)[fr] = t;
|
|
13134
13186
|
} }, {
|
|
13135
13187
|
key: "activateForSelf",
|
|
@@ -13301,14 +13353,9 @@ var Re = /* @__PURE__ */ E("eventEmitter"), Qn = /* @__PURE__ */ E("listeners"),
|
|
|
13301
13353
|
for (var i = n > 1 ? void 0 : n ? uA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
13302
13354
|
(o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
13303
13355
|
return n && i && oA(e, t, i), i;
|
|
13304
|
-
}, gd = /* @__PURE__ */ P(
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
*/
|
|
13308
|
-
function s(r) {
|
|
13309
|
-
b(this, s), this.all = void 0, this.active = void 0, this.all = new Yp(r), this.active = new Yp(r);
|
|
13310
|
-
}
|
|
13311
|
-
);
|
|
13356
|
+
}, gd = /* @__PURE__ */ P(function s(r) {
|
|
13357
|
+
b(this, s), this.all = void 0, this.active = void 0, this.all = new Yp(r), this.active = new Yp(r);
|
|
13358
|
+
});
|
|
13312
13359
|
gd = cA([ir("0600")], gd);
|
|
13313
13360
|
var lA = Object.defineProperty, dA = Object.getOwnPropertyDescriptor, hA = function(r, e, t, n) {
|
|
13314
13361
|
for (var i = n > 1 ? void 0 : n ? dA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
@@ -16441,7 +16488,9 @@ var aI = Yu, xp = Bn(Ph()), ot = /* @__PURE__ */ E("config"), ti = /* @__PURE__
|
|
|
16441
16488
|
value: function(e) {
|
|
16442
16489
|
return new s(e);
|
|
16443
16490
|
}
|
|
16444
|
-
/**
|
|
16491
|
+
/**
|
|
16492
|
+
* @deprecated. Use init()
|
|
16493
|
+
*/
|
|
16445
16494
|
}, {
|
|
16446
16495
|
key: "default",
|
|
16447
16496
|
value: function() {
|
|
@@ -16468,16 +16517,20 @@ var aI = Yu, xp = Bn(Ph()), ot = /* @__PURE__ */ E("config"), ti = /* @__PURE__
|
|
|
16468
16517
|
}
|
|
16469
16518
|
return R(r, s), P(r, [{ key: "telemetry", get: (
|
|
16470
16519
|
/**
|
|
16471
|
-
* @
|
|
16520
|
+
* @private
|
|
16472
16521
|
* Not for external use
|
|
16473
16522
|
*/
|
|
16474
16523
|
function() {
|
|
16475
16524
|
return c(this, Go)[Go].getValue("telemetry");
|
|
16476
16525
|
}
|
|
16477
|
-
) }, {
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16526
|
+
) }, {
|
|
16527
|
+
key: "setLivestreamState",
|
|
16528
|
+
value: function(t) {
|
|
16529
|
+
var n = this.state;
|
|
16530
|
+
this.state = t, n !== t && this.emitCurrentLivestreamState();
|
|
16531
|
+
}
|
|
16532
|
+
/** @access private */
|
|
16533
|
+
}, { key: "emitCurrentLivestreamState", value: function() {
|
|
16481
16534
|
this.emit("livestreamUpdate", this.state);
|
|
16482
16535
|
} }, { key: "start", value: function() {
|
|
16483
16536
|
var e = m(/* @__PURE__ */ h().m(function n() {
|
|
@@ -17079,7 +17132,7 @@ var yI = Object.defineProperty, kI = Object.getOwnPropertyDescriptor, So = funct
|
|
|
17079
17132
|
}
|
|
17080
17133
|
) }, { key: "telemetry", get: (
|
|
17081
17134
|
/**
|
|
17082
|
-
* @
|
|
17135
|
+
* @private
|
|
17083
17136
|
* Not for external use
|
|
17084
17137
|
*/
|
|
17085
17138
|
function() {
|
|
@@ -17092,6 +17145,7 @@ var yI = Object.defineProperty, kI = Object.getOwnPropertyDescriptor, So = funct
|
|
|
17092
17145
|
this.videoEnabled = t, n && (this.logger.info("Participant::setVideoEnabled::videoUpdate", N({}, fs(this))), this.emit("videoUpdate", { videoEnabled: this.videoEnabled, videoTrack: this.videoTrack }));
|
|
17093
17146
|
}
|
|
17094
17147
|
/**
|
|
17148
|
+
* @access private
|
|
17095
17149
|
* @param {boolean} audioEnabled
|
|
17096
17150
|
* @param {boolean} [emitEvent=true]
|
|
17097
17151
|
*/
|
|
@@ -17102,13 +17156,18 @@ var yI = Object.defineProperty, kI = Object.getOwnPropertyDescriptor, So = funct
|
|
|
17102
17156
|
this.audioEnabled = t, n && (this.logger.info("Participant::setAudioEnabled::audioUpdate", N({}, fs(this))), this.emit("audioUpdate", { audioEnabled: this.audioEnabled, audioTrack: this.audioTrack }));
|
|
17103
17157
|
}
|
|
17104
17158
|
/**
|
|
17159
|
+
* @access private
|
|
17105
17160
|
* @param {boolean} screenShareEnabled
|
|
17106
17161
|
* @param {boolean} [emitEvent=true]
|
|
17107
17162
|
*/
|
|
17108
|
-
}, {
|
|
17109
|
-
|
|
17110
|
-
|
|
17111
|
-
|
|
17163
|
+
}, {
|
|
17164
|
+
key: "setScreenShareEnabled",
|
|
17165
|
+
value: function(t) {
|
|
17166
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
17167
|
+
this.screenShareEnabled = t, n && this.emit("screenShareUpdate", { screenShareEnabled: this.screenShareEnabled, screenShareTracks: this.screenShareTracks });
|
|
17168
|
+
}
|
|
17169
|
+
/** @access private */
|
|
17170
|
+
}, {
|
|
17112
17171
|
key: "setupEvents",
|
|
17113
17172
|
value: function() {
|
|
17114
17173
|
this.on("videoUpdate", c(this, Js)[Js]), c(this, tn)[tn] && (this.on("audioUpdate", c(this, ic)[ic]), this.on("screenShareUpdate", c(this, ac)[ac]));
|
|
@@ -17325,6 +17384,7 @@ var yI = Object.defineProperty, kI = Object.getOwnPropertyDescriptor, So = funct
|
|
|
17325
17384
|
* Internal method, do not use
|
|
17326
17385
|
* @param {HTMLVideoElement} e
|
|
17327
17386
|
*/
|
|
17387
|
+
/** @access private */
|
|
17328
17388
|
function(t) {
|
|
17329
17389
|
if (this.videoEnabled) {
|
|
17330
17390
|
var n;
|
|
@@ -17483,9 +17543,13 @@ var Wo = /* @__PURE__ */ function(s) {
|
|
|
17483
17543
|
return Array.from(new Set(this.compulsoryPeers.concat(this.activeSpeakerPeers)));
|
|
17484
17544
|
} }, { key: "compulsoryPeers", get: function() {
|
|
17485
17545
|
return Array.from(this._compulsoryPeers.values());
|
|
17486
|
-
} }, {
|
|
17487
|
-
|
|
17488
|
-
|
|
17546
|
+
} }, {
|
|
17547
|
+
key: "activeSpeakerPeers",
|
|
17548
|
+
get: function() {
|
|
17549
|
+
return Array.from(this._activeSpeakerPeers);
|
|
17550
|
+
}
|
|
17551
|
+
/** @access private */
|
|
17552
|
+
}, { key: "_removeFromCompulsoryPeer", value: function(e) {
|
|
17489
17553
|
this._compulsoryPeers.delete(e);
|
|
17490
17554
|
} }]);
|
|
17491
17555
|
}(), lg = new OI(), DI = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, Kn = function(r, e, t, n) {
|
|
@@ -17514,7 +17578,7 @@ var Wo = /* @__PURE__ */ function(s) {
|
|
|
17514
17578
|
this.rateLimitConfig.maxInvocations = t, this.rateLimitConfig.period = n;
|
|
17515
17579
|
}
|
|
17516
17580
|
/**
|
|
17517
|
-
* @
|
|
17581
|
+
* @private
|
|
17518
17582
|
* Not for external use
|
|
17519
17583
|
*/
|
|
17520
17584
|
}, { key: "telemetry", get: function() {
|
|
@@ -18778,9 +18842,12 @@ var Pt = Bn(Ph().permissions), G = /* @__PURE__ */ E("permissions"), ns = /* @__
|
|
|
18778
18842
|
throw i.logger.error("PermissionPreset::load_preset_permissions_failed"), new $("Could not load preset permissions.", "0904");
|
|
18779
18843
|
return c(i, gs)[gs] = e, c(i, ns)[ns] = n, c(i, G)[G] = t, a && i.setupEvents(), i;
|
|
18780
18844
|
}
|
|
18781
|
-
return R(r, s), P(r, [{ key: "setupEvents", value:
|
|
18782
|
-
|
|
18783
|
-
|
|
18845
|
+
return R(r, s), P(r, [{ key: "setupEvents", value: (
|
|
18846
|
+
/** @access private */
|
|
18847
|
+
function() {
|
|
18848
|
+
c(this, gs)[gs].getValue("peerSessionStore").on(V.UPDATE_PERMISSIONS, c(this, Al)[Al]);
|
|
18849
|
+
}
|
|
18850
|
+
) }, {
|
|
18784
18851
|
key: "mediaRoomType",
|
|
18785
18852
|
get: (
|
|
18786
18853
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -19162,14 +19229,7 @@ var Mt = /* @__PURE__ */ E("context"), hg = /* @__PURE__ */ function(s) {
|
|
|
19162
19229
|
var t;
|
|
19163
19230
|
return (t = c(this, Mt)[Mt]) === null || t === void 0 ? void 0 : t.getValue("peerId");
|
|
19164
19231
|
}
|
|
19165
|
-
/**
|
|
19166
|
-
* @param {Object} options
|
|
19167
|
-
* @param {boolean} [options.video]
|
|
19168
|
-
* @param {boolean} [options.audio]
|
|
19169
|
-
* @param {MediaConstraints} [options.constraints]
|
|
19170
|
-
* @param {boolean} [skipAwaits=false]
|
|
19171
|
-
* @param {Context} [context=null]
|
|
19172
|
-
*/
|
|
19232
|
+
/** @access private */
|
|
19173
19233
|
}, { key: "init", value: function() {
|
|
19174
19234
|
var e = m(/* @__PURE__ */ h().m(function n() {
|
|
19175
19235
|
var i = this, a, o, u, l, d, p, v, f, g, y, k, w, T, S, A = arguments, M;
|
|
@@ -19698,7 +19758,7 @@ var Mt = /* @__PURE__ */ E("context"), hg = /* @__PURE__ */ function(s) {
|
|
|
19698
19758
|
}
|
|
19699
19759
|
return R(r, s), P(r, [{ key: "telemetry", get: (
|
|
19700
19760
|
/**
|
|
19701
|
-
* @
|
|
19761
|
+
* @private
|
|
19702
19762
|
* Not for external use
|
|
19703
19763
|
*/
|
|
19704
19764
|
function() {
|
|
@@ -19719,9 +19779,13 @@ var Mt = /* @__PURE__ */ E("context"), hg = /* @__PURE__ */ function(s) {
|
|
|
19719
19779
|
* We might want to look at deprecating the `id` sometime later. */
|
|
19720
19780
|
}, { key: "peerId", get: function() {
|
|
19721
19781
|
return c(this, De)[De].getValue("peerId");
|
|
19722
|
-
} }, { key: "cleanupEvents", value: function() {
|
|
19723
|
-
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"), c(this, rt)[rt].removeAllListeners("permissionsUpdate");
|
|
19724
19782
|
} }, {
|
|
19783
|
+
key: "cleanupEvents",
|
|
19784
|
+
value: function() {
|
|
19785
|
+
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"), c(this, rt)[rt].removeAllListeners("permissionsUpdate");
|
|
19786
|
+
}
|
|
19787
|
+
/** @access private */
|
|
19788
|
+
}, {
|
|
19725
19789
|
key: "setupEvents",
|
|
19726
19790
|
value: function() {
|
|
19727
19791
|
var t = this;
|
|
@@ -20273,6 +20337,8 @@ var Mt = /* @__PURE__ */ E("context"), hg = /* @__PURE__ */ function(s) {
|
|
|
20273
20337
|
}
|
|
20274
20338
|
/**
|
|
20275
20339
|
* @access private
|
|
20340
|
+
* @param {boolean} isPinned
|
|
20341
|
+
* @param {boolean} [emitEvent=true]
|
|
20276
20342
|
* Not for external use.
|
|
20277
20343
|
*/
|
|
20278
20344
|
}, {
|
|
@@ -20444,6 +20510,7 @@ var Mt = /* @__PURE__ */ E("context"), hg = /* @__PURE__ */ function(s) {
|
|
|
20444
20510
|
/**
|
|
20445
20511
|
* Internal method, do not use
|
|
20446
20512
|
*/
|
|
20513
|
+
/** @access private */
|
|
20447
20514
|
}, { key: "updateVideo", value: function(t) {
|
|
20448
20515
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
20449
20516
|
if (this.videoEnabled) {
|
|
@@ -27359,13 +27426,21 @@ var GO = /* @__PURE__ */ function() {
|
|
|
27359
27426
|
var n = e.getValue("logger");
|
|
27360
27427
|
return t = C(this, r, [n]), t.meetings = [], t.parentMeeting = null, Object.defineProperty(t, Lt, { writable: !0, value: void 0 }), c(t, Lt)[Lt] = e, t;
|
|
27361
27428
|
}
|
|
27362
|
-
return R(r, s), P(r, [{
|
|
27363
|
-
|
|
27364
|
-
|
|
27365
|
-
|
|
27366
|
-
|
|
27367
|
-
|
|
27368
|
-
}
|
|
27429
|
+
return R(r, s), P(r, [{
|
|
27430
|
+
key: "isActive",
|
|
27431
|
+
get: function() {
|
|
27432
|
+
return this.meetings.length !== 0;
|
|
27433
|
+
}
|
|
27434
|
+
/** @access private */
|
|
27435
|
+
}, {
|
|
27436
|
+
key: "validateAlterAction",
|
|
27437
|
+
value: function() {
|
|
27438
|
+
var t = c(this, Lt)[Lt].getValue("self").permissions.connectedMeetings;
|
|
27439
|
+
if (!(t != null && t.canAlterConnectedMeetings))
|
|
27440
|
+
throw new Error("You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset.");
|
|
27441
|
+
}
|
|
27442
|
+
/** @access private */
|
|
27443
|
+
}, { key: "validateMoveAction", value: function(t, n) {
|
|
27369
27444
|
var i;
|
|
27370
27445
|
if (!(n != null && n.length))
|
|
27371
27446
|
throw new Error("You're trying to move participants with an empty list.");
|
|
@@ -28168,6 +28243,7 @@ var vi = /* @__PURE__ */ E("trackMap"), rD = /* @__PURE__ */ function(s) {
|
|
|
28168
28243
|
return e;
|
|
28169
28244
|
}()
|
|
28170
28245
|
/**
|
|
28246
|
+
* @access private
|
|
28171
28247
|
* @param {string} peerId
|
|
28172
28248
|
* @param {ClientOptions} options
|
|
28173
28249
|
* @param {string} meetingId
|
|
@@ -28176,7 +28252,7 @@ var vi = /* @__PURE__ */ E("trackMap"), rD = /* @__PURE__ */ function(s) {
|
|
|
28176
28252
|
}, { key: "setupContext", value: function(e, t, n, i) {
|
|
28177
28253
|
var a, o, u = ha.createContext(e, t), l = N(N({}, Fb), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
|
|
28178
28254
|
return u.setValue("options", t), u.setValue("peerId", e), u.setValue("modules", l), u.setValue("sdkName", "web-core"), u.setValue("meetingId", n), u.setValue("apiBase", i.apiBase), u.setValue("baseURI", i.baseURI), u.setValue("userId", i.participantId), u.setValue("organizationId", i.orgId), u.setValue("authToken", t.authToken), u.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), u.setValue("env", Hb({ baseURI: i.baseURI })), u.setValue("defaults", d), u.setValue("onError", t.onError || function() {
|
|
28179
|
-
}), u.setValue("cachedUserDetails", Bn(t.cachedUserDetails)), u.setValue("sdkVersion", "2.0.
|
|
28255
|
+
}), u.setValue("cachedUserDetails", Bn(t.cachedUserDetails)), u.setValue("sdkVersion", "2.0.2-staging.1"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && u.setValue("audioPlayback", new rD()), u;
|
|
28180
28256
|
} }]);
|
|
28181
28257
|
}());
|
|
28182
28258
|
ll([ir("0002"), Li.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], ga.prototype, "join", 1);
|