NERtcEngine class Null safety
NERtc Core Interface
Constructors
- NERtcEngine()
-
factory
Properties
- audioEffectManager → NERtcAudioEffectManager
-
Get the audio effect management module
read-only
- audioMixingManager → NERtcAudioMixingManager
-
Get the audio mixing management module
read-only
- deviceManager → NERtcDeviceManager
-
Get the device management module
read-only
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
addLiveStreamTask(
NERtcLiveStreamTaskInfo taskInfo, AddLiveTaskCallback? callback) → Future< int> -
Add a live streaming task. After the method is successfully called, the current user can receive the notification about the status of the live streaming task. The operation is valid during a call.
taskInfolive streaming task info AddLiveTaskCallback operation result. The callback is triggered when the operation succeeds -
adjustPlaybackSignalVolume(
int volume) → Future< int> - Adjust the playback volume The method can be called before or after joining a channel. Value range: 0 ~ 400 0: muted 100: Original volume (default) 400: The maximum value can be four times the original volume. The limit value is protected.
-
adjustRecordingSignalVolume(
int volume) → Future< int> - Adjust the recording volume. The method can be called before or after joining a channel. Value range: 0 ~ 400 0: muted 100: Original volume (default) 400: The maximum value can be four times the original volume. The limit value is protected.
-
adjustUserPlaybackSignalVolume(
int uid, int volume) → Future< int> - Adjust the playback volume of local streams received from from a specified remote user.
-
clearStatsEventCallback(
) → Future< int> - Clear the callback for the stats event
-
create(
{required String appKey, required NERtcChannelEventCallback channelEventCallback, NERtcOptions? options}) → Future< int> - Create an NERtc instance
-
enableAudioVolumeIndication(
bool enable, int interval) → Future< int> - Enables the volume indication. The SDK sends to the app the current speaker and the volume
-
enableDualStreamMode(
bool enable) → Future< int> - Specifies if the dual stream mode is enabled.
-
enableEncryption(
bool enable, NERtcEncryptionConfig config) → Future< int> - Enable or disable media stream encryption.
-
enableLocalAudio(
bool enable) → Future< int> - Enable or disable the local audio (capture and publish)
-
enableLocalVideo(
bool enable) → Future< int> - Enable or disable the local video capture and publishing.
-
enableSuperResolution(
bool enable) → Future< int> - Enables or disables AI super resolution. Before you enable the AI super resolution feature, contact technical support to activate the AI super resolution feature. AI super resolution is only valid for the following types of video streams:
-
getConnectionState(
) → Future< int> - Gets the connection state of a channel
-
joinChannel(
String? token, String channelName, int uid) → Future< int> - Joins an RTC room.
-
leaveChannel(
) → Future< int> - Leave a channel
-
muteLocalAudioStream(
bool mute) → Future< int> - Mute the local audio stream The method stops or resumes publishing the local audio stream.
-
muteLocalVideoStream(
bool mute) → Future< int> - Mute the local video stream
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
release(
) → Future< int> - Release an NERtc instance and free up resources
-
removeLiveStreamTask(
String taskId, DeleteLiveTaskCallback? callback) → Future< int> - Deletes a streaming task. The operation is valid during a call
-
sendSEIMsg(
String seiMsg, {int streamType = NERtcVideoStreamType.main}) → Future< int> - Send the SEI message By default, the SEI is transmitted by using the mainstream For more information, see NERtcChannelEventCallback.onReceiveSEIMsg This API has the following limits:
-
setAudioEffectPreset(
int preset) → Future< int> -
Set a preset voice changer effect.
The method can add multiple preset audio effects to original human voices and change audio profiles. -
setAudioProfile(
NERtcAudioProfile profile, NERtcAudioScenario scenario) → Future< int> - Set the audio scenario and mode. The method must be invoked before the init method.
-
setCameraCaptureConfig(
NERtcCameraCaptureConfig captureConfig) → Future< int> - Set the preferences for the capturing data from local cameras
-
setChannelProfile(
int channelProfile) → Future< int> - Set the channel profile You can call the method before joining a channel. SDK applies different optimization strategies based on different scenarios. The communication scenario prefers fluent data transfer and the live streaming scenario prefers graphic quality.
-
setClientRole(
int role) → Future< int> -
Set a role.
Users can set a role to audience or host before or after joining a channel by calling setClientRole.
roleuser role NERtcClientRole -
setLocalMediaPriority(
int priority, bool isPreemptive) → Future< int> - Sets the priority of media streams from a local user.
-
setLocalPublishFallbackOption(
int option) → Future< int> - Sets the fallback option for the published local video stream based on the network conditions.
-
setLocalVideoConfig(
NERtcVideoConfig videoConfig) → Future< int> - Set the video encoding profile.
-
setLocalVoiceEqualization(
int bandFrequency, int bandGain) → Future< int> - Sets the local voice equalization effect, or customizes center frequencies of the local voice effects.
-
setLocalVoicePitch(
double pitch) → Future< int> -
Set the voice pitch of a local speaker.
The method changes the voice pitch of the local speaker. -
setRemoteSubscribeFallbackOption(
int option) → Future< int> - Sets the fallback option for the subscribed remote audio and video stream with poor network connections.
-
setStatsEventCallback(
NERtcStatsEventCallback callback) → Future< int> - Set a callback for the stats event
-
setVoiceBeautifierPreset(
int preset) → Future< int> -
Sets a preset voice beautifier effect.
The method can set a preset voice beautifier effect for a local user who sends an audio stream. -
startAudioDump(
) → Future< int> - Start creating an audio dump
-
startAudioRecording(
String filePath, int sampleRate, int quality) → Future< int> - Starts an audio recording from a client.
-
startChannelMediaRelay(
NERtcChannelMediaRelayConfiguration config) → Future< int> - Start relaying media streams across rooms.
-
startScreenCapture(
NERtcScreenConfig config) → Future< int> - Start screen sharing using the local substream.
-
startVideoPreview(
) → Future< int> - Start video preview
-
stopAudioDump(
) → Future< int> - Stop creating an audio dump
-
stopAudioRecording(
) → Future< int> - Stops the audio recording on the client.
-
stopChannelMediaRelay(
) → Future< int> - Stops media stream relay across rooms.
-
stopScreenCapture(
) → Future< int> - Stop screen sharing using the local substream.
-
stopVideoPreview(
) → Future< int> - Stop video preview
-
subscribeAllRemoteAudio(
bool subscribe) → Future< int> - Subscribe to or unsubscribe from all audio streams. This setting applies to subsequent users that join the room.
-
subscribeRemoteAudio(
int uid, bool subscribe) → Future< int> - Subscribe to or unsubscribe from audio streams published by specified users.
-
subscribeRemoteSubStreamVideo(
int uid, bool subscribe) → Future< int> - Subscribe to or unsubscribe from video substreams from specified remote users
-
subscribeRemoteVideo(
int uid, int streamType, bool subscribe) → Future< int> - Subscribe to or unsubscribe from video streams from specified remote users
-
switchChannel(
String? token, String channelName) → Future< int> -
Switch to a different RTC room.
In live streaming, audiences can switch from the current room to another room calling this method. After you switches to another room: -
toString(
) → String -
A string representation of this object.
inherited
-
updateChannelMediaRelay(
NERtcChannelMediaRelayConfiguration config) → Future< int> - Updates the information about the destination room for media stream relay.
-
updateLiveStreamTask(
NERtcLiveStreamTaskInfo taskInfo, UpdateLiveTaskCallback? callback) → Future< int> -
Updates a streaming task. The operation is valid during a call.
taskInfolive streaming task info UpdateLiveTaskCallback operation result. The callback is triggered when the operation succeeds -
uploadSdkInfo(
) → Future< int> - Upload the SDK log You can call the method after joining a channel.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited