liveroom-client-element 0.0.32 → 0.0.33
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/liveroom-client-element.cjs +6 -6
- package/dist/liveroom-client-element.js +195 -195
- package/dist/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -169,16 +169,16 @@ function ec(i, e, t, n, s, r, a, o, c, u, d, h) {
|
|
|
169
169
|
const w = [], I = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), Q = [];
|
|
170
170
|
for (b = m; b--; ) {
|
|
171
171
|
const q = h(s, r, b), K = t(q);
|
|
172
|
-
let
|
|
173
|
-
|
|
172
|
+
let x = a.get(K);
|
|
173
|
+
x ? n && Q.push(() => x.p(q, e)) : (x = u(K, q), x.c()), I.set(K, w[b] = x), K in T && D.set(K, Math.abs(b - T[K]));
|
|
174
174
|
}
|
|
175
175
|
const j = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Set();
|
|
176
176
|
function ce(q) {
|
|
177
177
|
Wr(q, 1), q.m(o, d), a.set(q.key, q), d = q.first, m--;
|
|
178
178
|
}
|
|
179
179
|
for (; f && m; ) {
|
|
180
|
-
const q = w[m - 1], K = i[f - 1],
|
|
181
|
-
q === K ? (d = q.first, f--, m--) : I.has(F) ? !a.has(
|
|
180
|
+
const q = w[m - 1], K = i[f - 1], x = q.key, F = K.key;
|
|
181
|
+
q === K ? (d = q.first, f--, m--) : I.has(F) ? !a.has(x) || j.has(x) ? ce(q) : de.has(F) ? f-- : D.get(x) > D.get(F) ? (de.add(x), ce(q)) : (j.add(F), f--) : (c(K, a), f--);
|
|
182
182
|
}
|
|
183
183
|
for (; f--; ) {
|
|
184
184
|
const q = i[f];
|
|
@@ -925,7 +925,7 @@ const { isArray: _c } = Array, ss = (i) => !!i && typeof i == "object" && typeof
|
|
|
925
925
|
const t = new RegExp(i, e ? "i" : void 0);
|
|
926
926
|
return (n) => t.test(n);
|
|
927
927
|
};
|
|
928
|
-
class
|
|
928
|
+
class xc extends Me {
|
|
929
929
|
constructor(t, n, s) {
|
|
930
930
|
super(t);
|
|
931
931
|
L(this, "pos");
|
|
@@ -1008,7 +1008,7 @@ class Ac extends Me {
|
|
|
1008
1008
|
t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(10), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeObject(this.props);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
class
|
|
1011
|
+
class Ac extends Me {
|
|
1012
1012
|
constructor(t, n, s) {
|
|
1013
1013
|
super(t);
|
|
1014
1014
|
L(this, "pos");
|
|
@@ -1682,9 +1682,9 @@ const Qc = (i, e) => {
|
|
|
1682
1682
|
case "str_del":
|
|
1683
1683
|
return new Rc($(i.path), i.pos, i.str, i.len);
|
|
1684
1684
|
case "split":
|
|
1685
|
-
return new Ac($(i.path), i.pos, i.props || null);
|
|
1686
|
-
case "merge":
|
|
1687
1685
|
return new xc($(i.path), i.pos, i.props || null);
|
|
1686
|
+
case "merge":
|
|
1687
|
+
return new Ac($(i.path), i.pos, i.props || null);
|
|
1688
1688
|
case "extend":
|
|
1689
1689
|
return new Lc($(i.path), i.props, !!i.deleteNull);
|
|
1690
1690
|
default:
|
|
@@ -1747,7 +1747,7 @@ function Zc(i, e, t) {
|
|
|
1747
1747
|
}
|
|
1748
1748
|
var Vi = (i) => typeof i == "function" ? i : function() {
|
|
1749
1749
|
return i;
|
|
1750
|
-
}, eu = typeof self < "u" ? self : null, Fi = typeof window < "u" ? window : null, $i = eu || Fi || $i, tu = "2.0.0", Qe = { connecting: 0, open: 1, closing: 2, closed: 3 }, iu = 1e4, nu = 1e3,
|
|
1750
|
+
}, eu = typeof self < "u" ? self : null, Fi = typeof window < "u" ? window : null, $i = eu || Fi || $i, tu = "2.0.0", Qe = { connecting: 0, open: 1, closing: 2, closed: 3 }, iu = 1e4, nu = 1e3, Ae = {
|
|
1751
1751
|
closed: "closed",
|
|
1752
1752
|
errored: "errored",
|
|
1753
1753
|
joined: "joined",
|
|
@@ -1824,20 +1824,20 @@ var Vi = (i) => typeof i == "function" ? i : function() {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
}, ru = class {
|
|
1826
1826
|
constructor(i, e, t) {
|
|
1827
|
-
this.state =
|
|
1827
|
+
this.state = Ae.closed, this.topic = i, this.params = Vi(e || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new un(this, bt.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new Yr(() => {
|
|
1828
1828
|
this.socket.isConnected() && this.rejoin();
|
|
1829
1829
|
}, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
|
|
1830
1830
|
this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
|
|
1831
1831
|
})), this.joinPush.receive("ok", () => {
|
|
1832
|
-
this.state =
|
|
1832
|
+
this.state = Ae.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((n) => n.send()), this.pushBuffer = [];
|
|
1833
1833
|
}), this.joinPush.receive("error", () => {
|
|
1834
|
-
this.state =
|
|
1834
|
+
this.state = Ae.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1835
1835
|
}), this.onClose(() => {
|
|
1836
|
-
this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state =
|
|
1836
|
+
this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = Ae.closed, this.socket.remove(this);
|
|
1837
1837
|
}), this.onError((n) => {
|
|
1838
|
-
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, n), this.isJoining() && this.joinPush.reset(), this.state =
|
|
1838
|
+
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, n), this.isJoining() && this.joinPush.reset(), this.state = Ae.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1839
1839
|
}), this.joinPush.receive("timeout", () => {
|
|
1840
|
-
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new un(this, bt.leave, Vi({}), this.timeout).send(), this.state =
|
|
1840
|
+
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new un(this, bt.leave, Vi({}), this.timeout).send(), this.state = Ae.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1841
1841
|
}), this.on(bt.reply, (n, s) => {
|
|
1842
1842
|
this.trigger(this.replyEventName(s), n);
|
|
1843
1843
|
});
|
|
@@ -1872,7 +1872,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
|
|
|
1872
1872
|
return this.canPush() ? n.send() : (n.startTimeout(), this.pushBuffer.push(n)), n;
|
|
1873
1873
|
}
|
|
1874
1874
|
leave(i = this.timeout) {
|
|
1875
|
-
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state =
|
|
1875
|
+
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = Ae.leaving;
|
|
1876
1876
|
let e = () => {
|
|
1877
1877
|
this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(bt.close, "leave");
|
|
1878
1878
|
}, t = new un(this, bt.leave, Vi({}), i);
|
|
@@ -1888,7 +1888,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
|
|
|
1888
1888
|
return this.joinPush.ref;
|
|
1889
1889
|
}
|
|
1890
1890
|
rejoin(i = this.timeout) {
|
|
1891
|
-
this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state =
|
|
1891
|
+
this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = Ae.joining, this.joinPush.resend(i));
|
|
1892
1892
|
}
|
|
1893
1893
|
trigger(i, e, t, n) {
|
|
1894
1894
|
let s = this.onMessage(i, e, t, n);
|
|
@@ -1902,19 +1902,19 @@ var Vi = (i) => typeof i == "function" ? i : function() {
|
|
|
1902
1902
|
return `chan_reply_${i}`;
|
|
1903
1903
|
}
|
|
1904
1904
|
isClosed() {
|
|
1905
|
-
return this.state ===
|
|
1905
|
+
return this.state === Ae.closed;
|
|
1906
1906
|
}
|
|
1907
1907
|
isErrored() {
|
|
1908
|
-
return this.state ===
|
|
1908
|
+
return this.state === Ae.errored;
|
|
1909
1909
|
}
|
|
1910
1910
|
isJoined() {
|
|
1911
|
-
return this.state ===
|
|
1911
|
+
return this.state === Ae.joined;
|
|
1912
1912
|
}
|
|
1913
1913
|
isJoining() {
|
|
1914
|
-
return this.state ===
|
|
1914
|
+
return this.state === Ae.joining;
|
|
1915
1915
|
}
|
|
1916
1916
|
isLeaving() {
|
|
1917
|
-
return this.state ===
|
|
1917
|
+
return this.state === Ae.leaving;
|
|
1918
1918
|
}
|
|
1919
1919
|
}, Rn = class {
|
|
1920
1920
|
static request(i, e, t, n, s, r, a) {
|
|
@@ -2461,13 +2461,13 @@ var Gs;
|
|
|
2461
2461
|
function Q(v, y, S) {
|
|
2462
2462
|
if (!oe(y))
|
|
2463
2463
|
throw new TypeError();
|
|
2464
|
-
return ie(S) || (S = yt(S)),
|
|
2464
|
+
return ie(S) || (S = yt(S)), xi(v, y, S);
|
|
2465
2465
|
}
|
|
2466
2466
|
e("hasMetadata", Q);
|
|
2467
2467
|
function j(v, y, S) {
|
|
2468
2468
|
if (!oe(y))
|
|
2469
2469
|
throw new TypeError();
|
|
2470
|
-
return ie(S) || (S = yt(S)),
|
|
2470
|
+
return ie(S) || (S = yt(S)), Ai(v, y, S);
|
|
2471
2471
|
}
|
|
2472
2472
|
e("hasOwnMetadata", j);
|
|
2473
2473
|
function de(v, y, S) {
|
|
@@ -2494,7 +2494,7 @@ var Gs;
|
|
|
2494
2494
|
return ie(y) || (y = yt(y)), Ee(v, y);
|
|
2495
2495
|
}
|
|
2496
2496
|
e("getOwnMetadataKeys", K);
|
|
2497
|
-
function
|
|
2497
|
+
function x(v, y, S) {
|
|
2498
2498
|
if (!oe(y))
|
|
2499
2499
|
throw new TypeError();
|
|
2500
2500
|
ie(S) || (S = yt(S));
|
|
@@ -2511,7 +2511,7 @@ var Gs;
|
|
|
2511
2511
|
var N = T.get(y);
|
|
2512
2512
|
return N.delete(S), N.size > 0 || T.delete(y), !0;
|
|
2513
2513
|
}
|
|
2514
|
-
e("deleteMetadata",
|
|
2514
|
+
e("deleteMetadata", x);
|
|
2515
2515
|
function F(v, y) {
|
|
2516
2516
|
for (var S = v.length - 1; S >= 0; --S) {
|
|
2517
2517
|
var E = v[S], N = E(y);
|
|
@@ -2549,14 +2549,14 @@ var Gs;
|
|
|
2549
2549
|
}
|
|
2550
2550
|
return N;
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2553
|
-
var E =
|
|
2552
|
+
function xi(v, y, S) {
|
|
2553
|
+
var E = Ai(v, y, S);
|
|
2554
2554
|
if (E)
|
|
2555
2555
|
return !0;
|
|
2556
2556
|
var N = Jn(y);
|
|
2557
|
-
return vt(N) ? !1 :
|
|
2557
|
+
return vt(N) ? !1 : xi(v, N, S);
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2559
|
+
function Ai(v, y, S) {
|
|
2560
2560
|
var E = Ue(
|
|
2561
2561
|
y,
|
|
2562
2562
|
S,
|
|
@@ -2566,7 +2566,7 @@ var Gs;
|
|
|
2566
2566
|
return ie(E) ? !1 : Po(E.has(v));
|
|
2567
2567
|
}
|
|
2568
2568
|
function M(v, y, S) {
|
|
2569
|
-
var E =
|
|
2569
|
+
var E = Ai(v, y, S);
|
|
2570
2570
|
if (E)
|
|
2571
2571
|
return ae(v, y, S);
|
|
2572
2572
|
var N = Jn(y);
|
|
@@ -2621,10 +2621,10 @@ var Gs;
|
|
|
2621
2621
|
if (ie(E))
|
|
2622
2622
|
return S;
|
|
2623
2623
|
for (var N = E.keys(), le = Io(N), B = 0; ; ) {
|
|
2624
|
-
var J =
|
|
2624
|
+
var J = Ao(le);
|
|
2625
2625
|
if (!J)
|
|
2626
2626
|
return S.length = B, S;
|
|
2627
|
-
var U =
|
|
2627
|
+
var U = xo(J);
|
|
2628
2628
|
try {
|
|
2629
2629
|
S[B] = U;
|
|
2630
2630
|
} catch (H) {
|
|
@@ -2773,10 +2773,10 @@ var Gs;
|
|
|
2773
2773
|
throw new TypeError();
|
|
2774
2774
|
return S;
|
|
2775
2775
|
}
|
|
2776
|
-
function
|
|
2776
|
+
function xo(v) {
|
|
2777
2777
|
return v.value;
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function Ao(v) {
|
|
2780
2780
|
var y = v.next();
|
|
2781
2781
|
return y.done ? !1 : y;
|
|
2782
2782
|
}
|
|
@@ -3068,8 +3068,8 @@ var Xr = { exports: {} };
|
|
|
3068
3068
|
w = w ?? "WARN";
|
|
3069
3069
|
var j = "loglevel";
|
|
3070
3070
|
typeof T == "string" ? j += ":" + T : typeof T == "symbol" && (j = void 0);
|
|
3071
|
-
function de(
|
|
3072
|
-
var F = (s[
|
|
3071
|
+
function de(x) {
|
|
3072
|
+
var F = (s[x] || "silent").toUpperCase();
|
|
3073
3073
|
if (!(typeof window === t || !j)) {
|
|
3074
3074
|
try {
|
|
3075
3075
|
window.localStorage[j] = F;
|
|
@@ -3083,19 +3083,19 @@ var Xr = { exports: {} };
|
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
3085
|
function ce() {
|
|
3086
|
-
var
|
|
3086
|
+
var x;
|
|
3087
3087
|
if (!(typeof window === t || !j)) {
|
|
3088
3088
|
try {
|
|
3089
|
-
|
|
3089
|
+
x = window.localStorage[j];
|
|
3090
3090
|
} catch {
|
|
3091
3091
|
}
|
|
3092
|
-
if (typeof
|
|
3092
|
+
if (typeof x === t)
|
|
3093
3093
|
try {
|
|
3094
3094
|
var F = window.document.cookie, fe = F.indexOf(encodeURIComponent(j) + "=");
|
|
3095
|
-
fe !== -1 && (
|
|
3095
|
+
fe !== -1 && (x = /^([^;]+)/.exec(F.slice(fe))[1]);
|
|
3096
3096
|
} catch {
|
|
3097
3097
|
}
|
|
3098
|
-
return D.levels[
|
|
3098
|
+
return D.levels[x] === void 0 && (x = void 0), x;
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
3101
|
function q() {
|
|
@@ -3120,20 +3120,20 @@ var Xr = { exports: {} };
|
|
|
3120
3120
|
SILENT: 5
|
|
3121
3121
|
}, D.methodFactory = I || d, D.getLevel = function() {
|
|
3122
3122
|
return Q;
|
|
3123
|
-
}, D.setLevel = function(
|
|
3124
|
-
if (typeof
|
|
3125
|
-
if (Q =
|
|
3123
|
+
}, D.setLevel = function(x, F) {
|
|
3124
|
+
if (typeof x == "string" && D.levels[x.toUpperCase()] !== void 0 && (x = D.levels[x.toUpperCase()]), typeof x == "number" && x >= 0 && x <= D.levels.SILENT) {
|
|
3125
|
+
if (Q = x, F !== !1 && de(x), c.call(D, x, T), typeof console === t && x < D.levels.SILENT)
|
|
3126
3126
|
return "No console available for logging";
|
|
3127
3127
|
} else
|
|
3128
|
-
throw "log.setLevel() called with invalid level: " +
|
|
3129
|
-
}, D.setDefaultLevel = function(
|
|
3130
|
-
w =
|
|
3128
|
+
throw "log.setLevel() called with invalid level: " + x;
|
|
3129
|
+
}, D.setDefaultLevel = function(x) {
|
|
3130
|
+
w = x, ce() || D.setLevel(x, !1);
|
|
3131
3131
|
}, D.resetLevel = function() {
|
|
3132
3132
|
D.setLevel(w, !1), q();
|
|
3133
|
-
}, D.enableAll = function(
|
|
3134
|
-
D.setLevel(D.levels.TRACE,
|
|
3135
|
-
}, D.disableAll = function(
|
|
3136
|
-
D.setLevel(D.levels.SILENT,
|
|
3133
|
+
}, D.enableAll = function(x) {
|
|
3134
|
+
D.setLevel(D.levels.TRACE, x);
|
|
3135
|
+
}, D.disableAll = function(x) {
|
|
3136
|
+
D.setLevel(D.levels.SILENT, x);
|
|
3137
3137
|
};
|
|
3138
3138
|
var K = ce();
|
|
3139
3139
|
K == null && (K = w), D.setLevel(K, !1);
|
|
@@ -3410,10 +3410,10 @@ function zs(i) {
|
|
|
3410
3410
|
const c = Number(i.slice(a, o));
|
|
3411
3411
|
s *= t, n = n * t + c, n >= vn && (s = s + (n / vn | 0), n = n % vn);
|
|
3412
3412
|
}
|
|
3413
|
-
return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), e ? ra(n, s) :
|
|
3413
|
+
return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), e ? ra(n, s) : xs(n, s);
|
|
3414
3414
|
}
|
|
3415
3415
|
function Tu(i, e) {
|
|
3416
|
-
let t =
|
|
3416
|
+
let t = xs(i, e);
|
|
3417
3417
|
const n = t.hi & 2147483648;
|
|
3418
3418
|
n && (t = ra(t.lo, t.hi));
|
|
3419
3419
|
const s = sa(t.lo, t.hi);
|
|
@@ -3436,14 +3436,14 @@ function Su(i, e) {
|
|
|
3436
3436
|
hi: e >>> 0
|
|
3437
3437
|
};
|
|
3438
3438
|
}
|
|
3439
|
-
function
|
|
3439
|
+
function xs(i, e) {
|
|
3440
3440
|
return {
|
|
3441
3441
|
lo: i | 0,
|
|
3442
3442
|
hi: e | 0
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
3445
|
function ra(i, e) {
|
|
3446
|
-
return e = ~e, i ? i = ~i + 1 : e += 1,
|
|
3446
|
+
return e = ~e, i ? i = ~i + 1 : e += 1, xs(i, e);
|
|
3447
3447
|
}
|
|
3448
3448
|
const Ks = (i) => {
|
|
3449
3449
|
const e = String(i);
|
|
@@ -4003,7 +4003,7 @@ function Iu() {
|
|
|
4003
4003
|
d ? u[h].push(yn(e, new m(), n)) : u[h] instanceof _ ? yn(e, u[h], n) : (u[h] = yn(e, new m(), n), m.fieldWrapper && !c.oneof && !c.repeated && (u[h] = m.fieldWrapper.unwrapField(u[h])));
|
|
4004
4004
|
break;
|
|
4005
4005
|
case "map":
|
|
4006
|
-
let [b, T] =
|
|
4006
|
+
let [b, T] = xu(c, e, n);
|
|
4007
4007
|
u[h][b] = T;
|
|
4008
4008
|
break;
|
|
4009
4009
|
}
|
|
@@ -4014,7 +4014,7 @@ function Iu() {
|
|
|
4014
4014
|
function yn(i, e, t) {
|
|
4015
4015
|
return e.getType().runtime.bin.readMessage(e, i, i.uint32(), t), e;
|
|
4016
4016
|
}
|
|
4017
|
-
function
|
|
4017
|
+
function xu(i, e, t) {
|
|
4018
4018
|
const n = e.uint32(), s = e.pos + n;
|
|
4019
4019
|
let r, a;
|
|
4020
4020
|
for (; e.pos < s; ) {
|
|
@@ -4090,7 +4090,7 @@ function qi(i, e) {
|
|
|
4090
4090
|
return i.sint32();
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
|
-
function
|
|
4093
|
+
function Au(i, e, t, n, s) {
|
|
4094
4094
|
i.tag(t.no, se.LengthDelimited), i.fork();
|
|
4095
4095
|
let r = n;
|
|
4096
4096
|
switch (t.K) {
|
|
@@ -4172,7 +4172,7 @@ function Lu() {
|
|
|
4172
4172
|
break;
|
|
4173
4173
|
case "map":
|
|
4174
4174
|
for (const [u, d] of Object.entries(r))
|
|
4175
|
-
|
|
4175
|
+
Au(e, t, s, u, d);
|
|
4176
4176
|
break;
|
|
4177
4177
|
}
|
|
4178
4178
|
}
|
|
@@ -6575,7 +6575,7 @@ function gi(i) {
|
|
|
6575
6575
|
}, a);
|
|
6576
6576
|
}
|
|
6577
6577
|
}
|
|
6578
|
-
var
|
|
6578
|
+
var As = { exports: {} }, ki = typeof Reflect == "object" ? Reflect : null, nr = ki && typeof ki.apply == "function" ? ki.apply : function(e, t, n) {
|
|
6579
6579
|
return Function.prototype.apply.call(e, t, n);
|
|
6580
6580
|
}, bn;
|
|
6581
6581
|
ki && typeof ki.ownKeys == "function" ? bn = ki.ownKeys : Object.getOwnPropertySymbols ? bn = function(e) {
|
|
@@ -6592,8 +6592,8 @@ var ha = Number.isNaN || function(e) {
|
|
|
6592
6592
|
function X() {
|
|
6593
6593
|
X.init.call(this);
|
|
6594
6594
|
}
|
|
6595
|
-
|
|
6596
|
-
|
|
6595
|
+
As.exports = X;
|
|
6596
|
+
As.exports.once = td;
|
|
6597
6597
|
X.EventEmitter = X;
|
|
6598
6598
|
X.prototype._events = void 0;
|
|
6599
6599
|
X.prototype._eventsCount = 0;
|
|
@@ -6805,7 +6805,7 @@ function ba(i, e, t, n) {
|
|
|
6805
6805
|
else
|
|
6806
6806
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
|
|
6807
6807
|
}
|
|
6808
|
-
var gt =
|
|
6808
|
+
var gt = As.exports;
|
|
6809
6809
|
let ka = !0, Ta = !0;
|
|
6810
6810
|
function kn(i, e, t) {
|
|
6811
6811
|
const n = i.match(e);
|
|
@@ -7218,7 +7218,7 @@ function Ia(i) {
|
|
|
7218
7218
|
return e.apply(this, arguments);
|
|
7219
7219
|
};
|
|
7220
7220
|
}
|
|
7221
|
-
function
|
|
7221
|
+
function xa(i) {
|
|
7222
7222
|
i.RTCPeerConnection.prototype.getLocalStreams = function() {
|
|
7223
7223
|
return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, Object.keys(this._shimmedLocalStreams).map((a) => this._shimmedLocalStreams[a][0]);
|
|
7224
7224
|
};
|
|
@@ -7253,11 +7253,11 @@ function Aa(i) {
|
|
|
7253
7253
|
}), s.apply(this, arguments);
|
|
7254
7254
|
};
|
|
7255
7255
|
}
|
|
7256
|
-
function
|
|
7256
|
+
function Aa(i, e) {
|
|
7257
7257
|
if (!i.RTCPeerConnection)
|
|
7258
7258
|
return;
|
|
7259
7259
|
if (i.RTCPeerConnection.prototype.addTrack && e.version >= 65)
|
|
7260
|
-
return
|
|
7260
|
+
return xa(i);
|
|
7261
7261
|
const t = i.RTCPeerConnection.prototype.getLocalStreams;
|
|
7262
7262
|
i.RTCPeerConnection.prototype.getLocalStreams = function() {
|
|
7263
7263
|
const d = t.apply(this);
|
|
@@ -7375,8 +7375,8 @@ function Oa(i, e) {
|
|
|
7375
7375
|
var cr = /* @__PURE__ */ Object.freeze({
|
|
7376
7376
|
__proto__: null,
|
|
7377
7377
|
fixNegotiationNeeded: Oa,
|
|
7378
|
-
shimAddTrackRemoveTrack:
|
|
7379
|
-
shimAddTrackRemoveTrackWithNative:
|
|
7378
|
+
shimAddTrackRemoveTrack: Aa,
|
|
7379
|
+
shimAddTrackRemoveTrackWithNative: xa,
|
|
7380
7380
|
shimGetDisplayMedia: ad,
|
|
7381
7381
|
shimGetSendersWithDtmf: Ra,
|
|
7382
7382
|
shimGetStats: _a,
|
|
@@ -8356,7 +8356,7 @@ function dd() {
|
|
|
8356
8356
|
return t("Chrome shim is not included in this adapter release."), s;
|
|
8357
8357
|
if (n.version === null)
|
|
8358
8358
|
return t("Chrome shim can not determine version, not shimming."), s;
|
|
8359
|
-
t("adapter.js shimming chrome."), s.browserShim = cr, wn(i, n), En(i), wa(i, n), Ea(i), ms(i, n), Pa(i),
|
|
8359
|
+
t("adapter.js shimming chrome."), s.browserShim = cr, wn(i, n), En(i), wa(i, n), Ea(i), ms(i, n), Pa(i), Aa(i, n), Ra(i), _a(i), Ia(i), Oa(i, n), Tn(i), vs(i), ys(i), Sn(i, n), Cn(i), bs(i, n);
|
|
8360
8360
|
break;
|
|
8361
8361
|
case "firefox":
|
|
8362
8362
|
if (!ur || !gs || !e.shimFirefox)
|
|
@@ -8550,7 +8550,7 @@ at.fields = l.util.newFieldList(() => [{
|
|
|
8550
8550
|
no: 1,
|
|
8551
8551
|
name: "join",
|
|
8552
8552
|
kind: "message",
|
|
8553
|
-
T:
|
|
8553
|
+
T: xt,
|
|
8554
8554
|
oneof: "message"
|
|
8555
8555
|
}, {
|
|
8556
8556
|
no: 2,
|
|
@@ -8652,7 +8652,7 @@ at.fields = l.util.newFieldList(() => [{
|
|
|
8652
8652
|
no: 19,
|
|
8653
8653
|
name: "reconnect",
|
|
8654
8654
|
kind: "message",
|
|
8655
|
-
T:
|
|
8655
|
+
T: At,
|
|
8656
8656
|
oneof: "message"
|
|
8657
8657
|
}, {
|
|
8658
8658
|
no: 20,
|
|
@@ -8875,26 +8875,26 @@ Ge.fields = l.util.newFieldList(() => [{
|
|
|
8875
8875
|
T: 8
|
|
8876
8876
|
/* ScalarType.BOOL */
|
|
8877
8877
|
}]);
|
|
8878
|
-
class
|
|
8878
|
+
class xt extends _ {
|
|
8879
8879
|
constructor(e) {
|
|
8880
8880
|
super(), this.otherParticipants = [], this.serverVersion = "", this.iceServers = [], this.subscriberPrimary = !1, this.alternativeUrl = "", this.serverRegion = "", this.pingTimeout = 0, this.pingInterval = 0, this.sifTrailer = new Uint8Array(0), l.util.initPartial(e, this);
|
|
8881
8881
|
}
|
|
8882
8882
|
static fromBinary(e, t) {
|
|
8883
|
-
return new
|
|
8883
|
+
return new xt().fromBinary(e, t);
|
|
8884
8884
|
}
|
|
8885
8885
|
static fromJson(e, t) {
|
|
8886
|
-
return new
|
|
8886
|
+
return new xt().fromJson(e, t);
|
|
8887
8887
|
}
|
|
8888
8888
|
static fromJsonString(e, t) {
|
|
8889
|
-
return new
|
|
8889
|
+
return new xt().fromJsonString(e, t);
|
|
8890
8890
|
}
|
|
8891
8891
|
static equals(e, t) {
|
|
8892
|
-
return l.util.equals(
|
|
8892
|
+
return l.util.equals(xt, e, t);
|
|
8893
8893
|
}
|
|
8894
8894
|
}
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8895
|
+
xt.runtime = l;
|
|
8896
|
+
xt.typeName = "livekit.JoinResponse";
|
|
8897
|
+
xt.fields = l.util.newFieldList(() => [{
|
|
8898
8898
|
no: 1,
|
|
8899
8899
|
name: "room",
|
|
8900
8900
|
kind: "message",
|
|
@@ -8969,26 +8969,26 @@ At.fields = l.util.newFieldList(() => [{
|
|
|
8969
8969
|
T: 12
|
|
8970
8970
|
/* ScalarType.BYTES */
|
|
8971
8971
|
}]);
|
|
8972
|
-
class
|
|
8972
|
+
class At extends _ {
|
|
8973
8973
|
constructor(e) {
|
|
8974
8974
|
super(), this.iceServers = [], l.util.initPartial(e, this);
|
|
8975
8975
|
}
|
|
8976
8976
|
static fromBinary(e, t) {
|
|
8977
|
-
return new
|
|
8977
|
+
return new At().fromBinary(e, t);
|
|
8978
8978
|
}
|
|
8979
8979
|
static fromJson(e, t) {
|
|
8980
|
-
return new
|
|
8980
|
+
return new At().fromJson(e, t);
|
|
8981
8981
|
}
|
|
8982
8982
|
static fromJsonString(e, t) {
|
|
8983
|
-
return new
|
|
8983
|
+
return new At().fromJsonString(e, t);
|
|
8984
8984
|
}
|
|
8985
8985
|
static equals(e, t) {
|
|
8986
|
-
return l.util.equals(
|
|
8986
|
+
return l.util.equals(At, e, t);
|
|
8987
8987
|
}
|
|
8988
8988
|
}
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8989
|
+
At.runtime = l;
|
|
8990
|
+
At.typeName = "livekit.ReconnectResponse";
|
|
8991
|
+
At.fields = l.util.newFieldList(() => [{
|
|
8992
8992
|
no: 1,
|
|
8993
8993
|
name: "ice_servers",
|
|
8994
8994
|
kind: "message",
|
|
@@ -10182,7 +10182,7 @@ function yd(i) {
|
|
|
10182
10182
|
function lr(i, e) {
|
|
10183
10183
|
return (i == null ? void 0 : i.toLowerCase().replace(/audio\/|video\//y, "")) === (e == null ? void 0 : e.toLowerCase().replace(/audio\/|video\//y, ""));
|
|
10184
10184
|
}
|
|
10185
|
-
var
|
|
10185
|
+
var xn;
|
|
10186
10186
|
(function(i) {
|
|
10187
10187
|
i.telephone = {
|
|
10188
10188
|
maxBitrate: 12e3
|
|
@@ -10197,7 +10197,7 @@ var An;
|
|
|
10197
10197
|
}, i.musicHighQualityStereo = {
|
|
10198
10198
|
maxBitrate: 96e3
|
|
10199
10199
|
};
|
|
10200
|
-
})(
|
|
10200
|
+
})(xn || (xn = {}));
|
|
10201
10201
|
const en = {
|
|
10202
10202
|
h90: new Z(160, 90, 9e4, 20),
|
|
10203
10203
|
h180: new Z(320, 180, 16e4, 20),
|
|
@@ -10230,10 +10230,10 @@ var P;
|
|
|
10230
10230
|
(function(i) {
|
|
10231
10231
|
i.Connected = "connected", i.Reconnecting = "reconnecting", i.Reconnected = "reconnected", i.Disconnected = "disconnected", i.ConnectionStateChanged = "connectionStateChanged", i.StateChanged = "connectionStateChanged", i.MediaDevicesChanged = "mediaDevicesChanged", i.ParticipantConnected = "participantConnected", i.ParticipantDisconnected = "participantDisconnected", i.TrackPublished = "trackPublished", i.TrackSubscribed = "trackSubscribed", i.TrackSubscriptionFailed = "trackSubscriptionFailed", i.TrackUnpublished = "trackUnpublished", i.TrackUnsubscribed = "trackUnsubscribed", i.TrackMuted = "trackMuted", i.TrackUnmuted = "trackUnmuted", i.LocalTrackPublished = "localTrackPublished", i.LocalTrackUnpublished = "localTrackUnpublished", i.LocalAudioSilenceDetected = "localAudioSilenceDetected", i.ActiveSpeakersChanged = "activeSpeakersChanged", i.ParticipantMetadataChanged = "participantMetadataChanged", i.ParticipantNameChanged = "participantNameChanged", i.RoomMetadataChanged = "roomMetadataChanged", i.DataReceived = "dataReceived", i.ConnectionQualityChanged = "connectionQualityChanged", i.TrackStreamStateChanged = "trackStreamStateChanged", i.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", i.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", i.AudioPlaybackStatusChanged = "audioPlaybackChanged", i.MediaDevicesError = "mediaDevicesError", i.ParticipantPermissionsChanged = "participantPermissionsChanged", i.SignalConnected = "signalConnected", i.RecordingStatusChanged = "recordingStatusChanged", i.ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged", i.EncryptionError = "encryptionError", i.DCBufferStatusChanged = "dcBufferStatusChanged", i.ActiveDeviceChanged = "activeDeviceChanged";
|
|
10232
10232
|
})(P || (P = {}));
|
|
10233
|
-
var
|
|
10233
|
+
var A;
|
|
10234
10234
|
(function(i) {
|
|
10235
10235
|
i.TrackPublished = "trackPublished", i.TrackSubscribed = "trackSubscribed", i.TrackSubscriptionFailed = "trackSubscriptionFailed", i.TrackUnpublished = "trackUnpublished", i.TrackUnsubscribed = "trackUnsubscribed", i.TrackMuted = "trackMuted", i.TrackUnmuted = "trackUnmuted", i.LocalTrackPublished = "localTrackPublished", i.LocalTrackUnpublished = "localTrackUnpublished", i.ParticipantMetadataChanged = "participantMetadataChanged", i.ParticipantNameChanged = "participantNameChanged", i.DataReceived = "dataReceived", i.IsSpeakingChanged = "isSpeakingChanged", i.ConnectionQualityChanged = "connectionQualityChanged", i.TrackStreamStateChanged = "trackStreamStateChanged", i.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", i.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", i.MediaDevicesError = "mediaDevicesError", i.ParticipantPermissionsChanged = "participantPermissionsChanged", i.PCTrackAdded = "pcTrackAdded";
|
|
10236
|
-
})(
|
|
10236
|
+
})(A || (A = {}));
|
|
10237
10237
|
var O;
|
|
10238
10238
|
(function(i) {
|
|
10239
10239
|
i.TransportsCreated = "transportsCreated", i.Connected = "connected", i.Disconnected = "disconnected", i.Resuming = "resuming", i.Resumed = "resumed", i.Restarting = "restarting", i.Restarted = "restarted", i.SignalResumed = "signalResumed", i.SignalRestarted = "signalRestarted", i.Closing = "closing", i.MediaTrackAdded = "mediaTrackAdded", i.ActiveSpeakersUpdate = "activeSpeakersUpdate", i.DataPacketReceived = "dataPacketReceived", i.RTPVideoMapUpdate = "rtpVideoMapUpdate", i.DCBufferStatusChanged = "dcBufferStatusChanged", i.ParticipantUpdate = "participantUpdate", i.RoomUpdate = "roomUpdate", i.SpeakersChanged = "speakersChanged", i.StreamStateChanged = "streamStateChanged", i.ConnectionQualityUpdate = "connectionQualityUpdate", i.SubscriptionError = "subscriptionError", i.SubscriptionPermissionUpdate = "subscriptionPermissionUpdate";
|
|
@@ -10319,10 +10319,10 @@ class C extends gt.EventEmitter {
|
|
|
10319
10319
|
});
|
|
10320
10320
|
}
|
|
10321
10321
|
addAppVisibilityListener() {
|
|
10322
|
-
|
|
10322
|
+
xe() ? (this.isInBackground = document.visibilityState === "hidden", document.addEventListener("visibilitychange", this.appVisibilityChangedListener)) : this.isInBackground = !1;
|
|
10323
10323
|
}
|
|
10324
10324
|
removeAppVisibilityListener() {
|
|
10325
|
-
|
|
10325
|
+
xe() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
|
|
10326
10326
|
}
|
|
10327
10327
|
}
|
|
10328
10328
|
function yi(i, e) {
|
|
@@ -10561,7 +10561,7 @@ const Rd = {
|
|
|
10561
10561
|
Firefox: "100"
|
|
10562
10562
|
};
|
|
10563
10563
|
function _d(i) {
|
|
10564
|
-
if (!
|
|
10564
|
+
if (!xe() || !("setCodecPreferences" in i))
|
|
10565
10565
|
return !1;
|
|
10566
10566
|
const e = _i();
|
|
10567
10567
|
if (!(e != null && e.name) || !e.version)
|
|
@@ -10582,9 +10582,9 @@ function Fn() {
|
|
|
10582
10582
|
return ((i = _i()) === null || i === void 0 ? void 0 : i.name) === "Safari";
|
|
10583
10583
|
}
|
|
10584
10584
|
function no() {
|
|
10585
|
-
return
|
|
10585
|
+
return xe() ? /Tablet|iPad|Mobile|Android|BlackBerry/.test(navigator.userAgent) : !1;
|
|
10586
10586
|
}
|
|
10587
|
-
function
|
|
10587
|
+
function xe() {
|
|
10588
10588
|
return typeof document < "u";
|
|
10589
10589
|
}
|
|
10590
10590
|
function ci() {
|
|
@@ -10605,7 +10605,7 @@ function ro() {
|
|
|
10605
10605
|
return i.platform;
|
|
10606
10606
|
}
|
|
10607
10607
|
function mr() {
|
|
10608
|
-
if (
|
|
10608
|
+
if (xe())
|
|
10609
10609
|
return window.devicePixelRatio;
|
|
10610
10610
|
if (ci()) {
|
|
10611
10611
|
let i = so();
|
|
@@ -10627,18 +10627,18 @@ function ao(i, e) {
|
|
|
10627
10627
|
}
|
|
10628
10628
|
return i === "" && e !== "" ? -1 : e === "" ? 1 : t.length == n.length ? 0 : t.length < n.length ? -1 : 1;
|
|
10629
10629
|
}
|
|
10630
|
-
function
|
|
10630
|
+
function xd(i) {
|
|
10631
10631
|
for (const e of i)
|
|
10632
10632
|
e.target.handleResize(e);
|
|
10633
10633
|
}
|
|
10634
|
-
function
|
|
10634
|
+
function Ad(i) {
|
|
10635
10635
|
for (const e of i)
|
|
10636
10636
|
e.target.handleVisibilityChanged(e);
|
|
10637
10637
|
}
|
|
10638
10638
|
let zn = null;
|
|
10639
|
-
const gr = () => (zn || (zn = new ResizeObserver(
|
|
10639
|
+
const gr = () => (zn || (zn = new ResizeObserver(xd)), zn);
|
|
10640
10640
|
let Kn = null;
|
|
10641
|
-
const vr = () => (Kn || (Kn = new IntersectionObserver(
|
|
10641
|
+
const vr = () => (Kn || (Kn = new IntersectionObserver(Ad, {
|
|
10642
10642
|
root: null,
|
|
10643
10643
|
rootMargin: "0px"
|
|
10644
10644
|
})), Kn);
|
|
@@ -10868,14 +10868,14 @@ class Ds {
|
|
|
10868
10868
|
sendOffer(e) {
|
|
10869
10869
|
p.debug("sending offer", e), this.sendRequest({
|
|
10870
10870
|
case: "offer",
|
|
10871
|
-
value:
|
|
10871
|
+
value: An(e)
|
|
10872
10872
|
});
|
|
10873
10873
|
}
|
|
10874
10874
|
// answer a server-initiated offer
|
|
10875
10875
|
sendAnswer(e) {
|
|
10876
10876
|
return p.debug("sending answer"), this.sendRequest({
|
|
10877
10877
|
case: "answer",
|
|
10878
|
-
value:
|
|
10878
|
+
value: An(e)
|
|
10879
10879
|
});
|
|
10880
10880
|
}
|
|
10881
10881
|
sendIceCandidate(e, t) {
|
|
@@ -11083,7 +11083,7 @@ function kr(i) {
|
|
|
11083
11083
|
}
|
|
11084
11084
|
return e;
|
|
11085
11085
|
}
|
|
11086
|
-
function
|
|
11086
|
+
function An(i) {
|
|
11087
11087
|
return new Ce({
|
|
11088
11088
|
sdp: i.sdp,
|
|
11089
11089
|
type: i.type
|
|
@@ -11612,7 +11612,7 @@ class Wd extends gt.EventEmitter {
|
|
|
11612
11612
|
this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled, this.room.localParticipant.identity), t.getKeys().forEach((n) => {
|
|
11613
11613
|
this.postKey(n);
|
|
11614
11614
|
});
|
|
11615
|
-
}), e.localParticipant.on(
|
|
11615
|
+
}), e.localParticipant.on(A.LocalTrackPublished, (n) => g(this, void 0, void 0, function* () {
|
|
11616
11616
|
this.setupE2EESender(n.track, n.track.sender);
|
|
11617
11617
|
})), t.on(ii.SetKey, (n) => this.postKey(n)).on(ii.RatchetRequest, (n, s) => this.postRatchetRequest(n, s));
|
|
11618
11618
|
}
|
|
@@ -12553,8 +12553,8 @@ const il = {
|
|
|
12553
12553
|
/**
|
|
12554
12554
|
* @deprecated
|
|
12555
12555
|
*/
|
|
12556
|
-
audioBitrate:
|
|
12557
|
-
audioPreset:
|
|
12556
|
+
audioBitrate: xn.music.maxBitrate,
|
|
12557
|
+
audioPreset: xn.music,
|
|
12558
12558
|
dtx: !0,
|
|
12559
12559
|
red: !0,
|
|
12560
12560
|
forceStereo: !1,
|
|
@@ -12581,7 +12581,7 @@ const il = {
|
|
|
12581
12581
|
maxRetries: 1,
|
|
12582
12582
|
peerConnectionTimeout: 15e3,
|
|
12583
12583
|
websocketTimeout: 15e3
|
|
12584
|
-
}, _r = "_lossy", Ir = "_reliable", sl = 2 * 1e3,
|
|
12584
|
+
}, _r = "_lossy", Ir = "_reliable", sl = 2 * 1e3, xr = "leave-reconnect";
|
|
12585
12585
|
var Le;
|
|
12586
12586
|
(function(i) {
|
|
12587
12587
|
i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
|
|
@@ -12651,7 +12651,7 @@ class rl extends gt.EventEmitter {
|
|
|
12651
12651
|
s(r);
|
|
12652
12652
|
return;
|
|
12653
12653
|
}
|
|
12654
|
-
t ===
|
|
12654
|
+
t === xr && (a = 0), p.debug("reconnecting in ".concat(a, "ms")), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ye.setTimeout(() => this.attemptReconnect(n), a);
|
|
12655
12655
|
}, this.waitForRestarted = () => new Promise((t, n) => {
|
|
12656
12656
|
this.pcState === Le.Connected && t();
|
|
12657
12657
|
const s = () => {
|
|
@@ -12846,7 +12846,7 @@ class rl extends gt.EventEmitter {
|
|
|
12846
12846
|
}, this.client.onClose = () => {
|
|
12847
12847
|
this.handleDisconnect("signal", Be.RR_SIGNAL_DISCONNECTED);
|
|
12848
12848
|
}, this.client.onLeave = (e) => {
|
|
12849
|
-
e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.primaryPC = void 0, this.handleDisconnect(
|
|
12849
|
+
e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.primaryPC = void 0, this.handleDisconnect(xr)) : (this.emit(O.Disconnected, e == null ? void 0 : e.reason), this.close()), p.trace("leave request", {
|
|
12850
12850
|
leave: e
|
|
12851
12851
|
});
|
|
12852
12852
|
};
|
|
@@ -13176,10 +13176,10 @@ class rl extends gt.EventEmitter {
|
|
|
13176
13176
|
this.clearReconnectTimeout(), this.reconnectAttempts = 0;
|
|
13177
13177
|
}
|
|
13178
13178
|
registerOnLineListener() {
|
|
13179
|
-
|
|
13179
|
+
xe() && window.addEventListener("online", this.handleBrowserOnLine);
|
|
13180
13180
|
}
|
|
13181
13181
|
deregisterOnLineListener() {
|
|
13182
|
-
|
|
13182
|
+
xe() && window.removeEventListener("online", this.handleBrowserOnLine);
|
|
13183
13183
|
}
|
|
13184
13184
|
}
|
|
13185
13185
|
function al(i) {
|
|
@@ -13208,7 +13208,7 @@ function al(i) {
|
|
|
13208
13208
|
}
|
|
13209
13209
|
class fn extends Error {
|
|
13210
13210
|
}
|
|
13211
|
-
class
|
|
13211
|
+
class Ar {
|
|
13212
13212
|
constructor(e, t) {
|
|
13213
13213
|
this.lastUpdateAt = 0, this.settingsCacheTime = 3e3, this.attemptedRegions = [], this.serverUrl = new URL(e), this.token = t;
|
|
13214
13214
|
}
|
|
@@ -13351,7 +13351,7 @@ class Pe extends nn {
|
|
|
13351
13351
|
}
|
|
13352
13352
|
/* @internal */
|
|
13353
13353
|
startMonitor() {
|
|
13354
|
-
|
|
13354
|
+
xe() && (this.monitorInterval || (this.monitorInterval = setInterval(() => {
|
|
13355
13355
|
this.monitorSender();
|
|
13356
13356
|
}, Us)));
|
|
13357
13357
|
}
|
|
@@ -13611,7 +13611,7 @@ class Ne extends nn {
|
|
|
13611
13611
|
/* @internal */
|
|
13612
13612
|
startMonitor(e) {
|
|
13613
13613
|
var t;
|
|
13614
|
-
if (this.signalClient = e, !
|
|
13614
|
+
if (this.signalClient = e, !xe())
|
|
13615
13615
|
return;
|
|
13616
13616
|
const n = (t = this.sender) === null || t === void 0 ? void 0 : t.getParameters();
|
|
13617
13617
|
n && (this.encodings = n.encodings), !this.monitorInterval && (this.monitorInterval = setInterval(() => {
|
|
@@ -14292,7 +14292,7 @@ class vl {
|
|
|
14292
14292
|
}, this.onLeavePiP = () => {
|
|
14293
14293
|
var n;
|
|
14294
14294
|
this.isPiP = !1, (n = this.handleVisibilityChanged) === null || n === void 0 || n.call(this);
|
|
14295
|
-
}, this.element = e, this.isIntersecting = t ?? Ur(e), this.isPiP =
|
|
14295
|
+
}, this.element = e, this.isIntersecting = t ?? Ur(e), this.isPiP = xe() && document.pictureInPictureElement === e, this.visibilityChangedAt = 0;
|
|
14296
14296
|
}
|
|
14297
14297
|
width() {
|
|
14298
14298
|
return this.element.clientWidth;
|
|
@@ -14522,11 +14522,11 @@ class ko extends gt.EventEmitter {
|
|
|
14522
14522
|
**/
|
|
14523
14523
|
_setMetadata(e) {
|
|
14524
14524
|
const t = this.metadata !== e, n = this.metadata;
|
|
14525
|
-
this.metadata = e, t && this.emit(
|
|
14525
|
+
this.metadata = e, t && this.emit(A.ParticipantMetadataChanged, n);
|
|
14526
14526
|
}
|
|
14527
14527
|
_setName(e) {
|
|
14528
14528
|
const t = this.name !== e;
|
|
14529
|
-
this.name = e, t && this.emit(
|
|
14529
|
+
this.name = e, t && this.emit(A.ParticipantNameChanged, e);
|
|
14530
14530
|
}
|
|
14531
14531
|
/** @internal */
|
|
14532
14532
|
setPermissions(e) {
|
|
@@ -14535,16 +14535,16 @@ class ko extends gt.EventEmitter {
|
|
|
14535
14535
|
var h;
|
|
14536
14536
|
return u !== ((h = this.permissions) === null || h === void 0 ? void 0 : h.canPublishSources[d]);
|
|
14537
14537
|
});
|
|
14538
|
-
return this.permissions = e, c && this.emit(
|
|
14538
|
+
return this.permissions = e, c && this.emit(A.ParticipantPermissionsChanged, o), c;
|
|
14539
14539
|
}
|
|
14540
14540
|
/** @internal */
|
|
14541
14541
|
setIsSpeaking(e) {
|
|
14542
|
-
e !== this.isSpeaking && (this.isSpeaking = e, e && (this.lastSpokeAt = /* @__PURE__ */ new Date()), this.emit(
|
|
14542
|
+
e !== this.isSpeaking && (this.isSpeaking = e, e && (this.lastSpokeAt = /* @__PURE__ */ new Date()), this.emit(A.IsSpeakingChanged, e));
|
|
14543
14543
|
}
|
|
14544
14544
|
/** @internal */
|
|
14545
14545
|
setConnectionQuality(e) {
|
|
14546
14546
|
const t = this._connectionQuality;
|
|
14547
|
-
this._connectionQuality = yl(e), t !== this._connectionQuality && this.emit(
|
|
14547
|
+
this._connectionQuality = yl(e), t !== this._connectionQuality && this.emit(A.ConnectionQualityChanged, this._connectionQuality);
|
|
14548
14548
|
}
|
|
14549
14549
|
/**
|
|
14550
14550
|
* @internal
|
|
@@ -14554,9 +14554,9 @@ class ko extends gt.EventEmitter {
|
|
|
14554
14554
|
}
|
|
14555
14555
|
addTrackPublication(e) {
|
|
14556
14556
|
e.on(R.Muted, () => {
|
|
14557
|
-
this.emit(
|
|
14557
|
+
this.emit(A.TrackMuted, e);
|
|
14558
14558
|
}), e.on(R.Unmuted, () => {
|
|
14559
|
-
this.emit(
|
|
14559
|
+
this.emit(A.TrackUnmuted, e);
|
|
14560
14560
|
});
|
|
14561
14561
|
const t = e;
|
|
14562
14562
|
switch (t.track && (t.track.sid = e.trackSid), this.tracks.set(e.trackSid, e), e.kind) {
|
|
@@ -14725,15 +14725,15 @@ class sn extends ko {
|
|
|
14725
14725
|
n.participantSid = this.sid;
|
|
14726
14726
|
}), this.signalClient.sendUpdateSubscription(t);
|
|
14727
14727
|
}), e.on(R.SubscriptionPermissionChanged, (t) => {
|
|
14728
|
-
this.emit(
|
|
14728
|
+
this.emit(A.TrackSubscriptionPermissionChanged, e, t);
|
|
14729
14729
|
}), e.on(R.SubscriptionStatusChanged, (t) => {
|
|
14730
|
-
this.emit(
|
|
14730
|
+
this.emit(A.TrackSubscriptionStatusChanged, e, t);
|
|
14731
14731
|
}), e.on(R.Subscribed, (t) => {
|
|
14732
|
-
this.emit(
|
|
14732
|
+
this.emit(A.TrackSubscribed, t, e);
|
|
14733
14733
|
}), e.on(R.Unsubscribed, (t) => {
|
|
14734
|
-
this.emit(
|
|
14734
|
+
this.emit(A.TrackUnsubscribed, t, e);
|
|
14735
14735
|
}), e.on(R.SubscriptionFailed, (t) => {
|
|
14736
|
-
this.emit(
|
|
14736
|
+
this.emit(A.TrackSubscriptionFailed, e.trackSid, t);
|
|
14737
14737
|
});
|
|
14738
14738
|
}
|
|
14739
14739
|
getTrack(e) {
|
|
@@ -14776,7 +14776,7 @@ class sn extends ko {
|
|
|
14776
14776
|
p.error("could not find published track", {
|
|
14777
14777
|
participant: this.sid,
|
|
14778
14778
|
trackSid: t
|
|
14779
|
-
}), this.emit(
|
|
14779
|
+
}), this.emit(A.TrackSubscriptionFailed, t);
|
|
14780
14780
|
return;
|
|
14781
14781
|
}
|
|
14782
14782
|
a === void 0 && (a = 20), setTimeout(() => {
|
|
@@ -14788,7 +14788,7 @@ class sn extends ko {
|
|
|
14788
14788
|
p.error("unable to subscribe because MediaStreamTrack is ended. Do not call MediaStreamTrack.stop()", {
|
|
14789
14789
|
participant: this.sid,
|
|
14790
14790
|
trackSid: t
|
|
14791
|
-
}), this.emit(
|
|
14791
|
+
}), this.emit(A.TrackSubscriptionFailed, t);
|
|
14792
14792
|
return;
|
|
14793
14793
|
}
|
|
14794
14794
|
const c = e.kind === "video";
|
|
@@ -14832,7 +14832,7 @@ class sn extends ko {
|
|
|
14832
14832
|
participantSid: this.sid
|
|
14833
14833
|
}), this.unpublishTrack(s.trackSid, !0));
|
|
14834
14834
|
}), n.forEach((s) => {
|
|
14835
|
-
this.emit(
|
|
14835
|
+
this.emit(A.TrackPublished, s);
|
|
14836
14836
|
}), !0;
|
|
14837
14837
|
}
|
|
14838
14838
|
/** @internal */
|
|
@@ -14851,7 +14851,7 @@ class sn extends ko {
|
|
|
14851
14851
|
this.videoTracks.delete(e);
|
|
14852
14852
|
break;
|
|
14853
14853
|
}
|
|
14854
|
-
t && this.emit(
|
|
14854
|
+
t && this.emit(A.TrackUnpublished, n);
|
|
14855
14855
|
}
|
|
14856
14856
|
/**
|
|
14857
14857
|
* @internal
|
|
@@ -14960,7 +14960,7 @@ class Fr extends ko {
|
|
|
14960
14960
|
yield r.mute();
|
|
14961
14961
|
else if (r instanceof Pe || r instanceof Ne)
|
|
14962
14962
|
try {
|
|
14963
|
-
if (
|
|
14963
|
+
if (xe())
|
|
14964
14964
|
try {
|
|
14965
14965
|
const a = yield navigator == null ? void 0 : navigator.permissions.query({
|
|
14966
14966
|
// the permission query for camera and microphone currently not supported in Safari and Firefox
|
|
@@ -15057,7 +15057,7 @@ class Fr extends ko {
|
|
|
15057
15057
|
/** @internal */
|
|
15058
15058
|
setPermissions(e) {
|
|
15059
15059
|
const t = this.permissions, n = super.setPermissions(e);
|
|
15060
|
-
return n && t && this.emit(
|
|
15060
|
+
return n && t && this.emit(A.ParticipantPermissionsChanged, t), n;
|
|
15061
15061
|
}
|
|
15062
15062
|
/** @internal */
|
|
15063
15063
|
setE2EEEnabled(e) {
|
|
@@ -15112,7 +15112,7 @@ class Fr extends ko {
|
|
|
15112
15112
|
} catch (u) {
|
|
15113
15113
|
throw c == null || c.forEach((d) => {
|
|
15114
15114
|
d.stop();
|
|
15115
|
-
}), u instanceof Error && !(u instanceof Ze) && this.emit(
|
|
15115
|
+
}), u instanceof Error && !(u instanceof Ze) && this.emit(A.MediaDevicesError, u), u;
|
|
15116
15116
|
} finally {
|
|
15117
15117
|
this.pendingPublishing.delete(e);
|
|
15118
15118
|
}
|
|
@@ -15336,8 +15336,8 @@ class Fr extends ko {
|
|
|
15336
15336
|
t = Object.assign({}, t), p.debug("primary codec ".concat(t.videoCodec, " not supported, fallback to ").concat(F.codec)), t.videoCodec = F.codec, t.videoEncoding = F.encoding, j = de;
|
|
15337
15337
|
}
|
|
15338
15338
|
}
|
|
15339
|
-
const
|
|
15340
|
-
if (
|
|
15339
|
+
const x = new On(e.kind, ce, e);
|
|
15340
|
+
if (x.options = t, e.sid = ce.sid, !this.engine.publisher)
|
|
15341
15341
|
throw new me("publisher is closed");
|
|
15342
15342
|
if (p.debug("publishing ".concat(e.kind, " with encodings"), {
|
|
15343
15343
|
encodings: j,
|
|
@@ -15361,7 +15361,7 @@ class Fr extends ko {
|
|
|
15361
15361
|
codec: e.codec,
|
|
15362
15362
|
maxbr: j[0].maxBitrate / 1e3
|
|
15363
15363
|
});
|
|
15364
|
-
return yield this.engine.negotiate(), e instanceof Ne ? e.startMonitor(this.engine.client) : e instanceof Pe && e.startMonitor(), this.addTrackPublication(
|
|
15364
|
+
return yield this.engine.negotiate(), e instanceof Ne ? e.startMonitor(this.engine.client) : e instanceof Pe && e.startMonitor(), this.addTrackPublication(x), this.emit(A.LocalTrackPublished, x), x;
|
|
15365
15365
|
});
|
|
15366
15366
|
}
|
|
15367
15367
|
get isLocal() {
|
|
@@ -15446,7 +15446,7 @@ class Fr extends ko {
|
|
|
15446
15446
|
this.videoTracks.delete(r.trackSid);
|
|
15447
15447
|
break;
|
|
15448
15448
|
}
|
|
15449
|
-
return this.emit(
|
|
15449
|
+
return this.emit(A.LocalTrackUnpublished, r), r.setTrack(void 0), a && (yield this.engine.negotiate()), r;
|
|
15450
15450
|
});
|
|
15451
15451
|
}
|
|
15452
15452
|
unpublishTracks(e) {
|
|
@@ -15573,7 +15573,7 @@ class So extends gt.EventEmitter {
|
|
|
15573
15573
|
return p.info("already connected to room ".concat(this.name)), c(), Promise.resolve();
|
|
15574
15574
|
if (this.connectFuture)
|
|
15575
15575
|
return c(), this.connectFuture.promise;
|
|
15576
|
-
this.setAndEmitConnectionState(Y.Connecting), ((o = this.regionUrlProvider) === null || o === void 0 ? void 0 : o.getServerUrl().toString()) !== s && (this.regionUrl = void 0, this.regionUrlProvider = void 0), ws(new URL(s)) && (this.regionUrlProvider === void 0 ? this.regionUrlProvider = new
|
|
15576
|
+
this.setAndEmitConnectionState(Y.Connecting), ((o = this.regionUrlProvider) === null || o === void 0 ? void 0 : o.getServerUrl().toString()) !== s && (this.regionUrl = void 0, this.regionUrlProvider = void 0), ws(new URL(s)) && (this.regionUrlProvider === void 0 ? this.regionUrlProvider = new Ar(s, r) : this.regionUrlProvider.updateToken(r), this.regionUrlProvider.fetchRegionSettings().catch((h) => {
|
|
15577
15577
|
p.warn("could not fetch region settings", {
|
|
15578
15578
|
error: h
|
|
15579
15579
|
});
|
|
@@ -15648,7 +15648,7 @@ class So extends gt.EventEmitter {
|
|
|
15648
15648
|
} catch (d) {
|
|
15649
15649
|
throw this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), d;
|
|
15650
15650
|
}
|
|
15651
|
-
|
|
15651
|
+
xe() && this.options.disconnectOnPageLeave && (window.addEventListener("pagehide", this.onPageLeave), window.addEventListener("beforeunload", this.onPageLeave)), xe() && (document.addEventListener("freeze", this.onPageLeave), (u = navigator.mediaDevices) === null || u === void 0 || u.addEventListener("devicechange", this.handleDeviceChange)), this.setAndEmitConnectionState(Y.Connected), this.emit(P.Connected), this.registerConnectionReconcile();
|
|
15652
15652
|
}), this.disconnect = function() {
|
|
15653
15653
|
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
15654
15654
|
return g(t, void 0, void 0, function* () {
|
|
@@ -15744,7 +15744,7 @@ class So extends gt.EventEmitter {
|
|
|
15744
15744
|
if (!a)
|
|
15745
15745
|
return;
|
|
15746
15746
|
const o = a.getTrackPublication(r.trackSid);
|
|
15747
|
-
!o || !o.track || (o.track.streamState = C.streamStateFromProto(r.state), a.emit(
|
|
15747
|
+
!o || !o.track || (o.track.streamState = C.streamStateFromProto(r.state), a.emit(A.TrackStreamStateChanged, o, o.track.streamState), this.emitWhenConnected(P.TrackStreamStateChanged, o, o.track.streamState, a));
|
|
15748
15748
|
});
|
|
15749
15749
|
}, this.handleSubscriptionPermissionUpdate = (s) => {
|
|
15750
15750
|
const r = this.participants.get(s.participantSid);
|
|
@@ -15760,7 +15760,7 @@ class So extends gt.EventEmitter {
|
|
|
15760
15760
|
a && a.setSubscriptionError(s.err);
|
|
15761
15761
|
}, this.handleDataPacket = (s, r) => {
|
|
15762
15762
|
const a = this.participants.get(s.participantSid);
|
|
15763
|
-
this.emit(P.DataReceived, s.payload, a, r, s.topic), a == null || a.emit(
|
|
15763
|
+
this.emit(P.DataReceived, s.payload, a, r, s.topic), a == null || a.emit(A.DataReceived, s.payload, r);
|
|
15764
15764
|
}, this.handleAudioPlaybackStarted = () => {
|
|
15765
15765
|
this.canPlaybackAudio || (this.audioEnabled = !0, this.emit(P.AudioPlaybackStatusChanged, !0));
|
|
15766
15766
|
}, this.handleAudioPlaybackFailed = (s) => {
|
|
@@ -15891,7 +15891,7 @@ class So extends gt.EventEmitter {
|
|
|
15891
15891
|
p.debug("prepareConnection to ".concat(e));
|
|
15892
15892
|
try {
|
|
15893
15893
|
if (ws(new URL(e)) && t) {
|
|
15894
|
-
this.regionUrlProvider = new
|
|
15894
|
+
this.regionUrlProvider = new Ar(e, t);
|
|
15895
15895
|
const n = yield this.regionUrlProvider.getNextBestRegionUrl();
|
|
15896
15896
|
n && this.state === Y.Disconnected && (this.regionUrl = n, yield fetch(br(n), {
|
|
15897
15897
|
method: "HEAD"
|
|
@@ -16119,7 +16119,7 @@ class So extends gt.EventEmitter {
|
|
|
16119
16119
|
});
|
|
16120
16120
|
}
|
|
16121
16121
|
setupLocalParticipantEvents() {
|
|
16122
|
-
this.localParticipant.on(
|
|
16122
|
+
this.localParticipant.on(A.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).on(A.ParticipantNameChanged, this.onLocalParticipantNameChanged).on(A.TrackMuted, this.onLocalTrackMuted).on(A.TrackUnmuted, this.onLocalTrackUnmuted).on(A.LocalTrackPublished, this.onLocalTrackPublished).on(A.LocalTrackUnpublished, this.onLocalTrackUnpublished).on(A.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).on(A.MediaDevicesError, this.onMediaDevicesError).on(A.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged);
|
|
16123
16123
|
}
|
|
16124
16124
|
recreateEngine() {
|
|
16125
16125
|
var e;
|
|
@@ -16166,7 +16166,7 @@ class So extends gt.EventEmitter {
|
|
|
16166
16166
|
}), this.localParticipant.tracks.forEach((s) => {
|
|
16167
16167
|
var r, a;
|
|
16168
16168
|
s.track && this.localParticipant.unpublishTrack(s.track, e), e && ((r = s.track) === null || r === void 0 || r.detach(), (a = s.track) === null || a === void 0 || a.stop());
|
|
16169
|
-
}), this.localParticipant.off(
|
|
16169
|
+
}), this.localParticipant.off(A.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(A.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(A.TrackMuted, this.onLocalTrackMuted).off(A.TrackUnmuted, this.onLocalTrackUnmuted).off(A.LocalTrackPublished, this.onLocalTrackPublished).off(A.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(A.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(A.MediaDevicesError, this.onMediaDevicesError).off(A.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.tracks.clear(), this.localParticipant.videoTracks.clear(), this.localParticipant.audioTracks.clear(), this.participants.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.expWebAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), xe() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (n = navigator.mediaDevices) === null || n === void 0 || n.removeEventListener("devicechange", this.handleDeviceChange));
|
|
16170
16170
|
} finally {
|
|
16171
16171
|
this.setAndEmitConnectionState(Y.Disconnected), this.emit(P.Disconnected, t);
|
|
16172
16172
|
}
|
|
@@ -16199,33 +16199,33 @@ class So extends gt.EventEmitter {
|
|
|
16199
16199
|
if (this.participants.has(e))
|
|
16200
16200
|
return this.participants.get(e);
|
|
16201
16201
|
const n = this.createParticipant(e, t);
|
|
16202
|
-
return this.participants.set(e, n), this.identityToSid.set(t.identity, t.sid), this.emitWhenConnected(P.ParticipantConnected, n), n.on(
|
|
16202
|
+
return this.participants.set(e, n), this.identityToSid.set(t.identity, t.sid), this.emitWhenConnected(P.ParticipantConnected, n), n.on(A.TrackPublished, (s) => {
|
|
16203
16203
|
this.emitWhenConnected(P.TrackPublished, s, n);
|
|
16204
|
-
}).on(
|
|
16204
|
+
}).on(A.TrackSubscribed, (s, r) => {
|
|
16205
16205
|
s.kind === C.Kind.Audio && (s.on(R.AudioPlaybackStarted, this.handleAudioPlaybackStarted), s.on(R.AudioPlaybackFailed, this.handleAudioPlaybackFailed)), this.emit(P.TrackSubscribed, s, r, n);
|
|
16206
|
-
}).on(
|
|
16206
|
+
}).on(A.TrackUnpublished, (s) => {
|
|
16207
16207
|
this.emit(P.TrackUnpublished, s, n);
|
|
16208
|
-
}).on(
|
|
16208
|
+
}).on(A.TrackUnsubscribed, (s, r) => {
|
|
16209
16209
|
this.emit(P.TrackUnsubscribed, s, r, n);
|
|
16210
|
-
}).on(
|
|
16210
|
+
}).on(A.TrackSubscriptionFailed, (s) => {
|
|
16211
16211
|
this.emit(P.TrackSubscriptionFailed, s, n);
|
|
16212
|
-
}).on(
|
|
16212
|
+
}).on(A.TrackMuted, (s) => {
|
|
16213
16213
|
this.emitWhenConnected(P.TrackMuted, s, n);
|
|
16214
|
-
}).on(
|
|
16214
|
+
}).on(A.TrackUnmuted, (s) => {
|
|
16215
16215
|
this.emitWhenConnected(P.TrackUnmuted, s, n);
|
|
16216
|
-
}).on(
|
|
16216
|
+
}).on(A.ParticipantMetadataChanged, (s) => {
|
|
16217
16217
|
this.emitWhenConnected(P.ParticipantMetadataChanged, s, n);
|
|
16218
|
-
}).on(
|
|
16218
|
+
}).on(A.ParticipantNameChanged, (s) => {
|
|
16219
16219
|
this.emitWhenConnected(P.ParticipantNameChanged, s, n);
|
|
16220
|
-
}).on(
|
|
16220
|
+
}).on(A.ConnectionQualityChanged, (s) => {
|
|
16221
16221
|
this.emitWhenConnected(P.ConnectionQualityChanged, s, n);
|
|
16222
|
-
}).on(
|
|
16222
|
+
}).on(A.ParticipantPermissionsChanged, (s) => {
|
|
16223
16223
|
this.emitWhenConnected(P.ParticipantPermissionsChanged, s, n);
|
|
16224
|
-
}).on(
|
|
16224
|
+
}).on(A.TrackSubscriptionStatusChanged, (s, r) => {
|
|
16225
16225
|
this.emitWhenConnected(P.TrackSubscriptionStatusChanged, s, r, n);
|
|
16226
|
-
}).on(
|
|
16226
|
+
}).on(A.TrackSubscriptionFailed, (s, r) => {
|
|
16227
16227
|
this.emit(P.TrackSubscriptionFailed, s, n, r);
|
|
16228
|
-
}).on(
|
|
16228
|
+
}).on(A.TrackSubscriptionPermissionChanged, (s, r) => {
|
|
16229
16229
|
this.emitWhenConnected(P.TrackSubscriptionPermissionChanged, s, r, n);
|
|
16230
16230
|
}), t && n.updateInfo(t), n;
|
|
16231
16231
|
}
|
|
@@ -16239,11 +16239,11 @@ class So extends gt.EventEmitter {
|
|
|
16239
16239
|
c.isDesired !== r && a.push(c.trackSid);
|
|
16240
16240
|
});
|
|
16241
16241
|
}), this.engine.client.sendSyncState(new ft({
|
|
16242
|
-
answer:
|
|
16242
|
+
answer: An({
|
|
16243
16243
|
sdp: n.sdp,
|
|
16244
16244
|
type: n.type
|
|
16245
16245
|
}),
|
|
16246
|
-
offer: s ?
|
|
16246
|
+
offer: s ? An({
|
|
16247
16247
|
sdp: s.sdp,
|
|
16248
16248
|
type: s.type
|
|
16249
16249
|
}) : void 0,
|
|
@@ -16333,7 +16333,7 @@ class So extends gt.EventEmitter {
|
|
|
16333
16333
|
}), new Ne(s.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
|
|
16334
16334
|
video: !0
|
|
16335
16335
|
})).getVideoTracks()[0] : yr((t = 160 * r.aspectRatios[0]) !== null && t !== void 0 ? t : 1, 160, !0, !0)));
|
|
16336
|
-
this.localParticipant.addTrackPublication(a), this.localParticipant.emit(
|
|
16336
|
+
this.localParticipant.addTrackPublication(a), this.localParticipant.emit(A.LocalTrackPublished, a);
|
|
16337
16337
|
}
|
|
16338
16338
|
if (s.audio) {
|
|
16339
16339
|
const a = new On(C.Kind.Audio, new _e({
|
|
@@ -16343,7 +16343,7 @@ class So extends gt.EventEmitter {
|
|
|
16343
16343
|
}), new Pe(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
|
|
16344
16344
|
audio: !0
|
|
16345
16345
|
})).getAudioTracks()[0] : Yn()));
|
|
16346
|
-
this.localParticipant.addTrackPublication(a), this.localParticipant.emit(
|
|
16346
|
+
this.localParticipant.addTrackPublication(a), this.localParticipant.emit(A.LocalTrackPublished, a);
|
|
16347
16347
|
}
|
|
16348
16348
|
for (let a = 0; a < r.count - 1; a += 1) {
|
|
16349
16349
|
let o = new De({
|
|
@@ -16711,7 +16711,7 @@ class Fl extends gt.EventEmitter {
|
|
|
16711
16711
|
});
|
|
16712
16712
|
}
|
|
16713
16713
|
}
|
|
16714
|
-
function
|
|
16714
|
+
function xl() {
|
|
16715
16715
|
const i = document.createElement("style");
|
|
16716
16716
|
return i.textContent = `
|
|
16717
16717
|
* {
|
|
@@ -16719,7 +16719,7 @@ function Al() {
|
|
|
16719
16719
|
}
|
|
16720
16720
|
`, i;
|
|
16721
16721
|
}
|
|
16722
|
-
function
|
|
16722
|
+
function Al() {
|
|
16723
16723
|
const i = document.createElement("style");
|
|
16724
16724
|
return i.textContent = `
|
|
16725
16725
|
* {
|
|
@@ -16729,7 +16729,7 @@ function xl() {
|
|
|
16729
16729
|
`, i;
|
|
16730
16730
|
}
|
|
16731
16731
|
function Ol(i) {
|
|
16732
|
-
Jo(i, "svelte-
|
|
16732
|
+
Jo(i, "svelte-xrxt5b", '#liveroom-client-element.svelte-xrxt5b.svelte-xrxt5b{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-xrxt5b.svelte-xrxt5b{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-xrxt5b.svelte-xrxt5b{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear;will-change:transform}.user.svelte-xrxt5b .cursor.svelte-xrxt5b{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-xrxt5b .cursor.svelte-xrxt5b{display:none}.user-label.svelte-xrxt5b.svelte-xrxt5b{font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-xrxt5b .user-label.svelte-xrxt5b{display:flex;flex-direction:column;justify-content:center;align-items:center}.user.svelte-xrxt5b .user-label[data-hidevideo="true"].svelte-xrxt5b{position:absolute;top:20px;left:16px}.user.svelte-xrxt5b .user-label[data-hidevideo="false"].svelte-xrxt5b{position:relative;margin:0.5rem 0 0 0.5rem}.user[data-isself="true"].svelte-xrxt5b .user-label.svelte-xrxt5b{display:none}.user-label.svelte-xrxt5b .user-name.svelte-xrxt5b{display:flex;justify-content:center;align-items:center;background-color:var(--color);font-size:0.7rem}.user.svelte-xrxt5b .user-label[data-hidevideo="true"] .user-name.svelte-xrxt5b{padding:0.15rem 0.5rem}.user.svelte-xrxt5b .user-label[data-hidevideo="false"] .user-name.svelte-xrxt5b{position:absolute;inset-inline:0;bottom:-2px;padding:0.15rem 0.5rem 0.35rem 0.5rem}.user.svelte-xrxt5b .user-label #video-container.svelte-xrxt5b{height:7rem;width:7rem;overflow:hidden;display:flex;justify-content:center;align-items:center}.user.svelte-xrxt5b .user-label[data-hidevideo="true"] #video-container.svelte-xrxt5b{display:none}.user.svelte-xrxt5b .user-label #video-container video.svelte-xrxt5b{height:100%;aspect-ratio:16 / 9;transform:scaleX(-1)}.user.svelte-xrxt5b .halo.svelte-xrxt5b{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-xrxt5b .halo[data-show="true"].svelte-xrxt5b{transform:scale(1)}');
|
|
16733
16733
|
}
|
|
16734
16734
|
function Br(i, e, t) {
|
|
16735
16735
|
const n = i.slice();
|
|
@@ -16753,7 +16753,7 @@ function Jr(i) {
|
|
|
16753
16753
|
e = Xe("div");
|
|
16754
16754
|
for (let a = 0; a < t.length; a += 1)
|
|
16755
16755
|
t[a].c();
|
|
16756
|
-
z(e, "id", "users-container"), z(e, "class", "svelte-
|
|
16756
|
+
z(e, "id", "users-container"), z(e, "class", "svelte-xrxt5b");
|
|
16757
16757
|
},
|
|
16758
16758
|
m(a, o) {
|
|
16759
16759
|
Ln(a, e, o);
|
|
@@ -16793,9 +16793,9 @@ function jr(i, e) {
|
|
|
16793
16793
|
key: i,
|
|
16794
16794
|
first: null,
|
|
16795
16795
|
c() {
|
|
16796
|
-
t = Xe("div"), n = $s("svg"), s = $s("path"), r = cn(), a = Xe("div"), o = Xe("div"), c = Xe("video"), h = cn(), f = Xe("div"), b = qr(m), w = cn(), I = Xe("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-
|
|
16797
|
-
e[28].id}`), z(c, "class", "svelte-
|
|
16798
|
-
e[28].camera_enabled), z(I, "class", "halo svelte-
|
|
16796
|
+
t = Xe("div"), n = $s("svg"), s = $s("path"), r = cn(), a = Xe("div"), o = Xe("div"), c = Xe("video"), h = cn(), f = Xe("div"), b = qr(m), w = cn(), I = Xe("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-xrxt5b"), z(c, "id", u = `user-video-${/*user*/
|
|
16797
|
+
e[28].id}`), z(c, "class", "svelte-xrxt5b"), z(o, "id", "video-container"), z(o, "class", "svelte-xrxt5b"), z(f, "class", "user-name svelte-xrxt5b"), z(a, "class", "user-label svelte-xrxt5b"), z(a, "data-hidevideo", T = !/*user*/
|
|
16798
|
+
e[28].camera_enabled), z(I, "class", "halo svelte-xrxt5b"), z(I, "data-show", D = /*user*/
|
|
16799
16799
|
(e[28].id == /*me*/
|
|
16800
16800
|
e[0].id && /*user*/
|
|
16801
16801
|
e[28].is_shift_key_down || /*user*/
|
|
@@ -16804,7 +16804,7 @@ function jr(i, e) {
|
|
|
16804
16804
|
(e[28].is_shift_key_down || /*user*/
|
|
16805
16805
|
e[28].is_mouse_down)) && /*users_count*/
|
|
16806
16806
|
e[3] > 1), z(t, "id", j = "user-" + /*user*/
|
|
16807
|
-
e[28].id), z(t, "class", "user svelte-
|
|
16807
|
+
e[28].id), z(t, "class", "user svelte-xrxt5b"), z(t, "data-isself", de = /*user*/
|
|
16808
16808
|
e[28].id == /*me*/
|
|
16809
16809
|
e[0].id), hi(
|
|
16810
16810
|
t,
|
|
@@ -16819,19 +16819,19 @@ function jr(i, e) {
|
|
|
16819
16819
|
e[28].y
|
|
16820
16820
|
) + "vh"), this.first = t;
|
|
16821
16821
|
},
|
|
16822
|
-
m(K,
|
|
16823
|
-
Ln(K, t,
|
|
16822
|
+
m(K, x) {
|
|
16823
|
+
Ln(K, t, x), Oe(t, n), Oe(n, s), Oe(t, r), Oe(t, a), Oe(a, o), Oe(o, c), ce(), Oe(a, h), Oe(a, f), Oe(f, b), Oe(t, w), Oe(t, I), Oe(t, Q);
|
|
16824
16824
|
},
|
|
16825
|
-
p(K,
|
|
16826
|
-
e = K,
|
|
16825
|
+
p(K, x) {
|
|
16826
|
+
e = K, x & /*users*/
|
|
16827
16827
|
2 && u !== (u = `user-video-${/*user*/
|
|
16828
16828
|
e[28].id}`) && z(c, "id", u), d !== /*user*/
|
|
16829
16829
|
e[28] && (q(), d = /*user*/
|
|
16830
|
-
e[28], ce()),
|
|
16830
|
+
e[28], ce()), x & /*users*/
|
|
16831
16831
|
2 && m !== (m = /*user*/
|
|
16832
|
-
e[28].name + "") && qo(b, m),
|
|
16832
|
+
e[28].name + "") && qo(b, m), x & /*users*/
|
|
16833
16833
|
2 && T !== (T = !/*user*/
|
|
16834
|
-
e[28].camera_enabled) && z(a, "data-hidevideo", T),
|
|
16834
|
+
e[28].camera_enabled) && z(a, "data-hidevideo", T), x & /*users, me, users_count*/
|
|
16835
16835
|
11 && D !== (D = /*user*/
|
|
16836
16836
|
(e[28].id == /*me*/
|
|
16837
16837
|
e[0].id && /*user*/
|
|
@@ -16840,22 +16840,22 @@ function jr(i, e) {
|
|
|
16840
16840
|
e[0].id && /*user*/
|
|
16841
16841
|
(e[28].is_shift_key_down || /*user*/
|
|
16842
16842
|
e[28].is_mouse_down)) && /*users_count*/
|
|
16843
|
-
e[3] > 1) && z(I, "data-show", D),
|
|
16843
|
+
e[3] > 1) && z(I, "data-show", D), x & /*users*/
|
|
16844
16844
|
2 && j !== (j = "user-" + /*user*/
|
|
16845
|
-
e[28].id) && z(t, "id", j),
|
|
16845
|
+
e[28].id) && z(t, "id", j), x & /*users, me*/
|
|
16846
16846
|
3 && de !== (de = /*user*/
|
|
16847
16847
|
e[28].id == /*me*/
|
|
16848
|
-
e[0].id) && z(t, "data-isself", de),
|
|
16848
|
+
e[0].id) && z(t, "data-isself", de), x & /*users*/
|
|
16849
16849
|
2 && hi(
|
|
16850
16850
|
t,
|
|
16851
16851
|
"--color",
|
|
16852
16852
|
/*user*/
|
|
16853
16853
|
e[28].color
|
|
16854
|
-
),
|
|
16854
|
+
), x & /*users*/
|
|
16855
16855
|
2 && hi(t, "--x", parseFloat(
|
|
16856
16856
|
/*user*/
|
|
16857
16857
|
e[28].x
|
|
16858
|
-
) + "vw"),
|
|
16858
|
+
) + "vw"), x & /*users*/
|
|
16859
16859
|
2 && hi(t, "--y", parseFloat(
|
|
16860
16860
|
/*user*/
|
|
16861
16861
|
e[28].y
|
|
@@ -16874,7 +16874,7 @@ function Ll(i) {
|
|
|
16874
16874
|
);
|
|
16875
16875
|
return {
|
|
16876
16876
|
c() {
|
|
16877
|
-
e = Xe("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-
|
|
16877
|
+
e = Xe("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-xrxt5b");
|
|
16878
16878
|
},
|
|
16879
16879
|
m(n, s) {
|
|
16880
16880
|
Ln(n, e, s), t && t.m(e, null);
|
|
@@ -16898,7 +16898,7 @@ function Rs(i, e) {
|
|
|
16898
16898
|
return e === "vertical" && ["auto", "scroll"].includes(t) && i.scrollHeight > i.clientHeight || e === "horizontal" && ["auto", "scroll"].includes(n) && i.scrollWidth > i.clientWidth ? i : i.parentElement ? Rs(i.parentElement, e) : window;
|
|
16899
16899
|
}
|
|
16900
16900
|
function Nl(i, e, t) {
|
|
16901
|
-
let { version: n } = e, { url: s } = e, { room_id: r } = e, { user_name: a = void 0 } = e, o, c, u = !1, d =
|
|
16901
|
+
let { version: n } = e, { url: s } = e, { room_id: r } = e, { user_name: a = void 0 } = e, o, c, u = !1, d = xl(), h = Al(), f, m, b, T, w = {}, I;
|
|
16902
16902
|
Wo(async () => {
|
|
16903
16903
|
console.log(`[Liveroom] Starting... (v${n})`);
|
|
16904
16904
|
const M = new URLSearchParams(window.location.search), ae = M.get("_liveroom"), te = ae == null ? void 0 : ae.split("https://meet.google.com/");
|
|
@@ -16907,7 +16907,7 @@ function Nl(i, e, t) {
|
|
|
16907
16907
|
const Fe = M.get("_liveroom_user_name");
|
|
16908
16908
|
Fe && t(5, a = Fe), Q();
|
|
16909
16909
|
}), Go(() => {
|
|
16910
|
-
j(),
|
|
16910
|
+
j(), xi();
|
|
16911
16911
|
});
|
|
16912
16912
|
async function D() {
|
|
16913
16913
|
if (console.log("[LiveKit] Beginning setup..."), t(8, c = new So({ dynacast: !0 }).on(P.TrackSubscribed, async (M, ae, te) => {
|
|
@@ -16989,10 +16989,10 @@ function Nl(i, e, t) {
|
|
|
16989
16989
|
pe && document.head.appendChild(h), (Ee instanceof HTMLElement || Ee instanceof SVGElement) && Ee.dispatchEvent(te);
|
|
16990
16990
|
}), o.addEventListener("livestate-change", ({ detail: { state: M } }) => {
|
|
16991
16991
|
t(4, r = M.room_id), t(0, f = M.me), t(1, m = M.users), t(10, b = M.livekit_ws_url), t(11, T = M.livekit_token);
|
|
16992
|
-
}), o.connect(), window.addEventListener("mousemove", de), window.addEventListener("mousedown", ce), window.addEventListener("mouseup", q), window.addEventListener("keydown",
|
|
16992
|
+
}), o.connect(), window.addEventListener("mousemove", de), window.addEventListener("mousedown", ce), window.addEventListener("mouseup", q), window.addEventListener("keydown", x), window.addEventListener("keyup", F), window.addEventListener("resize", fe);
|
|
16993
16993
|
}
|
|
16994
16994
|
function j() {
|
|
16995
|
-
window.removeEventListener("resize", fe), window.removeEventListener("keyup", F), window.removeEventListener("keydown",
|
|
16995
|
+
window.removeEventListener("resize", fe), window.removeEventListener("keyup", F), window.removeEventListener("keydown", x), window.removeEventListener("mouseup", q), window.removeEventListener("mousedown", ce), window.removeEventListener("mousemove", de), o == null || o.disconnect(), o = void 0, c == null || c.disconnect(), t(8, c = void 0);
|
|
16996
16996
|
}
|
|
16997
16997
|
function de(M) {
|
|
16998
16998
|
o && (f != null && f.id) && o.dispatchEvent(new CustomEvent(
|
|
@@ -17015,7 +17015,7 @@ function Nl(i, e, t) {
|
|
|
17015
17015
|
o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: f.id } }));
|
|
17016
17016
|
}
|
|
17017
17017
|
const K = ["Shift"];
|
|
17018
|
-
function
|
|
17018
|
+
function x(M) {
|
|
17019
17019
|
!M.repeat && K.includes(M.key) && o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: M.key, user_id: f.id } }));
|
|
17020
17020
|
}
|
|
17021
17021
|
function F(M) {
|
|
@@ -17036,10 +17036,10 @@ function Nl(i, e, t) {
|
|
|
17036
17036
|
function Ue() {
|
|
17037
17037
|
document.head.appendChild(d), document.head.appendChild(h), t(9, u = !0);
|
|
17038
17038
|
}
|
|
17039
|
-
function
|
|
17039
|
+
function xi() {
|
|
17040
17040
|
document.head.removeChild(d), document.head.removeChild(h), t(9, u = !1);
|
|
17041
17041
|
}
|
|
17042
|
-
function
|
|
17042
|
+
function Ai(M, ae) {
|
|
17043
17043
|
ts[M ? "unshift" : "push"](() => {
|
|
17044
17044
|
w[ae.id] = M, t(2, w);
|
|
17045
17045
|
});
|
|
@@ -17051,7 +17051,7 @@ function Nl(i, e, t) {
|
|
|
17051
17051
|
3331 && !c && f && m && b && T && D(), i.$$.dirty & /*users*/
|
|
17052
17052
|
2 && t(3, I = Object.keys(m || {}).length), i.$$.dirty & /*isClickBlocked, users*/
|
|
17053
17053
|
514 && !u && m && Object.values(m).some((M) => M.type == "admin" && M.is_space_key_down) && Ue(), i.$$.dirty & /*isClickBlocked, users*/
|
|
17054
|
-
514 && u && m && Object.values(m).filter((M) => M.type == "admin").every((M) => !M.is_space_key_down) &&
|
|
17054
|
+
514 && u && m && Object.values(m).filter((M) => M.type == "admin").every((M) => !M.is_space_key_down) && xi();
|
|
17055
17055
|
}, [
|
|
17056
17056
|
f,
|
|
17057
17057
|
m,
|
|
@@ -17065,7 +17065,7 @@ function Nl(i, e, t) {
|
|
|
17065
17065
|
u,
|
|
17066
17066
|
b,
|
|
17067
17067
|
T,
|
|
17068
|
-
|
|
17068
|
+
Ai
|
|
17069
17069
|
];
|
|
17070
17070
|
}
|
|
17071
17071
|
class Dl extends ac {
|