@xylink/xy-rtc-sdk 2.0.1-beta.8 → 2.0.3-beta.11

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.
@@ -0,0 +1,923 @@
1
+ import VideoManager from '../main/videoManager';
2
+ /**
3
+ * 向Client推送流类型
4
+ *
5
+ * @value All 所有音视频数据
6
+ * @value CONTENT 分享内容视频数据
7
+ */
8
+ export declare type IPushType = 'ALL' | 'CONTENT';
9
+ /**
10
+ * 画面布局模式
11
+ *
12
+ * @value AUTO 自动布局,按照宫格/演讲者布局模式返回画面数据
13
+ * @value CUSTOM 自定义布局,第三方自由控制人员数量,分辨率,大小,位置
14
+ */
15
+ export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
16
+ /**
17
+ * 分享Content内容的状态
18
+ *
19
+ * @value ENDED 已结束
20
+ * @value STARTING 分享中
21
+ * @value PENDING 等待
22
+ */
23
+ export declare type ISahreContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
24
+ /**
25
+ * VIDEO事件回调状态状态
26
+ *
27
+ * @value LOAD_START 开始加载视频流
28
+ * @value CANPLAY 可以播放
29
+ * @value ERROR 遇到错误
30
+ */
31
+ export declare type IVideoLoadStatus = 'LOAD_START' | 'CANPLAY' | 'ERROR';
32
+ /**
33
+ * 视频画面状态
34
+ *
35
+ * @value CANPLAY 正常播放
36
+ * @value ENDED 已结束
37
+ * @value REQUEST 视频请求中
38
+ */
39
+ export declare type IVideoManagerState = '' | 'CANPLAY' | 'ENDED' | 'REQUEST';
40
+ /**
41
+ * Layout布局方式
42
+ *
43
+ * @value SPEAKER 默认值,演讲者模式,即 1大N小 画面模式
44
+ * @value GALLERY 另一种是画廊模式,即 宫格布局
45
+ */
46
+ export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
47
+ /**
48
+ * 主画面/Content布局模式
49
+ *
50
+ * @value MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
51
+ * @value MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpecker是大窗口
52
+ * @value TWO_PIC_PIP 画中画模式(picture in picture)
53
+ * @value CONTENT_ONLY 只显示Content
54
+ * @value TWO_PIC_SYMMETRIC 对称显示content和speker(side by side)
55
+ */
56
+ export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
57
+ /**
58
+ * 布局模式
59
+ */
60
+ export declare type IMode = ITemplateMode | IContentTemplateMode;
61
+ /**
62
+ * 客户端状态
63
+ *
64
+ * @value NONE 正常
65
+ * @value PUBLISH_ERROR 推流异常
66
+ * @value WS_CLOSE wss链接关闭
67
+ * @value WS_ERROR wss链接错误
68
+ */
69
+ export declare type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR';
70
+ /**
71
+ * 视频状态
72
+ *
73
+ * @value muteVideo 关闭摄像头
74
+ * @value unmuteVideo:开启摄像头
75
+ */
76
+ export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
77
+ /**
78
+ * 音频状态
79
+ *
80
+ * @valule muteAudio 关闭麦克风
81
+ * @valule unmuteAudio 开启麦克风
82
+ */
83
+ export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
84
+ /**
85
+ * 视频/音频状态
86
+ *
87
+ * @valule muteAudio 关闭麦克风
88
+ * @valule unmuteAudio 开启麦克风
89
+ * @value muteVideo 关闭摄像头
90
+ * @value unmuteVideo:开启摄像头
91
+ */
92
+ export declare type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo';
93
+ /**
94
+ * 画面内容类型
95
+ *
96
+ * @value 0 People画面
97
+ * @value 1 Content共享内容
98
+ */
99
+ export declare type IMediagroupid = 0 | 1;
100
+ export declare type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE';
101
+ /**
102
+ * 布局画面状态
103
+ *
104
+ * @value MUTE 视频暂停
105
+ * @value REQUEST 视频请求中
106
+ * @value NORMAL 视频正常
107
+ * @value INVALID 设备不可用
108
+ * @value AUDIO_TEL 电话入会
109
+ * @value AUDIO_ONLY 仅音频入会模式
110
+ * @value AUDIO_CONTENT 仅音频共享
111
+ */
112
+ export declare type ILayoutState = 'MUTE' | 'REQUEST' | 'NORMAL' | 'INVALID' | 'AUDIO_TEL' | 'AUDIO_ONLY' | 'AUDIO_CONTENT';
113
+ /**
114
+ * 埋点数据上报类型
115
+ *
116
+ * @value click 点击
117
+ * @value msgCallback 消息回调
118
+ * @value server server消息
119
+ * @value trigger 触发事件类型
120
+ */
121
+ export declare type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
122
+ /**
123
+ * 埋点数据上报
124
+ */
125
+ export declare type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
126
+ /**
127
+ * 事件名称
128
+ */
129
+ export declare type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'udioUnmute' | 'audioMute' | 'subtitle' | string;
130
+ /**
131
+ * 轮询多画面状态
132
+ *
133
+ * @value 0 开始
134
+ * @value 1 停止
135
+ * @value 2 暂停
136
+ * @value 3 恢复
137
+ */
138
+ export declare type TCommand = 0 | 1 | 2 | 3;
139
+ /**
140
+ * 设备类型
141
+ */
142
+ declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
143
+ /**
144
+ * 请求画面分辨率
145
+ *
146
+ * @value 0 90P
147
+ * @value 1 180P
148
+ * @value 2 360P
149
+ * @value 3 720P
150
+ * @value 4 1080P
151
+ */
152
+ export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
153
+ /**
154
+ * 请求画面质量
155
+ *
156
+ * @value 0 100
157
+ * @value 1 200
158
+ * @value 3 300
159
+ */
160
+ export declare type IQualityType = 0 | 1 | 2;
161
+ /**
162
+ * client配置参数
163
+ *
164
+ * @property { string } clientId 必填 | "" | 网关校验id(clientId),需要从对接人处获取
165
+ * @property { string } wssServer 非必填 websocket服务地址,默认不需要配置
166
+ * @property { string } httpServer 非必填 resetApi服务地址,默认不需要配置
167
+ * @property { string } logServer 非必填 logServer服务地址,默认不需要配置
168
+ * @property { IClientLayout } layout 非必填 | AUTO | 布局模式,可选:AUTO | CUSTOM
169
+ * @property { boolean } debug 非必填 | false | 是否接收所有参会者音视频状态数据,默认不发送
170
+ * @property { boolean } muteAudio 非必填 | false | 是否开启/关闭麦克风入会,默认是false,开启麦克风
171
+ * @property { boolean } muteVideo 非必填 | false | 是否开启/关闭摄像头入会,默认是false,开启摄像头
172
+ * @property { { offset?: number[]; elementId?: string } } container 非必填 | {} | 配置layout container容器节点和偏移量
173
+ * @property { number[] } container.offset 非必填 | [] | 配置[上 下 左 右]的偏移量,自动布局适用
174
+ * @property { string } container.elementId 非必填 | "" | 配置Layout需要包裹在elementId元素里面显示,并使用此元素的信息计算 Layout 的 size和 position
175
+ * @property { boolean } localHide 非必填 | false | 是否在页面上隐藏Local画面,默认不隐藏
176
+ * @property { boolean } localMirror 非必填 | true | 是否需要镜像Local画面,默认镜像Local
177
+ * @property { ITemplateMode } templateMode 非必填 | 布局模式,默认:SPEAKER,1大N小 画面布局模式,可选:SPEAKER | GALLERY
178
+ * @property { string } __hideId 是否是隐身入会模式,hide代表隐身入会,为空代表正常模式
179
+ * @property { string } __monitorMode 是否是巡课模式,默认是'',MONITOR代表巡课模式
180
+ * @property { boolean } isThird 埋点
181
+ * @property { boolean } isSupportHybridCloud 是否是混合云
182
+ *
183
+ */
184
+ export interface IClientConfig {
185
+ clientId?: string;
186
+ wssServer?: string;
187
+ httpServer?: string;
188
+ logServer?: string;
189
+ layout?: IClientLayout;
190
+ debug?: boolean;
191
+ muteAudio?: boolean;
192
+ muteVideo?: boolean;
193
+ container?: {
194
+ offset?: number[];
195
+ elementId?: string;
196
+ };
197
+ localHide?: boolean;
198
+ localMirror?: boolean;
199
+ templateMode?: ITemplateMode;
200
+ __hideId?: string;
201
+ __monitorMode?: string;
202
+ isThird?: boolean;
203
+ isSupportHybridCloud?: boolean;
204
+ }
205
+ export interface ILayoutParams {
206
+ rosters: IRoster[];
207
+ speakerInfo: ISpeakerInfo;
208
+ layout: ILayout[];
209
+ templateMode: ITemplateMode;
210
+ invite: IInvite;
211
+ contentSenderPid: number;
212
+ localHide: boolean;
213
+ }
214
+ export declare type ITemplateObj = {
215
+ position: number[];
216
+ resolution: IResolutionType;
217
+ zIndex?: number;
218
+ };
219
+ export interface ITypeTemplate {
220
+ [id: string]: ITemplateObj[];
221
+ }
222
+ export interface ITemplateInfo {
223
+ length: number;
224
+ temp: {
225
+ [index: string]: ITemplateObj[];
226
+ };
227
+ rate: {
228
+ [index: number]: number;
229
+ };
230
+ }
231
+ export interface ITemplate {
232
+ [type: string]: ITemplateInfo;
233
+ }
234
+ /**
235
+ * @enum 默认常量列表
236
+ */
237
+ export interface IDefault {
238
+ CLIENT_TYPE: string;
239
+ INIT_INTERNELS: {
240
+ bytesReceived: number;
241
+ bytesReceivedSecond: number;
242
+ bytesSent: number;
243
+ bytesSentSecond: number;
244
+ mimeType: string;
245
+ timestamp: number;
246
+ receiver: {};
247
+ sender: {};
248
+ };
249
+ RESOLUTION: number;
250
+ ROSTER: IRoster;
251
+ SELF_MOCK_PID: number;
252
+ HOR_CONTAINER_RATIO: number;
253
+ VER_CONTAINER_RATIO: number;
254
+ RATIO_MAP: {
255
+ [id: number]: number;
256
+ };
257
+ MAP_RESOLUTION_INDEX: {
258
+ [resolution: string]: number;
259
+ };
260
+ RESOLUTION_MAP: {
261
+ [index: number]: number;
262
+ };
263
+ VIDE_BANDWIDTH_BIT: 1000;
264
+ LOGIN_INFO: {
265
+ callUri: string;
266
+ securityKey: string;
267
+ access_token: string;
268
+ refresh_token: string;
269
+ id: 0;
270
+ displayName: string;
271
+ };
272
+ LAYOUT: ILayout;
273
+ MAP_RESOLUTION_STRING: {
274
+ [resolution: string]: {
275
+ width: number;
276
+ height: number;
277
+ };
278
+ };
279
+ }
280
+ /**
281
+ * SDK登录结果
282
+ *
283
+ * @property { string? } callUri 设备id
284
+ * @property { string } securityKey 安全码
285
+ * @property { string } access_token token
286
+ * @property { string } refresh_token 刷新token
287
+ * @property { number } id 忽略
288
+ * @property { string } displayName 登录用户名
289
+ * @property { string } cellPhone 忽略
290
+ */
291
+ export interface ILoginInfo {
292
+ callUri?: string;
293
+ securityKey: string;
294
+ access_token: string;
295
+ refresh_token?: string;
296
+ id: number;
297
+ displayName?: string;
298
+ cellPhone?: string;
299
+ extUserId?: string;
300
+ }
301
+ export interface IErrorCodeList {
302
+ version: string;
303
+ zh_CN: {
304
+ [key: string]: string;
305
+ };
306
+ zh_TW: {
307
+ [key: string]: string;
308
+ };
309
+ en_US: {
310
+ [key: string]: string;
311
+ };
312
+ }
313
+ export interface IMUTE_MAP {
314
+ [type: string]: {
315
+ type: IVideoAudioMessageType;
316
+ status: boolean;
317
+ };
318
+ }
319
+ /**
320
+ * 配置画面数据
321
+ *
322
+ * @property { string } calluri 设备url
323
+ * @property { IResolutionType } resolution 分辨率
324
+ * @property { IQualityType } quality 质量
325
+ * @property { number } mediagroupid 0:people画面,1:content共享画面
326
+ * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
327
+ * @property { string } callUri NewLayout版本无此参数
328
+ */
329
+ export declare type IReqInfo = {
330
+ calluri: string;
331
+ resolution: IResolutionType;
332
+ quality: IQualityType;
333
+ mediagroupid?: number;
334
+ isContent?: boolean;
335
+ callUri?: string;
336
+ };
337
+ export interface IMeetingInfo {
338
+ meetingId: string;
339
+ callUri: string;
340
+ }
341
+ /**
342
+ * 调度失败的uri列表项目
343
+ *
344
+ * @property { string } uri 设备calluri
345
+ * @property { string } status 状态
346
+ * @property { string } message 消息
347
+ */
348
+ export interface IFailUriItem {
349
+ uri: string;
350
+ status: string;
351
+ message: string;
352
+ }
353
+ /**
354
+ * 调度画面结果数据
355
+ */
356
+ export interface IMonitorReportMessage {
357
+ callIndex: number;
358
+ callerUri: string;
359
+ code: string;
360
+ monitorInfo: {
361
+ uriList: IFailUriItem[];
362
+ failUriList: IFailUriItem[];
363
+ };
364
+ type: 'MONITOR_STATE_REPORT';
365
+ }
366
+ /**
367
+ * 调度成功和失败的设备列表数据
368
+ */
369
+ export interface IMonitorReport {
370
+ uriList: IFailUriItem[];
371
+ failUriList: IFailUriItem[];
372
+ }
373
+ /**
374
+ * 出入会通知
375
+ *
376
+ * @property { string } e 呼叫者的callerUri
377
+ * @property { string } a 呼叫者的userId
378
+ * @property { string } c 呼叫者的displayName
379
+ * @property { 'in' | 'out' } t 呼叫者的动作:退会/入会
380
+ */
381
+ export interface IOriginalReminder {
382
+ e: string;
383
+ a: string;
384
+ c: string;
385
+ t: 'in' | 'out';
386
+ }
387
+ /**
388
+ * 对外出入会通知消息
389
+ *
390
+ * @property { string } displayName 参会者名称
391
+ * @property { 'in' | 'out' } action 参会者动作
392
+ * @property { string } userId 参会者userId
393
+ */
394
+ export interface IReminder {
395
+ displayName: string;
396
+ action: 'in' | 'out';
397
+ userId?: string;
398
+ }
399
+ export interface IMediaSupportedConstraints {
400
+ audio?: MediaTrackConstraints | false;
401
+ video?: MediaTrackConstraints | false;
402
+ }
403
+ export interface ICandidate extends RTCIceCandidateInit {
404
+ type?: string;
405
+ }
406
+ /**
407
+ * 第三方登录用户信息
408
+ *
409
+ * @property { string } displayName 用户名称
410
+ * @property { string } extId 企业id
411
+ */
412
+ export interface ILoginExtAccount {
413
+ displayName: string;
414
+ extId: string;
415
+ extUserId?: string;
416
+ }
417
+ /**
418
+ * 第三方登录sdk用户信息,由sdk server创建
419
+ *
420
+ * @property { string } userName sdk用户名
421
+ * @property { string } password sdk密码
422
+ * @property { string? } extId sdk企业Id
423
+ */
424
+ export interface ISdkUserInfo {
425
+ userName: string;
426
+ password: string;
427
+ extId?: string;
428
+ }
429
+ export interface IServers {
430
+ wssServer: string;
431
+ httpServer: string;
432
+ logServer: string;
433
+ }
434
+ export interface IHttpConfig {
435
+ baseUrl: string;
436
+ }
437
+ /**
438
+ * 用户在非登录时,配置登录用户信息
439
+ *
440
+ * 此信息是由业务层提供网关配置
441
+ */
442
+ export interface IConfig {
443
+ client_id: string;
444
+ access_token: string;
445
+ refresh_token?: string;
446
+ domain?: string;
447
+ expires_in?: string;
448
+ openid?: string;
449
+ scope?: string;
450
+ token_type?: string;
451
+ }
452
+ /**
453
+ * 会议室配置信息
454
+ *
455
+ * @property { string } watermarkContent 共享时叠加水印内容
456
+ */
457
+ export interface IConfAuxProperties {
458
+ watermarkContent: string;
459
+ }
460
+ /**
461
+ * 会议号信息
462
+ *
463
+ * @property { string } callNumber 最终进入的真实会议号
464
+ * @property { string } callUrl 呼叫号码真实url
465
+ * @property { string } deviceId 号码id
466
+ * @property { string } deviceType 号码类型
467
+ * @property { string } displayName 云会议号名称
468
+ * @property { string } number 呼叫的号码
469
+ * @property { string } numberType 会议号类型
470
+ * @property { IConfAuxProperties } confAuxProperties 会议配置
471
+ * @property { string } avatar 头像
472
+ */
473
+ export interface IConferenceInfo {
474
+ callNumber: string;
475
+ callUrl?: string;
476
+ deviceId?: string;
477
+ deviceType?: string;
478
+ displayName?: string;
479
+ number?: string;
480
+ numberType?: string;
481
+ confAuxProperties?: IConfAuxProperties;
482
+ avatar?: string;
483
+ }
484
+ /**
485
+ * 呼叫参数
486
+ *
487
+ * @property { string } token 网关token
488
+ * @property { string } confNumber 云会议号/终端号/手机号
489
+ * @property { string? } password 入会密码,没有则为空
490
+ * @property { string? } displayName 入会显示昵称
491
+ */
492
+ export interface IMackCall {
493
+ token: string;
494
+ confNumber: string;
495
+ password?: string;
496
+ displayName?: string;
497
+ }
498
+ /**
499
+ * 呼叫的会议信息
500
+ *
501
+ * @extends IMackCall
502
+ * @property { IConferenceInfo } meeting 会议号信息
503
+ */
504
+ export interface ICall extends IMackCall {
505
+ meeting?: IConferenceInfo;
506
+ }
507
+ /**
508
+ * 入会成功之后的会议信息
509
+ *
510
+ * @property { string } callerUri 呼叫者calluri
511
+ * @property { number } callIndex 会议消息索引值
512
+ * @property { string } automute 是否是自动mute
513
+ * @property { string } meetingId 会议hash id
514
+ * @property { string } vcNumber 最终的会议号
515
+ * @property { "true" | "false" } inoutReminder 是否设置了出入会提醒
516
+ * @property { string } commonJson 其他会议室配置
517
+ */
518
+ export interface IInvite {
519
+ callerUri: string;
520
+ callIndex: number;
521
+ automute: string;
522
+ meetingId: string;
523
+ vcNumber?: string;
524
+ inoutReminder?: 'true' | 'false';
525
+ commonJson?: string;
526
+ }
527
+ /**
528
+ * 会控回调信息
529
+ *
530
+ * @property { number } callIndex 会议消息索引值
531
+ * @property { string } callerUri 呼叫者calluri
532
+ * @property { string } chairmanUri 主会场calluri
533
+ * @property { boolean } contentIsDisabled 是否禁用分享content
534
+ * @property { boolean } disableMute 是否强制静音
535
+ * @property { string } muteOperation 音频状态
536
+ * @property { string } role 未知
537
+ * @property { string } type 未知
538
+ * @property { string } commonJson 会控修改名称等
539
+ */
540
+ export interface IMeetingControl {
541
+ callIndex: number;
542
+ callUri: string;
543
+ chairmanUri: string;
544
+ contentIsDisabled: boolean;
545
+ disableMute: boolean;
546
+ muteOperation: string;
547
+ role: string;
548
+ type: string;
549
+ commonJson: string;
550
+ }
551
+ /**
552
+ * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
553
+ *
554
+ * @property { IDeviceType } deviceType 设备类型
555
+ * @property { string } endpointId 设备id
556
+ * @property { string } displayName 参会者名称
557
+ * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
558
+ * @property { number } participantId 参会者id
559
+ * @property { boolean } audioTxMute 参会者麦克风状态,true:开启,false:关闭
560
+ * @property { boolean } videoTxMute 参会者摄像头状态,true:开启,false:关闭
561
+ * @property { boolean } audioRxMute ignore
562
+ * @property { boolean } videoRxMute ignore
563
+ * @property { number } videoMuteReason ignore
564
+ * @property { boolean } isForceFullScreen 参会者是否是主画面
565
+ * @property { boolean } isLastAdd ignore
566
+ * @property { boolean } onHold 参会者是否是被呼叫等待状态
567
+ * @property { boolean } isPolling ignore
568
+ * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
569
+ * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
570
+ * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
571
+ * @property { string } extUserId 三方userId
572
+ * @property { boolean } isLocal 参会者是否是自己
573
+ */
574
+ export interface IRoster {
575
+ deviceType: IDeviceType;
576
+ endpointId: string;
577
+ displayName: string;
578
+ mediagroupid: number;
579
+ participantId: number;
580
+ audioTxMute: boolean;
581
+ videoTxMute: boolean;
582
+ audioRxMute: boolean;
583
+ videoRxMute: boolean;
584
+ videoMuteReason: number;
585
+ isForceFullScreen: boolean;
586
+ isLastAdd: boolean;
587
+ onHold: boolean;
588
+ isPolling: boolean;
589
+ isContent: boolean;
590
+ isActiveSpeaker?: boolean;
591
+ id: string;
592
+ extUserId: string;
593
+ isLocal?: boolean;
594
+ }
595
+ /**
596
+ * Layout Result布局结果中返回的基础数据
597
+ *
598
+ * @property { number } participantId 参会者id
599
+ * @property { 0 | 1 } mediagroupid 参会者画面类型,0:people画面,1:共享内容画面
600
+ * @property { number } feccOri ignore
601
+ * @property { string } remoteType 设备类型
602
+ * @property { string } remoteName 参会者名称
603
+ * @property { string } remoteID ignore
604
+ * @property { string } videoTrackId 当前参会者画面Track轨道id,用于在 VideoTrackList 中匹配stream数据
605
+ * @property { string } audioTrackId ignore
606
+ * @property { boolean } isAudioMute 参会者麦克风状态,true:开启,false:关闭
607
+ * @property { boolean } isVideoMute 参会者摄像头状态,true:开启,false:关闭
608
+ * @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
609
+ * @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
610
+ * @property { boolean } isChairman 参会者是否是主画面
611
+ * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
612
+ * @property { number } LayoutVideoState 参会者画面的状态:请求中,正常,电话入会,视频暂停等
613
+ * @property { number } MuteReason ignore
614
+ * @property { string } calluri 参会者Url
615
+ * @property { boolean } isLocal 参会者是否是自己
616
+ */
617
+ export interface ILayoutRoster {
618
+ participantId: number;
619
+ mediagroupid: number;
620
+ feccOri: number;
621
+ remoteType: string;
622
+ remoteName: string;
623
+ remoteID: string;
624
+ videoTrackId: string;
625
+ audioTrackId: string;
626
+ isAudioMute: boolean;
627
+ isVideoMute: boolean;
628
+ isActiveSpeaker: boolean;
629
+ isContent: boolean;
630
+ isChairman: boolean;
631
+ LayoutVideoState: number;
632
+ MuteReason: number;
633
+ calluri?: string;
634
+ isLocal?: boolean;
635
+ }
636
+ /**
637
+ * Conf Change消息
638
+ *
639
+ * @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量
640
+ * @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量
641
+ * @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为''
642
+ * @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
643
+ * @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
644
+ */
645
+ export interface IConfInfo {
646
+ participantCount: number;
647
+ totalEpCount: number;
648
+ chairManUrl: string;
649
+ contentUri: string;
650
+ actSpkUri: string;
651
+ }
652
+ /**
653
+ * 自动布局,分页数据
654
+ *
655
+ * @property { number } pageSize 每页显示多少人,最多可配置9画面
656
+ * @property { number } currentPage 当前页码
657
+ * @property { number } totalPage 总页数
658
+ */
659
+ export interface IPageInfo {
660
+ pageSize: number;
661
+ currentPage: number;
662
+ totalPage: number;
663
+ }
664
+ /**
665
+ * 语音激励消息
666
+ *
667
+ * @property { string } endpointId 语音激励者的callUrl信息,类似:"xxx@BRUCE"
668
+ * @property { number } pid 语音激励者的用户id
669
+ */
670
+ export interface ISpeakerInfo {
671
+ endpointId: string;
672
+ pid: number;
673
+ }
674
+ /**
675
+ * 布局对象
676
+ *
677
+ * @property { number[] } position 模版位置,业务层可以忽略
678
+ * @property { IResolutionType } resolution 当前布局对象的分辨数据
679
+ * @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
680
+ * @property { any } rotate 当前参会者的旋转信息
681
+ * @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
682
+ * @property { { left: string; top: string; width: string; height: string } } positionStyle 当前参会者的位置样式
683
+ * @property { { width: number; height: number } } positionInfo 忽略
684
+ * @property { 0 | 100 | 200 } quality 质量
685
+ * @property { boolean } deal 忽略
686
+ * @property { number } zIndex 忽略
687
+ */
688
+ export interface ILayout {
689
+ position?: number[];
690
+ resolution?: IResolutionType;
691
+ roster: IRoster;
692
+ rotate?: any;
693
+ state?: ILayoutState;
694
+ positionStyle?: {
695
+ left: string;
696
+ top: string;
697
+ width: string;
698
+ height: string;
699
+ };
700
+ positionInfo?: {
701
+ width: number;
702
+ height: number;
703
+ };
704
+ quality?: 0 | 100 | 200;
705
+ deal?: boolean;
706
+ zIndex?: number;
707
+ }
708
+ /**
709
+ * Local布局对象
710
+ *
711
+ * @extends ILayout
712
+ * @property { boolean } isLocal 是否是当前设备
713
+ */
714
+ export interface ILocalLayout extends ILayout {
715
+ isLocal: true;
716
+ }
717
+ /**
718
+ * 自动布局模式下,Layout Cotnaienr的容器信息
719
+ * 计算得到的宽高能给铺满当前参会者的布局
720
+ *
721
+ * @property { number } width 减掉偏移左右值的container容器宽
722
+ * @property { number } height 减掉偏移上下值的ontainer容器高
723
+ * @property { number } rateWidth 基于width配合 Layout Rate 计算得到的Layout Container容器宽
724
+ * @property { number } rateHeight 基于height配合 Layout Rate 计算得到的Layout Container容器高
725
+ */
726
+ export interface IScreenInfo {
727
+ width: number;
728
+ height: number;
729
+ rateWidth: number;
730
+ rateHeight: number;
731
+ }
732
+ /**
733
+ * 画面屏幕旋转信息
734
+ *
735
+ * @property { number } height 高度
736
+ * @property { number } width 宽度
737
+ * @property { number } participantId 用户id
738
+ * @property { number } rotation 旋转角度
739
+ * @value 0 | 1 不需要旋转
740
+ * @value 2 顺时针旋转180度
741
+ * @value 3 顺时针旋转270度
742
+ */
743
+ export interface IRotationInfoItem {
744
+ height: number;
745
+ width: number;
746
+ participantId: number;
747
+ rotation: number;
748
+ }
749
+ /**
750
+ * 缓存content+people的屏幕旋转信息数据
751
+ *
752
+ * @property { number } mediagroupid 画面类型:people/content
753
+ * @property { string } id 用户id
754
+ */
755
+ export interface IRotationInfoTotalItem extends IRotationInfoItem {
756
+ mediagroupid: number;
757
+ id: string;
758
+ }
759
+ /**
760
+ * 缓存媒体下发的屏幕旋转信息
761
+ *
762
+ * @property { IRotationInfoItem[] } content content共享内容的旋转信息
763
+ * @property { IRotationInfoItem[] } people people的旋转信息
764
+ * @property { IRotationInfoTotalItem[] } total content+people的旋转信息
765
+ */
766
+ export interface IRotationInfo {
767
+ content: IRotationInfoItem[];
768
+ people: IRotationInfoItem[];
769
+ total: IRotationInfoTotalItem[];
770
+ }
771
+ /**
772
+ * 自定义布局请流对象数据
773
+ *
774
+ * @property { number } pid 用户id,从roster中获取
775
+ * @property { IResolutionType } resolution 当前请求画面分辨率
776
+ * @value 0 90P
777
+ * @value 1 180P
778
+ * @value 2 360P
779
+ * @value 3 720P
780
+ * @value 4 1080P
781
+ * @property { IQualityType } quality 画面质量
782
+ * @value 0 100
783
+ * @value 1 200
784
+ * @value 3 300
785
+ * @property { number } mediagroupid 当前流的类型:people/content
786
+ * @value 0 people
787
+ * @value 1 content
788
+ */
789
+ export interface ICustomLayout {
790
+ pid: number;
791
+ resolution: IResolutionType;
792
+ quality: IQualityType;
793
+ mediagroupid: number;
794
+ }
795
+ /**
796
+ * 1.x版本customLayoutSender所需的请流参数
797
+ *
798
+ * @property { number } pid 用户id,从roster中获取
799
+ * @property { 'low' | 'normal' | 'high' | 'hd' } quality 请求视频质量
800
+ * @param low 1 180P
801
+ * @param normal 2 360P
802
+ * @param high 3 720P
803
+ * @param hd 4 1080P
804
+ * @property { boolean } isContent 是否是共享内容,从roster中获取
805
+ */
806
+ export interface IThidrCustomLayout {
807
+ pid: number;
808
+ quality: 'low' | 'normal' | 'high' | 'hd';
809
+ isContent: boolean;
810
+ }
811
+ /**
812
+ * 封装MediaStream
813
+ */
814
+ export interface ICustomMediaStream {
815
+ streams: MediaStream[];
816
+ track: MediaStreamTrack;
817
+ }
818
+ /**
819
+ * custom stream track封装对象
820
+ *
821
+ * @property { string } status Track的类型,local或者remote
822
+ * @property { RTCTrackEvent } data MediaStreamTrack数据
823
+ * @property { IRest } rest 从data中获取streamId、trackId和track数据,方便后续使用
824
+ * @property { string } rest.streamId MediaStream id
825
+ * @property { string } rest.trackId MediaStreamTrack id
826
+ * @property { MediaStreamTrack } rest.track MediaStreamTrack
827
+ */
828
+ export interface ICustomStreamTrack {
829
+ status: string;
830
+ data: RTCTrackEvent | ICustomMediaStream;
831
+ rest: {
832
+ streamId: string;
833
+ trackId: string;
834
+ track: MediaStreamTrack;
835
+ };
836
+ }
837
+ /**
838
+ * 字幕消息
839
+ *
840
+ * @property { number } callIndex 消息序列号
841
+ * @property { string } content 字幕规则
842
+ * @property { string } type 字幕类型
843
+ */
844
+ export interface ISubTitle {
845
+ callIndex: number;
846
+ content: string;
847
+ type: string;
848
+ }
849
+ /**
850
+ * 字幕规则
851
+ *
852
+ * @property { string? } fontFamily 字体
853
+ * @property { string? } fontRGB 字体色
854
+ * @property { "1" | "0" } scroll 是否滚动
855
+ * @property { string? } action 动作
856
+ * @property { string } location 位置'top' | 'middle' | 'bottom'
857
+ * @property { string } fontSize 位置'small' | 'middle' | 'big'
858
+ * @property { string } backgroundAlpha 背景色
859
+ * @property { string } scrollSpeed 滚动速度
860
+ * @property { string } content 字幕内容
861
+ * @property { string } backgroundRGB 背景色
862
+ */
863
+ export interface ISubTitleContent {
864
+ fontFamily?: string;
865
+ fontRGB?: string;
866
+ scroll?: '1' | '0';
867
+ action?: 'push' | string;
868
+ location?: 'top' | 'middle' | 'bottom';
869
+ fontSize?: 'small' | 'middle' | 'big';
870
+ backgroundAlpha?: string;
871
+ scrollSpeed?: string;
872
+ content: string;
873
+ backgroundRGB?: string;
874
+ }
875
+ export declare type IAudioRenders = {
876
+ [key: string]: {
877
+ ele: any;
878
+ };
879
+ };
880
+ export declare type IVideoRenders = {
881
+ [key: string]: VideoManager & {
882
+ match?: boolean;
883
+ };
884
+ };
885
+ export interface IOutputCustomLayout {
886
+ [pid: string]: {
887
+ resolution: number;
888
+ quality: number;
889
+ };
890
+ }
891
+ /**
892
+ * 巡课云会议室
893
+ *
894
+ * @property { string } callUrl 云会议室callUri
895
+ * @property { number } conferenceNumberType 云会议室类型
896
+ * @property { string } deviceId
897
+ * @property { string } displayName 云会议室名称
898
+ * @property { string } number 云会议室号
899
+ */
900
+ export interface IConference {
901
+ callUrl: string;
902
+ conferenceNumberType: number;
903
+ deviceId: string;
904
+ displayName: string;
905
+ number: string;
906
+ }
907
+ /**
908
+ * 参会者信息
909
+ *
910
+ * @property { 0 | 1 } bulkRosterType 全量roster类型,0表示全量数据,1表示增量数据
911
+ * @property { IRoster[] } addRosterInfo 新增的roster信息 当bulkRosterType是0的时候,此参数表示全量数据
912
+ * @property { IRoster[] } changeRosterInfo 变化的roster信息
913
+ * @property { { participantId: string }[] } deleteRosterInfo 被删除的roster信息
914
+ */
915
+ export interface IBulkRoster {
916
+ bulkRosterType: 0 | 1;
917
+ addRosterInfo: IRoster[];
918
+ changeRosterInfo: IRoster[];
919
+ deleteRosterInfo: {
920
+ participantId: string;
921
+ }[];
922
+ }
923
+ export {};