@xylink/xy-rtc-sdk 3.8.0-beta.3 → 3.8.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.
- package/lib/action/index.d.ts +9 -0
- package/lib/enum/device.d.ts +3 -0
- package/lib/enum/index.d.ts +1 -1
- package/lib/main/client.d.ts +52 -42
- package/lib/main/deviceManager.d.ts +3 -3
- package/lib/main/helper.d.ts +1 -1
- package/lib/main/iauth.d.ts +1 -5
- package/lib/main/layoutManager.d.ts +2 -2
- package/lib/main/meeting.d.ts +22 -4
- package/lib/main/stream.d.ts +5 -9
- package/lib/tools/{emmitter.d.ts → emitter.d.ts} +2 -2
- package/lib/tools/utils.d.ts +2 -5
- package/lib/type/base.d.ts +12 -0
- package/lib/type/client.d.ts +137 -17
- package/lib/type/meeting.d.ts +11 -0
- package/lib/type/stream.d.ts +2 -1
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +1 -1
package/lib/action/index.d.ts
CHANGED
|
@@ -249,6 +249,15 @@ declare class Action {
|
|
|
249
249
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
250
250
|
*/
|
|
251
251
|
getCloudMeetingRooms(userId: number): Promise<any>;
|
|
252
|
+
/**
|
|
253
|
+
* 获取参会者头像
|
|
254
|
+
*
|
|
255
|
+
* @param { string } callUrl
|
|
256
|
+
*/
|
|
257
|
+
getInComingCallUrlInfo(callUrl: string): Promise<{
|
|
258
|
+
avatar: string;
|
|
259
|
+
}>;
|
|
260
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
|
|
252
261
|
}
|
|
253
262
|
declare const _default: Action;
|
|
254
263
|
export default _default;
|
package/lib/enum/index.d.ts
CHANGED
package/lib/main/client.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
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, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IConferenceInfo, IContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl } from '../type';
|
|
8
|
-
import
|
|
7
|
+
import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IConferenceInfo, IContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult } from '../type';
|
|
8
|
+
import Emitter from '../tools/emitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
12
|
import IAuth from './iauth';
|
|
13
13
|
import DeviceManager from './deviceManager';
|
|
14
14
|
import LayoutManager from './layoutManager';
|
|
15
|
-
export default class Client extends
|
|
15
|
+
export default class Client extends Emitter {
|
|
16
16
|
logger: Logger;
|
|
17
17
|
iauth: IAuth;
|
|
18
18
|
socketTask: Socket | undefined;
|
|
@@ -51,7 +51,7 @@ export default class Client extends Emmitter {
|
|
|
51
51
|
private peerConnectionStatus;
|
|
52
52
|
private customLayoutSeq;
|
|
53
53
|
private contentSenderPid;
|
|
54
|
-
private
|
|
54
|
+
private shareContentTimer;
|
|
55
55
|
private streamChange;
|
|
56
56
|
private streamChangeList;
|
|
57
57
|
private seq;
|
|
@@ -71,6 +71,7 @@ export default class Client extends Emmitter {
|
|
|
71
71
|
private qualityManager;
|
|
72
72
|
private isShareContent;
|
|
73
73
|
private isSubscribeTranslation;
|
|
74
|
+
private handStatus;
|
|
74
75
|
private featureConfig;
|
|
75
76
|
private meeting;
|
|
76
77
|
private onDocumentChange;
|
|
@@ -128,6 +129,12 @@ export default class Client extends Emmitter {
|
|
|
128
129
|
* @returns { boolean }
|
|
129
130
|
*/
|
|
130
131
|
getLocalShareContent(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 设置本地是否在等候室
|
|
134
|
+
*
|
|
135
|
+
* @param { boolean } onhold
|
|
136
|
+
*/
|
|
137
|
+
setOnHold(onhold: boolean): void;
|
|
131
138
|
/**
|
|
132
139
|
* 小鱼账号初始登录,获取token方法
|
|
133
140
|
*
|
|
@@ -156,20 +163,25 @@ export default class Client extends Emmitter {
|
|
|
156
163
|
*
|
|
157
164
|
* @public
|
|
158
165
|
* @param { IFeatureConfig } config 功能配置项
|
|
159
|
-
* @
|
|
160
|
-
* @
|
|
161
|
-
* @property { boolean } config.
|
|
162
|
-
* @property { boolean } config.
|
|
163
|
-
* @property { boolean } config.
|
|
164
|
-
* @property { boolean } config.
|
|
165
|
-
* @property { boolean }
|
|
166
|
-
* @
|
|
166
|
+
* @property { boolean } config.enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
|
|
167
|
+
* @property { boolean } config.enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
|
|
168
|
+
* @property { boolean } config.enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
|
|
169
|
+
* @property { boolean } config.enableBandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
|
|
170
|
+
* @property { boolean } config.enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
|
|
171
|
+
* @property { boolean } config.enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
|
|
172
|
+
* @property { boolean } config.enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
|
|
173
|
+
* @property { boolean } config.enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
|
|
174
|
+
* @property { boolean } config.enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
|
|
175
|
+
* @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
|
|
176
|
+
* @returns { IResult }
|
|
177
|
+
*/
|
|
178
|
+
setFeatureConfig(config: IFeatureConfig): import("../type").IReturnResult | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* 限制Content和People发送能力
|
|
181
|
+
*
|
|
182
|
+
* @param { boolean } limitPeople - 是否限制People的发送能力
|
|
167
183
|
*/
|
|
168
|
-
|
|
169
|
-
code: string;
|
|
170
|
-
msg: string;
|
|
171
|
-
detail: any;
|
|
172
|
-
} | undefined;
|
|
184
|
+
private setLimitResolution;
|
|
173
185
|
/**
|
|
174
186
|
* 获取会控地址
|
|
175
187
|
*/
|
|
@@ -281,6 +293,21 @@ export default class Client extends Emmitter {
|
|
|
281
293
|
* @param { any } resolve
|
|
282
294
|
*/
|
|
283
295
|
handleSocketMessage(data: any, resolve: any): void;
|
|
296
|
+
/**
|
|
297
|
+
* 处理会控上报开启/关闭摄像头事件
|
|
298
|
+
*
|
|
299
|
+
* @private
|
|
300
|
+
* @param { Object } data 远端数据
|
|
301
|
+
*/
|
|
302
|
+
private onEPMessage;
|
|
303
|
+
/**
|
|
304
|
+
* 通知会控打开/关闭摄像头结果
|
|
305
|
+
*
|
|
306
|
+
* @param { 'muteVideo' | 'unMuteVideo' } type - 结果类型
|
|
307
|
+
* @param { IVideoControlResult } data - 数据详情
|
|
308
|
+
* @returns { Promise<IReturnResult | null> }
|
|
309
|
+
*/
|
|
310
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', data: IVideoControlResult): Promise<import("../type").IReturnResult>;
|
|
284
311
|
/**
|
|
285
312
|
* 处理录制状态上报
|
|
286
313
|
*
|
|
@@ -653,11 +680,12 @@ export default class Client extends Emmitter {
|
|
|
653
680
|
*/
|
|
654
681
|
sendAudioStatus(status: boolean | string): void;
|
|
655
682
|
/**
|
|
656
|
-
* 发布layout
|
|
683
|
+
* 发布 自动布局/自定义布局 layout布局信息(参会人最新的布局列表数据)
|
|
657
684
|
*
|
|
658
685
|
* @public
|
|
686
|
+
* @params { boolean } isDealAvatar 是否处理layout头像, 启用相关配置后,默认处理
|
|
659
687
|
*/
|
|
660
|
-
sendLayoutMessage(): void;
|
|
688
|
+
sendLayoutMessage(isDealAvatar?: boolean): void;
|
|
661
689
|
/**
|
|
662
690
|
* 发布最新的已经排序过的的roster信息
|
|
663
691
|
*
|
|
@@ -670,12 +698,6 @@ export default class Client extends Emmitter {
|
|
|
670
698
|
* @private
|
|
671
699
|
*/
|
|
672
700
|
private sendsOriginOrderRosterMessage;
|
|
673
|
-
/**
|
|
674
|
-
* 【仅支持2.0.2以前的版本】发布 自定义布局 layout布局信息(参会人最新的布局列表数据)
|
|
675
|
-
*
|
|
676
|
-
* @public
|
|
677
|
-
*/
|
|
678
|
-
sendCustomLayoutMessage(): void;
|
|
679
701
|
/**
|
|
680
702
|
* 发布Layout Container的容器信息
|
|
681
703
|
*
|
|
@@ -900,11 +922,7 @@ export default class Client extends Emmitter {
|
|
|
900
922
|
* @param { number } mediagroupId 分组id,也称sessionId或者mediaGroupId,代表只向此分组通道发送音频数据
|
|
901
923
|
* @returns { boolean }
|
|
902
924
|
*/
|
|
903
|
-
bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true |
|
|
904
|
-
code: string;
|
|
905
|
-
msg: string;
|
|
906
|
-
detail: any;
|
|
907
|
-
};
|
|
925
|
+
bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true | import("../type").IReturnResult;
|
|
908
926
|
/**
|
|
909
927
|
* 启用多分组通道,接收多分组通道数据
|
|
910
928
|
*
|
|
@@ -912,11 +930,7 @@ export default class Client extends Emmitter {
|
|
|
912
930
|
* @param { Key[] } mediagrpIds 多分组sessionId,可以配置多个或一个值
|
|
913
931
|
* @returns { boolean }
|
|
914
932
|
*/
|
|
915
|
-
startMonitorGroup(mediagrpIds: Key[]): true |
|
|
916
|
-
code: string;
|
|
917
|
-
msg: string;
|
|
918
|
-
detail: any;
|
|
919
|
-
};
|
|
933
|
+
startMonitorGroup(mediagrpIds: Key[]): true | import("../type").IReturnResult;
|
|
920
934
|
/**
|
|
921
935
|
* 停止多分组通道,销毁资源
|
|
922
936
|
*
|
|
@@ -924,11 +938,7 @@ export default class Client extends Emmitter {
|
|
|
924
938
|
* @param { Key[] } mediagrpIds 多分组sessionId,可以配置多个或一个值
|
|
925
939
|
* @returns { boolean }
|
|
926
940
|
*/
|
|
927
|
-
stopMonitorGroup(mediagrpIds: Key[]): true |
|
|
928
|
-
code: string;
|
|
929
|
-
msg: string;
|
|
930
|
-
detail: any;
|
|
931
|
-
};
|
|
941
|
+
stopMonitorGroup(mediagrpIds: Key[]): true | import("../type").IReturnResult;
|
|
932
942
|
/**
|
|
933
943
|
* 设置多分组通道,通用方法
|
|
934
944
|
*
|
|
@@ -954,8 +964,8 @@ export default class Client extends Emmitter {
|
|
|
954
964
|
* init websocket connection
|
|
955
965
|
*
|
|
956
966
|
* @private
|
|
957
|
-
* @param {
|
|
958
|
-
* @param {
|
|
967
|
+
* @param { Promise.resolve } resolve 响应回调
|
|
968
|
+
* @param { Promise.reject } reject 拒绝回调
|
|
959
969
|
*/
|
|
960
970
|
private initWss;
|
|
961
971
|
}
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
* Last modified : 2022-06-09 17:33:47
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
|
-
import
|
|
12
|
+
import Emitter from '../tools/emitter';
|
|
13
13
|
import { IDeviceList, ISelectedDevice, ICurrentPermission } from '../type';
|
|
14
14
|
/**
|
|
15
15
|
* DeviceManager模块,用于管理枚举设备列表、监听设备变动、处理设备权限等功能
|
|
16
16
|
*
|
|
17
17
|
* @class DeviceManager
|
|
18
|
-
* @extends
|
|
18
|
+
* @extends Emitter 事件发送器
|
|
19
19
|
*/
|
|
20
|
-
declare class DeviceManager extends
|
|
20
|
+
declare class DeviceManager extends Emitter {
|
|
21
21
|
private navigator;
|
|
22
22
|
private currentDeviceList;
|
|
23
23
|
private nextDeviceList;
|
package/lib/main/helper.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @email luojinghui424@gmail.com
|
|
6
6
|
*
|
|
7
7
|
* Created at : 2021-01-09 14:45:46
|
|
8
|
-
* Last modified : 2022-
|
|
8
|
+
* Last modified : 2022-11-03 19:20:11
|
|
9
9
|
*/
|
|
10
10
|
import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
|
|
11
11
|
export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "AUDIO_ONLY" | "MUTE" | "AUDIO_TEL" | "AUDIO_CONTENT";
|
package/lib/main/iauth.d.ts
CHANGED
|
@@ -24,10 +24,6 @@ declare class IAuth {
|
|
|
24
24
|
* @param { ISdkUserInfo } sdkUserInfo
|
|
25
25
|
* @param { ILoginExtAccount } params
|
|
26
26
|
*/
|
|
27
|
-
login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<
|
|
28
|
-
code: string;
|
|
29
|
-
msg: string;
|
|
30
|
-
detail: any;
|
|
31
|
-
}>;
|
|
27
|
+
login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<import("../type").IReturnResult>;
|
|
32
28
|
}
|
|
33
29
|
export default IAuth;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @email luojinghui424@gmail.com
|
|
7
7
|
*
|
|
8
8
|
* Created at : 2021-01-05 17:24:07
|
|
9
|
-
* Last modified : 2022-
|
|
9
|
+
* Last modified : 2022-11-03 15:48:52
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
12
|
import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IResolutionType, IConfInfo, IPageInfo, IReqInfo, IQualityType } from '../type/index';
|
|
@@ -171,7 +171,7 @@ export default class LayoutManager {
|
|
|
171
171
|
calculateNewLayoutList(): {
|
|
172
172
|
roster: IRoster;
|
|
173
173
|
position: number[];
|
|
174
|
-
resolution:
|
|
174
|
+
resolution: IResolutionType;
|
|
175
175
|
zIndex: number;
|
|
176
176
|
}[];
|
|
177
177
|
calculateScreenInfo(): {
|
package/lib/main/meeting.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Meeting Info Control
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2022-10-27 13:58:22
|
|
5
|
-
* Last modified : 2022-
|
|
5
|
+
* Last modified : 2022-11-04 14:45:39
|
|
6
6
|
*/
|
|
7
|
-
import { IConferenceInfo, IRecordPermission, IConfMgmtUrl } from '../type';
|
|
7
|
+
import { IConferenceInfo, IRecordPermission, IConfMgmtUrl, ILayout } from '../type';
|
|
8
8
|
import Client from './client';
|
|
9
9
|
import Logger from '../tools/logger';
|
|
10
10
|
declare class Meeting {
|
|
@@ -12,10 +12,12 @@ declare class Meeting {
|
|
|
12
12
|
logger: Logger;
|
|
13
13
|
conferenceInfo: IConferenceInfo;
|
|
14
14
|
private recordPermission;
|
|
15
|
-
private
|
|
15
|
+
private cloudRoomInfo;
|
|
16
16
|
private confMgmtUrl;
|
|
17
|
+
private layoutAvatarMap;
|
|
17
18
|
constructor(client: Client, logger: Logger);
|
|
18
19
|
getRecordPermission(): IRecordPermission;
|
|
20
|
+
getLayoutAvatarMap(): Map<string, string>;
|
|
19
21
|
/**
|
|
20
22
|
* 登录用户信息和个人云会议室信息
|
|
21
23
|
*/
|
|
@@ -42,13 +44,16 @@ declare class Meeting {
|
|
|
42
44
|
*/
|
|
43
45
|
private getMeetingControlUrl;
|
|
44
46
|
/**
|
|
45
|
-
* 获取
|
|
47
|
+
* 获取vcNumber真实的会议室信息
|
|
46
48
|
*
|
|
47
49
|
* @param { string } vcNumber 终端对应的会议室号码
|
|
48
50
|
*/
|
|
49
51
|
private getVCConfInfo;
|
|
50
52
|
/**
|
|
51
53
|
* 获取Content水印内容
|
|
54
|
+
*
|
|
55
|
+
* @private
|
|
56
|
+
* @param { string } confAuxProperties 水印内容
|
|
52
57
|
*/
|
|
53
58
|
private getWatermarkContent;
|
|
54
59
|
/**
|
|
@@ -76,5 +81,18 @@ declare class Meeting {
|
|
|
76
81
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
77
82
|
*/
|
|
78
83
|
getCloudMeetingRooms(): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* 处理信令下发的等候室
|
|
86
|
+
*
|
|
87
|
+
* @private
|
|
88
|
+
* @param { IWaitingRoomProps } waitingRoomProps 等候室信息
|
|
89
|
+
*/
|
|
90
|
+
private handleWaitingRoomInfo;
|
|
91
|
+
/**
|
|
92
|
+
* 处理layout图像
|
|
93
|
+
*
|
|
94
|
+
* @param { ILayout[] } unAvatarList 需要获取头像的终端
|
|
95
|
+
*/
|
|
96
|
+
handleLayoutAvatar(unAvatarList: ILayout[]): Promise<void>;
|
|
79
97
|
}
|
|
80
98
|
export default Meeting;
|
package/lib/main/stream.d.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @date 2019-10-27 23:12:45
|
|
6
6
|
*/
|
|
7
7
|
import Logger from '../tools/logger';
|
|
8
|
-
import
|
|
8
|
+
import Emitter from '../tools/emitter';
|
|
9
9
|
import { IStreamChangeType, IStreamObj, IGetMediaStreams, ISource, IStreamInitConfig, IStreamCurrent, IMediaSupportedConstraints, IStreamChange } from '../type';
|
|
10
10
|
import Peer from './peer';
|
|
11
11
|
import Client from './client';
|
|
12
|
-
export default class Stream extends
|
|
12
|
+
export default class Stream extends Emitter {
|
|
13
13
|
streams: IStreamObj[];
|
|
14
14
|
config: IStreamInitConfig;
|
|
15
15
|
current: IStreamCurrent;
|
|
@@ -77,7 +77,7 @@ export default class Stream extends Emmitter {
|
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
79
|
private replaceVideoTrack;
|
|
80
|
-
setAudioOrVideoStatus(type: string): Promise<undefined>;
|
|
80
|
+
setAudioOrVideoStatus(type: string): Promise<import("../type").IReturnResult | undefined>;
|
|
81
81
|
private setStreamStatus;
|
|
82
82
|
private getNextAudioContraints;
|
|
83
83
|
private getNextAudioMedia;
|
|
@@ -116,17 +116,13 @@ export default class Stream extends Emmitter {
|
|
|
116
116
|
*
|
|
117
117
|
* @public
|
|
118
118
|
* @param { IStreamInitConfig } config 输入输出设备相关配置,默认是{}
|
|
119
|
-
* @param { muteVideo: boolean; muteAudio: boolean } params 可选参数,是否开启麦克风或者摄像头设备,默认情况下可以通过
|
|
119
|
+
* @param { muteVideo: boolean; muteAudio: boolean } params 可选参数,是否开启麦克风或者摄像头设备,默认情况下可以通过createClient配置即可
|
|
120
120
|
* @returns { IResult } 返回结果
|
|
121
121
|
*/
|
|
122
122
|
init(config?: IStreamInitConfig, params?: {
|
|
123
123
|
muteVideo?: boolean;
|
|
124
124
|
muteAudio?: boolean;
|
|
125
|
-
}): Promise<
|
|
126
|
-
code: string;
|
|
127
|
-
msg: string;
|
|
128
|
-
detail: any;
|
|
129
|
-
}>;
|
|
125
|
+
}): Promise<import("../type").IReturnResult>;
|
|
130
126
|
/**
|
|
131
127
|
* 获取content采集配置信息
|
|
132
128
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Event
|
|
2
|
+
* Event Emitter
|
|
3
3
|
*
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-17 19:14:39
|
|
6
6
|
*/
|
|
7
|
-
export default class
|
|
7
|
+
export default class Emitter {
|
|
8
8
|
private events;
|
|
9
9
|
constructor();
|
|
10
10
|
on(key: string, listener: Function, total?: number): void;
|
package/lib/tools/utils.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
4
4
|
* @date 2019-11-08 15:54:21
|
|
5
5
|
*/
|
|
6
|
+
import { IReturnResult } from '../type';
|
|
6
7
|
/**
|
|
7
8
|
* 防抖函数
|
|
8
9
|
*
|
|
@@ -46,11 +47,7 @@ export declare const diffTime: (time1: number, time2: number, format?: string) =
|
|
|
46
47
|
export declare function mapToObj<T>(data: Map<string, T>): {
|
|
47
48
|
[key: string]: T;
|
|
48
49
|
};
|
|
49
|
-
export declare const getStatus: (code: string, detail?: any, msg?: string) =>
|
|
50
|
-
code: string;
|
|
51
|
-
msg: string;
|
|
52
|
-
detail: any;
|
|
53
|
-
};
|
|
50
|
+
export declare const getStatus: (code: string, detail?: any, msg?: string) => IReturnResult;
|
|
54
51
|
export declare const getMeetingStatus: (success: boolean, code?: string, msg?: string) => {
|
|
55
52
|
success: boolean;
|
|
56
53
|
data: {
|
package/lib/type/base.d.ts
CHANGED
|
@@ -68,4 +68,16 @@ export interface ISignParams {
|
|
|
68
68
|
token: string;
|
|
69
69
|
signSecret: string;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* 返回结果内容
|
|
73
|
+
*
|
|
74
|
+
* @property { string } code - 结果码
|
|
75
|
+
* @property { string } msg - 结果说明
|
|
76
|
+
* @property { any } detail - 数据内容
|
|
77
|
+
*/
|
|
78
|
+
export interface IReturnResult {
|
|
79
|
+
code: string;
|
|
80
|
+
msg: string;
|
|
81
|
+
detail: any;
|
|
82
|
+
}
|
|
71
83
|
export declare type Key = string | number;
|
package/lib/type/client.d.ts
CHANGED
|
@@ -267,9 +267,22 @@ export interface ILayoutParams {
|
|
|
267
267
|
contentSenderPid: number;
|
|
268
268
|
localHide: boolean;
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Layout模版定义
|
|
272
|
+
*
|
|
273
|
+
* @property { number[] } position - 位置/尺寸比例
|
|
274
|
+
* @property { IResolutionType } resolution - 分辨率
|
|
275
|
+
* @property { number } resolution.normal - 正常分辨率
|
|
276
|
+
* @property { number } resolution.low - 低性能模式分辨率
|
|
277
|
+
* @property { number } zIndex - 层级
|
|
278
|
+
* @property { boolean } isContent - 是否是共享内容
|
|
279
|
+
*/
|
|
270
280
|
export declare type ITemplateObj = {
|
|
271
281
|
position: number[];
|
|
272
|
-
resolution:
|
|
282
|
+
resolution: {
|
|
283
|
+
normal: IResolutionType;
|
|
284
|
+
low: IResolutionType;
|
|
285
|
+
};
|
|
273
286
|
zIndex?: number;
|
|
274
287
|
isContent?: boolean;
|
|
275
288
|
};
|
|
@@ -389,6 +402,7 @@ export declare type IReqInfo = {
|
|
|
389
402
|
export interface IMeetingInfo {
|
|
390
403
|
meetingId: string;
|
|
391
404
|
callUri: string;
|
|
405
|
+
vcNumber: string;
|
|
392
406
|
}
|
|
393
407
|
/**
|
|
394
408
|
* 调度失败的uri列表项目
|
|
@@ -819,6 +833,7 @@ export interface ILayout {
|
|
|
819
833
|
quality?: 0 | 100 | 200;
|
|
820
834
|
deal?: boolean;
|
|
821
835
|
zIndex?: number;
|
|
836
|
+
avatar?: string;
|
|
822
837
|
}
|
|
823
838
|
/**
|
|
824
839
|
* Local布局对象
|
|
@@ -1157,24 +1172,30 @@ export interface ITranslationContent {
|
|
|
1157
1172
|
}
|
|
1158
1173
|
/**
|
|
1159
1174
|
* SDK功能控制开关,用于内部是否启用某些功能的运行
|
|
1160
|
-
* 默认配置:src/enum/index.ts
|
|
1161
|
-
*
|
|
1162
|
-
* @property { boolean }
|
|
1163
|
-
* @property { boolean }
|
|
1164
|
-
* @property { boolean }
|
|
1165
|
-
* @property { boolean }
|
|
1166
|
-
* @property { boolean }
|
|
1167
|
-
* @property { boolean }
|
|
1168
|
-
* @property { boolean }
|
|
1175
|
+
* 默认配置:src/enum/index.ts DEFAULT_FEATURE_CONFIG
|
|
1176
|
+
*
|
|
1177
|
+
* @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
|
|
1178
|
+
* @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
|
|
1179
|
+
* @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
|
|
1180
|
+
* @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
|
|
1181
|
+
* @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
|
|
1182
|
+
* @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
|
|
1183
|
+
* @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
|
|
1184
|
+
* @property { boolean } enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
|
|
1185
|
+
* @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
|
|
1186
|
+
* @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
|
|
1169
1187
|
*/
|
|
1170
1188
|
export interface IFeatureConfig {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1189
|
+
enableMeetingShout?: boolean;
|
|
1190
|
+
enableV2States?: boolean;
|
|
1191
|
+
enableCheckRecordPermission?: boolean;
|
|
1192
|
+
enableBandwidthSetting?: boolean;
|
|
1193
|
+
enableMeetingInvite?: boolean;
|
|
1194
|
+
enableMeetingOwner?: boolean;
|
|
1195
|
+
enableAutoResizeLayout?: boolean;
|
|
1196
|
+
enableLowResolution?: boolean;
|
|
1197
|
+
enableSpeakerInfo?: boolean;
|
|
1198
|
+
enableLayoutAvatar?: boolean;
|
|
1178
1199
|
}
|
|
1179
1200
|
export interface IConfMgmtUrl {
|
|
1180
1201
|
pc: string;
|
|
@@ -1182,4 +1203,103 @@ export interface IConfMgmtUrl {
|
|
|
1182
1203
|
side: string;
|
|
1183
1204
|
mobile?: string;
|
|
1184
1205
|
}
|
|
1206
|
+
/**
|
|
1207
|
+
* 上报会控控制开启/关闭摄像头结果
|
|
1208
|
+
*
|
|
1209
|
+
* @property { boolean } agree - 是否同意开启/关闭摄像头
|
|
1210
|
+
* no.camera.permission:终端未授权App摄像头权限
|
|
1211
|
+
* reject.unmute.video:参会人拒绝开启摄像头
|
|
1212
|
+
* voice.mode:终端在语音模式
|
|
1213
|
+
* driving.mode:终端在驾驶模式
|
|
1214
|
+
* '':同意为空即可
|
|
1215
|
+
* @property { string } reason - 是否同意开启/关闭摄像头
|
|
1216
|
+
* @property { string } requestId - 终端收到的muteVideoQuery/unMuteVideoQuery消息中的requestId
|
|
1217
|
+
*/
|
|
1218
|
+
export interface IVideoControlResult {
|
|
1219
|
+
agree: boolean;
|
|
1220
|
+
reason: string;
|
|
1221
|
+
requestId: string;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* 信令下发会控开关摄像头消息内容
|
|
1225
|
+
*
|
|
1226
|
+
* @property { string } body - 消息体,JSON字符串需要解析
|
|
1227
|
+
* @property { number } callIndex - 消息索引值
|
|
1228
|
+
* @property { string } callerUri - caller uri
|
|
1229
|
+
* @property { string } type - 消息类型
|
|
1230
|
+
*/
|
|
1231
|
+
export interface IEPMessage {
|
|
1232
|
+
body: string;
|
|
1233
|
+
callIndex: number;
|
|
1234
|
+
callerUri: string;
|
|
1235
|
+
type: string;
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* 会控开启/关闭摄像头消息、Toast提示消息
|
|
1239
|
+
*/
|
|
1240
|
+
export declare type IMCVideoEvent = controlVideoQuery | unMuteVideoQueryToast;
|
|
1241
|
+
/**
|
|
1242
|
+
* 会控开关摄像头三个事件类型
|
|
1243
|
+
* unMuteVideoQuery: 会控请求打开摄像头
|
|
1244
|
+
* muteVideoQuery: 会控请求关闭摄像头
|
|
1245
|
+
* toast: 主持会议的客户端收到的成功和失败提醒
|
|
1246
|
+
*/
|
|
1247
|
+
export declare type queryType = 'unMuteVideoQuery' | 'muteVideoQuery' | 'toast';
|
|
1248
|
+
/**
|
|
1249
|
+
* 会控开关摄像头事件基础消息体
|
|
1250
|
+
*
|
|
1251
|
+
* @property { string } confUri - 会议号
|
|
1252
|
+
* @property { string } encryption - 加密信息
|
|
1253
|
+
* @property { boolean } force - 是否强制开启摄像头
|
|
1254
|
+
* @property { string } meetingId - 会议ID
|
|
1255
|
+
* @property { string } requestId - 事件ID
|
|
1256
|
+
* @property { string } uri - 事件接收侧用户ID
|
|
1257
|
+
*
|
|
1258
|
+
*/
|
|
1259
|
+
export interface videoQueryBase {
|
|
1260
|
+
confUri: string;
|
|
1261
|
+
encryption: string;
|
|
1262
|
+
force: boolean;
|
|
1263
|
+
meetingId: string;
|
|
1264
|
+
requestId: string;
|
|
1265
|
+
uri: string;
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* 主持端得到远端开启摄像头结果的提示消息体
|
|
1269
|
+
*
|
|
1270
|
+
* @property { string } message - 消息体,需要解析,详细内容如下:
|
|
1271
|
+
* no.camera.permission: 终端未授权App摄像头权限
|
|
1272
|
+
* reject.unmute.video: 参会人拒绝开启摄像头
|
|
1273
|
+
* voice.mode: 终端在语音模式
|
|
1274
|
+
* driving.mode: 终端在驾驶模式
|
|
1275
|
+
* unmute.video.timeout: 超时
|
|
1276
|
+
* @property { string } di - 终端的deviceUri
|
|
1277
|
+
* @property { string } dn - 终端的名称
|
|
1278
|
+
*/
|
|
1279
|
+
export interface unMuteVideoQueryToastValue extends videoQueryBase {
|
|
1280
|
+
message: string;
|
|
1281
|
+
di: string;
|
|
1282
|
+
dn: string;
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* 会控推送开启/关闭摄像头消息体
|
|
1286
|
+
*
|
|
1287
|
+
* @property { string } key - 消息key,值为:'unMuteVideoQuery' | 'muteVideoQuery'
|
|
1288
|
+
* @property { videoQueryBase } value - 消息详细内容
|
|
1289
|
+
*
|
|
1290
|
+
*/
|
|
1291
|
+
export interface controlVideoQuery {
|
|
1292
|
+
key: queryType;
|
|
1293
|
+
value: videoQueryBase;
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* 主持会议端收到远端开启摄像头结果的提示消息体
|
|
1297
|
+
*
|
|
1298
|
+
* @property { string } key - 消息key,值为:toast
|
|
1299
|
+
* @property { unMuteVideoQueryToastValue } value - 消息详细内容
|
|
1300
|
+
*/
|
|
1301
|
+
export interface unMuteVideoQueryToast {
|
|
1302
|
+
key: queryType;
|
|
1303
|
+
value: unMuteVideoQueryToastValue;
|
|
1304
|
+
}
|
|
1185
1305
|
export {};
|
package/lib/type/meeting.d.ts
CHANGED
|
@@ -12,6 +12,17 @@ export interface IConfAuxPro {
|
|
|
12
12
|
watermark: string;
|
|
13
13
|
displayConfNo: string;
|
|
14
14
|
inoutReminder: string;
|
|
15
|
+
waitingRoomProp?: IWaitingRoomProps;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 等候室相关信息
|
|
19
|
+
*
|
|
20
|
+
* @property { number } waitingState 等候室状态 1:在等候室; 0: 未在等候室
|
|
21
|
+
* @property { string } reason 原因
|
|
22
|
+
*/
|
|
23
|
+
export interface IWaitingRoomProps {
|
|
24
|
+
waitingState: number;
|
|
25
|
+
reason: string;
|
|
15
26
|
}
|
|
16
27
|
/**
|
|
17
28
|
* Calluriv2接口返回的部分对外数据信息
|
package/lib/type/stream.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export declare type TCustomStream = {
|
|
|
21
21
|
* @value NORMAL 正常
|
|
22
22
|
* @value DOMSTRING 创建协商通道流
|
|
23
23
|
* @value INVALID 失效
|
|
24
|
+
* @value DISABLED 禁用状态,不允许采集此分辨率视频流
|
|
24
25
|
*/
|
|
25
|
-
export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
|
|
26
|
+
export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID' | 'DISABLED';
|
|
26
27
|
/**
|
|
27
28
|
* 自定义采集流时产生的状态
|
|
28
29
|
*
|