AgoraRtcEngine class

Constructors

AgoraRtcEngine()

Properties

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

Methods

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

Operators

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

Static Properties

onActiveSpeaker ↔ void Function(int uid)
Reports which user is the loudest speaker.
read / write
onApiCallExecuted ↔ void Function(int error, String api, String result)
Occurs when an API method is executed.
read / write
onAudioRouteChanged ↔ void Function(int routing)
Occurs when the local audio pkayout route changes.
read / write
onAudioVolumeIndication ↔ void Function(int totalVolume, List<AudioVolumeInfo> speakers)
Reports which users are speaking and the speakers' volume.
read / write
onClientRoleChanged ↔ void Function(ClientRole oldRole, ClientRole newRole)
Occurs when the user role switches in a live broadcast.
read / write
onConnectionLost VoidCallback
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
read / write
onConnectionStateChanged ↔ void Function(int state, int reason)
Occurs when the network connection state changes.
read / write
onError ↔ void Function(int err)
Reports an error during SDK runtime.
read / write
onFirstLocalAudioFrame ↔ void Function(int elapsed)
Occurs when the first local audio frame is sent.
read / write
onFirstLocalVideoFrame ↔ void Function(int width, int height, int elapsed)
Occurs when the first local video frame is sent.
read / write
onFirstRemoteAudioDecoded ↔ void Function(int uid, int elapsed)
Occurs when the SDK decodes the first remote audio frame for playback.
read / write
onFirstRemoteAudioFrame ↔ void Function(int uid, int elapsed)
Occurs when the first remote audio frame is received.
read / write
onFirstRemoteVideoDecoded ↔ void Function(int uid, int width, int height, int elapsed)
Occurs when the first remote video frame is decoded.
read / write
onFirstRemoteVideoFrame ↔ void Function(int uid, int width, int height, int elapsed)
Occurs when the first remote video frame is rendered.
read / write
onJoinChannelSuccess ↔ void Function(String channel, int uid, int elapsed)
Occurs when a user joins a specified channel.
read / write
onLeaveChannel VoidCallback
Occurs when a user leaves the channel.
read / write
onLocalPublishFallbackToAudioOnly ↔ void Function(bool isFallbackOrRecover)
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
onLocalVideoStateChanged ↔ void Function(LocalVideoStreamState localVideoState, LocalVideoStreamError error)
Occurs when the local video stream state changes.
read / write
onLocalVideoStats ↔ void Function(LocalVideoStats stats)
Reports the statistics of the uploading local video streams.
read / write
onMediaEngineLoadSuccess VoidCallback
Occurs when the media engine is loaded.
read / write
onMediaEngineStartCallSuccess VoidCallback
Occurs when the media engine starts.
read / write
onMicrophoneEnabled ↔ void Function(bool enabled)
Occurs when the microphone is enabled/disabled.
read / write
onNetworkQuality ↔ void Function(int uid, int txQuality, int rxQuality)
Reports the last mile network quality of each user in the channel once every two seconds.
read / write
onNetworkTypeChanged ↔ void Function(int type)
Occurs when the local network type changes.
read / write
onRejoinChannelSuccess ↔ void Function(String channel, int uid, int elapsed)
Occurs when a user rejoins the channel after being disconnected due to network problems.
read / write
onRemoteAudioStats ↔ void Function(RemoteAudioStats stats)
Reports the statistics of the audio stream from each remote user/host.
read / write
onRemoteAudioTransportStats ↔ void Function(int uid, int delay, int lost, int rxKBitRate)
Reports the transport-layer statistics of each remote audio stream.
read / write
onRemoteSubscribeFallbackToAudioOnly ↔ void Function(int uid, bool isFallbackOrRecover)
Occurs when the subscribed 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
onRemoteVideoStateChanged ↔ void Function(int uid, int state)
Occurs when the remote video stream state changes.
read / write
onRemoteVideoStats ↔ void Function(RemoteVideoStats stats)
Reports the statistics of the video stream from each remote user/host.
read / write
onRemoteVideoTransportStats ↔ void Function(int uid, int delay, int lost, int rxKBitRate)
Reports the transport-layer statistics of each remote video stream.
read / write
onRequestToken VoidCallback
Occurs when the token expires.
read / write
onRtcStats ↔ void Function(RtcStats stats)
Reports the statistics of the RtcEngine once every two seconds.
read / write
onTokenPrivilegeWillExpire ↔ void Function(String token)
Occurs when the token expires in 30 seconds.
read / write
onUserEnableLocalVideo ↔ void Function(int uid, bool enabled)
Occurs when a remote user enables/disables the local video capture function.
read / write
onUserEnableVideo ↔ void Function(int uid, bool enabled)
Occurs when a remote user enables/disables the video module.
read / write
onUserJoined ↔ void Function(int uid, int elapsed)
Occurs when a remote user (Communication)/host (Live Broadcast) joins the channel.
read / write
onUserMuteAudio ↔ void Function(int uid, bool muted)
Occurs when a remote user's audio stream is muted/unmuted.
read / write
onUserMuteVideo ↔ void Function(int uid, bool muted)
Occurs when a remote user's video stream playback pauses/resumes.
read / write
onUserOffline ↔ void Function(int uid, int elapsed)
Occurs when a remote user (Communication)/host (Live Broadcast) leaves the channel.
read / write
onVideoSizeChanged ↔ void Function(int uid, double width, double height, int rotation)
Occurs when the video size or rotation information of a specified remote user changes.
read / write
onWarning ↔ void Function(int warn)
Reports a warning during SDK runtime.
read / write

Static Methods

adjustPlaybackSignalVolume(int volume) Future<void>
Adjusts the playback volume.
adjustRecordingSignalVolume(int volume) Future<void>
Adjusts the recording volume.
create(String appid) Future<void>
Creates an RtcEngine instance.
createNativeView(dynamic created(int viewId), {Key key}) Widget
Creates the video renderer Widget.
destroy() Future<void>
Destroys the RtcEngine instance and releases all resources used by the Agora SDK.
disableAudio() Future<void>
Disables the audio module.
disableVideo() Future<void>
Disables the video module.
enableAudio() Future<void>
Enables the audio module.
enableAudioVolumeIndication(int interval, int smooth) Future<void>
Enables the onAudioVolumeIndication callback at a set time interval to report on which users are speaking and the speakers' volume.
enableDualStreamMode(bool enabled) Future<void>
Enables/Disables dual-stream mode.
enableLocalAudio(bool enabled) Future<void>
Enables/Disables the local audio capture.
enableLocalVideo(bool enabled) Future<void>
Disables/Re-enables the local video capture.
enableVideo() Future<void>
Enables the video module.
enableWebSdkInteroperability(bool enabled) Future<void>
Enables interoperability with the Agora Web SDK (Live Broadcast only).
getConnectionState() Future<int>
Gets the connection state of the SDK.
getSdkVersion() Future<String>
Gets the SDK version.
isSpeakerphoneEnabled() Future<bool>
Checks whether the speakerphone is enabled.
joinChannel(String token, String channelId, String info, int uid) Future<bool>
Allows a user to join a channel.
leaveChannel() Future<bool>
Allows a user to leave a channel.
muteAllRemoteAudioStreams(bool muted) Future<void>
Receives/Stops receiving all remote audio streams.
muteAllRemoteVideoStreams(bool muted) Future<void>
Receives/Stops receiving all remote video streams.
muteLocalAudioStream(bool muted) Future<void>
Sends/Stops sending the local audio stream.
muteLocalVideoStream(bool muted) Future<void>
Sends/Stops sending the local video stream.
muteRemoteAudioStream(int uid, bool muted) Future<void>
Receives/Stops receiving a specified audio stream.
muteRemoteVideoStream(int uid, bool muted) Future<void>
Receives/Stops receiving a specified remote user's video stream.
removeNativeView(int viewId) Future<void>
Remove the video renderer Widget.
renewToken(String token) Future<void>
Renews the token when the current token expires.
setAudioProfile(AudioProfile profile, AudioScenario scenario) Future<void>
Sets the audio parameters and application scenarios.
setBeautyEffectOptions(bool enabled, BeautyOptions options) Future<void>
Enables/Disables image enhancement and sets the options.
setChannelProfile(ChannelProfile profile) Future<void>
Sets the channel profile.
setClientRole(ClientRole role) Future<void>
Sets the role of a user (Live Broadcast only).
setDefaultAudioRouteToSpeaker(bool defaultToSpeaker) Future<void>
Sets the default audio playback route.
setDefaultMuteAllRemoteAudioStreams(bool muted) Future<void>
Sets whether to receive all remote audio streams by default.
setDefaultMuteAllRemoteVideoStreams(bool muted) Future<void>
Sets whether to receive all remote video streams by default.
setEnableSpeakerphone(bool enabled) Future<void>
Enables/Disables the audio playback route to the speakerphone.
setEncryptionMode(String encryptionMode) Future<void>
Sets the built-in encryption mode.
setEncryptionSecret(String secret) Future<void>
Enables built-in encryption with an encryption password before joining a channel.
setLocalPublishFallbackOption(StreamFallbackOptions options) Future<void>
Sets the fallback option for the locally published video stream based on the network conditions.
setLocalRenderMode(VideoRenderMode renderMode) Future<void>
Sets the local video display mode.
setLocalVoiceChanger(VoiceChanger changer) Future<void>
Sets the local voice changer option.
setRemoteDefaultVideoStreamType(int streamType) Future<void>
Sets the default video-stream type of the remotely subscribed video stream when the remote user sends dual streams.
setRemoteRenderMode(int uid, VideoRenderMode renderMode) Future<void>
Sets the remote video display mode.
setRemoteSubscribeFallbackOption(StreamFallbackOptions options) Future<void>
Sets the fallback option for the remotely subscribed video stream based on the network conditions.
setRemoteUserPriority(int uid, UserPriority userPriority) Future<void>
Sets the priority of a remote user.
setRemoteVideoStreamType(int uid, int streamType) Future<void>
Sets the video stream type of the remotely subscribed video stream when the remote user sends dual streams.
setupLocalVideo(int viewId, VideoRenderMode renderMode) Future<void>
Sets the local video view and configures the video display settings on the local device.
setupRemoteVideo(int viewId, VideoRenderMode renderMode, int uid) Future<void>
Sets the remote user's video view.
setVideoEncoderConfiguration(VideoEncoderConfiguration config) Future<void>
Sets the video encoder configuration.
startPreview() Future<void>
Starts the local video preview before joining a channel.
stopPreview() Future<void>
Stops the local video preview and the video.
switchCamera() Future<void>
Switches between front and rear cameras.