@xylink/xy-rtc-sdk 3.9.1 → 3.10.0-beta.4

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 (51) hide show
  1. package/lib/action/index.d.ts +101 -19
  2. package/lib/enum/client.d.ts +1 -1
  3. package/lib/enum/{contraints.d.ts → constraints.d.ts} +6 -0
  4. package/lib/enum/device.d.ts +34 -0
  5. package/lib/enum/errorCode.d.ts +7 -1
  6. package/lib/enum/i18n.d.ts +6 -0
  7. package/lib/enum/index.d.ts +60 -6
  8. package/lib/enum/meeting.d.ts +4 -0
  9. package/lib/feature/index.d.ts +1 -0
  10. package/lib/feature/speaker.d.ts +61 -0
  11. package/lib/index.d.ts +11 -10
  12. package/lib/main/ability/const.d.ts +2 -0
  13. package/lib/main/ability/index.d.ts +31 -0
  14. package/lib/main/{iauth.d.ts → auth.d.ts} +8 -8
  15. package/lib/main/client.d.ts +191 -99
  16. package/lib/main/clientImplements.d.ts +99 -0
  17. package/lib/main/deviceManager.d.ts +150 -93
  18. package/lib/main/helper.d.ts +62 -9
  19. package/lib/main/layout/index.d.ts +67 -31
  20. package/lib/main/meeting.d.ts +32 -26
  21. package/lib/main/peer.d.ts +3 -1
  22. package/lib/main/stream.d.ts +47 -21
  23. package/lib/main/videoManager.d.ts +95 -12
  24. package/lib/tools/{audioLevel.d.ts → analyser.d.ts} +11 -4
  25. package/lib/tools/browser.d.ts +2 -0
  26. package/lib/tools/httpClient.d.ts +27 -6
  27. package/lib/tools/index.d.ts +12 -5
  28. package/lib/tools/{logger.d.ts → log/logger.d.ts} +18 -7
  29. package/lib/tools/log/loggerManager.d.ts +69 -0
  30. package/lib/tools/promiseQueue.d.ts +45 -0
  31. package/lib/tools/queue.d.ts +12 -15
  32. package/lib/tools/resize.d.ts +62 -0
  33. package/lib/tools/snapshot.d.ts +31 -0
  34. package/lib/tools/socket.d.ts +99 -32
  35. package/lib/tools/utils.d.ts +13 -5
  36. package/lib/type/ability.d.ts +25 -0
  37. package/lib/type/analyser.d.ts +18 -0
  38. package/lib/type/{iauth.d.ts → auth.d.ts} +0 -7
  39. package/lib/type/base.d.ts +16 -0
  40. package/lib/type/client.d.ts +154 -74
  41. package/lib/type/device.d.ts +103 -31
  42. package/lib/type/index.d.ts +3 -1
  43. package/lib/type/layout.d.ts +34 -0
  44. package/lib/type/logger.d.ts +19 -1
  45. package/lib/type/meeting.d.ts +294 -10
  46. package/lib/type/socket.d.ts +60 -0
  47. package/lib/type/stream.d.ts +20 -12
  48. package/lib/xyrtc.cjs.js +1 -1
  49. package/lib/xyrtc.umd.js +1 -1
  50. package/package.json +7 -5
  51. /package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +0 -0
@@ -1,9 +1,10 @@
1
1
  import { IToken } from './base';
2
2
  import VideoManager from '../main/videoManager';
3
- import { IInternals, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
3
+ import { IInternals, StreamResolutionLevel, VideoQuality } from './stream';
4
4
  import { SupportLocalLanguages } from '../enum';
5
- import { ICloudRoomConfig } from './meeting';
6
- import { ContentTemplateMode, ExternalTemplateConfig, TemplateMode } from './layout';
5
+ import { ConferenceProperties, ICloudRoomConfig } from './meeting';
6
+ import { ContentTemplateMode, ExternalTemplateConfig, IRotateStyle, LayoutAvatarType, TemplateMode } from './layout';
7
+ import { AudioAnalyser } from '../tools/analyser';
7
8
  /**
8
9
  * 向Client推送流类型
9
10
  *
@@ -244,24 +245,16 @@ export type IFacingMode = keyof typeof FacingMode;
244
245
  * @property { string } clientSecret 必填 | "" | 网关密钥,需要从对接人处获取
245
246
  * @property { string } extId 非必填 企业ID
246
247
  * @property { string } server 非必填 服务地址, IP/域名 + 端口,如: cloudapi.xylink.com
247
- * @property { string } wssServer 非必填 websocket服务地址,默认不需要配置, 待废弃
248
- * @property { string } httpServer 非必填 resetApi服务地址,默认不需要配置, 待废弃
249
- * @property { string } logServer 非必填 logServer服务地址,默认不需要配置, 待废弃
250
248
  * @property { IClientLayout } layout 非必填 | AUTO | 布局模式,可选:AUTO | CUSTOM
251
- * @property { boolean } debug 非必填 | false | 是否接收所有参会者音视频状态数据,默认不发送
252
- * @property { boolean } muteAudio 非必填 | false | 是否开启/关闭麦克风入会,默认是false,开启麦克风
253
- * @property { boolean } muteVideo 非必填 | false | 是否开启/关闭摄像头入会,默认是false,开启摄像头
254
249
  * @property { { offset?: number[]; elementId?: string } } container 非必填 | {} | 配置layout container容器节点和偏移量
255
250
  * @property { number[] } container.offset 非必填 | [] | 配置[上 下 左 右]的偏移量,自动布局适用
256
251
  * @property { string } container.elementId 非必填 | "" | 配置Layout需要包裹在elementId元素里面显示,并使用此元素的信息计算 Layout 的 size和 position
257
- * @property { boolean } localHide 非必填 | false | 是否在页面上隐藏Local画面,默认不隐藏
258
- * @property { boolean } localMirror 非必填 | true | 是否需要镜像Local画面,默认镜像Local
259
- * @property { TemplateMode } templateMode 非必填 | 布局模式,默认:SPEAKER,1大N小 画面布局模式,可选:SPEAKER | GALLERY
260
- * @property { string } __hideId 是否是隐身入会模式,hide代表隐身入会,为空代表正常模式
261
- * @property { string } __monitorMode 是否是巡课模式,默认是'',MONITOR代表巡课模式
262
252
  * @property { boolean } isThird 埋点
263
253
  * @property { boolean } isSupportHybridCloud 是否是混合云,默认公有云。 如果有探测到内网地址,则此值为true,将不进行鉴权。
264
- * @property { boolean? } checkSSL 是否启用必须使用Https协议访问页面,默认启用,设置为true,建议开启,Http页面下无法访问WebRTC API,音视频互通存在问题;
254
+ *
255
+ * @property { boolean } debug 非必填 | false | 是否接收所有参会者音视频状态数据,默认不发送
256
+ * @property { boolean } localHide 非必填 | false | 是否在页面上隐藏Local画面,默认不隐藏
257
+ * @property { boolean } localMirror 非必填 | true | 是否需要镜像Local画面,默认镜像Local
265
258
  *
266
259
  */
267
260
  export interface IClientConfig {
@@ -269,25 +262,14 @@ export interface IClientConfig {
269
262
  clientSecret?: string;
270
263
  extId?: string;
271
264
  server?: string;
272
- wssServer?: string;
273
- httpServer?: string;
274
- logServer?: string;
275
265
  layout?: IClientLayout;
276
- debug?: boolean;
277
- muteAudio?: boolean;
278
- muteVideo?: boolean;
279
266
  container?: {
280
267
  offset?: number[];
281
268
  elementId?: string;
282
269
  };
283
- localHide?: boolean;
284
- localMirror?: boolean;
285
- templateMode?: TemplateMode;
286
- __hideId?: number | string;
287
- __monitorMode?: string;
288
270
  isThird?: boolean;
289
271
  isSupportHybridCloud?: boolean;
290
- checkSSL?: boolean;
272
+ debug?: boolean;
291
273
  }
292
274
  export interface ILayoutParams {
293
275
  rosters: IRoster[];
@@ -323,10 +305,9 @@ export interface IDefault {
323
305
  LOGIN_INFO: {
324
306
  callUri: string;
325
307
  securityKey: string;
326
- access_token: string;
327
- refresh_token: string;
328
308
  id: number;
329
309
  displayName: string;
310
+ token: IToken;
330
311
  };
331
312
  LAYOUT: ILayout;
332
313
  MAP_RESOLUTION_STRING: {
@@ -338,7 +319,6 @@ export interface IDefault {
338
319
  CONF_INFO: IConfInfo;
339
320
  CLOUD_ROOOM_INFO: ICloudRoomConfig;
340
321
  CONFERENCE_INFO: IConferenceInfo;
341
- MAX_PEOPLE_RESOLUTION: StreamResolution;
342
322
  }
343
323
  /**
344
324
  * SDK登录用户信息
@@ -356,8 +336,7 @@ export interface IDefault {
356
336
  export interface ILoginInfo {
357
337
  callUri?: string;
358
338
  securityKey: string;
359
- access_token: string;
360
- refresh_token?: string;
339
+ token: IToken;
361
340
  id: number;
362
341
  displayName?: string;
363
342
  cellPhone?: string;
@@ -406,6 +385,7 @@ export interface IMeetingInfo {
406
385
  meetingId: string;
407
386
  callUri: string;
408
387
  vcNumber: string;
388
+ remoteUri: string;
409
389
  }
410
390
  /**
411
391
  * 调度失败的uri列表项目
@@ -480,9 +460,9 @@ export interface IHttpConfig {
480
460
  *
481
461
  * 此信息是由业务层提供网关配置
482
462
  */
483
- export interface IConfig extends IToken {
484
- client_id: string;
485
- client_secret: string;
463
+ export interface LoginTokenInfo extends IToken {
464
+ clientId: string;
465
+ clientSecret: string;
486
466
  }
487
467
  /**
488
468
  * 会议室配置信息
@@ -506,8 +486,10 @@ export interface IConfAuxProperties {
506
486
  * @property { string } avatar 头像
507
487
  * @property { InviteInfo } inviteInfo 会议分享信息,包含会议邀请链接、电话,WebRTC、终端等端的入会方式;
508
488
  * @property { string } meetingId 当前会议ID
489
+ * @property { string } config 会议室配置
490
+ * @property { string } displayConfig 可见性配置
509
491
  */
510
- export interface IConferenceInfo {
492
+ export interface IConferenceInfo extends Partial<ConferenceProperties> {
511
493
  callNumber?: string;
512
494
  callUrl?: string;
513
495
  deviceId?: string;
@@ -520,6 +502,26 @@ export interface IConferenceInfo {
520
502
  inviteInfo?: InviteInfo;
521
503
  meetingId?: string;
522
504
  displayNum?: string;
505
+ config?: IConferenceConfig;
506
+ displayConfig?: IConferenceDisplayConfig;
507
+ }
508
+ /**
509
+ * 会议室配置
510
+ *
511
+ * @param { boolean } displayConfNo - 是否显示会议号
512
+ * @param { string } subtitle - 是否显示字幕 'true' | 'false'
513
+ */
514
+ export interface IConferenceConfig {
515
+ displayConfNo?: boolean;
516
+ subtitle?: string;
517
+ }
518
+ /**
519
+ * 会议室可见性配置
520
+ *
521
+ * @param { boolean } subtitle - 是否显示字幕
522
+ */
523
+ export interface IConferenceDisplayConfig {
524
+ subtitle?: boolean;
523
525
  }
524
526
  /**
525
527
  * 会议分享信息
@@ -569,12 +571,20 @@ export interface InviteInfo {
569
571
  * @property { string } confNumber 云会议号/终端号/手机号
570
572
  * @property { string? } password 入会密码,没有则为空
571
573
  * @property { string? } displayName 入会显示昵称
574
+ * @property { boolean } muteAudio 非必填 | false | 是否开启/关闭麦克风入会,默认是false,开启麦克风
575
+ * @property { boolean } muteVideo 非必填 | false | 是否开启/关闭摄像头入会,默认是false,开启摄像头
576
+ * @property { number | string } __hideId 是否是隐身入会模式,默认为空值,代表正常非隐身模式
577
+ * @property { string } __monitorMode 是否是巡课模式,默认是'',MONITOR代表巡课模式
572
578
  */
573
579
  export interface IMackCall {
574
580
  token: string;
575
581
  confNumber: string;
576
582
  password?: string;
577
583
  displayName?: string;
584
+ muteAudio?: boolean;
585
+ muteVideo?: boolean;
586
+ __hideId?: number | string;
587
+ __monitorMode?: string;
578
588
  }
579
589
  /**
580
590
  * 呼叫的会议信息
@@ -651,7 +661,7 @@ export interface IMeetingControl {
651
661
  /**
652
662
  * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
653
663
  *
654
- * @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
664
+ * @property { string } id 参会者唯一ID
655
665
  * @property { IDeviceType } deviceType 设备类型
656
666
  * @property { string } endpointId 设备id
657
667
  * @property { string } displayName 参会者名称
@@ -753,6 +763,9 @@ export declare enum MuteReason {
753
763
  * @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
754
764
  * @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
755
765
  * @property { IMediaGroupInfo[] } mediaGroupnfo 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
766
+ * @property { number } onHoldCount 等候室人数
767
+ * @property { number } audioTxUnMuteEpCount 未静音人数
768
+ * @property { number } videoTxUnMuteEpCount 未关闭摄像头人数
756
769
  */
757
770
  export interface IConfInfo {
758
771
  participantCount: number;
@@ -761,6 +774,9 @@ export interface IConfInfo {
761
774
  contentUri: string;
762
775
  actSpkUri: string;
763
776
  mediaGroupInfo: IMediaGroupInfo[];
777
+ onHoldCount?: number;
778
+ audioTxUnMuteEpCount?: number;
779
+ videoTxUnMuteEpCount?: number;
764
780
  }
765
781
  export interface IMediaGroupInfo {
766
782
  endpointCount: number;
@@ -788,15 +804,26 @@ export interface ISpeakerInfo {
788
804
  endpointId: string;
789
805
  pid: number;
790
806
  }
807
+ /**
808
+ * 头像
809
+ *
810
+ * @property { LayoutAvatarType } type - 头像类型,名称头像、人物头像
811
+ * @property { string } value - 内容
812
+ */
813
+ export interface LayoutAvatar {
814
+ type: LayoutAvatarType;
815
+ value: string;
816
+ }
791
817
  /**
792
818
  * 布局对象
793
819
  *
794
820
  * @property { IRoster } roster 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
795
821
  * @property { ILayoutState } state 当前参会者的画面状态信息,暂时未使用
796
- * @property { any } rotate 当前参会者的旋转信息,用于设置video标签样式
822
+ * @property { IRotateStyle | null } rotate 当前参会者的旋转信息,用于设置video标签样式
823
+ * @property { IRotationInfoTotalItem | null } rotationInfo 当前参会者的旋转信息
797
824
  * @property { { left: string; top: string; width: string; height: string } } positionStyle 当前参会者的位置样式
798
- * @property { string } avatar 人物头像
799
- * @property { string } textAvatar 名称头像
825
+ * @property { LayoutAvatar | null } avatar 头像, 如未在setFeatureConfig配置相关参数,则返回null
826
+ * @property { boolean } isMirror 是否是镜像画面
800
827
  * @property { ExternalTemplateConfig } templateConfig 忽略
801
828
  * @property { { width: number; height: number } } positionInfo 忽略
802
829
  * @property { number[] } position 忽略
@@ -807,16 +834,17 @@ export interface ISpeakerInfo {
807
834
  */
808
835
  export interface ILayout {
809
836
  roster: IRoster;
810
- state?: ILayoutState;
811
- rotate?: any;
837
+ state: ILayoutState;
838
+ rotate: IRotateStyle | null;
839
+ rotationInfo: IRotationInfoTotalItem | null;
840
+ avatar: LayoutAvatar | null;
812
841
  positionStyle?: {
813
842
  left: string;
814
843
  top: string;
815
844
  width: string;
816
845
  height: string;
817
846
  };
818
- avatar?: string;
819
- textAvatar?: string;
847
+ isMirror?: boolean;
820
848
  templateConfig?: ExternalTemplateConfig;
821
849
  position?: number[];
822
850
  positionInfo?: {
@@ -1190,19 +1218,19 @@ export interface IReceiveCustomMessage {
1190
1218
  * SDK功能控制开关,用于内部是否启用某些功能的运行
1191
1219
  * 默认配置:src/enum/index.ts DEFAULT_FEATURE_CONFIG
1192
1220
  *
1193
- * @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
1194
- * @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
1195
- * @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
1196
- * @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false;
1197
- * @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
1198
- * @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
1199
- * @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
1200
- * @property { boolean } enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
1201
- * @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
1202
- * @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
1203
- * @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false;
1221
+ * @property { boolean } enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音
1222
+ * @property { boolean } enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true
1223
+ * @property { boolean } enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false
1224
+ * @property { boolean } enableBandwidthSetting 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false
1225
+ * @property { boolean } enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false
1226
+ * @property { boolean } enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false
1227
+ * @property { boolean } enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true
1228
+ * @property { boolean } enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false
1229
+ * @property { boolean } enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false
1230
+ * @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false
1231
+ * @property { boolean } enableMobileNotAuth 移动端是否支持无授权入会, 默认设置为false
1204
1232
  * @property { boolean } enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
1205
- *
1233
+ * @property { boolean } enableHideLocalView 是否启用隐藏本地画面模式,默认不启用,设置为false
1206
1234
  */
1207
1235
  export interface IFeatureConfig {
1208
1236
  enableMeetingShout?: boolean;
@@ -1217,7 +1245,20 @@ export interface IFeatureConfig {
1217
1245
  enableLayoutAvatar?: boolean;
1218
1246
  enableMobileNotAuth?: boolean;
1219
1247
  enableWatermarkContent?: boolean;
1248
+ enableHideLocalView?: boolean;
1220
1249
  }
1250
+ /**
1251
+ * SDK功能控制开关的key
1252
+ */
1253
+ export type IFeatureConfigKey = keyof IFeatureConfig;
1254
+ /**
1255
+ * SDK功能控制开关的key List
1256
+ */
1257
+ export type IFeatureConfigKeys = Array<IFeatureConfigKey>;
1258
+ /**
1259
+ * SDK功能控制开关的Value
1260
+ */
1261
+ export type IFeatureConfigValue<K extends keyof IFeatureConfig> = IFeatureConfig[K];
1221
1262
  export interface IConfMgmtUrl {
1222
1263
  pc: string;
1223
1264
  member: string;
@@ -1329,13 +1370,30 @@ export interface unMuteVideoQueryToast {
1329
1370
  *
1330
1371
  * @property { string } alias - 别名id
1331
1372
  * @property { string } name - 讲话者名称
1332
- * @property { string } pid - pid
1333
- *
1373
+ * @property { number } pid - pid
1374
+ * @property { string } endpointId - 用户标识ID
1375
+ * @property { string } trackId - StreamTrack轨道ID
1376
+ * @property { boolean } isLocal - 是否是Local设备
1377
+ * @property { number } level - 音量等级
1378
+ * @property { string } id - 参会者唯一ID,通过roster数据获取
1334
1379
  */
1335
1380
  export interface SpeakersInfoObj {
1336
1381
  alias: string;
1337
1382
  name: string;
1338
1383
  pid: number;
1384
+ endpointId?: string;
1385
+ trackId?: string;
1386
+ isLocal?: boolean;
1387
+ level?: number;
1388
+ id?: string;
1389
+ }
1390
+ /**
1391
+ * 实时讲话人内部数据
1392
+ */
1393
+ export interface SpeakerInternalData {
1394
+ stream: MediaStream | null;
1395
+ analyser: AudioAnalyser | null;
1396
+ timestamp: number;
1339
1397
  }
1340
1398
  /**
1341
1399
  * 实时讲话人消息体
@@ -1364,27 +1422,49 @@ export interface IStreamCapability {
1364
1422
  resolution: StreamResolutionLevel;
1365
1423
  }
1366
1424
  /**
1367
- * 是否是联席主持人
1425
+ * 截图参数
1368
1426
  *
1369
- * @param ON - 是
1370
- * @param OFF - 否
1427
+ * @property { string } rosterId - 用户id,通过layout事件列表获取
1428
+ * @property { string } imageType - 图片格式, 默认'image/png'
1429
+ * @property { number } compressLevel - 图片质量,0-1
1371
1430
  */
1372
- export declare enum CoChair {
1373
- ON = "on",
1374
- OFF = "off"
1431
+ export interface SnapshotParams {
1432
+ rosterId: string;
1433
+ imageType?: string;
1434
+ compressLevel?: number;
1375
1435
  }
1376
1436
  /**
1377
- * 信令上报的消息
1437
+ * canvas绘制video参数
1378
1438
  *
1379
- * @property { number } subType - 消息类型
1380
- * @property { number } content - 消息详细内容
1381
- * @property { CoChair } content.coChair - 是否是联席主持人
1439
+ * @property { boolean } isMirror - 是否镜像显示
1440
+ * @property { number } rotate - 是否旋转
1441
+ * @property { string } imageType - 图片格式, 默认'image/png'
1442
+ * @property { number } compressLevel - 图片质量,0-1
1382
1443
  */
1383
- export interface Notification {
1384
- subType: number;
1385
- content: {
1386
- coChair: CoChair;
1387
- };
1388
- requestId: string;
1444
+ export interface SnapshotOptions {
1445
+ isMirror?: boolean;
1446
+ rotate?: number;
1447
+ imageType?: string;
1448
+ compressLevel?: number;
1449
+ }
1450
+ /**
1451
+ * 截图结果
1452
+ *
1453
+ * @property { string } dataURL - 图片数据
1454
+ * @property { number } width - 图片的宽度
1455
+ * @property { number } height - 图片的高度
1456
+ */
1457
+ export interface SnapshotResult {
1458
+ dataURL: string;
1459
+ width: number;
1460
+ height: number;
1461
+ }
1462
+ /**
1463
+ * 本地视频渲染参数
1464
+ *
1465
+ * @property { boolean} isMirror - 是否镜像显示
1466
+ */
1467
+ export interface LocalViewParams {
1468
+ isMirror: boolean;
1389
1469
  }
1390
1470
  export {};
@@ -15,57 +15,106 @@ export declare enum PermissionType {
15
15
  'FAILED' = "failed"
16
16
  }
17
17
  /**
18
- * 获取设备信息
18
+ * 设备类型
19
19
  *
20
- * @property { string } deviceId 设备id
21
- * @property { string } label 设备名称
22
- * @property { string } groupId 设备分组
23
- * @property { 'output' | 'input' } direction 设备方向
24
- * @value output 输出设备
25
- * @value input 输入设备
26
- * @property { 'audioinput' | 'audiooutput' | 'videoinput' } kind 设备种类
27
- * @value audioinput 音频输入
28
- * @value audiooutput 音频输出
29
- * @value videoinput 摄像头输入
30
- * @property { string } type 设备采集流类型:video/audio
20
+ * @param AUDIOINPUT audioinput - 麦克风设备
21
+ * @param AUDIOOUTPUT audiooutput - 扬声器设备
22
+ * @param VIDEOINPUT videoinput - 摄像头设备
31
23
  */
32
- export type IDeviceInfo = {
24
+ export declare enum DEVICE_KIND {
25
+ 'AUDIOINPUT' = "audioInput",
26
+ 'AUDIOOUTPUT' = "audioOutput",
27
+ 'VIDEOINPUT' = "videoInput"
28
+ }
29
+ /**
30
+ * 设备基本信息
31
+ *
32
+ * @property { string } deviceId - 设备ID,切换设备时,需要使用此值
33
+ * @property { string } label - 设备名称
34
+ * @property { string } groupId - 设备分组
35
+ * @property { 'audioinput' | 'audiooutput' | 'videoinput' } kind - 设备类型
36
+ */
37
+ export type IDevice = {
33
38
  deviceId: string;
34
39
  label: string;
35
- groupId?: string;
36
- direction?: 'output' | 'input';
37
- kind?: 'audioinput' | 'audiooutput' | 'videoinput';
38
- type?: 'video' | 'audio';
40
+ kind: DEVICE_KIND;
41
+ groupId: string;
39
42
  };
43
+ /**
44
+ * 设备信息
45
+ *
46
+ * @property { boolean } isSelected - 是否选中此设备
47
+ * @property { boolean } isDefault - 是否默认设备
48
+ * @property { string } key - 设备唯一ID
49
+ */
50
+ export interface IDeviceInfo extends IDevice {
51
+ isSelected?: boolean;
52
+ isDefault?: boolean;
53
+ key?: string;
54
+ }
40
55
  /**
41
56
  * 设备列表:麦克风、扬声器、摄像头
42
57
  *
43
- * @property { IDeviceInfo[] } audioInputList 麦克风列表
44
- * @property { IDeviceInfo[] } audioOutputList 扬声器列表
45
- * @property { IDeviceInfo[] } videoInList 摄像头列表
58
+ * @property { IDeviceInfo[] } audioInputList - 麦克风列表
59
+ * @property { IDeviceInfo[] } audioOutputList - 扬声器列表
60
+ * @property { IDeviceInfo[] } videoInList - 摄像头列表
46
61
  */
47
62
  export type IDeviceList = {
48
63
  audioInputList: IDeviceInfo[];
49
64
  audioOutputList: IDeviceInfo[];
50
- videoInList: IDeviceInfo[];
65
+ videoInputList: IDeviceInfo[];
66
+ };
67
+ /**
68
+ * 用户指定设备配置
69
+ *
70
+ * @property { boolean } isDefault - 是否默认设备
71
+ * @property { string } deviceId - 设备ID
72
+ */
73
+ export type ISpecifiedDeviceConfig = {
74
+ isDefault: boolean;
75
+ deviceId: string;
76
+ };
77
+ /**
78
+ * 用户指定设备信息
79
+ *
80
+ * @property { ISpecifiedDeviceConfig } audioInput - 麦克风设备
81
+ * @property { ISpecifiedDeviceConfig } audioOutput - 扬声器设备
82
+ * @property { ISpecifiedDeviceConfig } videoInput - 摄像头设备
83
+ */
84
+ export type ISpecifiedDevice = {
85
+ audioInput: ISpecifiedDeviceConfig;
86
+ audioOutput: ISpecifiedDeviceConfig;
87
+ videoInput: ISpecifiedDeviceConfig;
51
88
  };
52
89
  /**
53
90
  * 当前已选择设备信息
54
91
  *
55
- * @property { IDeviceInfo | undefined } audioInput 麦克风设备
56
- * @property { IDeviceInfo | undefined } audioOutput 扬声器设备
57
- * @property { IDeviceInfo | undefined } videoInput 摄像头设备
92
+ * @property { IDeviceInfo | null } audioInput - 麦克风设备
93
+ * @property { IDeviceInfo | null } audioOutput - 扬声器设备
94
+ * @property { IDeviceInfo | null } videoInput - 摄像头设备
58
95
  */
59
96
  export type ISelectedDevice = {
60
- audioInput: IDeviceInfo | undefined;
61
- videoInput: IDeviceInfo | undefined;
62
- audioOutput: IDeviceInfo | undefined;
97
+ audioInput: IDeviceInfo | null;
98
+ videoInput: IDeviceInfo | null;
99
+ audioOutput: IDeviceInfo | null;
100
+ };
101
+ /**
102
+ * 当前已选择设备信息
103
+ *
104
+ * @property { string } audioInput - 麦克风设备ID
105
+ * @property { string } audioOutput - 扬声器设备ID
106
+ * @property { string } videoInput - 摄像头设备ID
107
+ */
108
+ export type IDeviceId = {
109
+ audioInput: string;
110
+ videoInput: string;
111
+ audioOutput: string;
63
112
  };
64
113
  /**
65
114
  * 设备变化事件
66
115
  *
67
- * @property { ISelectedDevice } nextDevice 最新的设备
68
- * @property { IDeviceList } detail 最新设备详细信息
116
+ * @property { ISelectedDevice } nextDevice - 最新的设备
117
+ * @property { IDeviceList } detail - 最新设备详细信息
69
118
  */
70
119
  export type IDeviceManagerChangeValue = {
71
120
  nextDevice: ISelectedDevice;
@@ -74,10 +123,33 @@ export type IDeviceManagerChangeValue = {
74
123
  /**
75
124
  * 当前麦克风/摄像头权限
76
125
  *
77
- * @property { PermissionType } microphone 麦克风权限
78
- * @property { PermissionType } camera 摄像头权限
126
+ * @property { PermissionType } microphone - 麦克风权限
127
+ * @property { PermissionType } camera - 摄像头权限
79
128
  */
80
129
  export interface ICurrentPermission {
81
130
  microphone: PermissionType;
82
131
  camera: PermissionType;
83
132
  }
133
+ /**
134
+ * 计算默认设备函数参数
135
+ *
136
+ * @property { ISpecifiedDeviceConfig } specifiedDevice - 用户指定的设备信息
137
+ * @property { IDeviceInfo | null } sysDefaultDevice - 系统默认设备信息
138
+ * @property { IDeviceInfo[] } curList - 当前设备列表
139
+ * @property { IDeviceInfo[] } preList - 上一次设备列表
140
+ *
141
+ */
142
+ export interface IDefaultDeviceIdParams {
143
+ specifiedDevice: ISpecifiedDeviceConfig;
144
+ sysDefaultDevice: IDeviceInfo | null;
145
+ curList: IDeviceInfo[];
146
+ preList: IDeviceInfo[];
147
+ }
148
+ /**
149
+ * 指定设备信息
150
+ */
151
+ export interface ISetSpecDevice {
152
+ kind: DEVICE_KIND;
153
+ deviceId: string;
154
+ isDefault: boolean;
155
+ }
@@ -15,4 +15,6 @@ export * from './layout';
15
15
  export * from './quality';
16
16
  export * from './peer';
17
17
  export * from './logger';
18
- export * from './iauth';
18
+ export * from './auth';
19
+ export * from './analyser';
20
+ export * from './ability';
@@ -179,3 +179,37 @@ export interface FocusViewConfig {
179
179
  id: string;
180
180
  type: TemplateType;
181
181
  }
182
+ /**
183
+ * RosterId 分割信息
184
+ *
185
+ * @property { string } endpointId - 参会者callUri字段
186
+ * @property { string } mediagroupId - 多分组ID
187
+ */
188
+ export interface IRosterIdInfo {
189
+ endpointId: string;
190
+ mediagroupId: string;
191
+ }
192
+ /**
193
+ * 计算Video元素旋转样式
194
+ *
195
+ * @property { string } transform - Video元素选转角度:rotateZ(${n}deg)
196
+ * @property { string } width - Video元素的宽:${n}px
197
+ * @property { string } height - Video元素的高:${n}px
198
+ */
199
+ export interface IRotateStyle {
200
+ transform?: string;
201
+ width?: string;
202
+ height?: string;
203
+ }
204
+ /**
205
+ * 需要管理员广播才能收看内容共享
206
+ *
207
+ * @property { boolean } enableContentLiveOnHold - 是否开启了指定内容广播
208
+ * @property { string } audioTrackId - 广播的audioTrackId
209
+ * @property { string } contentUrl - 广播的contentUrl
210
+ */
211
+ export interface ContentOnholdInfo {
212
+ enableContentLiveOnHold: boolean;
213
+ audioTrackId: string;
214
+ contentUrl: string;
215
+ }
@@ -20,13 +20,15 @@ export declare enum MessageKind {
20
20
  * @param DESTROY - 销毁操作
21
21
  * @param DOWNLOAD - 下载日志操作
22
22
  * @param UPLOAD - 上传日志操作
23
+ * @param GET_DATA - 获取日志数据
23
24
  */
24
25
  export declare enum LogOperateType {
25
26
  LOGGER = "LOGGER",
26
27
  INIT = "INIT",
27
28
  DESTROY = "DESTROY",
28
29
  DOWNLOAD = "DOWNLOAD",
29
- UPLOAD = "UPLOAD"
30
+ UPLOAD = "UPLOAD",
31
+ GET_DATA = "GET_DATA"
30
32
  }
31
33
  /**
32
34
  * 日志等级
@@ -67,6 +69,7 @@ export type TLogLevel = `${LogLevel}`;
67
69
  * @param { string[] } deleteDBNames - 需要删除的历史数据库名,默认值[]
68
70
  * @param { boolean } isUpdateVersion - 是否需要更新表版本(历史表都将被删除,避免错误)
69
71
  * @param { number } detectTimer - 多久检测一次表的最大长度,单位ms,默认值:300000(5分钟)
72
+ * @param { string } scope - 配置日志Scope范围,例如配置为'APP',则所有日志显示为:[16:14:24 490][INFO][APP]xxxx
70
73
  */
71
74
  export interface ILoggerConfig {
72
75
  dbName: string;
@@ -80,6 +83,7 @@ export interface ILoggerConfig {
80
83
  deleteDBNames?: string[];
81
84
  isUpdateVersion?: boolean;
82
85
  enableClearTable?: boolean;
86
+ scope?: string;
83
87
  }
84
88
  /**
85
89
  * 数据库操作配置
@@ -110,3 +114,17 @@ export interface IWorkerData {
110
114
  [key: string]: any;
111
115
  } & ILoggerConfig;
112
116
  }
117
+ /**
118
+ * 日志上传参数
119
+ *
120
+ * @param { string } name - 上传文件名
121
+ * @param { string } account - 上传账号
122
+ * @param { string } comments - 上传时备注信息
123
+ * @param { string } dbName - 日志库名称,默认不传,上传所有日志
124
+ */
125
+ export interface UploadLogParams {
126
+ name?: string;
127
+ account?: string;
128
+ comments?: string;
129
+ dbName?: string;
130
+ }