RoomStore provides a comprehensive set of APIs to manage room-related operations.state publisher. Subscribe to it to receive real-time updates about current room and scheduled room list.Function | Description |
Get singleton object. | |
Room event callback. | |
Room event callback. | |
Get scheduled room list. | |
Get scheduled room attendees. | |
Schedule a room. | |
Update scheduled room. | |
Add scheduled attendees. | |
Remove scheduled attendees. | |
Cancel scheduled room. | |
Create and join room. | |
Join room. | |
Leave room. | |
End room. | |
Update room info. | |
Get room info. | |
Get pending calls list. | |
Call user to join room. | |
Cancel call. | |
Accept call. | |
Reject call. | |
Start cloud recording. | |
Stop cloud recording. |
abstract addRoomListener(listener: RoomListener): void
Parameter | Type | Description |
listener | Listener. |
abstract removeRoomListener(listener: RoomListener): void
Parameter | Type | Description |
listener | Listener. |
abstract getScheduledRoomList(cursor: string | undefined): Promise<ListResult<RoomInfo>>
Parameter | Type | Description |
cursor | String? | Pagination cursor. |
abstract getScheduledAttendees(roomID: string, cursor: string | undefined): Promise<ListResult<RoomUser>>
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
abstract scheduleRoom(roomID: string, options: ScheduleRoomOptions): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. |
abstract updateScheduledRoom(roomID: string,options: ScheduleRoomOptions,modifyFlagList: ScheduleRoomOptionsModifyFlag[],): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. | |
modifyFlagList | | Modify flag list. |
abstract addScheduledAttendees(roomID: string, userIDList: string[]): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
abstract removeScheduledAttendees(roomID: string, userIDList: string[]): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
abstract cancelScheduledRoom(roomID: string): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
abstract createAndJoinRoom(roomID: string,roomType: RoomType,options: CreateRoomOptions,): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
options | Create options. |
abstract joinRoom(roomID: string, roomType: RoomType, password?: string): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
password | String? | Room password. |
abstract leaveRoom(): Promise<void>
abstract endRoom(): Promise<void>
abstract updateRoomInfo(roomID: string,options: UpdateRoomOptions,modifyFlagList: UpdateRoomOptionsModifyFlag[],): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
options | Update options. | |
modifyFlagList | | Modify flag list. |
abstract getRoomInfo(roomID: string): Promise<RoomInfo>
Parameter | Type | Description |
roomID | String | Room ID. |
abstract getPendingCalls(roomID: string, cursor: string | undefined): Promise<ListResult<RoomCall>>
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
abstract callUserToRoom(roomID: string,userIDList: string[],timeout?: number,extensionInfo?: string | undefined,): Promise<Map<string, RoomCallResult>>
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
timeout | Int | Timeout (in seconds). |
extensionInfo | String? | Extension info. |
abstract cancelCall(roomID: string, userIDList: string[]): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
abstract acceptCall(roomID: string): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
abstract rejectCall(roomID: string, reason: CallRejectionReason): Promise<void>
Parameter | Type | Description |
roomID | String | Room ID. |
reason | Rejection reason. |
abstract startRecording(options?: StartRecordingOptions): Promise<void>
Parameter | Type | Description |
options | Recording options, reserved for future extensions. |
abstract stopRecording(): Promise<void>
Enum Value | Value | Description |
standard | 1 | Standard room. |
webinar | 2 | Webinar room. |
Enum Value | Value | Description |
scheduled | 1 | Scheduled. |
running | 2 | Running. |
Enum Value | Value | Description |
none | 0 | No call. |
calling | 1 | Calling. |
timeout | 2 | Call timeout. |
rejected | 3 | Call rejected. |
Enum Value | Value | Description |
success | 0 | Call success. |
alreadyInCalling | 1 | User already in calling. |
alreadyInRoom | 2 | User already in room. |
Enum Value | Value | Description |
rejected | 0 | User actively rejected. |
inOtherRoom | 1 | User in another room. |
Enum Value | Value | Description |
none | 0 | Not recording. |
recording | 1 | Recording in progress. |
Enum Value | Value | Description |
stoppedByUser | 0 | Manually stopped by user. |
roomDismissed | 1 | Room dismissed. |
maxDurationReached | 2 | Max recording duration reached. |
storageLimitReached | 3 | Storage space limit reached. |
Enum Value | Value | Description |
noError | 0 | Operation successful. |
noPermission | 1 | Caller is not Owner / Admin. |
featureNotEnabled | 2 | Cloud recording feature not enabled in console. |
storageNotConfigured | 3 | Recording storage (COS / VOD) not configured. |
serviceUnavailable | 4 | RoomKit / TRTC recording service temporarily unavailable. |
unknownError | 5 | Unknown error. |
Method | Description |
onAddedToScheduledRoom | Triggered when added to a scheduled room. |
onRemovedFromScheduledRoom | Triggered when removed from a scheduled room. |
onScheduledRoomCancelled | Triggered when a scheduled room is cancelled. |
onScheduledRoomStartingSoon | Triggered when a scheduled room is about to start. |
onRoomEnded | Triggered when a room ends. |
onCallReceived | Triggered when a room call is received. |
onCallCancelled | Triggered when a room call is cancelled. |
onCallTimeout | Triggered when a room call times out. |
onCallAccepted | Triggered when a room call is accepted. |
onCallRejected | Triggered when a room call is rejected. |
onCallHandledByOtherDevice | Triggered when a room call is handled by another device. |
onCallRevokedByAdmin | Triggered when a room call is revoked by admin. |
onRecordingStarted | Triggered when recording starts. |
onRecordingStopped | Triggered when recording stops. |
Property | Type | Description |
userID | String | User ID. |
userName | String | User name. |
avatarURL | String | User avatar URL. |
Property | Type | Description |
status | Recording status. | |
operatorUser | User who started the recording. | |
startTime | Int | Recording start timestamp. |
Property | Type | Description |
roomID | String | Room ID. |
roomName | String | Room name. |
roomOwner | Room owner. | |
roomType | Room type. | |
participantCount | Int | Participant count. |
audienceCount | Int | Audience count (for webinar room). |
createTime | Int | Create time. |
roomStatus | Room status. | |
scheduledStartTime | Int | Scheduled start time. |
scheduledEndTime | Int | Scheduled end time. |
startReminderInSeconds | Int | Reminder seconds before start. |
scheduleAttendees | Scheduled attendees list. | |
password | String? | Room password. |
isAllMicrophoneDisabled | Bool | Whether all microphones are disabled. |
isAllCameraDisabled | Bool | Whether all cameras are disabled. |
isAllMessageDisabled | Bool | Whether all messages are disabled. |
isAllScreenShareDisabled | Bool | Whether all screen sharing is disabled. |
recordingInfo | Recording info. |
Property | Type | Description |
roomName | String | Room name. |
password | String | Room password. |
scheduleStartTime | Int | Scheduled start time. |
scheduleEndTime | Int | Scheduled end time. |
reminderSecondsBeforeStart | Int | Reminder seconds before start. |
scheduleAttendees | [String] | Scheduled attendee ID list. |
isAllMicrophoneDisabled | Bool | Whether all microphones are disabled. |
isAllCameraDisabled | Bool | Whether all cameras are disabled. |
isAllScreenShareDisabled | Bool | Whether all screen sharing is disabled. |
isAllMessageDisabled | Bool | Whether all messages are disabled. |
Property | Type | Description |
roomName | String | Room name. |
password | String | Room password. |
isAllMicrophoneDisabled | Bool | Whether all microphones are disabled. |
isAllCameraDisabled | Bool | Whether all cameras are disabled. |
isAllScreenShareDisabled | Bool | Whether all screen sharing is disabled. |
isAllMessageDisabled | Bool | Whether all messages are disabled. |
Property | Type | Description |
roomName | String | Room name. |
password | String | Room password. |
Property | Type | Description |
caller | Caller info. | |
callee | Callee info. | |
status | Call status. |
fun onSuccess(result: Map<String, RoomCallResult>)
Parameter | Type | Description |
result | Call result map. |
fun onFailure(code: Int, desc: String)
Parameter | Type | Description |
code | Int | Error code. |
desc | String | Error description. |
fun onSuccess(roomInfo: RoomInfo)
Parameter | Type | Description |
roomInfo | Room info. |
fun onFailure(code: Int, desc: String)
Parameter | Type | Description |
code | Int | Error code. |
desc | String | Error description. |
フィードバック