aliyun-rtc-sdk 7.1.3 → 7.1.4
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 +356 -376
- package/dist/aliyun-rtc-sdk.umd.js +11 -11
- package/dist/plugins/audioProcessPlugin.d.ts +8 -8
- package/dist/plugins/audioProcessPlugin.js +1 -1
- package/dist/plugins/beautyPlugin.d.ts +4 -3
- package/dist/plugins/beautyPlugin.js +1 -1
- package/dist/types/index.d.ts +8 -8
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Mn = Object.defineProperty, Ln = Object.defineProperties;
|
|
2
2
|
var Nn = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var vi = Object.getOwnPropertySymbols, xn = Object.getPrototypeOf, Kr = Object.prototype.hasOwnProperty, $r = Object.prototype.propertyIsEnumerable,
|
|
3
|
+
var vi = Object.getOwnPropertySymbols, xn = Object.getPrototypeOf, Kr = Object.prototype.hasOwnProperty, $r = Object.prototype.propertyIsEnumerable, On = Reflect.get;
|
|
4
4
|
var Ui = (r, a, e) => a in r ? Mn(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e, $ = (r, a) => {
|
|
5
5
|
for (var e in a || (a = {}))
|
|
6
6
|
Kr.call(a, e) && Ui(r, e, a[e]);
|
|
@@ -19,7 +19,7 @@ var Et = (r, a) => {
|
|
|
19
19
|
return e;
|
|
20
20
|
};
|
|
21
21
|
var g = (r, a, e) => (Ui(r, typeof a != "symbol" ? a + "" : a, e), e);
|
|
22
|
-
var Bi = (r, a, e) =>
|
|
22
|
+
var Bi = (r, a, e) => On(xn(r), e, a);
|
|
23
23
|
var I = (r, a, e) => new Promise((t, i) => {
|
|
24
24
|
var s = (c) => {
|
|
25
25
|
try {
|
|
@@ -38,8 +38,8 @@ var I = (r, a, e) => new Promise((t, i) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { AliRTS as Se, EConnectStatus as Jr, EDatachannelStatus as Gr } from "aliyun-rts-sdk";
|
|
40
40
|
import He from "eventemitter3";
|
|
41
|
-
var qr, Xr,
|
|
42
|
-
i in t ?
|
|
41
|
+
var qr, Xr, Vn = Object.defineProperty, Vt = (r, a, e) => (((t, i, s) => {
|
|
42
|
+
i in t ? Vn(t, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[i] = s;
|
|
43
43
|
})(r, typeof a != "symbol" ? a + "" : a, e), e), Hi = { exports: {} }, Fi = { exports: {} };
|
|
44
44
|
function Ye() {
|
|
45
45
|
if (Xr)
|
|
@@ -1557,7 +1557,7 @@ let Kn = 1;
|
|
|
1557
1557
|
class Er {
|
|
1558
1558
|
constructor(a) {
|
|
1559
1559
|
var e, t;
|
|
1560
|
-
|
|
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 = ut($({}, 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";
|
|
@@ -1643,8 +1643,8 @@ function dt(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
|
|
1647
|
-
const Ni = "7.1.
|
|
1646
|
+
var Ee = ((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))(Ee || {}), Qe = ((r) => (r.Local = "local-device-status-change", r.Remote = "remote-device-status-change", r))(Qe || {}), 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 || {}), It = ((r) => (r.Add = "add", r.Delete = "delete", r.Replace = "replace", r.Stop = "stop", r.UnPublish = "unpublish", r))(It || {}), ui = ((r) => (r[r.Camera = 0] = "Camera", r[r.Screen = 1] = "Screen", r[r.Image = 2] = "Image", r))(ui || {}), 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 || {}), bt = ((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))(bt || {}), Ci = ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(Ci || {});
|
|
1647
|
+
const Ni = "7.1.4";
|
|
1648
1648
|
class it {
|
|
1649
1649
|
static getVersionNumber() {
|
|
1650
1650
|
let a = Ni.split("."), e = "";
|
|
@@ -2045,9 +2045,9 @@ function eo() {
|
|
|
2045
2045
|
}(), r.lib.WordArray;
|
|
2046
2046
|
}(he())), Ns.exports;
|
|
2047
2047
|
}
|
|
2048
|
-
var xs,
|
|
2048
|
+
var xs, Os = { exports: {} };
|
|
2049
2049
|
function to() {
|
|
2050
|
-
return xs || (xs = 1,
|
|
2050
|
+
return xs || (xs = 1, Os.exports = function(r) {
|
|
2051
2051
|
return function() {
|
|
2052
2052
|
var a = r, e = a.lib.WordArray, t = a.enc;
|
|
2053
2053
|
function i(s) {
|
|
@@ -2075,11 +2075,11 @@ function to() {
|
|
|
2075
2075
|
return e.create(o, 2 * n);
|
|
2076
2076
|
} };
|
|
2077
2077
|
}(), r.enc.Utf16;
|
|
2078
|
-
}(he())),
|
|
2078
|
+
}(he())), Os.exports;
|
|
2079
2079
|
}
|
|
2080
|
-
var
|
|
2080
|
+
var Vs, Us = { exports: {} };
|
|
2081
2081
|
function Ft() {
|
|
2082
|
-
return
|
|
2082
|
+
return Vs || (Vs = 1, Us.exports = function(r) {
|
|
2083
2083
|
return function() {
|
|
2084
2084
|
var a = r, e = a.lib.WordArray;
|
|
2085
2085
|
function t(i, s, n) {
|
|
@@ -2304,11 +2304,11 @@ function Xs() {
|
|
|
2304
2304
|
if (Q < 16)
|
|
2305
2305
|
Ie = ie.high = 0 | d[b + 2 * Q], ue = ie.low = 0 | d[b + 2 * Q + 1];
|
|
2306
2306
|
else {
|
|
2307
|
-
var je = h[Q - 15], q = je.high,
|
|
2308
|
-
Ie = (Ie = (Ie = Je + Si + ((ue =
|
|
2307
|
+
var je = h[Q - 15], q = je.high, we = je.low, Je = (q >>> 1 | we << 31) ^ (q >>> 8 | we << 24) ^ q >>> 7, Ve = (we >>> 1 | q << 31) ^ (we >>> 8 | q << 24) ^ (we >>> 7 | q << 25), Gt = h[Q - 2], Ge = Gt.high, mt = Gt.low, qt = (Ge >>> 19 | mt << 13) ^ (Ge << 3 | mt >>> 29) ^ Ge >>> 6, nt = (mt >>> 19 | Ge << 13) ^ (mt << 3 | Ge >>> 29) ^ (mt >>> 6 | Ge << 26), wt = h[Q - 7], Si = wt.high, bi = wt.low, Ur = h[Q - 16], wn = Ur.high, Br = Ur.low;
|
|
2308
|
+
Ie = (Ie = (Ie = Je + Si + ((ue = Ve + bi) >>> 0 < Ve >>> 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
|
|
2311
|
-
se = Ae, re = ke, Ae = Fe, ke = te, Fe = de, te = ge, de = Pe + (ri = (ri = (ri = ri + En + ((
|
|
2310
|
+
var Ot, En = de & Fe ^ ~de & Ae, Hr = ge & te ^ ~ge & ke, In = L & me ^ L & J ^ me & J, Tn = ce & ye ^ ce & le ^ ye & le, Cn = (L >>> 28 | ce << 4) ^ (L << 30 | ce >>> 2) ^ (L << 25 | ce >>> 7), Fr = (ce >>> 28 | L << 4) ^ (ce << 30 | L >>> 2) ^ (ce << 25 | L >>> 7), kn = (de >>> 14 | ge << 18) ^ (de >>> 18 | ge << 14) ^ (de << 23 | ge >>> 9), Pn = (ge >>> 14 | de << 18) ^ (ge >>> 18 | de << 14) ^ (ge << 23 | de >>> 9), jr = c[Q], Dn = jr.high, zr = jr.low, ri = se + kn + ((Ot = re + Pn) >>> 0 < re >>> 0 ? 1 : 0), Wr = Fr + Tn;
|
|
2311
|
+
se = Ae, re = ke, Ae = Fe, ke = te, Fe = de, te = ge, de = Pe + (ri = (ri = (ri = ri + En + ((Ot += Hr) >>> 0 < Hr >>> 0 ? 1 : 0)) + Dn + ((Ot += zr) >>> 0 < zr >>> 0 ? 1 : 0)) + Ie + ((Ot += ue) >>> 0 < ue >>> 0 ? 1 : 0)) + ((ge = be + Ot | 0) >>> 0 < be >>> 0 ? 1 : 0) | 0, Pe = J, be = le, J = me, le = ye, me = L, ye = ce, L = ri + (Cn + In + (Wr >>> 0 < Fr >>> 0 ? 1 : 0)) + ((ce = Ot + Wr | 0) >>> 0 < Ot >>> 0 ? 1 : 0) | 0;
|
|
2312
2312
|
}
|
|
2313
2313
|
A = f.low = A + ce, f.high = w + L + (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 + le, m.high = x + J + (P >>> 0 < le >>> 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 + de + (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 + Ae + (M >>> 0 < ke >>> 0 ? 1 : 0), D = v.low = D + re, v.high = N + se + (D >>> 0 < re >>> 0 ? 1 : 0);
|
|
2314
2314
|
}, _doFinalize: function() {
|
|
@@ -3233,7 +3233,7 @@ var Da = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShort
|
|
|
3233
3233
|
}, Mo = function(r) {
|
|
3234
3234
|
return (String(r).match(Co) || [""]).pop().replace(ko, "").replace(/GMT\+0000/g, "UTC");
|
|
3235
3235
|
};
|
|
3236
|
-
const { BrowserUtil: Lo } = Se, No = "EdgeHTML", La = "Blink", xo = "Trident",
|
|
3236
|
+
const { BrowserUtil: Lo } = Se, No = "EdgeHTML", La = "Blink", xo = "Trident", Oo = "Gecko", Vo = "WebKit", yi = (r, a) => {
|
|
3237
3237
|
const e = a.match(r);
|
|
3238
3238
|
return e && e.length > 0 && e[1] || "";
|
|
3239
3239
|
}, Uo = [{ test: [/\sedg\//i, [/edg([ea]|ios)/i]], describe(r) {
|
|
@@ -3248,10 +3248,10 @@ const { BrowserUtil: Lo } = Se, No = "EdgeHTML", La = "Blink", xo = "Trident", V
|
|
|
3248
3248
|
const a = /gecko/i.test(r), e = /like gecko/i.test(r);
|
|
3249
3249
|
return a && !e;
|
|
3250
3250
|
}, describe(r) {
|
|
3251
|
-
const a = { name:
|
|
3251
|
+
const a = { name: Oo }, e = yi(/gecko\/(\d+(\.?_?\d+)+)/i, r);
|
|
3252
3252
|
return e && (a.version = e), a;
|
|
3253
3253
|
} }, { test: [/(apple)?webkit\/537\.36/i], describe: () => ({ name: La }) }, { test: [/(apple)?webkit/i], describe(r) {
|
|
3254
|
-
const a = { name:
|
|
3254
|
+
const a = { name: Vo }, e = yi(/webkit\/(\d+(\.?_?\d+)+)/i, r);
|
|
3255
3255
|
return e && (a.version = e), a;
|
|
3256
3256
|
} }], kr = (r, a) => r.find((e) => typeof e.test == "function" ? e.test(a) : Array.isArray(e.test) ? e.test.some((t) => typeof t == "string" ? a.indexOf(t) > -1 : t instanceof RegExp && t.test(a)) : void 0), Bo = () => {
|
|
3257
3257
|
try {
|
|
@@ -3287,7 +3287,7 @@ const { BrowserUtil: Lo } = Se, No = "EdgeHTML", La = "Blink", xo = "Trident", V
|
|
|
3287
3287
|
function ir() {
|
|
3288
3288
|
return Cr(/* @__PURE__ */ new Date(), "HH:MM:ss.l");
|
|
3289
3289
|
}
|
|
3290
|
-
function
|
|
3290
|
+
function Oa() {
|
|
3291
3291
|
return Cr(/* @__PURE__ */ new Date(), "isoDate");
|
|
3292
3292
|
}
|
|
3293
3293
|
var sn = ((r) => (r[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.API = 2] = "API", r[r.WARNING = 3] = "WARNING", r[r.ERROR = 4] = "ERROR", r[r.NONE = 5] = "NONE", r))(sn || {});
|
|
@@ -3309,7 +3309,7 @@ class Wo {
|
|
|
3309
3309
|
g(this, "sendLogBeforeUnload", (a) => I(this, null, function* () {
|
|
3310
3310
|
if (!this.slsPlugin)
|
|
3311
3311
|
return;
|
|
3312
|
-
this.logSequence += 1, a.unshift(this.getLogParams(710203, { log: `[${
|
|
3312
|
+
this.logSequence += 1, a.unshift(this.getLogParams(710203, { log: `[${Oa()} ${ir()}] [INF] beforeunload`, stat_log_seq: this.logSequence }));
|
|
3313
3313
|
const e = `https://${Ri.project}.${Ri.host}/logstores/${Ri.logstore}`, t = { __logs__: a.map((n) => this.slsPlugin.transString(n)) }, { data: i, header: s } = yield this.slsPlugin.process(e, JSON.stringify(t));
|
|
3314
3314
|
fetch(e, { keepalive: !0, method: "POST", headers: s, body: i });
|
|
3315
3315
|
}));
|
|
@@ -3425,11 +3425,11 @@ class Wo {
|
|
|
3425
3425
|
this.tracker.send(e);
|
|
3426
3426
|
}
|
|
3427
3427
|
addLog(a) {
|
|
3428
|
-
const e = ir(), t = `[${
|
|
3428
|
+
const e = ir(), t = `[${Oa()} ${e}] ${a}`;
|
|
3429
3429
|
this.sessionId && this.tracker ? this.sendLog(t) : (this.logCache.push(t), this.logCache.length >= 200 && this.logCache.shift());
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
|
-
class
|
|
3432
|
+
class O {
|
|
3433
3433
|
static getLogger() {
|
|
3434
3434
|
return this.logger || (this.logger = new Wo()), this.logger;
|
|
3435
3435
|
}
|
|
@@ -3470,7 +3470,7 @@ class V {
|
|
|
3470
3470
|
this.getLogger().e("[ERR]", ...a);
|
|
3471
3471
|
}
|
|
3472
3472
|
}
|
|
3473
|
-
g(
|
|
3473
|
+
g(O, "logger");
|
|
3474
3474
|
const Ko = (r) => I(void 0, null, function* () {
|
|
3475
3475
|
const a = new Se.SupportUtil();
|
|
3476
3476
|
window.isSecureContext || console.warn("WebRTC 需要 HTTPS 安全上下文,细节可参考:https://developer.mozilla.org/zh-CN/docs/Web/Security/Secure_Contexts");
|
|
@@ -3490,9 +3490,9 @@ const Ko = (r) => I(void 0, null, function* () {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
return e.detail.isScreenShareSupported = a.checkWebRtcSupport() && a.checkScreenCapture() && !Se.SystenUtil.isAndroid && !Se.SystenUtil.isIos, e.detail.isSendMediaExtensionMsgSupported = a.checkWebRtcSupport() && a.checkEncodedTransformSupport(), e;
|
|
3492
3492
|
});
|
|
3493
|
-
var
|
|
3493
|
+
var xe = ((r) => (r[r.AliRtcSdkStreamTypeCapture = 0] = "AliRtcSdkStreamTypeCapture", r[r.AliRtcSdkStreamTypeScreen = 1] = "AliRtcSdkStreamTypeScreen", r))(xe || {}), $o = ((r) => (r[r.PRE_PROCESSOR = 0] = "PRE_PROCESSOR", r[r.POST_PROCESSOR = 1] = "POST_PROCESSOR", r))($o || {}), fi = ((r) => (r[r.AUDIO = 0] = "AUDIO", r[r.VIDEO = 1] = "VIDEO", r[r.BOTH = 2] = "BOTH", r))(fi || {});
|
|
3494
3494
|
class xt extends He {
|
|
3495
|
-
constructor(e, t =
|
|
3495
|
+
constructor(e, t = xe.AliRtcSdkStreamTypeCapture, i = 1) {
|
|
3496
3496
|
super();
|
|
3497
3497
|
g(this, "name");
|
|
3498
3498
|
g(this, "options");
|
|
@@ -3609,7 +3609,7 @@ class mr {
|
|
|
3609
3609
|
return n;
|
|
3610
3610
|
}
|
|
3611
3611
|
}
|
|
3612
|
-
var _t = ((r) => (r.pre = "pre", r.prod = "prod", r))(_t || {}), kt = ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(kt || {}), Ht = ((r) => (r.AliRtcSdkInteractive = "interactive", r.AliRtcSdkLive = "live", r))(Ht || {}), Rt = ((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))(Rt || {}),
|
|
3612
|
+
var _t = ((r) => (r.pre = "pre", r.prod = "prod", r))(_t || {}), kt = ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(kt || {}), Ht = ((r) => (r.AliRtcSdkInteractive = "interactive", r.AliRtcSdkLive = "live", r))(Ht || {}), Rt = ((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))(Rt || {}), Oe = ((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))(Oe || {}), 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 || {}), Lr = ((r) => (r[r.AliRtcUserOfflineQuit = 0] = "AliRtcUserOfflineQuit", r[r.AliRtcUserOfflineDropped = 1] = "AliRtcUserOfflineDropped", r[r.AliRtcUserOfflineBecomeAudience = 2] = "AliRtcUserOfflineBecomeAudience", r))(Lr || {}), ii = ((r) => (r[r.AliRtcAudioTrackNo = 0] = "AliRtcAudioTrackNo", r[r.AliRtcAudioTrackMic = 1] = "AliRtcAudioTrackMic", r[r.AliRtcAudioTrackDual = 2] = "AliRtcAudioTrackDual", r))(ii || {}), oe = ((r) => (r[r.AliRtcVideoTrackNo = 0] = "AliRtcVideoTrackNo", r[r.AliRtcVideoTrackCamera = 1] = "AliRtcVideoTrackCamera", r[r.AliRtcVideoTrackScreen = 2] = "AliRtcVideoTrackScreen", r[r.AliRtcVideoTrackBoth = 3] = "AliRtcVideoTrackBoth", r))(oe || {}), Z = ((r) => (r[r.AliRtcStatePublishIdle = 0] = "AliRtcStatePublishIdle", r[r.AliRtcStateNoPublish = 1] = "AliRtcStateNoPublish", r[r.AliRtcStatePublishing = 2] = "AliRtcStatePublishing", r[r.AliRtcStatePublished = 3] = "AliRtcStatePublished", r))(Z || {}), 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 || {}), mi = ((r) => (r[r.CAMERA_INVALID = -1] = "CAMERA_INVALID", r[r.CAMERA_REAR = 0] = "CAMERA_REAR", r[r.CAMERA_FRONT = 1] = "CAMERA_FRONT", r))(mi || {});
|
|
3613
3613
|
const ei = class ei extends He {
|
|
3614
3614
|
constructor(e) {
|
|
3615
3615
|
super();
|
|
@@ -3645,7 +3645,7 @@ const ei = class ei extends He {
|
|
|
3645
3645
|
this.reconnectTimeoutId && (clearTimeout(this.reconnectTimeoutId), this.reconnectTimeoutId = 0), this.emit("onReconnectStart"), this.isReconnecting = !0, this.initWebSocket();
|
|
3646
3646
|
}
|
|
3647
3647
|
onOpen(e) {
|
|
3648
|
-
|
|
3648
|
+
O.info(`[${ei.logName}]`, "onOpen"), this.socketStatus = 2, this.connectRetryCount = 0, this.networkAvailableChecked = !1, this.closedByInvoke = !1, this.gotErr = !1, this.isReconnecting = !1, this.emit("onOpen", e);
|
|
3649
3649
|
}
|
|
3650
3650
|
onMessage(e) {
|
|
3651
3651
|
this.emit("onMessage", e);
|
|
@@ -3660,7 +3660,7 @@ const ei = class ei extends He {
|
|
|
3660
3660
|
if (this.closedByInvoke)
|
|
3661
3661
|
this.socketStatus = 0;
|
|
3662
3662
|
else {
|
|
3663
|
-
if (
|
|
3663
|
+
if (O.info(`[${ei.logName}]`, `onClose, code: ${e.code}, reason: ${e.reason}, status: ${status}, retryCount: ${this.connectRetryCount}`), (yield it.isNetworkAvailable()) && !this.networkAvailableChecked)
|
|
3664
3664
|
return this.reconnect(), void (this.networkAvailableChecked = !0);
|
|
3665
3665
|
this.connectRetryCount || this.emit("onNetworkError"), !this.reconnectTimeoutId && (this.connectRetryCount += 1, this.connectRetryCount > this.maxConnectRetryCount ? this.emit("onConnectFail") : Date.now() - this.lastConnectStartTime >= 5e3 ? this.reconnect() : this.reconnectTimeoutId = window.setTimeout(() => {
|
|
3666
3666
|
this.reconnect();
|
|
@@ -3691,13 +3691,13 @@ rr = fr, sr = fr.exports, function(r, a) {
|
|
|
3691
3691
|
if (typeof se === s)
|
|
3692
3692
|
return se = se.replace(/^\s\s*/, ""), typeof re === t ? se : se.substring(0, 500);
|
|
3693
3693
|
}, be = function(se, re) {
|
|
3694
|
-
for (var Q, ue, Ie, ie, je, q,
|
|
3695
|
-
var Je = re[
|
|
3694
|
+
for (var Q, ue, Ie, ie, je, q, we = 0; we < re.length && !je; ) {
|
|
3695
|
+
var Je = re[we], Ve = re[we + 1];
|
|
3696
3696
|
for (Q = ue = 0; Q < Je.length && !je && Je[Q]; )
|
|
3697
3697
|
if (je = Je[Q++].exec(se))
|
|
3698
|
-
for (Ie = 0; Ie <
|
|
3699
|
-
q = je[++ue], typeof (ie =
|
|
3700
|
-
|
|
3698
|
+
for (Ie = 0; Ie < Ve.length; Ie++)
|
|
3699
|
+
q = je[++ue], typeof (ie = Ve[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;
|
|
3700
|
+
we += 2;
|
|
3701
3701
|
}
|
|
3702
3702
|
}, de = function(se, re) {
|
|
3703
3703
|
for (var Q in re)
|
|
@@ -3711,15 +3711,15 @@ rr = fr, sr = fr.exports, function(r, a) {
|
|
|
3711
3711
|
}, 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], [d, [c, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [d, [c, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [c, d], [/opios[\/ ]+([\w\.]+)/i], [d, [c, K + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [d, [c, K + " GX"]], [/\bopr\/([\w\.]+)/i], [d, [c, K]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [d, [c, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [d, [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, d], [/quark(?:pc)?\/([-\w\.]+)/i], [d, [c, "Quark"]], [/\bddg\/([\w\.]+)/i], [d, [c, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [d, [c, "UC" + A]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [d, [c, "WeChat"]], [/konqueror\/([\w\.]+)/i], [d, [c, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [d, [c, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [d, [c, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [d, [c, "Smart Lenovo " + A]], [/(avast|avg)\/([\w\.]+)/i], [[c, /(.+)/, "$1 Secure " + A], d], [/\bfocus\/([\w\.]+)/i], [d, [c, C + " Focus"]], [/\bopt\/([\w\.]+)/i], [d, [c, K + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [d, [c, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [d, [c, "Dolphin"]], [/coast\/([\w\.]+)/i], [d, [c, K + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [d, [c, "MIUI" + me]], [/fxios\/([\w\.-]+)/i], [d, [c, C]], [/\bqihoobrowser\/?([\w\.]*)/i], [d, [c, "360"]], [/\b(qq)\/([\w\.]+)/i], [[c, /(.+)/, "$1Browser"], d], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[c, /(.+)/, "$1" + me], d], [/samsungbrowser\/([\w\.]+)/i], [d, [c, H + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [d, [c, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[c, "Sogou Mobile"], d], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [c, d], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [c], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [d, c], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[c, D], d], [/(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, d], [/\bgsa\/([\w\.]+) .*safari\//i], [d, [c, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [d, [c, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [d, [c, E + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[c, E + " WebView"], d], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [d, [c, "Android " + A]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [c, d], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [d, [c, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [d, c], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [c, [d, de, { "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, d], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[c, "Netscape"], d], [/(wolvic|librewolf)\/([\w\.]+)/i], [c, d], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [d, [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, [d, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [c, [d, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[b, "amd64"]], [/(ia32(?=;))/i], [[b, le]], [/((?: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/, "", le]], [/(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, le]]], 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, [l, 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, [l, H], [h, f]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [o, [l, y], [h, f]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [o, [l, y], [h, p]], [/(macintosh);/i], [o, [l, y]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [o, [l, Y], [h, f]], [/(?:honor)([-\w ]+)[;\)]/i], [o, [l, "Honor"], [h, f]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [o, [l, P], [h, p]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [o, [l, 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, " "], [l, M], [h, f]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[o, /_/g, " "], [l, 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, [l, "OPPO"], [h, f]], [/\b(opd2\d{3}a?) bui/i], [o, [l, "OPPO"], [h, p]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [o, [l, "Vivo"], [h, f]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [o, [l, "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, [l, X], [h, f]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [o, [l, X], [h, p]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [o, [l, 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, [l, z], [h, f]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [o, [l, "Lenovo"], [h, p]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[o, /_/g, " "], [l, "Nokia"], [h, f]], [/(pixel c)\b/i], [o, [l, x], [h, p]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [o, [l, 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, [l, ee], [h, f]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[o, "Xperia Tablet"], [l, ee], [h, p]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [o, [l, "OnePlus"], [h, f]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [o, [l, _], [h, p]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[o, /(.+)/g, "Fire Phone $1"], [l, _], [h, f]], [/(playbook);[-\w\),; ]+(rim)/i], [o, l, [h, p]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [o, [l, w], [h, f]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [o, [l, v], [h, p]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [o, [l, v], [h, f]], [/(nexus 9)/i], [o, [l, "HTC"], [h, p]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [l, [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, [l, "TCL"], [h, p]], [/(itel) ((\w+))/i], [[l, le], o, [h, de, { tablet: ["p10001l", "w7001"], "*": "mobile" }]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [o, [l, "Acer"], [h, p]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [o, [l, "Meizu"], [h, f]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [o, [l, "Ulefone"], [h, f]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [o, [l, "Energizer"], [h, f]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [o, [l, "Cat"], [h, f]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [o, [l, "Smartfren"], [h, f]], [/droid.+; (a(?:015|06[35]|142p?))/i], [o, [l, "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], [l, 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], [l, o, [h, p]], [/(surface duo)/i], [o, [l, G], [h, p]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [o, [l, "Fairphone"], [h, f]], [/(u304aa)/i], [o, [l, "AT&T"], [h, f]], [/\bsie-(\w*)/i], [o, [l, "Siemens"], [h, f]], [/\b(rct\w+) b/i], [o, [l, "RCA"], [h, p]], [/\b(venue[\d ]{2,7}) b/i], [o, [l, "Dell"], [h, p]], [/\b(q(?:mv|ta)\w+) b/i], [o, [l, "Verizon"], [h, p]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [o, [l, "Barnes & Noble"], [h, p]], [/\b(tm\d{3}\w+) b/i], [o, [l, "NuVision"], [h, p]], [/\b(k88) b/i], [o, [l, "ZTE"], [h, p]], [/\b(nx\d{3}j) b/i], [o, [l, "ZTE"], [h, f]], [/\b(gen\d{3}) b.+49h/i], [o, [l, "Swiss"], [h, f]], [/\b(zur\d{3}) b/i], [o, [l, "Swiss"], [h, p]], [/\b((zeki)?tb.*\b) b/i], [o, [l, "Zeki"], [h, p]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[l, "Dragon Touch"], o, [h, p]], [/\b(ns-?\w{0,9}) b/i], [o, [l, "Insignia"], [h, p]], [/\b((nxa|next)-?\w{0,9}) b/i], [o, [l, "NextBook"], [h, p]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[l, "Voice"], o, [h, f]], [/\b(lvtel\-)?(v1[12]) b/i], [[l, "LvTel"], o, [h, f]], [/\b(ph-1) /i], [o, [l, "Essential"], [h, f]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [o, [l, "Envizen"], [h, p]], [/\b(trio[-\w\. ]+) b/i], [o, [l, "MachSpeed"], [h, p]], [/\btu_(1491) b/i], [o, [l, "Rotor"], [h, p]], [/(shield[\w ]+) b/i], [o, [l, "Nvidia"], [h, p]], [/(sprint) (\w+)/i], [l, o, [h, f]], [/(kin\.[onetw]{3})/i], [[o, /\./g, " "], [l, G], [h, f]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [o, [l, N], [h, p]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [o, [l, N], [h, f]], [/smart-tv.+(samsung)/i], [l, [h, m]], [/hbbtv.+maple;(\d+)/i], [[o, /^/, "SmartTV"], [l, H], [h, m]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[l, z], [h, m]], [/(apple) ?tv/i], [l, [o, y + " TV"], [h, m]], [/crkey/i], [[o, E + "cast"], [l, x], [h, m]], [/droid.+aft(\w+)( bui|\))/i], [o, [l, _], [h, m]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [o, [l, Y], [h, m]], [/(bravia[\w ]+)( bui|\))/i], [o, [l, ee], [h, m]], [/(mitv-\w{5}) bui/i], [o, [l, M], [h, m]], [/Hbbtv.*(technisat) (.*);/i], [l, o, [h, m]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[l, Pe], [o, Pe], [h, m]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[h, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [l, o, [h, u]], [/droid.+; (shield) bui/i], [o, [l, "Nvidia"], [h, u]], [/(playstation [345portablevi]+)/i], [o, [l, ee], [h, u]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [o, [l, G], [h, u]], [/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i], [o, [l, H], [h, S]], [/((pebble))app/i], [l, o, [h, S]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [o, [l, y], [h, S]], [/droid.+; (glass) \d/i], [o, [l, x], [h, S]], [/droid.+; (wt63?0{2,3})\)/i], [o, [l, N], [h, S]], [/droid.+; (glass) \d/i], [o, [l, x], [h, S]], [/(pico) (4|neo3(?: link|pro)?)/i], [l, o, [h, S]], [/; (quest( \d| pro)?)/i], [o, [l, D], [h, S]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [l, [h, R]], [/(aeobc)\b/i], [o, [l, _], [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, [l, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [d, [c, "EdgeHTML"]], [/(arkweb)\/([\w\.]+)/i], [c, d], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [d, [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, d], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [d, c]], os: [[/microsoft (windows) (vista|xp)/i], [c, d], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [c, [d, de, ge]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[d, de, ge], [c, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[d, /_/g, "."], [c, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[c, ce], [d, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [d, 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, d], [/\(bb(10);/i], [d, [c, w]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [d, [c, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [d, [c, C + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [d, [c, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [d, [c, "watchOS"]], [/crkey\/([\d\.]+)/i], [d, [c, E + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[c, L], d], [/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, d], [/(sunos) ?([\w\.\d]*)/i], [[c, "Solaris"], d], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [c, d]] }, te = function(se, re) {
|
|
3712
3712
|
if (typeof se === i && (re = se, se = a), !(this instanceof te))
|
|
3713
3713
|
return new te(se, re).getResult();
|
|
3714
|
-
var Q = typeof r !== t && r.navigator ? r.navigator : a, ue = se || (Q && Q.userAgent ? Q.userAgent : ""), Ie = Q && Q.userAgentData ? Q.userAgentData : a, ie = re ? function(q,
|
|
3714
|
+
var Q = typeof r !== t && r.navigator ? r.navigator : a, ue = se || (Q && Q.userAgent ? Q.userAgent : ""), Ie = Q && Q.userAgentData ? Q.userAgentData : a, ie = re ? function(q, we) {
|
|
3715
3715
|
var Je = {};
|
|
3716
|
-
for (var
|
|
3717
|
-
|
|
3716
|
+
for (var Ve in q)
|
|
3717
|
+
we[Ve] && we[Ve].length % 2 == 0 ? Je[Ve] = we[Ve].concat(q[Ve]) : Je[Ve] = q[Ve];
|
|
3718
3718
|
return Je;
|
|
3719
3719
|
}(Fe, re) : Fe, je = Q && Q.userAgent == ue;
|
|
3720
3720
|
return this.getBrowser = function() {
|
|
3721
|
-
var q,
|
|
3722
|
-
return
|
|
3721
|
+
var q, we = {};
|
|
3722
|
+
return we[c] = a, we[d] = a, be.call(we, ue, ie.browser), we[n] = typeof (q = we[d]) === s ? q.replace(/[^\d\.]/g, "").split(".")[0] : a, je && Q && Q.brave && typeof Q.brave.isBrave == e && (we[c] = "Brave"), we;
|
|
3723
3723
|
}, this.getCPU = function() {
|
|
3724
3724
|
var q = {};
|
|
3725
3725
|
return q[b] = a, be.call(q, ue, ie.cpu), q;
|
|
@@ -3771,7 +3771,7 @@ class Xo {
|
|
|
3771
3771
|
get adaptInfo() {
|
|
3772
3772
|
var e, t, i, s;
|
|
3773
3773
|
let a = new qo.UAParser().getResult();
|
|
3774
|
-
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.
|
|
3774
|
+
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.4", version: "v1" };
|
|
3775
3775
|
}
|
|
3776
3776
|
refreshAuthInfo(a) {
|
|
3777
3777
|
this.authInfo = a;
|
|
@@ -3817,8 +3817,8 @@ class Xo {
|
|
|
3817
3817
|
return ++this.seqIndex, { version: 1, msgtype: a, tid: dt(), header: { appid: this.authInfo.appId, channelid: this.authInfo.channelId, sessionid: (e = this.authInfo.sessionId) != null ? e : "", userid: this.authInfo.userId }, data: { seq: this.seqIndex } };
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
|
-
var
|
|
3821
|
-
class
|
|
3820
|
+
var U = ((r) => (r[r.ERR_JOIN_ALREADY_JOINED = 16843521] = "ERR_JOIN_ALREADY_JOINED", r[r.ERR_JOIN_BAD_APPID = 33620481] = "ERR_JOIN_BAD_APPID", r[r.ERR_JOIN_INVALID_APPID = 33620482] = "ERR_JOIN_INVALID_APPID", r[r.ERR_JOIN_BAD_CHANNEL = 33620484] = "ERR_JOIN_BAD_CHANNEL", r[r.ERR_JOIN_INVALID_CHANNEL = 33620483] = "ERR_JOIN_INVALID_CHANNEL", r[r.ERR_JOIN_BAD_TOKEN = 33620485] = "ERR_JOIN_BAD_TOKEN", r[r.ERR_JOIN_TIMEOUT = 16908804] = "ERR_JOIN_TIMEOUT", r[r.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD = 16974081] = "ERR_JOIN_ERR_JOIN_BAD_PARAMBAD", r[r.ERR_JOIN_CHANNEL_FAILED = 16974338] = "ERR_JOIN_CHANNEL_FAILED", r[r.ERR_LOG_ALREADY_INIT = 16974085] = "ERR_LOG_ALREADY_INIT", r[r.ERR_LOG_ROOT_PATH_ERROR = 16974086] = "ERR_LOG_ROOT_PATH_ERROR", r[r.ERR_MIC_OPEN_FAIL = 17040388] = "ERR_MIC_OPEN_FAIL", r[r.ERR_SPEAKER_OPEN_FAIL = 17040389] = "ERR_SPEAKER_OPEN_FAIL", r[r.ERR_MIC_INTERRUPT = 17040390] = "ERR_MIC_INTERRUPT", r[r.ERR_SPEAKER_INTERRUPT = 17040391] = "ERR_SPEAKER_INTERRUPT", r[r.ERR_MIC_AUTH_FAIL = 17040392] = "ERR_MIC_AUTH_FAIL", r[r.ERR_MIC_NOT_AVAILABLE = 17040393] = "ERR_MIC_NOT_AVAILABLE", r[r.ERR_SPEAKER_NOT_AVAILABLE = 17040400] = "ERR_SPEAKER_NOT_AVAILABLE", r[r.ERR_CAMERA_OPEN_FAIL = 17039620] = "ERR_CAMERA_OPEN_FAIL", r[r.ERR_CAMERA_AUTH_FAIL = 17039621] = "ERR_CAMERA_AUTH_FAIL", r[r.ERR_CAMERA_INTERRUPT = 17039622] = "ERR_CAMERA_INTERRUPT", r[r.ERR_CAMERA_NOT_AVAILABLE = 17039623] = "ERR_CAMERA_NOT_AVAILABLE", r[r.ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873] = "ERR_VIDEO_DISPLAY_OPEN_FAIL", r[r.ERR_VIDEO_DISPLAY_INTERRUPT = 1064992] = "ERR_VIDEO_DISPLAY_INTERRUPT", r[r.ERR_ICE_CONNECTION_CONNECT_FAIL = 17105409] = "ERR_ICE_CONNECTION_CONNECT_FAIL", r[r.ERR_ICE_CONNECTION_RECONNECT_FAI = 17105410] = "ERR_ICE_CONNECTION_RECONNECT_FAI", r[r.ERR_ICE_CONNECTION_MOBILITY_FAIL = 17105411] = "ERR_ICE_CONNECTION_MOBILITY_FAIL", r[r.ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT = 16908812] = "ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT", r[r.ERR_LATENCY_LIVE_COMMUNICATION_FAILED = 17235971] = "ERR_LATENCY_LIVE_COMMUNICATION_FAILED", r[r.ERR_LATENCY_LIVE_MEIDASETTING_FAILED = 17235972] = "ERR_LATENCY_LIVE_MEIDASETTING_FAILED", r[r.ERR_LATENCY_LIVE_NONE_BROADCASTER = 17235973] = "ERR_LATENCY_LIVE_NONE_BROADCASTER", r[r.ERR_LATENCY_LIVE_NEED_RESTART = 17235974] = "ERR_LATENCY_LIVE_NEED_RESTART", r[r.ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER = 17235975] = "ERR_LATENCY_LIVE_NEED_RESTART_AGAIN_LATER", r[r.ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE = 17235976] = "ERR_LATENCY_LIVE_SERVICE_UNAVAILABLE", r[r.ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION = 17235977] = "ERR_LATENCY_LIVE_MEDIACONNECTION_INTERRUPTION", r[r.ERR_SDK_PUBLISH_INVAILD = 16974597] = "ERR_SDK_PUBLISH_INVAILD", r[r.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL = 16843782] = "ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL", r[r.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED = 16843856] = "ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED = 16843857] = "ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED = 16843858] = "ERR_SDK_PUBLISH_DUAL_STREAM_FAILED", r[r.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED = 16843859] = "ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED", r[r.ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR = 16843860] = "ERR_SDK_PUBLISH_SCREEN_SHARE_CONFIG_ERROR", r[r.ERR_SDK_SUBSCRIBE_INVAILD = 16974852] = "ERR_SDK_SUBSCRIBE_INVAILD", r[r.ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL = 16844112] = "ERR_SDK_SUBSCRIBE_NOT_JOIN_CHANNEL", r[r.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED = 16844113] = "ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED = 16844114] = "ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED = 16844115] = "ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED", r[r.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED = 16844116] = "ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED", r[r.ERR_SDK_SUBSCRIBE_DATA_FAILED = 16844117] = "ERR_SDK_SUBSCRIBE_DATA_FAILED", r[r.ERR_SDK_SUBSCRIBE_DATA_ERROR = 16844118] = "ERR_SDK_SUBSCRIBE_DATA_ERROR", r[r.ERR_SDK_INVALID_STATE = 16974340] = "ERR_SDK_INVALID_STATE", r[r.ERR_INVALID_ARGUMENTS = 16974083] = "ERR_INVALID_ARGUMENTS", r[r.ERR_SESSION_REMOVED = 33620229] = "ERR_SESSION_REMOVED", r[r.ERR_SDK_UPDATE_ROLE_CHANNEL = 16908801] = "ERR_SDK_UPDATE_ROLE_CHANNEL", r[r.ERR_INNER = -1] = "ERR_INNER", r[r.ERR_SDK_MPU_TASK_PUBLISH_OK = 0] = "ERR_SDK_MPU_TASK_PUBLISH_OK", r[r.ERR_SDK_MPU_TASK_STREAM_NOT_FOUND = 17825793] = "ERR_SDK_MPU_TASK_STREAM_NOT_FOUND", r[r.ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST = 17825794] = "ERR_SDK_MPU_TASK_STREAM_ALREADY_EXIST", r[r.ERR_SDK_MPU_TASK_INVALID_PARAM = 17825795] = "ERR_SDK_MPU_TASK_INVALID_PARAM", r[r.ERR_SDK_MPU_TASK_INTERNAL_ERROR = 17825796] = "ERR_SDK_MPU_TASK_INTERNAL_ERROR", r[r.ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR = 17825797] = "ERR_SDK_MPU_TASK_RTMP_SERVER_ERROR", r[r.ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR = 17825798] = "ERR_SDK_MPU_TASK_RTMP_STREAM_URL_ERROR", r[r.ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT = 17825799] = "ERR_SDK_MPU_TASK_PUBLISH_TIMEOUT", r[r.ERR_SDK_MPU_TASK_NOT_AUTHORIZED = 17825800] = "ERR_SDK_MPU_TASK_NOT_AUTHORIZED", r[r.ERR_SDK_CHANNEL_RELAY_STATE_ERROR = 18874369] = "ERR_SDK_CHANNEL_RELAY_STATE_ERROR", r[r.ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW = 18874370] = "ERR_SDK_CHANNEL_RELAY_SRC_NOT_ALLOW", r[r.ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED = 18874371] = "ERR_SDK_CHANNEL_RELAY_JOIN_DEST_FAILED", r[r.ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID = 18874372] = "ERR_SDK_CHANNEL_RELAY_TOKEN_INVALID", r[r.ERR_SDK_CHANNEL_RELAY_ROLE_ERROR = 18874373] = "ERR_SDK_CHANNEL_RELAY_ROLE_ERROR", r[r.ERR_SDK_CHANNEL_RELAY_INVALID_PARAM = 18874374] = "ERR_SDK_CHANNEL_RELAY_INVALID_PARAM", r[r.ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR = 18874375] = "ERR_SDK_CHANNEL_RELAY_TO_SELF_ERROR", r))(U || {});
|
|
3821
|
+
class V extends Error {
|
|
3822
3822
|
constructor(e, t, i) {
|
|
3823
3823
|
super(t);
|
|
3824
3824
|
g(this, "_code");
|
|
@@ -3826,10 +3826,10 @@ class O extends Error {
|
|
|
3826
3826
|
this._code = e, this._extra = i;
|
|
3827
3827
|
}
|
|
3828
3828
|
static fromRtsError(e) {
|
|
3829
|
-
return e instanceof
|
|
3829
|
+
return e instanceof V ? e : new V((e == null ? void 0 : e.errorCode) || -1, (e == null ? void 0 : e.message) || (e == null ? void 0 : e.errorCodeName) || "rts error", e);
|
|
3830
3830
|
}
|
|
3831
3831
|
static fromError(e, t = -1, i = "") {
|
|
3832
|
-
return new
|
|
3832
|
+
return new V(t, (e == null ? void 0 : e.message) || (e == null ? void 0 : e.reason) || i || "error", e);
|
|
3833
3833
|
}
|
|
3834
3834
|
get code() {
|
|
3835
3835
|
return this._code;
|
|
@@ -3895,7 +3895,7 @@ const st = class st extends He {
|
|
|
3895
3895
|
let s = this.packageCreater.createPublishPackage();
|
|
3896
3896
|
s.data.users = [], s.data.l1ip = t, i.subscribe.signal = this.wsClient.connectUrl;
|
|
3897
3897
|
const { tracks: n, resume: o } = i;
|
|
3898
|
-
let c = "7.1.
|
|
3898
|
+
let c = "7.1.4";
|
|
3899
3899
|
c && (c = c.split("-")[0]), n.forEach((l) => {
|
|
3900
3900
|
const { codec: d, ssrc: b } = l;
|
|
3901
3901
|
l.userdata = JSON.stringify({ sdk_version: c, codec: d }), l.ssrc = `${b}`, o && (l.attr = { reason: "reconnect" });
|
|
@@ -3913,7 +3913,7 @@ const st = class st extends He {
|
|
|
3913
3913
|
this.authInfo = e, this.packageCreater.refreshAuthInfo(e);
|
|
3914
3914
|
}
|
|
3915
3915
|
close() {
|
|
3916
|
-
|
|
3916
|
+
O.info(`[${st.logName}] close`), this.stopKeepAlive(), this.wsClient.off("onOpen", this.onOpen.bind(this)), this.wsClient.off("onMessage", this.onMessage.bind(this)), this.wsClient.off("onError", this.onError.bind(this)), this.wsClient.off("onClose", this.onClose.bind(this)), this.wsClient.off("onConnectFail", this.onConnectFail.bind(this)), this.wsClient.off("onAuthInvalid", this.onAuthInvalid.bind(this)), this.wsClient.off("onReconnectStart"), this.wsClient.off("onReconnectFail"), this.wsClient.close();
|
|
3917
3917
|
}
|
|
3918
3918
|
sendPackage(e) {
|
|
3919
3919
|
[Le.KEEPALIVE, Le.RECONNECT, Le.JOINCHANNEL].includes(e.msgtype) || this.packageCache.set(e.tid, e), this.wsClient.send(e), e.msgtype !== Le.KEEPALIVE && this.slsReporter.reportRoomServerEvent(!0, e.msgtype, e.tid, e);
|
|
@@ -3922,7 +3922,7 @@ const st = class st extends He {
|
|
|
3922
3922
|
this.reconnectData = e;
|
|
3923
3923
|
}
|
|
3924
3924
|
onOpen() {
|
|
3925
|
-
if (
|
|
3925
|
+
if (O.info(`[${st.logName}] onOpen`), this.isFirstConnect) {
|
|
3926
3926
|
let e = this.packageCreater.createJoinPackage(this.joinChannelExtraData);
|
|
3927
3927
|
e.data.configure = { channelprofile: this.channelProfile }, this.channelProfile !== kt.AliRtcSdkInteractiveLive && this.channelProfile !== kt.AliRtcSdkInteractiveWithLowLatencyLive || (e.data.configure.clientrole = this.clientRole), this.sendPackage(e);
|
|
3928
3928
|
} else {
|
|
@@ -3936,27 +3936,27 @@ const st = class st extends He {
|
|
|
3936
3936
|
let t = JSON.parse(e.data);
|
|
3937
3937
|
this.packageCache.delete(t.tid), this.onRecvMessage(t), t != null && t.msgtype && (t == null ? void 0 : t.msgtype) !== Le.KEEPALIVE && this.slsReporter.reportRoomServerEvent(!1, t.msgtype, t.tid, t);
|
|
3938
3938
|
} catch (t) {
|
|
3939
|
-
|
|
3939
|
+
O.warn(`[${st.logName}] onMessage err`, t, e);
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
onError(e) {
|
|
3943
|
-
|
|
3943
|
+
O.warn(`[${st.logName}] onError`, e), this.isFirstConnect && this.onConnectFail();
|
|
3944
3944
|
}
|
|
3945
3945
|
onConnectFail() {
|
|
3946
|
-
|
|
3947
|
-
const e = new
|
|
3946
|
+
O.warn(`[${st.logName}] onConnectFail`);
|
|
3947
|
+
const e = new V(U.ERR_INNER, "Signaling connect failed.");
|
|
3948
3948
|
this.isFirstConnect ? this.emit("onJoinChannelResult", e) : this.emit("onConnectFail", e);
|
|
3949
3949
|
}
|
|
3950
3950
|
onAuthInvalid() {
|
|
3951
|
-
|
|
3951
|
+
O.warn(`[${st.logName}] onAuthInvalid`), this.isFirstConnect && this.emit("onAuthInvalid");
|
|
3952
3952
|
}
|
|
3953
3953
|
onNetworkError() {
|
|
3954
|
-
|
|
3955
|
-
const e = new
|
|
3954
|
+
O.warn(`[${st.logName}] onNetworkError`);
|
|
3955
|
+
const e = new V(U.ERR_INNER, "Network error, signaling connect failed.");
|
|
3956
3956
|
this.emit("onNetworkError", e);
|
|
3957
3957
|
}
|
|
3958
3958
|
onClose(e) {
|
|
3959
|
-
|
|
3959
|
+
O.info(`[${st.logName}] onClose`, e), this.stopKeepAlive();
|
|
3960
3960
|
}
|
|
3961
3961
|
onKeepAliveRsp() {
|
|
3962
3962
|
this.emit("onKeepAliveRsp"), this.checkAlive();
|
|
@@ -3965,15 +3965,15 @@ const st = class st extends He {
|
|
|
3965
3965
|
this.emit("onReconnectStart");
|
|
3966
3966
|
}
|
|
3967
3967
|
onReconnectFail() {
|
|
3968
|
-
this.emit("onReconnectFail", new
|
|
3968
|
+
this.emit("onReconnectFail", new V(U.ERR_INNER, "signaling reconnect failed."));
|
|
3969
3969
|
}
|
|
3970
3970
|
checkAlive() {
|
|
3971
3971
|
window.clearTimeout(this.aliveChecker), this.aliveChecker = window.setTimeout(() => {
|
|
3972
|
-
|
|
3972
|
+
O.info(`[${st.logName}] not alive, reconnect`), this.stopKeepAlive(), this.emit("onReconnectStart"), this.wsClient.reconnect();
|
|
3973
3973
|
}, 3e4);
|
|
3974
3974
|
}
|
|
3975
3975
|
onRecvMessage(e) {
|
|
3976
|
-
switch (e.msgtype !== Le.KEEPALIVE &&
|
|
3976
|
+
switch (e.msgtype !== Le.KEEPALIVE && O.info(`[${st.logName}] recv msg: ${e.msgtype}`), e.msgtype) {
|
|
3977
3977
|
case Le.JOINCHANNEL:
|
|
3978
3978
|
this.onJoinResult(e);
|
|
3979
3979
|
break;
|
|
@@ -4036,7 +4036,7 @@ const st = class st extends He {
|
|
|
4036
4036
|
if (e.code === 200)
|
|
4037
4037
|
this.sendPkgCache(), this.startKeepAlive(), this.emit("onReconnectSuccess", e.data.users);
|
|
4038
4038
|
else {
|
|
4039
|
-
const t = new
|
|
4039
|
+
const t = new V(U.ERR_INNER, `reconnect failed, code: ${e.code};description: ${e.description}`);
|
|
4040
4040
|
e.code === 403 && (t.code = 403), this.emit("onReconnectFail", t), this.close();
|
|
4041
4041
|
}
|
|
4042
4042
|
}
|
|
@@ -4079,7 +4079,7 @@ const T = (r, a) => (e, t, i) => {
|
|
|
4079
4079
|
h = r(n);
|
|
4080
4080
|
} catch (b) {
|
|
4081
4081
|
}
|
|
4082
|
-
|
|
4082
|
+
O.interface(o, t, ...h);
|
|
4083
4083
|
const l = s.apply(this, n);
|
|
4084
4084
|
return Promise.resolve(l).then((b) => b).catch((b) => b).then((b) => {
|
|
4085
4085
|
var m;
|
|
@@ -4101,11 +4101,11 @@ const T = (r, a) => (e, t, i) => {
|
|
|
4101
4101
|
} catch (S) {
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
|
-
|
|
4104
|
+
O.interfaceResult(o, t, !(f && p), Date.now() - c + "ms", u);
|
|
4105
4105
|
}
|
|
4106
4106
|
}), l;
|
|
4107
4107
|
}, i;
|
|
4108
|
-
},
|
|
4108
|
+
}, B = (r) => r;
|
|
4109
4109
|
var Yo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ar = (r, a, e, t) => {
|
|
4110
4110
|
for (var i, s = t > 1 ? void 0 : t ? Qo(a, e) : a, n = r.length - 1; n >= 0; n--)
|
|
4111
4111
|
(i = r[n]) && (s = (t ? i(a, e, s) : i(s)) || s);
|
|
@@ -4131,7 +4131,7 @@ const Ii = (qe = class extends He {
|
|
|
4131
4131
|
this.reconnectData = e, (t = this.messageCenter) == null || t.updateReconnectData(this.reconnectData);
|
|
4132
4132
|
}
|
|
4133
4133
|
reset() {
|
|
4134
|
-
|
|
4134
|
+
O.info("[roomsig] reset"), this.messageCenter && (this.messageCenter.close(), this.messageCenter = void 0), this.authInfo = void 0;
|
|
4135
4135
|
}
|
|
4136
4136
|
join(e, t, i, s) {
|
|
4137
4137
|
return I(this, null, function* () {
|
|
@@ -4139,40 +4139,40 @@ const Ii = (qe = class extends He {
|
|
|
4139
4139
|
const c = {};
|
|
4140
4140
|
this.authInfo = e, this.userName = t, this.messageCenter = new Sr(e, t, this.channelProfile, this.clientRole, this.slsReporter, i), this.initMessageCenter(), this.messageCenter.once("onJoinChannelResult", (l) => {
|
|
4141
4141
|
var d, b, u;
|
|
4142
|
-
if (
|
|
4142
|
+
if (O.info(`[${qe.logName}]`, "join result: ", l), c.taskretrynum = ((d = this.messageCenter) == null ? void 0 : d.retryCount) || 0, l.code == 200) {
|
|
4143
4143
|
(b = this.messageCenter) == null || b.sendPkgCache(), (u = this.messageCenter) == null || u.startKeepAlive();
|
|
4144
4144
|
let f = l.data;
|
|
4145
4145
|
f.tid = l.tid, f.users = l.data.users, f.timestamp = l.timestamp, c.est && (c.joinconnecttc = Date.now() - c.est), this.slsReporter.reportJoinConnection(c), n(f);
|
|
4146
4146
|
} else
|
|
4147
|
-
this.reset(), o(this.handleSignalError(l.code, l.reason,
|
|
4147
|
+
this.reset(), o(this.handleSignalError(l.code, l.reason, U.ERR_JOIN_CHANNEL_FAILED));
|
|
4148
4148
|
}), this.messageCenter.once("onAuthInvalid", () => {
|
|
4149
|
-
this.reset(), o(new
|
|
4150
|
-
}),
|
|
4149
|
+
this.reset(), o(new V(U.ERR_JOIN_BAD_TOKEN, "join failed because authentication failed"));
|
|
4150
|
+
}), O.info(`[${qe.logName}]`, "start ws connecting roomserver and auto join when connected");
|
|
4151
4151
|
const h = { appid: this.authInfo.appId, callid: this.authInfo.sessionId, channelid: this.authInfo.channelId, userid: this.authInfo.userId, nonce: this.authInfo.nonce || "", timestamp: this.authInfo.timestamp, token: this.authInfo.token, authtype: "app", tid: dt() };
|
|
4152
4152
|
e.role && (h.tokenrole = e.role), c.est = Date.now(), this.messageCenter.start(this.roomServerUri + "?" + it.queryingParam(h), s);
|
|
4153
4153
|
});
|
|
4154
4154
|
});
|
|
4155
4155
|
}
|
|
4156
4156
|
leave() {
|
|
4157
|
-
return
|
|
4157
|
+
return O.info("[roomsig] leave .."), new Promise((e, t) => {
|
|
4158
4158
|
this.messageCenter ? (this.messageCenter.on("onLeaveResult", (i, s) => {
|
|
4159
|
-
|
|
4160
|
-
}),
|
|
4159
|
+
O.info(`[${qe.logName}]`, "recv leave response " + i), i === 200 ? (this.updateReconnectData(), this.reset(), e({ tid: s })) : t(this.handleSignalError(i, "leave error"));
|
|
4160
|
+
}), O.info(`[${qe.logName}]`, "send leave request"), this.messageCenter.leave()) : (O.info(`[${qe.logName}]`, "no message center, ok to leave"), e({ tid: "" }));
|
|
4161
4161
|
});
|
|
4162
4162
|
}
|
|
4163
4163
|
publish(e) {
|
|
4164
4164
|
return new Promise((t, i) => {
|
|
4165
4165
|
var s;
|
|
4166
4166
|
this.messageCenter ? (this.messageCenter.once("onPublishResult", (n, o, c) => {
|
|
4167
|
-
|
|
4168
|
-
}), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = dt()),
|
|
4167
|
+
O.info(`[${qe.logName}]`, "recv pubish response " + n), n === 200 ? (this.updateReconnectData(ut($({}, this.reconnectData), { publish: { users: [e] } })), t({ tid: o })) : i(this.handleSignalError(n, `publish error, ${c}`));
|
|
4168
|
+
}), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = dt()), O.info(`[${qe.logName}]`, "assign callid " + e.callid + " and send publish request"), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
|
|
4169
4169
|
});
|
|
4170
4170
|
}
|
|
4171
4171
|
roleUpdate(e) {
|
|
4172
4172
|
return new Promise((t, i) => {
|
|
4173
4173
|
this.messageCenter ? (this.messageCenter.on("onRoleUpdateResult", (s, n, o) => {
|
|
4174
4174
|
var c, h;
|
|
4175
|
-
|
|
4175
|
+
O.info(`[${qe.logName}]`, "recv role update response " + s), s === 200 ? ((h = (c = this.reconnectData) == null ? void 0 : c.role) != null && h.clientrole && (this.reconnectData.role.clientrole = e, this.updateReconnectData(this.reconnectData)), t({ tid: n })) : i(this.handleSignalError(s, `role update error, ${o}`));
|
|
4176
4176
|
}), this.messageCenter.roleUpdate(e)) : i(this.handleSignalError(-1, "role update error, no message center"));
|
|
4177
4177
|
});
|
|
4178
4178
|
}
|
|
@@ -4180,22 +4180,22 @@ const Ii = (qe = class extends He {
|
|
|
4180
4180
|
this.channelProfile = e;
|
|
4181
4181
|
}
|
|
4182
4182
|
refreshUrl(e) {
|
|
4183
|
-
return
|
|
4183
|
+
return O.info(`[${qe.logName}]`, "refreshUrl .."), new Promise((t, i) => {
|
|
4184
4184
|
this.messageCenter ? (this.messageCenter.on("onRefreshUrlResult", (s) => {
|
|
4185
4185
|
const { code: n, description: o, data: c = {} } = s || {};
|
|
4186
|
-
|
|
4187
|
-
}),
|
|
4186
|
+
O.info("recv refresh url response " + n), n === 200 ? t(c) : i(this.handleSignalError(n, `refresh url error, ${o}`));
|
|
4187
|
+
}), O.info("send refresh url request"), this.messageCenter.refreshUrl(e)) : i(this.handleSignalError(-1, "refresh url error, no message center"));
|
|
4188
4188
|
});
|
|
4189
4189
|
}
|
|
4190
4190
|
reportStatus(e) {
|
|
4191
|
-
return
|
|
4191
|
+
return O.info(`[${qe.logName}]`, "reportStatus " + e), new Promise((t, i) => {
|
|
4192
4192
|
this.messageCenter ? (this.messageCenter.once("onStatusReport", (s, n) => {
|
|
4193
|
-
s === 200 ? t() : i(new
|
|
4194
|
-
}), this.messageCenter.reportStatus(e)) : i(new
|
|
4193
|
+
s === 200 ? t() : i(new V(s, n));
|
|
4194
|
+
}), this.messageCenter.reportStatus(e)) : i(new V(-1, "No messageCenter"));
|
|
4195
4195
|
});
|
|
4196
4196
|
}
|
|
4197
|
-
handleSignalError(e, t, i =
|
|
4198
|
-
return new
|
|
4197
|
+
handleSignalError(e, t, i = U.ERR_INNER) {
|
|
4198
|
+
return new V(i, `signal error: code - ${e}; description - ${t}`);
|
|
4199
4199
|
}
|
|
4200
4200
|
refreshAuthInfo(e) {
|
|
4201
4201
|
return I(this, null, function* () {
|
|
@@ -4258,11 +4258,11 @@ const ec = 6e5, li = class li extends He {
|
|
|
4258
4258
|
throw new Error();
|
|
4259
4259
|
{
|
|
4260
4260
|
const m = (f = u.data) == null ? void 0 : f.oss, S = (p = u.data) == null ? void 0 : p.sls;
|
|
4261
|
-
this.expiration = m.expiration || S.expiration, this.emit("onTokenUpdate", m, S),
|
|
4261
|
+
this.expiration = m.expiration || S.expiration, this.emit("onTokenUpdate", m, S), O.event(`[${li.logName}]`, "getToken", m, S);
|
|
4262
4262
|
}
|
|
4263
4263
|
this.slsReporter.reportSTSResult(200, b);
|
|
4264
4264
|
}).catch((u) => {
|
|
4265
|
-
this.slsReporter.reportSTSResult(-1, b),
|
|
4265
|
+
this.slsReporter.reportSTSResult(-1, b), O.error(`[${li.logName}]`, "getToken", u.message);
|
|
4266
4266
|
});
|
|
4267
4267
|
}));
|
|
4268
4268
|
this.slsReporter = e, this.env = t;
|
|
@@ -4298,11 +4298,11 @@ class Nr extends He {
|
|
|
4298
4298
|
}
|
|
4299
4299
|
reset() {
|
|
4300
4300
|
var e;
|
|
4301
|
-
|
|
4301
|
+
O.info("[signalingmanager] reset"), (e = this.signaling) == null || e.reset(), this.stsManager.clear(), this.signaling = void 0, this.authInfo = void 0;
|
|
4302
4302
|
}
|
|
4303
4303
|
join(e, t = e.userId, i, s, n) {
|
|
4304
4304
|
return this.maxConnectRetryCount = i, this.userName = t, new Promise((o, c) => {
|
|
4305
|
-
this.signaling ? c(new
|
|
4305
|
+
this.signaling ? c(new V(U.ERR_JOIN_ALREADY_JOINED, "already joined")) : (O.info("[signalingmanager] create signaling"), this.signaling = new Zo(this.channelProfile, this.clientRole, this.slsReporter, this.env), this.initSignaling(), s && (s.rs = Date.now()), this.signaling.join(e, t, i, n).then((h) => {
|
|
4306
4306
|
this.authInfo = e, s && (s.re = Date.now()), o(h);
|
|
4307
4307
|
}).catch((h) => {
|
|
4308
4308
|
this.reset(), c(h);
|
|
@@ -4329,7 +4329,7 @@ class Nr extends He {
|
|
|
4329
4329
|
t(n);
|
|
4330
4330
|
}).catch((n) => {
|
|
4331
4331
|
i(n);
|
|
4332
|
-
})) : i(new
|
|
4332
|
+
})) : i(new V(U.ERR_SDK_PUBLISH_NOT_JOIN_CHANNEL, "no signaling"));
|
|
4333
4333
|
});
|
|
4334
4334
|
}
|
|
4335
4335
|
reportStatus(e) {
|
|
@@ -4338,7 +4338,7 @@ class Nr extends He {
|
|
|
4338
4338
|
t();
|
|
4339
4339
|
}).catch((s) => {
|
|
4340
4340
|
i(s);
|
|
4341
|
-
}) : i(new
|
|
4341
|
+
}) : i(new V(-1, "no signaling"));
|
|
4342
4342
|
});
|
|
4343
4343
|
}
|
|
4344
4344
|
setClientRole(e) {
|
|
@@ -4359,7 +4359,7 @@ class Nr extends He {
|
|
|
4359
4359
|
this.signaling ? this.signaling.setChannelProfile(e) : this.channelProfile = e;
|
|
4360
4360
|
}
|
|
4361
4361
|
refreshUrl(e) {
|
|
4362
|
-
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new
|
|
4362
|
+
return this.signaling ? this.signaling.refreshUrl(e) : Promise.reject(new V(U.ERR_SDK_INVALID_STATE, "should join first"));
|
|
4363
4363
|
}
|
|
4364
4364
|
refreshAuthInfo(e) {
|
|
4365
4365
|
return I(this, null, function* () {
|
|
@@ -4424,7 +4424,7 @@ function ti() {
|
|
|
4424
4424
|
for (var i, s = t > 1 ? void 0 : t ? ic(a, e) : a, n = r.length - 1; n >= 0; n--)
|
|
4425
4425
|
(i = r[n]) && (s = (t ? i(a, e, s) : i(s)) || s);
|
|
4426
4426
|
t && s && tc(a, e, s);
|
|
4427
|
-
})([T(
|
|
4427
|
+
})([T(B)], Nr.prototype, "publish", 1);
|
|
4428
4428
|
const zt = class zt {
|
|
4429
4429
|
static getInstance() {
|
|
4430
4430
|
var a;
|
|
@@ -4537,9 +4537,9 @@ class un {
|
|
|
4537
4537
|
return { micOpen: !!(1 & e), micInterrupted: !!(2 & e), cameraOpen: !!(4 & e), screenShare: !!(128 & e), audioDisable: !!(8 & e), videoDisable: !!(16 & e), screenDisable: !!(256 & e), backgroundMode: !!(32 & e), accompanyPlaying: !!(64 & e) };
|
|
4538
4538
|
}
|
|
4539
4539
|
}
|
|
4540
|
-
const pn = "customVideoProfile", mn = "customScreenProfile", vr = { width: 1280, height: 720, frameRate: 30, maxBitrate: 2e3 },
|
|
4541
|
-
var oi = ((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))(oi || {});
|
|
4542
|
-
const sc = { 1e4:
|
|
4540
|
+
const pn = "customVideoProfile", mn = "customScreenProfile", vr = { width: 1280, height: 720, frameRate: 30, maxBitrate: 2e3 }, Va = { width: 1920, height: 1080, frameRate: 30, maxBitrate: 2600 };
|
|
4541
|
+
var oi = ((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_NOTALLOWED = 10021] = "ERROR_DEVICE_NOTALLOWED", r[r.ERROR_DEVICE_NOTSUPPORT = 2e4] = "ERROR_DEVICE_NOTSUPPORT", r))(oi || {});
|
|
4542
|
+
const sc = { 1e4: Oe.AliEngineLocalDeviceExceptionTypeUnknown, 2e4: Oe.AliEngineLocalDeviceExceptionTypeUnknown, 10001: Oe.AliEngineLocalDeviceExceptionTypeMicNotAvailable, 10002: Oe.AliEngineLocalDeviceExceptionTypeMicAuthFail, 10003: Oe.AliEngineLocalDeviceExceptionTypeMicOpenFail, 10005: Oe.AliEngineLocalDeviceExceptionTypeCameraAuthFail, 10004: Oe.AliEngineLocalDeviceExceptionTypeVideoDeviceException, 10006: Oe.AliEngineLocalDeviceExceptionTypeCameraOpenFail, 10010: Oe.AliEngineLocalDeviceExceptionTypeDisplayException, 10011: Oe.AliEngineLocalDeviceExceptionTypeDisplayException, 10012: Oe.AliEngineLocalDeviceExceptionTypeDisplayException, 10013: Oe.AliEngineLocalDeviceExceptionTypeDisplayException, 10014: Oe.AliEngineLocalDeviceExceptionTypeDisplayException, 10019: Oe.AliEngineLocalDeviceExceptionTypeDisplayException };
|
|
4543
4543
|
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 || {});
|
|
4544
4544
|
function Ua(r) {
|
|
4545
4545
|
var a;
|
|
@@ -4550,11 +4550,11 @@ function Ua(r) {
|
|
|
4550
4550
|
if (e) {
|
|
4551
4551
|
if (e.nodeName.toLocaleLowerCase() === "video")
|
|
4552
4552
|
return e.setAttribute("playsinline", ""), e;
|
|
4553
|
-
throw new
|
|
4553
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element should be HtmlVideoElement");
|
|
4554
4554
|
}
|
|
4555
|
-
throw new
|
|
4555
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element not founded");
|
|
4556
4556
|
}
|
|
4557
|
-
throw new
|
|
4557
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "element id should be string");
|
|
4558
4558
|
}
|
|
4559
4559
|
function yr(r) {
|
|
4560
4560
|
var e;
|
|
@@ -4643,7 +4643,7 @@ const gn = (r, a, e = !1) => {
|
|
|
4643
4643
|
});
|
|
4644
4644
|
};
|
|
4645
4645
|
var fn = ((r) => (r[r.AliEngineDataMsgNone = 0] = "AliEngineDataMsgNone", r[r.AliEngineDataMsgMusicProgress = 1] = "AliEngineDataMsgMusicProgress", r[r.AliEngineDataMsgCustom = 2] = "AliEngineDataMsgCustom", r))(fn || {});
|
|
4646
|
-
class
|
|
4646
|
+
class Oi {
|
|
4647
4647
|
constructor(a, e, t, i = 0) {
|
|
4648
4648
|
g(this, "msgType");
|
|
4649
4649
|
g(this, "msgId");
|
|
@@ -4657,14 +4657,14 @@ class Vi {
|
|
|
4657
4657
|
}
|
|
4658
4658
|
static parse(a) {
|
|
4659
4659
|
const e = new DataView(a), t = e.getUint8(0), i = e.getUint8(1) >> 4, s = 15 & e.getUint8(1), n = e.getUint16(2);
|
|
4660
|
-
return new
|
|
4660
|
+
return new Oi(s, n, t, i);
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
4663
|
class _i {
|
|
4664
4664
|
constructor(a, e, t) {
|
|
4665
4665
|
g(this, "_byteArray");
|
|
4666
4666
|
if (this._byteArray = new Uint8Array(0), a !== void 0 && e !== void 0 && t !== void 0) {
|
|
4667
|
-
const i = new
|
|
4667
|
+
const i = new Oi(a, e, t).build();
|
|
4668
4668
|
this._byteArray = new Uint8Array(i.byteLength + this._byteArray.byteLength), this._byteArray.set(i, 0);
|
|
4669
4669
|
}
|
|
4670
4670
|
}
|
|
@@ -4737,7 +4737,7 @@ class gi {
|
|
|
4737
4737
|
return new gi(l, t, n, i, s, o, c, h);
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
|
-
class
|
|
4740
|
+
class Vi {
|
|
4741
4741
|
constructor(a, e) {
|
|
4742
4742
|
g(this, "_body");
|
|
4743
4743
|
g(this, "_header", new gi());
|
|
@@ -4761,7 +4761,7 @@ class Oi {
|
|
|
4761
4761
|
static parse(a) {
|
|
4762
4762
|
const e = a.slice(0, 4), t = gi.parse(e);
|
|
4763
4763
|
let i = new ArrayBuffer(0);
|
|
4764
|
-
return a.byteLength - 4 >= t.payloadLength && (i = a.slice(4, 4 + t.payloadLength)), new
|
|
4764
|
+
return a.byteLength - 4 >= t.payloadLength && (i = a.slice(4, 4 + t.payloadLength)), new Vi(t, i);
|
|
4765
4765
|
}
|
|
4766
4766
|
}
|
|
4767
4767
|
const or = (r) => {
|
|
@@ -4789,7 +4789,7 @@ class $t {
|
|
|
4789
4789
|
static parse(a) {
|
|
4790
4790
|
if (!a || a.byteLength < 4)
|
|
4791
4791
|
return;
|
|
4792
|
-
|
|
4792
|
+
Oi.parse(a.slice(0, 4));
|
|
4793
4793
|
const e = _i.parse(a.slice(4))[30];
|
|
4794
4794
|
if (!e)
|
|
4795
4795
|
return;
|
|
@@ -4974,7 +4974,7 @@ const Te = (St = class extends dn {
|
|
|
4974
4974
|
this.streamManager.setCameraVideoConstraints({ facingMode: "user" });
|
|
4975
4975
|
else {
|
|
4976
4976
|
if (e !== mi.CAMERA_REAR)
|
|
4977
|
-
throw new
|
|
4977
|
+
throw new V(U.ERR_CAMERA_OPEN_FAIL, `camera direction set to ${e} failed`);
|
|
4978
4978
|
this.streamManager.setCameraVideoConstraints({ facingMode: "environment" });
|
|
4979
4979
|
}
|
|
4980
4980
|
}
|
|
@@ -5019,36 +5019,22 @@ const Te = (St = class extends dn {
|
|
|
5019
5019
|
const { videoElement: t, screen: i } = e;
|
|
5020
5020
|
i ? this.screenPreviewElements.includes(t) || (this.screenPreviewElements.push(t), this.preview(e)) : this.previewElements.includes(t) || (this.previewElements.push(t), this.preview(e));
|
|
5021
5021
|
}
|
|
5022
|
-
|
|
5022
|
+
startDefaultCameraAndMic(e) {
|
|
5023
5023
|
return I(this, null, function* () {
|
|
5024
|
-
const { hasCamera: t, cameraCaptureDisabled: i, publishLocalVideoStreamEnabled: s } = this;
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
}
|
|
5033
|
-
});
|
|
5034
|
-
}
|
|
5035
|
-
startDefaultAudio() {
|
|
5036
|
-
return I(this, null, function* () {
|
|
5037
|
-
const { hasMicrophone: e, audioCaptureDisabled: t, publishLocalAudioStreamEnabled: i } = this;
|
|
5038
|
-
if (!e && !t && i)
|
|
5039
|
-
try {
|
|
5040
|
-
yield this.startAudioCapture();
|
|
5041
|
-
} catch (s) {
|
|
5042
|
-
const n = s.errorCode;
|
|
5043
|
-
let o = B.ERR_MIC_OPEN_FAIL;
|
|
5044
|
-
throw n === oi.ERROR_DEVICE_AUDIODEVICE_NOTFOUND ? o = B.ERR_MIC_NOT_AVAILABLE : n === oi.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED && (o = B.ERR_MIC_AUTH_FAIL), new O(o, `mic open fail: ${s.message}`);
|
|
5045
|
-
}
|
|
5024
|
+
const { hasCamera: t, cameraCaptureDisabled: i, publishLocalVideoStreamEnabled: s } = this, { hasMicrophone: n, audioCaptureDisabled: o, publishLocalAudioStreamEnabled: c } = this, h = !t && !e && !i && s, l = !n && !o && c;
|
|
5025
|
+
try {
|
|
5026
|
+
h && l ? yield this.startCameraAndMic() : h ? yield this.startCameraCapture() : l && (yield this.startAudioCapture());
|
|
5027
|
+
} catch (d) {
|
|
5028
|
+
const b = d.errorCode;
|
|
5029
|
+
let u = U.ERR_CAMERA_OPEN_FAIL;
|
|
5030
|
+
throw h ? ((b === oi.ERROR_DEVICE_VIDEODEVICE_NOTALLOWED || oi.ERROR_DEVICE_NOTALLOWED) && (u = U.ERR_CAMERA_AUTH_FAIL), u = U.ERR_CAMERA_OPEN_FAIL) : ((b === oi.ERROR_DEVICE_AUDIODEVICE_NOTALLOWED || oi.ERROR_DEVICE_NOTALLOWED) && (u = U.ERR_MIC_AUTH_FAIL), u = U.ERR_MIC_OPEN_FAIL), new V(u, `auto open fail: ${d.message}`);
|
|
5031
|
+
}
|
|
5046
5032
|
});
|
|
5047
5033
|
}
|
|
5048
5034
|
setViewConfig(e, t) {
|
|
5049
5035
|
if (e) {
|
|
5050
5036
|
if (![oe.AliRtcVideoTrackCamera, oe.AliRtcVideoTrackScreen].includes(t))
|
|
5051
|
-
throw new
|
|
5037
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "set view config invalid track", { track: t });
|
|
5052
5038
|
e.forEach((i) => {
|
|
5053
5039
|
this.setPreviewElement({ videoElement: i, screen: t === oe.AliRtcVideoTrackScreen });
|
|
5054
5040
|
});
|
|
@@ -5075,17 +5061,22 @@ const Te = (St = class extends dn {
|
|
|
5075
5061
|
this.streamManager.audioCaptureDisabled = !0, yield this.stopLocalStream({ audio: !0 });
|
|
5076
5062
|
});
|
|
5077
5063
|
}
|
|
5064
|
+
startCameraAndMic() {
|
|
5065
|
+
return I(this, null, function* () {
|
|
5066
|
+
return this.streamManager.cameraCaptureDisabled = !1, this.streamManager.audioCaptureDisabled = !1, yield this.createLocalStream({ video: !0, audio: !0 });
|
|
5067
|
+
});
|
|
5068
|
+
}
|
|
5078
5069
|
preview(e) {
|
|
5079
5070
|
return I(this, null, function* () {
|
|
5080
5071
|
const { videoElement: t, screen: i } = e != null ? e : {};
|
|
5081
5072
|
try {
|
|
5082
5073
|
let s = i ? this.streamManager.screenStreamInfo.previewStream : this.streamManager.cameraStreamInfo.previewStream;
|
|
5083
5074
|
if (!t)
|
|
5084
|
-
throw new
|
|
5085
|
-
return s ? (gn(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream) : void
|
|
5075
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "no video element found", { videoElement: t });
|
|
5076
|
+
return s ? (gn(t, s.mediaStream), this.setPreviewElement(e), s.mediaStream) : void O.info(`[${St.logName}]`, "preview no stream founded");
|
|
5086
5077
|
} catch (s) {
|
|
5087
|
-
const n =
|
|
5088
|
-
throw
|
|
5078
|
+
const n = U.ERR_INNER;
|
|
5079
|
+
throw V.fromError(s, n, "preview failed");
|
|
5089
5080
|
}
|
|
5090
5081
|
});
|
|
5091
5082
|
}
|
|
@@ -5189,9 +5180,9 @@ const Te = (St = class extends dn {
|
|
|
5189
5180
|
this.dataPubState.setState(Z.AliRtcStatePublishing);
|
|
5190
5181
|
try {
|
|
5191
5182
|
const e = yield this.rtsManager.publishAddDataChannel(this.url);
|
|
5192
|
-
e ? (this.updateDataChannel(e), this.dataPubState.setState(Z.AliRtcStatePublished)) : (this.dataPubState.setState(Z.AliRtcStateNoPublish), this.emit("publishDataError", new
|
|
5183
|
+
e ? (this.updateDataChannel(e), this.dataPubState.setState(Z.AliRtcStatePublished)) : (this.dataPubState.setState(Z.AliRtcStateNoPublish), this.emit("publishDataError", new V(U.ERR_INNER, "publishDataError")));
|
|
5193
5184
|
} catch (e) {
|
|
5194
|
-
|
|
5185
|
+
O.error("[LocalUser]", "publishDataChannel error", e), this.dataPubState.setState(Z.AliRtcStateNoPublish);
|
|
5195
5186
|
}
|
|
5196
5187
|
}
|
|
5197
5188
|
});
|
|
@@ -5218,7 +5209,7 @@ const Te = (St = class extends dn {
|
|
|
5218
5209
|
throw s && this.audioPubState.setState(Z.AliRtcStateNoPublish), n && this.videoPubState.setState(Z.AliRtcStateNoPublish), o && this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), c && this.screenPubState.setState(Z.AliRtcStateNoPublish), l;
|
|
5219
5210
|
}
|
|
5220
5211
|
} else
|
|
5221
|
-
|
|
5212
|
+
O.event(`[${St.logName}]`, "startPublish no stream founded");
|
|
5222
5213
|
});
|
|
5223
5214
|
}
|
|
5224
5215
|
updateStreams() {
|
|
@@ -5229,7 +5220,7 @@ const Te = (St = class extends dn {
|
|
|
5229
5220
|
publishUpdate(e) {
|
|
5230
5221
|
return I(this, null, function* () {
|
|
5231
5222
|
var n, o, c, h, l, d;
|
|
5232
|
-
if (
|
|
5223
|
+
if (O.info(`[${St.logName}]`, "publishUpdate", e || "-", this.shouldPublish), !this.shouldPublish)
|
|
5233
5224
|
return;
|
|
5234
5225
|
if (!this.rtsManager.isConnecting && !this.rtsManager.isConnected)
|
|
5235
5226
|
return void (yield this.startPublish());
|
|
@@ -5269,7 +5260,7 @@ const Te = (St = class extends dn {
|
|
|
5269
5260
|
return I(this, null, function* () {
|
|
5270
5261
|
var c;
|
|
5271
5262
|
if (!e)
|
|
5272
|
-
throw new
|
|
5263
|
+
throw new V(U.ERR_INNER, "sync publish to room server failed because no publishInfo");
|
|
5273
5264
|
let s = e;
|
|
5274
5265
|
if (this.dc) {
|
|
5275
5266
|
const o = e, { tracks: h } = o, l = Et(o, ["tracks"]);
|
|
@@ -5281,7 +5272,7 @@ const Te = (St = class extends dn {
|
|
|
5281
5272
|
}
|
|
5282
5273
|
refreshPushStreamUrl() {
|
|
5283
5274
|
return I(this, null, function* () {
|
|
5284
|
-
const e = new
|
|
5275
|
+
const e = new V(U.ERR_INNER, "refresh push stream url error"), t = this.url;
|
|
5285
5276
|
if (!t)
|
|
5286
5277
|
throw e;
|
|
5287
5278
|
const i = yield this.signalingManager.refreshUrl({ pushstreamurl: t });
|
|
@@ -5301,10 +5292,10 @@ const Te = (St = class extends dn {
|
|
|
5301
5292
|
const d = { type: It.Add, userid: this.userId, sessionid: "", displayname: this.name, pubid: this.publishId, resume: i, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.streamTracks, traceid: l };
|
|
5302
5293
|
return this.reportSelfDeviceStatus(), this.monitorTimerId || this.startStreamMonitor(), d;
|
|
5303
5294
|
} catch (l) {
|
|
5304
|
-
let d =
|
|
5305
|
-
if (n && (this.audioPubState.setState(Z.AliRtcStateNoPublish), d =
|
|
5295
|
+
let d = U.ERR_SDK_PUBLISH_INVAILD;
|
|
5296
|
+
if (n && (this.audioPubState.setState(Z.AliRtcStateNoPublish), d = U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), o && (this.videoPubState.setState(Z.AliRtcStateNoPublish), d = U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), c && (this.videoSmallPubState.setState(Z.AliRtcStateNoPublish), d = U.ERR_SDK_PUBLISH_DUAL_STREAM_FAILED), h && (this.screenPubState.setState(Z.AliRtcStateNoPublish), d = U.ERR_SDK_PUBLISH_SCEEN_SHARE_FAILED), l.errorCode === 15006 && s < 3)
|
|
5306
5297
|
return this.publishAdd(e, t, i, s + 1);
|
|
5307
|
-
throw
|
|
5298
|
+
throw V.fromError(l, d, "publish add failed");
|
|
5308
5299
|
}
|
|
5309
5300
|
});
|
|
5310
5301
|
}
|
|
@@ -5317,7 +5308,7 @@ const Te = (St = class extends dn {
|
|
|
5317
5308
|
const n = { type: It.Replace, userid: this.userId, sessionid: "", pubid: this.publishId, displayname: this.name, subscribe: { signal: "", pullstreamurl: this.url }, callid: this.callId, tracks: this.streamTracks };
|
|
5318
5309
|
return this.reportSelfDeviceStatus(), n;
|
|
5319
5310
|
} catch (i) {
|
|
5320
|
-
throw
|
|
5311
|
+
throw V.fromError(i, U.ERR_INNER, `publish replace failed, vMsid: ${t == null ? void 0 : t.vMsid} aMsid: ${t == null ? void 0 : t.aMsid}`);
|
|
5321
5312
|
}
|
|
5322
5313
|
});
|
|
5323
5314
|
}
|
|
@@ -5327,13 +5318,13 @@ const Te = (St = class extends dn {
|
|
|
5327
5318
|
try {
|
|
5328
5319
|
return yield this.rtsManager.publishDelete(this.url, e), this.streamTracks = this.rtsManager.publishingTracks, e.audio && this.audioPubState.setState(Z.AliRtcStateNoPublish), e.video && (e.vMsid === k.VideoSmall ? this.videoSmallPubState.setState(Z.AliRtcStateNoPublish) : this.videoPubState.setState(Z.AliRtcStateNoPublish)), e.screen && this.screenPubState.setState(Z.AliRtcStateNoPublish), t.tracks = this.streamTracks, this.reportSelfDeviceStatus(), t;
|
|
5329
5320
|
} catch (i) {
|
|
5330
|
-
throw
|
|
5321
|
+
throw V.fromError(i, U.ERR_INNER, "publish delete tracks failed");
|
|
5331
5322
|
}
|
|
5332
5323
|
});
|
|
5333
5324
|
}
|
|
5334
5325
|
publishStop() {
|
|
5335
5326
|
return I(this, null, function* () {
|
|
5336
|
-
|
|
5327
|
+
O.info(`[${St.logName}]`, "publishStop", { url: this.url });
|
|
5337
5328
|
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
5338
5329
|
try {
|
|
5339
5330
|
const t = this.hasAudioTrackInMS, i = this.hasCameraTrackInMS, s = this.hasCameraDualTrackInMS, n = this.hasScreenTrackInMS;
|
|
@@ -5343,7 +5334,7 @@ const Te = (St = class extends dn {
|
|
|
5343
5334
|
const o = { type: It.Stop, userid: this.userId, sessionid: "", displayname: this.displayname, callid: this.callId, pubid: this.publishId, subscribe: { signal: "", pullstreamurl: this.url }, tracks: [] };
|
|
5344
5335
|
return this.syncPublishToRoomServer(o, {}, e), o;
|
|
5345
5336
|
} catch (t) {
|
|
5346
|
-
throw
|
|
5337
|
+
throw V.fromError(t, U.ERR_INNER, "publish stop failed");
|
|
5347
5338
|
}
|
|
5348
5339
|
});
|
|
5349
5340
|
}
|
|
@@ -5359,7 +5350,7 @@ const Te = (St = class extends dn {
|
|
|
5359
5350
|
}
|
|
5360
5351
|
return this.dc && (this.rtsManager.publishStopDataChannel(this.url, this.dc), this.dataPubState.setState(Z.AliRtcStateNoPublish), this.dc = void 0), this.slsReporter.reportUnpublish(this.callId || "", e, 0, ""), t;
|
|
5361
5352
|
} catch (i) {
|
|
5362
|
-
throw
|
|
5353
|
+
throw V.fromError(i, U.ERR_INNER, "unpublish failed");
|
|
5363
5354
|
}
|
|
5364
5355
|
});
|
|
5365
5356
|
}
|
|
@@ -5470,9 +5461,9 @@ const Te = (St = class extends dn {
|
|
|
5470
5461
|
sendDataChannelMessage(e) {
|
|
5471
5462
|
var i;
|
|
5472
5463
|
if (!((i = this.parameter.data) != null && i.enablePubDataChannel))
|
|
5473
|
-
throw new
|
|
5464
|
+
throw new V(U.ERR_INNER, "data channel publish is not enabled");
|
|
5474
5465
|
if (!this.dc)
|
|
5475
|
-
throw new
|
|
5466
|
+
throw new V(U.ERR_INNER, "data channel is not ready");
|
|
5476
5467
|
const t = function(s, n) {
|
|
5477
5468
|
let o = 0;
|
|
5478
5469
|
const c = [];
|
|
@@ -5483,7 +5474,7 @@ const Te = (St = class extends dn {
|
|
|
5483
5474
|
return c;
|
|
5484
5475
|
}(e.toBuffer(), 1156);
|
|
5485
5476
|
t.forEach((s, n) => {
|
|
5486
|
-
const o = new
|
|
5477
|
+
const o = new Vi(new gi(s.byteLength, n === t.length - 1, n === 0 ? 1 : 0), s);
|
|
5487
5478
|
this.dc.send(o.toGRTNBuffer());
|
|
5488
5479
|
});
|
|
5489
5480
|
}
|
|
@@ -5515,7 +5506,7 @@ const Te = (St = class extends dn {
|
|
|
5515
5506
|
});
|
|
5516
5507
|
}
|
|
5517
5508
|
}, g(St, "logName", "LocalUser"), St);
|
|
5518
|
-
Ce([T()], Te.prototype, "clearPublishState", 1), Ce([T()], Te.prototype, "clear", 1), Ce([T(
|
|
5509
|
+
Ce([T()], Te.prototype, "clearPublishState", 1), Ce([T()], Te.prototype, "clear", 1), Ce([T(B)], Te.prototype, "startDefaultCameraAndMic", 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, "startCameraAndMic", 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(B)], 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(B)], 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);
|
|
5519
5510
|
let oc = Te;
|
|
5520
5511
|
var Tt = ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(Tt || {}), ae = ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(ae || {}), Jt = ((r) => (r.VideoTrackEnded = "videoTrackEnded", r.AudioTrackEnded = "audioTrackEnded", r.ScreenTrackEnded = "screenTrackEnded", r))(Jt || {});
|
|
5521
5512
|
const Sn = (r) => I(void 0, null, function* () {
|
|
@@ -5653,7 +5644,7 @@ class Li extends He {
|
|
|
5653
5644
|
updateRemoteUserDeviceStatus(e) {
|
|
5654
5645
|
let t = un.parseStatus(e);
|
|
5655
5646
|
const { audioDisable: i, videoDisable: s, screenDisable: n } = t;
|
|
5656
|
-
return this.userStatus ? (this.userStatus.audioDisable != i && (this.userStatus.audioDisable = i, this.emit(Qe.Remote, i ?
|
|
5647
|
+
return this.userStatus ? (this.userStatus.audioDisable != i && (this.userStatus.audioDisable = i, this.emit(Qe.Remote, i ? Ee.MuteAudio : Ee.UnmuteAudio)), this.userStatus.videoDisable != s && (this.userStatus.videoDisable = s, this.emit(Qe.Remote, s ? Ee.MuteVideo : Ee.UnmuteVideo)), this.userStatus.screenDisable != n && (this.userStatus.screenDisable = n, this.emit(Qe.Remote, n ? Ee.MuteScreen : Ee.UnmuteScreen))) : (this.userStatus = t, this.emit(Qe.Remote, i ? Ee.MuteAudio : Ee.UnmuteAudio), this.emit(Qe.Remote, s ? Ee.MuteVideo : Ee.UnmuteVideo), this.emit(Qe.Remote, n ? Ee.MuteScreen : Ee.UnmuteScreen)), !1;
|
|
5657
5648
|
}
|
|
5658
5649
|
}
|
|
5659
5650
|
g(Li, "logName", "RemoteStreamInfo");
|
|
@@ -5786,7 +5777,7 @@ const Ue = (Xe = class extends dn {
|
|
|
5786
5777
|
});
|
|
5787
5778
|
g(this, "onDataChannelMessage", (e) => {
|
|
5788
5779
|
var s;
|
|
5789
|
-
const t =
|
|
5780
|
+
const t = Vi.parse(e.slice(4));
|
|
5790
5781
|
let i;
|
|
5791
5782
|
if (t.body) {
|
|
5792
5783
|
if (!t.isFin)
|
|
@@ -5806,12 +5797,12 @@ const Ue = (Xe = class extends dn {
|
|
|
5806
5797
|
this.dcMsgWaitingPieces = [], i || (i = $t.parse(t.body));
|
|
5807
5798
|
} else
|
|
5808
5799
|
i = $t.parse(t.body);
|
|
5809
|
-
i ||
|
|
5800
|
+
i || O.event(`[${Xe.logName}]`, `parse data channel message fail, piece count: ${this.dcMsgWaitingPieces.length + 1}`);
|
|
5810
5801
|
}
|
|
5811
|
-
i && (
|
|
5802
|
+
i && (O.event(`[${Xe.logName}]`, `receive dc message, length(${(s = i.data) == null ? void 0 : s.byteLength})`), this.emit("remoteDataChannelMessage", this.uid, i));
|
|
5812
5803
|
});
|
|
5813
5804
|
g(this, "onDataChannelError", (e) => {
|
|
5814
|
-
this.emit("occurError",
|
|
5805
|
+
this.emit("occurError", V.fromError(e, U.ERR_SDK_SUBSCRIBE_DATA_ERROR));
|
|
5815
5806
|
});
|
|
5816
5807
|
g(this, "dataChannelConnected", (e) => {
|
|
5817
5808
|
e && (this.dc = e, this.dc.datachannel && (this.dc.datachannel.binaryType = "arraybuffer"), this.dc.off("message", this.onDataChannelMessage), this.dc.off("error", this.onDataChannelError), this.dc.on("message", this.onDataChannelMessage), this.dc.on("error", this.onDataChannelError));
|
|
@@ -5951,7 +5942,7 @@ const Ue = (Xe = class extends dn {
|
|
|
5951
5942
|
}
|
|
5952
5943
|
setViewConfig(e, t) {
|
|
5953
5944
|
if (t !== oe.AliRtcVideoTrackScreen && t !== oe.AliRtcVideoTrackCamera)
|
|
5954
|
-
throw new
|
|
5945
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "track is not AliRtcVideoTrackScreen or AliRtcVideoTrackCamera");
|
|
5955
5946
|
e ? yr(e).forEach((i) => {
|
|
5956
5947
|
i.setAttribute("playsinline", ""), Se.BrowserUtil.isMicroMessenger && (i.setAttribute("x5-video-player-type", "h5-page"), i.setAttribute("x5-playsinline", ""), Se.SystenUtil.isAndroid || Se.SystenUtil.isIos && i.setAttribute("x-webkit-airplay", "allow")), t === oe.AliRtcVideoTrackScreen ? this.viewMap.screenViews.push(i) : this.viewMap.cameraViews.push(i), this.play(i, t === oe.AliRtcVideoTrackScreen);
|
|
5957
5948
|
}) : (this.stopPlayAll(t === oe.AliRtcVideoTrackScreen), t === oe.AliRtcVideoTrackScreen ? this.viewMap.screenViews = [] : this.viewMap.cameraViews = []);
|
|
@@ -6005,9 +5996,9 @@ const Ue = (Xe = class extends dn {
|
|
|
6005
5996
|
} catch (d) {
|
|
6006
5997
|
const b = (/* @__PURE__ */ new Date()).getTime() - s;
|
|
6007
5998
|
e.audio && this.audioSubState.setState(pe.AliRtcStateNoSubscribe), e.video && this.videoSubState.setState(pe.AliRtcStateNoSubscribe), e.screen && this.screenSubState.setState(pe.AliRtcStateNoSubscribe), d && (d.message = `user(${this.uid}) subscribe error, ${(d == null ? void 0 : d.message) || ""}`);
|
|
6008
|
-
let u =
|
|
6009
|
-
e.audio && (u =
|
|
6010
|
-
const f =
|
|
5999
|
+
let u = U.ERR_INNER;
|
|
6000
|
+
e.audio && (u = U.ERR_SDK_SUBSCRIBE_AUDIO_STREAM_FAILED), e.video && (u = e.vMsid === k.VideoSmall ? U.ERR_SDK_SUBSCRIBE_DUAL_STREAM_FAILED : U.ERR_SDK_SUBSCRIBE_VIDEO_STREAM_FAILED), e.screen && (u = U.ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED), this.slsReporter.reportSubscribe(((l = this.localUser) == null ? void 0 : l.callId) || "", this.callId, !!e.video && e.vMsid === k.VideoLarge, !!e.video && e.vMsid === k.VideoSmall, !!e.screen, !!e.audio, u, "", b, { pctid: this.rtsManager.pcTraceId, subtid: "", ajsub: t === fe.Join ? 1 : 0, url: this.streamUrl, est: s });
|
|
6001
|
+
const f = V.fromError(d, u);
|
|
6011
6002
|
throw this.emit("remoteSubscribeError", f), f;
|
|
6012
6003
|
}
|
|
6013
6004
|
});
|
|
@@ -6026,7 +6017,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6026
6017
|
const { callId: n, remoteCallid: o } = this, c = { callid: n, remoteCallid: o, remoteStream: i };
|
|
6027
6018
|
return e.audio && (this.audioLevelMonitor.stop(), this.stopPlayAudio(), this.audioTrack = void 0), this.streamInfo.updateRemoteTrackSubState({ audio: e.audio !== !0 && void 0, video: e.video !== !0 && void 0, screen: e.screen !== !0 && void 0, vMsid: e.vMsid }), c;
|
|
6028
6019
|
} catch (t) {
|
|
6029
|
-
throw
|
|
6020
|
+
throw V.fromError(t, U.ERR_INNER, "subscribe delete failed");
|
|
6030
6021
|
}
|
|
6031
6022
|
});
|
|
6032
6023
|
}
|
|
@@ -6070,7 +6061,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6070
6061
|
return this.callId = "", h;
|
|
6071
6062
|
} catch (h) {
|
|
6072
6063
|
if (((c = (o = (n = (s = h == null ? void 0 : h.extraInfo) == null ? void 0 : s.parsedData) == null ? void 0 : n.streams) == null ? void 0 : o[0]) == null ? void 0 : c.res_code) !== 404)
|
|
6073
|
-
throw
|
|
6064
|
+
throw V.fromError(h, U.ERR_INNER, "subscribe stop failed");
|
|
6074
6065
|
}
|
|
6075
6066
|
});
|
|
6076
6067
|
}
|
|
@@ -6081,7 +6072,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6081
6072
|
if (e.mediaStream) {
|
|
6082
6073
|
n = document.createElement("video");
|
|
6083
6074
|
const o = () => {
|
|
6084
|
-
|
|
6075
|
+
O.event(`uid: ${this.userId} new mediaStream canplay`), n && n.removeEventListener("canplaythrough", o, !1), n = void 0, clearTimeout(s), i(!0);
|
|
6085
6076
|
};
|
|
6086
6077
|
n.addEventListener("canplaythrough", o, !1), (n._playPromise || Promise.resolve()).then(() => {
|
|
6087
6078
|
n && e.mediaStream && (n.srcObject = e.mediaStream);
|
|
@@ -6089,7 +6080,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6089
6080
|
} else
|
|
6090
6081
|
i(!0);
|
|
6091
6082
|
s = window.setTimeout(() => {
|
|
6092
|
-
|
|
6083
|
+
O.event(`uid: ${this.userId} new mediaStream timeout`), n = void 0, i(!0);
|
|
6093
6084
|
}, 3e3);
|
|
6094
6085
|
}), this.updateSubscribe(fe.User)), this.stream = e, this.playAll(!1, t), !this.subscribed && e && (this.subscribed = !0), e.hasAudio && this.isAudioSubscribing && e.enableAudio(), e.hasVideo && this.isVideoSubscribing && e.enableVideo();
|
|
6095
6086
|
});
|
|
@@ -6116,7 +6107,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6116
6107
|
return this.dataChannelConnected(e), this.dataSubState.setState(pe.AliRtcStateSubscribed), void this.streamInfo.updateRemoteTrackSubState({ data: !0 });
|
|
6117
6108
|
throw new Error("no dc founded");
|
|
6118
6109
|
}).catch((e) => {
|
|
6119
|
-
const t =
|
|
6110
|
+
const t = V.fromError(e, U.ERR_INNER, "subscribe data failed");
|
|
6120
6111
|
this.emit("remoteSubscribeError", t), this.dataSubState.setState(pe.AliRtcStateNoSubscribe);
|
|
6121
6112
|
}));
|
|
6122
6113
|
}
|
|
@@ -6147,7 +6138,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6147
6138
|
var n, o, c, h, l, d, b, u, f, p, m, S, R, _, y, v, w;
|
|
6148
6139
|
const t = Date.now(), i = {}, s = {};
|
|
6149
6140
|
if (this.wantSubAudio && !this.isAudioSubscribing && ((n = this.streamInfo) != null && n.hasAudio) ? (i.audio = !0, i.aMsid = ((o = this.streamInfo.getAudioInfo()) == null ? void 0 : o.msid) || k.Audio) : this.wantSubAudio && ((c = this.streamInfo) != null && c.hasAudio) || !this.isAudioSubscribing || (s.audio = !0, s.aMsid = ((h = this.streamInfo.getAudioInfo()) == null ? void 0 : h.msid) || k.Audio), this.wantSubVideo && ((l = this.streamInfo) != null && l.hasVideo) ? (this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && !this.isVideoSmallSubscribing && ((d = this.streamInfo) != null && d.hasVideoSmall) ? (i.video = !0, i.vMsid = k.VideoSmall) : this.isVideoLargeSubscribing || !((b = this.streamInfo) != null && b.hasVideoLarge) || this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && this.isVideoSmallSubscribing || (i.video = !0, i.vMsid = ((u = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : u.msid) || k.VideoLarge), this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeLow && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall ? (s.video = !0, s.vMsid = k.VideoLarge) : this.defaultVideoStreamType === Ke.AliRtcVideoStreamTypeHigh && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && (s.video = !0, s.vMsid = k.VideoSmall)) : this.wantSubVideo && ((f = this.streamInfo) != null && f.hasVideo) || !this.isVideoSubscribing || (s.video = !0, s.vMsid = this.streamInfo.isVideoSmallSubscribed || this.streamInfo.isVideoSmallSubscribing ? k.VideoSmall : ((p = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : p.msid) || k.VideoLarge), this.wantSubScreen && !this.isScreenSubscribing && ((m = this.streamInfo) != null && m.hasScreen) ? i.screen = !0 : this.wantSubScreen && ((S = this.streamInfo) != null && S.hasScreen) || !this.isScreenSubscribing || (s.screen = !0), (R = this.parameter.data) != null && R.enableSubDataChannel && !this.isDataSubscribing && ((_ = this.streamInfo) != null && _.hasData) ? i.data = !0 : (y = this.parameter.data) != null && y.enableSubDataChannel && ((v = this.streamInfo) != null && v.hasData) || !this.isDataSubscribing || (s.data = !0), (i.audio || i.video || i.screen || i.data) && (this.createCallId(), this.subscribe(i, e, t)), (s.audio || s.video || s.screen) && this.subscribeDeleteTracks(s), e === fe.Reconnect) {
|
|
6150
|
-
if (
|
|
6141
|
+
if (O.event(`[${Xe.logName}]`, "reconnect, try to resume"), this.streamInfo.hasData && !i.data) {
|
|
6151
6142
|
const A = this.rtsManager.getDatachannelByMsid({ url: this.streamUrl, msid: this.streamInfo.getDataInfo().msid || k.Data });
|
|
6152
6143
|
this.dataChannelConnected(A);
|
|
6153
6144
|
}
|
|
@@ -6167,7 +6158,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6167
6158
|
return { addOption: i, deleteOption: s };
|
|
6168
6159
|
}
|
|
6169
6160
|
handleAutoPlayFailed() {
|
|
6170
|
-
|
|
6161
|
+
O.event(`[${Xe.logName}]`, "auto play failed"), this.emit("remoteAudioAutoPlayFail", this.uid);
|
|
6171
6162
|
const e = () => {
|
|
6172
6163
|
this.resumeAudio().then(() => {
|
|
6173
6164
|
document.removeEventListener("click", e, !1), document.removeEventListener("touchstart", e, !1);
|
|
@@ -6188,14 +6179,14 @@ const Ue = (Xe = class extends dn {
|
|
|
6188
6179
|
return I(this, null, function* () {
|
|
6189
6180
|
var e, t;
|
|
6190
6181
|
if (this.audioTrack) {
|
|
6191
|
-
if (this.toggleAudio(!this.audioMuted), this.audioElement || (
|
|
6182
|
+
if (this.toggleAudio(!this.audioMuted), this.audioElement || (O.event(`[${Xe.logName}]`, this.userId, "create audio element"), this.audioElement = document.createElement("audio"), this.audioElement.setAttribute("autoplay", "autoplay"), this.audioElement.addEventListener("pause", this.handleAudioPaused), this.setPlayoutVolume(this.playoutVolume)), ((t = (e = this.audioElement.srcObject) == null ? void 0 : e.getAudioTracks()) == null ? void 0 : t[0]) !== this.audioTrack) {
|
|
6192
6183
|
let i = this.audioElement.srcObject;
|
|
6193
6184
|
i ? i.getAudioTracks().forEach((s) => {
|
|
6194
6185
|
i.removeTrack(s);
|
|
6195
6186
|
}) : (i = new MediaStream(), this.audioElement.srcObject = i), i.addTrack(this.audioTrack);
|
|
6196
6187
|
}
|
|
6197
6188
|
if (Se.SystenUtil.isIos && parseInt(Se.SystenUtil.systemVersion) <= 13) {
|
|
6198
|
-
|
|
6189
|
+
O.event(`[${Xe.logName}]`, "play audio for iOS 13-");
|
|
6199
6190
|
const i = this.audioElement;
|
|
6200
6191
|
i.setAttribute("autoplay", "");
|
|
6201
6192
|
const s = () => {
|
|
@@ -6207,14 +6198,14 @@ const Ue = (Xe = class extends dn {
|
|
|
6207
6198
|
} else
|
|
6208
6199
|
(() => {
|
|
6209
6200
|
var i;
|
|
6210
|
-
|
|
6211
|
-
|
|
6201
|
+
O.event(`[${Xe.logName}]`, "try play audio"), (i = this.audioElement) == null || i.play().then(() => {
|
|
6202
|
+
O.event(`[${Xe.logName}]`, "play audio success");
|
|
6212
6203
|
}).catch(() => {
|
|
6213
6204
|
this.handleAutoPlayFailed();
|
|
6214
6205
|
});
|
|
6215
6206
|
})();
|
|
6216
6207
|
} else
|
|
6217
|
-
|
|
6208
|
+
O.event(`[${Xe.logName}]`, this.userId, "audio track is null");
|
|
6218
6209
|
});
|
|
6219
6210
|
}
|
|
6220
6211
|
stopPlayAudio() {
|
|
@@ -6322,7 +6313,7 @@ const Ue = (Xe = class extends dn {
|
|
|
6322
6313
|
});
|
|
6323
6314
|
}
|
|
6324
6315
|
}, g(Xe, "logName", "RemoteUser"), Xe);
|
|
6325
|
-
ze([T()], Ue.prototype, "clear", 1), ze([T()], Ue.prototype, "updateRemoteUserDeviceStatus", 1), ze([T()], Ue.prototype, "updateRemoteTracks", 1), ze([T(
|
|
6316
|
+
ze([T()], Ue.prototype, "clear", 1), ze([T()], Ue.prototype, "updateRemoteUserDeviceStatus", 1), ze([T()], Ue.prototype, "updateRemoteTracks", 1), ze([T(B)], Ue.prototype, "subscribe", 1), ze([T()], Ue.prototype, "subscribeProxy", 1), ze([T(B)], Ue.prototype, "subscribeDeleteProxy", 1), ze([T()], Ue.prototype, "restore", 1), ze([T(B)], Ue.prototype, "resumeAudio", 1), ze([T(B)], Ue.prototype, "stopSubscribe", 1), ze([T(B)], 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);
|
|
6326
6317
|
let pc = Ue;
|
|
6327
6318
|
var Mt = ((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))(Mt || {});
|
|
6328
6319
|
class mc extends He {
|
|
@@ -6332,13 +6323,13 @@ class mc extends He {
|
|
|
6332
6323
|
}
|
|
6333
6324
|
add(e, t) {
|
|
6334
6325
|
if (this.plugins.has(e.name))
|
|
6335
|
-
throw new
|
|
6326
|
+
throw new V(Mt.AliRtcPluginErrorCreateError, `Plugin ${e.name} already exists`);
|
|
6336
6327
|
this.plugins.set(e.name, e), t && e.setOptions(t), this.emit("added", e), e.on("enabled", () => this.emit("added", e)), e.on("disabled", () => this.emit("removed", e)), e.on("updated", () => this.emit("updated", e));
|
|
6337
6328
|
}
|
|
6338
6329
|
remove(e) {
|
|
6339
6330
|
const t = this.plugins.get(e);
|
|
6340
6331
|
if (!t)
|
|
6341
|
-
throw new
|
|
6332
|
+
throw new V(Mt.AliRtcPluginErrorNoFindPlugin, `Plugin ${e} not founded`);
|
|
6342
6333
|
this.plugins.delete(e), t.removeAllListeners(), this.emit("removed", t);
|
|
6343
6334
|
}
|
|
6344
6335
|
removeAll() {
|
|
@@ -6365,8 +6356,8 @@ const wi = ([r]) => {
|
|
|
6365
6356
|
const { remoteUser: a, options: e } = r;
|
|
6366
6357
|
return [`user(${a.userId})`, e];
|
|
6367
6358
|
};
|
|
6368
|
-
var
|
|
6369
|
-
const De = (
|
|
6359
|
+
var Ne;
|
|
6360
|
+
const De = (Ne = class extends He {
|
|
6370
6361
|
constructor(e, t, i) {
|
|
6371
6362
|
super();
|
|
6372
6363
|
g(this, "rts");
|
|
@@ -6392,21 +6383,21 @@ const De = (Ve = class extends He {
|
|
|
6392
6383
|
addRTSListener() {
|
|
6393
6384
|
this.rts.on("connectStatusChange", (e) => {
|
|
6394
6385
|
var t, i, s, n;
|
|
6395
|
-
if (
|
|
6386
|
+
if (O.event(`[${Ne.logName}]`, "rts connectStatusChange to:", e.status), e.status === Jr.CONNECT_STATUS_DISCONNECTED)
|
|
6396
6387
|
this.dcReject && this.dcReject(), this.setConnected(!1), this.slsReporter.reportWarning("rts disconnected"), this.emit("disconnected");
|
|
6397
6388
|
else if (e.status === Jr.CONNECT_STATUS_CONNECTED) {
|
|
6398
6389
|
const o = (n = (s = (i = (t = this.rts.commonController) == null ? void 0 : t.peerCore) == null ? void 0 : i.getSignal()) == null ? void 0 : s.getDatachannelCore()) == null ? void 0 : n.readyState;
|
|
6399
|
-
|
|
6390
|
+
O.event(`[${Ne.logName}]`, "dcReadyState:", o), o === "open" && this.dcResolve && this.dcResolve(!0), this.setConnected(!0);
|
|
6400
6391
|
}
|
|
6401
6392
|
}), this.rts.on("reconnectFinish", () => {
|
|
6402
|
-
|
|
6393
|
+
O.event(`[${Ne.logName}]`, "rts reconnectFinish");
|
|
6403
6394
|
try {
|
|
6404
6395
|
this.emit("connected", !0, this._rtsPeerConnectionType);
|
|
6405
6396
|
} catch (e) {
|
|
6406
|
-
|
|
6397
|
+
O.error(`[${Ne.logName}]`, "emit connected error:", e);
|
|
6407
6398
|
}
|
|
6408
6399
|
}), this.rts.on("datachannelStatusChange", (e) => {
|
|
6409
|
-
|
|
6400
|
+
O.event(`[${Ne.logName}]`, "rts datachannelStatusChange to:", e.status), e.status === Gr.DATACHANNEL_STATUS_OPEN ? this.dcResolve && this.dcResolve(!0) : e.status === Gr.DATACHANNEL_STATUS_CLOSE && (this.dcReject && this.dcReject(), this.dcConnectingPromise = new Promise((t, i) => {
|
|
6410
6401
|
this.dcResolve = t, this.dcReject = i;
|
|
6411
6402
|
}));
|
|
6412
6403
|
}), this.rts.on("receivedSEI", (e) => {
|
|
@@ -6418,9 +6409,9 @@ const De = (Ve = class extends He {
|
|
|
6418
6409
|
} catch (i) {
|
|
6419
6410
|
}
|
|
6420
6411
|
}), this.rts.on("onError", (e) => {
|
|
6421
|
-
|
|
6412
|
+
O.event(`[${Ne.logName}]`, "rts onError event:", e);
|
|
6422
6413
|
}), this.rts.on("reconnect", (e) => {
|
|
6423
|
-
|
|
6414
|
+
O.event(`[${Ne.logName}]`, "rts reconnect event:", e);
|
|
6424
6415
|
});
|
|
6425
6416
|
}
|
|
6426
6417
|
updateAuth(e) {
|
|
@@ -6498,7 +6489,7 @@ const De = (Ve = class extends He {
|
|
|
6498
6489
|
this.startConnect();
|
|
6499
6490
|
const { publishStream: l, videoSmallStream: d, screenStream: b, vMsid: u } = yield this.localStreamManager.createHTTPPublishStream();
|
|
6500
6491
|
if (!l)
|
|
6501
|
-
return
|
|
6492
|
+
return O.warn(`[${Ne.logName}]`, "publishStream is null"), { traceId: "", l1ip: c };
|
|
6502
6493
|
const f = this.getPubMsid(l, { vMsid: u });
|
|
6503
6494
|
this.encodedInsertableStreams && (f.encodedInsertableStreams = !0), f.answerSdpHook = (A) => {
|
|
6504
6495
|
const E = /\d+\.\d+\.\d+\.\d+(?=\s+1106|\s+8000)/.exec(A);
|
|
@@ -6513,14 +6504,14 @@ const De = (Ve = class extends He {
|
|
|
6513
6504
|
const E = 2e3 - (Date.now() - R);
|
|
6514
6505
|
throw E <= 0 ? this.emit("disconnected") : setTimeout(() => {
|
|
6515
6506
|
this.emit("disconnected");
|
|
6516
|
-
}, E), this.slsReporter.reportPublish(i, e, t, l.hasVideo && (!u || u === k.VideoLarge), l.hasVideo && u === k.VideoSmall, l.hasVideo && u === k.Screen, l.hasAudio, (A == null ? void 0 : A.errorCode) || -1, this.pcTraceId, "", R),
|
|
6507
|
+
}, E), this.slsReporter.reportPublish(i, e, t, l.hasVideo && (!u || u === k.VideoLarge), l.hasVideo && u === k.VideoSmall, l.hasVideo && u === k.Screen, l.hasAudio, (A == null ? void 0 : A.errorCode) || -1, this.pcTraceId, "", R), V.fromRtsError(A);
|
|
6517
6508
|
}
|
|
6518
|
-
|
|
6509
|
+
O.event(`[${Ne.logName}]`, "rts publish success", S), this.slsReporter.reportPublish(i, e, t, l.hasVideo && (!u || u === k.VideoLarge), l.hasVideo && u === k.VideoSmall, l.hasVideo && u === k.Screen, l.hasAudio, 0, S, S, R), this.slsReporter.reportConnectionLatencyEvent(at.HANDLE_PUB_TASK, ht.START, t, S, h), this.slsReporter.reportConnectionLatencyEvent(at.HANDLE_PUB_TASK, ht.END, t, S, Date.now());
|
|
6519
6510
|
try {
|
|
6520
6511
|
const A = Date.now();
|
|
6521
6512
|
return this._pcTraceId = S, this.setConnected(!0), this._publishingTracks = this.rts.getPublishTrackInfoList(), d && (yield this.publishAdd(e, d, t, { vMsid: k.VideoSmall }, i), p = !1, m = k.VideoSmall), b && (yield this.publishAdd(e, b, t, { vMsid: k.Screen }, i), p = !1, m = k.Screen), yield this.waitPublishSender(e, p, m), this.slsReporter.reportPublishFirstPacket(i, t, R, A, this._localJoinTime, p ? k.Audio : f.vMsid, S || "", S || "", s), { traceId: S, l1ip: c };
|
|
6522
6513
|
} catch (A) {
|
|
6523
|
-
throw this.setConnected(!1),
|
|
6514
|
+
throw this.setConnected(!1), V.fromError(A);
|
|
6524
6515
|
}
|
|
6525
6516
|
});
|
|
6526
6517
|
}
|
|
@@ -6551,14 +6542,14 @@ const De = (Ve = class extends He {
|
|
|
6551
6542
|
const u = Date.now(), f = this.getPubMsid(t, s);
|
|
6552
6543
|
try {
|
|
6553
6544
|
const A = yield Ba((E) => I(this, null, function* () {
|
|
6554
|
-
return E > 0 &&
|
|
6545
|
+
return E > 0 && O.event(`[${Ne.logName}]`, `publishAdd retry times: ${E}`), this.isConnected ? (yield this.dcConnectingPromise, this.rts.publishAdd([$({ url: e, stream: t, updateSourceStream: !1 }, f)])) : Promise.reject(new V(U.ERR_INNER, "rts not connected"));
|
|
6555
6546
|
}), 5, 0, (E) => (E == null ? void 0 : E.errorCode) === 15006);
|
|
6556
6547
|
if (A) {
|
|
6557
6548
|
const E = Date.now(), [C] = A;
|
|
6558
6549
|
return this.slsReporter.reportPublish(!1, e, i, ((p = f.vMsid) == null ? void 0 : p[0]) === k.VideoLarge, ((m = f.vMsid) == null ? void 0 : m[0]) === k.VideoSmall, ((S = f.vMsid) == null ? void 0 : S[0]) === k.Screen, ((R = f.aMsid) == null ? void 0 : R[0]) === k.Audio, 0, this.pcTraceId, C.traceId || "", u), this.updatePublishingTracks(C.trackInfoList), o && (yield this.waitPublishSender(e, !t.hasVideo, t.hasVideo ? s == null ? void 0 : s.vMsid : s == null ? void 0 : s.aMsid)), this.slsReporter.reportPublishFirstPacket(n, i, u, E, this._localJoinTime, (t.hasVideo ? s == null ? void 0 : s.vMsid : s == null ? void 0 : s.aMsid) || "", this.pcTraceId, C.traceId || "", c), C.traceId || "";
|
|
6559
6550
|
}
|
|
6560
6551
|
} catch (A) {
|
|
6561
|
-
throw this.slsReporter.reportPublish(!1, e, i, ((_ = f.vMsid) == null ? void 0 : _[0]) === k.VideoLarge, ((y = f.vMsid) == null ? void 0 : y[0]) === k.VideoSmall, ((v = f.vMsid) == null ? void 0 : v[0]) === k.Screen, ((w = f.aMsid) == null ? void 0 : w[0]) === k.Audio, (A == null ? void 0 : A.errorCode) || -1, this.pcTraceId, "", u), A != null && A.errorCode ?
|
|
6552
|
+
throw this.slsReporter.reportPublish(!1, e, i, ((_ = f.vMsid) == null ? void 0 : _[0]) === k.VideoLarge, ((y = f.vMsid) == null ? void 0 : y[0]) === k.VideoSmall, ((v = f.vMsid) == null ? void 0 : v[0]) === k.Screen, ((w = f.aMsid) == null ? void 0 : w[0]) === k.Audio, (A == null ? void 0 : A.errorCode) || -1, this.pcTraceId, "", u), A != null && A.errorCode ? V.fromRtsError(A) : V.fromError(A);
|
|
6562
6553
|
}
|
|
6563
6554
|
return "";
|
|
6564
6555
|
});
|
|
@@ -6570,12 +6561,12 @@ const De = (Ve = class extends He {
|
|
|
6570
6561
|
const i = (l = (h = this.publishingTracks) == null ? void 0 : h.find(({ msid: S }) => S === k.Audio)) == null ? void 0 : l.msid, s = (b = (d = this.publishingTracks) == null ? void 0 : d.find(({ msid: S }) => S === k.VideoLarge)) == null ? void 0 : b.msid, n = (f = (u = this.publishingTracks) == null ? void 0 : u.find(({ msid: S }) => S === k.Screen)) == null ? void 0 : f.msid, o = [];
|
|
6571
6562
|
t.screen && n ? o.push(n) : t.video && o.push(t.vMsid || s);
|
|
6572
6563
|
const c = [];
|
|
6573
|
-
t.audio && i && c.push(i),
|
|
6564
|
+
t.audio && i && c.push(i), O.event(Ne.logName, "publishDelete", { streamUrl: e, aMsid: c, vMsid: o });
|
|
6574
6565
|
try {
|
|
6575
6566
|
const [S] = (yield this.rts.publishDeleteTracks([{ url: e, aMsid: c, vMsid: o }])) || [];
|
|
6576
|
-
return
|
|
6567
|
+
return O.event(Ne.logName, "publishDelete", { result: S }), S && this.updatePublishingTracks(S.trackInfoList), ((m = (p = S == null ? void 0 : S.trackInfoList) == null ? void 0 : p[0]) == null ? void 0 : m.trackId) || "";
|
|
6577
6568
|
} catch (S) {
|
|
6578
|
-
throw
|
|
6569
|
+
throw V.fromRtsError(S);
|
|
6579
6570
|
}
|
|
6580
6571
|
});
|
|
6581
6572
|
}
|
|
@@ -6588,7 +6579,7 @@ const De = (Ve = class extends He {
|
|
|
6588
6579
|
const h = yield this.rts.publishReplaceTracks([{ url: e, stream: t, vMsid: s, aMsid: n }]), [l] = h;
|
|
6589
6580
|
return this.updatePublishingTracks(l.trackInfoList), ((c = (o = l == null ? void 0 : l.trackInfoList) == null ? void 0 : o[0]) == null ? void 0 : c.trackId) || "";
|
|
6590
6581
|
} catch (h) {
|
|
6591
|
-
throw
|
|
6582
|
+
throw V.fromRtsError(h);
|
|
6592
6583
|
}
|
|
6593
6584
|
});
|
|
6594
6585
|
}
|
|
@@ -6641,7 +6632,7 @@ const De = (Ve = class extends He {
|
|
|
6641
6632
|
const p = yield this.rts.subscribe(nr(s), n);
|
|
6642
6633
|
return this._pcTraceId = p.traceId, this.setConnected(!0), { traceId: p.traceId, stream: p };
|
|
6643
6634
|
} catch (p) {
|
|
6644
|
-
throw this.setConnected(!1), this.emit("disconnected"),
|
|
6635
|
+
throw this.setConnected(!1), this.emit("disconnected"), V.fromRtsError(p);
|
|
6645
6636
|
}
|
|
6646
6637
|
});
|
|
6647
6638
|
}
|
|
@@ -6652,12 +6643,15 @@ const De = (Ve = class extends He {
|
|
|
6652
6643
|
yield this.dcConnectingPromise;
|
|
6653
6644
|
try {
|
|
6654
6645
|
return (yield Ba((l) => I(this, null, function* () {
|
|
6655
|
-
return yield this.dcConnectingPromise, l > 0 &&
|
|
6656
|
-
}), 5, 0, (l) =>
|
|
6646
|
+
return yield this.dcConnectingPromise, l > 0 && O.event(`[${Ne.logName}]`, `subscribeAdd retry times: ${l}`), this.isConnected ? this.rts.subscribeAdd([s]) : Promise.reject();
|
|
6647
|
+
}), 5, 0, (l) => {
|
|
6648
|
+
var d, b, u, f;
|
|
6649
|
+
return (l == null ? void 0 : l.errorCode) === 15006 || (l == null ? void 0 : l.errorCode) === 15004 && ((f = (u = (b = (d = l.extraInfo) == null ? void 0 : d.parsedData) == null ? void 0 : b.streams) == null ? void 0 : u[0]) == null ? void 0 : f.res_code) === 404;
|
|
6650
|
+
}))[0];
|
|
6657
6651
|
} catch (l) {
|
|
6658
6652
|
if (((h = (c = (o = (n = l == null ? void 0 : l.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : o.streams) == null ? void 0 : c[0]) == null ? void 0 : h.res_code) === 508)
|
|
6659
6653
|
return this.emit("subscribeexceeds"), null;
|
|
6660
|
-
throw
|
|
6654
|
+
throw V.fromRtsError(l);
|
|
6661
6655
|
}
|
|
6662
6656
|
});
|
|
6663
6657
|
}
|
|
@@ -6667,11 +6661,11 @@ const De = (Ve = class extends He {
|
|
|
6667
6661
|
const { remoteUser: t, options: i } = e, s = ut($({ url: t.streamUrl, subAudio: !!i.audio, subVideo: !(!i.screen && !i.video) }, this.getSubConfig(t.streamInfo, i)), { targetStream: i.screen ? t.getScreenStream : t.getCameraStream });
|
|
6668
6662
|
yield this.dcConnectingPromise;
|
|
6669
6663
|
try {
|
|
6670
|
-
return (yield this.rts.subscribeDeleteTracks([s]))[0];
|
|
6664
|
+
return O.event(`[${Ne.logName}]`, "subscribeDeleteTracks", JSON.stringify({ url: s.url, subAudio: s.subAudio, subVideo: s.subVideo, aMsid: s.aMsid, vMsid: s.vMsid })), (yield this.rts.subscribeDeleteTracks([s]))[0];
|
|
6671
6665
|
} catch (l) {
|
|
6672
6666
|
if (((h = (c = (o = (n = l == null ? void 0 : l.extraInfo) == null ? void 0 : n.parsedData) == null ? void 0 : o.streams) == null ? void 0 : c[0]) == null ? void 0 : h.res_code) === 404)
|
|
6673
6667
|
return;
|
|
6674
|
-
throw
|
|
6668
|
+
throw V.fromRtsError(l);
|
|
6675
6669
|
}
|
|
6676
6670
|
});
|
|
6677
6671
|
}
|
|
@@ -6683,7 +6677,7 @@ const De = (Ve = class extends He {
|
|
|
6683
6677
|
} catch (o) {
|
|
6684
6678
|
if (((n = (s = (i = (t = o == null ? void 0 : o.extraInfo) == null ? void 0 : t.parsedData) == null ? void 0 : i.streams) == null ? void 0 : s[0]) == null ? void 0 : n.res_code) === 404)
|
|
6685
6679
|
return;
|
|
6686
|
-
throw
|
|
6680
|
+
throw V.fromRtsError(o);
|
|
6687
6681
|
}
|
|
6688
6682
|
});
|
|
6689
6683
|
}
|
|
@@ -6734,7 +6728,7 @@ const De = (Ve = class extends He {
|
|
|
6734
6728
|
let o = !1;
|
|
6735
6729
|
const { options: c, remoteUser: h } = e;
|
|
6736
6730
|
if (c.video && c.screen)
|
|
6737
|
-
throw new
|
|
6731
|
+
throw new V(U.ERR_INNER, "subscribe error, video and screen cannot be subscribed at the same time");
|
|
6738
6732
|
let l;
|
|
6739
6733
|
this.connecting && (yield this.connectingPromise);
|
|
6740
6734
|
let d = Date.now();
|
|
@@ -6753,7 +6747,7 @@ const De = (Ve = class extends He {
|
|
|
6753
6747
|
else if (!f)
|
|
6754
6748
|
return w < y && (w++, new Promise((x) => setTimeout(() => x(A()), v)));
|
|
6755
6749
|
return !0;
|
|
6756
|
-
})), f && !R && (E = this.rts.getSubscribeVideoStats(h.streamUrl, u).then((C) => (C.packetsReceived > 0 && (S = Date.now()), C.framesDecoded > 0 ? (R = Date.now(), !0) : w < y ? (w++, new Promise((x) => setTimeout(() => x(A()), v))) : (
|
|
6750
|
+
})), f && !R && (E = this.rts.getSubscribeVideoStats(h.streamUrl, u).then((C) => (C.packetsReceived > 0 && (S = Date.now()), C.framesDecoded > 0 ? (R = Date.now(), !0) : w < y ? (w++, new Promise((x) => setTimeout(() => x(A()), v))) : (O.event(`[${Ne.logName}]`, h.userId, "尝试获取首帧数据失败"), !1)))), Promise.resolve(E);
|
|
6757
6751
|
};
|
|
6758
6752
|
return A();
|
|
6759
6753
|
})(40, 100);
|
|
@@ -6789,8 +6783,8 @@ const De = (Ve = class extends He {
|
|
|
6789
6783
|
return this.rts.sendSEI({ url: e, vMsid: k.VideoLarge, data: t, repeatCount: i, payloadType: s });
|
|
6790
6784
|
});
|
|
6791
6785
|
}
|
|
6792
|
-
}, g(
|
|
6793
|
-
Me([T(
|
|
6786
|
+
}, g(Ne, "logName", "RtsManager"), Ne);
|
|
6787
|
+
Me([T(B)], De.prototype, "startConnect", 1), Me([T()], De.prototype, "updatePublishingTracks", 1), Me([T(B, B)], De.prototype, "httpPublish", 1), Me([T(B, B)], De.prototype, "waitPublishSender", 1), Me([T(([r, a, e]) => [r, JSON.stringify(e)], B)], De.prototype, "publishAdd", 1), Me([T(B, B)], De.prototype, "publishDelete", 1), Me([T(([r, a, e]) => [r, JSON.stringify(e)])], De.prototype, "publishReplace", 1), Me([T(B)], De.prototype, "publishStop", 1), Me([T(B)], De.prototype, "publishAddDataChannel", 1), Me([T(B)], De.prototype, "publishStopDataChannel", 1), Me([T()], De.prototype, "unpublish", 1), Me([T(wi, ({ traceId: r }) => r)], De.prototype, "httpSubscribe", 1), Me([T(wi, ({ traceId: r }) => r)], De.prototype, "subscribeAdd", 1), Me([T(wi)], De.prototype, "subscribeDelete", 1), Me([T(B)], De.prototype, "subscibeStop", 1), Me([T(B)], De.prototype, "subscribeAddDataChannel", 1), Me([T(B)], De.prototype, "subscribeStopDatachannel", 1), Me([T(B)], De.prototype, "publish", 1), Me([T(wi)], De.prototype, "subscribe", 1), Me([T()], De.prototype, "sendSEI", 1);
|
|
6794
6788
|
let Sc = De;
|
|
6795
6789
|
class cr {
|
|
6796
6790
|
constructor(a = vr) {
|
|
@@ -6872,7 +6866,7 @@ class Fa extends He {
|
|
|
6872
6866
|
return I(this, null, function* () {
|
|
6873
6867
|
var o, c, h, l, d, b;
|
|
6874
6868
|
const { videoTrack: s, audioTrack: n } = e;
|
|
6875
|
-
s && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type ===
|
|
6869
|
+
s && ((o = this.originVideoTrack) == null || o.removeEventListener("ended", this.onVideoTrackEnded)), n && ((c = this.originAudioTrack) == null || c.removeEventListener("ended", this.onAudioTrackEnded)), this.type === xe.AliRtcSdkStreamTypeScreen ? this.stop() : (s && ((h = this.originVideoTrack) == null || h.stop()), n && ((l = this.originAudioTrack) == null || l.stop())), s && (this.originVideoTrack = s, (d = this.originVideoTrack) == null || d.addEventListener("ended", this.onVideoTrackEnded), this.videoSource = t || ui.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));
|
|
6876
6870
|
});
|
|
6877
6871
|
}
|
|
6878
6872
|
get currentProfile() {
|
|
@@ -6955,7 +6949,7 @@ class Fa extends He {
|
|
|
6955
6949
|
}
|
|
6956
6950
|
updateVideoProfile(e, t, i = !1) {
|
|
6957
6951
|
return I(this, null, function* () {
|
|
6958
|
-
this._profileManager || (this._profileManager = new cr(this.type ===
|
|
6952
|
+
this._profileManager || (this._profileManager = new cr(this.type === xe.AliRtcSdkStreamTypeScreen ? Va : vr)), e && this._profileManager.updateProfile(e, t), yield this._profileManager.setVideoProfile(this.originVideoTrack, this._publishVideoStream, i);
|
|
6959
6953
|
});
|
|
6960
6954
|
}
|
|
6961
6955
|
get videoProfile() {
|
|
@@ -6963,7 +6957,7 @@ class Fa extends He {
|
|
|
6963
6957
|
return (e = this.profileManager) == null ? void 0 : e.videoProfile;
|
|
6964
6958
|
}
|
|
6965
6959
|
setVideoContentHint(e) {
|
|
6966
|
-
this._profileManager || (this._profileManager = new cr(this.type ===
|
|
6960
|
+
this._profileManager || (this._profileManager = new cr(this.type === xe.AliRtcSdkStreamTypeScreen ? Va : vr)), this._profileManager.setContentHint(this.currentVideoTrack, e);
|
|
6967
6961
|
}
|
|
6968
6962
|
updateAudioProfile(e) {
|
|
6969
6963
|
return I(this, null, function* () {
|
|
@@ -6997,8 +6991,8 @@ const ct = (Lt = class extends He {
|
|
|
6997
6991
|
g(this, "slsReporter");
|
|
6998
6992
|
g(this, "publishingCameraVideoStream");
|
|
6999
6993
|
g(this, "publishingScreenVideoStream");
|
|
7000
|
-
g(this, "cameraStreamInfo", new Fa(
|
|
7001
|
-
g(this, "screenStreamInfo", new Fa(
|
|
6994
|
+
g(this, "cameraStreamInfo", new Fa(xe.AliRtcSdkStreamTypeCapture));
|
|
6995
|
+
g(this, "screenStreamInfo", new Fa(xe.AliRtcSdkStreamTypeScreen));
|
|
7002
6996
|
g(this, "streamInfos", [this.cameraStreamInfo, this.screenStreamInfo]);
|
|
7003
6997
|
g(this, "_audioCaptureDisabled", !1);
|
|
7004
6998
|
g(this, "_cameraCaptureDisabled", !1);
|
|
@@ -7012,14 +7006,14 @@ const ct = (Lt = class extends He {
|
|
|
7012
7006
|
})), this.screenStreamInfo.on("videotrackended", () => I(this, null, function* () {
|
|
7013
7007
|
yield this.stopLocalStream({ screen: !0 }), this.emit("trackended", Jt.ScreenTrackEnded);
|
|
7014
7008
|
})), this.pluginManager.on("added", (i) => I(this, null, function* () {
|
|
7015
|
-
if (
|
|
7009
|
+
if (O.info(`[${Lt.logName}]`, "plugin added", i.name), !i.isSupported("7.1.4"))
|
|
7016
7010
|
return console.warn(`${i.name} is not supported!!!`), void i.emit("unsupported");
|
|
7017
7011
|
try {
|
|
7018
7012
|
yield i.init();
|
|
7019
7013
|
} catch (s) {
|
|
7020
|
-
i.emit("error",
|
|
7014
|
+
i.emit("error", V.fromError(s, Mt.AliRtcPluginErrorInitError));
|
|
7021
7015
|
}
|
|
7022
|
-
i.streamType ===
|
|
7016
|
+
i.streamType === xe.AliRtcSdkStreamTypeCapture && (this.cameraStreamInfo.addPlugin(i), yield this.cameraStreamInfo.process(this.streamInfos)), i.streamType === xe.AliRtcSdkStreamTypeScreen && (this.screenStreamInfo.addPlugin(i), yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
7023
7017
|
})), this.pluginManager.on("removed", (i) => I(this, null, function* () {
|
|
7024
7018
|
this.cameraStreamInfo.removePlugin(i) && (yield this.cameraStreamInfo.process(this.streamInfos)), this.screenStreamInfo.removePlugin(i) && (yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
7025
7019
|
})), this.pluginManager.on("updated", () => I(this, null, function* () {
|
|
@@ -7110,7 +7104,7 @@ const ct = (Lt = class extends He {
|
|
|
7110
7104
|
const h = ((b) => {
|
|
7111
7105
|
const { audio: u, video: f, screen: p } = b;
|
|
7112
7106
|
if (f && p)
|
|
7113
|
-
throw new
|
|
7107
|
+
throw new V(U.ERR_INNER, "create stream error, cannot create video && screen together");
|
|
7114
7108
|
return !!(f || u || p);
|
|
7115
7109
|
})(e);
|
|
7116
7110
|
let l;
|
|
@@ -7118,7 +7112,7 @@ const ct = (Lt = class extends He {
|
|
|
7118
7112
|
i || (o === !0 && this.cameraStreamInfo.cameraVideoConstraints ? (yield this.setAvailableCameraDeviceId(), o = $({}, this.cameraStreamInfo.cameraVideoConstraints)) : typeof o == "object" && (yield this.setAvailableCameraDeviceId(), o = $($({}, o), this.cameraStreamInfo.cameraVideoConstraints)), c === void 0 && this.audioCaptureDisabled ? c = !1 : c && (c === !0 && this.cameraStreamInfo.micAudioConstraints ? (yield this.setAvailableMicrophoneDeviceId(), c = $({}, this.cameraStreamInfo.micAudioConstraints)) : typeof c == "object" && (yield this.setAvailableMicrophoneDeviceId(), c = $($({}, c), this.cameraStreamInfo.micAudioConstraints)), this._audioCaptureDisabled = !1));
|
|
7119
7113
|
const b = Date.now();
|
|
7120
7114
|
try {
|
|
7121
|
-
l = yield Se.createStream({ audio: c, video: o, screen: t, custom: !!i, mediaStream: i, skipProfile: !0 }),
|
|
7115
|
+
l = yield Se.createStream({ audio: c, video: o, screen: t, custom: !!i, mediaStream: i, skipProfile: !0 }), O.info(`[${Lt.logName}]`, "createLocalStream", { audio: c, video: o, screen: t, custom: !!i, time: Date.now() - b }), c && !i && this.slsReporter.reportAudio(null, Date.now() - b, ((d = l == null ? void 0 : l.audioTrack) == null ? void 0 : d.label) || ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - b);
|
|
7122
7116
|
} catch (u) {
|
|
7123
7117
|
throw c && !i && this.slsReporter.reportAudio(u, Date.now() - b, ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - b), u;
|
|
7124
7118
|
}
|
|
@@ -7150,7 +7144,7 @@ const ct = (Lt = class extends He {
|
|
|
7150
7144
|
const o = this.publishStreams;
|
|
7151
7145
|
try {
|
|
7152
7146
|
if (!(o.audio || o.video || o.videoSmall || o.screen))
|
|
7153
|
-
throw
|
|
7147
|
+
throw O.error(`[${Lt.logName}]`, "no tracks founded"), new V(U.ERR_SDK_PUBLISH_INVAILD, "no tracks founded");
|
|
7154
7148
|
const b = new MediaStream();
|
|
7155
7149
|
(c = o.audio) != null && c.audioTrack && b.addTrack(o.audio.audioTrack), (h = o.video) != null && h.videoTrack ? (b.addTrack(o.video.videoTrack), i = o.videoSmall, s = o.screen) : (l = o.screen) != null && l.videoTrack && (t = k.Screen, b.addTrack((d = o.screen) == null ? void 0 : d.videoTrack), n = !0), e = yield Sn(b), n ? (this.screenStreamInfo.cloneVideoProfile(e), this.publishingScreenVideoStream = e) : (this.cameraStreamInfo.cloneVideoProfile(e), this.publishingCameraVideoStream = e);
|
|
7156
7150
|
} catch (b) {
|
|
@@ -7195,11 +7189,11 @@ const ct = (Lt = class extends He {
|
|
|
7195
7189
|
pt([T(([r]) => {
|
|
7196
7190
|
const { audio: a, video: e, screen: t, custom: i, skipProfile: s, videoProfile: n, screenProfile: o } = r;
|
|
7197
7191
|
return [{ audio: a, video: e, screen: t, custom: i, skipProfile: s, videoProfile: n, screenProfile: o }];
|
|
7198
|
-
})], ct.prototype, "createLocalStream", 1), pt([T(
|
|
7192
|
+
})], ct.prototype, "createLocalStream", 1), pt([T(B)], ct.prototype, "stopLocalStream", 1), pt([T()], ct.prototype, "createHTTPPublishStream", 1), pt([T()], ct.prototype, "stop", 1), pt([T(B)], ct.prototype, "setVideoProfile", 1), pt([T(B)], ct.prototype, "setVideoContentHint", 1), pt([T(B)], ct.prototype, "setAudioProfile", 1), pt([T(B)], ct.prototype, "setScreenProfile", 1), pt([T(B)], ct.prototype, "setScreenContentHint", 1), pt([T(B)], ct.prototype, "setCameraVideoConstraints", 1), pt([T(B)], ct.prototype, "setMicAudioConstraints", 1);
|
|
7199
7193
|
let yc = ct;
|
|
7200
7194
|
class Ac extends xt {
|
|
7201
7195
|
constructor() {
|
|
7202
|
-
super("AliRtcScreenStandardize",
|
|
7196
|
+
super("AliRtcScreenStandardize", xe.AliRtcSdkStreamTypeScreen);
|
|
7203
7197
|
g(this, "canvas");
|
|
7204
7198
|
g(this, "lastWidth");
|
|
7205
7199
|
g(this, "lastHeight");
|
|
@@ -7286,7 +7280,7 @@ class Ac extends xt {
|
|
|
7286
7280
|
}
|
|
7287
7281
|
class Rc extends xt {
|
|
7288
7282
|
constructor() {
|
|
7289
|
-
super("blankAudio",
|
|
7283
|
+
super("blankAudio", xe.AliRtcSdkStreamTypeCapture, fi.BOTH);
|
|
7290
7284
|
g(this, "hasTrack", !1);
|
|
7291
7285
|
g(this, "oscillator", null);
|
|
7292
7286
|
g(this, "audioTrack", null);
|
|
@@ -7396,7 +7390,7 @@ class _c {
|
|
|
7396
7390
|
}
|
|
7397
7391
|
class wc extends xt {
|
|
7398
7392
|
constructor() {
|
|
7399
|
-
super("audioMixer",
|
|
7393
|
+
super("audioMixer", xe.AliRtcSdkStreamTypeCapture, fi.AUDIO);
|
|
7400
7394
|
g(this, "audioMixer");
|
|
7401
7395
|
g(this, "primaryAudioTrackId");
|
|
7402
7396
|
g(this, "screenAudioTrackId");
|
|
@@ -7416,16 +7410,16 @@ class wc extends xt {
|
|
|
7416
7410
|
}
|
|
7417
7411
|
shouldUpdate(e, t) {
|
|
7418
7412
|
var n, o;
|
|
7419
|
-
if (e.type !==
|
|
7413
|
+
if (e.type !== xe.AliRtcSdkStreamTypeCapture)
|
|
7420
7414
|
return !1;
|
|
7421
|
-
const i = t.find((c) => c.type ===
|
|
7415
|
+
const i = t.find((c) => c.type === xe.AliRtcSdkStreamTypeCapture), s = t.find((c) => c.type === xe.AliRtcSdkStreamTypeScreen);
|
|
7422
7416
|
return !(this.primaryAudioTrackId === ((n = i == null ? void 0 : i.currentAudioTrack) == null ? void 0 : n.id) && this.screenAudioTrackId === ((o = s == null ? void 0 : s.currentAudioTrack) == null ? void 0 : o.id) && !this.dirty);
|
|
7423
7417
|
}
|
|
7424
7418
|
process(e, t) {
|
|
7425
7419
|
return I(this, null, function* () {
|
|
7426
7420
|
var o, c;
|
|
7427
7421
|
this.dirty = !1;
|
|
7428
|
-
const i = t.find((h) => h.type ===
|
|
7422
|
+
const i = t.find((h) => h.type === xe.AliRtcSdkStreamTypeScreen), s = e.currentAudioTrack, n = i == null ? void 0 : i.currentAudioTrack;
|
|
7429
7423
|
if (!n && this.options.audio === 1)
|
|
7430
7424
|
return this.audioMixer && (this.audioMixer.dispose(), this.audioMixer = void 0), this.primaryAudioTrackId = s == null ? void 0 : s.id, void e.updateAudioTrack(s);
|
|
7431
7425
|
this.audioMixer || (this.audioMixer = new _c()), yield this.audioMixer.resume(), this.primaryAudioTrackId && (s == null ? void 0 : s.id) !== this.primaryAudioTrackId && ((o = this.audioMixer) == null || o.removeTrack(this.primaryAudioTrackId)), s && !this.audioMixer.hasTrack(s == null ? void 0 : s.id) && this.audioMixer.addTrack(s), this.primaryAudioTrackId = s == null ? void 0 : s.id, this.screenAudioTrackId && (n == null ? void 0 : n.id) !== this.screenAudioTrackId && ((c = this.audioMixer) == null || c.removeTrack(this.screenAudioTrackId)), n && !this.audioMixer.hasTrack(n == null ? void 0 : n.id) && this.audioMixer.addTrack(n), this.screenAudioTrackId = n == null ? void 0 : n.id, this.updateVolume(), e.updateAudioTrack(this.audioMixer.getAudioTrack());
|
|
@@ -8008,7 +8002,7 @@ class $a extends Tc {
|
|
|
8008
8002
|
const ni = "[AliyunAudio3A] ";
|
|
8009
8003
|
class Cc extends xt {
|
|
8010
8004
|
constructor(e) {
|
|
8011
|
-
super("AliRtcAudioProcessPlugin",
|
|
8005
|
+
super("AliRtcAudioProcessPlugin", xe.AliRtcSdkStreamTypeCapture, fi.AUDIO);
|
|
8012
8006
|
g(this, "audioProcessor");
|
|
8013
8007
|
g(this, "slsReporter");
|
|
8014
8008
|
g(this, "enableSoft3ACheck", !1);
|
|
@@ -8045,7 +8039,7 @@ class Cc extends xt {
|
|
|
8045
8039
|
if (!e.currentAudioTrack)
|
|
8046
8040
|
return e.updateAudioTrack(), void this.clear(e);
|
|
8047
8041
|
if (!this.audioProcessor) {
|
|
8048
|
-
|
|
8042
|
+
O.info(ni, "create audio processor this.options:", this.options), this.audioProcessor = new $a({ aecOn: !0, ansOn: !0, agcOn: !0, dumpOn: ((t = this.options) == null ? void 0 : t.dumpAudioData) || !1, aiaecOn: this.options.aiaecOn || !1, useHardOnly: this.useHardOnly, wasmCdnPath: this.options.wasmCdnPath || "https://g.alicdn.com/code/npm/@ali/aliyun-audio-3a/0.0.6/" }), this.audioProcessor.on("dumpdata", (s, n) => {
|
|
8049
8043
|
let o = 3e3;
|
|
8050
8044
|
n.includes("far") ? o = 5e3 : n.includes("output") ? o = 1e4 : n.includes("meta") && (o = 8e3), setTimeout(() => {
|
|
8051
8045
|
const c = URL.createObjectURL(s), h = document.createElement("a");
|
|
@@ -8053,11 +8047,11 @@ class Cc extends xt {
|
|
|
8053
8047
|
}, o);
|
|
8054
8048
|
}), this.audioProcessor.on("loadsuccess", () => {
|
|
8055
8049
|
var s, n;
|
|
8056
|
-
|
|
8050
|
+
O.info(ni, "loadsuccess"), this.enableSoft3ACheck || e.updateAudioTrack((s = this.audioProcessor) == null ? void 0 : s.targetMediaTrack), this.options.dumpAudioData && ((n = this.audioProcessor) == null || n.startDump());
|
|
8057
8051
|
}), this.audioProcessor.on("loaderror", (s) => {
|
|
8058
|
-
|
|
8052
|
+
O.error(ni, "loaderror:", s == null ? void 0 : s.message), this.emit("error", s);
|
|
8059
8053
|
}), this.audioProcessor.on("outputlog", (s) => {
|
|
8060
|
-
|
|
8054
|
+
O.info(ni, "outputlog:", s), s != null && s.includes("diff") && (this.lastDiffOutputLog = s || "");
|
|
8061
8055
|
}), this.audioProcessor.on("statdata", (s) => {
|
|
8062
8056
|
var n;
|
|
8063
8057
|
if (s)
|
|
@@ -8071,7 +8065,7 @@ class Cc extends xt {
|
|
|
8071
8065
|
}
|
|
8072
8066
|
(n = this.slsReporter) == null || n.reportPublishAudio3A("", "", "", o);
|
|
8073
8067
|
} catch (o) {
|
|
8074
|
-
|
|
8068
|
+
O.error(ni, "statdata error:", o);
|
|
8075
8069
|
}
|
|
8076
8070
|
});
|
|
8077
8071
|
const i = this.createNode(e.currentAudioTrack);
|
|
@@ -8100,7 +8094,7 @@ class Cc extends xt {
|
|
|
8100
8094
|
(e = this.audioProcessor) == null || e.stopDump();
|
|
8101
8095
|
}
|
|
8102
8096
|
}
|
|
8103
|
-
var
|
|
8097
|
+
var Or = ((r) => (r[r.Default = 0] = "Default", r[r.Human = 1] = "Human", r[r.Robot = 2] = "Robot", r))(Or || {}), kc = Object.defineProperty, Pc = Object.getOwnPropertyDescriptor, Ja = (r, a, e, t) => {
|
|
8104
8098
|
for (var i, s = t > 1 ? void 0 : t ? Pc(a, e) : a, n = r.length - 1; n >= 0; n--)
|
|
8105
8099
|
(i = r[n]) && (s = (t ? i(a, e, s) : i(s)) || s);
|
|
8106
8100
|
return t && s && kc(a, e, s), s;
|
|
@@ -8124,7 +8118,7 @@ const Rr = (Nt = class extends He {
|
|
|
8124
8118
|
if (this.sendReadyMsg && !this.readyMsgSuccess)
|
|
8125
8119
|
try {
|
|
8126
8120
|
const n = new TextDecoder().decode(t.data), o = JSON.parse(n);
|
|
8127
|
-
o.key === "aliyun_aigc" && o.type === "ready_resp" && ((i = o.data) == null ? void 0 : i.ready) === !0 && (
|
|
8121
|
+
o.key === "aliyun_aigc" && o.type === "ready_resp" && ((i = o.data) == null ? void 0 : i.ready) === !0 && (O.event(`[${Nt.logName}]`, "onCheckReadyMsg success"), this.readyMsgSuccess = !0, this.emit("dcready", e), (s = this.remoteUser) == null || s.off("remoteDataChannelMessage", this.onCheckReadyMsg), window.clearTimeout(this.sendReadyMsgTimer));
|
|
8128
8122
|
} catch (n) {
|
|
8129
8123
|
}
|
|
8130
8124
|
});
|
|
@@ -8137,7 +8131,7 @@ const Rr = (Nt = class extends He {
|
|
|
8137
8131
|
this.self.off("dataPublishStateChanged", this.onDataPublishStateChange), window.clearTimeout(this.sendReadyMsgTimer), this.remoteUser = void 0, this.sendReadyMsg = !1, this.hasPubDataChannel = !1, this.hasSubDataChannel = !1, this.readyMsgSuccess = !1, this.startReadyMsgTime = 0;
|
|
8138
8132
|
}
|
|
8139
8133
|
trySendReadyMsg() {
|
|
8140
|
-
|
|
8134
|
+
O.event(`[${Nt.logName}]`, `trySendReadyMsg: pub(${this.hasPubDataChannel}, sub: ${this.hasSubDataChannel})`), this.hasPubDataChannel && this.hasSubDataChannel && (this.sendReadyMsg = !0, this.sendReadyMsgLoop());
|
|
8141
8135
|
}
|
|
8142
8136
|
sendReadyMsgLoop(e = 0) {
|
|
8143
8137
|
return I(this, null, function* () {
|
|
@@ -8149,7 +8143,7 @@ const Rr = (Nt = class extends He {
|
|
|
8149
8143
|
this.startReadyMsgTime || (this.startReadyMsgTime = Date.now());
|
|
8150
8144
|
let i = 50;
|
|
8151
8145
|
const s = Date.now() - this.startReadyMsgTime;
|
|
8152
|
-
i = s < 1e3 ? 50 : s < 2e3 ? 100 : s < 3e3 ? 500 : 2e3, e > 30 ?
|
|
8146
|
+
i = s < 1e3 ? 50 : s < 2e3 ? 100 : s < 3e3 ? 500 : 2e3, e > 30 ? O.event(`[${Nt.logName}]`, "sendReadyMsgLoop fail after 30 times") : this.sendReadyMsgTimer = window.setTimeout(() => {
|
|
8153
8147
|
this.sendReadyMsgLoop(e + 1);
|
|
8154
8148
|
}, i);
|
|
8155
8149
|
});
|
|
@@ -8256,7 +8250,7 @@ class Mc {
|
|
|
8256
8250
|
const c = Yt(a, "useSysAutoGainControl");
|
|
8257
8251
|
c !== void 0 && (this.useSysAutoGainControl = c);
|
|
8258
8252
|
}
|
|
8259
|
-
|
|
8253
|
+
O.info("setAudio3AConfig:", "enableSoft3A", this.enableSoft3A, ", enableSoft3ACheck", this.enableSoft3ACheck, ", useAIAEC", this.useAIAEC, ", useSysNoiseSuppression", this.useSysNoiseSuppression, ", useSysEchoCancellation", this.useSysEchoCancellation, ", useSysAutoGainControl", this.useSysAutoGainControl);
|
|
8260
8254
|
}
|
|
8261
8255
|
}
|
|
8262
8256
|
}
|
|
@@ -8315,7 +8309,7 @@ class $e extends He {
|
|
|
8315
8309
|
console.error("Failed to parse userdata:", o);
|
|
8316
8310
|
}
|
|
8317
8311
|
});
|
|
8318
|
-
}), this.slsReporter.reportConnectionLatencyEvent(at.RECV_NOTIFY_PUBLISH, "", "", ""),
|
|
8312
|
+
}), this.slsReporter.reportConnectionLatencyEvent(at.RECV_NOTIFY_PUBLISH, "", "", ""), O.event("[Signaling] Notify Publish ", e), e.forEach((t) => {
|
|
8319
8313
|
this.onRemotePublishStateChange(t);
|
|
8320
8314
|
});
|
|
8321
8315
|
}), this.signalingManager.stsManager.on("onTokenUpdate", (e, t) => {
|
|
@@ -8423,14 +8417,14 @@ class $e extends He {
|
|
|
8423
8417
|
return i || s || n;
|
|
8424
8418
|
});
|
|
8425
8419
|
}
|
|
8426
|
-
onRemotePublishStateChange(e) {
|
|
8427
|
-
var
|
|
8428
|
-
const { userid:
|
|
8429
|
-
let
|
|
8430
|
-
if (!
|
|
8420
|
+
onRemotePublishStateChange(e, t = !0) {
|
|
8421
|
+
var u;
|
|
8422
|
+
const { userid: i, callid: s, subscribe: n, pubid: o = "", tracks: c } = e, h = (u = n == null ? void 0 : n.pullstreamurl) != null ? u : "";
|
|
8423
|
+
let l = this.getRemoteUser(i);
|
|
8424
|
+
if (!l)
|
|
8431
8425
|
return;
|
|
8432
|
-
const
|
|
8433
|
-
|
|
8426
|
+
const d = l.streamInfo.audioTrackInfo, b = l.streamInfo.videoTrackInfo;
|
|
8427
|
+
l.updateRemoteTracks(s, h, o, c), d === l.streamInfo.audioTrackInfo && b === l.streamInfo.videoTrackInfo || this.emit("remoteTrackAvailableChange", i, l.streamInfo.audioTrackInfo, l.streamInfo.videoTrackInfo), t && l.updateSubscribe(fe.Publish);
|
|
8434
8428
|
}
|
|
8435
8429
|
setTimeoutToUpdateAllStreamUrls(e) {
|
|
8436
8430
|
var s;
|
|
@@ -8458,17 +8452,11 @@ class $e extends He {
|
|
|
8458
8452
|
}
|
|
8459
8453
|
init(e, t, i) {
|
|
8460
8454
|
var s;
|
|
8461
|
-
this.authInfo = e, this.self.enableAudioVolumeIndication(this.audioVolumeIndicationInterval), this.self.initInfo(e, t.pushstreamurl), this.audio3AConfig.useAudio3AConfigFromServer && this.audio3AConfig.loadFromServerConfig((s = t == null ? void 0 : t.config) == null ? void 0 : s.data), this.setupAudioProcessingPluginIfNeeded(), i.capabilityProfile ===
|
|
8455
|
+
this.authInfo = e, this.self.enableAudioVolumeIndication(this.audioVolumeIndicationInterval), this.self.initInfo(e, t.pushstreamurl), this.audio3AConfig.useAudio3AConfigFromServer && this.audio3AConfig.loadFromServerConfig((s = t == null ? void 0 : t.config) == null ? void 0 : s.data), this.setupAudioProcessingPluginIfNeeded(), i.capabilityProfile === Or.Human && (this.dcReadyHelper = new Dc(this.self), this.dcReadyHelper.on("dcready", (n) => {
|
|
8462
8456
|
var o;
|
|
8463
8457
|
this.emit("remoteUserSubscribedDataChannel", n), (o = this.dcReadyHelper) == null || o.destory(), this.dcReadyHelper = void 0;
|
|
8464
8458
|
})), this.setTimeoutToUpdateAllStreamUrls(t.pushstreamurl), t.users.forEach((n) => {
|
|
8465
|
-
|
|
8466
|
-
if (o) {
|
|
8467
|
-
const c = this.addUser(o, n.displayname, fe.InRoom);
|
|
8468
|
-
this.emit("remoteUserJoin", o, 0);
|
|
8469
|
-
const { callid: h, subscribe: l, tracks: d } = n;
|
|
8470
|
-
c.updateRemoteTracks(h, (l == null ? void 0 : l.pullstreamurl) || "", "", d), this.emit("remoteTrackAvailableChange", o, c.streamInfo.audioTrackInfo, c.streamInfo.videoTrackInfo);
|
|
8471
|
-
}
|
|
8459
|
+
this.addUser(n, fe.InRoom);
|
|
8472
8460
|
}), this.startStatsMonitor();
|
|
8473
8461
|
}
|
|
8474
8462
|
leave() {
|
|
@@ -8512,12 +8500,14 @@ class $e extends He {
|
|
|
8512
8500
|
stopStatsMonitor() {
|
|
8513
8501
|
this.statsMonitorId && clearInterval(this.statsMonitorId);
|
|
8514
8502
|
}
|
|
8515
|
-
addUser(e, t
|
|
8516
|
-
|
|
8503
|
+
addUser(e, t) {
|
|
8504
|
+
const i = e.userid;
|
|
8505
|
+
let s = this.userMap[i];
|
|
8506
|
+
return s || (s = this.executeAddUser(i, e.displayname || "", t), this.userMap[i] = s, this.emit("remoteUserJoin", i, 0)), this.onRemotePublishStateChange(e, t !== fe.InRoom), s;
|
|
8517
8507
|
}
|
|
8518
8508
|
executeAddUser(e, t, i) {
|
|
8519
8509
|
const s = new pc({ userId: e, displayName: t, rtsManager: this.rtsManager, signalingManager: this.signalingManager, usersViewMap: this.usersViewMap, slsReporter: this.slsReporter, localUser: this.self, audioVolumeIndicationInterval: this.audioVolumeIndicationInterval, playoutVolume: this.playoutVolume, parameter: this.parameter });
|
|
8520
|
-
return s.on(Qe.Remote, this.onRemoteDeviceStatusChange.bind(this)), s.on(
|
|
8510
|
+
return s.on(Qe.Remote, this.onRemoteDeviceStatusChange.bind(this)), s.on(Ee.PullStreamStats, this.onRemoteStatReport.bind(this)), s.on(Ee.RtsSubscribeExceeds, this.onSubscribeExceeds.bind(this)), s.on("audioSubscribeStateChanged", (n, o, c, h) => {
|
|
8521
8511
|
this.emit("audioSubscribeStateChanged", n, o, c, h, this.channel || "");
|
|
8522
8512
|
}), s.on("videoSubscribeStateChanged", (n, o, c, h) => {
|
|
8523
8513
|
this.emit("videoSubscribeStateChanged", n, o, c, h, this.channel || "");
|
|
@@ -8543,28 +8533,26 @@ class $e extends He {
|
|
|
8543
8533
|
}), s.setWantSubAudio(this.autoSubAudio && this.wantSubAudio), s.setWantSubVideo(this.autoSubVideo && this.wantSubVideo), s.setWantSubScreen(this.autoSubScreen && this.wantSubScreen), s.setRemoteDefaultVideoStreamType(this.defaultStreamType), s.setAudioMuted(this.audioMuted), (this.autoSubAudio || this.autoSubVideo || this.autoSubScreen) && s.updateSubscribe(i), s;
|
|
8544
8534
|
}
|
|
8545
8535
|
onRemoteDeviceStatusChange(e, t) {
|
|
8546
|
-
e ===
|
|
8536
|
+
e === Ee.MuteAudio ? this.emit("userAudioMuted", t, !0) : e === Ee.UnmuteAudio ? this.emit("userAudioMuted", t, !1) : e === Ee.MuteVideo ? this.emit("userVideoMuted", t, !0) : e === Ee.UnmuteVideo ? this.emit("userVideoMuted", t, !1) : e === Ee.MuteScreen ? this.emit("userScreenMuted", t, !0) : e === Ee.UnmuteScreen && this.emit("userScreenMuted", t, !1);
|
|
8547
8537
|
}
|
|
8548
8538
|
onRemoteStatReport(e, t, i) {
|
|
8549
|
-
this.emit(
|
|
8539
|
+
this.emit(Ee.PullStreamStats, e, t, i);
|
|
8550
8540
|
}
|
|
8551
8541
|
onSubscribeExceeds(e, t) {
|
|
8552
|
-
this.emit(
|
|
8542
|
+
this.emit(Ee.RtsSubscribeExceeds, e, t);
|
|
8553
8543
|
}
|
|
8554
8544
|
removeLeftUser(e) {
|
|
8555
8545
|
return I(this, null, function* () {
|
|
8556
8546
|
e.userid && this.userMap[e.userid] && (yield this.userMap[e.userid].clear(!1), delete this.userMap[e.userid]);
|
|
8557
8547
|
});
|
|
8558
8548
|
}
|
|
8559
|
-
|
|
8560
|
-
const t = [], i = []
|
|
8561
|
-
e.forEach((
|
|
8562
|
-
|
|
8549
|
+
diffUsers(e) {
|
|
8550
|
+
const t = [], i = [];
|
|
8551
|
+
e.forEach((n) => {
|
|
8552
|
+
n.userid && (this.userMap[n.userid] ? i.push(n) : t.push(n));
|
|
8563
8553
|
});
|
|
8564
|
-
const
|
|
8565
|
-
return
|
|
8566
|
-
s[c] || o.push({ userid: c, reason: "", leavecode: Lr.AliRtcUserOfflineQuit });
|
|
8567
|
-
}), this.userMap = s, { joinList: t, leaveList: o, presentList: i };
|
|
8554
|
+
const s = Object.keys(this.userMap).filter((n) => !e.find((o) => o.userid === n)).map((n) => ({ userid: n, reason: "", leavecode: Lr.AliRtcUserOfflineQuit }));
|
|
8555
|
+
return { joinList: t, leaveList: s, presentList: i };
|
|
8568
8556
|
}
|
|
8569
8557
|
getRemoteUser(e) {
|
|
8570
8558
|
return this.userMap[e];
|
|
@@ -8575,19 +8563,19 @@ class $e extends He {
|
|
|
8575
8563
|
updateAudioWant(e, t) {
|
|
8576
8564
|
const i = this.userMap[e];
|
|
8577
8565
|
if (!i)
|
|
8578
|
-
throw new
|
|
8566
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
8579
8567
|
i.setWantSubAudio(t), t ? i.updateSubscribe(fe.User) : i.stopSubscribe({ audio: !0 });
|
|
8580
8568
|
}
|
|
8581
8569
|
updateVideoWant(e, t) {
|
|
8582
8570
|
const i = this.userMap[e];
|
|
8583
8571
|
if (!i)
|
|
8584
|
-
throw new
|
|
8572
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
8585
8573
|
i.setWantSubVideo(t), t ? i.updateSubscribe(fe.User) : i.stopSubscribe({ video: !0 });
|
|
8586
8574
|
}
|
|
8587
8575
|
updateScreenWant(e, t) {
|
|
8588
8576
|
const i = this.userMap[e];
|
|
8589
8577
|
if (!i)
|
|
8590
|
-
throw new
|
|
8578
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
8591
8579
|
i.setWantSubScreen(t), t ? i.updateSubscribe(fe.User) : i.stopSubscribe({ screen: !0 });
|
|
8592
8580
|
}
|
|
8593
8581
|
stopIndication() {
|
|
@@ -8643,7 +8631,7 @@ class $e extends He {
|
|
|
8643
8631
|
this.audio3AConfig.enableSoft3ACheck && (e = 1e4), setTimeout(() => {
|
|
8644
8632
|
this.audioProcessorPlugin || (this.audioProcessorPlugin = new Cc({ dumpAudioData: this.audio3AConfig.dumpAudioData, aiaecOn: this.audio3AConfig.useAIAEC, slsReporter: this.slsReporter, enableSoft3ACheck: this.audio3AConfig.enableSoft3ACheck, useHardOnly: this.audio3AConfig.useHardOnly })), this.audioProcessorPlugin && !this.pluginManager.has(this.audioProcessorPlugin.name) && (this.audioProcessorPlugin.on("error", ({ message: t }) => {
|
|
8645
8633
|
var i;
|
|
8646
|
-
|
|
8634
|
+
O.error("audioProcessorPlugin error:", t), (i = this.self.audioTrack) == null || i.applyConstraints({ echoCancellation: !0, noiseSuppression: !0, autoGainControl: !0 });
|
|
8647
8635
|
}), this.pluginManager.add(this.audioProcessorPlugin));
|
|
8648
8636
|
}, e);
|
|
8649
8637
|
} else
|
|
@@ -8658,7 +8646,7 @@ class $e extends He {
|
|
|
8658
8646
|
}
|
|
8659
8647
|
}
|
|
8660
8648
|
g($e, "logName", "BizControl");
|
|
8661
|
-
et([T()], $e.prototype, "init", 1), et([T()], $e.prototype, "leave", 1), et([T()], $e.prototype, "clear", 1), et([T(
|
|
8649
|
+
et([T()], $e.prototype, "init", 1), et([T()], $e.prototype, "leave", 1), et([T()], $e.prototype, "clear", 1), et([T(B)], $e.prototype, "addUser", 1), et([T()], $e.prototype, "removeLeftUser", 1), et([T()], $e.prototype, "diffUsers", 1), et([T(B)], $e.prototype, "updateAudioWant", 1), et([T(B)], $e.prototype, "updateVideoWant", 1), et([T(B)], $e.prototype, "updateScreenWant", 1), et([T()], $e.prototype, "stopIndication", 1), et([T()], $e.prototype, "startIndication", 1), et([T(B)], $e.prototype, "setEnableDualVideoStream", 1), et([T(B)], $e.prototype, "setAudioVolume", 1), et([T()], $e.prototype, "enableAudioVolumeIndication", 1);
|
|
8662
8650
|
const hr = (r) => I(void 0, null, function* () {
|
|
8663
8651
|
const a = new Uint8Array(160).fill(170), e = new TextEncoder().encode(r), t = yield window.crypto.subtle.importKey("raw", a, { name: "HMAC", hash: { name: "SHA-1" } }, !1, ["sign"]), i = yield window.crypto.subtle.sign("HMAC", t, e);
|
|
8664
8652
|
return Array.from(new Uint8Array(i)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
@@ -8675,7 +8663,7 @@ class xc {
|
|
|
8675
8663
|
if (!t)
|
|
8676
8664
|
return Promise.reject(At.LiveTranscodingErrorInvalidParam);
|
|
8677
8665
|
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("&");
|
|
8678
|
-
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
|
|
8666
|
+
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 V(U.ERR_INNER, `transcoding request failed, status: ${c.status}`))) : c).catch((c) => Promise.reject(new V(U.ERR_INNER, `transcoding request failed, err: ${c.message}`)));
|
|
8679
8667
|
}
|
|
8680
8668
|
setAuthInfo(a) {
|
|
8681
8669
|
this.authInfo = a;
|
|
@@ -8733,7 +8721,7 @@ class xc {
|
|
|
8733
8721
|
this.authInfo && this.setAuthInfo($($({}, this.authInfo), a));
|
|
8734
8722
|
}
|
|
8735
8723
|
}
|
|
8736
|
-
class
|
|
8724
|
+
class Vr {
|
|
8737
8725
|
static checkString(a) {
|
|
8738
8726
|
return typeof a == "string";
|
|
8739
8727
|
}
|
|
@@ -8747,7 +8735,7 @@ class Or {
|
|
|
8747
8735
|
return a && a.nodeName === "AUDIO";
|
|
8748
8736
|
}
|
|
8749
8737
|
static checkAuthInfo(a) {
|
|
8750
|
-
return a ? a.appId ? a.channelId ? a.userId ? a.timestamp ?
|
|
8738
|
+
return a ? a.appId ? a.channelId ? a.userId ? a.timestamp ? Vr.checkNumber(a.timestamp) ? a.token ? null : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no token founded") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "timestamp is not number") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no timestamp founded") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no userId founded") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no channelId founded") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no appId founded") : new V(U.ERR_JOIN_ERR_JOIN_BAD_PARAMBAD, "no authInfo founded");
|
|
8751
8739
|
}
|
|
8752
8740
|
static checkMediaStreamTrack(a) {
|
|
8753
8741
|
return a instanceof MediaStreamTrack;
|
|
@@ -8756,7 +8744,7 @@ class Or {
|
|
|
8756
8744
|
return a && (a.width || a.height || a.frameRate || a.bitrateMax);
|
|
8757
8745
|
}
|
|
8758
8746
|
}
|
|
8759
|
-
class
|
|
8747
|
+
class Oc {
|
|
8760
8748
|
constructor(a) {
|
|
8761
8749
|
g(this, "taskProfile");
|
|
8762
8750
|
g(this, "encodeParam");
|
|
@@ -8770,7 +8758,7 @@ class Vc {
|
|
|
8770
8758
|
this.taskProfile = a;
|
|
8771
8759
|
}
|
|
8772
8760
|
}
|
|
8773
|
-
class
|
|
8761
|
+
class Vc {
|
|
8774
8762
|
constructor(a, e, t) {
|
|
8775
8763
|
g(this, "userId");
|
|
8776
8764
|
g(this, "streamType");
|
|
@@ -9010,7 +8998,7 @@ const Re = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
9010
8998
|
const n = i === k.Audio, o = { ctm: Math.floor(s[0].timestamp || 0), src: s[0].ssrc || "", codec: s[0]._codec || "" }, c = [], h = [], l = [], d = [], b = [], u = [], f = [], p = [], m = [], S = [], R = [], _ = [], y = [], v = [], w = [], A = [], E = [], C = [], x = [], P = [], z = [], G = [], X = [], K = [], H = [], Y = [], ee = [], M = [], N = [], D = [], L = [], ce = [], me = [], ye = [];
|
|
9011
8999
|
try {
|
|
9012
9000
|
s.forEach((J) => {
|
|
9013
|
-
var q,
|
|
9001
|
+
var q, we;
|
|
9014
9002
|
if (!J || !J.timestamp)
|
|
9015
9003
|
return;
|
|
9016
9004
|
const le = (q = J._last) != null && q.timestamp ? J.timestamp - J._last.timestamp : 1e3, Pe = _e(J, "bytesReceived"), be = _e(J, "headerBytesReceived"), de = ot(Re(Pe + be, 8, 2e7), le);
|
|
@@ -9041,15 +9029,15 @@ const Re = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
9041
9029
|
return (((qt = Ge == null ? void 0 : Ge._source) == null ? void 0 : qt[mt]) || 0) - (((wt = (nt = Ge == null ? void 0 : Ge._last) == null ? void 0 : nt._source) == null ? void 0 : wt[mt]) || 0);
|
|
9042
9030
|
})(J, "synthesizedSamplesEvents");
|
|
9043
9031
|
w.push(Je);
|
|
9044
|
-
const
|
|
9045
|
-
A.push(
|
|
9046
|
-
const Gt = Ut(
|
|
9032
|
+
const Ve = Ya(J, "synthesizedSamplesDuration");
|
|
9033
|
+
A.push(Ve);
|
|
9034
|
+
const Gt = Ut(Ve, le);
|
|
9047
9035
|
y.push(Gt), E.push(0);
|
|
9048
9036
|
} else {
|
|
9049
|
-
const Je = (
|
|
9037
|
+
const Je = (we = J._last) != null && we.totalInterFrameDelay ? J.totalInterFrameDelay - J._last.totalInterFrameDelay : 0;
|
|
9050
9038
|
C.push(Re(Je, 1e3 / (J.framesDecoded || 30), 500)), x.push(Re(J.framesPerSecond, 1, 100)), P.push(_e(J, "framesReceived")), ce.push(_e(J, "framesRendered")), z.push(Re(J.frameHeight, 1, 4400)), G.push(Re(J.frameWidth, 1, 7700));
|
|
9051
|
-
const
|
|
9052
|
-
X.push(Re(
|
|
9039
|
+
const Ve = _e(J, "totalProcessingDelay");
|
|
9040
|
+
X.push(Re(Ve, 1e3 / (J.framesDecoded || 30), 12e4));
|
|
9053
9041
|
const Gt = _e(J, "nackCount");
|
|
9054
9042
|
H.push(Gt);
|
|
9055
9043
|
const Ge = _e(J, "pliCount");
|
|
@@ -9217,7 +9205,7 @@ const Re = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
9217
9205
|
this.log({ evetid: 12001, args: this.data2String(h) });
|
|
9218
9206
|
}
|
|
9219
9207
|
log(a) {
|
|
9220
|
-
a && (a.tm = (/* @__PURE__ */ new Date()).getTime(),
|
|
9208
|
+
a && (a.tm = (/* @__PURE__ */ new Date()).getTime(), O.debug("[ConsoleLogger]", "log", a), this.logClient.sendReport(a));
|
|
9221
9209
|
}
|
|
9222
9210
|
data2String(a) {
|
|
9223
9211
|
let e = "";
|
|
@@ -9398,20 +9386,20 @@ const F = (W = class extends He {
|
|
|
9398
9386
|
g(this, "_proxyAiTid", null);
|
|
9399
9387
|
g(this, "_agentParam", null);
|
|
9400
9388
|
const t = Date.now();
|
|
9401
|
-
|
|
9389
|
+
O.init(), this.slsReporter = new wr(this), this.channelProfile = kt.AliRtcSdkCommunication, this.clientRole = Ht.AliRtcSdkLive, this.liveTranscoding = new xc(this.slsReporter), this.signalingManager = new Nr(this.channelProfile, this.clientRole, this.slsReporter, (e == null ? void 0 : e.env) === _t.pre ? _t.pre : _t.prod), this.addSignalingManagerListeners(), this.maxSignalingConnectRetryCount = e == null ? void 0 : e.maxSignalingConnectRetryCount, this.bizControl = new $e({ slsReporter: this.slsReporter, signalingManager: this.signalingManager }), this.addBizControlListeners(), this.addPublisherListeners(), this.slsReporter.reportConnectionLatencyEvent(at.CREATE_ENGINE, ht.START, "", "", t), this.slsReporter.reportConnectionLatencyEvent(at.CREATE_ENGINE, ht.END, "", "", Date.now()), this.slsReporter.reportSDKCreated(t);
|
|
9402
9390
|
}
|
|
9403
9391
|
static getSdkVersion() {
|
|
9404
9392
|
return Ni;
|
|
9405
9393
|
}
|
|
9406
9394
|
static setLogLevel(e) {
|
|
9407
|
-
|
|
9395
|
+
O.setLogLevel(e);
|
|
9408
9396
|
}
|
|
9409
9397
|
static getInstance(e) {
|
|
9410
9398
|
return W._instance || (W._instance = new W(e)), W._instance;
|
|
9411
9399
|
}
|
|
9412
9400
|
destroy() {
|
|
9413
9401
|
return I(this, null, function* () {
|
|
9414
|
-
W._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(),
|
|
9402
|
+
W._instance = void 0, yield this.leaveChannel(), yield this.bizControl.clear(), O.destroy();
|
|
9415
9403
|
});
|
|
9416
9404
|
}
|
|
9417
9405
|
get channel() {
|
|
@@ -9440,13 +9428,13 @@ const F = (W = class extends He {
|
|
|
9440
9428
|
addPublisherListeners() {
|
|
9441
9429
|
var e, t, i, s, n, o, c, h, l, d;
|
|
9442
9430
|
(e = this.publisher) == null || e.on(Qe.Local, (b) => {
|
|
9443
|
-
|
|
9431
|
+
O.event("[Publisher] Device Status Change", b), this.onLocalDeviceStatusChange(b);
|
|
9444
9432
|
}), (t = this.publisher) == null || t.on(Jt.VideoTrackEnded, () => {
|
|
9445
|
-
|
|
9433
|
+
O.event("[Publisher] VideoTrack Ended"), this.emit("localDeviceException", Rt.AliEngineLocalDeviceTypeCamera, Oe.AliEngineLocalDeviceExceptionTypeCameraInterrupt, "");
|
|
9446
9434
|
}), (i = this.publisher) == null || i.on(Jt.ScreenTrackEnded, () => {
|
|
9447
|
-
|
|
9435
|
+
O.event("[Publisher] ScreenTrack Ended"), this.emit("localDeviceException", Rt.AliEngineLocalDeviceTypeDisplay, Oe.AliEngineLocalDeviceExceptionTypeDisplayException, "");
|
|
9448
9436
|
}), (s = this.publisher) == null || s.on(Jt.AudioTrackEnded, () => {
|
|
9449
|
-
|
|
9437
|
+
O.event("[Publisher] AudioTrack Ended"), this.emit("localDeviceException", Rt.AliEngineLocalDeviceTypeMic, Oe.AliEngineLocalDeviceExceptionTypeMicInterrupt, "");
|
|
9450
9438
|
}), (n = this.publisher) == null || n.on("localDeviceException", (b, u, f = "") => {
|
|
9451
9439
|
this.emit("localDeviceException", b, u, f);
|
|
9452
9440
|
}), (o = this.publisher) == null || o.on("audioPublishStateChanged", (b, u, f) => {
|
|
@@ -9467,7 +9455,7 @@ const F = (W = class extends He {
|
|
|
9467
9455
|
});
|
|
9468
9456
|
}
|
|
9469
9457
|
occurError(e, t) {
|
|
9470
|
-
|
|
9458
|
+
O.event(`[${W.logName}]`, "Occur Error", e, t), this.emit("onOccurError", e, t), this.emit("occurError", e, t);
|
|
9471
9459
|
}
|
|
9472
9460
|
addBizControlListeners() {
|
|
9473
9461
|
this.bizControl.rtsManager.on("connected", (e) => {
|
|
@@ -9476,14 +9464,14 @@ const F = (W = class extends He {
|
|
|
9476
9464
|
i.updateSubscribe(fe.Reconnect);
|
|
9477
9465
|
}));
|
|
9478
9466
|
}), this.bizControl.rtsManager.on("disconnected", () => I(this, null, function* () {
|
|
9479
|
-
|
|
9467
|
+
O.event(`[${W.logName}]`, "RTS Disconnected"), (yield it.isNetworkAvailable()) ? this.onNetworkRecovery() : this.onNetworkError();
|
|
9480
9468
|
})), this.bizControl.rtsManager.on("subscribeexceeds", () => I(this, null, function* () {
|
|
9481
9469
|
yield this.resumePublishForNetworkRecovery(), yield this.resumeSubList();
|
|
9482
9470
|
})), this.bizControl.rtsManager.on("seimessage", (e, t, i) => {
|
|
9483
9471
|
const s = this.remoteUsers.find((n) => n.streamUrl === e);
|
|
9484
9472
|
s && this.emit("mediaExtensionMsgReceived", s.userId, i, t);
|
|
9485
9473
|
}), this.bizControl.on(Qe.Remote, (e, t) => {
|
|
9486
|
-
|
|
9474
|
+
O.event(`[${W.logName}]`, "RemoteUser Device Status Change", e, t);
|
|
9487
9475
|
}), this.bizControl.on("remoteUserJoin", (e, t) => {
|
|
9488
9476
|
this.emit("remoteUserOnLineNotify", e, t);
|
|
9489
9477
|
}), this.bizControl.on("remoteTrackAvailableChange", (e, t, i) => {
|
|
@@ -9534,35 +9522,33 @@ const F = (W = class extends He {
|
|
|
9534
9522
|
}
|
|
9535
9523
|
addSignalingManagerListeners() {
|
|
9536
9524
|
this.signalingManager.on("onKeepAliveRsp", () => {
|
|
9537
|
-
this.networkError && (
|
|
9525
|
+
this.networkError && (O.event("[Signaling] Receive KeepAlive Response", `networkError: ${this.networkError}`), this.onNetworkRecovery());
|
|
9538
9526
|
}), this.signalingManager.on("onNotifyJoin", (e) => {
|
|
9539
|
-
|
|
9540
|
-
this.emit("remoteUserOnLineNotify", t.userid, 0);
|
|
9541
|
-
});
|
|
9527
|
+
O.event("[Signaling] Notify Join ", e), this.handleUsersJoin(e);
|
|
9542
9528
|
}), this.signalingManager.on("onNotifyStatus", (e) => {
|
|
9543
|
-
|
|
9529
|
+
O.event("[Signaling] Notify Status ", e), e.forEach((t) => {
|
|
9544
9530
|
this.bizControl.updateRemoteUserDeviceStatus(t);
|
|
9545
9531
|
});
|
|
9546
9532
|
}), this.signalingManager.on("onNotifyLeave", (e) => {
|
|
9547
|
-
|
|
9533
|
+
O.event("[Signaling] Notify Leave ", e), e.forEach((t) => I(this, null, function* () {
|
|
9548
9534
|
yield this.bizControl.removeLeftUser(t), this.emit("remoteUserOffLineNotify", t.userid, t.leavecode);
|
|
9549
9535
|
}));
|
|
9550
9536
|
}), this.signalingManager.on("onBye", (e, t) => {
|
|
9551
|
-
|
|
9537
|
+
O.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);
|
|
9552
9538
|
}), this.signalingManager.on("onConnectFail", (e) => {
|
|
9553
|
-
|
|
9539
|
+
O.event("[Signaling] Connect Failed ", e), this.onError(e), this.backToUnpublishStatus(), this.connectState = ne.AliRtcConnectionStatusFailed, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusFailed, yt.AliRtcConnectionChangedNetworkInterrupted);
|
|
9554
9540
|
}), this.signalingManager.on("onNetworkError", (e) => {
|
|
9555
|
-
this.slsReporter.reportWarning("signaling network error"),
|
|
9541
|
+
this.slsReporter.reportWarning("signaling network error"), O.event("[Signaling] Network error ", e), this.onNetworkError();
|
|
9556
9542
|
}), this.signalingManager.on("onAuthInvalid", () => {
|
|
9557
|
-
|
|
9543
|
+
O.event("[Signaling] Auth Invalid");
|
|
9558
9544
|
}), this.signalingManager.on("onReconnectStart", () => {
|
|
9559
|
-
|
|
9545
|
+
O.event("[Signaling] Reconnect Start "), this.connectState = ne.AliRtcConnectionStatusReconnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusReconnecting, yt.AliRtcConnectionSignalingConnecting);
|
|
9560
9546
|
}), this.signalingManager.on("onReconnectSuccess", (e) => {
|
|
9561
|
-
|
|
9547
|
+
O.event("[Signaling] Reconnect Success ", e), this.onNetworkRecovery(e);
|
|
9562
9548
|
}), this.signalingManager.on("onReconnectFail", (e) => {
|
|
9563
|
-
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"),
|
|
9549
|
+
this.slsReporter.reportWarning("signaling reconnect fail: ${err.code}"), O.event("[Signaling] Reconnect Failed ", e), e.code === 403 && this.emit("authInfoExpired");
|
|
9564
9550
|
}), this.signalingManager.on("onError", (e) => {
|
|
9565
|
-
this.slsReporter.reportWarning("signaling error: ${err.message}"),
|
|
9551
|
+
this.slsReporter.reportWarning("signaling error: ${err.message}"), O.event("[Signaling] Error ", e), this.onError(e);
|
|
9566
9552
|
}), this.signalingManager.on("onUnknownMessage", (e) => {
|
|
9567
9553
|
if (e.msgtype === "proxyai" && e.tid === this._proxyAiTid) {
|
|
9568
9554
|
let t = e.data.retcode;
|
|
@@ -9576,15 +9562,14 @@ const F = (W = class extends He {
|
|
|
9576
9562
|
}
|
|
9577
9563
|
handleUsersJoin(e) {
|
|
9578
9564
|
e.forEach((t) => {
|
|
9579
|
-
|
|
9580
|
-
i && (this.bizControl.addUser(i, t.displayname, fe.Join), V.event(`[${W.logName}]`, we.UserJoined, i));
|
|
9565
|
+
this.bizControl.addUser(t, fe.Join);
|
|
9581
9566
|
});
|
|
9582
9567
|
}
|
|
9583
9568
|
onLocalDeviceStatusChange(e) {
|
|
9584
|
-
|
|
9585
|
-
|
|
9569
|
+
O.event(`[${W.logName}]`, Qe.Local, e), this.signalingManager.reportStatus(e).then(() => {
|
|
9570
|
+
O.debug("[signaling] reportStatus suc");
|
|
9586
9571
|
}).catch((t) => {
|
|
9587
|
-
|
|
9572
|
+
O.error("[signaling] reportStatus failed", t);
|
|
9588
9573
|
});
|
|
9589
9574
|
}
|
|
9590
9575
|
resumePublishForNetworkRecovery() {
|
|
@@ -9619,20 +9604,18 @@ const F = (W = class extends He {
|
|
|
9619
9604
|
onNetworkRecovery(e) {
|
|
9620
9605
|
return I(this, null, function* () {
|
|
9621
9606
|
var t;
|
|
9622
|
-
|
|
9607
|
+
O.event(W.logName, "onNetworkRecovery", `rts isConnected: ${this.bizControl.rtsManager.isConnected}; rts isConnecting: ${this.bizControl.rtsManager.isConnecting}`, { users: e }), yield this.resumeSubList(e), this.networkError && (this.networkError = !1, (t = this.publisher) == null || t.reportSelfDeviceStatus(), this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected, yt.AliRtcConnectionSignalingHeartbeatAlive));
|
|
9623
9608
|
});
|
|
9624
9609
|
}
|
|
9625
9610
|
resumeSubList(e) {
|
|
9626
9611
|
return I(this, null, function* () {
|
|
9627
|
-
if (e
|
|
9628
|
-
const { joinList: t, leaveList: i, presentList: s } = this.bizControl.
|
|
9629
|
-
|
|
9630
|
-
|
|
9612
|
+
if (e) {
|
|
9613
|
+
const { joinList: t, leaveList: i, presentList: s } = this.bizControl.diffUsers(e);
|
|
9614
|
+
O.info(`[${W.logName}]`, "resumeSubList", { joinList: t, leaveList: i, presentList: s }), this.handleUsersJoin(t), i.forEach((n) => {
|
|
9615
|
+
O.event(W.logName, Ee.UserLeft, n.userid, n.reason), this.bizControl.onRemotePublishStateChange({ userid: n.userid, displayname: "", callid: "", tracks: [] }), this.bizControl.removeLeftUser(n), this.emit("remoteUserOffLineNotify", n.userid, Lr.AliRtcUserOfflineQuit);
|
|
9616
|
+
}), s.forEach((n) => {
|
|
9617
|
+
this.bizControl.onRemotePublishStateChange(n);
|
|
9631
9618
|
});
|
|
9632
|
-
for (let n = 0; n < s.length; n++) {
|
|
9633
|
-
const o = s[n], c = o.userid, h = this.bizControl.getRemoteUser(c);
|
|
9634
|
-
this.bizControl.onRemotePublishStateChange(o), h == null || h.updateSubscribe(fe.Resume);
|
|
9635
|
-
}
|
|
9636
9619
|
} else
|
|
9637
9620
|
for (let t = 0; t < this.remoteUsers.length; t++) {
|
|
9638
9621
|
const i = this.remoteUsers[t];
|
|
@@ -9647,7 +9630,7 @@ const F = (W = class extends He {
|
|
|
9647
9630
|
return I(this, null, function* () {
|
|
9648
9631
|
const t = this.bizControl.getRemoteUser(e);
|
|
9649
9632
|
if (!t)
|
|
9650
|
-
throw new
|
|
9633
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
9651
9634
|
t.restore(), t.updateSubscribe(fe.Retry);
|
|
9652
9635
|
});
|
|
9653
9636
|
}
|
|
@@ -9655,14 +9638,14 @@ const F = (W = class extends He {
|
|
|
9655
9638
|
this.connectState === ne.AliRtcConnectionStatusConnected && (this.networkError || (this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected, yt.AliRtcConnectionChangedNetworkInterrupted)), this.networkError = !0);
|
|
9656
9639
|
}
|
|
9657
9640
|
onError(e) {
|
|
9658
|
-
this.slsReporter.reportError(e),
|
|
9641
|
+
this.slsReporter.reportError(e), O.event(W.logName, Ee.Error, e);
|
|
9659
9642
|
}
|
|
9660
9643
|
setEnableDualVideoStream(e, t) {
|
|
9661
9644
|
this.bizControl.setEnableDualVideoStream(e, t);
|
|
9662
9645
|
}
|
|
9663
9646
|
hadPushStream(e) {
|
|
9664
9647
|
if (!this.publisher || !e)
|
|
9665
|
-
throw new
|
|
9648
|
+
throw new V(U.ERR_INNER, "stream is not publishing");
|
|
9666
9649
|
}
|
|
9667
9650
|
getCurrentMicDeviceId() {
|
|
9668
9651
|
var e;
|
|
@@ -9670,27 +9653,24 @@ const F = (W = class extends He {
|
|
|
9670
9653
|
}
|
|
9671
9654
|
setChannelProfile(e) {
|
|
9672
9655
|
if (![ne.AliRtcConnectionStatusInit, ne.AliRtcConnectionStatusDisconnected, ne.AliRtcConnectionStatusFailed].includes(this.connectState))
|
|
9673
|
-
throw new
|
|
9656
|
+
throw new V(U.ERR_INNER, "cannot set channel profile in call");
|
|
9674
9657
|
this.channelProfile = e, this.channelProfile === kt.AliRtcSdkCommunication && (this.clientRole = Ht.AliRtcSdkLive), this.signalingManager.setChannelProfile(e);
|
|
9675
9658
|
}
|
|
9676
9659
|
startDefaultDevices() {
|
|
9677
9660
|
return I(this, null, function* () {
|
|
9678
|
-
var s, n
|
|
9661
|
+
var s, n;
|
|
9679
9662
|
if (!this.publisher)
|
|
9680
9663
|
return;
|
|
9681
9664
|
const { hasCamera: e, hasMicrophone: t, hasScreenShare: i } = this.publisher;
|
|
9682
9665
|
if (!e && !t && !i) {
|
|
9683
9666
|
try {
|
|
9684
|
-
yield (s = this.publisher) == null ? void 0 : s.
|
|
9685
|
-
} catch (
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
yield (n = this.publisher) == null ? void 0 : n.startDefaultAudio();
|
|
9690
|
-
} catch (c) {
|
|
9691
|
-
V.warn(`[${W.logName}]`, "startDefaultAUdio failed", c.code, c.message), c instanceof O && this.occurError(c), this.occurError(new O(B.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED, `auto start audio failed, ${c.message || ""}`));
|
|
9667
|
+
yield (s = this.publisher) == null ? void 0 : s.startDefaultCameraAndMic(this._audioOnlyMode);
|
|
9668
|
+
} catch (o) {
|
|
9669
|
+
O.warn(`[${W.logName}]`, "startDefaultDevices failed", o.code, o.message), o instanceof V && this.occurError(o);
|
|
9670
|
+
const c = o.code;
|
|
9671
|
+
this.occurError(new V(c >= U.ERR_CAMERA_OPEN_FAIL && c <= U.ERR_CAMERA_NOT_AVAILABLE ? U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED : U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED, `auto publish device failed, ${o.message || ""}`));
|
|
9692
9672
|
}
|
|
9693
|
-
yield (
|
|
9673
|
+
yield (n = this.publisher) == null ? void 0 : n.previewAll();
|
|
9694
9674
|
}
|
|
9695
9675
|
});
|
|
9696
9676
|
}
|
|
@@ -9701,8 +9681,8 @@ const F = (W = class extends He {
|
|
|
9701
9681
|
yield (t = this.publisher) == null ? void 0 : t.startPublish(!1, e);
|
|
9702
9682
|
} catch (s) {
|
|
9703
9683
|
const n = ((i = this.publisher) == null ? void 0 : i.publishStreams) || {}, o = [];
|
|
9704
|
-
n != null && n.audio && o.push(
|
|
9705
|
-
this.occurError(new
|
|
9684
|
+
n != null && n.audio && o.push(U.ERR_SDK_PUBLISH_AUDIO_STREAM_FAILED), n != null && n.video && o.push(U.ERR_SDK_PUBLISH_VIDEO_STREAM_FAILED), o.forEach((c) => {
|
|
9685
|
+
this.occurError(new V(c, `auto publish stream failed, ${s.message || ""}`));
|
|
9706
9686
|
});
|
|
9707
9687
|
}
|
|
9708
9688
|
});
|
|
@@ -9714,7 +9694,7 @@ const F = (W = class extends He {
|
|
|
9714
9694
|
if (this.channelProfile === kt.AliRtcSdkCommunication)
|
|
9715
9695
|
return;
|
|
9716
9696
|
if (!Object.values(Ht).includes(e))
|
|
9717
|
-
throw new
|
|
9697
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `set client role error, role value(${e}) is invalid`);
|
|
9718
9698
|
if (this.clientRole === e)
|
|
9719
9699
|
return;
|
|
9720
9700
|
this.slsReporter.reportRoleUpdate(this.clientRole, e), this.isInCall() ? this.clientRole === Ht.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(bt.ROLE_CHANGE)) : yield this.signalingManager.setClientRole(e), this.clientRole = e;
|
|
@@ -9728,12 +9708,12 @@ const F = (W = class extends He {
|
|
|
9728
9708
|
}
|
|
9729
9709
|
setAudioOnlyMode(e) {
|
|
9730
9710
|
if (this.isInCall())
|
|
9731
|
-
throw new
|
|
9711
|
+
throw new V(U.ERR_INNER, "can not change audioOnly mode in call");
|
|
9732
9712
|
this._audioOnlyMode = e;
|
|
9733
9713
|
}
|
|
9734
9714
|
setAudioRedEnabled(e) {
|
|
9735
9715
|
if (this.isInCall())
|
|
9736
|
-
throw new
|
|
9716
|
+
throw new V(U.ERR_INNER, "can not change audioRedEnabled in call");
|
|
9737
9717
|
this.bizControl.setAudioRedEnabled(e);
|
|
9738
9718
|
}
|
|
9739
9719
|
setCheckAuthInfoTimer(e, t) {
|
|
@@ -9757,31 +9737,31 @@ const F = (W = class extends He {
|
|
|
9757
9737
|
const d = JSON.parse(window.atob(e));
|
|
9758
9738
|
n = { appId: d.appid, channelId: d.channelid, userId: d.userid, timestamp: d.timestamp, nonce: d.nonce, token: d.token };
|
|
9759
9739
|
} catch (d) {
|
|
9760
|
-
throw new
|
|
9740
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${d.message || ""}`);
|
|
9761
9741
|
}
|
|
9762
9742
|
else
|
|
9763
9743
|
n = e;
|
|
9764
9744
|
o || (o = n.userId);
|
|
9765
9745
|
const c = { start: Date.now() };
|
|
9766
|
-
let h =
|
|
9746
|
+
let h = Vr.checkAuthInfo(n);
|
|
9767
9747
|
if (ne.AliRtcConnectionStatusInit !== this.connectState && ne.AliRtcConnectionStatusDisconnected !== this.connectState && ne.AliRtcConnectionStatusFailed !== this.connectState) {
|
|
9768
|
-
const d = new
|
|
9748
|
+
const d = new V(U.ERR_JOIN_ALREADY_JOINED, "already joined");
|
|
9769
9749
|
throw this.connectState === ne.AliRtcConnectionStatusConnecting && (d.message = "Repeated operation during login"), this.slsReporter.reportJoin(d.code, c, ""), d;
|
|
9770
9750
|
}
|
|
9771
9751
|
{
|
|
9772
9752
|
if (h)
|
|
9773
9753
|
throw this.connectState = ne.AliRtcConnectionStatusFailed, this.slsReporter.reportJoin(h.code, c, ""), this.slsReporter.reportJoinResult(h), h;
|
|
9774
|
-
n.sessionId = it.createCallid("web"), this.slsReporter.start(n), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.START, "", "", s), this.connectState = ne.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnecting, yt.AliRtcConnectionSignalingConnecting),
|
|
9754
|
+
n.sessionId = it.createCallid("web"), this.slsReporter.start(n), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, ht.START, "", "", s), this.connectState = ne.AliRtcConnectionStatusConnecting, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnecting, yt.AliRtcConnectionSignalingConnecting), O.setSessionID(n.appId, n.sessionId);
|
|
9775
9755
|
const d = () => I(this, null, function* () {
|
|
9776
9756
|
var b;
|
|
9777
9757
|
try {
|
|
9778
9758
|
const u = Date.now(), f = yield this.signalingManager.join(n, o, this.maxSignalingConnectRetryCount, c, i);
|
|
9779
9759
|
f.l1ip && this.publisher && (this.publisher.preferredPubL1Ip = f.l1ip);
|
|
9780
9760
|
const p = Date.now();
|
|
9781
|
-
this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected, yt.AliRtcConnectionSignalingJoinRoomSuccess), this.bizControl.init(n, f, { capabilityProfile: typeof t == "object" ? t.capabilityProfile :
|
|
9761
|
+
this.connectState = ne.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusConnected, yt.AliRtcConnectionSignalingJoinRoomSuccess), this.bizControl.init(n, f, { capabilityProfile: typeof t == "object" ? t.capabilityProfile : Or.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, "", "");
|
|
9782
9762
|
} catch (u) {
|
|
9783
9763
|
const f = (b = u.code) != null ? b : -1, p = u.reason || u.message || "";
|
|
9784
|
-
throw this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected, yt.AliRtcConnectionSignalingJoinRoomFailure), this.slsReporter.reportJoin(f, c, ""), this.slsReporter.reportJoinResult(u), new
|
|
9764
|
+
throw this.connectState = ne.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", ne.AliRtcConnectionStatusDisconnected, yt.AliRtcConnectionSignalingJoinRoomFailure), this.slsReporter.reportJoin(f, c, ""), this.slsReporter.reportJoinResult(u), new V(f, p);
|
|
9785
9765
|
}
|
|
9786
9766
|
});
|
|
9787
9767
|
this.currentRoleCanPublish ? (yield Promise.all([d(), this.startDefaultDevices()]), yield this.startPublish(bt.JOIN_CHANNEL)) : yield d(), (l = this.publisher) == null || l.reportSelfDeviceStatus(), this.remoteUsers.forEach((b) => {
|
|
@@ -9809,7 +9789,7 @@ const F = (W = class extends He {
|
|
|
9809
9789
|
}
|
|
9810
9790
|
else
|
|
9811
9791
|
this.slsReporter.reportLeave(0, 0, "");
|
|
9812
|
-
this.networkError = !1, this.connectState = ne.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(),
|
|
9792
|
+
this.networkError = !1, this.connectState = ne.AliRtcConnectionStatusDisconnected, this.clearCheckAuthInfoTimer(), this.liveTranscoding.clear(), this.slsReporter.stop(), this.signalingManager.reset(), O.reportEnd();
|
|
9813
9793
|
});
|
|
9814
9794
|
}
|
|
9815
9795
|
isInCall() {
|
|
@@ -9823,7 +9803,7 @@ const F = (W = class extends He {
|
|
|
9823
9803
|
const l = JSON.parse(window.atob(e));
|
|
9824
9804
|
t = { userId: l.userid, timestamp: l.timestamp, nonce: l.nonce, token: l.token };
|
|
9825
9805
|
} catch (l) {
|
|
9826
|
-
throw new
|
|
9806
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, `authInfo is invalid: ${l.message || ""}`);
|
|
9827
9807
|
}
|
|
9828
9808
|
else
|
|
9829
9809
|
t = e;
|
|
@@ -9856,19 +9836,19 @@ const F = (W = class extends He {
|
|
|
9856
9836
|
}
|
|
9857
9837
|
subscribeRemoteAudioStream(e, t) {
|
|
9858
9838
|
if (t && !this.bizControl.isWantSubAudio)
|
|
9859
|
-
throw new
|
|
9839
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "subscribeAllRemoteAudioStreams(true) must be called first");
|
|
9860
9840
|
this.bizControl.updateAudioWant(e, t);
|
|
9861
9841
|
}
|
|
9862
9842
|
resumeRemoteAudioStream(e) {
|
|
9863
9843
|
const t = this.bizControl.getRemoteUser(e);
|
|
9864
9844
|
if (!t)
|
|
9865
|
-
throw new
|
|
9845
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
9866
9846
|
t.resumeAudio();
|
|
9867
9847
|
}
|
|
9868
9848
|
stopRemoteAudioPlay(e) {
|
|
9869
9849
|
const t = this.bizControl.getRemoteUser(e);
|
|
9870
9850
|
if (!t)
|
|
9871
|
-
throw new
|
|
9851
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
9872
9852
|
t.stopPlayAudio();
|
|
9873
9853
|
}
|
|
9874
9854
|
publishLocalVideoStream(e) {
|
|
@@ -9896,7 +9876,7 @@ const F = (W = class extends He {
|
|
|
9896
9876
|
subscribeRemoteMediaStream(e, t, i, s) {
|
|
9897
9877
|
const n = this.bizControl.getRemoteUser(e);
|
|
9898
9878
|
if (!n)
|
|
9899
|
-
throw new
|
|
9879
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
9900
9880
|
!i || t !== oe.AliRtcVideoTrackScreen && t !== oe.AliRtcVideoTrackBoth ? n.setWantSubScreen(!1) : n.setWantSubScreen(!0), !i || t !== oe.AliRtcVideoTrackCamera && t !== oe.AliRtcVideoTrackBoth ? n.setWantSubVideo(!1) : n.setWantSubVideo(!0), n.setWantSubAudio(s), n.updateSubscribe(fe.User);
|
|
9901
9881
|
}
|
|
9902
9882
|
resumeRemoteMediaStream(e, t) {
|
|
@@ -9937,7 +9917,7 @@ const F = (W = class extends He {
|
|
|
9937
9917
|
var h;
|
|
9938
9918
|
const { width: t, height: i } = e;
|
|
9939
9919
|
if (t && !isNaN(t) && i && !isNaN(i) && t * i > 9437184)
|
|
9940
|
-
throw new
|
|
9920
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "width * height must be less than 9437184");
|
|
9941
9921
|
const c = e, { bitrate: s } = c, n = Et(c, ["bitrate"]), o = $({}, n);
|
|
9942
9922
|
s && (o.maxBitrate = e.bitrate), yield (h = this.publisher) == null ? void 0 : h.setScreenProfile(o);
|
|
9943
9923
|
});
|
|
@@ -9960,7 +9940,7 @@ const F = (W = class extends He {
|
|
|
9960
9940
|
}
|
|
9961
9941
|
setAudioShareVolume(e) {
|
|
9962
9942
|
if (typeof e != "number")
|
|
9963
|
-
throw new
|
|
9943
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
9964
9944
|
this.bizControl.setAudioVolume({ screen: Math.max(0, Math.min(e, 400)) / 100 });
|
|
9965
9945
|
}
|
|
9966
9946
|
enableAudioVolumeIndication(e) {
|
|
@@ -9973,7 +9953,7 @@ const F = (W = class extends He {
|
|
|
9973
9953
|
muteRemoteAudioPlaying(e, t = !1) {
|
|
9974
9954
|
const i = this.bizControl.getRemoteUser(e);
|
|
9975
9955
|
if (!i)
|
|
9976
|
-
throw new
|
|
9956
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
9977
9957
|
i.setAudioMuted(t);
|
|
9978
9958
|
}
|
|
9979
9959
|
muteAllRemoteAudioPlaying(e = !1) {
|
|
@@ -10008,20 +9988,20 @@ const F = (W = class extends He {
|
|
|
10008
9988
|
}
|
|
10009
9989
|
setRecordingVolume(e) {
|
|
10010
9990
|
if (typeof e != "number")
|
|
10011
|
-
throw new
|
|
9991
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
10012
9992
|
this.bizControl.setAudioVolume({ audio: Math.max(0, Math.min(e, 400)) / 100 });
|
|
10013
9993
|
}
|
|
10014
9994
|
setPlayoutVolume(e) {
|
|
10015
9995
|
if (typeof e != "number")
|
|
10016
|
-
throw new
|
|
9996
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
10017
9997
|
this.bizControl.setPlayoutVolume(Math.max(0, Math.min(e, 100)) / 100);
|
|
10018
9998
|
}
|
|
10019
9999
|
setRemoteAudioVolume(e, t) {
|
|
10020
10000
|
const i = this.bizControl.getRemoteUser(e);
|
|
10021
10001
|
if (!i)
|
|
10022
|
-
throw new
|
|
10002
|
+
throw new V(U.ERR_INNER, `no remote user(${e}) founded`);
|
|
10023
10003
|
if (typeof t != "number")
|
|
10024
|
-
throw new
|
|
10004
|
+
throw new V(U.ERR_INVALID_ARGUMENTS, "volume must be a number");
|
|
10025
10005
|
i.setPlayoutVolume(Math.max(0, Math.min(t, 100)) / 100);
|
|
10026
10006
|
}
|
|
10027
10007
|
setAudioProfile(e) {
|
|
@@ -10043,7 +10023,7 @@ const F = (W = class extends He {
|
|
|
10043
10023
|
return I(this, null, function* () {
|
|
10044
10024
|
var i, s, n;
|
|
10045
10025
|
if (this._audioOnlyMode)
|
|
10046
|
-
throw new
|
|
10026
|
+
throw new V(U.ERR_INNER, "Cannot set local view in audio only mode");
|
|
10047
10027
|
(i = this.bizControl) == null || i.setLocalViewConfig(e, t), t === oe.AliRtcVideoTrackCamera && ((s = this.publisher) != null && s.hasCamera) ? yield this.startPreview() : t === oe.AliRtcVideoTrackScreen && ((n = this.publisher) != null && n.hasScreenShare) && (yield this.startPreviewScreen());
|
|
10048
10028
|
});
|
|
10049
10029
|
}
|
|
@@ -10064,7 +10044,7 @@ const F = (W = class extends He {
|
|
|
10064
10044
|
return I(this, null, function* () {
|
|
10065
10045
|
var t, i, s, n, o, c, h, l, d, b, u;
|
|
10066
10046
|
if (this._audioOnlyMode)
|
|
10067
|
-
throw new
|
|
10047
|
+
throw new V(U.ERR_INNER, "Cannot enable local video in audio only mode");
|
|
10068
10048
|
e ? ((i = (t = this.publisher) == null ? void 0 : t.publishStreams) != null && i.video && ((o = (n = (s = this.publisher) == null ? void 0 : s.publishStreams) == null ? void 0 : n.video) == null || o.disableVideo(), (d = (l = (h = (c = this.publisher) == null ? void 0 : c.publishStreams) == null ? void 0 : h.video) == null ? void 0 : l.videoTrack) == null || d.stop()), yield (b = this.publisher) == null ? void 0 : b.startCameraCapture()) : yield (u = this.publisher) == null ? void 0 : u.stopCameraCapture();
|
|
10069
10049
|
});
|
|
10070
10050
|
}
|
|
@@ -10091,7 +10071,7 @@ const F = (W = class extends He {
|
|
|
10091
10071
|
return I(this, null, function* () {
|
|
10092
10072
|
var s, n, o, c, h, l;
|
|
10093
10073
|
if (this._audioOnlyMode)
|
|
10094
|
-
throw new
|
|
10074
|
+
throw new V(U.ERR_INNER, "Cannot switch camera in audio only mode");
|
|
10095
10075
|
const i = {};
|
|
10096
10076
|
if (e ? (i.deviceId = e, this.slsReporter.reportSwitchCamera(e)) : t || (i.cameraDirection = ((s = this.publisher) == null ? void 0 : s.cameraDirection) === "environment" ? mi.CAMERA_FRONT : mi.CAMERA_REAR, this.slsReporter.reportSwitchCamera(((n = this.publisher) == null ? void 0 : n.cameraDirection) || "")), yield this.setCameraCapturerConfiguration(i), !((o = this.publisher) != null && o.cameraCaptureDisabled)) {
|
|
10097
10077
|
(h = (c = this.publisher) == null ? void 0 : c.cameraTrack) == null || h.stop();
|
|
@@ -10108,7 +10088,7 @@ const F = (W = class extends He {
|
|
|
10108
10088
|
return I(this, null, function* () {
|
|
10109
10089
|
var e, t;
|
|
10110
10090
|
if (this._audioOnlyMode)
|
|
10111
|
-
throw new
|
|
10091
|
+
throw new V(U.ERR_INNER, "Cannot start preview camera in audio only mode");
|
|
10112
10092
|
(e = this.publisher) != null && e.hasCamera || (yield this.enableLocalVideo(!0)), yield (t = this.publisher) == null ? void 0 : t.previewAll({ screen: !1 });
|
|
10113
10093
|
});
|
|
10114
10094
|
}
|
|
@@ -10116,7 +10096,7 @@ const F = (W = class extends He {
|
|
|
10116
10096
|
return I(this, null, function* () {
|
|
10117
10097
|
var t, i;
|
|
10118
10098
|
if (this._audioOnlyMode)
|
|
10119
|
-
throw new
|
|
10099
|
+
throw new V(U.ERR_INNER, "Cannot start preview screen share in audio only mode");
|
|
10120
10100
|
(t = this.publisher) != null && t.hasScreenShare || (yield this.startScreenShare(e)), yield (i = this.publisher) == null ? void 0 : i.previewAll({ primary: !1 });
|
|
10121
10101
|
});
|
|
10122
10102
|
}
|
|
@@ -10137,9 +10117,9 @@ const F = (W = class extends He {
|
|
|
10137
10117
|
var n, o, c, h;
|
|
10138
10118
|
const { userId: t, streamType: i } = e;
|
|
10139
10119
|
if (!t)
|
|
10140
|
-
return i ===
|
|
10120
|
+
return i === xe.AliRtcSdkStreamTypeCapture ? (n = this.publisher) == null ? void 0 : n.cameraTrack : (o = this.publisher) == null ? void 0 : o.screenTrack;
|
|
10141
10121
|
const s = this.bizControl.getRemoteUser(t);
|
|
10142
|
-
return i ===
|
|
10122
|
+
return i === xe.AliRtcSdkStreamTypeCapture ? (c = s == null ? void 0 : s.getCameraStream) == null ? void 0 : c.videoTrack : (h = s == null ? void 0 : s.getScreenStream) == null ? void 0 : h.videoTrack;
|
|
10143
10123
|
});
|
|
10144
10124
|
}
|
|
10145
10125
|
startPublishLiveStream(e, t) {
|
|
@@ -10176,7 +10156,7 @@ const F = (W = class extends He {
|
|
|
10176
10156
|
return I(this, null, function* () {
|
|
10177
10157
|
var s;
|
|
10178
10158
|
if (!this.publisher || !this.isPublishing)
|
|
10179
|
-
throw new
|
|
10159
|
+
throw new V(U.ERR_INNER, "you should publish first");
|
|
10180
10160
|
return this.slsReporter.reportSEIMessage(i, e.byteLength, t, 0, !1), (s = this.publisher) == null ? void 0 : s.sendSEI(e, t, i);
|
|
10181
10161
|
});
|
|
10182
10162
|
}
|
|
@@ -10203,26 +10183,26 @@ const F = (W = class extends He {
|
|
|
10203
10183
|
isBeautyEnabled() {
|
|
10204
10184
|
const e = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
10205
10185
|
if (!e)
|
|
10206
|
-
throw new
|
|
10186
|
+
throw new V(Mt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
10207
10187
|
return !!(e != null && e.isEnable);
|
|
10208
10188
|
}
|
|
10209
10189
|
setBeautyEffect(e, t) {
|
|
10210
10190
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
10211
10191
|
if (!i)
|
|
10212
|
-
throw new
|
|
10192
|
+
throw new V(Mt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
10213
10193
|
e ? i.enable() : i.disable(), i.setOptions({ basicBeauty: { skinBuffing: Math.max(Math.min(1, +t.smoothnessLevel), 0), whitening: Math.max(Math.min(1, +t.whiteningLevel), 0) } });
|
|
10214
10194
|
}
|
|
10215
10195
|
enableBackgroundExchange(e, t) {
|
|
10216
10196
|
const i = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
10217
10197
|
if (!i || !i.isEnable)
|
|
10218
|
-
throw new
|
|
10198
|
+
throw new V(Mt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
10219
10199
|
const s = { setSegmentBackgroundImage: { backgroundImgUrl: e ? t : "" } };
|
|
10220
10200
|
e && (s.segmentBackgroundProcess = { enable: !1 }), i.setOptions(s);
|
|
10221
10201
|
}
|
|
10222
10202
|
enableBackgroundBlur(e) {
|
|
10223
10203
|
const t = this.bizControl.pluginManager.get("AliRtcBeauty");
|
|
10224
10204
|
if (!t || !t.isEnable)
|
|
10225
|
-
throw new
|
|
10205
|
+
throw new V(Mt.AliRtcPluginErrorNoFindPlugin, "you should enable beautyPlugin first");
|
|
10226
10206
|
const i = { segmentBackgroundProcess: { type: 0, enable: e } };
|
|
10227
10207
|
e && (i.setSegmentBackgroundImage = { type: 0, backgroundImgUrl: "" }), t.setOptions(i);
|
|
10228
10208
|
}
|
|
@@ -10241,11 +10221,11 @@ const F = (W = class extends He {
|
|
|
10241
10221
|
return (yield Se.getMicList()).filter((e) => e.deviceId);
|
|
10242
10222
|
})), g(W, "getSpeakerList", () => I(W, null, function* () {
|
|
10243
10223
|
return (yield Se.getSpeakerList()).filter((e) => e.deviceId);
|
|
10244
|
-
})), g(W, "_instance"), g(W, "AliRtcSdkChannelProfile", kt), g(W, "AliRtcSdkClientRole", Ht), g(W, "AliRtcVideoStreamType", Ke), g(W, "AliRtcVideoTrack", oe), g(W, "AliRtcAudioTrack", ii), g(W, "AliRtcPublishState", Z), g(W, "AliRtcSubscribeState", pe), g(W, "AliRtcRawDataStreamType",
|
|
10245
|
-
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(
|
|
10224
|
+
})), g(W, "_instance"), g(W, "AliRtcSdkChannelProfile", kt), g(W, "AliRtcSdkClientRole", Ht), g(W, "AliRtcVideoStreamType", Ke), g(W, "AliRtcVideoTrack", oe), g(W, "AliRtcAudioTrack", ii), g(W, "AliRtcPublishState", Z), g(W, "AliRtcSubscribeState", pe), g(W, "AliRtcRawDataStreamType", xe), g(W, "AliRtcLogLevel", sn), g(W, "AliRtcEngineLocalDeviceType", Rt), g(W, "AliRtcEngineLocalDeviceExceptionType", Oe), g(W, "AliRtcConnectionStatus", ne), g(W, "AliRtcConnectionStatusChangeReason", yt), g(W, "AliRtcPlugin", xt), g(W, "AliRtcPluginTrackType", fi), g(W, "AliRtcImageHolderPlugin", jc), g(W, "AliRtcLiveTranscodingParam", mr), g(W, "AliRtcLiveTranscodingEncodeParam", ln), g(W, "AliRtcLiveTranscodingMixParam", Oc), g(W, "AliRtcLiveTranscodingSingleParam", Vc), 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", pi), 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", At), g(W, "AliRtcTrascodingPublishTaskStatus", hn), g(W, "AliRtcDataChannelMsg", $t), g(W, "AliRtcDataMsgType", fn), g(W, "Plugin", xt), W);
|
|
10225
|
+
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(B)], F.prototype, "retrySubscribe", 1), j([T(B)], F.prototype, "setEnableDualVideoStream", 1), j([T(B)], F.prototype, "setChannelProfile", 1), j([T(B)], F.prototype, "setClientRole", 1), j([T(B)], F.prototype, "setAudioOnlyMode", 1), j([T()], F.prototype, "clearCheckAuthInfoTimer", 1), j([T(B)], F.prototype, "joinChannel", 1), j([T(B)], F.prototype, "joinAIChannel", 1), j([T(B)], F.prototype, "leaveChannel", 1), j([T(B)], F.prototype, "refreshAuthInfo", 1), j([T(B)], F.prototype, "publishLocalAudioStream", 1), j([T(B)], F.prototype, "setDefaultSubscribeAllRemoteAudioStreams", 1), j([T(B)], F.prototype, "subscribeAllRemoteAudioStreams", 1), j([T(B)], F.prototype, "subscribeRemoteAudioStream", 1), j([T(B)], F.prototype, "resumeRemoteAudioStream", 1), j([T(B)], F.prototype, "stopRemoteAudioPlay", 1), j([T(B)], F.prototype, "publishLocalVideoStream", 1), j([T(B)], F.prototype, "setRemoteDefaultVideoStreamType", 1), j([T(B)], F.prototype, "setRemoteUserVideoStreamType", 1), j([T(B)], F.prototype, "setDefaultSubscribeAllRemoteVideoStreams", 1), j([T(B)], F.prototype, "subscribeAllRemoteVideoStreams", 1), j([T(B)], F.prototype, "subscribeRemoteMediaStream", 1), j([T(B)], 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(B)], F.prototype, "setScreenShareConfiguration", 1), j([T(B)], F.prototype, "setScreenShareContentHint", 1), j([T()], F.prototype, "publishLocalScreenShareStream", 1), j([T(B)], F.prototype, "setAudioShareVolume", 1), j([T(B)], F.prototype, "enableAudioVolumeIndication", 1), j([T(B)], F.prototype, "muteLocalMic", 1), j([T(B)], F.prototype, "muteRemoteAudioPlaying", 1), j([T(B)], F.prototype, "muteAllRemoteAudioPlaying", 1), j([T(B)], F.prototype, "startAudioCapture", 1), j([T(B)], F.prototype, "setAudioConstraints", 1), j([T()], F.prototype, "stopAudioCapture", 1), j([T(B)], F.prototype, "switchMicrophone", 1), j([T(B)], F.prototype, "setRecordingVolume", 1), j([T(B)], F.prototype, "setPlayoutVolume", 1), j([T(B)], F.prototype, "setRemoteAudioVolume", 1), j([T(B)], F.prototype, "setAudioProfile", 1), j([T(B)], F.prototype, "getAudioTrack", 1), j([T(B)], F.prototype, "setLocalViewConfig", 1), j([T(B)], F.prototype, "setCameraCapturerConfiguration", 1), j([T(B)], F.prototype, "setCameraCapturerContentHint", 1), j([T(B)], F.prototype, "enableLocalVideo", 1), j([T(B)], F.prototype, "muteLocalCamera", 1), j([T(B)], F.prototype, "muteLocalScreen", 1), j([T(B)], F.prototype, "setRemoteViewConfig", 1), j([T(B)], 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(B)], 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(B)], F.prototype, "removePlugin", 1), j([T(B)], F.prototype, "setPluginOption", 1), j([T(B)], F.prototype, "getPluginByName", 1), j([T(B)], F.prototype, "getPluginOption", 1), j([T(B)], F.prototype, "setBeautyEffect", 1), j([T(B)], F.prototype, "enableBackgroundExchange", 1), j([T(B)], F.prototype, "enableBackgroundBlur", 1), j([T(B)], F.prototype, "setParameter", 1), j([T(([r]) => {
|
|
10246
10226
|
var a;
|
|
10247
10227
|
return [(a = r.data) == null ? void 0 : a.byteLength];
|
|
10248
|
-
})], F.prototype, "sendDataChannelMessage", 1), j([T(
|
|
10228
|
+
})], F.prototype, "sendDataChannelMessage", 1), j([T(B)], F, "setLogLevel", 1);
|
|
10249
10229
|
let Rn = F;
|
|
10250
10230
|
var Qa;
|
|
10251
10231
|
const _n = new Er({ businessName: "imp-web-rtc", version: (Qa = Rn.getSdkVersion()) != null ? Qa : "unknown", env: "prod", disabled: window.AliRtcOptionsDisableProxy === !0 });
|
|
@@ -10253,14 +10233,14 @@ _n.setReady();
|
|
|
10253
10233
|
const Gc = _n.wrap(Rn);
|
|
10254
10234
|
export {
|
|
10255
10235
|
ii as AliRtcAudioTrack,
|
|
10256
|
-
|
|
10236
|
+
Or as AliRtcCapabilityProfile,
|
|
10257
10237
|
ne as AliRtcConnectionStatus,
|
|
10258
10238
|
yt as AliRtcConnectionStatusChangeReason,
|
|
10259
10239
|
$t as AliRtcDataChannelMsg,
|
|
10260
10240
|
fn as AliRtcDataMsgType,
|
|
10261
|
-
|
|
10241
|
+
Oe as AliRtcEngineLocalDeviceExceptionType,
|
|
10262
10242
|
Rt as AliRtcEngineLocalDeviceType,
|
|
10263
|
-
|
|
10243
|
+
U as AliRtcErrorCode,
|
|
10264
10244
|
jc as AliRtcImageHolderPlugin,
|
|
10265
10245
|
Pr as AliRtcLiveTranscodingAudioSampleRate,
|
|
10266
10246
|
on as AliRtcLiveTranscodingCropMode,
|
|
@@ -10269,10 +10249,10 @@ export {
|
|
|
10269
10249
|
xi as AliRtcLiveTranscodingFontType,
|
|
10270
10250
|
Dr as AliRtcLiveTranscodingMediaProcessMode,
|
|
10271
10251
|
Pi as AliRtcLiveTranscodingMixMode,
|
|
10272
|
-
|
|
10252
|
+
Oc as AliRtcLiveTranscodingMixParam,
|
|
10273
10253
|
mr as AliRtcLiveTranscodingParam,
|
|
10274
10254
|
Di as AliRtcLiveTranscodingSegmentType,
|
|
10275
|
-
|
|
10255
|
+
Vc as AliRtcLiveTranscodingSingleParam,
|
|
10276
10256
|
pi as AliRtcLiveTranscodingSourceType,
|
|
10277
10257
|
cn as AliRtcLiveTranscodingState,
|
|
10278
10258
|
an as AliRtcLiveTranscodingStreamType,
|
|
@@ -10283,7 +10263,7 @@ export {
|
|
|
10283
10263
|
fi as AliRtcPluginTrackType,
|
|
10284
10264
|
$o as AliRtcPluginType,
|
|
10285
10265
|
Z as AliRtcPublishState,
|
|
10286
|
-
|
|
10266
|
+
xe as AliRtcRawDataStreamType,
|
|
10287
10267
|
lc as AliRtcRemoteUserInfo,
|
|
10288
10268
|
kt as AliRtcSdkChannelProfile,
|
|
10289
10269
|
Ht as AliRtcSdkClientRole,
|