@xylink/xy-rtc-sdk 3.9.11-private.6 → 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 (124) hide show
  1. package/README.MD +36 -13
  2. package/lib/action/index.d.ts +106 -36
  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 +51 -0
  6. package/lib/enum/device.d.ts +28 -0
  7. package/lib/enum/errorCode.d.ts +8 -2
  8. package/lib/enum/i18n.d.ts +6 -0
  9. package/lib/enum/index.d.ts +90 -7
  10. package/lib/enum/meeting.d.ts +4 -0
  11. package/lib/enum/polling.d.ts +2 -11
  12. package/lib/feature/customMessage/index.d.ts +29 -0
  13. package/lib/feature/edu/index.d.ts +34 -0
  14. package/lib/feature/edu/index.type.d.ts +29 -0
  15. package/lib/feature/index.d.ts +3 -0
  16. package/lib/feature/speaker/index.d.ts +81 -0
  17. package/lib/feature/speaker/index.type.d.ts +17 -0
  18. package/lib/index.d.ts +84 -31
  19. package/lib/interface/baseModule.type.d.ts +9 -0
  20. package/lib/interface/clientInterface.type.d.ts +128 -0
  21. package/lib/interface/contentTrackInterface.type.d.ts +15 -0
  22. package/lib/interface/event.type.d.ts +444 -0
  23. package/lib/interface/videoAudioTrackInterface.type.d.ts +17 -0
  24. package/lib/main/ability/const.d.ts +5 -0
  25. package/lib/main/ability/index.d.ts +37 -0
  26. package/lib/main/{iauth.d.ts → auth/index.d.ts} +34 -26
  27. package/lib/main/client.d.ts +643 -637
  28. package/lib/main/clientBase.d.ts +40 -0
  29. package/lib/main/clientState.d.ts +56 -0
  30. package/lib/main/device/index.d.ts +272 -0
  31. package/lib/main/device/index.type.d.ts +204 -0
  32. package/lib/main/helper/index.d.ts +118 -0
  33. package/lib/main/helper/index.type.d.ts +12 -0
  34. package/lib/main/layout/index.d.ts +74 -108
  35. package/lib/main/layout/index.type.d.ts +282 -0
  36. package/lib/main/layout/polling.d.ts +17 -13
  37. package/lib/main/layout/state.d.ts +163 -0
  38. package/lib/main/layout/template.d.ts +3 -3
  39. package/lib/main/media/index.d.ts +177 -0
  40. package/lib/main/media/index.type.d.ts +29 -0
  41. package/lib/main/meeting/control.d.ts +107 -0
  42. package/lib/main/meeting/control.type.d.ts +24 -0
  43. package/lib/main/{meeting.d.ts → meeting/index.d.ts} +58 -28
  44. package/lib/main/meeting/verify.d.ts +70 -0
  45. package/lib/main/meeting/verify.type.d.ts +12 -0
  46. package/lib/main/peer.d.ts +67 -19
  47. package/lib/main/plugin/index.d.ts +28 -0
  48. package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
  49. package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
  50. package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
  51. package/lib/main/render/index.d.ts +116 -0
  52. package/lib/main/render/index.type.d.ts +36 -0
  53. package/lib/main/render/videoManager.d.ts +190 -0
  54. package/lib/main/render/videoManager.type.d.ts +66 -0
  55. package/lib/main/roster/index.d.ts +39 -0
  56. package/lib/main/server/index.d.ts +79 -0
  57. package/lib/main/server/index.type.d.ts +21 -0
  58. package/lib/main/signal/index.d.ts +15 -0
  59. package/lib/main/socket/index.d.ts +95 -0
  60. package/lib/main/stream/index.d.ts +182 -0
  61. package/lib/main/track/baseTrack.d.ts +178 -0
  62. package/lib/main/track/contentTrack.d.ts +168 -0
  63. package/lib/main/track/customContentTrack.d.ts +18 -0
  64. package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
  65. package/lib/main/track/helper.d.ts +53 -0
  66. package/lib/main/track/videoAudioCapture.d.ts +90 -0
  67. package/lib/main/track/videoAudioTrack.d.ts +273 -0
  68. package/lib/main/vom/index.d.ts +44 -0
  69. package/lib/main/vom/index.type.d.ts +1 -0
  70. package/lib/tools/analyser.d.ts +53 -0
  71. package/lib/tools/analyserManager.d.ts +55 -0
  72. package/lib/tools/dbManager.d.ts +12 -1
  73. package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
  74. package/lib/tools/detectStream/index.d.ts +84 -0
  75. package/lib/tools/detectStream/index.type.d.ts +56 -0
  76. package/lib/tools/detectTool/index.d.ts +191 -0
  77. package/lib/tools/detectTool/index.type.d.ts +51 -0
  78. package/lib/tools/emitter.d.ts +27 -6
  79. package/lib/tools/enum.d.ts +1 -1
  80. package/lib/tools/httpClient.d.ts +23 -6
  81. package/lib/tools/i18n.d.ts +1 -1
  82. package/lib/tools/index.d.ts +5 -5
  83. package/lib/tools/{logger.d.ts → log/logger.d.ts} +59 -29
  84. package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +1 -1
  85. package/lib/tools/log/loggerManager.d.ts +70 -0
  86. package/lib/tools/pressure/index.d.ts +33 -0
  87. package/lib/tools/pressure/index.type.d.ts +22 -0
  88. package/lib/tools/promiseQueue.d.ts +51 -0
  89. package/lib/tools/queue.d.ts +12 -15
  90. package/lib/tools/resize.d.ts +65 -0
  91. package/lib/tools/snapshot.d.ts +31 -0
  92. package/lib/tools/socket.d.ts +109 -32
  93. package/lib/tools/template/index.d.ts +3 -3
  94. package/lib/tools/template/mobile.d.ts +1 -1
  95. package/lib/tools/template/polling.d.ts +1 -1
  96. package/lib/tools/utils.d.ts +22 -19
  97. package/lib/tools/verify.d.ts +7 -0
  98. package/lib/type/ability.d.ts +25 -0
  99. package/lib/type/analyser.d.ts +43 -0
  100. package/lib/type/{iauth.d.ts → auth.d.ts} +22 -29
  101. package/lib/type/base.d.ts +41 -33
  102. package/lib/type/capture.d.ts +9 -0
  103. package/lib/type/client.d.ts +404 -498
  104. package/lib/type/index.d.ts +26 -2
  105. package/lib/type/layout.d.ts +25 -49
  106. package/lib/type/logger.d.ts +37 -12
  107. package/lib/type/meeting.d.ts +266 -27
  108. package/lib/type/peer.d.ts +24 -1
  109. package/lib/type/polling.d.ts +1 -49
  110. package/lib/type/quality.d.ts +16 -6
  111. package/lib/type/socket.d.ts +42 -0
  112. package/lib/type/stream.d.ts +154 -116
  113. package/lib/type/track.d.ts +139 -0
  114. package/lib/xyrtc.cjs.js +1 -1
  115. package/lib/xyrtc.umd.js +1 -1
  116. package/package.json +11 -3
  117. package/lib/enum/contraints.d.ts +0 -50
  118. package/lib/main/deviceManager.d.ts +0 -185
  119. package/lib/main/helper.d.ts +0 -79
  120. package/lib/main/stream.d.ts +0 -396
  121. package/lib/main/videoManager.d.ts +0 -57
  122. package/lib/tools/audioLevel.d.ts +0 -23
  123. package/lib/tools/detect.d.ts +0 -43
  124. package/lib/type/device.d.ts +0 -83
@@ -3,21 +3,12 @@
3
3
  * @authors Luo-jinghui (luojinghui424@gmail.com)
4
4
  * @date 2019-10-24 12:01:27
5
5
  */
6
- interface socketOptions {
7
- url: string;
8
- protocols?: string[];
9
- pingData?: string;
10
- pangData?: string;
11
- openHeatBeat?: boolean;
12
- autoReConnect?: boolean;
13
- params?: any;
14
- }
15
- declare class Socket {
6
+ import Logger from './log/logger';
7
+ import { SocketOptions, XYSocketEventKey } from '../type/index';
8
+ import Emitter from './emitter';
9
+ declare class Socket extends Emitter<XYSocketEventKey> {
16
10
  socket: WebSocket;
17
- private messageList;
18
11
  private options;
19
- private headBeatTimer;
20
- private pangTimer;
21
12
  private heatBeatFrequency;
22
13
  private timeOffset;
23
14
  private reconnectCount;
@@ -26,28 +17,114 @@ declare class Socket {
26
17
  private isConnected;
27
18
  private isClose;
28
19
  private logger;
29
- private client;
30
20
  private reconnectOffset;
21
+ private headBeatTimer;
22
+ private pangTimer;
31
23
  private reconnectTimer;
32
- constructor(options: socketOptions, client: any);
33
- connect(isReconnect?: boolean): void;
34
- addEvent(): void;
35
- removeEvent(): void;
36
- onOpenSocket: (e: any) => void;
37
- onHandleMessage: (e: any) => void;
38
- onCloseSocket: (e: CloseEvent) => void;
39
- onErrorSocket: (e: any) => void;
40
- sendHeartBeat(): void;
41
- clearTimeout(): void;
42
- emit(type: string, data: any): void;
43
- clearPangTimer(): void;
44
- clearBeatTimer(): void;
45
- clearReconnectTimer(): void;
46
- reset(): void;
47
- on(type: string, fn: any): void;
24
+ private taskQueue;
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;
36
+ /**
37
+ * 连接socket
38
+ *
39
+ * @param { boolean } isReconnect - 是否是重连
40
+ */
41
+ private connect;
42
+ /**
43
+ * 监听socket事件
44
+ */
45
+ private addEvent;
46
+ /**
47
+ * 移除监听socket事件
48
+ */
49
+ private removeEvent;
50
+ /**
51
+ * WS 连接成功
52
+ *
53
+ * @param { Event } e - 连接事件
54
+ */
55
+ private onOpenSocket;
56
+ /**
57
+ * 处理WS消息
58
+ *
59
+ * @param e
60
+ * @returns
61
+ */
62
+ private onHandleMessage;
63
+ /**
64
+ * 处理WS关闭消息
65
+ *
66
+ * @param { CloseEvent } e - 关闭事件
67
+ * @returns
68
+ */
69
+ private onCloseSocket;
70
+ /**
71
+ * 监听Error事件
72
+ *
73
+ * @param { Event } e - 错误事件
74
+ * @returns
75
+ */
76
+ private onErrorSocket;
77
+ /**
78
+ * 处理Error/Close后的重连
79
+ */
80
+ private handleReconnectCount;
81
+ /**
82
+ * 发送心跳事件
83
+ */
84
+ private sendHeartBeat;
85
+ /**
86
+ * 创建倒计时,响应是否接收到pang消息
87
+ */
88
+ private startTimerAndHandlePang;
89
+ /**
90
+ * 关闭socket
91
+ *
92
+ * @param { boolean } isReconnect - 是否是重连
93
+ */
48
94
  close(isReconnect?: boolean): void;
95
+ /**
96
+ * 发送数据
97
+ *
98
+ * @param { any } data - 发送的数据
99
+ * @param { boolean } parse - 是否需要JSON.stringify
100
+ * @param { boolean } isLog - 是否需要打印日志
101
+ */
49
102
  send(data: any, parse?: boolean, isLog?: boolean): void;
50
- stopCall(): void;
51
- reConnect(): void;
103
+ /**
104
+ * wss 重连
105
+ */
106
+ private reConnect;
107
+ /**
108
+ * 发送消息到消息队列
109
+ *
110
+ * @param { any } data - 消息数据
111
+ */
112
+ private sendMessageToQueue;
113
+ /**
114
+ * 清除pang定时器
115
+ */
116
+ private clearPangTimer;
117
+ /**
118
+ * 清除心跳定时器
119
+ */
120
+ private clearBeatTimer;
121
+ /**
122
+ * 清除ws重连定时器
123
+ */
124
+ private clearReconnectTimer;
125
+ /**
126
+ * 重置参数
127
+ */
128
+ private reset;
52
129
  }
53
130
  export default Socket;
@@ -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[];
@@ -178,7 +178,7 @@ export declare const GALLERY_TEMPLATE: {
178
178
  '3-1': {
179
179
  position: number[];
180
180
  resolution: {
181
- normal: number;
181
+ normal: StreamResolutionLevel;
182
182
  low: StreamResolutionLevel;
183
183
  };
184
184
  type: TemplateType;
@@ -187,7 +187,7 @@ export declare const GALLERY_TEMPLATE: {
187
187
  '4-1': {
188
188
  position: number[];
189
189
  resolution: {
190
- normal: number;
190
+ normal: StreamResolutionLevel;
191
191
  low: StreamResolutionLevel;
192
192
  };
193
193
  type: TemplateType;
@@ -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;
@@ -4,5 +4,5 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2024-02-26 16:41:38
6
6
  */
7
- import { Template } from '../../type';
7
+ import { Template } from '../../type/index';
8
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,29 +38,24 @@ export declare const getTime: () => string;
38
38
  */
39
39
  export declare const getMillTime: () => string;
40
40
  /**
41
- * 获取时间戳差值
42
- * @param time1
43
- * @param time2
44
- * @param format
41
+ * 计算两个时间戳相差的天数, 四舍五入保留一位小数
42
+ *
43
+ * @param { number } time1 - 时间戳1
44
+ * @param { number } time2 - 时间戳2
45
+ * @returns { number } day - 天数
45
46
  */
46
- export declare const diffTime: (time1: number, time2: number, format?: string) => number;
47
+ export declare const diffTime: (time1: number, time2: number) => number;
47
48
  export declare function mapToObj<T>(data: Map<string, T>): {
48
49
  [key: string]: T;
49
50
  };
50
51
  export declare const getStatus: (code: string, detail?: any, msg?: string) => IReturnResult;
51
- export declare const getMeetingStatus: (success: boolean, code?: string, msg?: string) => {
52
- success: boolean;
53
- data: {
54
- code: string;
55
- msg: string;
56
- };
57
- } | {
58
- success: boolean;
59
- data: {
60
- code?: undefined;
61
- msg?: undefined;
62
- };
63
- };
52
+ /**
53
+ * 隐藏关键信息
54
+ *
55
+ * @param { any } data - 需要隐藏的信息
56
+ * @param { string | string[] } key - 需要隐藏的key
57
+ * @returns - 隐藏后的信息
58
+ */
64
59
  export declare const hideKeyInfo: (data: any, key: string | string[]) => any;
65
60
  /**
66
61
  * 判断值类型
@@ -72,6 +67,7 @@ export declare const TYPEOF: {
72
67
  isString(str: any): boolean;
73
68
  isBoolean(str: any): boolean;
74
69
  isUndefined(str: any): boolean;
70
+ isFunction(val: any): boolean;
75
71
  isLetter(val: any): boolean;
76
72
  isChinese(val: any): boolean;
77
73
  isNumberText(val: any): boolean;
@@ -92,3 +88,10 @@ export declare const jsonParse: (jsonString: any) => any;
92
88
  * @returns {string}
93
89
  */
94
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;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 能力集 key
3
+ *
4
+ * @param { string } USE_SEC_API - 终端是否要使用uss新接口
5
+ * @param { string } MEETING_SHARE_NEW_PAGE_API - 会议邀请漏洞修复使用新page API
6
+ */
7
+ export declare enum AbilityKey {
8
+ USE_SEC_API = "use_sec_api",
9
+ MEETING_SHARE_NEW_PAGE_API = "meeting_share_new_page_api"
10
+ }
11
+ /**
12
+ * 能力集
13
+ */
14
+ export type AbilityResult = {
15
+ [key in AbilityKey]?: boolean;
16
+ };
17
+ /**
18
+ * 本地能力集
19
+ */
20
+ export type LocalAbility = {
21
+ [key in string]: {
22
+ value: number;
23
+ offset: number;
24
+ };
25
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Audio Analyser Lib
3
+ *
4
+ * @summary short description for the file
5
+ *
6
+ * Created at : 2023-09-05 17:17:12
7
+ * Last modified : 2024-04-23 19:08:08
8
+ */
9
+ import { AudioAnalyser } from '../tools/analyser';
10
+ /**
11
+ * 分析器配置
12
+ *
13
+ * @param { number } fftSize - 执行快速傅里叶变换 (FFT) 以获得频域数据时使用的样本窗口大小,可选值:32/64/125/256/512/1024/2048
14
+ * @param { number } cardinalNumber - 转换0-128的基数,默认是1:1,配置128,如果将声量转为1:2效果,则配置为64,依此类推
15
+ * @param { string } prefix - 分析器前缀
16
+ */
17
+ export interface AnalyserConfig {
18
+ fftSize?: number;
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;
43
+ }
@@ -1,10 +1,3 @@
1
- /**
2
- *
3
- * @param { string } extId
4
- */
5
- export interface ExtInfo {
6
- extId: string;
7
- }
8
1
  /**
9
2
  * 登录方式
10
3
  *
@@ -18,12 +11,12 @@ export declare enum LoginType {
18
11
  ExtToken = 2
19
12
  }
20
13
  /**
21
- * 三方用户统一认证登录 - 小鱼账号登录 参数
14
+ * 三方用户统一认证登录 - 小鱼账号登录参数
22
15
  *
23
- * @param { string } account - 用户账号
24
- * @param { string } password - 用户密码
25
- * @param { string? } countryCode - 国家码:默认+86
26
- * @param { string? } extId - 企业ID
16
+ * @param { string } account - 必填,用户账号
17
+ * @param { string } password - 必填,用户密码
18
+ * @param { string? } countryCode - 可选,国家码:默认+86
19
+ * @param { string? } extId - 必填,企业ID
27
20
  */
28
21
  export interface LoginXYAccountParams {
29
22
  account: string;
@@ -34,7 +27,7 @@ export interface LoginXYAccountParams {
34
27
  /**
35
28
  * 三方用户统一认证登录 - 用户ID参数
36
29
  *
37
- * @param { string } extUserId - 三方用户ID
30
+ * @param { string } extUserId - 必填,三方用户ID
38
31
  * @param { string } authCode - 登录码
39
32
  * @param { string } displayName - 用户名称
40
33
  * @param { boolean? } tempUser - 是否临时用户
@@ -50,8 +43,8 @@ export interface LoginExtUserIdParams {
50
43
  /**
51
44
  * 三方用户统一认证登录 - token登录
52
45
  *
53
- * @param { string } authCode - 登录码
54
- * @param { string? } extId - 企业ID
46
+ * @param { string } authCode - 必填,登录码
47
+ * @param { string? } extId - 必填,企业ID
55
48
  */
56
49
  export interface LoginExtTokenParams {
57
50
  authCode: string;
@@ -64,13 +57,13 @@ interface LoginParamsTemp extends LoginXYAccountParams, LoginExtUserIdParams, Lo
64
57
  */
65
58
  export type LoginParams = Partial<LoginParamsTemp>;
66
59
  /**
67
- * 第三方登录用户信息
60
+ * 第三方登录用户信息/授权码登录信息
68
61
  *
69
- * @property { string } displayName 用户名称
70
- * @property { string } extId 企业id
71
- * @property { string } extUserId 三方用户ID
72
- * @property { string } authCode 授权码
73
- * @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,不是临时用户
74
67
  */
75
68
  export interface ILoginExtAccount {
76
69
  displayName: string;
@@ -92,21 +85,21 @@ export interface ISdkUserInfo {
92
85
  extId?: string;
93
86
  }
94
87
  /**
95
- * 授权码登录
88
+ * 三方账号统一认证登录-授权码登录信息
96
89
  *
97
- * @property { string } extId 企业id
98
- * @property { string } extUserId 用户id
99
- * @property { string } displayName 用户名
100
- * @property { string } oauthCode 授权码
101
- * @property { boolean } isTempUser 是否是临时账号
102
- * @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 - 可选,是否是临时账号
103
96
  */
104
97
  export interface ILoginWidthAuthCode {
105
98
  extId: string;
106
99
  extUserId: string;
107
100
  displayName: string;
108
101
  oauthCode: string;
109
- isTempUser: boolean;
110
102
  channelId: string;
103
+ isTempUser?: boolean;
111
104
  }
112
105
  export {};
@@ -1,37 +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
- isSupportH264: boolean;
27
- isSupportAddTransceiver: boolean;
28
- isSupportAddtrack: boolean;
29
- isSupportUserMedia: boolean;
30
- };
31
- }
32
- /**
33
- * token 信息
7
+ * 网关Token信息
34
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类型
35
17
  */
36
18
  export interface IToken {
37
19
  access_token: string;
@@ -69,8 +51,8 @@ export interface ISignParams {
69
51
  /**
70
52
  * 返回结果内容
71
53
  *
72
- * @property { string } code - 结果码
73
- * @property { string } msg - 结果说明
54
+ * @property { string } code - 错误码
55
+ * @property { string } msg - 错误码描述
74
56
  * @property { any } detail - 数据内容
75
57
  */
76
58
  export interface IReturnResult {
@@ -80,14 +62,40 @@ export interface IReturnResult {
80
62
  }
81
63
  export type Key = string | number;
82
64
  /**
83
- * 混合云服务信息
65
+ * localStorage Key
66
+ *
67
+ * @param { XY_ABILITY } - 能力结果
68
+ * @param { XY_LOG_SERVER } - 日志服务
69
+ * @param { XY_ERROR_CODE } - 错误码
70
+ * @param { XY_I18N_CODE } - 国际化
71
+ * @param { XY_TIMESTAMP } - 时间戳
72
+ */
73
+ export declare enum STORAGE {
74
+ XY_ABILITY = "XY-ABILITY",
75
+ XY_LOG_SERVER = "xy-log-server",
76
+ XY_ERROR_CODE = "xy-error-code",
77
+ XY_I18N_CODE = "xy-i18n-code",
78
+ XY_TIMESTAMP = "xy-timestamp"
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
+ * 内外网探测服务器信息
84
92
  *
85
93
  * @property { string } enterpriseId - 企业ID
86
94
  * @property { string } innerIp - 内网IP
87
- * @property { string } node - 节点
95
+ * @property { string } node - 服务节点
88
96
  * @property { string } serverName - 服务名称
89
97
  */
90
- export interface IServerInfo {
98
+ export interface XYLocatorServerInfo {
91
99
  enterpriseId: string;
92
100
  innerIp: string;
93
101
  node: string;
@@ -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
+ }