@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
@@ -4,7 +4,7 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-23 12:04:44
6
6
  */
7
- import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig } from '../type';
7
+ import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternals, IVideoAudioType, ShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, ContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, FacingMode, IFacingMode, ILoginWidthAuthCode } from '../type';
8
8
  import Emitter from '../tools/emitter';
9
9
  import Socket from '../tools/socket';
10
10
  import Stream from './stream';
@@ -29,7 +29,7 @@ export default class Client extends Emitter {
29
29
  pushType: IPushType;
30
30
  isAutoBandwidth: boolean;
31
31
  debug: boolean;
32
- shareContentStatus: IShareContentStatus;
32
+ shareContentStatus: ShareContentStatus;
33
33
  deviceManager: DeviceManager | null;
34
34
  localHide: boolean;
35
35
  hideId: string;
@@ -61,7 +61,6 @@ export default class Client extends Emitter {
61
61
  private errorcode;
62
62
  private i18nCode;
63
63
  private clientErrorState;
64
- private limitResolution;
65
64
  private customLayoutCacheList;
66
65
  private contentMode;
67
66
  private contentOnholdInfo;
@@ -73,8 +72,12 @@ export default class Client extends Emitter {
73
72
  private handStatus;
74
73
  private featureConfig;
75
74
  private meeting;
76
- private speakerInfos;
75
+ private cacheSpeakersInfo;
76
+ private speakersInfo;
77
77
  private operateQueue;
78
+ private facingMode;
79
+ private wsReConnectCount;
80
+ private localSpeakerTimer;
78
81
  private onDocumentChange;
79
82
  constructor(config: IClientConfig, logger: Logger);
80
83
  static instance: Client;
@@ -97,6 +100,7 @@ export default class Client extends Emitter {
97
100
  getFeatureConfig(): IFeatureConfig;
98
101
  getCallInfo(): ICall;
99
102
  getClientConfig(): IClientConfig;
103
+ getAutoMode(): boolean;
100
104
  getVideoManagers(): import("../type").IVideoRenders | undefined;
101
105
  getPreviewStreams(): import("../type").IGetMediaStreams | {
102
106
  previewStreams: never[];
@@ -116,7 +120,7 @@ export default class Client extends Emitter {
116
120
  getPeerConnectionStatus(): boolean;
117
121
  getOnHold(): boolean;
118
122
  getAudioTrackList(): ICustomStreamTrack[];
119
- getLayoutList(): Map<string, ILayout> | undefined;
123
+ getLayoutMap(): Map<any, any>;
120
124
  /**
121
125
  * 获取Local roster信息
122
126
  *
@@ -129,6 +133,15 @@ export default class Client extends Emitter {
129
133
  * @returns { boolean }
130
134
  */
131
135
  getLocalShareContent(): boolean;
136
+ getFacingMode(): FacingMode;
137
+ /**
138
+ * 获取ws重连次数
139
+ */
140
+ getWsReConnectCount(): number;
141
+ /**
142
+ * 获取Layout头像配置类型
143
+ */
144
+ getLayoutAvatarType(): import("../type").LayoutAvatarType;
132
145
  /**
133
146
  * 企业媒体相关配置信息
134
147
  *
@@ -158,12 +171,26 @@ export default class Client extends Emitter {
158
171
  * @return { Promise<Object> } 登录结果
159
172
  */
160
173
  loginExternalAccount(params: ILoginExtAccount): Promise<Object>;
174
+ /**
175
+ * 授权码登录
176
+ *
177
+ * @public
178
+ * @param { ILoginWidthAuthCode } params 参数
179
+ * @param {string} params.extId 企业id
180
+ * @param {string} params.extUserId 用户id
181
+ * @param {string} params.displayName 用户名称
182
+ * @param {string} params.oauthCode 授权码
183
+ * @param {boolean} params.isTempUser 是否临时账户
184
+ * @param {string} params.channelId 渠道id
185
+ * @return { Promise<Object> } 登录结果
186
+ */
187
+ loginWithAuthCode(params: ILoginWidthAuthCode): Promise<Object>;
161
188
  /**
162
189
  * 退会时 重置初始化参数
163
190
  *
164
191
  */
165
192
  resetInitParameter(): void;
166
- setContentMode(mode: IContentMode): void;
193
+ setContentMode(mode: ContentMode): void;
167
194
  /**
168
195
  * SDK功能控制开关
169
196
  *
@@ -184,12 +211,6 @@ export default class Client extends Emitter {
184
211
  * @returns { IResult }
185
212
  */
186
213
  setFeatureConfig(config: IFeatureConfig): import("../type").IReturnResult | undefined;
187
- /**
188
- * 限制Content和People发送能力
189
- *
190
- * @param { boolean } limitPeople - 是否限制People的发送能力
191
- */
192
- private setLimitResolution;
193
214
  /**
194
215
  * 获取会控地址
195
216
  */
@@ -236,6 +257,13 @@ export default class Client extends Emitter {
236
257
  * 重新播放音频
237
258
  */
238
259
  playAudio(): Promise<boolean>;
260
+ /**
261
+ * 设置相机方向
262
+ *
263
+ * @param { IFacingMode } position 相机方向
264
+ * @returns { Promise<IFacingMode> } 最终切换的相机方向
265
+ */
266
+ switchCamera(facingMode?: IFacingMode): Promise<IFacingMode>;
239
267
  /**
240
268
  * 绑定streamId和audio ele元素,内部维护状态
241
269
  *
@@ -420,7 +448,7 @@ export default class Client extends Emitter {
420
448
  * @public
421
449
  * @param { Stream } stream 本地contentStream
422
450
  */
423
- sendContentCapabilityMessage(stream?: Stream): void;
451
+ sendContentCapability(): void;
424
452
  /**
425
453
  * 分享content
426
454
  *
@@ -446,7 +474,7 @@ export default class Client extends Emitter {
446
474
  */
447
475
  private handleContentOnholdAudio;
448
476
  /**
449
- * 合并track
477
+ * 合并tTrack
450
478
  *
451
479
  * @param { RTCTrackEvent } e
452
480
  */
@@ -485,36 +513,52 @@ export default class Client extends Emitter {
485
513
  */
486
514
  private getCodeByJson;
487
515
  /**
488
- * 音视频开启关闭操作
516
+ * 音视频开启/关闭操作
489
517
  *
490
518
  * @private
491
- * @param { 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo' } type 操作类型
519
+ * @param { OperateType } type 操作类型
492
520
  * @returns Promise<IVideoAudioType> 类型
493
521
  */
494
- private videoAudioOperate;
522
+ private operateVideoAudio;
523
+ /**
524
+ * 操作Stream中的音视频流
525
+ *
526
+ * @param { OperateType } type - 操作类型
527
+ */
528
+ private operateStreamStatus;
529
+ /**
530
+ * 清除Local Speaker Timer
531
+ */
532
+ private clearSpeakerTimer;
533
+ /**
534
+ * 推流到PeerConnection上
535
+ *
536
+ * @param pushType
537
+ */
538
+ peerPublish(pushType: PushType): void;
495
539
  /**
496
- * 静音 操作
540
+ * 关闭麦克风
497
541
  *
498
542
  * @public
499
543
  * @returns { Promise<IVideoAudioType> } 操作类型
500
544
  */
501
545
  muteAudio(): Promise<IVideoAudioType>;
502
546
  /**
503
- * 关闭摄像头 操作
547
+ * 关闭摄像头
504
548
  *
505
549
  * @public
506
550
  * @returns { Promise<IVideoAudioType> } 操作类型
507
551
  */
508
552
  muteVideo(): Promise<IVideoAudioType>;
509
553
  /**
510
- * 开启摄像头 操作
554
+ * 开启麦克风
511
555
  *
512
556
  * @public
513
557
  * @returns { Promise<IVideoAudioType> } 操作类型
514
558
  */
515
559
  unmuteAudio(): Promise<IVideoAudioType>;
516
560
  /**
517
- * 取消静音 操作
561
+ * 开启摄像头
518
562
  *
519
563
  * @public
520
564
  * @returns { Promise<IVideoAudioType> } 操作类型
@@ -578,20 +622,16 @@ export default class Client extends Emitter {
578
622
  * @param { boolean } status peer连接状态
579
623
  */
580
624
  setPeerConnectionStatus(status: boolean): void;
625
+ /**
626
+ * 发送带宽配置
627
+ */
581
628
  private sendWebRxBandwidth;
582
629
  /**
583
630
  * 处理会议室静音状态
584
631
  *
585
- * @param { string } automute // "" | "mute" | "forcemute" 会议室静音属性
632
+ * @param { string } automute - "" | "mute" | "forcemute" 会议室静音属性
586
633
  */
587
634
  private handleAutoMute;
588
- /**
589
- * 根据 autoMute 或 muteOperation 的值发送音频流
590
- *
591
- * @private
592
- * @param { string } audioMute 是否静音
593
- */
594
- private onSetAudioStream;
595
635
  /**
596
636
  * 处理会控消息,如音频、主会场、content等
597
637
  *
@@ -629,6 +669,12 @@ export default class Client extends Emitter {
629
669
  * @private
630
670
  */
631
671
  private onSpeakerInfoMessage;
672
+ /**
673
+ * 推送实时讲话人信息
674
+ *
675
+ * @param { SpeakersInfoObj[] } speakersInfo - 说话人信息
676
+ */
677
+ private emitSpeakersInfo;
632
678
  /**
633
679
  * 处理contentOnhold
634
680
  *
@@ -701,27 +747,18 @@ export default class Client extends Emitter {
701
747
  * @returns { Promise<boolean> } 是否请求成功
702
748
  */
703
749
  requestAutoPollingLayout(command: TCommand, interval: number | undefined, reqList: IReqInfo[]): Promise<boolean>;
704
- /**
705
- * 应用替换已经更新的的people video track轨道流,如果之前无流,则需重新setStream, replaceTrack
706
- * 第一次开启音频、或视频,需重新协商offer。改变通道方向
707
- *
708
- * @public
709
- * @param { 'video' | 'audio' } kind 设备类型
710
- * @param { boolean } isFirst 是否之前无流
711
- */
712
- applyVideoOrAudio(kind: 'video' | 'audio', isFirst?: boolean): void;
713
750
  /**
714
751
  * 推送本地Audio状态
715
752
  *
716
753
  * @param { boolean | string } status
717
754
  */
718
- sendAudioStatus(status: boolean | string): void;
755
+ emitAudioStatus(type: OperateType): void;
719
756
  /**
720
757
  * 推送本地Video状态
721
758
  *
722
- * @param { boolean | string } status
759
+ * @param { OperateType } type - 操作类型
723
760
  */
724
- sendVideoStatus(status: boolean | string): void;
761
+ emitVideoStatus(type: OperateType): void;
725
762
  /**
726
763
  * 发布 自动布局/自定义布局 layout布局信息(参会人最新的布局列表数据)
727
764
  *
@@ -762,13 +799,6 @@ export default class Client extends Emitter {
762
799
  * @param { IMode } templateMode 布局模式
763
800
  */
764
801
  sendTemplateMode(templateMode: IMode): void;
765
- /**
766
- * ws 发送摄像头、麦克风开启关闭操作
767
- *
768
- * @private
769
- * @param { IVideoAudioMessageType } type 操作类型
770
- */
771
- private sendOperationMessage;
772
802
  /**
773
803
  * 处理旋转信息
774
804
  *
@@ -786,23 +816,23 @@ export default class Client extends Emitter {
786
816
  * 上报会议质量数据
787
817
  *
788
818
  * @public
789
- * @param { IInternels } internels Internels统计数据
819
+ * @param { IInternals } internals Internals统计数据
790
820
  */
791
- reportQualityData(internels: IInternels): void;
821
+ reportQualityData(internals: IInternals): void;
792
822
  /**
793
- * Internels统计数据-期望带宽
823
+ * Internals统计数据-期望带宽
794
824
  *
795
- * @param internels
825
+ * @param internals
796
826
  * @returns
797
827
  */
798
- private getInternels;
828
+ private getNewInternals;
799
829
  /**
800
- * 发布Internels统计数据
830
+ * 上报给业务层Internals统计数据
801
831
  *
802
832
  * @public
803
- * @param { IInternels } internels Internels统计数据
833
+ * @param { IInternals } internals Internals统计数据
804
834
  */
805
- sendInternels(internels: IInternels): void;
835
+ sendInternals(internals: IInternals): void;
806
836
  /**
807
837
  * 取消监听事件
808
838
  *
@@ -829,7 +859,7 @@ export default class Client extends Emitter {
829
859
  */
830
860
  private removeWindowResizeEvent;
831
861
  /**
832
- * 发送wss peopleCapability,通知本地采集能力,用于vom进行分配
862
+ * 通知本地采集能力,用于vom进行分配
833
863
  *
834
864
  * @public
835
865
  */
@@ -933,12 +963,6 @@ export default class Client extends Emitter {
933
963
  * @public
934
964
  */
935
965
  stopCloudRecord(): Promise<undefined>;
936
- /**
937
- * 重新发送content offer
938
- *
939
- * @public
940
- */
941
- reSendContentOffer(): void;
942
966
  /**
943
967
  * 重新计算Layout布局数据
944
968
  *
@@ -985,6 +1009,12 @@ export default class Client extends Emitter {
985
1009
  * @returns { boolean }
986
1010
  */
987
1011
  private setMonitorGroup;
1012
+ /**
1013
+ * 校验clientId/clientSecret
1014
+ *
1015
+ * @returns
1016
+ */
1017
+ private verifyParameter;
988
1018
  /**
989
1019
  * 初始化DeviceManager事件
990
1020
  *
@@ -2,15 +2,14 @@
2
2
  * XYLink WebRTC Device & Permission Manager Lib
3
3
  *
4
4
  * @summary device and permission manager
5
- * @email luojinghui424@gmail.com
6
5
  * @author jinghui-luo、chengfei
7
6
  *
8
7
  * Created at : 2020-11-26 14:41:51
9
- * Last modified : 2022-06-09 17:33:47
8
+ * Last modified : 2023-04-24 14:38:52
10
9
  */
11
10
  import Logger from '../tools/logger';
12
11
  import Emitter from '../tools/emitter';
13
- import { IDeviceList, ISelectedDevice, ICurrentPermission } from '../type';
12
+ import { IDeviceInfo, IDeviceList, ISelectedDevice, ICurrentPermission, PermissionType, DeviceKind, FacingMode } from '../type';
14
13
  /**
15
14
  * DeviceManager模块,用于管理枚举设备列表、监听设备变动、处理设备权限等功能
16
15
  *
@@ -26,6 +25,7 @@ declare class DeviceManager extends Emitter {
26
25
  private permissionCameraStatus;
27
26
  private permissionPhoneStatus;
28
27
  logger: Logger;
28
+ isNewLogger: boolean;
29
29
  constructor(logger?: Logger);
30
30
  /**
31
31
  * 获取设备权限数据
@@ -49,7 +49,7 @@ declare class DeviceManager extends Emitter {
49
49
  * @param type
50
50
  * @param deviceId
51
51
  */
52
- setCurrentUsedDeviceByType(type: 'audio' | 'video', deviceId: string): void;
52
+ setCurrentUsedDeviceByType(type: DeviceKind, deviceId: string): void;
53
53
  /**
54
54
  * 设置输出设备
55
55
  *
@@ -80,7 +80,19 @@ declare class DeviceManager extends Emitter {
80
80
  * 获取设备列表数据
81
81
  */
82
82
  getDevices(): Promise<IDeviceList>;
83
+ /**
84
+ * 设置当前麦克风/摄像头权限
85
+ *
86
+ * @param { ICurrentPermission } permission - 新的权限状态
87
+ */
83
88
  setPermission(permission: ICurrentPermission): void;
89
+ /**
90
+ * 通过采集能力更新设备权限
91
+ *
92
+ * @param { PermissionType } video - 摄像头权限
93
+ * @param { PermissionType } audio - 麦克风权限
94
+ */
95
+ updateDevicePermission(video: PermissionType, audio: PermissionType): void;
84
96
  /**
85
97
  * 【私有方法】
86
98
  * 向外提供权限信息
@@ -114,6 +126,13 @@ declare class DeviceManager extends Emitter {
114
126
  * TODO:可以通过looping的形式检测,后续在处理
115
127
  */
116
128
  getPermission(): Promise<ICurrentPermission>;
129
+ /**
130
+ * 获取手机前置/后置摄像头
131
+ *
132
+ * @param { FacingMode } type
133
+ * @returns { IDeviceInfo } 摄像头信息
134
+ */
135
+ getCameraDeviceByMode(type: FacingMode): Promise<IDeviceInfo>;
117
136
  /**
118
137
  * 【私有方法】
119
138
  * 如果有音频设备插入,则选取最新设备
@@ -5,10 +5,10 @@
5
5
  * @email luojinghui424@gmail.com
6
6
  *
7
7
  * Created at : 2021-01-09 14:45:46
8
- * Last modified : 2022-11-03 19:20:11
8
+ * Last modified : 2023-05-16 18:54:50
9
9
  */
10
10
  import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
11
- export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "AUDIO_ONLY" | "MUTE" | "AUDIO_TEL" | "AUDIO_CONTENT";
11
+ export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "MUTE" | "AUDIO_TEL" | "AUDIO_ONLY" | "AUDIO_CONTENT";
12
12
  /**
13
13
  * Get video real display size and rotate of transform infos
14
14
  * @param width video real width of resolution
@@ -2,7 +2,7 @@
2
2
  * 登录模块
3
3
  *
4
4
  */
5
- import { ILoginExtAccount, ISdkUserInfo, ILoginInfo } from '../type';
5
+ import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode } from '../type';
6
6
  import Logger from '../tools/logger';
7
7
  declare class IAuth {
8
8
  private logger;
@@ -25,5 +25,18 @@ declare class IAuth {
25
25
  * @param { ILoginExtAccount } params
26
26
  */
27
27
  login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<import("../type").IReturnResult>;
28
+ /**
29
+ * 授权码登录
30
+ *
31
+ * @param { ILoginWidthAuthCode } params 参数
32
+ * @param {string} params.extID 企业id
33
+ * @param {string} params.extUserId 用户id
34
+ * @param {string} params.displayName 用户名称
35
+ * @param {string} params.oauthCode 授权码
36
+ * @param {boolean} params.isTempUser 是否临时账户
37
+ * @param {string} params.channelId 渠道id
38
+ * @return {*}
39
+ */
40
+ loginWithAuthCode(params: ILoginWidthAuthCode): Promise<import("../type").IReturnResult>;
28
41
  }
29
42
  export default IAuth;
@@ -6,16 +6,16 @@
6
6
  * @email luojinghui424@gmail.com
7
7
  *
8
8
  * Created at : 2021-01-05 17:24:07
9
- * Last modified : 2023-01-12 11:18:44
9
+ * Last modified : 2023-06-16 16:53:23
10
10
  */
11
11
  import Logger from '../tools/logger';
12
- import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel } from '../type/index';
12
+ import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel, TLayoutMap } from '../type/index';
13
13
  import Client from './client';
14
14
  export default class LayoutManager {
15
15
  logger: Logger;
16
16
  client: Client;
17
- customLayoutMap: Map<string, ILayout>;
18
- layoutList: Map<string, ILayout>;
17
+ customLayoutMap: TLayoutMap;
18
+ layoutMap: TLayoutMap;
19
19
  private videoManagers;
20
20
  private originOrderRosters;
21
21
  private orderRosterList;
@@ -27,7 +27,7 @@ export default class LayoutManager {
27
27
  private templateRate;
28
28
  private content;
29
29
  private screenInfo;
30
- private internelsLayout;
30
+ private internalsLayout;
31
31
  private forceFullScreenId;
32
32
  private localContent;
33
33
  private preConfInfo;
@@ -44,8 +44,8 @@ export default class LayoutManager {
44
44
  getNewLayout(): ILayout[];
45
45
  getOrderRosterList(): IRoster[];
46
46
  getOriginOrderRosters(): IRoster[];
47
- getLayoutList(): Map<string, ILayout>;
48
- getCustomLayoutList(): Map<string, ILayout>;
47
+ getLayoutMap(): TLayoutMap;
48
+ getCustomLayoutMap(): TLayoutMap;
49
49
  getTemplateRate(): {
50
50
  previous: number;
51
51
  next: number;
@@ -57,7 +57,7 @@ export default class LayoutManager {
57
57
  getForceFullScreenId(): string;
58
58
  getTemplateMode(): IMode;
59
59
  getConfInfo(): IConfInfo;
60
- getInternelsLayout(): IOutputCustomLayout;
60
+ getInternalsLayout(): IOutputCustomLayout;
61
61
  getLocalShareState(): boolean;
62
62
  setOrderRosterList(orderRosterList: IRoster[]): void;
63
63
  setOriginOrderRosters(originOrderRosters: IRoster[]): void;
@@ -67,7 +67,6 @@ export default class LayoutManager {
67
67
  * @param { string } id forceLayout roster id
68
68
  */
69
69
  setForceFullScreenId(id?: string): void;
70
- setTemplateMode(templateMode: IMode): void;
71
70
  setContentRosterItem(content: IRoster | null): void;
72
71
  setConfInfo(confInfo: IConfInfo): void;
73
72
  /**
@@ -105,6 +104,7 @@ export default class LayoutManager {
105
104
  */
106
105
  setVideoRenderer(key: string, wrapEleId: string): void;
107
106
  removeVideoRenderer(key: string, wrapEleId: string): void;
107
+ playLocalVideo(): Promise<void>;
108
108
  playVideo(keys?: string[]): Promise<void>;
109
109
  updateLocalTrack(): void;
110
110
  /**
@@ -148,6 +148,12 @@ export default class LayoutManager {
148
148
  * @param { ILayoutRoster[] } totalLayoutResultList
149
149
  */
150
150
  createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
151
+ /**
152
+ * 重置templateMode
153
+ * 本地共享,则显示对称布局四画面
154
+ * 本地未共享,根据当前是否有content,显示默认布局
155
+ */
156
+ private resetTemplateMode;
151
157
  /**
152
158
  * 创建排好序的roster数据
153
159
  *
@@ -171,7 +177,6 @@ export default class LayoutManager {
171
177
  calculateNewLayoutList(): {
172
178
  roster: IRoster;
173
179
  position: number[];
174
- resolution: number;
175
180
  zIndex: number;
176
181
  }[];
177
182
  calculateScreenInfo(): {
@@ -182,6 +187,12 @@ export default class LayoutManager {
182
187
  } | undefined;
183
188
  createLayout(): void;
184
189
  calculateOrderRosterList(): IRoster[];
190
+ /**
191
+ * [auto] 切换布局
192
+ *
193
+ * @param { IMode } templateMode 指定要切换的布局模式
194
+ * @returns { Promise<IMode> } 切换后的布局模式
195
+ */
185
196
  switchLayout(templateMode?: IMode): IMode;
186
197
  /**
187
198
  * 【内部方法】停止轮询时,清理无效的 videoManager 数据
@@ -211,9 +222,16 @@ export default class LayoutManager {
211
222
  */
212
223
  private getLayoutKeyByRotateInfo;
213
224
  /**
214
- * 本地镜像显示画面
225
+ * 镜像显示Local画面
215
226
  */
216
227
  private localMirrorRotate;
228
+ /**
229
+ * 根据layout名称 获得 对应的 名称头像
230
+ *
231
+ * @param { string } displayName layout名称
232
+ * @returns { string } 名称头像 文字内容
233
+ */
234
+ private getLayoutTextAvatar;
217
235
  /**
218
236
  * 获取最终请流分辨率
219
237
  * 1. 根据是否启用低性能模式