RtcEngine class
RtcEngine is the main class of the Meta 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> - Adds a watermark image to the local video.
-
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(
int uid, int volume) → Future< void> - Adjusts the playback volume of a specified remote user.
-
clearVideoWatermarks(
) → Future< void> - Removes the watermark image from the video stream added by RtcEngine.addVideoWatermark.
-
complain(
String callId, String description) → Future< void> - Allows a user to complain about the call quality after a call ends.
-
createDataStream(
bool reliable, bool ordered) → Future< int?> - Creates a data stream.
-
destroy(
) → Future< void> - Destroys the RtcEngine instance and releases all resources used by the Meta SDK.
-
disableAudio(
) → Future< void> - Disables the audio module.
-
disableLastmileTest(
) → Future< void> - Disables the network connection quality test.
-
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.
-
enableDualStreamMode(
bool enabled) → Future< void> - Enables/Disables the dual video stream mode.
-
enableEncryption(
bool enabled, EncryptionConfig config) → Future< void> - Enables/Disables the built-in encryption.
-
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> - Enables the network connection quality test.
-
enableLocalAudio(
bool enabled) → Future< void> - Enables/Disables the local audio capture.
-
enableLocalVideo(
bool enabled) → Future< void> - Disables/Re-enables the local video capture.
-
enableSoundPositionIndication(
bool enabled) → Future< void> - Enables/Disables stereo panning for remote users.
-
enableVideo(
) → Future< void> - Enables the video module.
-
enableWebSdkInteroperability(
bool enabled) → Future< void> - Enables interoperability with the Meta Web SDK (LiveBroadcasting only).
-
getAudioMixingCurrentPosition(
) → Future< int?> - Gets the playback position (ms) of the music file.
-
getAudioMixingDuration(
) → Future< int?> - Gets the duration (ms) of the music file.
-
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.
-
getUserInfoByUid(
int uid) → Future< UserInfo> - Gets the user information by passing in the user ID.
-
getUserInfoByUserAccount(
String userAccount) → Future< UserInfo> - Gets the user information by passing in the user account.
-
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 optionalInfo, int optionalUid) → Future< void> - Allows a user to join a channel.
-
joinChannelWithUserAccount(
String token, String channelName, String userAccount) → Future< void> - Joins the channel with a user account.
-
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(
int uid, bool muted) → Future< void> - Stops/Resumes receiving a specified audio stream.
-
muteRemoteVideoStream(
int 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> - Allows the user to rate a call after the call ends.
-
registerLocalUserAccount(
String appId, String userAccount) → Future< void> - Registers a user account.
-
registerMediaMetadataObserver(
) → Future< void> - Registers the metadata observer.
-
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> - This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes and each string not exceeding 100 bytes. To try out this function, contact support@wuji.co and discuss the format of customized messages with us.
-
sendMetadata(
String metadata) → Future< void> - Sends the metadata.
-
sendStreamMessage(
int streamId, String message) → Future< void> - Sends data stream messages.
-
setAudioMixingPitch(
int pitch) → Future< void> - Sets the pitch of the local music file.
-
setAudioMixingPosition(
int pos) → Future< void> - Sets the playback position (ms) of the music file to a different starting position (the default plays from the beginning).
-
setAudioProfile(
AudioProfile profile, AudioScenario scenario) → Future< void> - Sets the audio parameters and application scenarios.
-
setAudioSessionOperationRestriction(
AudioSessionOperationRestriction restriction) → Future< void> - The SDK and the app can both configure the audio session by default. The app may occasionally use other apps or third-party components to manipulate the audio session and restrict the SDK from doing so. This method allows the app to restrict the SDK’s manipulation of the audio session.
-
setBeautyEffectOptions(
bool enabled, BeautyOptions options) → Future< void> - Enables/Disables image enhancement and sets the options.
-
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 Meta 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> - Sets the built-in encryption mode.
-
setEncryptionSecret(
String secret) → Future< void> - Enables built-in encryption with an encryption password before joining a channel.
-
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> - Sets the fallback option for the locally published video stream based on the network conditions.
-
setLocalVoiceChanger(
AudioVoiceChanger voiceChanger) → Future< void> - Sets the local voice changer option.
-
setLocalVoiceEqualization(
AudioEqualizationBandFrequency bandFrequency, int bandGain) → Future< void> - Sets the local voice equalization effect.
-
setLocalVoicePitch(
double pitch) → Future< void> - Changes the voice pitch of the local speaker.
-
setLocalVoiceReverb(
AudioReverbType reverbKey, int value) → Future< void> - Sets the local voice reverberation.
-
setLocalVoiceReverbPreset(
AudioReverbPreset preset) → Future< void> - Sets the preset local voice reverberation effect
-
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> - Sets the maximum size of the metadata.
-
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> - Sets the priority of a remote user's media stream.
-
setRemoteVideoStreamType(
int uid, VideoStreamType streamType) → Future< void> - Sets the stream type of the remote video.
-
setRemoteVoicePosition(
int uid, double pan, double gain) → Future< void> - Sets the sound position of a remote user. When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games.
-
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> - Starts an audio call test.
-
startLastmileProbeTest(
LastmileProbeConfig config) → Future< void> - Starts the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
-
startMediaRecord(
MediaRecordConfig mediaRecordConfig) → Future< void> - 开始录制 Note 仅用于zfz
-
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> - Stops the audio call test.
-
stopEffect(
int soundId) → Future< void> - Stops playing a specified audio effect.
-
stopLastmileProbeTest(
) → Future< void> - Stops the last-mile network probe test.
-
stopMediaRecord(
) → Future< void> - 结束录制 Note 仅用于zfz
-
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> - Unregisters the metadata observer.
-
updateChannelMediaRelay(
ChannelMediaRelayConfiguration channelMediaRelayConfiguration) → Future< void> - Updates the channels for media relay.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited