@rongcloud/engine 4.4.8-enterprise.2 → 4.4.8-enterprise.3
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 +17 -7
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCEngine - v4.4.8-enterprise.
|
|
3
|
-
* CommitId -
|
|
4
|
-
* Thu
|
|
2
|
+
* RCEngine - v4.4.8-enterprise.3
|
|
3
|
+
* CommitId - e8c4f74ed0a5ed97280a5f1c016ff3ec16258cb0
|
|
4
|
+
* Thu Jun 30 2022 21:43:21 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -3252,14 +3252,22 @@ declare class APIContext {
|
|
|
3252
3252
|
* 建立连接,连接失败则抛出异常,连接成功后返回用户 userId,否则返回相应的错误码
|
|
3253
3253
|
* @param token
|
|
3254
3254
|
* @param refreshNavi 是否需要重新请求导航,当值为 `false` 时,优先使用有效缓存导航,若缓存失效则重新获取导航
|
|
3255
|
+
* @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
|
|
3256
|
+
* 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
|
|
3257
|
+
由于 SDK 有断线重连功能,存在下面情况。
|
|
3258
|
+
用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
|
|
3259
|
+
用户此时又在 B 设备登录,B 设备连接成功。
|
|
3260
|
+
A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
|
|
3261
|
+
这个字段就是为这种情况加的。
|
|
3262
|
+
设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
3255
3263
|
*/
|
|
3256
|
-
connect(token: string, refreshNavi?: boolean): Promise<IConnectResult>;
|
|
3264
|
+
connect(token: string, refreshNavi?: boolean, reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
3257
3265
|
/**
|
|
3258
3266
|
* 拉取实时配置 web 端需更新 voipCall 字段
|
|
3259
3267
|
*/
|
|
3260
3268
|
private _pullUserSettings;
|
|
3261
3269
|
disconnect(): Promise<void>;
|
|
3262
|
-
reconnect(): Promise<IConnectResult>;
|
|
3270
|
+
reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
3263
3271
|
private _getTokenWithoutNavi;
|
|
3264
3272
|
/**
|
|
3265
3273
|
* 获取当前缓存的导航数据
|
|
@@ -3838,8 +3846,9 @@ interface IEngine {
|
|
|
3838
3846
|
* 建立连接
|
|
3839
3847
|
* @param token
|
|
3840
3848
|
* @param naviInfo
|
|
3849
|
+
* @param reconnectKickEnable
|
|
3841
3850
|
*/
|
|
3842
|
-
connect(token: string, naviInfo: INaviInfo,
|
|
3851
|
+
connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
3843
3852
|
/**
|
|
3844
3853
|
* 上报版本信息
|
|
3845
3854
|
* @param version
|
|
@@ -4374,8 +4383,9 @@ declare abstract class AEngine implements IEngine {
|
|
|
4374
4383
|
* 建立连接
|
|
4375
4384
|
* @param token
|
|
4376
4385
|
* @param naviInfo
|
|
4386
|
+
* @param reconnectKickEnable
|
|
4377
4387
|
*/
|
|
4378
|
-
abstract connect(token: string, naviInfo: INaviInfo): Promise<ErrorCode>;
|
|
4388
|
+
abstract connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
4379
4389
|
/**
|
|
4380
4390
|
* 发送SDK版本
|
|
4381
4391
|
* @param versionInfo
|