@xylink/xy-rtc-sdk 3.9.4 → 3.9.5

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.
@@ -1,4 +1,4 @@
1
- import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IMediaConfigParam, LoginType, LoginParams } from '../type';
1
+ import { ILoginExtAccount, ISdkUserInfo, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams, IMeetingInviteParams, IMediaConfigParam, LoginType, LoginParams, FocusViewAction } from '../type';
2
2
  import Logger from '../tools/logger';
3
3
  export interface ICommonParams {
4
4
  securityKey: string;
@@ -300,12 +300,20 @@ declare class Action {
300
300
  * @returns
301
301
  */
302
302
  loginWithUnified(loginType: LoginType, data: LoginParams): Promise<any>;
303
+ /**
304
+ * 会控设置焦点画面
305
+ *
306
+ * @param { string } deviceUri - 焦点画面终端callUri
307
+ * @param { FocusViewAction} action - 设置焦点画面/取消焦点画面
308
+ * @returns
309
+ */
310
+ setMeetingFocusView(deviceUri: string, action: FocusViewAction): Promise<any>;
303
311
  /**
304
312
  * 设置默认参数,如securityKey
305
313
  *
306
314
  * @param { Object } data
307
315
  */
308
- private setCommonParams;
316
+ setCommonParams(data: Record<string, any>): void;
309
317
  /**
310
318
  * 获取公钥,加密登录需使用此公钥
311
319
  *
@@ -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, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, TemplateMode, ContentTemplateMode } from '../type';
7
+ import { IDefault, IOPERATE_MAP, IRoster, IFeatureConfig, StreamStatus, StreamType, ILoggerConfig, FacingMode, TemplateMode, ContentTemplateMode, LayoutConfig } 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;
@@ -199,3 +199,8 @@ export declare const MEETING_CONTROL_PLATFORM: {
199
199
  SIDE: string;
200
200
  PROFESSIONAL: string;
201
201
  };
202
+ export declare const LOCAL_SHARED_MAX_VIEW_COUNT = 4;
203
+ /**
204
+ * 布局相关配置
205
+ */
206
+ export declare const DEFAULT_LAYOUT_CONFIG: LayoutConfig;
@@ -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, 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';
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, LayoutConfig } from '../type';
8
8
  import Emitter from '../tools/emitter';
9
9
  import Socket from '../tools/socket';
10
10
  import Stream from './stream';
@@ -325,6 +325,14 @@ export default class Client extends Emitter {
325
325
  * @param { boolean } status 是否自动切换设备
326
326
  */
327
327
  switchAutoDevice(status?: boolean): Promise<boolean>;
328
+ /**
329
+ * 设置布局相关配置
330
+ *
331
+ * @param { LayoutConfig } config - 配置参数
332
+ * @property { boolean? } config.isForceSharedLayout - 本地共享布局是否强制宫格布局,默认强制,设置为true;
333
+ * @property { number? } config.localSharedMaxViewCount - 本地共享时显示的最大画面数量,默认4画面,最大8画面
334
+ */
335
+ setLayoutConfig(config: LayoutConfig): void;
328
336
  /**
329
337
  * 设置action信息
330
338
  */
@@ -346,9 +354,23 @@ export default class Client extends Emitter {
346
354
  */
347
355
  switchLayout(templateMode?: IMode): Promise<IMode>;
348
356
  /**
349
- * 切换主画面
357
+ * 设置焦点画面
358
+ *
359
+ * @param { string } rosterId - 指定切换到焦点画面的rosterId
360
+ * @returns { Promise<IReturnResult> } - 结果
361
+ */
362
+ startMeetingFocusView(rosterId: string): Promise<IReturnResult>;
363
+ /**
364
+ * 取消焦点画面
365
+ *
366
+ * @param { string } rosterId - 取消指定终端为焦点画面
367
+ * @returns { Promise<IReturnResult> } - 结果
368
+ */
369
+ stopMeetingFocusView(rosterId: string): Promise<IReturnResult>;
370
+ /**
371
+ * 本地切换主画面
350
372
  *
351
- * @param { string } rosterId 指定切换到主画面的rosterId
373
+ * @param { string } rosterId - 指定切换到主画面的rosterId
352
374
  * @returns { Promise<string> } rosterId
353
375
  */
354
376
  setFocusView(rosterId: string): Promise<string>;
@@ -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-12-07 14:26:03
8
+ * Last modified : 2024-01-23 16:55:29
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";
@@ -57,3 +57,12 @@ export declare const detectLocator: ({ extId, clientId, clientSecret, httpServer
57
57
  * @return { string } 唯一ID
58
58
  */
59
59
  export declare const getRosterId: (callUri?: string, mediagroupid?: number | string) => string;
60
+ /**
61
+ * 切割RosterId,获取endpointId和mediagroupId信息
62
+ *
63
+ * @param { string } rosterId - 唯一ID
64
+ */
65
+ export declare const getRosterIdInfo: (rosterId: string) => {
66
+ endpointId: string;
67
+ mediagroupId: string;
68
+ };
@@ -6,10 +6,10 @@
6
6
  * @email luojinghui424@gmail.com
7
7
  *
8
8
  * Created at : 2021-01-05 17:24:07
9
- * Last modified : 2023-12-08 15:34:41
9
+ * Last modified : 2024-01-24 11:39:36
10
10
  */
11
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';
12
+ import { ILayout, IVideoRenders, IRoster, IScreenInfo, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel, TLayoutMap, TemplateMode, ContentTemplateMode, IMode, LayoutOrientationType, LayoutConfig } from '../../type/index';
13
13
  import Client from '../client';
14
14
  export default class LayoutManager {
15
15
  logger: Logger;
@@ -37,6 +37,7 @@ export default class LayoutManager {
37
37
  private templateManager;
38
38
  private focusViewConfig;
39
39
  private layoutOrientation;
40
+ private layoutConfig;
40
41
  constructor(client: Client);
41
42
  static getCustomLayoutItem(item: ILayout, resolution: StreamResolutionLevel, quality: VideoQuality): {
42
43
  pid: number;
@@ -369,6 +370,12 @@ export default class LayoutManager {
369
370
  * 退出全屏
370
371
  */
371
372
  exitFullScreen(): void;
373
+ /**
374
+ * 设置布局相关配置
375
+ *
376
+ * @param { LayoutConfig } config
377
+ */
378
+ setLayoutConfig(config: LayoutConfig): void;
372
379
  /**
373
380
  * 查找对应的roster
374
381
  *
@@ -2,9 +2,9 @@
2
2
  * Meeting Info Control
3
3
  *
4
4
  * Created at : 2022-10-27 13:58:22
5
- * Last modified : 2023-11-17 10:37:34
5
+ * Last modified : 2024-01-24 16:37:23
6
6
  */
7
- import { IRecordPermission, IConfMgmtUrl, ILayout, IMediaConfig, IReqInfo, LayoutAvatarType, TLayoutMap, InviteInfo, IMeetingControl } from '../type';
7
+ import { IRecordPermission, IConfMgmtUrl, ILayout, IMediaConfig, IReqInfo, LayoutAvatarType, TLayoutMap, InviteInfo, IMeetingControl, FocusViewAction } from '../type';
8
8
  import Client from './client';
9
9
  import Logger from '../tools/logger';
10
10
  declare class Meeting {
@@ -131,6 +131,13 @@ declare class Meeting {
131
131
  * 2023-8-3 鉴于安全考虑,此接口需提供MeetingId字段;
132
132
  */
133
133
  getMeetingInviteInfo(): Promise<InviteInfo>;
134
+ /**
135
+ * 通过会控设置焦点画面
136
+ *
137
+ * @param { string } endpointId - 指定切换到焦点画面的endpointId
138
+ * @returns
139
+ */
140
+ setMeetingFocusView(endpointId: string, action: FocusViewAction): Promise<import("../type").IReturnResult>;
134
141
  /**
135
142
  * 企业配置信息
136
143
  *
@@ -29,8 +29,10 @@ declare class BrowserDetector {
29
29
  isMiniProgram: boolean;
30
30
  isWindowsWxWechat: boolean;
31
31
  isWindowsWechat: boolean;
32
+ isTrident: boolean;
32
33
  };
33
- static getOperationSystem(): "" | "Windows WXWechat" | "Windows Wechat" | "Windows" | "iPhone" | "Android" | "iPad" | "Mac" | "Linux" | "MiniProgram";
34
+ static getOperationSystem(): "" | "Windows WXWechat" | "Windows Wechat" | "Windows" | "iOS" | "Android" | "iPad" | "Mac" | "Linux" | "MiniProgram";
35
+ static getBrowserName: () => "Firefox" | "Chrome" | "Safari" | "Edge" | "Opera" | "Internet Explorer" | "WindowsWechat" | "WindowsWxWechat" | "Weixin" | "WXWeixin" | "Tencent" | "Huawei" | "Other" | "Unknown";
34
36
  static getChromeVersion(): {
35
37
  major: any;
36
38
  minor: any;
@@ -29,8 +29,16 @@ declare class HttpClient {
29
29
  private clientId;
30
30
  private clientSecret;
31
31
  private retryCount;
32
- xyApiGatewaySDK: XyApiGatewaySDK | null;
32
+ private nua;
33
+ private xyApiGatewaySDK;
33
34
  constructor(commonOption: IAxiosRequestConfig);
35
+ /**
36
+ * 获取SDK n-ua 信息
37
+ *
38
+ * @param { string } version - SDK版本号
39
+ * @returns { string } n-ua
40
+ */
41
+ private getNuaInfo;
34
42
  getTokenInfo(): any;
35
43
  setTokenInfo(tokenInfo: IToken | null): void;
36
44
  setLogger(logger: Logger): void;
@@ -1410,4 +1410,14 @@ export interface Notification {
1410
1410
  };
1411
1411
  requestId: string;
1412
1412
  }
1413
+ /**
1414
+ * 焦点画面动作
1415
+ *
1416
+ * @param START - 指定焦点画面
1417
+ * @param STOP - 取消焦点画面
1418
+ */
1419
+ export declare enum FocusViewAction {
1420
+ START = "start",
1421
+ STOP = "stop"
1422
+ }
1413
1423
  export {};
@@ -211,3 +211,13 @@ export interface ContentOnholdInfo {
211
211
  audioTrackId: string;
212
212
  contentUrl: string;
213
213
  }
214
+ /**
215
+ * 布局相关配置
216
+ *
217
+ * @property { boolean } isForceSharedLayout - 本地共享布局是否强制宫格布局
218
+ * @property { number } localSharedMaxViewCount - 本地共享时显示的最大画面数量
219
+ */
220
+ export interface LayoutConfig {
221
+ isForceSharedLayout?: boolean;
222
+ localSharedMaxViewCount?: number;
223
+ }