RtcEngine class
RtcEngine is the main class of the SDK.
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.
-
addPublishStreamUrl(
String url, bool transcodingEnabled) → Future< void> - Publishes the local stream to the CDN.
-
addVideoWatermark(
String watermarkUrl, WatermarkOptions options) → Future< void> -
adjustAudioMixingPlayoutVolume(
int volume) → Future< void> - Adjusts the volume of audio mixing for local playback.
-
adjustAudioMixingPublishVolume(
int volume) → Future< void> - Adjusts the volume of audio mixing for publishing (sending to other users).
-
adjustAudioMixingVolume(
int volume) → Future< void> - Adjusts the volume of audio mixing.
-
adjustPlaybackSignalVolume(
int volume) → Future< void> - Adjusts the playback volume of all remote users.
-
adjustRecordingSignalVolume(
int volume) → Future< void> - Adjusts the recording volume.
-
adjustUserPlaybackSignalVolume(
String uid, int volume) → Future< void> - Adjusts the playback volume of a specified remote user.
-
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.
-
disableLastmileTest(
) → Future< void> -
disableVideo(
) → Future< void> - Disables the video module.
-
enableAudio(
) → Future< void> - Enables the audio module.
-
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.
-
enableDeepLearningDenoise(
bool enabled) → Future< void> -
enableDualStreamMode(
bool enabled) → Future< void> - Enables/Disables the dual video stream mode.
-
enableEncryption(
bool enabled, EncryptionConfig config) → Future< void> -
enableFaceDetection(
bool enable) → Future< void> - Enables/Disables face detection for the local user.
-
enableInEarMonitoring(
bool enabled) → Future< void> - Enables in-ear monitoring.
-
enableLastmileTest(
) → Future< void> -
enableLocalAudio(
bool enabled) → Future< void> - Enables/Disables the local audio capture.
-
enableLocalVideo(
bool enabled) → Future< void> - Disables/Re-enables the local video capture.
-
enableRemoteSuperResolution(
int uid, bool enable) → Future< void> -
enableSoundPositionIndication(
bool enabled) → Future< void> -
enableVideo(
) → Future< void> - Enables the video module.
-
enableWebSdkInteroperability(
bool enabled) → Future< void> -
getAudioMixingPlayoutVolume(
) → Future< int?> - Gets the audio mixing volume for local playback.
-
getAudioMixingPublishVolume(
) → Future< int?> - Gets the audio mixing volume for publishing.
-
getCallId(
) → Future< String?> - Gets the current call ID.
-
getCameraMaxZoomFactor(
) → Future< double?> - Gets the maximum zoom ratio supported by the camera.
-
getConnectionState(
) → Future< ConnectionStateType> - Gets the connection state of the SDK.
-
getEffectsVolume(
) → Future< double?> - Gets the volume of the audio effects.
-
getNativeHandle(
) → Future< int?> -
isCameraAutoFocusFaceModeSupported(
) → Future< bool?> - Checks whether the camera auto-face focus function is supported.
-
isCameraExposurePositionSupported(
) → Future< bool?> - Checks whether the camera exposure function is supported.
-
isCameraFocusSupported(
) → Future< bool?> - Checks whether the camera manual focus function is supported.
-
isCameraTorchSupported(
) → Future< bool?> - Checks whether the camera flash function is supported.
-
isCameraZoomSupported(
) → Future< bool?> - Checks whether the camera zoom function is supported.
-
isSpeakerphoneEnabled(
) → Future< bool?> - Checks whether the speakerphone is enabled.
-
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.
-
muteAllRemoteVideoStreams(
bool muted) → Future< void> - Stops/Resumes receiving all remote video streams.
-
muteLocalAudioStream(
bool muted) → Future< void> - Stops/Resumes sending the local audio stream.
-
muteLocalVideoStream(
bool muted) → Future< void> - Stops/Resumes sending the local video stream.
-
muteRemoteAudioStream(
String uid, bool muted) → Future< void> - Stops/Resumes receiving a specified audio stream.
-
muteRemoteVideoStream(
String uid, bool muted) → Future< void> - Stops/Resumes receiving a specified remote user's video stream.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseAllEffects(
) → Future< void> - Pauses all audio effects.
-
pauseAudioMixing(
) → Future< void> - Pauses playing and mixing the music file.
-
pauseEffect(
int soundId) → Future< void> - Pauses a specified audio effect.
-
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.
-
preloadEffect(
int soundId, String filePath) → Future< void> - Preloads a specified audio effect file into the memory.
-
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.
-
removePublishStreamUrl(
String url) → Future< void> - Removes an RTMP stream from the CDN.
-
renewToken(
String token) → Future< void> - Renews the token when the current token expires.
-
resumeAllEffects(
) → Future< void> - Resumes playing all audio effects.
-
resumeAudioMixing(
) → Future< void> - Resumes playing and mixing the music file.
-
resumeEffect(
int soundId) → Future< void> - Resumes playing a specified audio effect.
-
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.
-
setAudioMixingPosition(
int pos) → Future< void> -
setAudioProfile(
AudioProfile profile, AudioScenario scenario) → Future< void> - Sets the audio parameters and application scenarios.
-
setAudioSessionOperationRestriction(
AudioSessionOperationRestriction restriction) → Future< void> -
setCameraAutoFocusFaceModeEnabled(
bool enabled) → Future< void> - Enables the camera auto-face focus function.
-
setCameraCapturerConfiguration(
CameraCapturerConfiguration config) → Future< void> - Sets the camera capturer configuration.
-
setCameraExposurePosition(
double positionXinView, double positionYinView) → Future< void> - Sets the camera exposure position.
-
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.
-
setCameraTorchOn(
bool isOn) → Future< void> - Enables the camera flash function.
-
setCameraZoomFactor(
double factor) → Future< void> - Sets the camera zoom ratio.
-
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.
-
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.
-
setEffectsVolume(
double volume) → Future< void> - Sets the volume of the audio effects.
-
setEnableSpeakerphone(
bool enabled) → Future< void> - Enables/Disables the audio playback route to the speakerphone.
-
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.
-
setLiveTranscoding(
LiveTranscoding transcoding) → Future< void> - Sets the video layout and audio settings for CDN live.
-
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.
-
setRemoteSubscribeFallbackOption(
StreamFallbackOptions option) → Future< void> - Sets the fallback option for the remotely subscribed video stream based on the network conditions.
-
setRemoteUserPriority(
int uid, UserPriority userPriority) → Future< void> -
setRemoteVideoStreamType(
String uid, VideoStreamType streamType) → Future< void> - Sets the stream type of the remote video.
-
setRemoteVoicePosition(
int uid, double pan, double gain) → Future< void> -
setVideoEncoderConfiguration(
VideoEncoderConfiguration config) → Future< void> - Sets the video encoder configuration.
-
setVolumeOfEffect(
int soundId, double volume) → Future< void> - Sets the volume of a specified audio effect.
-
startAudioMixing(
String filePath, bool loopback, bool replace, int cycle) → Future< void> - Starts playing and mixing the music file.
-
startAudioRecording(
String filePath, AudioSampleRateType sampleRate, AudioRecordingQuality quality) → Future< void> - Starts an audio recording on the client.
-
startChannelMediaRelay(
ChannelMediaRelayConfiguration channelMediaRelayConfiguration) → Future< void> - Starts to relay media streams across channels.
-
startEchoTest(
int intervalInSeconds) → Future< void> -
startLastmileProbeTest(
LastmileProbeConfig config) → Future< void> -
startPreview(
) → Future< void> - Starts the local video preview before joining a channel.
-
stopAllEffects(
) → Future< void> - Stops playing all audio effects.
-
stopAudioMixing(
) → Future< void> - Stops playing or mixing the music file.
-
stopAudioRecording(
) → Future< void> - Stops the audio recording on the client.
-
stopChannelMediaRelay(
) → Future< void> - Stops the media stream relay.
-
stopEchoTest(
) → Future< void> -
stopEffect(
int soundId) → Future< void> - Stops playing a specified audio effect.
-
stopLastmileProbeTest(
) → Future< void> -
stopPreview(
) → Future< void> - Stops the local video preview and the video.
-
switchCamera(
) → Future< void> - Switches between front and rear cameras.
-
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.
-
unregisterMediaMetadataObserver(
) → Future< void> -
updateChannelMediaRelay(
ChannelMediaRelayConfiguration channelMediaRelayConfiguration) → Future< void> -
uploadLogFile(
) → Future< String?>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited