@realsee/live 0.4.0-beta.3 → 0.4.0-beta.6

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.
@@ -48390,6 +48390,8 @@
48390
48390
  });
48391
48391
  }
48392
48392
  quit() {
48393
+ if (!this.joined)
48394
+ return Promise.resolve(true);
48393
48395
  return new Promise((success, fail) => {
48394
48396
  var _a, _b;
48395
48397
  this.joined = false;
@@ -50679,6 +50681,7 @@
50679
50681
  clearInterval(this.healthCheckId);
50680
50682
  this.healthCheckId = undefined;
50681
50683
  }
50684
+ return true;
50682
50685
  };
50683
50686
  /**
50684
50687
  * 销毁WebSocket相关依赖。
@@ -50704,6 +50707,7 @@
50704
50707
  }
50705
50708
  this.webSocket.close();
50706
50709
  this.webSocket = undefined;
50710
+ return true;
50707
50711
  };
50708
50712
  this.options = Object.assign({ autoConnect: true, healthCheck: 3000 }, options);
50709
50713
  }
@@ -50882,7 +50886,7 @@
50882
50886
  super();
50883
50887
  this.keyframes = new Subscribe$1();
50884
50888
  const jsBridge = (() => {
50885
- if (!options.jsBridge)
50889
+ if (options.jsBridge)
50886
50890
  return options.jsBridge;
50887
50891
  if (options.useBuiltInJsBridge)
50888
50892
  return new JSBridge();
@@ -51113,8 +51117,14 @@
51113
51117
  }
51114
51118
  async exit() {
51115
51119
  /** 退出强制关闭语音(?) */
51116
- await this.$RTC.quit();
51117
- return await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
51120
+ try {
51121
+ this.$RTC.quit();
51122
+ await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
51123
+ }
51124
+ catch (e) {
51125
+ console.log(e);
51126
+ }
51127
+ return liveController.dispose();
51118
51128
  }
51119
51129
  async connect(options = {}) {
51120
51130
  // 连接 WebSocket 前验证麦克风权限