@xylink/xy-rtc-sdk 3.10.0-beta.4 → 4.0.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 (118) hide show
  1. package/README.MD +36 -13
  2. package/lib/action/index.d.ts +61 -45
  3. package/lib/enum/analyser.d.ts +7 -0
  4. package/lib/enum/client.d.ts +8 -2
  5. package/lib/enum/constraints.d.ts +11 -16
  6. package/lib/enum/device.d.ts +0 -6
  7. package/lib/enum/errorCode.d.ts +5 -2
  8. package/lib/enum/index.d.ts +45 -7
  9. package/lib/enum/polling.d.ts +2 -0
  10. package/lib/feature/customMessage/index.d.ts +29 -0
  11. package/lib/feature/edu/index.d.ts +34 -0
  12. package/lib/feature/edu/index.type.d.ts +29 -0
  13. package/lib/feature/index.d.ts +3 -1
  14. package/lib/feature/{speaker.d.ts → speaker/index.d.ts} +29 -9
  15. package/lib/feature/speaker/index.type.d.ts +17 -0
  16. package/lib/index.d.ts +82 -28
  17. package/lib/interface/baseModule.type.d.ts +9 -0
  18. package/lib/interface/clientInterface.type.d.ts +128 -0
  19. package/lib/interface/contentTrackInterface.type.d.ts +15 -0
  20. package/lib/interface/event.type.d.ts +444 -0
  21. package/lib/interface/videoAudioTrackInterface.type.d.ts +17 -0
  22. package/lib/main/ability/const.d.ts +4 -1
  23. package/lib/main/ability/index.d.ts +7 -1
  24. package/lib/main/{auth.d.ts → auth/index.d.ts} +29 -19
  25. package/lib/main/client.d.ts +594 -633
  26. package/lib/main/clientBase.d.ts +40 -0
  27. package/lib/main/clientState.d.ts +56 -0
  28. package/lib/main/{deviceManager.d.ts → device/index.d.ts} +45 -13
  29. package/lib/{type/device.d.ts → main/device/index.type.d.ts} +65 -16
  30. package/lib/main/helper/index.d.ts +118 -0
  31. package/lib/main/helper/index.type.d.ts +12 -0
  32. package/lib/main/layout/index.d.ts +118 -105
  33. package/lib/main/layout/index.type.d.ts +282 -0
  34. package/lib/main/layout/polling.d.ts +212 -0
  35. package/lib/main/layout/state.d.ts +163 -0
  36. package/lib/main/layout/template.d.ts +15 -7
  37. package/lib/main/media/index.d.ts +177 -0
  38. package/lib/main/media/index.type.d.ts +29 -0
  39. package/lib/main/meeting/control.d.ts +107 -0
  40. package/lib/main/meeting/control.type.d.ts +24 -0
  41. package/lib/main/{meeting.d.ts → meeting/index.d.ts} +51 -7
  42. package/lib/main/meeting/verify.d.ts +70 -0
  43. package/lib/main/meeting/verify.type.d.ts +12 -0
  44. package/lib/main/peer.d.ts +120 -41
  45. package/lib/main/plugin/index.d.ts +28 -0
  46. package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
  47. package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
  48. package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
  49. package/lib/main/render/index.d.ts +116 -0
  50. package/lib/main/render/index.type.d.ts +36 -0
  51. package/lib/main/{videoManager.d.ts → render/videoManager.d.ts} +78 -28
  52. package/lib/main/render/videoManager.type.d.ts +66 -0
  53. package/lib/main/roster/index.d.ts +39 -0
  54. package/lib/main/server/index.d.ts +79 -0
  55. package/lib/main/server/index.type.d.ts +21 -0
  56. package/lib/main/signal/index.d.ts +15 -0
  57. package/lib/main/socket/index.d.ts +95 -0
  58. package/lib/main/stream/index.d.ts +182 -0
  59. package/lib/main/track/baseTrack.d.ts +178 -0
  60. package/lib/main/track/contentTrack.d.ts +168 -0
  61. package/lib/main/track/customContentTrack.d.ts +18 -0
  62. package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
  63. package/lib/main/track/helper.d.ts +53 -0
  64. package/lib/main/track/videoAudioCapture.d.ts +90 -0
  65. package/lib/main/track/videoAudioTrack.d.ts +273 -0
  66. package/lib/main/vom/index.d.ts +44 -0
  67. package/lib/main/vom/index.type.d.ts +1 -0
  68. package/lib/tools/analyser.d.ts +30 -7
  69. package/lib/tools/analyserManager.d.ts +55 -0
  70. package/lib/tools/dbManager.d.ts +12 -1
  71. package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
  72. package/lib/tools/detectStream/index.d.ts +84 -0
  73. package/lib/tools/detectStream/index.type.d.ts +56 -0
  74. package/lib/tools/detectTool/index.d.ts +191 -0
  75. package/lib/tools/detectTool/index.type.d.ts +51 -0
  76. package/lib/tools/emitter.d.ts +27 -6
  77. package/lib/tools/enum.d.ts +1 -1
  78. package/lib/tools/httpClient.d.ts +5 -1
  79. package/lib/tools/i18n.d.ts +1 -1
  80. package/lib/tools/index.d.ts +1 -8
  81. package/lib/tools/log/logger.d.ts +44 -24
  82. package/lib/tools/log/logger.worker.d.ts +1 -1
  83. package/lib/tools/log/loggerManager.d.ts +3 -2
  84. package/lib/tools/pressure/index.d.ts +33 -0
  85. package/lib/tools/pressure/index.type.d.ts +22 -0
  86. package/lib/tools/promiseQueue.d.ts +6 -0
  87. package/lib/tools/regex.d.ts +4 -0
  88. package/lib/tools/resize.d.ts +3 -0
  89. package/lib/tools/snapshot.d.ts +1 -1
  90. package/lib/tools/socket.d.ts +12 -2
  91. package/lib/tools/template/index.d.ts +11 -88
  92. package/lib/tools/template/mobile.d.ts +1 -1
  93. package/lib/tools/template/polling.d.ts +8 -0
  94. package/lib/tools/utils.d.ts +25 -16
  95. package/lib/tools/verify.d.ts +7 -0
  96. package/lib/type/ability.d.ts +1 -1
  97. package/lib/type/analyser.d.ts +26 -1
  98. package/lib/type/auth.d.ts +22 -22
  99. package/lib/type/base.d.ts +36 -32
  100. package/lib/type/capture.d.ts +9 -0
  101. package/lib/type/client.d.ts +379 -498
  102. package/lib/type/index.d.ts +25 -2
  103. package/lib/type/layout.d.ts +84 -47
  104. package/lib/type/logger.d.ts +19 -12
  105. package/lib/type/meeting.d.ts +89 -68
  106. package/lib/type/peer.d.ts +65 -1
  107. package/lib/type/polling.d.ts +194 -0
  108. package/lib/type/quality.d.ts +16 -6
  109. package/lib/type/socket.d.ts +0 -18
  110. package/lib/type/stream.d.ts +138 -108
  111. package/lib/type/track.d.ts +139 -0
  112. package/lib/xyrtc.cjs.js +1 -1
  113. package/lib/xyrtc.umd.js +1 -1
  114. package/package.json +13 -10
  115. package/lib/main/clientImplements.d.ts +0 -99
  116. package/lib/main/helper.d.ts +0 -104
  117. package/lib/main/stream.d.ts +0 -418
  118. package/lib/tools/detect.d.ts +0 -44
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 设备压力等级
3
+ *
4
+ * @param nominal - 正常,目标设备的状况处于可接受的水平,对用户没有明显的不利影响
5
+ * @param fair - 一般,设备压力略有升高,风扇活跃,除此之外,设备可以运行正常
6
+ * @param serious - 严重-设备压力持续大幅度升高,系统可能进行节流减少压力和热量
7
+ * @param critical - 恶略-设备温度显著升高,需要冷却以避免任何潜在问题
8
+ */
9
+ export declare enum PressureState {
10
+ 'nominal' = 0,
11
+ 'fair' = 1,
12
+ 'serious' = 2,
13
+ 'critical' = 3
14
+ }
15
+ /**
16
+ * 压力数据
17
+ */
18
+ export interface XYDevicePressureState {
19
+ source: string;
20
+ state: PressureState;
21
+ time: number;
22
+ }
@@ -31,6 +31,12 @@ declare class PromiseQueue<T> {
31
31
  * @param { Fn } reject - Reject函数
32
32
  */
33
33
  private execute;
34
+ /**
35
+ * 队列任务是否执行完成
36
+ *
37
+ * @returns { boolean } - 结果,真假值
38
+ */
39
+ isTaskEnded(): boolean;
34
40
  /**
35
41
  * 获取执行中的任务数量
36
42
  *
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 匹配除了大小写字母、数字、汉字以及空格、特定的标点符号((-_--.))和特殊字符之外的任何字符
3
+ */
4
+ export declare const specialCharactersRegex: RegExp;
@@ -6,6 +6,9 @@
6
6
  * Created at : 2022-10-31 17:18:32
7
7
  * Last modified : 2022-10-31 17:56:04
8
8
  */
9
+ /**
10
+ * 元素尺寸数据
11
+ */
9
12
  export interface ResizeData {
10
13
  width: number;
11
14
  height: number;
@@ -6,7 +6,7 @@
6
6
  * Created at : 2023-08-30 15:24:24
7
7
  * Last modified : 2023-09-12 18:03:44
8
8
  */
9
- import { SnapshotOptions, SnapshotResult } from '../type';
9
+ import { SnapshotOptions, SnapshotResult } from '../type/index';
10
10
  declare class Snapshot {
11
11
  private canvas;
12
12
  private ctx;
@@ -4,9 +4,9 @@
4
4
  * @date 2019-10-24 12:01:27
5
5
  */
6
6
  import Logger from './log/logger';
7
- import { SocketOptions } from '../type/socket';
7
+ import { SocketOptions, XYSocketEventKey } from '../type/index';
8
8
  import Emitter from './emitter';
9
- declare class Socket extends Emitter {
9
+ declare class Socket extends Emitter<XYSocketEventKey> {
10
10
  socket: WebSocket;
11
11
  private options;
12
12
  private heatBeatFrequency;
@@ -23,6 +23,16 @@ declare class Socket extends Emitter {
23
23
  private reconnectTimer;
24
24
  private taskQueue;
25
25
  constructor(options: SocketOptions, logger: Logger);
26
+ /**
27
+ * 设置参数
28
+ *
29
+ * @param { any } params
30
+ */
31
+ setParams(params: any): void;
32
+ /**
33
+ * token过期 重连
34
+ */
35
+ handleReConnect(params?: any): void;
26
36
  /**
27
37
  * 连接socket
28
38
  *
@@ -4,7 +4,7 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-24 20:41:38
6
6
  */
7
- import { ITemplate, TemplateType, VideoQuality, StreamResolutionLevel, TemplateInfos } from '../../type';
7
+ import { ITemplate, TemplateType, VideoQuality, StreamResolutionLevel, TemplateInfos } from '../../type/index';
8
8
  export * from './mobile';
9
9
  export declare const RATE = 0.5625;
10
10
  export declare const HIDE_POSITION: number[];
@@ -67,15 +67,6 @@ export declare const SPEAKER_TEMPLATE: {
67
67
  };
68
68
  type: TemplateType;
69
69
  quality: VideoQuality;
70
- } | {
71
- position: number[];
72
- resolution: {
73
- normal: StreamResolutionLevel;
74
- low: StreamResolutionLevel;
75
- high?: undefined;
76
- };
77
- type: TemplateType;
78
- quality?: undefined;
79
70
  } | {
80
71
  position: number[];
81
72
  resolution: {
@@ -95,15 +86,6 @@ export declare const SPEAKER_TEMPLATE: {
95
86
  };
96
87
  type: TemplateType;
97
88
  quality: VideoQuality;
98
- } | {
99
- position: number[];
100
- resolution: {
101
- normal: StreamResolutionLevel;
102
- low: StreamResolutionLevel;
103
- high?: undefined;
104
- };
105
- type: TemplateType;
106
- quality?: undefined;
107
89
  } | {
108
90
  position: number[];
109
91
  resolution: {
@@ -123,15 +105,6 @@ export declare const SPEAKER_TEMPLATE: {
123
105
  };
124
106
  type: TemplateType;
125
107
  quality: VideoQuality;
126
- } | {
127
- position: number[];
128
- resolution: {
129
- normal: StreamResolutionLevel;
130
- low: StreamResolutionLevel;
131
- high?: undefined;
132
- };
133
- type: TemplateType;
134
- quality?: undefined;
135
108
  } | {
136
109
  position: number[];
137
110
  resolution: {
@@ -151,15 +124,6 @@ export declare const SPEAKER_TEMPLATE: {
151
124
  };
152
125
  type: TemplateType;
153
126
  quality: VideoQuality;
154
- } | {
155
- position: number[];
156
- resolution: {
157
- normal: StreamResolutionLevel;
158
- low: StreamResolutionLevel;
159
- high?: undefined;
160
- };
161
- type: TemplateType;
162
- quality?: undefined;
163
127
  } | {
164
128
  position: number[];
165
129
  resolution: {
@@ -179,15 +143,6 @@ export declare const SPEAKER_TEMPLATE: {
179
143
  };
180
144
  type: TemplateType;
181
145
  quality: VideoQuality;
182
- } | {
183
- position: number[];
184
- resolution: {
185
- normal: StreamResolutionLevel;
186
- low: StreamResolutionLevel;
187
- high?: undefined;
188
- };
189
- type: TemplateType;
190
- quality?: undefined;
191
146
  } | {
192
147
  position: number[];
193
148
  resolution: {
@@ -208,8 +163,9 @@ export declare const GALLERY_TEMPLATE: {
208
163
  high: StreamResolutionLevel;
209
164
  };
210
165
  type: TemplateType;
166
+ quality: VideoQuality;
211
167
  }[];
212
- '2-1': ({
168
+ '2-1': {
213
169
  position: number[];
214
170
  resolution: {
215
171
  normal: StreamResolutionLevel;
@@ -218,51 +174,17 @@ export declare const GALLERY_TEMPLATE: {
218
174
  };
219
175
  type: TemplateType;
220
176
  quality: VideoQuality;
221
- } | {
177
+ }[];
178
+ '3-1': {
222
179
  position: number[];
223
180
  resolution: {
224
181
  normal: StreamResolutionLevel;
225
182
  low: StreamResolutionLevel;
226
- high: StreamResolutionLevel;
227
- };
228
- type: TemplateType;
229
- quality?: undefined;
230
- })[];
231
- '3-1': ({
232
- position: number[];
233
- resolution: {
234
- normal: number;
235
- low: StreamResolutionLevel;
236
- };
237
- type: TemplateType;
238
- quality: VideoQuality;
239
- } | {
240
- position: number[];
241
- resolution: {
242
- normal: number;
243
- low: StreamResolutionLevel;
244
- };
245
- type: TemplateType;
246
- quality?: undefined;
247
- })[];
248
- '4-1': ({
249
- position: number[];
250
- resolution: {
251
- normal: number;
252
- low: StreamResolutionLevel;
253
183
  };
254
184
  type: TemplateType;
255
185
  quality: VideoQuality;
256
- } | {
257
- position: number[];
258
- resolution: {
259
- normal: number;
260
- low: StreamResolutionLevel;
261
- };
262
- type: TemplateType;
263
- quality?: undefined;
264
- })[];
265
- '5-1': ({
186
+ }[];
187
+ '4-1': {
266
188
  position: number[];
267
189
  resolution: {
268
190
  normal: StreamResolutionLevel;
@@ -270,15 +192,16 @@ export declare const GALLERY_TEMPLATE: {
270
192
  };
271
193
  type: TemplateType;
272
194
  quality: VideoQuality;
273
- } | {
195
+ }[];
196
+ '5-1': {
274
197
  position: number[];
275
198
  resolution: {
276
199
  normal: StreamResolutionLevel;
277
200
  low: StreamResolutionLevel;
278
201
  };
279
202
  type: TemplateType;
280
- quality?: undefined;
281
- })[];
203
+ quality: VideoQuality;
204
+ }[];
282
205
  '6-1': {
283
206
  position: number[];
284
207
  resolution: {
@@ -4,6 +4,6 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-24 20:41:38
6
6
  */
7
- import { ITemplate } from '../../type';
7
+ import { ITemplate } from '../../type/index';
8
8
  export declare const COMMON_MOBILE_VERTICAL_TEMPLATE: ITemplate;
9
9
  export declare const COMMON_MOBILE_HORIZONTAL_TEMPLATE: ITemplate;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Polling layout template data
3
+ *
4
+ * @authors Luo-jinghui (luojinghui424@gmail.com)
5
+ * @date 2024-02-26 16:41:38
6
+ */
7
+ import { Template } from '../../type/index';
8
+ export declare const POLLING_TEMPLATE: Template;
@@ -3,7 +3,7 @@
3
3
  * @authors Luo-jinghui (luojinghui424@gmail.com)
4
4
  * @date 2019-11-08 15:54:21
5
5
  */
6
- import { IReturnResult } from '../type';
6
+ import { IReturnResult } from '../type/index';
7
7
  /**
8
8
  * 防抖函数
9
9
  *
@@ -38,7 +38,7 @@ export declare const getTime: () => string;
38
38
  */
39
39
  export declare const getMillTime: () => string;
40
40
  /**
41
- * 计算两个时间戳相差的天数
41
+ * 计算两个时间戳相差的天数, 四舍五入保留一位小数
42
42
  *
43
43
  * @param { number } time1 - 时间戳1
44
44
  * @param { number } time2 - 时间戳2
@@ -49,19 +49,13 @@ export declare function mapToObj<T>(data: Map<string, T>): {
49
49
  [key: string]: T;
50
50
  };
51
51
  export declare const getStatus: (code: string, detail?: any, msg?: string) => IReturnResult;
52
- export declare const getMeetingStatus: (success: boolean, code?: string, msg?: string) => {
53
- success: boolean;
54
- data: {
55
- code: string;
56
- msg: string;
57
- };
58
- } | {
59
- success: boolean;
60
- data: {
61
- code?: undefined;
62
- msg?: undefined;
63
- };
64
- };
52
+ /**
53
+ * 隐藏关键信息
54
+ *
55
+ * @param { any } data - 需要隐藏的信息
56
+ * @param { string | string[] } key - 需要隐藏的key
57
+ * @returns - 隐藏后的信息
58
+ */
65
59
  export declare const hideKeyInfo: (data: any, key: string | string[]) => any;
66
60
  /**
67
61
  * 判断值类型
@@ -73,6 +67,7 @@ export declare const TYPEOF: {
73
67
  isString(str: any): boolean;
74
68
  isBoolean(str: any): boolean;
75
69
  isUndefined(str: any): boolean;
70
+ isFunction(val: any): boolean;
76
71
  isLetter(val: any): boolean;
77
72
  isChinese(val: any): boolean;
78
73
  isNumberText(val: any): boolean;
@@ -85,4 +80,18 @@ export declare const TYPEOF: {
85
80
  * @param { any } jsonString
86
81
  * @returns { object}
87
82
  */
88
- export declare const jsonStringToObject: (jsonString: any) => any;
83
+ export declare const jsonParse: (jsonString: any) => any;
84
+ /**
85
+ * 字符串转 JSON 字符串
86
+ *
87
+ * @param {string|object} value
88
+ * @returns {string}
89
+ */
90
+ export declare const jsonStringify: (value: string | object) => string;
91
+ /**
92
+ * 清空中文/英文括号和括号内部的内容,返回一个新的字符串
93
+ *
94
+ * @param { string } str - 元数据字符串
95
+ * @returns { string }
96
+ */
97
+ export declare const clearBrackets: (str: string) => string;
@@ -5,3 +5,10 @@
5
5
  * @returns isValid true:有效, false: 无效
6
6
  */
7
7
  export declare const verifyReqListParams: (reqList: any) => boolean;
8
+ /**
9
+ * 校验必填参数
10
+ *
11
+ * @param { Record<string, any> | any } requiredField 校验参数
12
+ * @returns
13
+ */
14
+ export declare const verifyRequiredField: (requiredField: Record<string, any> | any) => import("..").IReturnResult | null;
@@ -2,7 +2,7 @@
2
2
  * 能力集 key
3
3
  *
4
4
  * @param { string } USE_SEC_API - 终端是否要使用uss新接口
5
- * @param { string } MEETING_SHARE_NEW_PAGE_API - 终端是否要使用uss新接口
5
+ * @param { string } MEETING_SHARE_NEW_PAGE_API - 会议邀请漏洞修复使用新page API
6
6
  */
7
7
  export declare enum AbilityKey {
8
8
  USE_SEC_API = "use_sec_api",
@@ -4,15 +4,40 @@
4
4
  * @summary short description for the file
5
5
  *
6
6
  * Created at : 2023-09-05 17:17:12
7
- * Last modified : 2023-09-08 15:37:56
7
+ * Last modified : 2024-04-23 19:08:08
8
8
  */
9
+ import { AudioAnalyser } from '../tools/analyser';
9
10
  /**
10
11
  * 分析器配置
11
12
  *
12
13
  * @param { number } fftSize - 执行快速傅里叶变换 (FFT) 以获得频域数据时使用的样本窗口大小,可选值:32/64/125/256/512/1024/2048
13
14
  * @param { number } cardinalNumber - 转换0-128的基数,默认是1:1,配置128,如果将声量转为1:2效果,则配置为64,依此类推
15
+ * @param { string } prefix - 分析器前缀
14
16
  */
15
17
  export interface AnalyserConfig {
16
18
  fftSize?: number;
17
19
  cardinalNumber?: number;
20
+ prefix?: string;
21
+ }
22
+ /**
23
+ * Analyser分析器运行状态
24
+ *
25
+ * @property RUNNING - 正在使用中
26
+ * @property ENDED - 已结束
27
+ */
28
+ export declare enum AnalyserState {
29
+ RUNNING = "RUNNING",
30
+ ENDED = "ENDED"
31
+ }
32
+ /**
33
+ * Analyser分析器
34
+ *
35
+ * @param { AnalyserState } state - 分析器状态
36
+ * @param { AudioAnalyser } analyser - 分析器
37
+ * @param { string } streamId - 音频流Id
38
+ */
39
+ export interface AnalyserNode {
40
+ state: AnalyserState;
41
+ analyser: AudioAnalyser;
42
+ streamId: string;
18
43
  }
@@ -11,12 +11,12 @@ export declare enum LoginType {
11
11
  ExtToken = 2
12
12
  }
13
13
  /**
14
- * 三方用户统一认证登录 - 小鱼账号登录 参数
14
+ * 三方用户统一认证登录 - 小鱼账号登录参数
15
15
  *
16
- * @param { string } account - 用户账号
17
- * @param { string } password - 用户密码
18
- * @param { string? } countryCode - 国家码:默认+86
19
- * @param { string? } extId - 企业ID
16
+ * @param { string } account - 必填,用户账号
17
+ * @param { string } password - 必填,用户密码
18
+ * @param { string? } countryCode - 可选,国家码:默认+86
19
+ * @param { string? } extId - 必填,企业ID
20
20
  */
21
21
  export interface LoginXYAccountParams {
22
22
  account: string;
@@ -27,7 +27,7 @@ export interface LoginXYAccountParams {
27
27
  /**
28
28
  * 三方用户统一认证登录 - 用户ID参数
29
29
  *
30
- * @param { string } extUserId - 三方用户ID
30
+ * @param { string } extUserId - 必填,三方用户ID
31
31
  * @param { string } authCode - 登录码
32
32
  * @param { string } displayName - 用户名称
33
33
  * @param { boolean? } tempUser - 是否临时用户
@@ -43,8 +43,8 @@ export interface LoginExtUserIdParams {
43
43
  /**
44
44
  * 三方用户统一认证登录 - token登录
45
45
  *
46
- * @param { string } authCode - 登录码
47
- * @param { string? } extId - 企业ID
46
+ * @param { string } authCode - 必填,登录码
47
+ * @param { string? } extId - 必填,企业ID
48
48
  */
49
49
  export interface LoginExtTokenParams {
50
50
  authCode: string;
@@ -57,13 +57,13 @@ interface LoginParamsTemp extends LoginXYAccountParams, LoginExtUserIdParams, Lo
57
57
  */
58
58
  export type LoginParams = Partial<LoginParamsTemp>;
59
59
  /**
60
- * 第三方登录用户信息
60
+ * 第三方登录用户信息/授权码登录信息
61
61
  *
62
- * @property { string } displayName 用户名称
63
- * @property { string } extId 企业id
64
- * @property { string } extUserId 三方用户ID
65
- * @property { string } authCode 授权码
66
- * @property { boolean } tempUser 临时账号
62
+ * @property { string } displayName - 必填,用户名称
63
+ * @property { string } extId - 必填,企业id
64
+ * @property { string } extUserId - 可选,三方用户ID
65
+ * @property { string } authCode - 可选,授权码
66
+ * @property { boolean } tempUser - 可选,临时账号,默认是false,不是临时用户
67
67
  */
68
68
  export interface ILoginExtAccount {
69
69
  displayName: string;
@@ -85,21 +85,21 @@ export interface ISdkUserInfo {
85
85
  extId?: string;
86
86
  }
87
87
  /**
88
- * 授权码登录
88
+ * 三方账号统一认证登录-授权码登录信息
89
89
  *
90
- * @property { string } extId 企业id
91
- * @property { string } extUserId 用户id
92
- * @property { string } displayName 用户名
93
- * @property { string } oauthCode 授权码
94
- * @property { boolean } isTempUser 是否是临时账号
95
- * @property { string } channelId 渠道id
90
+ * @property { string } extId 0 - 必填,企业id
91
+ * @property { string } extUserId - 必填,用户id
92
+ * @property { string } displayName - 必填,用户名
93
+ * @property { string } oauthCode - 必填,授权码
94
+ * @property { string } channelId - 必填,渠道id
95
+ * @property { boolean? } isTempUser - 可选,是否是临时账号
96
96
  */
97
97
  export interface ILoginWidthAuthCode {
98
98
  extId: string;
99
99
  extUserId: string;
100
100
  displayName: string;
101
101
  oauthCode: string;
102
- isTempUser: boolean;
103
102
  channelId: string;
103
+ isTempUser?: boolean;
104
104
  }
105
105
  export {};
@@ -1,39 +1,19 @@
1
1
  /**
2
- * SDK对外回调错误消息
3
- *
4
- * @property { string } code 错误码
5
- * @property { string } msg 错误信息
6
- * @property { any } detail 数据详情
7
- */
8
- export interface IStatus {
9
- code: string;
10
- msg: string;
11
- detail: any;
12
- }
13
- /**
14
- * 国际化,目前只支持 英文、中文、繁体
2
+ * 国际化语言,支持英文、中文简体、中文繁体
15
3
  *
16
4
  */
17
5
  export type TLocale = 'en_US' | 'zh_CN' | 'zh_TW';
18
6
  /**
19
- * 是否支持入会
20
- */
21
- export interface ICheckSystemRequirements {
22
- result: boolean;
23
- detail: {
24
- isSupportRTC: boolean;
25
- isSupportWebsocket: boolean;
26
- isSupportBrowser: boolean;
27
- isSupportMobileBrowser: boolean;
28
- isSupportH264: boolean;
29
- isSupportAddTransceiver: boolean;
30
- isSupportAddtrack: boolean;
31
- isSupportUserMedia: boolean;
32
- };
33
- }
34
- /**
35
- * token 信息
7
+ * 网关Token信息
36
8
  *
9
+ * @param { string } access_token - Token信息
10
+ * @param { string } signSecret - 当前签名
11
+ * @param { string } refresh_token - 可选,刷新Token信息
12
+ * @param { string } domain - 可选,域名
13
+ * @param { number } expires_in - 可选,失效时间
14
+ * @param { string } openid - 可选,OpenID
15
+ * @param { string } scope - 可选,范围
16
+ * @param { string } token_type - 可选,Token类型
37
17
  */
38
18
  export interface IToken {
39
19
  access_token: string;
@@ -71,8 +51,8 @@ export interface ISignParams {
71
51
  /**
72
52
  * 返回结果内容
73
53
  *
74
- * @property { string } code - 结果码
75
- * @property { string } msg - 结果说明
54
+ * @property { string } code - 错误码
55
+ * @property { string } msg - 错误码描述
76
56
  * @property { any } detail - 数据内容
77
57
  */
78
58
  export interface IReturnResult {
@@ -97,3 +77,27 @@ export declare enum STORAGE {
97
77
  XY_I18N_CODE = "xy-i18n-code",
98
78
  XY_TIMESTAMP = "xy-timestamp"
99
79
  }
80
+ /**
81
+ * 可支持的编解码
82
+ *
83
+ * @param { string[] } video - 视频支持的编解码器
84
+ * @param { string[] } audio - 音频支持的编解码器
85
+ */
86
+ export interface XYSupportedCodec {
87
+ video: string[];
88
+ audio: string[];
89
+ }
90
+ /**
91
+ * 内外网探测服务器信息
92
+ *
93
+ * @property { string } enterpriseId - 企业ID
94
+ * @property { string } innerIp - 内网IP
95
+ * @property { string } node - 服务节点
96
+ * @property { string } serverName - 服务名称
97
+ */
98
+ export interface XYLocatorServerInfo {
99
+ enterpriseId: string;
100
+ innerIp: string;
101
+ node: string;
102
+ serverName: string;
103
+ }
@@ -0,0 +1,9 @@
1
+ import { IStreamConfig } from './stream';
2
+ export interface IEnableStreamConfig {
3
+ videoConfig: IStreamConfig | undefined;
4
+ audioConfig: IStreamConfig | undefined;
5
+ }
6
+ export interface IBaseConstraints {
7
+ video: any;
8
+ audio: any;
9
+ }