@tencentcloud/tuiroom-engine-js 2.4.2 → 2.5.2-beat.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +837 -38
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatSDK } from '@tencentcloud/chat';
|
|
2
2
|
export { default as TIM, default as TencentCloudChat } from '@tencentcloud/chat';
|
|
3
|
-
import { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-cloud-js-sdk';
|
|
3
|
+
import TRTCCloud, { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-cloud-js-sdk';
|
|
4
4
|
export { Rect, default as TRTCCloud, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo } from 'trtc-cloud-js-sdk';
|
|
5
5
|
|
|
6
6
|
declare enum TUIErrorCode {
|
|
@@ -27,11 +27,12 @@ declare enum TUIErrorCode {
|
|
|
27
27
|
ERR_OPERATION_INVALID_BEFORE_ENTER_ROOM = -2101,
|
|
28
28
|
ERR_EXIT_NOT_SUPPORTED_FOR_ROOM_OWNER = -2102,
|
|
29
29
|
ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_ROOM_TYPE = -2103,
|
|
30
|
-
ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_SPEECH_MODE = -2104,
|
|
31
30
|
ERR_ROOM_ID_INVALID = -2105,
|
|
32
31
|
ERR_ROOM_ID_OCCUPIED = -2106,
|
|
33
32
|
ERR_ROOM_NAME_INVALID = -2107,
|
|
34
33
|
ERR_ALREADY_IN_OTHER_ROOM = -2108,
|
|
34
|
+
ERR_NEED_PASSWORD = -2109,
|
|
35
|
+
ERR_WRONG_PASSWORD = -2110,
|
|
35
36
|
ERR_ROOM_USER_FULL = -2111,
|
|
36
37
|
ERR_USER_NOT_EXIST = -2200,
|
|
37
38
|
ERR_USER_NOT_ENTERED = -2201,
|
|
@@ -64,6 +65,7 @@ type TUIRoomInfo = {
|
|
|
64
65
|
roomType: TUIRoomType;
|
|
65
66
|
isSeatEnabled: boolean;
|
|
66
67
|
seatMode: TUISeatMode;
|
|
68
|
+
password: string;
|
|
67
69
|
isMicrophoneDisableForAllUser: boolean;
|
|
68
70
|
isScreenShareDisableForAllUser: boolean;
|
|
69
71
|
isCameraDisableForAllUser: boolean;
|
|
@@ -76,6 +78,9 @@ type TUIRoomInfo = {
|
|
|
76
78
|
createTime: number;
|
|
77
79
|
roomMemberCount: number;
|
|
78
80
|
};
|
|
81
|
+
type TUIEnterRoomOptions = {
|
|
82
|
+
password?: string;
|
|
83
|
+
};
|
|
79
84
|
type TUILoginUserInfo = {
|
|
80
85
|
userId: string;
|
|
81
86
|
userName: string;
|
|
@@ -171,11 +176,6 @@ declare enum TUIRoomType {
|
|
|
171
176
|
kConference = 1,
|
|
172
177
|
kLive = 2
|
|
173
178
|
}
|
|
174
|
-
declare enum TUISpeechMode {
|
|
175
|
-
kFreeToSpeak = 1,
|
|
176
|
-
kApplyToSpeak = 2,
|
|
177
|
-
kSpeakAfterTakingSeat = 3
|
|
178
|
-
}
|
|
179
179
|
declare enum TUISeatMode {
|
|
180
180
|
kFreeToTake = 1,
|
|
181
181
|
kApplyToTake = 2
|
|
@@ -231,6 +231,7 @@ declare enum TUIRoomDismissedReason {
|
|
|
231
231
|
type TUIUserInfo = {
|
|
232
232
|
userId: string;
|
|
233
233
|
userName: string;
|
|
234
|
+
nameCard: string;
|
|
234
235
|
avatarUrl: string;
|
|
235
236
|
userRole: TUIRole;
|
|
236
237
|
hasAudioStream: boolean;
|
|
@@ -243,6 +244,7 @@ type TUISeatInfo = {
|
|
|
243
244
|
index: number;
|
|
244
245
|
userId: string;
|
|
245
246
|
userName: string;
|
|
247
|
+
nameCard: string;
|
|
246
248
|
avatarUrl: string;
|
|
247
249
|
locked: boolean;
|
|
248
250
|
isVideoLocked: boolean;
|
|
@@ -254,6 +256,7 @@ type TUIRequest = {
|
|
|
254
256
|
requestId: string;
|
|
255
257
|
userId: string;
|
|
256
258
|
userName: string;
|
|
259
|
+
nameCard: string;
|
|
257
260
|
avatarUrl: string;
|
|
258
261
|
content: string;
|
|
259
262
|
};
|
|
@@ -289,6 +292,52 @@ type TUIDeviceInfo = {
|
|
|
289
292
|
}[];
|
|
290
293
|
};
|
|
291
294
|
};
|
|
295
|
+
declare enum TUIConferenceStatus {
|
|
296
|
+
kConferenceStatusNone = 0,
|
|
297
|
+
kConferenceStatusNotStarted = 1,
|
|
298
|
+
kConferenceStatusRunning = 2
|
|
299
|
+
}
|
|
300
|
+
declare enum TUIConferenceCancelReason {
|
|
301
|
+
kConferenceCancelReasonCancelledByAdmin = 0,
|
|
302
|
+
kConferenceCancelReasonRemovedFromAttendees = 1
|
|
303
|
+
}
|
|
304
|
+
type TUIConferenceInfo = {
|
|
305
|
+
scheduleStartTime: number;
|
|
306
|
+
scheduleEndTime: number;
|
|
307
|
+
scheduleAttendees: string[];
|
|
308
|
+
reminderSecondsBeforeStart: number;
|
|
309
|
+
status: TUIConferenceStatus;
|
|
310
|
+
basicRoomInfo: TUIRoomInfo;
|
|
311
|
+
};
|
|
312
|
+
type TUIConferenceModifyInfo = {
|
|
313
|
+
scheduleStartTime?: number;
|
|
314
|
+
scheduleEndTime?: number;
|
|
315
|
+
basicRoomInfo: {
|
|
316
|
+
roomId: string;
|
|
317
|
+
roomName?: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
declare enum TUIInvitationStatus {
|
|
321
|
+
kNone = 0,
|
|
322
|
+
kPending = 1,
|
|
323
|
+
kTimeout = 2,
|
|
324
|
+
kAccepted = 3,
|
|
325
|
+
kRejected = 4
|
|
326
|
+
}
|
|
327
|
+
declare enum TUIInvitationCode {
|
|
328
|
+
kSuccess = 0,
|
|
329
|
+
kAlreadyInInvitationList = 1,
|
|
330
|
+
kAlreadyInConference = 2
|
|
331
|
+
}
|
|
332
|
+
declare enum TUIInvitationRejectedReason {
|
|
333
|
+
kRejectToEnter = 0,
|
|
334
|
+
kInOtherConference = 1
|
|
335
|
+
}
|
|
336
|
+
type TUIInvitation = {
|
|
337
|
+
status: TUIInvitationStatus;
|
|
338
|
+
invitee: TUIUserInfo;
|
|
339
|
+
inviter: TUIUserInfo;
|
|
340
|
+
};
|
|
292
341
|
/**
|
|
293
342
|
* **TUIRoomEngine 事件列表**<br>
|
|
294
343
|
* @namespace TUIRoomEvents
|
|
@@ -379,20 +428,6 @@ declare enum TUIRoomEvents {
|
|
|
379
428
|
* });
|
|
380
429
|
*/
|
|
381
430
|
onRoomNameChanged = "onRoomNameChanged",
|
|
382
|
-
/**
|
|
383
|
-
* @description 房间模式修改事件
|
|
384
|
-
* @deprecated 该事件自 v2.0.0 版本废弃
|
|
385
|
-
* @default 'onRoomSpeechModeChanged'
|
|
386
|
-
* @event TUIRoomEvents#onRoomSpeechModeChanged
|
|
387
|
-
* @param {object} options
|
|
388
|
-
* @param {TUISpeechMode} options.speechMode 房间模式
|
|
389
|
-
* @example
|
|
390
|
-
* const roomEngine = new TUIRoomEngine();
|
|
391
|
-
* roomEngine.on(TUIRoomEvents.onRoomSpeechModeChanged, ({ roomId, speechMode }) =>{
|
|
392
|
-
* console.log('roomEngine.onRoomSpeechModeChanged', roomId, speechMode);
|
|
393
|
-
* });
|
|
394
|
-
*/
|
|
395
|
-
onRoomSpeechModeChanged = "onRoomSpeechModeChanged",
|
|
396
431
|
/**
|
|
397
432
|
* @description 上麦模式修改事件
|
|
398
433
|
* @default 'onRoomSeatModeChanged'
|
|
@@ -514,9 +549,24 @@ declare enum TUIRoomEvents {
|
|
|
514
549
|
* });
|
|
515
550
|
*/
|
|
516
551
|
onRemoteUserLeaveRoom = "onRemoteUserLeaveRoom",
|
|
552
|
+
/**
|
|
553
|
+
* @since v2.5.0
|
|
554
|
+
* @description 房间内用户信息改变事件
|
|
555
|
+
* @default 'onUserInfoChanged'
|
|
556
|
+
* @event TUIRoomEvents#onUserInfoChanged
|
|
557
|
+
* @param {object} options
|
|
558
|
+
* @param {TUIUserInfo} options.userInfo 用户信息
|
|
559
|
+
* @example
|
|
560
|
+
* const roomEngine = new TUIRoomEngine();
|
|
561
|
+
* roomEngine.on(TUIRoomEvents.onUserInfoChanged, ({ userInfo }) => {
|
|
562
|
+
* console.log('roomEngine.onUserInfoChanged', userInfo);
|
|
563
|
+
* });
|
|
564
|
+
*/
|
|
565
|
+
onUserInfoChanged = "onUserInfoChanged",
|
|
517
566
|
/**
|
|
518
567
|
* @description 用户角色改变事件
|
|
519
|
-
* @
|
|
568
|
+
* @deprecated 该接口自 v2.5.0 版本废弃,请使用'onUserInfoChanged'.
|
|
569
|
+
* @default 'onUserRoleChanged'
|
|
520
570
|
* @event TUIRoomEvents#onUserRoleChanged
|
|
521
571
|
* @param {object} options
|
|
522
572
|
* @param {string} options.userId 用户Id
|
|
@@ -780,6 +830,285 @@ declare enum TUIRoomDeviceMangerEvents {
|
|
|
780
830
|
* });
|
|
781
831
|
*/
|
|
782
832
|
onTestSpeakerVolume = "onTestSpeakerVolume"
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* @since v2.5.0
|
|
836
|
+
* **TUIConferenceListManager 事件列表**<br>
|
|
837
|
+
* @namespace TUIConferenceListManagerEvents
|
|
838
|
+
*/
|
|
839
|
+
declare enum TUIConferenceListManagerEvents {
|
|
840
|
+
/**
|
|
841
|
+
* @description 会议预定回调
|
|
842
|
+
* @default 'onConferenceScheduled'
|
|
843
|
+
* @event TUIConferenceListManagerEvents#onConferenceScheduled
|
|
844
|
+
* @param {object} options
|
|
845
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
846
|
+
*
|
|
847
|
+
* @example
|
|
848
|
+
* const roomEngine = new TUIRoomEngine();
|
|
849
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
850
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceScheduled, ({ conferenceInfo }) => {
|
|
851
|
+
* console.log('conferenceListManager.onConferenceScheduled', conferenceInfo);
|
|
852
|
+
* })
|
|
853
|
+
*/
|
|
854
|
+
onConferenceScheduled = "onConferenceScheduled",
|
|
855
|
+
/**
|
|
856
|
+
* @description 会议即将开始回调
|
|
857
|
+
* @default 'onConferenceWillStart'
|
|
858
|
+
* @event TUIConferenceListManagerEvents#onConferenceWillStart
|
|
859
|
+
* @param {object} options
|
|
860
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* const roomEngine = new TUIRoomEngine();
|
|
864
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
865
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceWillStart, ({ conferenceInfo }) => {
|
|
866
|
+
* console.log('conferenceListManager.onConferenceWillStart', conferenceInfo);
|
|
867
|
+
* })
|
|
868
|
+
*/
|
|
869
|
+
onConferenceWillStart = "onConferenceWillStart",
|
|
870
|
+
/**
|
|
871
|
+
* @description 会议取消回调
|
|
872
|
+
*
|
|
873
|
+
* @param {object} options
|
|
874
|
+
* @param {string} options.roomId 会议Id,即房间 roomId 。
|
|
875
|
+
* @param {TUIConferenceCancelReason} options.reason 会议取消原因。
|
|
876
|
+
* @param {TUIUserInfo} options.operateUser 取消会议操作者信息。
|
|
877
|
+
*
|
|
878
|
+
* @example
|
|
879
|
+
* const roomEngine = new TUIRoomEngine();
|
|
880
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
881
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceCancelled, ({ roomId, reason, operateUser }) => {
|
|
882
|
+
* console.log('conferenceListManager.onConferenceCancelled', roomId, reason, operateUser);
|
|
883
|
+
* })
|
|
884
|
+
*/
|
|
885
|
+
onConferenceCancelled = "onConferenceCancelled",
|
|
886
|
+
/**
|
|
887
|
+
* @description 会议信息变更回调
|
|
888
|
+
*
|
|
889
|
+
* @param {object} options
|
|
890
|
+
* @param {TUIConferenceModifyInfo} options.conferenceModifyInfo 会议信息。
|
|
891
|
+
*
|
|
892
|
+
* @example
|
|
893
|
+
* const roomEngine = new TUIRoomEngine();
|
|
894
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
895
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceInfoChanged, ({ conferenceModifyInfo }) => {
|
|
896
|
+
* console.log('conferenceListManager.onConferenceInfoChanged', conferenceModifyInfo);
|
|
897
|
+
* })
|
|
898
|
+
*/
|
|
899
|
+
onConferenceInfoChanged = "onConferenceInfoChanged",
|
|
900
|
+
/**
|
|
901
|
+
* @description 参会人员变更回调
|
|
902
|
+
*
|
|
903
|
+
* @param {object} options
|
|
904
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
905
|
+
* @param {Array<TUIUserInfo>} options.leftUsers 离开成员列表。
|
|
906
|
+
* @param {Array<TUIUserInfo>} options.joinedUsers 新加入成员列表。
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* const roomEngine = new TUIRoomEngine();
|
|
910
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
911
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onScheduleAttendeesChanged, ({ roomId, leftUsers, joinedUsers }) => {
|
|
912
|
+
* console.log('conferenceListManager.onScheduleAttendeesChanged', roomId, leftUsers, joinedUsers);
|
|
913
|
+
* })
|
|
914
|
+
*/
|
|
915
|
+
onScheduleAttendeesChanged = "onScheduleAttendeesChanged",
|
|
916
|
+
/**
|
|
917
|
+
* @description 会议状态变更回调
|
|
918
|
+
*
|
|
919
|
+
* @param {object} options
|
|
920
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
921
|
+
* @param {TUIConferenceStatus} options.status 会议状态。
|
|
922
|
+
*
|
|
923
|
+
* @example
|
|
924
|
+
* const roomEngine = new TUIRoomEngine();
|
|
925
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
926
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceStatusChanged, ({ roomId, status }) => {
|
|
927
|
+
* console.log('conferenceListManager.onConferenceStatusChanged', roomId, status );
|
|
928
|
+
* })
|
|
929
|
+
*/
|
|
930
|
+
onConferenceStatusChanged = "onConferenceStatusChanged"
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* @since v2.6.0
|
|
934
|
+
* **TUIConferenceInvitationManager 事件列表**<br>
|
|
935
|
+
* @namespace TUIConferenceInvitationManagerEvents
|
|
936
|
+
*/
|
|
937
|
+
declare enum TUIConferenceInvitationManagerEvents {
|
|
938
|
+
/**
|
|
939
|
+
* @description 收到会中邀请回调
|
|
940
|
+
* @default 'onReceiveInvitation'
|
|
941
|
+
* @event TUIConferenceInvitationManagerEvents#onReceiveInvitation
|
|
942
|
+
* @param {object} options
|
|
943
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
944
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
945
|
+
* @param {string} options.extensionInfo 自定义扩展信息
|
|
946
|
+
*
|
|
947
|
+
*
|
|
948
|
+
* @example
|
|
949
|
+
* const roomEngine = new TUIRoomEngine();
|
|
950
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
951
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onReceiveInvitation, ({ roomInfo, invitation, extensionInfo }) => {
|
|
952
|
+
* console.log('conferenceInvitationManager.onReceiveInvitation', roomInfo, invitation, extensionInfo);
|
|
953
|
+
* })
|
|
954
|
+
*/
|
|
955
|
+
onReceiveInvitation = "onReceiveInvitation",
|
|
956
|
+
/**
|
|
957
|
+
* @description 邀请在其他设备处理的回调
|
|
958
|
+
* @default 'onInvitationHandledByOtherDevice'
|
|
959
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationHandledByOtherDevice
|
|
960
|
+
* @param {object} options
|
|
961
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
962
|
+
* @param {boolean} options.accepted 接受状态。
|
|
963
|
+
*
|
|
964
|
+
*
|
|
965
|
+
* @example
|
|
966
|
+
* const roomEngine = new TUIRoomEngine();
|
|
967
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
968
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationHandledByOtherDevice, ({ roomInfo, accepted }) => {
|
|
969
|
+
* console.log('conferenceInvitationManager.onInvitationHandledByOtherDevice', roomInfo, accepted);
|
|
970
|
+
* })
|
|
971
|
+
*/
|
|
972
|
+
onInvitationHandledByOtherDevice = "onInvitationHandledByOtherDevice",
|
|
973
|
+
/**
|
|
974
|
+
* @description 会中邀请取消的回调
|
|
975
|
+
* @default 'onInvitationCancelled'
|
|
976
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationCancelled
|
|
977
|
+
* @param {object} options
|
|
978
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
979
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
980
|
+
*
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
* const roomEngine = new TUIRoomEngine();
|
|
984
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
985
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationCancelled, ({ roomInfo, invitation }) => {
|
|
986
|
+
* console.log('conferenceInvitationManager.onInvitationCancelled', roomInfo, invitation);
|
|
987
|
+
* })
|
|
988
|
+
*/
|
|
989
|
+
onInvitationCancelled = "onInvitationCancelled",
|
|
990
|
+
/**
|
|
991
|
+
* @description 会中邀请接受的回调
|
|
992
|
+
* @default 'onInvitationAccepted'
|
|
993
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationAccepted
|
|
994
|
+
* @param {object} options
|
|
995
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
996
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
997
|
+
*
|
|
998
|
+
*
|
|
999
|
+
* @example
|
|
1000
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1001
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1002
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAccepted, ({ roomInfo, invitation }) => {
|
|
1003
|
+
* console.log('conferenceInvitationManager.onInvitationAccepted', roomInfo, invitation);
|
|
1004
|
+
* })
|
|
1005
|
+
*/
|
|
1006
|
+
onInvitationAccepted = "onInvitationAccepted",
|
|
1007
|
+
/**
|
|
1008
|
+
* @description 会中邀请拒绝的回调
|
|
1009
|
+
* @default 'onInvitationRejected'
|
|
1010
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRejected
|
|
1011
|
+
* @param {object} options
|
|
1012
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1013
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1014
|
+
* @param {TUIInvitationRejectedReason} options.reason 拒绝加入会议的原因。
|
|
1015
|
+
*
|
|
1016
|
+
*
|
|
1017
|
+
*
|
|
1018
|
+
* @example
|
|
1019
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1020
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1021
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRejected, ({ roomInfo, invitation, reason }) => {
|
|
1022
|
+
* console.log('conferenceInvitationManager.onInvitationRejected', roomInfo, invitation, reason);
|
|
1023
|
+
* })
|
|
1024
|
+
*/
|
|
1025
|
+
onInvitationRejected = "onInvitationRejected",
|
|
1026
|
+
/**
|
|
1027
|
+
* @description 会中邀请超时的回调
|
|
1028
|
+
* @default 'onInvitationTimeout'
|
|
1029
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationTimeout
|
|
1030
|
+
* @param {object} options
|
|
1031
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1032
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1033
|
+
*
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1037
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1038
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationTimeout, ({ roomInfo, invitation }) => {
|
|
1039
|
+
* console.log('conferenceInvitationManager.onInvitationTimeout', roomInfo, invitation);
|
|
1040
|
+
* })
|
|
1041
|
+
*/
|
|
1042
|
+
onInvitationTimeout = "onInvitationTimeout",
|
|
1043
|
+
/**
|
|
1044
|
+
* @description 会中邀请被管理员撤回的回调
|
|
1045
|
+
* @default 'onInvitationRevokedByAdmin'
|
|
1046
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRevokedByAdmin
|
|
1047
|
+
* @param {object} options
|
|
1048
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1049
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1050
|
+
* @param {TUIUserInfo} options.operateUser 撤回邀请的人的信息
|
|
1051
|
+
*
|
|
1052
|
+
*
|
|
1053
|
+
* @example
|
|
1054
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1055
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1056
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRevokedByAdmin, ({ roomInfo, invitation, userRole }) => {
|
|
1057
|
+
* console.log('conferenceInvitationManager.onInvitationRevokedByAdmin', roomInfo, invitation, operateUser);
|
|
1058
|
+
* })
|
|
1059
|
+
*/
|
|
1060
|
+
onInvitationRevokedByAdmin = "onInvitationRevokedByAdmin",
|
|
1061
|
+
/**
|
|
1062
|
+
* @description 新添加会中邀请的回调
|
|
1063
|
+
* @default 'onInvitationAdded'
|
|
1064
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationAdded
|
|
1065
|
+
* @param {object} options
|
|
1066
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1067
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1068
|
+
*
|
|
1069
|
+
*
|
|
1070
|
+
* @example
|
|
1071
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1072
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1073
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAdded, ({ roomInfo, invitation }) => {
|
|
1074
|
+
* console.log('conferenceInvitationManager.onInvitationAdded', roomInfo, invitation);
|
|
1075
|
+
* })
|
|
1076
|
+
*/
|
|
1077
|
+
onInvitationAdded = "onInvitationAdded",
|
|
1078
|
+
/**
|
|
1079
|
+
* @description 会中邀请被移除的回调
|
|
1080
|
+
* @default 'onInvitationRemoved'
|
|
1081
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRemoved
|
|
1082
|
+
* @param {object} options
|
|
1083
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1084
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1085
|
+
*
|
|
1086
|
+
*
|
|
1087
|
+
* @example
|
|
1088
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1089
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1090
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRemoved, ({ roomInfo, invitation }) => {
|
|
1091
|
+
* console.log('conferenceInvitationManager.onInvitationRemoved', roomInfo, invitation);
|
|
1092
|
+
* })
|
|
1093
|
+
*/
|
|
1094
|
+
onInvitationRemoved = "onInvitationRemoved",
|
|
1095
|
+
/**
|
|
1096
|
+
* @description 会中邀请状态变更的回调
|
|
1097
|
+
* @default 'onInvitationStatusChanged'
|
|
1098
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationStatusChanged
|
|
1099
|
+
* @param {object} options
|
|
1100
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1101
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1102
|
+
*
|
|
1103
|
+
*
|
|
1104
|
+
* @example
|
|
1105
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1106
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1107
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationStatusChanged, ({ roomInfo, invitation }) => {
|
|
1108
|
+
* console.log('conferenceInvitationManager.onInvitationStatusChanged', roomInfo, invitation);
|
|
1109
|
+
* })
|
|
1110
|
+
*/
|
|
1111
|
+
onInvitationStatusChanged = "onInvitationStatusChanged"
|
|
783
1112
|
}
|
|
784
1113
|
|
|
785
1114
|
declare class Logger {
|
|
@@ -811,9 +1140,11 @@ declare class TUIRoomDeviceManager {
|
|
|
811
1140
|
private deviceManagerWASM;
|
|
812
1141
|
private logger;
|
|
813
1142
|
private static deviceManager;
|
|
1143
|
+
private trtcCloud;
|
|
814
1144
|
constructor(options: {
|
|
815
1145
|
Module: any;
|
|
816
1146
|
logger: Logger;
|
|
1147
|
+
trtcCloud: TRTCCloud;
|
|
817
1148
|
});
|
|
818
1149
|
setDeviceManagerWASM(deviceManagerWASM: any): void;
|
|
819
1150
|
/**
|
|
@@ -960,6 +1291,409 @@ declare class TUIRoomDeviceManager {
|
|
|
960
1291
|
off(event: string, func: (...args: any[]) => void): void;
|
|
961
1292
|
}
|
|
962
1293
|
|
|
1294
|
+
/**
|
|
1295
|
+
* 会议列表
|
|
1296
|
+
* @class conferenceListManager
|
|
1297
|
+
*/
|
|
1298
|
+
declare class TUIConferenceListManager {
|
|
1299
|
+
private static readonly ROOM_NAME;
|
|
1300
|
+
private static readonly SCHEDULED_START_TIME;
|
|
1301
|
+
private static readonly SCHEDULED_END_TIME;
|
|
1302
|
+
private conferenceListManagerWASM;
|
|
1303
|
+
private logger;
|
|
1304
|
+
private static conferenceListManager;
|
|
1305
|
+
constructor(options: {
|
|
1306
|
+
Module: any;
|
|
1307
|
+
logger: Logger;
|
|
1308
|
+
roomEngineWASM: any;
|
|
1309
|
+
});
|
|
1310
|
+
/**
|
|
1311
|
+
* @private
|
|
1312
|
+
* 调用 TUIRoomEngineWASM 的异步方法
|
|
1313
|
+
* @param funcName
|
|
1314
|
+
* @param args
|
|
1315
|
+
*/
|
|
1316
|
+
private JSCallNativeFunctionPromise;
|
|
1317
|
+
/**
|
|
1318
|
+
* 预定会议
|
|
1319
|
+
* @param {object} options
|
|
1320
|
+
* @param {string} options.roomId 房间 Id,必填, roomId 限制长度为64字节,且仅支持以下范围的字符集:<br>
|
|
1321
|
+
* - 大小写英文字母(a-zA-Z)
|
|
1322
|
+
* - 数字(0-9)
|
|
1323
|
+
* - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
|
|
1324
|
+
* @param {number} [options.scheduleStartTime] 预定会议开始时间(计数单位为秒的时间戳)
|
|
1325
|
+
* @param {number} [options.scheduleEndTime] 预定会议结束时间(计数单位为秒的时间戳)
|
|
1326
|
+
* @param {array=} [options.scheduleAttendees=[]] 预定会议邀请成员 userId 列表
|
|
1327
|
+
* @param {number=} [options.reminderSecondsBeforeStart=0] 会议开始前提醒时间,单位秒
|
|
1328
|
+
* @param {string=} [options.roomName=roomId] 房间名称,默认值为 roomId,传入的值不能为空字符串
|
|
1329
|
+
* @param {TUIRoomType=} [options.roomType=TUIRoomType.kConference] 房间类型, 默认值为 TUIRoomType.kConference <br>
|
|
1330
|
+
* 办公协同、医疗问诊、远程会议、教育场景,roomType 设置为 TUIRoomType.kConference
|
|
1331
|
+
* 电商直播、语聊房场景,roomType 设置为 TUIRoomType.kLive
|
|
1332
|
+
* @param {boolean=} [options.isSeatEnabled=false] 是否开启麦位控制,默认值为 false
|
|
1333
|
+
* @param {TUISeatMode=} [options.seatMode=TUISeatMode.kFreeToTake] 上麦模式(开启麦位控制后生效),默认值为 TUISeatMode.kFreeToTake <br>
|
|
1334
|
+
* 自由上麦模式,台下观众可以自由上麦,无需申请,seatMode 设置为 TUISeatMode.kFreeToTake
|
|
1335
|
+
* 申请上麦模式,台下观众上麦需要房主或者管理员同意后才能上麦,seatMode 设置为 TUISeatMode.kApplyToTake
|
|
1336
|
+
* @param {boolean=} [options.isMicrophoneDisableForAllUser=false] 是否开启全员禁麦,默认不开启全员禁麦(创建房间可选参数)
|
|
1337
|
+
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1338
|
+
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1339
|
+
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1340
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1341
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持)
|
|
1342
|
+
* @returns {Promise<void>}
|
|
1343
|
+
*
|
|
1344
|
+
* @example
|
|
1345
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1346
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1347
|
+
* await conferenceListManager.scheduleConference({
|
|
1348
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1349
|
+
* scheduleStartTime: 1720004257, // 填入您的会议预定开始时间的时间戳,单位秒。
|
|
1350
|
+
* scheduleEndTime: 1720001317, // 填入您的会议预定结束时间的时间戳,单位秒。
|
|
1351
|
+
* });
|
|
1352
|
+
*/
|
|
1353
|
+
scheduleConference(options: {
|
|
1354
|
+
scheduleStartTime: number;
|
|
1355
|
+
scheduleEndTime: number;
|
|
1356
|
+
scheduleAttendees?: string[];
|
|
1357
|
+
reminderSecondsBeforeStart?: number;
|
|
1358
|
+
roomId: string;
|
|
1359
|
+
roomName?: string;
|
|
1360
|
+
roomType?: TUIRoomType;
|
|
1361
|
+
isSeatEnabled?: boolean;
|
|
1362
|
+
seatMode?: TUISeatMode;
|
|
1363
|
+
isMicrophoneDisableForAllUser?: boolean;
|
|
1364
|
+
isScreenShareDisableForAllUser?: boolean;
|
|
1365
|
+
isCameraDisableForAllUser?: boolean;
|
|
1366
|
+
isMessageDisableForAllUser?: boolean;
|
|
1367
|
+
maxSeatCount?: number;
|
|
1368
|
+
password?: string;
|
|
1369
|
+
}): Promise<void>;
|
|
1370
|
+
/**
|
|
1371
|
+
* 取消预定会议
|
|
1372
|
+
*
|
|
1373
|
+
* @param {object} options
|
|
1374
|
+
* @param {string} options.roomId 要取消会议Id,即房间roomId。
|
|
1375
|
+
* @returns {Promise<void>}
|
|
1376
|
+
*
|
|
1377
|
+
* @example
|
|
1378
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1379
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1380
|
+
* await conferenceListManager.cancelConference({
|
|
1381
|
+
* roomId: '12345', // 填入您要取消的会议 Id ,即房间 roomId 。
|
|
1382
|
+
* });
|
|
1383
|
+
*/
|
|
1384
|
+
cancelConference(options: {
|
|
1385
|
+
roomId: string;
|
|
1386
|
+
}): Promise<void>;
|
|
1387
|
+
/**
|
|
1388
|
+
* 更新预定会议信息
|
|
1389
|
+
*
|
|
1390
|
+
* @param {object} options
|
|
1391
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1392
|
+
* @param {string} options.roomName 会议的名称。
|
|
1393
|
+
* @param {string} options.scheduleStartTime 预定会议的开始时间(计数单位为秒的时间戳)。
|
|
1394
|
+
* @param {string} options.scheduleEndTime 预定会议的结束时间(计数单位为秒的时间戳)。
|
|
1395
|
+
* @returns {Promise<void>}
|
|
1396
|
+
*
|
|
1397
|
+
* @example
|
|
1398
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1399
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1400
|
+
* await conferenceListManager.updateConferenceInfo({
|
|
1401
|
+
* roomId: '12345', // 填入您要更新的会议房间 roomId 。
|
|
1402
|
+
* roomName: 'myRoomName', // 填入您更新后的会议名称。
|
|
1403
|
+
* scheduleStartTime: 1720004257, // 填入您更新后的会议预定开始时间的时间戳,单位秒。
|
|
1404
|
+
* scheduleEndTime: 1720001317, // 填入您更新后的会议预定结束时间的时间戳,单位秒。
|
|
1405
|
+
* });
|
|
1406
|
+
*/
|
|
1407
|
+
updateConferenceInfo(options: {
|
|
1408
|
+
roomId: string;
|
|
1409
|
+
roomName?: string;
|
|
1410
|
+
scheduleStartTime?: number;
|
|
1411
|
+
scheduleEndTime?: number;
|
|
1412
|
+
}): Promise<void>;
|
|
1413
|
+
/**
|
|
1414
|
+
* 获取预定会议列表
|
|
1415
|
+
*
|
|
1416
|
+
* @param {object} options
|
|
1417
|
+
* @param {object} options.statusArray 会议状态数组,默认值为拉取全部状态会议。
|
|
1418
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 '',回调成功 如果callback返回的数据中 cursor 不为 '',表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的cursor为 '',表示数据已经全部拉取。
|
|
1419
|
+
* @param {string} options.count 本次拉取数量。
|
|
1420
|
+
*
|
|
1421
|
+
* @example
|
|
1422
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1423
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1424
|
+
* const conferenceList = [];
|
|
1425
|
+
* let result;
|
|
1426
|
+
* let cursor = '';
|
|
1427
|
+
* let count = 20;
|
|
1428
|
+
* do {
|
|
1429
|
+
* result = await conferenceListManager.fetchScheduledConferenceList({ cursor, count });
|
|
1430
|
+
* conferenceList.push(...result.conferenceList);
|
|
1431
|
+
* cursor = result.cursor;
|
|
1432
|
+
* } while (cursor !== '')
|
|
1433
|
+
*/
|
|
1434
|
+
fetchScheduledConferenceList(options: {
|
|
1435
|
+
statusArray?: TUIConferenceStatus[];
|
|
1436
|
+
cursor: string;
|
|
1437
|
+
count: number;
|
|
1438
|
+
}): Promise<Array<TUIConferenceInfo>>;
|
|
1439
|
+
/**
|
|
1440
|
+
* 获取预定会议邀请成员列表
|
|
1441
|
+
*
|
|
1442
|
+
* @param {object} options
|
|
1443
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1444
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1445
|
+
* @param {string} options.count 本次拉取数量。
|
|
1446
|
+
*
|
|
1447
|
+
* @example
|
|
1448
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1449
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1450
|
+
* const attendeeList = [];
|
|
1451
|
+
* let result;
|
|
1452
|
+
* let cursor = '';
|
|
1453
|
+
* let totalCount = 0;
|
|
1454
|
+
* let roomId = '12345';
|
|
1455
|
+
* let count = 20;
|
|
1456
|
+
* do {
|
|
1457
|
+
* result = await conferenceListManager.fetchAttendeeList({ roomId, cursor, count });
|
|
1458
|
+
* attendeeList.push(...result.attendeeList);
|
|
1459
|
+
* cursor = result.cursor;
|
|
1460
|
+
* totalCount = result.totalCount;
|
|
1461
|
+
* } while (cursor !== '')
|
|
1462
|
+
*/
|
|
1463
|
+
fetchAttendeeList(options: {
|
|
1464
|
+
roomId: string;
|
|
1465
|
+
cursor: string;
|
|
1466
|
+
count: number;
|
|
1467
|
+
}): Promise<Array<TUIUserInfo>>;
|
|
1468
|
+
/**
|
|
1469
|
+
* 添加成员至邀请列表
|
|
1470
|
+
*
|
|
1471
|
+
* @param {object} options
|
|
1472
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1473
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1474
|
+
* @returns {Promise<void>}
|
|
1475
|
+
*
|
|
1476
|
+
* @example
|
|
1477
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1478
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1479
|
+
* await conferenceListManager.addAttendeesByAdmin({
|
|
1480
|
+
* roomId: '12345', // 填入您要添加成员的会议 Id ,即房间 roomId 。
|
|
1481
|
+
* userIdList: ['123'], // 填入您要邀请的成员 Id 数组。
|
|
1482
|
+
* });
|
|
1483
|
+
*/
|
|
1484
|
+
addAttendeesByAdmin(options: {
|
|
1485
|
+
roomId: string;
|
|
1486
|
+
userIdList: string[];
|
|
1487
|
+
}): Promise<void>;
|
|
1488
|
+
/**
|
|
1489
|
+
* 从邀请列表移除成员
|
|
1490
|
+
*
|
|
1491
|
+
* @param {object} options
|
|
1492
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1493
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1494
|
+
* @returns {Promise<void>}
|
|
1495
|
+
*
|
|
1496
|
+
* @example
|
|
1497
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1498
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1499
|
+
* await conferenceListManager.removeAttendeesByAdmin({
|
|
1500
|
+
* roomId: '12345', // 填入您要移除成员的会议 Id ,即房间 roomId 。
|
|
1501
|
+
* userIdList: ['123'], // 填入您要移除的成员 Id 数组。
|
|
1502
|
+
* });
|
|
1503
|
+
*/
|
|
1504
|
+
removeAttendeesByAdmin(options: {
|
|
1505
|
+
roomId: string;
|
|
1506
|
+
userIdList: string[];
|
|
1507
|
+
}): Promise<void>;
|
|
1508
|
+
/**
|
|
1509
|
+
* 监听 conferenceListManager 的事件
|
|
1510
|
+
* @param event TUIConferenceListManagerEvents
|
|
1511
|
+
* @param func function
|
|
1512
|
+
* @returns {void}
|
|
1513
|
+
*
|
|
1514
|
+
* @example
|
|
1515
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1516
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1517
|
+
* conferenceListManager.on(event, func);
|
|
1518
|
+
*/
|
|
1519
|
+
on(event: TUIConferenceListManagerEvents, func: (...args: any[]) => void): void;
|
|
1520
|
+
private observerFunction;
|
|
1521
|
+
private handleConferenceChangedEvent;
|
|
1522
|
+
/**
|
|
1523
|
+
* 取消监听 ConferenceListManager 的事件
|
|
1524
|
+
* @param event TUIConferenceListManagerEvents
|
|
1525
|
+
* @param func function
|
|
1526
|
+
* @returns {void}
|
|
1527
|
+
*
|
|
1528
|
+
* @example
|
|
1529
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1530
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1531
|
+
* conferenceListManager.off(event, func);
|
|
1532
|
+
*/
|
|
1533
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* 会中呼叫
|
|
1538
|
+
* @class conferenceInvitationManager
|
|
1539
|
+
*/
|
|
1540
|
+
declare class TUIConferenceInvitationManager {
|
|
1541
|
+
private conferenceInvitationManagerWASM;
|
|
1542
|
+
private logger;
|
|
1543
|
+
private static conferenceInvitationManager;
|
|
1544
|
+
constructor(options: {
|
|
1545
|
+
Module: any;
|
|
1546
|
+
logger: Logger;
|
|
1547
|
+
roomEngineWASM: any;
|
|
1548
|
+
});
|
|
1549
|
+
/**
|
|
1550
|
+
* @private
|
|
1551
|
+
* 调用 TUIRoomEngineWASM 的异步方法
|
|
1552
|
+
* @param funcName
|
|
1553
|
+
* @param args
|
|
1554
|
+
*/
|
|
1555
|
+
private JSCallNativeFunctionPromise;
|
|
1556
|
+
/**
|
|
1557
|
+
* 会中呼叫
|
|
1558
|
+
* @param {object} options
|
|
1559
|
+
* @param {string} options.roomId 房间 Id,必填, roomId 限制长度为64字节,且仅支持以下范围的字符集:<br>
|
|
1560
|
+
* - 大小写英文字母(a-zA-Z)
|
|
1561
|
+
* - 数字(0-9)
|
|
1562
|
+
* - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
|
|
1563
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1564
|
+
* @param {number} options.timeout 超时时间。若 timeout 设置为 0s ,则无超时时间
|
|
1565
|
+
* @param {string} options.extensionInfo 自定义扩展信息
|
|
1566
|
+
* @returns {Promise<void>}
|
|
1567
|
+
*
|
|
1568
|
+
* @example
|
|
1569
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1570
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1571
|
+
* await conferenceInvitationManager.inviteUsers({
|
|
1572
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1573
|
+
* userIdList: ['123'], // 填入您要呼叫的成员 Id 数组。
|
|
1574
|
+
* timeout: 0,
|
|
1575
|
+
* })
|
|
1576
|
+
*/
|
|
1577
|
+
inviteUsers(options: {
|
|
1578
|
+
roomId: string;
|
|
1579
|
+
userIdList: string[];
|
|
1580
|
+
timeout: number;
|
|
1581
|
+
extensionInfo?: string;
|
|
1582
|
+
}): Promise<void>;
|
|
1583
|
+
/**
|
|
1584
|
+
* 取消呼叫
|
|
1585
|
+
*
|
|
1586
|
+
* @param {object} options
|
|
1587
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1588
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1589
|
+
* @returns {Promise<void>}
|
|
1590
|
+
*
|
|
1591
|
+
* @example
|
|
1592
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1593
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1594
|
+
* await conferenceInvitationManager.cancelInvitation({
|
|
1595
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1596
|
+
* userIdList: ['123'], // 填入您要取消呼叫的成员 Id 数组。
|
|
1597
|
+
* })
|
|
1598
|
+
*/
|
|
1599
|
+
cancelInvitation(options: {
|
|
1600
|
+
roomId: string;
|
|
1601
|
+
userIdList: string[];
|
|
1602
|
+
}): Promise<void>;
|
|
1603
|
+
/**
|
|
1604
|
+
* 接受呼叫
|
|
1605
|
+
*
|
|
1606
|
+
* @param {object} options
|
|
1607
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1608
|
+
* @returns {Promise<void>}
|
|
1609
|
+
*
|
|
1610
|
+
* @example
|
|
1611
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1612
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1613
|
+
* await conferenceInvitationManager.accept({
|
|
1614
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1615
|
+
* })
|
|
1616
|
+
*/
|
|
1617
|
+
accept(options: {
|
|
1618
|
+
roomId: string;
|
|
1619
|
+
}): Promise<void>;
|
|
1620
|
+
/**
|
|
1621
|
+
* 拒绝呼叫
|
|
1622
|
+
*
|
|
1623
|
+
* @param {object} options
|
|
1624
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1625
|
+
* @param {TUIInvitationRejectedReason}options.reason 拒绝邀请的原因
|
|
1626
|
+
* @returns {Promise<void>}
|
|
1627
|
+
*
|
|
1628
|
+
* @example
|
|
1629
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1630
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1631
|
+
* await conferenceInvitationManager.reject({
|
|
1632
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1633
|
+
* reason: TUIInvitationRejectedReason.kRejectToEnter, // 主动拒绝进入会议
|
|
1634
|
+
* })
|
|
1635
|
+
*/
|
|
1636
|
+
reject(options: {
|
|
1637
|
+
roomId: string;
|
|
1638
|
+
reason: TUIInvitationRejectedReason;
|
|
1639
|
+
}): Promise<void>;
|
|
1640
|
+
/**
|
|
1641
|
+
* 获取呼叫列表
|
|
1642
|
+
*
|
|
1643
|
+
* @param {object} options
|
|
1644
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1645
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1646
|
+
* @param {string} options.count 本次拉取数量。
|
|
1647
|
+
* @returns {Promise<Array<TUIInvitation>>}
|
|
1648
|
+
*
|
|
1649
|
+
* @example
|
|
1650
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1651
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1652
|
+
* const invitationList = [];
|
|
1653
|
+
* let result;
|
|
1654
|
+
* let cursor = '';
|
|
1655
|
+
* let totalCount = 0;
|
|
1656
|
+
* let roomId = '12345';
|
|
1657
|
+
* let count = 20;
|
|
1658
|
+
* do {
|
|
1659
|
+
* result = await conferenceInvitationManager.getInvitationList({ roomId, cursor, count });
|
|
1660
|
+
* attendeeList.push(...result.attendeeList);
|
|
1661
|
+
* cursor = result.cursor;
|
|
1662
|
+
* totalCount = result.totalCount;
|
|
1663
|
+
* } while (cursor !== '')
|
|
1664
|
+
*/
|
|
1665
|
+
getInvitationList(options: {
|
|
1666
|
+
roomId: string;
|
|
1667
|
+
cursor: string;
|
|
1668
|
+
count: number;
|
|
1669
|
+
}): Promise<Array<TUIInvitation>>;
|
|
1670
|
+
/**
|
|
1671
|
+
* 监听 conferenceInvitationManager 的事件
|
|
1672
|
+
* @param event TUIConferenceListManagerEvents
|
|
1673
|
+
* @param func function
|
|
1674
|
+
* @returns {void}
|
|
1675
|
+
*
|
|
1676
|
+
* @example
|
|
1677
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1678
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1679
|
+
* conferenceInvitationManager.on(event, func);
|
|
1680
|
+
*/
|
|
1681
|
+
on(event: TUIConferenceInvitationManagerEvents, func: (...args: any[]) => void): void;
|
|
1682
|
+
private observerFunction;
|
|
1683
|
+
/**
|
|
1684
|
+
* 取消监听 ConferenceInvitationManager 的事件
|
|
1685
|
+
* @param event TUIConferenceListManagerEvents
|
|
1686
|
+
* @param func function
|
|
1687
|
+
* @returns {void}
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1691
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1692
|
+
* conferenceInvitationManager.off(event, func);
|
|
1693
|
+
*/
|
|
1694
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
963
1697
|
/**
|
|
964
1698
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
965
1699
|
*
|
|
@@ -969,18 +1703,25 @@ declare class TUIRoomEngine {
|
|
|
969
1703
|
static className: string;
|
|
970
1704
|
private static isReady;
|
|
971
1705
|
private roomEngineWASM;
|
|
1706
|
+
private trtcCloud;
|
|
972
1707
|
private deviceManager;
|
|
973
1708
|
private deviceManagerWASM;
|
|
1709
|
+
private conferenceListManager;
|
|
1710
|
+
private conferenceInvitationManager;
|
|
974
1711
|
private static userId;
|
|
975
1712
|
private static sdkAppId;
|
|
976
1713
|
private static Module;
|
|
1714
|
+
private static shareInstance;
|
|
977
1715
|
private logger;
|
|
978
1716
|
private roomId;
|
|
979
1717
|
private localVideoQuality;
|
|
980
1718
|
private localAudioQuality;
|
|
981
1719
|
static setModule(Module: any): void;
|
|
982
1720
|
static once(event: string, func: (...args: any[]) => void): void;
|
|
983
|
-
|
|
1721
|
+
static getInstance(): TUIRoomEngine;
|
|
1722
|
+
constructor(options?: {
|
|
1723
|
+
isSharedInstance?: boolean;
|
|
1724
|
+
});
|
|
984
1725
|
/**
|
|
985
1726
|
* @private
|
|
986
1727
|
* 调用 TUIRoomEngineWASM 的静态方法
|
|
@@ -1088,7 +1829,8 @@ declare class TUIRoomEngine {
|
|
|
1088
1829
|
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1089
1830
|
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1090
1831
|
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1091
|
-
* @param {number=} options.maxSeatCount 最大麦位数量
|
|
1832
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1833
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持) <br>
|
|
1092
1834
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
1093
1835
|
* roomType 为 TUIRoomType.kLive (直播场景) 时,maxSeatCount 最大限制为 16;
|
|
1094
1836
|
* @returns {Promise<void>}
|
|
@@ -1100,6 +1842,7 @@ declare class TUIRoomEngine {
|
|
|
1100
1842
|
* roomName: 'Test Room', // 填入您的房间名称, 房间名称默认为 roomId,最长 30 字节
|
|
1101
1843
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1102
1844
|
* isSeatEnabled: false, // 不开启麦位控制
|
|
1845
|
+
* password: '1234', // 填入您的房间密码,不填入则不设置房间密码
|
|
1103
1846
|
* });
|
|
1104
1847
|
*/
|
|
1105
1848
|
createRoom(options: {
|
|
@@ -1113,12 +1856,14 @@ declare class TUIRoomEngine {
|
|
|
1113
1856
|
isCameraDisableForAllUser?: boolean;
|
|
1114
1857
|
isMessageDisableForAllUser?: boolean;
|
|
1115
1858
|
maxSeatCount?: number;
|
|
1859
|
+
password?: string;
|
|
1116
1860
|
}): Promise<void>;
|
|
1117
1861
|
/**
|
|
1118
1862
|
* 进入房间接口
|
|
1119
1863
|
* @param {object} options
|
|
1120
1864
|
* @param {string} options.roomId 房间号,字符串类型
|
|
1121
1865
|
* @param {TUIRoomType} options.roomType 房间类型, 默认值为 TUIRoomType.kConference (自 v2.3.0 支持)
|
|
1866
|
+
* @param {TUIEnterRoomOptions} options.options 进入房间的可选参数 (自 v2.5.0 支持)
|
|
1122
1867
|
* @returns {Promise<TUIRoomInfo>} roomInfo
|
|
1123
1868
|
* 该接口返回当前房间信息
|
|
1124
1869
|
*
|
|
@@ -1127,11 +1872,15 @@ declare class TUIRoomEngine {
|
|
|
1127
1872
|
* const roomDetailInfo = await roomEngine.enterRoom({
|
|
1128
1873
|
* roomId: '12345',
|
|
1129
1874
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1875
|
+
* options: {
|
|
1876
|
+
* password: '1234',
|
|
1877
|
+
* }
|
|
1130
1878
|
* });
|
|
1131
1879
|
*/
|
|
1132
1880
|
enterRoom(options: {
|
|
1133
1881
|
roomId: string;
|
|
1134
1882
|
roomType: TUIRoomType;
|
|
1883
|
+
options?: TUIEnterRoomOptions;
|
|
1135
1884
|
}): Promise<TUIRoomInfo>;
|
|
1136
1885
|
/**
|
|
1137
1886
|
* 解散房间接口,解散房间必须由房间所有者发起,解散房间之后房间不可进入
|
|
@@ -1174,16 +1923,6 @@ declare class TUIRoomEngine {
|
|
|
1174
1923
|
updateRoomNameByAdmin(options: {
|
|
1175
1924
|
roomName: string;
|
|
1176
1925
|
}): Promise<void>;
|
|
1177
|
-
/**
|
|
1178
|
-
* 更新房间的发言模式(仅群主或者管理员可以调用)
|
|
1179
|
-
* @deprecated 该接口自 v2.0.0 版本废弃
|
|
1180
|
-
* @param {object} options
|
|
1181
|
-
* @param {TUISpeechMode} options.speechMode 发言类型
|
|
1182
|
-
* @returns {Promise<void>}
|
|
1183
|
-
*/
|
|
1184
|
-
updateRoomSpeechModeByAdmin(options: {
|
|
1185
|
-
speechMode: TUISpeechMode;
|
|
1186
|
-
}): Promise<void>;
|
|
1187
1926
|
/**
|
|
1188
1927
|
* 更新房间上麦模式(仅群主或者管理员可以调用)
|
|
1189
1928
|
* 房间上麦模式更新后,roomEngine 会通过 TUIRoomEvents.onRoomSeatModeChanged 回调通知房间内用户
|
|
@@ -1201,6 +1940,23 @@ declare class TUIRoomEngine {
|
|
|
1201
1940
|
updateRoomSeatModeByAdmin(options: {
|
|
1202
1941
|
seatMode: TUISeatMode;
|
|
1203
1942
|
}): Promise<void>;
|
|
1943
|
+
/**
|
|
1944
|
+
* 更新房间密码(仅群主或者管理员可以调用)
|
|
1945
|
+
*
|
|
1946
|
+
* @since v2.5.0
|
|
1947
|
+
* @param {object} options
|
|
1948
|
+
* @param {string} options.password 房间密码
|
|
1949
|
+
* @returns {Promise<void>}
|
|
1950
|
+
*
|
|
1951
|
+
* @example
|
|
1952
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1953
|
+
* await roomEngine.updateRoomPasswordByAdmin({
|
|
1954
|
+
* password: '1234', // 更新密码为 1234
|
|
1955
|
+
* });
|
|
1956
|
+
*/
|
|
1957
|
+
updateRoomPasswordByAdmin(options: {
|
|
1958
|
+
password: string;
|
|
1959
|
+
}): Promise<void>;
|
|
1204
1960
|
/**
|
|
1205
1961
|
* 获取当前房间用户列表,注意该接口一次拉取的用户列表量最大为 50 个
|
|
1206
1962
|
*
|
|
@@ -1783,6 +2539,27 @@ declare class TUIRoomEngine {
|
|
|
1783
2539
|
userId: string;
|
|
1784
2540
|
userRole: TUIRole;
|
|
1785
2541
|
}): Promise<void>;
|
|
2542
|
+
/**
|
|
2543
|
+
* 修改房间内用户名称
|
|
2544
|
+
* @since v2.5.0
|
|
2545
|
+
* @param {object} options 修改房间内用户名称,普通成员可修改自己的,管理员可修改自己和普通成员的。
|
|
2546
|
+
* @param {string} options.userId 用户 Id
|
|
2547
|
+
* @param {string} options.nameCard 房间内用户名称
|
|
2548
|
+
* @returns {Promise<void>}
|
|
2549
|
+
*
|
|
2550
|
+
* @example
|
|
2551
|
+
* const roomEngine = new TUIRoomEngine();
|
|
2552
|
+
* // 修改房间内用户名称
|
|
2553
|
+
* await roomEngine.changeUserNameCard({
|
|
2554
|
+
* userId: 'user_1234',
|
|
2555
|
+
* nameCard: 'jack',
|
|
2556
|
+
* });
|
|
2557
|
+
*
|
|
2558
|
+
*/
|
|
2559
|
+
changeUserNameCard(options: {
|
|
2560
|
+
userId: string;
|
|
2561
|
+
nameCard: string;
|
|
2562
|
+
}): Promise<void>;
|
|
1786
2563
|
/**
|
|
1787
2564
|
* 将用户踢出房间,仅主持人和管理员可调用该接口
|
|
1788
2565
|
* @param {object} options
|
|
@@ -2119,7 +2896,7 @@ declare class TUIRoomEngine {
|
|
|
2119
2896
|
* roomEngine.on(event, func);
|
|
2120
2897
|
*/
|
|
2121
2898
|
on(event: TUIRoomEvents, func: (...args: any[]) => void): void;
|
|
2122
|
-
private
|
|
2899
|
+
private observerFunction;
|
|
2123
2900
|
private supportForDeprecatedEvents;
|
|
2124
2901
|
/**
|
|
2125
2902
|
* 取消监听 roomEngine 的事件
|
|
@@ -2285,6 +3062,28 @@ declare class TUIRoomEngine {
|
|
|
2285
3062
|
*/
|
|
2286
3063
|
getMediaDeviceManager(): TUIRoomDeviceManager;
|
|
2287
3064
|
private handleDeviceManagerWASM;
|
|
3065
|
+
/**
|
|
3066
|
+
* v2.5.0 版本起支持使用 getConferenceListManager 获取 conferenceListManager 模块
|
|
3067
|
+
* @since v2.5.0
|
|
3068
|
+
*
|
|
3069
|
+
* @example
|
|
3070
|
+
* // 获取会议列表
|
|
3071
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
3072
|
+
*
|
|
3073
|
+
* @returns {TUIConferenceListManager} conferenceListManager
|
|
3074
|
+
*/
|
|
3075
|
+
getConferenceListManager(): TUIConferenceListManager;
|
|
3076
|
+
/**
|
|
3077
|
+
* v2.6.0 版本起支持使用 getConferenceInvitationManager 获取 conferenceInvitation 模块
|
|
3078
|
+
* @since v2.6.0
|
|
3079
|
+
*
|
|
3080
|
+
* @example
|
|
3081
|
+
* //获取会中邀请
|
|
3082
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
3083
|
+
*
|
|
3084
|
+
* @returns {TUIConferenceInvitationManager} conferenceInvitationManager
|
|
3085
|
+
*/
|
|
3086
|
+
getConferenceInvitationManager(): TUIConferenceInvitationManager;
|
|
2288
3087
|
/**
|
|
2289
3088
|
* 获取 trtcCloud 实例
|
|
2290
3089
|
* @returns {TRTCCloud} trtcCloud
|
|
@@ -2294,7 +3093,7 @@ declare class TUIRoomEngine {
|
|
|
2294
3093
|
* const roomEngine = new TUIRoomEngine();
|
|
2295
3094
|
* const trtcCloud = roomEngine.getTRTCCloud();
|
|
2296
3095
|
*/
|
|
2297
|
-
getTRTCCloud():
|
|
3096
|
+
getTRTCCloud(): TRTCCloud;
|
|
2298
3097
|
/**
|
|
2299
3098
|
* 获取 tim 实例
|
|
2300
3099
|
* @returns {TIM} tim
|
|
@@ -2302,7 +3101,7 @@ declare class TUIRoomEngine {
|
|
|
2302
3101
|
*
|
|
2303
3102
|
* @example
|
|
2304
3103
|
* const roomEngine = new TUIRoomEngine();
|
|
2305
|
-
* const
|
|
3104
|
+
* const tim = roomEngine.getTIM();
|
|
2306
3105
|
*/
|
|
2307
3106
|
getTIM(): ChatSDK;
|
|
2308
3107
|
destroy(): void;
|
|
@@ -2316,4 +3115,4 @@ declare class TUIRoomEngine {
|
|
|
2316
3115
|
private static handleSetFramework;
|
|
2317
3116
|
}
|
|
2318
3117
|
|
|
2319
|
-
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, type TUIDeviceInfo, TUIErrorCode, TUIKickedOutOfRoomReason, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode,
|
|
3118
|
+
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode, type TUIUserInfo, type TUIVideoEncoderParams, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
|