@ylink-sdk/meeting 0.1.13 → 0.2.0-beta.10

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.
@@ -0,0 +1,2349 @@
1
+ /// <reference types="node" />
2
+
3
+ import { Canceler } from '@ylink-sdk/shared';
4
+ import { Emitter } from '@ylink-sdk/shared';
5
+ import { EventType } from '@ylink-sdk/shared';
6
+ import { ICancelToken } from '@ylink-sdk/shared';
7
+ import { Request as Request_2 } from '@ylink-sdk/shared';
8
+ import { RequestError } from '@ylink-sdk/shared';
9
+
10
+ declare type AddVirtualClassParams = VirtualClassParams & {
11
+ vmrId: string;
12
+ type: number;
13
+ };
14
+
15
+ export declare interface audioStats {
16
+ /**
17
+ * 编解码器
18
+ */
19
+ codec: string;
20
+ /**
21
+ * bps 带宽
22
+ */
23
+ bandwidth: number;
24
+ /**
25
+ * ms 环回延时
26
+ */
27
+ rtt: number;
28
+ /**
29
+ * ms 抖动
30
+ */
31
+ jitter: number;
32
+ /**
33
+ * % 丢包率
34
+ */
35
+ lossrate: number;
36
+ /**
37
+ * 个 丢包数
38
+ */
39
+ packetlost: number;
40
+ }
41
+
42
+ declare interface BarrageRecord {
43
+ content: string;
44
+ time: number;
45
+ durationType: string;
46
+ duration: number;
47
+ }
48
+
49
+ /**
50
+ * 呼叫记录用户
51
+ */
52
+ export declare interface callRecordUser {
53
+ type: InviteType;
54
+ contact: string;
55
+ displayName: string;
56
+ displayNamePinyin: string;
57
+ role: ROLE;
58
+ account: number;
59
+ groupIDs: number[];
60
+ zone: string;
61
+ inviteState: 'fail' | 'inviting' | 'success';
62
+ inviteTime: number;
63
+ inviteTransID: string;
64
+ inviterDisplayName: string;
65
+ resultInfo?: {
66
+ bizCode?: number;
67
+ reasonCode?: number;
68
+ message?: string;
69
+ };
70
+ }
71
+
72
+ export declare class Chat extends Module<ChatData, Events_9> {
73
+ constructor(ctx: Context);
74
+ _topic(): string;
75
+ _bindOn(): void;
76
+ /**
77
+ * 发送聊天信息
78
+ * @params
79
+ * @returns
80
+ */
81
+ msg(params: {
82
+ msgID: string;
83
+ contentType: string;
84
+ content: string;
85
+ msgType?: number;
86
+ receiver?: {
87
+ userID: number;
88
+ };
89
+ timestamp?: number;
90
+ sender?: {
91
+ userID?: number;
92
+ displayName?: string;
93
+ };
94
+ }): Promise<any>;
95
+ /**
96
+ * 查询聊天历史信息
97
+ * @returns
98
+ */
99
+ historyMsg(params: {
100
+ limit: number;
101
+ }): Promise<any>;
102
+ }
103
+
104
+ export declare type ChatData = object;
105
+
106
+ export declare interface ChatMsgPayload {
107
+ body: Msg;
108
+ state: PollingPayloadState;
109
+ }
110
+
111
+ declare interface Config {
112
+ /**
113
+ * 服务器地址
114
+ * @example https://meetings.ylyun.com/control
115
+ */
116
+ baseURL: string;
117
+ /**
118
+ * 需加载的模块
119
+ * @example
120
+ * ```
121
+ * import { createMeeting, Users, Setting } from '@ylink-sdk/meeting'
122
+ * const meeting = createMeeting({
123
+ * ...
124
+ * modules: [Users, Setting]
125
+ * })
126
+ * ```
127
+ */
128
+ modules: any[];
129
+ /**
130
+ * 消息推送采用子线程模式,避免推送过快,抢占请求资源
131
+ * @example
132
+ * ```
133
+ * // vite框架示例
134
+ * import { createMeeting } from '@ylink-sdk/meeting'
135
+ * import PollingWorker from '@ylink-sdk/meeting/dist/worker/polling.worker.prod.js?worker'
136
+ * const meeting = createMeeting({
137
+ * ...
138
+ * worker: new PollingWorker()
139
+ * })
140
+ * ```
141
+ */
142
+ worker?: Worker;
143
+ /**
144
+ * 创建的meeting实例为单例
145
+ */
146
+ singleton?: boolean;
147
+ }
148
+
149
+ /**
150
+ * 全局上下文
151
+ */
152
+ export declare interface Context {
153
+ /**
154
+ * 全局配置
155
+ */
156
+ config: {
157
+ /**
158
+ * 服务器地址
159
+ * @example https://meetings.ylyun.com/control
160
+ */
161
+ baseURL: string;
162
+ /**
163
+ * 传入的依赖模块
164
+ */
165
+ modules: Array<any>;
166
+ /**
167
+ * 是否采用单例模式
168
+ */
169
+ singleton: boolean;
170
+ /**
171
+ * 请求配置
172
+ */
173
+ request: {
174
+ /**
175
+ * 取消请求
176
+ * @summary SDK内部默认对polling和keepalive接口进行配置
177
+ */
178
+ cancelToken: {
179
+ token: ICancelToken;
180
+ cancel: Canceler;
181
+ };
182
+ /**
183
+ * Api接口前缀
184
+ */
185
+ prefix: {
186
+ /**
187
+ * 会控
188
+ * /meeting-ctrl/api/v1/
189
+ * @default /meeting-ctrl/api/v1/
190
+ */
191
+ ctrl: string;
192
+ /**
193
+ * 会议管理
194
+ * /conference-manager/api/v1/
195
+ * @default /conference-manager/api/v1/
196
+ */
197
+ conference: string;
198
+ /**
199
+ * 用户管理
200
+ * /user-manager/api/v1/
201
+ * @default /user-manager/api/v1/
202
+ */
203
+ user: string;
204
+ /**
205
+ * 投票
206
+ * /vote/api/v1/
207
+ * @default /vote/api/v1/
208
+ */
209
+ vote: string;
210
+ [prop: string]: string;
211
+ };
212
+ /**
213
+ * 设备ID
214
+ */
215
+ clientID: string;
216
+ /**
217
+ * 会议归属地
218
+ */
219
+ location: string;
220
+ /**
221
+ * 会议ID
222
+ */
223
+ meetingID: string;
224
+ /**
225
+ * 会控token
226
+ */
227
+ ctrlID: string;
228
+ /**
229
+ * 当前会话
230
+ */
231
+ sessionID: string;
232
+ /**
233
+ * 当前用户ID
234
+ */
235
+ userID: number;
236
+ /**
237
+ * 投票服务唯一标识
238
+ */
239
+ voteTk: string;
240
+ };
241
+ };
242
+ /**
243
+ * 消息推送子线程
244
+ */
245
+ worker?: Worker;
246
+ /**
247
+ * 事件通知
248
+ */
249
+ emitter: Emitter<Events>;
250
+ /**
251
+ * 请求能力
252
+ */
253
+ request: Request_2;
254
+ /**
255
+ * 业务模块
256
+ */
257
+ modules: Record<string, any>;
258
+ /**
259
+ * 会议状态
260
+ */
261
+ state: STATE;
262
+ /**
263
+ * 轮询定时器状态
264
+ */
265
+ status: {
266
+ /**
267
+ * 消息推送-长轮询状态
268
+ */
269
+ polling: {
270
+ /**
271
+ * 是否运行中
272
+ */
273
+ running: boolean;
274
+ /**
275
+ * 定时器
276
+ */
277
+ timer?: NodeJS.Timeout | null;
278
+ };
279
+ /**
280
+ * 保活轮询状态
281
+ */
282
+ keepalive: {
283
+ /**
284
+ * 是否运行中
285
+ */
286
+ running: boolean;
287
+ /**
288
+ * 定时器
289
+ */
290
+ timer?: NodeJS.Timeout | null;
291
+ /**
292
+ * 轮询间隔时间,正常为20S
293
+ */
294
+ interval: number;
295
+ };
296
+ };
297
+ cleanup: (reason?: Reason) => void;
298
+ }
299
+
300
+ /**
301
+ * 创建SDK会议实例
302
+ * @param config
303
+ * @returns YlinkSDKMeeting
304
+ */
305
+ export declare function createMeeting(config: Config): YlinkSDKMeeting;
306
+
307
+ declare type EditVirtualClassParams = VirtualClassParams & {
308
+ templateId: string;
309
+ };
310
+
311
+ /**
312
+ * 终端类型
313
+ */
314
+ export declare enum ENDPOINT_TYPE {
315
+ /**
316
+ * webRTC
317
+ */
318
+ WEBAPP = "webApp",
319
+ /**
320
+ * web会控
321
+ */
322
+ WEBCTRL = "webCtrl",
323
+ /**
324
+ * 微信小程序
325
+ */
326
+ WECHATMP = "weChatMP",
327
+ /**
328
+ * 监视者
329
+ */
330
+ SUPERVISION = "supervision",
331
+ /**
332
+ * 虚拟教室终端
333
+ */
334
+ BIGSCREEN = "bigScreen",
335
+ /**
336
+ * 桌面客户端
337
+ */
338
+ DESKTOP = "desktop",
339
+ /**
340
+ * 移动客户端
341
+ */
342
+ MOBILE = "mobile",
343
+ /**
344
+ * 亿联硬件终端
345
+ */
346
+ VCS = "vcs",
347
+ /**
348
+ * SIP终端
349
+ */
350
+ SIP = "sip",
351
+ /**
352
+ * 323终端
353
+ */
354
+ H323 = "h323",
355
+ /**
356
+ * PSTN电话
357
+ */
358
+ PSTN = "pstn"
359
+ }
360
+
361
+ /**
362
+ * 全局事件
363
+ */
364
+ export declare enum EVENT {
365
+ /**
366
+ * 请求异常
367
+ */
368
+ REQUEST_ERROR = "requestError",
369
+ /**
370
+ * 会议状态
371
+ */
372
+ STATE = "state",
373
+ /**
374
+ * 入会失败
375
+ */
376
+ FAILED = "failed"
377
+ }
378
+
379
+ /**
380
+ * emitter 事件
381
+ */
382
+ declare type Events = {
383
+ [EVENT.STATE]: {
384
+ state: STATE;
385
+ reason?: Reason;
386
+ };
387
+ [EVENT.REQUEST_ERROR]: RequestError;
388
+ [EVENT.FAILED]: Reason;
389
+ [MeEvent.INIT]: MeData;
390
+ [MeEvent.UPDATE]: any;
391
+ [MeEvent.ROLECHANGE]: ROLE;
392
+ [MeEvent.LOBBYCHANGE]: boolean;
393
+ me: any;
394
+ setUserVideo: any;
395
+ setUserAudio: any;
396
+ meetingState: any;
397
+ recording: any;
398
+ meetingSetting: any;
399
+ spotlightVideo: any;
400
+ interactiveUsers: any;
401
+ lobbyUsers: any;
402
+ broadcastUsers: any;
403
+ advCtrlUsers: any;
404
+ hostLayout: any;
405
+ attendeeLayout: any;
406
+ audienceLayout: any;
407
+ meetingView: any;
408
+ personalView: any;
409
+ vote: any;
410
+ meetingBarrage: any;
411
+ meetingInfo: any;
412
+ callRecord: any;
413
+ participantCount: any;
414
+ liveStream: any;
415
+ chatMsg: any;
416
+ transcriptMsg: any;
417
+ qa: any;
418
+ queryCallStats: {
419
+ body: {
420
+ interval: number;
421
+ count: number;
422
+ };
423
+ };
424
+ };
425
+
426
+ declare type Events_10 = {
427
+ hostLayoutChange: ViewData['hostLayout'];
428
+ attendeeLayoutChange: ViewData['attendeeLayout'];
429
+ audienceLayoutChange: ViewData['audienceLayout'];
430
+ personalLayoutsChange: ViewData['personalLayouts'];
431
+ };
432
+
433
+ declare type Events_11 = {
434
+ questionChange: {
435
+ questions: Map<string, Question>;
436
+ };
437
+ questionDelete: {
438
+ question: Question;
439
+ };
440
+ questionUpdate: {
441
+ question: Question;
442
+ };
443
+ questionAdd: {
444
+ question: Question;
445
+ selfSent: boolean;
446
+ };
447
+ };
448
+
449
+ declare type Events_12 = {
450
+ transcriptMsg: Transcription;
451
+ };
452
+
453
+ declare type Events_13 = Record<EventType, unknown>;
454
+
455
+ declare type Events_14 = Record<EventType, any>;
456
+
457
+ declare type Events_15 = Record<EventType, any>;
458
+
459
+ declare type Events_2 = {
460
+ [MeEvent.INIT]: MeData;
461
+ [MeEvent.UPDATE]: any;
462
+ [MeEvent.UPDATE_USER_STATE]: {
463
+ data: MeData;
464
+ event?: 'roleChange' | 'inLobbyChange';
465
+ };
466
+ [MeEvent.ROLECHANGE]: ROLE;
467
+ [MeEvent.AUDIOCHANGE]: MeMedia;
468
+ [MeEvent.HANDUPCHANGE]: boolean;
469
+ [MeEvent.SETAUDIO]: SetMedia;
470
+ [MeEvent.VIDEOCHANGE]: MeMedia;
471
+ [MeEvent.SETVIDEO]: SetMedia;
472
+ [MeEvent.SHARECHANGE]: MeMedia;
473
+ [MeEvent.DISPLAYNAMECHANGE]: string;
474
+ [MeEvent.SPOTLIGHTVIDEOCHANGE]: boolean;
475
+ [MeEvent.LOBBYCHANGE]: boolean;
476
+ [MeEvent.BARRAGECHANGE]: MeData['barrage'] | null;
477
+ [MeEvent.LEAVE]: any;
478
+ };
479
+
480
+ declare type Events_3 = Record<EventType, any>;
481
+
482
+ declare type Events_4 = {
483
+ interactiveUsersChange: {
484
+ users: User[];
485
+ isFull: boolean;
486
+ };
487
+ lobbyUsersChange: {
488
+ users: User[];
489
+ isFull: boolean;
490
+ };
491
+ broadcastUsersChange: {
492
+ users: User[];
493
+ isFull: boolean;
494
+ };
495
+ advCtrlUsersChange: {
496
+ users: User[];
497
+ isFull: boolean;
498
+ };
499
+ interactiveUsersDelete: {
500
+ user: User;
501
+ resultInfo: User['resultInfo'];
502
+ };
503
+ lobbyUsersDelete: {
504
+ user: User;
505
+ resultInfo: User['resultInfo'];
506
+ };
507
+ broadcastUsersDelete: {
508
+ user: User;
509
+ resultInfo: User['resultInfo'];
510
+ };
511
+ advCtrlUsersDelete: {
512
+ user: User;
513
+ resultInfo: User['resultInfo'];
514
+ };
515
+ interactiveUsersUpdate: {
516
+ user: User;
517
+ };
518
+ lobbyUsersUpdate: {
519
+ user: User;
520
+ };
521
+ broadcastUsersUpdate: {
522
+ user: User;
523
+ };
524
+ advCtrlUsersUpdate: {
525
+ user: User;
526
+ };
527
+ interactiveUsersAdd: {
528
+ user: User;
529
+ resultInfo: User['resultInfo'];
530
+ };
531
+ lobbyUsersAdd: {
532
+ user: User;
533
+ resultInfo: User['resultInfo'];
534
+ };
535
+ broadcastUsersAdd: {
536
+ user: User;
537
+ resultInfo: User['resultInfo'];
538
+ };
539
+ advCtrlUsersAdd: {
540
+ user: User;
541
+ resultInfo: User['resultInfo'];
542
+ };
543
+ };
544
+
545
+ declare type Events_5 = {
546
+ userIDsChange: number[];
547
+ };
548
+
549
+ declare type Events_6 = {
550
+ callRecordUsersChange: callRecordUser[];
551
+ };
552
+
553
+ declare type Events_7 = {
554
+ voteChange: {
555
+ vote: VoteData['vote'];
556
+ changeData: VoteBody;
557
+ };
558
+ };
559
+
560
+ declare type Events_8 = {
561
+ barrageRecordChange: BarrageRecord[];
562
+ };
563
+
564
+ declare type Events_9 = {
565
+ chatMsg: Msg;
566
+ };
567
+
568
+ export declare class Info extends Module<InfoData, Events_3> {
569
+ constructor(ctx: Context);
570
+ _topic(): string;
571
+ _bindOn(): void;
572
+ /**
573
+ * 会议标题修改
574
+ * @params 设置参数
575
+ * @returns 返回的数据
576
+ */
577
+ subject(params: {
578
+ subject: string;
579
+ }): Promise<any>;
580
+ /**
581
+ * 关闭会议准备模式
582
+ * @returns 返回的数据
583
+ */
584
+ practiceSession(): Promise<any>;
585
+ /**
586
+ * 获取分享信息
587
+ * @param params
588
+ * @returns
589
+ */
590
+ shareInfo(params: {
591
+ /**
592
+ * 会议号码
593
+ */
594
+ meetingNum: string;
595
+ /**
596
+ * 需要预约成员信息带true
597
+ */
598
+ participant?: boolean;
599
+ }): Promise<any>;
600
+ /**
601
+ * 获取会议静态数据
602
+ * @param params
603
+ * @returns
604
+ */
605
+ meetings(params: {
606
+ /**
607
+ * 会议号
608
+ */
609
+ meetingNum: string;
610
+ /**
611
+ * 调取credential接口获取的临时秘钥
612
+ */
613
+ credential: string;
614
+ /**
615
+ * 需要预约成员信息带true
616
+ */
617
+ participant?: boolean;
618
+ /**
619
+ * 需要AVC配置信息带true
620
+ */
621
+ avcConfig?: boolean;
622
+ }): Promise<any>;
623
+ /**
624
+ * 会议邀请邮件
625
+ * @param params
626
+ * @returns
627
+ */
628
+ mailTemplate(params: {
629
+ language: string;
630
+ }): Promise<any>;
631
+ }
632
+
633
+ export declare interface InfoData {
634
+ meetingNum: string;
635
+ meetingID: string;
636
+ allowJoinBeforeHost: boolean;
637
+ askToUnmuteEnabled: boolean;
638
+ consentToRecord: boolean;
639
+ createType: 'vmr' | 'scheduled' | 'meetNow';
640
+ eid: string;
641
+ meetingType: 'meeting' | 'webinar';
642
+ organizer: {
643
+ displayName: string;
644
+ subjectID: string;
645
+ };
646
+ partySubType: number;
647
+ pwd: string;
648
+ seq: number;
649
+ sequence: number;
650
+ startTime: number;
651
+ subject: string;
652
+ speakerShowSelf: boolean;
653
+ asrServiceAvailable: boolean;
654
+ recordUserEnabled: boolean;
655
+ premiseRecordEnabled?: boolean;
656
+ planID?: string;
657
+ vmrID?: string;
658
+ allowLocalRecord?: boolean;
659
+ youtubeLiveStreamDisabled?: boolean;
660
+ allowLiveStream?: boolean;
661
+ isVirtualClassroom?: boolean;
662
+ liveCaptionEnabled?: boolean;
663
+ practiceSession?: boolean;
664
+ audienceHideNonVideoEnabled?: boolean;
665
+ webinarSurveyLink?: string;
666
+ participantCount: {
667
+ hostAttendee: number;
668
+ audience: number;
669
+ };
670
+ }
671
+
672
+ export declare class Invite extends Module<InviteData, Events_6> {
673
+ static setDisplayNamePinyinProp: (name: string) => string;
674
+ constructor(ctx: Context);
675
+ _topic(): string;
676
+ _bindOn(): void;
677
+ /**
678
+ * 邀请
679
+ * @param params
680
+ * @returns
681
+ */
682
+ invite(params: {
683
+ type: InviteType;
684
+ contacts: string[];
685
+ zone?: string;
686
+ }): Promise<any>;
687
+ }
688
+
689
+ /**
690
+ * Invite 数据
691
+ */
692
+ export declare interface InviteData {
693
+ callRecordUsers: callRecordUser[];
694
+ }
695
+
696
+ /**
697
+ * 邀请用户类型
698
+ */
699
+ export declare type InviteType = 'account' | 'subjectID' | 'sip' | 'h323' | 'pstn' | 'teams' | 'number';
700
+
701
+ /**
702
+ * 入会参数
703
+ */
704
+ export declare interface JoinParams {
705
+ /**
706
+ * 会议号
707
+ */
708
+ meetingNum: string;
709
+ /**
710
+ * 会议明文密码
711
+ */
712
+ pwd?: string;
713
+ /**
714
+ * 用户显示名
715
+ */
716
+ displayName: string;
717
+ /**
718
+ * 终端类型
719
+ */
720
+ endpointType: ENDPOINT_TYPE;
721
+ /**
722
+ * 邀请入会的事务ID(邀请入会必选)
723
+ */
724
+ inviteTransID?: string;
725
+ /**
726
+ * 组织架构IDs
727
+ */
728
+ groupIDs?: Array<string>;
729
+ /**
730
+ * 云账号
731
+ */
732
+ account?: string;
733
+ /**
734
+ * 终端设备类型UA
735
+ */
736
+ userAgent?: string;
737
+ /**
738
+ * 账号的GroupName名称
739
+ */
740
+ groupName?: string;
741
+ /**
742
+ * 入会链接,不带meetingNum则必选
743
+ */
744
+ url?: string;
745
+ /**
746
+ * 手机区号
747
+ */
748
+ mobileCode?: string;
749
+ /**
750
+ * 手机号
751
+ */
752
+ mobile?: string;
753
+ /**
754
+ * 注册邮箱
755
+ */
756
+ regEmail?: string;
757
+ /**
758
+ * 云账号用户邮箱
759
+ */
760
+ accEmail?: string;
761
+ /**
762
+ * 观众注册唯一标识
763
+ */
764
+ tk?: string;
765
+ }
766
+
767
+ export declare interface Layout {
768
+ mode: LayoutMode;
769
+ layout: LayoutContent;
770
+ seq?: number;
771
+ applyToAttendee?: boolean;
772
+ }
773
+
774
+ export declare interface LayoutContent {
775
+ type: string;
776
+ disallowShowSameVideo?: boolean;
777
+ hideNonVideo?: boolean;
778
+ name?: string;
779
+ pollCount?: number;
780
+ pollSeconds?: number;
781
+ pictures?: Picture[];
782
+ count?: number;
783
+ layout?: string;
784
+ mode?: string;
785
+ }
786
+
787
+ export declare type LayoutMode = 'custom' | 'basic';
788
+
789
+ export declare interface Live {
790
+ duration?: number;
791
+ lastStartTime?: number;
792
+ content?: string;
793
+ contentType?: string;
794
+ layout: {
795
+ type?: string;
796
+ };
797
+ liveCaptionEnabled?: boolean;
798
+ platform?: string;
799
+ status?: string;
800
+ watchURL?: string;
801
+ requesting?: boolean;
802
+ resultInfo?: {
803
+ bizCode?: string;
804
+ };
805
+ bizCode?: string;
806
+ watchPassword?: string;
807
+ userID?: string;
808
+ }
809
+
810
+ export declare class LiveStream extends Module<LiveStreamData, Events_13> {
811
+ constructor(ctx: Context);
812
+ _topic(): string;
813
+ _bindOn(): void;
814
+ /**
815
+ * 设置直播状态
816
+ * @returns 返回的数据
817
+ */
818
+ setStatus(params: {
819
+ platform: string;
820
+ action: string;
821
+ }): Promise<any>;
822
+ /**
823
+ * 设置直播描述信息
824
+ * @returns 返回的数据
825
+ */
826
+ liveStreamDescription(params: {
827
+ platform: string;
828
+ contentType: string;
829
+ content: string;
830
+ }): Promise<any>;
831
+ /**
832
+ * 录制状态修改
833
+ * @params 设置参数
834
+ * @returns 返回的数据
835
+ */
836
+ liveStreamSetting(params: {
837
+ platform: string;
838
+ layout: {
839
+ type: string;
840
+ };
841
+ liveCaptionEnabled: boolean;
842
+ }): Promise<any>;
843
+ }
844
+
845
+ export declare interface LiveStreamData {
846
+ liveStreams: Live[];
847
+ status: Status[];
848
+ resultInfo: {
849
+ bizCode?: string;
850
+ };
851
+ jetlag: number;
852
+ }
853
+
854
+ export declare class Me extends Module<MeData, Events_2> {
855
+ constructor(ctx: Context);
856
+ _topic(): string;
857
+ _bindOn(): void;
858
+ /**
859
+ * 上报客户端音视频状态
860
+ * @param params
861
+ * @param isForce
862
+ * @returns
863
+ */
864
+ updateUserState(params: {
865
+ audio: Partial<MediaState>;
866
+ video: Partial<MediaState>;
867
+ share?: Partial<MediaState>;
868
+ }, isForce?: boolean): Promise<Response_2>;
869
+ rePolling(event?: 'roleChange' | 'inLobbyChange'): Promise<void>;
870
+ }
871
+
872
+ export declare interface MeData {
873
+ /**
874
+ * 是否上报了媒体状态
875
+ */
876
+ isUpdatedUserState: boolean;
877
+ /**
878
+ * 是否被设为焦点视频
879
+ */
880
+ isSpotlightVideo: boolean;
881
+ userID: number;
882
+ role: ROLE;
883
+ joinTime: number;
884
+ endpointType: ENDPOINT_TYPE;
885
+ isInLobby: boolean;
886
+ isHandUp: boolean;
887
+ displayName: string;
888
+ subjectID: string;
889
+ caps: number;
890
+ initialMediaState: {
891
+ audio: MediaState;
892
+ video: MediaState;
893
+ };
894
+ mediaContent?: {
895
+ accessMCs: Array<string>;
896
+ addrType: number;
897
+ crypto: string;
898
+ meetingParam: string;
899
+ topMC: string;
900
+ };
901
+ audio?: MeMedia;
902
+ video?: MeMedia;
903
+ share?: MeMedia;
904
+ barrage?: {
905
+ content?: string;
906
+ contentType?: string;
907
+ duration?: number;
908
+ position?: string;
909
+ receiver?: {
910
+ host: boolean;
911
+ attendee: boolean;
912
+ audience: boolean;
913
+ };
914
+ type?: string;
915
+ };
916
+ }
917
+
918
+ /**
919
+ * 媒体
920
+ */
921
+ export declare interface MediaState {
922
+ /**
923
+ * 设备的开启状态,true设备可用/false设备不可用
924
+ */
925
+ deviceOn?: boolean;
926
+ /**
927
+ * 暂不使用
928
+ */
929
+ recvOn?: boolean;
930
+ /**
931
+ * 媒体开关状态
932
+ */
933
+ sendOn: boolean;
934
+ }
935
+
936
+ export declare enum MeEvent {
937
+ /**
938
+ * 初始化自身信息,正常为入会时进行调用
939
+ */
940
+ INIT = "meInit",
941
+ /**
942
+ * 涉及自身变更的通知,其他模块触发用
943
+ */
944
+ UPDATE = "meUpdate",
945
+ /**
946
+ * 用户上报自身媒体状态
947
+ */
948
+ UPDATE_USER_STATE = "updateUserState",
949
+ /**
950
+ * 角色变更
951
+ */
952
+ ROLECHANGE = "meRoleChange",
953
+ /**
954
+ * 音频状态变更
955
+ */
956
+ AUDIOCHANGE = "meAudioChange",
957
+ /**
958
+ * 举手状态变更
959
+ */
960
+ HANDUPCHANGE = "meHandupChange",
961
+ /**
962
+ * 远端请求开启音频
963
+ */
964
+ SETAUDIO = "setAudio",
965
+ /**
966
+ * 视频状态变更
967
+ */
968
+ VIDEOCHANGE = "meVideoChange",
969
+ /**
970
+ * 远端请求开启视频
971
+ */
972
+ SETVIDEO = "setVideo",
973
+ /**
974
+ * 辅流状态变更
975
+ */
976
+ SHARECHANGE = "meShareChange",
977
+ /**
978
+ * 显示名变更
979
+ */
980
+ DISPLAYNAMECHANGE = "meDisplayNameChange",
981
+ /**
982
+ * 焦点视频状态变更
983
+ */
984
+ SPOTLIGHTVIDEOCHANGE = "meSpotlightVideoChange",
985
+ /**
986
+ * 进入/离开等候室变更
987
+ */
988
+ LOBBYCHANGE = "meLobbyChange",
989
+ /**
990
+ * 横幅变更
991
+ */
992
+ BARRAGECHANGE = "meBarrageChange",
993
+ /**
994
+ * 离开会议
995
+ */
996
+ LEAVE = "leave"
997
+ }
998
+
999
+ declare type MeMedia = MediaState & {
1000
+ opBy?: number;
1001
+ };
1002
+
1003
+ declare abstract class Module<T extends object, E extends Record<EventType, unknown>> {
1004
+ moduleName: string;
1005
+ ctx: Context;
1006
+ data: T;
1007
+ emitter: Emitter<E>;
1008
+ on: Emitter<E>['on'];
1009
+ off: Emitter<E>['off'];
1010
+ constructor(ctx: Context, moduleName: string);
1011
+ /**
1012
+ * 数据清理
1013
+ */
1014
+ cleanup(): void;
1015
+ /**
1016
+ * 关联外部响应式数据
1017
+ * @param obj
1018
+ */
1019
+ reactive(obj: Record<any, any>): T & ReactiveReturn;
1020
+ /**
1021
+ * 设置模块订阅的主题
1022
+ */
1023
+ abstract _topic(): string | string[];
1024
+ /**
1025
+ * 绑定对应的事件通知,来源polling
1026
+ */
1027
+ abstract _bindOn(): void;
1028
+ }
1029
+
1030
+ export declare interface Msg {
1031
+ msgID: string;
1032
+ contentType: string;
1033
+ content: string;
1034
+ msgType: number;
1035
+ receiver: {
1036
+ userID: number;
1037
+ };
1038
+ sender: MsgSender;
1039
+ timestamp: number;
1040
+ }
1041
+
1042
+ /**
1043
+ * 消息发送者
1044
+ */
1045
+ declare interface MsgSender {
1046
+ displayName: string;
1047
+ userID: number;
1048
+ }
1049
+
1050
+ export declare interface PersonalLayout {
1051
+ mode: 'custom' | 'basic';
1052
+ layouts: LayoutContent[];
1053
+ seq: number;
1054
+ subscriber?: PersonalLayoutSubscriber;
1055
+ templateStatus?: number;
1056
+ }
1057
+
1058
+ export declare interface PersonalLayoutSubscriber {
1059
+ userID: number;
1060
+ subjectID?: string;
1061
+ }
1062
+
1063
+ export declare interface Picture {
1064
+ index: number;
1065
+ subscribeType: string;
1066
+ subscribeToUsers?: SubscribeToUser[];
1067
+ priorSubscribeType?: string;
1068
+ }
1069
+
1070
+ /**
1071
+ * polling 下发事件状态
1072
+ */
1073
+ export declare type PollingPayloadState = 'full' | 'delete' | 'update';
1074
+
1075
+ export declare class Qa extends Module<QaData, Events_11> {
1076
+ constructor(ctx: Context);
1077
+ _topic(): string;
1078
+ _bindOn(): void;
1079
+ cleanup(): void;
1080
+ qaUpdate(questions: Map<string, Question>, data: any): void;
1081
+ createQuestion(data: Question): {
1082
+ isAnonymous: boolean;
1083
+ isTop: boolean;
1084
+ id: string;
1085
+ content: string;
1086
+ sender: {
1087
+ displayName: string;
1088
+ endpointID: string;
1089
+ };
1090
+ timestamp: number;
1091
+ status: string;
1092
+ answers: Map<any, any>;
1093
+ topSort: number;
1094
+ };
1095
+ createQuestionAnswer(data: QuestionAnswer): {
1096
+ isPrivate: boolean;
1097
+ content: string;
1098
+ id: string;
1099
+ sender: {
1100
+ displayName: string;
1101
+ endpointID: string;
1102
+ };
1103
+ timestamp: number;
1104
+ };
1105
+ /**
1106
+ * 问答
1107
+ * @param params
1108
+ * @returns
1109
+ */
1110
+ qa(params: {
1111
+ command: QaCommand;
1112
+ question: {
1113
+ isAnonymous: boolean;
1114
+ isTop: boolean;
1115
+ id: string;
1116
+ content: string;
1117
+ sender: {
1118
+ endpointID: string;
1119
+ displayName: string;
1120
+ };
1121
+ };
1122
+ }): Promise<any>;
1123
+ }
1124
+
1125
+ export declare type QaCommand = 'addQuestion' | 'dismissQuestion' | 'reopenQuestion' | 'updateQuestion' | 'deleteQuestion' | 'answerQuestion' | 'deleteAnswer';
1126
+
1127
+ export declare interface QaData {
1128
+ questions: Map<string, Question>;
1129
+ topSort: number;
1130
+ }
1131
+
1132
+ export declare interface QaPayload {
1133
+ body: {
1134
+ command: QaCommand;
1135
+ question: Question;
1136
+ };
1137
+ state: PollingPayloadState;
1138
+ }
1139
+
1140
+ export declare interface Question {
1141
+ isAnonymous: boolean;
1142
+ isTop: boolean;
1143
+ id: string;
1144
+ content: string;
1145
+ sender: {
1146
+ displayName: string;
1147
+ endpointID: string;
1148
+ };
1149
+ timestamp: number;
1150
+ status: string;
1151
+ answers: Map<string, QuestionAnswer>;
1152
+ topSort?: number;
1153
+ }
1154
+
1155
+ export declare interface QuestionAnswer {
1156
+ isPrivate: boolean;
1157
+ id: string;
1158
+ sender: {
1159
+ displayName: string;
1160
+ endpointID: string;
1161
+ };
1162
+ content: string;
1163
+ timestamp: number;
1164
+ }
1165
+
1166
+ declare type ReactiveReturn = {
1167
+ /**
1168
+ * 取消响应式关联
1169
+ */
1170
+ _destory: () => void;
1171
+ };
1172
+
1173
+ export declare type Reason = ResultInfo & {
1174
+ data?: any;
1175
+ };
1176
+
1177
+ /**
1178
+ * 录制状态
1179
+ */
1180
+ export declare enum RECORD_STATUS {
1181
+ STARTED = "started",
1182
+ PAUSED = "paused",
1183
+ STARTING = "starting",
1184
+ STOPPED = "stopped"
1185
+ }
1186
+
1187
+ export declare class Recording extends Module<RecordingData, Events_14> {
1188
+ constructor(ctx: Context);
1189
+ _topic(): string;
1190
+ _bindOn(): void;
1191
+ /**
1192
+ * 录制记录
1193
+ * @returns 返回的数据
1194
+ */
1195
+ history(): Promise<any>;
1196
+ /**
1197
+ * 录制状态修改
1198
+ * @params 设置参数
1199
+ * @returns 返回的数据
1200
+ */
1201
+ status(params: {
1202
+ action: 'start' | 'pause' | 'stop';
1203
+ }): Promise<any>;
1204
+ /**
1205
+ * 录制布局控制
1206
+ * @params 设置参数
1207
+ * @returns 返回的数据
1208
+ */
1209
+ layout(params: {
1210
+ mode?: 'basic' | 'custom';
1211
+ layoutOption: string;
1212
+ layout?: LayoutContent;
1213
+ }): Promise<any>;
1214
+ /**
1215
+ * 会控指定与会者录制
1216
+ * @params 设置参数
1217
+ * @returns 返回的数据
1218
+ */
1219
+ designatedUsers(params: {
1220
+ recordUsers: RecordUsers[];
1221
+ }): Promise<any>;
1222
+ /**
1223
+ * 指定与会者成员添加
1224
+ * @params 设置参数
1225
+ * @returns 返回的数据
1226
+ */
1227
+ participantAdd(params: {
1228
+ sourceId: string;
1229
+ content: string;
1230
+ sourceType: number;
1231
+ }): Promise<any>;
1232
+ /**
1233
+ * 指定与会者成员清除
1234
+ * @params 设置参数
1235
+ * @returns 返回的数据
1236
+ */
1237
+ participantDelete(params: {
1238
+ sourceId: string;
1239
+ sourceType: number;
1240
+ }): Promise<any>;
1241
+ /**
1242
+ * 会议模板列表
1243
+ * @params 设置参数
1244
+ * @returns 返回的数据
1245
+ */
1246
+ getTemplates(params: {
1247
+ vmrId: string;
1248
+ }): Promise<any>;
1249
+ /**
1250
+ * 根据id列表获取用户信息
1251
+ * @params 设置参数
1252
+ * @returns 返回的数据
1253
+ */
1254
+ getByIds(params: {
1255
+ ids: string[];
1256
+ }): Promise<any>;
1257
+ /**
1258
+ * 设置录制布局
1259
+ * @params 设置参数
1260
+ * @returns 返回的数据
1261
+ */
1262
+ recordLayout(params: RecordLayoutMap): Promise<any>;
1263
+ }
1264
+
1265
+ export declare interface RecordingData {
1266
+ isPracticeSession?: boolean;
1267
+ recording: RecordingMap;
1268
+ liveTime?: number;
1269
+ status: Status_2;
1270
+ resultInfo: {
1271
+ bizCode?: string;
1272
+ };
1273
+ jetlag: number;
1274
+ }
1275
+
1276
+ export declare interface RecordingMap {
1277
+ status?: string;
1278
+ layout: {
1279
+ layout?: {
1280
+ type: string;
1281
+ name?: string;
1282
+ };
1283
+ mode?: string;
1284
+ };
1285
+ layoutOption: string;
1286
+ recordUsers?: RecordUsers[];
1287
+ requesting?: boolean;
1288
+ transcriptEnabled: boolean;
1289
+ watermarkEnabled: boolean;
1290
+ layoutID?: string;
1291
+ lastStartTime?: number;
1292
+ duration?: number;
1293
+ seq?: number;
1294
+ }
1295
+
1296
+ export declare interface RecordLayoutMap {
1297
+ layoutOption?: string;
1298
+ mode?: string;
1299
+ layout: {
1300
+ layout?: {
1301
+ type: string;
1302
+ };
1303
+ mode?: string;
1304
+ };
1305
+ layoutID?: string;
1306
+ }
1307
+
1308
+ export declare interface RecordUsers {
1309
+ subjectID: string;
1310
+ userID?: number;
1311
+ }
1312
+
1313
+ export declare function reset(ctx: Context): void;
1314
+
1315
+ /**
1316
+ * 请求响应体
1317
+ */
1318
+ declare interface Response_2 {
1319
+ /**
1320
+ * 业务码,成功900200
1321
+ */
1322
+ bizCode: number;
1323
+ /**
1324
+ * 数据
1325
+ */
1326
+ data?: any;
1327
+ /**
1328
+ * 错误信息
1329
+ */
1330
+ error?: {
1331
+ /**
1332
+ * 错误码
1333
+ */
1334
+ errorCode: number;
1335
+ /**
1336
+ * 信息
1337
+ */
1338
+ msg: string;
1339
+ };
1340
+ /**
1341
+ * 标识,-1失败,>-1成功
1342
+ */
1343
+ ret?: number;
1344
+ }
1345
+ export { Response_2 as Response }
1346
+
1347
+ /**
1348
+ * 退会/移出列表原因
1349
+ */
1350
+ export declare interface ResultInfo {
1351
+ /**
1352
+ * 业务码
1353
+ */
1354
+ bizCode?: number;
1355
+ /**
1356
+ * 原因码
1357
+ */
1358
+ reasonCode?: number;
1359
+ /**
1360
+ * 信息
1361
+ */
1362
+ message?: string;
1363
+ }
1364
+
1365
+ /**
1366
+ * 角色
1367
+ */
1368
+ export declare enum ROLE {
1369
+ /**
1370
+ * 主持人(组织者)
1371
+ */
1372
+ HOST = "host",
1373
+ /**
1374
+ * 联席主持人(会议中被设置为主持人的)
1375
+ */
1376
+ COHOST = "coHost",
1377
+ /**
1378
+ * 与会者
1379
+ */
1380
+ ATTENDEE = "attendee",
1381
+ /**
1382
+ * 观众
1383
+ */
1384
+ AUDIENCE = "audience"
1385
+ }
1386
+
1387
+ export declare interface SetMedia {
1388
+ cred: string;
1389
+ sendOn: boolean;
1390
+ operator?: {
1391
+ userID: number;
1392
+ };
1393
+ }
1394
+
1395
+ export declare class Setting extends Module<SettingData, Events_15> {
1396
+ constructor(ctx: Context);
1397
+ _topic(): string;
1398
+ _bindOn(): void;
1399
+ /**
1400
+ * 会议设置
1401
+ * @params 设置参数
1402
+ * @returns 返回的数据
1403
+ */
1404
+ setting(params: any): Promise<any>;
1405
+ /**
1406
+ * 全体静音
1407
+ * @params 设置参数
1408
+ * @returns 返回的数据
1409
+ */
1410
+ muteAll(): Promise<any>;
1411
+ /**
1412
+ * 全体解除静音
1413
+ * @params 设置参数
1414
+ * @returns 返回的数据
1415
+ */
1416
+ unmuteAll(): Promise<any>;
1417
+ }
1418
+
1419
+ export declare interface SettingData {
1420
+ meetingNum: string;
1421
+ meetingID: string;
1422
+ lock: boolean;
1423
+ allowRenameSelf: boolean;
1424
+ showAvatar: boolean;
1425
+ chatSetting: {
1426
+ attendeePermission: 'all' | 'public' | 'host' | 'disabled';
1427
+ audiencePermission: 'all' | 'public' | 'host' | 'disabled';
1428
+ };
1429
+ mediaSetting: {
1430
+ audio: {
1431
+ muteOnJoin: boolean;
1432
+ speakingMode: 'free' | 'handUp';
1433
+ allowUnmuteSelf: boolean;
1434
+ };
1435
+ video: {
1436
+ muteOnJoin: boolean;
1437
+ allowUnmuteSelf: boolean;
1438
+ };
1439
+ share: {
1440
+ annotationPermission: 'all' | 'sharerHost';
1441
+ sharePermission: 'allGrab' | 'hostGrab' | 'hostStart' | 'multi';
1442
+ watermark: boolean;
1443
+ };
1444
+ };
1445
+ lobbySetting: {
1446
+ autoAdmitted: number;
1447
+ enabled: boolean;
1448
+ };
1449
+ ivrSetting: {
1450
+ chime: 'off' | 'self' | 'all' | 'selfAndHost';
1451
+ };
1452
+ qaSetting: {
1453
+ allowAnonymousQuestion: boolean;
1454
+ audienceViewPermission: 'onlyTop' | 'onlyAnswered' | 'all';
1455
+ enabled: boolean;
1456
+ };
1457
+ voteSetting: {
1458
+ enabled: boolean;
1459
+ };
1460
+ siteNameSetting: {
1461
+ backgroundColor: number;
1462
+ customStyleOn: boolean;
1463
+ fontColor: number;
1464
+ fontSize: number;
1465
+ horizontalPosition: number;
1466
+ on: boolean;
1467
+ verticalPosition: number;
1468
+ };
1469
+ asrSetting: {
1470
+ allowViewTranscriptHistory: boolean;
1471
+ };
1472
+ seq?: number;
1473
+ }
1474
+
1475
+ export declare class SpotlightVideo extends Module<SpotlightVideoData, Events_5> {
1476
+ constructor(ctx: Context);
1477
+ _topic(): string;
1478
+ _bindOn(): void;
1479
+ /**
1480
+ * 设置焦点
1481
+ */
1482
+ spotlight(params: {
1483
+ userID: number;
1484
+ action: 'add' | 'remove' | 'replace' | 'removeAll';
1485
+ }): Promise<any>;
1486
+ }
1487
+
1488
+ export declare interface SpotlightVideoData {
1489
+ userIDs: number[];
1490
+ }
1491
+
1492
+ /**
1493
+ * 会议状态类型
1494
+ */
1495
+ export declare enum STATE {
1496
+ /**
1497
+ * 未入会或退会
1498
+ */
1499
+ CLOSE = 0,
1500
+ /**
1501
+ * 已入会
1502
+ */
1503
+ JOINED = 1,
1504
+ /**
1505
+ * 一切就绪
1506
+ */
1507
+ READY = 2
1508
+ }
1509
+
1510
+ declare interface Status {
1511
+ platform: string;
1512
+ status: string;
1513
+ }
1514
+
1515
+ declare type Status_2 = 'starting' | 'started' | 'stopped' | 'paused';
1516
+
1517
+ export declare interface SubscribeToUser {
1518
+ subjectID: string;
1519
+ userID?: number;
1520
+ }
1521
+
1522
+ export declare class Transcript extends Module<TranscriptData, Events_12> {
1523
+ constructor(ctx: Context);
1524
+ _topic(): string;
1525
+ _bindOn(): void;
1526
+ cleanup(): void;
1527
+ /**
1528
+ * 查询转写历史信息
1529
+ * @returns
1530
+ */
1531
+ historyMsg(params: {
1532
+ limit: number;
1533
+ }): Promise<any>;
1534
+ }
1535
+
1536
+ export declare type TranscriptData = object;
1537
+
1538
+ export declare interface Transcription {
1539
+ content: string;
1540
+ timestamp: number;
1541
+ sender: {
1542
+ userID: number;
1543
+ displayName: string;
1544
+ };
1545
+ sentenceID: string;
1546
+ }
1547
+
1548
+ export declare interface TranscriptPayload {
1549
+ body: Transcription;
1550
+ state: PollingPayloadState;
1551
+ }
1552
+
1553
+ /**
1554
+ * User 数据
1555
+ */
1556
+ export declare interface User {
1557
+ /**
1558
+ * 会控用户ID
1559
+ */
1560
+ userID: number;
1561
+ /**
1562
+ * 用户账号
1563
+ */
1564
+ account?: string;
1565
+ /**
1566
+ * 终端类型
1567
+ */
1568
+ endpointType?: ENDPOINT_TYPE;
1569
+ /**
1570
+ * 用户名
1571
+ */
1572
+ displayName: string;
1573
+ /**
1574
+ * 用户名拼音
1575
+ */
1576
+ displayNamePinyin: string;
1577
+ /**
1578
+ * 音频能力
1579
+ */
1580
+ audio?: UserMedia;
1581
+ /**
1582
+ * 视频能力 观众无此能力
1583
+ */
1584
+ video?: UserMedia;
1585
+ /**
1586
+ * 辅流能力 观众无此能力
1587
+ */
1588
+ share?: UserMedia;
1589
+ /**
1590
+ * 协作能力 观众无此能力
1591
+ */
1592
+ whiteboard?: UserMedia;
1593
+ /**
1594
+ * 个人能力集
1595
+ */
1596
+ caps?: number;
1597
+ /**
1598
+ * 临时分配的权限
1599
+ */
1600
+ perm?: number;
1601
+ /**
1602
+ * 所属组织
1603
+ */
1604
+ groupIDs?: Array<string>;
1605
+ /**
1606
+ * 是否举手
1607
+ */
1608
+ isHandUp?: boolean;
1609
+ /**
1610
+ * 是否在大厅
1611
+ */
1612
+ isInLobby?: boolean;
1613
+ /**
1614
+ * 入会时间,单位毫秒
1615
+ */
1616
+ joinTime?: number;
1617
+ /**
1618
+ * 角色
1619
+ */
1620
+ role?: ROLE;
1621
+ /**
1622
+ * 用户ID
1623
+ */
1624
+ subjectID?: string;
1625
+ /**
1626
+ * 举手时间
1627
+ */
1628
+ handUpTime?: number;
1629
+ /**
1630
+ * 变更原因
1631
+ */
1632
+ resultInfo?: ResultInfo;
1633
+ /**
1634
+ * 本地录制
1635
+ */
1636
+ localRecord?: {
1637
+ status: RECORD_STATUS;
1638
+ };
1639
+ }
1640
+
1641
+ /**
1642
+ * User 媒体状态
1643
+ */
1644
+ export declare interface UserMedia {
1645
+ /**
1646
+ * 设备的开启状态,true设备可用/false设备不可用
1647
+ */
1648
+ deviceOn?: boolean;
1649
+ /**
1650
+ * 暂不使用
1651
+ */
1652
+ recvOn?: boolean;
1653
+ /**
1654
+ * 媒体开关状态,比如:false禁言/true解禁言
1655
+ */
1656
+ sendOn?: boolean;
1657
+ /**
1658
+ * 操作者 1(other) 表示被别人操作;0(self) 或没有该字段 表示自己操作
1659
+ */
1660
+ opBy?: number;
1661
+ }
1662
+
1663
+ export declare class Users extends Module<UsersData, Events_4> {
1664
+ static setDisplayNamePinyinProp: (name: string) => string;
1665
+ constructor(ctx: Context);
1666
+ _topic(): string[] | "interactive";
1667
+ _bindOn(): void;
1668
+ cleanup(): void;
1669
+ /**
1670
+ * 更新 - 补充用户信息:
1671
+ * 名称拼音
1672
+ * @param updateUser
1673
+ * @param user
1674
+ */
1675
+ updateUserProps(updateUser: User, user: User): void;
1676
+ /**
1677
+ * 设置音频
1678
+ * @param userID
1679
+ * @param params
1680
+ * @returns
1681
+ */
1682
+ setAudio(userID: number, params: {
1683
+ sendOn: boolean;
1684
+ cred?: string;
1685
+ }): Promise<any>;
1686
+ /**
1687
+ * 设置视频
1688
+ * @param userID
1689
+ * @param params
1690
+ * @returns
1691
+ */
1692
+ setVideo(userID: number, params: {
1693
+ sendOn: boolean;
1694
+ cred?: string;
1695
+ }): Promise<any>;
1696
+ /**
1697
+ * 设置辅流
1698
+ * @param userID
1699
+ * @param params
1700
+ * @returns
1701
+ */
1702
+ setShare(userID: number, params: {
1703
+ sendOn: boolean;
1704
+ }): Promise<any>;
1705
+ /**
1706
+ * 设置互动协作白板
1707
+ * @param userID
1708
+ * @param params
1709
+ * @returns
1710
+ */
1711
+ setWhiteboard(userID: number, params: {
1712
+ sendOn: boolean;
1713
+ }): Promise<any>;
1714
+ /**
1715
+ * 举手
1716
+ * @param userID
1717
+ * @param params
1718
+ * @returns
1719
+ */
1720
+ handUp(userID: number, params: {
1721
+ handUp: boolean;
1722
+ }): Promise<any>;
1723
+ /**
1724
+ * 修改用户角色
1725
+ * @param userID
1726
+ * @param params
1727
+ * @returns
1728
+ */
1729
+ setRole(userID: number, params: {
1730
+ role: ROLE;
1731
+ }): Promise<any>;
1732
+ /**
1733
+ * 改名
1734
+ * @param userID
1735
+ * @param params
1736
+ * @returns
1737
+ */
1738
+ rename(userID: number, params: {
1739
+ displayName: string;
1740
+ }): Promise<any>;
1741
+ /**
1742
+ * 移除用户
1743
+ * @param userID
1744
+ * @returns
1745
+ */
1746
+ remove(userID: number): Promise<any>;
1747
+ /**
1748
+ * 举手处理
1749
+ * @param userID
1750
+ * @param params
1751
+ * @returns
1752
+ */
1753
+ replyHandUp(userID: number, params: {
1754
+ permit: boolean;
1755
+ }): Promise<any>;
1756
+ /**
1757
+ * 摄像头控制
1758
+ */
1759
+ fecc(userID: number, params: {
1760
+ action: string;
1761
+ actionPlayTimes: number;
1762
+ }): Promise<any>;
1763
+ /**
1764
+ * 会议大厅状态切换 允许入会或者设为等待
1765
+ * @param userID
1766
+ * @param params
1767
+ * @returns
1768
+ */
1769
+ lobbyState(userID: number, params: {
1770
+ isInLobby: boolean;
1771
+ }): Promise<any>;
1772
+ /**
1773
+ * 设置用户本地录播权限
1774
+ * @param userID
1775
+ * @param params
1776
+ * @returns
1777
+ */
1778
+ allowLocalRecord(userID: number, params: {
1779
+ allow: boolean;
1780
+ }): Promise<any>;
1781
+ /**
1782
+ * 设置互动协作白板
1783
+ * @param userID
1784
+ * @param params
1785
+ * @returns
1786
+ */
1787
+ whiteboard(userID: number, params: {
1788
+ sendOn: boolean;
1789
+ }): Promise<any>;
1790
+ /**
1791
+ * 通话统计
1792
+ * @param userID
1793
+ * @returns
1794
+ */
1795
+ callStats(userID: number): Promise<any>;
1796
+ /**
1797
+ * 上报通话统计
1798
+ * @param userID
1799
+ * @returns
1800
+ */
1801
+ callStatsReport(params: {
1802
+ /**
1803
+ * 用户ID
1804
+ */
1805
+ userID: number;
1806
+ stats: {
1807
+ audio: audioStats;
1808
+ video: videoStats;
1809
+ share: videoStats;
1810
+ };
1811
+ deviceInfo: string;
1812
+ protocol: string;
1813
+ }): Promise<any>;
1814
+ /**
1815
+ * 举手全部拒绝
1816
+ * @returns
1817
+ */
1818
+ replyAllHandUp(): Promise<any>;
1819
+ /**
1820
+ * 大厅全部准入
1821
+ * @returns
1822
+ */
1823
+ admitAll(): Promise<any>;
1824
+ /**
1825
+ * 大厅全部移除
1826
+ * @returns
1827
+ */
1828
+ refuseAll(): Promise<any>;
1829
+ }
1830
+
1831
+ /**
1832
+ * Users 数据
1833
+ */
1834
+ export declare interface UsersData {
1835
+ /**
1836
+ * 互动方(参会者)成员列表
1837
+ */
1838
+ interactiveUsers: User[];
1839
+ /**
1840
+ * 等候室成员列表
1841
+ */
1842
+ lobbyUsers: User[];
1843
+ /**
1844
+ * 广播方(观众)成员列表
1845
+ */
1846
+ broadcastUsers: User[];
1847
+ /**
1848
+ * 虚拟教室终端 - 仅前端会控使用
1849
+ */
1850
+ advCtrlUsers: User[];
1851
+ }
1852
+
1853
+ export declare interface videoStats {
1854
+ /**
1855
+ * bps 带宽
1856
+ */
1857
+ bandwidth: number;
1858
+ /**
1859
+ * ms 环回延时
1860
+ */
1861
+ rtt: number;
1862
+ /**
1863
+ * ms 抖动
1864
+ */
1865
+ jitter: number;
1866
+ /**
1867
+ * 分辨率宽
1868
+ */
1869
+ width: number;
1870
+ /**
1871
+ * 分辨率高
1872
+ */
1873
+ height: number;
1874
+ /**
1875
+ * 帧率
1876
+ */
1877
+ fr: number;
1878
+ /**
1879
+ * % 丢包率
1880
+ */
1881
+ lossrate: number;
1882
+ /**
1883
+ * 个 丢包数
1884
+ */
1885
+ packetlost: number;
1886
+ }
1887
+
1888
+ export declare class View extends Module<ViewData, Events_10> {
1889
+ constructor(ctx: Context);
1890
+ _topic(): string[];
1891
+ _bindOn(): void;
1892
+ updateLayout(payload: ViewPayload, type: string): void;
1893
+ /**
1894
+ * 更新个人自定义布局
1895
+ * @param payload
1896
+ */
1897
+ private updatePersonalLayouts;
1898
+ /**
1899
+ * 主持人布局设置
1900
+ * @params 设置参数
1901
+ * @returns 返回的数据
1902
+ */
1903
+ hostLayout(params: Layout): Promise<any>;
1904
+ /**
1905
+ * 与会者布局设置
1906
+ * @params 设置参数
1907
+ * @returns 返回的数据
1908
+ */
1909
+ attendeeLayout(params: Layout): Promise<any>;
1910
+ /**
1911
+ * 观众布局设置
1912
+ * @params 设置参数
1913
+ * @returns 返回的数据
1914
+ */
1915
+ audienceLayout(params: Layout): Promise<any>;
1916
+ /**
1917
+ * 设置个人布局
1918
+ * @param params
1919
+ * @returns
1920
+ */
1921
+ personalLayout(params: Layout & {
1922
+ subscriber: PersonalLayoutSubscriber;
1923
+ }): Promise<any>;
1924
+ /**
1925
+ * 取消个人布局
1926
+ * @param params
1927
+ * @returns
1928
+ */
1929
+ personalLayoutDelete(params: {
1930
+ subscriber: PersonalLayoutSubscriber;
1931
+ }): Promise<any>;
1932
+ /**
1933
+ * 设置虚拟教室布局
1934
+ * @params 设置参数
1935
+ * @returns 返回的数据
1936
+ */
1937
+ virtualClassLayout(params: {
1938
+ blackList: string[];
1939
+ count: number;
1940
+ layout: LayoutContent;
1941
+ }): Promise<any>;
1942
+ /**
1943
+ * 关闭虚拟教室布局
1944
+ * @params 设置参数
1945
+ * @returns 返回的数据
1946
+ */
1947
+ closeVirtualClass(): Promise<any>;
1948
+ /**
1949
+ * 获取虚拟课堂布局
1950
+ * @params 设置参数
1951
+ * @returns 返回的数据
1952
+ */
1953
+ getVirtualClassTemplate(params: {
1954
+ vmrId: string;
1955
+ type: number;
1956
+ }): Promise<any>;
1957
+ /**
1958
+ * 添加虚拟课堂布局
1959
+ * @params 设置参数
1960
+ * @returns 返回的数据
1961
+ */
1962
+ addVirtualClassTemplate(params: AddVirtualClassParams): Promise<any>;
1963
+ /**
1964
+ * 编辑虚拟课堂布局
1965
+ * @params 设置参数
1966
+ * @returns 返回的数据
1967
+ */
1968
+ editVirtualClassTemplate(params: EditVirtualClassParams): Promise<any>;
1969
+ /**
1970
+ * 会议模板列表
1971
+ * @params 设置参数
1972
+ * @returns 返回的数据
1973
+ */
1974
+ getTemplates(params: {
1975
+ vmrId: string;
1976
+ }): Promise<any>;
1977
+ /**
1978
+ * 会议模板编辑
1979
+ * @params 设置参数
1980
+ * @returns 返回的数据
1981
+ */
1982
+ editTemplate(params: {
1983
+ vmrId: string;
1984
+ name: string;
1985
+ id: string;
1986
+ content: string;
1987
+ }): Promise<any>;
1988
+ /**
1989
+ * 会议模板添加
1990
+ * @params 设置参数
1991
+ * @returns 返回的数据
1992
+ */
1993
+ addTemplate(params: {
1994
+ vmrId: string;
1995
+ name: string;
1996
+ content: string;
1997
+ }): Promise<any>;
1998
+ /**
1999
+ * 会议模板删除
2000
+ * @params 设置参数
2001
+ * @returns 返回的数据
2002
+ */
2003
+ deleteTemplate(params: {
2004
+ vmrId: string;
2005
+ id: string;
2006
+ }): Promise<any>;
2007
+ /**
2008
+ * 会议模板获取默认模板参数
2009
+ * @params 设置参数
2010
+ * @returns 返回的数据
2011
+ */
2012
+ getDefaultTemplates(params: {
2013
+ vmrId: string;
2014
+ partyId: string;
2015
+ }): Promise<any>;
2016
+ /**
2017
+ * 会议模板设置默认模板
2018
+ * @params 设置参数
2019
+ * @returns 返回的数据
2020
+ */
2021
+ changeDefaultTemplate(params: {
2022
+ vmrId: string;
2023
+ id: string;
2024
+ isDefault: boolean;
2025
+ perspective: number;
2026
+ }): Promise<any>;
2027
+ /**
2028
+ * 会议模板个人默认布局绑定
2029
+ * @params 设置参数
2030
+ * @returns 返回的数据
2031
+ */
2032
+ perspectiveBind(params: {
2033
+ vmrId: string;
2034
+ bindList: {
2035
+ templateId: string;
2036
+ subjectIds: string[];
2037
+ }[];
2038
+ }): Promise<any>;
2039
+ }
2040
+
2041
+ export declare interface ViewData {
2042
+ hostLayout: Layout;
2043
+ attendeeLayout: Layout;
2044
+ audienceLayout: Layout;
2045
+ personalLayouts: Record<number | string, PersonalLayout>;
2046
+ }
2047
+
2048
+ declare interface ViewPayload {
2049
+ body: any;
2050
+ state: PollingPayloadState;
2051
+ event: string;
2052
+ }
2053
+
2054
+ declare interface VirtualClassParams {
2055
+ enabled: boolean;
2056
+ targetIds: string[];
2057
+ blacklistIds: string[];
2058
+ content: string;
2059
+ }
2060
+
2061
+ export declare class Vote extends Module<VoteData, Events_7> {
2062
+ constructor(ctx: Context);
2063
+ _topic(): string | string[];
2064
+ _bindOn(): void;
2065
+ /**
2066
+ * 查询投票列表
2067
+ * @params 设置参数
2068
+ * @returns 返回的数据
2069
+ */
2070
+ getVotes(params: {
2071
+ planID: string;
2072
+ vmrID: string;
2073
+ tk?: string;
2074
+ }): Promise<any>;
2075
+ /**
2076
+ * 查询投票详情
2077
+ * @param params
2078
+ * @returns
2079
+ */
2080
+ getVote(params: VotePathParams & {
2081
+ role: string;
2082
+ state: string;
2083
+ }): Promise<any>;
2084
+ /**
2085
+ * 查询用户投票选项
2086
+ * @param params
2087
+ * @returns
2088
+ */
2089
+ getMeVote(params: VotePathParams): Promise<any>;
2090
+ /**
2091
+ * 投票状态操作
2092
+ * @param params
2093
+ * @returns
2094
+ */
2095
+ voteStatus(pathParams: VotePathParams, params: {
2096
+ action: string;
2097
+ displayName?: string;
2098
+ role?: string;
2099
+ isAnonymous?: boolean;
2100
+ allowAttendeeVote?: boolean;
2101
+ }): Promise<any>;
2102
+ /**
2103
+ * 提交投票
2104
+ * @param pathParams
2105
+ * @param params
2106
+ * @returns
2107
+ */
2108
+ voteSubmit(pathParams: VotePathParams, params: {
2109
+ submitData: {
2110
+ selectedQuestions: {
2111
+ selectedOptionIDs: string[];
2112
+ questionID: string;
2113
+ }[];
2114
+ };
2115
+ userData: {
2116
+ displayName: string;
2117
+ account: string;
2118
+ role: string;
2119
+ subjectID: string;
2120
+ };
2121
+ }): Promise<any>;
2122
+ /**
2123
+ * 投票创建
2124
+ * @param params
2125
+ * @returns
2126
+ */
2127
+ voteAdd(params: VoteParams): Promise<any>;
2128
+ /**
2129
+ * 投票编辑
2130
+ * @param params
2131
+ * @returns
2132
+ */
2133
+ voteEdit(params: VoteParams): Promise<any>;
2134
+ /**
2135
+ * 投票删除
2136
+ * @param params
2137
+ * @returns
2138
+ */
2139
+ voteDelete(params: {
2140
+ ids: string[];
2141
+ }): Promise<any>;
2142
+ /**
2143
+ * 查询进行中/分享中的投票
2144
+ * @returns
2145
+ */
2146
+ voteInProgress(params?: {
2147
+ tk?: string;
2148
+ }): Promise<any>;
2149
+ }
2150
+
2151
+ declare interface VoteBody {
2152
+ action: string;
2153
+ status: number;
2154
+ voteID: string;
2155
+ }
2156
+
2157
+ export declare interface VoteData {
2158
+ vote: Record<string, VoteBody>;
2159
+ }
2160
+
2161
+ export declare interface VoteInfo {
2162
+ allowAttendeeVote: boolean;
2163
+ createTime: number;
2164
+ endTime: number;
2165
+ isAnonymous: boolean;
2166
+ isSharing: boolean;
2167
+ name: string;
2168
+ startTime: number;
2169
+ status: number;
2170
+ totalVotedCount: number;
2171
+ type: number;
2172
+ version: number;
2173
+ voteID: string;
2174
+ questions: VoteQuestionInfo[];
2175
+ }
2176
+
2177
+ export declare interface VoteParams {
2178
+ name: string;
2179
+ sourceId: string;
2180
+ sourceType: number;
2181
+ questions: VoteQuestionParams[];
2182
+ }
2183
+
2184
+ declare interface VotePathParams {
2185
+ voteID: string;
2186
+ tk?: string;
2187
+ }
2188
+
2189
+ export declare interface VoteQuestionInfo {
2190
+ chooseAtLeast: number;
2191
+ chooseAtMost: number;
2192
+ index: number;
2193
+ questionID: string;
2194
+ required: boolean;
2195
+ text: string;
2196
+ type: number;
2197
+ options: VoteQuestionOptionInfo[];
2198
+ totalVotedCount: number;
2199
+ }
2200
+
2201
+ export declare type VoteQuestionOptionInfo = {
2202
+ index: number;
2203
+ optionID: string;
2204
+ text: string;
2205
+ votedCount: number;
2206
+ };
2207
+
2208
+ export declare interface VoteQuestionOptionParams {
2209
+ sort: number;
2210
+ type: number;
2211
+ description: string;
2212
+ id: string;
2213
+ }
2214
+
2215
+ export declare interface VoteQuestionParams {
2216
+ id: string;
2217
+ sort: number;
2218
+ showType: number;
2219
+ required: boolean;
2220
+ chooseAtLeast: number;
2221
+ chooseAtMost: number;
2222
+ description: string;
2223
+ type: number;
2224
+ options: VoteQuestionOptionParams[];
2225
+ }
2226
+
2227
+ export declare class Words extends Module<WordsData, Events_8> {
2228
+ constructor(ctx: Context);
2229
+ _topic(): string;
2230
+ _bindOn(): void;
2231
+ /**
2232
+ * 发送字幕
2233
+ * @params 设置参数
2234
+ * @returns 返回的数据
2235
+ */
2236
+ barrage(params: any): Promise<any>;
2237
+ /**
2238
+ * 删除字幕
2239
+ * @params 设置参数
2240
+ * @returns 返回的数据
2241
+ */
2242
+ deleteBarrage(): Promise<any>;
2243
+ }
2244
+
2245
+ export declare interface WordsData {
2246
+ wordsDisplayStatus: boolean;
2247
+ barrageRecord: BarrageRecord[];
2248
+ backgroundColor?: string;
2249
+ content?: string;
2250
+ contentType?: string;
2251
+ duration?: number;
2252
+ fontColor?: string;
2253
+ fontSize?: number;
2254
+ position?: string;
2255
+ receiver?: {
2256
+ host: boolean;
2257
+ attendee: boolean;
2258
+ audience: boolean;
2259
+ };
2260
+ type?: string;
2261
+ timer?: NodeJS.Timeout | null;
2262
+ }
2263
+
2264
+ /**
2265
+ * meeting实例
2266
+ */
2267
+ export declare interface YlinkSDKMeeting {
2268
+ /**
2269
+ * 全局配置
2270
+ */
2271
+ config: Pick<Context, 'config'>['config'];
2272
+ /**
2273
+ * 请求
2274
+ */
2275
+ request: Request_2;
2276
+ /**
2277
+ * 会议状态
2278
+ */
2279
+ state: STATE;
2280
+ /**
2281
+ * 全局事件监听
2282
+ */
2283
+ on: Emitter<Events>['on'];
2284
+ /**
2285
+ * 取消全局事件监听
2286
+ */
2287
+ off: Emitter<Events>['off'];
2288
+ /**
2289
+ * 加入会议
2290
+ */
2291
+ join: (params: JoinParams) => Promise<Response_2>;
2292
+ /**
2293
+ * 离开会议
2294
+ */
2295
+ leave: (params?: {
2296
+ resultInfo: ResultInfo;
2297
+ }) => Promise<Response_2>;
2298
+ /**
2299
+ * 结束会议
2300
+ */
2301
+ end: () => Promise<Response_2>;
2302
+ /**
2303
+ * 模块 - 自身相关
2304
+ */
2305
+ me?: Me;
2306
+ /**
2307
+ * 模块 - 会议信息
2308
+ */
2309
+ info?: Info;
2310
+ /**
2311
+ * 模块 - 参会成员
2312
+ */
2313
+ users?: Users;
2314
+ /**
2315
+ * 模块 - 焦点视频
2316
+ */
2317
+ spotlightVideo?: SpotlightVideo;
2318
+ /**
2319
+ * 模块 - 邀请
2320
+ */
2321
+ invite?: Invite;
2322
+ /**
2323
+ * 模块 - 投票
2324
+ */
2325
+ vote?: Vote;
2326
+ /**
2327
+ * 模块 - 文字消息
2328
+ */
2329
+ words?: Words;
2330
+ /**
2331
+ * 聊天
2332
+ */
2333
+ chat?: Chat;
2334
+ /**
2335
+ * 布局
2336
+ */
2337
+ view?: View;
2338
+ /**
2339
+ * 问答
2340
+ */
2341
+ qa?: Qa;
2342
+ /**
2343
+ * 语音转写
2344
+ */
2345
+ transcript?: Transcript;
2346
+ [props: string]: any;
2347
+ }
2348
+
2349
+ export { }