@rongcloud/engine 4.6.0-beem.1 → 4.6.0-beem.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCEngine - v4.6.0-beem.1
3
- * CommitId - 4789dcdc52f61868235bcda3f31eff906bab3674
4
- * Wed Jan 05 2022 14:09:26 GMT+0800 (China Standard Time)
2
+ * RCEngine - v4.6.0-beem.2
3
+ * CommitId - 62a43aacff4328b710113ae921984d364c6f70c1
4
+ * Tue Jan 25 2022 17:30:10 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  /**
@@ -3252,8 +3252,9 @@ interface IEngine {
3252
3252
  * 建立连接
3253
3253
  * @param token
3254
3254
  * @param naviInfo
3255
+ * @param reconnectKickEnable
3255
3256
  */
3256
- connect(token: string, naviInfo: INaviInfo, versionInfo: string): Promise<ErrorCode>;
3257
+ connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
3257
3258
  /**
3258
3259
  * 上报版本信息
3259
3260
  * @param version
@@ -4054,14 +4055,22 @@ declare class APIContext {
4054
4055
  * 建立连接,连接失败则抛出异常,连接成功后返回用户 userId,否则返回相应的错误码
4055
4056
  * @param token
4056
4057
  * @param refreshNavi 是否需要重新请求导航,当值为 `false` 时,优先使用有效缓存导航,若缓存失效则重新获取导航
4058
+ * @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
4059
+ * 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
4060
+ 由于 SDK 有断线重连功能,存在下面情况。
4061
+ 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
4062
+ 用户此时又在 B 设备登录,B 设备连接成功。
4063
+ A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
4064
+ 这个字段就是为这种情况加的。
4065
+ 设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
4057
4066
  */
4058
- connect(token: string, refreshNavi?: boolean): Promise<IConnectResult>;
4067
+ connect(token: string, refreshNavi?: boolean, reconnectKickEnable?: boolean): Promise<IConnectResult>;
4059
4068
  /**
4060
4069
  * 拉取实时配置 web 端需更新 voipCall 字段
4061
4070
  */
4062
4071
  private _pullUserSettings;
4063
4072
  disconnect(): Promise<void>;
4064
- reconnect(): Promise<IConnectResult>;
4073
+ reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
4065
4074
  private _getTokenWithoutNavi;
4066
4075
  /**
4067
4076
  * 获取当前缓存的导航数据
@@ -4712,8 +4721,9 @@ declare abstract class AEngine implements IEngine {
4712
4721
  * 建立连接
4713
4722
  * @param token
4714
4723
  * @param naviInfo
4724
+ * @param reconnectKickEnable
4715
4725
  */
4716
- abstract connect(token: string, naviInfo: INaviInfo): Promise<ErrorCode>;
4726
+ abstract connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
4717
4727
  /**
4718
4728
  * 发送SDK版本
4719
4729
  * @param versionInfo