@xylink/xy-rtc-sdk 3.8.0 → 3.9.0

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.
Files changed (45) hide show
  1. package/README.MD +37 -37
  2. package/lib/action/index.d.ts +21 -6
  3. package/lib/enum/client.d.ts +15 -0
  4. package/lib/enum/contraints.d.ts +33 -96
  5. package/lib/enum/device.d.ts +1 -0
  6. package/lib/enum/errorCode.d.ts +58 -1
  7. package/lib/enum/i18n.d.ts +39 -0
  8. package/lib/enum/index.d.ts +65 -16
  9. package/lib/index.d.ts +11 -8
  10. package/lib/main/client.d.ts +101 -71
  11. package/lib/main/deviceManager.d.ts +23 -4
  12. package/lib/main/helper.d.ts +2 -2
  13. package/lib/main/iauth.d.ts +14 -1
  14. package/lib/main/layoutManager.d.ts +43 -13
  15. package/lib/main/meeting.d.ts +75 -21
  16. package/lib/main/peer.d.ts +70 -121
  17. package/lib/main/qualityManager.d.ts +38 -9
  18. package/lib/main/stream.d.ts +237 -104
  19. package/lib/main/videoManager.d.ts +1 -9
  20. package/lib/tools/dbManager.d.ts +106 -0
  21. package/lib/tools/detect.d.ts +2 -2
  22. package/lib/tools/enum.d.ts +1 -1
  23. package/lib/tools/httpClient.d.ts +4 -4
  24. package/lib/tools/i18n.d.ts +1 -1
  25. package/lib/tools/logger.d.ts +75 -74
  26. package/lib/tools/logger.worker.d.ts +13 -0
  27. package/lib/tools/quality.d.ts +113 -0
  28. package/lib/tools/quality.worker.d.ts +13 -0
  29. package/lib/tools/queue.d.ts +38 -3
  30. package/lib/tools/template.d.ts +8 -1
  31. package/lib/tools/utils.d.ts +8 -0
  32. package/lib/type/base.d.ts +2 -2
  33. package/lib/type/client.d.ts +286 -183
  34. package/lib/type/device.d.ts +21 -15
  35. package/lib/type/index.d.ts +3 -0
  36. package/lib/type/layout.d.ts +25 -6
  37. package/lib/type/logger.d.ts +112 -0
  38. package/lib/type/meeting.d.ts +29 -0
  39. package/lib/type/peer.d.ts +20 -0
  40. package/lib/type/quality.d.ts +101 -0
  41. package/lib/type/stream.d.ts +340 -102
  42. package/lib/xyrtc.cjs.js +1 -1
  43. package/lib/xyrtc.umd.js +1 -1
  44. package/package.json +119 -119
  45. package/lib/tools/db.d.ts +0 -85
@@ -1,191 +1,224 @@
1
1
  import { IToken } from './base';
2
2
  import VideoManager from '../main/videoManager';
3
- import { IInternels } from './stream';
3
+ import { IInternals, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
4
4
  import { SupportLocalLanguages } from '../enum';
5
5
  import { ICloudRoomConfig } from './meeting';
6
6
  /**
7
7
  * 向Client推送流类型
8
8
  *
9
- * @value All 所有音视频数据
10
- * @value CONTENT 分享内容视频数据
9
+ * @param All - 所有音视频数据
10
+ * @param CONTENT - 分享内容视频数据
11
11
  */
12
- export declare type IPushType = 'ALL' | 'CONTENT';
12
+ export type IPushType = 'ALL' | 'CONTENT' | 'REMOTE';
13
+ /**
14
+ * 推流类型
15
+ *
16
+ * @param CONTENT CONTENT - 创建发送共享内容管道
17
+ * @param PIPE PIPE - 创建推送管道
18
+ * @param VIDEO VIDEO - 创建发送视频管道
19
+ * @param AUDIO AUDIO - 创建发送音频管道
20
+ * @param VIDEO_AUDIO VIDEO_AUDIO - 创建音频/视频发送管道
21
+ * @param VIDEO_AUDIO_PIPE VIDEO_AUDIO_PIPE - 创建音频/视频/仅接收内容管道
22
+ */
23
+ export declare enum PushType {
24
+ 'CONTENT' = "CONTENT",
25
+ 'PIPE' = "PIPE",
26
+ 'VIDEO' = "VIDEO",
27
+ 'AUDIO' = "AUDIO",
28
+ 'VIDEO_AUDIO' = "VIDEO_AUDIO",
29
+ 'VIDEO_AUDIO_PIPE' = "VIDEO_AUDIO_PIPE"
30
+ }
13
31
  /**
14
32
  * 画面布局模式
15
33
  *
16
- * @value AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
17
- * @value CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
34
+ * @param AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
35
+ * @param CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
18
36
  */
19
- export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
37
+ export type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
20
38
  /**
21
39
  * 分享Content内容的状态
22
40
  *
23
- * @value ENDED 已结束
24
- * @value STARTING 分享中
25
- * @value PENDING 等待
41
+ * @param ENDED ENDED - 已结束
42
+ * @param STARTING STARTING - 分享中
43
+ * @param PENDING PENDING - 等待
26
44
  */
27
- export declare type IShareContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
45
+ export declare enum ShareContentStatus {
46
+ 'ENDED' = "ENDED",
47
+ 'STARTING' = "STARTING",
48
+ 'PENDING' = "PENDING"
49
+ }
28
50
  /**
29
51
  * VIDEO事件回调状态状态
30
52
  *
31
- * @value LOAD_START 开始加载视频流
32
- * @value CANPLAY 可以播放
33
- * @value ERROR 遇到错误
53
+ * @param LOAD_START - 开始加载视频流
54
+ * @param CANPLAY - 可以播放
55
+ * @param ERROR - 错误
34
56
  */
35
- export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
57
+ export type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
36
58
  /**
37
59
  * 视频画面状态
38
60
  *
39
- * @value CANPLAY 正常播放
40
- * @value ENDED 已结束
41
- * @value REQUEST 视频请求中
61
+ * @param CANPLAY 正常播放
62
+ * @param ENDED 已结束
63
+ * @param REQUEST 视频请求中
42
64
  */
43
- export declare type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
65
+ export type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
44
66
  /**
45
67
  * Layout布局方式
46
68
  *
47
- * @value SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
48
- * @value GALLERY 另一种是画廊模式,即 宫格布局
69
+ * @param SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
70
+ * @param GALLERY 另一种是画廊模式,即 宫格布局
49
71
  */
50
- export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
72
+ export type ITemplateMode = 'SPEAKER' | 'GALLERY';
51
73
  /**
52
74
  * 主画面/Content布局模式
53
75
  *
54
- * @value MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
55
- * @value MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpeaker是大窗口
56
- * @value TWO_PIC_PIP 画中画模式(picture in picture)
57
- * @value CONTENT_ONLY 只显示Content
58
- * @value TWO_PIC_SYMMETRIC 对称显示content和speaker(side by side)
76
+ * @param MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
77
+ * @param MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpeaker是大窗口
78
+ * @param TWO_PIC_PIP 画中画模式(picture in picture)
79
+ * @param CONTENT_ONLY 只显示Content
80
+ * @param TWO_PIC_SYMMETRIC 对称显示content和speaker(side by side)
59
81
  */
60
- export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
82
+ export type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
61
83
  /**
62
84
  * 布局模式
63
85
  */
64
- export declare type IMode = ITemplateMode | IContentTemplateMode;
86
+ export type IMode = ITemplateMode | IContentTemplateMode;
65
87
  /**
66
88
  * 客户端状态
67
89
  *
68
- * @value NONE 正常
69
- * @value PUBLISH_ERROR 推流异常
70
- * @value WS_CLOSE wss链接关闭
71
- * @value WS_ERROR wss链接错误
90
+ * @param NONE 正常
91
+ * @param PUBLISH_ERROR 推流异常
92
+ * @param WS_CLOSE wss链接关闭
93
+ * @param WS_ERROR wss链接错误
72
94
  */
73
- export declare type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
95
+ export type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
74
96
  /**
75
97
  * 视频状态
76
98
  *
77
- * @value muteVideo 关闭摄像头
78
- * @value unmuteVideo:开启摄像头
99
+ * @param muteVideo 关闭摄像头
100
+ * @param unmuteVideo:开启摄像头
79
101
  */
80
- export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
102
+ export type IVideoType = 'muteVideo' | 'unmuteVideo';
81
103
  /**
82
104
  * 音频状态
83
105
  *
84
- * @value muteAudio 关闭麦克风
85
- * @value unmuteAudio 开启麦克风
106
+ * @param muteAudio 关闭麦克风
107
+ * @param unmuteAudio 开启麦克风
86
108
  */
87
- export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
109
+ export type IAudioType = 'muteAudio' | 'unmuteAudio';
88
110
  /**
89
111
  * 视频/音频状态
90
112
  *
91
- * @value muteAudio 关闭麦克风
92
- * @value unmuteAudio 开启麦克风
93
- * @value muteVideo 关闭摄像头
94
- * @value unmuteVideo:开启摄像头
113
+ * @param muteAudio 关闭麦克风
114
+ * @param unmuteAudio 开启麦克风
115
+ * @param muteVideo 关闭摄像头
116
+ * @param unmuteVideo:开启摄像头
95
117
  */
96
- export declare type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
118
+ export type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
119
+ /**
120
+ * 视频/音频操作状态
121
+ *
122
+ * @param MUTE_AUDIO: muteAudio 关闭麦克风
123
+ * @param UNMUTE_AUDIO: unmuteAudio 开启麦克风
124
+ * @param MUTE_VIDEO: muteVideo 关闭摄像头
125
+ * @param UNMUTE_VIDEO: unmuteVideo 开启摄像头
126
+ */
127
+ export declare enum OperateType {
128
+ MUTE_AUDIO = "muteAudio",
129
+ UNMUTE_AUDIO = "unmuteAudio",
130
+ MUTE_VIDEO = "muteVideo",
131
+ UNMUTE_VIDEO = "unmuteVideo"
132
+ }
97
133
  /**
98
134
  * 画面内容类型
99
135
  *
100
- * @value 0 People画面
101
- * @value 1 Content共享内容
136
+ * @param 0 People画面
137
+ * @param 1 Content共享内容
102
138
  */
103
- export declare type IMediagroupid = 0 | 1;
104
- export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
139
+ export type IMediagroupid = 0 | 1;
140
+ export type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
105
141
  /**
106
142
  * 布局画面状态
107
143
  *
108
- * @value MUTE 视频暂停
109
- * @value REQUEST 视频请求中
110
- * @value NORMAL 视频正常
111
- * @value INVALID 设备不可用
112
- * @value AUDIO_TEL 电话入会
113
- * @value AUDIO_ONLY 仅音频入会模式
114
- * @value AUDIO_CONTENT 仅音频共享
144
+ * @param MUTE 视频暂停
145
+ * @param REQUEST 视频请求中
146
+ * @param NORMAL 视频正常
147
+ * @param INVALID 设备不可用
148
+ * @param AUDIO_TEL 电话入会
149
+ * @param AUDIO_ONLY 仅音频入会模式
150
+ * @param AUDIO_CONTENT 仅音频共享
115
151
  */
116
- export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
152
+ export type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
117
153
  /**
118
154
  * 分享content类型
119
155
  *
120
- * @value NONE 无
121
- * @value AUDIO 只分享audio
122
- * @value VIDEO 只分享video
123
- * @value BOTH 分享video + audio
156
+ * @param NONE 无
157
+ * @param AUDIO 只分享audio
158
+ * @param VIDEO 只分享video
159
+ * @param BOTH 分享video + audio
124
160
  */
125
- export declare type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
161
+ export declare enum ContentMode {
162
+ 'NONE' = "NONE",
163
+ 'AUDIO' = "AUDIO",
164
+ 'VIDEO' = "VIDEO",
165
+ 'BOTH' = "BOTH"
166
+ }
126
167
  /**
127
168
  * 埋点数据上报类型
128
169
  *
129
- * @value click 点击
130
- * @value msgCallback 消息回调
131
- * @value server server消息
132
- * @value trigger 触发事件类型
170
+ * @param click 点击
171
+ * @param msgCallback 消息回调
172
+ * @param server server消息
173
+ * @param trigger 触发事件类型
133
174
  */
134
- export declare type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
175
+ export type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
135
176
  /**
136
177
  * 埋点数据上报
137
178
  */
138
- export declare type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
179
+ export type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
139
180
  /**
140
181
  * 事件名称
141
182
  */
142
- export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
183
+ export type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'subtitle' | string;
143
184
  /**
144
185
  * 轮询多画面状态
145
186
  *
146
- * @value 0 开始
147
- * @value 1 停止
148
- * @value 2 暂停
149
- * @value 3 恢复
187
+ * @param 0 开始
188
+ * @param 1 停止
189
+ * @param 2 暂停
190
+ * @param 3 恢复
150
191
  */
151
- export declare type TCommand = 0 | 1 | 2 | 3;
192
+ export type TCommand = 0 | 1 | 2 | 3;
152
193
  /**
153
194
  * 设备类型
154
195
  */
155
- declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
156
- /**
157
- * 请求画面分辨率
158
- *
159
- * @value 0 90P
160
- * @value 1 180P
161
- * @value 2 360P
162
- * @value 3 720P
163
- * @value 4 1080P
164
- */
165
- export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
196
+ type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
166
197
  /**
167
- * 请求画面质量
198
+ * 是否禁止收听
168
199
  *
169
- * @value 0 100
170
- * @value 1 200
171
- * @value 3 300
200
+ * @param 'keep' 保持上次的状态
201
+ * @param 'on' 禁止收听
202
+ * @param 'off' 取消禁止收听
172
203
  */
173
- export declare type IQualityType = 0 | 1 | 2;
204
+ export type IMuteSpeaker = 'keep' | 'on' | 'off';
174
205
  /**
175
- * 是否禁止收听
206
+ * 画面布局模式
176
207
  *
177
- * @value 'keep' 保持上次的状态
178
- * @value 'on' 禁止收听
179
- * @value 'off' 取消禁止收听
208
+ * @param AUTO - 自动布局
209
+ * @param CUSTOM - 自定义布局
180
210
  */
181
- export declare type IMuteSpeaker = 'keep' | 'on' | 'off';
211
+ export declare enum LayoutMode {
212
+ AUTO = "AUTO",
213
+ CUSTOM = "CUSTOM"
214
+ }
182
215
  /**
183
216
  * 录制状态
184
217
  *
185
- * @value RECORD_STATE_IDLE 停止成功
186
- * @value RECORD_STATE_STARTING 开启录制
187
- * @value RECORD_STATE_STARTED 开启成功
188
- * @value RECORD_STATE_STOPING 停止录制
218
+ * @param RECORD_STATE_IDLE 停止成功
219
+ * @param RECORD_STATE_STARTING 开启录制
220
+ * @param RECORD_STATE_STARTED 开启成功
221
+ * @param RECORD_STATE_STOPING 停止录制
189
222
  */
190
223
  export declare enum RecordingState {
191
224
  RECORD_STATE_IDLE = "RECORD_STATE_IDLE",
@@ -196,10 +229,10 @@ export declare enum RecordingState {
196
229
  /**
197
230
  * 录制状态
198
231
  *
199
- * @param NONE 未开启录制
200
- * @param LOCAL_START 本地开启录制
201
- * @param REMOTE_STAR 远端开启录制
202
- * @param REMOTE_PAUSED 远端录制暂停中
232
+ * @param NONE 0 - 未开启录制
233
+ * @param LOCAL_START 1 - 本地开启录制
234
+ * @param REMOTE_STAR 2 - 远端开启录制
235
+ * @param REMOTE_PAUSED 3 - 远端录制暂停中
203
236
  */
204
237
  export declare enum RecordStatus {
205
238
  NONE = 0,
@@ -207,6 +240,23 @@ export declare enum RecordStatus {
207
240
  REMOTE_STAR = 2,
208
241
  REMOTE_PAUSED = 3
209
242
  }
243
+ /**
244
+ * 手机相机方向
245
+ *
246
+ * @param FRONT - 前置摄像头
247
+ * @param BACK - 后置摄像头
248
+ */
249
+ export declare enum FacingMode {
250
+ FRONT = "FRONT",
251
+ BACK = "BACK"
252
+ }
253
+ /**
254
+ * 手机相机方向
255
+ *
256
+ * @property 'FRONT' - 前置摄像头
257
+ * @property 'BACK' - 后置摄像头
258
+ */
259
+ export type IFacingMode = keyof typeof FacingMode;
210
260
  /**
211
261
  * client配置参数
212
262
  *
@@ -267,22 +317,34 @@ export interface ILayoutParams {
267
317
  contentSenderPid: number;
268
318
  localHide: boolean;
269
319
  }
320
+ /**
321
+ * Layout 模版 分辨率
322
+ *
323
+ * @property { StreamResolutionLevel } normal 默认请流分辨率
324
+ * @property { StreamResolutionLevel } low 低性能请流分辨率
325
+ * @property { StreamResolutionLevel } high 高分辨率
326
+ */
327
+ export interface ITemplateResolution {
328
+ normal: StreamResolutionLevel;
329
+ low: StreamResolutionLevel;
330
+ high?: StreamResolutionLevel;
331
+ }
270
332
  /**
271
333
  * Layout模版定义
272
334
  *
273
335
  * @property { number[] } position - 位置/尺寸比例
274
- * @property { IResolutionType } resolution - 分辨率
336
+ * @property { ITemplateResolution } resolution - 分辨率
275
337
  * @property { number } resolution.normal - 正常分辨率
276
338
  * @property { number } resolution.low - 低性能模式分辨率
339
+ * @property { number ?} resolution.high - 高分辨率
340
+ * @property { VideoQuality } quality - 请流质量
277
341
  * @property { number } zIndex - 层级
278
342
  * @property { string } type - 类型,LOCAL/CONTENT
279
343
  */
280
- export declare type ITemplateObj = {
344
+ export type ITemplateObj = {
281
345
  position: number[];
282
- resolution: {
283
- normal: IResolutionType;
284
- low: IResolutionType;
285
- };
346
+ resolution: ITemplateResolution;
347
+ quality?: VideoQuality;
286
348
  zIndex?: number;
287
349
  type?: string;
288
350
  };
@@ -306,7 +368,7 @@ export interface ITemplate {
306
368
  */
307
369
  export interface IDefault {
308
370
  CLIENT_TYPE: string;
309
- INIT_INTERNELS: IInternels;
371
+ INIT_INTERNALS: IInternals;
310
372
  RESOLUTION: number;
311
373
  ROSTER: IRoster;
312
374
  SELF_MOCK_PID: number;
@@ -316,18 +378,19 @@ export interface IDefault {
316
378
  [id: number]: number;
317
379
  };
318
380
  MAP_RESOLUTION_INDEX: {
319
- [resolution: string]: number;
381
+ [resolution: string]: StreamResolutionLevel;
320
382
  };
321
383
  RESOLUTION_MAP: {
322
384
  [index: number]: number;
323
385
  };
324
- VIDE_BANDWIDTH_BIT: 1000;
386
+ VIDE_BANDWIDTH_BIT: number;
387
+ VIDE_FRAMERATE_BIT: number;
325
388
  LOGIN_INFO: {
326
389
  callUri: string;
327
390
  securityKey: string;
328
391
  access_token: string;
329
392
  refresh_token: string;
330
- id: 0;
393
+ id: number;
331
394
  displayName: string;
332
395
  };
333
396
  LAYOUT: ILayout;
@@ -340,6 +403,7 @@ export interface IDefault {
340
403
  CONF_INFO: IConfInfo;
341
404
  CLOUD_ROOOM_INFO: ICloudRoomConfig;
342
405
  CONFERENCE_INFO: IConferenceInfo;
406
+ MAX_PEOPLE_RESOLUTION: StreamResolution;
343
407
  }
344
408
  /**
345
409
  * SDK登录用户信息
@@ -352,6 +416,7 @@ export interface IDefault {
352
416
  * @property { string } displayName 登录用户名
353
417
  * @property { string } cellPhone 呼叫号码
354
418
  * @property { string } extUserId 第三方用户ID
419
+ * @property { string } enterpriseId 企业ID
355
420
  */
356
421
  export interface ILoginInfo {
357
422
  callUri?: string;
@@ -362,6 +427,7 @@ export interface ILoginInfo {
362
427
  displayName?: string;
363
428
  cellPhone?: string;
364
429
  extUserId?: string;
430
+ enterpriseId?: string;
365
431
  }
366
432
  export interface ICodeList {
367
433
  version: string;
@@ -375,26 +441,28 @@ export interface ICodeList {
375
441
  [key: string]: string;
376
442
  };
377
443
  }
378
- export interface IMUTE_MAP {
379
- [type: string]: {
380
- type: IVideoAudioMessageType;
381
- status: boolean;
382
- };
383
- }
444
+ export type OPERATE_MAP_VALUE = {
445
+ type: IVideoAudioMessageType;
446
+ reportEventType: string;
447
+ enabled: boolean;
448
+ };
449
+ export type IOPERATE_MAP = {
450
+ [key in OperateType]: OPERATE_MAP_VALUE;
451
+ };
384
452
  /**
385
453
  * 配置画面数据
386
454
  *
387
455
  * @property { string } calluri 设备url
388
- * @property { IResolutionType } resolution 分辨率
389
- * @property { IQualityType } quality 质量
456
+ * @property { StreamResolutionLevel } resolution 分辨率
457
+ * @property { VideoQuality } quality 质量
390
458
  * @property { number } mediagroupid 0:people画面,1:content共享画面
391
459
  * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
392
460
  * @property { string } callUri NewLayout版本无此参数
393
461
  */
394
- export declare type IReqInfo = {
462
+ export type IReqInfo = {
395
463
  calluri: string;
396
- resolution: IResolutionType;
397
- quality: IQualityType;
464
+ resolution: StreamResolutionLevel;
465
+ quality: VideoQuality;
398
466
  mediagroupid?: number;
399
467
  isContent?: boolean;
400
468
  callUri?: string;
@@ -492,6 +560,24 @@ export interface ISdkUserInfo {
492
560
  password: string;
493
561
  extId?: string;
494
562
  }
563
+ /**
564
+ * 授权码登录
565
+ *
566
+ * @property { string } extId 企业id
567
+ * @property { string } extUserId 用户id
568
+ * @property { string } displayName 用户名
569
+ * @property { string } oauthCode 授权码
570
+ * @property { boolean } isTempUser 是否是临时账号
571
+ * @property { string } channelId 渠道id
572
+ */
573
+ export interface ILoginWidthAuthCode {
574
+ extId: string;
575
+ extUserId: string;
576
+ displayName: string;
577
+ oauthCode: string;
578
+ isTempUser: boolean;
579
+ channelId: string;
580
+ }
495
581
  export interface IHttpConfig {
496
582
  baseUrl: string;
497
583
  }
@@ -670,29 +756,27 @@ export interface IMeetingControl {
670
756
  /**
671
757
  * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
672
758
  *
759
+ * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
673
760
  * @property { IDeviceType } deviceType 设备类型
674
761
  * @property { string } endpointId 设备id
675
762
  * @property { string } displayName 参会者名称
676
- * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
763
+ * @property { number } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
677
764
  * @property { number } participantId 参会者id
678
765
  * @property { boolean } audioTxMute 参会者麦克风状态,true:开启,false:关闭
679
766
  * @property { boolean } videoTxMute 参会者摄像头状态,true:开启,false:关闭
767
+ * @property { boolean } isForceFullScreen 参会者是否是主画面
768
+ * @property { number } videoMuteReason 视频关闭原因
769
+ * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
770
+ * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
771
+ * @property { boolean } isLocal 是否是Local设备
680
772
  * @property { boolean } audioRxMute ignore
681
773
  * @property { boolean } videoRxMute ignore
682
- * @property { number } videoMuteReason ignore
683
- * @property { boolean } isForceFullScreen 参会者是否是主画面
774
+ * @property { boolean } onHold ignore
684
775
  * @property { boolean } isLastAdd ignore
685
- * @property { boolean } onHold 参会者是否是被呼叫等待状态
686
776
  * @property { boolean } isPolling ignore
687
- * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
688
- * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
689
- * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
690
- * @property { string } extUserId 三方userId
691
- * @property { boolean } isLocal 参会者是否是自己
692
- * @property { number } ExpectHeight 期望分辨率
693
- * @property { number } ExpectWidth 期望分辨率
694
777
  */
695
- export interface IRoster {
778
+ export interface IRoster extends Partial<ILayoutRoster> {
779
+ id: string;
696
780
  deviceType: IDeviceType;
697
781
  endpointId: string;
698
782
  displayName: string;
@@ -708,53 +792,62 @@ export interface IRoster {
708
792
  onHold: boolean;
709
793
  isPolling: boolean;
710
794
  isContent: boolean;
711
- isActiveSpeaker?: boolean;
712
- id: string;
713
- extUserId: string;
795
+ isActiveSpeaker: boolean;
714
796
  isLocal?: boolean;
715
- ExpectHeight?: number;
716
- ExpectWidth?: number;
717
797
  }
718
798
  /**
719
799
  * Layout Result布局结果中返回的基础数据
720
800
  *
721
801
  * @property { number } participantId 参会者id
722
802
  * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
723
- * @property { number } feccOri ignore
724
803
  * @property { string } remoteType 设备类型
725
804
  * @property { string } remoteName 参会者名称
726
- * @property { string } remoteID ignore
727
805
  * @property { string } videoTrackId 当前参会者画面Track轨道id,用于在 VideoTrackList 中匹配stream数据
728
- * @property { string } audioTrackId ignore
729
806
  * @property { boolean } isAudioMute 参会者麦克风状态,true:开启,false:关闭
730
807
  * @property { boolean } isVideoMute 参会者摄像头状态,true:开启,false:关闭
731
808
  * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
732
- * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
733
- * @property { boolean } isChairman 参会者是否是主画面
734
- * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
735
809
  * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
736
- * @property { number } MuteReason ignore
810
+ * @property { number } MuteReason 视频关闭原因
811
+ * @property { number } extUserId 参会者ID
737
812
  * @property { string } calluri 参会者Url
738
- * @property { boolean } isLocal 参会者是否是自己
813
+ * @property { number } ExpectHeight 期望分辨率
814
+ * @property { number } ExpectWidth 期望分辨率
815
+ * @property { number } feccOri ignore
739
816
  */
740
817
  export interface ILayoutRoster {
741
818
  participantId: number;
742
819
  mediagroupid: number;
743
- feccOri: number;
744
820
  remoteType: string;
745
821
  remoteName: string;
746
- remoteID: string;
747
822
  videoTrackId: string;
748
- audioTrackId: string;
749
823
  isAudioMute: boolean;
750
824
  isVideoMute: boolean;
751
825
  isActiveSpeaker: boolean;
752
- isContent: boolean;
753
- isChairman: boolean;
754
826
  LayoutVideoState: number;
755
- MuteReason: number;
756
- calluri?: string;
757
- isLocal?: boolean;
827
+ MuteReason: MuteReason;
828
+ extUserId: string;
829
+ calluri: string;
830
+ ExpectHeight: number;
831
+ ExpectWidth: number;
832
+ feccOri: number;
833
+ }
834
+ /**
835
+ * 视频关闭原因
836
+ *
837
+ * @param MuteByUser - 用户自己关闭
838
+ * @param MuteByBWLimit - 带宽限制
839
+ * @param MuteByNoInput - 没有视频输入
840
+ * @param MuteByConfMgmt - 会控关闭
841
+ * @param MuteByDeviceDetection - 设备探测
842
+ * @param MuteByPhoneCall - 电话占用
843
+ */
844
+ export declare enum MuteReason {
845
+ MuteByUser = 0,
846
+ MuteByBWLimit = 1,
847
+ MuteByNoInput = 2,
848
+ MuteByConfMgmt = 3,
849
+ MuteByDeviceDetection = 4,
850
+ MuteByPhoneCall = 5
758
851
  }
759
852
  /**
760
853
  * Conf Change消息
@@ -804,7 +897,7 @@ export interface ISpeakerInfo {
804
897
  * 布局对象
805
898
  *
806
899
  * @property { number[] } position 模版位置,业务层可以忽略
807
- * @property { IResolutionType } resolution 当前布局对象的分辨数据
900
+ * @property { StreamResolutionLevel } resolution 当前布局对象的分辨数据
808
901
  * @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
809
902
  * @property { any } rotate 当前参会者的旋转信息
810
903
  * @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
@@ -816,7 +909,7 @@ export interface ISpeakerInfo {
816
909
  */
817
910
  export interface ILayout {
818
911
  position?: number[];
819
- resolution?: IResolutionType;
912
+ resolution?: StreamResolutionLevel;
820
913
  roster: IRoster;
821
914
  rotate?: any;
822
915
  state?: ILayoutState;
@@ -834,12 +927,13 @@ export interface ILayout {
834
927
  deal?: boolean;
835
928
  zIndex?: number;
836
929
  avatar?: string;
930
+ textAvatar?: string;
837
931
  index?: number;
838
932
  }
839
933
  /**
840
934
  * Local布局对象
841
935
  *
842
- * @extends ILayout
936
+ * @implements ILayout
843
937
  * @property { boolean } isLocal 是否是当前设备
844
938
  */
845
939
  export interface ILocalLayout extends ILayout {
@@ -867,9 +961,9 @@ export interface IScreenInfo {
867
961
  * @property { number } width 宽度
868
962
  * @property { number } participantId 用户id
869
963
  * @property { number } rotation 旋转角度
870
- * @value 0 | 1 不需要旋转
871
- * @value 2 顺时针旋转180度
872
- * @value 3 顺时针旋转270度
964
+ * @param 0 | 1 不需要旋转
965
+ * @param 2 顺时针旋转180度
966
+ * @param 3 顺时针旋转270度
873
967
  */
874
968
  export interface IRotationInfoItem {
875
969
  height: number;
@@ -903,24 +997,24 @@ export interface IRotationInfo {
903
997
  * 自定义布局请流对象数据
904
998
  *
905
999
  * @property { number } pid 用户id,从roster中获取
906
- * @property { IResolutionType } resolution 当前请求画面分辨率
1000
+ * @property { StreamResolutionLevel } resolution 当前请求画面分辨率
907
1001
  * @value 0 90P
908
1002
  * @value 1 180P
909
1003
  * @value 2 360P
910
1004
  * @value 3 720P
911
1005
  * @value 4 1080P
912
- * @property { IQualityType } quality 画面质量
1006
+ * @property { VideoQuality } quality 画面质量
913
1007
  * @value 0 100
914
1008
  * @value 1 200
915
1009
  * @value 3 300
916
1010
  * @property { number } mediagroupid 当前流的类型:people/content
917
- * @value 0 people
918
- * @value 1 content
1011
+ * @param 0 people
1012
+ * @param 1 content
919
1013
  */
920
1014
  export interface ICustomLayout {
921
1015
  pid: number;
922
- resolution: IResolutionType;
923
- quality: IQualityType;
1016
+ resolution: StreamResolutionLevel;
1017
+ quality: VideoQuality;
924
1018
  mediagroupid: number;
925
1019
  }
926
1020
  /**
@@ -989,12 +1083,12 @@ export interface ISubTitleContent {
989
1083
  scrollSpeed?: string;
990
1084
  backgroundRGB?: string;
991
1085
  }
992
- export declare type IAudioRenders = {
1086
+ export type IAudioRenders = {
993
1087
  [key: string]: {
994
1088
  ele: any;
995
1089
  };
996
1090
  };
997
- export declare type IVideoRenders = {
1091
+ export type IVideoRenders = {
998
1092
  [key: string]: VideoManager & {
999
1093
  match?: boolean;
1000
1094
  };
@@ -1002,7 +1096,7 @@ export declare type IVideoRenders = {
1002
1096
  /**
1003
1097
  * 同传字幕: 本地支持的语言
1004
1098
  */
1005
- export declare type TLocalLanguage = typeof SupportLocalLanguages[number];
1099
+ export type TLocalLanguage = (typeof SupportLocalLanguages)[number];
1006
1100
  export interface IOutputCustomLayout {
1007
1101
  [pid: string]: {
1008
1102
  resolution: number;
@@ -1068,18 +1162,16 @@ export interface ITrackInfo {
1068
1162
  /**
1069
1163
  * ws close reason
1070
1164
  */
1071
- export declare type TErrorReason<P = {}> = P & {
1165
+ export type TErrorReason<P = {}> = P & {
1072
1166
  code?: number;
1073
1167
  };
1074
1168
  /**
1075
1169
  * 是否静音
1076
1170
  *
1077
- * @enum
1078
- *
1079
- * @property {number} AutoMute.SMART 智能静音
1080
- * @property {number} AutoMute.ALL 全部静音
1081
- * @property {number} AutoMute.NOT 不静音
1082
- * @property {number} AutoMute.FORCE 强制静音
1171
+ * @param SMART 0 - 智能静音
1172
+ * @param ALL 1 - 全部静音
1173
+ * @param NOT 2 - 不静音
1174
+ * @param FORCE 3 - 强制静音
1083
1175
  */
1084
1176
  export declare enum AutoMute {
1085
1177
  SMART = 0,
@@ -1202,7 +1294,7 @@ export interface IReceiveCustomMessage {
1202
1294
  * @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
1203
1295
  * @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
1204
1296
  * @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
1205
- * @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
1297
+ * @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false;
1206
1298
  * @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
1207
1299
  * @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
1208
1300
  * @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
@@ -1210,6 +1302,8 @@ export interface IReceiveCustomMessage {
1210
1302
  * @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
1211
1303
  * @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
1212
1304
  * @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false;
1305
+ * @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
1306
+ *
1213
1307
  */
1214
1308
  export interface IFeatureConfig {
1215
1309
  enableMeetingShout?: boolean;
@@ -1223,12 +1317,14 @@ export interface IFeatureConfig {
1223
1317
  enableSpeakerInfo?: boolean;
1224
1318
  enableLayoutAvatar?: boolean;
1225
1319
  enableMobileNotAuth?: boolean;
1320
+ enableWatermarkContent?: boolean;
1226
1321
  }
1227
1322
  export interface IConfMgmtUrl {
1228
1323
  pc: string;
1229
1324
  member: string;
1230
1325
  side: string;
1231
- mobile?: string;
1326
+ mobile: string;
1327
+ professional: string;
1232
1328
  }
1233
1329
  /**
1234
1330
  * 上报会控控制开启/关闭摄像头结果
@@ -1264,14 +1360,14 @@ export interface IEPMessage {
1264
1360
  /**
1265
1361
  * 会控开启/关闭摄像头消息、Toast提示消息
1266
1362
  */
1267
- export declare type IMCVideoEvent = controlVideoQuery | unMuteVideoQueryToast;
1363
+ export type IMCVideoEvent = controlVideoQuery | unMuteVideoQueryToast;
1268
1364
  /**
1269
1365
  * 会控开关摄像头三个事件类型
1270
1366
  * unMuteVideoQuery: 会控请求打开摄像头
1271
1367
  * muteVideoQuery: 会控请求关闭摄像头
1272
1368
  * toast: 主持会议的客户端收到的成功和失败提醒
1273
1369
  */
1274
- export declare type queryType = 'unMuteVideoQuery' | 'muteVideoQuery' | 'toast';
1370
+ export type queryType = 'unMuteVideoQuery' | 'muteVideoQuery' | 'toast';
1275
1371
  /**
1276
1372
  * 会控开关摄像头事件基础消息体
1277
1373
  *
@@ -1361,4 +1457,11 @@ export interface IWaitingState {
1361
1457
  waitingState: number;
1362
1458
  automute: string;
1363
1459
  }
1460
+ /**
1461
+ * 通知媒体网关:流能力集配置
1462
+ */
1463
+ export interface IStreamCapability {
1464
+ streamId: string;
1465
+ resolution: StreamResolutionLevel;
1466
+ }
1364
1467
  export {};