@realsee/live 0.4.0-beta.4 → 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.
@@ -24,11 +24,11 @@ export declare class LiveController<Snapshot extends Record<string, any>> {
24
24
  onEvtMsgListener?: (evt: MessageEvent) => void;
25
25
  onEvtErrListener?: (evt: Event) => void;
26
26
  onEvtCLEListener?: (evt: CloseEvent) => void;
27
- dispose: () => void;
27
+ dispose: () => boolean;
28
28
  /**
29
29
  * 销毁WebSocket相关依赖。
30
30
  */
31
- disposeWebSocket: () => void;
31
+ disposeWebSocket: () => true | undefined;
32
32
  /**
33
33
  * 解析数据
34
34
  * @param liveMsg
@@ -1066,6 +1066,7 @@ class LiveController {
1066
1066
  clearInterval(this.healthCheckId);
1067
1067
  this.healthCheckId = undefined;
1068
1068
  }
1069
+ return true;
1069
1070
  };
1070
1071
  /**
1071
1072
  * 销毁WebSocket相关依赖。
@@ -1091,6 +1092,7 @@ class LiveController {
1091
1092
  }
1092
1093
  this.webSocket.close();
1093
1094
  this.webSocket = undefined;
1095
+ return true;
1094
1096
  };
1095
1097
  this.options = Object.assign({ autoConnect: true, healthCheck: 3000 }, options);
1096
1098
  }
@@ -1501,7 +1503,8 @@ function createLive(options) {
1501
1503
  async exit() {
1502
1504
  /** 退出强制关闭语音(?) */
1503
1505
  await this.$RTC.quit();
1504
- return await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
1506
+ await this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
1507
+ return liveController.dispose();
1505
1508
  }
1506
1509
  async connect(options = {}) {
1507
1510
  // 连接 WebSocket 前验证麦克风权限