aliyun-rtc-sdk 6.14.2-beta.6 → 6.14.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.
@@ -2264,7 +2264,7 @@ function rt(r, a, e) {
2264
2264
  return vo(t);
2265
2265
  }
2266
2266
  var Si = /* @__PURE__ */ ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(Si || {});
2267
- const _i = "6.14.2-beta.6", Js = "web";
2267
+ const _i = "6.14.2", Js = "web";
2268
2268
  class He {
2269
2269
  /**
2270
2270
  * 将版本号转换为number
@@ -10144,10 +10144,7 @@ const ge = (lt = class extends Sn {
10144
10144
  g(this, "_url", "");
10145
10145
  g(this, "joinTime", 0);
10146
10146
  g(this, "_isPublishing", !1);
10147
- g(this, "publishPromise", Promise.resolve({
10148
- traceId: "",
10149
- l1ip: void 0
10150
- }));
10147
+ g(this, "publishPromise");
10151
10148
  g(this, "previewElements", []);
10152
10149
  // 本地主流预览容器元素列表
10153
10150
  g(this, "screenPreviewElements", []);
@@ -10347,7 +10344,7 @@ const ge = (lt = class extends Sn {
10347
10344
  }
10348
10345
  clear() {
10349
10346
  return w(this, null, function* () {
10350
- ki(lt.prototype, this, "clear").call(this), this.stopPreview(), this.resetPreviewElements(), this.resetSecondayPreviewElements(), this.clearStream(), yield this.leave(), this.streamManager.cameraCaptureDisabled = !1;
10347
+ ki(lt.prototype, this, "clear").call(this), this.stopPreview(), this.resetPreviewElements(), this.resetSecondayPreviewElements(), this.clearStream(), yield this.leave(), this.streamManager.cameraCaptureDisabled = !1, this.joinTime = 0, this._isPublishing = !1, this.publishPromise = void 0, this.dc = void 0;
10351
10348
  });
10352
10349
  }
10353
10350
  resetElement(e) {
@@ -10654,9 +10651,15 @@ const ge = (lt = class extends Sn {
10654
10651
  publishUpdate(e) {
10655
10652
  return w(this, null, function* () {
10656
10653
  var n, c, o, u, h, p;
10657
- if (!this._isPublishing)
10654
+ if (this.publishPromise)
10655
+ try {
10656
+ yield this.publishPromise;
10657
+ } catch (d) {
10658
+ }
10659
+ if (!this._isPublishing) {
10660
+ this.startPublish();
10658
10661
  return;
10659
- yield this.publishPromise;
10662
+ }
10660
10663
  const t = this.streamManager.publishStreams;
10661
10664
  let i;
10662
10665
  const s = (/* @__PURE__ */ new Date()).getTime();
@@ -12191,7 +12194,7 @@ const Ce = (Me = class extends Sn {
12191
12194
  * @returns {void}
12192
12195
  */
12193
12196
  toggleAudio(e = !0) {
12194
- this.audioSubState.setEnabled(e), this.audioTrack && (this.audioTrack.enabled = e);
12197
+ this.audioSubState.setEnabled(e), this.audioElement && (this.audioElement.muted = !e);
12195
12198
  }
12196
12199
  /**
12197
12200
  * 是否开启画面
@@ -13505,7 +13508,7 @@ const Ze = (Vt = class extends De {
13505
13508
  g(this, "_publishLocalScreenStreamEnabled", !0);
13506
13509
  this.screenStreamInfo.setVideoContentHint("motion"), this.pluginManager = e, this.slsReporter = t;
13507
13510
  const i = (s) => w(this, null, function* () {
13508
- if (O.info(`[${Vt.logName}]`, "plugin added", s.name), !s.isSupported("6.14.2-beta.6")) {
13511
+ if (O.info(`[${Vt.logName}]`, "plugin added", s.name), !s.isSupported("6.14.2")) {
13509
13512
  console.warn(`${s.name} is not supported!!!`), s.emit("unsupported");
13510
13513
  return;
13511
13514
  }