ByteRTCGameRoomDelegate class
- Inheritance
-
- Object
- NativeClass
- NativeObserverClass
- ByteRTCGameRoomDelegate
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(ByteRTCGameRoom 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 #ByteRTCGameRoom#updateToken} to update the publishing privilege Token.
@param rtcRoom ByteRTCGameRoom instance.
@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 #ByteRTCGameRoomDelegate#rtcRoom:onVideoPublishStateChanged:info:state:reason}, rtcRoom:onAudioPublishStateChanged:info:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onAudioPublishStateChanged:info:state:reason}, rtcRoom:onScreenVideoPublishStateChanged:userId:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onScreenVideoPublishStateChanged:userId:state:reason}, and/or rtcRoom:onScreenAudioPublishStateChanged:userId:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onScreenAudioPublishStateChanged:userId: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 #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}, rtcRoom:onUserPublishStreamAudio:info:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamAudio:info:isPublish}, rtcRoom:onUserPublishScreenVideo:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenVideo:uid:isPublish}, and/or rtcRoom:onUserPublishScreenAudio:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenAudio:uid:isPublish}.
@order 15
-
onSubscribePrivilegeTokenWillExpire(ByteRTCGameRoom 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 #ByteRTCGameRoom#updateToken} to update the subscribing privilege Token.
@param rtcRoom ByteRTCGameRoom instance.
@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:onStreamStateChanged:withUid:state:extraInfo:{@link #ByteRTCGameRoomDelegate#rtcRoom:onStreamStateChanged:withUid:state:extraInfo} with error code "-1003" indicating no permission to subscribe to streams.
-
onTokenWillExpire(ByteRTCGameRoom rtcRoom)
→ FutureOr<void>
-
@detail callback
@author luomingkang
@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 #ByteRTCGameRoom#updateToken} to update the joining room privilege Token.
@param rtcRoom ByteRTCGameRoom instance.
@note After a user's joining room privilege expires:
- When attempting to join a room, the user will receive rtcRoom:onRoomStateChangedWithReason:withUid:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onRoomStateChangedWithReason:withUid:state:reason} 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:onRoomStateChangedWithReason:withUid:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onRoomStateChangedWithReason:withUid:state:reason} with the error code "-1009" indicating that the Token is expired. Remote users in the room will receive rtcRoom:onUserLeave:reason:{@link #ByteRTCGameRoomDelegate#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(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@brief Audio publish state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param streamId Audio stream ID.
@param info Audio stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param state Audio publish state. See ByteRTCPublishState{@link #ByteRTCPublishState}.
@param reason Audio publish state change reason. See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason}.
@order 0
-
rtcRoom$onAudioStreamBanned$isBanned(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@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(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@brief Audio subscribe state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param streamId Audio stream ID.
@param info Audio stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param state Subscribe state. See ByteRTCSubscribeState{@link #ByteRTCSubscribeState}.
@param reason Subscribe state change reason. See ByteRTCSubscribeStateChangeReason{@link #ByteRTCSubscribeStateChangeReason}.
@order 0
-
rtcRoom$onAVSyncEvent$userId$eventCode(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param roomId Room ID.
@param userId User ID.
@param eventCode A/V synchronization error, see ByteRTCAVSyncEvent{@link #ByteRTCAVSyncEvent}.
@order 1
-
rtcRoom$onAVSyncStateChange(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param state A/V synchronization state, see ByteRTCAVSyncState{@link #ByteRTCAVSyncState}.
-
rtcRoom$onForwardStreamEvent(ByteRTCGameRoom rtcRoom, NSArray<ByteRTCForwardStreamEventInfo> infos)
→ FutureOr<void>
-
@detail callback
@author luomingkang
@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(ByteRTCGameRoom rtcRoom, NSArray<ByteRTCForwardStreamStateInfo> infos)
→ FutureOr<void>
-
@detail callback
@author luomingkang
@brief Callback returning the state and errors during relaying the media stream to each of the rooms
@param rtcRoom ByteRTCGameRoom instance.
@param infos Array of the state and errors of each designated room. Refer to ByteRTCForwardStreamStateInfo{@link #ByteRTCForwardStreamStateInfo} for more information.
-
rtcRoom$onLeaveRoom(ByteRTCGameRoom rtcRoom, ByteRTCRoomStats stats)
→ FutureOr<void>
-
@detail callback
@region Multiple rooms
@author luomingkang
@brief Leaves the game room successfully callback.
When the user calls the leaveRoom{@link #ByteRTCGameRoom#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 ByteRTCGameRoom instance.
@param stats Reserved parameter.
@note
- After the user calls the leaveRoom{@link #ByteRTCGameRoom#leaveRoom} method to leave the game room, if destroy{@link #ByteRTCGameRoom#destroy} is called to destroy the room instance 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 game 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(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param streamId Stream ID.
@param info Stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param stats Current room local stream data statistics. See: ByteRTCLocalStreamStats{@link #ByteRTCLocalStreamStats}
-
rtcRoom$onNetworkQuality$remoteQualities(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@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(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param streamId Stream ID.
@param info Stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param stats Current room remote stream statistics. See: ByteRTCRemoteStreamStats{@link #ByteRTCRemoteStreamStats}.
-
rtcRoom$onRoomBinaryMessageReceived$message(ByteRTCGameRoom rtcRoom, 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.
@param rtcRoom ByteRTCGameRoom instance.
@param uid User ID of the message sender.
@param message The binary message content received.
-
rtcRoom$onRoomEvent$uid$state$info(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCRoomEvent state, ByteRTCRoomEventInfo info)
→ FutureOr<void>
-
@hidden
@detail callback
@valid since 3.60.
@region Multi-room
@author luomingkang
@brief Callback on room event.
@param rtcRoom ByteRTCGameRoom instance.
@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 set extra info or when user joinRoom success and this room has room extra info.
@param rtcRoom ByteRTCGameRoom instance.
@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(ByteRTCGameRoom rtcRoom, 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.
@param rtcRoom ByteRTCGameRoom instance.
@param uid User ID of the message sender.
@param message The content of the received text message.
-
rtcRoom$onRoomMessageSendResult$error(ByteRTCGameRoom 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.
@param rtcRoom ByteRTCGameRoom instance.
@param msgid The ID of this message.
@param error Message sending results. See ByteRTCRoomMessageSendResult{@link #ByteRTCRoomMessageSendResult}
-
@detail callback
@region Multi-room
@author luomingkang
@brief Callback on game 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 ByteRTCGameRoom 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:{@link #ByteRTCGameRoom#joinRoom:userInfo} to successfully joining room, in ms.
-
rtcRoom$onRoomStateChangedWithReason$withUid$state$reason(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCRoomState state, ByteRTCRoomStateChangeReason reason)
→ FutureOr<void>
-
@hidden
@detail callback
@author luomingkang
@brief Callback on game 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 ByteRTCGameRoom 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(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param stats Current ByteRTCGameRoom statistics, see: ByteRTCRoomStats{@link #ByteRTCRoomStats}
-
rtcRoom$onRoomWarning(ByteRTCGameRoom rtcRoom, ByteRTCWarningCode warningCode)
→ FutureOr<void>
-
@deprecated since 3.45 and will be deleted in later version, use rtcRoom:onRoomStateChangedWithReason:withUid:state:reason:{@link #ByteRTCGameRoomDelegate#rtcRoom:onRoomStateChangedWithReason:withUid:state:reason} and rtcRoom:onStreamStateChanged:withUid:state:extraInfo:{@link #ByteRTCGameRoomDelegate#rtcRoom:onStreamStateChanged:withUid:state:extraInfo} instead.
@detail callback
@author luomingkang
@brief Warning callback occurred.
A warning occurred during the SDK runtime. The SDK usually recovers automatically and warnings can be ignored.
@param rtcRoom ByteRTCGameRoom instance.
@param warningCode Warning code. See enumeration type ByteRTCWarningCode{@link #ByteRTCWarningCode}.
-
rtcRoom$onScreenAudioPublishStateChanged$userId$state$reason(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@brief Screen audio publish state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid User ID.
@param state Publish state. See ByteRTCPublishState{@link #ByteRTCPublishState}.
@param reason Publish state change reason. See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason}.
@order 0
-
rtcRoom$onScreenAudioSubscribeStateChanged$userId$state$reason(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@brief Screen audio subscribe state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid User ID.
@param state Subscribe state. See ByteRTCSubscribeState{@link #ByteRTCSubscribeState}.
@param reason Subscribe state change reason. See ByteRTCSubscribeStateChangeReason{@link #ByteRTCSubscribeStateChangeReason}.
@order 0
-
rtcRoom$onScreenVideoPublishStateChanged$userId$state$reason(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@brief Screen video publish state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid User ID.
@param state Publish state. See ByteRTCPublishState{@link #ByteRTCPublishState}.
@param reason Publish state change reason. See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason}.
@order 0
-
rtcRoom$onScreenVideoSubscribeStateChanged$userId$state$reason(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@brief Screen video subscribe state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid User ID.
@param state Subscribe state. See ByteRTCSubscribeState{@link #ByteRTCSubscribeState}.
@param reason Subscribe state change reason. See ByteRTCSubscribeStateChangeReason{@link #ByteRTCSubscribeStateChangeReason}.
@order 0
-
@valid since 3.52.
@detail callback
@author lichangfeng.rtc
@brief
@param rtcRoom ByteRTCGameRoom instance.
@param taskId The ID of this setRoomExtraInfo invoke.
@param result The result of setting the room's extra information. See ByteRTCSetRoomExtraInfoResult{@link #ByteRTCSetRoomExtraInfoResult}
-
rtcRoom$onStreamAdd(ByteRTCGameRoom rtcRoom, id<ByteRTCStream> stream)
→ FutureOr<void>
-
@deprecated since 3.45 and will be deleted in later version, use rtcRoom:onUserPublishStreamAudio:info:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamAudio:info:isPublish}, rtcRoom:onUserPublishStreamVideo:info:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}, rtcRoom:onUserPublishScreenVideo:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenVideo:uid:isPublish}, and rtcRoom:onUserPublishScreenAudio:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenAudio:uid:isPublish} instead.
@detail callback
@author luomingkang
@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 ByteRTCGameRoom instance.
@param stream Stream property. See ByteRTCStream{@link #ByteRTCStream}.
-
rtcRoom$onStreamPublishSuccess$isScreen(ByteRTCGameRoom rtcRoom, NSString userId, BOOL isScreen)
→ FutureOr<void>
-
@hidden for internal use only
@detail callback
@region multiroom
@author luomingkang
@brief Callback the event
@param rtcRoom ByteRTCGameRoom instance. when the release stream is successful.
@param userId User ID
@param isScreen Whether the stream is a screen stream
-
rtcRoom$onStreamRemove$stream$reason(ByteRTCGameRoom rtcRoom, NSString uid, id<ByteRTCStream> stream, ByteRTCStreamRemoveReason reason)
→ FutureOr<void>
-
@hidden
@deprecated since 3.45 and will be deleted in later version, use rtcRoom:onUserPublishStreamAudio:info:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamAudio:info:isPublish}, rtcRoom:onUserPublishStreamVideo:info:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}, rtcRoom:onUserPublishScreenVideo:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenVideo:uid:isPublish}, and rtcRoom:onUserPublishScreenAudio:uid:isPublish:{@link #ByteRTCGameRoomDelegate#rtcRoom:onUserPublishScreenAudio:uid:isPublish} instead.
@detail callback
@author luomingkang
@brief When a remote user in the room stops publishing audio & video streams, local users will receive this callback notification.
@param rtcRoom ByteRTCGameRoom instance.
@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}.
-
@detail callback
@author luomingkang
@brief Callback on stream state changes. The user will receive this callback when they receive stream relating warnings and errors.
@param rtcRoom ByteRTCGameRoom instance.
@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,default is empty.
-
rtcRoom$onSubtitleMessageReceived(ByteRTCGameRoom rtcRoom, NSArray<ByteRTCSubtitleMessage> subtitles)
→ FutureOr<void>
-
@hidden currently not available
@detail callback
@author qiaoxingwang
@brief Callback on subtitle messages.
@param rtcRoom ByteRTCGameRoom instance.
@param subtitles Subtitle messages. Refer to ByteRTCSubtitleMessage{@link #ByteRTCSubtitleMessage} for details.
-
rtcRoom$onSubtitleStateChanged$errorCode$errorMessage(ByteRTCGameRoom 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 ByteRTCGameRoom 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(ByteRTCGameRoom rtcRoom, NSString uid, NSData message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive a binary message from another user in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param uid The user ID of the sender of the message.
@param message The binary message content received.
-
rtcRoom$onUserJoined(ByteRTCGameRoom rtcRoom, ByteRTCUserInfo userInfo)
→ FutureOr<void>
-
@detail callback
@author luomingkang
@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 visible user who has been disconnected re-enters the room, other users in the room will receive this event.
2. 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 ByteRTCGameRoom instance.
@param userInfo For user information. See ByteRTCUserInfo{@link #ByteRTCUserInfo}.
-
rtcRoom$onUserLeave$reason(ByteRTCGameRoom rtcRoom, NSString uid, ByteRTCUserOfflineReason reason)
→ FutureOr<void>
-
@detail callback
@author luomingkang
@brief This callback is triggered when a remote user is disconnected or turns invisible.
@param rtcRoom ByteRTCGameRoom instance.
@param uid ID of the user who leaves the game room, or switches to invisible.
@param reason Reason to leave the room:
- 0: The remote client calls leaveRoom{@link #ByteRTCGameRoom#leaveRoom} to leave the room.
- 1: The remote client is disconnected because of poor network connection or expired Token.
- 3: The remote user has been removed from the room by the administrator via a OpenAPI call.
-
rtcRoom$onUserMessageReceived$message(ByteRTCGameRoom rtcRoom, NSString uid, NSString message)
→ FutureOr<void>
-
@detail callback
@author hanchenchen.c
@brief Receive text messages (P2P) from other users in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param uid The user ID of the sender of the message.
@param message The content of the received text message.
-
rtcRoom$onUserMessageSendResult$error(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@param msgid The ID of this message.
@param error Message result. See ByteRTCUserMessageSendResult{@link #ByteRTCUserMessageSendResult}
-
rtcRoom$onUserPublishScreenAudio$uid$isPublish(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, BOOL isPublish)
→ FutureOr<void>
-
@detail callback
@valid since 3.60.
@region Room management
@author luomingkang
@brief Callback on remote computer-audio streams in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid The ID of the remote user who published the stream.
@param isPublish Whether the stream is published.
+
true: Published
+ false: Removed
-
rtcRoom$onUserPublishScreenVideo$uid$isPublish(ByteRTCGameRoom rtcRoom, NSString roomId, NSString uid, BOOL isPublish)
→ FutureOr<void>
-
@detail callback
@valid since 3.60.
@region Room management
@brief Callback on remote screen streams in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param roomId Room ID.
@param uid The ID of the remote user who published the stream.
@param isPublish Whether the stream is published.
+
true: Published
+ false: Removed
-
rtcRoom$onUserPublishStreamAudio$info$isPublish(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, BOOL isPublish)
→ FutureOr<void>
-
@detail callback
@valid since 3.60.
@region Room management
@brief Callback on remote microphone-audio streams in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param streamId Stream ID.
@param info Stream info. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param isPublish Whether the stream is published.
+
true: Published
+ false: Removed
@order 2
-
rtcRoom$onUserPublishStreamVideo$info$isPublish(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, BOOL isPublish)
→ FutureOr<void>
-
@detail callback
@valid since 3.60.
@brief Callback on remote camera-video streams in the room.
@param rtcRoom ByteRTCGameRoom instance.
@param streamId Stream ID.
@param info Stream info. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param isPublish Whether the stream is published.
+
true: Published
+ false: Removed
@order 2
-
rtcRoom$onUserVisibilityChanged$errorCode(ByteRTCGameRoom rtcRoom, BOOL currentUserVisibility, ByteRTCUserVisibilityChangeError errorCode)
→ FutureOr<void>
-
@valid since 3.54
@detail callback
@author caocun
@brief Callback for user to set user visibility.
@param rtcRoom ByteRTCGameRoom instance.
@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(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCPublishState state, ByteRTCPublishStateChangeReason reason)
→ FutureOr<void>
-
@brief Video publish state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param streamId Video stream ID.
@param info Video stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param state Video publish state. See ByteRTCPublishState{@link #ByteRTCPublishState}.
@param reason Video publish state change reason. See ByteRTCPublishStateChangeReason{@link #ByteRTCPublishStateChangeReason}.
@order 0
-
rtcRoom$onVideoStreamBanned$isBanned(ByteRTCGameRoom 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 ByteRTCGameRoom instance.
@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(ByteRTCGameRoom rtcRoom, NSString streamId, ByteRTCStreamInfo info, ByteRTCSubscribeState state, ByteRTCSubscribeStateChangeReason reason)
→ FutureOr<void>
-
@brief Video subscribe state change callback.
@param rtcRoom The ByteRTCGameRoom instance.
@param streamId Video stream ID.
@param info Video stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo}.
@param state Subscribe state. See ByteRTCSubscribeState{@link #ByteRTCSubscribeState}.
@param reason Subscribe state change reason. See ByteRTCSubscribeStateChangeReason{@link #ByteRTCSubscribeStateChangeReason}.
@order 0
-
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