@realsee/live 0.4.0-beta.2 → 0.4.0-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.
@@ -50679,6 +50679,7 @@
50679
50679
  clearInterval(this.healthCheckId);
50680
50680
  this.healthCheckId = undefined;
50681
50681
  }
50682
+ return true;
50682
50683
  };
50683
50684
  /**
50684
50685
  * 销毁WebSocket相关依赖。
@@ -50704,6 +50705,7 @@
50704
50705
  }
50705
50706
  this.webSocket.close();
50706
50707
  this.webSocket = undefined;
50708
+ return true;
50707
50709
  };
50708
50710
  this.options = Object.assign({ autoConnect: true, healthCheck: 3000 }, options);
50709
50711
  }
@@ -50878,12 +50880,16 @@
50878
50880
  };
50879
50881
  class LiveTpl extends Subscribe$1 {
50880
50882
  constructor() {
50881
- var _a, _b, _c;
50883
+ var _a, _b;
50882
50884
  super();
50883
50885
  this.keyframes = new Subscribe$1();
50884
- const jsBridge = ((_a = options.jsBridge) !== null && _a !== void 0 ? _a : options.useBuiltInJsBridge)
50885
- ? new JSBridge()
50886
- : undefined;
50886
+ const jsBridge = (() => {
50887
+ if (options.jsBridge)
50888
+ return options.jsBridge;
50889
+ if (options.useBuiltInJsBridge)
50890
+ return new JSBridge();
50891
+ return undefined;
50892
+ })();
50887
50893
  liveController.options.jsBridge = jsBridge;
50888
50894
  // 没有传rtc实例时
50889
50895
  if (!options.rtc) {
@@ -50892,7 +50898,7 @@
50892
50898
  if (!options.getVoiceSign) {
50893
50899
  throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
50894
50900
  }
50895
- const getVoiceSign = (_b = options.getVoiceSign) !== null && _b !== void 0 ? _b : unimplementedGetVoiceSign;
50901
+ const getVoiceSign = (_a = options.getVoiceSign) !== null && _a !== void 0 ? _a : unimplementedGetVoiceSign;
50896
50902
  switch (options.rtcType) {
50897
50903
  case exports.RTCType.RealseeVRWebViewRTC: {
50898
50904
  // 内置的 VRWebViewRTC
@@ -50930,7 +50936,7 @@
50930
50936
  if (!options.getVoiceSign) {
50931
50937
  throw new Error('GetVoiceSign method must be passed when using built-in RTC instances');
50932
50938
  }
50933
- const getVoiceSign = (_c = options.getVoiceSign) !== null && _c !== void 0 ? _c : unimplementedGetVoiceSign;
50939
+ const getVoiceSign = (_b = options.getVoiceSign) !== null && _b !== void 0 ? _b : unimplementedGetVoiceSign;
50934
50940
  if (!jsBridge) {
50935
50941
  throw new Error('jsBridge instance must be passed when using built-in RTC instances');
50936
50942
  }
@@ -51110,7 +51116,8 @@
51110
51116
  async exit() {
51111
51117
  /** 退出强制关闭语音(?) */
51112
51118
  await this.$RTC.quit();
51113
- return await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
51119
+ await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
51120
+ return liveController.dispose();
51114
51121
  }
51115
51122
  async connect(options = {}) {
51116
51123
  // 连接 WebSocket 前验证麦克风权限