ByteRTCRoomDelegate class
- Inheritance
-
- Object
- NativeClass
- NativeObserverClass
- ByteRTCRoomDelegate
- Implementers
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
-
onPublishPrivilegeTokenWillExpire(ByteRTCRoom rtcRoom)
→ FutureOr<void>
-
@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 #ByteRTCRTSRoom#updateToken} to update the publishing privilege Token.
@param rtcRoom ByteRTCRoom object.
@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 rtcRoom:onVideoPublishStateChanged:info:state:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onVideoPublishStateChanged:info:state:reason}, rtcRoom:onAudioPublishStateChanged:info:state:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onAudioPublishStateChanged:info:state:reason}.
- The publishing streams of the user will be removed, and remote users in the room will get informed via rtcRoom:onUserPublishStreamVideo:info:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}, rtcRoom:onUserPublishStreamAudio:info:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamAudio:info:isPublish}.
@order 15
-
onSubscribePrivilegeTokenWillExpire(ByteRTCRoom rtcRoom)
→ FutureOr<void>
-
@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 #ByteRTCRTSRoom#updateToken} to update the subscribing privilege Token.
@param rtcRoom ByteRTCRoom object.
@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 rtcRoom:onVideoSubscribeStateChanged:info:state:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onVideoSubscribeStateChanged:info:state:reason}, rtcRoom:onAudioSubscribeStateChanged:info:state:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onAudioSubscribeStateChanged:info:state:reason}, rtcRoom:onScreenVideoSubscribeStateChanged:userId:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onScreenVideoSubscribeStateChanged:userId:state:reason}, and/or rtcRoom:onScreenAudioSubscribeStateChanged:userId:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onScreenAudioSubscribeStateChanged:userId:state:reason} with error code "-1003" indicating no permission to subscribe to streams.
-
onTokenWillExpire(ByteRTCRoom rtcRoom)
→ FutureOr<void>
-
@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 #ByteRTCRTSRoom#updateToken} to update the joining room privilege Token.
@param rtcRoom ByteRTCRoom object.
@note After a user's joining room privilege expires:
- When attempting to join a room, the user will receive rtcRoom:onRoomStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomStateChanged:withUid:state:extraInfo}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 rtcRoom:onRoomStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomStateChanged:withUid:state:extraInfo} with the error code "-1009" indicating that the Token is expired. Remote users in the room will receive rtcRoom:onUserLeave:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onUserLeave:reason} with the reason "2" indicating that the Token is invalid.
@order 10
-
registerEvent(String name, dynamic method)
→ void
-
inherited
-
rtcRoom$onAudioPublishStateChanged$info$state$reason(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@detail callback
brief Callback on the publishing state change of the audio stream.
@param rtcRoom The ByteRTCRoom instance.
@param streamId Stream ID.
@param info Stream information.
@param state Room state code. See ByteRTCPublishState{@link #ByteRTCPublishState} for more.
@param reason See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason} for more.
-
rtcRoom$onAudioStreamBanned$isBanned(ByteRTCRoom rtcRoom, NSString uid, BOOL banned)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCRoom object.
@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.
-
rtcRoom$onAudioSubscribeStateChanged$info$state$reason(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@detail callback
brief Callback on the subscribing state change of the audio stream.
@param rtcRoom The ByteRTCRoom instance.
@param streamId Stream ID.
@param info Stream information.
@param state Room state code. See ByteRTCSubscribeState{@link #ByteRTCSubscribeState} for more.
@param reason See ByteRTCSubscribeStateChangeReason{@link #ByteRTCSubscribeStateChangeReason} for more.
-
rtcRoom$onAVSyncEvent$userId$eventCode(ByteRTCRoom rtcRoom, NSString roomId, NSString userId, ByteRTCAVSyncEvent eventCode)
→ FutureOr<void>
-
@detail callback
@valid since 3.60.
@brief Stream publisher will receive this callback when the A/V synchronization error occurs after setMultiDeviceAVSync:{@link #ByteRTCRoom#setMultiDeviceAVSync} is called.
@param rtcRoom ByteRTCRoom object
@param roomId Room ID.
@param userId User ID.
@param eventCode A/V synchronization error, see ByteRTCAVSyncEvent{@link #ByteRTCAVSyncEvent}.
-
rtcRoom$onAVSyncStateChange(ByteRTCRoom rtcRoom, ByteRTCAVSyncState state)
→ FutureOr<void>
-
@detail callback
@author wangzhanqiang
@brief Stream publisher will receive this callback when the A/V synchronization state changes after setMultiDeviceAVSync:{@link #ByteRTCRoom#setMultiDeviceAVSync} is called.
@param rtcRoom The ByteRTCRoom instance.
@param state A/V synchronization state, see ByteRTCAVSyncState{@link #ByteRTCAVSyncState}.
-
rtcRoom$onForwardStreamEvent(ByteRTCRoom rtcRoom, NSArray<ByteRTCForwardStreamEventInfo> infos)
→ FutureOr<void>
-
@detail callback
@author shenpengliang
@brief Callback returning the events during relaying the media stream to each room
@param rtcRoom RTCRoom object
@param infos Array of the event of each designated room. Refer to ByteRTCForwardStreamEventInfo{@link #ByteRTCForwardStreamEventInfo} for more information.
-
rtcRoom$onForwardStreamStateChanged(ByteRTCRoom rtcRoom, NSArray<ByteRTCForwardStreamStateInfo> infos)
→ FutureOr<void>
-
@detail callback
@author shenpengliang
@brief Callback returning the state and errors during relaying the media stream to each of the rooms
@param rtcRoom ByteRTCRoom object
@param infos Array of the state and errors of each designated room. Refer to ByteRTCForwardStreamStateInfo{@link #ByteRTCForwardStreamStateInfo} for more information.
-
rtcRoom$onLeaveRoom(ByteRTCRoom rtcRoom, ByteRTCRoomStats stats)
→ FutureOr<void>
-
@detail callback
@region Multiple rooms
@author shenpengliang
@brief Leave the room successfully callback.
When the user calls the leaveRoom{@link #ByteRTCRoom#leaveRoom} method, the SDK stops all publish subscription streams and releases all call-related audio & video resources. This callback notifies the user when the SDK completes all resource releases.
@param rtcRoom ByteRTCRoom object.
@param stats Reserved parameter.
@note
- After the user calls the leaveRoom{@link #ByteRTCRoom#leaveRoom} method to leave the room, if destroy{@link #ByteRTCRoom#destroy} is called to destroy the room instance or destroyRTCEngine{@link #ByteRTCEngine#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.
-
rtcRoom$onLocalStreamStats$info$stats(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCLocalStreamStats stats)
→ FutureOr<void>
-
@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 ByteRTCLocalStreamStats{@link #ByteRTCLocalStreamStats} type, including the sent audio & video bit rate, sent frame rate, encoded frame rate, network quality, etc.
@param rtcRoom ByteRTCRoom object.
@param streamId Stream ID.
@param info Stream information.
@param stats Current room local stream data statistics. See: ByteRTCLocalStreamStats{@link #ByteRTCLocalStreamStats}
-
rtcRoom$onNetworkQuality$remoteQualities(ByteRTCRoom rtcRoom, ByteRTCNetworkQualityStats localQuality, NSArray<ByteRTCNetworkQualityStats> remoteQualities)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCRoom object
@param localQuality Local network quality. Refer to ByteRTCNetworkQualityStats{@link #ByteRTCNetworkQualityStats}.
@param remoteQualities Network quality of the subscribed users. Refer to ByteRTCNetworkQualityStats{@link #ByteRTCNetworkQualityStats} for details.
@note See In-call Stats for more information.
-
rtcRoom$onRemoteStreamStats$info$stats(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCRemoteStreamStats stats)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCRoom object.
@param streamId Stream ID.
@param info Stream information.
@param stats Current room local stream statistics. See: ByteRTCRemoteStreamStats{@link #ByteRTCRemoteStreamStats}
-
rtcRoom$onRoomBinaryMessageReceived$message(ByteRTCRoom rtcRoom, NSString uid, NSData message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief > This interface will be deprecated since version 3.64. Use onRoomBinaryMessageReceived:uid:message:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomBinaryMessageReceived:uid:message} instead.
@brief Receive this callback when you receive a broadcast binary message sent by the room call sendRoomBinaryMessage:{@link #ByteRTCRoom#sendRoomBinaryMessage}.
@param rtcRoom ByteRTCRoom object
@param uid User ID of the message sender.
@param message The binary message content received.
-
rtcRoom$onRoomBinaryMessageReceived$uid$message(ByteRTCRoom rtcRoom, NSInteger msgid, NSString uid, NSData message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive this callback when you receive a broadcast binary message sent by the room call sendRoomBinaryMessage:{@link #ByteRTCRoom#sendRoomBinaryMessage}.
@param rtcRoom ByteRTCRoom object
@param msgid Message number.
@param uid User ID of the message sender.
@param message The binary message content received.
-
rtcRoom$onRoomEvent$uid$state$info(ByteRTCRoom rtcRoom, NSString roomId, NSString uid, ByteRTCRoomEvent state, ByteRTCRoomEventInfo info)
→ FutureOr<void>
-
@hidden
@detail callback
@valid since 3.60.
@region Multi-room
@author shenpengliang
@brief Callback on room event.
@param rtcRoom ByteRTCRoom object.
@param roomId Room ID.
@param uid User ID.
@param state Room event code. See ByteRTCRoomEvent{@link #ByteRTCRoomEvent}.
@param info When room is forbidden, it contains forbidden time. See ByteRTCRoomEventInfo{@link #ByteRTCRoomEventInfo}.
-
@valid since 3.52.
@detail callback
@author lichangfeng.rtc
@brief Receive a callback when other user invoke setRoomExtraInfo:value:{@link #ByteRTCRoom#setRoomExtraInfo:value} .
or when user joinRoom success and this room has room extra info.
@param rtcRoom ByteRTCRoom object.
@param key Key of room attribute
@param value Key of room attribute
@param lastUpdateUserId The userId that last updated this attribute
@param lastUpdateTimeMs The last time this attribute was updated, in milliseconds,unixtime style
-
rtcRoom$onRoomMessageReceived$message(ByteRTCRoom rtcRoom, NSString uid, NSString message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief > This interface will be deprecated since version 3.64. Use onRoomMessageReceived:uid:message:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomMessageReceived:uid:message} instead.
@brief Receive this callback when you receive a broadcast text message from the room called sendRoomMessage:{@link #ByteRTCRoom#sendRoomMessage}.
@param rtcRoom ByteRTCRoom object
@param uid User ID of the message sender.
@param message The content of the received text message.
-
rtcRoom$onRoomMessageReceived$uid$message(ByteRTCRoom rtcRoom, NSInteger msgid, NSString uid, NSString message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive this callback when you receive a broadcast text message from the room called sendRoomMessage:{@link #ByteRTCRoom#sendRoomMessage}.
@param rtcRoom ByteRTCRoom object
@param msgid Message number.
@param uid User ID of the message sender.
@param message The content of the received text message.
-
rtcRoom$onRoomMessageSendResult$error(ByteRTCRoom rtcRoom, NSInteger msgid, ByteRTCRoomMessageSendResult error)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receives this callback after sending a text message or a binary message to a room with sendRoomMessage:{@link #ByteRTCRoom#sendRoomMessage} or sendRoomBinaryMessage:{@link #ByteRTCRoom#sendRoomBinaryMessage}.
@param rtcRoom ByteRTCRoom object.
@param msgid The ID of this message.
@param error Message sending results. See ByteRTCRoomMessageSendResult{@link #ByteRTCRoomMessageSendResult}
@note
- You should call sendRoomMessage:{@link #ByteRTCRoom#sendRoomMessage} Send a mass text message to the room
- You should call sendRoomBinaryMessage:{@link #ByteRTCRoom#sendRoomBinaryMessage} Send a mass binary message to the room
-
@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 rtcRoom ByteRTCAudioRoom instance
@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 ByteRTCErrorCode{@link #ByteRTCErrorCode} and ByteRTCWarningCode{@link #ByteRTCWarningCode} 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:userInfo:userVisibility:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:userVisibility:roomConfig} to successfully joining room, in ms.
-
rtcRoom$onRoomStateChangedWithReason$withUid$state$reason(ByteRTCRoom rtcRoom, NSString roomId, NSString uid, ByteRTCRoomState state, ByteRTCRoomStateChangeReason reason)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCAudioRoom instance
@param roomId Room ID.
@param uid User ID.
@param state Room state code.
- 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 ByteRTCRoomStateChangeReason{@link #ByteRTCRoomStateChangeReason}.
-
rtcRoom$onRoomStats(ByteRTCRoom rtcRoom, ByteRTCRoomStats stats)
→ FutureOr<void>
-
@detail callback
@author yejing
@brief In-room call statistics callback.
After the user enters the room and starts the call, he receives this callback every 2s.
@param rtcRoom ByteRTCRoom object.
@param stats Current ByteRTCRoom statistics, see: ByteRTCRoomStats{@link #ByteRTCRoomStats}
-
@valid since 3.54
@detail callback
@brief Receive the extra information set by the other users in the same room with setStreamExtraInfo:{@link #ByteRTCRoom#setStreamExtraInfo}.
@param rtcRoom ByteRTCRoom object.
@param streamId Stream ID of the extra information.
@param streamInfo Stream information of the extra information.
@param extraInfo Extra information.
-
rtcRoom$onRoomWarning(ByteRTCRoom rtcRoom, ByteRTCWarningCode warningCode)
→ FutureOr<void>
-
@hidden
@deprecated since 3.45 and will be deleted in 3.51, use rtcRoom:onRoomStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomStateChanged:withUid:state:extraInfo} and rtcRoom:onStreamStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onStreamStateChanged:withUid:state:extraInfo} instead.
@detail callback
@author shenpengliang
@brief Warning callback occurred.
A warning occurred during the SDK runtime. The SDK usually recovers automatically and warnings can be ignored.
@param rtcRoom ByteRTCRoom object.
@param warningCode Warning code. See enumeration type ByteRTCWarningCode{@link #ByteRTCWarningCode}.
-
@valid since 3.52.
@detail callback
@author lichangfeng.rtc
@brief Receives this callback after invoke setRoomExtraInfo:value:{@link #ByteRTCRoom#setRoomExtraInfo:value}.
@param rtcRoom ByteRTCRoom object.
@param taskId The ID of this setRoomExtraInfo invoke.
@param result setRoomExtraInfo result. See ByteRTCSetRoomExtraInfoResult{@link #ByteRTCSetRoomExtraInfoResult}
-
rtcRoom$onStreamAdd(ByteRTCRoom rtcRoom, id<ByteRTCStream> stream)
→ FutureOr<void>
-
@deprecated since 3.45 and will be deleted in 3.51, use rtcRoom:onUserPublishStreamVideo:info:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}instead.
@detail callback
@author shenpengliang
@brief The following conditions trigger this callback:
- When users in the room post a new audio & video stream, other users in the room will receive this callback notification.
- When the user's original audio and video stream in the room is removed and the audio & video stream is republished, other users in the room will receive this callback notification.
- When the user first joins the room, he receives this callback, including all published streams in the room.
@param rtcRoom ByteRTCRoom object.
@param stream Stream property. See ByteRTCStream{@link #ByteRTCStream}.
-
rtcRoom$onStreamPublishSuccess$isScreen(ByteRTCRoom rtcRoom, NSString userId, BOOL isScreen)
→ FutureOr<void>
-
@hidden for internal use only
@detail callback
@region multiroom
@author shenpengliang
@brief Callback the event
@param rtcRoom ByteRTCRoom object when the release stream is successful.
@param userId User ID
@param isScreen Whether the stream is a screen stream
-
rtcRoom$onStreamRemove$stream$reason(ByteRTCRoom rtcRoom, NSString uid, id<ByteRTCStream> stream, ByteRTCStreamRemoveReason reason)
→ FutureOr<void>
-
@hidden
@deprecated since 3.45 and will be deleted in 3.51, use rtcRoom:onUserUnpublishStream:type:reason: instead.
@detail callback
@author shenpengliang
@brief When a remote user in the room stops publishing audio & video streams, local users will receive this callback notification.
@param rtcRoom ByteRTCRoom object
@param uid User ID of the remote stream source.
@param stream The properties of the stream. See ByteRTCStream{@link #ByteRTCStream}.
@param reason For reasons of remote stream removal. See ByteRTCStreamRemoveReason{@link #ByteRTCStreamRemoveReason}.
-
@deprecated since 3.60, refer to Upgrade Guide for more.
@detail callback
@author shenpengliang
@brief Callback on stream state changes. The user will receive this callback when they receive stream relating warnings and errors.
@param rtcRoom ByteRTCRoom object.
@param roomId Room ID.
@param uid User ID.
@param state Room state code. See ByteRTCErrorCode{@link #ByteRTCErrorCode} and ByteRTCWarningCode{@link #ByteRTCWarningCode} for specific indications.
@param extraInfo Extra information. Currently unavailable.
-
rtcRoom$onSubtitleMessageReceived(ByteRTCRoom rtcRoom, NSArray<ByteRTCSubtitleMessage> subtitles)
→ FutureOr<void>
-
@hidden currently not available
@detail callback
@author qiaoxingwang
@brief Callback on subtitle messages.
After calling startSubtitle:{@link #ByteRTCRoom#startSubtitle}, you will receive this callback which informs you of the related information on subtitles.
@param rtcRoom ByteRTCRoom instance.
@param subtitles Subtitle messages. Refer to ByteRTCSubtitleMessage{@link #ByteRTCSubtitleMessage} for details.
-
rtcRoom$onSubtitleStateChanged$errorCode$errorMessage(ByteRTCRoom rtcRoom, ByteRTCSubtitleState state, ByteRTCSubtitleErrorCode errorCode, NSString errorMessage)
→ FutureOr<void>
-
@hidden currently not available
@detail callback
@author qiaoxingwang
@brief Callback on subtitle states.
After you call startSubtitle:{@link #ByteRTCRoom#startSubtitle} and stopSubtitle{@link #ByteRTCRoom#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 rtcRoom ByteRTCRoom instance.
@param state The states of subtitles. Refer to ByteRTCSubtitleState{@link #ByteRTCSubtitleState} for details.
@param errorCode Error codes of the subtitling task. Refer to ByteRTCSubtitleErrorCode{@link #ByteRTCSubtitleErrorCode} for details.
@param errorMessage Detailed information on the third party services' errors. If the states of subtitles are changed due to the third party services, you will receive this parameter which informs you of the detailed information on the third party services' errors.
-
rtcRoom$onUserBinaryMessageReceived$message(ByteRTCRoom rtcRoom, NSString uid, NSData message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief > This interface will be deprecated since version 3.64. Use onUserBinaryMessageReceived:uid:message:{@link #ByteRTCRoomDelegate#rtcRoom:onUserBinaryMessageReceived:uid:message} instead.
@brief Receive a binary message from another user in the room via sendUserBinaryMessage:message:config:{@link #ByteRTCRTSRoom#sendUserBinaryMessage:message:config} Receive this callback.
@param rtcRoom ByteRTCRoom object
@param uid The user ID of the sender of the message.
@param message The binary message content received.
-
rtcRoom$onUserBinaryMessageReceived$uid$message(ByteRTCRoom rtcRoom, NSInteger msgid, NSString uid, NSData message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive a binary message from another user in the room via sendUserBinaryMessage:message:config:{@link #ByteRTCRTSRoom#sendUserBinaryMessage:message:config} Receive this callback.
@param rtcRoom ByteRTCRoom object
@param msgid Message number.
@param uid The user ID of the sender of the message.
@param message The binary message content received.
-
rtcRoom$onUserJoined(ByteRTCRoom rtcRoom, ByteRTCUserInfo userInfo)
→ FutureOr<void>
-
@detail callback
@author shenpengliang
@brief Callback for when a remote visible user joins the room, or when an invisible user in the room switches to being visible.
1. When a remote user sets themselves to be visible by calling the setUserVisibility:{@link #ByteRTCRoom#setUserVisibility} method and then joins the room, other users in the room will receive this event.
2. When a remote visible user who has been disconnected re-enters the room, other users in the room will receive this event.
3. When a hidden remote user in the room switches to being visible by calling the setUserVisibility:{@link #ByteRTCRoom#setUserVisibility} method, other users in the room will receive this event.
4. A new user entering the room will receive an entry callback notification for visible users who were already in the room before they entered.
@param rtcRoom ByteRTCRoom object.
@param userInfo For user information. See ByteRTCUserInfo{@link #ByteRTCUserInfo}.
-
rtcRoom$onUserLeave$reason(ByteRTCRoom rtcRoom, NSString uid, ByteRTCUserOfflineReason reason)
→ FutureOr<void>
-
@detail callback
@author shenpengliang
@brief This callback is triggered when a remote user is disconnected or turns invisible.
@param rtcRoom ByteRTCRoom object.
@param uid ID of the user who leaves the RTC room, or switches to invisible.
@param reason Reason to leave the room:
- 0: The remote client calls leaveRoom{@link #ByteRTCRoom#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 #ByteRTCRoom#setUserVisibility} to turn invisible.
- 3: The remote user has been removed from the room by the administrator via a OpenAPI call.
-
rtcRoom$onUserMessageReceived$message(ByteRTCRoom rtcRoom, NSString uid, NSString message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief > This interface will be deprecated since version 3.64. Use onUserMessageReceived:uid:message:{@link #ByteRTCRoomDelegate#rtcRoom:onUserMessageReceived:uid:message} instead.
@brief Receive text messages (P2P) from other users in the room via sendUserMessage:message:config:{@link #ByteRTCRTSRoom#sendUserMessage:message:config}.
@param rtcRoom ByteRTCRoom object
@param uid The user ID of the sender of the message.
@param message The content of the received text message.
-
rtcRoom$onUserMessageReceived$uid$message(ByteRTCRoom rtcRoom, NSInteger msgid, NSString uid, NSString message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive text messages (P2P) from other users in the room via sendUserMessage:message:config:{@link #ByteRTCRTSRoom#sendUserMessage:message:config}.
@param rtcRoom ByteRTCRoom object
@param msgid Message number.
@param uid The user ID of the sender of the message.
@param message The content of the received text message.
-
rtcRoom$onUserMessageSendResult$error(ByteRTCRoom rtcRoom, NSInteger msgid, ByteRTCUserMessageSendResult error)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief After sending a text or binary message (P2P) to a single user in the room, the message sender will receive a callback with the result of the message.
@param rtcRoom ByteRTCRoom object.
@param msgid The ID of this message.
@param error Message result. See ByteRTCUserMessageSendResult{@link #ByteRTCUserMessageSendResult}
@note
- You should call sendUserMessage:message:config:{@link #ByteRTCRTSRoom#sendUserMessage:message:config} to send a text message to a single user in the room
- You should call sendUserBinaryMessage:message:config:{@link #ByteRTCRTSRoom#sendUserBinaryMessage:message:config} to send a binary message to a single user in the room
-
rtcRoom$onUserPublishStreamAudio$info$isPublish(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, BOOL isPublish)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCRoom object.
@param streamId Stream ID.
@param info Stream information.
@param isPublish Whether the stream is published.
+ true: Published
+ false: Removed
@note You will receive this callback after a remote user successfully published media streams captured by camera/microphone in the room with publishStreamAudio:{@link #ByteRTCRoom#publishStreamAudio}. Then you can choose whether to call subscribeStreamAudio:subscribe:{@link #ByteRTCRoom#subscribeStreamAudio:subscribe} to subscribe to the streams or not.
-
rtcRoom$onUserPublishStreamVideo$info$isPublish(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, BOOL isPublish)
→ FutureOr<void>
-
@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 camera-video streams in the room.
@param rtcRoom ByteRTCRoom object.
@param streamId Stream ID.
@param info Stream information.
@param isPublish Whether the stream is published.
+ true: Published
+ false: Removed
@note You will receive this callback after a remote user successfully published media streams captured by camera/microphone in the room with publishStreamVideo:{@link #ByteRTCRoom#publishStreamVideo}. Then you can choose whether to call subscribeStreamVideo:subscribe:{@link #ByteRTCRoom#subscribeStreamVideo:subscribe} to subscribe to the streams or not.
-
rtcRoom$onUserVisibilityChanged$errorCode(ByteRTCRoom rtcRoom, BOOL currentUserVisibility, ByteRTCUserVisibilityChangeError errorCode)
→ FutureOr<void>
-
@valid since 3.54
@detail callback
@author caocun
@brief Callback for user to set user visibility by calling setUserVisibility:{@link #ByteRTCRoom#setUserVisibility}.
@param rtcRoom ByteRTCRoom object.
@param currentUserVisibility Visibility of the current user.
- YES: 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.
- NO: 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 ByteRTCUserVisibilityChangeError{@link #ByteRTCUserVisibilityChangeError}.
-
rtcRoom$onVideoPublishStateChanged$info$state$reason(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@detail callback
brief Callback on the publishing state change of the video stream.
@param rtcRoom The ByteRTCRoom instance.
@param streamId Stream ID.
@param info Stream information.
@param state Room state code. See ByteRTCPublishState{@link #ByteRTCPublishState} for more.
@param reason See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason} for more.
-
rtcRoom$onVideoStreamBanned$isBanned(ByteRTCRoom rtcRoom, NSString uid, BOOL banned)
→ FutureOr<void>
-
@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 rtcRoom ByteRTCRoom object.
@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.
-
rtcRoom$onVideoSubscribeStateChanged$info$state$reason(ByteRTCRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@detail callback
brief Callback on the publishing state change of the screen-recording stream.
@param rtcRoom The ByteRTCRoom instance.
@param streamId Stream ID.
@param info Stream information.
@param state Room state code. See ByteRTCPublishState{@link #ByteRTCPublishState} for more.
@param reason See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason} for more.
-
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