NERtcChannelEventCallback class Null safety

NERtc asynchronous callback API. Users can use this interface to handle callbacks from various NERtc states.

Constructors

NERtcChannelEventCallback()

Properties

hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onAudioHasHowling() → void
Get notified when howling is detected. Check if howling occurs due to the close proximity of the device. When a howling signal is detected, the callback is triggered until the howling stops If the upper layer of an app receives a message sent by the callback, howling occurs and users are prompted to mute the microphone or directly mute the microphone. Howling detection is used for VoIP scenarios. Music scenarios do not support howling detection.
onAudioRecording(int code, String filePath) → void
Get notified of the audio recording state. code the recording status. For more information about the recording status, see NERtcAudioRecordingCode filePath Path where audio recordings are saved.
onClientRoleChange(int oldRole, int newRole) → void
Get notified when a user changes the role. Get notified when a user changes the role after joining a room in live streaming. For information about roles, see NERtcClientRole. oldRole The role before newRole the role after
onConnectionStateChanged(int state, int reason) → void
Get notified when the connection state changes state The current network connection state NERtcConnectionState reason the reason why the network state changes ConnectionStateChangeReason.
onConnectionTypeChanged(int newConnectionType) → void
Get notified when the local network type changes
onDisconnect(int reason) → void
Get notified when the SDK gets disconnected from the server.
onError(int code) → void
Get notified when a warning occurs. The callback is triggered to report a warning related to network or media when the SDK is running. In most cases, the app ignores warning messages and the SDK resumes running
onFirstAudioDataReceived(int uid) → void
Get notified when the first audio frame published from a remote user is received uid ID of a remote user
onFirstAudioFrameDecoded(int uid) → void
Get notified when the first audio frame published from a remote user is decoded.
onFirstVideoDataReceived(int uid) → void
Get notified when the first video frame published from a remote user is received
onFirstVideoFrameDecoded(int uid, int width, int height) → void
Get notified when the first video frame published from a remote user is decoded.
onJoinChannel(int result, int channelId, int elapsed, int uid) → void
Get notified when a user joins a room
onLeaveChannel(int result) → void
Get notified when a user leaves a room.
onLiveStreamState(String taskId, String pushUrl, int liveState) → void
Get notified of the live streaming status. taskId live streaming task ID pushUrl URL for a streaming push task liveState live streaming status NERtcLiveStreamState
onLocalAudioVolumeIndication(int volume) → void
Occurs when the system indicates the volume of the current local audio. This callback is disabled by default. You can enable the callback by calling the enableAudioVolumeIndication method. If the callback is enabled and a local user speaks, the SDK triggers the callback based on the time interval specified in the enableAudioVolumeIndication method. If the local user mutes the local audio by calling muteLocalAudio, the SDK no longer indicates the audio volume.
onLocalPublishFallbackToAudioOnly(bool isFallback, int streamType) → void
Occurs when the published local media stream falls back to an audio-only stream due to poor network conditions or switches back to an audio and video stream after the network condition improves.
onMediaRelayReceiveEvent(int event, int code, String channelName) → void
Occurs when relayed media streams are received.
onMediaRelayStatesChange(int state, String channelName) → void
Occurs when the state of the media stream relay changes
onReceiveSEIMsg(int userID, String seiMsg) → void
Get notified when SEI information is received.
onReconnectingStart() → void
Get notified when reconnection starts. For information about the result, see onReJoinChannel and onDisconnect
onReJoinChannel(int result) → void
Get notified when a user rejoins a channel In some cases, clients may get disconnected from the server due to network failures, the SDK will automatically reconnect to the server and trigger this callback method.
onRemoteAudioVolumeIndication(List<NERtcAudioVolumeInfo> volumeList, int totalVolume) → void
Occurs when the system indicates the active speaker and the audio volume in the channel. This callback is disabled by default. You can enable the callback by calling the enableAudioVolumeIndication method. If the callback is enabled, the SDK triggers the callback based on the time interval specified in the enableAudioVolumeIndication method regardless of whether any participants speak in the channel.
onRemoteSubscribeFallbackToAudioOnly(int uid, bool isFallback, int streamType) → void
Occurs when the subscribed remote media stream falls back to audio-only stream due to poor network conditions or switches back to the audio and video stream after the network conditions improve. If you call NERtcEngine.setRemoteSubscribeFallbackOption and set the option to NERtcStreamFallbackOptions.audioOnly , this callback is triggered when the subscribed remote media stream falls back to audio-only mode due to poor downstream network conditions, or when the subscribed remote media stream switches back to the audio and video stream after the downstream network conditions improve.
onUserAudioMute(int uid, bool muted) → void
Get notified when a remote user mutes the audio stream.
onUserAudioStart(int uid) → void
Get notified when a remote user turns on an audio stream.
onUserAudioStop(int uid) → void
Get notified when a remote user turns off an audio stream.
onUserJoined(int uid) → void
Get notified when a user joins a room.
onUserLeave(int uid, int reason) → void
Get notified when a user leaves a room.
onUserSubStreamVideoStart(int uid, int maxProfile) → void
Get notified when a remote user turns on a video substream.
onUserSubStreamVideoStop(int uid) → void
Get notified when a remote user turns on a video substream.
onUserVideoMute(int uid, bool muted) → void
Get notified when a remote user unpublishes a video stream.
onUserVideoProfileUpdate(int uid, int maxProfile) → void
Get notified when the video quality is updated
onUserVideoStart(int uid, int maxProfile) → void
Get notified when a remote user turns on a video stream.
onUserVideoStop(int uid) → void
Get notified when a remote user turns off a video stream.
onWarning(int code) → void
Get notified when an error occurs The callback is triggered to report an error related to network or media when the SDK is running. In most cases, the SDK cannot fix the issues and resume running. The SDK requires the app to take action or informs users of the issue.
toString() String
A string representation of this object.
inherited

Operators

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