aliyun-rtc-sdk 6.14.2-beta.0 → 6.14.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1582,19 +1582,19 @@ function ao() {
1582
1582
  }
1583
1583
  }
1584
1584
  var ze = x();
1585
- return j.text().then(function(Ye) {
1585
+ return j.text().then(function(Qe) {
1586
1586
  if (!R && e.isFunction(y)) {
1587
- var Ze = y(j, Ye);
1588
- Ze && e.isString(Ze) && (R = Ze);
1587
+ var et = y(j, Qe);
1588
+ et && e.isString(et) && (R = et);
1589
1589
  }
1590
- var Se = e.getFetchSnapshot(g, Ye, ce);
1591
- j.ok ? s(l, v.parseResponse, b, E, Ye, j.status || 200, ze, S, R, M, Se, I, $) : (l.api(b, !1, ze, j.status || 404, j.statusText, S, R, M, Se, i, I, $), v.enableResource && t.fixResourceStatus && t.fixResourceStatus({
1590
+ var Se = e.getFetchSnapshot(g, Qe, ce);
1591
+ j.ok ? s(l, v.parseResponse, b, E, Qe, j.status || 200, ze, S, R, M, Se, I, $) : (l.api(b, !1, ze, j.status || 404, j.statusText, S, R, M, Se, i, I, $), v.enableResource && t.fixResourceStatus && t.fixResourceStatus({
1592
1592
  src: j.url,
1593
1593
  res_type: "api"
1594
1594
  }));
1595
1595
  }), J;
1596
- } catch (Ye) {
1597
- return e.warn("[ARMS] fetch response error :", Ye), J;
1596
+ } catch (Qe) {
1597
+ return e.warn("[ARMS] fetch response error :", Qe), J;
1598
1598
  }
1599
1599
  }).catch(function(J) {
1600
1600
  if (!l || !l.api)
@@ -2250,7 +2250,7 @@ var yo = typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.
2250
2250
  const Js = {
2251
2251
  randomUUID: yo
2252
2252
  };
2253
- function it(r, a, e) {
2253
+ function rt(r, a, e) {
2254
2254
  if (Js.randomUUID && !a && !r)
2255
2255
  return Js.randomUUID();
2256
2256
  r = r || {};
@@ -2264,7 +2264,7 @@ function it(r, a, e) {
2264
2264
  return Eo(t);
2265
2265
  }
2266
2266
  var bi = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(bi || {});
2267
- const yi = "6.14.2-beta.0", Gs = "web";
2267
+ const yi = "6.14.2-beta.1", Gs = "web";
2268
2268
  class He {
2269
2269
  /**
2270
2270
  * 将版本号转换为number
@@ -2306,7 +2306,7 @@ class He {
2306
2306
  * @returns
2307
2307
  */
2308
2308
  static createCallid(a = "") {
2309
- const e = it();
2309
+ const e = rt();
2310
2310
  return a && e && e.length > a.length ? `${a}${e.substring(a.length)}` : e;
2311
2311
  }
2312
2312
  /**
@@ -3862,18 +3862,18 @@ function un() {
3862
3862
  ]);
3863
3863
  },
3864
3864
  _doProcessBlock: function(g, l) {
3865
- for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], E = S[3], _ = S[4], y = S[5], A = S[6], R = S[7], M = v.high, C = v.low, I = x.high, P = x.low, B = b.high, $ = b.low, q = E.high, G = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, L = A.low, V = R.high, N = R.low, J = M, j = C, ce = I, Y = P, Fe = B, ze = $, Ye = q, Ze = G, Se = ae, ke = Q, ot = te, yt = ee, Ot = k, Ct = L, Xt = V, Rt = N, Be = 0; Be < 80; Be++) {
3866
- var Re, Qe, It = d[Be];
3865
+ for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], E = S[3], _ = S[4], y = S[5], A = S[6], R = S[7], M = v.high, C = v.low, I = x.high, P = x.low, B = b.high, $ = b.low, q = E.high, G = E.low, ae = _.high, Q = _.low, te = y.high, ee = y.low, k = A.high, L = A.low, V = R.high, N = R.low, J = M, j = C, ce = I, Y = P, Fe = B, ze = $, Qe = q, et = G, Se = ae, ke = Q, ot = te, yt = ee, Ot = k, Ct = L, Xt = V, Rt = N, Be = 0; Be < 80; Be++) {
3866
+ var Re, tt, It = d[Be];
3867
3867
  if (Be < 16)
3868
- Qe = It.high = g[l + Be * 2] | 0, Re = It.low = g[l + Be * 2 + 1] | 0;
3868
+ tt = It.high = g[l + Be * 2] | 0, Re = It.low = g[l + Be * 2 + 1] | 0;
3869
3869
  else {
3870
- var gt = d[Be - 15], et = gt.high, ct = gt.low, ki = (et >>> 1 | ct << 31) ^ (et >>> 8 | ct << 24) ^ et >>> 7, hi = (ct >>> 1 | et << 31) ^ (ct >>> 8 | et << 24) ^ (ct >>> 7 | et << 25), di = d[Be - 2], We = di.high, mt = di.low, li = (We >>> 19 | mt << 13) ^ (We << 3 | mt >>> 29) ^ We >>> 6, Yt = (mt >>> 19 | We << 13) ^ (mt << 3 | We >>> 29) ^ (mt >>> 6 | We << 26), cs = d[Be - 7], Pn = cs.high, kn = cs.low, us = d[Be - 16], Bn = us.high, hs = us.low;
3871
- Re = hi + kn, Qe = ki + Pn + (Re >>> 0 < hi >>> 0 ? 1 : 0), Re = Re + Yt, Qe = Qe + li + (Re >>> 0 < Yt >>> 0 ? 1 : 0), Re = Re + hs, Qe = Qe + Bn + (Re >>> 0 < hs >>> 0 ? 1 : 0), It.high = Qe, It.low = Re;
3870
+ var gt = d[Be - 15], it = gt.high, ct = gt.low, ki = (it >>> 1 | ct << 31) ^ (it >>> 8 | ct << 24) ^ it >>> 7, hi = (ct >>> 1 | it << 31) ^ (ct >>> 8 | it << 24) ^ (ct >>> 7 | it << 25), di = d[Be - 2], We = di.high, mt = di.low, li = (We >>> 19 | mt << 13) ^ (We << 3 | mt >>> 29) ^ We >>> 6, Yt = (mt >>> 19 | We << 13) ^ (mt << 3 | We >>> 29) ^ (mt >>> 6 | We << 26), cs = d[Be - 7], Pn = cs.high, kn = cs.low, us = d[Be - 16], Bn = us.high, hs = us.low;
3871
+ Re = hi + kn, tt = ki + Pn + (Re >>> 0 < hi >>> 0 ? 1 : 0), Re = Re + Yt, tt = tt + li + (Re >>> 0 < Yt >>> 0 ? 1 : 0), Re = Re + hs, tt = tt + Bn + (Re >>> 0 < hs >>> 0 ? 1 : 0), It.high = tt, It.low = Re;
3872
3872
  }
3873
- var Nn = Se & ot ^ ~Se & Ot, ds = ke & yt ^ ~ke & Ct, Mn = J & ce ^ J & Fe ^ ce & Fe, Ln = j & Y ^ j & ze ^ Y & ze, Vn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), ls = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Fn = (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), fs = p[Be], Un = fs.high, ps = fs.low, $e = Rt + On, xt = Xt + Fn + ($e >>> 0 < Rt >>> 0 ? 1 : 0), $e = $e + ds, xt = xt + Nn + ($e >>> 0 < ds >>> 0 ? 1 : 0), $e = $e + ps, xt = xt + Un + ($e >>> 0 < ps >>> 0 ? 1 : 0), $e = $e + Re, xt = xt + Qe + ($e >>> 0 < Re >>> 0 ? 1 : 0), gs = ls + Ln, Hn = Vn + Mn + (gs >>> 0 < ls >>> 0 ? 1 : 0);
3874
- Xt = Ot, Rt = Ct, Ot = ot, Ct = yt, ot = Se, yt = ke, ke = Ze + $e | 0, Se = Ye + xt + (ke >>> 0 < Ze >>> 0 ? 1 : 0) | 0, Ye = Fe, Ze = ze, Fe = ce, ze = Y, ce = J, Y = j, j = $e + gs | 0, J = xt + Hn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
3873
+ var Nn = Se & ot ^ ~Se & Ot, ds = ke & yt ^ ~ke & Ct, Mn = J & ce ^ J & Fe ^ ce & Fe, Ln = j & Y ^ j & ze ^ Y & ze, Vn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), ls = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Fn = (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), fs = p[Be], Un = fs.high, ps = fs.low, $e = Rt + On, xt = Xt + Fn + ($e >>> 0 < Rt >>> 0 ? 1 : 0), $e = $e + ds, xt = xt + Nn + ($e >>> 0 < ds >>> 0 ? 1 : 0), $e = $e + ps, xt = xt + Un + ($e >>> 0 < ps >>> 0 ? 1 : 0), $e = $e + Re, xt = xt + tt + ($e >>> 0 < Re >>> 0 ? 1 : 0), gs = ls + Ln, Hn = Vn + Mn + (gs >>> 0 < ls >>> 0 ? 1 : 0);
3874
+ Xt = Ot, Rt = Ct, Ot = ot, Ct = yt, ot = Se, yt = ke, ke = et + $e | 0, Se = Qe + xt + (ke >>> 0 < et >>> 0 ? 1 : 0) | 0, Qe = Fe, et = ze, Fe = ce, ze = Y, ce = J, Y = j, j = $e + gs | 0, J = xt + Hn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
3875
3875
  }
3876
- C = v.low = C + j, v.high = M + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = x.low = P + Y, x.high = I + ce + (P >>> 0 < Y >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Fe + ($ >>> 0 < ze >>> 0 ? 1 : 0), G = E.low = G + Ze, E.high = q + Ye + (G >>> 0 < Ze >>> 0 ? 1 : 0), Q = _.low = Q + ke, _.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = y.low = ee + yt, y.high = te + ot + (ee >>> 0 < yt >>> 0 ? 1 : 0), L = A.low = L + Ct, A.high = k + Ot + (L >>> 0 < Ct >>> 0 ? 1 : 0), N = R.low = N + Rt, R.high = V + Xt + (N >>> 0 < Rt >>> 0 ? 1 : 0);
3876
+ C = v.low = C + j, v.high = M + J + (C >>> 0 < j >>> 0 ? 1 : 0), P = x.low = P + Y, x.high = I + ce + (P >>> 0 < Y >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Fe + ($ >>> 0 < ze >>> 0 ? 1 : 0), G = E.low = G + et, E.high = q + Qe + (G >>> 0 < et >>> 0 ? 1 : 0), Q = _.low = Q + ke, _.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = y.low = ee + yt, y.high = te + ot + (ee >>> 0 < yt >>> 0 ? 1 : 0), L = A.low = L + Ct, A.high = k + Ot + (L >>> 0 < Ct >>> 0 ? 1 : 0), N = R.low = N + Rt, R.high = V + Xt + (N >>> 0 < Rt >>> 0 ? 1 : 0);
3877
3877
  },
3878
3878
  _doFinalize: function() {
3879
3879
  var g = this._data, l = g.words, S = this._nDataBytes * 8, v = g.sigBytes * 8;
@@ -8028,8 +8028,8 @@ class w0 {
8028
8028
  m(this, "slsPlugin");
8029
8029
  m(this, "stsData");
8030
8030
  m(this, "stsExpiration", Date.now());
8031
- m(this, "clientId", it());
8032
- m(this, "bSesid", it());
8031
+ m(this, "clientId", rt());
8032
+ m(this, "bSesid", rt());
8033
8033
  m(this, "logLevel", 3);
8034
8034
  m(this, "appId", "");
8035
8035
  m(this, "sessionId", "");
@@ -8105,7 +8105,7 @@ class w0 {
8105
8105
  this.updateTaskTimer && clearTimeout(this.updateTaskTimer);
8106
8106
  }
8107
8107
  reset() {
8108
- this.bSesid = it(), this.endReported = !0, this.logSequence = 0, this.appId = "", this.sessionId = "";
8108
+ this.bSesid = rt(), this.endReported = !0, this.logSequence = 0, this.appId = "", this.sessionId = "";
8109
8109
  }
8110
8110
  startSTSUpdateTask() {
8111
8111
  return w(this, null, function* () {
@@ -8439,7 +8439,7 @@ class xn {
8439
8439
  this.videoWidth = a, this.videoHeight = e, t && (this.videoFramerate = t), i && (this.videoBitrate = i), s && (this.videoGop = s), n && (this.audioSamplerate = n), c && (this.audioBitrate = c), o && (this.audioChannels = o);
8440
8440
  }
8441
8441
  }
8442
- const is = (r) => ((r & 16711680) >> 16) + (r & 65280) + ((r & 255) << 16), Ge = (r = 0, a) => {
8442
+ const is = (r) => ((r & 16711680) >> 16) + (r & 65280) + ((r & 255) << 16), Ye = (r = 0, a) => {
8443
8443
  if (a == 0)
8444
8444
  return 0;
8445
8445
  let e = r / a;
@@ -8729,7 +8729,7 @@ class N0 {
8729
8729
  return ++this.seqIndex, {
8730
8730
  version: 1,
8731
8731
  msgtype: a,
8732
- tid: it(),
8732
+ tid: rt(),
8733
8733
  header: {
8734
8734
  appid: this.authInfo.appId,
8735
8735
  channelid: this.authInfo.channelId,
@@ -9245,7 +9245,7 @@ const wi = (Ne = class extends De {
9245
9245
  timestamp: this.authInfo.timestamp,
9246
9246
  token: this.authInfo.token,
9247
9247
  authtype: "app",
9248
- tid: it()
9248
+ tid: rt()
9249
9249
  };
9250
9250
  e.role && (o.tokenrole = e.role), c.est = Date.now(), this.messageCenter.start(this.roomServerUri + "?" + He.queryingParam(o));
9251
9251
  });
@@ -9271,7 +9271,7 @@ const wi = (Ne = class extends De {
9271
9271
  users: [e]
9272
9272
  }
9273
9273
  })), t({ tid: c })) : i(this.handleSignalError(n, `publish error, ${o}`));
9274
- }), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = it()), O.info(
9274
+ }), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = rt()), O.info(
9275
9275
  `[${Ne.logName}]`,
9276
9276
  "assign callid " + e.callid + " and send publish request"
9277
9277
  ), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
@@ -9815,7 +9815,7 @@ const q0 = {
9815
9815
  10014: Ee.AliEngineLocalDeviceExceptionTypeDisplayException,
9816
9816
  10019: Ee.AliEngineLocalDeviceExceptionTypeDisplayException
9817
9817
  };
9818
- var tt = /* @__PURE__ */ ((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))(tt || {}), at = /* @__PURE__ */ ((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))(at || {});
9818
+ var Je = /* @__PURE__ */ ((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))(Je || {}), Xe = /* @__PURE__ */ ((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))(Xe || {});
9819
9819
  const J0 = (r) => r.getAudioTracks()[0];
9820
9820
  function Ha(r) {
9821
9821
  var a;
@@ -9915,7 +9915,7 @@ const _n = (r, a, e = !1) => {
9915
9915
  i(t());
9916
9916
  }, 0);
9917
9917
  });
9918
- }, st = (r) => {
9918
+ }, at = (r) => {
9919
9919
  Promise.race([Et(100), r._playPromise || Promise.resolve()]).catch(() => {
9920
9920
  }).then(() => {
9921
9921
  r.srcObject = null, r._playPromise = void 0;
@@ -10156,7 +10156,7 @@ const ge = (lt = class extends Sn {
10156
10156
  m(this, "dc");
10157
10157
  m(this, "streamTracks");
10158
10158
  // 本地流 track 信息
10159
- m(this, "publishId", it());
10159
+ m(this, "publishId", rt());
10160
10160
  m(this, "signalingManager");
10161
10161
  m(this, "traceId", "");
10162
10162
  m(this, "monitorTimerId");
@@ -10334,7 +10334,7 @@ const ge = (lt = class extends Sn {
10334
10334
  this.streamManager.setMicAudioConstraints(e);
10335
10335
  }
10336
10336
  updatePubId() {
10337
- this.publishId = it();
10337
+ this.publishId = rt();
10338
10338
  }
10339
10339
  clearPublishState() {
10340
10340
  this.streamTracks = void 0;
@@ -10351,7 +10351,7 @@ const ge = (lt = class extends Sn {
10351
10351
  });
10352
10352
  }
10353
10353
  resetElement(e) {
10354
- this.previewElements.includes(e) && (st(e), this.previewElements.splice(this.previewElements.indexOf(e), 1)), this.screenPreviewElements.includes(e) && (st(e), this.screenPreviewElements.splice(this.screenPreviewElements.indexOf(e), 1));
10354
+ this.previewElements.includes(e) && (at(e), this.previewElements.splice(this.previewElements.indexOf(e), 1)), this.screenPreviewElements.includes(e) && (at(e), this.screenPreviewElements.splice(this.screenPreviewElements.indexOf(e), 1));
10355
10355
  }
10356
10356
  setPreviewElement(e) {
10357
10357
  const { videoElement: t, screen: i } = e;
@@ -10479,17 +10479,17 @@ const ge = (lt = class extends Sn {
10479
10479
  const { videoElement: t, primary: i = !0, screen: s = !0 } = e || {};
10480
10480
  if (!t)
10481
10481
  i && (this.previewElements.forEach((n) => {
10482
- st(n);
10482
+ at(n);
10483
10483
  }), this.previewElements = []), s && (this.screenPreviewElements.forEach((n) => {
10484
- st(n);
10484
+ at(n);
10485
10485
  }), this.screenPreviewElements = []);
10486
10486
  else {
10487
10487
  const n = this.previewElements.findIndex((c) => c === t);
10488
10488
  if (n >= 0)
10489
- this.previewElements.splice(n, 1), st(t);
10489
+ this.previewElements.splice(n, 1), at(t);
10490
10490
  else {
10491
10491
  const c = this.screenPreviewElements.findIndex((o) => o === t);
10492
- c >= 0 && (this.screenPreviewElements.splice(c, 1), st(t));
10492
+ c >= 0 && (this.screenPreviewElements.splice(c, 1), at(t));
10493
10493
  }
10494
10494
  }
10495
10495
  }
@@ -10504,12 +10504,12 @@ const ge = (lt = class extends Sn {
10504
10504
  if (e.video)
10505
10505
  for (let i = 0; i < this.previewElements.length; i++) {
10506
10506
  const s = this.previewElements[i];
10507
- st(s);
10507
+ at(s);
10508
10508
  }
10509
10509
  else if (e.screen)
10510
10510
  for (let i = 0; i < this.screenPreviewElements.length; i++) {
10511
10511
  const s = this.screenPreviewElements[i];
10512
- st(s);
10512
+ at(s);
10513
10513
  }
10514
10514
  const t = yield this.streamManager.createLocalStream(e);
10515
10515
  return t != null && t.audioTrack && this.audioVolumeIndicationInterval > 0 && this.audioLevelMonitor.start(t.audioTrack, this.audioVolumeIndicationInterval), e.video ? this.previewAll({ primary: !0 }) : e.screen && this.previewAll({ screen: !0 }), t;
@@ -12180,9 +12180,9 @@ const Ce = (Me = class extends Sn {
12180
12180
  }
12181
12181
  stopPlayAll(e = !1) {
12182
12182
  e ? this.viewMap.screenViews.forEach((t) => {
12183
- st(t);
12183
+ at(t);
12184
12184
  }) : this.viewMap.cameraViews.forEach((t) => {
12185
- st(t);
12185
+ at(t);
12186
12186
  });
12187
12187
  }
12188
12188
  /**
@@ -12614,14 +12614,14 @@ const xe = (_e = class extends De {
12614
12614
  v,
12615
12615
  x
12616
12616
  ), this.slsReporter.reportConnectionLatencyEvent(
12617
- tt.HANDLE_PUB_TASK,
12618
- at.START,
12617
+ Je.HANDLE_PUB_TASK,
12618
+ Xe.START,
12619
12619
  t,
12620
12620
  v,
12621
12621
  u
12622
12622
  ), this.slsReporter.reportConnectionLatencyEvent(
12623
- tt.HANDLE_PUB_TASK,
12624
- at.END,
12623
+ Je.HANDLE_PUB_TASK,
12624
+ Xe.END,
12625
12625
  t,
12626
12626
  v,
12627
12627
  Date.now()
@@ -13010,6 +13010,28 @@ const xe = (_e = class extends De {
13010
13010
  };
13011
13011
  });
13012
13012
  }
13013
+ reportSubscribeLatency(e, t, i, s) {
13014
+ const n = [];
13015
+ e.audio && n.push(e.aMsid || T.Audio), e.video ? n.push(e.vMsid || T.VideoLarge) : e.screen && n.push(T.Screen), n.forEach((c) => {
13016
+ this.slsReporter.reportConnectionLatencyEvent(
13017
+ Je.HANDLE_SUB_TASK,
13018
+ Xe.START,
13019
+ t,
13020
+ c,
13021
+ i,
13022
+ 0,
13023
+ s
13024
+ ), this.slsReporter.reportConnectionLatencyEvent(
13025
+ Je.HANDLE_SUB_TASK,
13026
+ Xe.END,
13027
+ t,
13028
+ c,
13029
+ Date.now(),
13030
+ 0,
13031
+ s
13032
+ );
13033
+ });
13034
+ }
13013
13035
  subscribe(e, t, i, s, n) {
13014
13036
  return w(this, null, function* () {
13015
13037
  let c = !1;
@@ -13021,7 +13043,7 @@ const xe = (_e = class extends De {
13021
13043
  );
13022
13044
  this.connecting && (yield this.connectingPromise);
13023
13045
  let h, p = Date.now();
13024
- this.connected ? (p = Date.now(), h = yield this.subscribeAdd(e)) : (c = !0, h = yield this.httpSubscribe(e));
13046
+ this.connected ? h = yield this.subscribeAdd(e) : (c = !0, h = yield this.httpSubscribe(e)), this.reportSubscribeLatency(o, i, p, c);
13025
13047
  const d = Date.now();
13026
13048
  let f = T.VideoLarge, g = o.video || o.screen, l = o.audio;
13027
13049
  o.video && o.vMsid ? f = o.vMsid : o.screen && (f = T.Screen);
@@ -13075,8 +13097,8 @@ const xe = (_e = class extends De {
13075
13097
  fvfdtc: x - p
13076
13098
  }
13077
13099
  ), S && (this.slsReporter.reportConnectionLatencyEvent(
13078
- tt.FIRST_REMOTE,
13079
- at.DECODED,
13100
+ Je.FIRST_REMOTE,
13101
+ Xe.DECODED,
13080
13102
  i,
13081
13103
  T.Audio
13082
13104
  ), this.slsReporter.reportSubscribeFirstPacket(
@@ -13447,12 +13469,12 @@ class Ga extends De {
13447
13469
  return t > -1 ? (e.clear(this), this.plugins.splice(t, 1), !0) : !1;
13448
13470
  }
13449
13471
  }
13450
- var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, rt = (r, a, e, t) => {
13472
+ var vc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, st = (r, a, e, t) => {
13451
13473
  for (var i = t > 1 ? void 0 : t ? bc(a, e) : a, s = r.length - 1, n; s >= 0; s--)
13452
13474
  (n = r[s]) && (i = (t ? n(a, e, i) : n(i)) || i);
13453
13475
  return t && i && vc(a, e, i), i;
13454
13476
  }, Lt;
13455
- const Xe = (Lt = class extends De {
13477
+ const Ze = (Lt = class extends De {
13456
13478
  // 设置是否发布屏幕流
13457
13479
  constructor(e, t) {
13458
13480
  super();
@@ -13475,7 +13497,7 @@ const Xe = (Lt = class extends De {
13475
13497
  m(this, "_publishLocalScreenStreamEnabled", !0);
13476
13498
  this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
13477
13499
  const i = (s) => w(this, null, function* () {
13478
- if (O.info(`[${Lt.logName}]`, "plugin added", s.name), !s.isSupported("6.14.2-beta.0")) {
13500
+ if (O.info(`[${Lt.logName}]`, "plugin added", s.name), !s.isSupported("6.14.2-beta.1")) {
13479
13501
  console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
13480
13502
  return;
13481
13503
  }
@@ -13686,7 +13708,7 @@ const Xe = (Lt = class extends De {
13686
13708
  * @ignore
13687
13709
  */
13688
13710
  m(Lt, "logName", "LocalStreamManager"), Lt);
13689
- rt([
13711
+ st([
13690
13712
  D(([r]) => {
13691
13713
  const { audio: a, video: e, screen: t, custom: i, skipProfile: s, videoProfile: n, screenProfile: c } = r;
13692
13714
  return [
@@ -13701,38 +13723,38 @@ rt([
13701
13723
  }
13702
13724
  ];
13703
13725
  })
13704
- ], Xe.prototype, "createLocalStream", 1);
13705
- rt([
13726
+ ], Ze.prototype, "createLocalStream", 1);
13727
+ st([
13706
13728
  D(H)
13707
- ], Xe.prototype, "stopLocalStream", 1);
13708
- rt([
13729
+ ], Ze.prototype, "stopLocalStream", 1);
13730
+ st([
13709
13731
  D()
13710
- ], Xe.prototype, "createHTTPPublishStream", 1);
13711
- rt([
13732
+ ], Ze.prototype, "createHTTPPublishStream", 1);
13733
+ st([
13712
13734
  D()
13713
- ], Xe.prototype, "stop", 1);
13714
- rt([
13735
+ ], Ze.prototype, "stop", 1);
13736
+ st([
13715
13737
  D(H)
13716
- ], Xe.prototype, "setVideoProfile", 1);
13717
- rt([
13738
+ ], Ze.prototype, "setVideoProfile", 1);
13739
+ st([
13718
13740
  D(H)
13719
- ], Xe.prototype, "setVideoContentHint", 1);
13720
- rt([
13741
+ ], Ze.prototype, "setVideoContentHint", 1);
13742
+ st([
13721
13743
  D(H)
13722
- ], Xe.prototype, "setAudioProfile", 1);
13723
- rt([
13744
+ ], Ze.prototype, "setAudioProfile", 1);
13745
+ st([
13724
13746
  D(H)
13725
- ], Xe.prototype, "setScreenProfile", 1);
13726
- rt([
13747
+ ], Ze.prototype, "setScreenProfile", 1);
13748
+ st([
13727
13749
  D(H)
13728
- ], Xe.prototype, "setScreenContentHint", 1);
13729
- rt([
13750
+ ], Ze.prototype, "setScreenContentHint", 1);
13751
+ st([
13730
13752
  D(H)
13731
- ], Xe.prototype, "setCameraVideoConstraints", 1);
13732
- rt([
13753
+ ], Ze.prototype, "setCameraVideoConstraints", 1);
13754
+ st([
13733
13755
  D(H)
13734
- ], Xe.prototype, "setMicAudioConstraints", 1);
13735
- let Ec = Xe;
13756
+ ], Ze.prototype, "setMicAudioConstraints", 1);
13757
+ let Ec = Ze;
13736
13758
  class _c extends Jt {
13737
13759
  constructor() {
13738
13760
  super("AliRtcScreenStandardize", Ae.AliRtcSdkStreamTypeScreen);
@@ -14445,7 +14467,7 @@ class Pe extends De {
14445
14467
  }
14446
14468
  addSignalingManagerListener() {
14447
14469
  this.signalingManager.on("onNotifyPublish", (e) => {
14448
- this.slsReporter.reportConnectionLatencyEvent(tt.RECV_NOTIFY_PUBLISH, "", "", ""), O.event("[Signaling] Notify Publish ", e), e.forEach((t) => {
14470
+ this.slsReporter.reportConnectionLatencyEvent(Je.RECV_NOTIFY_PUBLISH, "", "", ""), O.event("[Signaling] Notify Publish ", e), e.forEach((t) => {
14449
14471
  this.onRemotePublishStateChange(t);
14450
14472
  });
14451
14473
  }), this.signalingManager.stsManager.on("onTokenUpdate", (e, t) => {
@@ -15105,8 +15127,8 @@ class Hc {
15105
15127
  }
15106
15128
  toJson(a, e) {
15107
15129
  return {
15108
- x: Ge(this.x, a),
15109
- y: Ge(this.y, e),
15130
+ x: Ye(this.x, a),
15131
+ y: Ye(this.y, e),
15110
15132
  fonttype: this.fontType,
15111
15133
  fontsize: this.fontSize,
15112
15134
  fontcolor: is(this.fontColor),
@@ -15132,10 +15154,10 @@ class In {
15132
15154
  url: this.url,
15133
15155
  alpha: this.alpha,
15134
15156
  display: this.display,
15135
- x: Ge(this.x, a),
15136
- y: Ge(this.y, e),
15137
- width: Ge(this.width, a),
15138
- height: Ge(this.height, e),
15157
+ x: Ye(this.x, a),
15158
+ y: Ye(this.y, e),
15159
+ width: Ye(this.width, a),
15160
+ height: Ye(this.height, e),
15139
15161
  zorder: this.zOrder
15140
15162
  };
15141
15163
  }
@@ -15155,8 +15177,8 @@ class jc {
15155
15177
  toJson(a, e) {
15156
15178
  return {
15157
15179
  text: this.text,
15158
- x: Ge(this.x, a),
15159
- y: Ge(this.y, e),
15180
+ x: Ye(this.x, a),
15181
+ y: Ye(this.y, e),
15160
15182
  fonttype: this.fontType,
15161
15183
  fontsize: this.fontSize,
15162
15184
  fontcolor: is(this.fontColor),
@@ -15182,10 +15204,10 @@ class zc {
15182
15204
  const s = {
15183
15205
  paneid: a,
15184
15206
  majorpane: 0,
15185
- x: Ge(this.x, e),
15186
- y: Ge(this.y, t),
15187
- width: Ge(this.width, e),
15188
- height: Ge(this.height, t),
15207
+ x: Ye(this.x, e),
15208
+ y: Ye(this.y, t),
15209
+ width: Ye(this.width, e),
15210
+ height: Ye(this.height, t),
15189
15211
  zorder: this.zOrder,
15190
15212
  userid: this.userId,
15191
15213
  images: this.images.map((n) => n.toJson(e, t)),
@@ -15293,7 +15315,7 @@ class en {
15293
15315
  */
15294
15316
  initParam(a) {
15295
15317
  let e = localStorage == null ? void 0 : localStorage.getItem("AliRtcUUID");
15296
- e || (e = it(), localStorage == null || localStorage.setItem("AliRtcUUID", e)), this.param || (this.param = {
15318
+ e || (e = rt(), localStorage == null || localStorage.setItem("AliRtcUUID", e)), this.param || (this.param = {
15297
15319
  apid: a.appId,
15298
15320
  usrid: a.userId,
15299
15321
  statsvrs: "0.6.1",
@@ -15316,7 +15338,7 @@ class en {
15316
15338
  bv: Lr.browserVersion,
15317
15339
  envir: "PRODUCT",
15318
15340
  args: "",
15319
- instid: it()
15341
+ instid: rt()
15320
15342
  // SDK 的实例ID
15321
15343
  });
15322
15344
  }
@@ -15324,7 +15346,7 @@ class en {
15324
15346
  const fe = (r, a = 1, e = 6e4, t = 0) => {
15325
15347
  let i = r;
15326
15348
  return i || (i = 0), Math.min(e, Math.max(t, Math.round(i * a)));
15327
- }, Je = (r, a, e = 2e7, t = 0) => {
15349
+ }, Ge = (r, a, e = 2e7, t = 0) => {
15328
15350
  let i = a;
15329
15351
  (!a || a < 0 || a > 1e4) && (i = 1e3);
15330
15352
  let s = r;
@@ -15391,15 +15413,15 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
15391
15413
  var V, N, J, j, ce, Y;
15392
15414
  if (!I || !I.timestamp)
15393
15415
  return;
15394
- const P = (V = I._last) != null && V.timestamp ? I.timestamp - I._last.timestamp : 1e3, B = pe(I, "bytesSent"), $ = pe(I, "headerBytesSent"), q = Je(fe(B + $, 8, 2e7), P);
15416
+ const P = (V = I._last) != null && V.timestamp ? I.timestamp - I._last.timestamp : 1e3, B = pe(I, "bytesSent"), $ = pe(I, "headerBytesSent"), q = Ge(fe(B + $, 8, 2e7), P);
15395
15417
  o.push(q);
15396
- const G = Je(fe(B, 8, 2e7), P);
15418
+ const G = Ge(fe(B, 8, 2e7), P);
15397
15419
  u.push(G);
15398
- const ae = Je(fe($, 8, 2e7), P);
15420
+ const ae = Ge(fe($, 8, 2e7), P);
15399
15421
  h.push(ae);
15400
- const Q = pe(I, "packetsSent"), te = Je(Q, P);
15422
+ const Q = pe(I, "packetsSent"), te = Ge(Q, P);
15401
15423
  p.push(te);
15402
- const ee = pe(I, "packetsLost"), k = Je(ee, P);
15424
+ const ee = pe(I, "packetsLost"), k = Ge(ee, P);
15403
15425
  d.push(k);
15404
15426
  const L = Tt(ee, Q);
15405
15427
  if (f.push(L), n)
@@ -15439,18 +15461,18 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
15439
15461
  }, o = [], u = [], h = [], p = [], d = [], f = [], g = [], l = [], S = [], v = [], x = [], b = [], E = [], _ = [], y = [], A = [], R = [], M = [], C = [], I = [], P = [], B = [], $ = [], q = [], G = [], ae = [], Q = [], te = [], ee = [], k = [], L = [], V = [], N = [], J = [];
15440
15462
  try {
15441
15463
  s.forEach((j) => {
15442
- var Qe, It;
15464
+ var tt, It;
15443
15465
  if (!j || !j.timestamp)
15444
15466
  return;
15445
- const ce = (Qe = j._last) != null && Qe.timestamp ? j.timestamp - j._last.timestamp : 1e3, Y = pe(j, "bytesReceived"), Fe = pe(j, "headerBytesReceived"), ze = Je(fe(Y + Fe, 8, 2e7), ce);
15467
+ const ce = (tt = j._last) != null && tt.timestamp ? j.timestamp - j._last.timestamp : 1e3, Y = pe(j, "bytesReceived"), Fe = pe(j, "headerBytesReceived"), ze = Ge(fe(Y + Fe, 8, 2e7), ce);
15446
15468
  o.push(ze);
15447
- const Ye = Je(fe(Y, 8, 2e7), ce);
15448
- u.push(Ye);
15449
- const Ze = Je(fe(Fe, 8, 2e7), ce);
15450
- h.push(Ze);
15451
- const Se = pe(j, "packetsReceived"), ke = Je(Se, ce);
15469
+ const Qe = Ge(fe(Y, 8, 2e7), ce);
15470
+ u.push(Qe);
15471
+ const et = Ge(fe(Fe, 8, 2e7), ce);
15472
+ h.push(et);
15473
+ const Se = pe(j, "packetsReceived"), ke = Ge(Se, ce);
15452
15474
  p.push(ke);
15453
- const ot = pe(j, "packetsLost"), yt = Je(ot, ce);
15475
+ const ot = pe(j, "packetsLost"), yt = Ge(ot, ce);
15454
15476
  d.push(yt);
15455
15477
  const Ot = Tt(ot, Se);
15456
15478
  f.push(Ot);
@@ -15467,15 +15489,15 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
15467
15489
  _.push(tn(j.audioLevel));
15468
15490
  const gt = Wc(j, "synthesizedSamplesEvents");
15469
15491
  y.push(gt);
15470
- const et = rn(j, "synthesizedSamplesDuration");
15471
- A.push(et);
15472
- const ct = Tt(et, ce);
15492
+ const it = rn(j, "synthesizedSamplesDuration");
15493
+ A.push(it);
15494
+ const ct = Tt(it, ce);
15473
15495
  E.push(ct), R.push(0);
15474
15496
  } else {
15475
15497
  const gt = (It = j._last) != null && It.totalInterFrameDelay ? j.totalInterFrameDelay - j._last.totalInterFrameDelay : 0;
15476
15498
  M.push(fe(gt, 1e3 / (j.framesDecoded || 30), 500)), C.push(fe(j.framesPerSecond, 1, 100)), I.push(pe(j, "framesReceived")), V.push(pe(j, "framesRendered")), P.push(fe(j.frameHeight, 1, 4400)), B.push(fe(j.frameWidth, 1, 7700));
15477
- const et = pe(j, "totalProcessingDelay");
15478
- $.push(fe(et, 1e3 / (j.framesDecoded || 30), 12e4));
15499
+ const it = pe(j, "totalProcessingDelay");
15500
+ $.push(fe(it, 1e3 / (j.framesDecoded || 30), 12e4));
15479
15501
  const ct = pe(j, "nackCount");
15480
15502
  G.push(ct);
15481
15503
  const ki = pe(j, "pliCount");
@@ -15516,7 +15538,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
15516
15538
  if (!f.timestamp)
15517
15539
  return;
15518
15540
  const l = (S = f._last) != null && S.timestamp ? f.timestamp - f._last.timestamp : 1e3;
15519
- e.push(fe(f.currentRoundTripTime, 1e3)), t.push(fe(f.availableOutgoingBitrate, 8, 2e8)), i.push(Je(fe(f.bytesSent, 8, 2e7), l, 25e6)), s.push(Je(fe(f.bytesReceived, 8, 2e7), l, 25e6)), n.push(0), c.push(0), g % 5 === 0 && (o.push(""), u.push(""), h.push(""), p.push(""));
15541
+ e.push(fe(f.currentRoundTripTime, 1e3)), t.push(fe(f.availableOutgoingBitrate, 8, 2e8)), i.push(Ge(fe(f.bytesSent, 8, 2e7), l, 25e6)), s.push(Ge(fe(f.bytesReceived, 8, 2e7), l, 25e6)), n.push(0), c.push(0), g % 5 === 0 && (o.push(""), u.push(""), h.push(""), p.push(""));
15520
15542
  });
15521
15543
  const d = {
15522
15544
  ctm: Math.floor(a[0].timestamp || 0),
@@ -16058,7 +16080,7 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
16058
16080
  * @param calid
16059
16081
  * @param tckid
16060
16082
  */
16061
- reportConnectionLatencyEvent(a, e, t, i, s, n) {
16083
+ reportConnectionLatencyEvent(a, e, t, i, s, n, c = !1) {
16062
16084
  this.log({
16063
16085
  evetid: 12001,
16064
16086
  args: this.data2String({
@@ -16068,8 +16090,9 @@ const fe = (r, a = 1, e = 6e4, t = 0) => {
16068
16090
  status: e,
16069
16091
  calid: t,
16070
16092
  tckid: i,
16071
- cltp: 1
16093
+ cltp: 1,
16072
16094
  // AI场景profile:0,非ai场景;1,真人;2,机器人。
16095
+ http: c ? 1 : 0
16073
16096
  })
16074
16097
  });
16075
16098
  }
@@ -16128,14 +16151,14 @@ const z = (K = class extends De {
16128
16151
  slsReporter: this.slsReporter,
16129
16152
  signalingManager: this.signalingManager
16130
16153
  }), this.addBizControlListeners(), this.addPublisherListeners(), this.slsReporter.reportConnectionLatencyEvent(
16131
- tt.CREATE_ENGINE,
16132
- at.START,
16154
+ Je.CREATE_ENGINE,
16155
+ Xe.START,
16133
16156
  "",
16134
16157
  "",
16135
16158
  t
16136
16159
  ), this.slsReporter.reportConnectionLatencyEvent(
16137
- tt.CREATE_ENGINE,
16138
- at.END,
16160
+ Je.CREATE_ENGINE,
16161
+ Xe.END,
16139
16162
  "",
16140
16163
  "",
16141
16164
  Date.now()
@@ -16627,8 +16650,8 @@ const z = (K = class extends De {
16627
16650
  let o = os.checkAuthInfo(s);
16628
16651
  if (ue.AliRtcConnectionStatusInit === this.connectState || ue.AliRtcConnectionStatusDisconnected === this.connectState || ue.AliRtcConnectionStatusFailed === this.connectState) {
16629
16652
  if (s.sessionId = He.createCallid("web"), this.slsReporter.start(s), this.slsReporter.reportConnectionLatencyEvent(
16630
- tt.JOIN,
16631
- at.START,
16653
+ Je.JOIN,
16654
+ Xe.START,
16632
16655
  "",
16633
16656
  "",
16634
16657
  i
@@ -16643,18 +16666,18 @@ const z = (K = class extends De {
16643
16666
  c
16644
16667
  ), f = Date.now();
16645
16668
  this.connectState = ue.AliRtcConnectionStatusConnected, (u = this.publisher) == null || u.reportSelfDeviceStatus(), this.bizControl.init(s, d), this.setCheckAuthInfoTimer(s.timestamp, d.timestamp), this.liveTranscoding.setAuthInfo(s), this.slsReporter.reportJoin(0, c, d.tid), this.slsReporter.reportJoinResult(null), this.slsReporter.reportConnectionLatencyEvent(
16646
- tt.JOIN,
16647
- at.SEND_SIG,
16669
+ Je.JOIN,
16670
+ Xe.SEND_SIG,
16648
16671
  "",
16649
16672
  "",
16650
16673
  p
16651
16674
  ), this.slsReporter.reportConnectionLatencyEvent(
16652
- tt.JOIN,
16653
- at.RECV_RST,
16675
+ Je.JOIN,
16676
+ Xe.RECV_RST,
16654
16677
  "",
16655
16678
  "",
16656
16679
  f
16657
- ), this.slsReporter.reportConnectionLatencyEvent(tt.JOIN, at.END, "", "");
16680
+ ), this.slsReporter.reportConnectionLatencyEvent(Je.JOIN, Xe.END, "", "");
16658
16681
  } catch (p) {
16659
16682
  const d = (h = p.code) != null ? h : -1, f = p.reason || p.message || "";
16660
16683
  throw this.connectState = ue.AliRtcConnectionStatusDisconnected, this.slsReporter.reportJoin(d, c, ""), this.slsReporter.reportJoinResult(p), new F(d, f);