aliyun-rtc-sdk 6.13.6-beta.0 → 6.13.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aliyun-rtc-sdk.es.js +520 -516
- package/dist/aliyun-rtc-sdk.umd.js +8 -8
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ var w = (r, n, e) => new Promise((t, i) => {
|
|
|
39
39
|
import { AliRTS as oe, EConnectStatus as ps, EDatachannelStatus as gs } from "aliyun-rts-sdk";
|
|
40
40
|
import we from "eventemitter3";
|
|
41
41
|
var jn = Object.defineProperty, zn = (r, n, e) => n in r ? jn(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e, Vt = (r, n, e) => (zn(r, typeof n != "symbol" ? n + "" : n, e), e), ki = { exports: {} }, Bi = { exports: {} }, Mi, ms;
|
|
42
|
-
function
|
|
42
|
+
function Fe() {
|
|
43
43
|
if (ms)
|
|
44
44
|
return Mi;
|
|
45
45
|
ms = 1, Date.now = Date.now || function() {
|
|
@@ -486,7 +486,7 @@ function Wn() {
|
|
|
486
486
|
if (xs)
|
|
487
487
|
return Fi;
|
|
488
488
|
xs = 1;
|
|
489
|
-
var r =
|
|
489
|
+
var r = Fe();
|
|
490
490
|
return Fi = function(n, e, t) {
|
|
491
491
|
typeof n == "object" && (n = r.serialize(n));
|
|
492
492
|
var i = e + n + (t ? "&post_res=" : "");
|
|
@@ -498,7 +498,7 @@ function $n() {
|
|
|
498
498
|
if (Ss)
|
|
499
499
|
return Ni.exports;
|
|
500
500
|
Ss = 1;
|
|
501
|
-
var r =
|
|
501
|
+
var r = Fe(), n = Wn(), e = "aokcdqn3ly@e629dabd48a9933", t = function(s, a) {
|
|
502
502
|
var c;
|
|
503
503
|
if (a.t === "error" && (c = s.requestQueue[0]) && c.t === "error" && a.msg === c.msg)
|
|
504
504
|
return a.times = c.times + 1, void (s.requestQueue[0] = a);
|
|
@@ -733,7 +733,7 @@ function Kn() {
|
|
|
733
733
|
if (vs)
|
|
734
734
|
return Li.exports;
|
|
735
735
|
vs = 1;
|
|
736
|
-
var r =
|
|
736
|
+
var r = Fe(), n = $n(), 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 a = (s.key || "default").split("::");
|
|
738
738
|
return a.length > 1 ? r.ext(s, {
|
|
739
739
|
group: a[0],
|
|
@@ -925,7 +925,7 @@ function qn() {
|
|
|
925
925
|
if (bs)
|
|
926
926
|
return Vi.exports;
|
|
927
927
|
bs = 1;
|
|
928
|
-
var r =
|
|
928
|
+
var r = Fe(), n = typeof window == "object" ? window : {}, e = "catch", t = n.__oFetch_ || n.fetch;
|
|
929
929
|
return t = typeof t == "function" ? t : void 0, Vi.exports = function(i, s) {
|
|
930
930
|
var a = -1;
|
|
931
931
|
typeof i == "object" && (a = i.z, i = r.serialize(i));
|
|
@@ -948,7 +948,7 @@ function Jn() {
|
|
|
948
948
|
if (ys)
|
|
949
949
|
return Oi.exports;
|
|
950
950
|
ys = 1;
|
|
951
|
-
var r =
|
|
951
|
+
var r = Fe(), n = typeof window == "object" ? window : {}, e = n.__oXMLHttpRequest_ || n.XMLHttpRequest;
|
|
952
952
|
return e = typeof e == "function" ? e : void 0, Oi.exports = function(t, i) {
|
|
953
953
|
try {
|
|
954
954
|
var s = new e();
|
|
@@ -964,7 +964,7 @@ function Gn() {
|
|
|
964
964
|
if (Es)
|
|
965
965
|
return Ui;
|
|
966
966
|
Es = 1;
|
|
967
|
-
var r =
|
|
967
|
+
var r = Fe();
|
|
968
968
|
return Ui = function(n, e) {
|
|
969
969
|
var t = [], i = null, s = e && e.location && e.location.href, a = void 0, c = null, o = function(d, f, g) {
|
|
970
970
|
if (d !== null) {
|
|
@@ -1148,7 +1148,7 @@ function Xn() {
|
|
|
1148
1148
|
if (Cs)
|
|
1149
1149
|
return Hi;
|
|
1150
1150
|
Cs = 1;
|
|
1151
|
-
var r =
|
|
1151
|
+
var r = Fe(), n = Ur(), e = n.TIMING_KEYS;
|
|
1152
1152
|
return Hi = 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 Yn() {
|
|
|
1175
1175
|
if (Is)
|
|
1176
1176
|
return ji;
|
|
1177
1177
|
Is = 1;
|
|
1178
|
-
var r =
|
|
1178
|
+
var r = Fe(), n = Ur(), e = n.TIMING_KEYS;
|
|
1179
1179
|
return ji = function() {
|
|
1180
1180
|
var t = r.win || {}, i = t.performance;
|
|
1181
1181
|
if (!i || typeof i != "object")
|
|
@@ -1218,7 +1218,7 @@ function Yn() {
|
|
|
1218
1218
|
var Rs, ws;
|
|
1219
1219
|
function Zn() {
|
|
1220
1220
|
return ws || (ws = 1, Rs = function(r, n, e) {
|
|
1221
|
-
var t =
|
|
1221
|
+
var t = Fe(), i = Xn(), s = Yn(), a = null, c = e.documentElement, o = n.innerWidth || c.clientWidth || e.body.clientWidth, u = n.innerHeight || c.clientHeight || e.body.clientHeight, h = n.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 Qn() {
|
|
|
1392
1392
|
if (Ds)
|
|
1393
1393
|
return zi;
|
|
1394
1394
|
Ds = 1;
|
|
1395
|
-
var r =
|
|
1395
|
+
var r = Fe(), n = 500;
|
|
1396
1396
|
return zi = function(e, t, i) {
|
|
1397
1397
|
function s(p, d, f) {
|
|
1398
1398
|
var g = 0, l = p.tagName;
|
|
@@ -1477,7 +1477,7 @@ function Qn() {
|
|
|
1477
1477
|
var Ts, Ps;
|
|
1478
1478
|
function eo() {
|
|
1479
1479
|
return Ps || (Ps = 1, Ts = function(r, n) {
|
|
1480
|
-
var e =
|
|
1480
|
+
var e = Fe(), t = null, i = e.getCurDomain(), s = function(h, p, d, f, g, l, S, v, x, b, y, E, I) {
|
|
1481
1481
|
var A = e.J(g) || null, C = e.safetyCall(p, [A, f], null);
|
|
1482
1482
|
if (!C)
|
|
1483
1483
|
return !1;
|
|
@@ -1577,24 +1577,24 @@ function eo() {
|
|
|
1577
1577
|
if (X && !/(text)|(json)/.test(X))
|
|
1578
1578
|
return J;
|
|
1579
1579
|
if (!C) {
|
|
1580
|
-
var
|
|
1581
|
-
typeof
|
|
1580
|
+
var Ve = e.parseFetchHeaders(ue);
|
|
1581
|
+
typeof Ve == "object" && Ve["eagleeye-traceid"] && (C = Ve["eagleeye-traceid"], R = "response");
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1585
|
-
return j.text().then(function(
|
|
1584
|
+
var ze = x();
|
|
1585
|
+
return j.text().then(function(Ye) {
|
|
1586
1586
|
if (!C && e.isFunction(I)) {
|
|
1587
|
-
var
|
|
1588
|
-
|
|
1587
|
+
var Ze = I(j, Ye);
|
|
1588
|
+
Ze && e.isString(Ze) && (C = Ze);
|
|
1589
1589
|
}
|
|
1590
|
-
var Se = e.getFetchSnapshot(g,
|
|
1591
|
-
j.ok ? s(l, v.parseResponse, b, y,
|
|
1590
|
+
var Se = e.getFetchSnapshot(g, Ye, ue);
|
|
1591
|
+
j.ok ? s(l, v.parseResponse, b, y, Ye, j.status || 200, ze, S, C, L, Se, R, $) : (l.api(b, !1, ze, j.status || 404, j.statusText, S, C, L, Se, i, R, $), v.enableResource && t.fixResourceStatus && t.fixResourceStatus({
|
|
1592
1592
|
src: j.url,
|
|
1593
1593
|
res_type: "api"
|
|
1594
1594
|
}));
|
|
1595
1595
|
}), J;
|
|
1596
|
-
} catch (
|
|
1597
|
-
return e.warn("[ARMS] fetch response error :",
|
|
1596
|
+
} catch (Ye) {
|
|
1597
|
+
return e.warn("[ARMS] fetch response error :", Ye), J;
|
|
1598
1598
|
}
|
|
1599
1599
|
}).catch(function(J) {
|
|
1600
1600
|
if (!l || !l.api)
|
|
@@ -1690,7 +1690,7 @@ function eo() {
|
|
|
1690
1690
|
var ks, Bs;
|
|
1691
1691
|
function to() {
|
|
1692
1692
|
return Bs || (Bs = 1, ks = function(r, n) {
|
|
1693
|
-
var e =
|
|
1693
|
+
var e = Fe(), t = n.history || {}, i = n.document, s = function(c, o) {
|
|
1694
1694
|
var u;
|
|
1695
1695
|
n.CustomEvent ? u = new CustomEvent(c, {
|
|
1696
1696
|
detail: o
|
|
@@ -1722,7 +1722,7 @@ function io() {
|
|
|
1722
1722
|
if (Ms)
|
|
1723
1723
|
return Wi;
|
|
1724
1724
|
Ms = 1;
|
|
1725
|
-
var r =
|
|
1725
|
+
var r = Fe(), n = Ur(), e = n.TIMING_KEYS;
|
|
1726
1726
|
return Wi = function(t, i) {
|
|
1727
1727
|
function s(o, u, h) {
|
|
1728
1728
|
if (o instanceof i.PerformanceResourceTiming && o.initiatorType) {
|
|
@@ -1844,7 +1844,7 @@ function ro() {
|
|
|
1844
1844
|
if (Ls)
|
|
1845
1845
|
return Bi.exports;
|
|
1846
1846
|
Ls = 1;
|
|
1847
|
-
var r =
|
|
1847
|
+
var r = Fe(), n = Kn(), e = qn(), t = Jn(), i = r.win, s = i.document, a = /^(error|api|speed|sum|avg|percent|custom|msg|setPage|setConfig|behavior|performance)$/, c = function(o) {
|
|
1848
1848
|
var u = this;
|
|
1849
1849
|
return n.call(u, o), u._initialPage = o.page && r.safetyCall(o.page, [], o.page + "") || null, u._isRobot = r.isRobot(), u._health = {
|
|
1850
1850
|
errcount: 0,
|
|
@@ -1999,7 +1999,7 @@ function so() {
|
|
|
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 = ro(), i =
|
|
2002
|
+
var e = window, t = e.BrowserLogger = ro(), 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) {
|
|
@@ -2226,7 +2226,7 @@ class jr {
|
|
|
2226
2226
|
this.isDestroyed = !0;
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
2229
|
-
var ce = /* @__PURE__ */ ((r) => (r.PullStreamStats = "remoteStat", r.RtsSubscribeExceeds = "rtsSubscribeExceeds", r.UserJoined = "userJoined", r.UserLeft = "userLeft", r.Bye = "bye", r.MuteAudio = "muteAudio", r.UnmuteAudio = "unmuteAudio", r.MuteVideo = "muteVideo", r.UnmuteVideo = "unmuteVideo", r.MuteScreen = "muteScreen", r.UnmuteScreen = "unmuteScreen", r.Error = "error", r))(ce || {}),
|
|
2229
|
+
var ce = /* @__PURE__ */ ((r) => (r.PullStreamStats = "remoteStat", r.RtsSubscribeExceeds = "rtsSubscribeExceeds", r.UserJoined = "userJoined", r.UserLeft = "userLeft", r.Bye = "bye", r.MuteAudio = "muteAudio", r.UnmuteAudio = "unmuteAudio", r.MuteVideo = "muteVideo", r.UnmuteVideo = "unmuteVideo", r.MuteScreen = "muteScreen", r.UnmuteScreen = "unmuteScreen", r.Error = "error", r))(ce || {}), Ne = /* @__PURE__ */ ((r) => (r.Local = "local-device-status-change", r.Remote = "remote-device-status-change", r))(Ne || {}), k = /* @__PURE__ */ ((r) => (r.Audio = "sophon_audio", r.VideoLarge = "sophon_video_camera_large", r.VideoSmall = "sophon_video_camera_small", r.Screen = "sophon_video_screen_share", r.Data = "sophon_data", r))(k || {}), zr = /* @__PURE__ */ ((r) => (r.Audio = "rts audio", r.VideoLarge = "rts video", r))(zr || {}), mt = /* @__PURE__ */ ((r) => (r.Add = "add", r.Delete = "delete", r.Replace = "replace", r.Stop = "stop", r.UnPublish = "unpublish", r))(mt || {}), $t = /* @__PURE__ */ ((r) => (r[r.Camera = 0] = "Camera", r[r.Screen = 1] = "Screen", r[r.Image = 2] = "Image", r))($t || {}), mi = /* @__PURE__ */ ((r) => (r[r.Microphone = 0] = "Microphone", r[r.Screen = 1] = "Screen", r[r.Mixed = 2] = "Mixed", r))(mi || {}), le = /* @__PURE__ */ ((r) => (r.InRoom = "inRoom", r.Join = "join", r.Publish = "publish", r.User = "user", r.Resume = "resume", r.Retry = "retry", r.Reconnect = "reconnect", r))(le || {}), st = /* @__PURE__ */ ((r) => (r[r.MANUAL = 0] = "MANUAL", r[r.JOIN_CHANNEL = 1] = "JOIN_CHANNEL", r[r.ROLE_CHANGE = 2] = "ROLE_CHANGE", r[r.RECONNECT = 3] = "RECONNECT", r))(st || {}), Ie = [];
|
|
2230
2230
|
for (var Ki = 0; Ki < 256; ++Ki)
|
|
2231
2231
|
Ie.push((Ki + 256).toString(16).slice(1));
|
|
2232
2232
|
function po(r, n = 0) {
|
|
@@ -2256,8 +2256,8 @@ function at(r, n, e) {
|
|
|
2256
2256
|
return po(t);
|
|
2257
2257
|
}
|
|
2258
2258
|
var xi = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(xi || {});
|
|
2259
|
-
const yi = "6.13.6-beta.
|
|
2260
|
-
class
|
|
2259
|
+
const yi = "6.13.6-beta.1", Ks = "web";
|
|
2260
|
+
class He {
|
|
2261
2261
|
/**
|
|
2262
2262
|
* 将版本号转换为number
|
|
2263
2263
|
*/
|
|
@@ -2360,7 +2360,7 @@ class Ue {
|
|
|
2360
2360
|
let e = "";
|
|
2361
2361
|
for (let t = 0; t < n.length; t++) {
|
|
2362
2362
|
e !== "" && (e += " ");
|
|
2363
|
-
let i =
|
|
2363
|
+
let i = He.toString(n[t]);
|
|
2364
2364
|
e += i;
|
|
2365
2365
|
}
|
|
2366
2366
|
return e;
|
|
@@ -3854,18 +3854,18 @@ function an() {
|
|
|
3854
3854
|
]);
|
|
3855
3855
|
},
|
|
3856
3856
|
_doProcessBlock: function(g, l) {
|
|
3857
|
-
for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], y = S[3], E = S[4], I = S[5], A = S[6], C = S[7], L = v.high, _ = v.low, R = x.high, T = x.low, B = b.high, $ = b.low, q = y.high, G = y.low, ae = E.high, Q = E.low, te = I.high, ee = I.low, P = A.high, N = A.low, F = C.high, M = C.low, J = L, j = _, ue = R, X = T,
|
|
3858
|
-
var Ce,
|
|
3859
|
-
if (
|
|
3860
|
-
|
|
3857
|
+
for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], y = S[3], E = S[4], I = S[5], A = S[6], C = S[7], L = v.high, _ = v.low, R = x.high, T = x.low, B = b.high, $ = b.low, q = y.high, G = y.low, ae = E.high, Q = E.low, te = I.high, ee = I.low, P = A.high, N = A.low, F = C.high, M = C.low, J = L, j = _, ue = R, X = T, Ve = B, ze = $, Ye = q, Ze = G, Se = ae, ke = Q, nt = te, Et = ee, Nt = P, At = N, Jt = F, _t = M, Be = 0; Be < 80; Be++) {
|
|
3858
|
+
var Ce, Qe, Ct = d[Be];
|
|
3859
|
+
if (Be < 16)
|
|
3860
|
+
Qe = Ct.high = g[l + Be * 2] | 0, Ce = Ct.low = g[l + Be * 2 + 1] | 0;
|
|
3861
3861
|
else {
|
|
3862
|
-
var lt = d[
|
|
3863
|
-
Ce = oi + Rn,
|
|
3862
|
+
var lt = d[Be - 15], et = lt.high, ot = lt.low, Di = (et >>> 1 | ot << 31) ^ (et >>> 8 | ot << 24) ^ et >>> 7, oi = (ot >>> 1 | et << 31) ^ (ot >>> 8 | et << 24) ^ (ot >>> 7 | et << 25), ci = d[Be - 2], We = ci.high, ft = ci.low, ui = (We >>> 19 | ft << 13) ^ (We << 3 | ft >>> 29) ^ We >>> 6, Gt = (ft >>> 19 | We << 13) ^ (ft << 3 | We >>> 29) ^ (ft >>> 6 | We << 26), ss = d[Be - 7], In = ss.high, Rn = ss.low, as = d[Be - 16], wn = as.high, ns = as.low;
|
|
3863
|
+
Ce = oi + Rn, Qe = Di + In + (Ce >>> 0 < oi >>> 0 ? 1 : 0), Ce = Ce + Gt, Qe = Qe + ui + (Ce >>> 0 < Gt >>> 0 ? 1 : 0), Ce = Ce + ns, Qe = Qe + wn + (Ce >>> 0 < ns >>> 0 ? 1 : 0), Ct.high = Qe, Ct.low = Ce;
|
|
3864
3864
|
}
|
|
3865
|
-
var Dn = Se & nt ^ ~Se & Nt, os =
|
|
3866
|
-
Jt = Nt, _t = At, Nt = nt, At = Et, nt = Se, Et =
|
|
3865
|
+
var Dn = Se & nt ^ ~Se & Nt, os = ke & Et ^ ~ke & At, Tn = J & ue ^ J & Ve ^ ue & Ve, Pn = j & X ^ j & ze ^ X & ze, kn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), cs = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Bn = (Se >>> 14 | ke << 18) ^ (Se >>> 18 | ke << 14) ^ (Se << 23 | ke >>> 9), Mn = (ke >>> 14 | Se << 18) ^ (ke >>> 18 | Se << 14) ^ (ke << 23 | Se >>> 9), us = p[Be], Ln = us.high, hs = us.low, $e = _t + Mn, pt = Jt + Bn + ($e >>> 0 < _t >>> 0 ? 1 : 0), $e = $e + os, pt = pt + Dn + ($e >>> 0 < os >>> 0 ? 1 : 0), $e = $e + hs, pt = pt + Ln + ($e >>> 0 < hs >>> 0 ? 1 : 0), $e = $e + Ce, pt = pt + Qe + ($e >>> 0 < Ce >>> 0 ? 1 : 0), ds = cs + Pn, Nn = kn + Tn + (ds >>> 0 < cs >>> 0 ? 1 : 0);
|
|
3866
|
+
Jt = Nt, _t = At, Nt = nt, At = Et, nt = Se, Et = ke, ke = Ze + $e | 0, Se = Ye + pt + (ke >>> 0 < Ze >>> 0 ? 1 : 0) | 0, Ye = Ve, Ze = ze, Ve = ue, ze = X, ue = J, X = j, j = $e + ds | 0, J = pt + Nn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
|
|
3867
3867
|
}
|
|
3868
|
-
_ = v.low = _ + j, v.high = L + J + (_ >>> 0 < j >>> 0 ? 1 : 0), T = x.low = T + X, x.high = R + ue + (T >>> 0 < X >>> 0 ? 1 : 0), $ = b.low = $ +
|
|
3868
|
+
_ = v.low = _ + j, v.high = L + J + (_ >>> 0 < j >>> 0 ? 1 : 0), T = x.low = T + X, x.high = R + ue + (T >>> 0 < X >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), G = y.low = G + Ze, y.high = q + Ye + (G >>> 0 < Ze >>> 0 ? 1 : 0), Q = E.low = Q + ke, E.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = I.low = ee + Et, I.high = te + nt + (ee >>> 0 < Et >>> 0 ? 1 : 0), N = A.low = N + At, A.high = P + Nt + (N >>> 0 < At >>> 0 ? 1 : 0), M = C.low = M + _t, C.high = F + Jt + (M >>> 0 < _t >>> 0 ? 1 : 0);
|
|
3869
3869
|
},
|
|
3870
3870
|
_doFinalize: function() {
|
|
3871
3871
|
var g = this._data, l = g.words, S = this._nDataBytes * 8, v = g.sigBytes * 8;
|
|
@@ -7668,67 +7668,67 @@ function Jr(r, n, e, t) {
|
|
|
7668
7668
|
}, v = { d: function() {
|
|
7669
7669
|
return a();
|
|
7670
7670
|
}, dd: function() {
|
|
7671
|
-
return
|
|
7671
|
+
return Ke(a());
|
|
7672
7672
|
}, ddd: function() {
|
|
7673
|
-
return
|
|
7673
|
+
return Oe.dayNames[c()];
|
|
7674
7674
|
}, DDD: function() {
|
|
7675
|
-
return Pa({ y: u(), m: o(), d: a(), _: s(), dayName:
|
|
7675
|
+
return Pa({ y: u(), m: o(), d: a(), _: s(), dayName: Oe.dayNames[c()], short: !0 });
|
|
7676
7676
|
}, dddd: function() {
|
|
7677
|
-
return
|
|
7677
|
+
return Oe.dayNames[c() + 7];
|
|
7678
7678
|
}, DDDD: function() {
|
|
7679
|
-
return Pa({ y: u(), m: o(), d: a(), _: s(), dayName:
|
|
7679
|
+
return Pa({ y: u(), m: o(), d: a(), _: s(), dayName: Oe.dayNames[c() + 7] });
|
|
7680
7680
|
}, m: function() {
|
|
7681
7681
|
return o() + 1;
|
|
7682
7682
|
}, mm: function() {
|
|
7683
|
-
return
|
|
7683
|
+
return Ke(o() + 1);
|
|
7684
7684
|
}, mmm: function() {
|
|
7685
|
-
return
|
|
7685
|
+
return Oe.monthNames[o()];
|
|
7686
7686
|
}, mmmm: function() {
|
|
7687
|
-
return
|
|
7687
|
+
return Oe.monthNames[o() + 12];
|
|
7688
7688
|
}, yy: function() {
|
|
7689
7689
|
return String(u()).slice(2);
|
|
7690
7690
|
}, yyyy: function() {
|
|
7691
|
-
return
|
|
7691
|
+
return Ke(u(), 4);
|
|
7692
7692
|
}, h: function() {
|
|
7693
7693
|
return h() % 12 || 12;
|
|
7694
7694
|
}, hh: function() {
|
|
7695
|
-
return
|
|
7695
|
+
return Ke(h() % 12 || 12);
|
|
7696
7696
|
}, H: function() {
|
|
7697
7697
|
return h();
|
|
7698
7698
|
}, HH: function() {
|
|
7699
|
-
return
|
|
7699
|
+
return Ke(h());
|
|
7700
7700
|
}, M: function() {
|
|
7701
7701
|
return p();
|
|
7702
7702
|
}, MM: function() {
|
|
7703
|
-
return
|
|
7703
|
+
return Ke(p());
|
|
7704
7704
|
}, s: function() {
|
|
7705
7705
|
return d();
|
|
7706
7706
|
}, ss: function() {
|
|
7707
|
-
return
|
|
7707
|
+
return Ke(d());
|
|
7708
7708
|
}, l: function() {
|
|
7709
|
-
return
|
|
7709
|
+
return Ke(f(), 3);
|
|
7710
7710
|
}, L: function() {
|
|
7711
|
-
return
|
|
7711
|
+
return Ke(Math.floor(f() / 10));
|
|
7712
7712
|
}, t: function() {
|
|
7713
|
-
return h() < 12 ?
|
|
7713
|
+
return h() < 12 ? Oe.timeNames[0] : Oe.timeNames[1];
|
|
7714
7714
|
}, tt: function() {
|
|
7715
|
-
return h() < 12 ?
|
|
7715
|
+
return h() < 12 ? Oe.timeNames[2] : Oe.timeNames[3];
|
|
7716
7716
|
}, T: function() {
|
|
7717
|
-
return h() < 12 ?
|
|
7717
|
+
return h() < 12 ? Oe.timeNames[4] : Oe.timeNames[5];
|
|
7718
7718
|
}, TT: function() {
|
|
7719
|
-
return h() < 12 ?
|
|
7719
|
+
return h() < 12 ? Oe.timeNames[6] : Oe.timeNames[7];
|
|
7720
7720
|
}, Z: function() {
|
|
7721
7721
|
return t ? "GMT" : e ? "UTC" : d0(r);
|
|
7722
7722
|
}, o: function() {
|
|
7723
|
-
return (g() > 0 ? "-" : "+") +
|
|
7723
|
+
return (g() > 0 ? "-" : "+") + Ke(Math.floor(Math.abs(g()) / 60) * 100 + Math.abs(g()) % 60, 4);
|
|
7724
7724
|
}, p: function() {
|
|
7725
|
-
return (g() > 0 ? "-" : "+") +
|
|
7725
|
+
return (g() > 0 ? "-" : "+") + Ke(Math.floor(Math.abs(g()) / 60), 2) + ":" + Ke(Math.floor(Math.abs(g()) % 60), 2);
|
|
7726
7726
|
}, S: function() {
|
|
7727
7727
|
return ["th", "st", "nd", "rd"][a() % 10 > 3 ? 0 : (a() % 100 - a() % 10 != 10) * a() % 10];
|
|
7728
7728
|
}, W: function() {
|
|
7729
7729
|
return l();
|
|
7730
7730
|
}, WW: function() {
|
|
7731
|
-
return
|
|
7731
|
+
return Ke(l());
|
|
7732
7732
|
}, N: function() {
|
|
7733
7733
|
return S();
|
|
7734
7734
|
} };
|
|
@@ -7736,7 +7736,7 @@ function Jr(r, n, e, t) {
|
|
|
7736
7736
|
return x in v ? v[x]() : x.slice(1, x.length - 1);
|
|
7737
7737
|
});
|
|
7738
7738
|
}
|
|
7739
|
-
var Ta = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" },
|
|
7739
|
+
var Ta = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" }, Oe = { dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"] }, Ke = function(n) {
|
|
7740
7740
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
|
|
7741
7741
|
return String(n).padStart(e, "0");
|
|
7742
7742
|
}, Pa = function(n) {
|
|
@@ -8052,7 +8052,7 @@ class y0 {
|
|
|
8052
8052
|
m(this, "logMethod", (n, e = console.log) => (...t) => {
|
|
8053
8053
|
let i = wr();
|
|
8054
8054
|
this.logLevel <= n && e(i, ...t);
|
|
8055
|
-
let s =
|
|
8055
|
+
let s = He.paramArrayToString(t);
|
|
8056
8056
|
n > 0 && this.addLog(s);
|
|
8057
8057
|
});
|
|
8058
8058
|
// debug level message
|
|
@@ -8241,7 +8241,7 @@ class y0 {
|
|
|
8241
8241
|
!this.sessionId || !this.tracker ? (this.logCache.push(i), this.logCache.length >= b0 && this.logCache.shift()) : this.sendLog(i);
|
|
8242
8242
|
}
|
|
8243
8243
|
}
|
|
8244
|
-
class
|
|
8244
|
+
class O {
|
|
8245
8245
|
static getLogger() {
|
|
8246
8246
|
return this.logger || (this.logger = new y0()), this.logger;
|
|
8247
8247
|
}
|
|
@@ -8286,7 +8286,7 @@ class H {
|
|
|
8286
8286
|
this.getLogger().e("[ERR]", ...n);
|
|
8287
8287
|
}
|
|
8288
8288
|
}
|
|
8289
|
-
m(
|
|
8289
|
+
m(O, "logger");
|
|
8290
8290
|
const E0 = (r) => w(void 0, null, function* () {
|
|
8291
8291
|
const n = new oe.SupportUtil();
|
|
8292
8292
|
let e = {
|
|
@@ -8401,7 +8401,7 @@ const C0 = {
|
|
|
8401
8401
|
17: "16IN_360P",
|
|
8402
8402
|
9999: "Mixed_Audio"
|
|
8403
8403
|
};
|
|
8404
|
-
var Xr = /* @__PURE__ */ ((r) => (r[r.LiveTranscoding_HZ_48000 = 48e3] = "LiveTranscoding_HZ_48000", r[r.LiveTranscoding_HZ_44100 = 44100] = "LiveTranscoding_HZ_44100", r[r.LiveTranscoding_HZ_32000 = 32e3] = "LiveTranscoding_HZ_32000", r[r.LiveTranscoding_HZ_16000 = 16e3] = "LiveTranscoding_HZ_16000", r[r.LiveTranscoding_HZ_8000 = 8e3] = "LiveTranscoding_HZ_8000", r))(Xr || {}), vi = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", r[r.LiveTranscodingBody = 1] = "LiveTranscodingBody", r))(vi || {}), _i = /* @__PURE__ */ ((r) => (r[r.NOTO_SERIF_CJKSC_REGULAR = 0] = "NOTO_SERIF_CJKSC_REGULAR", r[r.ALIBABA_PUHUITI_REGULAR = 1] = "ALIBABA_PUHUITI_REGULAR", r[r.ALIBABA_PUHUITI_BOLD = 2] = "ALIBABA_PUHUITI_BOLD", r[r.ALIBABA_PUHUITI_Heavy = 3] = "ALIBABA_PUHUITI_Heavy", r[r.ALIBABA_PUHUITI_LIGHT = 4] = "ALIBABA_PUHUITI_LIGHT", r[r.ALIBABA_PUHUITI_MEDIUM = 5] = "ALIBABA_PUHUITI_MEDIUM", r))(_i || {}), hn = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", r[r.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", r[r.LiveTranscodingFill = 2] = "LiveTranscodingFill", r))(hn || {}), Yr = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", r[r.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", r))(Yr || {}), dn = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingState_IDLE = 0] = "LiveTranscodingState_IDLE", r[r.LiveTranscodingState_CONNNECT = 1] = "LiveTranscodingState_CONNNECT", r[r.LiveTranscodingState_RUNNING = 2] = "LiveTranscodingState_RUNNING", r[r.LiveTranscodingState_RECOVERING = 3] = "LiveTranscodingState_RECOVERING", r[r.LiveTranscodingState_FAILURE = 4] = "LiveTranscodingState_FAILURE", r[r.LiveTranscodingState_END = 5] = "LiveTranscodingState_END", r))(dn || {}), ct = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingErrorPublishOk = 0] = "LiveTranscodingErrorPublishOk", r[r.LiveTranscodingErrorStreamNotFound = 17825793] = "LiveTranscodingErrorStreamNotFound", r[r.LiveTranscodingErrorStreamAlreadyExist = 17825794] = "LiveTranscodingErrorStreamAlreadyExist", r[r.LiveTranscodingErrorInvalidParam = 17825795] = "LiveTranscodingErrorInvalidParam", r[r.LiveTranscodingErrorInternalError = 17825796] = "LiveTranscodingErrorInternalError", r[r.LiveTranscodingErrorRtmpServerError = 17825797] = "LiveTranscodingErrorRtmpServerError", r[r.LiveTranscodingErrorRtmpStreamUrlError = 17825798] = "LiveTranscodingErrorRtmpStreamUrlError", r[r.LiveTranscodingErrorPublishTimeout = 17825799] = "LiveTranscodingErrorPublishTimeout", r[r.LiveTranscodingErrorNotAuthorized = 17825800] = "LiveTranscodingErrorNotAuthorized", r))(ct || {}), ln = /* @__PURE__ */ ((r) => (r[r.TrascodingPublishTaskStatusStart = 0] = "TrascodingPublishTaskStatusStart", r[r.TrascodingPublishTaskStatusUpdate = 1] = "TrascodingPublishTaskStatusUpdate", r[r.TrascodingPublishTaskStatusStop = 2] = "TrascodingPublishTaskStatusStop", r))(ln || {}),
|
|
8404
|
+
var Xr = /* @__PURE__ */ ((r) => (r[r.LiveTranscoding_HZ_48000 = 48e3] = "LiveTranscoding_HZ_48000", r[r.LiveTranscoding_HZ_44100 = 44100] = "LiveTranscoding_HZ_44100", r[r.LiveTranscoding_HZ_32000 = 32e3] = "LiveTranscoding_HZ_32000", r[r.LiveTranscoding_HZ_16000 = 16e3] = "LiveTranscoding_HZ_16000", r[r.LiveTranscoding_HZ_8000 = 8e3] = "LiveTranscoding_HZ_8000", r))(Xr || {}), vi = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", r[r.LiveTranscodingBody = 1] = "LiveTranscodingBody", r))(vi || {}), _i = /* @__PURE__ */ ((r) => (r[r.NOTO_SERIF_CJKSC_REGULAR = 0] = "NOTO_SERIF_CJKSC_REGULAR", r[r.ALIBABA_PUHUITI_REGULAR = 1] = "ALIBABA_PUHUITI_REGULAR", r[r.ALIBABA_PUHUITI_BOLD = 2] = "ALIBABA_PUHUITI_BOLD", r[r.ALIBABA_PUHUITI_Heavy = 3] = "ALIBABA_PUHUITI_Heavy", r[r.ALIBABA_PUHUITI_LIGHT = 4] = "ALIBABA_PUHUITI_LIGHT", r[r.ALIBABA_PUHUITI_MEDIUM = 5] = "ALIBABA_PUHUITI_MEDIUM", r))(_i || {}), hn = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", r[r.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", r[r.LiveTranscodingFill = 2] = "LiveTranscodingFill", r))(hn || {}), Yr = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", r[r.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", r))(Yr || {}), dn = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingState_IDLE = 0] = "LiveTranscodingState_IDLE", r[r.LiveTranscodingState_CONNNECT = 1] = "LiveTranscodingState_CONNNECT", r[r.LiveTranscodingState_RUNNING = 2] = "LiveTranscodingState_RUNNING", r[r.LiveTranscodingState_RECOVERING = 3] = "LiveTranscodingState_RECOVERING", r[r.LiveTranscodingState_FAILURE = 4] = "LiveTranscodingState_FAILURE", r[r.LiveTranscodingState_END = 5] = "LiveTranscodingState_END", r))(dn || {}), ct = /* @__PURE__ */ ((r) => (r[r.LiveTranscodingErrorPublishOk = 0] = "LiveTranscodingErrorPublishOk", r[r.LiveTranscodingErrorStreamNotFound = 17825793] = "LiveTranscodingErrorStreamNotFound", r[r.LiveTranscodingErrorStreamAlreadyExist = 17825794] = "LiveTranscodingErrorStreamAlreadyExist", r[r.LiveTranscodingErrorInvalidParam = 17825795] = "LiveTranscodingErrorInvalidParam", r[r.LiveTranscodingErrorInternalError = 17825796] = "LiveTranscodingErrorInternalError", r[r.LiveTranscodingErrorRtmpServerError = 17825797] = "LiveTranscodingErrorRtmpServerError", r[r.LiveTranscodingErrorRtmpStreamUrlError = 17825798] = "LiveTranscodingErrorRtmpStreamUrlError", r[r.LiveTranscodingErrorPublishTimeout = 17825799] = "LiveTranscodingErrorPublishTimeout", r[r.LiveTranscodingErrorNotAuthorized = 17825800] = "LiveTranscodingErrorNotAuthorized", r))(ct || {}), ln = /* @__PURE__ */ ((r) => (r[r.TrascodingPublishTaskStatusStart = 0] = "TrascodingPublishTaskStatusStart", r[r.TrascodingPublishTaskStatusUpdate = 1] = "TrascodingPublishTaskStatusUpdate", r[r.TrascodingPublishTaskStatusStop = 2] = "TrascodingPublishTaskStatusStop", r))(ln || {}), Ue = /* @__PURE__ */ ((r) => (r[r.MPU_TASK_TRANSACTION_START = 0] = "MPU_TASK_TRANSACTION_START", r[r.MPU_TASK_TRANSACTION_UPDATE = 1] = "MPU_TASK_TRANSACTION_UPDATE", r[r.MPU_TASK_TRANSACTION_STOP = 2] = "MPU_TASK_TRANSACTION_STOP", r[r.MPU_TASK_TRANSACTION_LIST = 3] = "MPU_TASK_TRANSACTION_LIST", r[r.MPU_TASK_TRANSACTION_POLLING = 4] = "MPU_TASK_TRANSACTION_POLLING", r[r.MPU_TASK_TRANSACTION_ACKNOWLEDGE = 5] = "MPU_TASK_TRANSACTION_ACKNOWLEDGE", r[r.MPU_TASK_TRANSACTION_END = 6] = "MPU_TASK_TRANSACTION_END", r))(Ue || {});
|
|
8405
8405
|
const I0 = {
|
|
8406
8406
|
0: "/libra/v1/sdk/start-task",
|
|
8407
8407
|
1: "/libra/v1/sdk/update-task",
|
|
@@ -8431,7 +8431,7 @@ class fn {
|
|
|
8431
8431
|
this.videoWidth = n, this.videoHeight = e, t && (this.videoFramerate = t), i && (this.videoBitrate = i), s && (this.videoGop = s), a && (this.audioSamplerate = a), c && (this.audioBitrate = c), o && (this.audioChannels = o);
|
|
8432
8432
|
}
|
|
8433
8433
|
}
|
|
8434
|
-
const Zr = (r) => ((r & 16711680) >> 16) + (r & 65280) + ((r & 255) << 16),
|
|
8434
|
+
const Zr = (r) => ((r & 16711680) >> 16) + (r & 65280) + ((r & 255) << 16), Ge = (r = 0, n) => {
|
|
8435
8435
|
if (n == 0)
|
|
8436
8436
|
return 0;
|
|
8437
8437
|
let e = r / n;
|
|
@@ -8452,9 +8452,9 @@ class Br {
|
|
|
8452
8452
|
appid: e.appId,
|
|
8453
8453
|
channelid: e.channelId
|
|
8454
8454
|
};
|
|
8455
|
-
if (n ===
|
|
8456
|
-
return n ===
|
|
8457
|
-
if (a.taskid = t, n !==
|
|
8455
|
+
if (n === Ue.MPU_TASK_TRANSACTION_POLLING || n === Ue.MPU_TASK_TRANSACTION_LIST || n === Ue.MPU_TASK_TRANSACTION_ACKNOWLEDGE)
|
|
8456
|
+
return n === Ue.MPU_TASK_TRANSACTION_ACKNOWLEDGE && (a.messageid = s), a;
|
|
8457
|
+
if (a.taskid = t, n !== Ue.MPU_TASK_TRANSACTION_STOP) {
|
|
8458
8458
|
if (a.mixmode = this.mixMode, i && (a.streamurl = i), this.mixMode === Si.LiveTranscodingSingle) {
|
|
8459
8459
|
const c = this.singleParam;
|
|
8460
8460
|
if (c) {
|
|
@@ -8462,7 +8462,7 @@ class Br {
|
|
|
8462
8462
|
const o = [];
|
|
8463
8463
|
c.userId && o.push(c.userId), a.subspecusers = o;
|
|
8464
8464
|
}
|
|
8465
|
-
} else if (n ===
|
|
8465
|
+
} else if (n === Ue.MPU_TASK_TRANSACTION_START || n === Ue.MPU_TASK_TRANSACTION_UPDATE) {
|
|
8466
8466
|
const c = this.mixParam;
|
|
8467
8467
|
if (c) {
|
|
8468
8468
|
c.taskProfile && (a.taskprofile = C0[c.taskProfile]);
|
|
@@ -8548,7 +8548,7 @@ const La = 10, Na = 5e3, jt = class jt extends we {
|
|
|
8548
8548
|
* @param event
|
|
8549
8549
|
*/
|
|
8550
8550
|
onOpen(e) {
|
|
8551
|
-
|
|
8551
|
+
O.info(`[${jt.logName}]`, "onOpen"), this.socketStatus = 2, this.connectRetryCount = 0, this.networkAvailableChecked = !1, this.closedByInvoke = !1, this.gotErr = !1, this.isReconnecting = !1, this.emit("onOpen", e);
|
|
8552
8552
|
}
|
|
8553
8553
|
/**
|
|
8554
8554
|
* 收到消息
|
|
@@ -8562,7 +8562,7 @@ const La = 10, Na = 5e3, jt = class jt extends we {
|
|
|
8562
8562
|
* @param event
|
|
8563
8563
|
*/
|
|
8564
8564
|
onError(e) {
|
|
8565
|
-
this.isReconnecting && this.emit("onReconnectFail", e), this.emit("onError", e), this.isReconnecting = !1, this.socketStatus !== 2 &&
|
|
8565
|
+
this.isReconnecting && this.emit("onReconnectFail", e), this.emit("onError", e), this.isReconnecting = !1, this.socketStatus !== 2 && He.isNetworkAvailable().then((t) => {
|
|
8566
8566
|
t && console.error(jt.logName, "onError, Network is available, token may be invalid");
|
|
8567
8567
|
});
|
|
8568
8568
|
}
|
|
@@ -8576,10 +8576,10 @@ const La = 10, Na = 5e3, jt = class jt extends we {
|
|
|
8576
8576
|
this.socketStatus = 0;
|
|
8577
8577
|
return;
|
|
8578
8578
|
}
|
|
8579
|
-
if (
|
|
8579
|
+
if (O.info(
|
|
8580
8580
|
`[${jt.logName}]`,
|
|
8581
8581
|
`onClose, code: ${e.code}, reason: ${e.reason}, status: ${status}, retryCount: ${this.connectRetryCount}`
|
|
8582
|
-
), (yield
|
|
8582
|
+
), (yield He.isNetworkAvailable()) && !this.networkAvailableChecked) {
|
|
8583
8583
|
this.reconnect(), this.networkAvailableChecked = !0;
|
|
8584
8584
|
return;
|
|
8585
8585
|
} else
|
|
@@ -8646,7 +8646,7 @@ class R0 {
|
|
|
8646
8646
|
"joinchannel"
|
|
8647
8647
|
/* JOINCHANNEL */
|
|
8648
8648
|
);
|
|
8649
|
-
return n.header.displayName = this.userName, n.header.clientversion =
|
|
8649
|
+
return n.header.displayName = this.userName, n.header.clientversion = He.getVersionNumber().toString(), n.header.platform = Ks, this.roleAuth && (n.data.auth = this.roleAuth), n;
|
|
8650
8650
|
}
|
|
8651
8651
|
/**
|
|
8652
8652
|
* 创建一个用于发送离会消息的Package
|
|
@@ -8688,7 +8688,7 @@ class R0 {
|
|
|
8688
8688
|
"reconnect"
|
|
8689
8689
|
/* RECONNECT */
|
|
8690
8690
|
);
|
|
8691
|
-
return e.header.displayName = this.userName, e.header.clientversion =
|
|
8691
|
+
return e.header.displayName = this.userName, e.header.clientversion = He.getVersionNumber().toString(), e.header.platform = Ks, e.data = Y(Y({}, e.data), n != null ? n : {}), this.roleAuth && (e.data.auth = this.roleAuth), e;
|
|
8692
8692
|
}
|
|
8693
8693
|
createRefreshUrlPackage() {
|
|
8694
8694
|
let n = this.createBaseSendPackage(
|
|
@@ -8734,7 +8734,7 @@ class R0 {
|
|
|
8734
8734
|
};
|
|
8735
8735
|
}
|
|
8736
8736
|
}
|
|
8737
|
-
var
|
|
8737
|
+
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 || {});
|
|
8738
8738
|
class V extends Error {
|
|
8739
8739
|
constructor(e, t, i) {
|
|
8740
8740
|
super(t);
|
|
@@ -8761,7 +8761,7 @@ class V extends Error {
|
|
|
8761
8761
|
return this._extra;
|
|
8762
8762
|
}
|
|
8763
8763
|
}
|
|
8764
|
-
const w0 = 3e4,
|
|
8764
|
+
const w0 = 3e4, qe = class qe extends we {
|
|
8765
8765
|
// 发送重连信令时,房间信令凭这些信息找回 session
|
|
8766
8766
|
constructor(e, t, i, s, a, c) {
|
|
8767
8767
|
super();
|
|
@@ -8875,7 +8875,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8875
8875
|
* 关闭websocket连接,并销毁
|
|
8876
8876
|
*/
|
|
8877
8877
|
close() {
|
|
8878
|
-
|
|
8878
|
+
O.info(`[${qe.logName}] close`), this.stopKeepAlive(), this.wsClient.off("onOpen", this.onOpen.bind(this)), this.wsClient.off("onMessage", this.onMessage.bind(this)), this.wsClient.off("onError", this.onError.bind(this)), this.wsClient.off("onClose", this.onClose.bind(this)), this.wsClient.off("onConnectFail", this.onConnectFail.bind(this)), this.wsClient.off("onAuthInvalid", this.onAuthInvalid.bind(this)), this.wsClient.off("onReconnectStart"), this.wsClient.off("onReconnectFail"), this.wsClient.close();
|
|
8879
8879
|
}
|
|
8880
8880
|
/**
|
|
8881
8881
|
* 通过此方法发送数据到业务信令
|
|
@@ -8898,7 +8898,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8898
8898
|
* ws连接建立成功后立刻发送join消息
|
|
8899
8899
|
*/
|
|
8900
8900
|
onOpen() {
|
|
8901
|
-
if (
|
|
8901
|
+
if (O.info(`[${qe.logName}] onOpen`), this.isFirstConnect) {
|
|
8902
8902
|
let e = this.packageCreater.createJoinPackage();
|
|
8903
8903
|
e.data.configure = {
|
|
8904
8904
|
channelprofile: this.channelProfile
|
|
@@ -8918,7 +8918,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8918
8918
|
let t = JSON.parse(e.data);
|
|
8919
8919
|
this.packageCache.delete(t.tid), this.onRecvMessage(t), t != null && t.msgtype && (t == null ? void 0 : t.msgtype) !== ve.KEEPALIVE && this.slsReporter.reportRoomServerEvent(!1, t.msgtype, t.tid, t);
|
|
8920
8920
|
} catch (t) {
|
|
8921
|
-
|
|
8921
|
+
O.warn(`[${qe.logName}] onMessage err`, t, e);
|
|
8922
8922
|
}
|
|
8923
8923
|
}
|
|
8924
8924
|
/**
|
|
@@ -8926,28 +8926,28 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8926
8926
|
* @param event
|
|
8927
8927
|
*/
|
|
8928
8928
|
onError(e) {
|
|
8929
|
-
|
|
8929
|
+
O.warn(`[${qe.logName}] onError`, e), this.isFirstConnect && this.onConnectFail();
|
|
8930
8930
|
}
|
|
8931
8931
|
/**
|
|
8932
8932
|
* 连接失败
|
|
8933
8933
|
*/
|
|
8934
8934
|
onConnectFail() {
|
|
8935
|
-
|
|
8936
|
-
const e = new V(
|
|
8935
|
+
O.warn(`[${qe.logName}] onConnectFail`);
|
|
8936
|
+
const e = new V(U.ERR_INNER, "Signaling connect failed.");
|
|
8937
8937
|
this.isFirstConnect ? this.emit("onJoinChannelResult", e) : this.emit("onConnectFail", e);
|
|
8938
8938
|
}
|
|
8939
8939
|
/**
|
|
8940
8940
|
* 鉴权失败
|
|
8941
8941
|
*/
|
|
8942
8942
|
onAuthInvalid() {
|
|
8943
|
-
|
|
8943
|
+
O.warn(`[${qe.logName}] onAuthInvalid`), this.isFirstConnect && this.emit("onAuthInvalid");
|
|
8944
8944
|
}
|
|
8945
8945
|
/**
|
|
8946
8946
|
* 网络异常
|
|
8947
8947
|
*/
|
|
8948
8948
|
onNetworkError() {
|
|
8949
|
-
|
|
8950
|
-
const e = new V(
|
|
8949
|
+
O.warn(`[${qe.logName}] onNetworkError`);
|
|
8950
|
+
const e = new V(U.ERR_INNER, "Network error, signaling connect failed.");
|
|
8951
8951
|
this.emit("onNetworkError", e);
|
|
8952
8952
|
}
|
|
8953
8953
|
/**
|
|
@@ -8955,7 +8955,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8955
8955
|
* @param event
|
|
8956
8956
|
*/
|
|
8957
8957
|
onClose(e) {
|
|
8958
|
-
|
|
8958
|
+
O.info(`[${qe.logName}] onClose`, e), this.stopKeepAlive();
|
|
8959
8959
|
}
|
|
8960
8960
|
onKeepAliveRsp() {
|
|
8961
8961
|
this.emit("onKeepAliveRsp"), this.checkAlive();
|
|
@@ -8964,14 +8964,14 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8964
8964
|
this.emit("onReconnectStart");
|
|
8965
8965
|
}
|
|
8966
8966
|
onReconnectFail() {
|
|
8967
|
-
this.emit("onReconnectFail", new V(
|
|
8967
|
+
this.emit("onReconnectFail", new V(U.ERR_INNER, "signaling reconnect failed."));
|
|
8968
8968
|
}
|
|
8969
8969
|
/**
|
|
8970
8970
|
* 处理 Keepalive 心跳,加速判断网络异常
|
|
8971
8971
|
*/
|
|
8972
8972
|
checkAlive() {
|
|
8973
8973
|
window.clearTimeout(this.aliveChecker), this.aliveChecker = window.setTimeout(() => {
|
|
8974
|
-
|
|
8974
|
+
O.info(`[${qe.logName}] not alive, reconnect`), this.stopKeepAlive(), this.emit("onReconnectStart"), this.wsClient.reconnect();
|
|
8975
8975
|
}, w0);
|
|
8976
8976
|
}
|
|
8977
8977
|
/**
|
|
@@ -8979,7 +8979,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
8979
8979
|
* @param response
|
|
8980
8980
|
*/
|
|
8981
8981
|
onRecvMessage(e) {
|
|
8982
|
-
switch (e.msgtype !== ve.KEEPALIVE &&
|
|
8982
|
+
switch (e.msgtype !== ve.KEEPALIVE && O.info(`[${qe.logName}] recv msg: ${e.msgtype}`), e.msgtype) {
|
|
8983
8983
|
case ve.JOINCHANNEL:
|
|
8984
8984
|
this.onJoinResult(e);
|
|
8985
8985
|
break;
|
|
@@ -9065,7 +9065,7 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
9065
9065
|
this.sendPkgCache(), this.startKeepAlive(), this.emit("onReconnectSuccess", e.data.users);
|
|
9066
9066
|
else {
|
|
9067
9067
|
const t = new V(
|
|
9068
|
-
|
|
9068
|
+
U.ERR_INNER,
|
|
9069
9069
|
`reconnect failed, code: ${e.code};description: ${e.description}`
|
|
9070
9070
|
);
|
|
9071
9071
|
e.code === 403 && (t.code = 403), this.emit("onReconnectFail", t), this.close();
|
|
@@ -9118,8 +9118,8 @@ const w0 = 3e4, Ke = class Ke extends we {
|
|
|
9118
9118
|
this.stopKeepAlive(), this.emit("onBye", e.reason, e.description);
|
|
9119
9119
|
}
|
|
9120
9120
|
};
|
|
9121
|
-
m(
|
|
9122
|
-
let Lr =
|
|
9121
|
+
m(qe, "logName", "RSMessageCenter");
|
|
9122
|
+
let Lr = qe;
|
|
9123
9123
|
const D = (r, n) => (e, t, i) => {
|
|
9124
9124
|
const s = i.value;
|
|
9125
9125
|
return i.value = function(...a) {
|
|
@@ -9131,7 +9131,7 @@ const D = (r, n) => (e, t, i) => {
|
|
|
9131
9131
|
u = r(a);
|
|
9132
9132
|
} catch (d) {
|
|
9133
9133
|
}
|
|
9134
|
-
|
|
9134
|
+
O.interface(c, t, ...u);
|
|
9135
9135
|
const h = s.apply(this, a);
|
|
9136
9136
|
return Promise.resolve(h).then((d) => d).catch((d) => d).then((d) => {
|
|
9137
9137
|
var S;
|
|
@@ -9152,7 +9152,7 @@ const D = (r, n) => (e, t, i) => {
|
|
|
9152
9152
|
}
|
|
9153
9153
|
else
|
|
9154
9154
|
return;
|
|
9155
|
-
|
|
9155
|
+
O.interfaceResult(
|
|
9156
9156
|
c,
|
|
9157
9157
|
t,
|
|
9158
9158
|
!(g && l),
|
|
@@ -9162,13 +9162,13 @@ const D = (r, n) => (e, t, i) => {
|
|
|
9162
9162
|
}
|
|
9163
9163
|
}), h;
|
|
9164
9164
|
}, i;
|
|
9165
|
-
},
|
|
9165
|
+
}, H = (r) => r;
|
|
9166
9166
|
var D0 = Object.defineProperty, T0 = Object.getOwnPropertyDescriptor, es = (r, n, e, t) => {
|
|
9167
9167
|
for (var i = t > 1 ? void 0 : t ? T0(n, e) : n, s = r.length - 1, a; s >= 0; s--)
|
|
9168
9168
|
(a = r[s]) && (i = (t ? a(n, e, i) : a(i)) || i);
|
|
9169
9169
|
return t && i && D0(n, e, i), i;
|
|
9170
|
-
},
|
|
9171
|
-
const Ci = (
|
|
9170
|
+
}, Me;
|
|
9171
|
+
const Ci = (Me = class extends we {
|
|
9172
9172
|
constructor(e, t, i, s = dt.prod) {
|
|
9173
9173
|
super();
|
|
9174
9174
|
m(this, "messageCenter");
|
|
@@ -9201,7 +9201,7 @@ const Ci = (Be = class extends we {
|
|
|
9201
9201
|
* 释放资源
|
|
9202
9202
|
*/
|
|
9203
9203
|
reset() {
|
|
9204
|
-
|
|
9204
|
+
O.info("[roomsig] reset"), this.messageCenter && (this.messageCenter.close(), this.messageCenter = void 0), this.authInfo = void 0;
|
|
9205
9205
|
}
|
|
9206
9206
|
join(e, t, i) {
|
|
9207
9207
|
return w(this, null, function* () {
|
|
@@ -9216,16 +9216,16 @@ const Ci = (Be = class extends we {
|
|
|
9216
9216
|
i
|
|
9217
9217
|
), this.initMessageCenter(), this.messageCenter.once("onJoinChannelResult", (u) => {
|
|
9218
9218
|
var h, p, d;
|
|
9219
|
-
if (
|
|
9219
|
+
if (O.info(`[${Me.logName}]`, "join result: ", u), c.taskretrynum = ((h = this.messageCenter) == null ? void 0 : h.retryCount) || 0, u.code == 200) {
|
|
9220
9220
|
(p = this.messageCenter) == null || p.sendPkgCache(), (d = this.messageCenter) == null || d.startKeepAlive();
|
|
9221
9221
|
let f = u.data;
|
|
9222
9222
|
f.tid = u.tid, f.users = u.data.users, f.timestamp = u.timestamp, c.est && (c.joinconnecttc = Date.now() - c.est), this.slsReporter.reportJoinConnection(c), s(f);
|
|
9223
9223
|
} else
|
|
9224
|
-
this.reset(), a(this.handleSignalError(u.code, u.reason,
|
|
9224
|
+
this.reset(), a(this.handleSignalError(u.code, u.reason, U.ERR_JOIN_CHANNEL_FAILED));
|
|
9225
9225
|
}), this.messageCenter.once("onAuthInvalid", () => {
|
|
9226
|
-
this.reset(), a(new V(
|
|
9227
|
-
}),
|
|
9228
|
-
`[${
|
|
9226
|
+
this.reset(), a(new V(U.ERR_JOIN_BAD_TOKEN, "join failed because authentication failed"));
|
|
9227
|
+
}), O.info(
|
|
9228
|
+
`[${Me.logName}]`,
|
|
9229
9229
|
"start ws connecting roomserver and auto join when connected"
|
|
9230
9230
|
);
|
|
9231
9231
|
const o = {
|
|
@@ -9239,7 +9239,7 @@ const Ci = (Be = class extends we {
|
|
|
9239
9239
|
authtype: "app",
|
|
9240
9240
|
tid: at()
|
|
9241
9241
|
};
|
|
9242
|
-
e.role && (o.tokenrole = e.role), c.est = Date.now(), this.messageCenter.start(this.roomServerUri + "?" +
|
|
9242
|
+
e.role && (o.tokenrole = e.role), c.est = Date.now(), this.messageCenter.start(this.roomServerUri + "?" + He.queryingParam(o));
|
|
9243
9243
|
});
|
|
9244
9244
|
});
|
|
9245
9245
|
}
|
|
@@ -9248,23 +9248,23 @@ const Ci = (Be = class extends we {
|
|
|
9248
9248
|
* @returns
|
|
9249
9249
|
*/
|
|
9250
9250
|
leave() {
|
|
9251
|
-
return
|
|
9251
|
+
return O.info("[roomsig] leave .."), new Promise((e, t) => {
|
|
9252
9252
|
this.messageCenter ? (this.messageCenter.on("onLeaveResult", (i, s) => {
|
|
9253
|
-
|
|
9254
|
-
}),
|
|
9253
|
+
O.info(`[${Me.logName}]`, "recv leave response " + i), i === 200 ? (this.updateReconnectData(), this.reset(), e({ tid: s })) : t(this.handleSignalError(i, "leave error"));
|
|
9254
|
+
}), O.info(`[${Me.logName}]`, "send leave request"), this.messageCenter.leave()) : (O.info(`[${Me.logName}]`, "no message center, ok to leave"), e({ tid: "" }));
|
|
9255
9255
|
});
|
|
9256
9256
|
}
|
|
9257
9257
|
publish(e) {
|
|
9258
9258
|
return new Promise((t, i) => {
|
|
9259
9259
|
var s;
|
|
9260
9260
|
this.messageCenter ? (this.messageCenter.once("onPublishResult", (a, c, o) => {
|
|
9261
|
-
|
|
9261
|
+
O.info(`[${Me.logName}]`, "recv pubish response " + a), a === 200 ? (this.updateReconnectData(gt(Y({}, this.reconnectData), {
|
|
9262
9262
|
publish: {
|
|
9263
9263
|
users: [e]
|
|
9264
9264
|
}
|
|
9265
9265
|
})), t({ tid: c })) : i(this.handleSignalError(a, `publish error, ${o}`));
|
|
9266
|
-
}), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = at()),
|
|
9267
|
-
`[${
|
|
9266
|
+
}), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = at()), O.info(
|
|
9267
|
+
`[${Me.logName}]`,
|
|
9268
9268
|
"assign callid " + e.callid + " and send publish request"
|
|
9269
9269
|
), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
|
|
9270
9270
|
});
|
|
@@ -9277,7 +9277,7 @@ const Ci = (Be = class extends we {
|
|
|
9277
9277
|
}
|
|
9278
9278
|
this.messageCenter.on("onRoleUpdateResult", (s, a, c) => {
|
|
9279
9279
|
var o, u;
|
|
9280
|
-
|
|
9280
|
+
O.info(`[${Me.logName}]`, "recv role update response " + s), s === 200 ? ((u = (o = this.reconnectData) == null ? void 0 : o.role) != null && u.clientrole && (this.reconnectData.role.clientrole = e, this.updateReconnectData(this.reconnectData)), t({ tid: a })) : i(this.handleSignalError(s, `role update error, ${c}`));
|
|
9281
9281
|
}), this.messageCenter.roleUpdate(e);
|
|
9282
9282
|
});
|
|
9283
9283
|
}
|
|
@@ -9288,15 +9288,15 @@ const Ci = (Be = class extends we {
|
|
|
9288
9288
|
* 更新推流地址
|
|
9289
9289
|
*/
|
|
9290
9290
|
refreshUrl(e) {
|
|
9291
|
-
return
|
|
9291
|
+
return O.info(`[${Me.logName}]`, "refreshUrl .."), new Promise((t, i) => {
|
|
9292
9292
|
if (!this.messageCenter) {
|
|
9293
9293
|
i(this.handleSignalError(-1, "refresh url error, no message center"));
|
|
9294
9294
|
return;
|
|
9295
9295
|
}
|
|
9296
9296
|
this.messageCenter.on("onRefreshUrlResult", (s) => {
|
|
9297
9297
|
const { code: a, description: c, data: o = {} } = s || {};
|
|
9298
|
-
|
|
9299
|
-
}),
|
|
9298
|
+
O.info("recv refresh url response " + a), a === 200 ? t(o) : i(this.handleSignalError(a, `refresh url error, ${c}`));
|
|
9299
|
+
}), O.info("send refresh url request"), this.messageCenter.refreshUrl(e);
|
|
9300
9300
|
});
|
|
9301
9301
|
}
|
|
9302
9302
|
/**
|
|
@@ -9304,13 +9304,13 @@ const Ci = (Be = class extends we {
|
|
|
9304
9304
|
* @param status
|
|
9305
9305
|
*/
|
|
9306
9306
|
reportStatus(e) {
|
|
9307
|
-
return
|
|
9307
|
+
return O.info(`[${Me.logName}]`, "reportStatus " + e), new Promise((t, i) => {
|
|
9308
9308
|
this.messageCenter ? (this.messageCenter.once("onStatusReport", (s, a) => {
|
|
9309
9309
|
s === 200 ? t() : i(new V(s, a));
|
|
9310
9310
|
}), this.messageCenter.reportStatus(e)) : i(new V(-1, "No messageCenter"));
|
|
9311
9311
|
});
|
|
9312
9312
|
}
|
|
9313
|
-
handleSignalError(e, t, i =
|
|
9313
|
+
handleSignalError(e, t, i = U.ERR_INNER) {
|
|
9314
9314
|
const s = `signal error: code - ${e}; description - ${t}`;
|
|
9315
9315
|
return new V(i, s);
|
|
9316
9316
|
}
|
|
@@ -9354,7 +9354,7 @@ const Ci = (Be = class extends we {
|
|
|
9354
9354
|
}, /**
|
|
9355
9355
|
* @ignore
|
|
9356
9356
|
*/
|
|
9357
|
-
m(
|
|
9357
|
+
m(Me, "logName", "RoomServerSignaling"), Me);
|
|
9358
9358
|
es([
|
|
9359
9359
|
D()
|
|
9360
9360
|
], Ci.prototype, "join", 1);
|
|
@@ -9385,12 +9385,12 @@ const k0 = "https://pgw.rtn.aliyuncs.com", B0 = "https://gw.rtn.aliyuncs.com", F
|
|
|
9385
9385
|
var g, l;
|
|
9386
9386
|
if (f.code === 0) {
|
|
9387
9387
|
const S = (g = f.data) == null ? void 0 : g.oss, v = (l = f.data) == null ? void 0 : l.sls;
|
|
9388
|
-
this.expiration = S.expiration || v.expiration, this.emit("onTokenUpdate", S, v),
|
|
9388
|
+
this.expiration = S.expiration || v.expiration, this.emit("onTokenUpdate", S, v), O.event(`[${ti.logName}]`, "getToken", S, v);
|
|
9389
9389
|
} else
|
|
9390
9390
|
throw new Error();
|
|
9391
9391
|
this.slsReporter.reportSTSResult(200, d);
|
|
9392
9392
|
}).catch((f) => {
|
|
9393
|
-
this.slsReporter.reportSTSResult(-1, d),
|
|
9393
|
+
this.slsReporter.reportSTSResult(-1, d), O.error(`[${ti.logName}]`, "getToken", f.message);
|
|
9394
9394
|
});
|
|
9395
9395
|
}));
|
|
9396
9396
|
this.slsReporter = e, this.env = t;
|
|
@@ -9434,7 +9434,7 @@ class ts extends we {
|
|
|
9434
9434
|
}
|
|
9435
9435
|
reset() {
|
|
9436
9436
|
var e;
|
|
9437
|
-
|
|
9437
|
+
O.info("[signalingmanager] reset"), (e = this.signaling) == null || e.reset(), this.stsManager.clear(), this.signaling = void 0, this.authInfo = void 0;
|
|
9438
9438
|
}
|
|
9439
9439
|
/**
|
|
9440
9440
|
* 向业务信令发送入会
|
|
@@ -9443,7 +9443,7 @@ class ts extends we {
|
|
|
9443
9443
|
*/
|
|
9444
9444
|
join(e, t = e.userId, i, s) {
|
|
9445
9445
|
return this.maxConnectRetryCount = i, this.userName = t, new Promise((a, c) => {
|
|
9446
|
-
this.signaling ? c(new V(
|
|
9446
|
+
this.signaling ? c(new V(U.ERR_JOIN_ALREADY_JOINED, "already joined")) : (O.info("[signalingmanager] create signaling"), this.signaling = new P0(this.channelProfile, this.clientRole, this.slsReporter, this.env), this.initSignaling(), s && (s.rs = Date.now()), this.signaling.join(e, t, i).then((o) => {
|
|
9447
9447
|
this.authInfo = e, s && (s.re = Date.now()), a(o);
|
|
9448
9448
|
}).catch((o) => {
|
|
9449
9449
|
this.reset(), c(o);
|
|
@@ -9474,7 +9474,7 @@ class ts extends we {
|
|
|
9474
9474
|
t(a);
|
|
9475
9475
|
}).catch((a) => {
|
|
9476
9476
|
i(a);
|
|
9477
|
-
})) : i(new V(
|
|
9477
|
+
})) : i(new V(U.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL, "no signaling"));
|
|
9478
9478
|
});
|
|
9479
9479
|
}
|
|
9480
9480
|
/**
|
|
@@ -9525,7 +9525,7 @@ class ts extends we {
|
|
|
9525
9525
|
* @returns
|
|
9526
9526
|
*/
|
|
9527
9527
|
refreshUrl(e) {
|
|
9528
|
-
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new V(
|
|
9528
|
+
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new V(U.ERR_SDK_INVALID_STATE, "should join first"));
|
|
9529
9529
|
}
|
|
9530
9530
|
refreshAuthInfo(e) {
|
|
9531
9531
|
return w(this, null, function* () {
|
|
@@ -9636,7 +9636,7 @@ class ts extends we {
|
|
|
9636
9636
|
*/
|
|
9637
9637
|
m(ts, "logName", "SignalingManager");
|
|
9638
9638
|
F0([
|
|
9639
|
-
D(
|
|
9639
|
+
D(H)
|
|
9640
9640
|
], ts.prototype, "publish", 1);
|
|
9641
9641
|
const Tt = class Tt {
|
|
9642
9642
|
static getInstance() {
|
|
@@ -9723,7 +9723,7 @@ class pn extends we {
|
|
|
9723
9723
|
return this.name;
|
|
9724
9724
|
}
|
|
9725
9725
|
createCallId() {
|
|
9726
|
-
this.callId || (this.callId =
|
|
9726
|
+
this.callId || (this.callId = He.createCallid());
|
|
9727
9727
|
}
|
|
9728
9728
|
setUserInfo(e, t) {
|
|
9729
9729
|
this.uid = e, this.name = t;
|
|
@@ -9815,11 +9815,11 @@ function Va(r) {
|
|
|
9815
9815
|
if (e) {
|
|
9816
9816
|
if (e.nodeName.toLocaleLowerCase() === "video")
|
|
9817
9817
|
return e.setAttribute("playsinline", ""), e;
|
|
9818
|
-
throw new V(
|
|
9818
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element should be HtmlVideoElement");
|
|
9819
9819
|
} else
|
|
9820
|
-
throw new V(
|
|
9820
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element not founded");
|
|
9821
9821
|
} else
|
|
9822
|
-
throw new V(
|
|
9822
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element id should be string");
|
|
9823
9823
|
}
|
|
9824
9824
|
function Fr(r) {
|
|
9825
9825
|
var e;
|
|
@@ -9886,7 +9886,7 @@ const Sn = (r, n, e = !1) => {
|
|
|
9886
9886
|
i(t());
|
|
9887
9887
|
}, 0);
|
|
9888
9888
|
});
|
|
9889
|
-
},
|
|
9889
|
+
}, it = (r) => {
|
|
9890
9890
|
Promise.race([vt(100), r._playPromise || Promise.resolve()]).catch(() => {
|
|
9891
9891
|
}).then(() => {
|
|
9892
9892
|
r.srcObject = null, r._playPromise = void 0;
|
|
@@ -10238,7 +10238,7 @@ const ge = (ht = class extends pn {
|
|
|
10238
10238
|
this.streamManager.publishLocalScreenStreamEnabled = e;
|
|
10239
10239
|
}
|
|
10240
10240
|
initInfo(e, t) {
|
|
10241
|
-
this.joinTime = Date.now(), this.rtsManager.localJoinTime = this.joinTime, this.setUserInfo(e.userId, e.userId), this.url = t, this.callId = e.sessionId ||
|
|
10241
|
+
this.joinTime = Date.now(), this.rtsManager.localJoinTime = this.joinTime, this.setUserInfo(e.userId, e.userId), this.url = t, this.callId = e.sessionId || He.createCallid(), this.updatePubId();
|
|
10242
10242
|
}
|
|
10243
10243
|
setVideoProfile(e, t) {
|
|
10244
10244
|
return w(this, null, function* () {
|
|
@@ -10271,7 +10271,7 @@ const ge = (ht = class extends pn {
|
|
|
10271
10271
|
facingMode: "environment"
|
|
10272
10272
|
});
|
|
10273
10273
|
else
|
|
10274
|
-
throw new V(
|
|
10274
|
+
throw new V(U.ERR_CAMERA_OPEN_FAIL, `camera direction set to ${e} failed`);
|
|
10275
10275
|
}
|
|
10276
10276
|
setCameraDeviceId(e) {
|
|
10277
10277
|
this.streamManager.setCameraVideoConstraints({
|
|
@@ -10310,7 +10310,7 @@ const ge = (ht = class extends pn {
|
|
|
10310
10310
|
});
|
|
10311
10311
|
}
|
|
10312
10312
|
resetElement(e) {
|
|
10313
|
-
this.previewElements.includes(e) && (
|
|
10313
|
+
this.previewElements.includes(e) && (it(e), this.previewElements.splice(this.previewElements.indexOf(e), 1)), this.screenPreviewElements.includes(e) && (it(e), this.screenPreviewElements.splice(this.screenPreviewElements.indexOf(e), 1));
|
|
10314
10314
|
}
|
|
10315
10315
|
setPreviewElement(e) {
|
|
10316
10316
|
const { videoElement: t, screen: i } = e;
|
|
@@ -10324,10 +10324,10 @@ const ge = (ht = class extends pn {
|
|
|
10324
10324
|
try {
|
|
10325
10325
|
a = yield oe.getCameraList(), a.length && (yield this.startCameraCapture());
|
|
10326
10326
|
} catch (c) {
|
|
10327
|
-
throw c.code === oe.ErrorCode.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED ? new V(
|
|
10327
|
+
throw c.code === oe.ErrorCode.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED ? new V(U.ERR_CAMERA_AUTH_FAIL, "camera auth fail") : new V(U.ERR_CAMERA_OPEN_FAIL, `camera open fail: ${c.message}`);
|
|
10328
10328
|
}
|
|
10329
10329
|
if (!a.length)
|
|
10330
|
-
throw new V(
|
|
10330
|
+
throw new V(U.ERR_CAMERA_NOT_AVAILABLE, "No camera device can be captured");
|
|
10331
10331
|
}
|
|
10332
10332
|
});
|
|
10333
10333
|
}
|
|
@@ -10339,10 +10339,10 @@ const ge = (ht = class extends pn {
|
|
|
10339
10339
|
try {
|
|
10340
10340
|
s = yield oe.getMicList(), s.length && (yield this.startAudioCapture());
|
|
10341
10341
|
} catch (a) {
|
|
10342
|
-
throw a.code === oe.ErrorCode.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED ? new V(
|
|
10342
|
+
throw a.code === oe.ErrorCode.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED ? new V(U.ERR_MIC_AUTH_FAIL, "microphone auth fail") : new V(U.ERR_MIC_OPEN_FAIL, `microphone open fail: ${a.message}`);
|
|
10343
10343
|
}
|
|
10344
10344
|
if (!s.length)
|
|
10345
|
-
throw new V(
|
|
10345
|
+
throw new V(U.ERR_MIC_NOT_AVAILABLE, "No microphone device can be captured");
|
|
10346
10346
|
}
|
|
10347
10347
|
});
|
|
10348
10348
|
}
|
|
@@ -10358,7 +10358,7 @@ const ge = (ht = class extends pn {
|
|
|
10358
10358
|
return;
|
|
10359
10359
|
}
|
|
10360
10360
|
if (![se.AliRtcVideoTrackCamera, se.AliRtcVideoTrackScreen].includes(t))
|
|
10361
|
-
throw new V(
|
|
10361
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "set view config invalid track", { track: t });
|
|
10362
10362
|
e.forEach((i) => {
|
|
10363
10363
|
this.setPreviewElement({
|
|
10364
10364
|
videoElement: i,
|
|
@@ -10405,16 +10405,16 @@ const ge = (ht = class extends pn {
|
|
|
10405
10405
|
try {
|
|
10406
10406
|
let s = i ? this.streamManager.screenStreamInfo.previewStream : this.streamManager.cameraStreamInfo.previewStream;
|
|
10407
10407
|
if (!t)
|
|
10408
|
-
throw new V(
|
|
10408
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "no video element found", {
|
|
10409
10409
|
videoElement: t
|
|
10410
10410
|
});
|
|
10411
10411
|
if (!s) {
|
|
10412
|
-
|
|
10412
|
+
O.info(`[${ht.logName}]`, "preview no stream founded");
|
|
10413
10413
|
return;
|
|
10414
10414
|
}
|
|
10415
10415
|
return Sn(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream;
|
|
10416
10416
|
} catch (s) {
|
|
10417
|
-
const a =
|
|
10417
|
+
const a = U.ERR_INNER;
|
|
10418
10418
|
throw V.fromError(s, a, "preview failed");
|
|
10419
10419
|
}
|
|
10420
10420
|
});
|
|
@@ -10442,17 +10442,17 @@ const ge = (ht = class extends pn {
|
|
|
10442
10442
|
const { videoElement: t, primary: i = !0, screen: s = !0 } = e || {};
|
|
10443
10443
|
if (!t)
|
|
10444
10444
|
i && (this.previewElements.forEach((a) => {
|
|
10445
|
-
|
|
10445
|
+
it(a);
|
|
10446
10446
|
}), this.previewElements = []), s && (this.screenPreviewElements.forEach((a) => {
|
|
10447
|
-
|
|
10447
|
+
it(a);
|
|
10448
10448
|
}), this.screenPreviewElements = []);
|
|
10449
10449
|
else {
|
|
10450
10450
|
const a = this.previewElements.findIndex((c) => c === t);
|
|
10451
10451
|
if (a >= 0)
|
|
10452
|
-
this.previewElements.splice(a, 1),
|
|
10452
|
+
this.previewElements.splice(a, 1), it(t);
|
|
10453
10453
|
else {
|
|
10454
10454
|
const c = this.screenPreviewElements.findIndex((o) => o === t);
|
|
10455
|
-
c >= 0 && (this.screenPreviewElements.splice(c, 1),
|
|
10455
|
+
c >= 0 && (this.screenPreviewElements.splice(c, 1), it(t));
|
|
10456
10456
|
}
|
|
10457
10457
|
}
|
|
10458
10458
|
}
|
|
@@ -10467,12 +10467,12 @@ const ge = (ht = class extends pn {
|
|
|
10467
10467
|
if (e.video)
|
|
10468
10468
|
for (let i = 0; i < this.previewElements.length; i++) {
|
|
10469
10469
|
const s = this.previewElements[i];
|
|
10470
|
-
|
|
10470
|
+
it(s);
|
|
10471
10471
|
}
|
|
10472
10472
|
else if (e.screen)
|
|
10473
10473
|
for (let i = 0; i < this.screenPreviewElements.length; i++) {
|
|
10474
10474
|
const s = this.screenPreviewElements[i];
|
|
10475
|
-
|
|
10475
|
+
it(s);
|
|
10476
10476
|
}
|
|
10477
10477
|
const t = yield this.streamManager.createLocalStream(e);
|
|
10478
10478
|
return t != null && t.audioTrack && this.audioVolumeIndicationInterval > 0 && this.audioLevelMonitor.start(t.audioTrack, this.audioVolumeIndicationInterval), e.video ? this.previewAll({ primary: !0 }) : e.screen && this.previewAll({ screen: !0 }), t;
|
|
@@ -10562,7 +10562,7 @@ const ge = (ht = class extends pn {
|
|
|
10562
10562
|
return;
|
|
10563
10563
|
const i = yield this.streamManager.publishStreams, { audio: s, video: a, videoSmall: c, screen: o } = i;
|
|
10564
10564
|
if (!s && !a && !c && !o) {
|
|
10565
|
-
|
|
10565
|
+
O.event(`[${ht.logName}]`, "startPublish no stream founded");
|
|
10566
10566
|
return;
|
|
10567
10567
|
}
|
|
10568
10568
|
this.createCallId();
|
|
@@ -10573,7 +10573,7 @@ const ge = (ht = class extends pn {
|
|
|
10573
10573
|
if (this._isPublishing = !0, this.streamTracks = this.rtsManager.publishingTracks, this.traceId = p, (u = this.parameter.data) != null && u.enablePubDataChannel) {
|
|
10574
10574
|
this.dataPubState.setState(Z.AliRtcStatePublishing);
|
|
10575
10575
|
const g = yield this.rtsManager.publishAddDataChannel(this.url);
|
|
10576
|
-
g ? (this.dc = g, this.dc.datachannel && (this.dc.datachannel.binaryType = "arraybuffer"), this.dataPubState.setState(Z.AliRtcStatePublished)) : this.emit("publishDataError", new V(
|
|
10576
|
+
g ? (this.dc = g, this.dc.datachannel && (this.dc.datachannel.binaryType = "arraybuffer"), this.dataPubState.setState(Z.AliRtcStatePublished)) : this.emit("publishDataError", new V(U.ERR_INNER, "publishDataError"));
|
|
10577
10577
|
}
|
|
10578
10578
|
s && (this.trackTraceIdMap[k.Audio] = p, this.reportAudioProfile()), c && (this.trackTraceIdMap[k.VideoSmall] = p), a && (this.trackTraceIdMap[k.VideoLarge] = p, this.reportVideoProfile()), o && (this.trackTraceIdMap[k.Screen] = p, this.reportScreenProfile());
|
|
10579
10579
|
const f = {
|
|
@@ -10668,7 +10668,7 @@ const ge = (ht = class extends pn {
|
|
|
10668
10668
|
return w(this, null, function* () {
|
|
10669
10669
|
var o;
|
|
10670
10670
|
if (!e)
|
|
10671
|
-
throw new V(
|
|
10671
|
+
throw new V(U.ERR_INNER, "sync publish to room server failed because no publishInfo");
|
|
10672
10672
|
let s = e;
|
|
10673
10673
|
if (this.dc) {
|
|
10674
10674
|
const c = e, { tracks: u } = c, h = Ft(c, ["tracks"]);
|
|
@@ -10690,7 +10690,7 @@ const ge = (ht = class extends pn {
|
|
|
10690
10690
|
}
|
|
10691
10691
|
refreshPushStreamUrl() {
|
|
10692
10692
|
return w(this, null, function* () {
|
|
10693
|
-
const e = new V(
|
|
10693
|
+
const e = new V(U.ERR_INNER, "refresh push stream url error"), t = this.url;
|
|
10694
10694
|
if (!t)
|
|
10695
10695
|
throw e;
|
|
10696
10696
|
const i = yield this.signalingManager.refreshUrl({
|
|
@@ -10726,8 +10726,8 @@ const ge = (ht = class extends pn {
|
|
|
10726
10726
|
};
|
|
10727
10727
|
return this.reportSelfDeviceStatus(), this.monitorTimerId || this.startStreamMonitor(), p;
|
|
10728
10728
|
} catch (h) {
|
|
10729
|
-
let p =
|
|
10730
|
-
if (a && (this.audioPubState.setState(Z.AliRtcStateNoPublish), p =
|
|
10729
|
+
let p = U.ERR_SDK_PUBLISH_INVAILD;
|
|
10730
|
+
if (a && (this.audioPubState.setState(Z.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), c && (this.videoPubState.setState(Z.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), o && (this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED), u && (this.screenPubState.setState(Z.AliRtcStateNoPublish), p = U.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED), h.errorCode === 15006 && s < 3)
|
|
10731
10731
|
return this.publishAdd(e, t, i, s + 1);
|
|
10732
10732
|
throw V.fromError(h, p, "publish add failed");
|
|
10733
10733
|
}
|
|
@@ -10754,7 +10754,7 @@ const ge = (ht = class extends pn {
|
|
|
10754
10754
|
} catch (i) {
|
|
10755
10755
|
throw V.fromError(
|
|
10756
10756
|
i,
|
|
10757
|
-
|
|
10757
|
+
U.ERR_INNER,
|
|
10758
10758
|
`publish replace failed, vMsid: ${t == null ? void 0 : t.vMsid} aMsid: ${t == null ? void 0 : t.aMsid}`
|
|
10759
10759
|
);
|
|
10760
10760
|
}
|
|
@@ -10778,7 +10778,7 @@ const ge = (ht = class extends pn {
|
|
|
10778
10778
|
try {
|
|
10779
10779
|
return yield this.rtsManager.publishDelete(this.url, e), this.streamTracks = this.rtsManager.publishingTracks, e.audio && this.audioPubState.setState(Z.AliRtcStateNoPublish), e.video && (e.vMsid === k.VideoSmall ? this.videoSmallPubState.setState(Z.AliRtcStateNoPublish) : this.videoPubState.setState(Z.AliRtcStateNoPublish)), e.screen && this.screenPubState.setState(Z.AliRtcStateNoPublish), t.tracks = this.streamTracks, this.reportSelfDeviceStatus(), t;
|
|
10780
10780
|
} catch (i) {
|
|
10781
|
-
throw V.fromError(i,
|
|
10781
|
+
throw V.fromError(i, U.ERR_INNER, "publish delete tracks failed");
|
|
10782
10782
|
}
|
|
10783
10783
|
});
|
|
10784
10784
|
}
|
|
@@ -10786,10 +10786,10 @@ const ge = (ht = class extends pn {
|
|
|
10786
10786
|
return w(this, null, function* () {
|
|
10787
10787
|
if (!this._isPublishing)
|
|
10788
10788
|
throw new V(
|
|
10789
|
-
|
|
10789
|
+
U.ERR_INNER,
|
|
10790
10790
|
"publish stop failed, previous localStream is required for publishing stopping"
|
|
10791
10791
|
);
|
|
10792
|
-
|
|
10792
|
+
O.info(`[${ht.logName}]`, "publishStop", { url: this.url });
|
|
10793
10793
|
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
10794
10794
|
try {
|
|
10795
10795
|
const t = this.hasAudioTrackInMS, i = this.hasCameraTrackInMS, s = this.hasCameraDualTrackInMS, a = this.hasScreenTrackInMS;
|
|
@@ -10811,7 +10811,7 @@ const ge = (ht = class extends pn {
|
|
|
10811
10811
|
};
|
|
10812
10812
|
return this.syncPublishToRoomServer(c, {}, e), c;
|
|
10813
10813
|
} catch (t) {
|
|
10814
|
-
throw V.fromError(t,
|
|
10814
|
+
throw V.fromError(t, U.ERR_INNER, "publish stop failed");
|
|
10815
10815
|
}
|
|
10816
10816
|
});
|
|
10817
10817
|
}
|
|
@@ -10838,7 +10838,7 @@ const ge = (ht = class extends pn {
|
|
|
10838
10838
|
}
|
|
10839
10839
|
return this.dc && (this.rtsManager.publishStopDataChannel(this.url, this.dc), this.dataPubState.setState(Z.AliRtcStateNoPublish), this.dc = void 0), this.slsReporter.reportUnpublish(this.callId || "", e, 0, ""), t;
|
|
10840
10840
|
} catch (i) {
|
|
10841
|
-
throw V.fromError(i,
|
|
10841
|
+
throw V.fromError(i, U.ERR_INNER, "unpublish failed");
|
|
10842
10842
|
}
|
|
10843
10843
|
});
|
|
10844
10844
|
}
|
|
@@ -10846,7 +10846,7 @@ const ge = (ht = class extends pn {
|
|
|
10846
10846
|
* 事件通知本地的设备使用状态
|
|
10847
10847
|
*/
|
|
10848
10848
|
reportSelfDeviceStatus() {
|
|
10849
|
-
this.emit(
|
|
10849
|
+
this.emit(Ne.Local, this.getDeviceStatus());
|
|
10850
10850
|
}
|
|
10851
10851
|
/**
|
|
10852
10852
|
* 从localStream 中获取当前的设备状态
|
|
@@ -10997,9 +10997,9 @@ const ge = (ht = class extends pn {
|
|
|
10997
10997
|
return w(this, null, function* () {
|
|
10998
10998
|
var s;
|
|
10999
10999
|
if (!((s = this.parameter.data) != null && s.enablePubDataChannel))
|
|
11000
|
-
throw new V(
|
|
11000
|
+
throw new V(U.ERR_INNER, "data channel publish is not enabled");
|
|
11001
11001
|
if (!this.dc)
|
|
11002
|
-
throw new V(
|
|
11002
|
+
throw new V(U.ERR_INNER, "data channel is not ready");
|
|
11003
11003
|
const t = e.toBuffer(), i = j0(t, 1156);
|
|
11004
11004
|
i.forEach((a, c) => {
|
|
11005
11005
|
const o = new Ri(
|
|
@@ -11059,10 +11059,10 @@ me([
|
|
|
11059
11059
|
D()
|
|
11060
11060
|
], ge.prototype, "clear", 1);
|
|
11061
11061
|
me([
|
|
11062
|
-
D(
|
|
11062
|
+
D(H)
|
|
11063
11063
|
], ge.prototype, "startDefaultCamera", 1);
|
|
11064
11064
|
me([
|
|
11065
|
-
D(
|
|
11065
|
+
D(H)
|
|
11066
11066
|
], ge.prototype, "startDefaultAudio", 1);
|
|
11067
11067
|
me([
|
|
11068
11068
|
D()
|
|
@@ -11092,13 +11092,13 @@ me([
|
|
|
11092
11092
|
D()
|
|
11093
11093
|
], ge.prototype, "stopLocalStream", 1);
|
|
11094
11094
|
me([
|
|
11095
|
-
D(
|
|
11095
|
+
D(H)
|
|
11096
11096
|
], ge.prototype, "startPublish", 1);
|
|
11097
11097
|
me([
|
|
11098
11098
|
D()
|
|
11099
11099
|
], ge.prototype, "updateStreams", 1);
|
|
11100
11100
|
me([
|
|
11101
|
-
D(
|
|
11101
|
+
D(H)
|
|
11102
11102
|
], ge.prototype, "publishUpdate", 1);
|
|
11103
11103
|
me([
|
|
11104
11104
|
D(([r]) => [r])
|
|
@@ -11113,7 +11113,7 @@ me([
|
|
|
11113
11113
|
D(([r, n]) => [JSON.stringify(n)])
|
|
11114
11114
|
], ge.prototype, "publishReplace", 1);
|
|
11115
11115
|
me([
|
|
11116
|
-
D(
|
|
11116
|
+
D(H)
|
|
11117
11117
|
], ge.prototype, "publishDeleteTracks", 1);
|
|
11118
11118
|
me([
|
|
11119
11119
|
D()
|
|
@@ -11140,7 +11140,7 @@ const $0 = (r) => {
|
|
|
11140
11140
|
}), K0 = (r) => {
|
|
11141
11141
|
const { audio: n, video: e, screen: t } = r;
|
|
11142
11142
|
if (e && t)
|
|
11143
|
-
throw new V(
|
|
11143
|
+
throw new V(U.ERR_INNER, "create stream error, cannot create video && screen together");
|
|
11144
11144
|
return !(!e && !n && !t);
|
|
11145
11145
|
}, q0 = (r) => r === k.Audio || r === zr.Audio, J0 = (r) => r === k.VideoLarge || r === zr.VideoLarge, G0 = (r) => r === k.VideoSmall, X0 = (r) => r === k.Screen, Y0 = (r) => r === k.Data;
|
|
11146
11146
|
var Z0 = Object.defineProperty, Q0 = Object.getOwnPropertyDescriptor, ec = (r, n, e, t) => {
|
|
@@ -11380,7 +11380,7 @@ class bi extends we {
|
|
|
11380
11380
|
updateRemoteUserDeviceStatus(e) {
|
|
11381
11381
|
let t = gn.parseStatus(e);
|
|
11382
11382
|
const { audioDisable: i, videoDisable: s, screenDisable: a } = t;
|
|
11383
|
-
return this.userStatus ? (this.userStatus.audioDisable != i && (this.userStatus.audioDisable = i, this.emit(
|
|
11383
|
+
return this.userStatus ? (this.userStatus.audioDisable != i && (this.userStatus.audioDisable = i, this.emit(Ne.Remote, i ? ce.MuteAudio : ce.UnmuteAudio)), this.userStatus.videoDisable != s && (this.userStatus.videoDisable = s, this.emit(Ne.Remote, s ? ce.MuteVideo : ce.UnmuteVideo)), this.userStatus.screenDisable != a && (this.userStatus.screenDisable = a, this.emit(Ne.Remote, a ? ce.MuteScreen : ce.UnmuteScreen))) : (this.userStatus = t, this.emit(Ne.Remote, i ? ce.MuteAudio : ce.UnmuteAudio), this.emit(Ne.Remote, s ? ce.MuteVideo : ce.UnmuteVideo), this.emit(Ne.Remote, a ? ce.MuteScreen : ce.UnmuteScreen)), !1;
|
|
11384
11384
|
}
|
|
11385
11385
|
}
|
|
11386
11386
|
/**
|
|
@@ -11468,8 +11468,8 @@ class Ut extends we {
|
|
|
11468
11468
|
}
|
|
11469
11469
|
}
|
|
11470
11470
|
const sc = 30;
|
|
11471
|
-
var
|
|
11472
|
-
const _e = (
|
|
11471
|
+
var Te;
|
|
11472
|
+
const _e = (Te = class extends pn {
|
|
11473
11473
|
constructor(e) {
|
|
11474
11474
|
var f;
|
|
11475
11475
|
const {
|
|
@@ -11552,27 +11552,27 @@ const _e = (it = class extends pn {
|
|
|
11552
11552
|
this.dcMsgWaitingPieces = [], i || (i = Wt.parse(t.body));
|
|
11553
11553
|
} else
|
|
11554
11554
|
i = Wt.parse(t.body);
|
|
11555
|
-
i ||
|
|
11556
|
-
`[${
|
|
11555
|
+
i || O.event(
|
|
11556
|
+
`[${Te.logName}]`,
|
|
11557
11557
|
`parse data channel message fail, piece count: ${this.dcMsgWaitingPieces.length + 1}`
|
|
11558
11558
|
);
|
|
11559
11559
|
} else {
|
|
11560
11560
|
t.header.frameType === 1 && (this.dcMsgWaitingPieces = []), this.dcMsgWaitingPieces.push(t.body);
|
|
11561
11561
|
return;
|
|
11562
11562
|
}
|
|
11563
|
-
i && (
|
|
11564
|
-
`[${
|
|
11563
|
+
i && (O.event(
|
|
11564
|
+
`[${Te.logName}]`,
|
|
11565
11565
|
`receive data channel message, length: ${(s = i.data) == null ? void 0 : s.byteLength}`
|
|
11566
11566
|
), this.emit("remoteDataChannelMessage", this.uid, i));
|
|
11567
11567
|
});
|
|
11568
11568
|
m(this, "onDataChannelError", (e) => {
|
|
11569
|
-
this.emit("occurError", V.fromError(e,
|
|
11569
|
+
this.emit("occurError", V.fromError(e, U.ERR_SDK_SUBSCRIBE_DATA_ERROR));
|
|
11570
11570
|
});
|
|
11571
11571
|
m(this, "handleAudioPaused", () => {
|
|
11572
11572
|
this.emit("remoteAudioPlayError", this.uid, "paused");
|
|
11573
11573
|
});
|
|
11574
|
-
this.streamInfo = new bi(), this.remoteUserInfo = new tc(this), this.parameter = d, this.streamInfo.on(
|
|
11575
|
-
this.emit(
|
|
11574
|
+
this.streamInfo = new bi(), this.remoteUserInfo = new tc(this), this.parameter = d, this.streamInfo.on(Ne.Remote, (g) => {
|
|
11575
|
+
this.emit(Ne.Remote, g, this.userId);
|
|
11576
11576
|
}), this.signalingManager = o, this.viewMap = (f = a[t]) != null ? f : { cameraViews: [], screenViews: [] }, a[t] = this.viewMap, this.slsReporter = c, this.localUser = u, this.audioSubState = new Ut(), this.audioSubState.on("change", (g, l, S) => {
|
|
11577
11577
|
this.emit("audioSubscribeStateChanged", this.uid, g, l, S);
|
|
11578
11578
|
}), this.videoSubState = new Ut(), this.videoSubState.on("change", (g, l, S) => {
|
|
@@ -11698,7 +11698,7 @@ const _e = (it = class extends pn {
|
|
|
11698
11698
|
setViewConfig(e, t) {
|
|
11699
11699
|
if (t !== se.AliRtcVideoTrackScreen && t !== se.AliRtcVideoTrackCamera)
|
|
11700
11700
|
throw new V(
|
|
11701
|
-
|
|
11701
|
+
U.ERR_INVALID_ARGUMENTS,
|
|
11702
11702
|
"track is not AliRtcVideoTrackScreen or AliRtcVideoTrackCamera"
|
|
11703
11703
|
);
|
|
11704
11704
|
e ? Fr(e).forEach((s) => {
|
|
@@ -11708,7 +11708,7 @@ const _e = (it = class extends pn {
|
|
|
11708
11708
|
clear(e = !0) {
|
|
11709
11709
|
return w(this, null, function* () {
|
|
11710
11710
|
var t;
|
|
11711
|
-
this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Pi(
|
|
11711
|
+
this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Pi(Te.prototype, this, "clear").call(this), this.stopPlayAudio(), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0, zt.getInstance().removeEventListener("statechange", this.handleAudioContextSuspended)), (t = this.streamInfo) == null || t.removeAllListeners(Ne.Remote);
|
|
11712
11712
|
});
|
|
11713
11713
|
}
|
|
11714
11714
|
updateRemoteUserDeviceStatus(e) {
|
|
@@ -11791,8 +11791,8 @@ const _e = (it = class extends pn {
|
|
|
11791
11791
|
} catch (p) {
|
|
11792
11792
|
const d = (/* @__PURE__ */ new Date()).getTime() - s;
|
|
11793
11793
|
e.audio && this.audioSubState.setState(de.AliRtcStateNoSubscribe), e.video && this.videoSubState.setState(de.AliRtcStateNoSubscribe), e.screen && this.screenSubState.setState(de.AliRtcStateNoSubscribe), p && (p.message = `user(${this.uid}) subscribe error, ${(p == null ? void 0 : p.message) || ""}`);
|
|
11794
|
-
let f =
|
|
11795
|
-
e.audio && (f =
|
|
11794
|
+
let f = U.ERR_INNER;
|
|
11795
|
+
e.audio && (f = U.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED), e.video && (e.vMsid === k.VideoSmall ? f = U.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED : f = U.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED), e.screen && (f = U.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED), this.slsReporter.reportSubscribe(
|
|
11796
11796
|
((h = this.localUser) == null ? void 0 : h.callId) || "",
|
|
11797
11797
|
this.callId,
|
|
11798
11798
|
!!e.video && e.vMsid === k.VideoLarge,
|
|
@@ -11852,7 +11852,7 @@ const _e = (it = class extends pn {
|
|
|
11852
11852
|
vMsid: e.vMsid
|
|
11853
11853
|
}), o;
|
|
11854
11854
|
} catch (t) {
|
|
11855
|
-
throw V.fromError(t,
|
|
11855
|
+
throw V.fromError(t, U.ERR_INNER, "subscribe delete failed");
|
|
11856
11856
|
}
|
|
11857
11857
|
});
|
|
11858
11858
|
}
|
|
@@ -11914,7 +11914,7 @@ const _e = (it = class extends pn {
|
|
|
11914
11914
|
return this.callId = "", u;
|
|
11915
11915
|
} catch (u) {
|
|
11916
11916
|
if (((o = (c = (a = (s = u == null ? void 0 : u.extraInfo) == null ? void 0 : s.parsedData) == null ? void 0 : a.streams) == null ? void 0 : c[0]) == null ? void 0 : o.res_code) !== 404)
|
|
11917
|
-
throw V.fromError(u,
|
|
11917
|
+
throw V.fromError(u, U.ERR_INNER, "subscribe stop failed");
|
|
11918
11918
|
}
|
|
11919
11919
|
});
|
|
11920
11920
|
}
|
|
@@ -11925,7 +11925,7 @@ const _e = (it = class extends pn {
|
|
|
11925
11925
|
if (e.mediaStream) {
|
|
11926
11926
|
a = document.createElement("video");
|
|
11927
11927
|
const c = () => {
|
|
11928
|
-
|
|
11928
|
+
O.event(`uid: ${this.userId} new mediaStream canplay`), a && a.removeEventListener("canplaythrough", c, !1), a = void 0, clearTimeout(s), i(!0);
|
|
11929
11929
|
};
|
|
11930
11930
|
a.addEventListener("canplaythrough", c, !1), (a._playPromise || Promise.resolve()).then(() => {
|
|
11931
11931
|
a && e.mediaStream && (a.srcObject = e.mediaStream);
|
|
@@ -11933,7 +11933,7 @@ const _e = (it = class extends pn {
|
|
|
11933
11933
|
} else
|
|
11934
11934
|
i(!0);
|
|
11935
11935
|
s = window.setTimeout(() => {
|
|
11936
|
-
|
|
11936
|
+
O.event(`uid: ${this.userId} new mediaStream timeout`), a = void 0, i(!0);
|
|
11937
11937
|
}, 3e3);
|
|
11938
11938
|
}), this.updateSubscribe(le.User)), this.stream = e, this.playAll(!1, t), !this.subscribed && e && (this.subscribed = !0), e.hasAudio && this.isAudioSubscribing && e.enableAudio(), e.hasVideo && this.isVideoSubscribing && e.enableVideo();
|
|
11939
11939
|
});
|
|
@@ -11964,7 +11964,7 @@ const _e = (it = class extends pn {
|
|
|
11964
11964
|
} else
|
|
11965
11965
|
throw new Error("no dc founded");
|
|
11966
11966
|
}).catch((e) => {
|
|
11967
|
-
const t = V.fromError(e,
|
|
11967
|
+
const t = V.fromError(e, U.ERR_INNER, "subscribe data failed");
|
|
11968
11968
|
this.emit("remoteSubscribeError", t), this.dataSubState.setState(de.AliRtcStateNoSubscribe);
|
|
11969
11969
|
}));
|
|
11970
11970
|
}
|
|
@@ -12009,7 +12009,7 @@ const _e = (it = class extends pn {
|
|
|
12009
12009
|
var a, c, o, u, h, p, d, f, g, l, S, v, x, b, y, E, I;
|
|
12010
12010
|
const t = Date.now(), i = {}, s = {};
|
|
12011
12011
|
if (this.wantSubAudio && !this.isAudioSubscribing && ((a = this.streamInfo) != null && a.hasAudio) ? (i.audio = !0, i.aMsid = ((c = this.streamInfo.getAudioInfo()) == null ? void 0 : c.msid) || k.Audio) : (!this.wantSubAudio || !((o = this.streamInfo) != null && o.hasAudio)) && this.isAudioSubscribing && (s.audio = !0, s.aMsid = ((u = this.streamInfo.getAudioInfo()) == null ? void 0 : u.msid) || k.Audio), this.wantSubVideo && ((h = this.streamInfo) != null && h.hasVideo) ? (this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && !this.isVideoSmallSubscribing && ((p = this.streamInfo) != null && p.hasVideoSmall) ? (i.video = !0, i.vMsid = k.VideoSmall) : !this.isVideoLargeSubscribing && ((d = this.streamInfo) != null && d.hasVideoLarge) && !(this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && this.isVideoSmallSubscribing) && (i.video = !0, i.vMsid = ((f = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : f.msid) || k.VideoLarge), this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall ? (s.video = !0, s.vMsid = k.VideoLarge) : this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeHigh && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && (s.video = !0, s.vMsid = k.VideoSmall)) : (!this.wantSubVideo || !((g = this.streamInfo) != null && g.hasVideo)) && this.isVideoSubscribing && (s.video = !0, s.vMsid = this.streamInfo.isVideoSmallSubscribed || this.streamInfo.isVideoSmallSubscribing ? k.VideoSmall : ((l = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : l.msid) || k.VideoLarge), this.wantSubScreen && !this.isScreenSubscribing && ((S = this.streamInfo) != null && S.hasScreen) ? i.screen = !0 : (!this.wantSubScreen || !((v = this.streamInfo) != null && v.hasScreen)) && this.isScreenSubscribing && (s.screen = !0), (x = this.parameter.data) != null && x.enableSubDataChannel && !this.isDataSubscribing && ((b = this.streamInfo) != null && b.hasData) ? i.data = !0 : (!((y = this.parameter.data) != null && y.enableSubDataChannel) || !((E = this.streamInfo) != null && E.hasData)) && this.isDataSubscribing && (s.data = !0), (i.audio || i.video || i.screen || i.data) && (this.createCallId(), this.subscribe(i, e, t)), (s.audio || s.video || s.screen) && this.subscribeDeleteTracks(s), e === le.Reconnect) {
|
|
12012
|
-
if (
|
|
12012
|
+
if (O.event(`[${Te.logName}]`, "reconnect, try to resume"), this.streamInfo.hasAudio && !i.audio) {
|
|
12013
12013
|
const A = this.rtsManager.getStreamByMsid({
|
|
12014
12014
|
url: this.streamUrl,
|
|
12015
12015
|
aMsid: this.streamInfo.getAudioInfo().msid || k.Audio
|
|
@@ -12037,7 +12037,7 @@ const _e = (it = class extends pn {
|
|
|
12037
12037
|
};
|
|
12038
12038
|
}
|
|
12039
12039
|
handleAutoPlayFailed() {
|
|
12040
|
-
|
|
12040
|
+
O.event(`[${Te.logName}]`, "auto play failed"), this.emit("remoteAudioAutoPlayFail", this.uid);
|
|
12041
12041
|
const e = () => {
|
|
12042
12042
|
this.resumeAudio().then(() => {
|
|
12043
12043
|
document.removeEventListener("click", e, !1), document.removeEventListener("touchstart", e, !1);
|
|
@@ -12057,41 +12057,45 @@ const _e = (it = class extends pn {
|
|
|
12057
12057
|
playAudio() {
|
|
12058
12058
|
return w(this, null, function* () {
|
|
12059
12059
|
var e, t;
|
|
12060
|
-
if (this.audioTrack) {
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12060
|
+
if (!this.audioTrack) {
|
|
12061
|
+
O.event(`[${Te.logName}]`, this.userId, "audio track is null");
|
|
12062
|
+
return;
|
|
12063
|
+
}
|
|
12064
|
+
if (this.toggleAudio(!this.audioMuted), this.audioElement || (O.event(`[${Te.logName}]`, this.userId, "create audio element"), this.audioElement = document.createElement("audio"), this.audioElement.addEventListener("pause", this.handleAudioPaused), this.setPlayoutVolume(this.playoutVolume)), ((t = (e = this.audioElement.srcObject) == null ? void 0 : e.getAudioTracks()) == null ? void 0 : t[0]) !== this.audioTrack) {
|
|
12065
|
+
let i = this.audioElement.srcObject;
|
|
12066
|
+
i ? i.getAudioTracks().forEach((s) => {
|
|
12067
|
+
i.removeTrack(s);
|
|
12068
|
+
}) : (i = new MediaStream(), this.audioElement.srcObject = i), i.addTrack(this.audioTrack);
|
|
12069
|
+
}
|
|
12070
|
+
if (!oe.BrowserUtil.isMicroMessenger && oe.SystenUtil.isIos && parseInt(oe.SystenUtil.systemVersion) <= 13) {
|
|
12071
|
+
O.event(`[${Te.logName}]`, "play audio for iOS 13-");
|
|
12072
|
+
const i = this.audioElement;
|
|
12073
|
+
i.setAttribute("autoplay", "");
|
|
12074
|
+
const s = () => {
|
|
12075
|
+
i.removeEventListener("playing", s), i.pause(), i.play().catch(() => {
|
|
12076
|
+
this.handleAutoPlayFailed();
|
|
12077
|
+
});
|
|
12078
|
+
};
|
|
12079
|
+
this.audioElement.addEventListener("playing", s);
|
|
12080
|
+
} else {
|
|
12081
|
+
const i = () => {
|
|
12082
|
+
var s;
|
|
12083
|
+
O.event(`[${Te.logName}]`, "try play audio"), (s = this.audioElement) == null || s.play().catch(() => {
|
|
12084
|
+
this.handleAutoPlayFailed();
|
|
12085
|
+
});
|
|
12086
|
+
};
|
|
12087
|
+
if (oe.BrowserUtil.isMicroMessenger) {
|
|
12088
|
+
O.event(`[${Te.logName}]`, "play audio for WeChat");
|
|
12089
|
+
const s = window.top !== window.self, a = window.WeixinJSBridge || window.top.WeixinJSBridge;
|
|
12090
|
+
a ? a.invoke("getNetworkType", {}, () => {
|
|
12091
|
+
i();
|
|
12092
|
+
}) : (s ? window.top.document : document).addEventListener("WeixinJSBridgeReady", () => {
|
|
12093
|
+
a.invoke("getNetworkType", {}, () => {
|
|
12086
12094
|
i();
|
|
12087
|
-
}) : (s ? window.top.document : document).addEventListener("WeixinJSBridgeReady", () => {
|
|
12088
|
-
a.invoke("getNetworkType", {}, () => {
|
|
12089
|
-
i();
|
|
12090
|
-
});
|
|
12091
12095
|
});
|
|
12092
|
-
}
|
|
12093
|
-
|
|
12094
|
-
|
|
12096
|
+
});
|
|
12097
|
+
} else
|
|
12098
|
+
O.event(`[${Te.logName}]`, "play audio for browsers except WeChat"), i();
|
|
12095
12099
|
}
|
|
12096
12100
|
});
|
|
12097
12101
|
}
|
|
@@ -12116,9 +12120,9 @@ const _e = (it = class extends pn {
|
|
|
12116
12120
|
}
|
|
12117
12121
|
stopPlayAll(e = !1) {
|
|
12118
12122
|
e ? this.viewMap.screenViews.forEach((t) => {
|
|
12119
|
-
|
|
12123
|
+
it(t);
|
|
12120
12124
|
}) : this.viewMap.cameraViews.forEach((t) => {
|
|
12121
|
-
|
|
12125
|
+
it(t);
|
|
12122
12126
|
});
|
|
12123
12127
|
}
|
|
12124
12128
|
/**
|
|
@@ -12258,7 +12262,7 @@ const _e = (it = class extends pn {
|
|
|
12258
12262
|
}, /**
|
|
12259
12263
|
* @ignore
|
|
12260
12264
|
*/
|
|
12261
|
-
m(
|
|
12265
|
+
m(Te, "logName", "RemoteUser"), Te);
|
|
12262
12266
|
De([
|
|
12263
12267
|
D()
|
|
12264
12268
|
], _e.prototype, "clear", 1);
|
|
@@ -12269,25 +12273,25 @@ De([
|
|
|
12269
12273
|
D()
|
|
12270
12274
|
], _e.prototype, "updateRemoteTracks", 1);
|
|
12271
12275
|
De([
|
|
12272
|
-
D(
|
|
12276
|
+
D(H)
|
|
12273
12277
|
], _e.prototype, "subscribe", 1);
|
|
12274
12278
|
De([
|
|
12275
12279
|
D()
|
|
12276
12280
|
], _e.prototype, "subscribeProxy", 1);
|
|
12277
12281
|
De([
|
|
12278
|
-
D(
|
|
12282
|
+
D(H)
|
|
12279
12283
|
], _e.prototype, "subscribeDeleteProxy", 1);
|
|
12280
12284
|
De([
|
|
12281
12285
|
D()
|
|
12282
12286
|
], _e.prototype, "restore", 1);
|
|
12283
12287
|
De([
|
|
12284
|
-
D(
|
|
12288
|
+
D(H)
|
|
12285
12289
|
], _e.prototype, "resumeAudio", 1);
|
|
12286
12290
|
De([
|
|
12287
|
-
D(
|
|
12291
|
+
D(H)
|
|
12288
12292
|
], _e.prototype, "stopSubscribe", 1);
|
|
12289
12293
|
De([
|
|
12290
|
-
D(
|
|
12294
|
+
D(H)
|
|
12291
12295
|
], _e.prototype, "doStopSubscribe", 1);
|
|
12292
12296
|
De([
|
|
12293
12297
|
D()
|
|
@@ -12356,8 +12360,8 @@ const wi = ([r]) => {
|
|
|
12356
12360
|
const { remoteUser: n, options: e } = r;
|
|
12357
12361
|
return [`user(${n.userId})`, e];
|
|
12358
12362
|
}, za = 5;
|
|
12359
|
-
var
|
|
12360
|
-
const xe = (
|
|
12363
|
+
var Le;
|
|
12364
|
+
const xe = (Le = class extends we {
|
|
12361
12365
|
constructor(e, t, i, s, a) {
|
|
12362
12366
|
super();
|
|
12363
12367
|
m(this, "rts");
|
|
@@ -12384,11 +12388,11 @@ const xe = (Me = class extends we {
|
|
|
12384
12388
|
addRTSListener() {
|
|
12385
12389
|
this.rts.on("connectStatusChange", (e) => {
|
|
12386
12390
|
var t, i, s, a;
|
|
12387
|
-
if (
|
|
12391
|
+
if (O.event(`[${Le.logName}]`, "rts connectStatusChange to:", e.status), e.status === ps.CONNECT_STATUS_DISCONNECTED)
|
|
12388
12392
|
this.setConnected(!1), this.slsReporter.reportWarning("rts disconnected"), this.emit("disconnected");
|
|
12389
12393
|
else if (e.status === ps.CONNECT_STATUS_CONNECTED) {
|
|
12390
12394
|
const c = (a = (s = (i = (t = this.rts.commonController) == null ? void 0 : t.peerCore) == null ? void 0 : i.getSignal()) == null ? void 0 : s.getDatachannelCore()) == null ? void 0 : a.readyState;
|
|
12391
|
-
|
|
12395
|
+
O.event(`[${Le.logName}]`, "dcReadyState:", c), c === "open" && this.dcResolve && this.dcResolve(!0), this._rtsReconnecting && this._rtsPeerConnectionType === "publish" && (this._publishingTracks = this.rts.getPublishTrackInfoList());
|
|
12392
12396
|
try {
|
|
12393
12397
|
this.emit("connected", this._rtsReconnecting, this._rtsPeerConnectionType);
|
|
12394
12398
|
} catch (o) {
|
|
@@ -12396,7 +12400,7 @@ const xe = (Me = class extends we {
|
|
|
12396
12400
|
this.setConnected(!0);
|
|
12397
12401
|
}
|
|
12398
12402
|
}), this.rts.on("datachannelStatusChange", (e) => {
|
|
12399
|
-
|
|
12403
|
+
O.event(`[${Le.logName}]`, "rts datachannelStatusChange to:", e.status), e.status === gs.DATACHANNEL_STATUS_OPEN ? this.dcResolve && this.dcResolve(!0) : e.status === gs.DATACHANNEL_STATUS_CLOSE && (this.dcConnectingPromise = new Promise((t) => {
|
|
12400
12404
|
this.dcResolve = t;
|
|
12401
12405
|
}));
|
|
12402
12406
|
}), this.rts.on("receivedSEI", (e) => {
|
|
@@ -12486,7 +12490,7 @@ const xe = (Me = class extends we {
|
|
|
12486
12490
|
let o;
|
|
12487
12491
|
const { publishStream: u, videoSmallStream: h, screenStream: p, vMsid: d } = yield this.localStreamManager.createHTTPPublishStream();
|
|
12488
12492
|
if (!u)
|
|
12489
|
-
return
|
|
12493
|
+
return O.warn(`[${Le.logName}]`, "publishStream is null"), {
|
|
12490
12494
|
traceId: "",
|
|
12491
12495
|
l1ip: o
|
|
12492
12496
|
};
|
|
@@ -12530,7 +12534,7 @@ const xe = (Me = class extends we {
|
|
|
12530
12534
|
v
|
|
12531
12535
|
), V.fromRtsError(y);
|
|
12532
12536
|
}
|
|
12533
|
-
|
|
12537
|
+
O.event(`[${Le.logName}]`, "rts publish success", S), this.slsReporter.reportPublish(
|
|
12534
12538
|
i,
|
|
12535
12539
|
e,
|
|
12536
12540
|
t,
|
|
@@ -12608,13 +12612,13 @@ const xe = (Me = class extends we {
|
|
|
12608
12612
|
try {
|
|
12609
12613
|
const A = yield Oa(
|
|
12610
12614
|
(C) => w(this, null, function* () {
|
|
12611
|
-
return C > 0 &&
|
|
12615
|
+
return C > 0 && O.event(`[${Le.logName}]`, `publishAdd retry times: ${C}`), this.isConnected ? (yield this.dcConnectingPromise, this.rts.publishAdd([
|
|
12612
12616
|
Y({
|
|
12613
12617
|
url: e,
|
|
12614
12618
|
stream: t,
|
|
12615
12619
|
updateSourceStream: !1
|
|
12616
12620
|
}, g)
|
|
12617
|
-
])) : Promise.reject(new V(
|
|
12621
|
+
])) : Promise.reject(new V(U.ERR_INNER, "rts not connected"));
|
|
12618
12622
|
}),
|
|
12619
12623
|
za,
|
|
12620
12624
|
0,
|
|
@@ -12671,7 +12675,7 @@ const xe = (Me = class extends we {
|
|
|
12671
12675
|
const i = (h = (u = this.publishingTracks) == null ? void 0 : u.find(({ msid: v }) => v === k.Audio)) == null ? void 0 : h.msid, s = (d = (p = this.publishingTracks) == null ? void 0 : p.find(({ msid: v }) => v === k.VideoLarge)) == null ? void 0 : d.msid, a = (g = (f = this.publishingTracks) == null ? void 0 : f.find(({ msid: v }) => v === k.Screen)) == null ? void 0 : g.msid, c = [];
|
|
12672
12676
|
t.screen && a ? c.push(a) : t.video && c.push(t.vMsid || s);
|
|
12673
12677
|
const o = [];
|
|
12674
|
-
t.audio && i && o.push(i),
|
|
12678
|
+
t.audio && i && o.push(i), O.event(Le.logName, "publishDelete", { streamUrl: e, aMsid: o, vMsid: c });
|
|
12675
12679
|
try {
|
|
12676
12680
|
const [v] = (yield this.rts.publishDeleteTracks([
|
|
12677
12681
|
{
|
|
@@ -12680,7 +12684,7 @@ const xe = (Me = class extends we {
|
|
|
12680
12684
|
vMsid: c
|
|
12681
12685
|
}
|
|
12682
12686
|
])) || [];
|
|
12683
|
-
return
|
|
12687
|
+
return O.event(Le.logName, "publishDelete", { result: v }), v && this.updatePublishingTracks(v.trackInfoList), ((S = (l = v == null ? void 0 : v.trackInfoList) == null ? void 0 : l[0]) == null ? void 0 : S.trackId) || "";
|
|
12684
12688
|
} catch (v) {
|
|
12685
12689
|
throw V.fromRtsError(v);
|
|
12686
12690
|
}
|
|
@@ -12817,7 +12821,7 @@ const xe = (Me = class extends we {
|
|
|
12817
12821
|
try {
|
|
12818
12822
|
return (yield Oa(
|
|
12819
12823
|
(p) => w(this, null, function* () {
|
|
12820
|
-
return yield this.dcConnectingPromise, p > 0 &&
|
|
12824
|
+
return yield this.dcConnectingPromise, p > 0 && O.event(`[${Le.logName}]`, `subscribeAdd retry times: ${p}`), this.isConnected ? this.rts.subscribeAdd([s]) : Promise.reject();
|
|
12821
12825
|
}),
|
|
12822
12826
|
za,
|
|
12823
12827
|
0,
|
|
@@ -12953,7 +12957,7 @@ const xe = (Me = class extends we {
|
|
|
12953
12957
|
const { options: o, remoteUser: u } = e;
|
|
12954
12958
|
if (o.video && o.screen)
|
|
12955
12959
|
throw new V(
|
|
12956
|
-
|
|
12960
|
+
U.ERR_INNER,
|
|
12957
12961
|
"subscribe error, video and screen cannot be subscribed at the same time"
|
|
12958
12962
|
);
|
|
12959
12963
|
this.connecting && (yield this.connectingPromise);
|
|
@@ -12977,7 +12981,7 @@ const xe = (Me = class extends we {
|
|
|
12977
12981
|
if (_.packetsReceived > 0 && (v = Date.now()), _.framesDecoded > 0)
|
|
12978
12982
|
x = Date.now();
|
|
12979
12983
|
else
|
|
12980
|
-
return A < E ? (A++, new Promise((R) => setTimeout(() => R(C()), I))) : (
|
|
12984
|
+
return A < E ? (A++, new Promise((R) => setTimeout(() => R(C()), I))) : (O.error(`[${Le.logName}]`, u.userId, "尝试获取首帧数据失败"), !1);
|
|
12981
12985
|
return !0;
|
|
12982
12986
|
})), Promise.resolve(L);
|
|
12983
12987
|
};
|
|
@@ -13061,36 +13065,36 @@ const xe = (Me = class extends we {
|
|
|
13061
13065
|
}, /**
|
|
13062
13066
|
* @ignore
|
|
13063
13067
|
*/
|
|
13064
|
-
m(
|
|
13068
|
+
m(Le, "logName", "RtsManager"), Le);
|
|
13065
13069
|
be([
|
|
13066
|
-
D(
|
|
13070
|
+
D(H)
|
|
13067
13071
|
], xe.prototype, "startConnect", 1);
|
|
13068
13072
|
be([
|
|
13069
13073
|
D()
|
|
13070
13074
|
], xe.prototype, "updatePublishingTracks", 1);
|
|
13071
13075
|
be([
|
|
13072
|
-
D(
|
|
13076
|
+
D(H, H)
|
|
13073
13077
|
], xe.prototype, "httpPublish", 1);
|
|
13074
13078
|
be([
|
|
13075
|
-
D(
|
|
13079
|
+
D(H, H)
|
|
13076
13080
|
], xe.prototype, "waitPublishSender", 1);
|
|
13077
13081
|
be([
|
|
13078
|
-
D(([r, n, e]) => [r, JSON.stringify(e)],
|
|
13082
|
+
D(([r, n, e]) => [r, JSON.stringify(e)], H)
|
|
13079
13083
|
], xe.prototype, "publishAdd", 1);
|
|
13080
13084
|
be([
|
|
13081
|
-
D(
|
|
13085
|
+
D(H, H)
|
|
13082
13086
|
], xe.prototype, "publishDelete", 1);
|
|
13083
13087
|
be([
|
|
13084
13088
|
D(([r, n, e]) => [r, JSON.stringify(e)])
|
|
13085
13089
|
], xe.prototype, "publishReplace", 1);
|
|
13086
13090
|
be([
|
|
13087
|
-
D(
|
|
13091
|
+
D(H)
|
|
13088
13092
|
], xe.prototype, "publishStop", 1);
|
|
13089
13093
|
be([
|
|
13090
|
-
D(
|
|
13094
|
+
D(H)
|
|
13091
13095
|
], xe.prototype, "publishAddDataChannel", 1);
|
|
13092
13096
|
be([
|
|
13093
|
-
D(
|
|
13097
|
+
D(H)
|
|
13094
13098
|
], xe.prototype, "publishStopDataChannel", 1);
|
|
13095
13099
|
be([
|
|
13096
13100
|
D()
|
|
@@ -13105,16 +13109,16 @@ be([
|
|
|
13105
13109
|
D(wi)
|
|
13106
13110
|
], xe.prototype, "subscibeDelete", 1);
|
|
13107
13111
|
be([
|
|
13108
|
-
D(
|
|
13112
|
+
D(H)
|
|
13109
13113
|
], xe.prototype, "subscibeStop", 1);
|
|
13110
13114
|
be([
|
|
13111
|
-
D(
|
|
13115
|
+
D(H)
|
|
13112
13116
|
], xe.prototype, "subscribeAddDataChannel", 1);
|
|
13113
13117
|
be([
|
|
13114
|
-
D(
|
|
13118
|
+
D(H)
|
|
13115
13119
|
], xe.prototype, "subscribeStopDatachannel", 1);
|
|
13116
13120
|
be([
|
|
13117
|
-
D(
|
|
13121
|
+
D(H)
|
|
13118
13122
|
], xe.prototype, "publish", 1);
|
|
13119
13123
|
be([
|
|
13120
13124
|
D(wi)
|
|
@@ -13376,12 +13380,12 @@ class Wa extends we {
|
|
|
13376
13380
|
return t > -1 ? (e.clear(this), this.plugins.splice(t, 1), !0) : !1;
|
|
13377
13381
|
}
|
|
13378
13382
|
}
|
|
13379
|
-
var hc = Object.defineProperty, dc = Object.getOwnPropertyDescriptor,
|
|
13383
|
+
var hc = Object.defineProperty, dc = Object.getOwnPropertyDescriptor, tt = (r, n, e, t) => {
|
|
13380
13384
|
for (var i = t > 1 ? void 0 : t ? dc(n, e) : n, s = r.length - 1, a; s >= 0; s--)
|
|
13381
13385
|
(a = r[s]) && (i = (t ? a(n, e, i) : a(i)) || i);
|
|
13382
13386
|
return t && i && hc(n, e, i), i;
|
|
13383
13387
|
}, Bt;
|
|
13384
|
-
const
|
|
13388
|
+
const Xe = (Bt = class extends we {
|
|
13385
13389
|
// 设置是否发布屏幕流
|
|
13386
13390
|
constructor(e, t) {
|
|
13387
13391
|
super();
|
|
@@ -13404,7 +13408,7 @@ const Ge = (Bt = class extends we {
|
|
|
13404
13408
|
m(this, "_publishLocalScreenStreamEnabled", !0);
|
|
13405
13409
|
this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
|
|
13406
13410
|
const i = (s) => w(this, null, function* () {
|
|
13407
|
-
if (
|
|
13411
|
+
if (O.info(`[${Bt.logName}]`, "plugin added", s.name), !s.isSupported("6.13.6-beta.1")) {
|
|
13408
13412
|
console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
|
|
13409
13413
|
return;
|
|
13410
13414
|
}
|
|
@@ -13570,7 +13574,7 @@ const Ge = (Bt = class extends we {
|
|
|
13570
13574
|
const c = yield this.publishStreams;
|
|
13571
13575
|
try {
|
|
13572
13576
|
if (!c.audio && !c.video && !c.videoSmall && !c.screen)
|
|
13573
|
-
throw
|
|
13577
|
+
throw O.error(`[${Bt.logName}]`, "no tracks founded"), new V(U.ERR_SDK_PUBLISH_INVAILD, "no tracks founded");
|
|
13574
13578
|
const d = new MediaStream();
|
|
13575
13579
|
(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, a = c.screen) : (h = c.screen) != null && h.videoTrack && (i = k.Screen, d.addTrack((p = c.screen) == null ? void 0 : p.videoTrack), t = !0), e = yield bn(d), t ? (this.screenStreamInfo.cloneVideoProfile(e), this.publishingScreenVideoStream = e) : (this.cameraStreamInfo.cloneVideoProfile(e), this.publishingCameraVideoStream = e);
|
|
13576
13580
|
} catch (d) {
|
|
@@ -13615,7 +13619,7 @@ const Ge = (Bt = class extends we {
|
|
|
13615
13619
|
* @ignore
|
|
13616
13620
|
*/
|
|
13617
13621
|
m(Bt, "logName", "LocalStreamManager"), Bt);
|
|
13618
|
-
|
|
13622
|
+
tt([
|
|
13619
13623
|
D(([r]) => {
|
|
13620
13624
|
const { audio: n, video: e, screen: t, custom: i, skipProfile: s, videoProfile: a, screenProfile: c } = r;
|
|
13621
13625
|
return [
|
|
@@ -13630,38 +13634,38 @@ et([
|
|
|
13630
13634
|
}
|
|
13631
13635
|
];
|
|
13632
13636
|
})
|
|
13633
|
-
],
|
|
13634
|
-
|
|
13635
|
-
D(
|
|
13636
|
-
],
|
|
13637
|
-
|
|
13637
|
+
], Xe.prototype, "createLocalStream", 1);
|
|
13638
|
+
tt([
|
|
13639
|
+
D(H)
|
|
13640
|
+
], Xe.prototype, "stopLocalStream", 1);
|
|
13641
|
+
tt([
|
|
13638
13642
|
D()
|
|
13639
|
-
],
|
|
13640
|
-
|
|
13643
|
+
], Xe.prototype, "createHTTPPublishStream", 1);
|
|
13644
|
+
tt([
|
|
13641
13645
|
D()
|
|
13642
|
-
],
|
|
13643
|
-
|
|
13644
|
-
D(
|
|
13645
|
-
],
|
|
13646
|
-
|
|
13647
|
-
D(
|
|
13648
|
-
],
|
|
13649
|
-
|
|
13650
|
-
D(
|
|
13651
|
-
],
|
|
13652
|
-
|
|
13653
|
-
D(
|
|
13654
|
-
],
|
|
13655
|
-
|
|
13656
|
-
D(
|
|
13657
|
-
],
|
|
13658
|
-
|
|
13659
|
-
D(
|
|
13660
|
-
],
|
|
13661
|
-
|
|
13662
|
-
D(
|
|
13663
|
-
],
|
|
13664
|
-
let lc =
|
|
13646
|
+
], Xe.prototype, "stop", 1);
|
|
13647
|
+
tt([
|
|
13648
|
+
D(H)
|
|
13649
|
+
], Xe.prototype, "setVideoProfile", 1);
|
|
13650
|
+
tt([
|
|
13651
|
+
D(H)
|
|
13652
|
+
], Xe.prototype, "setVideoContentHint", 1);
|
|
13653
|
+
tt([
|
|
13654
|
+
D(H)
|
|
13655
|
+
], Xe.prototype, "setAudioProfile", 1);
|
|
13656
|
+
tt([
|
|
13657
|
+
D(H)
|
|
13658
|
+
], Xe.prototype, "setScreenProfile", 1);
|
|
13659
|
+
tt([
|
|
13660
|
+
D(H)
|
|
13661
|
+
], Xe.prototype, "setScreenContentHint", 1);
|
|
13662
|
+
tt([
|
|
13663
|
+
D(H)
|
|
13664
|
+
], Xe.prototype, "setCameraVideoConstraints", 1);
|
|
13665
|
+
tt([
|
|
13666
|
+
D(H)
|
|
13667
|
+
], Xe.prototype, "setMicAudioConstraints", 1);
|
|
13668
|
+
let lc = Xe;
|
|
13665
13669
|
class fc extends Kt {
|
|
13666
13670
|
constructor() {
|
|
13667
13671
|
super("AliRtcScreenStandardize", Ee.AliRtcSdkStreamTypeScreen);
|
|
@@ -14325,12 +14329,12 @@ class Ic extends Kt {
|
|
|
14325
14329
|
super.clear(e), this.hasVideoTrack = !1, e == null || e.updateDualVideoTrack();
|
|
14326
14330
|
}
|
|
14327
14331
|
}
|
|
14328
|
-
var Rc = Object.defineProperty, wc = Object.getOwnPropertyDescriptor,
|
|
14332
|
+
var Rc = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, je = (r, n, e, t) => {
|
|
14329
14333
|
for (var i = t > 1 ? void 0 : t ? wc(n, e) : n, s = r.length - 1, a; s >= 0; s--)
|
|
14330
14334
|
(a = r[s]) && (i = (t ? a(n, e, i) : a(i)) || i);
|
|
14331
14335
|
return t && i && Rc(n, e, i), i;
|
|
14332
14336
|
};
|
|
14333
|
-
class
|
|
14337
|
+
class Pe extends we {
|
|
14334
14338
|
constructor(e) {
|
|
14335
14339
|
super();
|
|
14336
14340
|
m(this, "self");
|
|
@@ -14393,7 +14397,7 @@ class Te extends we {
|
|
|
14393
14397
|
}
|
|
14394
14398
|
addSignalingManagerListener() {
|
|
14395
14399
|
this.signalingManager.on("onNotifyPublish", (e) => {
|
|
14396
|
-
|
|
14400
|
+
O.event("[Signaling] Notify Publish ", e), e.forEach((t) => {
|
|
14397
14401
|
this.onRemotePublishStateChange(t);
|
|
14398
14402
|
});
|
|
14399
14403
|
}), this.signalingManager.stsManager.on("onTokenUpdate", (e, t) => {
|
|
@@ -14616,7 +14620,7 @@ class Te extends we {
|
|
|
14616
14620
|
playoutVolume: this.playoutVolume,
|
|
14617
14621
|
parameter: this.parameter
|
|
14618
14622
|
});
|
|
14619
|
-
return s.on(
|
|
14623
|
+
return s.on(Ne.Remote, this.onRemoteDeviceStatusChange.bind(this)), s.on(ce.PullStreamStats, this.onRemoteStatReport.bind(this)), s.on(ce.RtsSubscribeExceeds, this.onSubscribeExceeds.bind(this)), s.on("audioSubscribeStateChanged", (a, c, o, u) => {
|
|
14620
14624
|
this.emit("audioSubscribeStateChanged", a, c, o, u, this.channel || "");
|
|
14621
14625
|
}), s.on("videoSubscribeStateChanged", (a, c, o, u) => {
|
|
14622
14626
|
this.emit("videoSubscribeStateChanged", a, c, o, u, this.channel || "");
|
|
@@ -14699,19 +14703,19 @@ class Te extends we {
|
|
|
14699
14703
|
updateAudioWant(e, t) {
|
|
14700
14704
|
const i = this.userMap[e];
|
|
14701
14705
|
if (!i)
|
|
14702
|
-
throw new V(
|
|
14706
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14703
14707
|
i.setWantSubAudio(t), t ? i.updateSubscribe(le.User) : i.stopSubscribe({ audio: !0 });
|
|
14704
14708
|
}
|
|
14705
14709
|
updateVideoWant(e, t) {
|
|
14706
14710
|
const i = this.userMap[e];
|
|
14707
14711
|
if (!i)
|
|
14708
|
-
throw new V(
|
|
14712
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14709
14713
|
i.setWantSubVideo(t), t ? i.updateSubscribe(le.User) : i.stopSubscribe({ video: !0 });
|
|
14710
14714
|
}
|
|
14711
14715
|
updateScreenWant(e, t) {
|
|
14712
14716
|
const i = this.userMap[e];
|
|
14713
14717
|
if (!i)
|
|
14714
|
-
throw new V(
|
|
14718
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
14715
14719
|
i.setWantSubScreen(t), t ? i.updateSubscribe(le.User) : i.stopSubscribe({ screen: !0 });
|
|
14716
14720
|
}
|
|
14717
14721
|
stopIndication() {
|
|
@@ -14782,49 +14786,49 @@ class Te extends we {
|
|
|
14782
14786
|
/**
|
|
14783
14787
|
* @ignore
|
|
14784
14788
|
*/
|
|
14785
|
-
m(
|
|
14786
|
-
|
|
14789
|
+
m(Pe, "logName", "BizControl");
|
|
14790
|
+
je([
|
|
14787
14791
|
D()
|
|
14788
|
-
],
|
|
14789
|
-
|
|
14792
|
+
], Pe.prototype, "init", 1);
|
|
14793
|
+
je([
|
|
14790
14794
|
D()
|
|
14791
|
-
],
|
|
14792
|
-
|
|
14795
|
+
], Pe.prototype, "leave", 1);
|
|
14796
|
+
je([
|
|
14793
14797
|
D()
|
|
14794
|
-
],
|
|
14795
|
-
|
|
14796
|
-
D(
|
|
14797
|
-
],
|
|
14798
|
-
|
|
14798
|
+
], Pe.prototype, "clear", 1);
|
|
14799
|
+
je([
|
|
14800
|
+
D(H)
|
|
14801
|
+
], Pe.prototype, "addUser", 1);
|
|
14802
|
+
je([
|
|
14799
14803
|
D()
|
|
14800
|
-
],
|
|
14801
|
-
|
|
14804
|
+
], Pe.prototype, "removeLeftUser", 1);
|
|
14805
|
+
je([
|
|
14802
14806
|
D()
|
|
14803
|
-
],
|
|
14804
|
-
|
|
14805
|
-
D(
|
|
14806
|
-
],
|
|
14807
|
-
|
|
14808
|
-
D(
|
|
14809
|
-
],
|
|
14810
|
-
|
|
14811
|
-
D(
|
|
14812
|
-
],
|
|
14813
|
-
|
|
14807
|
+
], Pe.prototype, "updateUsers", 1);
|
|
14808
|
+
je([
|
|
14809
|
+
D(H)
|
|
14810
|
+
], Pe.prototype, "updateAudioWant", 1);
|
|
14811
|
+
je([
|
|
14812
|
+
D(H)
|
|
14813
|
+
], Pe.prototype, "updateVideoWant", 1);
|
|
14814
|
+
je([
|
|
14815
|
+
D(H)
|
|
14816
|
+
], Pe.prototype, "updateScreenWant", 1);
|
|
14817
|
+
je([
|
|
14814
14818
|
D()
|
|
14815
|
-
],
|
|
14816
|
-
|
|
14819
|
+
], Pe.prototype, "stopIndication", 1);
|
|
14820
|
+
je([
|
|
14817
14821
|
D()
|
|
14818
|
-
],
|
|
14819
|
-
|
|
14820
|
-
D(
|
|
14821
|
-
],
|
|
14822
|
-
|
|
14823
|
-
D(
|
|
14824
|
-
],
|
|
14825
|
-
|
|
14822
|
+
], Pe.prototype, "startIndication", 1);
|
|
14823
|
+
je([
|
|
14824
|
+
D(H)
|
|
14825
|
+
], Pe.prototype, "setEnableDualVideoStream", 1);
|
|
14826
|
+
je([
|
|
14827
|
+
D(H)
|
|
14828
|
+
], Pe.prototype, "setAudioVolume", 1);
|
|
14829
|
+
je([
|
|
14826
14830
|
D()
|
|
14827
|
-
],
|
|
14831
|
+
], Pe.prototype, "enableAudioVolumeIndication", 1);
|
|
14828
14832
|
const Pr = (r) => w(void 0, null, function* () {
|
|
14829
14833
|
const n = new Uint8Array(160).fill(170), e = new TextEncoder().encode(r), t = yield window.crypto.subtle.importKey(
|
|
14830
14834
|
"raw",
|
|
@@ -14863,9 +14867,9 @@ class Dc {
|
|
|
14863
14867
|
timestamp: t.timestamp,
|
|
14864
14868
|
token: t.token,
|
|
14865
14869
|
nonce: t.nonce ? t.nonce : "",
|
|
14866
|
-
requestid:
|
|
14870
|
+
requestid: He.createCallid(),
|
|
14867
14871
|
tokensid: !1,
|
|
14868
|
-
session: (u = t.sessionId) != null ? u :
|
|
14872
|
+
session: (u = t.sessionId) != null ? u : He.createCallid()
|
|
14869
14873
|
}, c = Object.keys(a).map((h) => `${h}=${encodeURIComponent(a[h])}`).join("&"), o = `${i}${s}?${c}`;
|
|
14870
14874
|
return fetch(o, {
|
|
14871
14875
|
method: "POST",
|
|
@@ -14874,9 +14878,9 @@ class Dc {
|
|
|
14874
14878
|
},
|
|
14875
14879
|
body: JSON.stringify(e)
|
|
14876
14880
|
}).then((h) => h.status !== 200 ? (this.slsReporter.reportTranscodingError(h.status, e.taskid || ""), Promise.reject(
|
|
14877
|
-
new V(
|
|
14881
|
+
new V(U.ERR_INNER, `transcoding request failed, status: ${h.status}`)
|
|
14878
14882
|
)) : h).catch((h) => Promise.reject(
|
|
14879
|
-
new V(
|
|
14883
|
+
new V(U.ERR_INNER, `transcoding request failed, err: ${h.message}`)
|
|
14880
14884
|
));
|
|
14881
14885
|
}
|
|
14882
14886
|
setAuthInfo(n) {
|
|
@@ -14889,7 +14893,7 @@ class Dc {
|
|
|
14889
14893
|
return w(this, null, function* () {
|
|
14890
14894
|
if (!this.authInfo)
|
|
14891
14895
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14892
|
-
const t = yield Pr(n.split("?")[0]), i =
|
|
14896
|
+
const t = yield Pr(n.split("?")[0]), i = Ue.MPU_TASK_TRANSACTION_UPDATE, s = e.toJson(i, this.authInfo, t, n);
|
|
14893
14897
|
return this.doRequest(i, s);
|
|
14894
14898
|
});
|
|
14895
14899
|
}
|
|
@@ -14897,7 +14901,7 @@ class Dc {
|
|
|
14897
14901
|
return w(this, null, function* () {
|
|
14898
14902
|
if (!this.authInfo)
|
|
14899
14903
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14900
|
-
const t =
|
|
14904
|
+
const t = Ue.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, n);
|
|
14901
14905
|
return this.doRequest(t, i);
|
|
14902
14906
|
});
|
|
14903
14907
|
}
|
|
@@ -14905,7 +14909,7 @@ class Dc {
|
|
|
14905
14909
|
return w(this, null, function* () {
|
|
14906
14910
|
if (!this.authInfo)
|
|
14907
14911
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14908
|
-
const t = yield Pr(n.split("?")[0]), i =
|
|
14912
|
+
const t = yield Pr(n.split("?")[0]), i = Ue.MPU_TASK_TRANSACTION_UPDATE, s = e.toJson(i, this.authInfo, t, n);
|
|
14909
14913
|
return this.doRequest(i, s);
|
|
14910
14914
|
});
|
|
14911
14915
|
}
|
|
@@ -14913,7 +14917,7 @@ class Dc {
|
|
|
14913
14917
|
return w(this, null, function* () {
|
|
14914
14918
|
if (!this.authInfo)
|
|
14915
14919
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14916
|
-
const t =
|
|
14920
|
+
const t = Ue.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, n);
|
|
14917
14921
|
return this.doRequest(t, i);
|
|
14918
14922
|
});
|
|
14919
14923
|
}
|
|
@@ -14921,14 +14925,14 @@ class Dc {
|
|
|
14921
14925
|
return w(this, null, function* () {
|
|
14922
14926
|
if (!this.authInfo)
|
|
14923
14927
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14924
|
-
const e = yield Pr(n.split("?")[0]), t =
|
|
14928
|
+
const e = yield Pr(n.split("?")[0]), t = Ue.MPU_TASK_TRANSACTION_STOP, i = new Br().toJson(t, this.authInfo, e, n);
|
|
14925
14929
|
return this.doRequest(t, i);
|
|
14926
14930
|
});
|
|
14927
14931
|
}
|
|
14928
14932
|
stopPublishLiveStreamWithTaskId(n) {
|
|
14929
14933
|
if (!this.authInfo)
|
|
14930
14934
|
return Promise.reject(ct.LiveTranscodingErrorInvalidParam);
|
|
14931
|
-
const e =
|
|
14935
|
+
const e = Ue.MPU_TASK_TRANSACTION_STOP, t = new Br().toJson(e, this.authInfo, n);
|
|
14932
14936
|
return this.doRequest(e, t);
|
|
14933
14937
|
}
|
|
14934
14938
|
refreshAuthInfo(n) {
|
|
@@ -14975,19 +14979,19 @@ class rs {
|
|
|
14975
14979
|
*/
|
|
14976
14980
|
static checkAuthInfo(n) {
|
|
14977
14981
|
if (!n)
|
|
14978
|
-
return new V(
|
|
14982
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no authInfo founded");
|
|
14979
14983
|
if (!n.appId)
|
|
14980
|
-
return new V(
|
|
14984
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no appId founded");
|
|
14981
14985
|
if (!n.channelId)
|
|
14982
|
-
return new V(
|
|
14986
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no channelId founded");
|
|
14983
14987
|
if (!n.userId)
|
|
14984
|
-
return new V(
|
|
14988
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no userId founded");
|
|
14985
14989
|
if (n.timestamp) {
|
|
14986
14990
|
if (!rs.checkNumber(n.timestamp))
|
|
14987
|
-
return new V(
|
|
14991
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "timestamp is not number");
|
|
14988
14992
|
} else
|
|
14989
|
-
return new V(
|
|
14990
|
-
return n.token ? null : new V(
|
|
14993
|
+
return new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no timestamp founded");
|
|
14994
|
+
return n.token ? null : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no token founded");
|
|
14991
14995
|
}
|
|
14992
14996
|
/**
|
|
14993
14997
|
* 检测是否是MediaStreamTrack类型
|
|
@@ -15040,8 +15044,8 @@ class kc {
|
|
|
15040
15044
|
}
|
|
15041
15045
|
toJson(n, e) {
|
|
15042
15046
|
return {
|
|
15043
|
-
x:
|
|
15044
|
-
y:
|
|
15047
|
+
x: Ge(this.x, n),
|
|
15048
|
+
y: Ge(this.y, e),
|
|
15045
15049
|
fonttype: this.fontType,
|
|
15046
15050
|
fontsize: this.fontSize,
|
|
15047
15051
|
fontcolor: Zr(this.fontColor),
|
|
@@ -15067,10 +15071,10 @@ class An {
|
|
|
15067
15071
|
url: this.url,
|
|
15068
15072
|
alpha: this.alpha,
|
|
15069
15073
|
display: this.display,
|
|
15070
|
-
x:
|
|
15071
|
-
y:
|
|
15072
|
-
width:
|
|
15073
|
-
height:
|
|
15074
|
+
x: Ge(this.x, n),
|
|
15075
|
+
y: Ge(this.y, e),
|
|
15076
|
+
width: Ge(this.width, n),
|
|
15077
|
+
height: Ge(this.height, e),
|
|
15074
15078
|
zorder: this.zOrder
|
|
15075
15079
|
};
|
|
15076
15080
|
}
|
|
@@ -15090,8 +15094,8 @@ class Bc {
|
|
|
15090
15094
|
toJson(n, e) {
|
|
15091
15095
|
return {
|
|
15092
15096
|
text: this.text,
|
|
15093
|
-
x:
|
|
15094
|
-
y:
|
|
15097
|
+
x: Ge(this.x, n),
|
|
15098
|
+
y: Ge(this.y, e),
|
|
15095
15099
|
fonttype: this.fontType,
|
|
15096
15100
|
fontsize: this.fontSize,
|
|
15097
15101
|
fontcolor: Zr(this.fontColor),
|
|
@@ -15117,10 +15121,10 @@ class Mc {
|
|
|
15117
15121
|
const s = {
|
|
15118
15122
|
paneid: n,
|
|
15119
15123
|
majorpane: 0,
|
|
15120
|
-
x:
|
|
15121
|
-
y:
|
|
15122
|
-
width:
|
|
15123
|
-
height:
|
|
15124
|
+
x: Ge(this.x, e),
|
|
15125
|
+
y: Ge(this.y, t),
|
|
15126
|
+
width: Ge(this.width, e),
|
|
15127
|
+
height: Ge(this.height, t),
|
|
15124
15128
|
zorder: this.zOrder,
|
|
15125
15129
|
userid: this.userId,
|
|
15126
15130
|
images: this.images.map((a) => a.toJson(e, t)),
|
|
@@ -15237,7 +15241,7 @@ class Ga {
|
|
|
15237
15241
|
const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
15238
15242
|
let i = r;
|
|
15239
15243
|
return i || (i = 0), Math.min(e, Math.max(t, Math.round(i * n)));
|
|
15240
|
-
},
|
|
15244
|
+
}, Je = (r, n, e = 2e7, t = 0) => {
|
|
15241
15245
|
let i = n;
|
|
15242
15246
|
(!n || n < 0 || n > 1e4) && (i = 1e3);
|
|
15243
15247
|
let s = r;
|
|
@@ -15303,25 +15307,25 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15303
15307
|
var F, M, J, j, ue, X;
|
|
15304
15308
|
if (!R || !R.timestamp)
|
|
15305
15309
|
return;
|
|
15306
|
-
const T = (F = R._last) != null && F.timestamp ? R.timestamp - R._last.timestamp : 1e3, B = pe(R, "bytesSent"), $ = pe(R, "headerBytesSent"), q =
|
|
15310
|
+
const T = (F = R._last) != null && F.timestamp ? R.timestamp - R._last.timestamp : 1e3, B = pe(R, "bytesSent"), $ = pe(R, "headerBytesSent"), q = Je(fe(B + $, 8, 2e7), T);
|
|
15307
15311
|
o.push(q);
|
|
15308
|
-
const G =
|
|
15312
|
+
const G = Je(fe(B, 8, 2e7), T);
|
|
15309
15313
|
u.push(G);
|
|
15310
|
-
const ae =
|
|
15314
|
+
const ae = Je(fe($, 8, 2e7), T);
|
|
15311
15315
|
h.push(ae);
|
|
15312
|
-
const Q = pe(R, "packetsSent"), te =
|
|
15316
|
+
const Q = pe(R, "packetsSent"), te = Je(Q, T);
|
|
15313
15317
|
p.push(te);
|
|
15314
|
-
const ee = pe(R, "packetsLost"), P =
|
|
15318
|
+
const ee = pe(R, "packetsLost"), P = Je(ee, T);
|
|
15315
15319
|
d.push(P);
|
|
15316
15320
|
const N = Rt(ee, Q);
|
|
15317
15321
|
if (f.push(N), a)
|
|
15318
15322
|
(M = R._source) != null && M.audioLevel && g.push(Xa(R._source.audioLevel)), l.push(0);
|
|
15319
15323
|
else {
|
|
15320
15324
|
S.push(Ya(R, "totalEncodeTime")), v.push(wt((J = R._source) == null ? void 0 : J.framesPerSecond, 100)), x.push(wt((j = R._source) == null ? void 0 : j.framesPerSecond, 100)), b.push(wt(R.framesPerSecond, 100)), y.push(wt((ue = R._source) == null ? void 0 : ue.height, 4400)), E.push(wt((X = R._source) == null ? void 0 : X.width, 7700)), I.push(wt(R.frameHeight, 4400)), A.push(wt(R.frameWidth, 7700));
|
|
15321
|
-
const
|
|
15322
|
-
C.push(fe(
|
|
15323
|
-
const
|
|
15324
|
-
L.push(fe(
|
|
15325
|
+
const Ve = pe(R, "totalPacketSendDelay");
|
|
15326
|
+
C.push(fe(Ve, 1 / (ee || 1), 2e3));
|
|
15327
|
+
const ze = pe(R, "qpSum");
|
|
15328
|
+
L.push(fe(ze, 1 / (R.framesPerSecond || 1), 51)), _.push(0);
|
|
15325
15329
|
}
|
|
15326
15330
|
}), c.sbr = o.join(","), c.mbrs = u.join(","), c.pbrs = h.join(","), c.ps = p.join(","), c.pl = d.join(","), c.plr = f.join(","), a) {
|
|
15327
15331
|
const R = (i == null ? void 0 : i.getSettings().sampleRate) || 0;
|
|
@@ -15351,18 +15355,18 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15351
15355
|
}, o = [], u = [], h = [], p = [], d = [], f = [], g = [], l = [], S = [], v = [], x = [], b = [], y = [], E = [], I = [], A = [], C = [], L = [], _ = [], R = [], T = [], B = [], $ = [], q = [], G = [], ae = [], Q = [], te = [], ee = [], P = [], N = [], F = [], M = [], J = [];
|
|
15352
15356
|
try {
|
|
15353
15357
|
s.forEach((j) => {
|
|
15354
|
-
var
|
|
15358
|
+
var Qe, Ct;
|
|
15355
15359
|
if (!j || !j.timestamp)
|
|
15356
15360
|
return;
|
|
15357
|
-
const ue = (
|
|
15358
|
-
o.push(
|
|
15359
|
-
const
|
|
15360
|
-
u.push(
|
|
15361
|
-
const
|
|
15362
|
-
h.push(
|
|
15363
|
-
const Se = pe(j, "packetsReceived"),
|
|
15364
|
-
p.push(
|
|
15365
|
-
const nt = pe(j, "packetsLost"), Et =
|
|
15361
|
+
const ue = (Qe = j._last) != null && Qe.timestamp ? j.timestamp - j._last.timestamp : 1e3, X = pe(j, "bytesReceived"), Ve = pe(j, "headerBytesReceived"), ze = Je(fe(X + Ve, 8, 2e7), ue);
|
|
15362
|
+
o.push(ze);
|
|
15363
|
+
const Ye = Je(fe(X, 8, 2e7), ue);
|
|
15364
|
+
u.push(Ye);
|
|
15365
|
+
const Ze = Je(fe(Ve, 8, 2e7), ue);
|
|
15366
|
+
h.push(Ze);
|
|
15367
|
+
const Se = pe(j, "packetsReceived"), ke = Je(Se, ue);
|
|
15368
|
+
p.push(ke);
|
|
15369
|
+
const nt = pe(j, "packetsLost"), Et = Je(nt, ue);
|
|
15366
15370
|
d.push(Et);
|
|
15367
15371
|
const Nt = Rt(nt, Se);
|
|
15368
15372
|
f.push(Nt);
|
|
@@ -15374,20 +15378,20 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15374
15378
|
g.push(0);
|
|
15375
15379
|
const _t = pe(j, "fecPacketsReceived");
|
|
15376
15380
|
b.push(Rt(_t, Se));
|
|
15377
|
-
const
|
|
15378
|
-
if (S.push(Rt(Se -
|
|
15381
|
+
const Be = pe(j, "retransmittedPacketsReceived"), Ce = Se + nt - Be;
|
|
15382
|
+
if (S.push(Rt(Se - Be, Ce)), v.push(Rt(nt, Ce)), l.push(Rt(Be, Ce)), x.push(Ce), M.push(0), J.push(""), a) {
|
|
15379
15383
|
E.push(Xa(j.audioLevel));
|
|
15380
15384
|
const lt = Lc(j, "synthesizedSamplesEvents");
|
|
15381
15385
|
I.push(lt);
|
|
15382
|
-
const
|
|
15383
|
-
A.push(
|
|
15384
|
-
const ot = Rt(
|
|
15386
|
+
const et = Ya(j, "synthesizedSamplesDuration");
|
|
15387
|
+
A.push(et);
|
|
15388
|
+
const ot = Rt(et, ue);
|
|
15385
15389
|
y.push(ot), C.push(0);
|
|
15386
15390
|
} else {
|
|
15387
15391
|
const lt = (Ct = j._last) != null && Ct.totalInterFrameDelay ? j.totalInterFrameDelay - j._last.totalInterFrameDelay : 0;
|
|
15388
15392
|
L.push(fe(lt, 1e3 / (j.framesDecoded || 30), 500)), _.push(fe(j.framesPerSecond, 1, 100)), R.push(pe(j, "framesReceived")), F.push(pe(j, "framesRendered")), T.push(fe(j.frameHeight, 1, 4400)), B.push(fe(j.frameWidth, 1, 7700));
|
|
15389
|
-
const
|
|
15390
|
-
$.push(fe(
|
|
15393
|
+
const et = pe(j, "totalProcessingDelay");
|
|
15394
|
+
$.push(fe(et, 1e3 / (j.framesDecoded || 30), 12e4));
|
|
15391
15395
|
const ot = pe(j, "nackCount");
|
|
15392
15396
|
G.push(ot);
|
|
15393
15397
|
const Di = pe(j, "pliCount");
|
|
@@ -15396,12 +15400,12 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15396
15400
|
ae.push(fe(oi, 1 / (j.framesPerSecond || 1), 51)), Q.push(fe(j.framesDropped));
|
|
15397
15401
|
const ci = pe(j, "totalFreezesDuration");
|
|
15398
15402
|
te.push(fe(ci, 1e3, 3e4));
|
|
15399
|
-
const
|
|
15400
|
-
ft &&
|
|
15403
|
+
const We = pe(j, "jitterBufferEmittedCount"), ft = pe(j, "jitterBufferDelay");
|
|
15404
|
+
ft && We ? ee.push(fe(ft, 1e3 / We, 3e4)) : ee.push(0);
|
|
15401
15405
|
const ui = pe(j, "jitterBufferTargetDelay");
|
|
15402
|
-
ui &&
|
|
15406
|
+
ui && We ? P.push(fe(ui, 1e3 / We, 3e4)) : P.push(0);
|
|
15403
15407
|
const Gt = pe(j, "jitterBufferMinimumDelay");
|
|
15404
|
-
Gt &&
|
|
15408
|
+
Gt && We ? N.push(fe(Gt, 1e3 / We, 3e4)) : N.push(0);
|
|
15405
15409
|
}
|
|
15406
15410
|
}), 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 = g.join(","), c.fecr = b.join(","), c.retransr = l.join(","), c.baser = S.join(","), c.basel = v.join(","), c.recoverr = M.join(","), c.alll = v.join(","), c.totalc = x.join(","), a ? (c.er = y.join(","), c.aolevel = E.join(","), c.asrc = C.join(","), c.scnt = I.join(","), c.sdura = A.join(",")) : (c.dm = L.join(","), c.dfps = _.join(","), c.rfps = R.join(","), c.rh = T.join(","), c.rw = B.join(","), c.fpt = J.join(","), c.ns = G.join(","), c.pliss = q.join(","), c.aqp = ae.join(","), c.ofimax = M.join(","), c.ofimin = M.join(","), c.dfimax = M.join(","), c.dfimin = M.join(","), c.rfimax = M.join(","), c.rfimin = M.join(","), c.vrstutter = te.join(","), c.cdm = ee.join(","), c.tdm = P.join(","), c.pdm = N.join(","), c.ofps = F.join(","), c.dfbd = Q.join(","));
|
|
15407
15411
|
} catch (j) {
|
|
@@ -15428,7 +15432,7 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15428
15432
|
if (!f.timestamp)
|
|
15429
15433
|
return;
|
|
15430
15434
|
const l = (S = f._last) != null && S.timestamp ? f.timestamp - f._last.timestamp : 1e3;
|
|
15431
|
-
e.push(fe(f.currentRoundTripTime, 1e3)), t.push(fe(f.availableOutgoingBitrate, 8, 2e8)), i.push(
|
|
15435
|
+
e.push(fe(f.currentRoundTripTime, 1e3)), t.push(fe(f.availableOutgoingBitrate, 8, 2e8)), i.push(Je(fe(f.bytesSent, 8, 2e7), l, 25e6)), s.push(Je(fe(f.bytesReceived, 8, 2e7), l, 25e6)), a.push(0), c.push(0), g % 5 === 0 && (o.push(""), u.push(""), h.push(""), p.push(""));
|
|
15432
15436
|
});
|
|
15433
15437
|
const d = {
|
|
15434
15438
|
ctm: Math.floor(n[0].timestamp || 0),
|
|
@@ -15968,7 +15972,7 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
|
|
|
15968
15972
|
* @param {any} param 埋点内容
|
|
15969
15973
|
*/
|
|
15970
15974
|
log(n) {
|
|
15971
|
-
n && (n.tm = (/* @__PURE__ */ new Date()).getTime(),
|
|
15975
|
+
n && (n.tm = (/* @__PURE__ */ new Date()).getTime(), O.debug("[ConsoleLogger]", "log", n), this.logClient.sendReport(n));
|
|
15972
15976
|
}
|
|
15973
15977
|
/**
|
|
15974
15978
|
* 将Object转换成string
|
|
@@ -16008,12 +16012,12 @@ const z = (K = class extends we {
|
|
|
16008
16012
|
m(this, "_serverCheckAuthInfoTimestamp", null);
|
|
16009
16013
|
m(this, "_localCheckAuthInfoTimestamp", null);
|
|
16010
16014
|
const t = Date.now();
|
|
16011
|
-
|
|
16015
|
+
O.init(), this.slsReporter = new Or(this), this.channelProfile = St.AliRtcSdkCommunication, this.clientRole = Dt.AliRtcSdkLive, this.liveTranscoding = new Dc(this.slsReporter), this.signalingManager = new ts(
|
|
16012
16016
|
this.channelProfile,
|
|
16013
16017
|
this.clientRole,
|
|
16014
16018
|
this.slsReporter,
|
|
16015
16019
|
(e == null ? void 0 : e.env) === dt.pre ? dt.pre : dt.prod
|
|
16016
|
-
), this.addSignalingManagerListeners(), this.maxSignalingConnectRetryCount = e == null ? void 0 : e.maxSignalingConnectRetryCount, this.bizControl = new
|
|
16020
|
+
), this.addSignalingManagerListeners(), this.maxSignalingConnectRetryCount = e == null ? void 0 : e.maxSignalingConnectRetryCount, this.bizControl = new Pe({
|
|
16017
16021
|
slsReporter: this.slsReporter,
|
|
16018
16022
|
signalingManager: this.signalingManager
|
|
16019
16023
|
}), this.addBizControlListeners(), this.addPublisherListeners(), this.slsReporter.reportSDKCreated(t);
|
|
@@ -16022,7 +16026,7 @@ const z = (K = class extends we {
|
|
|
16022
16026
|
return yi;
|
|
16023
16027
|
}
|
|
16024
16028
|
static setLogLevel(e) {
|
|
16025
|
-
|
|
16029
|
+
O.setLogLevel(e);
|
|
16026
16030
|
}
|
|
16027
16031
|
/**
|
|
16028
16032
|
* @brief 获取AliRtcEngine实例
|
|
@@ -16034,7 +16038,7 @@ const z = (K = class extends we {
|
|
|
16034
16038
|
}
|
|
16035
16039
|
destroy() {
|
|
16036
16040
|
return w(this, null, function* () {
|
|
16037
|
-
K._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(),
|
|
16041
|
+
K._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(), O.destroy();
|
|
16038
16042
|
});
|
|
16039
16043
|
}
|
|
16040
16044
|
/**
|
|
@@ -16071,24 +16075,24 @@ const z = (K = class extends we {
|
|
|
16071
16075
|
*/
|
|
16072
16076
|
addPublisherListeners() {
|
|
16073
16077
|
var e, t, i, s, a, c, o, u, h, p;
|
|
16074
|
-
(e = this.publisher) == null || e.on(
|
|
16075
|
-
|
|
16078
|
+
(e = this.publisher) == null || e.on(Ne.Local, (d) => {
|
|
16079
|
+
O.event("[Publisher] Device Status Change", d), this.onLocalDeviceStatusChange(d);
|
|
16076
16080
|
}), (t = this.publisher) == null || t.on(kt.VideoTrackEnded, () => {
|
|
16077
|
-
|
|
16081
|
+
O.event("[Publisher] VideoTrack Ended"), this.emit(
|
|
16078
16082
|
"localDeviceException",
|
|
16079
16083
|
ut.AliEngineLocalDeviceTypeCamera,
|
|
16080
16084
|
ye.AliEngineLocalDeviceExceptionTypeCameraInterrupt,
|
|
16081
16085
|
""
|
|
16082
16086
|
);
|
|
16083
16087
|
}), (i = this.publisher) == null || i.on(kt.ScreenTrackEnded, () => {
|
|
16084
|
-
|
|
16088
|
+
O.event("[Publisher] ScreenTrack Ended"), this.emit(
|
|
16085
16089
|
"localDeviceException",
|
|
16086
16090
|
ut.AliEngineLocalDeviceTypeDisplay,
|
|
16087
16091
|
ye.AliEngineLocalDeviceExceptionTypeDisplayException,
|
|
16088
16092
|
""
|
|
16089
16093
|
);
|
|
16090
16094
|
}), (s = this.publisher) == null || s.on(kt.AudioTrackEnded, () => {
|
|
16091
|
-
|
|
16095
|
+
O.event("[Publisher] AudioTrack Ended"), this.emit(
|
|
16092
16096
|
"localDeviceException",
|
|
16093
16097
|
ut.AliEngineLocalDeviceTypeMic,
|
|
16094
16098
|
ye.AliEngineLocalDeviceExceptionTypeMicInterrupt,
|
|
@@ -16117,7 +16121,7 @@ const z = (K = class extends we {
|
|
|
16117
16121
|
});
|
|
16118
16122
|
}
|
|
16119
16123
|
occurError(e, t) {
|
|
16120
|
-
|
|
16124
|
+
O.event(`[${K.logName}]`, "Occur Error", e, t), this.emit("onOccurError", e, t), this.emit("occurError", e, t);
|
|
16121
16125
|
}
|
|
16122
16126
|
/**
|
|
16123
16127
|
* 监听 UM 事件
|
|
@@ -16129,14 +16133,14 @@ const z = (K = class extends we {
|
|
|
16129
16133
|
i.updateSubscribe(le.Reconnect);
|
|
16130
16134
|
}));
|
|
16131
16135
|
}), this.bizControl.rtsManager.on("disconnected", () => w(this, null, function* () {
|
|
16132
|
-
|
|
16136
|
+
O.event(`[${K.logName}]`, "RTS Disconnected"), (yield He.isNetworkAvailable()) ? this.onNetworkRecovery() : this.onNetworkError();
|
|
16133
16137
|
})), this.bizControl.rtsManager.on("subscribeexceeds", () => w(this, null, function* () {
|
|
16134
16138
|
yield this.resumePublishForNetworkRecovery(), yield this.resumeSubList();
|
|
16135
16139
|
})), this.bizControl.rtsManager.on("seimessage", (e, t, i) => {
|
|
16136
16140
|
const s = this.remoteUsers.find((a) => a.streamUrl === e);
|
|
16137
16141
|
s && this.emit("mediaExtensionMsgReceived", s.userId, i, t);
|
|
16138
|
-
}), this.bizControl.on(
|
|
16139
|
-
|
|
16142
|
+
}), this.bizControl.on(Ne.Remote, (e, t) => {
|
|
16143
|
+
O.event(`[${K.logName}]`, "RemoteUser Device Status Change", e, t);
|
|
16140
16144
|
}), this.bizControl.on("remoteTrackAvailableChange", (e, t, i) => {
|
|
16141
16145
|
this.emit("remoteTrackAvailableNotify", e, t, i);
|
|
16142
16146
|
}), this.bizControl.on("audioSubscribeStateChanged", (e, t, i, s, a) => {
|
|
@@ -16187,45 +16191,45 @@ const z = (K = class extends we {
|
|
|
16187
16191
|
*/
|
|
16188
16192
|
addSignalingManagerListeners() {
|
|
16189
16193
|
this.signalingManager.on("onKeepAliveRsp", () => {
|
|
16190
|
-
this.networkError && (
|
|
16194
|
+
this.networkError && (O.event("[Signaling] Receive KeepAlive Response", `networkError: ${this.networkError}`), this.onNetworkRecovery());
|
|
16191
16195
|
}), this.signalingManager.on("onNotifyJoin", (e) => {
|
|
16192
|
-
|
|
16196
|
+
O.event("[Signaling] Notify Join ", e), this.handleUsersJoin(e), e.forEach((t) => {
|
|
16193
16197
|
this.emit("remoteUserOnLineNotify", t.userid, 0);
|
|
16194
16198
|
});
|
|
16195
16199
|
}), this.signalingManager.on("onNotifyStatus", (e) => {
|
|
16196
|
-
|
|
16200
|
+
O.event("[Signaling] Notify Status ", e), e.forEach((t) => {
|
|
16197
16201
|
this.bizControl.updateRemoteUserDeviceStatus(t);
|
|
16198
16202
|
});
|
|
16199
16203
|
}), this.signalingManager.on("onNotifyLeave", (e) => {
|
|
16200
|
-
|
|
16204
|
+
O.event("[Signaling] Notify Leave ", e), e.forEach((t) => {
|
|
16201
16205
|
this.emit("remoteUserOffLineNotify", t.userid, t.leavecode), this.bizControl.removeLeftUser(t);
|
|
16202
16206
|
});
|
|
16203
16207
|
}), this.signalingManager.on("onBye", (e, t) => {
|
|
16204
|
-
|
|
16208
|
+
O.event("[Signaling] Bye ", e, t), this.slsReporter.reportError({
|
|
16205
16209
|
message: `reason: ${e}, description: ${t}`
|
|
16206
16210
|
}), this.emit("bye", e), this.leaveChannel(), this.slsReporter.reportBye(e);
|
|
16207
16211
|
}), this.signalingManager.on("onConnectFail", (e) => {
|
|
16208
|
-
|
|
16212
|
+
O.event("[Signaling] Connect Failed ", e), this.onError(e), this.backToUnpublishStatus(), this.connectState = he.AliRtcConnectionStatusFailed, this.emit(
|
|
16209
16213
|
"connectionStatusChange",
|
|
16210
16214
|
he.AliRtcConnectionStatusFailed,
|
|
16211
16215
|
Ht.AliRtcConnectionChangedNetworkInterrupted
|
|
16212
16216
|
);
|
|
16213
16217
|
}), this.signalingManager.on("onNetworkError", (e) => {
|
|
16214
|
-
this.slsReporter.reportWarning("signaling network error"),
|
|
16218
|
+
this.slsReporter.reportWarning("signaling network error"), O.event("[Signaling] Network error ", e), this.onNetworkError();
|
|
16215
16219
|
}), this.signalingManager.on("onAuthInvalid", () => {
|
|
16216
|
-
|
|
16220
|
+
O.event("[Signaling] Auth Invalid");
|
|
16217
16221
|
}), this.signalingManager.on("onReconnectStart", () => {
|
|
16218
|
-
|
|
16222
|
+
O.event("[Signaling] Reconnect Start "), this.connectState = he.AliRtcConnectionStatusReconnecting, this.emit(
|
|
16219
16223
|
"connectionStatusChange",
|
|
16220
16224
|
he.AliRtcConnectionStatusReconnecting,
|
|
16221
16225
|
Ht.AliRtcConnectionSignalingConnecting
|
|
16222
16226
|
);
|
|
16223
16227
|
}), this.signalingManager.on("onReconnectSuccess", (e) => {
|
|
16224
|
-
|
|
16228
|
+
O.event("[Signaling] Reconnect Success ", e), this.onNetworkRecovery(e);
|
|
16225
16229
|
}), this.signalingManager.on("onReconnectFail", (e) => {
|
|
16226
|
-
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"),
|
|
16230
|
+
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"), O.event("[Signaling] Reconnect Failed ", e), e.code === 403 && this.emit("authInfoExpired");
|
|
16227
16231
|
}), this.signalingManager.on("onError", (e) => {
|
|
16228
|
-
this.slsReporter.reportWarning("signaling error: ${err.message}"),
|
|
16232
|
+
this.slsReporter.reportWarning("signaling error: ${err.message}"), O.event("[Signaling] Error ", e), this.onError(e);
|
|
16229
16233
|
});
|
|
16230
16234
|
}
|
|
16231
16235
|
backToUnpublishStatus() {
|
|
@@ -16242,7 +16246,7 @@ const z = (K = class extends we {
|
|
|
16242
16246
|
const i = t.userid;
|
|
16243
16247
|
if (i) {
|
|
16244
16248
|
const s = this.bizControl.addUser(i, t.displayname, le.Join);
|
|
16245
|
-
|
|
16249
|
+
O.event(`[${K.logName}]`, ce.UserJoined, s);
|
|
16246
16250
|
}
|
|
16247
16251
|
});
|
|
16248
16252
|
}
|
|
@@ -16252,10 +16256,10 @@ const z = (K = class extends we {
|
|
|
16252
16256
|
* @returns {void}
|
|
16253
16257
|
*/
|
|
16254
16258
|
onLocalDeviceStatusChange(e) {
|
|
16255
|
-
|
|
16256
|
-
|
|
16259
|
+
O.event(`[${K.logName}]`, Ne.Local, e), this.signalingManager.reportStatus(e).then(() => {
|
|
16260
|
+
O.debug("[signaling] reportStatus suc");
|
|
16257
16261
|
}).catch((t) => {
|
|
16258
|
-
|
|
16262
|
+
O.error("[signaling] reportStatus failed", t);
|
|
16259
16263
|
});
|
|
16260
16264
|
}
|
|
16261
16265
|
resumePublishForNetworkRecovery() {
|
|
@@ -16290,7 +16294,7 @@ const z = (K = class extends we {
|
|
|
16290
16294
|
onNetworkRecovery(e) {
|
|
16291
16295
|
return w(this, null, function* () {
|
|
16292
16296
|
var t;
|
|
16293
|
-
|
|
16297
|
+
O.event(
|
|
16294
16298
|
K.logName,
|
|
16295
16299
|
"onNetworkRecovery",
|
|
16296
16300
|
`rts isConnected: ${this.bizControl.rtsManager.isConnected}; rts isConnecting: ${this.bizControl.rtsManager.isConnecting}`,
|
|
@@ -16306,12 +16310,12 @@ const z = (K = class extends we {
|
|
|
16306
16310
|
return w(this, null, function* () {
|
|
16307
16311
|
if (e != null && e.length) {
|
|
16308
16312
|
const { joinList: t, leaveList: i, presentList: s } = this.bizControl.updateUsers(e);
|
|
16309
|
-
|
|
16313
|
+
O.info(`[${K.logName}]`, "resumeSubList", {
|
|
16310
16314
|
joinList: t,
|
|
16311
16315
|
leaveList: i,
|
|
16312
16316
|
presentList: s
|
|
16313
16317
|
}), this.handleUsersJoin(t), i.forEach((a) => {
|
|
16314
|
-
|
|
16318
|
+
O.event(K.logName, ce.UserLeft, a.userid, a.reason), this.emit("remoteUserOffLineNotify", a.userid, Qr.AliRtcUserOfflineQuit);
|
|
16315
16319
|
});
|
|
16316
16320
|
for (let a = 0; a < s.length; a++) {
|
|
16317
16321
|
const c = s[a], o = c.userid, u = this.bizControl.getRemoteUser(o);
|
|
@@ -16331,7 +16335,7 @@ const z = (K = class extends we {
|
|
|
16331
16335
|
return w(this, null, function* () {
|
|
16332
16336
|
const t = this.bizControl.getRemoteUser(e);
|
|
16333
16337
|
if (!t)
|
|
16334
|
-
throw new V(
|
|
16338
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16335
16339
|
t.restore(), t.updateSubscribe(le.Retry);
|
|
16336
16340
|
});
|
|
16337
16341
|
}
|
|
@@ -16353,7 +16357,7 @@ const z = (K = class extends we {
|
|
|
16353
16357
|
* @returns {void}
|
|
16354
16358
|
*/
|
|
16355
16359
|
onError(e) {
|
|
16356
|
-
this.slsReporter.reportError(e),
|
|
16360
|
+
this.slsReporter.reportError(e), O.event(K.logName, ce.Error, e);
|
|
16357
16361
|
}
|
|
16358
16362
|
setEnableDualVideoStream(e, t) {
|
|
16359
16363
|
this.bizControl.setEnableDualVideoStream(e, t);
|
|
@@ -16364,7 +16368,7 @@ const z = (K = class extends we {
|
|
|
16364
16368
|
// @ts-ignore
|
|
16365
16369
|
hadPushStream(e) {
|
|
16366
16370
|
if (!(this.publisher && e))
|
|
16367
|
-
throw new V(
|
|
16371
|
+
throw new V(U.ERR_INNER, "stream is not publishing");
|
|
16368
16372
|
}
|
|
16369
16373
|
/**
|
|
16370
16374
|
* 获取当前使用的麦克风 deviceId
|
|
@@ -16380,7 +16384,7 @@ const z = (K = class extends we {
|
|
|
16380
16384
|
he.AliRtcConnectionStatusDisconnected,
|
|
16381
16385
|
he.AliRtcConnectionStatusFailed
|
|
16382
16386
|
].includes(this.connectState))
|
|
16383
|
-
throw new V(
|
|
16387
|
+
throw new V(U.ERR_INNER, "cannot set channel profile in call");
|
|
16384
16388
|
this.channelProfile = e, this.channelProfile === St.AliRtcSdkCommunication && (this.clientRole = Dt.AliRtcSdkLive), this.signalingManager.setChannelProfile(e);
|
|
16385
16389
|
}
|
|
16386
16390
|
startAndPublishDefaultDevices(e) {
|
|
@@ -16394,9 +16398,9 @@ const z = (K = class extends we {
|
|
|
16394
16398
|
try {
|
|
16395
16399
|
yield (c = this.publisher) == null ? void 0 : c.startDefaultCamera(this._audioOnlyMode);
|
|
16396
16400
|
} catch (d) {
|
|
16397
|
-
|
|
16401
|
+
O.warn(`[${K.logName}]`, "startDefaultCamera failed", d.code, d.message), d instanceof V && this.occurError(d), this.occurError(
|
|
16398
16402
|
new V(
|
|
16399
|
-
|
|
16403
|
+
U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED,
|
|
16400
16404
|
`auto start video failed, ${d.message || ""}`
|
|
16401
16405
|
)
|
|
16402
16406
|
);
|
|
@@ -16404,9 +16408,9 @@ const z = (K = class extends we {
|
|
|
16404
16408
|
try {
|
|
16405
16409
|
yield (o = this.publisher) == null ? void 0 : o.startDefaultAudio();
|
|
16406
16410
|
} catch (d) {
|
|
16407
|
-
|
|
16411
|
+
O.warn(`[${K.logName}]`, "startDefaultAUdio failed", d.code, d.message), d instanceof V && this.occurError(d), this.occurError(
|
|
16408
16412
|
new V(
|
|
16409
|
-
|
|
16413
|
+
U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED,
|
|
16410
16414
|
`auto start audio failed, ${d.message || ""}`
|
|
16411
16415
|
)
|
|
16412
16416
|
);
|
|
@@ -16418,7 +16422,7 @@ const z = (K = class extends we {
|
|
|
16418
16422
|
yield (p = this.publisher) == null ? void 0 : p.startPublish(!1, e);
|
|
16419
16423
|
} catch (d) {
|
|
16420
16424
|
const f = [];
|
|
16421
|
-
a != null && a.audio && f.push(
|
|
16425
|
+
a != null && a.audio && f.push(U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), a != null && a.video && f.push(U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), f.forEach((g) => {
|
|
16422
16426
|
this.occurError(new V(g, `auto publish stream failed, ${d.message || ""}`));
|
|
16423
16427
|
});
|
|
16424
16428
|
}
|
|
@@ -16432,7 +16436,7 @@ const z = (K = class extends we {
|
|
|
16432
16436
|
return;
|
|
16433
16437
|
if (!Object.values(Dt).includes(e))
|
|
16434
16438
|
throw new V(
|
|
16435
|
-
|
|
16439
|
+
U.ERR_INVALID_ARGUMENTS,
|
|
16436
16440
|
`set client role error, role value(${e}) is invalid`
|
|
16437
16441
|
);
|
|
16438
16442
|
if (this.clientRole === e)
|
|
@@ -16452,12 +16456,12 @@ const z = (K = class extends we {
|
|
|
16452
16456
|
}
|
|
16453
16457
|
setAudioOnlyMode(e) {
|
|
16454
16458
|
if (this.isInCall())
|
|
16455
|
-
throw new V(
|
|
16459
|
+
throw new V(U.ERR_INNER, "can not change audioOnly mode in call");
|
|
16456
16460
|
this._audioOnlyMode = e;
|
|
16457
16461
|
}
|
|
16458
16462
|
setAudioRedEnabled(e) {
|
|
16459
16463
|
if (this.isInCall())
|
|
16460
|
-
throw new V(
|
|
16464
|
+
throw new V(U.ERR_INNER, "can not change audioRedEnabled in call");
|
|
16461
16465
|
this.bizControl.setAudioRedEnabled(e);
|
|
16462
16466
|
}
|
|
16463
16467
|
/**
|
|
@@ -16492,7 +16496,7 @@ const z = (K = class extends we {
|
|
|
16492
16496
|
token: h.token
|
|
16493
16497
|
};
|
|
16494
16498
|
} catch (h) {
|
|
16495
|
-
throw new V(
|
|
16499
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${h.message || ""}`);
|
|
16496
16500
|
}
|
|
16497
16501
|
else
|
|
16498
16502
|
i = e;
|
|
@@ -16504,7 +16508,7 @@ const z = (K = class extends we {
|
|
|
16504
16508
|
if (he.AliRtcConnectionStatusInit === this.connectState || he.AliRtcConnectionStatusDisconnected === this.connectState || he.AliRtcConnectionStatusFailed === this.connectState) {
|
|
16505
16509
|
if (this.connectState = he.AliRtcConnectionStatusConnecting, c)
|
|
16506
16510
|
throw this.connectState = he.AliRtcConnectionStatusFailed, this.slsReporter.reportJoin(c.code, a, ""), this.slsReporter.reportJoinResult(c), c;
|
|
16507
|
-
i.sessionId =
|
|
16511
|
+
i.sessionId = He.createCallid("web"), O.setSessionID(i.appId, i.sessionId), this.slsReporter.start(i);
|
|
16508
16512
|
try {
|
|
16509
16513
|
const h = yield this.signalingManager.join(
|
|
16510
16514
|
i,
|
|
@@ -16521,7 +16525,7 @@ const z = (K = class extends we {
|
|
|
16521
16525
|
h.updateSubscribe(le.Join);
|
|
16522
16526
|
});
|
|
16523
16527
|
} else {
|
|
16524
|
-
const h = new V(
|
|
16528
|
+
const h = new V(U.ERR_JOIN_ALREADY_JOINED, "already joined");
|
|
16525
16529
|
throw this.connectState === he.AliRtcConnectionStatusConnecting && (h.message = "Repeated operation during login"), this.slsReporter.reportJoin(h.code, a, ""), h;
|
|
16526
16530
|
}
|
|
16527
16531
|
});
|
|
@@ -16544,7 +16548,7 @@ const z = (K = class extends we {
|
|
|
16544
16548
|
}
|
|
16545
16549
|
else
|
|
16546
16550
|
this.slsReporter.reportLeave(0, 0, "");
|
|
16547
|
-
this.networkError = !1, this.connectState = he.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(),
|
|
16551
|
+
this.networkError = !1, this.connectState = he.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(), O.reportEnd();
|
|
16548
16552
|
});
|
|
16549
16553
|
}
|
|
16550
16554
|
/**
|
|
@@ -16569,7 +16573,7 @@ const z = (K = class extends we {
|
|
|
16569
16573
|
token: h.token
|
|
16570
16574
|
};
|
|
16571
16575
|
} catch (h) {
|
|
16572
|
-
throw new V(
|
|
16576
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${h.message || ""}`);
|
|
16573
16577
|
}
|
|
16574
16578
|
else
|
|
16575
16579
|
t = e;
|
|
@@ -16619,7 +16623,7 @@ const z = (K = class extends we {
|
|
|
16619
16623
|
subscribeRemoteAudioStream(e, t) {
|
|
16620
16624
|
if (t && !this.bizControl.isWantSubAudio)
|
|
16621
16625
|
throw new V(
|
|
16622
|
-
|
|
16626
|
+
U.ERR_INVALID_ARGUMENTS,
|
|
16623
16627
|
"subscribeAllRemoteAudioStreams(true) must be called first"
|
|
16624
16628
|
);
|
|
16625
16629
|
this.bizControl.updateAudioWant(e, t);
|
|
@@ -16627,13 +16631,13 @@ const z = (K = class extends we {
|
|
|
16627
16631
|
resumeRemoteAudioStream(e) {
|
|
16628
16632
|
const t = this.bizControl.getRemoteUser(e);
|
|
16629
16633
|
if (!t)
|
|
16630
|
-
throw new V(
|
|
16634
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16631
16635
|
t.resumeAudio();
|
|
16632
16636
|
}
|
|
16633
16637
|
stopRemoteAudioPlay(e) {
|
|
16634
16638
|
const t = this.bizControl.getRemoteUser(e);
|
|
16635
16639
|
if (!t)
|
|
16636
|
-
throw new V(
|
|
16640
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16637
16641
|
t.stopPlayAudio();
|
|
16638
16642
|
}
|
|
16639
16643
|
publishLocalVideoStream(e) {
|
|
@@ -16668,7 +16672,7 @@ const z = (K = class extends we {
|
|
|
16668
16672
|
subscribeRemoteMediaStream(e, t, i, s) {
|
|
16669
16673
|
const a = this.bizControl.getRemoteUser(e);
|
|
16670
16674
|
if (!a)
|
|
16671
|
-
throw new V(
|
|
16675
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16672
16676
|
i && (t === se.AliRtcVideoTrackScreen || t === se.AliRtcVideoTrackBoth) ? a.setWantSubScreen(!0) : a.setWantSubScreen(!1), i && (t === se.AliRtcVideoTrackCamera || t === se.AliRtcVideoTrackBoth) ? a.setWantSubVideo(!0) : a.setWantSubVideo(!1), a.setWantSubAudio(s), a.updateSubscribe(le.User);
|
|
16673
16677
|
}
|
|
16674
16678
|
resumeRemoteMediaStream(e, t) {
|
|
@@ -16788,7 +16792,7 @@ const z = (K = class extends we {
|
|
|
16788
16792
|
}
|
|
16789
16793
|
setAudioShareVolume(e) {
|
|
16790
16794
|
if (typeof e != "number")
|
|
16791
|
-
throw new V(
|
|
16795
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
16792
16796
|
this.bizControl.setAudioVolume({
|
|
16793
16797
|
screen: Math.max(0, Math.min(e, 400)) / 100
|
|
16794
16798
|
});
|
|
@@ -16803,7 +16807,7 @@ const z = (K = class extends we {
|
|
|
16803
16807
|
muteRemoteAudioPlaying(e, t = !1) {
|
|
16804
16808
|
const i = this.bizControl.getRemoteUser(e);
|
|
16805
16809
|
if (!i)
|
|
16806
|
-
throw new V(
|
|
16810
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16807
16811
|
i.setAudioMuted(t);
|
|
16808
16812
|
}
|
|
16809
16813
|
muteAllRemoteAudioPlaying(e = !1) {
|
|
@@ -16843,22 +16847,22 @@ const z = (K = class extends we {
|
|
|
16843
16847
|
}
|
|
16844
16848
|
setRecordingVolume(e) {
|
|
16845
16849
|
if (typeof e != "number")
|
|
16846
|
-
throw new V(
|
|
16850
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
16847
16851
|
this.bizControl.setAudioVolume({
|
|
16848
16852
|
audio: Math.max(0, Math.min(e, 400)) / 100
|
|
16849
16853
|
});
|
|
16850
16854
|
}
|
|
16851
16855
|
setPlayoutVolume(e) {
|
|
16852
16856
|
if (typeof e != "number")
|
|
16853
|
-
throw new V(
|
|
16857
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
16854
16858
|
this.bizControl.setPlayoutVolume(Math.max(0, Math.min(e, 100)) / 100);
|
|
16855
16859
|
}
|
|
16856
16860
|
setRemoteAudioVolume(e, t) {
|
|
16857
16861
|
const i = this.bizControl.getRemoteUser(e);
|
|
16858
16862
|
if (!i)
|
|
16859
|
-
throw new V(
|
|
16863
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
16860
16864
|
if (typeof t != "number")
|
|
16861
|
-
throw new V(
|
|
16865
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
16862
16866
|
i.setPlayoutVolume(Math.max(0, Math.min(t, 100)) / 100);
|
|
16863
16867
|
}
|
|
16864
16868
|
setAudioProfile(e) {
|
|
@@ -16880,7 +16884,7 @@ const z = (K = class extends we {
|
|
|
16880
16884
|
return w(this, null, function* () {
|
|
16881
16885
|
var i, s, a;
|
|
16882
16886
|
if (this._audioOnlyMode)
|
|
16883
|
-
throw new V(
|
|
16887
|
+
throw new V(U.ERR_INNER, "Cannot set local view in audio only mode");
|
|
16884
16888
|
(i = this.bizControl) == null || i.setLocalViewConfig(e, t), t === se.AliRtcVideoTrackCamera && ((s = this.publisher) != null && s.hasCamera) ? yield this.startPreview() : t === se.AliRtcVideoTrackScreen && ((a = this.publisher) != null && a.hasScreenShare) && (yield this.startPreviewScreen());
|
|
16885
16889
|
});
|
|
16886
16890
|
}
|
|
@@ -16913,7 +16917,7 @@ const z = (K = class extends we {
|
|
|
16913
16917
|
return w(this, null, function* () {
|
|
16914
16918
|
var t, i, s, a, c, o, u, h, p, d, f;
|
|
16915
16919
|
if (this._audioOnlyMode)
|
|
16916
|
-
throw new V(
|
|
16920
|
+
throw new V(U.ERR_INNER, "Cannot enable local video in audio only mode");
|
|
16917
16921
|
e ? ((i = (t = this.publisher) == null ? void 0 : t.publishStreams) != null && i.video && ((c = (a = (s = this.publisher) == null ? void 0 : s.publishStreams) == null ? void 0 : a.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();
|
|
16918
16922
|
});
|
|
16919
16923
|
}
|
|
@@ -16947,7 +16951,7 @@ const z = (K = class extends we {
|
|
|
16947
16951
|
return w(this, null, function* () {
|
|
16948
16952
|
var s, a, c, o, u, h, p, d, f, g, l, S, v;
|
|
16949
16953
|
if (this._audioOnlyMode)
|
|
16950
|
-
throw new V(
|
|
16954
|
+
throw new V(U.ERR_INNER, "Cannot switch camera in audio only mode");
|
|
16951
16955
|
const i = {};
|
|
16952
16956
|
if (e ? (i.deviceId = e, this.slsReporter.reportSwitchCamera(e)) : (i.cameraDirection = ((s = this.publisher) == null ? void 0 : s.cameraDirection) === "environment" ? ai.CAMERA_FRONT : ai.CAMERA_REAR, this.slsReporter.reportSwitchCamera(((a = this.publisher) == null ? void 0 : a.cameraDirection) || "")), yield this.setCameraCapturerConfiguration(i), !((c = this.publisher) != null && c.cameraCaptureDisabled)) {
|
|
16953
16957
|
(u = (o = this.publisher) == null ? void 0 : o.publishStreams) != null && u.video && ((d = (p = (h = this.publisher) == null ? void 0 : h.publishStreams) == null ? void 0 : p.video) == null || d.disableVideo(), (S = (l = (g = (f = this.publisher) == null ? void 0 : f.publishStreams) == null ? void 0 : g.video) == null ? void 0 : l.videoTrack) == null || S.stop());
|
|
@@ -16970,7 +16974,7 @@ const z = (K = class extends we {
|
|
|
16970
16974
|
return w(this, null, function* () {
|
|
16971
16975
|
var e, t;
|
|
16972
16976
|
if (this._audioOnlyMode)
|
|
16973
|
-
throw new V(
|
|
16977
|
+
throw new V(U.ERR_INNER, "Cannot start preview camera in audio only mode");
|
|
16974
16978
|
(e = this.publisher) != null && e.hasCamera || (yield this.enableLocalVideo(!0)), yield (t = this.publisher) == null ? void 0 : t.previewAll({
|
|
16975
16979
|
screen: !1
|
|
16976
16980
|
});
|
|
@@ -16980,7 +16984,7 @@ const z = (K = class extends we {
|
|
|
16980
16984
|
return w(this, null, function* () {
|
|
16981
16985
|
var t, i;
|
|
16982
16986
|
if (this._audioOnlyMode)
|
|
16983
|
-
throw new V(
|
|
16987
|
+
throw new V(U.ERR_INNER, "Cannot start preview screen share in audio only mode");
|
|
16984
16988
|
(t = this.publisher) != null && t.hasScreenShare || (yield this.startScreenShare(e)), yield (i = this.publisher) == null ? void 0 : i.previewAll({
|
|
16985
16989
|
primary: !1
|
|
16986
16990
|
});
|
|
@@ -17073,7 +17077,7 @@ const z = (K = class extends we {
|
|
|
17073
17077
|
return w(this, null, function* () {
|
|
17074
17078
|
var s;
|
|
17075
17079
|
if (!this.publisher || !this.isPublishing)
|
|
17076
|
-
throw new V(
|
|
17080
|
+
throw new V(U.ERR_INNER, "you should publish first");
|
|
17077
17081
|
return this.slsReporter.reportSEIMessage(i, e.byteLength, t, 0, !1), (s = this.publisher) == null ? void 0 : s.sendSEI(e, t, i);
|
|
17078
17082
|
});
|
|
17079
17083
|
}
|
|
@@ -17214,70 +17218,70 @@ W([
|
|
|
17214
17218
|
D()
|
|
17215
17219
|
], z.prototype, "resumeSubList", 1);
|
|
17216
17220
|
W([
|
|
17217
|
-
D(
|
|
17221
|
+
D(H)
|
|
17218
17222
|
], z.prototype, "retrySubscribe", 1);
|
|
17219
17223
|
W([
|
|
17220
|
-
D(
|
|
17224
|
+
D(H)
|
|
17221
17225
|
], z.prototype, "setEnableDualVideoStream", 1);
|
|
17222
17226
|
W([
|
|
17223
|
-
D(
|
|
17227
|
+
D(H)
|
|
17224
17228
|
], z.prototype, "setChannelProfile", 1);
|
|
17225
17229
|
W([
|
|
17226
|
-
D(
|
|
17230
|
+
D(H)
|
|
17227
17231
|
], z.prototype, "setClientRole", 1);
|
|
17228
17232
|
W([
|
|
17229
|
-
D(
|
|
17233
|
+
D(H)
|
|
17230
17234
|
], z.prototype, "setAudioOnlyMode", 1);
|
|
17231
17235
|
W([
|
|
17232
17236
|
D()
|
|
17233
17237
|
], z.prototype, "clearCheckAuthInfoTimer", 1);
|
|
17234
17238
|
W([
|
|
17235
|
-
D(
|
|
17239
|
+
D(H)
|
|
17236
17240
|
], z.prototype, "joinChannel", 1);
|
|
17237
17241
|
W([
|
|
17238
|
-
D(
|
|
17242
|
+
D(H)
|
|
17239
17243
|
], z.prototype, "leaveChannel", 1);
|
|
17240
17244
|
W([
|
|
17241
|
-
D(
|
|
17245
|
+
D(H)
|
|
17242
17246
|
], z.prototype, "refreshAuthInfo", 1);
|
|
17243
17247
|
W([
|
|
17244
|
-
D(
|
|
17248
|
+
D(H)
|
|
17245
17249
|
], z.prototype, "publishLocalAudioStream", 1);
|
|
17246
17250
|
W([
|
|
17247
|
-
D(
|
|
17251
|
+
D(H)
|
|
17248
17252
|
], z.prototype, "setDefaultSubscribeAllRemoteAudioStreams", 1);
|
|
17249
17253
|
W([
|
|
17250
|
-
D(
|
|
17254
|
+
D(H)
|
|
17251
17255
|
], z.prototype, "subscribeAllRemoteAudioStreams", 1);
|
|
17252
17256
|
W([
|
|
17253
|
-
D(
|
|
17257
|
+
D(H)
|
|
17254
17258
|
], z.prototype, "subscribeRemoteAudioStream", 1);
|
|
17255
17259
|
W([
|
|
17256
|
-
D(
|
|
17260
|
+
D(H)
|
|
17257
17261
|
], z.prototype, "resumeRemoteAudioStream", 1);
|
|
17258
17262
|
W([
|
|
17259
|
-
D(
|
|
17263
|
+
D(H)
|
|
17260
17264
|
], z.prototype, "stopRemoteAudioPlay", 1);
|
|
17261
17265
|
W([
|
|
17262
|
-
D(
|
|
17266
|
+
D(H)
|
|
17263
17267
|
], z.prototype, "publishLocalVideoStream", 1);
|
|
17264
17268
|
W([
|
|
17265
|
-
D(
|
|
17269
|
+
D(H)
|
|
17266
17270
|
], z.prototype, "setRemoteDefaultVideoStreamType", 1);
|
|
17267
17271
|
W([
|
|
17268
|
-
D(
|
|
17272
|
+
D(H)
|
|
17269
17273
|
], z.prototype, "setRemoteUserVideoStreamType", 1);
|
|
17270
17274
|
W([
|
|
17271
|
-
D(
|
|
17275
|
+
D(H)
|
|
17272
17276
|
], z.prototype, "setDefaultSubscribeAllRemoteVideoStreams", 1);
|
|
17273
17277
|
W([
|
|
17274
|
-
D(
|
|
17278
|
+
D(H)
|
|
17275
17279
|
], z.prototype, "subscribeAllRemoteVideoStreams", 1);
|
|
17276
17280
|
W([
|
|
17277
|
-
D(
|
|
17281
|
+
D(H)
|
|
17278
17282
|
], z.prototype, "subscribeRemoteMediaStream", 1);
|
|
17279
17283
|
W([
|
|
17280
|
-
D(
|
|
17284
|
+
D(H)
|
|
17281
17285
|
], z.prototype, "resumeRemoteMediaStream", 1);
|
|
17282
17286
|
W([
|
|
17283
17287
|
D(([r]) => [`${r == null ? void 0 : r.audio}`])
|
|
@@ -17286,76 +17290,76 @@ W([
|
|
|
17286
17290
|
D()
|
|
17287
17291
|
], z.prototype, "stopScreenShare", 1);
|
|
17288
17292
|
W([
|
|
17289
|
-
D(
|
|
17293
|
+
D(H)
|
|
17290
17294
|
], z.prototype, "setScreenShareConfiguration", 1);
|
|
17291
17295
|
W([
|
|
17292
|
-
D(
|
|
17296
|
+
D(H)
|
|
17293
17297
|
], z.prototype, "setScreenShareContentHint", 1);
|
|
17294
17298
|
W([
|
|
17295
17299
|
D()
|
|
17296
17300
|
], z.prototype, "publishLocalScreenShareStream", 1);
|
|
17297
17301
|
W([
|
|
17298
|
-
D(
|
|
17302
|
+
D(H)
|
|
17299
17303
|
], z.prototype, "setAudioShareVolume", 1);
|
|
17300
17304
|
W([
|
|
17301
|
-
D(
|
|
17305
|
+
D(H)
|
|
17302
17306
|
], z.prototype, "enableAudioVolumeIndication", 1);
|
|
17303
17307
|
W([
|
|
17304
|
-
D(
|
|
17308
|
+
D(H)
|
|
17305
17309
|
], z.prototype, "muteLocalMic", 1);
|
|
17306
17310
|
W([
|
|
17307
|
-
D(
|
|
17311
|
+
D(H)
|
|
17308
17312
|
], z.prototype, "muteRemoteAudioPlaying", 1);
|
|
17309
17313
|
W([
|
|
17310
|
-
D(
|
|
17314
|
+
D(H)
|
|
17311
17315
|
], z.prototype, "muteAllRemoteAudioPlaying", 1);
|
|
17312
17316
|
W([
|
|
17313
|
-
D(
|
|
17317
|
+
D(H)
|
|
17314
17318
|
], z.prototype, "startAudioCapture", 1);
|
|
17315
17319
|
W([
|
|
17316
17320
|
D()
|
|
17317
17321
|
], z.prototype, "stopAudioCapture", 1);
|
|
17318
17322
|
W([
|
|
17319
|
-
D(
|
|
17323
|
+
D(H)
|
|
17320
17324
|
], z.prototype, "switchMicrophone", 1);
|
|
17321
17325
|
W([
|
|
17322
|
-
D(
|
|
17326
|
+
D(H)
|
|
17323
17327
|
], z.prototype, "setRecordingVolume", 1);
|
|
17324
17328
|
W([
|
|
17325
|
-
D(
|
|
17329
|
+
D(H)
|
|
17326
17330
|
], z.prototype, "setPlayoutVolume", 1);
|
|
17327
17331
|
W([
|
|
17328
|
-
D(
|
|
17332
|
+
D(H)
|
|
17329
17333
|
], z.prototype, "setRemoteAudioVolume", 1);
|
|
17330
17334
|
W([
|
|
17331
|
-
D(
|
|
17335
|
+
D(H)
|
|
17332
17336
|
], z.prototype, "setAudioProfile", 1);
|
|
17333
17337
|
W([
|
|
17334
|
-
D(
|
|
17338
|
+
D(H)
|
|
17335
17339
|
], z.prototype, "getAudioTrack", 1);
|
|
17336
17340
|
W([
|
|
17337
|
-
D(
|
|
17341
|
+
D(H)
|
|
17338
17342
|
], z.prototype, "setLocalViewConfig", 1);
|
|
17339
17343
|
W([
|
|
17340
|
-
D(
|
|
17344
|
+
D(H)
|
|
17341
17345
|
], z.prototype, "setCameraCapturerConfiguration", 1);
|
|
17342
17346
|
W([
|
|
17343
|
-
D(
|
|
17347
|
+
D(H)
|
|
17344
17348
|
], z.prototype, "setCameraCapturerContentHint", 1);
|
|
17345
17349
|
W([
|
|
17346
|
-
D(
|
|
17350
|
+
D(H)
|
|
17347
17351
|
], z.prototype, "enableLocalVideo", 1);
|
|
17348
17352
|
W([
|
|
17349
|
-
D(
|
|
17353
|
+
D(H)
|
|
17350
17354
|
], z.prototype, "muteLocalCamera", 1);
|
|
17351
17355
|
W([
|
|
17352
|
-
D(
|
|
17356
|
+
D(H)
|
|
17353
17357
|
], z.prototype, "muteLocalScreen", 1);
|
|
17354
17358
|
W([
|
|
17355
|
-
D(
|
|
17359
|
+
D(H)
|
|
17356
17360
|
], z.prototype, "setRemoteViewConfig", 1);
|
|
17357
17361
|
W([
|
|
17358
|
-
D(
|
|
17362
|
+
D(H)
|
|
17359
17363
|
], z.prototype, "switchCamera", 1);
|
|
17360
17364
|
W([
|
|
17361
17365
|
D()
|
|
@@ -17385,7 +17389,7 @@ W([
|
|
|
17385
17389
|
D()
|
|
17386
17390
|
], z.prototype, "stopPublishLiveStreamWithTaskId", 1);
|
|
17387
17391
|
W([
|
|
17388
|
-
D(
|
|
17392
|
+
D(H)
|
|
17389
17393
|
], z.prototype, "setEnableMediaExtensionMsg", 1);
|
|
17390
17394
|
W([
|
|
17391
17395
|
D(([r, n, e]) => [r.byteLength, n, e])
|
|
@@ -17394,25 +17398,25 @@ W([
|
|
|
17394
17398
|
D(([r, n]) => [r.name || "", n])
|
|
17395
17399
|
], z.prototype, "enablePlugin", 1);
|
|
17396
17400
|
W([
|
|
17397
|
-
D(
|
|
17401
|
+
D(H)
|
|
17398
17402
|
], z.prototype, "removePlugin", 1);
|
|
17399
17403
|
W([
|
|
17400
|
-
D(
|
|
17404
|
+
D(H)
|
|
17401
17405
|
], z.prototype, "setPluginOption", 1);
|
|
17402
17406
|
W([
|
|
17403
|
-
D(
|
|
17407
|
+
D(H)
|
|
17404
17408
|
], z.prototype, "getPluginOption", 1);
|
|
17405
17409
|
W([
|
|
17406
|
-
D(
|
|
17410
|
+
D(H)
|
|
17407
17411
|
], z.prototype, "setBeautyEffect", 1);
|
|
17408
17412
|
W([
|
|
17409
|
-
D(
|
|
17413
|
+
D(H)
|
|
17410
17414
|
], z.prototype, "enableBackgroundExchange", 1);
|
|
17411
17415
|
W([
|
|
17412
|
-
D(
|
|
17416
|
+
D(H)
|
|
17413
17417
|
], z.prototype, "enableBackgroundBlur", 1);
|
|
17414
17418
|
W([
|
|
17415
|
-
D(
|
|
17419
|
+
D(H)
|
|
17416
17420
|
], z.prototype, "setParameter", 1);
|
|
17417
17421
|
W([
|
|
17418
17422
|
D(([r]) => {
|
|
@@ -17421,7 +17425,7 @@ W([
|
|
|
17421
17425
|
})
|
|
17422
17426
|
], z.prototype, "sendDataChannelMessage", 1);
|
|
17423
17427
|
W([
|
|
17424
|
-
D(
|
|
17428
|
+
D(H)
|
|
17425
17429
|
], z, "setLogLevel", 1);
|
|
17426
17430
|
let _n = z;
|
|
17427
17431
|
var Za;
|
|
@@ -17440,7 +17444,7 @@ export {
|
|
|
17440
17444
|
vn as AliRtcDataMsgType,
|
|
17441
17445
|
ye as AliRtcEngineLocalDeviceExceptionType,
|
|
17442
17446
|
ut as AliRtcEngineLocalDeviceType,
|
|
17443
|
-
|
|
17447
|
+
U as AliRtcErrorCode,
|
|
17444
17448
|
Xr as AliRtcLiveTranscodingAudioSampleRate,
|
|
17445
17449
|
hn as AliRtcLiveTranscodingCropMode,
|
|
17446
17450
|
fn as AliRtcLiveTranscodingEncodeParam,
|