RoomStore provides a comprehensive set of APIs to manage room-related operations.Function | Description |
Get singleton object. | |
Room event publisher. | |
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. |
public func getScheduledRoomList(cursor: String?, completion: ListResultCompletionClosure<RoomInfo>?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
cursor | String? | Pagination cursor. |
completion | Completion callback. |
public func getScheduledAttendees(roomID: String, cursor: String?, completion: ListResultCompletionClosure<RoomUser>?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
completion | Completion callback. |
public func scheduleRoom(roomID: String, options: ScheduleRoomOptions, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. | |
completion | CompletionClosure? | Completion callback. |
public func updateScheduledRoom(roomID: String, options: ScheduleRoomOptions, modifyFlag: ScheduleRoomOptions.ModifyFlag, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. | |
modifyFlag | ScheduleRoomOptions.ModifyFlag | Modify flag. |
completion | CompletionClosure? | Completion callback. |
public func addScheduledAttendees(roomID: String, userIDList: [String], completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
completion | CompletionClosure? | Completion callback. |
public func removeScheduledAttendees(roomID: String, userIDList: [String], completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
completion | CompletionClosure? | Completion callback. |
public func cancelScheduledRoom(roomID: String, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
completion | CompletionClosure? | Completion callback. |
public func createAndJoinRoom(roomID: String, roomType: RoomType, options: CreateRoomOptions, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
options | Create options. | |
completion | CompletionClosure? | Completion callback. |
public func joinRoom(roomID: String, roomType: RoomType, password: String? = "", completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
password | String? | Room password. |
completion | CompletionClosure? | Completion callback. |
public func leaveRoom(completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
completion | CompletionClosure? | Completion callback. |
public func endRoom(completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
completion | CompletionClosure? | Completion callback. |
public func updateRoomInfo(roomID: String, options: UpdateRoomOptions, modifyFlag: UpdateRoomOptions.ModifyFlag, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
options | Update options. | |
modifyFlag | UpdateRoomOptions.ModifyFlag | Modify flag. |
completion | CompletionClosure? | Completion callback. |
public func getRoomInfo(roomID: String, completion: GetRoomInfoCompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
completion | GetRoomInfoCompletionClosure? | Completion callback. |
public func getPendingCalls(roomID: String, cursor: String?, completion: ListResultCompletionClosure<RoomCall>?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
completion | Completion callback. |
public func callUserToRoom(roomID: String, userIDList: [String], timeout: Int = 0, extensionInfo: String?, completion: CallUserToRoomCompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
timeout | Int | Timeout (in seconds). |
extensionInfo | String? | Extension info. |
completion | CallUserToRoomCompletionClosure? | Completion callback. |
public func cancelCall(roomID: String, userIDList: [String], completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
completion | CompletionClosure? | Completion callback. |
public func acceptCall(roomID: String, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
completion | CompletionClosure? | Completion callback. |
public func rejectCall(roomID: String, reason: CallRejectionReason, completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
roomID | String | Room ID. |
reason | Rejection reason. | |
completion | CompletionClosure? | Completion callback. |
public func startRecording(options: StartRecordingOptions = .init(), completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
options | Recording options, reserved for future extensions. | |
completion | CompletionClosure? | Completion callback. |
public func stopRecording(completion: CompletionClosure?) { fatalError("\\(#function) must be overridden by subclass") }
Parameter | Type | Description |
completion | CompletionClosure? | Completion callback. |
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. |
Enum Value | 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. |
フィードバック