aliyun-rtc-sdk 6.13.6-beta.1 → 6.13.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2256,7 +2256,7 @@ function at(r, n, e) {
2256
2256
  return po(t);
2257
2257
  }
2258
2258
  var xi = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(xi || {});
2259
- const yi = "6.13.6-beta.1", Ks = "web";
2259
+ const yi = "6.13.6-beta.2", Ks = "web";
2260
2260
  class He {
2261
2261
  /**
2262
2262
  * 将版本号转换为number
@@ -3854,18 +3854,18 @@ function an() {
3854
3854
  ]);
3855
3855
  },
3856
3856
  _doProcessBlock: function(g, l) {
3857
- for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], y = S[3], E = S[4], I = S[5], A = S[6], C = S[7], L = v.high, _ = v.low, R = x.high, T = x.low, B = b.high, $ = b.low, q = y.high, G = y.low, ae = E.high, Q = E.low, te = I.high, ee = I.low, P = A.high, N = A.low, F = C.high, M = C.low, J = L, j = _, ue = R, X = T, Ve = B, ze = $, Ye = q, Ze = G, Se = ae, ke = Q, nt = te, Et = ee, Nt = P, At = N, Jt = F, _t = M, Be = 0; Be < 80; Be++) {
3858
- var Ce, Qe, Ct = d[Be];
3859
- if (Be < 16)
3860
- Qe = Ct.high = g[l + Be * 2] | 0, Ce = Ct.low = g[l + Be * 2 + 1] | 0;
3857
+ for (var S = this._hash.words, v = S[0], x = S[1], b = S[2], y = S[3], E = S[4], I = S[5], A = S[6], C = S[7], L = v.high, _ = v.low, R = x.high, T = x.low, B = b.high, $ = b.low, q = y.high, G = y.low, ae = E.high, Q = E.low, te = I.high, ee = I.low, P = A.high, N = A.low, F = C.high, M = C.low, J = L, j = _, ue = R, X = T, Ve = B, ze = $, Ye = q, Ze = G, Se = ae, Pe = Q, nt = te, Et = ee, Nt = P, At = N, Jt = F, _t = M, ke = 0; ke < 80; ke++) {
3858
+ var Ce, Qe, Ct = d[ke];
3859
+ if (ke < 16)
3860
+ Qe = Ct.high = g[l + ke * 2] | 0, Ce = Ct.low = g[l + ke * 2 + 1] | 0;
3861
3861
  else {
3862
- var lt = d[Be - 15], et = lt.high, ot = lt.low, Di = (et >>> 1 | ot << 31) ^ (et >>> 8 | ot << 24) ^ et >>> 7, oi = (ot >>> 1 | et << 31) ^ (ot >>> 8 | et << 24) ^ (ot >>> 7 | et << 25), ci = d[Be - 2], We = ci.high, ft = ci.low, ui = (We >>> 19 | ft << 13) ^ (We << 3 | ft >>> 29) ^ We >>> 6, Gt = (ft >>> 19 | We << 13) ^ (ft << 3 | We >>> 29) ^ (ft >>> 6 | We << 26), ss = d[Be - 7], In = ss.high, Rn = ss.low, as = d[Be - 16], wn = as.high, ns = as.low;
3862
+ var lt = d[ke - 15], et = lt.high, ot = lt.low, Di = (et >>> 1 | ot << 31) ^ (et >>> 8 | ot << 24) ^ et >>> 7, oi = (ot >>> 1 | et << 31) ^ (ot >>> 8 | et << 24) ^ (ot >>> 7 | et << 25), ci = d[ke - 2], We = ci.high, ft = ci.low, ui = (We >>> 19 | ft << 13) ^ (We << 3 | ft >>> 29) ^ We >>> 6, Gt = (ft >>> 19 | We << 13) ^ (ft << 3 | We >>> 29) ^ (ft >>> 6 | We << 26), ss = d[ke - 7], In = ss.high, Rn = ss.low, as = d[ke - 16], wn = as.high, ns = as.low;
3863
3863
  Ce = oi + Rn, Qe = Di + In + (Ce >>> 0 < oi >>> 0 ? 1 : 0), Ce = Ce + Gt, Qe = Qe + ui + (Ce >>> 0 < Gt >>> 0 ? 1 : 0), Ce = Ce + ns, Qe = Qe + wn + (Ce >>> 0 < ns >>> 0 ? 1 : 0), Ct.high = Qe, Ct.low = Ce;
3864
3864
  }
3865
- var Dn = Se & nt ^ ~Se & Nt, os = ke & Et ^ ~ke & At, Tn = J & ue ^ J & Ve ^ ue & Ve, Pn = j & X ^ j & ze ^ X & ze, kn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), cs = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Bn = (Se >>> 14 | ke << 18) ^ (Se >>> 18 | ke << 14) ^ (Se << 23 | ke >>> 9), Mn = (ke >>> 14 | Se << 18) ^ (ke >>> 18 | Se << 14) ^ (ke << 23 | Se >>> 9), us = p[Be], Ln = us.high, hs = us.low, $e = _t + Mn, pt = Jt + Bn + ($e >>> 0 < _t >>> 0 ? 1 : 0), $e = $e + os, pt = pt + Dn + ($e >>> 0 < os >>> 0 ? 1 : 0), $e = $e + hs, pt = pt + Ln + ($e >>> 0 < hs >>> 0 ? 1 : 0), $e = $e + Ce, pt = pt + Qe + ($e >>> 0 < Ce >>> 0 ? 1 : 0), ds = cs + Pn, Nn = kn + Tn + (ds >>> 0 < cs >>> 0 ? 1 : 0);
3866
- Jt = Nt, _t = At, Nt = nt, At = Et, nt = Se, Et = ke, ke = Ze + $e | 0, Se = Ye + pt + (ke >>> 0 < Ze >>> 0 ? 1 : 0) | 0, Ye = Ve, Ze = ze, Ve = ue, ze = X, ue = J, X = j, j = $e + ds | 0, J = pt + Nn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
3865
+ var Dn = Se & nt ^ ~Se & Nt, os = Pe & Et ^ ~Pe & At, Tn = J & ue ^ J & Ve ^ ue & Ve, Pn = j & X ^ j & ze ^ X & ze, kn = (J >>> 28 | j << 4) ^ (J << 30 | j >>> 2) ^ (J << 25 | j >>> 7), cs = (j >>> 28 | J << 4) ^ (j << 30 | J >>> 2) ^ (j << 25 | J >>> 7), Bn = (Se >>> 14 | Pe << 18) ^ (Se >>> 18 | Pe << 14) ^ (Se << 23 | Pe >>> 9), Mn = (Pe >>> 14 | Se << 18) ^ (Pe >>> 18 | Se << 14) ^ (Pe << 23 | Se >>> 9), us = p[ke], Ln = us.high, hs = us.low, $e = _t + Mn, pt = Jt + Bn + ($e >>> 0 < _t >>> 0 ? 1 : 0), $e = $e + os, pt = pt + Dn + ($e >>> 0 < os >>> 0 ? 1 : 0), $e = $e + hs, pt = pt + Ln + ($e >>> 0 < hs >>> 0 ? 1 : 0), $e = $e + Ce, pt = pt + Qe + ($e >>> 0 < Ce >>> 0 ? 1 : 0), ds = cs + Pn, Nn = kn + Tn + (ds >>> 0 < cs >>> 0 ? 1 : 0);
3866
+ Jt = Nt, _t = At, Nt = nt, At = Et, nt = Se, Et = Pe, Pe = Ze + $e | 0, Se = Ye + pt + (Pe >>> 0 < Ze >>> 0 ? 1 : 0) | 0, Ye = Ve, Ze = ze, Ve = ue, ze = X, ue = J, X = j, j = $e + ds | 0, J = pt + Nn + (j >>> 0 < $e >>> 0 ? 1 : 0) | 0;
3867
3867
  }
3868
- _ = v.low = _ + j, v.high = L + J + (_ >>> 0 < j >>> 0 ? 1 : 0), T = x.low = T + X, x.high = R + ue + (T >>> 0 < X >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), G = y.low = G + Ze, y.high = q + Ye + (G >>> 0 < Ze >>> 0 ? 1 : 0), Q = E.low = Q + ke, E.high = ae + Se + (Q >>> 0 < ke >>> 0 ? 1 : 0), ee = I.low = ee + Et, I.high = te + nt + (ee >>> 0 < Et >>> 0 ? 1 : 0), N = A.low = N + At, A.high = P + Nt + (N >>> 0 < At >>> 0 ? 1 : 0), M = C.low = M + _t, C.high = F + Jt + (M >>> 0 < _t >>> 0 ? 1 : 0);
3868
+ _ = v.low = _ + j, v.high = L + J + (_ >>> 0 < j >>> 0 ? 1 : 0), T = x.low = T + X, x.high = R + ue + (T >>> 0 < X >>> 0 ? 1 : 0), $ = b.low = $ + ze, b.high = B + Ve + ($ >>> 0 < ze >>> 0 ? 1 : 0), G = y.low = G + Ze, y.high = q + Ye + (G >>> 0 < Ze >>> 0 ? 1 : 0), Q = E.low = Q + Pe, E.high = ae + Se + (Q >>> 0 < Pe >>> 0 ? 1 : 0), ee = I.low = ee + Et, I.high = te + nt + (ee >>> 0 < Et >>> 0 ? 1 : 0), N = A.low = N + At, A.high = P + Nt + (N >>> 0 < At >>> 0 ? 1 : 0), M = C.low = M + _t, C.high = F + Jt + (M >>> 0 < _t >>> 0 ? 1 : 0);
3869
3869
  },
3870
3870
  _doFinalize: function() {
3871
3871
  var g = this._data, l = g.words, S = this._nDataBytes * 8, v = g.sigBytes * 8;
@@ -9167,8 +9167,8 @@ var D0 = Object.defineProperty, T0 = Object.getOwnPropertyDescriptor, es = (r, n
9167
9167
  for (var i = t > 1 ? void 0 : t ? T0(n, e) : n, s = r.length - 1, a; s >= 0; s--)
9168
9168
  (a = r[s]) && (i = (t ? a(n, e, i) : a(i)) || i);
9169
9169
  return t && i && D0(n, e, i), i;
9170
- }, Me;
9171
- const Ci = (Me = class extends we {
9170
+ }, Be;
9171
+ const Ci = (Be = class extends we {
9172
9172
  constructor(e, t, i, s = dt.prod) {
9173
9173
  super();
9174
9174
  m(this, "messageCenter");
@@ -9216,7 +9216,7 @@ const Ci = (Me = class extends we {
9216
9216
  i
9217
9217
  ), this.initMessageCenter(), this.messageCenter.once("onJoinChannelResult", (u) => {
9218
9218
  var h, p, d;
9219
- if (O.info(`[${Me.logName}]`, "join result: ", u), c.taskretrynum = ((h = this.messageCenter) == null ? void 0 : h.retryCount) || 0, u.code == 200) {
9219
+ if (O.info(`[${Be.logName}]`, "join result: ", u), c.taskretrynum = ((h = this.messageCenter) == null ? void 0 : h.retryCount) || 0, u.code == 200) {
9220
9220
  (p = this.messageCenter) == null || p.sendPkgCache(), (d = this.messageCenter) == null || d.startKeepAlive();
9221
9221
  let f = u.data;
9222
9222
  f.tid = u.tid, f.users = u.data.users, f.timestamp = u.timestamp, c.est && (c.joinconnecttc = Date.now() - c.est), this.slsReporter.reportJoinConnection(c), s(f);
@@ -9225,7 +9225,7 @@ const Ci = (Me = class extends we {
9225
9225
  }), this.messageCenter.once("onAuthInvalid", () => {
9226
9226
  this.reset(), a(new V(U.ERR_JOIN_BAD_TOKEN, "join failed because authentication failed"));
9227
9227
  }), O.info(
9228
- `[${Me.logName}]`,
9228
+ `[${Be.logName}]`,
9229
9229
  "start ws connecting roomserver and auto join when connected"
9230
9230
  );
9231
9231
  const o = {
@@ -9250,21 +9250,21 @@ const Ci = (Me = class extends we {
9250
9250
  leave() {
9251
9251
  return O.info("[roomsig] leave .."), new Promise((e, t) => {
9252
9252
  this.messageCenter ? (this.messageCenter.on("onLeaveResult", (i, s) => {
9253
- O.info(`[${Me.logName}]`, "recv leave response " + i), i === 200 ? (this.updateReconnectData(), this.reset(), e({ tid: s })) : t(this.handleSignalError(i, "leave error"));
9254
- }), O.info(`[${Me.logName}]`, "send leave request"), this.messageCenter.leave()) : (O.info(`[${Me.logName}]`, "no message center, ok to leave"), e({ tid: "" }));
9253
+ O.info(`[${Be.logName}]`, "recv leave response " + i), i === 200 ? (this.updateReconnectData(), this.reset(), e({ tid: s })) : t(this.handleSignalError(i, "leave error"));
9254
+ }), O.info(`[${Be.logName}]`, "send leave request"), this.messageCenter.leave()) : (O.info(`[${Be.logName}]`, "no message center, ok to leave"), e({ tid: "" }));
9255
9255
  });
9256
9256
  }
9257
9257
  publish(e) {
9258
9258
  return new Promise((t, i) => {
9259
9259
  var s;
9260
9260
  this.messageCenter ? (this.messageCenter.once("onPublishResult", (a, c, o) => {
9261
- O.info(`[${Me.logName}]`, "recv pubish response " + a), a === 200 ? (this.updateReconnectData(gt(Y({}, this.reconnectData), {
9261
+ O.info(`[${Be.logName}]`, "recv pubish response " + a), a === 200 ? (this.updateReconnectData(gt(Y({}, this.reconnectData), {
9262
9262
  publish: {
9263
9263
  users: [e]
9264
9264
  }
9265
9265
  })), t({ tid: c })) : i(this.handleSignalError(a, `publish error, ${o}`));
9266
9266
  }), this.authInfo && (e.sessionid = (s = this.authInfo.sessionId) != null ? s : ""), e.callid || (e.callid = at()), O.info(
9267
- `[${Me.logName}]`,
9267
+ `[${Be.logName}]`,
9268
9268
  "assign callid " + e.callid + " and send publish request"
9269
9269
  ), this.messageCenter.publish(e)) : i(this.handleSignalError(-1, "publish error, no message center"));
9270
9270
  });
@@ -9277,7 +9277,7 @@ const Ci = (Me = class extends we {
9277
9277
  }
9278
9278
  this.messageCenter.on("onRoleUpdateResult", (s, a, c) => {
9279
9279
  var o, u;
9280
- O.info(`[${Me.logName}]`, "recv role update response " + s), s === 200 ? ((u = (o = this.reconnectData) == null ? void 0 : o.role) != null && u.clientrole && (this.reconnectData.role.clientrole = e, this.updateReconnectData(this.reconnectData)), t({ tid: a })) : i(this.handleSignalError(s, `role update error, ${c}`));
9280
+ O.info(`[${Be.logName}]`, "recv role update response " + s), s === 200 ? ((u = (o = this.reconnectData) == null ? void 0 : o.role) != null && u.clientrole && (this.reconnectData.role.clientrole = e, this.updateReconnectData(this.reconnectData)), t({ tid: a })) : i(this.handleSignalError(s, `role update error, ${c}`));
9281
9281
  }), this.messageCenter.roleUpdate(e);
9282
9282
  });
9283
9283
  }
@@ -9288,7 +9288,7 @@ const Ci = (Me = class extends we {
9288
9288
  * 更新推流地址
9289
9289
  */
9290
9290
  refreshUrl(e) {
9291
- return O.info(`[${Me.logName}]`, "refreshUrl .."), new Promise((t, i) => {
9291
+ return O.info(`[${Be.logName}]`, "refreshUrl .."), new Promise((t, i) => {
9292
9292
  if (!this.messageCenter) {
9293
9293
  i(this.handleSignalError(-1, "refresh url error, no message center"));
9294
9294
  return;
@@ -9304,7 +9304,7 @@ const Ci = (Me = class extends we {
9304
9304
  * @param status
9305
9305
  */
9306
9306
  reportStatus(e) {
9307
- return O.info(`[${Me.logName}]`, "reportStatus " + e), new Promise((t, i) => {
9307
+ return O.info(`[${Be.logName}]`, "reportStatus " + e), new Promise((t, i) => {
9308
9308
  this.messageCenter ? (this.messageCenter.once("onStatusReport", (s, a) => {
9309
9309
  s === 200 ? t() : i(new V(s, a));
9310
9310
  }), this.messageCenter.reportStatus(e)) : i(new V(-1, "No messageCenter"));
@@ -9354,7 +9354,7 @@ const Ci = (Me = class extends we {
9354
9354
  }, /**
9355
9355
  * @ignore
9356
9356
  */
9357
- m(Me, "logName", "RoomServerSignaling"), Me);
9357
+ m(Be, "logName", "RoomServerSignaling"), Be);
9358
9358
  es([
9359
9359
  D()
9360
9360
  ], Ci.prototype, "join", 1);
@@ -11468,8 +11468,8 @@ class Ut extends we {
11468
11468
  }
11469
11469
  }
11470
11470
  const sc = 30;
11471
- var Te;
11472
- const _e = (Te = class extends pn {
11471
+ var Me;
11472
+ const _e = (Me = class extends pn {
11473
11473
  constructor(e) {
11474
11474
  var f;
11475
11475
  const {
@@ -11553,7 +11553,7 @@ const _e = (Te = class extends pn {
11553
11553
  } else
11554
11554
  i = Wt.parse(t.body);
11555
11555
  i || O.event(
11556
- `[${Te.logName}]`,
11556
+ `[${Me.logName}]`,
11557
11557
  `parse data channel message fail, piece count: ${this.dcMsgWaitingPieces.length + 1}`
11558
11558
  );
11559
11559
  } else {
@@ -11561,7 +11561,7 @@ const _e = (Te = class extends pn {
11561
11561
  return;
11562
11562
  }
11563
11563
  i && (O.event(
11564
- `[${Te.logName}]`,
11564
+ `[${Me.logName}]`,
11565
11565
  `receive data channel message, length: ${(s = i.data) == null ? void 0 : s.byteLength}`
11566
11566
  ), this.emit("remoteDataChannelMessage", this.uid, i));
11567
11567
  });
@@ -11708,7 +11708,7 @@ const _e = (Te = class extends pn {
11708
11708
  clear(e = !0) {
11709
11709
  return w(this, null, function* () {
11710
11710
  var t;
11711
- this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Pi(Te.prototype, this, "clear").call(this), this.stopPlayAudio(), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0, zt.getInstance().removeEventListener("statechange", this.handleAudioContextSuspended)), (t = this.streamInfo) == null || t.removeAllListeners(Ne.Remote);
11711
+ this.subscribeStopDataChannel(), e && this.doStopSubscribe(this.streamUrl), Pi(Me.prototype, this, "clear").call(this), this.stopPlayAudio(), this.clearStream(), this.clearScreenStream(), this.playoutGainNode && (this.playoutGainNode.disconnect(), this.playoutGainNode = void 0, zt.getInstance().removeEventListener("statechange", this.handleAudioContextSuspended)), (t = this.streamInfo) == null || t.removeAllListeners(Ne.Remote);
11712
11712
  });
11713
11713
  }
11714
11714
  updateRemoteUserDeviceStatus(e) {
@@ -12009,7 +12009,7 @@ const _e = (Te = class extends pn {
12009
12009
  var a, c, o, u, h, p, d, f, g, l, S, v, x, b, y, E, I;
12010
12010
  const t = Date.now(), i = {}, s = {};
12011
12011
  if (this.wantSubAudio && !this.isAudioSubscribing && ((a = this.streamInfo) != null && a.hasAudio) ? (i.audio = !0, i.aMsid = ((c = this.streamInfo.getAudioInfo()) == null ? void 0 : c.msid) || k.Audio) : (!this.wantSubAudio || !((o = this.streamInfo) != null && o.hasAudio)) && this.isAudioSubscribing && (s.audio = !0, s.aMsid = ((u = this.streamInfo.getAudioInfo()) == null ? void 0 : u.msid) || k.Audio), this.wantSubVideo && ((h = this.streamInfo) != null && h.hasVideo) ? (this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && !this.isVideoSmallSubscribing && ((p = this.streamInfo) != null && p.hasVideoSmall) ? (i.video = !0, i.vMsid = k.VideoSmall) : !this.isVideoLargeSubscribing && ((d = this.streamInfo) != null && d.hasVideoLarge) && !(this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && this.isVideoSmallSubscribing) && (i.video = !0, i.vMsid = ((f = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : f.msid) || k.VideoLarge), this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeLow && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && this.streamInfo.hasVideoSmall ? (s.video = !0, s.vMsid = k.VideoLarge) : this.defaultVideoStreamType === Re.AliRtcVideoStreamTypeHigh && this.isVideoLargeSubscribing && this.isVideoSmallSubscribing && (s.video = !0, s.vMsid = k.VideoSmall)) : (!this.wantSubVideo || !((g = this.streamInfo) != null && g.hasVideo)) && this.isVideoSubscribing && (s.video = !0, s.vMsid = this.streamInfo.isVideoSmallSubscribed || this.streamInfo.isVideoSmallSubscribing ? k.VideoSmall : ((l = this.streamInfo.getVideoLargeInfo()) == null ? void 0 : l.msid) || k.VideoLarge), this.wantSubScreen && !this.isScreenSubscribing && ((S = this.streamInfo) != null && S.hasScreen) ? i.screen = !0 : (!this.wantSubScreen || !((v = this.streamInfo) != null && v.hasScreen)) && this.isScreenSubscribing && (s.screen = !0), (x = this.parameter.data) != null && x.enableSubDataChannel && !this.isDataSubscribing && ((b = this.streamInfo) != null && b.hasData) ? i.data = !0 : (!((y = this.parameter.data) != null && y.enableSubDataChannel) || !((E = this.streamInfo) != null && E.hasData)) && this.isDataSubscribing && (s.data = !0), (i.audio || i.video || i.screen || i.data) && (this.createCallId(), this.subscribe(i, e, t)), (s.audio || s.video || s.screen) && this.subscribeDeleteTracks(s), e === le.Reconnect) {
12012
- if (O.event(`[${Te.logName}]`, "reconnect, try to resume"), this.streamInfo.hasAudio && !i.audio) {
12012
+ if (O.event(`[${Me.logName}]`, "reconnect, try to resume"), this.streamInfo.hasAudio && !i.audio) {
12013
12013
  const A = this.rtsManager.getStreamByMsid({
12014
12014
  url: this.streamUrl,
12015
12015
  aMsid: this.streamInfo.getAudioInfo().msid || k.Audio
@@ -12037,7 +12037,7 @@ const _e = (Te = class extends pn {
12037
12037
  };
12038
12038
  }
12039
12039
  handleAutoPlayFailed() {
12040
- O.event(`[${Te.logName}]`, "auto play failed"), this.emit("remoteAudioAutoPlayFail", this.uid);
12040
+ O.event(`[${Me.logName}]`, "auto play failed"), this.emit("remoteAudioAutoPlayFail", this.uid);
12041
12041
  const e = () => {
12042
12042
  this.resumeAudio().then(() => {
12043
12043
  document.removeEventListener("click", e, !1), document.removeEventListener("touchstart", e, !1);
@@ -12058,17 +12058,17 @@ const _e = (Te = class extends pn {
12058
12058
  return w(this, null, function* () {
12059
12059
  var e, t;
12060
12060
  if (!this.audioTrack) {
12061
- O.event(`[${Te.logName}]`, this.userId, "audio track is null");
12061
+ O.event(`[${Me.logName}]`, this.userId, "audio track is null");
12062
12062
  return;
12063
12063
  }
12064
- if (this.toggleAudio(!this.audioMuted), this.audioElement || (O.event(`[${Te.logName}]`, this.userId, "create audio element"), this.audioElement = document.createElement("audio"), this.audioElement.addEventListener("pause", this.handleAudioPaused), this.setPlayoutVolume(this.playoutVolume)), ((t = (e = this.audioElement.srcObject) == null ? void 0 : e.getAudioTracks()) == null ? void 0 : t[0]) !== this.audioTrack) {
12064
+ if (this.toggleAudio(!this.audioMuted), this.audioElement || (O.event(`[${Me.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) {
12065
12065
  let i = this.audioElement.srcObject;
12066
12066
  i ? i.getAudioTracks().forEach((s) => {
12067
12067
  i.removeTrack(s);
12068
12068
  }) : (i = new MediaStream(), this.audioElement.srcObject = i), i.addTrack(this.audioTrack);
12069
12069
  }
12070
12070
  if (!oe.BrowserUtil.isMicroMessenger && oe.SystenUtil.isIos && parseInt(oe.SystenUtil.systemVersion) <= 13) {
12071
- O.event(`[${Te.logName}]`, "play audio for iOS 13-");
12071
+ O.event(`[${Me.logName}]`, "play audio for iOS 13-");
12072
12072
  const i = this.audioElement;
12073
12073
  i.setAttribute("autoplay", "");
12074
12074
  const s = () => {
@@ -12077,26 +12077,15 @@ const _e = (Te = class extends pn {
12077
12077
  });
12078
12078
  };
12079
12079
  this.audioElement.addEventListener("playing", s);
12080
- } else {
12081
- const i = () => {
12080
+ } else
12081
+ (() => {
12082
12082
  var s;
12083
- O.event(`[${Te.logName}]`, "try play audio"), (s = this.audioElement) == null || s.play().catch(() => {
12083
+ O.event(`[${Me.logName}]`, "try play audio"), (s = this.audioElement) == null || s.play().then(() => {
12084
+ O.event(`[${Me.logName}]`, "play audio success");
12085
+ }).catch(() => {
12084
12086
  this.handleAutoPlayFailed();
12085
12087
  });
12086
- };
12087
- if (oe.BrowserUtil.isMicroMessenger) {
12088
- O.event(`[${Te.logName}]`, "play audio for WeChat");
12089
- const s = window.top !== window.self, a = window.WeixinJSBridge || window.top.WeixinJSBridge;
12090
- a ? a.invoke("getNetworkType", {}, () => {
12091
- i();
12092
- }) : (s ? window.top.document : document).addEventListener("WeixinJSBridgeReady", () => {
12093
- a.invoke("getNetworkType", {}, () => {
12094
- i();
12095
- });
12096
- });
12097
- } else
12098
- O.event(`[${Te.logName}]`, "play audio for browsers except WeChat"), i();
12099
- }
12088
+ })();
12100
12089
  });
12101
12090
  }
12102
12091
  stopPlayAudio() {
@@ -12262,7 +12251,7 @@ const _e = (Te = class extends pn {
12262
12251
  }, /**
12263
12252
  * @ignore
12264
12253
  */
12265
- m(Te, "logName", "RemoteUser"), Te);
12254
+ m(Me, "logName", "RemoteUser"), Me);
12266
12255
  De([
12267
12256
  D()
12268
12257
  ], _e.prototype, "clear", 1);
@@ -13408,7 +13397,7 @@ const Xe = (Bt = class extends we {
13408
13397
  m(this, "_publishLocalScreenStreamEnabled", !0);
13409
13398
  this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
13410
13399
  const i = (s) => w(this, null, function* () {
13411
- if (O.info(`[${Bt.logName}]`, "plugin added", s.name), !s.isSupported("6.13.6-beta.1")) {
13400
+ if (O.info(`[${Bt.logName}]`, "plugin added", s.name), !s.isSupported("6.13.6-beta.2")) {
13412
13401
  console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
13413
13402
  return;
13414
13403
  }
@@ -14334,7 +14323,7 @@ var Rc = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, je = (r, n
14334
14323
  (a = r[s]) && (i = (t ? a(n, e, i) : a(i)) || i);
14335
14324
  return t && i && Rc(n, e, i), i;
14336
14325
  };
14337
- class Pe extends we {
14326
+ class Te extends we {
14338
14327
  constructor(e) {
14339
14328
  super();
14340
14329
  m(this, "self");
@@ -14786,49 +14775,49 @@ class Pe extends we {
14786
14775
  /**
14787
14776
  * @ignore
14788
14777
  */
14789
- m(Pe, "logName", "BizControl");
14778
+ m(Te, "logName", "BizControl");
14790
14779
  je([
14791
14780
  D()
14792
- ], Pe.prototype, "init", 1);
14781
+ ], Te.prototype, "init", 1);
14793
14782
  je([
14794
14783
  D()
14795
- ], Pe.prototype, "leave", 1);
14784
+ ], Te.prototype, "leave", 1);
14796
14785
  je([
14797
14786
  D()
14798
- ], Pe.prototype, "clear", 1);
14787
+ ], Te.prototype, "clear", 1);
14799
14788
  je([
14800
14789
  D(H)
14801
- ], Pe.prototype, "addUser", 1);
14790
+ ], Te.prototype, "addUser", 1);
14802
14791
  je([
14803
14792
  D()
14804
- ], Pe.prototype, "removeLeftUser", 1);
14793
+ ], Te.prototype, "removeLeftUser", 1);
14805
14794
  je([
14806
14795
  D()
14807
- ], Pe.prototype, "updateUsers", 1);
14796
+ ], Te.prototype, "updateUsers", 1);
14808
14797
  je([
14809
14798
  D(H)
14810
- ], Pe.prototype, "updateAudioWant", 1);
14799
+ ], Te.prototype, "updateAudioWant", 1);
14811
14800
  je([
14812
14801
  D(H)
14813
- ], Pe.prototype, "updateVideoWant", 1);
14802
+ ], Te.prototype, "updateVideoWant", 1);
14814
14803
  je([
14815
14804
  D(H)
14816
- ], Pe.prototype, "updateScreenWant", 1);
14805
+ ], Te.prototype, "updateScreenWant", 1);
14817
14806
  je([
14818
14807
  D()
14819
- ], Pe.prototype, "stopIndication", 1);
14808
+ ], Te.prototype, "stopIndication", 1);
14820
14809
  je([
14821
14810
  D()
14822
- ], Pe.prototype, "startIndication", 1);
14811
+ ], Te.prototype, "startIndication", 1);
14823
14812
  je([
14824
14813
  D(H)
14825
- ], Pe.prototype, "setEnableDualVideoStream", 1);
14814
+ ], Te.prototype, "setEnableDualVideoStream", 1);
14826
14815
  je([
14827
14816
  D(H)
14828
- ], Pe.prototype, "setAudioVolume", 1);
14817
+ ], Te.prototype, "setAudioVolume", 1);
14829
14818
  je([
14830
14819
  D()
14831
- ], Pe.prototype, "enableAudioVolumeIndication", 1);
14820
+ ], Te.prototype, "enableAudioVolumeIndication", 1);
14832
14821
  const Pr = (r) => w(void 0, null, function* () {
14833
14822
  const n = new Uint8Array(160).fill(170), e = new TextEncoder().encode(r), t = yield window.crypto.subtle.importKey(
14834
14823
  "raw",
@@ -15364,8 +15353,8 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
15364
15353
  u.push(Ye);
15365
15354
  const Ze = Je(fe(Ve, 8, 2e7), ue);
15366
15355
  h.push(Ze);
15367
- const Se = pe(j, "packetsReceived"), ke = Je(Se, ue);
15368
- p.push(ke);
15356
+ const Se = pe(j, "packetsReceived"), Pe = Je(Se, ue);
15357
+ p.push(Pe);
15369
15358
  const nt = pe(j, "packetsLost"), Et = Je(nt, ue);
15370
15359
  d.push(Et);
15371
15360
  const Nt = Rt(nt, Se);
@@ -15378,8 +15367,8 @@ const fe = (r, n = 1, e = 6e4, t = 0) => {
15378
15367
  g.push(0);
15379
15368
  const _t = pe(j, "fecPacketsReceived");
15380
15369
  b.push(Rt(_t, Se));
15381
- const Be = pe(j, "retransmittedPacketsReceived"), Ce = Se + nt - Be;
15382
- if (S.push(Rt(Se - Be, Ce)), v.push(Rt(nt, Ce)), l.push(Rt(Be, Ce)), x.push(Ce), M.push(0), J.push(""), a) {
15370
+ const ke = pe(j, "retransmittedPacketsReceived"), Ce = Se + nt - ke;
15371
+ if (S.push(Rt(Se - ke, Ce)), v.push(Rt(nt, Ce)), l.push(Rt(ke, Ce)), x.push(Ce), M.push(0), J.push(""), a) {
15383
15372
  E.push(Xa(j.audioLevel));
15384
15373
  const lt = Lc(j, "synthesizedSamplesEvents");
15385
15374
  I.push(lt);
@@ -16017,7 +16006,7 @@ const z = (K = class extends we {
16017
16006
  this.clientRole,
16018
16007
  this.slsReporter,
16019
16008
  (e == null ? void 0 : e.env) === dt.pre ? dt.pre : dt.prod
16020
- ), this.addSignalingManagerListeners(), this.maxSignalingConnectRetryCount = e == null ? void 0 : e.maxSignalingConnectRetryCount, this.bizControl = new Pe({
16009
+ ), this.addSignalingManagerListeners(), this.maxSignalingConnectRetryCount = e == null ? void 0 : e.maxSignalingConnectRetryCount, this.bizControl = new Te({
16021
16010
  slsReporter: this.slsReporter,
16022
16011
  signalingManager: this.signalingManager
16023
16012
  }), this.addBizControlListeners(), this.addPublisherListeners(), this.slsReporter.reportSDKCreated(t);