@xylink/xy-rtc-sdk 3.8.1 → 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 (43) hide show
  1. package/lib/action/index.d.ts +20 -5
  2. package/lib/enum/client.d.ts +15 -0
  3. package/lib/enum/contraints.d.ts +33 -96
  4. package/lib/enum/device.d.ts +1 -0
  5. package/lib/enum/errorCode.d.ts +58 -1
  6. package/lib/enum/index.d.ts +44 -16
  7. package/lib/index.d.ts +11 -8
  8. package/lib/main/client.d.ts +93 -63
  9. package/lib/main/deviceManager.d.ts +23 -4
  10. package/lib/main/helper.d.ts +2 -2
  11. package/lib/main/iauth.d.ts +14 -1
  12. package/lib/main/layoutManager.d.ts +29 -11
  13. package/lib/main/meeting.d.ts +71 -34
  14. package/lib/main/peer.d.ts +70 -121
  15. package/lib/main/qualityManager.d.ts +38 -9
  16. package/lib/main/stream.d.ts +237 -104
  17. package/lib/main/videoManager.d.ts +1 -9
  18. package/lib/tools/dbManager.d.ts +106 -0
  19. package/lib/tools/detect.d.ts +2 -2
  20. package/lib/tools/enum.d.ts +1 -1
  21. package/lib/tools/httpClient.d.ts +4 -4
  22. package/lib/tools/i18n.d.ts +1 -1
  23. package/lib/tools/logger.d.ts +75 -74
  24. package/lib/tools/logger.worker.d.ts +13 -0
  25. package/lib/tools/quality.d.ts +113 -0
  26. package/lib/tools/quality.worker.d.ts +13 -0
  27. package/lib/tools/queue.d.ts +38 -3
  28. package/lib/tools/template.d.ts +3 -3
  29. package/lib/tools/utils.d.ts +8 -0
  30. package/lib/type/base.d.ts +2 -2
  31. package/lib/type/client.d.ts +255 -150
  32. package/lib/type/device.d.ts +21 -15
  33. package/lib/type/index.d.ts +3 -0
  34. package/lib/type/layout.d.ts +18 -1
  35. package/lib/type/logger.d.ts +112 -0
  36. package/lib/type/meeting.d.ts +11 -2
  37. package/lib/type/peer.d.ts +20 -0
  38. package/lib/type/quality.d.ts +101 -0
  39. package/lib/type/stream.d.ts +332 -134
  40. package/lib/xyrtc.cjs.js +1 -1
  41. package/lib/xyrtc.umd.js +1 -1
  42. package/package.json +4 -4
  43. package/lib/tools/db.d.ts +0 -85
@@ -1,4 +1,4 @@
1
- import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IEnterpriseConfig } from '../type';
1
+ import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IMediaConfigParam } from '../type';
2
2
  import Logger from '../tools/logger';
3
3
  export interface ICommonParams {
4
4
  securityKey: string;
@@ -22,8 +22,8 @@ declare class Action {
22
22
  }): void;
23
23
  setLogger(logger: Logger): void;
24
24
  setMeetingInfo(info: IMeetingInfo): void;
25
- setLoginInfo(loginInfo: IToken | null): void;
26
- getLoginInfo(): IToken;
25
+ setTokenInfo(tokenInfo: IToken | null): void;
26
+ getTokenInfo(): IToken;
27
27
  /**
28
28
  * 日志上传
29
29
  *
@@ -222,12 +222,19 @@ declare class Action {
222
222
  */
223
223
  checkStorageSpaceWithRecordingUrl(recordingUrl: string): Promise<any>;
224
224
  /**
225
- * 获取企业相关配置
225
+ * 获取企业的相关配置(private),包含带宽配置、请流能力等
226
226
  *
227
227
  * @param { number } userId 用户ID
228
228
  * @returns
229
229
  */
230
- getEnterpriseMediaConfig(userId: number, config: IEnterpriseConfig[]): Promise<any>;
230
+ getEnterpriseMediaConfig(userId: number, config: IMediaConfigParam[]): Promise<any>;
231
+ /**
232
+ * 获取企业相关配置(buffet), 包含头像配置
233
+ *
234
+ * @param { number } userId 用户ID
235
+ * @returns
236
+ */
237
+ getEnterpriseConfig(userId: number, enterpriseId: string): Promise<any>;
231
238
  /**
232
239
  * 刷新Token
233
240
  *
@@ -267,6 +274,14 @@ declare class Action {
267
274
  * @returns
268
275
  */
269
276
  sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
277
+ loginWithAuthCode({ extId, extUserId, displayName, oauthCode, isTempUser, channelId }: {
278
+ extId: string;
279
+ extUserId: string;
280
+ channelId: string;
281
+ displayName: string;
282
+ oauthCode: string;
283
+ isTempUser: boolean;
284
+ }): Promise<any>;
270
285
  /**
271
286
  * 设置默认参数,如securityKey
272
287
  *
@@ -0,0 +1,15 @@
1
+ /**
2
+ * XYLink 入口配置
3
+ *
4
+ * Created at : 2023-04-26 15:28:46
5
+ * Last modified : 2023-04-26 15:31:53
6
+ */
7
+ import { IClientConfig } from '../type';
8
+ export declare const DEFAULT_LOG_STYLE = "color: #3876ff;";
9
+ export declare const DEFAULT_LINE = "*********************************************************";
10
+ /**
11
+ * 默认Client配置
12
+ */
13
+ export declare const DEFAULT_CLIENT_CONFIG: IClientConfig;
14
+ export declare const XYLink_LOG: string;
15
+ export declare const XYLINK_LOG_AGENT: string;
@@ -1,119 +1,56 @@
1
- import { ICONTENT_CONTRAINTS, IBASE_CONTRAINTS } from '../type';
1
+ import { I_CONTENT_CONSTRAINTS, I_PEOPLE_CONSTRAINTS, IConstraintsConfigMap, IStreamConfig } from '../type';
2
2
  /**
3
- * 初始默认采集分辨率
3
+ * people基础约束配置
4
+ *
5
+ *
4
6
  */
5
- export declare const BASE_RESOLUTION_CONTRAINTS: {
6
- width: number;
7
- height: number;
8
- };
7
+ export declare const BASE_PEOPLE_CONSTRAINTS: I_PEOPLE_CONSTRAINTS;
9
8
  /**
10
- * 360P
9
+ * people特殊约束配置
10
+ *
11
+ * @param { IStreamConfig } streamConfig - 自定义流数据
12
+ * @param { boolean } streamConfig.enableAspectRatio - 采集时是否支持设置视频流的宽高比, 默认支持
13
+ * @returns
11
14
  */
12
- export declare const RESOLUTION_360_CONTRAINTS: {
13
- width: number;
14
- height: number;
15
- };
15
+ export declare const SPECIAL_PEOPLE_CONSTRAINTS: (streamConfig: IStreamConfig) => I_PEOPLE_CONSTRAINTS;
16
16
  /**
17
- * people 采集基础配置
18
- *
19
- *
17
+ * content采集基础约束配置
20
18
  */
21
- export declare const BASE_CONTRAINTS: IBASE_CONTRAINTS;
19
+ export declare const BASE_CONTENT_CONSTRAINTS: I_CONTENT_CONSTRAINTS;
22
20
  /**
23
- * content 采集基础配置
21
+ * people采集音频基础约束配置
24
22
  */
25
- export declare const CONTENT_BASE_CONTRAINTS: ICONTENT_CONTRAINTS;
23
+ export declare const BASE_PEOPLE_AUDIO_CONSTRAINTS: {
24
+ channelCount: number;
25
+ autoGainControl: boolean;
26
+ noiseSuppression: boolean;
27
+ echoCancellation: boolean;
28
+ };
26
29
  /**
27
30
  * content 720P 1080P 采集配置信息
28
31
  *
29
- * common: 普通模式
30
- * advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
32
+ * COMMON: 普通模式
33
+ * ADVANCED: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
31
34
  */
32
- export declare const CONTENT_CONTRAINTS: {
33
- '720': {
34
- common: {
35
- frameRate?: ConstrainDouble | undefined;
36
- width: number;
37
- height: number;
38
- cursor: string;
39
- aspectRatio: number;
40
- resizeMode: "crop-and-scale";
41
- logicalSurface: true;
42
- } | {
43
- frameRate: ConstrainDouble;
44
- width: number;
45
- height: number;
46
- cursor: string;
47
- aspectRatio: number;
48
- resizeMode: "crop-and-scale";
49
- logicalSurface: true;
50
- };
51
- advanced: {
52
- frameRate: {
53
- ideal: number;
54
- max: number;
55
- };
56
- width: {
57
- ideal: number;
58
- max: number;
59
- };
60
- height: {
61
- ideal: number;
62
- max: number;
63
- };
64
- cursor: string;
65
- aspectRatio: number;
66
- resizeMode: "crop-and-scale";
67
- logicalSurface: true;
68
- };
69
- };
70
- '1080': {
71
- common: {
72
- frameRate?: ConstrainDouble | undefined;
73
- width: number;
74
- height: number;
75
- cursor: string;
76
- aspectRatio: number;
77
- resizeMode: "crop-and-scale";
78
- logicalSurface: true;
79
- } | {
80
- frameRate: ConstrainDouble;
81
- width: number;
82
- height: number;
83
- cursor: string;
84
- aspectRatio: number;
85
- resizeMode: "crop-and-scale";
86
- logicalSurface: true;
87
- };
88
- advanced: {
89
- frameRate: {
90
- ideal: number;
91
- max: number;
92
- };
93
- width: {
94
- ideal: number;
95
- max: number;
96
- };
97
- height: {
98
- ideal: number;
99
- max: number;
100
- };
101
- cursor: string;
102
- aspectRatio: number;
103
- resizeMode: "crop-and-scale";
104
- logicalSurface: true;
105
- };
106
- };
107
- };
35
+ export declare const CONTENT_CONSTRAINTS: IConstraintsConfigMap;
108
36
  /**
109
37
  * people 180P 360P 720P 采集配置信息
110
38
  *
111
39
  * common: 普通模式
112
40
  * advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
113
41
  */
114
- export declare const PEOPLE_CONTRAINTS: any;
42
+ export declare const PEOPLE_CONSTRAINTS: IConstraintsConfigMap;
43
+ /**
44
+ * 分辨率枚举,将分辨率转换为0-6的索引值
45
+ */
115
46
  export declare const RESOLUTION_MAP: Record<string, number>;
47
+ /**
48
+ * 枚举分辨率对应的最小带宽值
49
+ */
116
50
  export declare const MIN_BANDWIDTH_MAP: Record<string, number>;
51
+ /**
52
+ * 枚举会控平台
53
+ */
117
54
  export declare const MEETING_CONTROL_PLATFORM: {
118
55
  PC: string;
119
56
  MOBILE: string;
@@ -1,3 +1,4 @@
1
1
  export declare const DEVICE_TYPE_MAP: {
2
2
  [key: string]: string;
3
3
  };
4
+ export declare const HARD_DEVICE_TYPE_LIST: string[];
@@ -1,4 +1,4 @@
1
- import { TLocale } from 'src/type';
1
+ import { TLocale } from '../type';
2
2
  export declare const SERVER_ERROR_CODE_MAP: {
3
3
  [key: number]: string;
4
4
  };
@@ -38,6 +38,7 @@ export declare const DEFAULT_ERROR_CODE: {
38
38
  'CHARGE:633': string;
39
39
  'CHARGE:634': string;
40
40
  'CHARGE:639': string;
41
+ 'MC:504': string;
41
42
  'CHARGE:637': string;
42
43
  'CHARGE:638': string;
43
44
  'SIG:419': string;
@@ -85,17 +86,23 @@ export declare const DEFAULT_ERROR_CODE: {
85
86
  'SIG:4459': string;
86
87
  'SIG:4452': string;
87
88
  'CHARGE:620': string;
89
+ 'CHARGE:741': string;
88
90
  'SIG:440': string;
89
91
  'SIG:4453': string;
90
92
  'CHARGE:621': string;
93
+ 'CHARGE:742': string;
91
94
  'SIG:4450': string;
92
95
  'SIG:4451': string;
96
+ 'CHARGE:740': string;
93
97
  'CHARGE:613': string;
98
+ 'CHARGE:734': string;
94
99
  'CHARGE:614': string;
95
100
  'REC:400': string;
96
101
  'CHARGE:611': string;
102
+ 'CHARGE:732': string;
97
103
  'REC:401': string;
98
104
  'CHARGE:612': string;
105
+ 'CHARGE:733': string;
99
106
  'REC:402': string;
100
107
  'CHARGE:617': string;
101
108
  'REC:403': string;
@@ -112,7 +119,9 @@ export declare const DEFAULT_ERROR_CODE: {
112
119
  'SIG:4466': string;
113
120
  'REC:406': string;
114
121
  'SIG:4460': string;
122
+ 'CHARGE:730': string;
115
123
  'CHARGE:610': string;
124
+ 'CHARGE:731': string;
116
125
  'SIG:4461': string;
117
126
  'SIG:1404': string;
118
127
  'SIG:469': string;
@@ -122,6 +131,7 @@ export declare const DEFAULT_ERROR_CODE: {
122
131
  'SIG:580': string;
123
132
  'REC:465': string;
124
133
  'REC:466': string;
134
+ 'CHARGE:677': string;
125
135
  'REC:467': string;
126
136
  'REC:468': string;
127
137
  'REC:469': string;
@@ -146,6 +156,7 @@ export declare const DEFAULT_ERROR_CODE: {
146
156
  'CCC:604': string;
147
157
  'CHARGE:667': string;
148
158
  'CCC:603': string;
159
+ 'CHARGE:10000': string;
149
160
  'SIG:487': string;
150
161
  'SIG:488': string;
151
162
  'SIG:485': string;
@@ -230,7 +241,9 @@ export declare const DEFAULT_ERROR_CODE: {
230
241
  'CHARGE:467': string;
231
242
  'CCC:410': string;
232
243
  'CHARGE:464': string;
244
+ 'CHARGE:20001': string;
233
245
  'CCC:413': string;
246
+ 'CHARGE:20000': string;
234
247
  'CCC:412': string;
235
248
  'CHARGE:459': string;
236
249
  'CHARGE:457': string;
@@ -255,16 +268,22 @@ export declare const DEFAULT_ERROR_CODE: {
255
268
  'CHARGE:454': string;
256
269
  'CCC:401': string;
257
270
  'CHARGE:602': string;
271
+ 'CHARGE:723': string;
258
272
  'CHARGE:603': string;
273
+ 'CHARGE:724': string;
259
274
  'CHARGE:721': string;
260
275
  'CHARGE:601': string;
276
+ 'CHARGE:722': string;
261
277
  'CHARGE:606': string;
262
278
  'CHARGE:607': string;
263
279
  'CHARGE:604': string;
280
+ 'CHARGE:725': string;
264
281
  'CHARGE:605': string;
282
+ 'CHARGE:726': string;
265
283
  'SIG:506': string;
266
284
  'SIG:504': string;
267
285
  'CHARGE:608': string;
286
+ 'CHARGE:729': string;
268
287
  'SIG:505': string;
269
288
  'CHARGE:609': string;
270
289
  'SIG:502': string;
@@ -325,6 +344,7 @@ export declare const DEFAULT_ERROR_CODE: {
325
344
  'CHARGE:633': string;
326
345
  'CHARGE:634': string;
327
346
  'CHARGE:639': string;
347
+ 'MC:504': string;
328
348
  'CHARGE:637': string;
329
349
  'CHARGE:638': string;
330
350
  'SIG:419': string;
@@ -371,17 +391,23 @@ export declare const DEFAULT_ERROR_CODE: {
371
391
  'SIG:1502': string;
372
392
  'SIG:4459': string;
373
393
  'CHARGE:620': string;
394
+ 'CHARGE:741': string;
374
395
  'SIG:4452': string;
375
396
  'CHARGE:621': string;
397
+ 'CHARGE:742': string;
376
398
  'SIG:440': string;
377
399
  'SIG:4453': string;
378
400
  'SIG:4450': string;
401
+ 'CHARGE:740': string;
379
402
  'SIG:4451': string;
380
403
  'CHARGE:613': string;
404
+ 'CHARGE:734': string;
381
405
  'CHARGE:614': string;
382
406
  'CHARGE:611': string;
407
+ 'CHARGE:732': string;
383
408
  'REC:400': string;
384
409
  'CHARGE:612': string;
410
+ 'CHARGE:733': string;
385
411
  'REC:401': string;
386
412
  'CHARGE:617': string;
387
413
  'REC:402': string;
@@ -399,7 +425,9 @@ export declare const DEFAULT_ERROR_CODE: {
399
425
  'SIG:4466': string;
400
426
  'REC:406': string;
401
427
  'SIG:4460': string;
428
+ 'CHARGE:730': string;
402
429
  'CHARGE:610': string;
430
+ 'CHARGE:731': string;
403
431
  'SIG:4461': string;
404
432
  'SIG:1404': string;
405
433
  'SIG:469': string;
@@ -408,6 +436,7 @@ export declare const DEFAULT_ERROR_CODE: {
408
436
  'SIG:462': string;
409
437
  'SIG:580': string;
410
438
  'REC:465': string;
439
+ 'CHARGE:677': string;
411
440
  'REC:466': string;
412
441
  'REC:467': string;
413
442
  'REC:468': string;
@@ -433,6 +462,7 @@ export declare const DEFAULT_ERROR_CODE: {
433
462
  'CHARGE:666': string;
434
463
  'CCC:603': string;
435
464
  'CHARGE:667': string;
465
+ 'CHARGE:10000': string;
436
466
  'SIG:487': string;
437
467
  'SIG:488': string;
438
468
  'SIG:485': string;
@@ -518,7 +548,9 @@ export declare const DEFAULT_ERROR_CODE: {
518
548
  'CHARGE:467': string;
519
549
  'CCC:413': string;
520
550
  'CHARGE:464': string;
551
+ 'CHARGE:20001': string;
521
552
  'CCC:412': string;
553
+ 'CHARGE:20000': string;
522
554
  'CHARGE:459': string;
523
555
  'CHARGE:457': string;
524
556
  'CHARGE:458': string;
@@ -542,15 +574,21 @@ export declare const DEFAULT_ERROR_CODE: {
542
574
  'CCC:401': string;
543
575
  'CHARGE:454': string;
544
576
  'CHARGE:602': string;
577
+ 'CHARGE:723': string;
545
578
  'CHARGE:603': string;
579
+ 'CHARGE:724': string;
546
580
  'CHARGE:721': string;
547
581
  'CHARGE:601': string;
582
+ 'CHARGE:722': string;
548
583
  'CHARGE:606': string;
549
584
  'CHARGE:607': string;
550
585
  'CHARGE:604': string;
586
+ 'CHARGE:725': string;
551
587
  'CHARGE:605': string;
588
+ 'CHARGE:726': string;
552
589
  'SIG:506': string;
553
590
  'CHARGE:608': string;
591
+ 'CHARGE:729': string;
554
592
  'SIG:504': string;
555
593
  'CHARGE:609': string;
556
594
  'SIG:505': string;
@@ -614,6 +652,7 @@ export declare const DEFAULT_ERROR_CODE: {
614
652
  'CHARGE:633': string;
615
653
  'CHARGE:634': string;
616
654
  'CHARGE:639': string;
655
+ 'MC:504': string;
617
656
  'CHARGE:637': string;
618
657
  'CHARGE:638': string;
619
658
  'SIG:419': string;
@@ -661,16 +700,22 @@ export declare const DEFAULT_ERROR_CODE: {
661
700
  'SIG:4459': string;
662
701
  'SIG:4452': string;
663
702
  'CHARGE:620': string;
703
+ 'CHARGE:741': string;
664
704
  'SIG:440': string;
665
705
  'SIG:4453': string;
666
706
  'CHARGE:621': string;
707
+ 'CHARGE:742': string;
667
708
  'SIG:4450': string;
668
709
  'SIG:4451': string;
710
+ 'CHARGE:740': string;
669
711
  'CHARGE:613': string;
712
+ 'CHARGE:734': string;
670
713
  'CHARGE:614': string;
671
714
  'CHARGE:611': string;
715
+ 'CHARGE:732': string;
672
716
  'REC:400': string;
673
717
  'CHARGE:612': string;
718
+ 'CHARGE:733': string;
674
719
  'REC:401': string;
675
720
  'CHARGE:617': string;
676
721
  'REC:402': string;
@@ -688,7 +733,9 @@ export declare const DEFAULT_ERROR_CODE: {
688
733
  'SIG:4466': string;
689
734
  'REC:406': string;
690
735
  'SIG:4460': string;
736
+ 'CHARGE:730': string;
691
737
  'CHARGE:610': string;
738
+ 'CHARGE:731': string;
692
739
  'SIG:4461': string;
693
740
  'SIG:1404': string;
694
741
  'SIG:469': string;
@@ -697,6 +744,7 @@ export declare const DEFAULT_ERROR_CODE: {
697
744
  'SIG:462': string;
698
745
  'SIG:580': string;
699
746
  'REC:465': string;
747
+ 'CHARGE:677': string;
700
748
  'REC:466': string;
701
749
  'REC:467': string;
702
750
  'REC:468': string;
@@ -718,6 +766,7 @@ export declare const DEFAULT_ERROR_CODE: {
718
766
  'CHARGE:669': string;
719
767
  'CHARGE:666': string;
720
768
  'CHARGE:667': string;
769
+ 'CHARGE:10000': string;
721
770
  'SIG:487': string;
722
771
  'SIG:488': string;
723
772
  'SIG:485': string;
@@ -802,7 +851,9 @@ export declare const DEFAULT_ERROR_CODE: {
802
851
  'CHARGE:467': string;
803
852
  'CCC:413': string;
804
853
  'CHARGE:464': string;
854
+ 'CHARGE:20001': string;
805
855
  'CCC:412': string;
856
+ 'CHARGE:20000': string;
806
857
  'CHARGE:459': string;
807
858
  'CHARGE:457': string;
808
859
  'CHARGE:458': string;
@@ -826,16 +877,22 @@ export declare const DEFAULT_ERROR_CODE: {
826
877
  'CCC:401': string;
827
878
  'CHARGE:454': string;
828
879
  'CHARGE:602': string;
880
+ 'CHARGE:723': string;
829
881
  'CHARGE:603': string;
882
+ 'CHARGE:724': string;
830
883
  'CHARGE:721': string;
831
884
  'CHARGE:601': string;
885
+ 'CHARGE:722': string;
832
886
  'CHARGE:606': string;
833
887
  'CHARGE:607': string;
834
888
  'CHARGE:604': string;
889
+ 'CHARGE:725': string;
835
890
  'CHARGE:605': string;
891
+ 'CHARGE:726': string;
836
892
  'SIG:506': string;
837
893
  'SIG:504': string;
838
894
  'CHARGE:608': string;
895
+ 'CHARGE:729': string;
839
896
  'SIG:505': string;
840
897
  'CHARGE:609': string;
841
898
  'SIG:502': string;
@@ -4,19 +4,38 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-30 14:12:52
6
6
  */
7
- import { IDefault, IMUTE_MAP, ITemplateMode, IContentTemplateMode, IRoster, IFeatureConfig } from '../type';
7
+ import { IDefault, IOPERATE_MAP, ITemplateMode, IContentTemplateMode, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode } from '../type';
8
8
  export * from './contraints';
9
9
  export declare const LOG_CACHE_COUNT = 10;
10
10
  export declare const DB_TABLE_COUNT = 10;
11
11
  export declare const DETECT_LOCATOR_SERVER_NAME = "WebrtcSigGW";
12
12
  export declare const MIME_TYPE = "video/H264";
13
+ export declare const MIME_AUDIO_TYPE = "audio/opus";
13
14
  export declare const DEVICE_TYPE = 17;
14
15
  export declare const SELF_MOCK_PID = 9999999999;
15
16
  export declare const STREAM_CHANNEL_COUNT = 11;
17
+ export declare const STREAM_OUTSIDE_CHANNEL_COUNT = 3;
16
18
  export declare const MAX_PARTICIPANT_COUNT = 112;
17
19
  export declare const MAX_CUSTOM_MESSAGE_LEN = 1846666;
18
20
  export declare const MAX_CUSTOM_MESSAGE_LOG_LEN = 13333;
19
21
  export declare const STREAM_ERROR_CODE_MAP: string[];
22
+ export declare const STREAM_RECREATE_CODE_MAP: string[];
23
+ /**
24
+ * 失效的StreamStatus列表
25
+ */
26
+ export declare const DISENABLED_STREAM_STATUS_MAP: StreamStatus[];
27
+ /**
28
+ * 支持采集视频流的StreamStatus列表
29
+ */
30
+ export declare const ENABLE_STREAM_STATUS_MAP: StreamStatus[];
31
+ /**
32
+ * 可用的StreamStatus列表
33
+ */
34
+ export declare const NORMAL_STREAM_STATUS_MAP: StreamStatus[];
35
+ /**
36
+ * 可用于发送的Stream Type列表
37
+ */
38
+ export declare const NORMAL_STREAM_TYPE_MAP: StreamType[];
20
39
  /**
21
40
  * 支持呼叫的会议室类型
22
41
  */
@@ -51,7 +70,7 @@ export declare const NETWORK_TYPE_MAP: {
51
70
  /**
52
71
  * 音视频状态
53
72
  */
54
- export declare const MUTE_MAP: IMUTE_MAP;
73
+ export declare const OPERATE_MAP: IOPERATE_MAP;
55
74
  export declare const CONFIGURATION: RTCConfiguration;
56
75
  /**
57
76
  * stop call 对应错误码
@@ -96,20 +115,6 @@ export declare const APP_NAME: {
96
115
  export declare const EVENT_TYPE_MAP: {
97
116
  [key: string]: string;
98
117
  };
99
- /**
100
- * content audio offer 状态
101
- */
102
- export declare const CONTENT_AUDIO_OFFER_STATE: {
103
- NOT_SEND: number;
104
- SEND: number;
105
- SENDED: number;
106
- };
107
- /**
108
- * 支持的分辨率
109
- */
110
- export declare const SCALE_RESOLUTION_MAP: {
111
- [key: string]: number;
112
- };
113
118
  /**
114
119
  * 隐身入会
115
120
  *
@@ -137,6 +142,29 @@ export declare const HIDE_KEY_INFOS: string[];
137
142
  * SDK功能控制开关
138
143
  */
139
144
  export declare const DEFAULT_FEATURE_CONFIG: IFeatureConfig;
145
+ /**
146
+ * Steam模块init方法config参数默认值
147
+ */
148
+ export declare const DEFAULT_STREAM_CONFIG_DEVICES: {
149
+ audioInputValue: string;
150
+ videoInValue: string;
151
+ };
152
+ /**
153
+ * 默认数据库版本
154
+ */
155
+ export declare const DEF_DB_VERSION = 1;
156
+ /**
157
+ * 默认数据表的起始索引序列
158
+ */
159
+ export declare const DEF_TABLE_INDEX = 1;
160
+ /**
161
+ * 默认数据库配置
162
+ */
163
+ export declare const DEFAULT_LOGGER_CONFIG: ILoggerConfig;
164
+ /**
165
+ * 相机方向
166
+ */
167
+ export declare const FACING_MODE_LIST: readonly [FacingMode.FRONT, FacingMode.BACK];
140
168
  /**
141
169
  * 企业配置信息
142
170
  *
package/lib/index.d.ts CHANGED
@@ -6,29 +6,32 @@
6
6
  * @authors Luo-jinghui (luojinghui424@gmail.com)
7
7
  * @date 2019-10-14 18:20:28
8
8
  */
9
+ import { IClientConfig, IConfig, TLocale, ICheckSystemRequirements, ISteamConfig } from './type';
10
+ import DeviceManager from './main/deviceManager';
9
11
  import Logger from './tools/logger';
10
12
  import Client from './main/client';
11
13
  import Stream from './main/stream';
12
- import { IClientConfig, IConfig, TLocale, ICheckSystemRequirements } from './type';
13
- import DeviceManager from './main/deviceManager';
14
- import { getLayoutItemState, getVideoInfoByRotation, getLayoutRotateInfo, getSendSupportedCodec, detectLocator } from './main/helper';
15
- interface IXyRTC {
14
+ import { getVideoInfoByRotation, getSendSupportedCodec, getLayoutRotateInfo, getLayoutItemState, detectLocator } from './main/helper';
15
+ /**
16
+ * XYLink WebRTC SDK 操作入口
17
+ */
18
+ interface XYLinkRTC {
16
19
  version: string;
17
20
  client: Client | null;
18
21
  logger: Logger;
22
+ createClient: (config: IClientConfig, logger?: Logger) => Client;
23
+ createStream: (config?: ISteamConfig, logger?: Logger) => Stream;
19
24
  checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
20
25
  checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
21
26
  checkSupportShareContent: () => boolean;
22
27
  setLocale: (language: TLocale) => void;
23
- createClient: (config: IClientConfig) => Client;
24
- createStream: () => Stream;
25
28
  setConfig: (config: IConfig) => void;
26
29
  closePreviewStream: (stream: MediaStream) => void;
27
30
  setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
28
31
  render: void;
29
32
  }
30
- declare const xyRTC: IXyRTC;
33
+ declare const xyRTC: XYLinkRTC;
31
34
  export default xyRTC;
32
- export { Client, Stream, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
35
+ export { Client, Stream, Logger, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
33
36
  export * from './type';
34
37
  export { ERROR_CODE } from './enum/errorCode';