RoomStore provides a comprehensive set of APIs to manage room-related operations.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. |
void addRoomListener(RoomListener listener);
Parameter | Type | Description |
listener | Listener. |
void removeRoomListener(RoomListener listener);
Parameter | Type | Description |
listener | Listener. |
Future<ListResultCompletionHandler<RoomInfo>> getScheduledRoomList(String? cursor);
Parameter | Type | Description |
cursor | String? | Pagination cursor. |
Future<ListResultCompletionHandler<RoomUser>> getScheduledAttendees({required String roomID,required String? cursor,});
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
Future<CompletionHandler> scheduleRoom({required String roomID,required ScheduleRoomOptions options,});
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. |
Future<CompletionHandler> updateScheduledRoom({required String roomID,required ScheduleRoomOptions options,required List<ScheduleRoomOptionsModifyFlag> modifyFlagList,});
Parameter | Type | Description |
roomID | String | Room ID. |
options | Schedule options. | |
modifyFlagList | Modify flag list. |
Future<CompletionHandler> addScheduledAttendees({required String roomID,required List<String> userIDList,});
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
Future<CompletionHandler> removeScheduledAttendees({required String roomID,required List<String> userIDList,});
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | [String] | User ID list. |
Future<CompletionHandler> cancelScheduledRoom(String roomID);
Parameter | Type | Description |
roomID | String | Room ID. |
Future<CompletionHandler> createAndJoinRoom({required String roomID,required RoomType roomType,required CreateRoomOptions options,});
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
options | Create options. |
Future<CompletionHandler> joinRoom({required String roomID,required RoomType roomType,String? password = "",});
Parameter | Type | Description |
roomID | String | Room ID. |
roomType | Room type (standard or webinar). | |
password | String? | Room password. |
Future<CompletionHandler> leaveRoom();
Future<CompletionHandler> endRoom();
Future<CompletionHandler> updateRoomInfo({required String roomID,required UpdateRoomOptions options,required List<UpdateRoomOptionsModifyFlag> modifyFlagList,});
Parameter | Type | Description |
roomID | String | Room ID. |
options | Update options. | |
modifyFlagList | Modify flag list. |
Future<GetRoomInfoCompletionHandler> getRoomInfo(String roomID);
Parameter | Type | Description |
roomID | String | Room ID. |
Future<ListResultCompletionHandler<RoomCall>> getPendingCalls({required String roomID,required String? cursor,});
Parameter | Type | Description |
roomID | String | Room ID. |
cursor | String? | Pagination cursor. |
Future<CallUserToRoomCompletionHandler> callUserToRoom({required String roomID,required List<String> userIDList,int timeout = 0,String? extensionInfo,});
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | List<String> | User ID list. |
timeout | int | Timeout (in seconds). |
extensionInfo | String? | Extension info. |
Future<CompletionHandler> cancelCall({required String roomID,required List<String> userIDList,});
Parameter | Type | Description |
roomID | String | Room ID. |
userIDList | List<String> | User ID list. |
Future<CompletionHandler> acceptCall(String roomID);
Parameter | Type | Description |
roomID | String | Room ID. |
Future<CompletionHandler> rejectCall({required String roomID,required CallRejectionReason reason,});
Parameter | Type | Description |
roomID | String | Room ID. |
reason | Rejection reason. |
Future<CompletionHandler> startRecording({StartRecordingOptions? options,});
Parameter | Type | Description |
options | Recording options, reserved for future extensions. |
Future<CompletionHandler> stopRecording();
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. |
フィードバック