@xylink/xy-rtc-sdk 3.8.0-beta.6 → 3.8.1
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.
- package/lib/action/index.d.ts +70 -41
- package/lib/enum/contraints.d.ts +1 -0
- package/lib/enum/i18n.d.ts +39 -0
- package/lib/enum/index.d.ts +23 -0
- package/lib/main/client.d.ts +39 -9
- package/lib/main/layoutManager.d.ts +22 -10
- package/lib/main/meeting.d.ts +19 -2
- package/lib/main/qualityManager.d.ts +1 -0
- package/lib/main/stream.d.ts +1 -1
- package/lib/tools/queue.d.ts +10 -0
- package/lib/tools/template.d.ts +8 -1
- package/lib/tools/utils.d.ts +2 -1
- package/lib/type/client.d.ts +77 -42
- package/lib/type/index.d.ts +1 -0
- package/lib/type/layout.d.ts +13 -0
- package/lib/type/meeting.d.ts +20 -0
- package/lib/type/stream.d.ts +40 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +1 -1
- package/public/login.ico +0 -0
- package/scripts/build_lib.js +0 -16
- package/scripts/utils.js +0 -27
- package/scripts/webpack.common.js +0 -139
- package/scripts/webpack.dev.js +0 -27
- package/scripts/webpack.sdk.js +0 -68
- package/tsconfig.lib.json +0 -37
package/lib/type/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IToken } from './base';
|
|
2
2
|
import VideoManager from '../main/videoManager';
|
|
3
|
-
import { IInternels } from './stream';
|
|
3
|
+
import { IInternels, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
|
|
4
4
|
import { SupportLocalLanguages } from '../enum';
|
|
5
5
|
import { ICloudRoomConfig } from './meeting';
|
|
6
6
|
/**
|
|
@@ -153,24 +153,6 @@ export declare type TCommand = 0 | 1 | 2 | 3;
|
|
|
153
153
|
* 设备类型
|
|
154
154
|
*/
|
|
155
155
|
declare type IDeviceType = 'webrtc' | 'soft' | 'hard' | 'nemono' | 'virtualnemo' | 'nemo' | 'tvbox' | 'h323' | 'record' | 'bruce' | 'tel' | 'pstngw' | 'desk';
|
|
156
|
-
/**
|
|
157
|
-
* 请求画面分辨率
|
|
158
|
-
*
|
|
159
|
-
* @value 0 90P
|
|
160
|
-
* @value 1 180P
|
|
161
|
-
* @value 2 360P
|
|
162
|
-
* @value 3 720P
|
|
163
|
-
* @value 4 1080P
|
|
164
|
-
*/
|
|
165
|
-
export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
|
|
166
|
-
/**
|
|
167
|
-
* 请求画面质量
|
|
168
|
-
*
|
|
169
|
-
* @value 0 100
|
|
170
|
-
* @value 1 200
|
|
171
|
-
* @value 3 300
|
|
172
|
-
*/
|
|
173
|
-
export declare type IQualityType = 0 | 1 | 2;
|
|
174
156
|
/**
|
|
175
157
|
* 是否禁止收听
|
|
176
158
|
*
|
|
@@ -267,24 +249,36 @@ export interface ILayoutParams {
|
|
|
267
249
|
contentSenderPid: number;
|
|
268
250
|
localHide: boolean;
|
|
269
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Layout 模版 分辨率
|
|
254
|
+
*
|
|
255
|
+
* @property { StreamResolutionLevel } normal 默认请流分辨率
|
|
256
|
+
* @property { StreamResolutionLevel } low 低性能请流分辨率
|
|
257
|
+
* @property { StreamResolutionLevel } high 高分辨率
|
|
258
|
+
*/
|
|
259
|
+
export interface ITemplateResolution {
|
|
260
|
+
normal: StreamResolutionLevel;
|
|
261
|
+
low: StreamResolutionLevel;
|
|
262
|
+
high?: StreamResolutionLevel;
|
|
263
|
+
}
|
|
270
264
|
/**
|
|
271
265
|
* Layout模版定义
|
|
272
266
|
*
|
|
273
267
|
* @property { number[] } position - 位置/尺寸比例
|
|
274
|
-
* @property {
|
|
268
|
+
* @property { ITemplateResolution } resolution - 分辨率
|
|
275
269
|
* @property { number } resolution.normal - 正常分辨率
|
|
276
270
|
* @property { number } resolution.low - 低性能模式分辨率
|
|
271
|
+
* @property { number ?} resolution.high - 高分辨率
|
|
272
|
+
* @property { VideoQuality } quality - 请流质量
|
|
277
273
|
* @property { number } zIndex - 层级
|
|
278
|
-
* @property {
|
|
274
|
+
* @property { string } type - 类型,LOCAL/CONTENT
|
|
279
275
|
*/
|
|
280
276
|
export declare type ITemplateObj = {
|
|
281
277
|
position: number[];
|
|
282
|
-
resolution:
|
|
283
|
-
|
|
284
|
-
low: IResolutionType;
|
|
285
|
-
};
|
|
278
|
+
resolution: ITemplateResolution;
|
|
279
|
+
quality?: VideoQuality;
|
|
286
280
|
zIndex?: number;
|
|
287
|
-
|
|
281
|
+
type?: string;
|
|
288
282
|
};
|
|
289
283
|
export interface ITypeTemplate {
|
|
290
284
|
[id: string]: ITemplateObj[];
|
|
@@ -316,7 +310,7 @@ export interface IDefault {
|
|
|
316
310
|
[id: number]: number;
|
|
317
311
|
};
|
|
318
312
|
MAP_RESOLUTION_INDEX: {
|
|
319
|
-
[resolution: string]:
|
|
313
|
+
[resolution: string]: StreamResolutionLevel;
|
|
320
314
|
};
|
|
321
315
|
RESOLUTION_MAP: {
|
|
322
316
|
[index: number]: number;
|
|
@@ -340,6 +334,7 @@ export interface IDefault {
|
|
|
340
334
|
CONF_INFO: IConfInfo;
|
|
341
335
|
CLOUD_ROOOM_INFO: ICloudRoomConfig;
|
|
342
336
|
CONFERENCE_INFO: IConferenceInfo;
|
|
337
|
+
MAX_PEOPLE_RESOLUTION: StreamResolution;
|
|
343
338
|
}
|
|
344
339
|
/**
|
|
345
340
|
* SDK登录用户信息
|
|
@@ -385,16 +380,16 @@ export interface IMUTE_MAP {
|
|
|
385
380
|
* 配置画面数据
|
|
386
381
|
*
|
|
387
382
|
* @property { string } calluri 设备url
|
|
388
|
-
* @property {
|
|
389
|
-
* @property {
|
|
383
|
+
* @property { StreamResolutionLevel } resolution 分辨率
|
|
384
|
+
* @property { VideoQuality } quality 质量
|
|
390
385
|
* @property { number } mediagroupid 0:people画面,1:content共享画面
|
|
391
386
|
* @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
|
|
392
387
|
* @property { string } callUri NewLayout版本无此参数
|
|
393
388
|
*/
|
|
394
389
|
export declare type IReqInfo = {
|
|
395
390
|
calluri: string;
|
|
396
|
-
resolution:
|
|
397
|
-
quality:
|
|
391
|
+
resolution: StreamResolutionLevel;
|
|
392
|
+
quality: VideoQuality;
|
|
398
393
|
mediagroupid?: number;
|
|
399
394
|
isContent?: boolean;
|
|
400
395
|
callUri?: string;
|
|
@@ -759,8 +754,8 @@ export interface ILayoutRoster {
|
|
|
759
754
|
/**
|
|
760
755
|
* Conf Change消息
|
|
761
756
|
*
|
|
762
|
-
* @property { number } participantCount
|
|
763
|
-
* @property { number } totalEpCount
|
|
757
|
+
* @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量,包含local
|
|
758
|
+
* @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量, 包含local
|
|
764
759
|
* @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为''
|
|
765
760
|
* @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
|
|
766
761
|
* @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
|
|
@@ -804,7 +799,7 @@ export interface ISpeakerInfo {
|
|
|
804
799
|
* 布局对象
|
|
805
800
|
*
|
|
806
801
|
* @property { number[] } position 模版位置,业务层可以忽略
|
|
807
|
-
* @property {
|
|
802
|
+
* @property { StreamResolutionLevel } resolution 当前布局对象的分辨数据
|
|
808
803
|
* @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
|
|
809
804
|
* @property { any } rotate 当前参会者的旋转信息
|
|
810
805
|
* @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
|
|
@@ -816,7 +811,7 @@ export interface ISpeakerInfo {
|
|
|
816
811
|
*/
|
|
817
812
|
export interface ILayout {
|
|
818
813
|
position?: number[];
|
|
819
|
-
resolution?:
|
|
814
|
+
resolution?: StreamResolutionLevel;
|
|
820
815
|
roster: IRoster;
|
|
821
816
|
rotate?: any;
|
|
822
817
|
state?: ILayoutState;
|
|
@@ -834,6 +829,7 @@ export interface ILayout {
|
|
|
834
829
|
deal?: boolean;
|
|
835
830
|
zIndex?: number;
|
|
836
831
|
avatar?: string;
|
|
832
|
+
index?: number;
|
|
837
833
|
}
|
|
838
834
|
/**
|
|
839
835
|
* Local布局对象
|
|
@@ -902,13 +898,13 @@ export interface IRotationInfo {
|
|
|
902
898
|
* 自定义布局请流对象数据
|
|
903
899
|
*
|
|
904
900
|
* @property { number } pid 用户id,从roster中获取
|
|
905
|
-
* @property {
|
|
901
|
+
* @property { StreamResolutionLevel } resolution 当前请求画面分辨率
|
|
906
902
|
* @value 0 90P
|
|
907
903
|
* @value 1 180P
|
|
908
904
|
* @value 2 360P
|
|
909
905
|
* @value 3 720P
|
|
910
906
|
* @value 4 1080P
|
|
911
|
-
* @property {
|
|
907
|
+
* @property { VideoQuality } quality 画面质量
|
|
912
908
|
* @value 0 100
|
|
913
909
|
* @value 1 200
|
|
914
910
|
* @value 3 300
|
|
@@ -918,8 +914,8 @@ export interface IRotationInfo {
|
|
|
918
914
|
*/
|
|
919
915
|
export interface ICustomLayout {
|
|
920
916
|
pid: number;
|
|
921
|
-
resolution:
|
|
922
|
-
quality:
|
|
917
|
+
resolution: StreamResolutionLevel;
|
|
918
|
+
quality: VideoQuality;
|
|
923
919
|
mediagroupid: number;
|
|
924
920
|
}
|
|
925
921
|
/**
|
|
@@ -1170,6 +1166,30 @@ export interface ITranslationContent {
|
|
|
1170
1166
|
srcLang: string;
|
|
1171
1167
|
targetLang: string;
|
|
1172
1168
|
}
|
|
1169
|
+
/**
|
|
1170
|
+
* 用户自定义消息
|
|
1171
|
+
*
|
|
1172
|
+
* @property { number } toPid - 消息的接收方pid,0表示广播消息、非0表示单点消息;
|
|
1173
|
+
* @property { string } data - 消息内容,可以被JSON序列化的字符串;因业务数据可能会传输图片,需要进行base64编码,消息最大长度限制:1MB
|
|
1174
|
+
*/
|
|
1175
|
+
export interface ICustomMessageConfig {
|
|
1176
|
+
toPid: number;
|
|
1177
|
+
data: string;
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* 接收到自定义消息
|
|
1181
|
+
*
|
|
1182
|
+
* @property { string } type - 消息Type
|
|
1183
|
+
* @property { number } fromPid - 消息的发送方pid
|
|
1184
|
+
* @property { number } toPid - 消息的接收方pid,0表示广播消息、非0表示单点消息;
|
|
1185
|
+
* @property { string } data - 消息内容,可以被JSON序列化的字符串;
|
|
1186
|
+
*/
|
|
1187
|
+
export interface IReceiveCustomMessage {
|
|
1188
|
+
type: string;
|
|
1189
|
+
fromPid: number;
|
|
1190
|
+
toPid: number;
|
|
1191
|
+
data: string;
|
|
1192
|
+
}
|
|
1173
1193
|
/**
|
|
1174
1194
|
* SDK功能控制开关,用于内部是否启用某些功能的运行
|
|
1175
1195
|
* 默认配置:src/enum/index.ts DEFAULT_FEATURE_CONFIG
|
|
@@ -1177,13 +1197,16 @@ export interface ITranslationContent {
|
|
|
1177
1197
|
* @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
|
|
1178
1198
|
* @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
|
|
1179
1199
|
* @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
|
|
1180
|
-
* @property { boolean } enableBandwidthSetting
|
|
1200
|
+
* @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false;
|
|
1181
1201
|
* @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
|
|
1182
1202
|
* @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
|
|
1183
1203
|
* @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
|
|
1184
1204
|
* @property { boolean } enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
|
|
1185
1205
|
* @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
|
|
1186
1206
|
* @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
|
|
1207
|
+
* @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false;
|
|
1208
|
+
* @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
|
|
1209
|
+
*
|
|
1187
1210
|
*/
|
|
1188
1211
|
export interface IFeatureConfig {
|
|
1189
1212
|
enableMeetingShout?: boolean;
|
|
@@ -1196,6 +1219,8 @@ export interface IFeatureConfig {
|
|
|
1196
1219
|
enableLowResolution?: boolean;
|
|
1197
1220
|
enableSpeakerInfo?: boolean;
|
|
1198
1221
|
enableLayoutAvatar?: boolean;
|
|
1222
|
+
enableMobileNotAuth?: boolean;
|
|
1223
|
+
enableWatermarkContent?: boolean;
|
|
1199
1224
|
}
|
|
1200
1225
|
export interface IConfMgmtUrl {
|
|
1201
1226
|
pc: string;
|
|
@@ -1318,10 +1343,20 @@ export interface SpeakersInfoObj {
|
|
|
1318
1343
|
/**
|
|
1319
1344
|
* 实时讲话人消息体
|
|
1320
1345
|
*
|
|
1321
|
-
* @property { speakersInfoObj[] }
|
|
1346
|
+
* @property { speakersInfoObj[] } speakersInfo - 讲话者信息
|
|
1322
1347
|
*
|
|
1323
1348
|
*/
|
|
1324
1349
|
export interface SpeakersInfo {
|
|
1325
|
-
|
|
1350
|
+
speakersInfo: SpeakersInfoObj[];
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* 等候室状态
|
|
1354
|
+
*
|
|
1355
|
+
* @property { number } waitingState 等候室状态 0: 未在等候室; 1:在等候室
|
|
1356
|
+
* @property { string } automute 是否静音
|
|
1357
|
+
*/
|
|
1358
|
+
export interface IWaitingState {
|
|
1359
|
+
waitingState: number;
|
|
1360
|
+
automute: string;
|
|
1326
1361
|
}
|
|
1327
1362
|
export {};
|
package/lib/type/index.d.ts
CHANGED
package/lib/type/meeting.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Last modified : 2022-10-27 19:25:49
|
|
6
6
|
*/
|
|
7
7
|
import { ILoginInfo } from './client';
|
|
8
|
+
import { StreamResolution } from './stream';
|
|
8
9
|
/**
|
|
9
10
|
* 呼叫号码的云会议室属性配置
|
|
10
11
|
*/
|
|
@@ -54,3 +55,22 @@ export interface ICloudRoomConfig {
|
|
|
54
55
|
export interface IExportUserInfo extends ILoginInfo {
|
|
55
56
|
cloudRoomInfo: ICloudRoomConfig;
|
|
56
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* 媒体能力配置
|
|
60
|
+
*
|
|
61
|
+
* @property { string? } pvrxResolution 请流能力
|
|
62
|
+
* @property { boolean } isSupportHighResolution 是否支持高分辨率请流
|
|
63
|
+
* @property { StreamResolution } maxRequestResolution 最高支持请流分辨率
|
|
64
|
+
*/
|
|
65
|
+
export interface IMediaConfig {
|
|
66
|
+
pvrxResolution?: string;
|
|
67
|
+
isSupportHighResolution?: boolean;
|
|
68
|
+
maxRequestResolution?: StreamResolution;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 企业配置参数
|
|
72
|
+
*/
|
|
73
|
+
export interface IEnterpriseConfig {
|
|
74
|
+
clientConfigName: string;
|
|
75
|
+
configName: string;
|
|
76
|
+
}
|
package/lib/type/stream.d.ts
CHANGED
|
@@ -425,3 +425,43 @@ export interface IStreamChangeListType {
|
|
|
425
425
|
content: IStreamChange[];
|
|
426
426
|
people: IStreamChange[];
|
|
427
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* 分辨率枚举列表
|
|
430
|
+
*/
|
|
431
|
+
export declare enum StreamResolution {
|
|
432
|
+
RS90 = 90,
|
|
433
|
+
RS180 = 180,
|
|
434
|
+
RS360 = 360,
|
|
435
|
+
RS720 = 720,
|
|
436
|
+
RS1080 = 1080
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* 帧率枚举列表
|
|
440
|
+
*/
|
|
441
|
+
export declare enum StreamFrameRate {
|
|
442
|
+
FR30 = 30,
|
|
443
|
+
FR15 = 15,
|
|
444
|
+
FR8 = 8
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* 分辨率等级枚举列表
|
|
448
|
+
*/
|
|
449
|
+
export declare enum StreamResolutionLevel {
|
|
450
|
+
LEVEL90 = 0,
|
|
451
|
+
LEVEL180 = 1,
|
|
452
|
+
LEVEL360 = 2,
|
|
453
|
+
LEVEL720 = 3,
|
|
454
|
+
LEVEL1080 = 4
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* 视频质量
|
|
458
|
+
*
|
|
459
|
+
* @param LOW - 低画面质量,帧率会自动降低到15帧接收;
|
|
460
|
+
* @param NORMAL - 普通画面质量,会基于带宽信息自动在30/15帧切换;
|
|
461
|
+
* @param HIGH - 高画面质量,会优先匹配高帧率高分辨率画面;
|
|
462
|
+
*/
|
|
463
|
+
export declare enum VideoQuality {
|
|
464
|
+
LOW = 0,
|
|
465
|
+
NORMAL = 1,
|
|
466
|
+
HIGH = 2
|
|
467
|
+
}
|