@xylink/xy-rtc-sdk 3.9.11 → 3.9.12
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/lib/enum/contraints.d.ts +2 -1
- package/lib/main/client.d.ts +18 -3
- package/lib/main/reconnection.d.ts +46 -0
- package/lib/tools/socket.d.ts +1 -0
- package/lib/tools/utils.d.ts +8 -0
- package/lib/type/client.d.ts +16 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +1 -1
package/lib/enum/contraints.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I_CONTENT_CONSTRAINTS, I_PEOPLE_CONSTRAINTS, IConstraintsConfigMap, IStreamConfig } from '../type';
|
|
1
|
+
import { I_CONTENT_CONSTRAINTS, I_PEOPLE_CONSTRAINTS, IConstraintsConfigMap, IStreamConfig, IRecallConfig } from '../type';
|
|
2
2
|
/**
|
|
3
3
|
* people特殊约束配置
|
|
4
4
|
*
|
|
@@ -48,3 +48,4 @@ export declare const RESOLUTION_MAP: Record<string, number>;
|
|
|
48
48
|
* 枚举分辨率对应的最小带宽值
|
|
49
49
|
*/
|
|
50
50
|
export declare const MIN_BANDWIDTH_MAP: Record<string, number>;
|
|
51
|
+
export declare const DEFAULT_RECALL_CONFIG: Required<IRecallConfig>;
|
package/lib/main/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-23 12:04:44
|
|
6
6
|
*/
|
|
7
|
-
import { IClientConfig, ICall, IMackCall, IInvite, IMeetingControl, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternals, IVideoAudioType, ShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, ContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, FacingMode, IFacingMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, LoginTokenInfo, LayoutConfig } from '../type';
|
|
7
|
+
import { IClientConfig, ICall, IMackCall, IInvite, IMeetingControl, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternals, IVideoAudioType, ShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, ContentMode, IToken, TErrorReason, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, FacingMode, IFacingMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, LoginTokenInfo, LayoutConfig } from '../type';
|
|
8
8
|
import Emitter from '../tools/emitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
@@ -86,6 +86,10 @@ export default class Client extends Emitter {
|
|
|
86
86
|
private vepManager?;
|
|
87
87
|
private rosterManager;
|
|
88
88
|
protected mediaManager: XYMediaManager;
|
|
89
|
+
private reconnectionManager;
|
|
90
|
+
private makeCallConfig;
|
|
91
|
+
private audioStatus;
|
|
92
|
+
private videoStatus;
|
|
89
93
|
private onDocumentChange;
|
|
90
94
|
constructor(config: IClientConfig, logger: Logger);
|
|
91
95
|
static instance: Client;
|
|
@@ -169,6 +173,10 @@ export default class Client extends Emitter {
|
|
|
169
173
|
* 会控消息
|
|
170
174
|
*/
|
|
171
175
|
getMeetingControlInfo(): IMeetingControl | null;
|
|
176
|
+
getMakeCallConfig(): IMackCall | null;
|
|
177
|
+
getAudioStatus(): string;
|
|
178
|
+
getVideoStatus(): string;
|
|
179
|
+
getHandStatus(): boolean;
|
|
172
180
|
/**
|
|
173
181
|
* 切换布局方向
|
|
174
182
|
*
|
|
@@ -485,7 +493,7 @@ export default class Client extends Emitter {
|
|
|
485
493
|
*
|
|
486
494
|
* @private
|
|
487
495
|
*/
|
|
488
|
-
|
|
496
|
+
onMediaChangedMessage(): void;
|
|
489
497
|
/**
|
|
490
498
|
* 处理CallIndex消息
|
|
491
499
|
*
|
|
@@ -590,6 +598,13 @@ export default class Client extends Emitter {
|
|
|
590
598
|
* 挂断会议,销毁资源
|
|
591
599
|
*/
|
|
592
600
|
destroy(): Promise<boolean>;
|
|
601
|
+
clearInvite(): void;
|
|
602
|
+
closePeer(): void;
|
|
603
|
+
/**
|
|
604
|
+
* 异常情况下,停止某些操作并上报用户
|
|
605
|
+
* 包含录制、白板(建行暂时不支持)等等
|
|
606
|
+
*/
|
|
607
|
+
stopActionsAndReport(): void;
|
|
593
608
|
close(reason?: string): void;
|
|
594
609
|
/**
|
|
595
610
|
* 获取随机云会议室 - 目前用于教育
|
|
@@ -826,7 +841,7 @@ export default class Client extends Emitter {
|
|
|
826
841
|
* @param { string } errorCode 错误码
|
|
827
842
|
* @param { TErrorReason } detail 详情
|
|
828
843
|
*/
|
|
829
|
-
|
|
844
|
+
disconnectInWssError(errorCode: string, detail?: TErrorReason): void;
|
|
830
845
|
/**
|
|
831
846
|
* 切换debug模式,控制推送发送&接收路所有流的状态数据(包括帧率,码率,带宽,抖动,分辨率等会议详细信息),开启后,通过监听 meeting-stats 事件获取数据
|
|
832
847
|
*
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import Client from './client';
|
|
2
|
+
declare class XYReconnectionManager {
|
|
3
|
+
private client;
|
|
4
|
+
private logger;
|
|
5
|
+
private reconnectMaxCount;
|
|
6
|
+
private reconnectInterval;
|
|
7
|
+
private reconnectCount;
|
|
8
|
+
private reconnectTimer;
|
|
9
|
+
private isReinviting;
|
|
10
|
+
constructor(client: Client);
|
|
11
|
+
get isInReCall(): boolean | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* 开始重呼
|
|
14
|
+
*/
|
|
15
|
+
start(): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取重连间隔时间
|
|
18
|
+
* 2s-最大倒计时数据(默认是5s)之间的随机数
|
|
19
|
+
*
|
|
20
|
+
* @returns 重连间隔
|
|
21
|
+
*/
|
|
22
|
+
private getReconnectInterval;
|
|
23
|
+
/**
|
|
24
|
+
* 重新发起呼叫连接
|
|
25
|
+
*/
|
|
26
|
+
private reCall;
|
|
27
|
+
/**
|
|
28
|
+
* 呼叫
|
|
29
|
+
*/
|
|
30
|
+
private makeCall;
|
|
31
|
+
/**
|
|
32
|
+
* 恢复音频、视频状态
|
|
33
|
+
*/
|
|
34
|
+
private restoreVideoAudioStatus;
|
|
35
|
+
/**
|
|
36
|
+
* 重呼成功,重置状态
|
|
37
|
+
*/
|
|
38
|
+
private handleReconnectSuccess;
|
|
39
|
+
/**
|
|
40
|
+
* 多次重呼失败,通知用户退出会议
|
|
41
|
+
*/
|
|
42
|
+
private handleReconnectFailure;
|
|
43
|
+
resetState(): void;
|
|
44
|
+
private clearTimer;
|
|
45
|
+
}
|
|
46
|
+
export { XYReconnectionManager };
|
package/lib/tools/socket.d.ts
CHANGED
package/lib/tools/utils.d.ts
CHANGED
|
@@ -85,3 +85,11 @@ export declare const TYPEOF: {
|
|
|
85
85
|
* @returns { object}
|
|
86
86
|
*/
|
|
87
87
|
export declare const jsonParse: (jsonString: unknown) => any;
|
|
88
|
+
/**
|
|
89
|
+
* 获取随机数
|
|
90
|
+
*
|
|
91
|
+
* @param { number } min - 最小值
|
|
92
|
+
* @param { number } max - 最大值
|
|
93
|
+
* @returns 返回一个在[min,max]区间内的随机整数
|
|
94
|
+
*/
|
|
95
|
+
export declare const getRandomNumber: (min: number, max: number) => number;
|
package/lib/type/client.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ export type IFacingMode = keyof typeof FacingMode;
|
|
|
246
246
|
* @property { boolean } isThird 埋点
|
|
247
247
|
* @property { boolean } isSupportHybridCloud 是否是混合云,默认公有云。 如果有探测到内网地址,则此值为true,将不进行鉴权。
|
|
248
248
|
* @property { boolean? } checkSSL 是否启用必须使用Https协议访问页面,默认启用,设置为true,建议开启,Http页面下无法访问WebRTC API,音视频互通存在问题;
|
|
249
|
+
* @property { IRecallConfig } reCall - 重呼配置
|
|
249
250
|
*
|
|
250
251
|
*/
|
|
251
252
|
export interface IClientConfig {
|
|
@@ -272,6 +273,19 @@ export interface IClientConfig {
|
|
|
272
273
|
isThird?: boolean;
|
|
273
274
|
isSupportHybridCloud?: boolean;
|
|
274
275
|
checkSSL?: boolean;
|
|
276
|
+
reCall?: IRecallConfig;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* 重呼配置
|
|
280
|
+
*
|
|
281
|
+
* @property { number } interval - 重呼间隔时间,单位:毫秒,默认 5000 ms
|
|
282
|
+
* @property { number } maxCount - 重呼最大次数,默认 3
|
|
283
|
+
* @property { number } wssMaxCount - wss最大重连次数,默认 5
|
|
284
|
+
*/
|
|
285
|
+
export interface IRecallConfig {
|
|
286
|
+
interval?: number;
|
|
287
|
+
maxCount?: number;
|
|
288
|
+
wssMaxCount?: number;
|
|
275
289
|
}
|
|
276
290
|
export interface ILayoutParams {
|
|
277
291
|
rosters: IRoster[];
|
|
@@ -1235,6 +1249,7 @@ export interface IReceiveCustomMessage {
|
|
|
1235
1249
|
* @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
|
|
1236
1250
|
* @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false;
|
|
1237
1251
|
* @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
|
|
1252
|
+
* @property { boolean } enableReCall 是否支持重新呼叫, 默认启用, 设置为true
|
|
1238
1253
|
*
|
|
1239
1254
|
*/
|
|
1240
1255
|
export interface IFeatureConfig {
|
|
@@ -1250,6 +1265,7 @@ export interface IFeatureConfig {
|
|
|
1250
1265
|
enableLayoutAvatar?: boolean;
|
|
1251
1266
|
enableMobileNotAuth?: boolean;
|
|
1252
1267
|
enableWatermarkContent?: boolean;
|
|
1268
|
+
enableReCall?: boolean;
|
|
1253
1269
|
}
|
|
1254
1270
|
export interface IConfMgmtUrl {
|
|
1255
1271
|
pc: string;
|