@xylink/xy-rtc-sdk 3.9.4 → 3.9.6

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';
@@ -79,6 +79,7 @@ export default class Client extends Emitter {
79
79
  private operateQueue;
80
80
  private facingMode;
81
81
  private wsReConnectCount;
82
+ private recordStatusNotification;
82
83
  private localSpeakerTimer;
83
84
  private onDocumentChange;
84
85
  constructor(config: IClientConfig, logger: Logger);
@@ -325,6 +326,14 @@ export default class Client extends Emitter {
325
326
  * @param { boolean } status 是否自动切换设备
326
327
  */
327
328
  switchAutoDevice(status?: boolean): Promise<boolean>;
329
+ /**
330
+ * 设置布局相关配置
331
+ *
332
+ * @param { LayoutConfig } config - 配置参数
333
+ * @property { boolean? } config.isForceSharedLayout - 本地共享布局是否强制宫格布局,默认强制,设置为true;
334
+ * @property { number? } config.localSharedMaxViewCount - 本地共享时显示的最大画面数量,默认4画面,最大8画面
335
+ */
336
+ setLayoutConfig(config: LayoutConfig): void;
328
337
  /**
329
338
  * 设置action信息
330
339
  */
@@ -346,9 +355,23 @@ export default class Client extends Emitter {
346
355
  */
347
356
  switchLayout(templateMode?: IMode): Promise<IMode>;
348
357
  /**
349
- * 切换主画面
358
+ * 设置焦点画面
359
+ *
360
+ * @param { string } rosterId - 指定切换到焦点画面的rosterId
361
+ * @returns { Promise<IReturnResult> } - 结果
362
+ */
363
+ startMeetingFocusView(rosterId: string): Promise<IReturnResult>;
364
+ /**
365
+ * 取消焦点画面
350
366
  *
351
- * @param { string } rosterId 指定切换到主画面的rosterId
367
+ * @param { string } rosterId - 取消指定终端为焦点画面
368
+ * @returns { Promise<IReturnResult> } - 结果
369
+ */
370
+ stopMeetingFocusView(rosterId: string): Promise<IReturnResult>;
371
+ /**
372
+ * 本地切换主画面
373
+ *
374
+ * @param { string } rosterId - 指定切换到主画面的rosterId
352
375
  * @returns { Promise<string> } rosterId
353
376
  */
354
377
  setFocusView(rosterId: string): Promise<string>;
@@ -410,6 +433,10 @@ export default class Client extends Emitter {
410
433
  * @param { IRecordStatusNotification } data
411
434
  */
412
435
  private onRecordStatusNotfiMessage;
436
+ /**
437
+ * 上报远端录制状态
438
+ */
439
+ private emitRecordStatusNotification;
413
440
  /**
414
441
  * 处理本地录制结果上报Message
415
442
  *
@@ -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;
@@ -78,3 +78,10 @@ export declare const TYPEOF: {
78
78
  isSpecialChar(val: any): boolean;
79
79
  isWhiteSpace(val: any): boolean;
80
80
  };
81
+ /**
82
+ * JSON字符串转对象
83
+ *
84
+ * @param { any } jsonString
85
+ * @returns { object}
86
+ */
87
+ export declare const jsonStringToObject: (jsonString: any) => any;
@@ -1103,11 +1103,20 @@ export declare enum AutoMute {
1103
1103
  export interface IGetConferenceParams {
1104
1104
  autoMute: AutoMute;
1105
1105
  }
1106
+ /**
1107
+ * 录制相关信息
1108
+ *
1109
+ * @property { string } recordSessionId - sessionId
1110
+ */
1111
+ export interface IRecordInfo {
1112
+ recordSessionId: string;
1113
+ }
1106
1114
  /**
1107
1115
  * 本地录制结果上报
1108
1116
  *
1109
1117
  * @property { string } reason - 成功STATE:200
1110
1118
  * @property { RecordingState } state - 录制状态
1119
+ * @property { string } recordInfo - 录制相关信息
1111
1120
  * @property { boolean } isRecorded - ignore
1112
1121
  * @property { string } controlUri - ignore
1113
1122
  * @property { string } reasonText - ignore
@@ -1115,6 +1124,7 @@ export interface IGetConferenceParams {
1115
1124
  export interface IRecordingStateChanged {
1116
1125
  reason: string;
1117
1126
  state: RecordingState;
1127
+ recordInfo: IRecordInfo;
1118
1128
  isRecorded: boolean;
1119
1129
  controlUri: string;
1120
1130
  reasonText: string;
@@ -1136,6 +1146,7 @@ export interface IRecordStatusNotification {
1136
1146
  callerUri: string;
1137
1147
  status: string;
1138
1148
  isLocal: boolean;
1149
+ recordInfo: IRecordInfo;
1139
1150
  }
1140
1151
  /**
1141
1152
  * 录制权限
@@ -1410,4 +1421,14 @@ export interface Notification {
1410
1421
  };
1411
1422
  requestId: string;
1412
1423
  }
1424
+ /**
1425
+ * 焦点画面动作
1426
+ *
1427
+ * @param START - 指定焦点画面
1428
+ * @param STOP - 取消焦点画面
1429
+ */
1430
+ export declare enum FocusViewAction {
1431
+ START = "start",
1432
+ STOP = "stop"
1433
+ }
1413
1434
  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
+ }