android_IRTSRoomEventHandler class

Inheritance

Properties

$instance ↔ dynamic
getter/setter pairinherited
$resource → NativeResource
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
inherited
emit(String name, List args) → dynamic
inherited
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLeaveRoom(dynamic stats) FutureOr<void>
@detail callback @brief Leave the room successfully callback.
After the user calls the leaveRoom{@link #RTSRoom#leaveRoom} method, the SDK will stop all publishing subscription streams, and after releasing all call-related audio & video resources, this callback will notify the user to leave the room successfully. @param stats Reserved parameter. @note - After the user calls the leaveRoom{@link #RTSRoom#leaveRoom} method to leave the room, if destroy{@link #RTSRoom#destroy} is called to destroy the room instance or destroyRTCEngine{@link #RTCEngine#destroyRTCEngine} method is called to destroy the RTC engine immediately, this callback event will not be received. - If the app needs to use the system audio & video device after leaving the room, it is recommended to initialize the audio & video device after receiving this callback, otherwise the initialization may fail due to the SDK occupying the audio & video device.
override
onRoomBinaryMessageReceived(dynamic msgid, dynamic uid, dynamic message) FutureOr<void>
@detail callback @brief Receives a callback for broadcast binary messages in the room.
This callback is received when other users in the room call sendRoomBinaryMessage{@link #RTSRoom#sendRoomBinaryMessage} to send a broadcast binary message. @param uid User ID of the message sender. @param message The content of the received binary message.
override
onRoomMessageReceived(dynamic msgid, dynamic uid, dynamic message) FutureOr<void>
@detail callback @brief Receive a callback for broadcast messages in the room.
This callback is received when other users in the room call sendRoomMessage{@link #RTSRoom#sendRoomMessage} to send a broadcast message. @param uid User ID of the message sender. @param message The content of the received message.
override
onRoomMessageSendResult(dynamic msgid, dynamic error) FutureOr<void>
@detail callback @brief Receives this callback after sending a text message or a binary message to a room with sendRoomMessage{@link #RTSRoom#sendRoomMessage} or sendRoomBinaryMessage{@link #RTSRoom#sendRoomBinaryMessage}. @param msgid The ID of this message. @param error Message sending result. See RoomMessageSendResult{@link #RoomMessageSendResult}
override
onRoomStateChanged(dynamic roomId, dynamic uid, dynamic state, dynamic extraInfo) FutureOr<void>
@detail callback @brief Callback on room state changes. Via this callback you get notified of room relating warnings, errors and events. For example, the user joins the room, the user is removed from the room, and so on. @param roomId Room ID. @param uid User ID. @param state Room state code.
- 0: Join room success. - !0: Failed to join a room, abnormal exit, room-related warnings or errors. See ErrorCode{@link #ErrorCode} and WarningCode{@link #WarningCode} for specific indications. @param extraInfo Extra information.
join_type indicates the type of room the user joins. 0 means the user joins the room for the first time, and 1 means the user rejoins the room.
elapsed indicates the time interval from calling joinRoom{@link #RTCRoom#joinRoom} to successfully joining room, in ms.
override
onUserBinaryMessageReceived(dynamic msgid, dynamic uid, dynamic message) FutureOr<void>
@detail callback @brief Receive this callback when you receive a peer-to-peer binary message from another user in the room via sendUserBinaryMessage{@link #RTSRoom#sendUserBinaryMessage}. @param uid The user ID of the sender of the message. @param message The binary message content received.
override
onUserJoined(dynamic userInfo) FutureOr<void>
@detail callback @brief You will receive this callback in following cases:
- The remote user calls setUserVisibility{@link #RTCRoom#setUserVisibility} turns visible and joins your room. - The remote visible user is disconnected and then reconnected to your room. - The invisible remote user in your room calls setUserVisibility{@link #RTCRoom#setUserVisibility} and turns visible. - You join the room when there are visible users in the room. @param userInfo User information. See UserInfo{@link #UserInfo}.
override
onUserLeave(dynamic uid, dynamic reason) FutureOr<void>
@detail callback @brief This callback is triggered when a remote user is disconnected or turns invisible. @param uid ID of the user who leaves the room, or switches to invisible. @param reason Reason to leave the room:
- 0: The remote client calls leaveRoom{@link #RTSRoom#leaveRoom} to leave the room. - 1: The remote client is disconnected because of poor network connection or expired Token. - 2: The remote client calls setUserVisibility{@link #RTCRoom#setUserVisibility} to turn invisible. - 3: The remote user has been removed from the room by the administrator via a OpenAPI call.
override
onUserMessageReceived(dynamic msgid, dynamic uid, dynamic message) FutureOr<void>
@detail callback @brief Receive this callback when you receive a peer-to-peer text message from another user in the room via sendUserMessage{@link #RTSRoom#sendUserMessage}. @param uid The user ID of the sender of the message. @param message The content of the received text message.
override
onUserMessageSendResult(dynamic msgid, dynamic error) FutureOr<void>
@detail callback @brief After sending a point-to-point text or point-to-point binary message to a single user in the room, the message sender will receive a callback with the result of the message. @param msgid The ID of this message. @param error Text or binary message sending results. See UserMessageSendResult{@link #UserMessageSendResult} @note Call sendUserMessage{@link #RTSRoom#sendUserMessage} or sendUserBinaryMessage{@link #RTSRoom#sendUserBinaryMessage} interface to receive this callback.
override
registerEvent(String name, dynamic method) → void
inherited
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
toString() String
A string representation of this object.
inherited
updateInstance(dynamic instance) → void
inherited
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited