aliyun-rtc-sdk 7.1.0 → 7.1.1-beta.2
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 +148 -146
- package/dist/aliyun-rtc-sdk.umd.js +10 -10
- package/dist/plugins/audioProcessPlugin.d.ts +1 -0
- package/dist/plugins/audioProcessPlugin.js +2 -2
- package/dist/plugins/beautyPlugin.d.ts +1 -0
- package/dist/plugins/beautyPlugin.js +1 -1
- package/dist/plugins/index-DJR7vMTn.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/plugins/index-BGdMdvjC.js +0 -1
|
@@ -8,7 +8,7 @@ var Ui = (r, a, e) => a in r ? Mn(r, a, { enumerable: !0, configurable: !0, writ
|
|
|
8
8
|
for (var e of bi(a))
|
|
9
9
|
$r.call(a, e) && Ui(r, e, a[e]);
|
|
10
10
|
return r;
|
|
11
|
-
},
|
|
11
|
+
}, bt = (r, a) => Nn(r, Ln(a));
|
|
12
12
|
var xt = (r, a) => {
|
|
13
13
|
var e = {};
|
|
14
14
|
for (var t in r)
|
|
@@ -1261,8 +1261,8 @@ function jn() {
|
|
|
1261
1261
|
var Z = x();
|
|
1262
1262
|
return Re.text().then(function(ue) {
|
|
1263
1263
|
if (!H && d.isFunction(X)) {
|
|
1264
|
-
var
|
|
1265
|
-
|
|
1264
|
+
var Ie = X(Re, ue);
|
|
1265
|
+
Ie && d.isString(Ie) && (H = Ie);
|
|
1266
1266
|
}
|
|
1267
1267
|
var ie = d.getFetchSnapshot(w, ue, ke);
|
|
1268
1268
|
Re.ok ? u(A, C.parseResponse, P, z, ue, Re.status || 200, Z, E, H, Y, ie, M, N) : (A.api(P, !1, Z, Re.status || 404, Re.statusText, E, H, Y, ie, b, M, N), C.enableResource && l.fixResourceStatus && l.fixResourceStatus({ src: Re.url, res_type: "api" }));
|
|
@@ -1498,7 +1498,7 @@ function _s(r, a) {
|
|
|
1498
1498
|
`);
|
|
1499
1499
|
return t < 0 || e < t;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function vt(r, a, e) {
|
|
1502
1502
|
return typeof r == "function" ? function(t, i, s) {
|
|
1503
1503
|
const n = { MediaboxWrapperFunctionApply(o, c, h) {
|
|
1504
1504
|
let d;
|
|
@@ -1507,10 +1507,10 @@ function bt(r, a, e) {
|
|
|
1507
1507
|
} catch (l) {
|
|
1508
1508
|
throw s(l), l;
|
|
1509
1509
|
}
|
|
1510
|
-
return
|
|
1510
|
+
return vt(d, i, s);
|
|
1511
1511
|
}, MediaboxWrapperFunctionGet(o, c) {
|
|
1512
1512
|
const h = Object.getOwnPropertyDescriptor(o, c);
|
|
1513
|
-
return !h || h.writable || h.configurable ?
|
|
1513
|
+
return !h || h.writable || h.configurable ? vt(o[c], i, s) : o[c];
|
|
1514
1514
|
}, MediaboxWrapperClassConstructor(o, c) {
|
|
1515
1515
|
let h;
|
|
1516
1516
|
try {
|
|
@@ -1518,11 +1518,11 @@ function bt(r, a, e) {
|
|
|
1518
1518
|
} catch (d) {
|
|
1519
1519
|
throw s(d), d;
|
|
1520
1520
|
}
|
|
1521
|
-
return
|
|
1521
|
+
return vt(h, i, s);
|
|
1522
1522
|
} };
|
|
1523
1523
|
return new Proxy(t, { apply: n.MediaboxWrapperFunctionApply, get: n.MediaboxWrapperFunctionGet, construct: n.MediaboxWrapperClassConstructor });
|
|
1524
|
-
}(r, a + 1, e) : r instanceof Promise ? r.then((t) =>
|
|
1525
|
-
r[i] =
|
|
1524
|
+
}(r, a + 1, e) : r instanceof Promise ? r.then((t) => vt(t, a + 1, e)).catch((t) => (e(t), Promise.reject(t))) : Array.isArray(r) ? (r.forEach((t, i) => {
|
|
1525
|
+
r[i] = vt(t, a + 1, e);
|
|
1526
1526
|
}), r) : ((t) => t !== null && typeof t == "object")(r) && Wn(r) ? function(t, i, s) {
|
|
1527
1527
|
var h;
|
|
1528
1528
|
if (Reflect.get(t, "__v_skip") === !0)
|
|
@@ -1538,10 +1538,10 @@ function bt(r, a, e) {
|
|
|
1538
1538
|
} catch (u) {
|
|
1539
1539
|
throw s(u), u;
|
|
1540
1540
|
}
|
|
1541
|
-
return
|
|
1541
|
+
return vt(b, i, s);
|
|
1542
1542
|
}
|
|
1543
|
-
return i > 10 ? d[l] :
|
|
1544
|
-
}, MediaboxWrapperObjectSetter: (d, l, b) => (d[l] =
|
|
1543
|
+
return i > 10 ? d[l] : vt(d[l], i, s);
|
|
1544
|
+
}, MediaboxWrapperObjectSetter: (d, l, b) => (d[l] = vt(b, i, s), !0) };
|
|
1545
1545
|
return Object.defineProperty(t, "__v_skip", { configurable: !0, enumerable: !1, writable: !1, value: !0 }), new Proxy(t, { get: c.MediaboxWrapperObjectGetter, set: c.MediaboxWrapperObjectSetter });
|
|
1546
1546
|
}(r, a + 1, e) : r;
|
|
1547
1547
|
}
|
|
@@ -1557,7 +1557,7 @@ let Kn = 1;
|
|
|
1557
1557
|
class Er {
|
|
1558
1558
|
constructor(a) {
|
|
1559
1559
|
var e, t;
|
|
1560
|
-
Vt(this, "armsLogger"), Vt(this, "isReady", !1), Vt(this, "isDestroyed", !1), Vt(this, "options"), Vt(this, "queue", []), Vt(this, "marker"), Vt(this, "helper", { MediaboxWrapperQueue: (i) => new Es(i), MediaboxWrapperInitiative: (i) => new Es(i) }), this.options =
|
|
1560
|
+
Vt(this, "armsLogger"), Vt(this, "isReady", !1), Vt(this, "isDestroyed", !1), Vt(this, "options"), Vt(this, "queue", []), Vt(this, "marker"), Vt(this, "helper", { MediaboxWrapperQueue: (i) => new Es(i), MediaboxWrapperInitiative: (i) => new Es(i) }), this.options = bt(J({}, a), { region: a.deferRegionSet ? void 0 : (e = a.region) != null ? e : "cn", env: (t = a.env) != null ? t : "prod" }), this.marker = `-${Kn++}-`, this.initArmsLogger();
|
|
1561
1561
|
}
|
|
1562
1562
|
static get version() {
|
|
1563
1563
|
return "0.23.0";
|
|
@@ -1590,7 +1590,7 @@ class Er {
|
|
|
1590
1590
|
} });
|
|
1591
1591
|
}
|
|
1592
1592
|
wrap(a) {
|
|
1593
|
-
return this.options.disabled || typeof Proxy > "u" ? a :
|
|
1593
|
+
return this.options.disabled || typeof Proxy > "u" ? a : vt(a, 0, (e) => {
|
|
1594
1594
|
var t;
|
|
1595
1595
|
e instanceof Error && typeof e.stack == "string" && ws(e.stack) && ((t = this.armsLogger) == null || t.error(e), e.stack = function(i, s) {
|
|
1596
1596
|
if (typeof i != "string")
|
|
@@ -1643,8 +1643,8 @@ function lt(r, a, e) {
|
|
|
1643
1643
|
return (We[s[n + 0]] + We[s[n + 1]] + We[s[n + 2]] + We[s[n + 3]] + "-" + We[s[n + 4]] + We[s[n + 5]] + "-" + We[s[n + 6]] + We[s[n + 7]] + "-" + We[s[n + 8]] + We[s[n + 9]] + "-" + We[s[n + 10]] + We[s[n + 11]] + We[s[n + 12]] + We[s[n + 13]] + We[s[n + 14]] + We[s[n + 15]]).toLowerCase();
|
|
1644
1644
|
}(t);
|
|
1645
1645
|
}
|
|
1646
|
-
var we = ((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))(we || {}), Ze = ((r) => (r.Local = "local-device-status-change", r.Remote = "remote-device-status-change", r))(Ze || {}), k = ((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 || {}), ur = ((r) => (r.Audio = "rts audio", r.VideoLarge = "rts video", r))(ur || {}), Et = ((r) => (r.Add = "add", r.Delete = "delete", r.Replace = "replace", r.Stop = "stop", r.UnPublish = "unpublish", r))(Et || {}),
|
|
1647
|
-
const Li = "7.1.
|
|
1646
|
+
var we = ((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))(we || {}), Ze = ((r) => (r.Local = "local-device-status-change", r.Remote = "remote-device-status-change", r))(Ze || {}), k = ((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 || {}), ur = ((r) => (r.Audio = "rts audio", r.VideoLarge = "rts video", r))(ur || {}), Et = ((r) => (r.Add = "add", r.Delete = "delete", r.Replace = "replace", r.Stop = "stop", r.UnPublish = "unpublish", r))(Et || {}), li = ((r) => (r[r.Camera = 0] = "Camera", r[r.Screen = 1] = "Screen", r[r.Image = 2] = "Image", r))(li || {}), Ti = ((r) => (r[r.Microphone = 0] = "Microphone", r[r.Screen = 1] = "Screen", r[r.Mixed = 2] = "Mixed", r))(Ti || {}), fe = ((r) => (r.InRoom = "inRoom", r.Join = "join", r.Publish = "publish", r.User = "user", r.Resume = "resume", r.Retry = "retry", r.Reconnect = "reconnect", r))(fe || {}), St = ((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 || {}), Ci = ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(Ci || {});
|
|
1647
|
+
const Li = "7.1.1-beta.2";
|
|
1648
1648
|
class it {
|
|
1649
1649
|
static getVersionNumber() {
|
|
1650
1650
|
let a = Li.split("."), e = "";
|
|
@@ -2300,15 +2300,15 @@ function Xs() {
|
|
|
2300
2300
|
this._hash = new s.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)]);
|
|
2301
2301
|
}, _doProcessBlock: function(l, b) {
|
|
2302
2302
|
for (var u = this._hash.words, f = u[0], p = u[1], m = u[2], S = u[3], R = u[4], _ = u[5], y = u[6], v = u[7], w = f.high, A = f.low, E = p.high, C = p.low, x = m.high, P = m.low, z = S.high, G = S.low, X = R.high, K = R.low, H = _.high, Y = _.low, ee = y.high, M = y.low, L = v.high, D = v.low, N = w, ce = A, me = E, ye = C, $ = x, de = P, Pe = z, be = G, le = X, ge = K, Fe = H, te = Y, Re = ee, ke = M, se = L, re = D, Z = 0; Z < 80; Z++) {
|
|
2303
|
-
var ue,
|
|
2303
|
+
var ue, Ie, ie = h[Z];
|
|
2304
2304
|
if (Z < 16)
|
|
2305
|
-
|
|
2305
|
+
Ie = ie.high = 0 | l[b + 2 * Z], ue = ie.low = 0 | l[b + 2 * Z + 1];
|
|
2306
2306
|
else {
|
|
2307
2307
|
var je = h[Z - 15], q = je.high, Ee = je.low, Je = (q >>> 1 | Ee << 31) ^ (q >>> 8 | Ee << 24) ^ q >>> 7, Oe = (Ee >>> 1 | q << 31) ^ (Ee >>> 8 | q << 24) ^ (Ee >>> 7 | q << 25), Gt = h[Z - 2], Ge = Gt.high, pt = Gt.low, qt = (Ge >>> 19 | pt << 13) ^ (Ge << 3 | pt >>> 29) ^ Ge >>> 6, nt = (pt >>> 19 | Ge << 13) ^ (pt << 3 | Ge >>> 29) ^ (pt >>> 6 | Ge << 26), wt = h[Z - 7], fi = wt.high, Si = wt.low, Ur = h[Z - 16], wn = Ur.high, Br = Ur.low;
|
|
2308
|
-
|
|
2308
|
+
Ie = (Ie = (Ie = Je + fi + ((ue = Oe + Si) >>> 0 < Oe >>> 0 ? 1 : 0)) + qt + ((ue += nt) >>> 0 < nt >>> 0 ? 1 : 0)) + wn + ((ue += Br) >>> 0 < Br >>> 0 ? 1 : 0), ie.high = Ie, ie.low = ue;
|
|
2309
2309
|
}
|
|
2310
|
-
var Lt, En = le & Fe ^ ~le & Re, Hr = ge & te ^ ~ge & ke, In = N & me ^ N & $ ^ me & $, Tn = ce & ye ^ ce & de ^ ye & de, Cn = (N >>> 28 | ce << 4) ^ (N << 30 | ce >>> 2) ^ (N << 25 | ce >>> 7), Fr = (ce >>> 28 | N << 4) ^ (ce << 30 | N >>> 2) ^ (ce << 25 | N >>> 7), kn = (le >>> 14 | ge << 18) ^ (le >>> 18 | ge << 14) ^ (le << 23 | ge >>> 9), Pn = (ge >>> 14 | le << 18) ^ (ge >>> 18 | le << 14) ^ (ge << 23 | le >>> 9), jr = c[Z], Dn = jr.high, zr = jr.low,
|
|
2311
|
-
se = Re, re = ke, Re = Fe, ke = te, Fe = le, te = ge, le = Pe + (
|
|
2310
|
+
var Lt, En = le & Fe ^ ~le & Re, Hr = ge & te ^ ~ge & ke, In = N & me ^ N & $ ^ me & $, Tn = ce & ye ^ ce & de ^ ye & de, Cn = (N >>> 28 | ce << 4) ^ (N << 30 | ce >>> 2) ^ (N << 25 | ce >>> 7), Fr = (ce >>> 28 | N << 4) ^ (ce << 30 | N >>> 2) ^ (ce << 25 | N >>> 7), kn = (le >>> 14 | ge << 18) ^ (le >>> 18 | ge << 14) ^ (le << 23 | ge >>> 9), Pn = (ge >>> 14 | le << 18) ^ (ge >>> 18 | le << 14) ^ (ge << 23 | le >>> 9), jr = c[Z], Dn = jr.high, zr = jr.low, ti = se + kn + ((Lt = re + Pn) >>> 0 < re >>> 0 ? 1 : 0), Wr = Fr + Tn;
|
|
2311
|
+
se = Re, re = ke, Re = Fe, ke = te, Fe = le, te = ge, le = Pe + (ti = (ti = (ti = ti + En + ((Lt += Hr) >>> 0 < Hr >>> 0 ? 1 : 0)) + Dn + ((Lt += zr) >>> 0 < zr >>> 0 ? 1 : 0)) + Ie + ((Lt += ue) >>> 0 < ue >>> 0 ? 1 : 0)) + ((ge = be + Lt | 0) >>> 0 < be >>> 0 ? 1 : 0) | 0, Pe = $, be = de, $ = me, de = ye, me = N, ye = ce, N = ti + (Cn + In + (Wr >>> 0 < Fr >>> 0 ? 1 : 0)) + ((ce = Lt + Wr | 0) >>> 0 < Lt >>> 0 ? 1 : 0) | 0;
|
|
2312
2312
|
}
|
|
2313
2313
|
A = f.low = A + ce, f.high = w + N + (A >>> 0 < ce >>> 0 ? 1 : 0), C = p.low = C + ye, p.high = E + me + (C >>> 0 < ye >>> 0 ? 1 : 0), P = m.low = P + de, m.high = x + $ + (P >>> 0 < de >>> 0 ? 1 : 0), G = S.low = G + be, S.high = z + Pe + (G >>> 0 < be >>> 0 ? 1 : 0), K = R.low = K + ge, R.high = X + le + (K >>> 0 < ge >>> 0 ? 1 : 0), Y = _.low = Y + te, _.high = H + Fe + (Y >>> 0 < te >>> 0 ? 1 : 0), M = y.low = M + ke, y.high = ee + Re + (M >>> 0 < ke >>> 0 ? 1 : 0), D = v.low = D + re, v.high = L + se + (D >>> 0 < re >>> 0 ? 1 : 0);
|
|
2314
2314
|
}, _doFinalize: function() {
|
|
@@ -3022,7 +3022,7 @@ en.exports = function(r) {
|
|
|
3022
3022
|
a.RabbitLegacy = e._createHelper(o);
|
|
3023
3023
|
}(), r.RabbitLegacy;
|
|
3024
3024
|
}(he(), Ht(), Ft(), Tt(), Be())), Eo());
|
|
3025
|
-
const
|
|
3025
|
+
const oi = Yn(en.exports);
|
|
3026
3026
|
function Io(r) {
|
|
3027
3027
|
return a = this, e = null, t = function* () {
|
|
3028
3028
|
const i = /* @__PURE__ */ new Date();
|
|
@@ -3063,7 +3063,7 @@ function Tr(r) {
|
|
|
3063
3063
|
}, process: function(a, e) {
|
|
3064
3064
|
return t = this, i = null, s = function* () {
|
|
3065
3065
|
yield Io(r);
|
|
3066
|
-
let n = a.slice(a.indexOf("/logstores")), o = e.length, c = (h = e,
|
|
3066
|
+
let n = a.slice(a.indexOf("/logstores")), o = e.length, c = (h = e, oi.MD5(h).toString().toUpperCase());
|
|
3067
3067
|
var h;
|
|
3068
3068
|
let d = (/* @__PURE__ */ new Date()).toUTCString(), l = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map([["Content-Type", "application/json"], ["Content-MD5", c], ["x-log-bodyrawsize", o.toString()]]);
|
|
3069
3069
|
r.securityToken && b.set("x-acs-security-token", r.securityToken), function(f, p, m, S, R, _, y, v) {
|
|
@@ -3086,7 +3086,7 @@ function Tr(r) {
|
|
|
3086
3086
|
A += [...R.entries()].sort(E).map((P) => P[0] + "=" + P[1]).join("&");
|
|
3087
3087
|
} catch (P) {
|
|
3088
3088
|
}
|
|
3089
|
-
const x = "LOG " + m + ":" +
|
|
3089
|
+
const x = "LOG " + m + ":" + oi.HmacSHA1(A, S).toString(oi.enc.Base64);
|
|
3090
3090
|
_.set("Authorization", x), _.set("x-log-date", v);
|
|
3091
3091
|
}("POST", n, r.accessKeyId, r.accessKeySecret, l, b, c, d);
|
|
3092
3092
|
let u = Object.fromEntries(b);
|
|
@@ -3379,7 +3379,7 @@ class Wo {
|
|
|
3379
3379
|
});
|
|
3380
3380
|
}
|
|
3381
3381
|
requestSTSToken() {
|
|
3382
|
-
const a = Date.now(), e = `${this.clientId}|woMMssV6jmyol9fr|${a}`, t = { Action: "AssumeSlsRoleV2", AuthInfo:
|
|
3382
|
+
const a = Date.now(), e = `${this.clientId}|woMMssV6jmyol9fr|${a}`, t = { Action: "AssumeSlsRoleV2", AuthInfo: oi.MD5(e).toString(oi.enc.Hex), ClientId: this.clientId, BusinessType: "logger", AppVersion: "1.0", Version: "2017-03-14", AuthTimestamp: `${a}`, TerminalType: "web", DeviceModel: "", Format: "JSON", SignatureMethod: "HMAC-SHA1", SignatureVersion: "1.0", Timestamp: Cr(a, "isoUtcDateTime") }, i = new URLSearchParams(t).toString();
|
|
3383
3383
|
return fetch(`https://slsrole.alicdn.com/?${i}`).then((s) => s.json()).then((s) => JSON.parse(window.atob(s.SlsAuthResult)));
|
|
3384
3384
|
}
|
|
3385
3385
|
createTracker(a) {
|
|
@@ -3500,6 +3500,7 @@ class Jt extends He {
|
|
|
3500
3500
|
g(this, "trackType");
|
|
3501
3501
|
g(this, "zIndex", 1);
|
|
3502
3502
|
g(this, "_isEnable", !0);
|
|
3503
|
+
g(this, "shouldCache", !0);
|
|
3503
3504
|
g(this, "lastInputAudioTrack");
|
|
3504
3505
|
g(this, "lastOutputAudioTrack");
|
|
3505
3506
|
g(this, "lastInputVideoTrack");
|
|
@@ -3537,7 +3538,7 @@ class Jt extends He {
|
|
|
3537
3538
|
execute(e, t) {
|
|
3538
3539
|
return I(this, null, function* () {
|
|
3539
3540
|
const i = this.shouldUpdate(e, t);
|
|
3540
|
-
this.lastInputAudioTrack = e.currentAudioTrack, this.lastInputVideoTrack = e.currentVideoTrack, this._hasCleared || i ? (yield this.process(e, t), this._hasCleared = !1) : (!this.lastOutputAudioTrack || this.trackType !== 2 && this.trackType !== 0 || this.lastOutputAudioTrack && e.updateAudioTrack(this.lastOutputAudioTrack), !this.lastOutputVideoTrack || this.trackType !== 2 && this.trackType !== 1 || this.lastOutputVideoTrack && e.updateVideoTrack(this.lastOutputVideoTrack)), this.lastOutputAudioTrack = e.currentAudioTrack, this.lastOutputVideoTrack = e.currentVideoTrack;
|
|
3541
|
+
this.lastInputAudioTrack = e.currentAudioTrack, this.lastInputVideoTrack = e.currentVideoTrack, this._hasCleared || i ? (yield this.process(e, t), this._hasCleared = !1) : this.shouldCache && (!this.lastOutputAudioTrack || this.trackType !== 2 && this.trackType !== 0 || this.lastOutputAudioTrack && e.updateAudioTrack(this.lastOutputAudioTrack), !this.lastOutputVideoTrack || this.trackType !== 2 && this.trackType !== 1 || this.lastOutputVideoTrack && e.updateVideoTrack(this.lastOutputVideoTrack)), this.lastOutputAudioTrack = e.currentAudioTrack, this.lastOutputVideoTrack = e.currentVideoTrack;
|
|
3541
3542
|
});
|
|
3542
3543
|
}
|
|
3543
3544
|
clear(e) {
|
|
@@ -3545,10 +3546,10 @@ class Jt extends He {
|
|
|
3545
3546
|
}
|
|
3546
3547
|
}
|
|
3547
3548
|
var Pi = ((r) => (r[r.LiveTranscodingSingle = 0] = "LiveTranscodingSingle", r[r.LiveTranscodingMix = 1] = "LiveTranscodingMix", r))(Pi || {}), an = ((r) => (r[r.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", r[r.LiveTranscodingAudio = 1] = "LiveTranscodingAudio", r[r.LiveTranscodingVideo = 2] = "LiveTranscodingVideo", r))(an || {}), ui = ((r) => (r[r.LiveTranscodingCamera = 0] = "LiveTranscodingCamera", r[r.LiveTranscodingShareScreen = 1] = "LiveTranscodingShareScreen", r))(ui || {});
|
|
3548
|
-
const
|
|
3549
|
+
const ci = { 0: "camera", 1: "shareScreen" };
|
|
3549
3550
|
var nn = ((r) => (r[r.LiveTranscoding_Profile_1IN_1080P = 0] = "LiveTranscoding_Profile_1IN_1080P", r[r.LiveTranscoding_Profile_1IN_720P = 1] = "LiveTranscoding_Profile_1IN_720P", r[r.LiveTranscoding_Profile_1IN_360P = 2] = "LiveTranscoding_Profile_1IN_360P", r[r.LiveTranscoding_Profile_2IN_1080P = 3] = "LiveTranscoding_Profile_2IN_1080P", r[r.LiveTranscoding_Profile_2IN_720P = 4] = "LiveTranscoding_Profile_2IN_720P", r[r.LiveTranscoding_Profile_2IN_360P = 5] = "LiveTranscoding_Profile_2IN_360P", r[r.LiveTranscoding_Profile_4IN_1080P = 6] = "LiveTranscoding_Profile_4IN_1080P", r[r.LiveTranscoding_Profile_4IN_720P = 7] = "LiveTranscoding_Profile_4IN_720P", r[r.LiveTranscoding_Profile_4IN_360P = 8] = "LiveTranscoding_Profile_4IN_360P", r[r.LiveTranscoding_Profile_9IN_1080P = 9] = "LiveTranscoding_Profile_9IN_1080P", r[r.LiveTranscoding_Profile_9IN_720P = 10] = "LiveTranscoding_Profile_9IN_720P", r[r.LiveTranscoding_Profile_9IN_360P = 11] = "LiveTranscoding_Profile_9IN_360P", r[r.LiveTranscoding_Profile_12IN_1080P = 12] = "LiveTranscoding_Profile_12IN_1080P", r[r.LiveTranscoding_Profile_12IN_720P = 13] = "LiveTranscoding_Profile_12IN_720P", r[r.LiveTranscoding_Profile_12IN_360P = 14] = "LiveTranscoding_Profile_12IN_360P", r[r.LiveTranscoding_Profile_16IN_1080P = 15] = "LiveTranscoding_Profile_16IN_1080P", r[r.LiveTranscoding_Profile_16IN_720P = 16] = "LiveTranscoding_Profile_16IN_720P", r[r.LiveTranscoding_Profile_16IN_360P = 17] = "LiveTranscoding_Profile_16IN_360P", r[r.LiveTranscoding_Profile_Mixed = 9999] = "LiveTranscoding_Profile_Mixed", r))(nn || {});
|
|
3550
3551
|
const Jo = { 0: "1IN_1080P", 1: "1IN_720P", 2: "1IN_360P", 3: "2IN_1080P", 4: "2IN_720P", 5: "2IN_360P", 6: "4IN_1080P", 7: "4IN_720P", 8: "4IN_360P", 9: "9IN_1080P", 10: "9IN_720P", 11: "9IN_360P", 12: "12IN_1080P", 13: "12IN_720P", 14: "12IN_360P", 15: "16IN_1080P", 16: "16IN_720P", 17: "16IN_360P", 9999: "Mixed_Audio" };
|
|
3551
|
-
var Pr = ((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))(Pr || {}), Di = ((r) => (r[r.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", r[r.LiveTranscodingBody = 1] = "LiveTranscodingBody", r))(Di || {}), xi = ((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))(xi || {}), on = ((r) => (r[r.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", r[r.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", r[r.LiveTranscodingFill = 2] = "LiveTranscodingFill", r))(on || {}), Dr = ((r) => (r[r.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", r[r.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", r))(Dr || {}), cn = ((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))(cn || {}),
|
|
3552
|
+
var Pr = ((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))(Pr || {}), Di = ((r) => (r[r.LiveTranscodingNoBody = 0] = "LiveTranscodingNoBody", r[r.LiveTranscodingBody = 1] = "LiveTranscodingBody", r))(Di || {}), xi = ((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))(xi || {}), on = ((r) => (r[r.LiveTranscodingOrigin = 0] = "LiveTranscodingOrigin", r[r.LiveTranscodingCrop = 1] = "LiveTranscodingCrop", r[r.LiveTranscodingFill = 2] = "LiveTranscodingFill", r))(on || {}), Dr = ((r) => (r[r.LiveTranscodingNormal = 0] = "LiveTranscodingNormal", r[r.LiveTranscodingVirtualBackground = 1] = "LiveTranscodingVirtualBackground", r))(Dr || {}), cn = ((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))(cn || {}), Rt = ((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))(Rt || {}), hn = ((r) => (r[r.TrascodingPublishTaskStatusStart = 0] = "TrascodingPublishTaskStatusStart", r[r.TrascodingPublishTaskStatusUpdate = 1] = "TrascodingPublishTaskStatusUpdate", r[r.TrascodingPublishTaskStatusStop = 2] = "TrascodingPublishTaskStatusStop", r))(hn || {}), tt = ((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))(tt || {});
|
|
3552
3553
|
const Go = { 0: "/libra/v1/sdk/start-task", 1: "/libra/v1/sdk/update-task", 2: "/libra/v1/sdk/stop-task", 3: "/libra/v1/sdk/list-task", 4: "/libra/v1/sdk/polling", 5: "/libra/v1/sdk/acknowledge", 6: "/" };
|
|
3553
3554
|
class dn {
|
|
3554
3555
|
constructor(a, e, t, i, s, n, o, c) {
|
|
@@ -3584,7 +3585,7 @@ class mr {
|
|
|
3584
3585
|
if (n.mixmode = this.mixMode, i && (n.streamurl = i), this.mixMode === Pi.LiveTranscodingSingle) {
|
|
3585
3586
|
const o = this.singleParam;
|
|
3586
3587
|
if (o) {
|
|
3587
|
-
n.streamtype = o.streamType, o.sourceType === ui.LiveTranscodingShareScreen ? n.sourcetype =
|
|
3588
|
+
n.streamtype = o.streamType, o.sourceType === ui.LiveTranscodingShareScreen ? n.sourcetype = ci[o.sourceType] : n.sourcetype = ci[ui.LiveTranscodingCamera];
|
|
3588
3589
|
const c = [];
|
|
3589
3590
|
o.userId && c.push(o.userId), n.subspecusers = c;
|
|
3590
3591
|
}
|
|
@@ -3607,7 +3608,7 @@ class mr {
|
|
|
3607
3608
|
return n;
|
|
3608
3609
|
}
|
|
3609
3610
|
}
|
|
3610
|
-
var _t = ((r) => (r.pre = "pre", r.prod = "prod", r))(_t || {}), Ct = ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(Ct || {}), Bt = ((r) => (r.AliRtcSdkInteractive = "interactive", r.AliRtcSdkLive = "live", r))(Bt || {}),
|
|
3611
|
+
var _t = ((r) => (r.pre = "pre", r.prod = "prod", r))(_t || {}), Ct = ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(Ct || {}), Bt = ((r) => (r.AliRtcSdkInteractive = "interactive", r.AliRtcSdkLive = "live", r))(Bt || {}), At = ((r) => (r[r.AliEngineLocalDeviceTypeUnknown = 0] = "AliEngineLocalDeviceTypeUnknown", r[r.AliEngineLocalDeviceTypeMic = 1] = "AliEngineLocalDeviceTypeMic", r[r.AliEngineLocalDeviceTypeSpeaker = 2] = "AliEngineLocalDeviceTypeSpeaker", r[r.AliEngineLocalDeviceTypeAudioDevice = 3] = "AliEngineLocalDeviceTypeAudioDevice", r[r.AliEngineLocalDeviceTypeCamera = 4] = "AliEngineLocalDeviceTypeCamera", r[r.AliEngineLocalDeviceTypeDisplay = 5] = "AliEngineLocalDeviceTypeDisplay", r[r.AliEngineLocalDeviceTypeVideoDevice = 6] = "AliEngineLocalDeviceTypeVideoDevice", r))(At || {}), xe = ((r) => (r[r.AliEngineLocalDeviceExceptionTypeUnknown = 0] = "AliEngineLocalDeviceExceptionTypeUnknown", r[r.AliEngineLocalDeviceExceptionTypeMicOpenFail = 1] = "AliEngineLocalDeviceExceptionTypeMicOpenFail", r[r.AliEngineLocalDeviceExceptionTypeMicInterrupt = 2] = "AliEngineLocalDeviceExceptionTypeMicInterrupt", r[r.AliEngineLocalDeviceExceptionTypeMicAuthFail = 3] = "AliEngineLocalDeviceExceptionTypeMicAuthFail", r[r.AliEngineLocalDeviceExceptionTypeMicNotAvailable = 4] = "AliEngineLocalDeviceExceptionTypeMicNotAvailable", r[r.AliEngineLocalDeviceExceptionTypeSpeakerOpenFail = 5] = "AliEngineLocalDeviceExceptionTypeSpeakerOpenFail", r[r.AliEngineLocalDeviceExceptionTypeSpeakerInterrupt = 6] = "AliEngineLocalDeviceExceptionTypeSpeakerInterrupt", r[r.AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable = 7] = "AliEngineLocalDeviceExceptionTypeSpeakerNotAvailable", r[r.AliEngineLocalDeviceExceptionTypeAudioDeviceException = 8] = "AliEngineLocalDeviceExceptionTypeAudioDeviceException", r[r.AliEngineLocalDeviceExceptionTypeCameraOpenFail = 9] = "AliEngineLocalDeviceExceptionTypeCameraOpenFail", r[r.AliEngineLocalDeviceExceptionTypeCameraInterrupt = 10] = "AliEngineLocalDeviceExceptionTypeCameraInterrupt", r[r.AliEngineLocalDeviceExceptionTypeCameraAuthFail = 11] = "AliEngineLocalDeviceExceptionTypeCameraAuthFail", r[r.AliEngineLocalDeviceExceptionTypeDisplayException = 12] = "AliEngineLocalDeviceExceptionTypeDisplayException", r[r.AliEngineLocalDeviceExceptionTypeVideoDeviceException = 13] = "AliEngineLocalDeviceExceptionTypeVideoDeviceException", r))(xe || {}), ne = ((r) => (r[r.AliRtcConnectionStatusInit = 0] = "AliRtcConnectionStatusInit", r[r.AliRtcConnectionStatusDisconnected = 1] = "AliRtcConnectionStatusDisconnected", r[r.AliRtcConnectionStatusConnecting = 2] = "AliRtcConnectionStatusConnecting", r[r.AliRtcConnectionStatusConnected = 3] = "AliRtcConnectionStatusConnected", r[r.AliRtcConnectionStatusReconnecting = 4] = "AliRtcConnectionStatusReconnecting", r[r.AliRtcConnectionStatusFailed = 5] = "AliRtcConnectionStatusFailed", r))(ne || {}), yt = ((r) => (r[r.AliRtcConnectionChangedDummyReason = 0] = "AliRtcConnectionChangedDummyReason", r[r.AliRtcConnectionMediaPathChanged = 1] = "AliRtcConnectionMediaPathChanged", r[r.AliRtcConnectionSignalingHeartbeatTimeout = 2] = "AliRtcConnectionSignalingHeartbeatTimeout", r[r.AliRtcConnectionSignalingHeartbeatAlive = 3] = "AliRtcConnectionSignalingHeartbeatAlive", r[r.AliRtcConnectionSignalingHttpDnsResolved = 4] = "AliRtcConnectionSignalingHttpDnsResolved", r[r.AliRtcConnectionSignalingHttpDnsFailure = 5] = "AliRtcConnectionSignalingHttpDnsFailure", r[r.AliRtcConnectionSignalingGslbFailure = 6] = "AliRtcConnectionSignalingGslbFailure", r[r.AliRtcConnectionSignalingGslbSuccess = 7] = "AliRtcConnectionSignalingGslbSuccess", r[r.AliRtcConnectionSignalingJoinRoomFailure = 8] = "AliRtcConnectionSignalingJoinRoomFailure", r[r.AliRtcConnectionSignalingJoinRoomSuccess = 9] = "AliRtcConnectionSignalingJoinRoomSuccess", r[r.AliRtcConnectionSignalingLeaveRoom = 10] = "AliRtcConnectionSignalingLeaveRoom", r[r.AliRtcConnectionSignalingConnecting = 11] = "AliRtcConnectionSignalingConnecting", r[r.AliRtcConnectionChangedNetworkInterrupted = 12] = "AliRtcConnectionChangedNetworkInterrupted", r))(yt || {}), Nr = ((r) => (r[r.AliRtcUserOfflineQuit = 0] = "AliRtcUserOfflineQuit", r[r.AliRtcUserOfflineDropped = 1] = "AliRtcUserOfflineDropped", r[r.AliRtcUserOfflineBecomeAudience = 2] = "AliRtcUserOfflineBecomeAudience", r))(Nr || {}), ei = ((r) => (r[r.AliRtcAudioTrackNo = 0] = "AliRtcAudioTrackNo", r[r.AliRtcAudioTrackMic = 1] = "AliRtcAudioTrackMic", r[r.AliRtcAudioTrackDual = 2] = "AliRtcAudioTrackDual", r))(ei || {}), oe = ((r) => (r[r.AliRtcVideoTrackNo = 0] = "AliRtcVideoTrackNo", r[r.AliRtcVideoTrackCamera = 1] = "AliRtcVideoTrackCamera", r[r.AliRtcVideoTrackScreen = 2] = "AliRtcVideoTrackScreen", r[r.AliRtcVideoTrackBoth = 3] = "AliRtcVideoTrackBoth", r))(oe || {}), Q = ((r) => (r[r.AliRtcStatePublishIdle = 0] = "AliRtcStatePublishIdle", r[r.AliRtcStateNoPublish = 1] = "AliRtcStateNoPublish", r[r.AliRtcStatePublishing = 2] = "AliRtcStatePublishing", r[r.AliRtcStatePublished = 3] = "AliRtcStatePublished", r))(Q || {}), pe = ((r) => (r[r.AliRtcStateSubscribeIdle = 0] = "AliRtcStateSubscribeIdle", r[r.AliRtcStateNoSubscribe = 1] = "AliRtcStateNoSubscribe", r[r.AliRtcStateSubscribing = 2] = "AliRtcStateSubscribing", r[r.AliRtcStateSubscribed = 3] = "AliRtcStateSubscribed", r))(pe || {}), Ke = ((r) => (r[r.AliRtcVideoStreamTypeNone = 0] = "AliRtcVideoStreamTypeNone", r[r.AliRtcVideoStreamTypeHigh = 1] = "AliRtcVideoStreamTypeHigh", r[r.AliRtcVideoStreamTypeLow = 2] = "AliRtcVideoStreamTypeLow", r))(Ke || {}), pi = ((r) => (r[r.CAMERA_INVALID = -1] = "CAMERA_INVALID", r[r.CAMERA_REAR = 0] = "CAMERA_REAR", r[r.CAMERA_FRONT = 1] = "CAMERA_FRONT", r))(pi || {});
|
|
3611
3612
|
const Zt = class Zt extends He {
|
|
3612
3613
|
constructor(e) {
|
|
3613
3614
|
super();
|
|
@@ -3689,12 +3690,12 @@ rr = fr, sr = fr.exports, function(r, a) {
|
|
|
3689
3690
|
if (typeof se === s)
|
|
3690
3691
|
return se = se.replace(/^\s\s*/, ""), typeof re === t ? se : se.substring(0, 500);
|
|
3691
3692
|
}, be = function(se, re) {
|
|
3692
|
-
for (var Z, ue,
|
|
3693
|
+
for (var Z, ue, Ie, ie, je, q, Ee = 0; Ee < re.length && !je; ) {
|
|
3693
3694
|
var Je = re[Ee], Oe = re[Ee + 1];
|
|
3694
3695
|
for (Z = ue = 0; Z < Je.length && !je && Je[Z]; )
|
|
3695
3696
|
if (je = Je[Z++].exec(se))
|
|
3696
|
-
for (
|
|
3697
|
-
q = je[++ue], typeof (ie = Oe[
|
|
3697
|
+
for (Ie = 0; Ie < Oe.length; Ie++)
|
|
3698
|
+
q = je[++ue], typeof (ie = Oe[Ie]) === i && ie.length > 0 ? ie.length === 2 ? typeof ie[1] == e ? this[ie[0]] = ie[1].call(this, q) : this[ie[0]] = ie[1] : ie.length === 3 ? typeof ie[1] !== e || ie[1].exec && ie[1].test ? this[ie[0]] = q ? q.replace(ie[1], ie[2]) : a : this[ie[0]] = q ? ie[1].call(this, q, ie[2]) : a : ie.length === 4 && (this[ie[0]] = q ? ie[3].call(this, q.replace(ie[1], ie[2])) : a) : this[ie] = q || a;
|
|
3698
3699
|
Ee += 2;
|
|
3699
3700
|
}
|
|
3700
3701
|
}, le = function(se, re) {
|
|
@@ -3709,7 +3710,7 @@ rr = fr, sr = fr.exports, function(r, a) {
|
|
|
3709
3710
|
}, ge = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, Fe = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [l, [c, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [l, [c, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [c, l], [/opios[\/ ]+([\w\.]+)/i], [l, [c, K + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [l, [c, K + " GX"]], [/\bopr\/([\w\.]+)/i], [l, [c, K]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [l, [c, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [l, [c, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i, /(heytap|ovi|115)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [c, l], [/quark(?:pc)?\/([-\w\.]+)/i], [l, [c, "Quark"]], [/\bddg\/([\w\.]+)/i], [l, [c, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [l, [c, "UC" + A]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [l, [c, "WeChat"]], [/konqueror\/([\w\.]+)/i], [l, [c, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [l, [c, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [l, [c, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [l, [c, "Smart Lenovo " + A]], [/(avast|avg)\/([\w\.]+)/i], [[c, /(.+)/, "$1 Secure " + A], l], [/\bfocus\/([\w\.]+)/i], [l, [c, C + " Focus"]], [/\bopt\/([\w\.]+)/i], [l, [c, K + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [l, [c, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [l, [c, "Dolphin"]], [/coast\/([\w\.]+)/i], [l, [c, K + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [l, [c, "MIUI" + me]], [/fxios\/([\w\.-]+)/i], [l, [c, C]], [/\bqihoobrowser\/?([\w\.]*)/i], [l, [c, "360"]], [/\b(qq)\/([\w\.]+)/i], [[c, /(.+)/, "$1Browser"], l], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[c, /(.+)/, "$1" + me], l], [/samsungbrowser\/([\w\.]+)/i], [l, [c, H + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [l, [c, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[c, "Sogou Mobile"], l], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [c, l], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [c], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [l, c], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[c, D], l], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [c, l], [/\bgsa\/([\w\.]+) .*safari\//i], [l, [c, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [l, [c, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [l, [c, E + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[c, E + " WebView"], l], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [l, [c, "Android " + A]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [c, l], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [l, [c, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [l, c], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [c, [l, le, { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }]], [/(webkit|khtml)\/([\w\.]+)/i], [c, l], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[c, "Netscape"], l], [/(wolvic|librewolf)\/([\w\.]+)/i], [c, l], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [l, [c, C + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [c, [l, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [c, [l, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[b, "amd64"]], [/(ia32(?=;))/i], [[b, de]], [/((?:i[346]|x)86)[;\)]/i], [[b, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[b, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[b, "armhf"]], [/windows (ce|mobile); ppc;/i], [[b, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[b, /ower/, "", de]], [/(sun4\w)[;\)]/i], [[b, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[b, de]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [o, [d, H], [h, p]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [o, [d, H], [h, f]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [o, [d, y], [h, f]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [o, [d, y], [h, p]], [/(macintosh);/i], [o, [d, y]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [o, [d, Y], [h, f]], [/(?:honor)([-\w ]+)[;\)]/i], [o, [d, "Honor"], [h, f]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [o, [d, P], [h, p]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [o, [d, P], [h, f]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i], [[o, /_/g, " "], [d, M], [h, f]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[o, /_/g, " "], [d, M], [h, p]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [o, [d, "OPPO"], [h, f]], [/\b(opd2\d{3}a?) bui/i], [o, [d, "OPPO"], [h, p]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [o, [d, "Vivo"], [h, f]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [o, [d, "Realme"], [h, f]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [o, [d, X], [h, f]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [o, [d, X], [h, p]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [o, [d, z], [h, p]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [o, [d, z], [h, f]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [o, [d, "Lenovo"], [h, p]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[o, /_/g, " "], [d, "Nokia"], [h, f]], [/(pixel c)\b/i], [o, [d, x], [h, p]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [o, [d, x], [h, f]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [o, [d, ee], [h, f]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[o, "Xperia Tablet"], [d, ee], [h, p]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [o, [d, "OnePlus"], [h, f]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [o, [d, _], [h, p]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[o, /(.+)/g, "Fire Phone $1"], [d, _], [h, f]], [/(playbook);[-\w\),; ]+(rim)/i], [o, d, [h, p]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [o, [d, w], [h, f]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [o, [d, v], [h, p]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [o, [d, v], [h, f]], [/(nexus 9)/i], [o, [d, "HTC"], [h, p]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [d, [o, /_/g, " "], [h, f]], [/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i], [o, [d, "TCL"], [h, p]], [/(itel) ((\w+))/i], [[d, de], o, [h, le, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [o, [d, "Acer"], [h, p]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [o, [d, "Meizu"], [h, f]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [o, [d, "Ulefone"], [h, f]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [o, [d, "Energizer"], [h, f]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [o, [d, "Cat"], [h, f]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [o, [d, "Smartfren"], [h, f]], [/droid.+; (a(?:015|06[35]|142p?))/i], [o, [d, "Nothing"], [h, f]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [d, o, [h, f]], [/(imo) (tab \w+)/i, /(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [d, o, [h, p]], [/(surface duo)/i], [o, [d, G], [h, p]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [o, [d, "Fairphone"], [h, f]], [/(u304aa)/i], [o, [d, "AT&T"], [h, f]], [/\bsie-(\w*)/i], [o, [d, "Siemens"], [h, f]], [/\b(rct\w+) b/i], [o, [d, "RCA"], [h, p]], [/\b(venue[\d ]{2,7}) b/i], [o, [d, "Dell"], [h, p]], [/\b(q(?:mv|ta)\w+) b/i], [o, [d, "Verizon"], [h, p]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [o, [d, "Barnes & Noble"], [h, p]], [/\b(tm\d{3}\w+) b/i], [o, [d, "NuVision"], [h, p]], [/\b(k88) b/i], [o, [d, "ZTE"], [h, p]], [/\b(nx\d{3}j) b/i], [o, [d, "ZTE"], [h, f]], [/\b(gen\d{3}) b.+49h/i], [o, [d, "Swiss"], [h, f]], [/\b(zur\d{3}) b/i], [o, [d, "Swiss"], [h, p]], [/\b((zeki)?tb.*\b) b/i], [o, [d, "Zeki"], [h, p]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[d, "Dragon Touch"], o, [h, p]], [/\b(ns-?\w{0,9}) b/i], [o, [d, "Insignia"], [h, p]], [/\b((nxa|next)-?\w{0,9}) b/i], [o, [d, "NextBook"], [h, p]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[d, "Voice"], o, [h, f]], [/\b(lvtel\-)?(v1[12]) b/i], [[d, "LvTel"], o, [h, f]], [/\b(ph-1) /i], [o, [d, "Essential"], [h, f]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [o, [d, "Envizen"], [h, p]], [/\b(trio[-\w\. ]+) b/i], [o, [d, "MachSpeed"], [h, p]], [/\btu_(1491) b/i], [o, [d, "Rotor"], [h, p]], [/(shield[\w ]+) b/i], [o, [d, "Nvidia"], [h, p]], [/(sprint) (\w+)/i], [d, o, [h, f]], [/(kin\.[onetw]{3})/i], [[o, /\./g, " "], [d, G], [h, f]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [o, [d, L], [h, p]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [o, [d, L], [h, f]], [/smart-tv.+(samsung)/i], [d, [h, m]], [/hbbtv.+maple;(\d+)/i], [[o, /^/, "SmartTV"], [d, H], [h, m]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[d, z], [h, m]], [/(apple) ?tv/i], [d, [o, y + " TV"], [h, m]], [/crkey/i], [[o, E + "cast"], [d, x], [h, m]], [/droid.+aft(\w+)( bui|\))/i], [o, [d, _], [h, m]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [o, [d, Y], [h, m]], [/(bravia[\w ]+)( bui|\))/i], [o, [d, ee], [h, m]], [/(mitv-\w{5}) bui/i], [o, [d, M], [h, m]], [/Hbbtv.*(technisat) (.*);/i], [d, o, [h, m]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[d, Pe], [o, Pe], [h, m]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[h, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [d, o, [h, u]], [/droid.+; (shield) bui/i], [o, [d, "Nvidia"], [h, u]], [/(playstation [345portablevi]+)/i], [o, [d, ee], [h, u]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [o, [d, G], [h, u]], [/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i], [o, [d, H], [h, S]], [/((pebble))app/i], [d, o, [h, S]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [o, [d, y], [h, S]], [/droid.+; (glass) \d/i], [o, [d, x], [h, S]], [/droid.+; (wt63?0{2,3})\)/i], [o, [d, L], [h, S]], [/droid.+; (glass) \d/i], [o, [d, x], [h, S]], [/(pico) (4|neo3(?: link|pro)?)/i], [d, o, [h, S]], [/; (quest( \d| pro)?)/i], [o, [d, D], [h, S]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [d, [h, R]], [/(aeobc)\b/i], [o, [d, _], [h, R]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [o, [h, f]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [o, [h, p]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[h, p]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[h, f]], [/(android[-\w\. ]{0,9});.+buil/i], [o, [d, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [l, [c, "EdgeHTML"]], [/(arkweb)\/([\w\.]+)/i], [c, l], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [l, [c, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [c, l], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [l, c]], os: [[/microsoft (windows) (vista|xp)/i], [c, l], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [c, [l, le, ge]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[l, le, ge], [c, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[l, /_/g, "."], [c, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[c, ce], [l, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [l, c], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [c, l], [/\(bb(10);/i], [l, [c, w]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [l, [c, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [l, [c, C + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [l, [c, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [l, [c, "watchOS"]], [/crkey\/([\d\.]+)/i], [l, [c, E + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[c, N], l], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [c, l], [/(sunos) ?([\w\.\d]*)/i], [[c, "Solaris"], l], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [c, l]] }, te = function(se, re) {
|
|
3710
3711
|
if (typeof se === i && (re = se, se = a), !(this instanceof te))
|
|
3711
3712
|
return new te(se, re).getResult();
|
|
3712
|
-
var Z = typeof r !== t && r.navigator ? r.navigator : a, ue = se || (Z && Z.userAgent ? Z.userAgent : ""),
|
|
3713
|
+
var Z = typeof r !== t && r.navigator ? r.navigator : a, ue = se || (Z && Z.userAgent ? Z.userAgent : ""), Ie = Z && Z.userAgentData ? Z.userAgentData : a, ie = re ? function(q, Ee) {
|
|
3713
3714
|
var Je = {};
|
|
3714
3715
|
for (var Oe in q)
|
|
3715
3716
|
Ee[Oe] && Ee[Oe].length % 2 == 0 ? Je[Oe] = Ee[Oe].concat(q[Oe]) : Je[Oe] = q[Oe];
|
|
@@ -3723,13 +3724,13 @@ rr = fr, sr = fr.exports, function(r, a) {
|
|
|
3723
3724
|
return q[b] = a, be.call(q, ue, ie.cpu), q;
|
|
3724
3725
|
}, this.getDevice = function() {
|
|
3725
3726
|
var q = {};
|
|
3726
|
-
return q[d] = a, q[o] = a, q[h] = a, be.call(q, ue, ie.device), je && !q[h] &&
|
|
3727
|
+
return q[d] = a, q[o] = a, q[h] = a, be.call(q, ue, ie.device), je && !q[h] && Ie && Ie.mobile && (q[h] = f), je && q[o] == "Macintosh" && Z && typeof Z.standalone !== t && Z.maxTouchPoints && Z.maxTouchPoints > 2 && (q[o] = "iPad", q[h] = p), q;
|
|
3727
3728
|
}, this.getEngine = function() {
|
|
3728
3729
|
var q = {};
|
|
3729
3730
|
return q[c] = a, q[l] = a, be.call(q, ue, ie.engine), q;
|
|
3730
3731
|
}, this.getOS = function() {
|
|
3731
3732
|
var q = {};
|
|
3732
|
-
return q[c] = a, q[l] = a, be.call(q, ue, ie.os), je && !q[c] &&
|
|
3733
|
+
return q[c] = a, q[l] = a, be.call(q, ue, ie.os), je && !q[c] && Ie && Ie.platform && Ie.platform != "Unknown" && (q[c] = Ie.platform.replace(/chrome os/i, N).replace(/macos/i, ce)), q;
|
|
3733
3734
|
}, this.getResult = function() {
|
|
3734
3735
|
return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
|
|
3735
3736
|
}, this.getUA = function() {
|
|
@@ -3769,7 +3770,7 @@ class Xo {
|
|
|
3769
3770
|
get adaptInfo() {
|
|
3770
3771
|
var e, t, i, s;
|
|
3771
3772
|
let a = new qo.UAParser().getResult();
|
|
3772
|
-
return { os_name: ((e = a.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = a.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = a.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((s = a.device.vendor) == null ? void 0 : s.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: a.browser.version || "", sdk_version: "7.1.
|
|
3773
|
+
return { os_name: ((e = a.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = a.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = a.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((s = a.device.vendor) == null ? void 0 : s.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: a.browser.version || "", sdk_version: "7.1.1-beta.2", version: "v1" };
|
|
3773
3774
|
}
|
|
3774
3775
|
refreshAuthInfo(a) {
|
|
3775
3776
|
this.authInfo = a;
|
|
@@ -3893,7 +3894,7 @@ const st = class st extends He {
|
|
|
3893
3894
|
let s = this.packageCreater.createPublishPackage();
|
|
3894
3895
|
s.data.users = [], s.data.l1ip = t, i.subscribe.signal = this.wsClient.connectUrl;
|
|
3895
3896
|
const { tracks: n, resume: o } = i;
|
|
3896
|
-
let c = "7.1.
|
|
3897
|
+
let c = "7.1.1-beta.2";
|
|
3897
3898
|
c && (c = c.split("-")[0]), n.forEach((d) => {
|
|
3898
3899
|
const { codec: l, ssrc: b } = d;
|
|
3899
3900
|
d.userdata = JSON.stringify({ sdk_version: c, codec: l }), d.ssrc = `${b}`, o && (d.attr = { reason: "reconnect" });
|
|
@@ -3905,7 +3906,7 @@ const st = class st extends He {
|
|
|
3905
3906
|
}
|
|
3906
3907
|
refreshUrl(e) {
|
|
3907
3908
|
const t = this.packageCreater.createRefreshUrlPackage();
|
|
3908
|
-
t.data = J(
|
|
3909
|
+
t.data = J(bt(J({}, t.data), { sessionid: t.header.sessionid }), e), this.sendPackage(t);
|
|
3909
3910
|
}
|
|
3910
3911
|
refreshAuthInfo(e) {
|
|
3911
3912
|
this.authInfo = e, this.packageCreater.refreshAuthInfo(e);
|
|
@@ -4162,7 +4163,7 @@ const Ii = (qe = class extends He {
|
|
|
4162
4163
|
return new Promise((t, i) => {
|
|
4163
4164
|
var s;
|
|
4164
4165
|
this.messageCenter ? (this.messageCenter.once("onPublishResult", (n, o, c) => {
|
|
4165
|
-
V.info(`[${qe.logName}]`, "recv pubish response " + n), n === 200 ? (this.updateReconnectData(
|
|
4166
|
+
V.info(`[${qe.logName}]`, "recv pubish response " + n), n === 200 ? (this.updateReconnectData(bt(J({}, this.reconnectData), { publish: { users: [e] } })), t({ tid: o })) : i(this.handleSignalError(n, `publish error, ${c}`));
|
|
4166
4167
|
}), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = lt()), V.info(`[${qe.logName}]`, "assign callid " + e.callid + " and send publish request"), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
|
|
4167
4168
|
});
|
|
4168
4169
|
}
|
|
@@ -4234,7 +4235,7 @@ const Ii = (qe = class extends He {
|
|
|
4234
4235
|
}, g(qe, "logName", "RoomServerSignaling"), qe);
|
|
4235
4236
|
ar([T()], Ii.prototype, "join", 1), ar([T()], Ii.prototype, "publish", 1), ar([T()], Ii.prototype, "roleUpdate", 1);
|
|
4236
4237
|
let Qo = Ii;
|
|
4237
|
-
const ec = 6e5,
|
|
4238
|
+
const ec = 6e5, hi = class hi extends He {
|
|
4238
4239
|
constructor(e, t) {
|
|
4239
4240
|
super();
|
|
4240
4241
|
g(this, "env");
|
|
@@ -4256,11 +4257,11 @@ const ec = 6e5, di = class di extends He {
|
|
|
4256
4257
|
throw new Error();
|
|
4257
4258
|
{
|
|
4258
4259
|
const m = (f = u.data) == null ? void 0 : f.oss, S = (p = u.data) == null ? void 0 : p.sls;
|
|
4259
|
-
this.expiration = m.expiration || S.expiration, this.emit("onTokenUpdate", m, S), V.event(`[${
|
|
4260
|
+
this.expiration = m.expiration || S.expiration, this.emit("onTokenUpdate", m, S), V.event(`[${hi.logName}]`, "getToken", m, S);
|
|
4260
4261
|
}
|
|
4261
4262
|
this.slsReporter.reportSTSResult(200, b);
|
|
4262
4263
|
}).catch((u) => {
|
|
4263
|
-
this.slsReporter.reportSTSResult(-1, b), V.error(`[${
|
|
4264
|
+
this.slsReporter.reportSTSResult(-1, b), V.error(`[${hi.logName}]`, "getToken", u.message);
|
|
4264
4265
|
});
|
|
4265
4266
|
}));
|
|
4266
4267
|
this.slsReporter = e, this.env = t;
|
|
@@ -4277,8 +4278,8 @@ const ec = 6e5, di = class di extends He {
|
|
|
4277
4278
|
this.timer && clearInterval(this.timer);
|
|
4278
4279
|
}
|
|
4279
4280
|
};
|
|
4280
|
-
g(
|
|
4281
|
-
let br =
|
|
4281
|
+
g(hi, "logName", "StsManager");
|
|
4282
|
+
let br = hi;
|
|
4282
4283
|
var tc = Object.defineProperty, ic = Object.getOwnPropertyDescriptor;
|
|
4283
4284
|
class Lr extends He {
|
|
4284
4285
|
constructor(e, t, i, s = _t.prod) {
|
|
@@ -4536,7 +4537,7 @@ class un {
|
|
|
4536
4537
|
}
|
|
4537
4538
|
}
|
|
4538
4539
|
const pn = "customVideoProfile", mn = "customScreenProfile", vr = { width: 1280, height: 720, frameRate: 30, maxBitrate: 2e3 }, Oa = { width: 1920, height: 1080, frameRate: 30, maxBitrate: 2600 };
|
|
4539
|
-
var
|
|
4540
|
+
var ni = ((r) => (r[r.ERROR_DEVICE_UNKNOWNERROR = 1e4] = "ERROR_DEVICE_UNKNOWNERROR", r[r.ERROR_DEVICE_AUDIODEVICE_NOTFOUND = 10001] = "ERROR_DEVICE_AUDIODEVICE_NOTFOUND", r[r.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED = 10002] = "ERROR_DEVICE_AUDIODEVICE_NOTALLOWED", r[r.ERROR_DEVICE_AUDIODEVICE_NOTREADABLE = 10003] = "ERROR_DEVICE_AUDIODEVICE_NOTREADABLE", r[r.ERROR_DEVICE_VIDEODEVICE_NOTFOUND = 10004] = "ERROR_DEVICE_VIDEODEVICE_NOTFOUND", r[r.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED = 10005] = "ERROR_DEVICE_VIDEODEVICE_NOTALLOWED", r[r.ERROR_DEVICE_VIDEODEVICE_NOTREADABLE = 10006] = "ERROR_DEVICE_VIDEODEVICE_NOTREADABLE", r[r.ERROR_SCREENSHARE_NOTSUPPORT = 10010] = "ERROR_SCREENSHARE_NOTSUPPORT", r[r.ERROR_SCREENSHARE_NOTALLOWED = 10011] = "ERROR_SCREENSHARE_NOTALLOWED", r[r.ERROR_SCREENSHARE_ENDED = 10012] = "ERROR_SCREENSHARE_ENDED", r[r.ERROR_SCREENSHARE_NOPERMISSION = 10013] = "ERROR_SCREENSHARE_NOPERMISSION", r[r.ERROR_SCREENSHARE_SAFARI_INVALIDACCESS = 10014] = "ERROR_SCREENSHARE_SAFARI_INVALIDACCESS", r[r.ERROR_SCREENSHARE_UNKNOWNERRO = 10019] = "ERROR_SCREENSHARE_UNKNOWNERRO", r[r.ERROR_DEVICE_NOTSUPPORT = 2e4] = "ERROR_DEVICE_NOTSUPPORT", r))(ni || {});
|
|
4540
4541
|
const sc = { 1e4: xe.AliEngineLocalDeviceExceptionTypeUnknown, 2e4: xe.AliEngineLocalDeviceExceptionTypeUnknown, 10001: xe.AliEngineLocalDeviceExceptionTypeMicNotAvailable, 10002: xe.AliEngineLocalDeviceExceptionTypeMicAuthFail, 10003: xe.AliEngineLocalDeviceExceptionTypeMicOpenFail, 10005: xe.AliEngineLocalDeviceExceptionTypeCameraAuthFail, 10004: xe.AliEngineLocalDeviceExceptionTypeVideoDeviceException, 10006: xe.AliEngineLocalDeviceExceptionTypeCameraOpenFail, 10010: xe.AliEngineLocalDeviceExceptionTypeDisplayException, 10011: xe.AliEngineLocalDeviceExceptionTypeDisplayException, 10012: xe.AliEngineLocalDeviceExceptionTypeDisplayException, 10013: xe.AliEngineLocalDeviceExceptionTypeDisplayException, 10014: xe.AliEngineLocalDeviceExceptionTypeDisplayException, 10019: xe.AliEngineLocalDeviceExceptionTypeDisplayException };
|
|
4541
4542
|
var at = ((r) => (r.CREATE_ENGINE = "create_engine", r.JOIN = "join", r.WANT_INSERT_PUB_TASK = "wantInsertPubTask", r.INSERT_PUB_TASK = "InsertPubTask", r.HANDLE_PUB_TASK = "HandlePubTask", r.RECV_NOTIFY_PUBLISH = "RecvNotifyPublish", r.INSERT_SUB_TASK = "InsertSubTask", r.HANDLE_SUB_TASK = "HandleSubTask", r.FIRST_REMOTE = "first_remote", r))(at || {}), ht = ((r) => (r.START = "start", r.SEND_SIG = "send_sig", r.RECV_RST = "recv_rst", r.END = "end", r.RECEIVED = "received", r.DECODED = "decoded", r.PLAYED = "played", r))(ht || {});
|
|
4542
4543
|
function Ua(r) {
|
|
@@ -4591,7 +4592,7 @@ function nr(r, a) {
|
|
|
4591
4592
|
let e = a;
|
|
4592
4593
|
return typeof window.__ali_prefer_media_server == "string" && window.__ali_prefer_media_server !== "" && (e = window.__ali_prefer_media_server), e ? `${r}&ali_prefer_media_server=${e}` : r;
|
|
4593
4594
|
}
|
|
4594
|
-
function
|
|
4595
|
+
function ii(r, a) {
|
|
4595
4596
|
var e;
|
|
4596
4597
|
try {
|
|
4597
4598
|
const { archCfgs: t } = r;
|
|
@@ -4603,7 +4604,7 @@ function ri(r, a) {
|
|
|
4603
4604
|
return;
|
|
4604
4605
|
}
|
|
4605
4606
|
}
|
|
4606
|
-
function
|
|
4607
|
+
function ri(r, a) {
|
|
4607
4608
|
try {
|
|
4608
4609
|
const { config: e } = r;
|
|
4609
4610
|
return e ? e == null ? void 0 : e[a] : void 0;
|
|
@@ -4800,7 +4801,7 @@ var ac = Object.defineProperty, nc = Object.getOwnPropertyDescriptor, Ce = (r, a
|
|
|
4800
4801
|
(i = r[n]) && (s = (t ? i(a, e, s) : i(s)) || s);
|
|
4801
4802
|
return t && s && ac(a, e, s), s;
|
|
4802
4803
|
};
|
|
4803
|
-
class
|
|
4804
|
+
class si extends He {
|
|
4804
4805
|
constructor() {
|
|
4805
4806
|
super();
|
|
4806
4807
|
g(this, "_state");
|
|
@@ -4815,8 +4816,8 @@ class ai extends He {
|
|
|
4815
4816
|
this._state = e, this.time = Date.now(), this.emit("change", t, e, Math.floor((this.time - i) / 1e3));
|
|
4816
4817
|
}
|
|
4817
4818
|
}
|
|
4818
|
-
var
|
|
4819
|
-
const
|
|
4819
|
+
var ft;
|
|
4820
|
+
const Te = (ft = class extends ln {
|
|
4820
4821
|
constructor(e) {
|
|
4821
4822
|
const { rtsManager: t, localStreamManager: i, slsReporter: s, signalingManager: n, audioVolumeIndicationInterval: o, parameter: c } = e;
|
|
4822
4823
|
super("", "", t, o);
|
|
@@ -4851,15 +4852,15 @@ const Ie = (At = class extends ln {
|
|
|
4851
4852
|
this.onTrackEnd(h);
|
|
4852
4853
|
}), this.streamManager.on("publishupdate", () => {
|
|
4853
4854
|
this.publishUpdate();
|
|
4854
|
-
}), this.audioPubState = new
|
|
4855
|
+
}), this.audioPubState = new si(), this.audioPubState.on("change", (h, d, l) => {
|
|
4855
4856
|
this.emit("audioPublishStateChanged", h, d, l);
|
|
4856
|
-
}), this.videoPubState = new
|
|
4857
|
+
}), this.videoPubState = new si(), this.videoPubState.on("change", (h, d, l) => {
|
|
4857
4858
|
this.emit("videoPublishStateChanged", h, d, l);
|
|
4858
|
-
}), this.videoSmallPubState = new
|
|
4859
|
+
}), this.videoSmallPubState = new si(), this.videoSmallPubState.on("change", (h, d, l) => {
|
|
4859
4860
|
this.emit("dualStreamPublishStateChanged", h, d, l);
|
|
4860
|
-
}), this.screenPubState = new
|
|
4861
|
+
}), this.screenPubState = new si(), this.screenPubState.on("change", (h, d, l) => {
|
|
4861
4862
|
this.emit("screenPublishStateChanged", h, d, l);
|
|
4862
|
-
}), this.dataPubState = new
|
|
4863
|
+
}), this.dataPubState = new si(), this.dataPubState.on("change", (h, d, l) => {
|
|
4863
4864
|
this.emit("dataPublishStateChanged", h, d, l);
|
|
4864
4865
|
}), this.startStreamMonitor();
|
|
4865
4866
|
}
|
|
@@ -5007,7 +5008,7 @@ const Ie = (At = class extends ln {
|
|
|
5007
5008
|
}
|
|
5008
5009
|
clear() {
|
|
5009
5010
|
return I(this, null, function* () {
|
|
5010
|
-
Bi(
|
|
5011
|
+
Bi(ft.prototype, this, "clear").call(this), this.stopPreview(), this.resetPreviewElements(), this.resetSecondayPreviewElements(), this.clearStream(), yield this.leave(), this.streamManager.cameraCaptureDisabled = !1;
|
|
5011
5012
|
});
|
|
5012
5013
|
}
|
|
5013
5014
|
resetElement(e) {
|
|
@@ -5026,7 +5027,7 @@ const Ie = (At = class extends ln {
|
|
|
5026
5027
|
} catch (n) {
|
|
5027
5028
|
const o = n.errorCode;
|
|
5028
5029
|
let c = B.ERR_CAMERA_OPEN_FAIL;
|
|
5029
|
-
throw o ===
|
|
5030
|
+
throw o === ni.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? c = B.ERR_CAMERA_NOT_AVAILABLE : o === ni.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED && (c = B.ERR_CAMERA_AUTH_FAIL), new O(c, `camera open fail: ${n.message}`);
|
|
5030
5031
|
}
|
|
5031
5032
|
});
|
|
5032
5033
|
}
|
|
@@ -5039,7 +5040,7 @@ const Ie = (At = class extends ln {
|
|
|
5039
5040
|
} catch (s) {
|
|
5040
5041
|
const n = s.errorCode;
|
|
5041
5042
|
let o = B.ERR_MIC_OPEN_FAIL;
|
|
5042
|
-
throw n ===
|
|
5043
|
+
throw n === ni.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? o = B.ERR_MIC_NOT_AVAILABLE : n === ni.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED && (o = B.ERR_MIC_AUTH_FAIL), new O(o, `mic open fail: ${s.message}`);
|
|
5043
5044
|
}
|
|
5044
5045
|
});
|
|
5045
5046
|
}
|
|
@@ -5080,7 +5081,7 @@ const Ie = (At = class extends ln {
|
|
|
5080
5081
|
let s = i ? this.streamManager.screenStreamInfo.previewStream : this.streamManager.cameraStreamInfo.previewStream;
|
|
5081
5082
|
if (!t)
|
|
5082
5083
|
throw new O(B.ERR_INVALID_ARGUMENTS, "no video element found", { videoElement: t });
|
|
5083
|
-
return s ? (gn(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream) : void V.info(`[${
|
|
5084
|
+
return s ? (gn(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream) : void V.info(`[${ft.logName}]`, "preview no stream founded");
|
|
5084
5085
|
} catch (s) {
|
|
5085
5086
|
const n = B.ERR_INNER;
|
|
5086
5087
|
throw O.fromError(s, n, "preview failed");
|
|
@@ -5141,7 +5142,7 @@ const Ie = (At = class extends ln {
|
|
|
5141
5142
|
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;
|
|
5142
5143
|
} catch (t) {
|
|
5143
5144
|
const i = sc[t.errorCode];
|
|
5144
|
-
throw i && (e.audio ? this.emit("localDeviceException",
|
|
5145
|
+
throw i && (e.audio ? this.emit("localDeviceException", At.AliEngineLocalDeviceTypeMic, i, "") : e.video ? this.emit("localDeviceException", At.AliEngineLocalDeviceTypeCamera, i, "") : e.screen ? this.emit("localDeviceException", At.AliEngineLocalDeviceTypeDisplay, i, "") : this.emit("localDeviceException", At.AliEngineLocalDeviceTypeUnknown, i, "")), t;
|
|
5145
5146
|
}
|
|
5146
5147
|
});
|
|
5147
5148
|
}
|
|
@@ -5195,9 +5196,9 @@ const Ie = (At = class extends ln {
|
|
|
5195
5196
|
});
|
|
5196
5197
|
}
|
|
5197
5198
|
startPublish() {
|
|
5198
|
-
return I(this, arguments, function* (e = !1, t =
|
|
5199
|
+
return I(this, arguments, function* (e = !1, t = St.MANUAL) {
|
|
5199
5200
|
var h;
|
|
5200
|
-
if (
|
|
5201
|
+
if (!this.joined)
|
|
5201
5202
|
return;
|
|
5202
5203
|
this.shouldPublish = !0;
|
|
5203
5204
|
const i = this.streamManager.publishStreams, { audio: s, video: n, videoSmall: o, screen: c } = i;
|
|
@@ -5216,7 +5217,7 @@ const Ie = (At = class extends ln {
|
|
|
5216
5217
|
throw s && this.audioPubState.setState(Q.AliRtcStateNoPublish), n && this.videoPubState.setState(Q.AliRtcStateNoPublish), o && this.videoSmallPubState.setState(Q.AliRtcStateNoPublish), c && this.screenPubState.setState(Q.AliRtcStateNoPublish), d;
|
|
5217
5218
|
}
|
|
5218
5219
|
} else
|
|
5219
|
-
V.event(`[${
|
|
5220
|
+
V.event(`[${ft.logName}]`, "startPublish no stream founded");
|
|
5220
5221
|
});
|
|
5221
5222
|
}
|
|
5222
5223
|
updateStreams() {
|
|
@@ -5227,7 +5228,7 @@ const Ie = (At = class extends ln {
|
|
|
5227
5228
|
publishUpdate(e) {
|
|
5228
5229
|
return I(this, null, function* () {
|
|
5229
5230
|
var n, o, c, h, d, l;
|
|
5230
|
-
if (!this.shouldPublish)
|
|
5231
|
+
if (V.info(`[${ft.logName}]`, "publishUpdate", e || "-", this.shouldPublish), !this.shouldPublish)
|
|
5231
5232
|
return;
|
|
5232
5233
|
if (!this.rtsManager.isConnecting && !this.rtsManager.isConnected)
|
|
5233
5234
|
return void (yield this.startPublish());
|
|
@@ -5244,7 +5245,7 @@ const Ie = (At = class extends ln {
|
|
|
5244
5245
|
S && (i = S);
|
|
5245
5246
|
const R = (h = this.streamTracks) == null ? void 0 : h.find(({ ssrc: y, type: v, msid: w }) => v === "video" && y && w === k.Screen), _ = yield this.compareAndPublish(R, t.screen, k.Screen);
|
|
5246
5247
|
if (_ && (i = _), !i) {
|
|
5247
|
-
if (!(e ===
|
|
5248
|
+
if (!(e === St.RECONNECT && this.rtsManager.publishingTracks.length > 0))
|
|
5248
5249
|
return;
|
|
5249
5250
|
{
|
|
5250
5251
|
if ((d = this.parameter.data) != null && d.enablePubDataChannel) {
|
|
@@ -5252,7 +5253,7 @@ const Ie = (At = class extends ln {
|
|
|
5252
5253
|
this.updateDataChannel(w);
|
|
5253
5254
|
}
|
|
5254
5255
|
const y = this.rtsManager.publishingTracks.find(({ type: w }) => w === "video"), v = this.rtsManager.publishingTracks.find(({ type: w }) => w === "audio");
|
|
5255
|
-
(y || v) && (yield this.rtsManager.waitPublishSender(this.url, !y, y ? y.msid : v == null ? void 0 : v.msid)), i = { type: Et.Add, userid: this.userId, sessionid: "", displayname: this.name, pubid: this.publishId,
|
|
5256
|
+
(y || v) && (yield this.rtsManager.waitPublishSender(this.url, !y, y ? y.msid : v == null ? void 0 : v.msid)), i = { type: Et.Add, userid: this.userId, sessionid: "", displayname: this.name, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.rtsManager.publishingTracks, traceid: this.traceId };
|
|
5256
5257
|
}
|
|
5257
5258
|
}
|
|
5258
5259
|
(l = this.parameter.data) != null && l.enablePubDataChannel && !this.dc && (yield this.publishDataChannel()), yield this.syncPublishToRoomServer(i, t, s);
|
|
@@ -5271,7 +5272,7 @@ const Ie = (At = class extends ln {
|
|
|
5271
5272
|
let s = e;
|
|
5272
5273
|
if (this.dc) {
|
|
5273
5274
|
const o = e, { tracks: h } = o, d = xt(o, ["tracks"]);
|
|
5274
|
-
s =
|
|
5275
|
+
s = bt(J({}, d), { tracks: [...h, { type: "data", msid: k.Data, ssrc: `${((c = this.callId) == null ? void 0 : c.length) > 8 ? this.callId.substring(0, 8) : "web"}${this.dc.datachannel.id || "0"}`, codec: "text" }] });
|
|
5275
5276
|
}
|
|
5276
5277
|
const n = yield this.signalingManager.publish(s);
|
|
5277
5278
|
e.signaltid = n.tid;
|
|
@@ -5331,7 +5332,7 @@ const Ie = (At = class extends ln {
|
|
|
5331
5332
|
}
|
|
5332
5333
|
publishStop() {
|
|
5333
5334
|
return I(this, null, function* () {
|
|
5334
|
-
V.info(`[${
|
|
5335
|
+
V.info(`[${ft.logName}]`, "publishStop", { url: this.url });
|
|
5335
5336
|
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
5336
5337
|
try {
|
|
5337
5338
|
const t = this.hasAudioTrackInMS, i = this.hasCameraTrackInMS, s = this.hasCameraDualTrackInMS, n = this.hasScreenTrackInMS;
|
|
@@ -5490,7 +5491,7 @@ const Ie = (At = class extends ln {
|
|
|
5490
5491
|
const e = [];
|
|
5491
5492
|
if (this.hasAudioTrackInMS) {
|
|
5492
5493
|
const n = yield this.rtsManager.getPublishAudioStats(this.url);
|
|
5493
|
-
n && e.push({ stats: n, track:
|
|
5494
|
+
n && e.push({ stats: n, track: ei.AliRtcAudioTrackMic });
|
|
5494
5495
|
}
|
|
5495
5496
|
const t = [];
|
|
5496
5497
|
if (this.hasCameraTrackInMS) {
|
|
@@ -5512,13 +5513,13 @@ const Ie = (At = class extends ln {
|
|
|
5512
5513
|
}), { audio: e, video: t, candidate: i };
|
|
5513
5514
|
});
|
|
5514
5515
|
}
|
|
5515
|
-
}, g(
|
|
5516
|
-
Ce([T()],
|
|
5517
|
-
let oc =
|
|
5516
|
+
}, g(ft, "logName", "LocalUser"), ft);
|
|
5517
|
+
Ce([T()], Te.prototype, "clearPublishState", 1), Ce([T()], Te.prototype, "clear", 1), Ce([T(U)], Te.prototype, "startDefaultCamera", 1), Ce([T(U)], Te.prototype, "startDefaultAudio", 1), Ce([T()], Te.prototype, "setViewConfig", 1), Ce([T()], Te.prototype, "startCameraCapture", 1), Ce([T()], Te.prototype, "stopCameraCapture", 1), Ce([T()], Te.prototype, "startAudioCapture", 1), Ce([T()], Te.prototype, "stopAudioCapture", 1), Ce([T()], Te.prototype, "stopPreview", 1), Ce([T()], Te.prototype, "resumePublish", 1), Ce([T()], Te.prototype, "createLocalStream", 1), Ce([T()], Te.prototype, "stopLocalStream", 1), Ce([T(U)], Te.prototype, "startPublish", 1), Ce([T()], Te.prototype, "updateStreams", 1), Ce([T(([r]) => [r])], Te.prototype, "syncPublishToRoomServer", 1), Ce([T()], Te.prototype, "refreshPushStreamUrl", 1), Ce([T(([r, a, e]) => [JSON.stringify(e)])], Te.prototype, "publishAdd", 1), Ce([T(([r, a]) => [JSON.stringify(a)])], Te.prototype, "publishReplace", 1), Ce([T(U)], Te.prototype, "publishDeleteTracks", 1), Ce([T()], Te.prototype, "publishStop", 1), Ce([T()], Te.prototype, "unPublish", 1), Ce([T(([r, a, e]) => [r.length, a, e])], Te.prototype, "sendSEI", 1);
|
|
5518
|
+
let oc = Te;
|
|
5518
5519
|
var It = ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(It || {}), ae = ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(ae || {}), $t = ((r) => (r.VideoTrackEnded = "videoTrackEnded", r.AudioTrackEnded = "audioTrackEnded", r.ScreenTrackEnded = "screenTrackEnded", r))($t || {});
|
|
5519
5520
|
const Sn = (r) => I(void 0, null, function* () {
|
|
5520
5521
|
return yield Se.createStream({ custom: !0, mediaStream: r });
|
|
5521
|
-
}),
|
|
5522
|
+
}), ai = (r) => I(void 0, null, function* () {
|
|
5522
5523
|
const a = ((e) => {
|
|
5523
5524
|
const t = new MediaStream();
|
|
5524
5525
|
return t.addTrack(e), t;
|
|
@@ -5620,7 +5621,7 @@ class Ni extends He {
|
|
|
5620
5621
|
return this.hasVideoLarge ? this.videoLargeInfo.codec : this.hasVideoSmall ? this.videoSmallInfo.codec : this.hasScreen ? this.screenInfo.codec : It.UNKNOWN;
|
|
5621
5622
|
}
|
|
5622
5623
|
get audioTrackInfo() {
|
|
5623
|
-
return this.hasAudio ?
|
|
5624
|
+
return this.hasAudio ? ei.AliRtcAudioTrackMic : ei.AliRtcAudioTrackNo;
|
|
5624
5625
|
}
|
|
5625
5626
|
get videoTrackInfo() {
|
|
5626
5627
|
return this.hasVideo && this.hasScreen ? oe.AliRtcVideoTrackBoth : this.hasVideo ? oe.AliRtcVideoTrackCamera : this.hasScreen ? oe.AliRtcVideoTrackScreen : oe.AliRtcVideoTrackNo;
|
|
@@ -5806,7 +5807,7 @@ const Ue = (Xe = class extends ln {
|
|
|
5806
5807
|
i = Kt.parse(t.body);
|
|
5807
5808
|
i || V.event(`[${Xe.logName}]`, `parse data channel message fail, piece count: ${this.dcMsgWaitingPieces.length + 1}`);
|
|
5808
5809
|
}
|
|
5809
|
-
i && (V.event(`[${Xe.logName}]`, `receive
|
|
5810
|
+
i && (V.event(`[${Xe.logName}]`, `receive dc message, length(${(s = i.data) == null ? void 0 : s.byteLength})`), this.emit("remoteDataChannelMessage", this.uid, i));
|
|
5810
5811
|
});
|
|
5811
5812
|
g(this, "onDataChannelError", (e) => {
|
|
5812
5813
|
this.emit("occurError", O.fromError(e, B.ERR_SDK_SUBSCRIBE_DATA_ERROR));
|
|
@@ -6158,7 +6159,7 @@ const Ue = (Xe = class extends ln {
|
|
|
6158
6159
|
A && A.mediaStream && (this.stream = A, this.playAll(!1));
|
|
6159
6160
|
}
|
|
6160
6161
|
if (this.streamInfo.hasScreen && !i.screen) {
|
|
6161
|
-
const A = this.rtsManager.getStreamByMsid({ url: this.streamUrl,
|
|
6162
|
+
const A = this.rtsManager.getStreamByMsid({ url: this.streamUrl, vMsid: this.streamInfo.getScreenInfo().msid || k.Screen });
|
|
6162
6163
|
A && A.mediaStream && (this.screenStream = A, this.playAll(!0));
|
|
6163
6164
|
}
|
|
6164
6165
|
}
|
|
@@ -6253,7 +6254,7 @@ const Ue = (Xe = class extends ln {
|
|
|
6253
6254
|
const e = [];
|
|
6254
6255
|
if (this.isAudioSubscribing) {
|
|
6255
6256
|
const h = yield this.rtsManager.getSubscribeAudioStats(this.streamUrl);
|
|
6256
|
-
h && e.push({ uid: this.uid, track:
|
|
6257
|
+
h && e.push({ uid: this.uid, track: ei.AliRtcAudioTrackMic, stats: h });
|
|
6257
6258
|
}
|
|
6258
6259
|
const t = [];
|
|
6259
6260
|
if ((i = this.streamInfo) != null && i.isVideoLargeSubscribed) {
|
|
@@ -6320,7 +6321,7 @@ const Ue = (Xe = class extends ln {
|
|
|
6320
6321
|
});
|
|
6321
6322
|
}
|
|
6322
6323
|
}, g(Xe, "logName", "RemoteUser"), Xe);
|
|
6323
|
-
ze([T()], Ue.prototype, "clear", 1), ze([T()], Ue.prototype, "updateRemoteUserDeviceStatus", 1), ze([T()], Ue.prototype, "updateRemoteTracks", 1), ze([T(U)], Ue.prototype, "subscribe", 1), ze([T()], Ue.prototype, "subscribeProxy", 1), ze([T(U)], Ue.prototype, "subscribeDeleteProxy", 1), ze([T()], Ue.prototype, "restore", 1), ze([T(U)], Ue.prototype, "resumeAudio", 1), ze([T(U)], Ue.prototype, "stopSubscribe", 1), ze([T(U)], Ue.prototype, "doStopSubscribe", 1), ze([T()], Ue.prototype, "clearStream", 1), ze([T()], Ue.prototype, "clearScreenStream", 1), ze([T()], Ue.prototype, "updateSubscribe", 1), ze([T()], Ue.prototype, "playAudio", 1), ze([T()], Ue.prototype, "stopPlayAudio", 1), ze([T((r, a, e) => [typeof r == "string" ? r : r == null ? void 0 : r.nodeType, a, e])], Ue.prototype, "play", 1), ze([T()], Ue.prototype, "stopPlayAll", 1);
|
|
6324
|
+
ze([T()], Ue.prototype, "clear", 1), ze([T()], Ue.prototype, "updateRemoteUserDeviceStatus", 1), ze([T()], Ue.prototype, "updateRemoteTracks", 1), ze([T(U)], Ue.prototype, "subscribe", 1), ze([T()], Ue.prototype, "subscribeProxy", 1), ze([T(U)], Ue.prototype, "subscribeDeleteProxy", 1), ze([T()], Ue.prototype, "restore", 1), ze([T(U)], Ue.prototype, "resumeAudio", 1), ze([T(U)], Ue.prototype, "stopSubscribe", 1), ze([T(U)], Ue.prototype, "doStopSubscribe", 1), ze([T()], Ue.prototype, "clearStream", 1), ze([T()], Ue.prototype, "clearScreenStream", 1), ze([T()], Ue.prototype, "updateSubscribe", 1), ze([T()], Ue.prototype, "playAudio", 1), ze([T()], Ue.prototype, "stopPlayAudio", 1), ze([T((r, a, e) => [typeof r == "string" ? r : r == null ? void 0 : r.nodeType, a || "-", e || "-"])], Ue.prototype, "play", 1), ze([T()], Ue.prototype, "stopPlayAll", 1);
|
|
6324
6325
|
let pc = Ue;
|
|
6325
6326
|
var Dt = ((r) => (r[r.AliRtcPluginErrorCodeSuccess = 0] = "AliRtcPluginErrorCodeSuccess", r[r.AliRtcPluginErrorCodeFailed = -1] = "AliRtcPluginErrorCodeFailed", r[r.AliRtcPluginErrorNoFindPlugin = -2] = "AliRtcPluginErrorNoFindPlugin", r[r.AliRtcPluginErrorParameterError = -3] = "AliRtcPluginErrorParameterError", r[r.AliRtcPluginErrorLoadError = -4] = "AliRtcPluginErrorLoadError", r[r.AliRtcPluginErrorCreateError = -5] = "AliRtcPluginErrorCreateError", r[r.AliRtcPluginErrorInitError = -6] = "AliRtcPluginErrorInitError", r[r.AliRtcPluginErrorInitTokenError = -7] = "AliRtcPluginErrorInitTokenError", r))(Dt || {});
|
|
6326
6327
|
class mc extends He {
|
|
@@ -6483,10 +6484,12 @@ const De = (Ve = class extends He {
|
|
|
6483
6484
|
e && (this._publishingTracks = e.map(({ msid: t, from: i, ssrc: s, codec: n, type: o, trackId: c }) => ({ msid: t, from: i, type: o, ssrc: `${s}`, codec: n != null ? n : "", trackId: c })));
|
|
6484
6485
|
}
|
|
6485
6486
|
httpPublish(n, o) {
|
|
6486
|
-
return I(this, arguments, function* (e, t, i = !1, s =
|
|
6487
|
+
return I(this, arguments, function* (e, t, i = !1, s = St.MANUAL) {
|
|
6487
6488
|
var _, y;
|
|
6488
6489
|
let c;
|
|
6489
|
-
const h = Date.now()
|
|
6490
|
+
const h = Date.now();
|
|
6491
|
+
this.startConnect();
|
|
6492
|
+
const { publishStream: d, videoSmallStream: l, screenStream: b, vMsid: u } = yield this.localStreamManager.createHTTPPublishStream();
|
|
6490
6493
|
if (!d)
|
|
6491
6494
|
return V.warn(`[${Ve.logName}]`, "publishStream is null"), { traceId: "", l1ip: c };
|
|
6492
6495
|
const f = this.getPubMsid(d, { vMsid: u });
|
|
@@ -6495,7 +6498,6 @@ const De = (Ve = class extends He {
|
|
|
6495
6498
|
return w != null && w[0] && (c = w[0]), v;
|
|
6496
6499
|
}, (y = (_ = this.parameter) == null ? void 0 : _.net) != null && y.useTCP && (f.tcpOnly = !0), f.retryTimes = 17, f.retryInterval = 5e3, this._rtsPeerConnectionType = "publish";
|
|
6497
6500
|
let p = !d.hasVideo, m = u, S = "";
|
|
6498
|
-
this.startConnect();
|
|
6499
6501
|
const R = Date.now();
|
|
6500
6502
|
try {
|
|
6501
6503
|
S = yield this.rts.publish(nr(e, this.preferredPubL1Ip), d, f);
|
|
@@ -6536,13 +6538,13 @@ const De = (Ve = class extends He {
|
|
|
6536
6538
|
});
|
|
6537
6539
|
}
|
|
6538
6540
|
publishAdd(h, d, l, b) {
|
|
6539
|
-
return I(this, arguments, function* (e, t, i, s, n = !1, o = !1, c =
|
|
6541
|
+
return I(this, arguments, function* (e, t, i, s, n = !1, o = !1, c = St.MANUAL) {
|
|
6540
6542
|
var p, m, S, R, _, y, v, w;
|
|
6541
6543
|
yield this.dcConnectingPromise;
|
|
6542
6544
|
const u = Date.now(), f = this.getPubMsid(t, s);
|
|
6543
6545
|
try {
|
|
6544
6546
|
const A = yield Ba((E) => I(this, null, function* () {
|
|
6545
|
-
return E > 0 && V.event(`[${Ve.logName}]`, `publishAdd retry times: ${E}`), this.isConnected ? (yield this.dcConnectingPromise,
|
|
6547
|
+
return E > 0 && V.event(`[${Ve.logName}]`, `publishAdd retry times: ${E}`), this.isConnected ? (yield this.dcConnectingPromise, this.rts.publishAdd([J({ url: e, stream: t, updateSourceStream: !1 }, f)])) : Promise.reject(new O(B.ERR_INNER, "rts not connected"));
|
|
6546
6548
|
}), 5, 0, (E) => (E == null ? void 0 : E.errorCode) === 15006);
|
|
6547
6549
|
if (A) {
|
|
6548
6550
|
const E = Date.now(), [C] = A;
|
|
@@ -6576,7 +6578,6 @@ const De = (Ve = class extends He {
|
|
|
6576
6578
|
yield this.dcConnectingPromise;
|
|
6577
6579
|
const { vMsid: s, aMsid: n } = i != null ? i : {};
|
|
6578
6580
|
try {
|
|
6579
|
-
console.log("========", "publishReplaceTracks", { streamUrl: e, stream: t, vMsid: s, aMsid: n });
|
|
6580
6581
|
const h = yield this.rts.publishReplaceTracks([{ url: e, stream: t, vMsid: s, aMsid: n }]), [d] = h;
|
|
6581
6582
|
return this.updatePublishingTracks(d.trackInfoList), ((c = (o = d == null ? void 0 : d.trackInfoList) == null ? void 0 : o[0]) == null ? void 0 : c.trackId) || "";
|
|
6582
6583
|
} catch (h) {
|
|
@@ -6640,7 +6641,7 @@ const De = (Ve = class extends He {
|
|
|
6640
6641
|
subscribeAdd(e) {
|
|
6641
6642
|
return I(this, null, function* () {
|
|
6642
6643
|
var n, o, c, h;
|
|
6643
|
-
const { remoteUser: t, options: i } = e, s =
|
|
6644
|
+
const { remoteUser: t, options: i } = e, s = bt(J({ url: t.streamUrl, subAudio: !!i.audio, subVideo: !(!i.screen && !i.video) }, this.getSubConfig(t.streamInfo, i)), { targetStream: i.screen ? t.getScreenStream : t.getCameraStream });
|
|
6644
6645
|
yield this.dcConnectingPromise;
|
|
6645
6646
|
try {
|
|
6646
6647
|
return (yield Ba((d) => I(this, null, function* () {
|
|
@@ -6656,7 +6657,7 @@ const De = (Ve = class extends He {
|
|
|
6656
6657
|
subscribeDelete(e) {
|
|
6657
6658
|
return I(this, null, function* () {
|
|
6658
6659
|
var n, o, c, h;
|
|
6659
|
-
const { remoteUser: t, options: i } = e, s =
|
|
6660
|
+
const { remoteUser: t, options: i } = e, s = bt(J({ url: t.streamUrl, subAudio: !!i.audio, subVideo: !(!i.screen && !i.video) }, this.getSubConfig(t.streamInfo, i)), { targetStream: i.screen ? t.getScreenStream : t.getCameraStream });
|
|
6660
6661
|
yield this.dcConnectingPromise;
|
|
6661
6662
|
try {
|
|
6662
6663
|
return (yield this.rts.subscribeDeleteTracks([s]))[0];
|
|
@@ -6701,7 +6702,7 @@ const De = (Ve = class extends He {
|
|
|
6701
6702
|
});
|
|
6702
6703
|
}
|
|
6703
6704
|
publish(n, o) {
|
|
6704
|
-
return I(this, arguments, function* (e, t, i = !1, s =
|
|
6705
|
+
return I(this, arguments, function* (e, t, i = !1, s = St.MANUAL) {
|
|
6705
6706
|
let c, h = "";
|
|
6706
6707
|
if (this.connecting && (yield this.connectingPromise), this.connected) {
|
|
6707
6708
|
yield this.dcConnectingPromise;
|
|
@@ -6864,7 +6865,7 @@ class Fa extends He {
|
|
|
6864
6865
|
return I(this, null, function* () {
|
|
6865
6866
|
var o, c, h, d, l, b;
|
|
6866
6867
|
const { videoTrack: s, audioTrack: n } = e;
|
|
6867
|
-
s && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type === Le.AliRtcSdkStreamTypeScreen ? this.stop() : (s && ((h = this.originVideoTrack) == null || h.stop()), n && ((d = this.originAudioTrack) == null || d.stop())), s && (this.originVideoTrack = s, (l = this.originVideoTrack) == null || l.addEventListener("ended", this.onVideoTrackEnded), this.videoSource = t ||
|
|
6868
|
+
s && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type === Le.AliRtcSdkStreamTypeScreen ? this.stop() : (s && ((h = this.originVideoTrack) == null || h.stop()), n && ((d = this.originAudioTrack) == null || d.stop())), s && (this.originVideoTrack = s, (l = this.originVideoTrack) == null || l.addEventListener("ended", this.onVideoTrackEnded), this.videoSource = t || li.Camera, this.updateVideoTrack(s)), n && (this.originAudioTrack = n, (b = this.originAudioTrack) == null || b.addEventListener("ended", this.onAudioTrackEnded), this.audioSource = i || Ti.Microphone, this.updateAudioTrack(n));
|
|
6868
6869
|
});
|
|
6869
6870
|
}
|
|
6870
6871
|
get currentProfile() {
|
|
@@ -6931,7 +6932,7 @@ class Fa extends He {
|
|
|
6931
6932
|
} catch (m) {
|
|
6932
6933
|
console.error(`error in plugin-${p.name}, error: ${m}`);
|
|
6933
6934
|
}
|
|
6934
|
-
this._targetVideoTrack ? ((i = (t = this._publishVideoStream) == null ? void 0 : t.videoTrack) == null ? void 0 : i.id) !== this._targetVideoTrack.id && (this._publishVideoStream = yield
|
|
6935
|
+
this._targetVideoTrack ? ((i = (t = this._publishVideoStream) == null ? void 0 : t.videoTrack) == null ? void 0 : i.id) !== this._targetVideoTrack.id && (this._publishVideoStream = yield ai(this._targetVideoTrack), this.setVideoMuted(this._videoMuted), (s = this.profileManager) == null || s.setVideoProfile(this.originVideoTrack, this._publishVideoStream, !0), (n = this.profileManager) == null || n.setContentHint(this._targetVideoTrack), this.previewStream ? (o = this.previewStream) == null || o.mergeStream(this._publishVideoStream) : this._previewStream = yield ai(this._targetVideoTrack)) : (this._publishVideoStream = void 0, (c = this.previewStream) == null || c.deleteTracks({ video: !0 })), this._targetDualVideoTrack ? ((d = (h = this._publishDualVideoStream) == null ? void 0 : h.videoTrack) == null ? void 0 : d.id) !== this._targetDualVideoTrack.id && (this._publishDualVideoStream = yield ai(this._targetDualVideoTrack), this._videoMuted ? this._publishDualVideoStream.disableVideo() : this._publishDualVideoStream.enableVideo()) : this._publishDualVideoStream = void 0, this._targetAudioTrack ? ((b = (l = this._publishAudioStream) == null ? void 0 : l.audioTrack) == null ? void 0 : b.id) !== this._targetAudioTrack.id && (this._publishAudioStream = yield ai(this._targetAudioTrack), this.setAudioMuted(this._audioMuted), this.previewStream ? (u = this.previewStream) == null || u.mergeStream(this._publishAudioStream) : this._previewStream = yield ai(this._targetAudioTrack)) : (this._publishAudioStream = void 0, (f = this.previewStream) == null || f.deleteTracks({ audio: !0 }));
|
|
6935
6936
|
});
|
|
6936
6937
|
}
|
|
6937
6938
|
stopVideo() {
|
|
@@ -7004,7 +7005,7 @@ const ct = (Mt = class extends He {
|
|
|
7004
7005
|
})), this.screenStreamInfo.on("videotrackended", () => I(this, null, function* () {
|
|
7005
7006
|
yield this.stopLocalStream({ screen: !0 }), this.emit("trackended", $t.ScreenTrackEnded);
|
|
7006
7007
|
})), this.pluginManager.on("added", (i) => I(this, null, function* () {
|
|
7007
|
-
if (V.info(`[${Mt.logName}]`, "plugin added", i.name), !i.isSupported("7.1.
|
|
7008
|
+
if (V.info(`[${Mt.logName}]`, "plugin added", i.name), !i.isSupported("7.1.1-beta.2"))
|
|
7008
7009
|
return console.warn(`${i.name} is not supported!!!`), void i.emit("unsupported");
|
|
7009
7010
|
try {
|
|
7010
7011
|
yield i.init();
|
|
@@ -7115,8 +7116,8 @@ const ct = (Mt = class extends He {
|
|
|
7115
7116
|
throw c && !i && this.slsReporter.reportAudio(u, Date.now() - b, ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - b), u;
|
|
7116
7117
|
}
|
|
7117
7118
|
if (t)
|
|
7118
|
-
|
|
7119
|
-
else if (yield this.cameraStreamInfo.updateSource(d,
|
|
7119
|
+
yield this.screenStreamInfo.updateSource(d, li.Screen, Ti.Screen), yield this.setScreenProfile(n || mn), this.setScreenContentHint(), this.publishingScreenVideoStream = void 0;
|
|
7120
|
+
else if (yield this.cameraStreamInfo.updateSource(d, li.Camera, Ti.Microphone), d.hasVideo && (yield this.setVideoProfile(s || pn), this.setVideoContentHint(), this.publishingCameraVideoStream = void 0), d.hasAudio && typeof c == "boolean") {
|
|
7120
7121
|
const u = this.cameraStreamInfo.audioProfile;
|
|
7121
7122
|
u && (yield d.setAudioProfile(u));
|
|
7122
7123
|
}
|
|
@@ -7196,6 +7197,7 @@ class Rc extends Jt {
|
|
|
7196
7197
|
g(this, "lastWidth");
|
|
7197
7198
|
g(this, "lastHeight");
|
|
7198
7199
|
g(this, "isProcessingScreenTrack", !1);
|
|
7200
|
+
this.shouldCache = !1;
|
|
7199
7201
|
}
|
|
7200
7202
|
get initOptions() {
|
|
7201
7203
|
return { base: 4 };
|
|
@@ -7216,17 +7218,20 @@ class Rc extends Jt {
|
|
|
7216
7218
|
}
|
|
7217
7219
|
this.lastWidth = e, this.lastHeight = t;
|
|
7218
7220
|
}
|
|
7219
|
-
|
|
7221
|
+
shouldProcess(e) {
|
|
7220
7222
|
var i;
|
|
7221
7223
|
let t = !1;
|
|
7222
|
-
if (e.originVideoTrack && e.videoSource ===
|
|
7224
|
+
if (e.originVideoTrack && e.videoSource === li.Screen) {
|
|
7223
7225
|
const s = (i = e.originVideoTrack) == null ? void 0 : i.getSettings();
|
|
7224
7226
|
if (s) {
|
|
7225
7227
|
const { width: n, height: o } = s;
|
|
7226
7228
|
t = !n || !o || !(n % this.options.base === 0 && o % this.options.base === 0);
|
|
7227
7229
|
}
|
|
7228
7230
|
}
|
|
7229
|
-
return t
|
|
7231
|
+
return t;
|
|
7232
|
+
}
|
|
7233
|
+
shouldUpdate(e) {
|
|
7234
|
+
return this.shouldProcess(e) !== this.isProcessingScreenTrack;
|
|
7230
7235
|
}
|
|
7231
7236
|
handleFrame(e) {
|
|
7232
7237
|
return I(this, null, function* () {
|
|
@@ -7247,7 +7252,7 @@ class Rc extends Jt {
|
|
|
7247
7252
|
process(e) {
|
|
7248
7253
|
return I(this, null, function* () {
|
|
7249
7254
|
var d;
|
|
7250
|
-
if (!
|
|
7255
|
+
if (!this.shouldProcess(e))
|
|
7251
7256
|
return this.clear(e), void (this.isProcessingScreenTrack = !1);
|
|
7252
7257
|
if (e.originVideoTrack) {
|
|
7253
7258
|
const l = e.originVideoTrack.getSettings();
|
|
@@ -8179,26 +8184,26 @@ class Mc {
|
|
|
8179
8184
|
}
|
|
8180
8185
|
loadFromServerConfig(a) {
|
|
8181
8186
|
if (a && typeof a == "object") {
|
|
8182
|
-
const e =
|
|
8187
|
+
const e = ii(a, "enableSoft3A"), t = ri(a, "enableSoft3A");
|
|
8183
8188
|
if (e === !0 && t === !0 && (this.enableSoft3A = !0), this.enableSoft3A) {
|
|
8184
8189
|
if (a.archCfgs) {
|
|
8185
|
-
const i =
|
|
8190
|
+
const i = ii(a, "useAIAEC");
|
|
8186
8191
|
i !== void 0 && (this.useAIAEC = i);
|
|
8187
|
-
const s =
|
|
8192
|
+
const s = ii(a, "useSysNoiseSuppression");
|
|
8188
8193
|
s !== void 0 && (this.useSysNoiseSuppression = s);
|
|
8189
|
-
const n =
|
|
8194
|
+
const n = ii(a, "useSysEchoCancellation");
|
|
8190
8195
|
n !== void 0 && (this.useSysEchoCancellation = n);
|
|
8191
|
-
const o =
|
|
8196
|
+
const o = ii(a, "useSysAutoGainControl");
|
|
8192
8197
|
o !== void 0 && (this.useSysAutoGainControl = o);
|
|
8193
8198
|
}
|
|
8194
8199
|
if (a.config) {
|
|
8195
|
-
const i =
|
|
8200
|
+
const i = ri(a, "useAIAEC");
|
|
8196
8201
|
i !== void 0 && (this.useAIAEC = i);
|
|
8197
|
-
const s =
|
|
8202
|
+
const s = ri(a, "useSysNoiseSuppression");
|
|
8198
8203
|
s !== void 0 && (this.useSysNoiseSuppression = s);
|
|
8199
|
-
const n =
|
|
8204
|
+
const n = ri(a, "useSysEchoCancellation");
|
|
8200
8205
|
n !== void 0 && (this.useSysEchoCancellation = n);
|
|
8201
|
-
const o =
|
|
8206
|
+
const o = ri(a, "useSysAutoGainControl");
|
|
8202
8207
|
o !== void 0 && (this.useSysAutoGainControl = o);
|
|
8203
8208
|
}
|
|
8204
8209
|
V.info("setAudio3AConfig:", "enableSoft3A", this.enableSoft3A, ", useAIAEC", this.useAIAEC, ", useSysNoiseSuppression", this.useSysNoiseSuppression, ", useSysEchoCancellation", this.useSysEchoCancellation, ", useSysAutoGainControl", this.useSysAutoGainControl);
|
|
@@ -8608,7 +8613,7 @@ class xc {
|
|
|
8608
8613
|
var o;
|
|
8609
8614
|
const t = this.authInfo;
|
|
8610
8615
|
if (!t)
|
|
8611
|
-
return Promise.reject(
|
|
8616
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8612
8617
|
const i = Go[a], s = { appid: t.appId, userid: t.userId, channelid: t.channelId, timestamp: t.timestamp, token: t.token, nonce: t.nonce ? t.nonce : "", requestid: it.createCallid(), tokensid: !1, session: (o = t.sessionId) != null ? o : it.createCallid() }, n = Object.keys(s).map((c) => `${c}=${encodeURIComponent(s[c])}`).join("&");
|
|
8613
8618
|
return fetch(`https://gw.rtn.aliyuncs.com${i}?${n}`, { method: "POST", headers: { "Content-Type": "application/json; charset=UTF-8" }, body: JSON.stringify(e) }).then((c) => c.status !== 200 ? (this.slsReporter.reportTranscodingError(c.status, e.taskid || ""), Promise.reject(new O(B.ERR_INNER, `transcoding request failed, status: ${c.status}`))) : c).catch((c) => Promise.reject(new O(B.ERR_INNER, `transcoding request failed, err: ${c.message}`)));
|
|
8614
8619
|
}
|
|
@@ -8621,7 +8626,7 @@ class xc {
|
|
|
8621
8626
|
startPublishLiveStream(a, e) {
|
|
8622
8627
|
return I(this, null, function* () {
|
|
8623
8628
|
if (!this.authInfo)
|
|
8624
|
-
return Promise.reject(
|
|
8629
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8625
8630
|
const t = yield hr(a.split("?")[0]), i = tt.MPU_TASK_TRANSACTION_UPDATE, s = e.toJson(i, this.authInfo, t, a);
|
|
8626
8631
|
return this.doRequest(i, s);
|
|
8627
8632
|
});
|
|
@@ -8629,7 +8634,7 @@ class xc {
|
|
|
8629
8634
|
startPublishLiveStreamWithTaskId(a, e) {
|
|
8630
8635
|
return I(this, null, function* () {
|
|
8631
8636
|
if (!this.authInfo)
|
|
8632
|
-
return Promise.reject(
|
|
8637
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8633
8638
|
const t = tt.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, a);
|
|
8634
8639
|
return this.doRequest(t, i);
|
|
8635
8640
|
});
|
|
@@ -8637,7 +8642,7 @@ class xc {
|
|
|
8637
8642
|
updatePublishLiveStream(a, e) {
|
|
8638
8643
|
return I(this, null, function* () {
|
|
8639
8644
|
if (!this.authInfo)
|
|
8640
|
-
return Promise.reject(
|
|
8645
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8641
8646
|
const t = yield hr(a.split("?")[0]), i = tt.MPU_TASK_TRANSACTION_UPDATE, s = e.toJson(i, this.authInfo, t, a);
|
|
8642
8647
|
return this.doRequest(i, s);
|
|
8643
8648
|
});
|
|
@@ -8645,7 +8650,7 @@ class xc {
|
|
|
8645
8650
|
updatePublishLiveStreamWithTaskId(a, e) {
|
|
8646
8651
|
return I(this, null, function* () {
|
|
8647
8652
|
if (!this.authInfo)
|
|
8648
|
-
return Promise.reject(
|
|
8653
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8649
8654
|
const t = tt.MPU_TASK_TRANSACTION_UPDATE, i = e.toJson(t, this.authInfo, a);
|
|
8650
8655
|
return this.doRequest(t, i);
|
|
8651
8656
|
});
|
|
@@ -8653,14 +8658,14 @@ class xc {
|
|
|
8653
8658
|
stopPublishLiveStream(a) {
|
|
8654
8659
|
return I(this, null, function* () {
|
|
8655
8660
|
if (!this.authInfo)
|
|
8656
|
-
return Promise.reject(
|
|
8661
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8657
8662
|
const e = yield hr(a.split("?")[0]), t = tt.MPU_TASK_TRANSACTION_STOP, i = new mr().toJson(t, this.authInfo, e, a);
|
|
8658
8663
|
return this.doRequest(t, i);
|
|
8659
8664
|
});
|
|
8660
8665
|
}
|
|
8661
8666
|
stopPublishLiveStreamWithTaskId(a) {
|
|
8662
8667
|
if (!this.authInfo)
|
|
8663
|
-
return Promise.reject(
|
|
8668
|
+
return Promise.reject(Rt.LiveTranscodingErrorInvalidParam);
|
|
8664
8669
|
const e = tt.MPU_TASK_TRANSACTION_STOP, t = new mr().toJson(e, this.authInfo, a);
|
|
8665
8670
|
return this.doRequest(e, t);
|
|
8666
8671
|
}
|
|
@@ -8776,7 +8781,7 @@ class Hc {
|
|
|
8776
8781
|
}
|
|
8777
8782
|
toJson(a, e, t, i) {
|
|
8778
8783
|
const s = { paneid: a, majorpane: 0, x: dt(this.x, e), y: dt(this.y, t), width: dt(this.width, e), height: dt(this.height, t), zorder: this.zOrder, userid: this.userId, images: this.images.map((n) => n.toJson(e, t)), texts: this.texts.map((n) => n.toJson(e, t)) };
|
|
8779
|
-
return this.sourceType &&
|
|
8784
|
+
return this.sourceType && ci[this.sourceType] ? s.sourcetype = ci[this.sourceType] : s.sourcetype = ci[ui.LiveTranscodingCamera], this.segmentType && i === Dr.LiveTranscodingVirtualBackground ? s.segmenttype = this.segmentType : s.segmenttype = Di.LiveTranscodingNoBody, s;
|
|
8780
8785
|
}
|
|
8781
8786
|
}
|
|
8782
8787
|
const zt = class zt {
|
|
@@ -8817,7 +8822,7 @@ class qa {
|
|
|
8817
8822
|
const i = Tr(t);
|
|
8818
8823
|
e.useStsPlugin(i), this.tracker = e, this.msgCacheArr.forEach((s, n) => {
|
|
8819
8824
|
var o, c;
|
|
8820
|
-
(c = this.tracker) == null || c.send(J(
|
|
8825
|
+
(c = this.tracker) == null || c.send(J(bt(J({}, this.param), { stat_log_id: `${((o = this.param) == null ? void 0 : o.sesid) || "nosession"}-${n}` }), s));
|
|
8821
8826
|
}), this.index = this.index + this.msgCacheArr.length, this.msgCacheArr = [];
|
|
8822
8827
|
}
|
|
8823
8828
|
}
|
|
@@ -8835,7 +8840,7 @@ class qa {
|
|
|
8835
8840
|
let e;
|
|
8836
8841
|
a.tm = Date.now();
|
|
8837
8842
|
try {
|
|
8838
|
-
e = JSON.parse(JSON.stringify(J(
|
|
8843
|
+
e = JSON.parse(JSON.stringify(J(bt(J({ bt: dr.browserName || "unknown", ntptm: this.ntpClock.now(), ntpofs: this.ntpClock.now() - Date.now() }, this.param), { stat_log_id: `${((t = this.param) == null ? void 0 : t.sesid) || "nosession"}-${this.index}` }), a)));
|
|
8839
8844
|
} catch (s) {
|
|
8840
8845
|
}
|
|
8841
8846
|
e && (this.tracker ? ((i = this.tracker) == null || i.send(e), this.index++) : this.msgCacheArr.push(e));
|
|
@@ -8866,7 +8871,7 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
8866
8871
|
var t, i, s;
|
|
8867
8872
|
let e = ((t = r._last) == null ? void 0 : t[a]) || 0;
|
|
8868
8873
|
return r.ssrc && ((i = r._last) != null && i.ssrc) && r.ssrc !== ((s = r._last) == null ? void 0 : s.ssrc) && (e = 0), ((r == null ? void 0 : r[a]) || 0) - e;
|
|
8869
|
-
}, Ya = (r, a) => Ae(_e(r, a), 1e3, 1e4), Ut = (r, a = 2e7) => Ae(r, 1, a),
|
|
8874
|
+
}, Ya = (r, a) => Ae(_e(r, a), 1e3, 1e4), Ut = (r, a = 2e7) => Ae(r, 1, a), di = class di {
|
|
8870
8875
|
constructor(a) {
|
|
8871
8876
|
g(this, "engine");
|
|
8872
8877
|
g(this, "logClient");
|
|
@@ -8879,7 +8884,7 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
8879
8884
|
return this.staticClient || (this.staticClient = new qa()), this.staticClient;
|
|
8880
8885
|
}
|
|
8881
8886
|
static reportOSSUpload(a, e, t = 0) {
|
|
8882
|
-
|
|
8887
|
+
di.getLogClient().sendReport({ errmsg: `${e}/${a}.log`, errtype: t, evetid: 70017, sesid: a, sessionId: a, stat_log_id: `${a}-70017` });
|
|
8883
8888
|
}
|
|
8884
8889
|
setCustomFields(a) {
|
|
8885
8890
|
this.customFields = J(J({}, this.customFields), a);
|
|
@@ -8891,7 +8896,7 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
8891
8896
|
this.authInfo = a, this.logClient.start(a);
|
|
8892
8897
|
}
|
|
8893
8898
|
updateToken(a, e) {
|
|
8894
|
-
this.logClient.updateToken(a, e),
|
|
8899
|
+
this.logClient.updateToken(a, e), di.getLogClient().updateToken(a, e);
|
|
8895
8900
|
}
|
|
8896
8901
|
stop() {
|
|
8897
8902
|
this.logClient.stop();
|
|
@@ -8966,8 +8971,8 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
8966
8971
|
f.push(Je);
|
|
8967
8972
|
} else
|
|
8968
8973
|
f.push(0);
|
|
8969
|
-
const
|
|
8970
|
-
_.push(Ot(
|
|
8974
|
+
const Ie = _e($, "fecPacketsReceived");
|
|
8975
|
+
_.push(Ot(Ie, te));
|
|
8971
8976
|
const ie = _e($, "retransmittedPacketsReceived"), je = te + ke - ie;
|
|
8972
8977
|
if (m.push(Ot(te - ie, je)), S.push(Ot(ke, je)), p.push(Ot(ie, je)), R.push(je), me.push(0), ye.push(""), n) {
|
|
8973
8978
|
v.push(Xa($.audioLevel));
|
|
@@ -9038,7 +9043,7 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
9038
9043
|
}
|
|
9039
9044
|
reportPublishFirstPacket(a, e, t, i, s, n, o, c, h) {
|
|
9040
9045
|
const d = Date.now();
|
|
9041
|
-
this.log({ evetid: a ? 10033 : 10031, calid: e, args: this.data2String({ calid: e, fpst: d - t, tckid: n, est: t, pctid: o, pubtid: c, totaltm: d - s, jorm: h ===
|
|
9046
|
+
this.log({ evetid: a ? 10033 : 10031, calid: e, args: this.data2String({ calid: e, fpst: d - t, tckid: n, est: t, pctid: o, pubtid: c, totaltm: d - s, jorm: h === St.JOIN_CHANNEL ? 1 : 0, cptc: 0, sptc: i - t, iptc: 0, ipc2fptc: 0, dctc: 0, patc: 0 }) });
|
|
9042
9047
|
}
|
|
9043
9048
|
reportUnpublish(a, e, t, i) {
|
|
9044
9049
|
var s;
|
|
@@ -9137,8 +9142,8 @@ const Ae = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
9137
9142
|
return e;
|
|
9138
9143
|
}
|
|
9139
9144
|
};
|
|
9140
|
-
g(
|
|
9141
|
-
let wr =
|
|
9145
|
+
g(di, "staticClient");
|
|
9146
|
+
let wr = di;
|
|
9142
9147
|
var Fc = Object.defineProperty, jc = Object.getOwnPropertyDescriptor, j = (r, a, e, t) => {
|
|
9143
9148
|
for (var i, s = t > 1 ? void 0 : t ? jc(a, e) : a, n = r.length - 1; n >= 0; n--)
|
|
9144
9149
|
(i = r[n]) && (s = (t ? i(a, e, s) : i(s)) || s);
|
|
@@ -9208,11 +9213,11 @@ const F = (W = class extends He {
|
|
|
9208
9213
|
(e = this.publisher) == null || e.on(Ze.Local, (b) => {
|
|
9209
9214
|
V.event("[Publisher] Device Status Change", b), this.onLocalDeviceStatusChange(b);
|
|
9210
9215
|
}), (t = this.publisher) == null || t.on($t.VideoTrackEnded, () => {
|
|
9211
|
-
V.event("[Publisher] VideoTrack Ended"), this.emit("localDeviceException",
|
|
9216
|
+
V.event("[Publisher] VideoTrack Ended"), this.emit("localDeviceException", At.AliEngineLocalDeviceTypeCamera, xe.AliEngineLocalDeviceExceptionTypeCameraInterrupt, "");
|
|
9212
9217
|
}), (i = this.publisher) == null || i.on($t.ScreenTrackEnded, () => {
|
|
9213
|
-
V.event("[Publisher] ScreenTrack Ended"), this.emit("localDeviceException",
|
|
9218
|
+
V.event("[Publisher] ScreenTrack Ended"), this.emit("localDeviceException", At.AliEngineLocalDeviceTypeDisplay, xe.AliEngineLocalDeviceExceptionTypeDisplayException, "");
|
|
9214
9219
|
}), (s = this.publisher) == null || s.on($t.AudioTrackEnded, () => {
|
|
9215
|
-
V.event("[Publisher] AudioTrack Ended"), this.emit("localDeviceException",
|
|
9220
|
+
V.event("[Publisher] AudioTrack Ended"), this.emit("localDeviceException", At.AliEngineLocalDeviceTypeMic, xe.AliEngineLocalDeviceExceptionTypeMicInterrupt, "");
|
|
9216
9221
|
}), (n = this.publisher) == null || n.on("localDeviceException", (b, u, f = "") => {
|
|
9217
9222
|
this.emit("localDeviceException", b, u, f);
|
|
9218
9223
|
}), (o = this.publisher) == null || o.on("audioPublishStateChanged", (b, u, f) => {
|
|
@@ -9238,7 +9243,7 @@ const F = (W = class extends He {
|
|
|
9238
9243
|
addBizControlListeners() {
|
|
9239
9244
|
this.bizControl.rtsManager.on("connected", (e) => {
|
|
9240
9245
|
var t;
|
|
9241
|
-
e && ((t = this.publisher) == null || t.publishUpdate(
|
|
9246
|
+
e && ((t = this.publisher) == null || t.publishUpdate(St.RECONNECT), this.remoteUsers.forEach((i) => {
|
|
9242
9247
|
i.updateSubscribe(fe.Reconnect);
|
|
9243
9248
|
}));
|
|
9244
9249
|
}), this.bizControl.rtsManager.on("disconnected", () => I(this, null, function* () {
|
|
@@ -9314,15 +9319,15 @@ const F = (W = class extends He {
|
|
|
9314
9319
|
yield this.bizControl.removeLeftUser(t), this.emit("remoteUserOffLineNotify", t.userid, t.leavecode);
|
|
9315
9320
|
}));
|
|
9316
9321
|
}), this.signalingManager.on("onBye", (e, t) => {
|
|
9317
|
-
V.event("[Signaling] Bye ", e, t), this.slsReporter.reportError({ message: `reason: ${e}, description: ${t}` }), this.emit("bye", e), this.leaveChannel(), this.slsReporter.reportBye(e);
|
|
9322
|
+
V.event("[Signaling] Bye ", e, t), this.slsReporter.reportError({ message: `reason: ${e}, description: ${t}` }), this.emit("bye", e), this.signalingManager.reset(), this.leaveChannel(), this.slsReporter.reportBye(e);
|
|
9318
9323
|
}), this.signalingManager.on("onConnectFail", (e) => {
|
|
9319
|
-
V.event("[Signaling] Connect Failed ", e), this.onError(e), this.backToUnpublishStatus(), this.connectState = ne.AliRtcConnectionStatusFailed, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusFailed,
|
|
9324
|
+
V.event("[Signaling] Connect Failed ", e), this.onError(e), this.backToUnpublishStatus(), this.connectState = ne.AliRtcConnectionStatusFailed, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusFailed, yt.AliRtcConnectionChangedNetworkInterrupted);
|
|
9320
9325
|
}), this.signalingManager.on("onNetworkError", (e) => {
|
|
9321
9326
|
this.slsReporter.reportWarning("signaling network error"), V.event("[Signaling] Network error ", e), this.onNetworkError();
|
|
9322
9327
|
}), this.signalingManager.on("onAuthInvalid", () => {
|
|
9323
9328
|
V.event("[Signaling] Auth Invalid");
|
|
9324
9329
|
}), this.signalingManager.on("onReconnectStart", () => {
|
|
9325
|
-
V.event("[Signaling] Reconnect Start "), this.connectState = ne.AliRtcConnectionStatusReconnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusReconnecting,
|
|
9330
|
+
V.event("[Signaling] Reconnect Start "), this.connectState = ne.AliRtcConnectionStatusReconnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusReconnecting, yt.AliRtcConnectionSignalingConnecting);
|
|
9326
9331
|
}), this.signalingManager.on("onReconnectSuccess", (e) => {
|
|
9327
9332
|
V.event("[Signaling] Reconnect Success ", e), this.onNetworkRecovery(e);
|
|
9328
9333
|
}), this.signalingManager.on("onReconnectFail", (e) => {
|
|
@@ -9343,10 +9348,7 @@ const F = (W = class extends He {
|
|
|
9343
9348
|
handleUsersJoin(e) {
|
|
9344
9349
|
e.forEach((t) => {
|
|
9345
9350
|
const i = t.userid;
|
|
9346
|
-
|
|
9347
|
-
const s = this.bizControl.addUser(i, t.displayname, fe.Join);
|
|
9348
|
-
V.event(`[${W.logName}]`, we.UserJoined, s);
|
|
9349
|
-
}
|
|
9351
|
+
i && (this.bizControl.addUser(i, t.displayname, fe.Join), V.event(`[${W.logName}]`, we.UserJoined, i));
|
|
9350
9352
|
});
|
|
9351
9353
|
}
|
|
9352
9354
|
onLocalDeviceStatusChange(e) {
|
|
@@ -9388,7 +9390,7 @@ const F = (W = class extends He {
|
|
|
9388
9390
|
onNetworkRecovery(e) {
|
|
9389
9391
|
return I(this, null, function* () {
|
|
9390
9392
|
var t;
|
|
9391
|
-
V.event(W.logName, "onNetworkRecovery", `rts isConnected: ${this.bizControl.rtsManager.isConnected}; rts isConnecting: ${this.bizControl.rtsManager.isConnecting}`, { users: e }), this.bizControl.rtsManager.isConnected || this.bizControl.rtsManager.isConnecting ? e && (yield this.resumeSubList(e)) : (this.currentRoleCanPublish && (yield this.resumePublishForNetworkRecovery()), yield this.resumeSubList()), this.networkError && (this.networkError = !1, (t = this.publisher) == null || t.reportSelfDeviceStatus(), this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected,
|
|
9393
|
+
V.event(W.logName, "onNetworkRecovery", `rts isConnected: ${this.bizControl.rtsManager.isConnected}; rts isConnecting: ${this.bizControl.rtsManager.isConnecting}`, { users: e }), this.bizControl.rtsManager.isConnected || this.bizControl.rtsManager.isConnecting ? e && (yield this.resumeSubList(e)) : (this.currentRoleCanPublish && (yield this.resumePublishForNetworkRecovery()), yield this.resumeSubList()), this.networkError && (this.networkError = !1, (t = this.publisher) == null || t.reportSelfDeviceStatus(), this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected, yt.AliRtcConnectionSignalingHeartbeatAlive));
|
|
9392
9394
|
});
|
|
9393
9395
|
}
|
|
9394
9396
|
resumeSubList(e) {
|
|
@@ -9421,7 +9423,7 @@ const F = (W = class extends He {
|
|
|
9421
9423
|
});
|
|
9422
9424
|
}
|
|
9423
9425
|
onNetworkError() {
|
|
9424
|
-
this.connectState === ne.AliRtcConnectionStatusConnected && (this.networkError || (this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected,
|
|
9426
|
+
this.connectState === ne.AliRtcConnectionStatusConnected && (this.networkError || (this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected, yt.AliRtcConnectionChangedNetworkInterrupted)), this.networkError = !0);
|
|
9425
9427
|
}
|
|
9426
9428
|
onError(e) {
|
|
9427
9429
|
this.slsReporter.reportError(e), V.event(W.logName, we.Error, e);
|
|
@@ -9486,7 +9488,7 @@ const F = (W = class extends He {
|
|
|
9486
9488
|
throw new O(B.ERR_INVALID_ARGUMENTS, `set client role error, role value(${e}) is invalid`);
|
|
9487
9489
|
if (this.clientRole === e)
|
|
9488
9490
|
return;
|
|
9489
|
-
this.slsReporter.reportRoleUpdate(this.clientRole, e), this.isInCall() ? this.clientRole === Bt.AliRtcSdkInteractive ? ((t = this.publisher) != null && t.isPublishing ? yield (i = this.publisher) == null ? void 0 : i.unPublish() : yield (s = this.publisher) == null ? void 0 : s.clearStream(), yield this.signalingManager.setClientRole(e)) : (yield this.signalingManager.setClientRole(e), yield this.startDefaultDevices(), yield this.startPublish(
|
|
9491
|
+
this.slsReporter.reportRoleUpdate(this.clientRole, e), this.isInCall() ? this.clientRole === Bt.AliRtcSdkInteractive ? ((t = this.publisher) != null && t.isPublishing ? yield (i = this.publisher) == null ? void 0 : i.unPublish() : yield (s = this.publisher) == null ? void 0 : s.clearStream(), yield this.signalingManager.setClientRole(e)) : (yield this.signalingManager.setClientRole(e), yield this.startDefaultDevices(), yield this.startPublish(St.ROLE_CHANGE)) : yield this.signalingManager.setClientRole(e), this.clientRole = e;
|
|
9490
9492
|
} catch (n) {
|
|
9491
9493
|
throw n.code === 403 && this.emit("authInfoExpired"), n;
|
|
9492
9494
|
}
|
|
@@ -9540,20 +9542,20 @@ const F = (W = class extends He {
|
|
|
9540
9542
|
{
|
|
9541
9543
|
if (n.sessionId = it.createCallid("web"), this.slsReporter.start(n), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.START, "", "", s), h)
|
|
9542
9544
|
throw this.connectState = ne.AliRtcConnectionStatusFailed, this.slsReporter.reportJoin(h.code, c, ""), this.slsReporter.reportJoinResult(h), h;
|
|
9543
|
-
this.connectState = ne.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnecting,
|
|
9545
|
+
this.connectState = ne.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnecting, yt.AliRtcConnectionSignalingConnecting), V.setSessionID(n.appId, n.sessionId);
|
|
9544
9546
|
const l = () => I(this, null, function* () {
|
|
9545
9547
|
var b;
|
|
9546
9548
|
try {
|
|
9547
9549
|
const u = Date.now(), f = yield this.signalingManager.join(n, o, this.maxSignalingConnectRetryCount, c, i);
|
|
9548
9550
|
f.l1ip && this.publisher && (this.publisher.preferredPubL1Ip = f.l1ip);
|
|
9549
9551
|
const p = Date.now();
|
|
9550
|
-
this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected,
|
|
9552
|
+
this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected, yt.AliRtcConnectionSignalingJoinRoomSuccess), this.bizControl.init(n, f, { capabilityProfile: typeof t == "object" ? t.capabilityProfile : Vr.Default }), this.setCheckAuthInfoTimer(n.timestamp, f.timestamp), this.liveTranscoding.setAuthInfo(n), this.slsReporter.reportJoin(0, c, f.tid), this.slsReporter.reportJoinResult(null), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.SEND_SIG, "", "", u), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.RECV_RST, "", "", p), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.END, "", "");
|
|
9551
9553
|
} catch (u) {
|
|
9552
9554
|
const f = (b = u.code) != null ? b : -1, p = u.reason || u.message || "";
|
|
9553
|
-
throw this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected,
|
|
9555
|
+
throw this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected, yt.AliRtcConnectionSignalingJoinRoomFailure), this.slsReporter.reportJoin(f, c, ""), this.slsReporter.reportJoinResult(u), new O(f, p);
|
|
9554
9556
|
}
|
|
9555
9557
|
});
|
|
9556
|
-
this.currentRoleCanPublish ? (yield Promise.all([l(), this.startDefaultDevices()]), yield this.startPublish(
|
|
9558
|
+
this.currentRoleCanPublish ? (yield Promise.all([l(), this.startDefaultDevices()]), yield this.startPublish(St.JOIN_CHANNEL)) : yield l(), (d = this.publisher) == null || d.reportSelfDeviceStatus(), this.remoteUsers.forEach((b) => {
|
|
9557
9559
|
b.updateSubscribe(fe.Join);
|
|
9558
9560
|
});
|
|
9559
9561
|
}
|
|
@@ -10011,7 +10013,7 @@ const F = (W = class extends He {
|
|
|
10011
10013
|
return (yield Se.getMicList()).filter((e) => e.deviceId);
|
|
10012
10014
|
})), g(W, "getSpeakerList", () => I(W, null, function* () {
|
|
10013
10015
|
return (yield Se.getSpeakerList()).filter((e) => e.deviceId);
|
|
10014
|
-
})), g(W, "_instance"), g(W, "AliRtcSdkChannelProfile", Ct), g(W, "AliRtcSdkClientRole", Bt), g(W, "AliRtcVideoStreamType", Ke), g(W, "AliRtcVideoTrack", oe), g(W, "AliRtcAudioTrack",
|
|
10016
|
+
})), g(W, "_instance"), g(W, "AliRtcSdkChannelProfile", Ct), g(W, "AliRtcSdkClientRole", Bt), g(W, "AliRtcVideoStreamType", Ke), g(W, "AliRtcVideoTrack", oe), g(W, "AliRtcAudioTrack", ei), g(W, "AliRtcPublishState", Q), g(W, "AliRtcSubscribeState", pe), g(W, "AliRtcRawDataStreamType", Le), g(W, "AliRtcLogLevel", sn), g(W, "AliRtcEngineLocalDeviceType", At), g(W, "AliRtcEngineLocalDeviceExceptionType", xe), g(W, "AliRtcConnectionStatus", ne), g(W, "AliRtcConnectionStatusChangeReason", yt), g(W, "AliRtcPlugin", Jt), g(W, "AliRtcPluginTrackType", gi), g(W, "AliRtcLiveTranscodingParam", mr), g(W, "AliRtcLiveTranscodingEncodeParam", dn), g(W, "AliRtcLiveTranscodingMixParam", Vc), g(W, "AliRtcLiveTranscodingSingleParam", Oc), g(W, "AliRtcTranscodingClockWidget", Uc), g(W, "AliRtcTranscodingImage", yn), g(W, "AliRtcTranscodingText", Bc), g(W, "AliRtcTranscodingUser", Hc), g(W, "AliRtcLiveTranscodingMixMode", Pi), g(W, "AliRtcLiveTranscodingStreamType", an), g(W, "AliRtcLiveTranscodingSourceType", ui), g(W, "AliRtcLiveTranscodingTaskProfile", nn), g(W, "AliRtcLiveTranscodingAudioSampleRate", Pr), g(W, "AliRtcLiveTranscodingSegmentType", Di), g(W, "AliRtcLiveTranscodingFontType", xi), g(W, "AliRtcLiveTranscodingCropMode", on), g(W, "AliRtcLiveTranscodingMediaProcessMode", Dr), g(W, "AliRtcLiveTranscodingState", cn), g(W, "AliRtcLiveTranscodingErrorCode", Rt), g(W, "AliRtcTrascodingPublishTaskStatus", hn), g(W, "AliRtcDataChannelMsg", Kt), g(W, "AliRtcDataMsgType", fn), g(W, "Plugin", Jt), W);
|
|
10015
10017
|
j([T()], F.prototype, "destroy", 1), j([T()], F.prototype, "backToUnpublishStatus", 1), j([T()], F.prototype, "resumePublishForNetworkRecovery", 1), j([T()], F.prototype, "onNetworkRecovery", 1), j([T()], F.prototype, "resumeSubList", 1), j([T(U)], F.prototype, "retrySubscribe", 1), j([T(U)], F.prototype, "setEnableDualVideoStream", 1), j([T(U)], F.prototype, "setChannelProfile", 1), j([T(U)], F.prototype, "setClientRole", 1), j([T(U)], F.prototype, "setAudioOnlyMode", 1), j([T()], F.prototype, "clearCheckAuthInfoTimer", 1), j([T(U)], F.prototype, "joinChannel", 1), j([T(U)], F.prototype, "joinAIChannel", 1), j([T(U)], F.prototype, "leaveChannel", 1), j([T(U)], F.prototype, "refreshAuthInfo", 1), j([T(U)], F.prototype, "publishLocalAudioStream", 1), j([T(U)], F.prototype, "setDefaultSubscribeAllRemoteAudioStreams", 1), j([T(U)], F.prototype, "subscribeAllRemoteAudioStreams", 1), j([T(U)], F.prototype, "subscribeRemoteAudioStream", 1), j([T(U)], F.prototype, "resumeRemoteAudioStream", 1), j([T(U)], F.prototype, "stopRemoteAudioPlay", 1), j([T(U)], F.prototype, "publishLocalVideoStream", 1), j([T(U)], F.prototype, "setRemoteDefaultVideoStreamType", 1), j([T(U)], F.prototype, "setRemoteUserVideoStreamType", 1), j([T(U)], F.prototype, "setDefaultSubscribeAllRemoteVideoStreams", 1), j([T(U)], F.prototype, "subscribeAllRemoteVideoStreams", 1), j([T(U)], F.prototype, "subscribeRemoteMediaStream", 1), j([T(U)], F.prototype, "resumeRemoteMediaStream", 1), j([T(([r]) => [`${r == null ? void 0 : r.audio}`])], F.prototype, "startScreenShare", 1), j([T()], F.prototype, "stopScreenShare", 1), j([T(U)], F.prototype, "setScreenShareConfiguration", 1), j([T(U)], F.prototype, "setScreenShareContentHint", 1), j([T()], F.prototype, "publishLocalScreenShareStream", 1), j([T(U)], F.prototype, "setAudioShareVolume", 1), j([T(U)], F.prototype, "enableAudioVolumeIndication", 1), j([T(U)], F.prototype, "muteLocalMic", 1), j([T(U)], F.prototype, "muteRemoteAudioPlaying", 1), j([T(U)], F.prototype, "muteAllRemoteAudioPlaying", 1), j([T(U)], F.prototype, "startAudioCapture", 1), j([T(U)], F.prototype, "setAudioConstraints", 1), j([T()], F.prototype, "stopAudioCapture", 1), j([T(U)], F.prototype, "switchMicrophone", 1), j([T(U)], F.prototype, "setRecordingVolume", 1), j([T(U)], F.prototype, "setPlayoutVolume", 1), j([T(U)], F.prototype, "setRemoteAudioVolume", 1), j([T(U)], F.prototype, "setAudioProfile", 1), j([T(U)], F.prototype, "getAudioTrack", 1), j([T(U)], F.prototype, "setLocalViewConfig", 1), j([T(U)], F.prototype, "setCameraCapturerConfiguration", 1), j([T(U)], F.prototype, "setCameraCapturerContentHint", 1), j([T(U)], F.prototype, "enableLocalVideo", 1), j([T(U)], F.prototype, "muteLocalCamera", 1), j([T(U)], F.prototype, "muteLocalScreen", 1), j([T(U)], F.prototype, "setRemoteViewConfig", 1), j([T(U)], F.prototype, "switchCamera", 1), j([T()], F.prototype, "startPreview", 1), j([T()], F.prototype, "startPreviewScreen", 1), j([T()], F.prototype, "stopPreview", 1), j([T()], F.prototype, "stopPreviewScreen", 1), j([T()], F.prototype, "startPublishLiveStream", 1), j([T()], F.prototype, "updatePublishLiveStream", 1), j([T()], F.prototype, "updatePublishLiveStreamWithTaskId", 1), j([T()], F.prototype, "stopPublishLiveStream", 1), j([T()], F.prototype, "stopPublishLiveStreamWithTaskId", 1), j([T(U)], F.prototype, "setEnableMediaExtensionMsg", 1), j([T(([r, a, e]) => [r.byteLength, a, e])], F.prototype, "sendMediaExtensionMsgEx", 1), j([T(([r, a]) => [r.name || "", a])], F.prototype, "enablePlugin", 1), j([T(U)], F.prototype, "removePlugin", 1), j([T(U)], F.prototype, "setPluginOption", 1), j([T(U)], F.prototype, "getPluginByName", 1), j([T(U)], F.prototype, "getPluginOption", 1), j([T(U)], F.prototype, "setBeautyEffect", 1), j([T(U)], F.prototype, "enableBackgroundExchange", 1), j([T(U)], F.prototype, "enableBackgroundBlur", 1), j([T(U)], F.prototype, "setParameter", 1), j([T(([r]) => {
|
|
10016
10018
|
var a;
|
|
10017
10019
|
return [(a = r.data) == null ? void 0 : a.byteLength];
|
|
@@ -10024,16 +10026,16 @@ const $c = _n.wrap(An);
|
|
|
10024
10026
|
export {
|
|
10025
10027
|
Vr as AliRtcCapabilityProfile,
|
|
10026
10028
|
ne as AliRtcConnectionStatus,
|
|
10027
|
-
|
|
10029
|
+
yt as AliRtcConnectionStatusChangeReason,
|
|
10028
10030
|
Kt as AliRtcDataChannelMsg,
|
|
10029
10031
|
fn as AliRtcDataMsgType,
|
|
10030
10032
|
xe as AliRtcEngineLocalDeviceExceptionType,
|
|
10031
|
-
|
|
10033
|
+
At as AliRtcEngineLocalDeviceType,
|
|
10032
10034
|
B as AliRtcErrorCode,
|
|
10033
10035
|
Pr as AliRtcLiveTranscodingAudioSampleRate,
|
|
10034
10036
|
on as AliRtcLiveTranscodingCropMode,
|
|
10035
10037
|
dn as AliRtcLiveTranscodingEncodeParam,
|
|
10036
|
-
|
|
10038
|
+
Rt as AliRtcLiveTranscodingErrorCode,
|
|
10037
10039
|
xi as AliRtcLiveTranscodingFontType,
|
|
10038
10040
|
Dr as AliRtcLiveTranscodingMediaProcessMode,
|
|
10039
10041
|
Pi as AliRtcLiveTranscodingMixMode,
|