aliyun-rtc-sdk 6.14.4-beta.1 → 6.14.4-beta.3
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/aliyun-rtc-sdk.es.js +201 -201
- package/dist/aliyun-rtc-sdk.umd.js +8 -8
- package/dist/types/index.d.ts +6 -1
- package/package.json +1 -1
|
@@ -38,10 +38,10 @@ var w = (r, a, e) => new Promise((t, i) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { AliRTS as le, EConnectStatus as Li, EDatachannelStatus as vs } from "aliyun-rts-sdk";
|
|
40
40
|
import De from "eventemitter3";
|
|
41
|
-
var qn = Object.defineProperty, Jn = (r, a, e) => a in r ? qn(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e, Dt = (r, a, e) => (Jn(r, typeof a != "symbol" ? a + "" : a, e), e), Mi = { exports: {} },
|
|
42
|
-
function
|
|
41
|
+
var qn = Object.defineProperty, Jn = (r, a, e) => a in r ? qn(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e, Dt = (r, a, e) => (Jn(r, typeof a != "symbol" ? a + "" : a, e), e), Mi = { exports: {} }, Fi = { exports: {} }, Vi, bs;
|
|
42
|
+
function Fe() {
|
|
43
43
|
if (bs)
|
|
44
|
-
return
|
|
44
|
+
return Vi;
|
|
45
45
|
bs = 1, Date.now = Date.now || function() {
|
|
46
46
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
47
47
|
};
|
|
@@ -479,14 +479,14 @@ function Ve() {
|
|
|
479
479
|
return c;
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
|
-
return
|
|
482
|
+
return Vi = t, Vi;
|
|
483
483
|
}
|
|
484
484
|
var Oi = { exports: {} }, Ui = { exports: {} }, Hi, Es;
|
|
485
485
|
function Gn() {
|
|
486
486
|
if (Es)
|
|
487
487
|
return Hi;
|
|
488
488
|
Es = 1;
|
|
489
|
-
var r =
|
|
489
|
+
var r = Fe();
|
|
490
490
|
return Hi = function(a, e, t) {
|
|
491
491
|
typeof a == "object" && (a = r.serialize(a));
|
|
492
492
|
var i = e + a + (t ? "&post_res=" : "");
|
|
@@ -498,7 +498,7 @@ function Xn() {
|
|
|
498
498
|
if (_s)
|
|
499
499
|
return Ui.exports;
|
|
500
500
|
_s = 1;
|
|
501
|
-
var r =
|
|
501
|
+
var r = Fe(), a = Gn(), e = "aokcdqn3ly@e629dabd48a9933", t = function(s, n) {
|
|
502
502
|
var c;
|
|
503
503
|
if (n.t === "error" && (c = s.requestQueue[0]) && c.t === "error" && n.msg === c.msg)
|
|
504
504
|
return n.times = c.times + 1, void (s.requestQueue[0] = n);
|
|
@@ -733,7 +733,7 @@ function Yn() {
|
|
|
733
733
|
if (As)
|
|
734
734
|
return Oi.exports;
|
|
735
735
|
As = 1;
|
|
736
|
-
var r =
|
|
736
|
+
var r = Fe(), a = Xn(), e = ["api", "success", "time", "code", "msg", "trace", "traceId", "begin", "pv_id", "sid", "seq", "domain", "flag", "apiSnapshot", "tag", "c1", "c2", "c3"], t = function(s) {
|
|
737
737
|
var n = (s.key || "default").split("::");
|
|
738
738
|
return n.length > 1 ? r.ext(s, {
|
|
739
739
|
group: n[0],
|
|
@@ -925,7 +925,7 @@ function Zn() {
|
|
|
925
925
|
if (ys)
|
|
926
926
|
return ji.exports;
|
|
927
927
|
ys = 1;
|
|
928
|
-
var r =
|
|
928
|
+
var r = Fe(), a = typeof window == "object" ? window : {}, e = "catch", t = a.__oFetch_ || a.fetch;
|
|
929
929
|
return t = typeof t == "function" ? t : void 0, ji.exports = function(i, s) {
|
|
930
930
|
var n = -1;
|
|
931
931
|
typeof i == "object" && (n = i.z, i = r.serialize(i));
|
|
@@ -948,7 +948,7 @@ function Qn() {
|
|
|
948
948
|
if (Cs)
|
|
949
949
|
return zi.exports;
|
|
950
950
|
Cs = 1;
|
|
951
|
-
var r =
|
|
951
|
+
var r = Fe(), a = typeof window == "object" ? window : {}, e = a.__oXMLHttpRequest_ || a.XMLHttpRequest;
|
|
952
952
|
return e = typeof e == "function" ? e : void 0, zi.exports = function(t, i) {
|
|
953
953
|
try {
|
|
954
954
|
var s = new e();
|
|
@@ -964,7 +964,7 @@ function eo() {
|
|
|
964
964
|
if (Rs)
|
|
965
965
|
return Wi;
|
|
966
966
|
Rs = 1;
|
|
967
|
-
var r =
|
|
967
|
+
var r = Fe();
|
|
968
968
|
return Wi = function(a, e) {
|
|
969
969
|
var t = [], i = null, s = e && e.location && e.location.href, n = void 0, c = null, o = function(d, f, m) {
|
|
970
970
|
if (d !== null) {
|
|
@@ -1148,7 +1148,7 @@ function to() {
|
|
|
1148
1148
|
if (Ds)
|
|
1149
1149
|
return $i;
|
|
1150
1150
|
Ds = 1;
|
|
1151
|
-
var r =
|
|
1151
|
+
var r = Fe(), a = Kr(), e = a.TIMING_KEYS;
|
|
1152
1152
|
return $i = function() {
|
|
1153
1153
|
var t = r.win || {}, i = t.performance;
|
|
1154
1154
|
if (!i || typeof i != "object" || typeof i.getEntriesByType != "function")
|
|
@@ -1175,7 +1175,7 @@ function io() {
|
|
|
1175
1175
|
if (Ts)
|
|
1176
1176
|
return Ki;
|
|
1177
1177
|
Ts = 1;
|
|
1178
|
-
var r =
|
|
1178
|
+
var r = Fe(), a = Kr(), e = a.TIMING_KEYS;
|
|
1179
1179
|
return Ki = function() {
|
|
1180
1180
|
var t = r.win || {}, i = t.performance;
|
|
1181
1181
|
if (!i || typeof i != "object")
|
|
@@ -1218,7 +1218,7 @@ function io() {
|
|
|
1218
1218
|
var Ps, ks;
|
|
1219
1219
|
function ro() {
|
|
1220
1220
|
return ks || (ks = 1, Ps = function(r, a, e) {
|
|
1221
|
-
var t =
|
|
1221
|
+
var t = Fe(), i = to(), s = io(), n = null, c = e.documentElement, o = a.innerWidth || c.clientWidth || e.body.clientWidth, u = a.innerHeight || c.clientHeight || e.body.clientHeight, h = a.navigator.connection, p = {
|
|
1222
1222
|
sr: screen.width + "x" + screen.height,
|
|
1223
1223
|
vp: o + "x" + u,
|
|
1224
1224
|
ct: h ? h.effectiveType || h.type : ""
|
|
@@ -1392,7 +1392,7 @@ function so() {
|
|
|
1392
1392
|
if (Bs)
|
|
1393
1393
|
return qi;
|
|
1394
1394
|
Bs = 1;
|
|
1395
|
-
var r =
|
|
1395
|
+
var r = Fe(), a = 500;
|
|
1396
1396
|
return qi = function(e, t, i) {
|
|
1397
1397
|
function s(p, d, f) {
|
|
1398
1398
|
var m = 0, l = p.tagName;
|
|
@@ -1477,7 +1477,7 @@ function so() {
|
|
|
1477
1477
|
var Ns, Ls;
|
|
1478
1478
|
function ao() {
|
|
1479
1479
|
return Ls || (Ls = 1, Ns = function(r, a) {
|
|
1480
|
-
var e =
|
|
1480
|
+
var e = Fe(), t = null, i = e.getCurDomain(), s = function(h, p, d, f, m, l, x, v, S, b, E, _, y) {
|
|
1481
1481
|
var A = e.J(m) || null, R = e.safetyCall(p, [A, f], null);
|
|
1482
1482
|
if (!R)
|
|
1483
1483
|
return !1;
|
|
@@ -1549,8 +1549,8 @@ function ao() {
|
|
|
1549
1549
|
if (f.headers["X-B3-TraceId"])
|
|
1550
1550
|
R = f.headers["X-B3-TraceId"];
|
|
1551
1551
|
else {
|
|
1552
|
-
var
|
|
1553
|
-
f.headers["X-B3-TraceId"] =
|
|
1552
|
+
var F = l.getB3TraceId($);
|
|
1553
|
+
f.headers["X-B3-TraceId"] = F["X-B3-TraceId"], f.headers["X-B3-ParentSpanId"] = F["X-B3-ParentSpanId"], f.headers["X-B3-SpanId"] = F["X-B3-SpanId"], f.headers["X-B3-Sampled"] = F["X-B3-Sampled"], f.headers["X-Request-ID"] = e.guid(), R = F["X-B3-TraceId"];
|
|
1554
1554
|
}
|
|
1555
1555
|
L = l.getPageviewId()["EagleEye-SessionID"];
|
|
1556
1556
|
break;
|
|
@@ -1577,8 +1577,8 @@ function ao() {
|
|
|
1577
1577
|
if (Z && !/(text)|(json)/.test(Z))
|
|
1578
1578
|
return J;
|
|
1579
1579
|
if (!R) {
|
|
1580
|
-
var
|
|
1581
|
-
typeof
|
|
1580
|
+
var Ve = e.parseFetchHeaders(ce);
|
|
1581
|
+
typeof Ve == "object" && Ve["eagleeye-traceid"] && (R = Ve["eagleeye-traceid"], I = "response");
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
var ze = S();
|
|
@@ -1622,13 +1622,13 @@ function ao() {
|
|
|
1622
1622
|
y.apply(l, k), E = ee || "", b = e.cutUrlSearch(E);
|
|
1623
1623
|
var M = !e.checkAPI(b, !0) || e.ignoreByRule(b, L);
|
|
1624
1624
|
if (b = b ? e.filterByRule(b, E, R.ignoreApiPath ? R.ignoreApiPath : R.apiHelper) : "", !M && I) {
|
|
1625
|
-
var
|
|
1625
|
+
var F = "";
|
|
1626
1626
|
try {
|
|
1627
|
-
|
|
1627
|
+
F = location.origin ? location.origin : location.protocol + "//" + location.hostname + (location.port ? ":" + location.port : "");
|
|
1628
1628
|
} catch (ce) {
|
|
1629
|
-
|
|
1629
|
+
F = "";
|
|
1630
1630
|
}
|
|
1631
|
-
var N = e.checkSameOrigin(E,
|
|
1631
|
+
var N = e.checkSameOrigin(E, F);
|
|
1632
1632
|
if ((x.getConfig("enableApiCors") || N) && A && typeof A == "function")
|
|
1633
1633
|
switch (ae) {
|
|
1634
1634
|
case "arms":
|
|
@@ -1660,13 +1660,13 @@ function ao() {
|
|
|
1660
1660
|
M && e.isString(M) && (P = M);
|
|
1661
1661
|
}
|
|
1662
1662
|
if (l.status >= 200 && l.status <= 299) {
|
|
1663
|
-
var
|
|
1663
|
+
var F = l.status || 200;
|
|
1664
1664
|
if (typeof l.getResponseHeader == "function") {
|
|
1665
1665
|
var N = l.getResponseHeader("Content-Type");
|
|
1666
1666
|
if (N && !/(text)|(json)/.test(N))
|
|
1667
1667
|
return;
|
|
1668
1668
|
}
|
|
1669
|
-
l.responseType && l.responseType !== "text" ? x.api(b, !0, te,
|
|
1669
|
+
l.responseType && l.responseType !== "text" ? x.api(b, !0, te, F, "", v, P, B, {}, i, q, Q) : s(x, R.parseResponse, b, E, l.responseText, F, te, v, P, B, ee, q, Q);
|
|
1670
1670
|
} else
|
|
1671
1671
|
x.api(b, !1, te, l.status || "FAILED", l.statusText, v, P, B, ee, i, q, Q), R.enableResource && t.fixResourceStatus && t.fixResourceStatus({
|
|
1672
1672
|
src: l.responseURL || E,
|
|
@@ -1687,10 +1687,10 @@ function ao() {
|
|
|
1687
1687
|
}), r;
|
|
1688
1688
|
}), Ns;
|
|
1689
1689
|
}
|
|
1690
|
-
var Ms,
|
|
1690
|
+
var Ms, Fs;
|
|
1691
1691
|
function no() {
|
|
1692
|
-
return
|
|
1693
|
-
var e =
|
|
1692
|
+
return Fs || (Fs = 1, Ms = function(r, a) {
|
|
1693
|
+
var e = Fe(), t = a.history || {}, i = a.document, s = function(c, o) {
|
|
1694
1694
|
var u;
|
|
1695
1695
|
a.CustomEvent ? u = new CustomEvent(c, {
|
|
1696
1696
|
detail: o
|
|
@@ -1717,12 +1717,12 @@ function no() {
|
|
|
1717
1717
|
});
|
|
1718
1718
|
}), Ms;
|
|
1719
1719
|
}
|
|
1720
|
-
var Ji,
|
|
1720
|
+
var Ji, Vs;
|
|
1721
1721
|
function oo() {
|
|
1722
|
-
if (
|
|
1722
|
+
if (Vs)
|
|
1723
1723
|
return Ji;
|
|
1724
|
-
|
|
1725
|
-
var r =
|
|
1724
|
+
Vs = 1;
|
|
1725
|
+
var r = Fe(), a = Kr(), e = a.TIMING_KEYS;
|
|
1726
1726
|
return Ji = function(t, i) {
|
|
1727
1727
|
function s(o, u, h) {
|
|
1728
1728
|
if (o instanceof i.PerformanceResourceTiming && o.initiatorType) {
|
|
@@ -1842,9 +1842,9 @@ function oo() {
|
|
|
1842
1842
|
var Os;
|
|
1843
1843
|
function co() {
|
|
1844
1844
|
if (Os)
|
|
1845
|
-
return
|
|
1845
|
+
return Fi.exports;
|
|
1846
1846
|
Os = 1;
|
|
1847
|
-
var r =
|
|
1847
|
+
var r = Fe(), a = Yn(), e = Zn(), t = Qn(), i = r.win, s = i.document, n = /^(error|api|speed|sum|avg|percent|custom|msg|setPage|setConfig|behavior|performance)$/, c = function(o) {
|
|
1848
1848
|
var u = this;
|
|
1849
1849
|
return a.call(u, o), u._initialPage = o.page && r.safetyCall(o.page, [], o.page + "") || null, u._isRobot = r.isRobot(), u._health = {
|
|
1850
1850
|
errcount: 0,
|
|
@@ -1980,7 +1980,7 @@ function co() {
|
|
|
1980
1980
|
var u = this.__proto__.constructor(o);
|
|
1981
1981
|
return o.page && u.sendPV(), u;
|
|
1982
1982
|
}
|
|
1983
|
-
}), eo()(c, i), ro()(c, i, s), so()(c, i, s), ao()(c, i), no()(c, i), oo()(c, i), c._super = a, c._root = a._root, a.Browser = c,
|
|
1983
|
+
}), eo()(c, i), ro()(c, i, s), so()(c, i, s), ao()(c, i), no()(c, i), oo()(c, i), c._super = a, c._root = a._root, a.Browser = c, Fi.exports = c, Fi.exports;
|
|
1984
1984
|
}
|
|
1985
1985
|
var Us;
|
|
1986
1986
|
function uo() {
|
|
@@ -1999,7 +1999,7 @@ function uo() {
|
|
|
1999
1999
|
var c = {}, o = [];
|
|
2000
2000
|
return i in e && (c = e[i].config || {}, o = e[i].pipe || []), r(c, o);
|
|
2001
2001
|
}
|
|
2002
|
-
var e = window, t = e.BrowserLogger = co(), i =
|
|
2002
|
+
var e = window, t = e.BrowserLogger = co(), i = Fe().key, s = "__hasInitBlSdk";
|
|
2003
2003
|
t.singleton = function(c, o) {
|
|
2004
2004
|
return e[s] ? e[i] : r(c, o);
|
|
2005
2005
|
}, t.createExtraInstance = function(c) {
|
|
@@ -2264,7 +2264,7 @@ function rt(r, a, e) {
|
|
|
2264
2264
|
return Eo(t);
|
|
2265
2265
|
}
|
|
2266
2266
|
var vi = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(vi || {});
|
|
2267
|
-
const yi = "6.14.4-beta.
|
|
2267
|
+
const yi = "6.14.4-beta.3", Xs = "web";
|
|
2268
2268
|
class He {
|
|
2269
2269
|
/**
|
|
2270
2270
|
* 将版本号转换为number
|
|
@@ -3309,7 +3309,7 @@ function Mo() {
|
|
|
3309
3309
|
}(Qi)), Qi.exports;
|
|
3310
3310
|
}
|
|
3311
3311
|
var er = { exports: {} }, ia;
|
|
3312
|
-
function
|
|
3312
|
+
function Fo() {
|
|
3313
3313
|
return ia || (ia = 1, function(r, a) {
|
|
3314
3314
|
(function(e, t) {
|
|
3315
3315
|
r.exports = t(ne());
|
|
@@ -3478,7 +3478,7 @@ function Ot() {
|
|
|
3478
3478
|
}(tr)), tr.exports;
|
|
3479
3479
|
}
|
|
3480
3480
|
var ir = { exports: {} }, sa;
|
|
3481
|
-
function
|
|
3481
|
+
function Vo() {
|
|
3482
3482
|
return sa || (sa = 1, function(r, a) {
|
|
3483
3483
|
(function(e, t) {
|
|
3484
3484
|
r.exports = t(ne());
|
|
@@ -3585,8 +3585,8 @@ function Ut() {
|
|
|
3585
3585
|
var S = x + v, b = l[S];
|
|
3586
3586
|
l[S] = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360;
|
|
3587
3587
|
}
|
|
3588
|
-
var E = this._hash.words, _ = l[x + 0], y = l[x + 1], A = l[x + 2], R = l[x + 3], L = l[x + 4], C = l[x + 5], I = l[x + 6], P = l[x + 7], B = l[x + 8], $ = l[x + 9], q = l[x + 10], X = l[x + 11], ae = l[x + 12], Q = l[x + 13], te = l[x + 14], ee = l[x + 15], k = E[0], M = E[1],
|
|
3589
|
-
k = p(k, M,
|
|
3588
|
+
var E = this._hash.words, _ = l[x + 0], y = l[x + 1], A = l[x + 2], R = l[x + 3], L = l[x + 4], C = l[x + 5], I = l[x + 6], P = l[x + 7], B = l[x + 8], $ = l[x + 9], q = l[x + 10], X = l[x + 11], ae = l[x + 12], Q = l[x + 13], te = l[x + 14], ee = l[x + 15], k = E[0], M = E[1], F = E[2], N = E[3];
|
|
3589
|
+
k = p(k, M, F, N, _, 7, u[0]), N = p(N, k, M, F, y, 12, u[1]), F = p(F, N, k, M, A, 17, u[2]), M = p(M, F, N, k, R, 22, u[3]), k = p(k, M, F, N, L, 7, u[4]), N = p(N, k, M, F, C, 12, u[5]), F = p(F, N, k, M, I, 17, u[6]), M = p(M, F, N, k, P, 22, u[7]), k = p(k, M, F, N, B, 7, u[8]), N = p(N, k, M, F, $, 12, u[9]), F = p(F, N, k, M, q, 17, u[10]), M = p(M, F, N, k, X, 22, u[11]), k = p(k, M, F, N, ae, 7, u[12]), N = p(N, k, M, F, Q, 12, u[13]), F = p(F, N, k, M, te, 17, u[14]), M = p(M, F, N, k, ee, 22, u[15]), k = d(k, M, F, N, y, 5, u[16]), N = d(N, k, M, F, I, 9, u[17]), F = d(F, N, k, M, X, 14, u[18]), M = d(M, F, N, k, _, 20, u[19]), k = d(k, M, F, N, C, 5, u[20]), N = d(N, k, M, F, q, 9, u[21]), F = d(F, N, k, M, ee, 14, u[22]), M = d(M, F, N, k, L, 20, u[23]), k = d(k, M, F, N, $, 5, u[24]), N = d(N, k, M, F, te, 9, u[25]), F = d(F, N, k, M, R, 14, u[26]), M = d(M, F, N, k, B, 20, u[27]), k = d(k, M, F, N, Q, 5, u[28]), N = d(N, k, M, F, A, 9, u[29]), F = d(F, N, k, M, P, 14, u[30]), M = d(M, F, N, k, ae, 20, u[31]), k = f(k, M, F, N, C, 4, u[32]), N = f(N, k, M, F, B, 11, u[33]), F = f(F, N, k, M, X, 16, u[34]), M = f(M, F, N, k, te, 23, u[35]), k = f(k, M, F, N, y, 4, u[36]), N = f(N, k, M, F, L, 11, u[37]), F = f(F, N, k, M, P, 16, u[38]), M = f(M, F, N, k, q, 23, u[39]), k = f(k, M, F, N, Q, 4, u[40]), N = f(N, k, M, F, _, 11, u[41]), F = f(F, N, k, M, R, 16, u[42]), M = f(M, F, N, k, I, 23, u[43]), k = f(k, M, F, N, $, 4, u[44]), N = f(N, k, M, F, ae, 11, u[45]), F = f(F, N, k, M, ee, 16, u[46]), M = f(M, F, N, k, A, 23, u[47]), k = m(k, M, F, N, _, 6, u[48]), N = m(N, k, M, F, P, 10, u[49]), F = m(F, N, k, M, te, 15, u[50]), M = m(M, F, N, k, C, 21, u[51]), k = m(k, M, F, N, ae, 6, u[52]), N = m(N, k, M, F, R, 10, u[53]), F = m(F, N, k, M, q, 15, u[54]), M = m(M, F, N, k, y, 21, u[55]), k = m(k, M, F, N, B, 6, u[56]), N = m(N, k, M, F, ee, 10, u[57]), F = m(F, N, k, M, I, 15, u[58]), M = m(M, F, N, k, Q, 21, u[59]), k = m(k, M, F, N, L, 6, u[60]), N = m(N, k, M, F, X, 10, u[61]), F = m(F, N, k, M, A, 15, u[62]), M = m(M, F, N, k, $, 21, u[63]), E[0] = E[0] + k | 0, E[1] = E[1] + M | 0, E[2] = E[2] + F | 0, E[3] = E[3] + N | 0;
|
|
3590
3590
|
},
|
|
3591
3591
|
_doFinalize: function() {
|
|
3592
3592
|
var l = this._data, x = l.words, v = this._nDataBytes * 8, S = l.sigBytes * 8;
|
|
@@ -3862,7 +3862,7 @@ function dn() {
|
|
|
3862
3862
|
]);
|
|
3863
3863
|
},
|
|
3864
3864
|
_doProcessBlock: function(m, l) {
|
|
3865
|
-
for (var x = this._hash.words, v = x[0], S = x[1], b = x[2], E = x[3], _ = x[4], y = x[5], A = x[6], R = x[7], L = v.high, C = v.low, I = S.high, P = S.low, B = b.high, $ = b.low, q = E.high, X = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, M = A.low,
|
|
3865
|
+
for (var x = this._hash.words, v = x[0], S = x[1], b = x[2], E = x[3], _ = x[4], y = x[5], A = x[6], R = x[7], L = v.high, C = v.low, I = S.high, P = S.low, B = b.high, $ = b.low, q = E.high, X = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, M = A.low, F = R.high, N = R.low, J = L, j = C, ce = I, Z = P, Ve = B, ze = $, Qe = q, et = X, Se = ae, ke = Q, ot = te, yt = ee, Ht = k, Ct = M, Yt = F, Rt = N, Be = 0; Be < 80; Be++) {
|
|
3866
3866
|
var Re, tt, It = d[Be];
|
|
3867
3867
|
if (Be < 16)
|
|
3868
3868
|
tt = It.high = m[l + Be * 2] | 0, Re = It.low = m[l + Be * 2 + 1] | 0;
|
|
@@ -3870,10 +3870,10 @@ function dn() {
|
|
|
3870
3870
|
var gt = d[Be - 15], it = gt.high, ct = gt.low, ki = (it >>> 1 | ct << 31) ^ (it >>> 8 | ct << 24) ^ it >>> 7, ui = (ct >>> 1 | it << 31) ^ (ct >>> 8 | it << 24) ^ (ct >>> 7 | it << 25), hi = d[Be - 2], We = hi.high, mt = hi.low, di = (We >>> 19 | mt << 13) ^ (We << 3 | mt >>> 29) ^ We >>> 6, Zt = (mt >>> 19 | We << 13) ^ (mt << 3 | We >>> 29) ^ (mt >>> 6 | We << 26), us = d[Be - 7], Pn = us.high, kn = us.low, hs = d[Be - 16], Bn = hs.high, ds = hs.low;
|
|
3871
3871
|
Re = ui + kn, tt = ki + Pn + (Re >>> 0 < ui >>> 0 ? 1 : 0), Re = Re + Zt, tt = tt + di + (Re >>> 0 < Zt >>> 0 ? 1 : 0), Re = Re + ds, tt = tt + Bn + (Re >>> 0 < ds >>> 0 ? 1 : 0), It.high = tt, It.low = Re;
|
|
3872
3872
|
}
|
|
3873
|
-
var Nn = Se & ot ^ ~Se & Ht, ls = ke & yt ^ ~ke & Ct, Ln = J & ce ^ J &
|
|
3874
|
-
Yt = Ht, Rt = Ct, Ht = ot, Ct = yt, ot = Se, yt = ke, ke = et + $e | 0, Se = Qe + xt + (ke >>> 0 < et >>> 0 ? 1 : 0) | 0, Qe =
|
|
3873
|
+
var Nn = Se & ot ^ ~Se & Ht, ls = ke & yt ^ ~ke & Ct, Ln = J & ce ^ J & Ve ^ ce & Ve, Mn = j & Z ^ j & ze ^ Z & ze, Fn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), fs = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Vn = (Se >>> 14 | ke << 18) ^ (Se >>> 18 | ke << 14) ^ (Se << 23 | ke >>> 9), On = (ke >>> 14 | Se << 18) ^ (ke >>> 18 | Se << 14) ^ (ke << 23 | Se >>> 9), ps = p[Be], Un = ps.high, gs = ps.low, $e = Rt + On, xt = Yt + Vn + ($e >>> 0 < Rt >>> 0 ? 1 : 0), $e = $e + ls, xt = xt + Nn + ($e >>> 0 < ls >>> 0 ? 1 : 0), $e = $e + gs, xt = xt + Un + ($e >>> 0 < gs >>> 0 ? 1 : 0), $e = $e + Re, xt = xt + tt + ($e >>> 0 < Re >>> 0 ? 1 : 0), ms = fs + Mn, Hn = Fn + Ln + (ms >>> 0 < fs >>> 0 ? 1 : 0);
|
|
3874
|
+
Yt = Ht, Rt = Ct, Ht = ot, Ct = yt, ot = Se, yt = ke, ke = et + $e | 0, Se = Qe + xt + (ke >>> 0 < et >>> 0 ? 1 : 0) | 0, Qe = Ve, et = ze, Ve = ce, ze = Z, ce = J, Z = j, j = $e + ms | 0, J = xt + Hn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
|
|
3875
3875
|
}
|
|
3876
|
-
C = v.low = C + j, v.high = L + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = S.low = P + Z, S.high = I + ce + (P >>> 0 < Z >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B +
|
|
3876
|
+
C = v.low = C + j, v.high = L + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = S.low = P + Z, S.high = I + ce + (P >>> 0 < Z >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), X = E.low = X + et, E.high = q + Qe + (X >>> 0 < et >>> 0 ? 1 : 0), Q = _.low = Q + ke, _.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = y.low = ee + yt, y.high = te + ot + (ee >>> 0 < yt >>> 0 ? 1 : 0), M = A.low = M + Ct, A.high = k + Ht + (M >>> 0 < Ct >>> 0 ? 1 : 0), N = R.low = N + Rt, R.high = F + Yt + (N >>> 0 < Rt >>> 0 ? 1 : 0);
|
|
3877
3877
|
},
|
|
3878
3878
|
_doFinalize: function() {
|
|
3879
3879
|
var m = this._data, l = m.words, x = this._nDataBytes * 8, v = m.sigBytes * 8;
|
|
@@ -3999,8 +3999,8 @@ function Ho() {
|
|
|
3999
3999
|
var M = m[d[Q]];
|
|
4000
4000
|
M.high = C, M.low = I;
|
|
4001
4001
|
}
|
|
4002
|
-
var
|
|
4003
|
-
|
|
4002
|
+
var F = m[0], N = S[0];
|
|
4003
|
+
F.high = N.high, F.low = N.low;
|
|
4004
4004
|
for (var L = 0; L < 5; L++)
|
|
4005
4005
|
for (var P = 0; P < 5; P++) {
|
|
4006
4006
|
var Q = L + 5 * P, A = S[Q], J = m[Q], j = m[(L + 1) % 5 + 5 * P], ce = m[(L + 2) % 5 + 5 * P];
|
|
@@ -4382,11 +4382,11 @@ function jo() {
|
|
|
4382
4382
|
var L = A + R, C = y[L];
|
|
4383
4383
|
y[L] = (C << 8 | C >>> 24) & 16711935 | (C << 24 | C >>> 8) & 4278255360;
|
|
4384
4384
|
}
|
|
4385
|
-
var I = this._hash.words, P = f.words, B = m.words, $ = u.words, q = h.words, X = p.words, ae = d.words, Q, te, ee, k, M,
|
|
4386
|
-
|
|
4385
|
+
var I = this._hash.words, P = f.words, B = m.words, $ = u.words, q = h.words, X = p.words, ae = d.words, Q, te, ee, k, M, F, N, J, j, ce;
|
|
4386
|
+
F = Q = I[0], N = te = I[1], J = ee = I[2], j = k = I[3], ce = M = I[4];
|
|
4387
4387
|
for (var Z, R = 0; R < 80; R += 1)
|
|
4388
|
-
Z = Q + y[A + $[R]] | 0, R < 16 ? Z += x(te, ee, k) + P[0] : R < 32 ? Z += v(te, ee, k) + P[1] : R < 48 ? Z += S(te, ee, k) + P[2] : R < 64 ? Z += b(te, ee, k) + P[3] : Z += E(te, ee, k) + P[4], Z = Z | 0, Z = _(Z, X[R]), Z = Z + M | 0, Q = M, M = k, k = _(ee, 10), ee = te, te = Z, Z =
|
|
4389
|
-
Z = I[1] + ee + j | 0, I[1] = I[2] + k + ce | 0, I[2] = I[3] + M +
|
|
4388
|
+
Z = Q + y[A + $[R]] | 0, R < 16 ? Z += x(te, ee, k) + P[0] : R < 32 ? Z += v(te, ee, k) + P[1] : R < 48 ? Z += S(te, ee, k) + P[2] : R < 64 ? Z += b(te, ee, k) + P[3] : Z += E(te, ee, k) + P[4], Z = Z | 0, Z = _(Z, X[R]), Z = Z + M | 0, Q = M, M = k, k = _(ee, 10), ee = te, te = Z, Z = F + y[A + q[R]] | 0, R < 16 ? Z += E(N, J, j) + B[0] : R < 32 ? Z += b(N, J, j) + B[1] : R < 48 ? Z += S(N, J, j) + B[2] : R < 64 ? Z += v(N, J, j) + B[3] : Z += x(N, J, j) + B[4], Z = Z | 0, Z = _(Z, ae[R]), Z = Z + ce | 0, F = ce, ce = j, j = _(J, 10), J = N, N = Z;
|
|
4389
|
+
Z = I[1] + ee + j | 0, I[1] = I[2] + k + ce | 0, I[2] = I[3] + M + F | 0, I[3] = I[4] + Q + N | 0, I[4] = I[0] + te + J | 0, I[0] = Z;
|
|
4390
4390
|
},
|
|
4391
4391
|
_doFinalize: function() {
|
|
4392
4392
|
var y = this._data, A = y.words, R = this._nDataBytes * 8, L = y.sigBytes * 8;
|
|
@@ -7530,7 +7530,7 @@ function n0() {
|
|
|
7530
7530
|
}
|
|
7531
7531
|
(function(r, a) {
|
|
7532
7532
|
(function(e, t, i) {
|
|
7533
|
-
r.exports = t(ne(), Ci(), Mo(),
|
|
7533
|
+
r.exports = t(ne(), Ci(), Mo(), Fo(), Ot(), Vo(), Ut(), hn(), Xr(), Oo(), dn(), Uo(), Ho(), jo(), Yr(), zo(), At(), ye(), Wo(), $o(), Ko(), qo(), Jo(), Go(), Xo(), Yo(), Zo(), Qo(), e0(), t0(), i0(), r0(), s0(), a0(), n0());
|
|
7534
7534
|
})(ie, function(e) {
|
|
7535
7535
|
return e;
|
|
7536
7536
|
});
|
|
@@ -8003,7 +8003,7 @@ const { BrowserUtil: v0 } = le, jt = {
|
|
|
8003
8003
|
} catch (a) {
|
|
8004
8004
|
}
|
|
8005
8005
|
return r;
|
|
8006
|
-
}, { BrowserUtil: Ma, SystenUtil:
|
|
8006
|
+
}, { BrowserUtil: Ma, SystenUtil: Fa } = le, C0 = ln(), R0 = "woMMssV6jmyol9fr", I0 = 200, gi = 10 * 60 * 1e3, mi = {
|
|
8007
8007
|
host: "cn-hangzhou.log.aliyuncs.com",
|
|
8008
8008
|
// 所在地域的服务入口。例如cn-hangzhou.log.aliyuncs.com
|
|
8009
8009
|
project: "alivc-aio",
|
|
@@ -8018,7 +8018,7 @@ const { BrowserUtil: v0 } = le, jt = {
|
|
|
8018
8018
|
function kr() {
|
|
8019
8019
|
return Qr(/* @__PURE__ */ new Date(), "HH:MM:ss.l");
|
|
8020
8020
|
}
|
|
8021
|
-
function
|
|
8021
|
+
function Va() {
|
|
8022
8022
|
return Qr(/* @__PURE__ */ new Date(), "isoDate");
|
|
8023
8023
|
}
|
|
8024
8024
|
var fn = /* @__PURE__ */ ((r) => (r[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.API = 2] = "API", r[r.WARNING = 3] = "WARNING", r[r.ERROR = 4] = "ERROR", r[r.NONE = 5] = "NONE", r))(fn || {});
|
|
@@ -8043,7 +8043,7 @@ class w0 {
|
|
|
8043
8043
|
return;
|
|
8044
8044
|
this.logSequence += 1, a.unshift(
|
|
8045
8045
|
this.getLogParams(710203, {
|
|
8046
|
-
log: `[${
|
|
8046
|
+
log: `[${Va()} ${kr()}] [INF] beforeunload`,
|
|
8047
8047
|
stat_log_seq: this.logSequence
|
|
8048
8048
|
})
|
|
8049
8049
|
);
|
|
@@ -8221,8 +8221,8 @@ class w0 {
|
|
|
8221
8221
|
dm: Ma.browserVersion,
|
|
8222
8222
|
install_uuid: this.clientId,
|
|
8223
8223
|
logger_v: "0.0.1",
|
|
8224
|
-
os:
|
|
8225
|
-
osv:
|
|
8224
|
+
os: Fa.systemName,
|
|
8225
|
+
osv: Fa.systemVersion,
|
|
8226
8226
|
p_sesid: this.bSesid,
|
|
8227
8227
|
// 与其他端对齐,用于该字段标记某个上传任务
|
|
8228
8228
|
sdk_version: yi,
|
|
@@ -8245,7 +8245,7 @@ class w0 {
|
|
|
8245
8245
|
this.tracker.send(e);
|
|
8246
8246
|
}
|
|
8247
8247
|
addLog(a) {
|
|
8248
|
-
const e = kr(), i = `[${
|
|
8248
|
+
const e = kr(), i = `[${Va()} ${e}] ${a}`;
|
|
8249
8249
|
!this.sessionId || !this.tracker ? (this.logCache.push(i), this.logCache.length >= I0 && this.logCache.shift()) : this.sendLog(i);
|
|
8250
8250
|
}
|
|
8251
8251
|
}
|
|
@@ -8445,7 +8445,7 @@ const rs = (r) => ((r & 16711680) >> 16) + (r & 65280) + ((r & 255) << 16), Ye =
|
|
|
8445
8445
|
let e = r / a;
|
|
8446
8446
|
return e < 0 && (e = 0), e > 1 && (e = 1), e;
|
|
8447
8447
|
};
|
|
8448
|
-
class
|
|
8448
|
+
class Fr {
|
|
8449
8449
|
constructor(a, e, t) {
|
|
8450
8450
|
/*! 旁路模式 */
|
|
8451
8451
|
g(this, "mixMode", bi.LiveTranscodingSingle);
|
|
@@ -8614,7 +8614,7 @@ const Oa = 12, Ua = 5e3, $t = class $t extends De {
|
|
|
8614
8614
|
* @ignore
|
|
8615
8615
|
*/
|
|
8616
8616
|
g($t, "logName", "Socket");
|
|
8617
|
-
let
|
|
8617
|
+
let Vr = $t;
|
|
8618
8618
|
var ve = /* @__PURE__ */ ((r) => (r.KEEPALIVE = "keepalive", r.JOINCHANNEL = "joinchannel", r.NOTIFYJOIN = "notifyjoin", r.NOTIFYSTATUS = "notifystatus", r.STATUSREPORT = "statusreport", r.LEAVECHANNEL = "leavechannel", r.NOTIFYLEAVE = "notifyleave", r.NOTIFYPUBLISH = "notifypublish", r.BYE = "bye", r.RECONNECT = "reconnect", r.PUBLISH = "publish", r.REFRESHURL = "refreshurl", r.UNSUBSCRIBE = "unsubscribe", r.ROLEUPDATE = "roleupdate", r))(ve || {});
|
|
8619
8619
|
class N0 {
|
|
8620
8620
|
constructor(a, e) {
|
|
@@ -8743,7 +8743,7 @@ class N0 {
|
|
|
8743
8743
|
}
|
|
8744
8744
|
}
|
|
8745
8745
|
var U = /* @__PURE__ */ ((r) => (r[r.ERR_JOIN_ALREADY_JOINED = 16843521] = "ERR_JOIN_ALREADY_JOINED", r[r.ERR_JOIN_BAD_APPID = 33620481] = "ERR_JOIN_BAD_APPID", r[r.ERR_JOIN_INVALID_APPID = 33620482] = "ERR_JOIN_INVALID_APPID", r[r.ERR_JOIN_BAD_CHANNEL = 33620484] = "ERR_JOIN_BAD_CHANNEL", r[r.ERR_JOIN_INVALID_CHANNEL = 33620483] = "ERR_JOIN_INVALID_CHANNEL", r[r.ERR_JOIN_BAD_TOKEN = 33620485] = "ERR_JOIN_BAD_TOKEN", r[r.ERR_JOIN_TIMEOUT = 16908804] = "ERR_JOIN_TIMEOUT", r[r.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD = 16974081] = "ERR_JOIN_ERR_JOIN_BAD_PARAMBAD", r[r.ERR_JOIN_CHANNEL_FAILED = 16974338] = "ERR_JOIN_CHANNEL_FAILED", r[r.ERR_LOG_ALREADY_INIT = 16974085] = "ERR_LOG_ALREADY_INIT", r[r.ERR_LOG_ROOT_PATH_ERROR = 16974086] = "ERR_LOG_ROOT_PATH_ERROR", r[r.ERR_MIC_OPEN_FAIL = 17040388] = "ERR_MIC_OPEN_FAIL", r[r.ERR_SPEAKER_OPEN_FAIL = 17040389] = "ERR_SPEAKER_OPEN_FAIL", r[r.ERR_MIC_INTERRUPT = 17040390] = "ERR_MIC_INTERRUPT", r[r.ERR_SPEAKER_INTERRUPT = 17040391] = "ERR_SPEAKER_INTERRUPT", r[r.ERR_MIC_AUTH_FAIL = 17040392] = "ERR_MIC_AUTH_FAIL", r[r.ERR_MIC_NOT_AVAILABLE = 17040393] = "ERR_MIC_NOT_AVAILABLE", r[r.ERR_SPEAKER_NOT_AVAILABLE = 17040400] = "ERR_SPEAKER_NOT_AVAILABLE", r[r.ERR_CAMERA_OPEN_FAIL = 17039620] = "ERR_CAMERA_OPEN_FAIL", r[r.ERR_CAMERA_AUTH_FAIL = 17039621] = "ERR_CAMERA_AUTH_FAIL", r[r.ERR_CAMERA_INTERRUPT = 17039622] = "ERR_CAMERA_INTERRUPT", r[r.ERR_CAMERA_NOT_AVAILABLE = 17039623] = "ERR_CAMERA_NOT_AVAILABLE", r[r.ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873] = "ERR_VIDEO_DISPLAY_OPEN_FAIL", r[r.ERR_VIDEO_DISPLAY_INTERRUPT = 1064992] = "ERR_VIDEO_DISPLAY_INTERRUPT", r[r.ERR_ICE_CONNECTION_CONNECT_FAIL = 17105409] = "ERR_ICE_CONNECTION_CONNECT_FAIL", r[r.ERR_ICE_CONNECTION_RECONNECT_FAI = 17105410] = "ERR_ICE_CONNECTION_RECONNECT_FAI", r[r.ERR_ICE_CONNECTION_MOBILITY_FAIL = 17105411] = "ERR_ICE_CONNECTION_MOBILITY_FAIL", r[r.ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT = 16908812] = "ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT", r[r.ERR_LATENCY_LIVE_COMMUNICATION_FAILED = 17235971] = "ERR_LATENCY_LIVE_COMMUNICATION_FAILED", r[r.ERR_LATENCY_LIVE_MEIDASETTING_FAILED = 17235972] = "ERR_LATENCY_LIVE_MEIDASETTING_FAILED", r[r.ERR_LATENCY_LIVE_NONE_BROADCASTER = 17235973] = "ERR_LATENCY_LIVE_NONE_BROADCASTER", r[r.ERR_LATENCY_LIVE_NEED_RESTART = 17235974] = "ERR_LATENCY_LIVE_NEED_RESTART", r[r.ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER = 17235975] = "ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER", r[r.ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE = 17235976] = "ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE", r[r.ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION = 17235977] = "ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION", r[r.ERR_SDK_PUBLISH_INVAILD = 16974597] = "ERR_SDK_PUBLISH_INVAILD", r[r.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL = 16843782] = "ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL", r[r.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED = 16843856] = "ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED = 16843857] = "ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED = 16843858] = "ERR_SDK_PUBLISH_DUAL_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED = 16843859] = "ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED", r[r.ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR = 16843860] = "ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR", r[r.ERR_SDK_SUBSCRIBE_INVAILD = 16974852] = "ERR_SDK_SUBSCRIBE_INVAILD", r[r.ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL = 16844112] = "ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL", r[r.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED = 16844113] = "ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED = 16844114] = "ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED = 16844115] = "ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED = 16844116] = "ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED", r[r.ERR_SDK_SUBSCRIBE_DATA_FAILED = 16844117] = "ERR_SDK_SUBSCRIBE_DATA_FAILED", r[r.ERR_SDK_SUBSCRIBE_DATA_ERROR = 16844118] = "ERR_SDK_SUBSCRIBE_DATA_ERROR", r[r.ERR_SDK_INVALID_STATE = 16974340] = "ERR_SDK_INVALID_STATE", r[r.ERR_INVALID_ARGUMENTS = 16974083] = "ERR_INVALID_ARGUMENTS", r[r.ERR_SESSION_REMOVED = 33620229] = "ERR_SESSION_REMOVED", r[r.ERR_SDK_UPDATE_ROLE_CHANNEL = 16908801] = "ERR_SDK_UPDATE_ROLE_CHANNEL", r[r.ERR_INNER = -1] = "ERR_INNER", r[r.ERR_SDK_MPU_TASK_PUBLISH_OK = 0] = "ERR_SDK_MPU_TASK_PUBLISH_OK", r[r.ERR_SDK_MPU_TASK_STREAM_NOT_FOUND = 17825793] = "ERR_SDK_MPU_TASK_STREAM_NOT_FOUND", r[r.ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST = 17825794] = "ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST", r[r.ERR_SDK_MPU_TASK_INVALID_PARAM = 17825795] = "ERR_SDK_MPU_TASK_INVALID_PARAM", r[r.ERR_SDK_MPU_TASK_INTERNAL_ERROR = 17825796] = "ERR_SDK_MPU_TASK_INTERNAL_ERROR", r[r.ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR = 17825797] = "ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR", r[r.ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR = 17825798] = "ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR", r[r.ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT = 17825799] = "ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT", r[r.ERR_SDK_MPU_TASK_NOT_AUTHORIZED = 17825800] = "ERR_SDK_MPU_TASK_NOT_AUTHORIZED", r[r.ERR_SDK_CHANNEL_RELAY_STATE_ERROR = 18874369] = "ERR_SDK_CHANNEL_RELAY_STATE_ERROR", r[r.ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW = 18874370] = "ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW", r[r.ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED = 18874371] = "ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED", r[r.ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID = 18874372] = "ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID", r[r.ERR_SDK_CHANNEL_RELAY_ROLE_ERROR = 18874373] = "ERR_SDK_CHANNEL_RELAY_ROLE_ERROR", r[r.ERR_SDK_CHANNEL_RELAY_INVALID_PARAM = 18874374] = "ERR_SDK_CHANNEL_RELAY_INVALID_PARAM", r[r.ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR = 18874375] = "ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR", r))(U || {});
|
|
8746
|
-
class
|
|
8746
|
+
class V extends Error {
|
|
8747
8747
|
constructor(e, t, i) {
|
|
8748
8748
|
super(t);
|
|
8749
8749
|
g(this, "_code");
|
|
@@ -8751,10 +8751,10 @@ class F extends Error {
|
|
|
8751
8751
|
this._code = e, this._extra = i;
|
|
8752
8752
|
}
|
|
8753
8753
|
static fromRtsError(e) {
|
|
8754
|
-
return e instanceof
|
|
8754
|
+
return e instanceof V ? e : new V((e == null ? void 0 : e.errorCode) || -1, (e == null ? void 0 : e.message) || (e == null ? void 0 : e.errorCodeName) || "rts error", e);
|
|
8755
8755
|
}
|
|
8756
8756
|
static fromError(e, t = -1, i = "") {
|
|
8757
|
-
return new
|
|
8757
|
+
return new V(t, (e == null ? void 0 : e.message) || (e == null ? void 0 : e.reason) || i || "error", e);
|
|
8758
8758
|
}
|
|
8759
8759
|
get code() {
|
|
8760
8760
|
return this._code;
|
|
@@ -8792,7 +8792,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
8792
8792
|
g(this, "aliveChecker", 0);
|
|
8793
8793
|
// 心跳检查定时器
|
|
8794
8794
|
g(this, "reconnectData");
|
|
8795
|
-
this.authInfo = e, this.userName = t, this.packageCreater = new N0(e, t), this.channelProfile = i, this.clientRole = s, this.slsReporter = n, this.wsClient = new
|
|
8795
|
+
this.authInfo = e, this.userName = t, this.packageCreater = new N0(e, t), this.channelProfile = i, this.clientRole = s, this.slsReporter = n, this.wsClient = new Vr(c), this.wsClient.on("onOpen", this.onOpen.bind(this)), this.wsClient.on("onMessage", this.onMessage.bind(this)), this.wsClient.on("onError", this.onError.bind(this)), this.wsClient.on("onClose", this.onClose.bind(this)), this.wsClient.on("onConnectFail", this.onConnectFail.bind(this)), this.wsClient.on("onAuthInvalid", this.onAuthInvalid.bind(this)), this.wsClient.on("onNetworkError", this.onNetworkError.bind(this)), this.wsClient.on("onReconnectStart", this.onReconnectStart.bind(this)), this.wsClient.on("onReconnectFail", this.onReconnectFail.bind(this));
|
|
8796
8796
|
}
|
|
8797
8797
|
get retryCount() {
|
|
8798
8798
|
return this.wsClient.connectRetryCount;
|
|
@@ -8941,7 +8941,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
8941
8941
|
*/
|
|
8942
8942
|
onConnectFail() {
|
|
8943
8943
|
O.warn(`[${qe.logName}] onConnectFail`);
|
|
8944
|
-
const e = new
|
|
8944
|
+
const e = new V(U.ERR_INNER, "Signaling connect failed.");
|
|
8945
8945
|
this.isFirstConnect ? this.emit("onJoinChannelResult", e) : this.emit("onConnectFail", e);
|
|
8946
8946
|
}
|
|
8947
8947
|
/**
|
|
@@ -8955,7 +8955,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
8955
8955
|
*/
|
|
8956
8956
|
onNetworkError() {
|
|
8957
8957
|
O.warn(`[${qe.logName}] onNetworkError`);
|
|
8958
|
-
const e = new
|
|
8958
|
+
const e = new V(U.ERR_INNER, "Network error, signaling connect failed.");
|
|
8959
8959
|
this.emit("onNetworkError", e);
|
|
8960
8960
|
}
|
|
8961
8961
|
/**
|
|
@@ -8972,7 +8972,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
8972
8972
|
this.emit("onReconnectStart");
|
|
8973
8973
|
}
|
|
8974
8974
|
onReconnectFail() {
|
|
8975
|
-
this.emit("onReconnectFail", new
|
|
8975
|
+
this.emit("onReconnectFail", new V(U.ERR_INNER, "signaling reconnect failed."));
|
|
8976
8976
|
}
|
|
8977
8977
|
/**
|
|
8978
8978
|
* 处理 Keepalive 心跳,加速判断网络异常
|
|
@@ -9072,7 +9072,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
9072
9072
|
if (e.code === 200)
|
|
9073
9073
|
this.sendPkgCache(), this.startKeepAlive(), this.emit("onReconnectSuccess", e.data.users);
|
|
9074
9074
|
else {
|
|
9075
|
-
const t = new
|
|
9075
|
+
const t = new V(
|
|
9076
9076
|
U.ERR_INNER,
|
|
9077
9077
|
`reconnect failed, code: ${e.code};description: ${e.description}`
|
|
9078
9078
|
);
|
|
@@ -9171,8 +9171,8 @@ const D = (r, a) => (e, t, i) => {
|
|
|
9171
9171
|
}), h;
|
|
9172
9172
|
}, i;
|
|
9173
9173
|
}, H = (r) => r;
|
|
9174
|
-
var M0 = Object.defineProperty,
|
|
9175
|
-
for (var i = t > 1 ? void 0 : t ?
|
|
9174
|
+
var M0 = Object.defineProperty, F0 = Object.getOwnPropertyDescriptor, as = (r, a, e, t) => {
|
|
9175
|
+
for (var i = t > 1 ? void 0 : t ? F0(a, e) : a, s = r.length - 1, n; s >= 0; s--)
|
|
9176
9176
|
(n = r[s]) && (i = (t ? n(a, e, i) : n(i)) || i);
|
|
9177
9177
|
return t && i && M0(a, e, i), i;
|
|
9178
9178
|
}, Ne;
|
|
@@ -9231,7 +9231,7 @@ const wi = (Ne = class extends De {
|
|
|
9231
9231
|
} else
|
|
9232
9232
|
this.reset(), n(this.handleSignalError(u.code, u.reason, U.ERR_JOIN_CHANNEL_FAILED));
|
|
9233
9233
|
}), this.messageCenter.once("onAuthInvalid", () => {
|
|
9234
|
-
this.reset(), n(new
|
|
9234
|
+
this.reset(), n(new V(U.ERR_JOIN_BAD_TOKEN, "join failed because authentication failed"));
|
|
9235
9235
|
}), O.info(
|
|
9236
9236
|
`[${Ne.logName}]`,
|
|
9237
9237
|
"start ws connecting roomserver and auto join when connected"
|
|
@@ -9314,13 +9314,13 @@ const wi = (Ne = class extends De {
|
|
|
9314
9314
|
reportStatus(e) {
|
|
9315
9315
|
return O.info(`[${Ne.logName}]`, "reportStatus " + e), new Promise((t, i) => {
|
|
9316
9316
|
this.messageCenter ? (this.messageCenter.once("onStatusReport", (s, n) => {
|
|
9317
|
-
s === 200 ? t() : i(new
|
|
9318
|
-
}), this.messageCenter.reportStatus(e)) : i(new
|
|
9317
|
+
s === 200 ? t() : i(new V(s, n));
|
|
9318
|
+
}), this.messageCenter.reportStatus(e)) : i(new V(-1, "No messageCenter"));
|
|
9319
9319
|
});
|
|
9320
9320
|
}
|
|
9321
9321
|
handleSignalError(e, t, i = U.ERR_INNER) {
|
|
9322
9322
|
const s = `signal error: code - ${e}; description - ${t}`;
|
|
9323
|
-
return new
|
|
9323
|
+
return new V(i, s);
|
|
9324
9324
|
}
|
|
9325
9325
|
refreshAuthInfo(e) {
|
|
9326
9326
|
return w(this, null, function* () {
|
|
@@ -9372,7 +9372,7 @@ as([
|
|
|
9372
9372
|
as([
|
|
9373
9373
|
D()
|
|
9374
9374
|
], wi.prototype, "roleUpdate", 1);
|
|
9375
|
-
let
|
|
9375
|
+
let V0 = wi;
|
|
9376
9376
|
const O0 = "https://pgw.rtn.aliyuncs.com", U0 = "https://gw.rtn.aliyuncs.com", Ha = 10 * 60 * 1e3, H0 = 12, ri = class ri extends De {
|
|
9377
9377
|
constructor(e, t) {
|
|
9378
9378
|
super();
|
|
@@ -9451,7 +9451,7 @@ class ns extends De {
|
|
|
9451
9451
|
*/
|
|
9452
9452
|
join(e, t = e.userId, i, s) {
|
|
9453
9453
|
return this.maxConnectRetryCount = i, this.userName = t, new Promise((n, c) => {
|
|
9454
|
-
this.signaling ? c(new
|
|
9454
|
+
this.signaling ? c(new V(U.ERR_JOIN_ALREADY_JOINED, "already joined")) : (O.info("[signalingmanager] create signaling"), this.signaling = new V0(this.channelProfile, this.clientRole, this.slsReporter, this.env), this.initSignaling(), s && (s.rs = Date.now()), this.signaling.join(e, t, i).then((o) => {
|
|
9455
9455
|
this.authInfo = e, s && (s.re = Date.now()), n(o);
|
|
9456
9456
|
}).catch((o) => {
|
|
9457
9457
|
this.reset(), c(o);
|
|
@@ -9482,7 +9482,7 @@ class ns extends De {
|
|
|
9482
9482
|
t(n);
|
|
9483
9483
|
}).catch((n) => {
|
|
9484
9484
|
i(n);
|
|
9485
|
-
})) : i(new
|
|
9485
|
+
})) : i(new V(U.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL, "no signaling"));
|
|
9486
9486
|
});
|
|
9487
9487
|
}
|
|
9488
9488
|
/**
|
|
@@ -9496,7 +9496,7 @@ class ns extends De {
|
|
|
9496
9496
|
t();
|
|
9497
9497
|
}).catch((s) => {
|
|
9498
9498
|
i(s);
|
|
9499
|
-
}) : i(new
|
|
9499
|
+
}) : i(new V(-1, "no signaling"));
|
|
9500
9500
|
});
|
|
9501
9501
|
}
|
|
9502
9502
|
/**
|
|
@@ -9533,7 +9533,7 @@ class ns extends De {
|
|
|
9533
9533
|
* @returns
|
|
9534
9534
|
*/
|
|
9535
9535
|
refreshUrl(e) {
|
|
9536
|
-
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new
|
|
9536
|
+
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new V(U.ERR_SDK_INVALID_STATE, "should join first"));
|
|
9537
9537
|
}
|
|
9538
9538
|
refreshAuthInfo(e) {
|
|
9539
9539
|
return w(this, null, function* () {
|
|
@@ -9836,11 +9836,11 @@ function za(r) {
|
|
|
9836
9836
|
if (e) {
|
|
9837
9837
|
if (e.nodeName.toLocaleLowerCase() === "video")
|
|
9838
9838
|
return e.setAttribute("playsinline", ""), e;
|
|
9839
|
-
throw new
|
|
9839
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element should be HtmlVideoElement");
|
|
9840
9840
|
} else
|
|
9841
|
-
throw new
|
|
9841
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element not founded");
|
|
9842
9842
|
} else
|
|
9843
|
-
throw new
|
|
9843
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element id should be string");
|
|
9844
9844
|
}
|
|
9845
9845
|
function jr(r) {
|
|
9846
9846
|
var e;
|
|
@@ -10319,7 +10319,7 @@ const ge = (lt = class extends bn {
|
|
|
10319
10319
|
facingMode: "environment"
|
|
10320
10320
|
});
|
|
10321
10321
|
else
|
|
10322
|
-
throw new
|
|
10322
|
+
throw new V(U.ERR_CAMERA_OPEN_FAIL, `camera direction set to ${e} failed`);
|
|
10323
10323
|
}
|
|
10324
10324
|
setCameraDeviceId(e) {
|
|
10325
10325
|
this.streamManager.setCameraVideoConstraints({
|
|
@@ -10376,7 +10376,7 @@ const ge = (lt = class extends bn {
|
|
|
10376
10376
|
} catch (n) {
|
|
10377
10377
|
const c = n.errorCode;
|
|
10378
10378
|
let o = U.ERR_CAMERA_OPEN_FAIL;
|
|
10379
|
-
throw c === ti.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? o = U.ERR_CAMERA_NOT_AVAILABLE : c === ti.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED && (o = U.ERR_CAMERA_AUTH_FAIL), new
|
|
10379
|
+
throw c === ti.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? o = U.ERR_CAMERA_NOT_AVAILABLE : c === ti.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED && (o = U.ERR_CAMERA_AUTH_FAIL), new V(o, `camera open fail: ${n.message}`);
|
|
10380
10380
|
}
|
|
10381
10381
|
});
|
|
10382
10382
|
}
|
|
@@ -10389,7 +10389,7 @@ const ge = (lt = class extends bn {
|
|
|
10389
10389
|
} catch (s) {
|
|
10390
10390
|
const n = s.errorCode;
|
|
10391
10391
|
let c = U.ERR_MIC_OPEN_FAIL;
|
|
10392
|
-
throw n === ti.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? c = U.ERR_MIC_NOT_AVAILABLE : n === ti.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED && (c = U.ERR_MIC_AUTH_FAIL), new
|
|
10392
|
+
throw n === ti.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? c = U.ERR_MIC_NOT_AVAILABLE : n === ti.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED && (c = U.ERR_MIC_AUTH_FAIL), new V(c, `mic open fail: ${s.message}`);
|
|
10393
10393
|
}
|
|
10394
10394
|
});
|
|
10395
10395
|
}
|
|
@@ -10405,7 +10405,7 @@ const ge = (lt = class extends bn {
|
|
|
10405
10405
|
return;
|
|
10406
10406
|
}
|
|
10407
10407
|
if (![se.AliRtcVideoTrackCamera, se.AliRtcVideoTrackScreen].includes(t))
|
|
10408
|
-
throw new
|
|
10408
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "set view config invalid track", { track: t });
|
|
10409
10409
|
e.forEach((i) => {
|
|
10410
10410
|
this.setPreviewElement({
|
|
10411
10411
|
videoElement: i,
|
|
@@ -10452,7 +10452,7 @@ const ge = (lt = class extends bn {
|
|
|
10452
10452
|
try {
|
|
10453
10453
|
let s = i ? this.streamManager.screenStreamInfo.previewStream : this.streamManager.cameraStreamInfo.previewStream;
|
|
10454
10454
|
if (!t)
|
|
10455
|
-
throw new
|
|
10455
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "no video element found", {
|
|
10456
10456
|
videoElement: t
|
|
10457
10457
|
});
|
|
10458
10458
|
if (!s) {
|
|
@@ -10462,7 +10462,7 @@ const ge = (lt = class extends bn {
|
|
|
10462
10462
|
return _n(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream;
|
|
10463
10463
|
} catch (s) {
|
|
10464
10464
|
const n = U.ERR_INNER;
|
|
10465
|
-
throw
|
|
10465
|
+
throw V.fromError(s, n, "preview failed");
|
|
10466
10466
|
}
|
|
10467
10467
|
});
|
|
10468
10468
|
}
|
|
@@ -10611,7 +10611,7 @@ const ge = (lt = class extends bn {
|
|
|
10611
10611
|
this.dataPubState.setState(Y.AliRtcStatePublishing);
|
|
10612
10612
|
try {
|
|
10613
10613
|
const e = yield this.rtsManager.publishAddDataChannel(this.url);
|
|
10614
|
-
e ? (this.updateDataChannel(e), this.dataPubState.setState(Y.AliRtcStatePublished)) : (this.dataPubState.setState(Y.AliRtcStateNoPublish), this.emit("publishDataError", new
|
|
10614
|
+
e ? (this.updateDataChannel(e), this.dataPubState.setState(Y.AliRtcStatePublished)) : (this.dataPubState.setState(Y.AliRtcStateNoPublish), this.emit("publishDataError", new V(U.ERR_INNER, "publishDataError")));
|
|
10615
10615
|
} catch (e) {
|
|
10616
10616
|
this.dataPubState.setState(Y.AliRtcStateNoPublish);
|
|
10617
10617
|
}
|
|
@@ -10733,7 +10733,7 @@ const ge = (lt = class extends bn {
|
|
|
10733
10733
|
return w(this, null, function* () {
|
|
10734
10734
|
var o;
|
|
10735
10735
|
if (!e)
|
|
10736
|
-
throw new
|
|
10736
|
+
throw new V(U.ERR_INNER, "sync publish to room server failed because no publishInfo");
|
|
10737
10737
|
let s = e;
|
|
10738
10738
|
if (this.dc) {
|
|
10739
10739
|
const c = e, { tracks: u } = c, h = wt(c, ["tracks"]);
|
|
@@ -10755,7 +10755,7 @@ const ge = (lt = class extends bn {
|
|
|
10755
10755
|
}
|
|
10756
10756
|
refreshPushStreamUrl() {
|
|
10757
10757
|
return w(this, null, function* () {
|
|
10758
|
-
const e = new
|
|
10758
|
+
const e = new V(U.ERR_INNER, "refresh push stream url error"), t = this.url;
|
|
10759
10759
|
if (!t)
|
|
10760
10760
|
throw e;
|
|
10761
10761
|
const i = yield this.signalingManager.refreshUrl({
|
|
@@ -10794,7 +10794,7 @@ const ge = (lt = class extends bn {
|
|
|
10794
10794
|
let p = U.ERR_SDK_PUBLISH_INVAILD;
|
|
10795
10795
|
if (n && (this.audioPubState.setState(Y.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), c && (this.videoPubState.setState(Y.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), o && (this.videoSmallPubState.setState(Y.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED), u && (this.screenPubState.setState(Y.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED), h.errorCode === 15006 && s < 3)
|
|
10796
10796
|
return this.publishAdd(e, t, i, s + 1);
|
|
10797
|
-
throw
|
|
10797
|
+
throw V.fromError(h, p, "publish add failed");
|
|
10798
10798
|
}
|
|
10799
10799
|
});
|
|
10800
10800
|
}
|
|
@@ -10817,7 +10817,7 @@ const ge = (lt = class extends bn {
|
|
|
10817
10817
|
};
|
|
10818
10818
|
return this.reportSelfDeviceStatus(), i;
|
|
10819
10819
|
} catch (i) {
|
|
10820
|
-
throw
|
|
10820
|
+
throw V.fromError(
|
|
10821
10821
|
i,
|
|
10822
10822
|
U.ERR_INNER,
|
|
10823
10823
|
`publish replace failed, vMsid: ${t == null ? void 0 : t.vMsid} aMsid: ${t == null ? void 0 : t.aMsid}`
|
|
@@ -10843,14 +10843,14 @@ const ge = (lt = class extends bn {
|
|
|
10843
10843
|
try {
|
|
10844
10844
|
return yield this.rtsManager.publishDelete(this.url, e), this.streamTracks = this.rtsManager.publishingTracks, e.audio && this.audioPubState.setState(Y.AliRtcStateNoPublish), e.video && (e.vMsid === T.VideoSmall ? this.videoSmallPubState.setState(Y.AliRtcStateNoPublish) : this.videoPubState.setState(Y.AliRtcStateNoPublish)), e.screen && this.screenPubState.setState(Y.AliRtcStateNoPublish), t.tracks = this.streamTracks, this.reportSelfDeviceStatus(), t;
|
|
10845
10845
|
} catch (i) {
|
|
10846
|
-
throw
|
|
10846
|
+
throw V.fromError(i, U.ERR_INNER, "publish delete tracks failed");
|
|
10847
10847
|
}
|
|
10848
10848
|
});
|
|
10849
10849
|
}
|
|
10850
10850
|
publishStop() {
|
|
10851
10851
|
return w(this, null, function* () {
|
|
10852
10852
|
if (!this._isPublishing)
|
|
10853
|
-
throw new
|
|
10853
|
+
throw new V(
|
|
10854
10854
|
U.ERR_INNER,
|
|
10855
10855
|
"publish stop failed, previous localStream is required for publishing stopping"
|
|
10856
10856
|
);
|
|
@@ -10876,7 +10876,7 @@ const ge = (lt = class extends bn {
|
|
|
10876
10876
|
};
|
|
10877
10877
|
return this.syncPublishToRoomServer(c, {}, e), c;
|
|
10878
10878
|
} catch (t) {
|
|
10879
|
-
throw
|
|
10879
|
+
throw V.fromError(t, U.ERR_INNER, "publish stop failed");
|
|
10880
10880
|
}
|
|
10881
10881
|
});
|
|
10882
10882
|
}
|
|
@@ -10903,7 +10903,7 @@ const ge = (lt = class extends bn {
|
|
|
10903
10903
|
}
|
|
10904
10904
|
return this.dc && (this.rtsManager.publishStopDataChannel(this.url, this.dc), this.dataPubState.setState(Y.AliRtcStateNoPublish), this.dc = void 0), this.slsReporter.reportUnpublish(this.callId || "", e, 0, ""), t;
|
|
10905
10905
|
} catch (i) {
|
|
10906
|
-
throw
|
|
10906
|
+
throw V.fromError(i, U.ERR_INNER, "unpublish failed");
|
|
10907
10907
|
}
|
|
10908
10908
|
});
|
|
10909
10909
|
}
|
|
@@ -11062,9 +11062,9 @@ const ge = (lt = class extends bn {
|
|
|
11062
11062
|
return w(this, null, function* () {
|
|
11063
11063
|
var s;
|
|
11064
11064
|
if (!((s = this.parameter.data) != null && s.enablePubDataChannel))
|
|
11065
|
-
throw new
|
|
11065
|
+
throw new V(U.ERR_INNER, "data channel publish is not enabled");
|
|
11066
11066
|
if (!this.dc)
|
|
11067
|
-
throw new
|
|
11067
|
+
throw new V(U.ERR_INNER, "data channel is not ready");
|
|
11068
11068
|
const t = e.toBuffer(), i = Y0(t, 1156);
|
|
11069
11069
|
i.forEach((n, c) => {
|
|
11070
11070
|
const o = new Ti(
|
|
@@ -11190,7 +11190,7 @@ me([
|
|
|
11190
11190
|
D(([r, a, e]) => [r.length, a, e])
|
|
11191
11191
|
], ge.prototype, "sendSEI", 1);
|
|
11192
11192
|
let tc = ge;
|
|
11193
|
-
var vt = /* @__PURE__ */ ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(vt || {}), re = /* @__PURE__ */ ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(re || {}),
|
|
11193
|
+
var vt = /* @__PURE__ */ ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(vt || {}), re = /* @__PURE__ */ ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(re || {}), Ft = /* @__PURE__ */ ((r) => (r.VideoTrackEnded = "videoTrackEnded", r.AudioTrackEnded = "audioTrackEnded", r.ScreenTrackEnded = "screenTrackEnded", r))(Ft || {});
|
|
11194
11194
|
const ic = (r) => {
|
|
11195
11195
|
const a = new MediaStream();
|
|
11196
11196
|
return a.addTrack(r), a;
|
|
@@ -11205,7 +11205,7 @@ const ic = (r) => {
|
|
|
11205
11205
|
}), rc = (r) => {
|
|
11206
11206
|
const { audio: a, video: e, screen: t } = r;
|
|
11207
11207
|
if (e && t)
|
|
11208
|
-
throw new
|
|
11208
|
+
throw new V(U.ERR_INNER, "create stream error, cannot create video && screen together");
|
|
11209
11209
|
return !(!e && !a && !t);
|
|
11210
11210
|
}, sc = (r) => r === T.Audio || r === Jr.Audio, ac = (r) => r === T.VideoLarge || r === Jr.VideoLarge, nc = (r) => r === T.VideoSmall, oc = (r) => r === T.Screen, cc = (r) => r === T.Data;
|
|
11211
11211
|
var uc = Object.defineProperty, hc = Object.getOwnPropertyDescriptor, dc = (r, a, e, t) => {
|
|
@@ -11631,7 +11631,7 @@ const Ce = (Le = class extends bn {
|
|
|
11631
11631
|
), this.emit("remoteDataChannelMessage", this.uid, i));
|
|
11632
11632
|
});
|
|
11633
11633
|
g(this, "onDataChannelError", (e) => {
|
|
11634
|
-
this.emit("occurError",
|
|
11634
|
+
this.emit("occurError", V.fromError(e, U.ERR_SDK_SUBSCRIBE_DATA_ERROR));
|
|
11635
11635
|
});
|
|
11636
11636
|
g(this, "dataChannelConnected", (e) => {
|
|
11637
11637
|
e && (this.dc = e, this.dc.datachannel && (this.dc.datachannel.binaryType = "arraybuffer"), this.dc.off("message", this.onDataChannelMessage), this.dc.off("error", this.onDataChannelError), this.dc.on("message", this.onDataChannelMessage), this.dc.on("error", this.onDataChannelError));
|
|
@@ -11771,7 +11771,7 @@ const Ce = (Le = class extends bn {
|
|
|
11771
11771
|
}
|
|
11772
11772
|
setViewConfig(e, t) {
|
|
11773
11773
|
if (t !== se.AliRtcVideoTrackScreen && t !== se.AliRtcVideoTrackCamera)
|
|
11774
|
-
throw new
|
|
11774
|
+
throw new V(
|
|
11775
11775
|
U.ERR_INVALID_ARGUMENTS,
|
|
11776
11776
|
"track is not AliRtcVideoTrackScreen or AliRtcVideoTrackCamera"
|
|
11777
11777
|
);
|
|
@@ -11884,7 +11884,7 @@ const Ce = (Le = class extends bn {
|
|
|
11884
11884
|
est: s
|
|
11885
11885
|
}
|
|
11886
11886
|
);
|
|
11887
|
-
const m =
|
|
11887
|
+
const m = V.fromError(p, f);
|
|
11888
11888
|
throw this.emit("remoteSubscribeError", m), m;
|
|
11889
11889
|
}
|
|
11890
11890
|
});
|
|
@@ -11926,7 +11926,7 @@ const Ce = (Le = class extends bn {
|
|
|
11926
11926
|
vMsid: e.vMsid
|
|
11927
11927
|
}), o;
|
|
11928
11928
|
} catch (t) {
|
|
11929
|
-
throw
|
|
11929
|
+
throw V.fromError(t, U.ERR_INNER, "subscribe delete failed");
|
|
11930
11930
|
}
|
|
11931
11931
|
});
|
|
11932
11932
|
}
|
|
@@ -11988,7 +11988,7 @@ const Ce = (Le = class extends bn {
|
|
|
11988
11988
|
return this.callId = "", u;
|
|
11989
11989
|
} catch (u) {
|
|
11990
11990
|
if (((o = (c = (n = (s = u == null ? void 0 : u.extraInfo) == null ? void 0 : s.parsedData) == null ? void 0 : n.streams) == null ? void 0 : c[0]) == null ? void 0 : o.res_code) !== 404)
|
|
11991
|
-
throw
|
|
11991
|
+
throw V.fromError(u, U.ERR_INNER, "subscribe stop failed");
|
|
11992
11992
|
}
|
|
11993
11993
|
});
|
|
11994
11994
|
}
|
|
@@ -12038,7 +12038,7 @@ const Ce = (Le = class extends bn {
|
|
|
12038
12038
|
} else
|
|
12039
12039
|
throw new Error("no dc founded");
|
|
12040
12040
|
}).catch((e) => {
|
|
12041
|
-
const t =
|
|
12041
|
+
const t = V.fromError(e, U.ERR_INNER, "subscribe data failed");
|
|
12042
12042
|
this.emit("remoteSubscribeError", t), this.dataSubState.setState(he.AliRtcStateNoSubscribe);
|
|
12043
12043
|
}));
|
|
12044
12044
|
}
|
|
@@ -12397,13 +12397,13 @@ class xc extends De {
|
|
|
12397
12397
|
}
|
|
12398
12398
|
add(e, t) {
|
|
12399
12399
|
if (this.plugins.has(e.name))
|
|
12400
|
-
throw new
|
|
12400
|
+
throw new V(_t.AliRtcPluginErrorCreateError, `Plugin ${e.name} already exists`);
|
|
12401
12401
|
this.plugins.set(e.name, e), t && e.setOptions(t), this.emit("added", e), e.on("enabled", () => this.emit("added", e)), e.on("disabled", () => this.emit("removed", e)), e.on("updated", () => this.emit("updated", e));
|
|
12402
12402
|
}
|
|
12403
12403
|
remove(e) {
|
|
12404
12404
|
const t = this.plugins.get(e);
|
|
12405
12405
|
if (!t)
|
|
12406
|
-
throw new
|
|
12406
|
+
throw new V(_t.AliRtcPluginErrorNoFindPlugin, `Plugin ${e} not founded`);
|
|
12407
12407
|
this.plugins.delete(e), t.removeAllListeners(), this.emit("removed", t);
|
|
12408
12408
|
}
|
|
12409
12409
|
removeAll() {
|
|
@@ -12609,7 +12609,7 @@ const xe = (Ae = class extends De {
|
|
|
12609
12609
|
this.pcTraceId,
|
|
12610
12610
|
"",
|
|
12611
12611
|
S
|
|
12612
|
-
),
|
|
12612
|
+
), V.fromRtsError(_);
|
|
12613
12613
|
}
|
|
12614
12614
|
O.event(`[${Ae.logName}]`, "rts publish success", v), this.slsReporter.reportPublish(
|
|
12615
12615
|
i,
|
|
@@ -12669,7 +12669,7 @@ const xe = (Ae = class extends De {
|
|
|
12669
12669
|
l1ip: o
|
|
12670
12670
|
};
|
|
12671
12671
|
} catch (_) {
|
|
12672
|
-
throw this.setConnected(!1),
|
|
12672
|
+
throw this.setConnected(!1), V.fromError(_);
|
|
12673
12673
|
}
|
|
12674
12674
|
});
|
|
12675
12675
|
}
|
|
@@ -12708,7 +12708,7 @@ const xe = (Ae = class extends De {
|
|
|
12708
12708
|
stream: t,
|
|
12709
12709
|
updateSourceStream: !1
|
|
12710
12710
|
}, m)
|
|
12711
|
-
])) : Promise.reject(new
|
|
12711
|
+
])) : Promise.reject(new V(U.ERR_INNER, "rts not connected"));
|
|
12712
12712
|
}),
|
|
12713
12713
|
Ja,
|
|
12714
12714
|
0,
|
|
@@ -12753,7 +12753,7 @@ const xe = (Ae = class extends De {
|
|
|
12753
12753
|
this.pcTraceId,
|
|
12754
12754
|
"",
|
|
12755
12755
|
f
|
|
12756
|
-
), A != null && A.errorCode ?
|
|
12756
|
+
), A != null && A.errorCode ? V.fromRtsError(A) : V.fromError(A);
|
|
12757
12757
|
}
|
|
12758
12758
|
return "";
|
|
12759
12759
|
});
|
|
@@ -12776,7 +12776,7 @@ const xe = (Ae = class extends De {
|
|
|
12776
12776
|
])) || [];
|
|
12777
12777
|
return O.event(Ae.logName, "publishDelete", { result: v }), v && this.updatePublishingTracks(v.trackInfoList), ((x = (l = v == null ? void 0 : v.trackInfoList) == null ? void 0 : l[0]) == null ? void 0 : x.trackId) || "";
|
|
12778
12778
|
} catch (v) {
|
|
12779
|
-
throw
|
|
12779
|
+
throw V.fromRtsError(v);
|
|
12780
12780
|
}
|
|
12781
12781
|
});
|
|
12782
12782
|
}
|
|
@@ -12797,7 +12797,7 @@ const xe = (Ae = class extends De {
|
|
|
12797
12797
|
]), [h] = u;
|
|
12798
12798
|
return this.updatePublishingTracks(h.trackInfoList), ((o = (c = h == null ? void 0 : h.trackInfoList) == null ? void 0 : c[0]) == null ? void 0 : o.trackId) || "";
|
|
12799
12799
|
} catch (u) {
|
|
12800
|
-
throw
|
|
12800
|
+
throw V.fromRtsError(u);
|
|
12801
12801
|
}
|
|
12802
12802
|
});
|
|
12803
12803
|
}
|
|
@@ -12874,7 +12874,7 @@ const xe = (Ae = class extends De {
|
|
|
12874
12874
|
stream: f
|
|
12875
12875
|
};
|
|
12876
12876
|
} catch (f) {
|
|
12877
|
-
throw this.setConnected(!1), this.emit("disconnected"),
|
|
12877
|
+
throw this.setConnected(!1), this.emit("disconnected"), V.fromRtsError(f);
|
|
12878
12878
|
}
|
|
12879
12879
|
});
|
|
12880
12880
|
}
|
|
@@ -12902,7 +12902,7 @@ const xe = (Ae = class extends De {
|
|
|
12902
12902
|
} catch (h) {
|
|
12903
12903
|
if (((u = (o = (c = (n = h == null ? void 0 : h.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : c.streams) == null ? void 0 : o[0]) == null ? void 0 : u.res_code) === 508)
|
|
12904
12904
|
return this.emit("subscribeexceeds"), null;
|
|
12905
|
-
throw
|
|
12905
|
+
throw V.fromRtsError(h);
|
|
12906
12906
|
}
|
|
12907
12907
|
});
|
|
12908
12908
|
}
|
|
@@ -12922,7 +12922,7 @@ const xe = (Ae = class extends De {
|
|
|
12922
12922
|
} catch (h) {
|
|
12923
12923
|
if (((u = (o = (c = (n = h == null ? void 0 : h.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : c.streams) == null ? void 0 : o[0]) == null ? void 0 : u.res_code) === 404)
|
|
12924
12924
|
return;
|
|
12925
|
-
throw
|
|
12925
|
+
throw V.fromRtsError(h);
|
|
12926
12926
|
}
|
|
12927
12927
|
});
|
|
12928
12928
|
}
|
|
@@ -12938,7 +12938,7 @@ const xe = (Ae = class extends De {
|
|
|
12938
12938
|
} catch (c) {
|
|
12939
12939
|
if (((n = (s = (i = (t = c == null ? void 0 : c.extraInfo) == null ? void 0 : t.parsedData) == null ? void 0 : i.streams) == null ? void 0 : s[0]) == null ? void 0 : n.res_code) === 404)
|
|
12940
12940
|
return;
|
|
12941
|
-
throw
|
|
12941
|
+
throw V.fromRtsError(c);
|
|
12942
12942
|
}
|
|
12943
12943
|
});
|
|
12944
12944
|
}
|
|
@@ -13049,7 +13049,7 @@ const xe = (Ae = class extends De {
|
|
|
13049
13049
|
let c = !1;
|
|
13050
13050
|
const { options: o, remoteUser: u } = e;
|
|
13051
13051
|
if (o.video && o.screen)
|
|
13052
|
-
throw new
|
|
13052
|
+
throw new V(
|
|
13053
13053
|
U.ERR_INNER,
|
|
13054
13054
|
"subscribe error, video and screen cannot be subscribed at the same time"
|
|
13055
13055
|
);
|
|
@@ -13236,7 +13236,7 @@ class Nr {
|
|
|
13236
13236
|
g(this, "profileMap", /* @__PURE__ */ new Map());
|
|
13237
13237
|
g(this, "audioProfile");
|
|
13238
13238
|
g(this, "contentHint");
|
|
13239
|
-
this.defaultProfile = a;
|
|
13239
|
+
this.defaultProfile = G({}, a);
|
|
13240
13240
|
}
|
|
13241
13241
|
updateProfile(a, e) {
|
|
13242
13242
|
e && this.profileMap.set(a, G(G(G({}, this.defaultProfile), this.profileMap.get(a) || {}), e)), this.profile = a;
|
|
@@ -13268,7 +13268,7 @@ class Nr {
|
|
|
13268
13268
|
yield a.applyConstraints(i);
|
|
13269
13269
|
} catch (s) {
|
|
13270
13270
|
}
|
|
13271
|
-
e && (e == null || e.VideoProfileMap.set(this.profile, i), yield e.setVideoProfile(this.profile));
|
|
13271
|
+
e && (G({}, i), i.maxSendFrameRate && i.maxSendFrameRate, e == null || e.VideoProfileMap.set(this.profile, i), yield e.setVideoProfile(this.profile));
|
|
13272
13272
|
}
|
|
13273
13273
|
});
|
|
13274
13274
|
}
|
|
@@ -13493,8 +13493,8 @@ var Ec = Object.defineProperty, _c = Object.getOwnPropertyDescriptor, st = (r, a
|
|
|
13493
13493
|
for (var i = t > 1 ? void 0 : t ? _c(a, e) : a, s = r.length - 1, n; s >= 0; s--)
|
|
13494
13494
|
(n = r[s]) && (i = (t ? n(a, e, i) : n(i)) || i);
|
|
13495
13495
|
return t && i && Ec(a, e, i), i;
|
|
13496
|
-
},
|
|
13497
|
-
const Ze = (
|
|
13496
|
+
}, Vt;
|
|
13497
|
+
const Ze = (Vt = class extends De {
|
|
13498
13498
|
// 设置是否发布屏幕流
|
|
13499
13499
|
constructor(e, t) {
|
|
13500
13500
|
super();
|
|
@@ -13517,29 +13517,29 @@ const Ze = (Ft = class extends De {
|
|
|
13517
13517
|
g(this, "_publishLocalScreenStreamEnabled", !0);
|
|
13518
13518
|
this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
|
|
13519
13519
|
const i = (s) => w(this, null, function* () {
|
|
13520
|
-
if (O.info(`[${
|
|
13520
|
+
if (O.info(`[${Vt.logName}]`, "plugin added", s.name), !s.isSupported("6.14.4-beta.3")) {
|
|
13521
13521
|
console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
|
|
13522
13522
|
return;
|
|
13523
13523
|
}
|
|
13524
13524
|
try {
|
|
13525
13525
|
yield s.init();
|
|
13526
13526
|
} catch (n) {
|
|
13527
|
-
s.emit("error",
|
|
13527
|
+
s.emit("error", V.fromError(n, _t.AliRtcPluginErrorInitError));
|
|
13528
13528
|
}
|
|
13529
13529
|
s.streamType === be.AliRtcSdkStreamTypeCapture && (this.cameraStreamInfo.addPlugin(s), yield this.cameraStreamInfo.process(this.streamInfos)), s.streamType === be.AliRtcSdkStreamTypeScreen && (this.screenStreamInfo.addPlugin(s), yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
13530
13530
|
});
|
|
13531
13531
|
this.cameraStreamInfo.on("videotrackended", () => w(this, null, function* () {
|
|
13532
13532
|
yield this.stopLocalStream({
|
|
13533
13533
|
video: !0
|
|
13534
|
-
}), this.emit("trackended",
|
|
13534
|
+
}), this.emit("trackended", Ft.VideoTrackEnded);
|
|
13535
13535
|
})), this.cameraStreamInfo.on("audiotrackended", () => w(this, null, function* () {
|
|
13536
13536
|
yield this.stopLocalStream({
|
|
13537
13537
|
audio: !0
|
|
13538
|
-
}), this.emit("trackended",
|
|
13538
|
+
}), this.emit("trackended", Ft.AudioTrackEnded);
|
|
13539
13539
|
})), this.screenStreamInfo.on("videotrackended", () => w(this, null, function* () {
|
|
13540
13540
|
yield this.stopLocalStream({
|
|
13541
13541
|
screen: !0
|
|
13542
|
-
}), this.emit("trackended",
|
|
13542
|
+
}), this.emit("trackended", Ft.ScreenTrackEnded);
|
|
13543
13543
|
})), this.pluginManager.on("added", i), this.pluginManager.on("removed", (s) => w(this, null, function* () {
|
|
13544
13544
|
this.cameraStreamInfo.removePlugin(s) && (yield this.cameraStreamInfo.process(this.streamInfos)), this.screenStreamInfo.removePlugin(s) && (yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
13545
13545
|
})), this.pluginManager.on("updated", () => w(this, null, function* () {
|
|
@@ -13683,7 +13683,7 @@ const Ze = (Ft = class extends De {
|
|
|
13683
13683
|
const c = this.publishStreams;
|
|
13684
13684
|
try {
|
|
13685
13685
|
if (!c.audio && !c.video && !c.videoSmall && !c.screen)
|
|
13686
|
-
throw O.error(`[${
|
|
13686
|
+
throw O.error(`[${Vt.logName}]`, "no tracks founded"), new V(U.ERR_SDK_PUBLISH_INVAILD, "no tracks founded");
|
|
13687
13687
|
const d = new MediaStream();
|
|
13688
13688
|
(o = c.audio) != null && o.audioTrack && d.addTrack(c.audio.audioTrack), (u = c.video) != null && u.videoTrack ? (d.addTrack(c.video.videoTrack), s = c.videoSmall, n = c.screen) : (h = c.screen) != null && h.videoTrack && (i = T.Screen, d.addTrack((p = c.screen) == null ? void 0 : p.videoTrack), t = !0), e = yield yn(d), t ? (this.screenStreamInfo.cloneVideoProfile(e), this.publishingScreenVideoStream = e) : (this.cameraStreamInfo.cloneVideoProfile(e), this.publishingCameraVideoStream = e);
|
|
13689
13689
|
} catch (d) {
|
|
@@ -13727,7 +13727,7 @@ const Ze = (Ft = class extends De {
|
|
|
13727
13727
|
}, /**
|
|
13728
13728
|
* @ignore
|
|
13729
13729
|
*/
|
|
13730
|
-
g(
|
|
13730
|
+
g(Vt, "logName", "LocalStreamManager"), Vt);
|
|
13731
13731
|
st([
|
|
13732
13732
|
D(([r]) => {
|
|
13733
13733
|
const { audio: a, video: e, screen: t, custom: i, skipProfile: s, videoProfile: n, screenProfile: c } = r;
|
|
@@ -14398,7 +14398,7 @@ class zr {
|
|
|
14398
14398
|
return en.isSupport() ? new en(a, e) : Qa.isSupport() ? new Qa(a, e) : new Dc(a, e);
|
|
14399
14399
|
}
|
|
14400
14400
|
}
|
|
14401
|
-
class
|
|
14401
|
+
class Fc extends Gt {
|
|
14402
14402
|
constructor() {
|
|
14403
14403
|
super(...arguments);
|
|
14404
14404
|
g(this, "hasVideoTrack", !1);
|
|
@@ -14438,10 +14438,10 @@ class Vc extends Gt {
|
|
|
14438
14438
|
super.clear(e), this.hasVideoTrack = !1, e == null || e.updateDualVideoTrack();
|
|
14439
14439
|
}
|
|
14440
14440
|
}
|
|
14441
|
-
var
|
|
14441
|
+
var Vc = Object.defineProperty, Oc = Object.getOwnPropertyDescriptor, je = (r, a, e, t) => {
|
|
14442
14442
|
for (var i = t > 1 ? void 0 : t ? Oc(a, e) : a, s = r.length - 1, n; s >= 0; s--)
|
|
14443
14443
|
(n = r[s]) && (i = (t ? n(a, e, i) : n(i)) || i);
|
|
14444
|
-
return t && i &&
|
|
14444
|
+
return t && i && Vc(a, e, i), i;
|
|
14445
14445
|
};
|
|
14446
14446
|
class Pe extends De {
|
|
14447
14447
|
constructor(e) {
|
|
@@ -14483,7 +14483,7 @@ class Pe extends De {
|
|
|
14483
14483
|
pluginManager: this.pluginManager,
|
|
14484
14484
|
audioVolumeIndicationInterval: this.audioVolumeIndicationInterval,
|
|
14485
14485
|
parameter: this.parameter
|
|
14486
|
-
}), this.audioMixerPlugin = new wc(), this.pluginManager.add(this.audioMixerPlugin), this.dualVideoPlugin = new
|
|
14486
|
+
}), this.audioMixerPlugin = new wc(), this.pluginManager.add(this.audioMixerPlugin), this.dualVideoPlugin = new Fc("dualVideoPlugin"), T0() && this.pluginManager.add(new yc());
|
|
14487
14487
|
}
|
|
14488
14488
|
addSignalingManagerListener() {
|
|
14489
14489
|
this.signalingManager.on("onNotifyPublish", (e) => {
|
|
@@ -14810,19 +14810,19 @@ class Pe extends De {
|
|
|
14810
14810
|
updateAudioWant(e, t) {
|
|
14811
14811
|
const i = this.userMap[e];
|
|
14812
14812
|
if (!i)
|
|
14813
|
-
throw new
|
|
14813
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14814
14814
|
i.setWantSubAudio(t), t ? i.updateSubscribe(de.User) : i.stopSubscribe({ audio: !0 });
|
|
14815
14815
|
}
|
|
14816
14816
|
updateVideoWant(e, t) {
|
|
14817
14817
|
const i = this.userMap[e];
|
|
14818
14818
|
if (!i)
|
|
14819
|
-
throw new
|
|
14819
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14820
14820
|
i.setWantSubVideo(t), t ? i.updateSubscribe(de.User) : i.stopSubscribe({ video: !0 });
|
|
14821
14821
|
}
|
|
14822
14822
|
updateScreenWant(e, t) {
|
|
14823
14823
|
const i = this.userMap[e];
|
|
14824
14824
|
if (!i)
|
|
14825
|
-
throw new
|
|
14825
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14826
14826
|
i.setWantSubScreen(t), t ? i.updateSubscribe(de.User) : i.stopSubscribe({ screen: !0 });
|
|
14827
14827
|
}
|
|
14828
14828
|
stopIndication() {
|
|
@@ -14981,9 +14981,9 @@ class Uc {
|
|
|
14981
14981
|
},
|
|
14982
14982
|
body: JSON.stringify(e)
|
|
14983
14983
|
}).then((h) => h.status !== 200 ? (this.slsReporter.reportTranscodingError(h.status, e.taskid || ""), Promise.reject(
|
|
14984
|
-
new
|
|
14984
|
+
new V(U.ERR_INNER, `transcoding request failed, status: ${h.status}`)
|
|
14985
14985
|
)) : h).catch((h) => Promise.reject(
|
|
14986
|
-
new
|
|
14986
|
+
new V(U.ERR_INNER, `transcoding request failed, err: ${h.message}`)
|
|
14987
14987
|
));
|
|
14988
14988
|
}
|
|
14989
14989
|
setAuthInfo(a) {
|
|
@@ -15028,14 +15028,14 @@ class Uc {
|
|
|
15028
15028
|
return w(this, null, function* () {
|
|
15029
15029
|
if (!this.authInfo)
|
|
15030
15030
|
return Promise.reject(ht.LiveTranscodingErrorInvalidParam);
|
|
15031
|
-
const e = yield Lr(a.split("?")[0]), t = Ue.MPU_TASK_TRANSACTION_STOP, i = new
|
|
15031
|
+
const e = yield Lr(a.split("?")[0]), t = Ue.MPU_TASK_TRANSACTION_STOP, i = new Fr().toJson(t, this.authInfo, e, a);
|
|
15032
15032
|
return this.doRequest(t, i);
|
|
15033
15033
|
});
|
|
15034
15034
|
}
|
|
15035
15035
|
stopPublishLiveStreamWithTaskId(a) {
|
|
15036
15036
|
if (!this.authInfo)
|
|
15037
15037
|
return Promise.reject(ht.LiveTranscodingErrorInvalidParam);
|
|
15038
|
-
const e = Ue.MPU_TASK_TRANSACTION_STOP, t = new
|
|
15038
|
+
const e = Ue.MPU_TASK_TRANSACTION_STOP, t = new Fr().toJson(e, this.authInfo, a);
|
|
15039
15039
|
return this.doRequest(e, t);
|
|
15040
15040
|
}
|
|
15041
15041
|
refreshAuthInfo(a) {
|
|
@@ -15082,19 +15082,19 @@ class cs {
|
|
|
15082
15082
|
*/
|
|
15083
15083
|
static checkAuthInfo(a) {
|
|
15084
15084
|
if (!a)
|
|
15085
|
-
return new
|
|
15085
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no authInfo founded");
|
|
15086
15086
|
if (!a.appId)
|
|
15087
|
-
return new
|
|
15087
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no appId founded");
|
|
15088
15088
|
if (!a.channelId)
|
|
15089
|
-
return new
|
|
15089
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no channelId founded");
|
|
15090
15090
|
if (!a.userId)
|
|
15091
|
-
return new
|
|
15091
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no userId founded");
|
|
15092
15092
|
if (a.timestamp) {
|
|
15093
15093
|
if (!cs.checkNumber(a.timestamp))
|
|
15094
|
-
return new
|
|
15094
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "timestamp is not number");
|
|
15095
15095
|
} else
|
|
15096
|
-
return new
|
|
15097
|
-
return a.token ? null : new
|
|
15096
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no timestamp founded");
|
|
15097
|
+
return a.token ? null : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no token founded");
|
|
15098
15098
|
}
|
|
15099
15099
|
/**
|
|
15100
15100
|
* 检测是否是MediaStreamTrack类型
|
|
@@ -15430,10 +15430,10 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15430
15430
|
}, o = [], u = [], h = [], p = [], d = [], f = [], m = [], l = [], x = [], v = [], S = [], b = [], E = [], _ = [], y = [], A = [], R = [], L = [], C = [];
|
|
15431
15431
|
try {
|
|
15432
15432
|
if (s.forEach((I) => {
|
|
15433
|
-
var
|
|
15433
|
+
var F, N, J, j, ce, Z;
|
|
15434
15434
|
if (!I || !I.timestamp)
|
|
15435
15435
|
return;
|
|
15436
|
-
const P = (
|
|
15436
|
+
const P = (F = I._last) != null && F.timestamp ? I.timestamp - I._last.timestamp : 1e3, B = pe(I, "bytesSent"), $ = pe(I, "headerBytesSent"), q = Ge(fe(B + $, 8, 2e7), P);
|
|
15437
15437
|
o.push(q);
|
|
15438
15438
|
const X = Ge(fe(B, 8, 2e7), P);
|
|
15439
15439
|
u.push(X);
|
|
@@ -15448,8 +15448,8 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15448
15448
|
(N = I._source) != null && N.audioLevel && m.push(sn(I._source.audioLevel)), l.push(0);
|
|
15449
15449
|
else {
|
|
15450
15450
|
x.push(an(I, "totalEncodeTime")), v.push(kt((J = I._source) == null ? void 0 : J.framesPerSecond, 100)), S.push(kt((j = I._source) == null ? void 0 : j.framesPerSecond, 100)), b.push(kt(I.framesPerSecond, 100)), E.push(kt((ce = I._source) == null ? void 0 : ce.height, 4400)), _.push(kt((Z = I._source) == null ? void 0 : Z.width, 7700)), y.push(kt(I.frameHeight, 4400)), A.push(kt(I.frameWidth, 7700));
|
|
15451
|
-
const
|
|
15452
|
-
R.push(fe(
|
|
15451
|
+
const Ve = pe(I, "totalPacketSendDelay");
|
|
15452
|
+
R.push(fe(Ve, 1 / (ee || 1), 2e3));
|
|
15453
15453
|
const ze = pe(I, "qpSum");
|
|
15454
15454
|
L.push(fe(ze, 1 / (I.framesPerSecond || 1), 51)), C.push(0);
|
|
15455
15455
|
}
|
|
@@ -15478,17 +15478,17 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15478
15478
|
ctm: Math.floor(s[0].timestamp || 0),
|
|
15479
15479
|
src: s[0].ssrc || "",
|
|
15480
15480
|
codec: s[0]._codec || ""
|
|
15481
|
-
}, o = [], u = [], h = [], p = [], d = [], f = [], m = [], l = [], x = [], v = [], S = [], b = [], E = [], _ = [], y = [], A = [], R = [], L = [], C = [], I = [], P = [], B = [], $ = [], q = [], X = [], ae = [], Q = [], te = [], ee = [], k = [], M = [],
|
|
15481
|
+
}, o = [], u = [], h = [], p = [], d = [], f = [], m = [], l = [], x = [], v = [], S = [], b = [], E = [], _ = [], y = [], A = [], R = [], L = [], C = [], I = [], P = [], B = [], $ = [], q = [], X = [], ae = [], Q = [], te = [], ee = [], k = [], M = [], F = [], N = [], J = [];
|
|
15482
15482
|
try {
|
|
15483
15483
|
s.forEach((j) => {
|
|
15484
15484
|
var tt, It;
|
|
15485
15485
|
if (!j || !j.timestamp)
|
|
15486
15486
|
return;
|
|
15487
|
-
const ce = (tt = j._last) != null && tt.timestamp ? j.timestamp - j._last.timestamp : 1e3, Z = pe(j, "bytesReceived"),
|
|
15487
|
+
const ce = (tt = j._last) != null && tt.timestamp ? j.timestamp - j._last.timestamp : 1e3, Z = pe(j, "bytesReceived"), Ve = pe(j, "headerBytesReceived"), ze = Ge(fe(Z + Ve, 8, 2e7), ce);
|
|
15488
15488
|
o.push(ze);
|
|
15489
15489
|
const Qe = Ge(fe(Z, 8, 2e7), ce);
|
|
15490
15490
|
u.push(Qe);
|
|
15491
|
-
const et = Ge(fe(
|
|
15491
|
+
const et = Ge(fe(Ve, 8, 2e7), ce);
|
|
15492
15492
|
h.push(et);
|
|
15493
15493
|
const Se = pe(j, "packetsReceived"), ke = Ge(Se, ce);
|
|
15494
15494
|
p.push(ke);
|
|
@@ -15515,7 +15515,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15515
15515
|
E.push(ct), R.push(0);
|
|
15516
15516
|
} else {
|
|
15517
15517
|
const gt = (It = j._last) != null && It.totalInterFrameDelay ? j.totalInterFrameDelay - j._last.totalInterFrameDelay : 0;
|
|
15518
|
-
L.push(fe(gt, 1e3 / (j.framesDecoded || 30), 500)), C.push(fe(j.framesPerSecond, 1, 100)), I.push(pe(j, "framesReceived")),
|
|
15518
|
+
L.push(fe(gt, 1e3 / (j.framesDecoded || 30), 500)), C.push(fe(j.framesPerSecond, 1, 100)), I.push(pe(j, "framesReceived")), F.push(pe(j, "framesRendered")), P.push(fe(j.frameHeight, 1, 4400)), B.push(fe(j.frameWidth, 1, 7700));
|
|
15519
15519
|
const it = pe(j, "totalProcessingDelay");
|
|
15520
15520
|
$.push(fe(it, 1e3 / (j.framesDecoded || 30), 12e4));
|
|
15521
15521
|
const ct = pe(j, "nackCount");
|
|
@@ -15533,7 +15533,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15533
15533
|
const Zt = pe(j, "jitterBufferMinimumDelay");
|
|
15534
15534
|
Zt && We ? M.push(fe(Zt, 1e3 / We, 3e4)) : M.push(0);
|
|
15535
15535
|
}
|
|
15536
|
-
}), c.rbr = o.join(","), c.mbrs = u.join(","), c.pbrs = h.join(","), c.pr = p.join(","), c.pl = d.join(","), c.plr = f.join(","), c.jd = m.join(","), c.fecr = b.join(","), c.retransr = l.join(","), c.baser = x.join(","), c.basel = v.join(","), c.recoverr = N.join(","), c.alll = v.join(","), c.totalc = S.join(","), n ? (c.er = E.join(","), c.aolevel = _.join(","), c.asrc = R.join(","), c.scnt = y.join(","), c.sdura = A.join(",")) : (c.dm = L.join(","), c.dfps = C.join(","), c.rfps = I.join(","), c.rh = P.join(","), c.rw = B.join(","), c.fpt = J.join(","), c.ns = X.join(","), c.pliss = q.join(","), c.aqp = ae.join(","), c.ofimax = N.join(","), c.ofimin = N.join(","), c.dfimax = N.join(","), c.dfimin = N.join(","), c.rfimax = N.join(","), c.rfimin = N.join(","), c.vrstutter = te.join(","), c.cdm = ee.join(","), c.tdm = k.join(","), c.pdm = M.join(","), c.ofps =
|
|
15536
|
+
}), c.rbr = o.join(","), c.mbrs = u.join(","), c.pbrs = h.join(","), c.pr = p.join(","), c.pl = d.join(","), c.plr = f.join(","), c.jd = m.join(","), c.fecr = b.join(","), c.retransr = l.join(","), c.baser = x.join(","), c.basel = v.join(","), c.recoverr = N.join(","), c.alll = v.join(","), c.totalc = S.join(","), n ? (c.er = E.join(","), c.aolevel = _.join(","), c.asrc = R.join(","), c.scnt = y.join(","), c.sdura = A.join(",")) : (c.dm = L.join(","), c.dfps = C.join(","), c.rfps = I.join(","), c.rh = P.join(","), c.rw = B.join(","), c.fpt = J.join(","), c.ns = X.join(","), c.pliss = q.join(","), c.aqp = ae.join(","), c.ofimax = N.join(","), c.ofimin = N.join(","), c.dfimax = N.join(","), c.dfimin = N.join(","), c.rfimax = N.join(","), c.rfimin = N.join(","), c.vrstutter = te.join(","), c.cdm = ee.join(","), c.tdm = k.join(","), c.pdm = M.join(","), c.ofps = F.join(","), c.dfbd = Q.join(","));
|
|
15537
15537
|
} catch (j) {
|
|
15538
15538
|
}
|
|
15539
15539
|
this.log({
|
|
@@ -16239,21 +16239,21 @@ const z = (K = class extends De {
|
|
|
16239
16239
|
var e, t, i, s, n, c, o, u, h, p;
|
|
16240
16240
|
(e = this.publisher) == null || e.on(Me.Local, (d) => {
|
|
16241
16241
|
O.event("[Publisher] Device Status Change", d), this.onLocalDeviceStatusChange(d);
|
|
16242
|
-
}), (t = this.publisher) == null || t.on(
|
|
16242
|
+
}), (t = this.publisher) == null || t.on(Ft.VideoTrackEnded, () => {
|
|
16243
16243
|
O.event("[Publisher] VideoTrack Ended"), this.emit(
|
|
16244
16244
|
"localDeviceException",
|
|
16245
16245
|
dt.AliEngineLocalDeviceTypeCamera,
|
|
16246
16246
|
_e.AliEngineLocalDeviceExceptionTypeCameraInterrupt,
|
|
16247
16247
|
""
|
|
16248
16248
|
);
|
|
16249
|
-
}), (i = this.publisher) == null || i.on(
|
|
16249
|
+
}), (i = this.publisher) == null || i.on(Ft.ScreenTrackEnded, () => {
|
|
16250
16250
|
O.event("[Publisher] ScreenTrack Ended"), this.emit(
|
|
16251
16251
|
"localDeviceException",
|
|
16252
16252
|
dt.AliEngineLocalDeviceTypeDisplay,
|
|
16253
16253
|
_e.AliEngineLocalDeviceExceptionTypeDisplayException,
|
|
16254
16254
|
""
|
|
16255
16255
|
);
|
|
16256
|
-
}), (s = this.publisher) == null || s.on(
|
|
16256
|
+
}), (s = this.publisher) == null || s.on(Ft.AudioTrackEnded, () => {
|
|
16257
16257
|
O.event("[Publisher] AudioTrack Ended"), this.emit(
|
|
16258
16258
|
"localDeviceException",
|
|
16259
16259
|
dt.AliEngineLocalDeviceTypeMic,
|
|
@@ -16497,7 +16497,7 @@ const z = (K = class extends De {
|
|
|
16497
16497
|
return w(this, null, function* () {
|
|
16498
16498
|
const t = this.bizControl.getRemoteUser(e);
|
|
16499
16499
|
if (!t)
|
|
16500
|
-
throw new
|
|
16500
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16501
16501
|
t.restore(), t.updateSubscribe(de.Retry);
|
|
16502
16502
|
});
|
|
16503
16503
|
}
|
|
@@ -16530,7 +16530,7 @@ const z = (K = class extends De {
|
|
|
16530
16530
|
// @ts-ignore
|
|
16531
16531
|
hadPushStream(e) {
|
|
16532
16532
|
if (!(this.publisher && e))
|
|
16533
|
-
throw new
|
|
16533
|
+
throw new V(U.ERR_INNER, "stream is not publishing");
|
|
16534
16534
|
}
|
|
16535
16535
|
/**
|
|
16536
16536
|
* 获取当前使用的麦克风 deviceId
|
|
@@ -16546,7 +16546,7 @@ const z = (K = class extends De {
|
|
|
16546
16546
|
ue.AliRtcConnectionStatusDisconnected,
|
|
16547
16547
|
ue.AliRtcConnectionStatusFailed
|
|
16548
16548
|
].includes(this.connectState))
|
|
16549
|
-
throw new
|
|
16549
|
+
throw new V(U.ERR_INNER, "cannot set channel profile in call");
|
|
16550
16550
|
this.channelProfile = e, this.channelProfile === bt.AliRtcSdkCommunication && (this.clientRole = Bt.AliRtcSdkLive), this.signalingManager.setChannelProfile(e);
|
|
16551
16551
|
}
|
|
16552
16552
|
startAndPublishDefaultDevices(e) {
|
|
@@ -16559,8 +16559,8 @@ const z = (K = class extends De {
|
|
|
16559
16559
|
try {
|
|
16560
16560
|
yield (c = this.publisher) == null ? void 0 : c.startDefaultCamera(this._audioOnlyMode);
|
|
16561
16561
|
} catch (d) {
|
|
16562
|
-
O.warn(`[${K.logName}]`, "startDefaultCamera failed", d.code, d.message), d instanceof
|
|
16563
|
-
new
|
|
16562
|
+
O.warn(`[${K.logName}]`, "startDefaultCamera failed", d.code, d.message), d instanceof V && this.occurError(d), this.occurError(
|
|
16563
|
+
new V(
|
|
16564
16564
|
U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED,
|
|
16565
16565
|
`auto start video failed, ${d.message || ""}`
|
|
16566
16566
|
)
|
|
@@ -16569,8 +16569,8 @@ const z = (K = class extends De {
|
|
|
16569
16569
|
try {
|
|
16570
16570
|
yield (o = this.publisher) == null ? void 0 : o.startDefaultAudio();
|
|
16571
16571
|
} catch (d) {
|
|
16572
|
-
O.warn(`[${K.logName}]`, "startDefaultAUdio failed", d.code, d.message), d instanceof
|
|
16573
|
-
new
|
|
16572
|
+
O.warn(`[${K.logName}]`, "startDefaultAUdio failed", d.code, d.message), d instanceof V && this.occurError(d), this.occurError(
|
|
16573
|
+
new V(
|
|
16574
16574
|
U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED,
|
|
16575
16575
|
`auto start audio failed, ${d.message || ""}`
|
|
16576
16576
|
)
|
|
@@ -16585,7 +16585,7 @@ const z = (K = class extends De {
|
|
|
16585
16585
|
} catch (d) {
|
|
16586
16586
|
const f = [];
|
|
16587
16587
|
n != null && n.audio && f.push(U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), n != null && n.video && f.push(U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), f.forEach((m) => {
|
|
16588
|
-
this.occurError(new
|
|
16588
|
+
this.occurError(new V(m, `auto publish stream failed, ${d.message || ""}`));
|
|
16589
16589
|
});
|
|
16590
16590
|
}
|
|
16591
16591
|
});
|
|
@@ -16597,7 +16597,7 @@ const z = (K = class extends De {
|
|
|
16597
16597
|
if (this.channelProfile === bt.AliRtcSdkCommunication)
|
|
16598
16598
|
return;
|
|
16599
16599
|
if (!Object.values(Bt).includes(e))
|
|
16600
|
-
throw new
|
|
16600
|
+
throw new V(
|
|
16601
16601
|
U.ERR_INVALID_ARGUMENTS,
|
|
16602
16602
|
`set client role error, role value(${e}) is invalid`
|
|
16603
16603
|
);
|
|
@@ -16618,12 +16618,12 @@ const z = (K = class extends De {
|
|
|
16618
16618
|
}
|
|
16619
16619
|
setAudioOnlyMode(e) {
|
|
16620
16620
|
if (this.isInCall())
|
|
16621
|
-
throw new
|
|
16621
|
+
throw new V(U.ERR_INNER, "can not change audioOnly mode in call");
|
|
16622
16622
|
this._audioOnlyMode = e;
|
|
16623
16623
|
}
|
|
16624
16624
|
setAudioRedEnabled(e) {
|
|
16625
16625
|
if (this.isInCall())
|
|
16626
|
-
throw new
|
|
16626
|
+
throw new V(U.ERR_INNER, "can not change audioRedEnabled in call");
|
|
16627
16627
|
this.bizControl.setAudioRedEnabled(e);
|
|
16628
16628
|
}
|
|
16629
16629
|
/**
|
|
@@ -16659,7 +16659,7 @@ const z = (K = class extends De {
|
|
|
16659
16659
|
token: p.token
|
|
16660
16660
|
};
|
|
16661
16661
|
} catch (p) {
|
|
16662
|
-
throw new
|
|
16662
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${p.message || ""}`);
|
|
16663
16663
|
}
|
|
16664
16664
|
else
|
|
16665
16665
|
s = e;
|
|
@@ -16700,13 +16700,13 @@ const z = (K = class extends De {
|
|
|
16700
16700
|
), this.slsReporter.reportConnectionLatencyEvent(Je.JOIN, Xe.END, "", "");
|
|
16701
16701
|
} catch (p) {
|
|
16702
16702
|
const d = (h = p.code) != null ? h : -1, f = p.reason || p.message || "";
|
|
16703
|
-
throw this.connectState = ue.AliRtcConnectionStatusDisconnected, this.slsReporter.reportJoin(d, c, ""), this.slsReporter.reportJoinResult(p), new
|
|
16703
|
+
throw this.connectState = ue.AliRtcConnectionStatusDisconnected, this.slsReporter.reportJoin(d, c, ""), this.slsReporter.reportJoinResult(p), new V(d, f);
|
|
16704
16704
|
}
|
|
16705
16705
|
this.currentRoleCanPublish && (yield this.startAndPublishDefaultDevices(nt.JOIN_CHANNEL)), this.remoteUsers.forEach((p) => {
|
|
16706
16706
|
p.updateSubscribe(de.Join);
|
|
16707
16707
|
});
|
|
16708
16708
|
} else {
|
|
16709
|
-
const p = new
|
|
16709
|
+
const p = new V(U.ERR_JOIN_ALREADY_JOINED, "already joined");
|
|
16710
16710
|
throw this.connectState === ue.AliRtcConnectionStatusConnecting && (p.message = "Repeated operation during login"), this.slsReporter.reportJoin(p.code, c, ""), p;
|
|
16711
16711
|
}
|
|
16712
16712
|
});
|
|
@@ -16754,7 +16754,7 @@ const z = (K = class extends De {
|
|
|
16754
16754
|
token: h.token
|
|
16755
16755
|
};
|
|
16756
16756
|
} catch (h) {
|
|
16757
|
-
throw new
|
|
16757
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${h.message || ""}`);
|
|
16758
16758
|
}
|
|
16759
16759
|
else
|
|
16760
16760
|
t = e;
|
|
@@ -16803,7 +16803,7 @@ const z = (K = class extends De {
|
|
|
16803
16803
|
}
|
|
16804
16804
|
subscribeRemoteAudioStream(e, t) {
|
|
16805
16805
|
if (t && !this.bizControl.isWantSubAudio)
|
|
16806
|
-
throw new
|
|
16806
|
+
throw new V(
|
|
16807
16807
|
U.ERR_INVALID_ARGUMENTS,
|
|
16808
16808
|
"subscribeAllRemoteAudioStreams(true) must be called first"
|
|
16809
16809
|
);
|
|
@@ -16812,13 +16812,13 @@ const z = (K = class extends De {
|
|
|
16812
16812
|
resumeRemoteAudioStream(e) {
|
|
16813
16813
|
const t = this.bizControl.getRemoteUser(e);
|
|
16814
16814
|
if (!t)
|
|
16815
|
-
throw new
|
|
16815
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16816
16816
|
t.resumeAudio();
|
|
16817
16817
|
}
|
|
16818
16818
|
stopRemoteAudioPlay(e) {
|
|
16819
16819
|
const t = this.bizControl.getRemoteUser(e);
|
|
16820
16820
|
if (!t)
|
|
16821
|
-
throw new
|
|
16821
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16822
16822
|
t.stopPlayAudio();
|
|
16823
16823
|
}
|
|
16824
16824
|
publishLocalVideoStream(e) {
|
|
@@ -16853,7 +16853,7 @@ const z = (K = class extends De {
|
|
|
16853
16853
|
subscribeRemoteMediaStream(e, t, i, s) {
|
|
16854
16854
|
const n = this.bizControl.getRemoteUser(e);
|
|
16855
16855
|
if (!n)
|
|
16856
|
-
throw new
|
|
16856
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16857
16857
|
i && (t === se.AliRtcVideoTrackScreen || t === se.AliRtcVideoTrackBoth) ? n.setWantSubScreen(!0) : n.setWantSubScreen(!1), i && (t === se.AliRtcVideoTrackCamera || t === se.AliRtcVideoTrackBoth) ? n.setWantSubVideo(!0) : n.setWantSubVideo(!1), n.setWantSubAudio(s), n.updateSubscribe(de.User);
|
|
16858
16858
|
}
|
|
16859
16859
|
resumeRemoteMediaStream(e, t) {
|
|
@@ -16968,7 +16968,7 @@ const z = (K = class extends De {
|
|
|
16968
16968
|
}
|
|
16969
16969
|
setAudioShareVolume(e) {
|
|
16970
16970
|
if (typeof e != "number")
|
|
16971
|
-
throw new
|
|
16971
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
16972
16972
|
this.bizControl.setAudioVolume({
|
|
16973
16973
|
screen: Math.max(0, Math.min(e, 400)) / 100
|
|
16974
16974
|
});
|
|
@@ -16983,7 +16983,7 @@ const z = (K = class extends De {
|
|
|
16983
16983
|
muteRemoteAudioPlaying(e, t = !1) {
|
|
16984
16984
|
const i = this.bizControl.getRemoteUser(e);
|
|
16985
16985
|
if (!i)
|
|
16986
|
-
throw new
|
|
16986
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16987
16987
|
i.setAudioMuted(t);
|
|
16988
16988
|
}
|
|
16989
16989
|
muteAllRemoteAudioPlaying(e = !1) {
|
|
@@ -17029,22 +17029,22 @@ const z = (K = class extends De {
|
|
|
17029
17029
|
}
|
|
17030
17030
|
setRecordingVolume(e) {
|
|
17031
17031
|
if (typeof e != "number")
|
|
17032
|
-
throw new
|
|
17032
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
17033
17033
|
this.bizControl.setAudioVolume({
|
|
17034
17034
|
audio: Math.max(0, Math.min(e, 400)) / 100
|
|
17035
17035
|
});
|
|
17036
17036
|
}
|
|
17037
17037
|
setPlayoutVolume(e) {
|
|
17038
17038
|
if (typeof e != "number")
|
|
17039
|
-
throw new
|
|
17039
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
17040
17040
|
this.bizControl.setPlayoutVolume(Math.max(0, Math.min(e, 100)) / 100);
|
|
17041
17041
|
}
|
|
17042
17042
|
setRemoteAudioVolume(e, t) {
|
|
17043
17043
|
const i = this.bizControl.getRemoteUser(e);
|
|
17044
17044
|
if (!i)
|
|
17045
|
-
throw new
|
|
17045
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
17046
17046
|
if (typeof t != "number")
|
|
17047
|
-
throw new
|
|
17047
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
17048
17048
|
i.setPlayoutVolume(Math.max(0, Math.min(t, 100)) / 100);
|
|
17049
17049
|
}
|
|
17050
17050
|
setAudioProfile(e) {
|
|
@@ -17066,15 +17066,15 @@ const z = (K = class extends De {
|
|
|
17066
17066
|
return w(this, null, function* () {
|
|
17067
17067
|
var i, s, n;
|
|
17068
17068
|
if (this._audioOnlyMode)
|
|
17069
|
-
throw new
|
|
17069
|
+
throw new V(U.ERR_INNER, "Cannot set local view in audio only mode");
|
|
17070
17070
|
(i = this.bizControl) == null || i.setLocalViewConfig(e, t), t === se.AliRtcVideoTrackCamera && ((s = this.publisher) != null && s.hasCamera) ? yield this.startPreview() : t === se.AliRtcVideoTrackScreen && ((n = this.publisher) != null && n.hasScreenShare) && (yield this.startPreviewScreen());
|
|
17071
17071
|
});
|
|
17072
17072
|
}
|
|
17073
17073
|
setCameraCapturerConfiguration(e) {
|
|
17074
17074
|
return w(this, null, function* () {
|
|
17075
|
-
var
|
|
17076
|
-
const
|
|
17077
|
-
s && (
|
|
17075
|
+
var h, p, d;
|
|
17076
|
+
const u = e, { cameraDirection: t, deviceId: i, bitrate: s, maxSendFrameRate: n } = u, c = wt(u, ["cameraDirection", "deviceId", "bitrate", "maxSendFrameRate"]), o = G({}, c);
|
|
17077
|
+
s && (o.maxBitrate = s), n && (o.maxSendFrameRate = n), Object.keys(o).length > 0 && (yield (h = this.publisher) == null ? void 0 : h.setVideoProfile(o)), t !== void 0 && ((p = this.publisher) == null || p.setCameraDirection(t)), i && ((d = this.publisher) == null || d.setCameraDeviceId(i));
|
|
17078
17078
|
});
|
|
17079
17079
|
}
|
|
17080
17080
|
setCameraCapturerContentHint(e) {
|
|
@@ -17087,7 +17087,7 @@ const z = (K = class extends De {
|
|
|
17087
17087
|
return w(this, null, function* () {
|
|
17088
17088
|
var t, i, s, n, c, o, u, h, p, d, f;
|
|
17089
17089
|
if (this._audioOnlyMode)
|
|
17090
|
-
throw new
|
|
17090
|
+
throw new V(U.ERR_INNER, "Cannot enable local video in audio only mode");
|
|
17091
17091
|
e ? ((i = (t = this.publisher) == null ? void 0 : t.publishStreams) != null && i.video && ((c = (n = (s = this.publisher) == null ? void 0 : s.publishStreams) == null ? void 0 : n.video) == null || c.disableVideo(), (p = (h = (u = (o = this.publisher) == null ? void 0 : o.publishStreams) == null ? void 0 : u.video) == null ? void 0 : h.videoTrack) == null || p.stop()), yield (d = this.publisher) == null ? void 0 : d.startCameraCapture()) : yield (f = this.publisher) == null ? void 0 : f.stopCameraCapture();
|
|
17092
17092
|
});
|
|
17093
17093
|
}
|
|
@@ -17121,7 +17121,7 @@ const z = (K = class extends De {
|
|
|
17121
17121
|
return w(this, null, function* () {
|
|
17122
17122
|
var s, n, c, o, u, h;
|
|
17123
17123
|
if (this._audioOnlyMode)
|
|
17124
|
-
throw new
|
|
17124
|
+
throw new V(U.ERR_INNER, "Cannot switch camera in audio only mode");
|
|
17125
17125
|
const i = {};
|
|
17126
17126
|
if (e ? (i.deviceId = e, this.slsReporter.reportSwitchCamera(e)) : t || (i.cameraDirection = ((s = this.publisher) == null ? void 0 : s.cameraDirection) === "environment" ? oi.CAMERA_FRONT : oi.CAMERA_REAR, this.slsReporter.reportSwitchCamera(((n = this.publisher) == null ? void 0 : n.cameraDirection) || "")), yield this.setCameraCapturerConfiguration(i), !((c = this.publisher) != null && c.cameraCaptureDisabled)) {
|
|
17127
17127
|
(u = (o = this.publisher) == null ? void 0 : o.cameraTrack) == null || u.stop();
|
|
@@ -17144,7 +17144,7 @@ const z = (K = class extends De {
|
|
|
17144
17144
|
return w(this, null, function* () {
|
|
17145
17145
|
var e, t;
|
|
17146
17146
|
if (this._audioOnlyMode)
|
|
17147
|
-
throw new
|
|
17147
|
+
throw new V(U.ERR_INNER, "Cannot start preview camera in audio only mode");
|
|
17148
17148
|
(e = this.publisher) != null && e.hasCamera || (yield this.enableLocalVideo(!0)), yield (t = this.publisher) == null ? void 0 : t.previewAll({
|
|
17149
17149
|
screen: !1
|
|
17150
17150
|
});
|
|
@@ -17154,7 +17154,7 @@ const z = (K = class extends De {
|
|
|
17154
17154
|
return w(this, null, function* () {
|
|
17155
17155
|
var t, i;
|
|
17156
17156
|
if (this._audioOnlyMode)
|
|
17157
|
-
throw new
|
|
17157
|
+
throw new V(U.ERR_INNER, "Cannot start preview screen share in audio only mode");
|
|
17158
17158
|
(t = this.publisher) != null && t.hasScreenShare || (yield this.startScreenShare(e)), yield (i = this.publisher) == null ? void 0 : i.previewAll({
|
|
17159
17159
|
primary: !1
|
|
17160
17160
|
});
|
|
@@ -17247,7 +17247,7 @@ const z = (K = class extends De {
|
|
|
17247
17247
|
return w(this, null, function* () {
|
|
17248
17248
|
var s;
|
|
17249
17249
|
if (!this.publisher || !this.isPublishing)
|
|
17250
|
-
throw new
|
|
17250
|
+
throw new V(U.ERR_INNER, "you should publish first");
|
|
17251
17251
|
return this.slsReporter.reportSEIMessage(i, e.byteLength, t, 0, !1), (s = this.publisher) == null ? void 0 : s.sendSEI(e, t, i);
|
|
17252
17252
|
});
|
|
17253
17253
|
}
|
|
@@ -17283,7 +17283,7 @@ const z = (K = class extends De {
|
|
|
17283
17283
|
isBeautyEnabled() {
|
|
17284
17284
|
const e = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
17285
17285
|
if (!e)
|
|
17286
|
-
throw new
|
|
17286
|
+
throw new V(
|
|
17287
17287
|
_t.AliRtcPluginErrorNoFindPlugin,
|
|
17288
17288
|
"you should enable beautyPlugin first"
|
|
17289
17289
|
);
|
|
@@ -17292,7 +17292,7 @@ const z = (K = class extends De {
|
|
|
17292
17292
|
setBeautyEffect(e, t) {
|
|
17293
17293
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
17294
17294
|
if (!i)
|
|
17295
|
-
throw new
|
|
17295
|
+
throw new V(
|
|
17296
17296
|
_t.AliRtcPluginErrorNoFindPlugin,
|
|
17297
17297
|
"you should enable beautyPlugin first"
|
|
17298
17298
|
);
|
|
@@ -17306,7 +17306,7 @@ const z = (K = class extends De {
|
|
|
17306
17306
|
enableBackgroundExchange(e, t) {
|
|
17307
17307
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
17308
17308
|
if (!i || !i.isEnable)
|
|
17309
|
-
throw new
|
|
17309
|
+
throw new V(
|
|
17310
17310
|
_t.AliRtcPluginErrorNoFindPlugin,
|
|
17311
17311
|
"you should enable beautyPlugin first"
|
|
17312
17312
|
);
|
|
@@ -17322,7 +17322,7 @@ const z = (K = class extends De {
|
|
|
17322
17322
|
enableBackgroundBlur(e) {
|
|
17323
17323
|
const t = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
17324
17324
|
if (!t || !t.isEnable)
|
|
17325
|
-
throw new
|
|
17325
|
+
throw new V(
|
|
17326
17326
|
_t.AliRtcPluginErrorNoFindPlugin,
|
|
17327
17327
|
"you should enable beautyPlugin first"
|
|
17328
17328
|
);
|
|
@@ -17371,7 +17371,7 @@ g(K, "getCameraList", () => w(K, null, function* () {
|
|
|
17371
17371
|
return (yield le.getMicList()).filter((t) => t.deviceId);
|
|
17372
17372
|
})), g(K, "getSpeakerList", () => w(K, null, function* () {
|
|
17373
17373
|
return (yield le.getSpeakerList()).filter((t) => t.deviceId);
|
|
17374
|
-
})), g(K, "_instance"), g(K, "AliRtcSdkChannelProfile", bt), g(K, "AliRtcSdkClientRole", Bt), g(K, "AliRtcVideoStreamType", we), g(K, "AliRtcVideoTrack", se), g(K, "AliRtcAudioTrack", Xt), g(K, "AliRtcPublishState", Y), g(K, "AliRtcSubscribeState", he), g(K, "AliRtcRawDataStreamType", be), g(K, "AliRtcLogLevel", fn), g(K, "AliRtcEngineLocalDeviceType", dt), g(K, "AliRtcEngineLocalDeviceExceptionType", _e), g(K, "AliRtcConnectionStatus", ue), g(K, "AliRtcConnectionStatusChangeReason", Wt), g(K, "AliRtcPlugin", Gt), g(K, "AliRtcPluginTrackType", Ri), g(K, "AliRtcLiveTranscodingParam",
|
|
17374
|
+
})), g(K, "_instance"), g(K, "AliRtcSdkChannelProfile", bt), g(K, "AliRtcSdkClientRole", Bt), g(K, "AliRtcVideoStreamType", we), g(K, "AliRtcVideoTrack", se), g(K, "AliRtcAudioTrack", Xt), g(K, "AliRtcPublishState", Y), g(K, "AliRtcSubscribeState", he), g(K, "AliRtcRawDataStreamType", be), g(K, "AliRtcLogLevel", fn), g(K, "AliRtcEngineLocalDeviceType", dt), g(K, "AliRtcEngineLocalDeviceExceptionType", _e), g(K, "AliRtcConnectionStatus", ue), g(K, "AliRtcConnectionStatusChangeReason", Wt), g(K, "AliRtcPlugin", Gt), g(K, "AliRtcPluginTrackType", Ri), g(K, "AliRtcLiveTranscodingParam", Fr), g(K, "AliRtcLiveTranscodingEncodeParam", vn), g(K, "AliRtcLiveTranscodingMixParam", Hc), g(K, "AliRtcLiveTranscodingSingleParam", jc), g(K, "AliRtcTranscodingClockWidget", zc), g(K, "AliRtcTranscodingImage", In), g(K, "AliRtcTranscodingText", Wc), g(K, "AliRtcTranscodingUser", $c), g(K, "AliRtcLiveTranscodingMixMode", bi), g(K, "AliRtcLiveTranscodingStreamType", pn), g(K, "AliRtcLiveTranscodingSourceType", ni), g(K, "AliRtcLiveTranscodingTaskProfile", gn), g(K, "AliRtcLiveTranscodingAudioSampleRate", ts), g(K, "AliRtcLiveTranscodingSegmentType", Ei), g(K, "AliRtcLiveTranscodingFontType", Ii), g(K, "AliRtcLiveTranscodingCropMode", mn), g(K, "AliRtcLiveTranscodingMediaProcessMode", is), g(K, "AliRtcLiveTranscodingState", xn), g(K, "AliRtcLiveTranscodingErrorCode", ht), g(K, "AliRtcTrascodingPublishTaskStatus", Sn), g(K, "AliRtcDataChannelMsg", qt), g(K, "AliRtcDataMsgType", An), g(K, "Plugin", Gt), K);
|
|
17375
17375
|
W([
|
|
17376
17376
|
D()
|
|
17377
17377
|
], z.prototype, "destroy", 1);
|
|
@@ -17626,7 +17626,7 @@ export {
|
|
|
17626
17626
|
is as AliRtcLiveTranscodingMediaProcessMode,
|
|
17627
17627
|
bi as AliRtcLiveTranscodingMixMode,
|
|
17628
17628
|
Hc as AliRtcLiveTranscodingMixParam,
|
|
17629
|
-
|
|
17629
|
+
Fr as AliRtcLiveTranscodingParam,
|
|
17630
17630
|
Ei as AliRtcLiveTranscodingSegmentType,
|
|
17631
17631
|
jc as AliRtcLiveTranscodingSingleParam,
|
|
17632
17632
|
ni as AliRtcLiveTranscodingSourceType,
|