@xylink/xy-rtc-sdk 2.1.1 → 2.1.2

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.
@@ -1,4 +1,4 @@
1
- import { ILoginExtAccount, ISdkUserInfo, TStateAction, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams } from '../type';
1
+ import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams } from '../type';
2
2
  import Logger from '../tools/logger';
3
3
  export interface ICommonParams {
4
4
  securityKey: string;
@@ -22,7 +22,18 @@ declare class Action {
22
22
  setMeetingInfo(info: IMeetingInfo): void;
23
23
  setLoginInfo(loginInfo: IToken | null): void;
24
24
  getLoginInfo(): IToken;
25
- setCommonParams(data: any): void;
25
+ /**
26
+ * 设置默认参数,如securityKey
27
+ *
28
+ * @param data
29
+ */
30
+ setCommonParams: (data: any) => void;
31
+ /**
32
+ * 日志上传
33
+ *
34
+ * @param data
35
+ * @returns
36
+ */
26
37
  upload(data: any): Promise<any>;
27
38
  /**
28
39
  * 获取公钥,加密登录需使用此公钥
@@ -56,24 +67,113 @@ declare class Action {
56
67
  * @param params
57
68
  */
58
69
  getSdkUserInfo(params: ILoginExtAccount): Promise<any>;
70
+ /**
71
+ * 根据Token获取用户信息
72
+ *
73
+ * @param { string } token
74
+ * @returns
75
+ */
59
76
  getUserInfo(token: string): Promise<any>;
60
- getCallUri(params: any): Promise<any>;
77
+ /**
78
+ * 获取云会议室信息
79
+ *
80
+ * @param params
81
+ * @returns
82
+ */
83
+ getCallUri(params: {
84
+ number: string;
85
+ deviceType: number;
86
+ country: string;
87
+ }): Promise<any>;
88
+ /**
89
+ * 校验会议室密码
90
+ *
91
+ * @param { string } confNumber 会议号
92
+ * @param { string } password 密码
93
+ * @returns
94
+ */
61
95
  verifyPassword(confNumber: string, password: string): Promise<any>;
96
+ /**
97
+ * 举手发言
98
+ *
99
+ * @param { string } type
100
+ * @param { string } meetingId
101
+ * @param { string } di
102
+ * @param { string } conferenceNo 会议号
103
+ * @returns
104
+ */
62
105
  hand(type: string, meetingId: string, di: string, conferenceNo: string): Promise<any>;
63
- fetchErrorCode(): Promise<any>;
64
- getErrorCodeByJson(url: string): Promise<any>;
106
+ /**
107
+ * 获取i18n/errorcode等链接
108
+ *
109
+ * @returns
110
+ */
111
+ getDefaultServerConfig(): Promise<any>;
112
+ /**
113
+ * 获取json文件内容
114
+ *
115
+ * @param { string } url
116
+ * @returns
117
+ */
118
+ getCodeByJson(url: string): Promise<any>;
119
+ /**
120
+ * 获取随机云会议室号(目前仅用户巡课)
121
+ *
122
+ * @param { number } userProfileId 用户ID
123
+ * @param { string } securityKey
124
+ * @param { IGetConferenceParams } params
125
+ * @returns
126
+ */
65
127
  getConference(userProfileId: number, securityKey: string, params: IGetConferenceParams): Promise<any>;
66
- setStates1(action: TStateAction, eventName: TEventName, params?: {}): Promise<void>;
128
+ /**
129
+ * 会议信息埋点
130
+ *
131
+ * @param { TCategory } category
132
+ * @param { TEventName } eventName
133
+ * @param { Object } params
134
+ */
67
135
  setStates(category: TCategory, eventName: TEventName, params?: {}): Promise<void>;
68
- igonreMeetingMonito(confNumber: string): Promise<any>;
136
+ /**
137
+ * 监课模式不需要入会密码
138
+ *
139
+ * @param { string } confNumber
140
+ * @returns
141
+ */
142
+ ignoreMeetingMonitor(confNumber: string): Promise<any>;
143
+ /**
144
+ * 信令多活:获取信令服务信息
145
+ *
146
+ * @param { number } userId 用户ID
147
+ * @param { string } server 服务端地址
148
+ * @param { boolean } isSupportHybridCloud 是否支持混合云
149
+ * @returns
150
+ */
69
151
  getAllocation(userId: number, server: string, isSupportHybridCloud?: boolean): Promise<any>;
152
+ /**
153
+ * 获取会议室水印
154
+ *
155
+ * @param { string } conferenceNumber
156
+ * @returns
157
+ */
70
158
  getWatermarkContent: (conferenceNumber: string) => Promise<any>;
159
+ /**
160
+ * 根据外部企业ID获取内部企业ID
161
+ *
162
+ * @param param0
163
+ * @returns
164
+ */
71
165
  getEnterpriseId: ({ extId, clientId, clientSecret, httpServer }: {
72
166
  extId: string;
73
167
  clientId: string;
74
168
  clientSecret: string;
75
169
  httpServer?: string | undefined;
76
170
  }) => Promise<any>;
171
+ /**
172
+ * WebRTC 内外网探测
173
+ *
174
+ * @param param0
175
+ * @returns
176
+ */
77
177
  locator: ({ extId, clientId, clientSecret, httpServer }: {
78
178
  extId: string;
79
179
  clientId: string;
@@ -82,8 +182,8 @@ declare class Action {
82
182
  }) => Promise<any>;
83
183
  /**
84
184
  * 监会操作
185
+ *
85
186
  * @param params meetingId: 会议号;action: 操作类型;operations: 操作信息
86
- * @yapi http://yapi.xylink.com/project/1083/interface/api/54806
87
187
  * @returns [hasError, dada]
88
188
  */
89
189
  monitorOperation(params: {
@@ -96,6 +196,7 @@ declare class Action {
96
196
  }): Promise<[boolean, any]>;
97
197
  /**
98
198
  * 监会 updateWebViewProp 操作
199
+ *
99
200
  * @param meetingId 会议号
100
201
  * @param operations 操作信息
101
202
  */
@@ -103,6 +204,33 @@ declare class Action {
103
204
  callUri: string;
104
205
  params: string;
105
206
  }>): Promise<[boolean, any]>;
207
+ /**
208
+ * 检查会议室录制权限
209
+ *
210
+ * @param { string } confNumber 云会议室号
211
+ * @param { string } meetingId 会议室ID
212
+ * @returns
213
+ */
214
+ checkPermissionWithMeetingNumber(confNumber: string, meetingId: string): Promise<any>;
215
+ /**
216
+ * 录制存储空间检查
217
+ *
218
+ * @param { string } recordingUrl
219
+ * @returns
220
+ */
221
+ checkStorageSpaceWithRecordingUrl(recordingUrl: string): Promise<any>;
222
+ /**
223
+ * 获取企业管理平台带宽配置
224
+ *
225
+ * @returns
226
+ */
227
+ getWebRxBandwidth(userId: number): Promise<any>;
228
+ /**
229
+ * 刷新Token
230
+ *
231
+ * @returns
232
+ */
233
+ refreshToken(refresh_token: string): Promise<any>;
106
234
  }
107
235
  declare const _default: Action;
108
236
  export default _default;
@@ -111,107 +111,6 @@ export declare const CONTENT_CONTRAINTS: {
111
111
  * common: 普通模式
112
112
  * advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
113
113
  */
114
- export declare const PEOPLE_CONTRAINTS: {
115
- '180': {
116
- common: {
117
- frameRate?: ConstrainDouble | undefined;
118
- width: number;
119
- height: number;
120
- aspectRatio: number;
121
- resizeMode: "crop-and-scale";
122
- } | {
123
- frameRate: ConstrainDouble;
124
- width: number;
125
- height: number;
126
- aspectRatio: number;
127
- resizeMode: "crop-and-scale";
128
- };
129
- advanced: {
130
- frameRate: {
131
- min: number;
132
- exact: number;
133
- max: number;
134
- };
135
- width: {
136
- min: number;
137
- ideal: number;
138
- max: number;
139
- };
140
- height: {
141
- min: number;
142
- ideal: number;
143
- max: number;
144
- };
145
- aspectRatio: number;
146
- resizeMode: "crop-and-scale";
147
- };
148
- };
149
- '360': {
150
- common: {
151
- frameRate?: ConstrainDouble | undefined;
152
- width: number;
153
- height: number;
154
- aspectRatio: number;
155
- resizeMode: "crop-and-scale";
156
- } | {
157
- frameRate: ConstrainDouble;
158
- width: number;
159
- height: number;
160
- aspectRatio: number;
161
- resizeMode: "crop-and-scale";
162
- };
163
- advanced: {
164
- frameRate: {
165
- min: number;
166
- exact: number;
167
- max: number;
168
- };
169
- width: {
170
- min: number;
171
- ideal: number;
172
- max: number;
173
- };
174
- height: {
175
- min: number;
176
- ideal: number;
177
- max: number;
178
- };
179
- aspectRatio: number;
180
- resizeMode: "crop-and-scale";
181
- };
182
- };
183
- '720': {
184
- common: {
185
- frameRate?: ConstrainDouble | undefined;
186
- width: number;
187
- height: number;
188
- aspectRatio: number;
189
- resizeMode: "crop-and-scale";
190
- } | {
191
- frameRate: ConstrainDouble;
192
- width: number;
193
- height: number;
194
- aspectRatio: number;
195
- resizeMode: "crop-and-scale";
196
- };
197
- advanced: {
198
- frameRate: {
199
- min: number;
200
- ideal: number;
201
- max: number;
202
- };
203
- width: {
204
- min: number;
205
- ideal: number;
206
- max: number;
207
- };
208
- height: {
209
- min: number;
210
- ideal: number;
211
- max: number;
212
- };
213
- aspectRatio: number;
214
- resizeMode: "crop-and-scale";
215
- };
216
- };
217
- };
114
+ export declare const PEOPLE_CONTRAINTS: any;
115
+ export declare const RESOLUTION_MAP: Record<string, number>;
116
+ export declare const MIN_BANDWIDTH_MAP: Record<string, number>;
@@ -6,6 +6,8 @@
6
6
  */
7
7
  import { IDefault, IMUTE_MAP, ITemplateMode, IContentTemplateMode, IRoster } from '../type';
8
8
  export * from './contraints';
9
+ export declare const LOG_CACHE_COUNT = 10;
10
+ export declare const DB_TABLE_COUNT = 10;
9
11
  export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
10
12
  export declare const MIME_TYPE = "video/H264";
11
13
  export declare const DEVICE_TYPE = 17;
@@ -13,37 +15,119 @@ export declare const SELF_MOCK_PID = 9999999999;
13
15
  export declare const STREAM_CHANNEL_COUNT = 11;
14
16
  export declare const MAX_PARTICIPANT_COUNT = 112;
15
17
  export declare const STREAM_ERROR_CODE_MAP: string[];
18
+ /**
19
+ * 支持呼叫的会议室类型
20
+ */
16
21
  export declare const SUPPORT_DEVICE_TYPE: string[];
22
+ /**
23
+ * media类型
24
+ * 0: people
25
+ * 1: content
26
+ */
17
27
  export declare const MEDIAGROUPID: number[];
28
+ /**
29
+ * 请流质量, 帧率还受带宽、发送端能力综合决定
30
+ * 0: people 720P 15帧、1080P 15帧 / content 720P 5帧、 1080P 15帧
31
+ * 1: people 720P 30帧、1080P 60帧 / content 720P 30帧、 1080P 30帧
32
+ */
18
33
  export declare const QUALITY_TYPE: number[];
34
+ /**
35
+ * 分辨率
36
+ *
37
+ */
19
38
  export declare const RESOLUTION_TYPE: number[];
39
+ /**
40
+ * 每页最大显示终端数
41
+ */
20
42
  export declare const MAX_PAGE_SIZE = 9;
43
+ /**
44
+ * 网络信息
45
+ */
21
46
  export declare const NETWORK_TYPE_MAP: {
22
47
  [key: string]: number;
23
48
  };
49
+ /**
50
+ * 音视频状态
51
+ */
24
52
  export declare const MUTE_MAP: IMUTE_MAP;
25
53
  export declare const CONFIGURATION: RTCConfiguration;
54
+ /**
55
+ * stop call 对应错误码
56
+ */
26
57
  export declare const NEW_CODE_MAP: {
27
58
  [key: string]: string;
28
59
  };
60
+ /**
61
+ * roster数据
62
+ */
29
63
  export declare const DEFAULT_ROSTER: IRoster;
64
+ /**
65
+ * 初始化数据
66
+ */
30
67
  export declare const DEFAULT: IDefault;
68
+ /**
69
+ * 模板类型
70
+ */
31
71
  export declare const TEMPLATE_MODE: ITemplateMode[];
72
+ /**
73
+ * content 模板类型
74
+ */
32
75
  export declare const CONTENT_TEMPLATE_MODE: IContentTemplateMode[];
76
+ /**
77
+ * 非content 默认模板类型
78
+ */
33
79
  export declare const TEMPLATE_DEFAULT_MODE = "SPEAKER";
80
+ /**
81
+ * content 模板类型
82
+ */
34
83
  export declare const CONTENT_DEFAULT_TEMPLATE_MODE = "MULTI_PIC_CONTENT_HIGH_PRIORITY";
84
+ /**
85
+ * 用户类型
86
+ */
35
87
  export declare const APP_NAME: {
36
88
  STANDARD_WEBRTC: string;
37
89
  THIRD_WEBRTC: string;
38
90
  };
91
+ /**
92
+ * 音视频事件类型
93
+ */
39
94
  export declare const EVENT_TYPE_MAP: {
40
95
  [key: string]: string;
41
96
  };
97
+ /**
98
+ * content audio offer 状态
99
+ */
42
100
  export declare const CONTENT_AUDIO_OFFER_STATE: {
43
101
  NOT_SEND: number;
44
102
  SEND: number;
45
103
  SENDED: number;
46
104
  };
105
+ /**
106
+ * 支持的分辨率
107
+ */
47
108
  export declare const SCALE_RESOLUTION_MAP: {
48
109
  [key: string]: number;
49
110
  };
111
+ /**
112
+ * 隐身入会
113
+ *
114
+ * @enum
115
+ *
116
+ * @property { number } HIDE 隐身入会
117
+ * @property { number } SDKMonitor+hide sdk监会
118
+ */
119
+ export declare const SDKMonitor: {
120
+ [key: string]: string;
121
+ };
122
+ /**
123
+ * 可支持的监会方式
124
+ */
125
+ export declare const SDKMonitorList: string[];
126
+ /**
127
+ * 同传字幕: 本地支持的语言
128
+ */
129
+ export declare const SupportLocalLanguages: readonly ["Chinese", "English"];
130
+ /**
131
+ * 日志中需要隐藏的关键词
132
+ */
133
+ export declare const HIDE_KEY_INFOS: string[];
@@ -11,7 +11,7 @@ import Client from './main/client';
11
11
  import Stream from './main/stream';
12
12
  import { IClientConfig, IConfig, TLocale, ICheckSystemRequirements } from './type';
13
13
  import DeviceManager from './main/deviceManager';
14
- import { getLayoutItemState, getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator } from './main/helper';
14
+ import { getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator } from './main/helper';
15
15
  interface IXyRTC {
16
16
  version: string;
17
17
  client: Client | null;
@@ -29,6 +29,6 @@ interface IXyRTC {
29
29
  }
30
30
  declare const xyRTC: IXyRTC;
31
31
  export default xyRTC;
32
- export { Client, Stream, DeviceManager, getLayoutItemState, getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
32
+ export { Client, Stream, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
33
33
  export * from './type';
34
34
  export { ERROR_CODE } from './enum/errorCode';