@xylink/xy-rtc-sdk 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.MD +37 -37
  2. package/lib/action/index.d.ts +21 -6
  3. package/lib/enum/client.d.ts +15 -0
  4. package/lib/enum/contraints.d.ts +33 -96
  5. package/lib/enum/device.d.ts +1 -0
  6. package/lib/enum/errorCode.d.ts +58 -1
  7. package/lib/enum/i18n.d.ts +39 -0
  8. package/lib/enum/index.d.ts +65 -16
  9. package/lib/index.d.ts +11 -8
  10. package/lib/main/client.d.ts +101 -71
  11. package/lib/main/deviceManager.d.ts +23 -4
  12. package/lib/main/helper.d.ts +2 -2
  13. package/lib/main/iauth.d.ts +14 -1
  14. package/lib/main/layoutManager.d.ts +43 -13
  15. package/lib/main/meeting.d.ts +75 -21
  16. package/lib/main/peer.d.ts +70 -121
  17. package/lib/main/qualityManager.d.ts +38 -9
  18. package/lib/main/stream.d.ts +237 -104
  19. package/lib/main/videoManager.d.ts +1 -9
  20. package/lib/tools/dbManager.d.ts +106 -0
  21. package/lib/tools/detect.d.ts +2 -2
  22. package/lib/tools/enum.d.ts +1 -1
  23. package/lib/tools/httpClient.d.ts +4 -4
  24. package/lib/tools/i18n.d.ts +1 -1
  25. package/lib/tools/logger.d.ts +75 -74
  26. package/lib/tools/logger.worker.d.ts +13 -0
  27. package/lib/tools/quality.d.ts +113 -0
  28. package/lib/tools/quality.worker.d.ts +13 -0
  29. package/lib/tools/queue.d.ts +38 -3
  30. package/lib/tools/template.d.ts +8 -1
  31. package/lib/tools/utils.d.ts +8 -0
  32. package/lib/type/base.d.ts +2 -2
  33. package/lib/type/client.d.ts +286 -183
  34. package/lib/type/device.d.ts +21 -15
  35. package/lib/type/index.d.ts +3 -0
  36. package/lib/type/layout.d.ts +25 -6
  37. package/lib/type/logger.d.ts +112 -0
  38. package/lib/type/meeting.d.ts +29 -0
  39. package/lib/type/peer.d.ts +20 -0
  40. package/lib/type/quality.d.ts +101 -0
  41. package/lib/type/stream.d.ts +340 -102
  42. package/lib/xyrtc.cjs.js +1 -1
  43. package/lib/xyrtc.umd.js +1 -1
  44. package/package.json +119 -119
  45. package/lib/tools/db.d.ts +0 -85
@@ -1,100 +1,275 @@
1
+ import { FACING_MODE_LIST } from 'src/enum';
1
2
  import { IStatus } from './base';
2
3
  /**
3
4
  * MediaTrack状态
4
5
  *
5
- * @value ENABLED 默认状态,无异常
6
- * @value MUTE 流正在请求中
7
- * @value ENDED 流已关闭
6
+ * @param ENABLED 默认状态,无异常
7
+ * @param MUTE 流正在请求中
8
+ * @param ENDED 流已关闭
8
9
  */
9
- export declare type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
10
+ export type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
10
11
  /**
11
- * 自定义流类型
12
+ * 设备类型枚举列表
12
13
  *
13
- * @property { 'video' | 'audio' } kind 流类型,分video和audio
14
+ * @param VIDEO video 视频设备
15
+ * @param AUDIO audio 音频设备
14
16
  */
15
- export declare type TCustomStream = {
16
- kind: 'video' | 'audio';
17
- };
17
+ export declare enum DeviceKind {
18
+ VIDEO = "video",
19
+ AUDIO = "audio"
20
+ }
21
+ /**
22
+ * 设备类型枚举列表
23
+ *
24
+ * @param VIDEO video 视频设备
25
+ * @param AUDIO audio 音频设备
26
+ */
27
+ export type TDeviceKind = `${DeviceKind}`;
18
28
  /**
19
- * 采集Media流的状态
29
+ * 请流时,控制流的帧率
20
30
  *
21
- * @value NORMAL 正常
22
- * @value DOMSTRING 创建协商通道流
23
- * @value INVALID 失效
24
- * @value DISABLED 禁用状态,不允许采集此分辨率视频流
31
+ * @param 0 无
32
+ * @param 100 低帧率
33
+ * @param 200 高帧率
25
34
  */
26
- export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID' | 'DISABLED';
35
+ export type IMediaQualityType = 0 | 100 | 200;
36
+ /**
37
+ * content采集支持分辨率
38
+ *
39
+ * @param 720 1280*720
40
+ * @param 1080 1920*1080
41
+ */
42
+ export type IContentResolutionType = 720 | 1080;
43
+ /**
44
+ * 采集MediaStream状态
45
+ *
46
+ * @param NORMAL NORMAL 正常采集状态
47
+ * @param FAILED FAILED 采集失败状态,当前流采集失败/约束失败状态
48
+ * @param DISABLED DISABLED 禁用状态,不允许采集
49
+ * @param UNKNOWN UNKNOWN 初始化状态
50
+ */
51
+ export declare enum StreamStatus {
52
+ 'NORMAL' = "NORMAL",
53
+ 'FAILED' = "FAILED",
54
+ 'DISABLED' = "DISABLED",
55
+ 'UNKNOWN' = "UNKNOWN"
56
+ }
27
57
  /**
28
58
  * 自定义采集流时产生的状态
29
59
  *
30
- * @value NORMAL 采集正常
31
- * @value SEND_ONLY 仅发送(无权限、无设备等无流入会情况)
32
- * @value AUDIO_ONLY 仅采集麦克风流,视频流转仅接收模式
33
- * @value VIDEO_ONLY 仅采集摄像头流,麦克风转仅接收模式
34
- * @value FAILED 其他异常,无法入会
60
+ * @param NORMAL NORMAL 采集正常
61
+ * @param RECEIVE_ONLY RECEIVE_ONLY 仅发送(无权限、无设备等无流入会情况)
62
+ * @param NORMAL_AUDIO NORMAL_AUDIO 仅采集麦克风流,视频流转仅接收模式
63
+ * @param NORMAL_VIDEO NORMAL_VIDEO 仅采集摄像头流,麦克风转仅接收模式
64
+ * @param FAILED FAILED 其他异常
65
+ * @param UNKNOWN UNKNOWN 初始状态,未知情况
35
66
  */
36
- export declare type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' | 'VIDEO_ONLY' | 'FAILED';
67
+ export declare enum StreamCurrentType {
68
+ 'NORMAL' = "NORMAL",
69
+ 'NORMAL_VIDEO' = "NORMAL_VIDEO",
70
+ 'NORMAL_AUDIO' = "NORMAL_AUDIO",
71
+ 'RECEIVE_ONLY' = "RECEIVE_ONLY",
72
+ 'FAILED' = "FAILED",
73
+ 'UNKNOWN' = "UNKNOWN"
74
+ }
37
75
  /**
38
76
  * 自定义流类型
39
77
  *
40
- * @value contentStream 共享内容流
41
- * @value previewStream 本地预览流
42
- * @value pipelineStream 建立通道流
43
- * @value remoteStream 仅接收远端画面流
78
+ * @param CONTENT CONTENT 共享内容流
79
+ * @param PREVIEW PREVIEW 本地预览流
80
+ * @param PIPELINE PIPELINE 建立通道流
81
+ * @param REMOTE REMOTE 推送远端画面流
44
82
  */
45
- export declare type IStreamObjType = 'contentStream' | 'previewStream' | 'pipelineStream' | 'remoteStream';
83
+ export declare enum StreamType {
84
+ 'CONTENT' = "CONTENT",
85
+ 'PREVIEW' = "PREVIEW",
86
+ 'PIPELINE' = "PIPELINE",
87
+ 'REMOTE' = "REMOTE"
88
+ }
46
89
  /**
47
- * 请流时,控制流的帧率
90
+ * 分辨率枚举列表
91
+ */
92
+ export declare enum StreamResolution {
93
+ RS90 = 90,
94
+ RS180 = 180,
95
+ RS360 = 360,
96
+ RS720 = 720,
97
+ RS1080 = 1080
98
+ }
99
+ /**
100
+ * 帧率枚举列表
101
+ */
102
+ export declare enum StreamFrameRate {
103
+ FR30 = 30,
104
+ FR15 = 15,
105
+ FR8 = 8
106
+ }
107
+ /**
108
+ * 分辨率等级枚举列表
109
+ */
110
+ export declare enum StreamResolutionLevel {
111
+ LEVEL90 = 0,
112
+ LEVEL180 = 1,
113
+ LEVEL360 = 2,
114
+ LEVEL720 = 3,
115
+ LEVEL1080 = 4
116
+ }
117
+ /**
118
+ * 视频质量
48
119
  *
49
- * @value 100 低帧率
50
- * @value 200 高帧率
120
+ * @param LOW - 低画面质量,帧率会自动降低到15帧接收;
121
+ * @param NORMAL - 普通画面质量,会基于带宽信息自动在30/15帧切换;
122
+ * @param HIGH - 高画面质量,会优先匹配高帧率高分辨率画面;
51
123
  */
52
- export declare type IMediaQualityType = 0 | 100 | 200;
124
+ export declare enum VideoQuality {
125
+ LOW = 0,
126
+ NORMAL = 1,
127
+ HIGH = 2
128
+ }
53
129
  /**
54
- * content采集支持分辨率
130
+ * 流类型枚举列表
131
+ *
132
+ * @param VIDEO VIDEO 视频流
133
+ * @param AUDIO AUDIO 音频流
134
+ * @param ALL ALL 音频+视频流
135
+ */
136
+ export declare enum StreamKind {
137
+ VIDEO = "VIDEO",
138
+ AUDIO = "AUDIO",
139
+ ALL = "ALL"
140
+ }
141
+ /**
142
+ * 流来源
143
+ *
144
+ * @param SDK SDK 通过SDK内部创建
145
+ * @param CUSTOM CUSTOM 通过外部用户创建
146
+ */
147
+ export declare enum StreamOrigin {
148
+ 'SDK' = "SDK",
149
+ 'CUSTOM' = "CUSTOM"
150
+ }
151
+ /**
152
+ * 约束配置方式
153
+ *
154
+ * @param COMMON COMMON 通用配置
155
+ * @param ADVANCED ADVANCED 高级约束配置,强制约束采集
156
+ * @param FAILED FAILED 配置采集失败
157
+ */
158
+ export declare enum ConstraintMode {
159
+ 'COMMON' = "COMMON",
160
+ 'ADVANCED' = "ADVANCED",
161
+ 'FAILED' = "FAILED"
162
+ }
163
+ /**
164
+ * 联播模式
55
165
  *
56
- * @value 720 1280*720
57
- * @value 1080 1920*1080
166
+ * @param MULTI_RES MULTI_RESOLUTION 多路分辨率
167
+ * @param SCALE_RES SCALE_RESOLUTION 多路Scale分辨率
58
168
  */
59
- export declare type IContentResolutionType = 720 | 1080;
169
+ export declare enum SimulcastMode {
170
+ 'MULTI_RES' = "MULTI_RESOLUTION",
171
+ 'SCALE_RES' = "SCALE_RESOLUTION"
172
+ }
60
173
  /**
61
- * people采集支持分辨率
174
+ * 摄像头前置后置
62
175
  *
63
- * @value 180 320*180
64
- * @value 360 640*360
65
- * @value 720 1280*720
176
+ * @param user 前置
177
+ * @param environment 后置
66
178
  */
67
- export declare type IPeopleResolutionType = 180 | 360 | 720;
179
+ export type IDevicePosition = (typeof FACING_MODE_LIST)[number] | '';
180
+ /**
181
+ * 编码的优先级。在多个编码器存在的情况下,编码器的优先级决定了编码器的使用顺序
182
+ * 优先级的值越高,表示编码器的优先级越高,将会优先使用
183
+ *
184
+ * @param VERY_LOW very-low 编解码器优先级最低
185
+ * @param LOW low 默认值,编解码器优先级较低
186
+ * @param MEDIUM medium 编码器的优先级适中
187
+ * @param HIGH high 编码器的优先级较高,使编码器在其他编码器之前使用,以便在网络带宽受限的情况下,选择最优的编码器进行编码
188
+ */
189
+ export declare enum PriorityMode {
190
+ 'VERY_LOW' = "very-low",
191
+ 'LOW' = "low",
192
+ 'MEDIUM' = "medium",
193
+ 'HIGH' = "high"
194
+ }
195
+ /**
196
+ * 编解码器优先级
197
+ *
198
+ * @property { 'video' | 'audio' } kind - 流类型,分video和audio
199
+ */
200
+ export interface TCustomStream {
201
+ kind: 'video' | 'audio';
202
+ }
68
203
  /**
69
204
  * 自定义流数据
70
205
  *
71
- * @property { MediaStream | null } stream 采集设备流
72
- * @property { TCustomStream[] } domStream 协商通道流
73
- * @property { IStreamStatus } status 状态
74
- * @property { IStreamObjType } type 自定义流类型
75
- * @property { string } resolution 分辨率
206
+ * @property { StreamType } type - 自定义流类型
207
+ * @property { MediaStream | null } stream - 采集设备流
208
+ * @property { TCustomStream[] } pipeStream - 协商通道流
209
+ * @property { StreamStatus } status - 状态
210
+ * @property { StreamResolution } resolution - 分辨率
211
+ * @property { StreamFrameRate } frameRate - 帧率
212
+ * @property { StreamOrigin } origin - 创建源
213
+ * @property { StreamKind } kind - 流画面种类:Video/Audio
214
+ * @property { ConstraintMode } constraintMode - 失败的约束模式
215
+ * @property { SimulcastMode } simulcastMode - 联播模式:多分辨率模式或者RTPSender Scale裁剪
216
+ * @property { boolean } enableAspectRatio - 采集时是否支持设置视频流的宽高比, 默认支持
76
217
  */
77
- export interface IStreamObj {
218
+ export interface IStreamConfig {
219
+ id: string;
220
+ type: StreamType;
221
+ status: StreamStatus;
78
222
  stream: MediaStream | null;
79
- domStream: TCustomStream[];
80
- status: IStreamStatus;
81
- type: IStreamObjType;
82
- resolution: string;
223
+ pipeStream: TCustomStream[];
224
+ resolution: StreamResolution;
225
+ kind?: StreamKind;
226
+ frameRate?: StreamFrameRate;
227
+ origin?: StreamOrigin;
228
+ constraintMode?: ConstraintMode;
229
+ simulcastMode?: SimulcastMode;
230
+ priorityMode?: PriorityMode;
231
+ enableAspectRatio?: boolean;
83
232
  }
84
233
  /**
85
234
  * 流集合
86
235
  *
87
- * @property { IStreamObj[] } previewStreams 本地预览流
88
- * @property { IStreamObj[] } streams 发送远端流
89
- * @property { IStreamObj[] } pipelineStreams 协商通道流
90
- * @property { IStreamObj[] } contentStreams 共享内容流
236
+ * @property { IStreamConfig[] } previewStreams 本地预览流
237
+ * @property { IStreamConfig[] } streams 发送远端流
238
+ * @property { IStreamConfig[] } pipelineStreams 协商通道流
239
+ * @property { IStreamConfig[] } contentStreams 共享内容流
91
240
  */
92
241
  export interface IGetMediaStreams {
93
- previewStreams: IStreamObj[];
94
- streams: IStreamObj[];
95
- pipelineStreams: IStreamObj[];
96
- contentStreams: IStreamObj[];
242
+ previewStreams: IStreamConfig[];
243
+ streams: IStreamConfig[];
244
+ pipelineStreams: IStreamConfig[];
245
+ contentStreams: IStreamConfig[];
97
246
  }
247
+ /**
248
+ * 包含摄像头和共享视频的视频/音频的约束配置
249
+ *
250
+ * TODO:需要包含People和Content的约束类型
251
+ */
252
+ export type TConstraintsConfig = {
253
+ video: any;
254
+ audio: any;
255
+ };
256
+ /**
257
+ * Map所有分辨率的约束类型
258
+ */
259
+ export type IConstraintsConfigMap = {
260
+ [key in StreamResolution]?: Omit<{
261
+ [key in ConstraintMode]: TConstraintsConfig;
262
+ }, ConstraintMode.FAILED>;
263
+ };
264
+ /**
265
+ * 初始Remote预配置,基于此配置生成Stream Config
266
+ */
267
+ export type StreamsConfigMap = {
268
+ kind: StreamKind;
269
+ resolution: StreamResolution;
270
+ status: StreamStatus;
271
+ priorityMode?: PriorityMode;
272
+ };
98
273
  /**
99
274
  * Stream类采集流的状态和信息
100
275
  *
@@ -102,7 +277,7 @@ export interface IGetMediaStreams {
102
277
  * @property { string } detail 错误消息
103
278
  */
104
279
  export interface IStreamCurrent {
105
- type: IStreamCurrentType;
280
+ type: StreamCurrentType;
106
281
  detail: string | IStatus;
107
282
  }
108
283
  /**
@@ -129,12 +304,28 @@ export interface IPublishParams {
129
304
  * @property { string } type 类型
130
305
  */
131
306
  export interface IStreamSender {
132
- resolution: string;
307
+ resolution: StreamResolution;
133
308
  track: MediaStreamTrack | null;
134
309
  sender: RTCRtpSender;
135
310
  status: string;
136
- type: string;
311
+ type: StreamType;
312
+ id: string;
313
+ }
314
+ /**
315
+ * 封装Stream Sender
316
+ *
317
+ * @property { IStreamConfig } config - 自定义流配置
318
+ * @property { MediaStreamTrack | null } track - 当前通道发送的Track流
319
+ * @property { RTCRtpSender | null } sender - RTC发送器
320
+ */
321
+ export interface ISenderConfig {
322
+ config: IStreamConfig;
323
+ track: MediaStreamTrack | null;
324
+ sender: RTCRtpSender;
137
325
  }
326
+ export type ISenderMap = {
327
+ [key: string]: ISenderConfig;
328
+ };
138
329
  /**
139
330
  * Electron选择分享应用/屏幕资源
140
331
  *
@@ -155,19 +346,31 @@ export interface ISource {
155
346
  * stream init配置参数,用于在初始采集视频/音频流时指定设备信息
156
347
  *
157
348
  * @property { Object } devices 麦克风/摄像头/扬声器 设备id
158
- * @value { string } devices.audioInputValue 音频输入
159
- * @value { string } devices.videoInValue 视频输入
160
- * @value { string } devices.audioOutputValue 音频输出
349
+ * @property { string } devices.audioInputValue 音频输入
350
+ * @property { string } devices.videoInValue 视频输入
351
+ * @property { string } devices.audioOutputValue 音频输出
161
352
  */
162
- export declare type IStreamInitConfig = {
353
+ export interface IStreamInitConfig {
163
354
  devices: {
164
355
  audioInputValue?: string;
165
356
  videoInValue?: string;
166
357
  audioOutputValue?: string;
167
358
  };
359
+ }
360
+ /**
361
+ * stream init第二个参数配置
362
+ *
363
+ * @property { boolean } muteVideo - 是否是关闭摄像头入会,默认是true,关闭摄像头
364
+ * @property { boolean } muteAudio - 是否是关闭麦克风入会,默认是true,关闭麦克风
365
+ * @property { boolean } enabledCustomStream - 是否启用自定义视频流
366
+ */
367
+ export type IStreamInitParams = {
368
+ muteVideo?: boolean;
369
+ muteAudio?: boolean;
370
+ enabledCustomStream?: boolean;
168
371
  };
169
372
  /**
170
- * Internels 统计数据
373
+ * Internals 统计数据
171
374
  *
172
375
  * @property { number } bytesReceived 接收的字节总数
173
376
  * @property { number } bytesReceivedSecond 每秒接收字节数
@@ -178,7 +381,8 @@ export declare type IStreamInitConfig = {
178
381
  * @property { number } roundTripTime 往返延时 (ms)
179
382
  * @property { number } fractionLostSent 视频发送的丢包率
180
383
  * @property { number } fractionLostReceived 视频接受的丢包率
181
- * @property { string } mimeType 视频类型
384
+ * @property { string } mimeType 视频Codec类型
385
+ * @property { string } audioMimeType 音频Codec类型
182
386
  * @property { number } timestamp 时间戳
183
387
  * @property { [prop: string]: IReceiver } receiver 所有接收视频的列表数据
184
388
  * @property { [prop: string]: ISender } sender 所有发送视频的列表数据
@@ -187,7 +391,7 @@ export declare type IStreamInitConfig = {
187
391
  * @property { number } audioSendLost 音频发送的丢包率
188
392
  * @property { number } audioRecvLost 音频接受的丢包率
189
393
  */
190
- export interface IInternels {
394
+ export interface IInternals {
191
395
  bytesReceived: number;
192
396
  bytesReceivedSecond: number;
193
397
  bytesSent: number;
@@ -199,6 +403,7 @@ export interface IInternels {
199
403
  fractionLostSent: number;
200
404
  fractionLostReceived: number;
201
405
  mimeType: string;
406
+ audioMimeType: string;
202
407
  timestamp: number;
203
408
  receiver: {
204
409
  [prop: string]: IReceiver;
@@ -215,6 +420,7 @@ export interface IInternels {
215
420
  audioSendLost?: number;
216
421
  audioRecvLost?: number;
217
422
  }
423
+ export type IInternels = IInternals;
218
424
  /**
219
425
  * 接收器 Receiver 统计数据
220
426
  * 详情可参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcreceivedrtpstreamstats-members
@@ -254,33 +460,33 @@ export interface IInternels {
254
460
  * @property { number } removedSamplesForAcceleration
255
461
  */
256
462
  export interface IReceiver {
257
- bytesReceived: number;
258
- bytesReceivedSecond: number;
259
- frameHeight: number;
260
- frameWidth: number;
261
- framesDecoded: number;
262
- framesDecodedSecond: number;
263
- framesReceived: number;
264
- framesReceivedSecond: number;
265
- isContent: boolean;
266
- isSupport: boolean;
267
- jitterBufferDelay: number;
268
- keyFramesDecoded: number;
269
- nackCount: number;
270
- name: string;
271
- packetsReceived: number;
272
- packetsReceivedSecond: number;
273
- packetsLost: number;
274
- packetsLostSecond: number;
275
- pliCount: number;
276
- timestamp: number;
277
- type: string;
278
- expResolution: number;
279
- status: string;
280
- framesPerSecond: number;
281
- framesDropped: number;
282
- ssrc: string;
283
- jitter: number;
463
+ bytesReceived?: number;
464
+ bytesReceivedSecond?: number;
465
+ frameHeight?: number;
466
+ frameWidth?: number;
467
+ framesDecoded?: number;
468
+ framesDecodedSecond?: number;
469
+ framesReceived?: number;
470
+ framesReceivedSecond?: number;
471
+ isContent?: boolean;
472
+ isSupport?: boolean;
473
+ jitterBufferDelay?: number;
474
+ keyFramesDecoded?: number;
475
+ nackCount?: number;
476
+ name?: string;
477
+ packetsReceived?: number;
478
+ packetsReceivedSecond?: number;
479
+ packetsLost?: number;
480
+ packetsLostSecond?: number;
481
+ pliCount?: number;
482
+ timestamp?: number;
483
+ type?: string;
484
+ expResolution?: number;
485
+ status?: string;
486
+ framesPerSecond?: number;
487
+ framesDropped?: number;
488
+ ssrc?: string;
489
+ jitter?: number;
284
490
  endpointId?: string;
285
491
  participantId?: number;
286
492
  mimeType?: string;
@@ -341,9 +547,9 @@ export interface ISender {
341
547
  packetsSent: number;
342
548
  packetsSentSecond: number;
343
549
  timestamp: number;
344
- type: string;
550
+ type: StreamType;
345
551
  expBandwidth: number;
346
- resolution: string;
552
+ resolution: StreamResolution;
347
553
  pliCount: number;
348
554
  firCount: number;
349
555
  nackCount: number;
@@ -365,10 +571,10 @@ export interface ISender {
365
571
  * @property { number } width 采集分辨率-width
366
572
  * @property { number } height 采集分辨率-height
367
573
  */
368
- export interface IBASE_CONTRAINTS {
574
+ export interface I_PEOPLE_CONSTRAINTS {
369
575
  frameRate?: ConstrainDouble;
370
- aspectRatio: number;
371
- resizeMode: 'crop-and-scale';
576
+ aspectRatio?: number;
577
+ resizeMode?: 'crop-and-scale';
372
578
  width?: number;
373
579
  height?: number;
374
580
  }
@@ -382,10 +588,10 @@ export interface IBASE_CONTRAINTS {
382
588
  * @property { boolean } logicalSurface 指示是否允许用户选择不直接对应于显示区域的源表面;
383
589
  * 详见:https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/logicalSurface
384
590
  */
385
- export interface ICONTENT_CONTRAINTS {
591
+ export interface I_CONTENT_CONSTRAINTS {
386
592
  cursor: string;
387
- aspectRatio: number;
388
- resizeMode: 'crop-and-scale';
593
+ aspectRatio?: number;
594
+ resizeMode?: 'crop-and-scale';
389
595
  logicalSurface: true;
390
596
  frameRate?: ConstrainDouble;
391
597
  }
@@ -425,3 +631,35 @@ export interface IStreamChangeListType {
425
631
  content: IStreamChange[];
426
632
  people: IStreamChange[];
427
633
  }
634
+ /**
635
+ * 采集控制
636
+ *
637
+ * @param CAPTURE CAPTURE 启用采集
638
+ * @param KEEP KEEP 不处理
639
+ * @param FAILED FAILED 采集失败
640
+ */
641
+ export declare enum CaptureStatus {
642
+ 'CAPTURE' = "CAPTURE",
643
+ 'KEEP' = "KEEP",
644
+ 'FAILED' = "FAILED"
645
+ }
646
+ /**
647
+ * 视频/音频采集状态控制
648
+ */
649
+ export interface IEnabledCapture {
650
+ video: CaptureStatus;
651
+ audio: CaptureStatus;
652
+ }
653
+ export interface BaseStreamErrorParams {
654
+ type: StreamKind;
655
+ videoCapture: CaptureStatus;
656
+ audioCapture: CaptureStatus;
657
+ }
658
+ export interface ICreateContentConfig {
659
+ screenAudio?: boolean;
660
+ }
661
+ export interface IFrameRateConfig {
662
+ frameRate?: ConstrainDouble;
663
+ }
664
+ export interface ISteamConfig {
665
+ }