aliyun-rtc-sdk 6.14.4-beta.4 → 6.14.4-beta.5
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 +87 -81
- package/dist/aliyun-rtc-sdk.umd.js +7 -7
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var Bi = (r, a, e) => a in r ? jn(r, a, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
Ss.call(a, e) && Bi(r, e, a[e]);
|
|
10
10
|
return r;
|
|
11
11
|
}, ut = (r, a) => zn(r, Wn(a));
|
|
12
|
-
var
|
|
12
|
+
var Dt = (r, a) => {
|
|
13
13
|
var e = {};
|
|
14
14
|
for (var t in r)
|
|
15
15
|
xs.call(r, t) && a.indexOf(t) < 0 && (e[t] = r[t]);
|
|
@@ -38,7 +38,7 @@ var w = (r, a, e) => new Promise((t, i) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { AliRTS as le, EConnectStatus as Li, EDatachannelStatus as vs } from "aliyun-rts-sdk";
|
|
40
40
|
import De from "eventemitter3";
|
|
41
|
-
var qn = Object.defineProperty, Jn = (r, a, e) => a in r ? qn(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e,
|
|
41
|
+
var qn = Object.defineProperty, Jn = (r, a, e) => a in r ? qn(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e, Tt = (r, a, e) => (Jn(r, typeof a != "symbol" ? a + "" : a, e), e), Mi = { exports: {} }, Fi = { exports: {} }, Vi, bs;
|
|
42
42
|
function Fe() {
|
|
43
43
|
if (bs)
|
|
44
44
|
return Vi;
|
|
@@ -2146,7 +2146,7 @@ let bo = 1;
|
|
|
2146
2146
|
class qr {
|
|
2147
2147
|
constructor(a) {
|
|
2148
2148
|
var e, t;
|
|
2149
|
-
|
|
2149
|
+
Tt(this, "armsLogger"), Tt(this, "isReady", !1), Tt(this, "isDestroyed", !1), Tt(this, "options"), Tt(this, "queue", []), Tt(this, "marker"), Tt(this, "helper", {
|
|
2150
2150
|
MediaboxWrapperQueue(i) {
|
|
2151
2151
|
return new Js(i);
|
|
2152
2152
|
},
|
|
@@ -2264,7 +2264,7 @@ function rt(r, a, e) {
|
|
|
2264
2264
|
return Eo(t);
|
|
2265
2265
|
}
|
|
2266
2266
|
var vi = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(vi || {});
|
|
2267
|
-
const yi = "6.14.4-beta.
|
|
2267
|
+
const yi = "6.14.4-beta.5", Xs = "web";
|
|
2268
2268
|
class He {
|
|
2269
2269
|
/**
|
|
2270
2270
|
* 将版本号转换为number
|
|
@@ -3862,18 +3862,18 @@ function dn() {
|
|
|
3862
3862
|
]);
|
|
3863
3863
|
},
|
|
3864
3864
|
_doProcessBlock: function(m, l) {
|
|
3865
|
-
for (var x = this._hash.words, v = x[0], S = x[1], b = x[2], E = x[3], _ = x[4], y = x[5], A = x[6], R = x[7], L = v.high, C = v.low, I = S.high, P = S.low, B = b.high, $ = b.low, q = E.high, X = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, M = A.low, F = R.high, N = R.low, J = L, j = C, ce = I, Z = P, Ve = B, ze = $, Qe = q, et = X, Se = ae, ke = Q, ot = te,
|
|
3866
|
-
var Re, tt,
|
|
3865
|
+
for (var x = this._hash.words, v = x[0], S = x[1], b = x[2], E = x[3], _ = x[4], y = x[5], A = x[6], R = x[7], L = v.high, C = v.low, I = S.high, P = S.low, B = b.high, $ = b.low, q = E.high, X = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, M = A.low, F = R.high, N = R.low, J = L, j = C, ce = I, Z = P, Ve = B, ze = $, Qe = q, et = X, Se = ae, ke = Q, ot = te, Ct = ee, Ht = k, Rt = M, Yt = F, It = N, Be = 0; Be < 80; Be++) {
|
|
3866
|
+
var Re, tt, wt = d[Be];
|
|
3867
3867
|
if (Be < 16)
|
|
3868
|
-
tt =
|
|
3868
|
+
tt = wt.high = m[l + Be * 2] | 0, Re = wt.low = m[l + Be * 2 + 1] | 0;
|
|
3869
3869
|
else {
|
|
3870
3870
|
var gt = d[Be - 15], it = gt.high, ct = gt.low, ki = (it >>> 1 | ct << 31) ^ (it >>> 8 | ct << 24) ^ it >>> 7, ui = (ct >>> 1 | it << 31) ^ (ct >>> 8 | it << 24) ^ (ct >>> 7 | it << 25), hi = d[Be - 2], We = hi.high, mt = hi.low, di = (We >>> 19 | mt << 13) ^ (We << 3 | mt >>> 29) ^ We >>> 6, Zt = (mt >>> 19 | We << 13) ^ (mt << 3 | We >>> 29) ^ (mt >>> 6 | We << 26), us = d[Be - 7], Pn = us.high, kn = us.low, hs = d[Be - 16], Bn = hs.high, ds = hs.low;
|
|
3871
|
-
Re = ui + kn, tt = ki + Pn + (Re >>> 0 < ui >>> 0 ? 1 : 0), Re = Re + Zt, tt = tt + di + (Re >>> 0 < Zt >>> 0 ? 1 : 0), Re = Re + ds, tt = tt + Bn + (Re >>> 0 < ds >>> 0 ? 1 : 0),
|
|
3871
|
+
Re = ui + kn, tt = ki + Pn + (Re >>> 0 < ui >>> 0 ? 1 : 0), Re = Re + Zt, tt = tt + di + (Re >>> 0 < Zt >>> 0 ? 1 : 0), Re = Re + ds, tt = tt + Bn + (Re >>> 0 < ds >>> 0 ? 1 : 0), wt.high = tt, wt.low = Re;
|
|
3872
3872
|
}
|
|
3873
|
-
var Nn = Se & ot ^ ~Se & Ht, ls = ke &
|
|
3874
|
-
Yt = Ht,
|
|
3873
|
+
var Nn = Se & ot ^ ~Se & Ht, ls = ke & Ct ^ ~ke & Rt, Ln = J & ce ^ J & Ve ^ ce & Ve, Mn = j & Z ^ j & ze ^ Z & ze, Fn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), fs = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Vn = (Se >>> 14 | ke << 18) ^ (Se >>> 18 | ke << 14) ^ (Se << 23 | ke >>> 9), On = (ke >>> 14 | Se << 18) ^ (ke >>> 18 | Se << 14) ^ (ke << 23 | Se >>> 9), ps = p[Be], Un = ps.high, gs = ps.low, $e = It + On, xt = Yt + Vn + ($e >>> 0 < It >>> 0 ? 1 : 0), $e = $e + ls, xt = xt + Nn + ($e >>> 0 < ls >>> 0 ? 1 : 0), $e = $e + gs, xt = xt + Un + ($e >>> 0 < gs >>> 0 ? 1 : 0), $e = $e + Re, xt = xt + tt + ($e >>> 0 < Re >>> 0 ? 1 : 0), ms = fs + Mn, Hn = Fn + Ln + (ms >>> 0 < fs >>> 0 ? 1 : 0);
|
|
3874
|
+
Yt = Ht, It = Rt, Ht = ot, Rt = Ct, ot = Se, Ct = ke, ke = et + $e | 0, Se = Qe + xt + (ke >>> 0 < et >>> 0 ? 1 : 0) | 0, Qe = Ve, et = ze, Ve = ce, ze = Z, ce = J, Z = j, j = $e + ms | 0, J = xt + Hn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
|
|
3875
3875
|
}
|
|
3876
|
-
C = v.low = C + j, v.high = L + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = S.low = P + Z, S.high = I + ce + (P >>> 0 < Z >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), X = E.low = X + et, E.high = q + Qe + (X >>> 0 < et >>> 0 ? 1 : 0), Q = _.low = Q + ke, _.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = y.low = ee +
|
|
3876
|
+
C = v.low = C + j, v.high = L + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = S.low = P + Z, S.high = I + ce + (P >>> 0 < Z >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), X = E.low = X + et, E.high = q + Qe + (X >>> 0 < et >>> 0 ? 1 : 0), Q = _.low = Q + ke, _.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = y.low = ee + Ct, y.high = te + ot + (ee >>> 0 < Ct >>> 0 ? 1 : 0), M = A.low = M + Rt, A.high = k + Ht + (M >>> 0 < Rt >>> 0 ? 1 : 0), N = R.low = N + It, R.high = F + Yt + (N >>> 0 < It >>> 0 ? 1 : 0);
|
|
3877
3877
|
},
|
|
3878
3878
|
_doFinalize: function() {
|
|
3879
3879
|
var m = this._data, l = m.words, x = this._nDataBytes * 8, v = m.sigBytes * 8;
|
|
@@ -4571,7 +4571,7 @@ function zo() {
|
|
|
4571
4571
|
}(lr)), lr.exports;
|
|
4572
4572
|
}
|
|
4573
4573
|
var fr = { exports: {} }, ga;
|
|
4574
|
-
function
|
|
4574
|
+
function yt() {
|
|
4575
4575
|
return ga || (ga = 1, function(r, a) {
|
|
4576
4576
|
(function(e, t, i) {
|
|
4577
4577
|
r.exports = t(ne(), hn(), Yr());
|
|
@@ -4637,7 +4637,7 @@ var pr = { exports: {} }, ma;
|
|
|
4637
4637
|
function ye() {
|
|
4638
4638
|
return ma || (ma = 1, function(r, a) {
|
|
4639
4639
|
(function(e, t, i) {
|
|
4640
|
-
r.exports = t(ne(),
|
|
4640
|
+
r.exports = t(ne(), yt());
|
|
4641
4641
|
})(ie, function(e) {
|
|
4642
4642
|
e.lib.Cipher || function(t) {
|
|
4643
4643
|
var i = e, s = i.lib, n = s.Base, c = s.WordArray, o = s.BufferedBlockAlgorithm, u = i.enc;
|
|
@@ -5446,7 +5446,7 @@ var Rr = { exports: {} }, wa;
|
|
|
5446
5446
|
function t0() {
|
|
5447
5447
|
return wa || (wa = 1, function(r, a) {
|
|
5448
5448
|
(function(e, t, i) {
|
|
5449
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
5449
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
5450
5450
|
})(ie, function(e) {
|
|
5451
5451
|
return function() {
|
|
5452
5452
|
var t = e, i = t.lib, s = i.BlockCipher, n = t.algo, c = [], o = [], u = [], h = [], p = [], d = [], f = [], m = [], l = [], x = [];
|
|
@@ -5506,7 +5506,7 @@ var Ir = { exports: {} }, Da;
|
|
|
5506
5506
|
function i0() {
|
|
5507
5507
|
return Da || (Da = 1, function(r, a) {
|
|
5508
5508
|
(function(e, t, i) {
|
|
5509
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
5509
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
5510
5510
|
})(ie, function(e) {
|
|
5511
5511
|
return function() {
|
|
5512
5512
|
var t = e, i = t.lib, s = i.WordArray, n = i.BlockCipher, c = t.algo, o = [
|
|
@@ -6226,7 +6226,7 @@ var wr = { exports: {} }, Ta;
|
|
|
6226
6226
|
function r0() {
|
|
6227
6227
|
return Ta || (Ta = 1, function(r, a) {
|
|
6228
6228
|
(function(e, t, i) {
|
|
6229
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
6229
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
6230
6230
|
})(ie, function(e) {
|
|
6231
6231
|
return function() {
|
|
6232
6232
|
var t = e, i = t.lib, s = i.StreamCipher, n = t.algo, c = n.RC4 = s.extend({
|
|
@@ -6280,7 +6280,7 @@ var Dr = { exports: {} }, Pa;
|
|
|
6280
6280
|
function s0() {
|
|
6281
6281
|
return Pa || (Pa = 1, function(r, a) {
|
|
6282
6282
|
(function(e, t, i) {
|
|
6283
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
6283
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
6284
6284
|
})(ie, function(e) {
|
|
6285
6285
|
return function() {
|
|
6286
6286
|
var t = e, i = t.lib, s = i.StreamCipher, n = t.algo, c = [], o = [], u = [], h = n.Rabbit = s.extend({
|
|
@@ -6346,7 +6346,7 @@ var Tr = { exports: {} }, ka;
|
|
|
6346
6346
|
function a0() {
|
|
6347
6347
|
return ka || (ka = 1, function(r, a) {
|
|
6348
6348
|
(function(e, t, i) {
|
|
6349
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
6349
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
6350
6350
|
})(ie, function(e) {
|
|
6351
6351
|
return function() {
|
|
6352
6352
|
var t = e, i = t.lib, s = i.StreamCipher, n = t.algo, c = [], o = [], u = [], h = n.RabbitLegacy = s.extend({
|
|
@@ -6410,7 +6410,7 @@ var Pr = { exports: {} }, Ba;
|
|
|
6410
6410
|
function n0() {
|
|
6411
6411
|
return Ba || (Ba = 1, function(r, a) {
|
|
6412
6412
|
(function(e, t, i) {
|
|
6413
|
-
r.exports = t(ne(), Ot(), Ut(),
|
|
6413
|
+
r.exports = t(ne(), Ot(), Ut(), yt(), ye());
|
|
6414
6414
|
})(ie, function(e) {
|
|
6415
6415
|
return function() {
|
|
6416
6416
|
var t = e, i = t.lib, s = i.BlockCipher, n = t.algo;
|
|
@@ -7530,7 +7530,7 @@ function n0() {
|
|
|
7530
7530
|
}
|
|
7531
7531
|
(function(r, a) {
|
|
7532
7532
|
(function(e, t, i) {
|
|
7533
|
-
r.exports = t(ne(), Ci(), Mo(), Fo(), Ot(), Vo(), Ut(), hn(), Xr(), Oo(), dn(), Uo(), Ho(), jo(), Yr(), zo(),
|
|
7533
|
+
r.exports = t(ne(), Ci(), Mo(), Fo(), Ot(), Vo(), Ut(), hn(), Xr(), Oo(), dn(), Uo(), Ho(), jo(), Yr(), zo(), yt(), ye(), Wo(), $o(), Ko(), qo(), Jo(), Go(), Xo(), Yo(), Zo(), Qo(), e0(), t0(), i0(), r0(), s0(), a0(), n0());
|
|
7534
7534
|
})(ie, function(e) {
|
|
7535
7535
|
return e;
|
|
7536
7536
|
});
|
|
@@ -8496,7 +8496,7 @@ class Fr {
|
|
|
8496
8496
|
return n;
|
|
8497
8497
|
}
|
|
8498
8498
|
}
|
|
8499
|
-
var pt = /* @__PURE__ */ ((r) => (r.pre = "pre", r.prod = "prod", r))(pt || {}), bt = /* @__PURE__ */ ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(bt || {}),
|
|
8499
|
+
var pt = /* @__PURE__ */ ((r) => (r.pre = "pre", r.prod = "prod", r))(pt || {}), bt = /* @__PURE__ */ ((r) => (r.AliRtcSdkCommunication = "communication", r.AliRtcSdkInteractiveLive = "interactive_live", r.AliRtcSdkInteractiveWithLowLatencyLive = "cdn_live", r))(bt || {}), Nt = /* @__PURE__ */ ((r) => (r.AliRtcSdkInteractive = "interactive", r.AliRtcSdkLive = "live", r))(Nt || {}), dt = /* @__PURE__ */ ((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))(dt || {}), _e = /* @__PURE__ */ ((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))(_e || {}), ue = /* @__PURE__ */ ((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))(ue || {}), Wt = /* @__PURE__ */ ((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))(Wt || {}), ss = /* @__PURE__ */ ((r) => (r[r.AliRtcUserOfflineQuit = 0] = "AliRtcUserOfflineQuit", r[r.AliRtcUserOfflineDropped = 1] = "AliRtcUserOfflineDropped", r[r.AliRtcUserOfflineBecomeAudience = 2] = "AliRtcUserOfflineBecomeAudience", r))(ss || {}), Xt = /* @__PURE__ */ ((r) => (r[r.AliRtcAudioTrackNo = 0] = "AliRtcAudioTrackNo", r[r.AliRtcAudioTrackMic = 1] = "AliRtcAudioTrackMic", r[r.AliRtcAudioTrackDual = 2] = "AliRtcAudioTrackDual", r))(Xt || {}), se = /* @__PURE__ */ ((r) => (r[r.AliRtcVideoTrackNo = 0] = "AliRtcVideoTrackNo", r[r.AliRtcVideoTrackCamera = 1] = "AliRtcVideoTrackCamera", r[r.AliRtcVideoTrackScreen = 2] = "AliRtcVideoTrackScreen", r[r.AliRtcVideoTrackBoth = 3] = "AliRtcVideoTrackBoth", r))(se || {}), Y = /* @__PURE__ */ ((r) => (r[r.AliRtcStatePublishIdle = 0] = "AliRtcStatePublishIdle", r[r.AliRtcStateNoPublish = 1] = "AliRtcStateNoPublish", r[r.AliRtcStatePublishing = 2] = "AliRtcStatePublishing", r[r.AliRtcStatePublished = 3] = "AliRtcStatePublished", r))(Y || {}), he = /* @__PURE__ */ ((r) => (r[r.AliRtcStateSubscribeIdle = 0] = "AliRtcStateSubscribeIdle", r[r.AliRtcStateNoSubscribe = 1] = "AliRtcStateNoSubscribe", r[r.AliRtcStateSubscribing = 2] = "AliRtcStateSubscribing", r[r.AliRtcStateSubscribed = 3] = "AliRtcStateSubscribed", r))(he || {}), we = /* @__PURE__ */ ((r) => (r[r.AliRtcVideoStreamTypeNone = 0] = "AliRtcVideoStreamTypeNone", r[r.AliRtcVideoStreamTypeHigh = 1] = "AliRtcVideoStreamTypeHigh", r[r.AliRtcVideoStreamTypeLow = 2] = "AliRtcVideoStreamTypeLow", r))(we || {}), oi = /* @__PURE__ */ ((r) => (r[r.CAMERA_INVALID = -1] = "CAMERA_INVALID", r[r.CAMERA_REAR = 0] = "CAMERA_REAR", r[r.CAMERA_FRONT = 1] = "CAMERA_FRONT", r))(oi || {});
|
|
8500
8500
|
const Oa = 12, Ua = 5e3, $t = class $t extends De {
|
|
8501
8501
|
constructor(e) {
|
|
8502
8502
|
super();
|
|
@@ -8846,7 +8846,7 @@ const L0 = 3e4, qe = class qe extends De {
|
|
|
8846
8846
|
* 发送推流消息
|
|
8847
8847
|
*/
|
|
8848
8848
|
publish(e) {
|
|
8849
|
-
const o = e, { l1ip: t } = o, i =
|
|
8849
|
+
const o = e, { l1ip: t } = o, i = Dt(o, ["l1ip"]);
|
|
8850
8850
|
let s = this.packageCreater.createPublishPackage();
|
|
8851
8851
|
s.data.users = [], s.data.l1ip = t, i.subscribe.signal = this.wsClient.connectUrl;
|
|
8852
8852
|
const { tracks: n, resume: c } = i;
|
|
@@ -9647,17 +9647,17 @@ W0([
|
|
|
9647
9647
|
], ns.prototype, "publish", 1);
|
|
9648
9648
|
function Kt() {
|
|
9649
9649
|
}
|
|
9650
|
-
const
|
|
9650
|
+
const Lt = class Lt {
|
|
9651
9651
|
static getInstance() {
|
|
9652
9652
|
var a;
|
|
9653
|
-
return
|
|
9653
|
+
return Lt.instance || (Lt.instance = new AudioContext()), (a = Lt.instance.resume()) == null || a.then(Kt, Kt).catch(Kt), Lt.instance;
|
|
9654
9654
|
}
|
|
9655
9655
|
};
|
|
9656
|
-
g(
|
|
9657
|
-
let
|
|
9656
|
+
g(Lt, "instance");
|
|
9657
|
+
let Ft = Lt;
|
|
9658
9658
|
const _i = () => {
|
|
9659
9659
|
var a;
|
|
9660
|
-
const r =
|
|
9660
|
+
const r = Ft.getInstance();
|
|
9661
9661
|
r.state !== "running" && r.state !== "closed" && ((a = r.resume()) == null || a.then(Kt, Kt).catch(Kt)), window.removeEventListener("mousedown", _i), window.removeEventListener("touchstart", _i);
|
|
9662
9662
|
};
|
|
9663
9663
|
window.addEventListener("mousedown", _i);
|
|
@@ -9694,7 +9694,7 @@ class K0 extends De {
|
|
|
9694
9694
|
g(this, "stream");
|
|
9695
9695
|
g(this, "sourceNode");
|
|
9696
9696
|
g(this, "analyser");
|
|
9697
|
-
this.audioContext =
|
|
9697
|
+
this.audioContext = Ft.getInstance(), this.stream = new MediaStream();
|
|
9698
9698
|
}
|
|
9699
9699
|
getLevel() {
|
|
9700
9700
|
return this.analyser ? this.analyser.getLevel() : 0;
|
|
@@ -9949,7 +9949,7 @@ class Di {
|
|
|
9949
9949
|
return new Di(s, n, t, i);
|
|
9950
9950
|
}
|
|
9951
9951
|
}
|
|
9952
|
-
const
|
|
9952
|
+
const Pt = 5;
|
|
9953
9953
|
class xi {
|
|
9954
9954
|
constructor(a, e, t) {
|
|
9955
9955
|
g(this, "_byteArray");
|
|
@@ -9959,19 +9959,19 @@ class xi {
|
|
|
9959
9959
|
}
|
|
9960
9960
|
}
|
|
9961
9961
|
write(a, e) {
|
|
9962
|
-
const t = this._byteArray, i = new ArrayBuffer(
|
|
9962
|
+
const t = this._byteArray, i = new ArrayBuffer(Pt), s = new DataView(i);
|
|
9963
9963
|
s.setUint8(0, a), s.setUint32(1, e.byteLength);
|
|
9964
|
-
const n = new Uint8Array(t.byteLength +
|
|
9965
|
-
n.set(t, 0), n.set(new Uint8Array(i), t.byteLength), n.set(new Uint8Array(e), t.byteLength +
|
|
9964
|
+
const n = new Uint8Array(t.byteLength + Pt + e.byteLength);
|
|
9965
|
+
n.set(t, 0), n.set(new Uint8Array(i), t.byteLength), n.set(new Uint8Array(e), t.byteLength + Pt), this._byteArray = n;
|
|
9966
9966
|
}
|
|
9967
9967
|
static parse(a) {
|
|
9968
9968
|
const e = {}, t = new DataView(a);
|
|
9969
9969
|
let i = 0;
|
|
9970
9970
|
for (; i < a.byteLength; ) {
|
|
9971
9971
|
const s = t.getUint8(i), n = t.getUint32(i + 1);
|
|
9972
|
-
if (i +
|
|
9973
|
-
const c = a.slice(i +
|
|
9974
|
-
e[s] = c, i +=
|
|
9972
|
+
if (i + Pt + n <= a.byteLength) {
|
|
9973
|
+
const c = a.slice(i + Pt, i + Pt + n);
|
|
9974
|
+
e[s] = c, i += Pt + n;
|
|
9975
9975
|
} else
|
|
9976
9976
|
break;
|
|
9977
9977
|
}
|
|
@@ -10736,7 +10736,7 @@ const ge = (lt = class extends bn {
|
|
|
10736
10736
|
throw new V(U.ERR_INNER, "sync publish to room server failed because no publishInfo");
|
|
10737
10737
|
let s = e;
|
|
10738
10738
|
if (this.dc) {
|
|
10739
|
-
const c = e, { tracks: u } = c, h =
|
|
10739
|
+
const c = e, { tracks: u } = c, h = Dt(c, ["tracks"]);
|
|
10740
10740
|
s = ut(G({}, h), {
|
|
10741
10741
|
tracks: [
|
|
10742
10742
|
...u,
|
|
@@ -10982,7 +10982,7 @@ const ge = (lt = class extends bn {
|
|
|
10982
10982
|
let c;
|
|
10983
10983
|
if (((e = this.candidateDataCache) == null ? void 0 : e.length) > 0) {
|
|
10984
10984
|
const t = this.candidateDataCache[this.candidateDataCache.length - 1] || {}, { _last: h } = t;
|
|
10985
|
-
c =
|
|
10985
|
+
c = Dt(t, ["_last"]);
|
|
10986
10986
|
}
|
|
10987
10987
|
((i = this.candidateDataCache) == null ? void 0 : i.length) >= qa && this.reportNetwork(), n && (n._last = c, this.candidateDataCache.push(n));
|
|
10988
10988
|
let o = Object.keys(this.monitorDataCache).filter((u) => {
|
|
@@ -11005,7 +11005,7 @@ const ge = (lt = class extends bn {
|
|
|
11005
11005
|
let x;
|
|
11006
11006
|
if ((l == null ? void 0 : l.length) > 0) {
|
|
11007
11007
|
const v = l[l.length - 1] || {}, { _last: b } = v;
|
|
11008
|
-
x =
|
|
11008
|
+
x = Dt(v, ["_last"]);
|
|
11009
11009
|
}
|
|
11010
11010
|
(l == null ? void 0 : l.length) >= qa && this.reportPublishMonitor(h), f._last = x, f._codec = u.codec || "", this.monitorDataCache[h].push(f);
|
|
11011
11011
|
});
|
|
@@ -11190,7 +11190,7 @@ me([
|
|
|
11190
11190
|
D(([r, a, e]) => [r.length, a, e])
|
|
11191
11191
|
], ge.prototype, "sendSEI", 1);
|
|
11192
11192
|
let tc = ge;
|
|
11193
|
-
var vt = /* @__PURE__ */ ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(vt || {}), re = /* @__PURE__ */ ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(re || {}),
|
|
11193
|
+
var vt = /* @__PURE__ */ ((r) => (r.OPUS = "opus", r.H264 = "H264", r.UNKNOWN = "", r))(vt || {}), re = /* @__PURE__ */ ((r) => (r[r.NotSubscribe = 0] = "NotSubscribe", r[r.Subscribing = 1] = "Subscribing", r[r.Subscribed = 2] = "Subscribed", r))(re || {}), Vt = /* @__PURE__ */ ((r) => (r.VideoTrackEnded = "videoTrackEnded", r.AudioTrackEnded = "audioTrackEnded", r.ScreenTrackEnded = "screenTrackEnded", r))(Vt || {});
|
|
11194
11194
|
const ic = (r) => {
|
|
11195
11195
|
const a = new MediaStream();
|
|
11196
11196
|
return a.addTrack(r), a;
|
|
@@ -11692,7 +11692,7 @@ const Ce = (Le = class extends bn {
|
|
|
11692
11692
|
else {
|
|
11693
11693
|
const t = this.audioElement.srcObject;
|
|
11694
11694
|
if (t) {
|
|
11695
|
-
const i =
|
|
11695
|
+
const i = Ft.getInstance();
|
|
11696
11696
|
i.addEventListener("statechange", this.handleAudioContextSuspended);
|
|
11697
11697
|
const s = i.createMediaStreamSource(t);
|
|
11698
11698
|
this.audioElement.muted = !0, this.playoutGainNode = i.createGain(), s.connect(this.playoutGainNode), this.playoutGainNode.gain.value = e, this.playoutGainNode.connect(i.destination);
|
|
@@ -11782,7 +11782,7 @@ const Ce = (Le = class extends bn {
|
|
|
11782
11782
|
clear(e = !0) {
|
|
11783
11783
|
return w(this, null, function* () {
|
|
11784
11784
|
var t;
|
|
11785
|
-
this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Ni(Le.prototype, this, "clear").call(this), this.stopPlayAudio(), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0,
|
|
11785
|
+
this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Ni(Le.prototype, this, "clear").call(this), this.stopPlayAudio(), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0, Ft.getInstance().removeEventListener("statechange", this.handleAudioContextSuspended)), (t = this.streamInfo) == null || t.removeAllListeners(Me.Remote);
|
|
11786
11786
|
});
|
|
11787
11787
|
}
|
|
11788
11788
|
updateRemoteUserDeviceStatus(e) {
|
|
@@ -11940,7 +11940,7 @@ const Ce = (Le = class extends bn {
|
|
|
11940
11940
|
}
|
|
11941
11941
|
resumeAudio() {
|
|
11942
11942
|
return w(this, null, function* () {
|
|
11943
|
-
const e =
|
|
11943
|
+
const e = Ft.getInstance();
|
|
11944
11944
|
return e.state !== "running" && e.resume(), this.audioElement ? this.audioElement.play() : this.playAudio();
|
|
11945
11945
|
});
|
|
11946
11946
|
}
|
|
@@ -12310,7 +12310,7 @@ const Ce = (Le = class extends bn {
|
|
|
12310
12310
|
let u;
|
|
12311
12311
|
if ((o == null ? void 0 : o.length) > 0) {
|
|
12312
12312
|
const h = o[o.length - 1] || {}, { _last: f } = h;
|
|
12313
|
-
u =
|
|
12313
|
+
u = Dt(h, ["_last"]);
|
|
12314
12314
|
}
|
|
12315
12315
|
(o == null ? void 0 : o.length) >= gc && this.reportSubscribeMonitor(i), c._last = u, c._codec = t.codec, n && (c._source = (p = this.localUser) == null ? void 0 : p.getMediaStats(c.playoutId)), this.monitorDataCache[i].push(c);
|
|
12316
12316
|
});
|
|
@@ -13496,8 +13496,8 @@ var Ec = Object.defineProperty, _c = Object.getOwnPropertyDescriptor, st = (r, a
|
|
|
13496
13496
|
for (var i = t > 1 ? void 0 : t ? _c(a, e) : a, s = r.length - 1, n; s >= 0; s--)
|
|
13497
13497
|
(n = r[s]) && (i = (t ? n(a, e, i) : n(i)) || i);
|
|
13498
13498
|
return t && i && Ec(a, e, i), i;
|
|
13499
|
-
},
|
|
13500
|
-
const Ze = (
|
|
13499
|
+
}, At;
|
|
13500
|
+
const Ze = (At = class extends De {
|
|
13501
13501
|
// 设置是否发布屏幕流
|
|
13502
13502
|
constructor(e, t) {
|
|
13503
13503
|
super();
|
|
@@ -13520,7 +13520,7 @@ const Ze = (Vt = class extends De {
|
|
|
13520
13520
|
g(this, "_publishLocalScreenStreamEnabled", !0);
|
|
13521
13521
|
this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
|
|
13522
13522
|
const i = (s) => w(this, null, function* () {
|
|
13523
|
-
if (O.info(`[${
|
|
13523
|
+
if (O.info(`[${At.logName}]`, "plugin added", s.name), !s.isSupported("6.14.4-beta.5")) {
|
|
13524
13524
|
console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
|
|
13525
13525
|
return;
|
|
13526
13526
|
}
|
|
@@ -13534,15 +13534,15 @@ const Ze = (Vt = class extends De {
|
|
|
13534
13534
|
this.cameraStreamInfo.on("videotrackended", () => w(this, null, function* () {
|
|
13535
13535
|
yield this.stopLocalStream({
|
|
13536
13536
|
video: !0
|
|
13537
|
-
}), this.emit("trackended",
|
|
13537
|
+
}), this.emit("trackended", Vt.VideoTrackEnded);
|
|
13538
13538
|
})), this.cameraStreamInfo.on("audiotrackended", () => w(this, null, function* () {
|
|
13539
13539
|
yield this.stopLocalStream({
|
|
13540
13540
|
audio: !0
|
|
13541
|
-
}), this.emit("trackended",
|
|
13541
|
+
}), this.emit("trackended", Vt.AudioTrackEnded);
|
|
13542
13542
|
})), this.screenStreamInfo.on("videotrackended", () => w(this, null, function* () {
|
|
13543
13543
|
yield this.stopLocalStream({
|
|
13544
13544
|
screen: !0
|
|
13545
|
-
}), this.emit("trackended",
|
|
13545
|
+
}), this.emit("trackended", Vt.ScreenTrackEnded);
|
|
13546
13546
|
})), this.pluginManager.on("added", i), this.pluginManager.on("removed", (s) => w(this, null, function* () {
|
|
13547
13547
|
this.cameraStreamInfo.removePlugin(s) && (yield this.cameraStreamInfo.process(this.streamInfos)), this.screenStreamInfo.removePlugin(s) && (yield this.screenStreamInfo.process(this.streamInfos)), this.emit("publishupdate");
|
|
13548
13548
|
})), this.pluginManager.on("updated", () => w(this, null, function* () {
|
|
@@ -13645,6 +13645,12 @@ const Ze = (Vt = class extends De {
|
|
|
13645
13645
|
custom: !!i,
|
|
13646
13646
|
mediaStream: i,
|
|
13647
13647
|
skipProfile: !0
|
|
13648
|
+
}), O.info(`[${At.logName}]`, "createLocalStream", {
|
|
13649
|
+
audio: o,
|
|
13650
|
+
video: c,
|
|
13651
|
+
screen: t,
|
|
13652
|
+
custom: !!i,
|
|
13653
|
+
time: Date.now() - d
|
|
13648
13654
|
}), o && !i && this.slsReporter.reportAudio(null, Date.now() - d, ((p = h == null ? void 0 : h.audioTrack) == null ? void 0 : p.label) || ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - d);
|
|
13649
13655
|
} catch (f) {
|
|
13650
13656
|
throw o && !i && this.slsReporter.reportAudio(f, Date.now() - d, ""), t && !i && this.slsReporter.reportScreen(null, Date.now() - d), f;
|
|
@@ -13686,7 +13692,7 @@ const Ze = (Vt = class extends De {
|
|
|
13686
13692
|
const c = this.publishStreams;
|
|
13687
13693
|
try {
|
|
13688
13694
|
if (!c.audio && !c.video && !c.videoSmall && !c.screen)
|
|
13689
|
-
throw O.error(`[${
|
|
13695
|
+
throw O.error(`[${At.logName}]`, "no tracks founded"), new V(U.ERR_SDK_PUBLISH_INVAILD, "no tracks founded");
|
|
13690
13696
|
const d = new MediaStream();
|
|
13691
13697
|
(o = c.audio) != null && o.audioTrack && d.addTrack(c.audio.audioTrack), (u = c.video) != null && u.videoTrack ? (d.addTrack(c.video.videoTrack), s = c.videoSmall, n = c.screen) : (h = c.screen) != null && h.videoTrack && (i = T.Screen, d.addTrack((p = c.screen) == null ? void 0 : p.videoTrack), t = !0), e = yield yn(d), t ? (this.screenStreamInfo.cloneVideoProfile(e), this.publishingScreenVideoStream = e) : (this.cameraStreamInfo.cloneVideoProfile(e), this.publishingCameraVideoStream = e);
|
|
13692
13698
|
} catch (d) {
|
|
@@ -13730,7 +13736,7 @@ const Ze = (Vt = class extends De {
|
|
|
13730
13736
|
}, /**
|
|
13731
13737
|
* @ignore
|
|
13732
13738
|
*/
|
|
13733
|
-
g(
|
|
13739
|
+
g(At, "logName", "LocalStreamManager"), At);
|
|
13734
13740
|
st([
|
|
13735
13741
|
D(([r]) => {
|
|
13736
13742
|
const { audio: a, video: e, screen: t, custom: i, skipProfile: s, videoProfile: n, screenProfile: c } = r;
|
|
@@ -15239,21 +15245,21 @@ class $c {
|
|
|
15239
15245
|
return this.sourceType && ii[this.sourceType] ? s.sourcetype = ii[this.sourceType] : s.sourcetype = ii[ni.LiveTranscodingCamera], this.segmentType && i === is.LiveTranscodingVirtualBackground ? s.segmenttype = this.segmentType : s.segmenttype = Ei.LiveTranscodingNoBody, s;
|
|
15240
15246
|
}
|
|
15241
15247
|
}
|
|
15242
|
-
const
|
|
15248
|
+
const Mt = class Mt {
|
|
15243
15249
|
constructor() {
|
|
15244
15250
|
// 使用 static 声明实例
|
|
15245
15251
|
g(this, "ntpClock");
|
|
15246
15252
|
this.ntpClock = new le.Clock();
|
|
15247
15253
|
}
|
|
15248
15254
|
static getInstance() {
|
|
15249
|
-
return
|
|
15255
|
+
return Mt.instance || (Mt.instance = new Mt()), Mt.instance;
|
|
15250
15256
|
}
|
|
15251
15257
|
now() {
|
|
15252
15258
|
return this.ntpClock.now();
|
|
15253
15259
|
}
|
|
15254
15260
|
};
|
|
15255
|
-
g(
|
|
15256
|
-
let Wr =
|
|
15261
|
+
g(Mt, "instance");
|
|
15262
|
+
let Wr = Mt;
|
|
15257
15263
|
const wn = () => Wr.getInstance(), { BrowserUtil: Mr, SystenUtil: tn } = le;
|
|
15258
15264
|
class rn {
|
|
15259
15265
|
constructor() {
|
|
@@ -15374,7 +15380,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15374
15380
|
(!a || a < 0 || a > 1e4) && (i = 1e3);
|
|
15375
15381
|
let s = r;
|
|
15376
15382
|
return s || (s = 0), Math.min(e, Math.max(t, Math.round(s / (i / 1e3))));
|
|
15377
|
-
},
|
|
15383
|
+
}, kt = (r, a) => {
|
|
15378
15384
|
if (a === 0 || !a)
|
|
15379
15385
|
return "0.00";
|
|
15380
15386
|
let e = r;
|
|
@@ -15386,7 +15392,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15386
15392
|
}, Kc = (r, a) => {
|
|
15387
15393
|
var e, t, i;
|
|
15388
15394
|
return (((e = r == null ? void 0 : r._source) == null ? void 0 : e[a]) || 0) - (((i = (t = r == null ? void 0 : r._last) == null ? void 0 : t._source) == null ? void 0 : i[a]) || 0);
|
|
15389
|
-
}, an = (r, a) => fe(pe(r, a), 1e3, 1e4),
|
|
15395
|
+
}, an = (r, a) => fe(pe(r, a), 1e3, 1e4), Bt = (r, a = 2e7) => fe(r, 1, a), si = class si {
|
|
15390
15396
|
constructor(a) {
|
|
15391
15397
|
g(this, "engine");
|
|
15392
15398
|
g(this, "logClient");
|
|
@@ -15446,11 +15452,11 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15446
15452
|
p.push(te);
|
|
15447
15453
|
const ee = pe(I, "packetsLost"), k = Ge(ee, P);
|
|
15448
15454
|
d.push(k);
|
|
15449
|
-
const M =
|
|
15455
|
+
const M = kt(ee, Q);
|
|
15450
15456
|
if (f.push(M), n)
|
|
15451
15457
|
(N = I._source) != null && N.audioLevel && m.push(sn(I._source.audioLevel)), l.push(0);
|
|
15452
15458
|
else {
|
|
15453
|
-
x.push(an(I, "totalEncodeTime")), v.push(
|
|
15459
|
+
x.push(an(I, "totalEncodeTime")), v.push(Bt((J = I._source) == null ? void 0 : J.framesPerSecond, 100)), S.push(Bt((j = I._source) == null ? void 0 : j.framesPerSecond, 100)), b.push(Bt(I.framesPerSecond, 100)), E.push(Bt((ce = I._source) == null ? void 0 : ce.height, 4400)), _.push(Bt((Z = I._source) == null ? void 0 : Z.width, 7700)), y.push(Bt(I.frameHeight, 4400)), A.push(Bt(I.frameWidth, 7700));
|
|
15454
15460
|
const Ve = pe(I, "totalPacketSendDelay");
|
|
15455
15461
|
R.push(fe(Ve, 1 / (ee || 1), 2e3));
|
|
15456
15462
|
const ze = pe(I, "qpSum");
|
|
@@ -15484,7 +15490,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15484
15490
|
}, o = [], u = [], h = [], p = [], d = [], f = [], m = [], l = [], x = [], v = [], S = [], b = [], E = [], _ = [], y = [], A = [], R = [], L = [], C = [], I = [], P = [], B = [], $ = [], q = [], X = [], ae = [], Q = [], te = [], ee = [], k = [], M = [], F = [], N = [], J = [];
|
|
15485
15491
|
try {
|
|
15486
15492
|
s.forEach((j) => {
|
|
15487
|
-
var tt,
|
|
15493
|
+
var tt, wt;
|
|
15488
15494
|
if (!j || !j.timestamp)
|
|
15489
15495
|
return;
|
|
15490
15496
|
const ce = (tt = j._last) != null && tt.timestamp ? j.timestamp - j._last.timestamp : 1e3, Z = pe(j, "bytesReceived"), Ve = pe(j, "headerBytesReceived"), ze = Ge(fe(Z + Ve, 8, 2e7), ce);
|
|
@@ -15495,29 +15501,29 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
|
|
|
15495
15501
|
h.push(et);
|
|
15496
15502
|
const Se = pe(j, "packetsReceived"), ke = Ge(Se, ce);
|
|
15497
15503
|
p.push(ke);
|
|
15498
|
-
const ot = pe(j, "packetsLost"),
|
|
15499
|
-
d.push(
|
|
15500
|
-
const Ht =
|
|
15504
|
+
const ot = pe(j, "packetsLost"), Ct = Ge(ot, ce);
|
|
15505
|
+
d.push(Ct);
|
|
15506
|
+
const Ht = kt(ot, Se);
|
|
15501
15507
|
f.push(Ht);
|
|
15502
|
-
const
|
|
15508
|
+
const Rt = pe(j, "jitterBufferDelay"), Yt = pe(j, "jitterBufferEmittedCount");
|
|
15503
15509
|
if (j.jitterBufferDelay && j.jitterBufferEmittedCount) {
|
|
15504
|
-
const gt = fe(
|
|
15510
|
+
const gt = fe(Rt, 1e3 / Yt, 1e4);
|
|
15505
15511
|
m.push(gt);
|
|
15506
15512
|
} else
|
|
15507
15513
|
m.push(0);
|
|
15508
|
-
const
|
|
15509
|
-
b.push(
|
|
15514
|
+
const It = pe(j, "fecPacketsReceived");
|
|
15515
|
+
b.push(kt(It, Se));
|
|
15510
15516
|
const Be = pe(j, "retransmittedPacketsReceived"), Re = Se + ot - Be;
|
|
15511
|
-
if (x.push(
|
|
15517
|
+
if (x.push(kt(Se - Be, Re)), v.push(kt(ot, Re)), l.push(kt(Be, Re)), S.push(Re), N.push(0), J.push(""), n) {
|
|
15512
15518
|
_.push(sn(j.audioLevel));
|
|
15513
15519
|
const gt = Kc(j, "synthesizedSamplesEvents");
|
|
15514
15520
|
y.push(gt);
|
|
15515
15521
|
const it = an(j, "synthesizedSamplesDuration");
|
|
15516
15522
|
A.push(it);
|
|
15517
|
-
const ct =
|
|
15523
|
+
const ct = kt(it, ce);
|
|
15518
15524
|
E.push(ct), R.push(0);
|
|
15519
15525
|
} else {
|
|
15520
|
-
const gt = (
|
|
15526
|
+
const gt = (wt = j._last) != null && wt.totalInterFrameDelay ? j.totalInterFrameDelay - j._last.totalInterFrameDelay : 0;
|
|
15521
15527
|
L.push(fe(gt, 1e3 / (j.framesDecoded || 30), 500)), C.push(fe(j.framesPerSecond, 1, 100)), I.push(pe(j, "framesReceived")), F.push(pe(j, "framesRendered")), P.push(fe(j.frameHeight, 1, 4400)), B.push(fe(j.frameWidth, 1, 7700));
|
|
15522
15528
|
const it = pe(j, "totalProcessingDelay");
|
|
15523
15529
|
$.push(fe(it, 1e3 / (j.framesDecoded || 30), 12e4));
|
|
@@ -16165,7 +16171,7 @@ const z = (K = class extends De {
|
|
|
16165
16171
|
g(this, "_serverCheckAuthInfoTimestamp", null);
|
|
16166
16172
|
g(this, "_localCheckAuthInfoTimestamp", null);
|
|
16167
16173
|
const t = Date.now();
|
|
16168
|
-
O.init(), this.slsReporter = new $r(this), this.channelProfile = bt.AliRtcSdkCommunication, this.clientRole =
|
|
16174
|
+
O.init(), this.slsReporter = new $r(this), this.channelProfile = bt.AliRtcSdkCommunication, this.clientRole = Nt.AliRtcSdkLive, this.liveTranscoding = new Uc(this.slsReporter), this.signalingManager = new ns(
|
|
16169
16175
|
this.channelProfile,
|
|
16170
16176
|
this.clientRole,
|
|
16171
16177
|
this.slsReporter,
|
|
@@ -16233,7 +16239,7 @@ const z = (K = class extends De {
|
|
|
16233
16239
|
return e ? e.isPublishing : !1;
|
|
16234
16240
|
}
|
|
16235
16241
|
get currentRoleCanPublish() {
|
|
16236
|
-
return this.channelProfile === bt.AliRtcSdkCommunication || this.clientRole ===
|
|
16242
|
+
return this.channelProfile === bt.AliRtcSdkCommunication || this.clientRole === Nt.AliRtcSdkInteractive;
|
|
16237
16243
|
}
|
|
16238
16244
|
/**
|
|
16239
16245
|
* 监听 Publisher 事件
|
|
@@ -16242,21 +16248,21 @@ const z = (K = class extends De {
|
|
|
16242
16248
|
var e, t, i, s, n, c, o, u, h, p;
|
|
16243
16249
|
(e = this.publisher) == null || e.on(Me.Local, (d) => {
|
|
16244
16250
|
O.event("[Publisher] Device Status Change", d), this.onLocalDeviceStatusChange(d);
|
|
16245
|
-
}), (t = this.publisher) == null || t.on(
|
|
16251
|
+
}), (t = this.publisher) == null || t.on(Vt.VideoTrackEnded, () => {
|
|
16246
16252
|
O.event("[Publisher] VideoTrack Ended"), this.emit(
|
|
16247
16253
|
"localDeviceException",
|
|
16248
16254
|
dt.AliEngineLocalDeviceTypeCamera,
|
|
16249
16255
|
_e.AliEngineLocalDeviceExceptionTypeCameraInterrupt,
|
|
16250
16256
|
""
|
|
16251
16257
|
);
|
|
16252
|
-
}), (i = this.publisher) == null || i.on(
|
|
16258
|
+
}), (i = this.publisher) == null || i.on(Vt.ScreenTrackEnded, () => {
|
|
16253
16259
|
O.event("[Publisher] ScreenTrack Ended"), this.emit(
|
|
16254
16260
|
"localDeviceException",
|
|
16255
16261
|
dt.AliEngineLocalDeviceTypeDisplay,
|
|
16256
16262
|
_e.AliEngineLocalDeviceExceptionTypeDisplayException,
|
|
16257
16263
|
""
|
|
16258
16264
|
);
|
|
16259
|
-
}), (s = this.publisher) == null || s.on(
|
|
16265
|
+
}), (s = this.publisher) == null || s.on(Vt.AudioTrackEnded, () => {
|
|
16260
16266
|
O.event("[Publisher] AudioTrack Ended"), this.emit(
|
|
16261
16267
|
"localDeviceException",
|
|
16262
16268
|
dt.AliEngineLocalDeviceTypeMic,
|
|
@@ -16550,7 +16556,7 @@ const z = (K = class extends De {
|
|
|
16550
16556
|
ue.AliRtcConnectionStatusFailed
|
|
16551
16557
|
].includes(this.connectState))
|
|
16552
16558
|
throw new V(U.ERR_INNER, "cannot set channel profile in call");
|
|
16553
|
-
this.channelProfile = e, this.channelProfile === bt.AliRtcSdkCommunication && (this.clientRole =
|
|
16559
|
+
this.channelProfile = e, this.channelProfile === bt.AliRtcSdkCommunication && (this.clientRole = Nt.AliRtcSdkLive), this.signalingManager.setChannelProfile(e);
|
|
16554
16560
|
}
|
|
16555
16561
|
startAndPublishDefaultDevices(e) {
|
|
16556
16562
|
return w(this, null, function* () {
|
|
@@ -16599,14 +16605,14 @@ const z = (K = class extends De {
|
|
|
16599
16605
|
try {
|
|
16600
16606
|
if (this.channelProfile === bt.AliRtcSdkCommunication)
|
|
16601
16607
|
return;
|
|
16602
|
-
if (!Object.values(
|
|
16608
|
+
if (!Object.values(Nt).includes(e))
|
|
16603
16609
|
throw new V(
|
|
16604
16610
|
U.ERR_INVALID_ARGUMENTS,
|
|
16605
16611
|
`set client role error, role value(${e}) is invalid`
|
|
16606
16612
|
);
|
|
16607
16613
|
if (this.clientRole === e)
|
|
16608
16614
|
return;
|
|
16609
|
-
this.slsReporter.reportRoleUpdate(this.clientRole, e), this.isInCall() ? this.clientRole ===
|
|
16615
|
+
this.slsReporter.reportRoleUpdate(this.clientRole, e), this.isInCall() ? this.clientRole === Nt.AliRtcSdkInteractive ? (this.bizControl.isSubscribing ? yield (t = this.publisher) == null ? void 0 : t.clearStream() : yield (i = this.publisher) == null ? void 0 : i.unPublish(), yield this.signalingManager.setClientRole(e)) : (yield this.signalingManager.setClientRole(e), yield this.startAndPublishDefaultDevices(nt.ROLE_CHANGE)) : yield this.signalingManager.setClientRole(e), this.clientRole = e;
|
|
16610
16616
|
} catch (s) {
|
|
16611
16617
|
throw s.code === 403 && this.emit("authInfoExpired"), s;
|
|
16612
16618
|
}
|
|
@@ -17076,7 +17082,7 @@ const z = (K = class extends De {
|
|
|
17076
17082
|
setCameraCapturerConfiguration(e) {
|
|
17077
17083
|
return w(this, null, function* () {
|
|
17078
17084
|
var h, p, d;
|
|
17079
|
-
const u = e, { cameraDirection: t, deviceId: i, bitrate: s, maxSendFrameRate: n } = u, c =
|
|
17085
|
+
const u = e, { cameraDirection: t, deviceId: i, bitrate: s, maxSendFrameRate: n } = u, c = Dt(u, ["cameraDirection", "deviceId", "bitrate", "maxSendFrameRate"]), o = G({}, c);
|
|
17080
17086
|
s && (o.maxBitrate = s), n && (o.maxSendFrameRate = n), Object.keys(o).length > 0 && (yield (h = this.publisher) == null ? void 0 : h.setVideoProfile(o)), t !== void 0 && ((p = this.publisher) == null || p.setCameraDirection(t)), i && ((d = this.publisher) == null || d.setCameraDeviceId(i));
|
|
17081
17087
|
});
|
|
17082
17088
|
}
|
|
@@ -17374,7 +17380,7 @@ g(K, "getCameraList", () => w(K, null, function* () {
|
|
|
17374
17380
|
return (yield le.getMicList()).filter((t) => t.deviceId);
|
|
17375
17381
|
})), g(K, "getSpeakerList", () => w(K, null, function* () {
|
|
17376
17382
|
return (yield le.getSpeakerList()).filter((t) => t.deviceId);
|
|
17377
|
-
})), g(K, "_instance"), g(K, "AliRtcSdkChannelProfile", bt), g(K, "AliRtcSdkClientRole",
|
|
17383
|
+
})), g(K, "_instance"), g(K, "AliRtcSdkChannelProfile", bt), g(K, "AliRtcSdkClientRole", Nt), g(K, "AliRtcVideoStreamType", we), g(K, "AliRtcVideoTrack", se), g(K, "AliRtcAudioTrack", Xt), g(K, "AliRtcPublishState", Y), g(K, "AliRtcSubscribeState", he), g(K, "AliRtcRawDataStreamType", be), g(K, "AliRtcLogLevel", fn), g(K, "AliRtcEngineLocalDeviceType", dt), g(K, "AliRtcEngineLocalDeviceExceptionType", _e), g(K, "AliRtcConnectionStatus", ue), g(K, "AliRtcConnectionStatusChangeReason", Wt), g(K, "AliRtcPlugin", Gt), g(K, "AliRtcPluginTrackType", Ri), g(K, "AliRtcLiveTranscodingParam", Fr), g(K, "AliRtcLiveTranscodingEncodeParam", vn), g(K, "AliRtcLiveTranscodingMixParam", Hc), g(K, "AliRtcLiveTranscodingSingleParam", jc), g(K, "AliRtcTranscodingClockWidget", zc), g(K, "AliRtcTranscodingImage", In), g(K, "AliRtcTranscodingText", Wc), g(K, "AliRtcTranscodingUser", $c), g(K, "AliRtcLiveTranscodingMixMode", bi), g(K, "AliRtcLiveTranscodingStreamType", pn), g(K, "AliRtcLiveTranscodingSourceType", ni), g(K, "AliRtcLiveTranscodingTaskProfile", gn), g(K, "AliRtcLiveTranscodingAudioSampleRate", ts), g(K, "AliRtcLiveTranscodingSegmentType", Ei), g(K, "AliRtcLiveTranscodingFontType", Ii), g(K, "AliRtcLiveTranscodingCropMode", mn), g(K, "AliRtcLiveTranscodingMediaProcessMode", is), g(K, "AliRtcLiveTranscodingState", xn), g(K, "AliRtcLiveTranscodingErrorCode", ht), g(K, "AliRtcTrascodingPublishTaskStatus", Sn), g(K, "AliRtcDataChannelMsg", qt), g(K, "AliRtcDataMsgType", An), g(K, "Plugin", Gt), K);
|
|
17378
17384
|
W([
|
|
17379
17385
|
D()
|
|
17380
17386
|
], z.prototype, "destroy", 1);
|
|
@@ -17645,7 +17651,7 @@ export {
|
|
|
17645
17651
|
be as AliRtcRawDataStreamType,
|
|
17646
17652
|
lc as AliRtcRemoteUserInfo,
|
|
17647
17653
|
bt as AliRtcSdkChannelProfile,
|
|
17648
|
-
|
|
17654
|
+
Nt as AliRtcSdkClientRole,
|
|
17649
17655
|
he as AliRtcSubscribeState,
|
|
17650
17656
|
zc as AliRtcTranscodingClockWidget,
|
|
17651
17657
|
In as AliRtcTranscodingImage,
|