IRTCRoomEventHandler class

Constructors

IRTCRoomEventHandler({FutureOr<void> onLeaveRoom(RTCRoomStats stats)?, FutureOr<void> onRoomStateChangedWithReason(String roomId, String uid, RoomState state, RoomStateChangeReason reason)?, FutureOr<void> onRoomStateChanged(String roomId, String uid, int state, String extraInfo)?, FutureOr<void> onStreamStateChanged(String roomId, String uid, int state, String extraInfo)?, FutureOr<void> onAVSyncStateChange(AVSyncState state)?, FutureOr<void> onRoomStats(RTCRoomStats stats)?, FutureOr<void> onRoomEvent(String roomId, String uid, RoomEvent state, RoomEventInfo info)?, FutureOr<void> onUserJoined(UserInfo userInfo)?, FutureOr<void> onUserLeave(String uid, int reason)?, FutureOr<void> onVideoPublishStateChanged(String streamId, PublishState state, PublishStateChangeReason reason)?, FutureOr<void> onAudioPublishStateChanged(String streamId, PublishState state, PublishStateChangeReason reason)?, FutureOr<void> onVideoSubscribeStateChanged(String streamId, SubscribeState state, SubscribeStateChangeReason reason)?, FutureOr<void> onAudioSubscribeStateChanged(String streamId, SubscribeState state, SubscribeStateChangeReason reason)?, FutureOr<void> onLocalStreamStats(String streamId, StreamInfo streamInfo, LocalStreamStats stats)?, FutureOr<void> onRemoteStreamStats(String streamId, StreamInfo streamInfo, RemoteStreamStats stats)?, FutureOr<void> onStreamPublishSuccess(bool isScreen)?, FutureOr<void> onAVSyncEvent(String roomId, String userId, AVSyncEvent eventCode)?, FutureOr<void> onUserPublishStreamVideo(String streamId, StreamInfo streamInfo, bool isPublish)?, FutureOr<void> onUserPublishStreamAudio(String streamId, StreamInfo streamInfo, bool isPublish)?, FutureOr<void> onRoomMessageReceived(int msgid, String uid, String message)?, FutureOr<void> onRoomBinaryMessageReceived(int msgid, String uid, Uint8List message)?, FutureOr<void> onUserMessageReceived(int msgid, String uid, String message)?, FutureOr<void> onUserBinaryMessageReceived(int msgid, String uid, Uint8List message)?, FutureOr<void> onUserMessageSendResult(int msgid, UserMessageSendResult error)?, FutureOr<void> onRoomMessageSendResult(int msgid, RoomMessageSendResult error)?, FutureOr<void> onVideoStreamBanned(String uid, bool banned)?, FutureOr<void> onAudioStreamBanned(String uid, bool banned)?, FutureOr<void> onForwardStreamStateChanged(List<ForwardStreamStateInfo> infos)?, FutureOr<void> onForwardStreamEvent(List<ForwardStreamEventInfo> eventInfos)?, FutureOr<void> onNetworkQuality(NetworkQualityStats localQuality, List<NetworkQualityStats> remoteQualities)?, FutureOr<void> onSetRoomExtraInfoResult(int taskId, SetRoomExtraInfoResult result)?, FutureOr<void> onRoomExtraInfoUpdate(String key, String value, String lastUpdateUserId, int lastUpdateTimeMs)?, FutureOr<void> onRoomStreamExtraInfoUpdate(String streamId, StreamInfo streamInfo, String extraInfo)?, FutureOr<void> onUserVisibilityChanged(bool currentUserVisibility, UserVisibilityChangeError errorCode)?, FutureOr<void> onSubtitleStateChanged(SubtitleState state, SubtitleErrorCode errorCode, String errorMessage)?, FutureOr<void> onSubtitleMessageReceived(List<SubtitleMessage> subtitles)?, FutureOr<void> onRoomWarning(RTCRoom rtcRoom, WarningCode? warningCode)?, FutureOr<void> onTokenWillExpire()?, FutureOr<void> onPublishPrivilegeTokenWillExpire()?, FutureOr<void> onSubscribePrivilegeTokenWillExpire()?, FutureOr<void> onStreamSubscribed(SubscribeState stateCode, String userId, SubscribeConfig info)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
onAudioPublishStateChanged FutureOr<void> Function(String streamId, PublishState state, PublishStateChangeReason reason)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces onStreamStateChanged for reporting audio publishing state changes. If you have upgraded to SDK version 3.60 or later and are still using this method, please migrate to this callback. @author xuyiling.x10 @brief Callback on audio publishing state change. @param streamId The ID of the stream, used to identify a specific audio stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param state Publish state code. See PublishState{@link #PublishState}. @param reason The reason for the change of the publishing state of the local audio stream. See PublishStateChangeReason{@link #PublishStateChangeReason}. @order 0
getter/setter pair
onAudioStreamBanned FutureOr<void> Function(String uid, bool banned)?
@detail callback @author qipengxiang @brief All the users in the room will get informed via this callback when a user is banned or the ban of the user has been lifted by calling BanUserStream/UnbanUserStream on the server side. @param uid Disabled/unbanned audio stream user ID @param banned Audio stream sending status
- true: Audio stream sending is disabled - false: Audio stream sending is unbanned @note - When the specified user in the room is disabled/unbanned audio stream sending, all users in the room will receive the callback. - If the banned user leaves or disconnects and then rejoins the room, the user is still banned from publishing audio stream, and all users in the room will be informed via the callback. - After the specified user is banned, other users in the room will check out and enter the room again, and will receive the callback again. - After the same room is disbanded and created again, the status in the room is cleared. - If the Audio selection is enabled in the console, only the user whose stream is banned will receive this callback.
getter/setter pair
onAudioSubscribeStateChanged FutureOr<void> Function(String streamId, SubscribeState state, SubscribeStateChangeReason reason)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces onStreamStateChanged and onStreamSubscribed for reporting the state changes of the subscription to audio streams. If you have upgraded to SDK version 3.60 or later and are still using this two methods, please migrate to this callback. @author shenpengliang @brief Callback on state changes of the subscription to microphone-audio streams. @param streamId The ID of the stream, used to identify a specific audio stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param state Room state code. See SubscribeState{@link #SubscribeState} for more. @param reason The reason why room state changes. See SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for more. @note You will receive this callback after calling subscribeStreamAudio{@link #RTCRoom#subscribeStreamAudio}.
getter/setter pair
onAVSyncEvent FutureOr<void> Function(String roomId, String userId, AVSyncEvent eventCode)?
@detail callback @valid since 3.60. @brief Stream publisher will receive this callback when the A/V synchronization error occurs after setMultiDeviceAVSync{@link #RTCRoom#setMultiDeviceAVSync} is called. @param roomId Room ID. @param uid User ID. @param eventCode A/V synchronization error, see AVSyncEvent{@link #AVSyncEvent}.
getter/setter pair
onAVSyncStateChange FutureOr<void> Function(AVSyncState state)?
@detail callback @author wangzhanqiang @brief Stream publisher will receive this callback when the A/V synchronization state changes after setMultiDeviceAVSync{@link #RTCRoom#setMultiDeviceAVSync} is called. @param state A/V synchronization state, see AVSyncState{@link #AVSyncState}.
getter/setter pair
onForwardStreamEvent FutureOr<void> Function(List<ForwardStreamEventInfo> eventInfos)?
@detail callback @author shenpengliang @brief Callback returning the events during relaying the media stream to each room @param eventInfos Array of the event of each designated room. Refer to ForwardStreamEventInfo{@link #ForwardStreamEventInfo} for more information.
getter/setter pair
onForwardStreamStateChanged FutureOr<void> Function(List<ForwardStreamStateInfo> infos)?
@detail callback @author shenpengliang @brief Callback returning the state and errors during relaying the media stream to each of the rooms @param stateInfos Array of the state and errors of each designated room. Refer to ForwardStreamStateInfo{@link #ForwardStreamStateInfo} for more information.
getter/setter pair
onLeaveRoom FutureOr<void> Function(RTCRoomStats stats)?
@detail callback @region Multiple rooms @author shenpengliang @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 #RTCRoom#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.
getter/setter pair
onLocalStreamStats FutureOr<void> Function(String streamId, StreamInfo streamInfo, LocalStreamStats stats)?
@detail callback @author yejing @brief Local stream data statistics and network quality callback.
After the local user publishes the flow successfully, the SDK will periodically (2s) notify the user through this callback event of the quality statistics of the published flow during this reference period.
Statistics are passed to the user through the callback parameters of the LocalStreamStats{@link #LocalStreamStats} type, including the sent audio & video bit rate, sent frame rate, encoded frame rate, network quality, etc. @param streamId The ID of the stream, used to identify a specific local stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param stats Audio & video stream and network status statistics. See LocalStreamStats{@link #LocalStreamStats}.
getter/setter pair
onNetworkQuality FutureOr<void> Function(NetworkQualityStats localQuality, List<NetworkQualityStats> remoteQualities)?
@detail callback @author chengchao.cc951119 @brief Report the network quality of the users every 2s after the local user joins the room and starts publishing or subscribing to a stream. @param localQuality Local network quality. Refer to NetworkQualityStats{@link #NetworkQualityStats} for details. @param remoteQualities Network quality of the subscribed users. Refer to NetworkQualityStats{@link #NetworkQualityStats} for details. @note See In-call Stats for more information.
getter/setter pair
onPublishPrivilegeTokenWillExpire FutureOr<void> Function()?
@detail callback @author qipengxiang @brief Callback triggered 30s before the publishing privilege of the Token expires.
After receiving this callback, you must call updateToken{@link #RTSRoom#updateToken} to update the publishing privilege Token. @note Once a user's publishing privilege expires:
- Either during stream publishing or when attempting to publish a stream, the user will get the notification of kPublishStateChangeReasonNoPublishPermission via onVideoPublishStateChanged{@link #IRTCRoomEventHandler#onVideoPublishStateChanged}, onAudioPublishStateChanged{@link #IRTCRoomEventHandler#onAudioPublishStateChanged}. - The publishing streams of the user will be removed, and remote users in the room will get informed via onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo}, onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio}.
getter/setter pair
onRemoteStreamStats FutureOr<void> Function(String streamId, StreamInfo streamInfo, RemoteStreamStats stats)?
@detail callback @author yejing @brief Remote audio/video stream statistics and network quality callbacks for local subscriptions.
After the local user subscribes to the stream successfully, the SDK will periodically (2s) notify the user through this callback event of the quality statistics of the subscribed stream during this reference period, including: sending audio & video bit rate, sending frame rate, encoded frame rate, network quality, etc. @param streamId The ID of the stream, used to identify a specific remote stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param stats Audio & video stream and network status statistics. See RemoteStreamStats{@link #RemoteStreamStats}.
getter/setter pair
onRoomBinaryMessageReceived FutureOr<void> Function(int msgid, String uid, Uint8List message)?
@detail callback @author hanchenchen.c @brief > This callback will be deprecated since version 3.64. Use onRoomBinaryMessageReceived{@link #IRTCRoomEventHandler#onRoomBinaryMessageReceived-2} instead. @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.
getter/setter pair
onRoomEvent FutureOr<void> Function(String roomId, String uid, RoomEvent state, RoomEventInfo info)?
@hidden @detail callback @valid since 3.60. @region Multi-room @author shenpengliang @brief Callback on room event. @param roomId Room ID. @param uid User ID. @param state Room event code. See RoomEvent{@link #RoomEvent}. @param info When room is forbidden, it contains forbidden time. See RoomEventInfo{@link #RoomEventInfo}.
getter/setter pair
onRoomExtraInfoUpdate FutureOr<void> Function(String key, String value, String lastUpdateUserId, int lastUpdateTimeMs)?
@valid since 3.52 @detail callback @author lichangfeng.rtc @brief Callback used to receive the extra information set by the other users in the same room with setRoomExtraInfo{@link #RTCRoom#setRoomExtraInfo}. @param key Key of the extra information. @param value Content of the extra information. @param lastUpdateUserId The ID of the last user who updated this information. @param lastUpdateTimeMs The Unix time in ms when this information was last updated.
getter/setter pair
onRoomMessageReceived FutureOr<void> Function(int msgid, String uid, String message)?
@detail callback @author hanchenchen.c @brief > This callback will be deprecated since version 3.64. Use onRoomMessageReceived{@link #IRTCRoomEventHandler#onRoomMessageReceived-2} instead. @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.
getter/setter pair
onRoomMessageSendResult FutureOr<void> Function(int msgid, RoomMessageSendResult error)?
@detail callback @author hanchenchen.c @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}
getter/setter pair
onRoomStateChanged FutureOr<void> Function(String roomId, String uid, int state, String extraInfo)?
@detail callback @region Multi-room @author shenpengliang @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.
getter/setter pair
onRoomStateChangedWithReason FutureOr<void> Function(String roomId, String uid, RoomState state, RoomStateChangeReason reason)?
@hidden @detail callback @author shenpengliang @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. See RoomState{@link #RoomState}.
- 0: Join room success. - 1: Failed to join a room, abnormal exit, room-related warnings or errors. - 2: Leave room. @param reason The reason why room state changes. See RoomStateChangeReason{@link #RoomStateChangeReason}.
getter/setter pair
onRoomStats FutureOr<void> Function(RTCRoomStats stats)?
@detail callback @author yejing @brief Room call statistics callback.
After the user enters the room and starts the call, he receives this callback every 2s. @param stats Summary statistics in the room. See RTCRoomStats{@link #RTCRoomStats}.
getter/setter pair
onRoomStreamExtraInfoUpdate FutureOr<void> Function(String streamId, StreamInfo streamInfo, String extraInfo)?
@valid since 3.54 @detail callback @brief Callback used to receive the extra information set by the other users in the same room with setStreamExtraInfo{@link #RTCRoom#setStreamExtraInfo}. @param streamId Stream ID of the extra information. @param streamInfo Stream information of the extra information. @param extraInfo Extra information. @note The new user who enters the room will receive the notification of all the extra information in the room.
getter/setter pair
onRoomWarning FutureOr<void> Function(RTCRoom rtcRoom, WarningCode? warningCode)?
@hidden @deprecated since 3.45 and will be deleted in 3.51, user onRoomStateChanged{@link #IRTCRoomEventHandler#onRoomStateChanged} and onStreamStateChanged instead. @detail callback @author shenpengliang @brief Warning callback occurred. @param warn Warning code. See WarningCode{@link #WarningCode} @note SDK A (network or media-related) warning occurred at the runtime. The SDK usually recovers automatically and warnings can be ignored.
getter/setter pair
onSetRoomExtraInfoResult FutureOr<void> Function(int taskId, SetRoomExtraInfoResult result)?
@valid since 3.52 @detail callback @author lichangfeng.rtc @brief Callback on the result of calling setRoomExtraInfo{@link #RTCRoom#setRoomExtraInfo} to set extra information about the room. @param taskId The task ID of the API call. @param result See SetRoomExtraInfoResult{@link #SetRoomExtraInfoResult} for the setting results and reasons.
getter/setter pair
onStreamPublishSuccess FutureOr<void> Function(bool isScreen)?
@hidden for internal use only @detail callback @author shenpengliang @brief Callback when publishing stream is successful @param uid Stream publishing user's user ID @param isScreen Stream identity
getter/setter pair
onStreamStateChanged FutureOr<void> Function(String roomId, String uid, int state, String extraInfo)?
@detail callback @author shenpengliang @brief Callback on stream state changes. You will receive this callback when you receive stream relating warnings and errors. @param roomId Room ID. @param uid User ID. @param state Room state code. See ErrorCode{@link #ErrorCode} and WarningCode{@link #WarningCode} for specific indications. @param extraInfo Extra information. Currently unavailable.
getter/setter pair
onStreamSubscribed FutureOr<void> Function(SubscribeState stateCode, String userId, SubscribeConfig info)?
@platform android @detail callback @author shenpengliang @brief Callback on subscription status of media streams @param stateCode Subscription status of media streams, see SubscribeState{@link #SubscribeState}. @param userId The ID of the user who published the stream. @param info Configurations of stream subscription, see SubscribeConfig{@link #SubscribeConfig}. @note Local users will receive this callback: After calling subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo} to change the subscription status of remote media streams captured by camera/microphone.
getter/setter pair
onSubscribePrivilegeTokenWillExpire FutureOr<void> Function()?
@detail callback @author qipengxiang @brief Callback triggered 30s before the subscribing privilege of the Token expires.
After receiving this callback, you must call updateToken{@link #RTSRoom#updateToken} to update the subscribing privilege Token. @note After a user's subscribing privilege expires, the user will fail to subscribe to new streams, or the subscribed streams will be removed, and he/she will receive onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}, onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged} with error code "-1003" indicating no permission to subscribe to streams.
getter/setter pair
onSubtitleMessageReceived FutureOr<void> Function(List<SubtitleMessage> subtitles)?
@hidden currently not available @detail callback @author qiaoxingwang @brief Callback on subtitle messages.
After calling startSubtitle{@link #RTCRoom#startSubtitle} successfully, you will receive this callback which informs you of the related information on subtitles. @param subtitles Subtitle messages. Refer to SubtitleMessage{@link #SubtitleMessage} for details.
getter/setter pair
onSubtitleStateChanged FutureOr<void> Function(SubtitleState state, SubtitleErrorCode errorCode, String errorMessage)?
@hidden currently not available @detail callback @author qiaoxingwang @brief Callback on subtitle states.
After you call startSubtitle{@link #RTCRoom#startSubtitle} and stopSubtitle{@link #RTCRoom#stopSubtitle}, you will receive this callback which informs you of the states and error codes of the subtitling task, as well as detailed information on the third party services' errors. @param state The states of subtitles. Refer to SubtitleState{@link #SubtitleState} for details. @param errorCode Error codes of the subtitling task. Refer to SubtitleErrorCode{@link #SubtitleErrorCode}. @param errorMessage Detailed information on the third party services' errors.
getter/setter pair
onTokenWillExpire FutureOr<void> Function()?
@detail callback @author shenpengliang @brief The callback is triggered when the SDK detects the joining room privilege from the Token will expires within 30s. After receiving this callback, you must call updateToken{@link #RTSRoom#updateToken} to update the joining room privilege Token. @note After a user's joining room privilege expires:
- When attempting to join a room, the user will receive onRoomStateChanged{@link #IRTCRoomEventHandler#onRoomStateChanged} with the error code "-1000" indicating that the Token is invalid. - If the user is already in the room, he/she will be removed from the room and receive onRoomStateChanged{@link #IRTCRoomEventHandler#onRoomStateChanged} with the error code "-1009" indicating that the Token is expired. Remote users in the room will receive onUserLeave{@link #IRTCRoomEventHandler#onUserLeave} with the reason 1 indicating that the Token is invalid. @order 10
getter/setter pair
onUserBinaryMessageReceived FutureOr<void> Function(int msgid, String uid, Uint8List message)?
@detail callback @author hanchenchen.c @brief > This callback will be deprecated since version 3.64. Use onUserBinaryMessageReceived{@link #IRTCRoomEventHandler#onUserBinaryMessageReceived-2} instead. @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.
getter/setter pair
onUserJoined FutureOr<void> Function(UserInfo userInfo)?
@detail callback @author shenpengliang @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}.
getter/setter pair
onUserLeave FutureOr<void> Function(String uid, int reason)?
@detail callback @author shenpengliang @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.
getter/setter pair
onUserMessageReceived FutureOr<void> Function(int msgid, String uid, String message)?
@detail callback @author hanchenchen.c @brief > This callback will be deprecated since version 3.64. Use onUserMessageReceived{@link #IRTCRoomEventHandler#onUserMessageReceived-2} instead. @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.
getter/setter pair
onUserMessageSendResult FutureOr<void> Function(int msgid, UserMessageSendResult error)?
@detail callback @author hanchenchen.c @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.
getter/setter pair
onUserPublishStreamAudio FutureOr<void> Function(String streamId, StreamInfo streamInfo, bool isPublish)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces the onUserPublishStream and onUserUnpublishStream methods for the functions described below. If you have upgraded to SDK version 3.60 or later and are still using these methods, please migrate to this callback. @brief Callback on a remote user publishing or stopping publishing remote microphone-audio streams in the room. @param streamId The ID of the stream, used to identify a specific microphone - captured audio stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param isPublish Whether the remote user has published the microphone-audio stream. + true: Published. + false: Stopped publishing/Unpublished. @note You will receive this callback after a remote user publishes or stops publishing media streams captured by microphone in the room with publishStreamAudio{@link #RTCRoom#publishStreamAudio}. Then you can choose whether to call subscribeStreamAudio{@link #RTCRoom#subscribeStreamAudio} to subscribe to or unsubscribe from the streams.
getter/setter pair
onUserPublishStreamVideo FutureOr<void> Function(String streamId, StreamInfo streamInfo, bool isPublish)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces the onUserPublishStream, onUserUnpublishStream, onUserPublishScreen, and onUserUnpublishScreen methods for the functions described below. If you have upgraded to SDK version 3.60 or later and are still using these methods, please migrate to this callback. @brief Callback on a remote user publishing or stopping publishing video streams in the room. @param streamId The ID of the stream, used to identify a specific video stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param isPublish Whether the remote user has published the video stream. + true: Published. + false: Unpblished. @note You will receive this callback after a remote user publishes or stops publishing video streams in the room with publishStreamVideo{@link #RTCRoom#publishStreamVideo}. Then you can choose whether to call subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo} to subscribe to or unsubscribe from the streams.
getter/setter pair
onUserVisibilityChanged FutureOr<void> Function(bool currentUserVisibility, UserVisibilityChangeError errorCode)?
@valid since 3.54 @detail callback @author caocun @brief Callback for user to set user visibility by calling setUserVisibility{@link #RTCRoom#setUserVisibility}. @param currentUserVisibility Visibility of the current user.
- true: Visible. The user can publish media streams. The other users in the room get informed of the behaviors of the user, such as joining room, starting video capture, and leaving room. - false: Invisible. The user cannot publish media streams. The other users in the room do not get informed of the behaviors of the user, such as joining room, starting video capture, or leaving room. @param errorCode Error code for setting user visibility. See UserVisibilityChangeError{@link #UserVisibilityChangeError}.
getter/setter pair
onVideoPublishStateChanged FutureOr<void> Function(String streamId, PublishState state, PublishStateChangeReason reason)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces onStreamStateChanged for reporting video publishing state changes. If you have upgraded to SDK version 3.60 or later and are still using this method, please migrate to this callback. @author xuyiling.x10 @brief Callback on video publishing state change. @param streamId The ID of the stream, used to identify a specific video stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param state Publish state code. See PublishState{@link #PublishState}. @param reason The reason for the change of the publishing state of the local video stream. See PublishStateChangeReason{@link #PublishStateChangeReason}. @order 0
getter/setter pair
onVideoStreamBanned FutureOr<void> Function(String uid, bool banned)?
@detail callback @author qipengxiang @brief All the users in the room will get informed via this callback when a user is banned or the ban of the user has been lifted by calling BanUserStream/UnbanUserStream on the server side. @param uid Disabled/unbanned video stream user ID @param banned Video stream sending status
- true: Video stream sending is disabled - false: Video stream sending is unbanned @note - When the specified user in the room is banned/unbanned video stream sending, all users in the room will receive the callback. - If the banned user leaves or disconnects and then rejoins the room, the user is still banned from publishing audio stream, and all users in the room will be informed via the callback. - After the specified user is banned, other users in the room will check out and enter the room again, and will receive the callback again. - After the same room is disbanded and created again, the status in the room is cleared.
getter/setter pair
onVideoSubscribeStateChanged FutureOr<void> Function(String streamId, SubscribeState state, SubscribeStateChangeReason reason)?
@detail callback @valid since 3.60. Since version 3.60, this callback replaces onStreamStateChanged and onStreamSubscribed for reporting the state changes of the subscription to camera-video streams. If you have upgraded to SDK version 3.60 or later and are still using this two methods, please migrate to this callback. @brief Callback on state changes of the subscription to camera-video streams. @param streamId The ID of the stream, used to identify a specific video stream. @param streamInfo The stream information structure, containing detailed information such as room ID and user ID. See StreamInfo{@link #StreamInfo}. @param state Room state code. See SubscribeState{@link #SubscribeState} for more. @param reason See SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for more. @note You will receive this callback after calling subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo}.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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