@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
@@ -4,17 +4,20 @@
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, LayoutOrientationType } from '../type';
7
+ import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternals, IVideoAudioType, ShareContentStatus, IStreamConfig, 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, AnalyserConfig, IRotationInfoTotalItem, SnapshotParams, IFeatureConfigValue, IFeatureConfigKey, LocalViewParams, SwitchDeviceConfig, AbilityResult, IExportUserInfo, LoginTokenInfo } from '../type';
8
8
  import Emitter from '../tools/emitter';
9
9
  import Socket from '../tools/socket';
10
10
  import Stream from './stream';
11
- import Logger from '../tools/logger';
12
- import IAuth from './iauth';
11
+ import Logger from '../tools/log/logger';
13
12
  import DeviceManager from './deviceManager';
14
13
  import LayoutManager from './layout';
14
+ import { Speaker } from '../feature/index';
15
+ import Action from '../action';
16
+ import Auth from './auth';
15
17
  export default class Client extends Emitter {
16
18
  logger: Logger;
17
- iauth: IAuth;
19
+ action: Action;
20
+ auth: Auth;
18
21
  socketTask: Socket | undefined;
19
22
  invite: IInvite;
20
23
  rosters: IRoster[];
@@ -24,20 +27,15 @@ export default class Client extends Emitter {
24
27
  total: ILayoutRoster[];
25
28
  };
26
29
  disconnected: boolean;
27
- speakerInfo: ISpeakerInfo;
30
+ activeSpeaker: ISpeakerInfo;
28
31
  layoutManager: LayoutManager | null;
29
32
  pushType: IPushType;
30
33
  isAutoBandwidth: boolean;
31
34
  debug: boolean;
32
35
  shareContentStatus: ShareContentStatus;
33
36
  deviceManager: DeviceManager | null;
34
- localHide: boolean;
35
- hideId: string;
36
37
  config: IClientConfig;
37
- isPermissionDenied: {
38
- microphone: boolean;
39
- camera: boolean;
40
- };
38
+ speaker: Speaker | null;
41
39
  private autoMode;
42
40
  private token;
43
41
  private peer;
@@ -72,12 +70,14 @@ export default class Client extends Emitter {
72
70
  private handStatus;
73
71
  private featureConfig;
74
72
  private meeting;
75
- private cacheSpeakersInfo;
76
- private speakersInfo;
77
73
  private operateQueue;
78
74
  private facingMode;
79
75
  private wsReConnectCount;
80
- private localSpeakerTimer;
76
+ private clientImplements;
77
+ private audioStatus;
78
+ private videoStatus;
79
+ private ability;
80
+ private makeCallParams;
81
81
  private onDocumentChange;
82
82
  constructor(config: IClientConfig, logger: Logger);
83
83
  static instance: Client;
@@ -88,14 +88,6 @@ export default class Client extends Emitter {
88
88
  quality: number;
89
89
  mediagroupid: number;
90
90
  };
91
- /**
92
- * 转换hideId隐身入会字段
93
- *
94
- * @static
95
- * @param { IClientConfig } config client配置项
96
- * @returns { string } hideId
97
- */
98
- static getHideId(config: IClientConfig): string;
99
91
  getLoginInfo(): import("../type").ILoginInfo;
100
92
  getFeatureConfig(): IFeatureConfig;
101
93
  getCallInfo(): ICall;
@@ -105,6 +97,8 @@ export default class Client extends Emitter {
105
97
  getPreviewStreams(): import("../type").IGetMediaStreams | {
106
98
  previewStreams: never[];
107
99
  };
100
+ getAudioStreamConfig(): IStreamConfig | undefined;
101
+ getStreamInstance(): Stream | null;
108
102
  getVideoTrackList(): ICustomStreamTrack[];
109
103
  getLayoutRosters(): {
110
104
  content: ILayoutRoster[];
@@ -114,12 +108,28 @@ export default class Client extends Emitter {
114
108
  getOriginRosters(): IRoster[];
115
109
  getInviteInfo(): IInvite;
116
110
  getContentSenderPid(): number;
117
- getSpeakerInfo(): ISpeakerInfo;
118
- getLocalHide(): boolean;
119
- getRotationInfo(): import("../type").IRotationInfoTotalItem[];
111
+ getActiveSpeaker(): ISpeakerInfo;
112
+ getLocalHide(): boolean | undefined;
113
+ getRotationInfo(): IRotationInfoTotalItem[];
120
114
  getPeerConnectionStatus(): boolean;
121
115
  getOnHold(): boolean;
122
116
  getAudioTrackList(): ICustomStreamTrack[];
117
+ getAudioStatus(): OperateType;
118
+ getDeviceManager(): DeviceManager | null;
119
+ getMakeCallParams(): IMackCall;
120
+ getUserInfo(): IExportUserInfo | null;
121
+ /**
122
+ * 将Stream实例绑定到Client模块上,方便互相调用
123
+ *
124
+ * @param { Stream } stream - Stream实例模块
125
+ */
126
+ bindStreamInstance(stream: Stream): void;
127
+ /**
128
+ * 获取缓存的媒体网关下发speakers消息内容
129
+ *
130
+ * @returns { SpeakersInfoObj[] } - speakers消息内容
131
+ */
132
+ getRemoteSpeakerList(): import("../type").SpeakersInfoObj[];
123
133
  getLayoutMap(): Map<any, any>;
124
134
  /**
125
135
  * 获取Local roster信息
@@ -148,6 +158,29 @@ export default class Client extends Emitter {
148
158
  * @returns { IMediaConfig }
149
159
  */
150
160
  getEnterpriseMediaConfig(): import("../type").IMediaConfig;
161
+ /**
162
+ * 获取视频的Stream数据
163
+ *
164
+ * @param { string } rosterId - 用户id,通过layout事件列表获取,没有则获取自己的视频流
165
+ * @return { MediaStream || null } - 获取到的Stream
166
+ */
167
+ getVideoStream(rosterId?: string): MediaStream | IReturnResult | null;
168
+ /**
169
+ * 获取音频的Stream数据
170
+ *
171
+ * @param { string } rosterId - 用户id,通过layout事件列表获取,没有则获取自己的音频流
172
+ * @return { MediaStream || null } - 获取到的Stream
173
+ */
174
+ getAudioStream(rosterId?: string): MediaStream | IReturnResult | null;
175
+ /**
176
+ * 获取音频分析器,用于获取音频的音量大小
177
+ *
178
+ * @public
179
+ * @param { string } rosterId - 用户id,通过layout事件列表获取
180
+ * @param { AnalyserConfig } config - Analyser分析器构造器配置
181
+ * @return { AudioAnalyser || null } - Analyser分析器
182
+ */
183
+ getAudioAnalyser(rosterId?: string, config?: AnalyserConfig): IReturnResult | import("../tools/analyser").AudioAnalyser | null;
151
184
  /**
152
185
  * 切换布局方向
153
186
  *
@@ -225,67 +258,105 @@ export default class Client extends Emitter {
225
258
  resetInitParameter(): void;
226
259
  setContentMode(mode: ContentMode): void;
227
260
  /**
228
- * SDK功能控制开关
261
+ * SDK功能控制开关,支持增量设置
229
262
  *
230
263
  * @public
231
264
  * @param { IFeatureConfig } config 功能配置项
232
265
  * @property { boolean } config.enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
233
- * @property { boolean } config.enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
266
+ * @property { boolean } config.enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true,支持会中动态切换;
234
267
  * @property { boolean } config.enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
235
268
  * @property { boolean } config.enableBandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
236
269
  * @property { boolean } config.enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
237
270
  * @property { boolean } config.enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
238
271
  * @property { boolean } config.enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
239
- * @property { boolean } config.enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
272
+ * @property { boolean } config.enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false,支持会中动态切换;
240
273
  * @property { boolean } config.enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
241
274
  * @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
242
- * @property { boolean } config.enableMobileNotAuth 是否启用移动端无授权入会,默认不启用,设置为false;
275
+ * @property { boolean } config.enableMobileNotAuth 是否启用移动端无授权入会,默认不启用,设置为false;此配置已经废弃,移动端已支持动态授权功能;
243
276
  * @property { boolean } config.enableWatermarkContent 是否启用获取content水印内容, 默认启用, 设置为true
244
- * @returns { IResult }
277
+ * @property { boolean } config.enableHideLocalView 是否启用隐藏本地画面模式,默认不启用,设置为false
278
+ * @returns { IReturnResult }
245
279
  */
246
- setFeatureConfig(config: IFeatureConfig): IReturnResult | undefined;
280
+ setFeatureConfig(config: IFeatureConfig): Promise<IReturnResult | undefined>;
281
+ /**
282
+ * 动态切换功能开关
283
+ *
284
+ * @param { IFeatureConfigKey } key - 功能的Key值
285
+ * @param { IFeatureConfigValue<IFeatureConfigKey> } value - 设置的值
286
+ */
287
+ switchFeatureConfig(key: IFeatureConfigKey, value: IFeatureConfigValue<IFeatureConfigKey>): Promise<IReturnResult | undefined>;
288
+ /**
289
+ * Feature变动后,统一处理逻辑
290
+ *
291
+ * @param { IFeatureConfigKey } key - Feature Config Key
292
+ */
293
+ private processFeatureConfig;
294
+ /**
295
+ * 动态切换上行模式的低性能功能
296
+ */
297
+ processUplinkLowPerformance(): Promise<void>;
298
+ /**
299
+ * 动态切换下行模式的低性能功能
300
+ */
301
+ processDownlinkLowPerformance(): void;
247
302
  /**
248
303
  * 获取会控地址
249
304
  */
250
305
  getConfMgmtUrl(): Promise<IConfMgmtUrl | null>;
251
306
  /**
252
- * 切换显示/隐藏 Local 画面
307
+ * 设置显示/隐藏 Local 画面
253
308
  *
254
- * @public
309
+ * @param { boolean } state - 显示/隐藏状态|Boolean值|true代表隐藏本地画面,false代表显示本地画面
255
310
  * @returns { Promise<{ status: boolean }> } 是否隐藏本地画面成功
256
311
  */
257
- toggleLocal(): Promise<{
312
+ setHideLocalView(state: boolean): Promise<{
258
313
  status: boolean;
259
314
  }>;
260
315
  /**
261
316
  * 隐身入会, 可调用此方法进行互动
262
317
  *
263
- * @public
318
+ * @param { string | number } hideId - 隐身ID
264
319
  * @returns { Promise<boolean> } 是否隐身
265
320
  */
266
- toggleHideId(): Promise<boolean>;
321
+ toggleHideId(hideId: number | string): Promise<string>;
267
322
  /**
268
323
  * 绑定streamId和video ele元素,内部维护状态
269
324
  *
270
325
  * @public
271
- * @param { string } key endpointId + mediagroupId 唯一的用户id值
272
- * @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
326
+ * @param { string } rosterId - 参会者唯一ID,由roster中的id得到
327
+ * @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
328
+ */
329
+ setVideoRenderer(rosterId: string, viewId: string): void;
330
+ /**
331
+ * 指定Element渲染Video,支持多次渲染画面
332
+ * 注意:当key所对应的状态发生变化后,需要重新调用此方法重新播放画面
333
+ *
334
+ * @public
335
+ * @param { string } rosterId - 参会者唯一ID,由roster中的id得到
336
+ * @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
273
337
  */
274
- setVideoRenderer(key: string, wrapEleId: string): void;
338
+ setSlaveVideoRenderer(rosterId: string, viewId: string): void;
275
339
  /**
276
340
  * 移除绑定的streamId
277
341
  *
278
- * @param { string } key endpointId + mediagroupId 唯一的用户id值
279
- * @param { string } wrapEle 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
342
+ * @param { string } rosterId - 参会者唯一ID,由roster中的id得到
280
343
  */
281
- removeVideoRender(key: string, wrapEleId: string): void;
344
+ removeVideoRender(rosterId: string): void;
345
+ /**
346
+ * 移除绑定副屏Video渲染
347
+ * 如果rosterId和viewId没有填写,则清空所有的Slave配置数据
348
+ *
349
+ * @param { string } rosterId - 参会者唯一ID,由endpointId + mediagroupId组成;如果没有传递,则清空所有数据
350
+ * @param { string } viewId 包裹video组件的元素id,此元素一定要提供宽高信息,内部会基于此宽高信息计算video的旋转信息
351
+ */
352
+ removeSlaveVideoRenderer(rosterId?: string, viewId?: string): void;
282
353
  /**
283
354
  * 重新播放视频
284
355
  *
285
356
  * @public
286
- * @param { string[] ? } keys 指定重新播放的video
357
+ * @param { string[] ? } rosterIdList - 指定重新播放的参会者ID,由roster中的id得到
287
358
  */
288
- playVideo(keys?: string[]): Promise<boolean>;
359
+ playVideo(rosterIdList?: string[]): Promise<boolean>;
289
360
  /**
290
361
  * 重新播放音频
291
362
  */
@@ -298,20 +369,42 @@ export default class Client extends Emitter {
298
369
  */
299
370
  switchCamera(facingMode?: IFacingMode): Promise<IFacingMode>;
300
371
  /**
301
- * 绑定streamId和audio ele元素,内部维护状态
372
+ * 提供Audio元素信息,用于播放音频流
302
373
  *
303
374
  * @public
304
- * @param { string } key streamId流id
305
- * @param { HTMLAudioElement } ele audio元素
375
+ * @param { string } streamId - mediaStream流ID
376
+ * @param { HTMLAudioElement } ele - audio元素
306
377
  */
307
- setAudioRenderer(key: string, ele: HTMLAudioElement): Promise<void>;
378
+ setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
308
379
  /**
309
380
  * 是否执行自动切换设备操作
310
381
  *
311
382
  * @public
312
- * @param { boolean } status 是否自动切换设备
383
+ * @param { boolean } status - 是否自动切换设备
313
384
  */
314
385
  switchAutoDevice(status?: boolean): Promise<boolean>;
386
+ /**
387
+ * 指定画面屏幕截图
388
+ *
389
+ * @param { SnapshotParams } params - 参数
390
+ * @property { string } params.rosterId - 用户id,通过layout事件列表获取
391
+ * @property { string } params.imageType - 图片格式, 默认'image/png'
392
+ * @property { number } params.compressLevel - 图片质量,0-1
393
+ *
394
+ * @returns { Promise<SnapshotResult> } - 截图信息
395
+ */
396
+ getSnapshot(params: SnapshotParams): Promise<import("../type").SnapshotResult>;
397
+ /**
398
+ * 设置本地视频渲染参数
399
+ *
400
+ * @param { LocalViewParams } params - 本地视频渲染参数
401
+ * @property { boolean } params.isMirror - 是否镜像展示
402
+ */
403
+ setLocalViewParams(params: LocalViewParams): Promise<IReturnResult | undefined>;
404
+ /**
405
+ * 获取Server配置地址
406
+ */
407
+ private getServerInfo;
315
408
  /**
316
409
  * 设置action信息
317
410
  */
@@ -328,17 +421,17 @@ export default class Client extends Emitter {
328
421
  /**
329
422
  * 切换布局
330
423
  *
331
- * @param { IMode? } templateMode 指定要切换的布局模式
332
- * @returns { Promise<IMode> } 切换后的布局模式
424
+ * @param { IMode? } templateMode - 指定要切换的布局模式
425
+ * @returns { Promise<IMode> } - 切换后的布局模式
333
426
  */
334
427
  switchLayout(templateMode?: IMode): Promise<IMode>;
335
428
  /**
336
429
  * 切换主画面
337
430
  *
338
- * @param { string } id 指定切换到主画面的LayoutId
339
- * @returns { Promise<string> } LayoutId
431
+ * @param { string } rosterId - 参会者唯一ID,由roster中的id得到
432
+ * @returns { Promise<string> } - rosterId
340
433
  */
341
- setFocusView(id: string): Promise<string>;
434
+ setFocusView(rosterId: string): Promise<string>;
342
435
  /**
343
436
  * AUTO布局 分页
344
437
  *
@@ -376,12 +469,6 @@ export default class Client extends Emitter {
376
469
  * @param { Object } data 远端数据
377
470
  */
378
471
  private onEPMessage;
379
- /**
380
- * 处理联席主持人消息
381
- *
382
- * @param data
383
- */
384
- private onNotification;
385
472
  /**
386
473
  * 通知会控打开/关闭摄像头结果
387
474
  *
@@ -396,7 +483,7 @@ export default class Client extends Emitter {
396
483
  * @private
397
484
  * @param { IRecordStatusNotification } data
398
485
  */
399
- private onRecordStatusNotfiMessage;
486
+ private onRecordStatusNotifyMessage;
400
487
  /**
401
488
  * 处理本地录制结果上报Message
402
489
  *
@@ -457,6 +544,12 @@ export default class Client extends Emitter {
457
544
  * @param { IMonitorReportMessage } data 媒体调度消息
458
545
  */
459
546
  private onMonitorReportMessage;
547
+ /**
548
+ * 无登录模式调用,需要在调用makeCall前配置,用于网关签名计算和接口安全校验
549
+ *
550
+ * @param { LoginTokenInfo } info - 登录token、clientId等相关信息
551
+ */
552
+ setLoginTokenInfo(info: LoginTokenInfo): void;
460
553
  /**
461
554
  * 发起会议呼叫,如果返回 true ,代表是否可以继续呼叫;
462
555
  *
@@ -582,14 +675,10 @@ export default class Client extends Emitter {
582
675
  * @param { OperateType } type - 操作类型
583
676
  */
584
677
  private operateStreamStatus;
585
- /**
586
- * 清除Local Speaker Timer
587
- */
588
- private clearSpeakerTimer;
589
678
  /**
590
679
  * 推流到PeerConnection上
591
680
  *
592
- * @param pushType
681
+ * @param { PushType } pushType - 推送类型,用来区分Content和People画面流
593
682
  */
594
683
  peerPublish(pushType: PushType): void;
595
684
  /**
@@ -673,6 +762,7 @@ export default class Client extends Emitter {
673
762
  getSendSupportedCodec(): Promise<Object>;
674
763
  /**
675
764
  * peerConnection 创建成功后,从缓存中读取会控消息开始处理
765
+ * 状态码:950518
676
766
  *
677
767
  * @public
678
768
  * @param { boolean } status peer连接状态
@@ -716,21 +806,9 @@ export default class Client extends Emitter {
716
806
  * 处理媒体消息
717
807
  *
718
808
  * @private
719
- * @param { any } data 媒体消息
809
+ * @param { * } data - 媒体消息
720
810
  */
721
811
  private onPassThroughMessage;
722
- /**
723
- * 处理实时讲话人信息
724
- *
725
- * @private
726
- */
727
- private onSpeakerInfoMessage;
728
- /**
729
- * 推送实时讲话人信息
730
- *
731
- * @param { SpeakersInfoObj[] } speakersInfo - 说话人信息
732
- */
733
- private emitSpeakersInfo;
734
812
  /**
735
813
  * 处理contentOnhold
736
814
  *
@@ -767,20 +845,6 @@ export default class Client extends Emitter {
767
845
  * @returns { Promise<boolean> } 是否开启了debug模式
768
846
  */
769
847
  switchDebug(status: boolean): Promise<boolean>;
770
- /**
771
- * 请求自定义参会者成员的分辨率、质量视频数据 (2.0.2以前的版本方法)
772
- * 视频质量级别
773
- * people 720p 时:Low 表示15 fps,Normal和High 表示 30 fps
774
- * people 1080p时:Low 表示15 fps,Normal和High 表示 60 fps,(如果解码能力不够60,会被压低为30的)
775
- *
776
- * content 720p 时:Low 表示5 fps, Normal和High 表示 30 fps
777
- * content 1080p时:Low 表示15 fps,Normal和High 表示 30 fps
778
- *
779
- * @public
780
- * @param { IReqInfo[] } reqList 需要请求的参会者的信息
781
- * @returns { string } 是否成功
782
- */
783
- requestLayout(reqList: IReqInfo[]): Promise<string>;
784
848
  /**
785
849
  * 【newLayout】请求参会者成员的信息、视频数据等
786
850
  *
@@ -961,13 +1025,13 @@ export default class Client extends Emitter {
961
1025
  * @public
962
1026
  * @param { string } deviceId 设备ID
963
1027
  */
964
- setAudioOutputDevice(deviceId: string): void;
1028
+ setAudioOutputDevice(deviceId: string, config?: SwitchDeviceConfig): Promise<void>;
965
1029
  /**
966
- * 移除对应的AudioRender
1030
+ * 移除对应的AudioRenderer
967
1031
  *
968
- * @param { string } key endpointId + mediagroupId 唯一的用户id值
1032
+ * @param { string } rosterId - 参会者唯一ID,由roster中的id得到
969
1033
  */
970
- removeAudioRender(key: string): void;
1034
+ removeAudioRender(rosterId: string): void;
971
1035
  /**
972
1036
  * 开始巡课
973
1037
  *
@@ -1062,6 +1126,30 @@ export default class Client extends Emitter {
1062
1126
  * @returns {Promise<InviteInfo>}
1063
1127
  */
1064
1128
  getMeetingInviteInfo(): Promise<InviteInfo>;
1129
+ /**
1130
+ * 签到
1131
+ *
1132
+ * @property { string } questionnaireId - 业务ID
1133
+ * @returns { Promise<SignInResult> } - 签到结果
1134
+ */
1135
+ signIn(questionnaireId: string): Promise<IReturnResult>;
1136
+ /**
1137
+ * 校验会控主持密码
1138
+ *
1139
+ * @param { string } pwd - 密码
1140
+ * @returns { Promise<IReturnResult> } - 校验结果
1141
+ */
1142
+ verifyControlPassword(pwd: string): Promise<IReturnResult>;
1143
+ /**
1144
+ * 获取能力集
1145
+ *
1146
+ * @returns { AbilityResult} - 能力结果集
1147
+ */
1148
+ getAbility(): AbilityResult;
1149
+ /**
1150
+ * 结束全体会议
1151
+ */
1152
+ endAllMeeting(): Promise<IReturnResult | undefined>;
1065
1153
  /**
1066
1154
  * 设置多分组通道,通用方法
1067
1155
  *
@@ -1084,9 +1172,13 @@ export default class Client extends Emitter {
1084
1172
  */
1085
1173
  private initDeviceManagerEvent;
1086
1174
  /**
1087
- * 获取wssUrl
1175
+ * 请求ConfChangeInfo消息
1176
+ */
1177
+ private reqConfChangeInfo;
1178
+ /**
1179
+ * 获取WebSocket URL地址
1088
1180
  *
1089
- * @returns { string } wssUrl
1181
+ * @returns { string } - 返回WebSocket地址
1090
1182
  */
1091
1183
  private getWssUrl;
1092
1184
  /**
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Client implements lib
3
+ *
4
+ * @summary client module functions entry
5
+ *
6
+ * Created at : 2023-08-30 15:24:24
7
+ * Last modified : 2023-11-03 14:48:54
8
+ */
9
+ import Client from './client';
10
+ import { SnapshotParams, SnapshotResult, AnalyserConfig, IReturnResult, OriginalNotification, OriginalRealTimeNotification } from '../type';
11
+ import Logger from '../tools/log/logger';
12
+ import { AudioAnalyser } from '../tools/analyser';
13
+ declare class ClientImplements {
14
+ logger: Logger;
15
+ private client;
16
+ private action;
17
+ constructor(client: Client);
18
+ /**
19
+ * 获取视频的Stream数据
20
+ *
21
+ * @param { string } rosterId - 参会者唯一ID,通过roster数据获取,没有则获取本地视频流
22
+ * @return { MediaStream || null } - 获取到的Stream
23
+ */
24
+ getVideoStream(rosterId?: string): MediaStream | IReturnResult | null;
25
+ /**
26
+ * 获取音频的Stream数据
27
+ *
28
+ * @param { string } rosterId - 参会者唯一ID,通过roster数据获取,没有则获取本地音频流
29
+ * @return { MediaStream || null } - 获取到的Stream
30
+ */
31
+ getAudioStream(rosterId?: string): MediaStream | IReturnResult | null;
32
+ /**
33
+ * 通过TrackId找到对应的MediaStream数据
34
+ *
35
+ * @private
36
+ * @param { string } replaceTrackId - trackId
37
+ * @param { ICustomStreamTrack[] } tracks - StreamList缓存的流列表数据
38
+ * @returns { MediaStream | null } - 返回媒体流数据,如果没有找到,则返回null
39
+ */
40
+ private getMediaStreamByTrackId;
41
+ /**
42
+ * 获取音频的分析器实例
43
+ * 使用场景:获取远端或本地端音频音量大小
44
+ *
45
+ * @param { string } rosterId - 参会者唯一ID,通过roster数据获取
46
+ * @param { AnalyserConfig } config - Analyser分析器构造器配置
47
+ * @return { AudioAnalyser | null } - 获取到的Stream
48
+ */
49
+ getAudioAnalyser(rosterId?: string, config?: AnalyserConfig): IReturnResult | AudioAnalyser | null;
50
+ /**
51
+ * 指定画面屏幕截图
52
+ *
53
+ * @param { SnapshotParams } params 参数
54
+ * @property { string } params.rosterId - 用户id,通过layout事件列表获取
55
+ * @property { string } params.imageType - 图片格式, 默认'image/png'
56
+ * @property { number } params.compressLevel - 图片质量,0-1
57
+ *
58
+ * @returns { Promise<SnapshotResult> } - 截图信息
59
+ */
60
+ getSnapshot(params: SnapshotParams): Promise<SnapshotResult>;
61
+ /**
62
+ * 校验会控主持密码
63
+ *
64
+ * @param { string } pwd - 会控密码
65
+ * @returns { Promise<IReturnResult> } - 校验结果
66
+ */
67
+ verifyControlPassword(pwd: string): Promise<IReturnResult>;
68
+ /**
69
+ * 签到
70
+ *
71
+ * @property { string } questionnaireId - 业务ID
72
+ * @returns { Promise<IReturnResult> } - 签到结果
73
+ */
74
+ signIn(questionnaireId: string): Promise<IReturnResult>;
75
+ /**
76
+ * 处理联席主持人消息
77
+ *
78
+ * @param { OriginalNotification } data - 消息内容
79
+ */
80
+ onNotification(data: OriginalNotification): void;
81
+ /**
82
+ * 会控互动工具相关数据, 签到等
83
+ *
84
+ * @param { OriginalRealTimeNotification } data - 信令下发的原始数据
85
+ */
86
+ onRealTimeNotification(data: OriginalRealTimeNotification): Promise<void>;
87
+ /**
88
+ * 结束全体会议
89
+ */
90
+ endAllMeeting(): Promise<IReturnResult | undefined>;
91
+ /**
92
+ * 获取签到文案
93
+ *
94
+ * @property { SignInTextParams } - 参数
95
+ * @returns { Promise<SignInText | null> } - 签到文案
96
+ */
97
+ private getSignInText;
98
+ }
99
+ export default ClientImplements;