RtcEngine class
RtcEngine is the main class of the SDK.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addInjectStreamUrl(
String url, LiveInjectStreamConfig config) → Future< void> -
Injects an online media stream to a live broadcast.
override
-
addPublishStreamUrl(
String url, bool transcodingEnabled) → Future< void> -
Publishes the local stream to the CDN.
override
-
addVideoWatermark(
String watermarkUrl, WatermarkOptions options) → Future< void> -
adjustAudioMixingPlayoutVolume(
int volume) → Future< void> -
Adjusts the volume of audio mixing for local playback.
override
-
adjustAudioMixingPublishVolume(
int volume) → Future< void> -
Adjusts the volume of audio mixing for publishing (sending to other users).
override
-
adjustAudioMixingVolume(
int volume) → Future< void> -
Adjusts the volume of audio mixing.
override
-
adjustPlaybackSignalVolume(
int volume) → Future< void> -
Adjusts the playback volume of all remote users.
override
-
adjustRecordingSignalVolume(
int volume) → Future< void> -
Adjusts the recording volume.
override
-
adjustUserPlaybackSignalVolume(
String uid, int volume) → Future< void> -
Adjusts the playback volume of a specified remote user.
override
-
clearVideoWatermarks(
) → Future< void> -
complain(
String callId, String description) → Future< void> -
createDataStream(
bool reliable, bool ordered) → Future< int?> -
destroy(
) → Future< void> - Destroys the RtcEngine instance and releases all resources used by the Anyrtc SDK.
-
disableAudio(
) → Future< void> -
Disables the audio module.
override
-
disableLastmileTest(
) → Future< void> -
disableVideo(
) → Future< void> -
Disables the video module.
override
-
enableAudio(
) → Future< void> -
Enables the audio module.
override
-
enableAudioVolumeIndication(
int interval, int smooth, bool report_vad) → Future< void> -
Enables the RtcEngineEventHandler.audioVolumeIndication callback at a set time interval to report on which users are speaking and the speakers' volume.
override
-
enableDeepLearningDenoise(
bool enabled) → Future< void> -
enableDualStreamMode(
bool enabled) → Future< void> -
Enables/Disables the dual video stream mode.
override
-
enableEncryption(
bool enabled, EncryptionConfig config) → Future< void> -
enableFaceDetection(
bool enable) → Future< void> -
Enables/Disables face detection for the local user.
override
-
enableInEarMonitoring(
bool enabled) → Future< void> -
Enables in-ear monitoring.
override
-
enableLastmileTest(
) → Future< void> -
enableLocalAudio(
bool enabled) → Future< void> -
Enables/Disables the local audio capture.
override
-
enableLocalVideo(
bool enabled) → Future< void> -
Disables/Re-enables the local video capture.
override
-
enableRemoteSuperResolution(
int uid, bool enable) → Future< void> -
enableSoundPositionIndication(
bool enabled) → Future< void> -
enableVideo(
) → Future< void> -
Enables the video module.
override
-
enableWebSdkInteroperability(
bool enabled) → Future< void> -
getAudioMixingPlayoutVolume(
) → Future< int?> -
Gets the audio mixing volume for local playback.
override
-
getAudioMixingPublishVolume(
) → Future< int?> -
Gets the audio mixing volume for publishing.
override
-
getCallId(
) → Future< String?> - Gets the current call ID.
-
getCameraMaxZoomFactor(
) → Future< double?> -
Gets the maximum zoom ratio supported by the camera.
override
-
getConnectionState(
) → Future< ConnectionStateType> - Gets the connection state of the SDK.
-
getEffectsVolume(
) → Future< double?> -
Gets the volume of the audio effects.
override
-
getNativeHandle(
) → Future< int?> -
isCameraAutoFocusFaceModeSupported(
) → Future< bool?> -
Checks whether the camera auto-face focus function is supported.
override
-
isCameraExposurePositionSupported(
) → Future< bool?> -
Checks whether the camera exposure function is supported.
override
-
isCameraFocusSupported(
) → Future< bool?> -
Checks whether the camera manual focus function is supported.
override
-
isCameraTorchSupported(
) → Future< bool?> -
Checks whether the camera flash function is supported.
override
-
isCameraZoomSupported(
) → Future< bool?> -
Checks whether the camera zoom function is supported.
override
-
isSpeakerphoneEnabled(
) → Future< bool?> -
Checks whether the speakerphone is enabled.
override
-
joinChannel(
String? token, String? channelName, String? optionalUid) → Future< void> - Allows a user to join a channel.
-
leaveChannel(
) → Future< void> - Allows a user to leave a channel.
-
muteAllRemoteAudioStreams(
bool muted) → Future< void> -
Stops/Resumes receiving all remote audio streams.
override
-
muteAllRemoteVideoStreams(
bool muted) → Future< void> -
Stops/Resumes receiving all remote video streams.
override
-
muteLocalAudioStream(
bool muted) → Future< void> -
Stops/Resumes sending the local audio stream.
override
-
muteLocalVideoStream(
bool muted) → Future< void> -
Stops/Resumes sending the local video stream.
override
-
muteRemoteAudioStream(
String uid, bool muted) → Future< void> -
Stops/Resumes receiving a specified audio stream.
override
-
muteRemoteVideoStream(
String uid, bool muted) → Future< void> -
Stops/Resumes receiving a specified remote user's video stream.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseAllEffects(
) → Future< void> -
Pauses all audio effects.
override
-
pauseAudioMixing(
) → Future< void> -
Pauses playing and mixing the music file.
override
-
pauseEffect(
int soundId) → Future< void> -
Pauses a specified audio effect.
override
-
playEffect(
int soundId, String filePath, int loopCount, double pitch, double pan, double gain, bool publish) → Future< void> -
Plays a specified local or online audio effect file.
override
-
preloadEffect(
int soundId, String filePath) → Future< void> -
Preloads a specified audio effect file into the memory.
override
-
rate(
String callId, int rating, {String? description}) → Future< void> -
registerMediaMetadataObserver(
) → Future< void> -
removeInjectStreamUrl(
String url) → Future< void> -
Removes the injected online media stream from a live broadcast.
override
-
removePublishStreamUrl(
String url) → Future< void> -
Removes an RTMP stream from the CDN.
override
-
renewToken(
String token) → Future< void> - Renews the token when the current token expires.
-
resumeAllEffects(
) → Future< void> -
Resumes playing all audio effects.
override
-
resumeAudioMixing(
) → Future< void> -
Resumes playing and mixing the music file.
override
-
resumeEffect(
int soundId) → Future< void> -
Resumes playing a specified audio effect.
override
-
sendCustomReportMessage(
String id, String category, String event, String label, int value) → Future< void> -
sendMetadata(
String metadata) → Future< void> -
sendStreamMessage(
int streamId, String message) → Future< void> -
setAudioMixingPitch(
int pitch) → Future< void> -
Sets the pitch of the local music file.
override
-
setAudioMixingPosition(
int pos) → Future< void> -
setAudioProfile(
AudioProfile profile, AudioScenario scenario) → Future< void> -
Sets the audio parameters and application scenarios.
override
-
setAudioSessionOperationRestriction(
AudioSessionOperationRestriction restriction) → Future< void> -
setCameraAutoFocusFaceModeEnabled(
bool enabled) → Future< void> -
Enables the camera auto-face focus function.
override
-
setCameraCapturerConfiguration(
CameraCapturerConfiguration config) → Future< void> -
Sets the camera capturer configuration.
override
-
setCameraExposurePosition(
double positionXinView, double positionYinView) → Future< void> -
Sets the camera exposure position.
override
-
setCameraFocusPositionInPreview(
double positionX, double positionY) → Future< void> -
Sets the camera manual focus position.
A successful method call triggers the RtcEngineEventHandler.cameraFocusAreaChanged callback on the local client.
override
-
setCameraTorchOn(
bool isOn) → Future< void> -
Enables the camera flash function.
override
-
setCameraZoomFactor(
double factor) → Future< void> -
Sets the camera zoom ratio.
override
-
setChannelProfile(
ChannelProfile profile) → Future< void> - Sets the channel profile of the RtcEngine.
-
setClientRole(
ClientRole role) → Future< void> - Sets the role of a user (ChannelProfile.LiveBroadcasting only).
-
setDefaultAudioRoutetoSpeakerphone(
bool defaultToSpeaker) → Future< void> -
Sets the default audio playback route.
override
-
setDefaultMuteAllRemoteAudioStreams(
bool muted) → Future< void> -
Sets whether to receive all remote audio streams by default.
override
-
setDefaultMuteAllRemoteVideoStreams(
bool muted) → Future< void> -
Sets whether to receive all remote video streams by default.
override
-
setEffectsVolume(
double volume) → Future< void> -
Sets the volume of the audio effects.
override
-
setEnableSpeakerphone(
bool enabled) → Future< void> -
Enables/Disables the audio playback route to the speakerphone.
override
-
setEncryptionMode(
EncryptionMode encryptionMode) → Future< void> -
setEncryptionSecret(
String secret) → Future< void> -
setEventHandler(
RtcEngineEventHandler handler) → void - Sets the engine event handler.
-
setInEarMonitoringVolume(
int volume) → Future< void> -
Sets the volume of the in-ear monitor.
override
-
setLiveTranscoding(
LiveTranscoding transcoding) → Future< void> -
Sets the video layout and audio settings for CDN live.
override
-
setLocalPublishFallbackOption(
StreamFallbackOptions option) → Future< void> -
setLocalVoiceChanger(
AudioVoiceChanger voiceChanger) → Future< void> -
setLocalVoiceEqualization(
AudioEqualizationBandFrequency bandFrequency, int bandGain) → Future< void> -
setLocalVoicePitch(
double pitch) → Future< void> -
setLocalVoiceReverb(
AudioReverbType reverbKey, int value) → Future< void> -
setLocalVoiceReverbPreset(
AudioReverbPreset preset) → Future< void> -
setLogFile(
String filePath) → Future< void> - Specifies an SDK output log file.
-
setLogFileSize(
int fileSizeInKBytes) → Future< void> - Sets the log file size (KB).
-
setLogFilter(
LogFilter filter) → Future< void> - Sets the output log level of the SDK.
-
setMaxMetadataSize(
int size) → Future< void> -
setParameters(
String parameters) → Future< void> - @nodoc Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.
-
setRemoteDefaultVideoStreamType(
VideoStreamType streamType) → Future< void> -
Sets the default video-stream type of the remotely subscribed video stream when the remote user sends dual streams.
override
-
setRemoteSubscribeFallbackOption(
StreamFallbackOptions option) → Future< void> -
Sets the fallback option for the remotely subscribed video stream based on the network conditions.
override
-
setRemoteUserPriority(
int uid, UserPriority userPriority) → Future< void> -
setRemoteVideoStreamType(
String uid, VideoStreamType streamType) → Future< void> -
Sets the stream type of the remote video.
override
-
setRemoteVoicePosition(
int uid, double pan, double gain) → Future< void> -
setVideoEncoderConfiguration(
VideoEncoderConfiguration config) → Future< void> -
Sets the video encoder configuration.
override
-
setVolumeOfEffect(
int soundId, double volume) → Future< void> -
Sets the volume of a specified audio effect.
override
-
startAudioMixing(
String filePath, bool loopback, bool replace, int cycle) → Future< void> -
Starts playing and mixing the music file.
override
-
startAudioRecording(
String filePath, AudioSampleRateType sampleRate, AudioRecordingQuality quality) → Future< void> -
Starts an audio recording on the client.
override
-
startChannelMediaRelay(
ChannelMediaRelayConfiguration channelMediaRelayConfiguration) → Future< void> -
Starts to relay media streams across channels.
override
-
startEchoTest(
int intervalInSeconds) → Future< void> -
startLastmileProbeTest(
LastmileProbeConfig config) → Future< void> -
startPreview(
) → Future< void> -
Starts the local video preview before joining a channel.
override
-
stopAllEffects(
) → Future< void> -
Stops playing all audio effects.
override
-
stopAudioMixing(
) → Future< void> -
Stops playing or mixing the music file.
override
-
stopAudioRecording(
) → Future< void> -
Stops the audio recording on the client.
override
-
stopChannelMediaRelay(
) → Future< void> -
Stops the media stream relay.
override
-
stopEchoTest(
) → Future< void> -
stopEffect(
int soundId) → Future< void> -
Stops playing a specified audio effect.
override
-
stopLastmileProbeTest(
) → Future< void> -
stopPreview(
) → Future< void> -
Stops the local video preview and the video.
override
-
switchCamera(
) → Future< void> -
Switches between front and rear cameras.
override
-
switchChannel(
String? token, String? channelName) → Future< void> - Switches to a different channel.
-
toString(
) → String -
A string representation of this object.
inherited
-
unloadEffect(
int soundId) → Future< void> -
Releases a specified preloaded audio effect from the memory.
override
-
unregisterMediaMetadataObserver(
) → Future< void> -
updateChannelMediaRelay(
ChannelMediaRelayConfiguration channelMediaRelayConfiguration) → Future< void> -
uploadLogFile(
) → Future< String?>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited