@xylink/xy-rtc-sdk 2.1.2-beta.7 → 3.8.0-beta.1

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 (49) hide show
  1. package/README.MD +2 -37
  2. package/lib/{src/action → action}/index.d.ts +237 -230
  3. package/lib/{src/enum → enum}/contraints.d.ts +116 -115
  4. package/lib/{src/enum → enum}/errorCode.d.ts +880 -880
  5. package/lib/{src/enum → enum}/index.d.ts +137 -133
  6. package/lib/{src/index.d.ts → index.d.ts} +34 -34
  7. package/lib/{src/main → main}/client.d.ts +878 -797
  8. package/lib/{src/main → main}/deviceManager.d.ts +164 -165
  9. package/lib/{src/main → main}/helper.d.ts +51 -51
  10. package/lib/{src/main → main}/iauth.d.ts +33 -33
  11. package/lib/{src/main → main}/layoutManager.d.ts +214 -214
  12. package/lib/{src/main → main}/peer.d.ts +311 -295
  13. package/lib/{src/main → main}/qualityManager.d.ts +39 -39
  14. package/lib/{src/main → main}/stream.d.ts +263 -243
  15. package/lib/{src/main → main}/videoManager.d.ts +65 -65
  16. package/lib/{src/tools → tools}/audioLevel.d.ts +23 -23
  17. package/lib/{src/tools → tools}/browser.d.ts +55 -55
  18. package/lib/{src/tools → tools}/config.d.ts +12 -12
  19. package/lib/{src/tools → tools}/db.d.ts +85 -84
  20. package/lib/tools/detect.d.ts +44 -0
  21. package/lib/{src/tools → tools}/emmitter.d.ts +15 -15
  22. package/lib/{src/tools → tools}/enum.d.ts +6 -6
  23. package/lib/{src/tools → tools}/httpClient.d.ts +64 -61
  24. package/lib/{src/tools → tools}/i18n.d.ts +8 -8
  25. package/lib/{src/tools → tools}/index.d.ts +8 -3
  26. package/lib/{src/tools → tools}/logger.d.ts +151 -151
  27. package/lib/{src/tools → tools}/socket.d.ts +53 -50
  28. package/lib/{src/tools → tools}/store.d.ts +15 -15
  29. package/lib/{src/tools → tools}/template.d.ts +14 -14
  30. package/lib/{src/tools → tools}/utils.d.ts +73 -67
  31. package/lib/{src/tools → tools}/verify.d.ts +7 -7
  32. package/lib/{src/type → type}/base.d.ts +71 -67
  33. package/lib/{src/type → type}/client.d.ts +1121 -1106
  34. package/lib/{src/type → type}/device.d.ts +77 -77
  35. package/lib/{src/type → type}/index.d.ts +11 -11
  36. package/lib/{src/type → type}/quality.d.ts +77 -77
  37. package/lib/{src/type → type}/stream.d.ts +426 -422
  38. package/lib/xyrtc.cjs.js +1 -0
  39. package/lib/xyrtc.umd.js +1 -0
  40. package/package.json +43 -54
  41. package/scripts/build_lib.js +16 -0
  42. package/scripts/utils.js +27 -0
  43. package/scripts/webpack.common.js +139 -0
  44. package/scripts/webpack.dev.js +27 -0
  45. package/scripts/webpack.sdk.js +68 -0
  46. package/tsconfig.lib.json +37 -0
  47. package/lib/index.es.js +0 -3
  48. package/lib/index.js +0 -3
  49. package/lib/src/tools/detect.d.ts +0 -19
@@ -1,1106 +1,1121 @@
1
- import { IToken } from './base';
2
- import VideoManager from '../main/videoManager';
3
- import { IInternels } from './stream';
4
- import { SupportLocalLanguages } from 'src/enum';
5
- /**
6
- * 向Client推送流类型
7
- *
8
- * @value All 所有音视频数据
9
- * @value CONTENT 分享内容视频数据
10
- */
11
- export declare type IPushType = 'ALL' | 'CONTENT';
12
- /**
13
- * 画面布局模式
14
- *
15
- * @value AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
16
- * @value CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
17
- */
18
- export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
19
- /**
20
- * 分享Content内容的状态
21
- *
22
- * @value ENDED 已结束
23
- * @value STARTING 分享中
24
- * @value PENDING 等待
25
- */
26
- export declare type IShareContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
27
- /**
28
- * VIDEO事件回调状态状态
29
- *
30
- * @value LOAD_START 开始加载视频流
31
- * @value CANPLAY 可以播放
32
- * @value ERROR 遇到错误
33
- */
34
- export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
35
- /**
36
- * 视频画面状态
37
- *
38
- * @value CANPLAY 正常播放
39
- * @value ENDED 已结束
40
- * @value REQUEST 视频请求中
41
- */
42
- export declare type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
43
- /**
44
- * Layout布局方式
45
- *
46
- * @value SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
47
- * @value GALLERY 另一种是画廊模式,即 宫格布局
48
- */
49
- export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
50
- /**
51
- * 主画面/Content布局模式
52
- *
53
- * @value MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
54
- * @value MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpeaker是大窗口
55
- * @value TWO_PIC_PIP 画中画模式(picture in picture)
56
- * @value CONTENT_ONLY 只显示Content
57
- * @value TWO_PIC_SYMMETRIC 对称显示content和speaker(side by side)
58
- */
59
- export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
60
- /**
61
- * 布局模式
62
- */
63
- export declare type IMode = ITemplateMode | IContentTemplateMode;
64
- /**
65
- * 客户端状态
66
- *
67
- * @value NONE 正常
68
- * @value PUBLISH_ERROR 推流异常
69
- * @value WS_CLOSE wss链接关闭
70
- * @value WS_ERROR wss链接错误
71
- */
72
- export declare type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
73
- /**
74
- * 视频状态
75
- *
76
- * @value muteVideo 关闭摄像头
77
- * @value unmuteVideo:开启摄像头
78
- */
79
- export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
80
- /**
81
- * 音频状态
82
- *
83
- * @value muteAudio 关闭麦克风
84
- * @value unmuteAudio 开启麦克风
85
- */
86
- export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
87
- /**
88
- * 视频/音频状态
89
- *
90
- * @value muteAudio 关闭麦克风
91
- * @value unmuteAudio 开启麦克风
92
- * @value muteVideo 关闭摄像头
93
- * @value unmuteVideo:开启摄像头
94
- */
95
- export declare type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
96
- /**
97
- * 画面内容类型
98
- *
99
- * @value 0 People画面
100
- * @value 1 Content共享内容
101
- */
102
- export declare type IMediagroupid = 0 | 1;
103
- export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
104
- /**
105
- * 布局画面状态
106
- *
107
- * @value MUTE 视频暂停
108
- * @value REQUEST 视频请求中
109
- * @value NORMAL 视频正常
110
- * @value INVALID 设备不可用
111
- * @value AUDIO_TEL 电话入会
112
- * @value AUDIO_ONLY 仅音频入会模式
113
- * @value AUDIO_CONTENT 仅音频共享
114
- */
115
- export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
116
- /**
117
- * 分享content类型
118
- *
119
- * @value NONE 无
120
- * @value AUDIO 只分享audio
121
- * @value VIDEO 只分享video
122
- * @value BOTH 分享video + audio
123
- */
124
- export declare type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
125
- /**
126
- * 埋点数据上报类型
127
- *
128
- * @value click 点击
129
- * @value msgCallback 消息回调
130
- * @value server server消息
131
- * @value trigger 触发事件类型
132
- */
133
- export declare type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
134
- /**
135
- * 埋点数据上报
136
- */
137
- export declare type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
138
- /**
139
- * 事件名称
140
- */
141
- export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
142
- /**
143
- * 轮询多画面状态
144
- *
145
- * @value 0 开始
146
- * @value 1 停止
147
- * @value 2 暂停
148
- * @value 3 恢复
149
- */
150
- export declare type TCommand = 0 | 1 | 2 | 3;
151
- /**
152
- * 设备类型
153
- */
154
- declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
155
- /**
156
- * 请求画面分辨率
157
- *
158
- * @value 0 90P
159
- * @value 1 180P
160
- * @value 2 360P
161
- * @value 3 720P
162
- * @value 4 1080P
163
- */
164
- export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
165
- /**
166
- * 请求画面质量
167
- *
168
- * @value 0 100
169
- * @value 1 200
170
- * @value 3 300
171
- */
172
- export declare type IQualityType = 0 | 1 | 2;
173
- /**
174
- * 是否禁止收听
175
- *
176
- * @value 'keep' 保持上次的状态
177
- * @value 'on' 禁止收听
178
- * @value 'off' 取消禁止收听
179
- */
180
- export declare type IMuteSpeaker = 'keep' | 'on' | 'off';
181
- /**
182
- * 录制状态
183
- *
184
- * @value RECORD_STATE_IDLE 停止成功
185
- * @value RECORD_STATE_STARTING 开启录制
186
- * @value RECORD_STATE_STARTED 开启成功
187
- * @value RECORD_STATE_STOPING 停止录制
188
- */
189
- export declare enum RecordingState {
190
- RECORD_STATE_IDLE = "RECORD_STATE_IDLE",
191
- RECORD_STATE_STARTING = "RECORD_STATE_STARTING",
192
- RECORD_STATE_STARTED = "RECORD_STATE_STARTED",
193
- RECORD_STATE_STOPING = "RECORD_STATE_STOPING"
194
- }
195
- /**
196
- * 录制状态
197
- *
198
- * @param NONE 未开启录制
199
- * @param LOCAL_START 本地开启录制
200
- * @param REMOTE_STAR 远端开启录制
201
- * @param REMOTE_PAUSED 远端录制暂停中
202
- */
203
- export declare enum RecordStatus {
204
- NONE = 0,
205
- LOCAL_START = 1,
206
- REMOTE_STAR = 2,
207
- REMOTE_PAUSED = 3
208
- }
209
- /**
210
- * client配置参数
211
- *
212
- * @property { string } clientId 必填 | "" | 网关校验id(clientId),需要从对接人处获取
213
- * @property { string } wssServer 非必填 websocket服务地址,默认不需要配置
214
- * @property { string } httpServer 非必填 resetApi服务地址,默认不需要配置
215
- * @property { string } logServer 非必填 logServer服务地址,默认不需要配置
216
- * @property { IClientLayout } layout 非必填 | AUTO | 布局模式,可选:AUTO | CUSTOM
217
- * @property { boolean } debug 非必填 | false | 是否接收所有参会者音视频状态数据,默认不发送
218
- * @property { boolean } muteAudio 非必填 | false | 是否开启/关闭麦克风入会,默认是false,开启麦克风
219
- * @property { boolean } muteVideo 非必填 | false | 是否开启/关闭摄像头入会,默认是false,开启摄像头
220
- * @property { { offset?: number[]; elementId?: string } } container 非必填 | {} | 配置layout container容器节点和偏移量
221
- * @property { number[] } container.offset 非必填 | [] | 配置[上 下 左 右]的偏移量,自动布局适用
222
- * @property { string } container.elementId 非必填 | "" | 配置Layout需要包裹在elementId元素里面显示,并使用此元素的信息计算 Layout 的 size和 position
223
- * @property { boolean } localHide 非必填 | false | 是否在页面上隐藏Local画面,默认不隐藏
224
- * @property { boolean } localMirror 非必填 | true | 是否需要镜像Local画面,默认镜像Local
225
- * @property { ITemplateMode } templateMode 非必填 | 布局模式,默认:SPEAKER,1大N小 画面布局模式,可选:SPEAKER | GALLERY
226
- * @property { string } __hideId 是否是隐身入会模式,hide代表隐身入会,为空代表正常模式
227
- * @property { string } __monitorMode 是否是巡课模式,默认是'',MONITOR代表巡课模式
228
- * @property { boolean } isThird 埋点
229
- * @property { boolean } isSupportHybridCloud 是否是混合云,默认公有云。 如果有探测到内网地址,则此值为true,将不进行鉴权。
230
- * @property { boolean } isVerifyMeetingId 是否校验会议号,默认校验
231
- * @property { boolean } bandwidthSetting 带宽配置
232
- *
233
- */
234
- export interface IClientConfig {
235
- clientId: string;
236
- clientSecret?: string;
237
- wssServer?: string;
238
- httpServer?: string;
239
- logServer?: string;
240
- layout?: IClientLayout;
241
- debug?: boolean;
242
- muteAudio?: boolean;
243
- muteVideo?: boolean;
244
- container?: {
245
- offset?: number[];
246
- elementId?: string;
247
- };
248
- localHide?: boolean;
249
- localMirror?: boolean;
250
- templateMode?: ITemplateMode;
251
- __hideId?: number | string;
252
- __monitorMode?: string;
253
- isThird?: boolean;
254
- isSupportHybridCloud?: boolean;
255
- isVerifyMeetingId?: boolean;
256
- bandwidthSetting?: boolean;
257
- }
258
- export interface ILayoutParams {
259
- rosters: IRoster[];
260
- speakerInfo: ISpeakerInfo;
261
- layout: ILayout[];
262
- templateMode: ITemplateMode;
263
- invite: IInvite;
264
- contentSenderPid: number;
265
- localHide: boolean;
266
- }
267
- export declare type ITemplateObj = {
268
- position: number[];
269
- resolution: IResolutionType;
270
- zIndex?: number;
271
- isContent?: boolean;
272
- };
273
- export interface ITypeTemplate {
274
- [id: string]: ITemplateObj[];
275
- }
276
- export interface ITemplateInfo {
277
- length: number;
278
- temp: {
279
- [index: string]: ITemplateObj[];
280
- };
281
- rate: {
282
- [index: number]: number;
283
- };
284
- }
285
- export interface ITemplate {
286
- [type: string]: ITemplateInfo;
287
- }
288
- /**
289
- * @enum 默认常量列表
290
- */
291
- export interface IDefault {
292
- CLIENT_TYPE: string;
293
- INIT_INTERNELS: IInternels;
294
- RESOLUTION: number;
295
- ROSTER: IRoster;
296
- SELF_MOCK_PID: number;
297
- HOR_CONTAINER_RATIO: number;
298
- VER_CONTAINER_RATIO: number;
299
- RATIO_MAP: {
300
- [id: number]: number;
301
- };
302
- MAP_RESOLUTION_INDEX: {
303
- [resolution: string]: number;
304
- };
305
- RESOLUTION_MAP: {
306
- [index: number]: number;
307
- };
308
- VIDE_BANDWIDTH_BIT: 1000;
309
- LOGIN_INFO: {
310
- callUri: string;
311
- securityKey: string;
312
- access_token: string;
313
- refresh_token: string;
314
- id: 0;
315
- displayName: string;
316
- };
317
- LAYOUT: ILayout;
318
- MAP_RESOLUTION_STRING: {
319
- [resolution: string]: {
320
- width: number;
321
- height: number;
322
- };
323
- };
324
- CONF_INFO: IConfInfo;
325
- }
326
- /**
327
- * SDK登录结果
328
- *
329
- * @property { string? } callUri 设备id
330
- * @property { string } securityKey 安全码
331
- * @property { string } access_token token
332
- * @property { string } refresh_token 刷新token
333
- * @property { number } id 忽略
334
- * @property { string } displayName 登录用户名
335
- * @property { string } cellPhone 忽略
336
- */
337
- export interface ILoginInfo {
338
- callUri?: string;
339
- securityKey: string;
340
- access_token: string;
341
- refresh_token?: string;
342
- id: number;
343
- displayName?: string;
344
- cellPhone?: string;
345
- extUserId?: string;
346
- }
347
- export interface ICodeList {
348
- version: string;
349
- zh_CN: {
350
- [key: string]: string;
351
- };
352
- zh_TW: {
353
- [key: string]: string;
354
- };
355
- en_US: {
356
- [key: string]: string;
357
- };
358
- }
359
- export interface IMUTE_MAP {
360
- [type: string]: {
361
- type: IVideoAudioMessageType;
362
- status: boolean;
363
- };
364
- }
365
- /**
366
- * 配置画面数据
367
- *
368
- * @property { string } calluri 设备url
369
- * @property { IResolutionType } resolution 分辨率
370
- * @property { IQualityType } quality 质量
371
- * @property { number } mediagroupid 0:people画面,1:content共享画面
372
- * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
373
- * @property { string } callUri NewLayout版本无此参数
374
- */
375
- export declare type IReqInfo = {
376
- calluri: string;
377
- resolution: IResolutionType;
378
- quality: IQualityType;
379
- mediagroupid?: number;
380
- isContent?: boolean;
381
- callUri?: string;
382
- };
383
- export interface IMeetingInfo {
384
- meetingId: string;
385
- callUri: string;
386
- }
387
- /**
388
- * 调度失败的uri列表项目
389
- *
390
- * @property { string } uri 设备calluri
391
- * @property { string } status 状态
392
- * @property { string } message 消息
393
- */
394
- export interface IFailUriItem {
395
- uri: string;
396
- status: string;
397
- message: string;
398
- }
399
- /**
400
- * 调度画面结果数据
401
- */
402
- export interface IMonitorReportMessage {
403
- callIndex: number;
404
- callerUri: string;
405
- code: string;
406
- monitorInfo: {
407
- uriList: IFailUriItem[];
408
- failUriList: IFailUriItem[];
409
- };
410
- type: 'MONITOR_STATE_REPORT';
411
- }
412
- /**
413
- * 调度成功和失败的设备列表数据
414
- */
415
- export interface IMonitorReport {
416
- uriList: IFailUriItem[];
417
- failUriList: IFailUriItem[];
418
- }
419
- /**
420
- * 出入会通知
421
- *
422
- * @property { string } e 呼叫者的callerUri
423
- * @property { string } a 呼叫者的userId
424
- * @property { string } c 呼叫者的displayName
425
- * @property { 'in' | 'out' } t 呼叫者的动作:退会/入会
426
- */
427
- export interface IOriginalReminder {
428
- e: string;
429
- a: string;
430
- c: string;
431
- t: 'in' | 'out';
432
- }
433
- /**
434
- * 对外出入会通知消息
435
- *
436
- * @property { string } displayName 参会者名称
437
- * @property { 'in' | 'out' } action 参会者动作
438
- * @property { string } userId 参会者userId
439
- */
440
- export interface IReminder {
441
- displayName: string;
442
- action: 'in' | 'out';
443
- userId?: string;
444
- }
445
- export interface IMediaSupportedConstraints {
446
- audio?: MediaTrackConstraints | false;
447
- video?: MediaTrackConstraints | false;
448
- }
449
- export interface ICandidate extends RTCIceCandidateInit {
450
- type?: string;
451
- }
452
- /**
453
- * 第三方登录用户信息
454
- *
455
- * @property { string } displayName 用户名称
456
- * @property { string } extId 企业id
457
- */
458
- export interface ILoginExtAccount {
459
- displayName: string;
460
- extId: string;
461
- extUserId?: string;
462
- }
463
- /**
464
- * 第三方登录sdk用户信息,由sdk server创建
465
- *
466
- * @property { string } userName sdk用户名
467
- * @property { string } password sdk密码
468
- * @property { string? } extId sdk企业Id
469
- */
470
- export interface ISdkUserInfo {
471
- userName: string;
472
- password: string;
473
- extId?: string;
474
- }
475
- export interface IServers {
476
- wssServer: string;
477
- httpServer: string;
478
- logServer: string;
479
- }
480
- export interface IHttpConfig {
481
- baseUrl: string;
482
- }
483
- /**
484
- * 用户在非登录时,配置登录用户信息
485
- *
486
- * 此信息是由业务层提供网关配置
487
- */
488
- export interface IConfig extends IToken {
489
- client_id: string;
490
- client_secret: string;
491
- }
492
- /**
493
- * 会议室配置信息
494
- *
495
- * @property { string } watermarkContent 共享时叠加水印内容
496
- */
497
- export interface IConfAuxProperties {
498
- watermarkContent: string;
499
- }
500
- /**
501
- * 会议号信息
502
- *
503
- * @property { string } callNumber 最终进入的真实会议号
504
- * @property { string } callUrl 呼叫号码真实url
505
- * @property { string } deviceId 号码id
506
- * @property { string } deviceType 号码类型
507
- * @property { string } displayName 云会议号名称
508
- * @property { string } number 呼叫的号码
509
- * @property { string } numberType 会议号类型
510
- * @property { IConfAuxProperties } confAuxProperties 会议配置
511
- * @property { string } avatar 头像
512
- */
513
- export interface IConferenceInfo {
514
- callNumber: string;
515
- callUrl?: string;
516
- deviceId?: string;
517
- deviceType?: string;
518
- displayName?: string;
519
- number?: string;
520
- numberType?: string;
521
- confAuxProperties?: IConfAuxProperties;
522
- avatar?: string;
523
- }
524
- /**
525
- * 呼叫参数
526
- *
527
- * @property { string } token 网关token
528
- * @property { string } confNumber 云会议号/终端号/手机号
529
- * @property { string? } password 入会密码,没有则为空
530
- * @property { string? } displayName 入会显示昵称
531
- */
532
- export interface IMackCall {
533
- token: string;
534
- confNumber: string;
535
- password?: string;
536
- displayName?: string;
537
- }
538
- /**
539
- * 呼叫的会议信息
540
- *
541
- * @extends IMackCall
542
- * @property { IConferenceInfo } meeting 会议号信息
543
- */
544
- export interface ICall extends IMackCall {
545
- meeting?: IConferenceInfo;
546
- }
547
- /**
548
- * 入会成功之后的会议信息
549
- *
550
- * @property { string } callerUri 呼叫者calluri
551
- * @property { number } callIndex 会议消息索引值
552
- * @property { string } automute 是否是自动mute
553
- * @property { string } meetingId 会议hash id
554
- * @property { string } vcNumber 最终的会议号
555
- * @property { "true" | "false" } inoutReminder 是否设置了出入会提醒
556
- * @property { string } commonJson 其他会议室配置
557
- * @property { string } remoteUri 云会议室URI
558
- */
559
- export interface IInvite {
560
- callerUri: string;
561
- callIndex: number;
562
- automute: string;
563
- meetingId: string;
564
- vcNumber?: string;
565
- inoutReminder?: 'true' | 'false';
566
- commonJson?: string;
567
- remoteUri?: string;
568
- }
569
- /**
570
- * 分组会议信息
571
- *
572
- * @property { boolean } groupLeader 是否设置本终端为管理员 true:设置, false:取消
573
- * @property { string } groupName 此名称显示至用户界面
574
- * @property { number } groupType 是否进入讨论组 1:进入,0:退出
575
- */
576
- export interface IGroupInfo {
577
- groupLeader: boolean;
578
- groupName: string;
579
- groupType: number;
580
- }
581
- /**
582
- * 会控回调信息
583
- *
584
- * @property { number } callIndex 会议消息索引值
585
- * @property { string } callerUri 呼叫者calluri
586
- * @property { string } chairmanUri 主会场calluri
587
- * @property { boolean } contentIsDisabled 是否禁用分享content
588
- * @property { boolean } disableMute 是否强制静音
589
- * @property { string } muteOperation 音频状态
590
- * @property { string } role 未知
591
- * @property { string } type 未知
592
- * @property { string } commonJson 会控修改名称等
593
- * @property { IMuteSpeaker } isMuteSpeaker 禁止收听
594
- * @property { boolean } recordIsDisabled 录制权限
595
- */
596
- export interface IMeetingControl {
597
- callIndex: number;
598
- callUri: string;
599
- chairmanUri: string;
600
- contentIsDisabled: boolean;
601
- disableMute: boolean;
602
- muteOperation: string;
603
- role: string;
604
- type: string;
605
- commonJson: string;
606
- isMuteSpeaker: IMuteSpeaker;
607
- recordIsDisabled: boolean;
608
- groupInfoList: IGroupInfo[];
609
- }
610
- /**
611
- * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
612
- *
613
- * @property { IDeviceType } deviceType 设备类型
614
- * @property { string } endpointId 设备id
615
- * @property { string } displayName 参会者名称
616
- * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
617
- * @property { number } participantId 参会者id
618
- * @property { boolean } audioTxMute 参会者麦克风状态,true:开启,false:关闭
619
- * @property { boolean } videoTxMute 参会者摄像头状态,true:开启,false:关闭
620
- * @property { boolean } audioRxMute ignore
621
- * @property { boolean } videoRxMute ignore
622
- * @property { number } videoMuteReason ignore
623
- * @property { boolean } isForceFullScreen 参会者是否是主画面
624
- * @property { boolean } isLastAdd ignore
625
- * @property { boolean } onHold 参会者是否是被呼叫等待状态
626
- * @property { boolean } isPolling ignore
627
- * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
628
- * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
629
- * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
630
- * @property { string } extUserId 三方userId
631
- * @property { boolean } isLocal 参会者是否是自己
632
- * @property { number } ExpectHeight 期望分辨率
633
- * @property { number } ExpectWidth 期望分辨率
634
- */
635
- export interface IRoster {
636
- deviceType: IDeviceType;
637
- endpointId: string;
638
- displayName: string;
639
- mediagroupid: number;
640
- participantId: number;
641
- audioTxMute: boolean;
642
- videoTxMute: boolean;
643
- audioRxMute: boolean;
644
- videoRxMute: boolean;
645
- videoMuteReason: number;
646
- isForceFullScreen: boolean;
647
- isLastAdd: boolean;
648
- onHold: boolean;
649
- isPolling: boolean;
650
- isContent: boolean;
651
- isActiveSpeaker?: boolean;
652
- id: string;
653
- extUserId: string;
654
- isLocal?: boolean;
655
- ExpectHeight?: number;
656
- ExpectWidth?: number;
657
- }
658
- /**
659
- * Layout Result布局结果中返回的基础数据
660
- *
661
- * @property { number } participantId 参会者id
662
- * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
663
- * @property { number } feccOri ignore
664
- * @property { string } remoteType 设备类型
665
- * @property { string } remoteName 参会者名称
666
- * @property { string } remoteID ignore
667
- * @property { string } videoTrackId 当前参会者画面Track轨道id,用于在 VideoTrackList 中匹配stream数据
668
- * @property { string } audioTrackId ignore
669
- * @property { boolean } isAudioMute 参会者麦克风状态,true:开启,false:关闭
670
- * @property { boolean } isVideoMute 参会者摄像头状态,true:开启,false:关闭
671
- * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
672
- * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
673
- * @property { boolean } isChairman 参会者是否是主画面
674
- * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
675
- * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
676
- * @property { number } MuteReason ignore
677
- * @property { string } calluri 参会者Url
678
- * @property { boolean } isLocal 参会者是否是自己
679
- */
680
- export interface ILayoutRoster {
681
- participantId: number;
682
- mediagroupid: number;
683
- feccOri: number;
684
- remoteType: string;
685
- remoteName: string;
686
- remoteID: string;
687
- videoTrackId: string;
688
- audioTrackId: string;
689
- isAudioMute: boolean;
690
- isVideoMute: boolean;
691
- isActiveSpeaker: boolean;
692
- isContent: boolean;
693
- isChairman: boolean;
694
- LayoutVideoState: number;
695
- MuteReason: number;
696
- calluri?: string;
697
- isLocal?: boolean;
698
- }
699
- /**
700
- * Conf Change消息
701
- *
702
- * @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量
703
- * @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量
704
- * @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为''
705
- * @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
706
- * @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
707
- */
708
- export interface IConfInfo {
709
- participantCount: number;
710
- totalEpCount: number;
711
- chairManUrl: string;
712
- contentUri: string;
713
- actSpkUri: string;
714
- }
715
- /**
716
- * 自动布局,分页数据
717
- *
718
- * @property { number } pageSize 每页显示多少人,最多可配置9画面
719
- * @property { number } currentPage 当前页码
720
- * @property { number } totalPage 总页数
721
- */
722
- export interface IPageInfo {
723
- pageSize: number;
724
- currentPage: number;
725
- totalPage: number;
726
- }
727
- /**
728
- * 语音激励消息
729
- *
730
- * @property { string } endpointId 语音激励者的callUrl信息,类似:"xxx@BRUCE"
731
- * @property { number } pid 语音激励者的用户id
732
- */
733
- export interface ISpeakerInfo {
734
- endpointId: string;
735
- pid: number;
736
- }
737
- /**
738
- * 布局对象
739
- *
740
- * @property { number[] } position 模版位置,业务层可以忽略
741
- * @property { IResolutionType } resolution 当前布局对象的分辨数据
742
- * @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
743
- * @property { any } rotate 当前参会者的旋转信息
744
- * @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
745
- * @property { { left: string; top: string; width: string; height: string } } positionStyle 当前参会者的位置样式
746
- * @property { { width: number; height: number } } positionInfo 忽略
747
- * @property { 0 | 100 | 200 } quality 质量
748
- * @property { boolean } deal 忽略
749
- * @property { number } zIndex 忽略
750
- */
751
- export interface ILayout {
752
- position?: number[];
753
- resolution?: IResolutionType;
754
- roster: IRoster;
755
- rotate?: any;
756
- state?: ILayoutState;
757
- positionStyle?: {
758
- left: string;
759
- top: string;
760
- width: string;
761
- height: string;
762
- };
763
- positionInfo?: {
764
- width: number;
765
- height: number;
766
- };
767
- quality?: 0 | 100 | 200;
768
- deal?: boolean;
769
- zIndex?: number;
770
- }
771
- /**
772
- * Local布局对象
773
- *
774
- * @extends ILayout
775
- * @property { boolean } isLocal 是否是当前设备
776
- */
777
- export interface ILocalLayout extends ILayout {
778
- isLocal: true;
779
- }
780
- /**
781
- * 自动布局模式下,Layout Container的容器信息
782
- * 计算得到的宽高能给铺满当前参会者的布局
783
- *
784
- * @property { number } width 减掉偏移左右值的Container容器宽
785
- * @property { number } height 减掉偏移上下值的Container容器高
786
- * @property { number } rateWidth 基于width配合 Layout Rate 计算得到的Layout Container容器宽
787
- * @property { number } rateHeight 基于height配合 Layout Rate 计算得到的Layout Container容器高
788
- */
789
- export interface IScreenInfo {
790
- width: number;
791
- height: number;
792
- rateWidth: number;
793
- rateHeight: number;
794
- }
795
- /**
796
- * 画面屏幕旋转信息
797
- *
798
- * @property { number } height 高度
799
- * @property { number } width 宽度
800
- * @property { number } participantId 用户id
801
- * @property { number } rotation 旋转角度
802
- * @value 0 | 1 不需要旋转
803
- * @value 2 顺时针旋转180度
804
- * @value 3 顺时针旋转270度
805
- */
806
- export interface IRotationInfoItem {
807
- height: number;
808
- width: number;
809
- participantId: number;
810
- rotation: number;
811
- }
812
- /**
813
- * 缓存content+people的屏幕旋转信息数据
814
- *
815
- * @property { number } mediagroupid 画面类型:people/content
816
- * @property { string } id 用户id
817
- */
818
- export interface IRotationInfoTotalItem extends IRotationInfoItem {
819
- mediagroupid: number;
820
- id: string;
821
- }
822
- /**
823
- * 缓存媒体下发的屏幕旋转信息
824
- *
825
- * @property { IRotationInfoItem[] } content content共享内容的旋转信息
826
- * @property { IRotationInfoItem[] } people people的旋转信息
827
- * @property { IRotationInfoTotalItem[] } total content+people的旋转信息
828
- */
829
- export interface IRotationInfo {
830
- content: IRotationInfoItem[];
831
- people: IRotationInfoItem[];
832
- total: IRotationInfoTotalItem[];
833
- }
834
- /**
835
- * 自定义布局请流对象数据
836
- *
837
- * @property { number } pid 用户id,从roster中获取
838
- * @property { IResolutionType } resolution 当前请求画面分辨率
839
- * @value 0 90P
840
- * @value 1 180P
841
- * @value 2 360P
842
- * @value 3 720P
843
- * @value 4 1080P
844
- * @property { IQualityType } quality 画面质量
845
- * @value 0 100
846
- * @value 1 200
847
- * @value 3 300
848
- * @property { number } mediagroupid 当前流的类型:people/content
849
- * @value 0 people
850
- * @value 1 content
851
- */
852
- export interface ICustomLayout {
853
- pid: number;
854
- resolution: IResolutionType;
855
- quality: IQualityType;
856
- mediagroupid: number;
857
- }
858
- /**
859
- * 封装MediaStream
860
- */
861
- export interface ICustomMediaStream {
862
- streams: MediaStream[];
863
- track: MediaStreamTrack;
864
- }
865
- /**
866
- * custom stream track封装对象
867
- *
868
- * @property { string } status Track的类型,local或者remote
869
- * @property { RTCTrackEvent } data MediaStreamTrack数据
870
- * @property { IRest } rest 从data中获取streamId、trackId和track数据,方便后续使用
871
- * @property { string } rest.streamId MediaStream id
872
- * @property { string } rest.trackId MediaStreamTrack id
873
- * @property { MediaStreamTrack } rest.track MediaStreamTrack
874
- */
875
- export interface ICustomStreamTrack {
876
- status: string;
877
- data: RTCTrackEvent | ICustomMediaStream;
878
- rest: {
879
- streamId: string;
880
- trackId: string;
881
- track: MediaStreamTrack;
882
- };
883
- }
884
- /**
885
- * 字幕消息
886
- *
887
- * @property { number } callIndex 消息序列号
888
- * @property { string } content 字幕规则
889
- * @property { string } type 字幕类型
890
- */
891
- export interface ISubTitle {
892
- callIndex: number;
893
- content: string;
894
- type: string;
895
- }
896
- /**
897
- * 字幕规则
898
- *
899
- * @property { string } content 字幕内容
900
- * @property { string? } i18nKey 字幕内容key
901
- * @property { string? } fontFamily 字体
902
- * @property { string? } fontRGB 字体色
903
- * @property { "1" | "0" } scroll 是否滚动
904
- * @property { string? } action 动作
905
- * @property { string? } location 位置'top' | 'middle' | 'bottom'
906
- * @property { string? } fontSize 位置'small' | 'middle' | 'big'
907
- * @property { string? } backgroundAlpha 背景色
908
- * @property { string? } scrollSpeed 滚动速度
909
- * @property { string? } backgroundRGB 背景色
910
- */
911
- export interface ISubTitleContent {
912
- content: string;
913
- i18nKey?: string;
914
- fontFamily?: string;
915
- fontRGB?: string;
916
- scroll?: '1' | '0';
917
- action?: 'push' | string;
918
- location?: 'top' | 'middle' | 'bottom';
919
- fontSize?: 'small' | 'middle' | 'big';
920
- backgroundAlpha?: string;
921
- scrollSpeed?: string;
922
- backgroundRGB?: string;
923
- }
924
- export declare type IAudioRenders = {
925
- [key: string]: {
926
- ele: any;
927
- };
928
- };
929
- export declare type IVideoRenders = {
930
- [key: string]: VideoManager & {
931
- match?: boolean;
932
- };
933
- };
934
- /**
935
- * 同传字幕: 本地支持的语言
936
- */
937
- export declare type TLocalLanguage = typeof SupportLocalLanguages[number];
938
- export interface IOutputCustomLayout {
939
- [pid: string]: {
940
- resolution: number;
941
- quality: number;
942
- };
943
- }
944
- /**
945
- * 巡课云会议室
946
- *
947
- * @property { string } callUrl 云会议室callUri
948
- * @property { number } conferenceNumberType 云会议室类型
949
- * @property { string } deviceId
950
- * @property { string } displayName 云会议室名称
951
- * @property { string } number 云会议室号
952
- */
953
- export interface IConference {
954
- callUrl: string;
955
- conferenceNumberType: number;
956
- deviceId: string;
957
- displayName: string;
958
- number: string;
959
- }
960
- /**
961
- * 参会者信息
962
- *
963
- * @property { 0 | 1 } bulkRosterType 全量roster类型,0表示全量数据,1表示增量数据
964
- * @property { IRoster[] } addRosterInfo 新增的roster信息 当bulkRosterType是0的时候,此参数表示全量数据
965
- * @property { IRoster[] } changeRosterInfo 变化的roster信息
966
- * @property { { participantId: number }[] } deleteRosterInfo 被删除的roster信息
967
- */
968
- export interface IBulkRoster {
969
- bulkRosterType: 0 | 1;
970
- addRosterInfo: IRoster[];
971
- changeRosterInfo: IRoster[];
972
- deleteRosterInfo: {
973
- participantId: number;
974
- }[];
975
- }
976
- /**
977
- * conf 会议属性
978
- *
979
- * @property { 'contentOnhold' } type 类型
980
- * @property { string } audioTrackId content audio track id
981
- * @property { string } contentUrl content uri
982
- */
983
- export interface IConfProperty {
984
- type: 'contentOnhold';
985
- audioTrackId?: string;
986
- contentUrl?: string;
987
- }
988
- /**
989
- * track 信息
990
- *
991
- * @property { string } streamId stream id
992
- * @property { MediaStreamTrack } track
993
- * @property { string } trackId track id
994
- */
995
- export interface ITrackInfo {
996
- streamId: string;
997
- track: MediaStreamTrack;
998
- trackId: string;
999
- }
1000
- /**
1001
- * ws close reason
1002
- */
1003
- export declare type TErrorReason<P = {}> = P & {
1004
- code?: number;
1005
- };
1006
- /**
1007
- * 是否静音
1008
- *
1009
- * @enum
1010
- *
1011
- * @property {number} AutoMute.SMART 智能静音
1012
- * @property {number} AutoMute.ALL 全部静音
1013
- * @property {number} AutoMute.NOT 不静音
1014
- * @property {number} AutoMute.FORCE 强制静音
1015
- */
1016
- export declare enum AutoMute {
1017
- SMART = 0,
1018
- ALL = 1,
1019
- NOT = 2,
1020
- FORCE = 3
1021
- }
1022
- export interface IGetConferenceParams {
1023
- autoMute: AutoMute;
1024
- }
1025
- /**
1026
- * 录制结果上报
1027
- *
1028
- * @property { string } reason stream id
1029
- * @property { string } state
1030
- * @property { boolean } isRecorded
1031
- * @property { string } controlUri
1032
- */
1033
- export interface IRecordingStateChanged {
1034
- reason: string;
1035
- state: string;
1036
- isRecorded: boolean;
1037
- controlUri: string;
1038
- reasonText: string;
1039
- }
1040
- /**
1041
- * 录制状态上报
1042
- *
1043
- * @property { boolean } isStart stream id
1044
- * @property { string } uri
1045
- * @property { string } callUri
1046
- * @property { string } callerUri
1047
- * @property { string } status
1048
- * @property { boolean } isLocal 是否是local开启的录制
1049
- */
1050
- export interface IRecordStatusNotification {
1051
- isStart: Boolean;
1052
- uri: string;
1053
- callUri: string;
1054
- callerUri: string;
1055
- status: string;
1056
- isLocal: boolean;
1057
- }
1058
- /**
1059
- * 录制权限
1060
- *
1061
- * @property { boolean } authorize 权限
1062
- * @property { string } recordingUrl 云会议室URI
1063
- * @property { string? } developerMessage 云会议室的所属用户名称
1064
- * @property { number? } errorCode 错误码
1065
- * @property { string? } userMessage 错误信息
1066
- */
1067
- export interface IRecordPermission {
1068
- authorize: boolean;
1069
- recordingUrl: string;
1070
- developerMessage?: string;
1071
- errorCode?: number;
1072
- userMessage?: string;
1073
- }
1074
- /**
1075
- * 同传字幕内容
1076
- *
1077
- * @property { number } pid 当前说话的终端
1078
- * @property { string } src 原文
1079
- * @property { string } target 译文
1080
- * @property { number } seTime 发送时间
1081
- * @property { number } startTime 开始时间
1082
- * @property { number } endTime 结束时间
1083
- * @property { boolean } isEnd 一句话是否结束
1084
- * @property { boolean } isActive 活跃标志,收三路,同时只有一路active
1085
- * @property { string } url 终端calluri
1086
- * @property { string } dn 显示名称
1087
- * @property { string } meetingId 会议号
1088
- * @property { string } srcLang 原语言,zh表示中文,en表示英文
1089
- * @property { string } targetLang 译文语言,zh表示中文,en表示英文
1090
- */
1091
- export interface ITranslationContent {
1092
- pid: number;
1093
- src: string;
1094
- target: string;
1095
- seTime: number;
1096
- startTime: number;
1097
- endTime: number;
1098
- isEnd: boolean;
1099
- isActive: boolean;
1100
- url: string;
1101
- dn: string;
1102
- meetingId: string;
1103
- srcLang: string;
1104
- targetLang: string;
1105
- }
1106
- export {};
1
+ import { IToken } from './base';
2
+ import VideoManager from '../main/videoManager';
3
+ import { IInternels } from './stream';
4
+ import { SupportLocalLanguages } from '../enum';
5
+ /**
6
+ * 向Client推送流类型
7
+ *
8
+ * @value All 所有音视频数据
9
+ * @value CONTENT 分享内容视频数据
10
+ */
11
+ export declare type IPushType = 'ALL' | 'CONTENT';
12
+ /**
13
+ * 画面布局模式
14
+ *
15
+ * @value AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
16
+ * @value CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
17
+ */
18
+ export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
19
+ /**
20
+ * 分享Content内容的状态
21
+ *
22
+ * @value ENDED 已结束
23
+ * @value STARTING 分享中
24
+ * @value PENDING 等待
25
+ */
26
+ export declare type IShareContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
27
+ /**
28
+ * VIDEO事件回调状态状态
29
+ *
30
+ * @value LOAD_START 开始加载视频流
31
+ * @value CANPLAY 可以播放
32
+ * @value ERROR 遇到错误
33
+ */
34
+ export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
35
+ /**
36
+ * 视频画面状态
37
+ *
38
+ * @value CANPLAY 正常播放
39
+ * @value ENDED 已结束
40
+ * @value REQUEST 视频请求中
41
+ */
42
+ export declare type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
43
+ /**
44
+ * Layout布局方式
45
+ *
46
+ * @value SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
47
+ * @value GALLERY 另一种是画廊模式,即 宫格布局
48
+ */
49
+ export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
50
+ /**
51
+ * 主画面/Content布局模式
52
+ *
53
+ * @value MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
54
+ * @value MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpeaker是大窗口
55
+ * @value TWO_PIC_PIP 画中画模式(picture in picture)
56
+ * @value CONTENT_ONLY 只显示Content
57
+ * @value TWO_PIC_SYMMETRIC 对称显示content和speaker(side by side)
58
+ */
59
+ export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
60
+ /**
61
+ * 布局模式
62
+ */
63
+ export declare type IMode = ITemplateMode | IContentTemplateMode;
64
+ /**
65
+ * 客户端状态
66
+ *
67
+ * @value NONE 正常
68
+ * @value PUBLISH_ERROR 推流异常
69
+ * @value WS_CLOSE wss链接关闭
70
+ * @value WS_ERROR wss链接错误
71
+ */
72
+ export declare type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
73
+ /**
74
+ * 视频状态
75
+ *
76
+ * @value muteVideo 关闭摄像头
77
+ * @value unmuteVideo:开启摄像头
78
+ */
79
+ export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
80
+ /**
81
+ * 音频状态
82
+ *
83
+ * @value muteAudio 关闭麦克风
84
+ * @value unmuteAudio 开启麦克风
85
+ */
86
+ export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
87
+ /**
88
+ * 视频/音频状态
89
+ *
90
+ * @value muteAudio 关闭麦克风
91
+ * @value unmuteAudio 开启麦克风
92
+ * @value muteVideo 关闭摄像头
93
+ * @value unmuteVideo:开启摄像头
94
+ */
95
+ export declare type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
96
+ /**
97
+ * 画面内容类型
98
+ *
99
+ * @value 0 People画面
100
+ * @value 1 Content共享内容
101
+ */
102
+ export declare type IMediagroupid = 0 | 1;
103
+ export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
104
+ /**
105
+ * 布局画面状态
106
+ *
107
+ * @value MUTE 视频暂停
108
+ * @value REQUEST 视频请求中
109
+ * @value NORMAL 视频正常
110
+ * @value INVALID 设备不可用
111
+ * @value AUDIO_TEL 电话入会
112
+ * @value AUDIO_ONLY 仅音频入会模式
113
+ * @value AUDIO_CONTENT 仅音频共享
114
+ */
115
+ export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
116
+ /**
117
+ * 分享content类型
118
+ *
119
+ * @value NONE 无
120
+ * @value AUDIO 只分享audio
121
+ * @value VIDEO 只分享video
122
+ * @value BOTH 分享video + audio
123
+ */
124
+ export declare type IContentMode = 'NONE' | 'AUDIO' | 'VIDEO' | 'BOTH';
125
+ /**
126
+ * 埋点数据上报类型
127
+ *
128
+ * @value click 点击
129
+ * @value msgCallback 消息回调
130
+ * @value server server消息
131
+ * @value trigger 触发事件类型
132
+ */
133
+ export declare type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
134
+ /**
135
+ * 埋点数据上报
136
+ */
137
+ export declare type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
138
+ /**
139
+ * 事件名称
140
+ */
141
+ export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
142
+ /**
143
+ * 轮询多画面状态
144
+ *
145
+ * @value 0 开始
146
+ * @value 1 停止
147
+ * @value 2 暂停
148
+ * @value 3 恢复
149
+ */
150
+ export declare type TCommand = 0 | 1 | 2 | 3;
151
+ /**
152
+ * 设备类型
153
+ */
154
+ declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
155
+ /**
156
+ * 请求画面分辨率
157
+ *
158
+ * @value 0 90P
159
+ * @value 1 180P
160
+ * @value 2 360P
161
+ * @value 3 720P
162
+ * @value 4 1080P
163
+ */
164
+ export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
165
+ /**
166
+ * 请求画面质量
167
+ *
168
+ * @value 0 100
169
+ * @value 1 200
170
+ * @value 3 300
171
+ */
172
+ export declare type IQualityType = 0 | 1 | 2;
173
+ /**
174
+ * 是否禁止收听
175
+ *
176
+ * @value 'keep' 保持上次的状态
177
+ * @value 'on' 禁止收听
178
+ * @value 'off' 取消禁止收听
179
+ */
180
+ export declare type IMuteSpeaker = 'keep' | 'on' | 'off';
181
+ /**
182
+ * 录制状态
183
+ *
184
+ * @value RECORD_STATE_IDLE 停止成功
185
+ * @value RECORD_STATE_STARTING 开启录制
186
+ * @value RECORD_STATE_STARTED 开启成功
187
+ * @value RECORD_STATE_STOPING 停止录制
188
+ */
189
+ export declare enum RecordingState {
190
+ RECORD_STATE_IDLE = "RECORD_STATE_IDLE",
191
+ RECORD_STATE_STARTING = "RECORD_STATE_STARTING",
192
+ RECORD_STATE_STARTED = "RECORD_STATE_STARTED",
193
+ RECORD_STATE_STOPING = "RECORD_STATE_STOPING"
194
+ }
195
+ /**
196
+ * 录制状态
197
+ *
198
+ * @param NONE 未开启录制
199
+ * @param LOCAL_START 本地开启录制
200
+ * @param REMOTE_STAR 远端开启录制
201
+ * @param REMOTE_PAUSED 远端录制暂停中
202
+ */
203
+ export declare enum RecordStatus {
204
+ NONE = 0,
205
+ LOCAL_START = 1,
206
+ REMOTE_STAR = 2,
207
+ REMOTE_PAUSED = 3
208
+ }
209
+ /**
210
+ * client配置参数
211
+ *
212
+ * @property { string } clientId 必填 | "" | 网关校验id(clientId),需要从对接人处获取
213
+ * @property { string } wssServer 非必填 websocket服务地址,默认不需要配置
214
+ * @property { string } httpServer 非必填 resetApi服务地址,默认不需要配置
215
+ * @property { string } logServer 非必填 logServer服务地址,默认不需要配置
216
+ * @property { IClientLayout } layout 非必填 | AUTO | 布局模式,可选:AUTO | CUSTOM
217
+ * @property { boolean } debug 非必填 | false | 是否接收所有参会者音视频状态数据,默认不发送
218
+ * @property { boolean } muteAudio 非必填 | false | 是否开启/关闭麦克风入会,默认是false,开启麦克风
219
+ * @property { boolean } muteVideo 非必填 | false | 是否开启/关闭摄像头入会,默认是false,开启摄像头
220
+ * @property { { offset?: number[]; elementId?: string } } container 非必填 | {} | 配置layout container容器节点和偏移量
221
+ * @property { number[] } container.offset 非必填 | [] | 配置[上 下 左 右]的偏移量,自动布局适用
222
+ * @property { string } container.elementId 非必填 | "" | 配置Layout需要包裹在elementId元素里面显示,并使用此元素的信息计算 Layout 的 size和 position
223
+ * @property { boolean } localHide 非必填 | false | 是否在页面上隐藏Local画面,默认不隐藏
224
+ * @property { boolean } localMirror 非必填 | true | 是否需要镜像Local画面,默认镜像Local
225
+ * @property { ITemplateMode } templateMode 非必填 | 布局模式,默认:SPEAKER,1大N小 画面布局模式,可选:SPEAKER | GALLERY
226
+ * @property { string } __hideId 是否是隐身入会模式,hide代表隐身入会,为空代表正常模式
227
+ * @property { string } __monitorMode 是否是巡课模式,默认是'',MONITOR代表巡课模式
228
+ * @property { boolean } isThird 埋点
229
+ * @property { boolean } isSupportHybridCloud 是否是混合云,默认公有云。 如果有探测到内网地址,则此值为true,将不进行鉴权。
230
+ * @property { boolean } isVerifyMeetingId 是否校验会议号,默认校验
231
+ *
232
+ */
233
+ export interface IClientConfig {
234
+ clientId: string;
235
+ clientSecret?: string;
236
+ wssServer?: string;
237
+ httpServer?: string;
238
+ logServer?: string;
239
+ layout?: IClientLayout;
240
+ debug?: boolean;
241
+ muteAudio?: boolean;
242
+ muteVideo?: boolean;
243
+ container?: {
244
+ offset?: number[];
245
+ elementId?: string;
246
+ };
247
+ localHide?: boolean;
248
+ localMirror?: boolean;
249
+ templateMode?: ITemplateMode;
250
+ __hideId?: number | string;
251
+ __monitorMode?: string;
252
+ isThird?: boolean;
253
+ isSupportHybridCloud?: boolean;
254
+ isVerifyMeetingId?: boolean;
255
+ }
256
+ export interface ILayoutParams {
257
+ rosters: IRoster[];
258
+ speakerInfo: ISpeakerInfo;
259
+ layout: ILayout[];
260
+ templateMode: ITemplateMode;
261
+ invite: IInvite;
262
+ contentSenderPid: number;
263
+ localHide: boolean;
264
+ }
265
+ export declare type ITemplateObj = {
266
+ position: number[];
267
+ resolution: IResolutionType;
268
+ zIndex?: number;
269
+ isContent?: boolean;
270
+ };
271
+ export interface ITypeTemplate {
272
+ [id: string]: ITemplateObj[];
273
+ }
274
+ export interface ITemplateInfo {
275
+ length: number;
276
+ temp: {
277
+ [index: string]: ITemplateObj[];
278
+ };
279
+ rate: {
280
+ [index: number]: number;
281
+ };
282
+ }
283
+ export interface ITemplate {
284
+ [type: string]: ITemplateInfo;
285
+ }
286
+ /**
287
+ * @enum 默认常量列表
288
+ */
289
+ export interface IDefault {
290
+ CLIENT_TYPE: string;
291
+ INIT_INTERNELS: IInternels;
292
+ RESOLUTION: number;
293
+ ROSTER: IRoster;
294
+ SELF_MOCK_PID: number;
295
+ HOR_CONTAINER_RATIO: number;
296
+ VER_CONTAINER_RATIO: number;
297
+ RATIO_MAP: {
298
+ [id: number]: number;
299
+ };
300
+ MAP_RESOLUTION_INDEX: {
301
+ [resolution: string]: number;
302
+ };
303
+ RESOLUTION_MAP: {
304
+ [index: number]: number;
305
+ };
306
+ VIDE_BANDWIDTH_BIT: 1000;
307
+ LOGIN_INFO: {
308
+ callUri: string;
309
+ securityKey: string;
310
+ access_token: string;
311
+ refresh_token: string;
312
+ id: 0;
313
+ displayName: string;
314
+ };
315
+ LAYOUT: ILayout;
316
+ MAP_RESOLUTION_STRING: {
317
+ [resolution: string]: {
318
+ width: number;
319
+ height: number;
320
+ };
321
+ };
322
+ CONF_INFO: IConfInfo;
323
+ }
324
+ /**
325
+ * SDK登录结果
326
+ *
327
+ * @property { string? } callUri 设备id
328
+ * @property { string } securityKey 安全码
329
+ * @property { string } access_token token
330
+ * @property { string } refresh_token 刷新token
331
+ * @property { number } id 忽略
332
+ * @property { string } displayName 登录用户名
333
+ * @property { string } cellPhone 忽略
334
+ */
335
+ export interface ILoginInfo {
336
+ callUri?: string;
337
+ securityKey: string;
338
+ access_token: string;
339
+ refresh_token?: string;
340
+ id: number;
341
+ displayName?: string;
342
+ cellPhone?: string;
343
+ extUserId?: string;
344
+ }
345
+ export interface ICodeList {
346
+ version: string;
347
+ zh_CN: {
348
+ [key: string]: string;
349
+ };
350
+ zh_TW: {
351
+ [key: string]: string;
352
+ };
353
+ en_US: {
354
+ [key: string]: string;
355
+ };
356
+ }
357
+ export interface IMUTE_MAP {
358
+ [type: string]: {
359
+ type: IVideoAudioMessageType;
360
+ status: boolean;
361
+ };
362
+ }
363
+ /**
364
+ * 配置画面数据
365
+ *
366
+ * @property { string } calluri 设备url
367
+ * @property { IResolutionType } resolution 分辨率
368
+ * @property { IQualityType } quality 质量
369
+ * @property { number } mediagroupid 0:people画面,1:content共享画面
370
+ * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
371
+ * @property { string } callUri NewLayout版本无此参数
372
+ */
373
+ export declare type IReqInfo = {
374
+ calluri: string;
375
+ resolution: IResolutionType;
376
+ quality: IQualityType;
377
+ mediagroupid?: number;
378
+ isContent?: boolean;
379
+ callUri?: string;
380
+ };
381
+ export interface IMeetingInfo {
382
+ meetingId: string;
383
+ callUri: string;
384
+ }
385
+ /**
386
+ * 调度失败的uri列表项目
387
+ *
388
+ * @property { string } uri 设备calluri
389
+ * @property { string } status 状态
390
+ * @property { string } message 消息
391
+ */
392
+ export interface IFailUriItem {
393
+ uri: string;
394
+ status: string;
395
+ message: string;
396
+ }
397
+ /**
398
+ * 调度画面结果数据
399
+ */
400
+ export interface IMonitorReportMessage {
401
+ callIndex: number;
402
+ callerUri: string;
403
+ code: string;
404
+ monitorInfo: {
405
+ uriList: IFailUriItem[];
406
+ failUriList: IFailUriItem[];
407
+ };
408
+ type: 'MONITOR_STATE_REPORT';
409
+ }
410
+ /**
411
+ * 调度成功和失败的设备列表数据
412
+ */
413
+ export interface IMonitorReport {
414
+ uriList: IFailUriItem[];
415
+ failUriList: IFailUriItem[];
416
+ }
417
+ /**
418
+ * 出入会通知
419
+ *
420
+ * @property { string } e 呼叫者的callerUri
421
+ * @property { string } a 呼叫者的userId
422
+ * @property { string } c 呼叫者的displayName
423
+ * @property { 'in' | 'out' } t 呼叫者的动作:退会/入会
424
+ */
425
+ export interface IOriginalReminder {
426
+ e: string;
427
+ a: string;
428
+ c: string;
429
+ t: 'in' | 'out';
430
+ }
431
+ /**
432
+ * 对外出入会通知消息
433
+ *
434
+ * @property { string } displayName 参会者名称
435
+ * @property { 'in' | 'out' } action 参会者动作
436
+ * @property { string } userId 参会者userId
437
+ */
438
+ export interface IReminder {
439
+ displayName: string;
440
+ action: 'in' | 'out';
441
+ userId?: string;
442
+ }
443
+ export interface IMediaSupportedConstraints {
444
+ audio?: MediaTrackConstraints | false;
445
+ video?: MediaTrackConstraints | false;
446
+ }
447
+ export interface ICandidate extends RTCIceCandidateInit {
448
+ type?: string;
449
+ }
450
+ /**
451
+ * 第三方登录用户信息
452
+ *
453
+ * @property { string } displayName 用户名称
454
+ * @property { string } extId 企业id
455
+ */
456
+ export interface ILoginExtAccount {
457
+ displayName: string;
458
+ extId: string;
459
+ extUserId?: string;
460
+ }
461
+ /**
462
+ * 第三方登录sdk用户信息,由sdk server创建
463
+ *
464
+ * @property { string } userName sdk用户名
465
+ * @property { string } password sdk密码
466
+ * @property { string? } extId sdk企业Id
467
+ */
468
+ export interface ISdkUserInfo {
469
+ userName: string;
470
+ password: string;
471
+ extId?: string;
472
+ }
473
+ export interface IServers {
474
+ wssServer: string;
475
+ httpServer: string;
476
+ logServer: string;
477
+ }
478
+ export interface IHttpConfig {
479
+ baseUrl: string;
480
+ }
481
+ /**
482
+ * 用户在非登录时,配置登录用户信息
483
+ *
484
+ * 此信息是由业务层提供网关配置
485
+ */
486
+ export interface IConfig extends IToken {
487
+ client_id: string;
488
+ client_secret: string;
489
+ }
490
+ /**
491
+ * 会议室配置信息
492
+ *
493
+ * @property { string } watermarkContent 共享时叠加水印内容
494
+ */
495
+ export interface IConfAuxProperties {
496
+ watermarkContent: string;
497
+ }
498
+ /**
499
+ * 会议号信息
500
+ *
501
+ * @property { string } callNumber 最终进入的真实会议号
502
+ * @property { string } callUrl 呼叫号码真实url
503
+ * @property { string } deviceId 号码id
504
+ * @property { string } deviceType 号码类型
505
+ * @property { string } displayName 云会议号名称
506
+ * @property { string } number 呼叫的号码
507
+ * @property { string } numberType 会议号类型
508
+ * @property { IConfAuxProperties } confAuxProperties 会议配置
509
+ * @property { string } avatar 头像
510
+ */
511
+ export interface IConferenceInfo {
512
+ callNumber: string;
513
+ callUrl?: string;
514
+ deviceId?: string;
515
+ deviceType?: string;
516
+ displayName?: string;
517
+ number?: string;
518
+ numberType?: string;
519
+ confAuxProperties?: IConfAuxProperties;
520
+ avatar?: string;
521
+ }
522
+ /**
523
+ * 呼叫参数
524
+ *
525
+ * @property { string } token 网关token
526
+ * @property { string } confNumber 云会议号/终端号/手机号
527
+ * @property { string? } password 入会密码,没有则为空
528
+ * @property { string? } displayName 入会显示昵称
529
+ */
530
+ export interface IMackCall {
531
+ token: string;
532
+ confNumber: string;
533
+ password?: string;
534
+ displayName?: string;
535
+ }
536
+ /**
537
+ * 呼叫的会议信息
538
+ *
539
+ * @extends IMackCall
540
+ * @property { IConferenceInfo } meeting 会议号信息
541
+ */
542
+ export interface ICall extends IMackCall {
543
+ meeting?: IConferenceInfo;
544
+ }
545
+ /**
546
+ * 入会成功之后的会议信息
547
+ *
548
+ * @property { string } callerUri 呼叫者calluri
549
+ * @property { number } callIndex 会议消息索引值
550
+ * @property { string } automute 是否是自动mute
551
+ * @property { string } meetingId 会议hash id
552
+ * @property { string } vcNumber 最终的会议号
553
+ * @property { "true" | "false" } inoutReminder 是否设置了出入会提醒
554
+ * @property { string } commonJson 其他会议室配置
555
+ * @property { string } remoteUri 云会议室URI
556
+ */
557
+ export interface IInvite {
558
+ callerUri: string;
559
+ callIndex: number;
560
+ automute: string;
561
+ meetingId: string;
562
+ vcNumber?: string;
563
+ inoutReminder?: 'true' | 'false';
564
+ commonJson?: string;
565
+ remoteUri?: string;
566
+ }
567
+ /**
568
+ * 分组会议信息
569
+ *
570
+ * @property { boolean } groupLeader 是否设置本终端为管理员 true:设置, false:取消
571
+ * @property { string } groupName 此名称显示至用户界面
572
+ * @property { number } groupType 是否进入讨论组 1:进入,0:退出
573
+ */
574
+ export interface IGroupInfo {
575
+ groupLeader: boolean;
576
+ groupName: string;
577
+ groupType: number;
578
+ }
579
+ /**
580
+ * 会控回调信息
581
+ *
582
+ * @property { number } callIndex 会议消息索引值
583
+ * @property { string } callerUri 呼叫者calluri
584
+ * @property { string } chairmanUri 主会场calluri
585
+ * @property { boolean } contentIsDisabled 是否禁用分享content
586
+ * @property { boolean } disableMute 是否强制静音
587
+ * @property { string } muteOperation 音频状态
588
+ * @property { string } role 未知
589
+ * @property { string } type 未知
590
+ * @property { string } commonJson 会控修改名称等
591
+ * @property { IMuteSpeaker } isMuteSpeaker 禁止收听
592
+ * @property { boolean } recordIsDisabled 录制权限
593
+ */
594
+ export interface IMeetingControl {
595
+ callIndex: number;
596
+ callUri: string;
597
+ chairmanUri: string;
598
+ contentIsDisabled: boolean;
599
+ disableMute: boolean;
600
+ muteOperation: string;
601
+ role: string;
602
+ type: string;
603
+ commonJson: string;
604
+ isMuteSpeaker: IMuteSpeaker;
605
+ recordIsDisabled: boolean;
606
+ groupInfoList: IGroupInfo[];
607
+ }
608
+ /**
609
+ * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
610
+ *
611
+ * @property { IDeviceType } deviceType 设备类型
612
+ * @property { string } endpointId 设备id
613
+ * @property { string } displayName 参会者名称
614
+ * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
615
+ * @property { number } participantId 参会者id
616
+ * @property { boolean } audioTxMute 参会者麦克风状态,true:开启,false:关闭
617
+ * @property { boolean } videoTxMute 参会者摄像头状态,true:开启,false:关闭
618
+ * @property { boolean } audioRxMute ignore
619
+ * @property { boolean } videoRxMute ignore
620
+ * @property { number } videoMuteReason ignore
621
+ * @property { boolean } isForceFullScreen 参会者是否是主画面
622
+ * @property { boolean } isLastAdd ignore
623
+ * @property { boolean } onHold 参会者是否是被呼叫等待状态
624
+ * @property { boolean } isPolling ignore
625
+ * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
626
+ * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
627
+ * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
628
+ * @property { string } extUserId 三方userId
629
+ * @property { boolean } isLocal 参会者是否是自己
630
+ * @property { number } ExpectHeight 期望分辨率
631
+ * @property { number } ExpectWidth 期望分辨率
632
+ */
633
+ export interface IRoster {
634
+ deviceType: IDeviceType;
635
+ endpointId: string;
636
+ displayName: string;
637
+ mediagroupid: number;
638
+ participantId: number;
639
+ audioTxMute: boolean;
640
+ videoTxMute: boolean;
641
+ audioRxMute: boolean;
642
+ videoRxMute: boolean;
643
+ videoMuteReason: number;
644
+ isForceFullScreen: boolean;
645
+ isLastAdd: boolean;
646
+ onHold: boolean;
647
+ isPolling: boolean;
648
+ isContent: boolean;
649
+ isActiveSpeaker?: boolean;
650
+ id: string;
651
+ extUserId: string;
652
+ isLocal?: boolean;
653
+ ExpectHeight?: number;
654
+ ExpectWidth?: number;
655
+ }
656
+ /**
657
+ * Layout Result布局结果中返回的基础数据
658
+ *
659
+ * @property { number } participantId 参会者id
660
+ * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
661
+ * @property { number } feccOri ignore
662
+ * @property { string } remoteType 设备类型
663
+ * @property { string } remoteName 参会者名称
664
+ * @property { string } remoteID ignore
665
+ * @property { string } videoTrackId 当前参会者画面Track轨道id,用于在 VideoTrackList 中匹配stream数据
666
+ * @property { string } audioTrackId ignore
667
+ * @property { boolean } isAudioMute 参会者麦克风状态,true:开启,false:关闭
668
+ * @property { boolean } isVideoMute 参会者摄像头状态,true:开启,false:关闭
669
+ * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
670
+ * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
671
+ * @property { boolean } isChairman 参会者是否是主画面
672
+ * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
673
+ * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
674
+ * @property { number } MuteReason ignore
675
+ * @property { string } calluri 参会者Url
676
+ * @property { boolean } isLocal 参会者是否是自己
677
+ */
678
+ export interface ILayoutRoster {
679
+ participantId: number;
680
+ mediagroupid: number;
681
+ feccOri: number;
682
+ remoteType: string;
683
+ remoteName: string;
684
+ remoteID: string;
685
+ videoTrackId: string;
686
+ audioTrackId: string;
687
+ isAudioMute: boolean;
688
+ isVideoMute: boolean;
689
+ isActiveSpeaker: boolean;
690
+ isContent: boolean;
691
+ isChairman: boolean;
692
+ LayoutVideoState: number;
693
+ MuteReason: number;
694
+ calluri?: string;
695
+ isLocal?: boolean;
696
+ }
697
+ /**
698
+ * Conf Change消息
699
+ *
700
+ * @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量
701
+ * @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量
702
+ * @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为''
703
+ * @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
704
+ * @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
705
+ */
706
+ export interface IConfInfo {
707
+ participantCount: number;
708
+ totalEpCount: number;
709
+ chairManUrl: string;
710
+ contentUri: string;
711
+ actSpkUri: string;
712
+ }
713
+ /**
714
+ * 自动布局,分页数据
715
+ *
716
+ * @property { number } pageSize 每页显示多少人,最多可配置9画面
717
+ * @property { number } currentPage 当前页码
718
+ * @property { number } totalPage 总页数
719
+ */
720
+ export interface IPageInfo {
721
+ pageSize: number;
722
+ currentPage: number;
723
+ totalPage: number;
724
+ }
725
+ /**
726
+ * 语音激励消息
727
+ *
728
+ * @property { string } endpointId 语音激励者的callUrl信息,类似:"xxx@BRUCE"
729
+ * @property { number } pid 语音激励者的用户id
730
+ */
731
+ export interface ISpeakerInfo {
732
+ endpointId: string;
733
+ pid: number;
734
+ }
735
+ /**
736
+ * 布局对象
737
+ *
738
+ * @property { number[] } position 模版位置,业务层可以忽略
739
+ * @property { IResolutionType } resolution 当前布局对象的分辨数据
740
+ * @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
741
+ * @property { any } rotate 当前参会者的旋转信息
742
+ * @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
743
+ * @property { { left: string; top: string; width: string; height: string } } positionStyle 当前参会者的位置样式
744
+ * @property { { width: number; height: number } } positionInfo 忽略
745
+ * @property { 0 | 100 | 200 } quality 质量
746
+ * @property { boolean } deal 忽略
747
+ * @property { number } zIndex 忽略
748
+ */
749
+ export interface ILayout {
750
+ position?: number[];
751
+ resolution?: IResolutionType;
752
+ roster: IRoster;
753
+ rotate?: any;
754
+ state?: ILayoutState;
755
+ positionStyle?: {
756
+ left: string;
757
+ top: string;
758
+ width: string;
759
+ height: string;
760
+ };
761
+ positionInfo?: {
762
+ width: number;
763
+ height: number;
764
+ };
765
+ quality?: 0 | 100 | 200;
766
+ deal?: boolean;
767
+ zIndex?: number;
768
+ }
769
+ /**
770
+ * Local布局对象
771
+ *
772
+ * @extends ILayout
773
+ * @property { boolean } isLocal 是否是当前设备
774
+ */
775
+ export interface ILocalLayout extends ILayout {
776
+ isLocal: true;
777
+ }
778
+ /**
779
+ * 自动布局模式下,Layout Container的容器信息
780
+ * 计算得到的宽高能给铺满当前参会者的布局
781
+ *
782
+ * @property { number } width 减掉偏移左右值的Container容器宽
783
+ * @property { number } height 减掉偏移上下值的Container容器高
784
+ * @property { number } rateWidth 基于width配合 Layout Rate 计算得到的Layout Container容器宽
785
+ * @property { number } rateHeight 基于height配合 Layout Rate 计算得到的Layout Container容器高
786
+ */
787
+ export interface IScreenInfo {
788
+ width: number;
789
+ height: number;
790
+ rateWidth: number;
791
+ rateHeight: number;
792
+ }
793
+ /**
794
+ * 画面屏幕旋转信息
795
+ *
796
+ * @property { number } height 高度
797
+ * @property { number } width 宽度
798
+ * @property { number } participantId 用户id
799
+ * @property { number } rotation 旋转角度
800
+ * @value 0 | 1 不需要旋转
801
+ * @value 2 顺时针旋转180度
802
+ * @value 3 顺时针旋转270度
803
+ */
804
+ export interface IRotationInfoItem {
805
+ height: number;
806
+ width: number;
807
+ participantId: number;
808
+ rotation: number;
809
+ }
810
+ /**
811
+ * 缓存content+people的屏幕旋转信息数据
812
+ *
813
+ * @property { number } mediagroupid 画面类型:people/content
814
+ * @property { string } id 用户id
815
+ */
816
+ export interface IRotationInfoTotalItem extends IRotationInfoItem {
817
+ mediagroupid: number;
818
+ id: string;
819
+ }
820
+ /**
821
+ * 缓存媒体下发的屏幕旋转信息
822
+ *
823
+ * @property { IRotationInfoItem[] } content content共享内容的旋转信息
824
+ * @property { IRotationInfoItem[] } people people的旋转信息
825
+ * @property { IRotationInfoTotalItem[] } total content+people的旋转信息
826
+ */
827
+ export interface IRotationInfo {
828
+ content: IRotationInfoItem[];
829
+ people: IRotationInfoItem[];
830
+ total: IRotationInfoTotalItem[];
831
+ }
832
+ /**
833
+ * 自定义布局请流对象数据
834
+ *
835
+ * @property { number } pid 用户id,从roster中获取
836
+ * @property { IResolutionType } resolution 当前请求画面分辨率
837
+ * @value 0 90P
838
+ * @value 1 180P
839
+ * @value 2 360P
840
+ * @value 3 720P
841
+ * @value 4 1080P
842
+ * @property { IQualityType } quality 画面质量
843
+ * @value 0 100
844
+ * @value 1 200
845
+ * @value 3 300
846
+ * @property { number } mediagroupid 当前流的类型:people/content
847
+ * @value 0 people
848
+ * @value 1 content
849
+ */
850
+ export interface ICustomLayout {
851
+ pid: number;
852
+ resolution: IResolutionType;
853
+ quality: IQualityType;
854
+ mediagroupid: number;
855
+ }
856
+ /**
857
+ * 封装MediaStream
858
+ */
859
+ export interface ICustomMediaStream {
860
+ streams: MediaStream[];
861
+ track: MediaStreamTrack;
862
+ }
863
+ /**
864
+ * custom stream track封装对象
865
+ *
866
+ * @property { string } status Track的类型,local或者remote
867
+ * @property { RTCTrackEvent } data MediaStreamTrack数据
868
+ * @property { IRest } rest 从data中获取streamId、trackId和track数据,方便后续使用
869
+ * @property { string } rest.streamId MediaStream id
870
+ * @property { string } rest.trackId MediaStreamTrack id
871
+ * @property { MediaStreamTrack } rest.track MediaStreamTrack
872
+ */
873
+ export interface ICustomStreamTrack {
874
+ status: string;
875
+ data: RTCTrackEvent | ICustomMediaStream;
876
+ rest: {
877
+ streamId: string;
878
+ trackId: string;
879
+ track: MediaStreamTrack;
880
+ };
881
+ }
882
+ /**
883
+ * 字幕消息
884
+ *
885
+ * @property { number } callIndex 消息序列号
886
+ * @property { string } content 字幕规则
887
+ * @property { string } type 字幕类型
888
+ */
889
+ export interface ISubTitle {
890
+ callIndex: number;
891
+ content: string;
892
+ type: string;
893
+ }
894
+ /**
895
+ * 字幕规则
896
+ *
897
+ * @property { string } content 字幕内容
898
+ * @property { string? } i18nKey 字幕内容key
899
+ * @property { string? } fontFamily 字体
900
+ * @property { string? } fontRGB 字体色
901
+ * @property { "1" | "0" } scroll 是否滚动
902
+ * @property { string? } action 动作
903
+ * @property { string? } location 位置'top' | 'middle' | 'bottom'
904
+ * @property { string? } fontSize 位置'small' | 'middle' | 'big'
905
+ * @property { string? } backgroundAlpha 背景色
906
+ * @property { string? } scrollSpeed 滚动速度
907
+ * @property { string? } backgroundRGB 背景色
908
+ */
909
+ export interface ISubTitleContent {
910
+ content: string;
911
+ i18nKey?: string;
912
+ fontFamily?: string;
913
+ fontRGB?: string;
914
+ scroll?: '1' | '0';
915
+ action?: 'push' | string;
916
+ location?: 'top' | 'middle' | 'bottom';
917
+ fontSize?: 'small' | 'middle' | 'big';
918
+ backgroundAlpha?: string;
919
+ scrollSpeed?: string;
920
+ backgroundRGB?: string;
921
+ }
922
+ export declare type IAudioRenders = {
923
+ [key: string]: {
924
+ ele: any;
925
+ };
926
+ };
927
+ export declare type IVideoRenders = {
928
+ [key: string]: VideoManager & {
929
+ match?: boolean;
930
+ };
931
+ };
932
+ /**
933
+ * 同传字幕: 本地支持的语言
934
+ */
935
+ export declare type TLocalLanguage = typeof SupportLocalLanguages[number];
936
+ export interface IOutputCustomLayout {
937
+ [pid: string]: {
938
+ resolution: number;
939
+ quality: number;
940
+ };
941
+ }
942
+ /**
943
+ * 巡课云会议室
944
+ *
945
+ * @property { string } callUrl 云会议室callUri
946
+ * @property { number } conferenceNumberType 云会议室类型
947
+ * @property { string } deviceId
948
+ * @property { string } displayName 云会议室名称
949
+ * @property { string } number 云会议室号
950
+ */
951
+ export interface IConference {
952
+ callUrl: string;
953
+ conferenceNumberType: number;
954
+ deviceId: string;
955
+ displayName: string;
956
+ number: string;
957
+ }
958
+ /**
959
+ * 参会者信息
960
+ *
961
+ * @property { 0 | 1 } bulkRosterType 全量roster类型,0表示全量数据,1表示增量数据
962
+ * @property { IRoster[] } addRosterInfo 新增的roster信息 当bulkRosterType是0的时候,此参数表示全量数据
963
+ * @property { IRoster[] } changeRosterInfo 变化的roster信息
964
+ * @property { { participantId: number }[] } deleteRosterInfo 被删除的roster信息
965
+ */
966
+ export interface IBulkRoster {
967
+ bulkRosterType: 0 | 1;
968
+ addRosterInfo: IRoster[];
969
+ changeRosterInfo: IRoster[];
970
+ deleteRosterInfo: {
971
+ participantId: number;
972
+ }[];
973
+ }
974
+ /**
975
+ * conf 会议属性
976
+ *
977
+ * @property { 'contentOnhold' } type 类型
978
+ * @property { string } audioTrackId content audio track id
979
+ * @property { string } contentUrl content uri
980
+ */
981
+ export interface IConfProperty {
982
+ type: 'contentOnhold';
983
+ audioTrackId?: string;
984
+ contentUrl?: string;
985
+ }
986
+ /**
987
+ * track 信息
988
+ *
989
+ * @property { string } streamId stream id
990
+ * @property { MediaStreamTrack } track
991
+ * @property { string } trackId track id
992
+ */
993
+ export interface ITrackInfo {
994
+ streamId: string;
995
+ track: MediaStreamTrack;
996
+ trackId: string;
997
+ }
998
+ /**
999
+ * ws close reason
1000
+ */
1001
+ export declare type TErrorReason<P = {}> = P & {
1002
+ code?: number;
1003
+ };
1004
+ /**
1005
+ * 是否静音
1006
+ *
1007
+ * @enum
1008
+ *
1009
+ * @property {number} AutoMute.SMART 智能静音
1010
+ * @property {number} AutoMute.ALL 全部静音
1011
+ * @property {number} AutoMute.NOT 不静音
1012
+ * @property {number} AutoMute.FORCE 强制静音
1013
+ */
1014
+ export declare enum AutoMute {
1015
+ SMART = 0,
1016
+ ALL = 1,
1017
+ NOT = 2,
1018
+ FORCE = 3
1019
+ }
1020
+ export interface IGetConferenceParams {
1021
+ autoMute: AutoMute;
1022
+ }
1023
+ /**
1024
+ * 录制结果上报
1025
+ *
1026
+ * @property { string } reason stream id
1027
+ * @property { string } state
1028
+ * @property { boolean } isRecorded
1029
+ * @property { string } controlUri
1030
+ */
1031
+ export interface IRecordingStateChanged {
1032
+ reason: string;
1033
+ state: string;
1034
+ isRecorded: boolean;
1035
+ controlUri: string;
1036
+ reasonText: string;
1037
+ }
1038
+ /**
1039
+ * 录制状态上报
1040
+ *
1041
+ * @property { boolean } isStart stream id
1042
+ * @property { string } uri
1043
+ * @property { string } callUri
1044
+ * @property { string } callerUri
1045
+ * @property { string } status
1046
+ * @property { boolean } isLocal 是否是local开启的录制
1047
+ */
1048
+ export interface IRecordStatusNotification {
1049
+ isStart: Boolean;
1050
+ uri: string;
1051
+ callUri: string;
1052
+ callerUri: string;
1053
+ status: string;
1054
+ isLocal: boolean;
1055
+ }
1056
+ /**
1057
+ * 录制权限
1058
+ *
1059
+ * @property { boolean } authorize 权限
1060
+ * @property { string } recordingUrl 云会议室URI
1061
+ * @property { string? } developerMessage 云会议室的所属用户名称
1062
+ * @property { number? } errorCode 错误码
1063
+ * @property { string? } userMessage 错误信息
1064
+ */
1065
+ export interface IRecordPermission {
1066
+ authorize: boolean;
1067
+ recordingUrl: string;
1068
+ developerMessage?: string;
1069
+ errorCode?: number;
1070
+ userMessage?: string;
1071
+ }
1072
+ /**
1073
+ * 同传字幕内容
1074
+ *
1075
+ * @property { number } pid 当前说话的终端
1076
+ * @property { string } src 原文
1077
+ * @property { string } target 译文
1078
+ * @property { number } seTime 发送时间
1079
+ * @property { number } startTime 开始时间
1080
+ * @property { number } endTime 结束时间
1081
+ * @property { boolean } isEnd 一句话是否结束
1082
+ * @property { boolean } isActive 活跃标志,收三路,同时只有一路active
1083
+ * @property { string } url 终端calluri
1084
+ * @property { string } dn 显示名称
1085
+ * @property { string } meetingId 会议号
1086
+ * @property { string } srcLang 原语言,zh表示中文,en表示英文
1087
+ * @property { string } targetLang 译文语言,zh表示中文,en表示英文
1088
+ */
1089
+ export interface ITranslationContent {
1090
+ pid: number;
1091
+ src: string;
1092
+ target: string;
1093
+ seTime: number;
1094
+ startTime: number;
1095
+ endTime: number;
1096
+ isEnd: boolean;
1097
+ isActive: boolean;
1098
+ url: string;
1099
+ dn: string;
1100
+ meetingId: string;
1101
+ srcLang: string;
1102
+ targetLang: string;
1103
+ }
1104
+ /**
1105
+ * SDK功能控制开关,用于内部是否启用某些功能的运行
1106
+ * 默认配置:src/enum/index.ts DEFAULT_FEATURE_COFNIG
1107
+ *
1108
+ * @property { boolean } meetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
1109
+ * @property { boolean } v2states 是否启用小鱼数据上报功能,默认启用,设置为true;
1110
+ * @property { boolean } checkRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
1111
+ * @property { boolean } bandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
1112
+ * @property { boolean } checkSSL 是否启用必须使用Https协议访问页面,默认启用,设置为true,建议开启,Http页面下无法访问WebRTC API,音视频互通存在问题;
1113
+ */
1114
+ export interface IFeatureConfig {
1115
+ meetingShout?: boolean;
1116
+ v2states?: boolean;
1117
+ checkRecordPermission?: boolean;
1118
+ bandwidthSetting?: boolean;
1119
+ checkSSL?: boolean;
1120
+ }
1121
+ export {};