RtcEngineEventHandler class Null safety
The SDK uses the RtcEngineEventHandler class to send callbacks to the application, and the application inherits the methods of this class to retrieve these callbacks.
All methods in this class have their (empty) default implementations, and the application can inherit only some of the required events instead of all of them.
In the callbacks, the application should avoid time-consuming tasks or call blocking APIs (such as SendMessage), otherwise, the SDK may not work properly.
Constructors
- RtcEngineEventHandler({WarningCallback? warning, ErrorCallback? error, ApiCallCallback? apiCallExecuted, UidWithElapsedAndChannelCallback? joinChannelSuccess, UidWithElapsedAndChannelCallback? rejoinChannelSuccess, RtcStatsCallback? leaveChannel, UserAccountCallback? localUserRegistered, UserInfoCallback? userInfoUpdated, ClientRoleCallback? clientRoleChanged, UidWithElapsedCallback? userJoined, UserOfflineCallback? userOffline, ConnectionStateCallback? connectionStateChanged, NetworkTypeCallback? networkTypeChanged, EmptyCallback? connectionLost, TokenCallback? tokenPrivilegeWillExpire, EmptyCallback? requestToken, AudioVolumeCallback? audioVolumeIndication, UidCallback? activeSpeaker, ElapsedCallback? firstLocalAudioFrame, VideoFrameCallback? firstLocalVideoFrame, UidWithMutedCallback? userMuteVideo, VideoSizeCallback? videoSizeChanged, RemoteVideoStateCallback? remoteVideoStateChanged, LocalVideoStateCallback? localVideoStateChanged, RemoteAudioStateCallback? remoteAudioStateChanged, LocalAudioStateCallback? localAudioStateChanged, FallbackCallback? localPublishFallbackToAudioOnly, FallbackWithUidCallback? remoteSubscribeFallbackToAudioOnly, AudioRouteCallback? audioRouteChanged, RectCallback? cameraFocusAreaChanged, RectCallback? cameraExposureAreaChanged, FacePositionCallback? facePositionChanged, RtcStatsCallback? rtcStats, NetworkQualityCallback? lastmileQuality, NetworkQualityWithUidCallback? networkQuality, LastmileProbeCallback? lastmileProbeResult, LocalVideoStatsCallback? localVideoStats, LocalAudioStatsCallback? localAudioStats, RemoteVideoStatsCallback? remoteVideoStats, RemoteAudioStatsCallback? remoteAudioStats, EmptyCallback? audioMixingFinished, AudioMixingStateCallback? audioMixingStateChanged, SoundIdCallback? audioEffectFinished, RtmpStreamingStateCallback? rtmpStreamingStateChanged, EmptyCallback? transcodingUpdated, StreamInjectedStatusCallback? streamInjectedStatus, StreamMessageCallback? streamMessage, StreamMessageErrorCallback? streamMessageError, EmptyCallback? mediaEngineLoadSuccess, EmptyCallback? mediaEngineStartCallSuccess, MediaRelayStateCallback? channelMediaRelayStateChanged, MediaRelayEventCallback? channelMediaRelayEvent, VideoFrameWithUidCallback? firstRemoteVideoFrame, UidWithElapsedCallback? firstRemoteAudioFrame, UidWithElapsedCallback? firstRemoteAudioDecoded, UidWithMutedCallback? userMuteAudio, UrlWithErrorCallback? streamPublished, UrlCallback? streamUnpublished, TransportStatsCallback? remoteAudioTransportStats, TransportStatsCallback? remoteVideoTransportStats, UidWithEnabledCallback? userEnableVideo, UidWithEnabledCallback? userEnableLocalVideo, VideoFrameWithUidCallback? firstRemoteVideoDecoded, EnabledCallback? microphoneEnabled, EmptyCallback? connectionInterrupted, EmptyCallback? connectionBanned, AudioQualityCallback? audioQuality, EmptyCallback? cameraReady, EmptyCallback? videoStopped, MetadataCallback? metadataReceived, ElapsedCallback? firstLocalAudioFramePublished, ElapsedCallback? firstLocalVideoFramePublished, StreamPublishStateCallback? audioPublishStateChanged, StreamPublishStateCallback? videoPublishStateChanged, StreamSubscribeStateCallback? audioSubscribeStateChanged, StreamSubscribeStateCallback? videoSubscribeStateChanged, RtmpStreamingEventCallback? rtmpStreamingEvent, UserSuperResolutionEnabledCallback? userSuperResolutionEnabled, UploadLogResultCallback? uploadLogResult, EmptyCallback? airPlayIsConnected, VirtualBackgroundSourceEnabledCallback? virtualBackgroundSourceEnabled})
- Constructs a RtcEngineEventHandler
Properties
- activeSpeaker ↔ UidCallback?
-
Reports which user is the loudest speaker. [...]
read / write
- apiCallExecuted ↔ ApiCallCallback?
-
Occurs when an API method is executed. [...]
read / write
- audioEffectFinished ↔ SoundIdCallback?
-
Occurs when the audio effect file playback finishes. [...]
read / write
- audioMixingFinished ↔ EmptyCallback?
-
Occurs when the audio mixing file playback finishes. [...]
read / write
- audioMixingStateChanged ↔ AudioMixingStateCallback?
-
Occurs when the playback state of the local user's music file changes. [...]
read / write
- audioPublishStateChanged ↔ StreamPublishStateCallback?
-
Occurs when the audio publishing state changes. [...]
read / write
- audioQuality ↔ AudioQualityCallback?
-
Reports the statistics of the audio stream from each remote user/host. [...]
read / write
- audioRouteChanged ↔ AudioRouteCallback?
-
Occurs when the local audio playback route changes. [...]
read / write
- audioSubscribeStateChanged ↔ StreamSubscribeStateCallback?
-
Occurs when the audio subscribing state changes. [...]
read / write
- audioVolumeIndication ↔ AudioVolumeCallback?
-
Reports which users are speaking and the speakers' volume, and whether the local user is speaking. [...]
read / write
- cameraExposureAreaChanged ↔ RectCallback?
-
The camera exposure area has changed. [...]
read / write
- cameraFocusAreaChanged ↔ RectCallback?
-
Occurs when the camera focus area is changed. [...]
read / write
- cameraReady ↔ EmptyCallback?
-
Occurs when the camera is turned on and ready to capture video. [...]
read / write
- channelMediaRelayEvent ↔ MediaRelayEventCallback?
-
Reports events during the media stream relay. [...]
read / write
- channelMediaRelayStateChanged ↔ MediaRelayStateCallback?
-
Occurs when the state of the media stream relay changes. [...]
read / write
- clientRoleChanged ↔ ClientRoleCallback?
-
Occurs when the user role switches in a live broadcast. For example, from a host to an audience or from an audience to a host. [...]
read / write
- connectionBanned ↔ EmptyCallback?
-
Occurs when your connection is banned by the Agora Server. [...]
read / write
- connectionInterrupted ↔ EmptyCallback?
-
Occurs when the connection between the SDK and the server is interrupted. [...]
read / write
- connectionLost ↔ EmptyCallback?
-
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted. [...]
read / write
- connectionStateChanged ↔ ConnectionStateCallback?
-
Occurs when the network connection state changes. [...]
read / write
- error ↔ ErrorCallback?
-
Reports an error during SDK runtime. [...]
read / write
- facePositionChanged ↔ FacePositionCallback?
-
Reports the face detection result of the local user. [...]
read / write
- firstLocalAudioFrame ↔ ElapsedCallback?
-
Occurs when the first local audio frame is sent. [...]
read / write
- firstLocalAudioFramePublished ↔ ElapsedCallback?
-
Occurs when the first audio frame is published. [...]
read / write
- firstLocalVideoFrame ↔ VideoFrameCallback?
-
Occurs when the first local video frame is rendered. [...]
read / write
- firstLocalVideoFramePublished ↔ ElapsedCallback?
-
Occurs when the first video frame is published. [...]
read / write
- firstRemoteAudioDecoded ↔ UidWithElapsedCallback?
-
Occurs when the engine receives the first audio frame from a specified remote user. [...]
read / write
- firstRemoteAudioFrame ↔ UidWithElapsedCallback?
-
Occurs when the first remote audio frame is received. [...]
read / write
- firstRemoteVideoDecoded ↔ VideoFrameWithUidCallback?
-
Occurs when the first remote video frame is received and decoded. [...]
read / write
- firstRemoteVideoFrame ↔ VideoFrameWithUidCallback?
-
Occurs when the first remote video frame is rendered. [...]
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- joinChannelSuccess ↔ UidWithElapsedAndChannelCallback?
-
Occurs when the local user joins a specified channel. [...]
read / write
- lastmileProbeResult ↔ LastmileProbeCallback?
-
Reports the last-mile network probe result. [...]
read / write
- lastmileQuality ↔ NetworkQualityCallback?
-
Reports the last mile network quality of the local user once every two seconds before the user joins the channel. Last mile refers to the connection between the local device and Agora's edge server. After the application calls the RtcEngine.enableLastmileTest method, this callback reports once every two seconds the uplink and downlink last mile network conditions of the local user before the user joins the channel. [...]
read / write
- leaveChannel ↔ RtcStatsCallback?
-
Occurs when a user leaves the channel. [...]
read / write
- localAudioStateChanged ↔ LocalAudioStateCallback?
-
Occurs when the local audio stream state changes. [...]
read / write
- localAudioStats ↔ LocalAudioStatsCallback?
-
Reports the statistics of the local audio stream. [...]
read / write
- localPublishFallbackToAudioOnly ↔ FallbackCallback?
-
Occurs when the published media stream falls back to an audio-only stream due to poor network conditions or switches back to video stream after the network conditions improve. [...]
read / write
- localUserRegistered ↔ UserAccountCallback?
-
Occurs when the local user registers a user account. [...]
read / write
- localVideoStateChanged ↔ LocalVideoStateCallback?
-
Occurs when the local video state changes. [...]
read / write
- localVideoStats ↔ LocalVideoStatsCallback?
-
Reports the statistics of the local video streams. [...]
read / write
- mediaEngineLoadSuccess ↔ EmptyCallback?
-
Occurs when the media engine is loaded. [...]
read / write
- mediaEngineStartCallSuccess ↔ EmptyCallback?
-
Occurs when the media engine starts. [...]
read / write
- metadataReceived ↔ MetadataCallback?
-
Occurs when the local user receives the metadata. [...]
read / write
- microphoneEnabled ↔ EnabledCallback?
-
Occurs when the microphone is enabled/disabled. [...]
read / write
- networkQuality ↔ NetworkQualityWithUidCallback?
-
Reports the last mile network quality of each user in the channel once every two seconds. [...]
read / write
- networkTypeChanged ↔ NetworkTypeCallback?
-
Occurs when the network type changes. [...]
read / write
- rejoinChannelSuccess ↔ UidWithElapsedAndChannelCallback?
-
Occurs when a user rejoins the channel after being disconnected due to network problems. [...]
read / write
- remoteAudioStateChanged ↔ RemoteAudioStateCallback?
-
Occurs when the remote audio state changes. [...]
read / write
- remoteAudioStats ↔ RemoteAudioStatsCallback?
-
Reports the statistics of the audio stream from each remote user/host. [...]
read / write
- remoteAudioTransportStats ↔ TransportStatsCallback?
-
Reports the transport-layer statistics of each remote audio stream. [...]
read / write
- remoteSubscribeFallbackToAudioOnly ↔ FallbackWithUidCallback?
-
Occurs when the remote media stream falls back to audio-only stream due to poor network conditions or switches back to video stream after the network conditions improve. [...]
read / write
- remoteVideoStateChanged ↔ RemoteVideoStateCallback?
-
Occurs when the remote video state changes. [...]
read / write
- remoteVideoStats ↔ RemoteVideoStatsCallback?
-
Reports the statistics of the video stream from each remote user/host. The SDK triggers this callback once every two seconds for each remote user/host. If a channel includes multiple remote users, the SDK triggers this callback as many times. [...]
read / write
- remoteVideoTransportStats ↔ TransportStatsCallback?
-
Reports the transport-layer statistics of each remote video stream. [...]
read / write
- requestToken ↔ EmptyCallback?
-
Occurs when the token has expired. [...]
read / write
- rtcStats ↔ RtcStatsCallback?
-
Reports the statistics of the RtcEngine once every two seconds. [...]
read / write
- rtmpStreamingEvent ↔ RtmpStreamingEventCallback?
-
Reports events during the RTMP or RTMPS streaming. [...]
read / write
- rtmpStreamingStateChanged ↔ RtmpStreamingStateCallback?
-
Occurs when the state of the RTMP or RTMPS streaming changes. [...]
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- streamInjectedStatus ↔ StreamInjectedStatusCallback?
-
Reports the status of injecting the online media stream. [...]
read / write
- streamMessage ↔ StreamMessageCallback?
-
Occurs when the local user receives a remote data stream. [...]
read / write
- streamMessageError ↔ StreamMessageErrorCallback?
-
Occurs when the local user fails to receive a remote data stream. [...]
read / write
- streamPublished ↔ UrlWithErrorCallback?
-
Reports the result of calling the RtcEngine.addPublishStreamUrl method. [...]
read / write
- streamUnpublished ↔ UrlCallback?
-
Reports the result of calling the RtcEngine.removePublishStreamUrl method. [...]
read / write
- tokenPrivilegeWillExpire ↔ TokenCallback?
-
Occurs when the token expires in 30 seconds. [...]
read / write
- transcodingUpdated ↔ EmptyCallback?
-
Occurs when the publisher's transcoding settings are updated. [...]
read / write
- userEnableLocalVideo ↔ UidWithEnabledCallback?
-
Occurs when a remote user enables/disables the local video capture function. [...]
read / write
- userEnableVideo ↔ UidWithEnabledCallback?
-
Occurs when a remote user enables/disables the video module. [...]
read / write
- userInfoUpdated ↔ UserInfoCallback?
-
Occurs when the SDK gets the user ID and user account of the remote user. [...]
read / write
- userJoined ↔ UidWithElapsedCallback?
-
Occurs when a remote user (ChannelProfile.Communication)/host (ChannelProfile.LiveBroadcasting) joins the channel. [...]
read / write
- userMuteAudio ↔ UidWithMutedCallback?
-
Occurs when a remote user stops/resumes sending the audio stream. [...]
read / write
- userMuteVideo ↔ UidWithMutedCallback?
-
Occurs when a remote user stops or resumes publishing the video stream. [...]
read / write
- userOffline ↔ UserOfflineCallback?
-
Occurs when a remote user (ChannelProfile.Communication)/host (ChannelProfile.LiveBroadcasting) leaves the channel. [...]
read / write
- videoPublishStateChanged ↔ StreamPublishStateCallback?
-
Occurs when the video publishing state changes. [...]
read / write
- videoSizeChanged ↔ VideoSizeCallback?
-
Occurs when the video size or rotation information of a remote user changes. [...]
read / write
- videoStopped ↔ EmptyCallback?
-
Occurs when the video stops playing. [...]
read / write
- videoSubscribeStateChanged ↔ StreamSubscribeStateCallback?
-
Occurs when the video subscribing state changes. [...]
read / write
- virtualBackgroundSourceEnabled ↔ VirtualBackgroundSourceEnabledCallback?
-
Reports whether the virtual background is successfully enabled. (beta function) [...]
read / write
- warning ↔ WarningCallback?
-
Reports a warning during SDK runtime. [...]
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
process(
String methodName, List data) → void -
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited