@xylink/xy-rtc-sdk 3.9.1-beta.6 → 3.9.3
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 +15 -7
- package/lib/enum/index.d.ts +11 -7
- package/lib/index.d.ts +9 -4
- package/lib/main/client.d.ts +37 -10
- package/lib/main/deviceManager.d.ts +3 -1
- package/lib/main/helper.d.ts +1 -1
- package/lib/main/iauth.d.ts +4 -2
- package/lib/main/layout/index.d.ts +362 -0
- package/lib/main/layout/template.d.ts +72 -0
- package/lib/main/meeting.d.ts +11 -2
- package/lib/main/peer.d.ts +2 -0
- package/lib/tools/browser.d.ts +58 -49
- package/lib/tools/logger.d.ts +1 -0
- package/lib/tools/template/index.d.ts +324 -0
- package/lib/tools/template/mobile.d.ts +9 -0
- package/lib/type/base.d.ts +14 -0
- package/lib/type/client.d.ts +40 -92
- package/lib/type/layout.d.ts +178 -13
- package/lib/type/stream.d.ts +1 -1
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +2 -1
- package/lib/main/layoutManager.d.ts +0 -244
- package/lib/tools/template.d.ts +0 -21
package/lib/action/index.d.ts
CHANGED
|
@@ -14,14 +14,22 @@ declare class Action {
|
|
|
14
14
|
private statesTime;
|
|
15
15
|
private httpDefaultBaseUrl;
|
|
16
16
|
private logHttpDefaultBaseUrl;
|
|
17
|
-
constructor();
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
constructor(logger?: Logger);
|
|
18
|
+
/**
|
|
19
|
+
* 设置服务器地址
|
|
20
|
+
*
|
|
21
|
+
* @param { object } options - 包含基本URL和日志URL的对象。
|
|
22
|
+
* @property { string } options.baseUrl - 服务器的基本URL。
|
|
23
|
+
* @property { string } options.logUrl - 日志服务器的URL。
|
|
24
|
+
*/
|
|
25
|
+
setBaseUrl({ baseUrl, logUrl }: {
|
|
26
|
+
baseUrl?: string;
|
|
27
|
+
logUrl?: string;
|
|
28
|
+
}): void;
|
|
20
29
|
setClientInfo({ clientId, clientSecret }: {
|
|
21
30
|
clientId: string;
|
|
22
31
|
clientSecret: string;
|
|
23
32
|
}): void;
|
|
24
|
-
setLogger(logger: Logger): void;
|
|
25
33
|
setMeetingInfo(info: IMeetingInfo): void;
|
|
26
34
|
setTokenInfo(tokenInfo: IToken | null): void;
|
|
27
35
|
getTokenInfo(): IToken;
|
|
@@ -93,11 +101,12 @@ declare class Action {
|
|
|
93
101
|
/**
|
|
94
102
|
* 获取i18n/errorcode等链接
|
|
95
103
|
*
|
|
104
|
+
* @deprecated
|
|
96
105
|
* @returns
|
|
97
106
|
*/
|
|
98
107
|
getDefaultServerConfig(): Promise<any>;
|
|
99
108
|
/**
|
|
100
|
-
* 批量获取serverConfig
|
|
109
|
+
* 批量获取serverConfig, 获取错误码/i18n等json链接
|
|
101
110
|
*
|
|
102
111
|
* @param {string[]} includeConfigNameList 需要的配置key值
|
|
103
112
|
* @returns
|
|
@@ -312,5 +321,4 @@ declare class Action {
|
|
|
312
321
|
*/
|
|
313
322
|
private customLogin;
|
|
314
323
|
}
|
|
315
|
-
|
|
316
|
-
export default _default;
|
|
324
|
+
export default Action;
|
package/lib/enum/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-30 14:12:52
|
|
6
6
|
*/
|
|
7
|
-
import { IDefault, IOPERATE_MAP,
|
|
7
|
+
import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, TemplateMode, ContentTemplateMode } 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;
|
|
@@ -61,6 +61,10 @@ export declare const RESOLUTION_TYPE: number[];
|
|
|
61
61
|
* 每页最大显示终端数
|
|
62
62
|
*/
|
|
63
63
|
export declare const MAX_PAGE_SIZE = 9;
|
|
64
|
+
/**
|
|
65
|
+
* 移动端 对称布局 最大请流数量
|
|
66
|
+
*/
|
|
67
|
+
export declare const MAX_MOBILE_PAGE_SIZE = 6;
|
|
64
68
|
/**
|
|
65
69
|
* 网络信息
|
|
66
70
|
*/
|
|
@@ -87,21 +91,21 @@ export declare const DEFAULT_ROSTER: IRoster;
|
|
|
87
91
|
*/
|
|
88
92
|
export declare const DEFAULT: IDefault;
|
|
89
93
|
/**
|
|
90
|
-
*
|
|
94
|
+
* 非content 默认模版类型数组
|
|
91
95
|
*/
|
|
92
|
-
export declare const
|
|
96
|
+
export declare const TEMPLATE_MODE_LIST: TemplateMode[];
|
|
93
97
|
/**
|
|
94
|
-
* content
|
|
98
|
+
* content 模板类型数组
|
|
95
99
|
*/
|
|
96
|
-
export declare const
|
|
100
|
+
export declare const CONTENT_TEMPLATE_MODE_LIST: ContentTemplateMode[];
|
|
97
101
|
/**
|
|
98
102
|
* 非content 默认模板类型
|
|
99
103
|
*/
|
|
100
|
-
export declare const TEMPLATE_DEFAULT_MODE =
|
|
104
|
+
export declare const TEMPLATE_DEFAULT_MODE = TemplateMode.SPEAKER;
|
|
101
105
|
/**
|
|
102
106
|
* content 模板类型
|
|
103
107
|
*/
|
|
104
|
-
export declare const CONTENT_DEFAULT_TEMPLATE_MODE =
|
|
108
|
+
export declare const CONTENT_DEFAULT_TEMPLATE_MODE = ContentTemplateMode.MULTI_PIC_CONTENT_HIGH_PRIORITY;
|
|
105
109
|
/**
|
|
106
110
|
* 用户类型
|
|
107
111
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
7
|
* @date 2019-10-14 18:20:28
|
|
8
8
|
*/
|
|
9
|
-
import { IClientConfig,
|
|
9
|
+
import { IClientConfig, TLocale, ICheckSystemRequirements, ISteamConfig } from './type';
|
|
10
10
|
import DeviceManager from './main/deviceManager';
|
|
11
11
|
import Logger from './tools/logger';
|
|
12
12
|
import Client from './main/client';
|
|
13
13
|
import Stream from './main/stream';
|
|
14
14
|
import { getVideoInfoByRotation, getSendSupportedCodec, getLayoutRotateInfo, getLayoutItemState, detectLocator } from './main/helper';
|
|
15
|
+
import BrowserDetector from './tools/browser';
|
|
15
16
|
/**
|
|
16
17
|
* XYLink WebRTC SDK 操作入口
|
|
17
18
|
*/
|
|
@@ -19,19 +20,23 @@ interface XYLinkRTC {
|
|
|
19
20
|
version: string;
|
|
20
21
|
client: Client | null;
|
|
21
22
|
logger: Logger;
|
|
23
|
+
create: (config: IClientConfig, logger?: Logger) => {
|
|
24
|
+
client: Client;
|
|
25
|
+
stream: Stream;
|
|
26
|
+
};
|
|
22
27
|
createClient: (config: IClientConfig, logger?: Logger) => Client;
|
|
23
28
|
createStream: (config?: ISteamConfig, logger?: Logger) => Stream;
|
|
24
29
|
checkSupportWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
25
30
|
checkSupportMobileWebRTC: () => Promise<ICheckSystemRequirements>;
|
|
26
31
|
checkSupportShareContent: () => boolean;
|
|
27
32
|
setLocale: (language: TLocale) => void;
|
|
28
|
-
setConfig: (config: IConfig) => void;
|
|
29
33
|
closePreviewStream: (stream: MediaStream) => void;
|
|
30
34
|
setOutputAudioDevice: (element: HTMLMediaElement, outputValue: string) => void;
|
|
31
35
|
render: void;
|
|
32
36
|
}
|
|
33
|
-
declare const
|
|
34
|
-
export default
|
|
37
|
+
declare const XYRTC: XYLinkRTC;
|
|
38
|
+
export default XYRTC;
|
|
35
39
|
export { Client, Stream, Logger, DeviceManager, getLayoutItemState, getVideoInfoByRotation as getVideoInfoByRotaion, getLayoutRotateInfo, getSendSupportedCodec, detectLocator };
|
|
36
40
|
export * from './type';
|
|
37
41
|
export { ERROR_CODE } from './enum/errorCode';
|
|
42
|
+
export { BrowserDetector };
|
package/lib/main/client.d.ts
CHANGED
|
@@ -4,16 +4,18 @@
|
|
|
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, IInternals, IVideoAudioType, ShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, ContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult, ICustomMessageConfig, OperateType, PushType, FacingMode, IFacingMode, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo } from '../type';
|
|
7
|
+
import { IClientConfig, ICall, IMackCall, IInvite, IMeetingControl, 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, LoginXYAccountParams, LoginExtTokenParams, IReturnResult, InviteInfo, LayoutOrientationType, LoginTokenInfo } from '../type';
|
|
8
8
|
import Emitter from '../tools/emitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
12
|
import IAuth from './iauth';
|
|
13
13
|
import DeviceManager from './deviceManager';
|
|
14
|
-
import LayoutManager from './
|
|
14
|
+
import LayoutManager from './layout';
|
|
15
|
+
import Action from '../action';
|
|
15
16
|
export default class Client extends Emitter {
|
|
16
17
|
logger: Logger;
|
|
18
|
+
action: Action;
|
|
17
19
|
iauth: IAuth;
|
|
18
20
|
socketTask: Socket | undefined;
|
|
19
21
|
invite: IInvite;
|
|
@@ -120,7 +122,14 @@ export default class Client extends Emitter {
|
|
|
120
122
|
getPeerConnectionStatus(): boolean;
|
|
121
123
|
getOnHold(): boolean;
|
|
122
124
|
getAudioTrackList(): ICustomStreamTrack[];
|
|
125
|
+
/**
|
|
126
|
+
* 将Stream实例绑定到Client模块上,方便互相调用
|
|
127
|
+
*
|
|
128
|
+
* @param { Stream } stream - Stream实例模块
|
|
129
|
+
*/
|
|
130
|
+
bindStreamInstance(stream: Stream): void;
|
|
123
131
|
getLayoutMap(): Map<any, any>;
|
|
132
|
+
getLayoutManger(): LayoutManager | null;
|
|
124
133
|
/**
|
|
125
134
|
* 获取Local roster信息
|
|
126
135
|
*
|
|
@@ -148,6 +157,17 @@ export default class Client extends Emitter {
|
|
|
148
157
|
* @returns { IMediaConfig }
|
|
149
158
|
*/
|
|
150
159
|
getEnterpriseMediaConfig(): import("../type").IMediaConfig;
|
|
160
|
+
/**
|
|
161
|
+
* 会控消息
|
|
162
|
+
*/
|
|
163
|
+
getMeetingControlInfo(): IMeetingControl | null;
|
|
164
|
+
/**
|
|
165
|
+
* 切换布局方向
|
|
166
|
+
*
|
|
167
|
+
* @param { LayoutOrientationType } orientation - 布局方向: MOBILE_HORIZONTAL(横屏);MOBILE_VERTICAL(竖屏)
|
|
168
|
+
* @returns { Promise<IReturnResult> }
|
|
169
|
+
*/
|
|
170
|
+
setLayoutOrientation(orientation: LayoutOrientationType): Promise<IReturnResult>;
|
|
151
171
|
/**
|
|
152
172
|
* 设置本地是否在等候室
|
|
153
173
|
*
|
|
@@ -325,13 +345,20 @@ export default class Client extends Emitter {
|
|
|
325
345
|
* @returns { Promise<IMode> } 切换后的布局模式
|
|
326
346
|
*/
|
|
327
347
|
switchLayout(templateMode?: IMode): Promise<IMode>;
|
|
348
|
+
/**
|
|
349
|
+
* 切换主画面
|
|
350
|
+
*
|
|
351
|
+
* @param { string } id 指定切换到主画面的LayoutId
|
|
352
|
+
* @returns { Promise<string> } LayoutId
|
|
353
|
+
*/
|
|
354
|
+
setFocusView(id: string): Promise<string>;
|
|
328
355
|
/**
|
|
329
356
|
* AUTO布局 分页
|
|
330
357
|
*
|
|
331
358
|
* @public
|
|
332
359
|
* @param { number } currentPage 请求某一页数据
|
|
333
360
|
*/
|
|
334
|
-
setPageInfo(currentPage?: number): Promise<
|
|
361
|
+
setPageInfo(currentPage?: number): Promise<undefined>;
|
|
335
362
|
/**
|
|
336
363
|
* 检查并获取会议室录制权限
|
|
337
364
|
*
|
|
@@ -443,6 +470,12 @@ export default class Client extends Emitter {
|
|
|
443
470
|
* @param { IMonitorReportMessage } data 媒体调度消息
|
|
444
471
|
*/
|
|
445
472
|
private onMonitorReportMessage;
|
|
473
|
+
/**
|
|
474
|
+
* 无登录模式调用,需要在调用makeCall前配置,用于网关签名计算和接口安全校验
|
|
475
|
+
*
|
|
476
|
+
* @param { LoginTokenInfo } info - 登录token、clientId等相关信息
|
|
477
|
+
*/
|
|
478
|
+
setLoginTokenInfo(info: LoginTokenInfo): void;
|
|
446
479
|
/**
|
|
447
480
|
* 发起会议呼叫,如果返回 true ,代表是否可以继续呼叫;
|
|
448
481
|
*
|
|
@@ -808,18 +841,12 @@ export default class Client extends Emitter {
|
|
|
808
841
|
* @params { boolean } isDealAvatar 是否处理layout头像, 启用相关配置后,默认处理
|
|
809
842
|
*/
|
|
810
843
|
sendLayoutMessage(isDealAvatar?: boolean): void;
|
|
811
|
-
/**
|
|
812
|
-
* 发布最新的已经排序过的的roster信息
|
|
813
|
-
*
|
|
814
|
-
* @private
|
|
815
|
-
*/
|
|
816
|
-
private sendOriginOrderedRosterMessage;
|
|
817
844
|
/**
|
|
818
845
|
* 对媒体下发的roster信息进行排序,发布
|
|
819
846
|
*
|
|
820
847
|
* @private
|
|
821
848
|
*/
|
|
822
|
-
private
|
|
849
|
+
private sendOriginOrderRosterMessage;
|
|
823
850
|
/**
|
|
824
851
|
* 发布Layout Container的容器信息
|
|
825
852
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author jinghui-luo、chengfei
|
|
6
6
|
*
|
|
7
7
|
* Created at : 2020-11-26 14:41:51
|
|
8
|
-
* Last modified : 2023-
|
|
8
|
+
* Last modified : 2023-11-16 09:39:11
|
|
9
9
|
*/
|
|
10
10
|
import Logger from '../tools/logger';
|
|
11
11
|
import Emitter from '../tools/emitter';
|
|
@@ -43,6 +43,8 @@ declare class DeviceManager extends Emitter {
|
|
|
43
43
|
* @param devices 设备数据
|
|
44
44
|
*/
|
|
45
45
|
setCurrentUsedDevice(currentDevice: ISelectedDevice): Promise<void>;
|
|
46
|
+
checkDeviceIsExist(devices: IDeviceList, currentDevice: ISelectedDevice): ISelectedDevice;
|
|
47
|
+
checkDeviceIsExistByKind(devices: IDeviceInfo[], device: IDeviceInfo | undefined): IDeviceInfo | undefined;
|
|
46
48
|
/**
|
|
47
49
|
* 设置当前正在使用的设备信息
|
|
48
50
|
* 切换设备时,需重新设置此值,为下次diffDevice 使用
|
package/lib/main/helper.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @email luojinghui424@gmail.com
|
|
6
6
|
*
|
|
7
7
|
* Created at : 2021-01-09 14:45:46
|
|
8
|
-
* Last modified : 2023-
|
|
8
|
+
* Last modified : 2023-11-17 10:44:34
|
|
9
9
|
*/
|
|
10
10
|
import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
|
|
11
11
|
export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "MUTE" | "AUDIO_TEL" | "AUDIO_ONLY" | "AUDIO_CONTENT";
|
package/lib/main/iauth.d.ts
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
5
|
import { ILoginExtAccount, ISdkUserInfo, ILoginInfo, ILoginWidthAuthCode, LoginXYAccountParams, LoginExtTokenParams, ExtInfo } from '../type';
|
|
6
|
-
import
|
|
6
|
+
import Client from './client';
|
|
7
7
|
declare class IAuth {
|
|
8
8
|
private logger;
|
|
9
9
|
private loginInfo;
|
|
10
10
|
private extInfo;
|
|
11
|
-
|
|
11
|
+
private action;
|
|
12
|
+
constructor(client: Client, extInfo?: ExtInfo);
|
|
12
13
|
getLoginInfo(): ILoginInfo;
|
|
13
14
|
setLoginInfo(loginInfo: ILoginInfo): void;
|
|
14
15
|
setExtInfo(info: ExtInfo): void;
|
|
@@ -20,6 +21,7 @@ declare class IAuth {
|
|
|
20
21
|
* @param { string } params.displayName 用户名称
|
|
21
22
|
* @param { string } params.extId 企业id
|
|
22
23
|
* @param { string? } params.extUserId 三方用户ID
|
|
24
|
+
* @param { boolean? } params.tempUser 是否是临时账号 v3.9.2新增
|
|
23
25
|
* @return
|
|
24
26
|
*/
|
|
25
27
|
loginExternalAccount(params: ILoginExtAccount): Promise<import("../type").IReturnResult>;
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC Layout Manager Lib
|
|
3
|
+
*
|
|
4
|
+
* @summary management custom layout list data
|
|
5
|
+
* @author jinghui-Luo
|
|
6
|
+
* @email luojinghui424@gmail.com
|
|
7
|
+
*
|
|
8
|
+
* Created at : 2021-01-05 17:24:07
|
|
9
|
+
* Last modified : 2023-11-24 14:31:19
|
|
10
|
+
*/
|
|
11
|
+
import Logger from '../../tools/logger';
|
|
12
|
+
import { ILayout, IVideoRenders, IRoster, IScreenInfo, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel, TLayoutMap, TemplateMode, ContentTemplateMode, IMode, LayoutOrientationType } from '../../type/index';
|
|
13
|
+
import Client from '../client';
|
|
14
|
+
export default class LayoutManager {
|
|
15
|
+
logger: Logger;
|
|
16
|
+
client: Client;
|
|
17
|
+
customLayoutMap: TLayoutMap;
|
|
18
|
+
layoutMap: TLayoutMap;
|
|
19
|
+
private videoManagers;
|
|
20
|
+
private originOrderRosters;
|
|
21
|
+
private orderRosterList;
|
|
22
|
+
private selfRoster;
|
|
23
|
+
private newLayoutList;
|
|
24
|
+
private initLayout;
|
|
25
|
+
private templateMode;
|
|
26
|
+
private templateModeTemp;
|
|
27
|
+
private templateRate;
|
|
28
|
+
private content;
|
|
29
|
+
private screenInfo;
|
|
30
|
+
private internalsLayout;
|
|
31
|
+
private forceFullScreenId;
|
|
32
|
+
private localContent;
|
|
33
|
+
private preConfInfo;
|
|
34
|
+
private confInfo;
|
|
35
|
+
private pageInfo;
|
|
36
|
+
private isLocalShareContent;
|
|
37
|
+
private templateManager;
|
|
38
|
+
private focusViewConfig;
|
|
39
|
+
private layoutOrientation;
|
|
40
|
+
constructor(client: Client);
|
|
41
|
+
static getCustomLayoutItem(item: ILayout, resolution: StreamResolutionLevel, quality: VideoQuality): {
|
|
42
|
+
pid: number;
|
|
43
|
+
resolution: StreamResolutionLevel;
|
|
44
|
+
quality: VideoQuality;
|
|
45
|
+
mediagroupid: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 当前是否是对话模式,且没有发送或接收content。
|
|
49
|
+
* content优先级大于对话模式
|
|
50
|
+
*
|
|
51
|
+
* @returns { boolean }
|
|
52
|
+
*/
|
|
53
|
+
get isInDialogMode(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 是否开启隐藏本地模式
|
|
56
|
+
*
|
|
57
|
+
* @returns { boolean }
|
|
58
|
+
*/
|
|
59
|
+
get isEnableHideLocalView(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 是否是主会场模式(远端设置为主会场)
|
|
62
|
+
*
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
get isChairmanMode(): boolean;
|
|
66
|
+
getNewLayout(): ILayout[];
|
|
67
|
+
getOrderRosterList(): IRoster[];
|
|
68
|
+
getOriginOrderRosters(): IRoster[];
|
|
69
|
+
getLayoutMap(): TLayoutMap;
|
|
70
|
+
getCustomLayoutMap(): TLayoutMap;
|
|
71
|
+
getTemplateRate(): {
|
|
72
|
+
previous: number;
|
|
73
|
+
next: number;
|
|
74
|
+
};
|
|
75
|
+
getContentRosterItem(): IRoster | null;
|
|
76
|
+
getSelfRoster(): IRoster;
|
|
77
|
+
getScreenInfo(): IScreenInfo;
|
|
78
|
+
getVideoManagers(): IVideoRenders;
|
|
79
|
+
getForceFullScreenId(): string;
|
|
80
|
+
getTemplateMode(): TemplateMode | ContentTemplateMode;
|
|
81
|
+
getConfInfo(): IConfInfo;
|
|
82
|
+
getInternalsLayout(): IOutputCustomLayout;
|
|
83
|
+
getLocalShareState(): boolean;
|
|
84
|
+
setOrderRosterList(orderRosterList: IRoster[]): void;
|
|
85
|
+
setOriginOrderRosters(originOrderRosters: IRoster[]): void;
|
|
86
|
+
/**
|
|
87
|
+
* 维护 Local roster 状态
|
|
88
|
+
*
|
|
89
|
+
* @param { Partial<IRoster> } data - 需要更新的roster数据
|
|
90
|
+
*/
|
|
91
|
+
setLocalStatus(data: Partial<IRoster>): void;
|
|
92
|
+
/**
|
|
93
|
+
* 设置发布全屏layout id
|
|
94
|
+
*
|
|
95
|
+
* @param { string } id - forceLayout roster id
|
|
96
|
+
*/
|
|
97
|
+
setForceFullScreenId(id?: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* 设置content信息
|
|
100
|
+
*
|
|
101
|
+
* @param { IRoster | null } content - 共享内容
|
|
102
|
+
*/
|
|
103
|
+
setContentRosterItem(content: IRoster | null): void;
|
|
104
|
+
/**
|
|
105
|
+
* 设置confInfo
|
|
106
|
+
*
|
|
107
|
+
* @param { IConfInfo } confInfo - Conf Change消息
|
|
108
|
+
*/
|
|
109
|
+
setConfInfo(confInfo: IConfInfo): void;
|
|
110
|
+
/**
|
|
111
|
+
* [AUTO] 分页
|
|
112
|
+
*
|
|
113
|
+
* @param { number } currentPage - 请求某一页数据
|
|
114
|
+
*/
|
|
115
|
+
setPageInfo(currentPage?: number): void;
|
|
116
|
+
/**
|
|
117
|
+
* 本地分享content, 设置对应布局、页码
|
|
118
|
+
*
|
|
119
|
+
* @param { boolean } is - 本地是否分享content
|
|
120
|
+
*/
|
|
121
|
+
setLocalShareContent(is: boolean): void;
|
|
122
|
+
/**
|
|
123
|
+
* 回调 video 状态
|
|
124
|
+
* state === (roster当前状态 + 上一次的status)
|
|
125
|
+
*
|
|
126
|
+
* @param { string } key - endpointId + mediagroupId 组成的id
|
|
127
|
+
* @param { status: string; error?: any } data - 最新的会议状态 status === video track / video标签 监听到的状态
|
|
128
|
+
*/
|
|
129
|
+
private onVideoStatusChange;
|
|
130
|
+
/**
|
|
131
|
+
* 使用wrap element元素更新 videoManagers 数据,并绑定视频流信息
|
|
132
|
+
*
|
|
133
|
+
* @param { string } key - endpointId + mediagroupId 组成的id
|
|
134
|
+
* @param { string } wrapEleId - wrap video element id
|
|
135
|
+
*/
|
|
136
|
+
setVideoRenderer(key: string, wrapEleId: string): void;
|
|
137
|
+
/**
|
|
138
|
+
* videoManagers 移除key对应的元素
|
|
139
|
+
*
|
|
140
|
+
* @param { string } key - endpointId + mediagroupId 组成的id
|
|
141
|
+
* @param { string } wrapEleId - wrap video element id
|
|
142
|
+
*/
|
|
143
|
+
removeVideoRenderer(key: string, wrapEleId: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* 播放本地画面
|
|
146
|
+
*/
|
|
147
|
+
playLocalVideo(): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* 播放对应画面
|
|
150
|
+
*
|
|
151
|
+
* @param { string[] } keys - videoID list
|
|
152
|
+
*/
|
|
153
|
+
playVideo(keys?: string[]): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* 切换布局方向
|
|
156
|
+
*
|
|
157
|
+
* @param { LayoutOrientationType } layoutOrientation - 布局方向: MOBILE_HORIZONTAL-横屏;MOBILE_VERTICAL-竖屏
|
|
158
|
+
*/
|
|
159
|
+
setLayoutOrientation(layoutOrientation: LayoutOrientationType): void;
|
|
160
|
+
/**
|
|
161
|
+
* [AUTO] 切换布局
|
|
162
|
+
*
|
|
163
|
+
* @param { IMode } templateMode - 指定要切换的布局模式
|
|
164
|
+
* @returns { Promise<IMode> } - 切换后的布局模式
|
|
165
|
+
*/
|
|
166
|
+
switchLayout(templateMode?: IMode): "SPEAKER" | "GALLERY" | "MULTI_PIC_CONTENT_HIGH_PRIORITY" | "MULTI_PIC_ACTIVE_HIGH_PRIORITY" | "TWO_PIC_PIP" | "CONTENT_ONLY" | "TWO_PIC_SYMMETRIC";
|
|
167
|
+
/**
|
|
168
|
+
* 切换主画面, GALLERY布局不支持
|
|
169
|
+
*
|
|
170
|
+
* @param { string } id - 指定切换到主画面的LayoutId
|
|
171
|
+
* @returns { string } id
|
|
172
|
+
*/
|
|
173
|
+
setFocusView(id: string): string;
|
|
174
|
+
/**
|
|
175
|
+
* 更新Local video track
|
|
176
|
+
*/
|
|
177
|
+
updateLocalTrack(): void;
|
|
178
|
+
/**
|
|
179
|
+
* [AUTO] 计算分页及请流信息
|
|
180
|
+
*/
|
|
181
|
+
calcPageAndRequestLayout(confInfo?: IConfInfo): void;
|
|
182
|
+
/**
|
|
183
|
+
* [AUTO] 重新计算页码信息、模板类型
|
|
184
|
+
*
|
|
185
|
+
* @param { IConfInfo } confInfo - confChange信息
|
|
186
|
+
*/
|
|
187
|
+
calcPageInfo(confInfo?: IConfInfo): void;
|
|
188
|
+
/**
|
|
189
|
+
* [AUTO] 请流
|
|
190
|
+
*
|
|
191
|
+
* @param { IPageInfo } pageInfo - 页码信息
|
|
192
|
+
*/
|
|
193
|
+
calcRequestNewLayout(pageInfo?: IPageInfo): void;
|
|
194
|
+
/**
|
|
195
|
+
* [AUTO] 设置模版类型
|
|
196
|
+
*
|
|
197
|
+
* @param { boolean } isReset - 是否重置模版
|
|
198
|
+
*/
|
|
199
|
+
setTemplateMode(isReset?: boolean): void;
|
|
200
|
+
/**
|
|
201
|
+
* 重置templateMode
|
|
202
|
+
* 本地共享,则显示对称布局四画面
|
|
203
|
+
* 本地未共享,根据当前是否有content,显示默认布局
|
|
204
|
+
*/
|
|
205
|
+
private resetTemplateMode;
|
|
206
|
+
/**
|
|
207
|
+
* 创建排好序的roster数据
|
|
208
|
+
*
|
|
209
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
210
|
+
*/
|
|
211
|
+
private createOrderRoster;
|
|
212
|
+
/**
|
|
213
|
+
* [CUSTOM] 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
|
|
214
|
+
*
|
|
215
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
216
|
+
*/
|
|
217
|
+
createCustomLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
218
|
+
/**
|
|
219
|
+
* [AUTO] : 基于 new layout result 消息生成 customLayoutMap 数据,并diff对比更新数据
|
|
220
|
+
*
|
|
221
|
+
* @param { ILayoutRoster[] } totalLayoutResultList - layout数据
|
|
222
|
+
*/
|
|
223
|
+
createAutoLayout(totalLayoutResultList: ILayoutRoster[]): void;
|
|
224
|
+
/**
|
|
225
|
+
* 创建Layout
|
|
226
|
+
*/
|
|
227
|
+
createLayout(): void;
|
|
228
|
+
/**
|
|
229
|
+
* roster 排序
|
|
230
|
+
*/
|
|
231
|
+
calculateOrderRosterList(): IRoster[];
|
|
232
|
+
/**
|
|
233
|
+
* 缓存主画面信息
|
|
234
|
+
*
|
|
235
|
+
* @param { string } id - 指定切换到主画面的LayoutId
|
|
236
|
+
*/
|
|
237
|
+
private handleFocusViewConfig;
|
|
238
|
+
/**
|
|
239
|
+
* 计算 custom layout 数据
|
|
240
|
+
*/
|
|
241
|
+
private customLayoutCalculator;
|
|
242
|
+
/**
|
|
243
|
+
* [AUTO] 1. 初始化Layout数据
|
|
244
|
+
*/
|
|
245
|
+
initLayoutManager(): void;
|
|
246
|
+
/**
|
|
247
|
+
* 计算显示模板数据
|
|
248
|
+
*
|
|
249
|
+
* @param { number } currentCount - 模版画面数量
|
|
250
|
+
* @param { TemplateType } templateType 是否是全屏模版
|
|
251
|
+
*/
|
|
252
|
+
private calcTemplate;
|
|
253
|
+
/**
|
|
254
|
+
* 根据模版匹配roster信息,生产newLayout数据
|
|
255
|
+
*/
|
|
256
|
+
calculateNewLayoutList(): ILayout[];
|
|
257
|
+
/**
|
|
258
|
+
* 计算Layout Container的容器信息
|
|
259
|
+
*/
|
|
260
|
+
calculateScreenInfo(): void;
|
|
261
|
+
/**
|
|
262
|
+
* 计算Layout Container的容器信息
|
|
263
|
+
*
|
|
264
|
+
* @param { number } rate - 容器比例
|
|
265
|
+
* @returns { IScreenInfo } screenInfo
|
|
266
|
+
*/
|
|
267
|
+
private getTemplateScreenInfo;
|
|
268
|
+
/**
|
|
269
|
+
* [AUTO] 2.创建LayoutMap, 移除无效Layout
|
|
270
|
+
*/
|
|
271
|
+
private createBaseLayout;
|
|
272
|
+
/**
|
|
273
|
+
* 清理无效的 layout 数据,重置状态
|
|
274
|
+
*/
|
|
275
|
+
private clearInvalidLayout;
|
|
276
|
+
/**
|
|
277
|
+
* [AUTO | CUSTOM] 使用最新的 videoTrackList 和 layoutResults 数据更新 layout 内容
|
|
278
|
+
*
|
|
279
|
+
* @param { boolean } isAutoSendLayout - 是否上报Layout信息
|
|
280
|
+
*/
|
|
281
|
+
updateStreams(isAutoSendLayout?: boolean): void;
|
|
282
|
+
/**
|
|
283
|
+
* 清理失效的 video manager 数据
|
|
284
|
+
*/
|
|
285
|
+
clearInvalidVideoManagers(): void;
|
|
286
|
+
private getVideoStreamByTrackId;
|
|
287
|
+
/**
|
|
288
|
+
* [AUTO] 计算位置信息
|
|
289
|
+
*/
|
|
290
|
+
calculatePosition(): void;
|
|
291
|
+
/**
|
|
292
|
+
* 计算位置信息
|
|
293
|
+
*
|
|
294
|
+
* @param { ILayout } item - 需要计算位置信息的layout信息
|
|
295
|
+
* @param { IScreenInfo } screenInfo
|
|
296
|
+
* @returns
|
|
297
|
+
*/
|
|
298
|
+
private getTemplatePosition;
|
|
299
|
+
/**
|
|
300
|
+
* [AUTO] 计算旋转信息
|
|
301
|
+
*/
|
|
302
|
+
calculateRotate(): void;
|
|
303
|
+
/**
|
|
304
|
+
* 【内部方法】停止轮询时,清理无效的 videoManager 数据
|
|
305
|
+
*
|
|
306
|
+
* @param monitoryList callUri list 数据
|
|
307
|
+
*/
|
|
308
|
+
clearVideoManagersUseMonitorList(monitoryList: string[]): void;
|
|
309
|
+
/**
|
|
310
|
+
* 根据roster信息计算请流信息, 对话模式仅支持对称布局
|
|
311
|
+
*/
|
|
312
|
+
private calcRequestNewLayoutByRoster;
|
|
313
|
+
/**
|
|
314
|
+
* 通过旋转信息获取在layout中的位置
|
|
315
|
+
*
|
|
316
|
+
* @param pid peopleId
|
|
317
|
+
* @param mediagroupid type
|
|
318
|
+
*/
|
|
319
|
+
private getLayoutKeyByRotateInfo;
|
|
320
|
+
/**
|
|
321
|
+
* 获取最终请流分辨率
|
|
322
|
+
* 1. 根据是否启用低性能模式
|
|
323
|
+
* 2. 根据企业配置转换请流分辨率
|
|
324
|
+
*
|
|
325
|
+
* @param { ITemplateResolution } resolution - layout模版分辨率
|
|
326
|
+
* @returns { resolutionLevel }
|
|
327
|
+
*/
|
|
328
|
+
private convertResolutionLevel;
|
|
329
|
+
/**
|
|
330
|
+
* 镜像显示Local画面
|
|
331
|
+
*/
|
|
332
|
+
private localMirrorRotate;
|
|
333
|
+
/**
|
|
334
|
+
* 根据layout名称 获得 对应的 名称头像
|
|
335
|
+
*
|
|
336
|
+
* @param { string } displayName layout名称
|
|
337
|
+
* @returns { string } 名称头像 文字内容
|
|
338
|
+
*/
|
|
339
|
+
private getLayoutTextAvatar;
|
|
340
|
+
/**
|
|
341
|
+
* [AUTO] 全屏请流
|
|
342
|
+
*/
|
|
343
|
+
private calcForceFullScreenRequestLayout;
|
|
344
|
+
/**
|
|
345
|
+
* 退出全屏
|
|
346
|
+
*/
|
|
347
|
+
exitFullScreen(): void;
|
|
348
|
+
/**
|
|
349
|
+
* 查找对应的roster
|
|
350
|
+
*
|
|
351
|
+
* @param { string } id - LayoutId
|
|
352
|
+
* @param { ILayoutRoster[]} list - layout list
|
|
353
|
+
* @returns
|
|
354
|
+
*/
|
|
355
|
+
private findRosterById;
|
|
356
|
+
/**
|
|
357
|
+
* 根据 reqList 计算最新的 layout 数据(2.0.2以前的版本方法)
|
|
358
|
+
*
|
|
359
|
+
* @param { IReqInfo[] } reqList - 请流数据
|
|
360
|
+
*/
|
|
361
|
+
requestLayout(reqList: IReqInfo[]): void;
|
|
362
|
+
}
|