NERtc Unity SDK  V4.5.907
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
nertc.IRtcEngine Class Referenceabstract
Inheritance diagram for nertc.IRtcEngine:

Public Member Functions

abstract int Initialize (RtcEngineContext param)
 
abstract void Release (bool sync)
 
abstract int SetClientRole (RtcClientRole role)
 
abstract int SetChannelProfile (RtcChannelProfileType profile)
 
abstract int JoinChannel (string token, string channelName, ulong uid)
 
abstract int SwitchChannel (string token, string channelName)
 
abstract int LeaveChannel ()
 
abstract int EnableLocalAudio (bool enabled)
 
abstract int SetupLocalVideoCanvas (RtcVideoCanvas canvas)
 
abstract int SetupRemoteVideoCanvas (ulong uid, RtcVideoCanvas canvas)
 
abstract int EnableLocalVideo (bool enabled)
 
abstract int SubscribeRemoteVideoStream (ulong uid, RtcRemoteVideoStreamType type, bool subscribe)
 
abstract int SwitchCamera ()
 
abstract IRtcChannel CreateChannel (string channelName)
 
abstract IRtcChannel GetChannel (string channelName)
 
abstract RtcConnectionStateType GetConnectionState ()
 
abstract int MuteLocalAudioStream (bool mute)
 
abstract int SetAudioProfile (RtcAudioProfileType profile, RtcAudioScenarioType scenario)
 
abstract int SetAudioEffectPreset (RtcVoiceChangerType type)
 
abstract int SetVoiceBeautifierPreset (RtcVoiceBeautifierType type)
 
abstract int SetLocalVoicePitch (double pitch)
 
abstract int SetLocalVoiceEqualization (RtcVoiceEqualizationBand bandFrequency, int bandGain)
 
abstract int SubscribeRemoteAudioStream (ulong uid, bool subscribe)
 
abstract int SetSudioSessionOperationRestriction (RtcAudioSessionOperationRestriction restriction)
 
abstract int SetPlayoutDeviceMute (bool muted)
 
abstract int GetPlayoutDeviceMute (ref bool muted)
 
abstract int SetRecordDeviceMute (bool muted)
 
abstract int GetRecordDeviceMute (ref bool muted)
 
abstract bool IsCameraZoomSupported ()
 
abstract bool IsCameraTorchSupported ()
 
abstract bool IsCameraFocusSupported ()
 
abstract bool IsCameraExposurePositionSupported ()
 
abstract int SetCameraExposurePosition (float pointX, float pointY)
 
abstract int SetCameraTorchOn (bool on)
 
abstract bool IsCameraTorchOn ()
 
abstract int SetCameraZoomFactor (float factor)
 
abstract float MaxCameraZoomScale ()
 
abstract int SetCameraFocusPosition (float x, float y)
 
abstract int SetCameraCaptureConfig (RtcCameraCaptureConfig config)
 
abstract int SubscribeAllRemoteAudioStream (bool subscribe)
 
abstract int SetVideoConfig (RtcVideoConfig config)
 
abstract int EnableDualStreamMode (bool enable)
 
abstract int SetupLocalSubstreamVideoCanvas (RtcVideoCanvas canvas)
 
abstract int SetLocalSubstreamRenderMode (RtcVideoScalingMode scalingMode)
 
abstract int SetLocalRenderMode (RtcVideoScalingMode scalingMode)
 
abstract int SetLocalVideoMirrorMode (RtcVideoMirrorMode mirrorMode)
 
abstract int SetRemoteRenderMode (ulong uid, RtcVideoScalingMode scalingMode)
 
abstract int SetupRemoteSubstreamVideoCanvas (ulong uid, RtcVideoCanvas canvas)
 
abstract int SubscribeRemoteVideoSubstream (ulong uid, bool subscribe)
 
abstract int SetRemoteSubsteamRenderMode (ulong uid, RtcVideoScalingMode scalingMode)
 
abstract int StartVideoPreview ()
 
abstract int StopVideoPreview ()
 
abstract int MuteLocalVideoStream (bool mute)
 
abstract int SetLocalMediaPriority (int priority, bool isPreemptive)
 
abstract int SetParameters (string parameters)
 
abstract int SetRecordingAudioFrameParameters (RtcAudioFrameRequestFormat format)
 
abstract int SetPlaybackAudioFrameParameters (RtcAudioFrameRequestFormat format)
 
abstract int SetMixedAudioFrameParameters (int sampleRate)
 
abstract int SetAudioFrameObserver (IAudioFrameObserver observer)
 
abstract int StartAudioDump ()
 
abstract int StopAudioDump ()
 
abstract int SetLoudSpeakerMode (bool enable)
 
abstract int GetLoudSpeakerMode (ref bool enabled)
 
abstract int StartAudioMixing (RtcCreateAudioMixingOption option)
 
abstract int StopAudioMixing ()
 
abstract int PauseAudioMixing ()
 
abstract int ResumeAudioMixing ()
 
abstract int SetAudioMixingSendVolume (uint volume)
 
abstract int GetAudioMixingSendVolume (ref uint volume)
 
abstract int SetAudioMixingPlaybackVolume (uint volume)
 
abstract int GetAudioMixingPlaybackVolume (ref uint volume)
 
abstract int GetAudioMixingDuration (ref ulong duration)
 
abstract int GetAudioMixingCurrentPosition (ref ulong position)
 
abstract int SetAudioMixingPosition (ulong seekPosition)
 
abstract int PlayEffect (uint effectId, RtcCreateAudioEffectOption option)
 
abstract int StopEffect (uint effectId)
 
abstract int StopAllEffects ()
 
abstract int PauseEffect (uint effectId)
 
abstract int ResumeEffect (uint effectId)
 
abstract int PauseAllEffects ()
 
abstract int ResumeAllEffects ()
 
abstract int SetEffectSendVolume (uint effectId, uint volume)
 
abstract int GetEffectSendVolume (uint effectId, ref uint volume)
 
abstract int SetEffectPlaybackVolume (uint effectId, uint volume)
 
abstract int GetEffectPlaybackVolume (uint effectId, ref uint volume)
 
abstract int EnableEarback (bool enabled, uint volume)
 
abstract int SetEarbackVolume (uint volume)
 
abstract int EnableLoopbackRecording (bool enabled, string deviceName)
 
abstract int AdjustLoopbackRecordingSignalVolume (uint volume)
 
abstract int SetStatsObserver (IMediaStatsObserver observer)
 
abstract int EnableAudioVolumeIndication (bool enable, ulong interval)
 
abstract int StartScreenCaptureByScreenRect (RtcRectangle screenRect, RtcRectangle regionRect, RtcScreenCaptureParameters captureParams)
 
abstract int StartScreenCaptureByDisplayId (ulong displayId, RtcRectangle regionRect, RtcScreenCaptureParameters captureParams)
 
abstract int StartScreenCaptureByWindowId (IntPtr windowId, RtcRectangle regionRect, RtcScreenCaptureParameters captureParams)
 
abstract int StartScreenCapture (RtcScreenCaptureParameters captureParams, bool externalCapturer)
 
abstract int UpdateScreenCaptureRegion (RtcRectangle regionRect)
 
abstract int StopScreenCapture ()
 
abstract int PauseScreenCapture ()
 
abstract int ResumeScreenCapture ()
 
abstract int SetExcludeWindowList (IntPtr[] windowList)
 
abstract int SetExternalVideoSource (bool enabled)
 
abstract int PushExternalVideoFrame (RtcExternalVideoFrame frame)
 
abstract int PushSubstreamExternalVideoFrame (RtcExternalVideoFrame videoFrame)
 
abstract int SetExternalAudioSource (bool enabled, int sampleRate, int channels)
 
abstract int PushExternalAudioFrame (RtcAudioFrame frame)
 
abstract int SetExternalAudioRender (bool enabled, int sampleRate, int channels)
 
abstract int PullExternalAudioFrame (byte[] data, int length)
 
abstract string GetVersion ()
 
abstract string GetErrorDescription (RtcErrorCode errorCode)
 
abstract int UploadSdkInfo ()
 
abstract int AddLiveStreamTask (RtcLiveStreamTaskInfo info)
 
abstract int UpdateLiveStreamTask (RtcLiveStreamTaskInfo info)
 
abstract int RemoveLiveStreamTask (string taskId)
 
abstract int SendSEIMsg (byte[] data, RtcVideoStreamType type)
 
abstract int SetLocalCanvasWatermarkConfigs (RtcVideoStreamType type, RtcCanvasWatermarkConfig config)
 
abstract int SetRemoteCanvasWatermarkConfigs (ulong uid, RtcVideoStreamType type, RtcCanvasWatermarkConfig config)
 
abstract int TakeLocalSnapshot (RtcVideoStreamType streamType, RtcTakeSnapshotCallback callback)
 
abstract int TakeRemoteSnapshot (ulong uid, RtcVideoStreamType streamType, RtcTakeSnapshotCallback callback)
 
abstract int StartAudioRecording (string filePath, int sampleRate, RtcAudioRecordingQuality quality)
 
abstract int StopAudioRecording ()
 
abstract int AdjustRecordingSignalVolume (int volume)
 
abstract int AdjustPlaybackSignalVolume (int volume)
 
abstract int AdjustUserPlaybackSignalVolume (ulong uid, int volume)
 
abstract int StartChannelMediaRelay (RtcChannelMediaRelayConfig config)
 
abstract int UpdateChannelMediaRelay (RtcChannelMediaRelayConfig config)
 
abstract int StopChannelMediaRelay ()
 
abstract int SetLocalPublishFallbackOption (RtcStreamFallbackOption option)
 
abstract int SetRemoteSubscribeFallbackOption (RtcStreamFallbackOption option)
 
abstract int EnableSuperResolution (bool enable)
 
abstract int EnableEncryption (bool enable, RtcEncryptionConfig config)
 
abstract int StartLastmileProbeTest (RtcLastmileProbeConfig config)
 
abstract int StopLastmileProbeTest ()
 
abstract int UpdateSpatializerAudioRecvRange (int audibleDistance, int conversationalDistance, RtcDistanceRolloffModel rollOff)
 
abstract int UpdateSpatializerSelfPosition (RtcSpatializerPositionInfo info)
 
abstract int EnableSpatializerRoomEffects (bool enable)
 
abstract int SetSpatializerRoomProperty (RtcSpatializerRoomProperty roomProperty)
 
abstract int SetSpatializerRenderMode (RtcSpatializerRenderMode mode)
 
abstract int EnableSpatializer (bool enable)
 
abstract int EnableAvatar (bool enable)
 

Static Public Member Functions

static IRtcEngine GetInstance ()
 

Public Attributes

OnError OnError
 
OnWarning OnWarning
 
OnReleasedHwResources OnReleasedHwResources
 
OnJoinChannel OnJoinChannel
 
OnReconnectingStart OnReconnectingStart
 
OnConnectionStateChange OnConnectionStateChange
 
OnNetworkTypeChanged OnNetworkTypeChanged
 
OnRejoinChannel OnRejoinChannel
 
OnLeaveChannel OnLeaveChannel
 
OnDisconnect OnDisconnect
 
OnClientRoleChanged OnClientRoleChanged
 
OnUserJoined OnUserJoined
 
OnUserLeft OnUserLeft
 
OnUserAudioStart OnUserAudioStart
 
OnUserAudioStop OnUserAudioStop
 
OnUserVideoStart OnUserVideoStart
 
OnUserVideoStop OnUserVideoStop
 
OnUserSubStreamVideoStart OnUserSubStreamVideoStart
 
OnUserSubStreamVideoStop OnUserSubStreamVideoStop
 
OnScreenCaptureStatusChanged OnScreenCaptureStatusChanged
 
OnUserVideoProfileUpdate OnUserVideoProfileUpdate
 
OnUserAudioMute OnUserAudioMute
 
OnUserVideoMute OnUserVideoMute
 
OnAudioDeviceRoutingDidChange OnAudioDeviceRoutingDidChange
 
OnAudioDeviceStateChanged OnAudioDeviceStateChanged
 
OnAudioDefaultDeviceChanged OnAudioDefaultDeviceChanged
 
OnVideoDeviceStateChanged OnVideoDeviceStateChanged
 
OnCameraFocusChanged OnCameraFocusChanged
 
OnCameraExposureChanged OnCameraExposureChanged
 
OnFirstAudioDataReceived OnFirstAudioDataReceived
 
OnFirstVideoDataReceived OnFirstVideoDataReceived
 
OnFirstAudioFrameDecoded OnFirstAudioFrameDecoded
 
OnFirstVideoFrameDecoded OnFirstVideoFrameDecoded
 
OnCaptureVideoFrame OnCaptureVideoFrame
 
OnAudioMixingStateChanged OnAudioMixingStateChanged
 
OnAudioMixingTimestampUpdate OnAudioMixingTimestampUpdate
 
OnAudioEffectFinished OnAudioEffectFinished
 
OnLocalAudioVolumeIndication OnLocalAudioVolumeIndication
 
OnRemoteAudioVolumeIndication OnRemoteAudioVolumeIndication
 
OnAddLiveStreamTask OnAddLiveStreamTask
 
OnUpdateLiveStreamTask OnUpdateLiveStreamTask
 
OnRemoveLiveStreamTask OnRemoveLiveStreamTask
 
OnLiveStreamStateChanged OnLiveStreamStateChanged
 
OnAudioHowling OnAudioHowling
 
OnRecvSEIMessage OnRecvSEIMessage
 
OnAudioRecording OnAudioRecording
 
OnMediaRelayStateChanged OnMediaRelayStateChanged
 
OnMediaRelayEvent OnMediaRelayEvent
 
OnPublishFallbackToAudioOnly OnPublishFallbackToAudioOnly
 
OnSubscribeFallbackToAudioOnly OnSubscribeFallbackToAudioOnly
 
OnLastmileQuality OnLastmileQuality
 
OnLastmileProbeResult OnLastmileProbeResult
 
OnAvatarUserJoined OnAvatarUserJoined
 
OnAvatarUserLeft OnAvatarUserLeft
 
OnAvatarStatus OnAvatarStatus
 

Properties

abstract IAudioDeviceManager AudioDeviceManager [get]
 
abstract IVideoDeviceManager VideoDeviceManager [get]
 

Detailed Description

RtcEngine class provides main interface-related methods for applications to call. and you can activate the communication feature the NERTC SDK provides.

Member Function Documentation

◆ GetInstance()

static IRtcEngine nertc.IRtcEngine.GetInstance ( )
inlinestatic

Retrieves the IRtcEngine static object.

Returns
The IRtcEngine Object

◆ Initialize()

abstract int nertc.IRtcEngine.Initialize ( RtcEngineContext  param)
pure virtual

Initializes the NERTC SDK service.
You must call the method to initialize before calling other methods. After successfully initializing, the audio and video call mode is enabled by default.

Warning
  • Callers must use the same AppKey to make audio or video calls.
  • One IRtcEngine instance object must share the same App Key. If you need to change the AppKey, you must first call Release to destroy the current instance, and then call the method to create a new instance.
Parameters
[in]paramThe passed RtcEngineContext object.
Returns
  • 0: Success.
  • Other values: Failure.

◆ Release()

abstract void nertc.IRtcEngine.Release ( bool  sync)
pure virtual

Destroys an NERtc engine instance to release resources.
This method releases all resources used by the NERTC SDK. In some cases, real-time audio and video communication is only needed upon your demands. If no RTC calls are required, you can call this method to release resources.
After you call the release method, other methods and callbacks supported by the SDK become unavailable.

Note
If you need to use IRtcEngine instance again ,you need to initialize after release.
Parameters
[in]syncThe value is true by default, which can only be set to true. The default setting indicates synchronization call of the instance. You must return before you release the resources and return the IRtcEngine object resources.
App cannot call the interface in the callbacks returned by the SDK. If not, deadlock occurs and the SDK can only retrieve related object resources before the callback is returned. The SDK automatically detects the deadlock, and changes the deadlock to asynchronous call. However, the asynchronous call consumes extra time.

◆ SetClientRole()

abstract int nertc.IRtcEngine.SetClientRole ( RtcClientRole  role)
pure virtual

Sets the role of a user in live streaming.
The method sets the role to host or audience. The permissions of a host and a viewer are different.

  • A host has the permissions to open or close a camera, publish streams, call methods related to publishing streams in interactive live streaming. The status of the host is visible to the users in the room when the host joins or leaves the room.
  • The audience has no permissions to open or close a camera, call methods related to publishing streams in interactive live streaming, and is invisible to other users in the room when the user that has the audience role joins or leaves the room.
    Note
  • By default, a user joins a room as a host.
  • Before a user joins a room, the user can call this method to change the client role to audience. Users can switch the role of a user through the interface after joining the room.
  • If the user switches the role to audience, the SDK automatically closes the audio and video devices.
    Parameters
    [in]roleThe role of a user. RtcClientRole.
    Returns
  • 0: Success.
  • Other values: Failure.

◆ SetChannelProfile()

abstract int nertc.IRtcEngine.SetChannelProfile ( RtcChannelProfileType  profile)
pure virtual

Sets a room scene.
You can set a room scene for a call or live event. Different QoS policies are applied to different scenes.

Note
You must set the profile after joining a call. The setting is invalid after the call ends.
Parameters
[in]profileSets the room scene. For more information, see RtcChannelProfileType .
Returns
  • 0: Success.
  • Other values: Failure.

◆ JoinChannel()

abstract int nertc.IRtcEngine.JoinChannel ( string  token,
string  channelName,
ulong  uid 
)
pure virtual

Joins a channel of audio and video call.
If the specified room does not exist when you join the room, a room with the specified name is automatically created in the server provided by CommsEase.

  • After you join a room by calling the relevant method supported by the SDK, users in the same room can make audio or video calls. Users that join the same room can start a group chat. Apps that use different AppKeys cannot communicate with each other.
  • After the method is called successfully, the OnJoinChannel callback is locally triggered, and the OnUserJoined callback is remotely triggered.
  • If you join a room, you subscribe to the audio streams from other users in the same room by default. In this case, the data usage is billed. To unsubscribe, you can call the SetParameters method.
  • In live streaming, audiences can switch channels by calling SwitchChannel .
    Note
    The ID of each user must be unique.
    Parameters
    [in]tokenThe certification signature used in authentication (NERTC Token). Valid values:
    • Null. You can set the value to null in the debugging mode. This poses a security risk. We recommend that you contact your business manager to change to the default safe mode before your product is officially launched.
    • NERTC Token acquired. In safe mode, the acquired token must be specified. If the specified token is invalid, users are unable to join a room. We recommend that you use the safe mode.
    [in]channelNameThe name of the room. Users that use the same name can join the same room. The name must be of STRING type and must be 1 to 64 characters in length. The following 89 characters are supported: a-z, A-Z, 0-9, space, !#$%&()+-:;≤.,>? @[]^_{|}~”.
    [in]uidThe unique identifier of a user. The uid of each user in a room must be unique.
    uid is optional. The default value is 0. If the uid is not specified (set to 0), the SDK automatically assigns a random uid and returns the uid in the callback of OnJoinChannell. The application layer must keep and maintain the return value. The SDK does not maintain the return value.
    Returns
  • 0: Success.
  • Other values: Failure.

◆ SwitchChannel()

abstract int nertc.IRtcEngine.SwitchChannel ( string  token,
string  channelName 
)
pure virtual

Switches to a room of audio and video call.
In live streaming, the audience can call this method to switch from the current room to another room.
After you switch to another room by calling the method, the local first receive the OnLeaveChannel callback that the user leaves the room, and then receives the
OnJoinChannel callback that the user joins the new room. Remote clients receive the return from OnUserLeft and OnUserJoined.

Note
  • The method applies to only the live streaming. The role is the audience in the RTC room. The room scene is set to live streaming by calling the SetChannelProfile method, and the role of room members is set to audience by calling the SetClientRole method.
  • By default, after a room member switches to another room, the room member subscribes to audio streams from other members of the new room. In this case, data usage is charged and billing is updated. If you want to unsubscribe to the previous audio stream, you can call the SubscribeRemoteAudioStream method with a value of false passed in.
Parameters
[in]tokenThe certification signature used in authentication (NERTC Token). Valid values:
  • Null. You can set the value to null in the debugging mode. We recommend you change to the default safe mode before your product is officially launched.
  • NERTC Token acquired. In safe mode, the acquired token must be specified. If the specified token is invalid, users are unable to join a channel. We recommend that you use the safe mode.
[in]channelNameThe room name that a user wants to switch to.
Returns
  • 0: Success.
  • Other values: Failure.

◆ LeaveChannel()

abstract int nertc.IRtcEngine.LeaveChannel ( )
pure virtual

Leaves the room.
Leaves a room for hang up or calls ended.
A user can call the leaveChannel method to end the call before the user makes another call.
After the method is called successfully, the OnLeaveChannel callback is locally triggered, and the OnUserLeft callback is remotely triggered.

Note
  • The method is asynchronous call. Users cannot exit the room when the method is called and returned. After users exit the room, the SDK triggers the OnLeaveChannel callback.
  • If you call leaveChannel method and instantly call release method, the SDK cannot trigger OnLeaveChannel callback.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableLocalAudio()

abstract int nertc.IRtcEngine.EnableLocalAudio ( bool  enabled)
pure virtual

Enables or disables local audio capture.
The method can enable the local audio again to start local audio capture and processing.
The method does not affect receiving or playing remote audio and audio streams.

Note
The method is different from MuteLocalAudioStream in:.
The method enables the internal engine, which is still valid after you call LeaveChannel.
Parameters
[in]enabled
  • true: Enables local audio feature again. You can enable local audio capture or processing by default.
  • false: Disables local audio feature again. You can stop local audio capture or processing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetupLocalVideoCanvas()

abstract int nertc.IRtcEngine.SetupLocalVideoCanvas ( RtcVideoCanvas  canvas)
pure virtual

Sets local views.
This method is used to set the display information about the local video. The method is applicable for only local users. Remote users are not affected.
Apps can call this API operation to associate with the view that plays local video streams. During application development, in most cases, before joining a room, you must first call this method to set the local video view after the SDK is initialized.

Note
If you use external rendering on the Mac platform, you must set the rendering before the SDK is initialized.
Parameters
[in]canvasThe video canvas information.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetupRemoteVideoCanvas()

abstract int nertc.IRtcEngine.SetupRemoteVideoCanvas ( ulong  uid,
RtcVideoCanvas  canvas 
)
pure virtual

Sets views for remote users.
This method is used to associate remote users with display views and configure the rendering mode and mirror mode for remote views that are displayed locally. The method affects only video display viewed by local users.

Note
  • You need to specify the uid of remote video when the interface is called. In general cases, the uid can be set before users join the room.
  • If the user ID is not retrieved, the App calls this method after the OnUserJoined event is triggered. To disassociate a specified user from a view, you can leave the canvas parameter empty.
  • After a user leaves the room, the association between a remote user and the view is cleared.
Parameters
[in]uidThe ID of a remote user.
[in]canvasThe video canvas information.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableLocalVideo()

abstract int nertc.IRtcEngine.EnableLocalVideo ( bool  enabled)
pure virtual

Enables or disables local audio capture and rendering.
The method enables local video capture.

Note
  • You can call this method before or after you join a room.
  • The method enables the internal engine, which is still valid after you call LeaveChannel.
  • After local video capture is successfully enabled or disabled, the OnUserVideoStop or OnUserVideoStart callback is remotely triggered.
Parameters
[in]enabledWhether to enable local video capture and rendering.
  • true: Enables the local video capture and rendering.
  • false: Disables the local camera device. After local video capture is disabled, remote users cannot receive video streams from local users. However, local users can still receive video streams from remote users. If the setting is false, the local camera is not required to call the method.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SubscribeRemoteVideoStream()

abstract int nertc.IRtcEngine.SubscribeRemoteVideoStream ( ulong  uid,
RtcRemoteVideoStreamType  type,
bool  subscribe 
)
pure virtual

Subscribes or unsubscribes video streams from specified remote users.

  • After a user joins a room, the video streams from remote users are not subscribed by default. If you want to view video streams from specified remote users, you can call this method to subscribe to the video streams from the user when the user joins the room or publishes the video streams.
  • This method can be called only if a user joins a room.
    Parameters
    [in]uidThe user ID.
    [in]typeThe type of the subscribed video streams. RtcRemoteVideoStreamType .
    [in]subscribe
  • true: Subscribes to specified video streams. This is the default value.
  • false: Not subscribing to specified video streams.
    Returns
  • 0: Success.
  • Other values: Failure.

◆ SwitchCamera()

abstract int nertc.IRtcEngine.SwitchCamera ( )
pure virtual

Switches between the front and rear cameras.
Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.

Note
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ CreateChannel()

abstract IRtcChannel nertc.IRtcEngine.CreateChannel ( string  channelName)
pure virtual

Create an IRtcChannel object.

Parameters
[in]channelNameThe name of the room. Users that use the same name can join the same room. The name must be of STRING type and must be 1 to 64 characters in length. The following 89 characters are supported: a-z, A-Z, 0-9, space, !#$%&()+-:;≤.,>? @[]^_{|}~”.
Returns
IRtcChannel object
  • null: failure.

◆ GetChannel()

abstract IRtcChannel nertc.IRtcEngine.GetChannel ( string  channelName)
pure virtual

Get an IRtcChannel object.

Parameters
[in]channelNameThe name of the room. Users that use the same name can join the same room. The name must be of STRING type and must be 1 to 64 characters in length. The following 89 characters are supported: a-z, A-Z, 0-9, space, !#$%&()+-:;≤.,>? @[]^_{|}~”.
Returns
IRtcChannel object
  • null: failure.

◆ GetConnectionState()

abstract RtcConnectionStateType nertc.IRtcEngine.GetConnectionState ( )
pure virtual

Gets the current connection status.

Returns
Returns the current network status. RtcConnectionStateType .

◆ MuteLocalAudioStream()

abstract int nertc.IRtcEngine.MuteLocalAudioStream ( bool  mute)
pure virtual

Enables or disabling publishing the local audio stream. The method is used to enable or disable publishing the local audio stream.

Note
  • This method does not change the state of the audio-recording device because the audio-recording devices are not disabled.
  • The mute state is reset to unmuted after the call ends.
Parameters
[in]muteMute or Unmute.
  • true: Mutes the local audio stream.
  • false: Unmutes the local audio stream (Default).
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioProfile()

abstract int nertc.IRtcEngine.SetAudioProfile ( RtcAudioProfileType  profile,
RtcAudioScenarioType  scenario 
)
pure virtual

Sets the audio encoding profile.

Note
Parameters
[in]profileSets the sample rate, bitrate, encoding mode, and the number of channels. RtcAudioProfileType .
[in]scenarioSets the type of an audio application scenario. RtcAudioScenarioType .
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioEffectPreset()

abstract int nertc.IRtcEngine.SetAudioEffectPreset ( RtcVoiceChangerType  type)
pure virtual

Sets the voice changer effect for the SDK-preset voice. The method can add multiple preset audio effects to original human voices and change audio profiles.

Note
  • You can call this method either before or after joining a room. By default, the audio effect is disabled after the call ends.
  • The method conflicts with SetLocalVoicePitch . After you call this method, the voice pitch is reset to the default value 1.0.
Parameters
[in]typeThe preset voice changer effect. By default, the audio effect is disabled. For more information, see RtcVoiceChangerType.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetVoiceBeautifierPreset()

abstract int nertc.IRtcEngine.SetVoiceBeautifierPreset ( RtcVoiceBeautifierType  type)
pure virtual

Sets an SDK-preset voice beautifier effect. The method can set a SDK-preset voice beautifier effect for a local user who sends an audio stream.

Note
By default, the method is reset as disabled after the call ends.
Parameters
[in]typeThe present voice beautifier effect. By default, the voice beautifier effect is disabled. For more information, see RtcVoiceBeautifierType.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalVoicePitch()

abstract int nertc.IRtcEngine.SetLocalVoicePitch ( double  pitch)
pure virtual

Sets the voice pitch of a local voice. The method changes the voice pitch of the local speaker.

Note
  • After the call ends, the setting changes back to the default value 1.0.
  • The method conflicts with SetAudioEffectPreset. After you call this method, the preset voice beautifier effect will be removed.
Parameters
[in]pitchThe voice frequency. Valid values: 0.5 to 2.0. Smaller values have lower pitches. The default value is 1, which That the pitch is not changed.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalVoiceEqualization()

abstract int nertc.IRtcEngine.SetLocalVoiceEqualization ( RtcVoiceEqualizationBand  bandFrequency,
int  bandGain 
)
pure virtual

Sets the local voice equalization effect. You can customize the center frequencies of the local voice effects.

Note
You can call this method either before or after joining a room. By default, the audio effect is disabled after the call ends.
Parameters
[in]bandFrequencySets the band frequency. Value range: 0 to 9. Those numbers represent the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz.
[in]bandGainSets the gain of each band (dB). Value range: -15 to 15. The default value is 0.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SubscribeRemoteAudioStream()

abstract int nertc.IRtcEngine.SubscribeRemoteAudioStream ( ulong  uid,
bool  subscribe 
)
pure virtual

Unsubscribes from or subscribes to audio streams from specified remote users.
After a user joins a channel, audio streams from all remote users are subscribed by default. You can call this method to unsubscribe from or subscribe to audio streams from all remote users.

Note
When kNERtcKeyAutoSubscribeAudio is enabled by default, users cannot manually modify the state of audio subscription.
Parameters
[in]uidThe user ID.
[in]subscribe
  • true: Subscribes to specified audio streams (default).
  • false: Unsubscribes from specified audio streams.
Returns
  • 0: Success.
  • 30005: State exception that is caused by the invalid interface if users enable the automatic subscription.
  • Other values: Failure.

◆ SetSudioSessionOperationRestriction()

abstract int nertc.IRtcEngine.SetSudioSessionOperationRestriction ( RtcAudioSessionOperationRestriction  restriction)
pure virtual

Sets permissions of the SDK over Audio Session.
This method is only applicable to the iOS platform.
This method controls the permissions of the SDK over Audio Session. By default, the SDK and the app have control over the Audio Session. However, in some cases, the app wants to restrict the SDK's permissions over Audio Session and uses other applications or third-party components to control Audio Session. The app can adjust the permissions of the SDK by calling this method.
You can call this method only before you join the room.

Note
If you call this method to restrict the SDK's permissions over Audio Session, the SDK cannot set Audio Session. You need to manage Audio Session or use a third-party component to operate Audio Session.
Parameters
restrictionThe restriction applied to the SDK for Audio Session. For more information, see RtcAudioSessionOperationRestriction.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ SetPlayoutDeviceMute()

abstract int nertc.IRtcEngine.SetPlayoutDeviceMute ( bool  muted)
pure virtual

Mutes or unmutes the audio playback device.

Parameters
mutedThe option whether to mute the playback device. By default, the setting is unmuted.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ GetPlayoutDeviceMute()

abstract int nertc.IRtcEngine.GetPlayoutDeviceMute ( ref bool  muted)
pure virtual

Gets the mute status of the audio playback device.

Parameters
mutedThe option whether the device is muted.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ SetRecordDeviceMute()

abstract int nertc.IRtcEngine.SetRecordDeviceMute ( bool  muted)
pure virtual

Mutes or unmutes the audio capture device.

Parameters
mutedThe option whether to mute the audio capture device. The default setting is unmuted.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ GetRecordDeviceMute()

abstract int nertc.IRtcEngine.GetRecordDeviceMute ( ref bool  muted)
pure virtual

Checks whether the audio capture device is muted.

Parameters
mutedThe option whether the device is muted.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ IsCameraZoomSupported()

abstract bool nertc.IRtcEngine.IsCameraZoomSupported ( )
pure virtual

Checks whether the camera zooming feature is supported.
Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel .

Note
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
YES: The camera zooming feature is supported. NO: The camera zooming feature is not supported.

◆ IsCameraTorchSupported()

abstract bool nertc.IRtcEngine.IsCameraTorchSupported ( )
pure virtual

Checks whether the camera flash feature is supported.

Note
  • In most cases, the app opens the front camera by default. If the front camera does not support the flash feature and you call the method, a value of NO is returned. If you want to check whether the rear camera supports the flash feature, before you call this method, you must first call SwitchCamera to switch the camera.
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel .
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
YES: The camera flash feature is supported. NO: The camera flash feature is not supported.

◆ IsCameraFocusSupported()

abstract bool nertc.IRtcEngine.IsCameraFocusSupported ( )
pure virtual

Checks whether the camera manual focus feature is supported.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
YES: The camera manual focus feature is supported. NO: The camera manual focus feature is not supported.

◆ IsCameraExposurePositionSupported()

abstract bool nertc.IRtcEngine.IsCameraExposurePositionSupported ( )
pure virtual

Checks whether the camera exposure feature is supported.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
YES: The camera exposure feature is supported. NO: The camera exposure feature is not supported.

◆ SetCameraExposurePosition()

abstract int nertc.IRtcEngine.SetCameraExposurePosition ( float  pointX,
float  pointY 
)
pure virtual

Sets the camera exposure position.
After you call the method, the OnCameraExposureChanged callback is triggered on the local client.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Parameters
pointXThe x-axis value of the exposure position .
pointYThe y-axis value of exposure position .
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ SetCameraTorchOn()

abstract int nertc.IRtcEngine.SetCameraTorchOn ( bool  on)
pure virtual

Enables or disables the camera flash feature.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Parameters
onYES: turn on. NO: turn off.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ IsCameraTorchOn()

abstract bool nertc.IRtcEngine.IsCameraTorchOn ( )
pure virtual

Check whether the flash is turned on on the device.

Note
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
YES: turned on; NO: turned off.

◆ SetCameraZoomFactor()

abstract int nertc.IRtcEngine.SetCameraZoomFactor ( float  factor)
pure virtual

Sets the current camera zoom ratio.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • Before you call this method, we recommend that you view the maximum zoom ratio supported by the camera by calling MaxCameraZoomScale and set a zooming ratio as required.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Parameters
factorThe zoom ratio supported by the camera.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ MaxCameraZoomScale()

abstract float nertc.IRtcEngine.MaxCameraZoomScale ( )
pure virtual

Gets maximum zoom ratio supported by the camera.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Returns
The maximum zoom ratio is returned.

◆ SetCameraFocusPosition()

abstract int nertc.IRtcEngine.SetCameraFocusPosition ( float  x,
float  y 
)
pure virtual

Sets the camera manual focus position.
After you call the method, the OnCameraFocusChanged callback is triggered on the local client.

Note
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call StartVideoPreview or JoinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of CommsEase and replace the audio-only SDK.
Parameters
xThe horizontal coordinate of the touch point in the view. Value range: 0 to 1.
yThe vertical coordinate of the touch point in the view. Value range: 0 to 1.
Returns
The value returned. A value of 0 indicates that the operation is successful.

◆ SetCameraCaptureConfig()

abstract int nertc.IRtcEngine.SetCameraCaptureConfig ( RtcCameraCaptureConfig  config)
pure virtual

Sets the camera capturer configuration.
For a video call or live streaming, generally the SDK controls the camera output parameters. By default, the SDK matches the most appropriate resolution based on the user's SetVideoConfig configuration. When the default camera capture settings do not meet special requirements, we recommend using this method to set the camera capturer configuration:

  • If you want better quality for the local video preview, we recommend setting config as kNERtcCameraOutputQuality . The SDK sets the camera output parameters with higher picture quality.
  • To customize the width and height of the video image captured by the local camera, set the camera capture configuration as kNERtcCameraOutputManual .
    Note
  • Call this method before or after joining the channel. The setting takes effect immediately without restarting the camera.
  • Higher collection parameters means higher performance consumption, such as CPU and memory usage, especially when video pre-processing is enabled.
    Since
    V4.5.0
    Parameters
    [in]configCapture preference and resolution of video cameras.
    Returns
    0
    A value of 0 returned indicates that the method call is successful. Otherwise, the method call fails.

◆ SubscribeAllRemoteAudioStream()

abstract int nertc.IRtcEngine.SubscribeAllRemoteAudioStream ( bool  subscribe)
pure virtual

Unsubscribes or subscribes to audio streams from all remote users.

Note
  • When joins a room, local user subscribe audio streams from all remote users by default. Under the circumstances, do not call SubscribeAllRemoteAudioStream to subscribe audio streams again.
  • You can call this method before joining a channel.
Since
V4.5.0
Parameters
subscribeWhether to unsubscribe audio streams from all remote users.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetVideoConfig()

abstract int nertc.IRtcEngine.SetVideoConfig ( RtcVideoConfig  config)
pure virtual

Sets local video parameters.

Note
  • You can call this method before or after you join the room.
  • After the setting is configured, the setting takes effect the next time local video is enabled.
  • Each profile has a set of video parameters, such as resolution, frame rate, and bitrate. All the specified values of the parameters are the maximum values in optimal conditions. If the video engine cannot use the maximum value of resolution, due to poor network performance, the value closest to the maximum value is taken.
Parameters
[in]configSets the video encoding parameters. For more information, see RtcVideoConfig.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableDualStreamMode()

abstract int nertc.IRtcEngine.EnableDualStreamMode ( bool  enable)
pure virtual

Specifies whether to enable or disable the dual stream mode.
The method sets the single-stream mode or dual-stream mode. If the dual-stream mode is enabled, the receiver can choose to receive the high-quality stream or low-quality stream video. The high-quality stream has a high resolution and high bitrate. The low-quality stream has a low resolution and low bitrate.

Note
  • The method applies to camera data only. Video streams from external input and screen sharing are not affected.
  • You can call this method before or after you join a room. After the method is set, it can take effect after restarting the camera.
Parameters
[in]enableWhether to enable dual-stream mode.
  • true: Enables the dual-stream mode. This is the default value.
  • false: Disables the dual-stream mode.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetupLocalSubstreamVideoCanvas()

abstract int nertc.IRtcEngine.SetupLocalSubstreamVideoCanvas ( RtcVideoCanvas  canvas)
pure virtual

Sets a remote substream canvas.

  • This method is used to set the display information about the local secondary stream video. The app associates with the video view of local secondary stream by calling this method.
  • During application development, in most cases, before joining a room, you must first call this method to set the local video view after the SDK is initialized.
    Parameters
    [in]canvasThe video canvas information.
    Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalSubstreamRenderMode()

abstract int nertc.IRtcEngine.SetLocalSubstreamRenderMode ( RtcVideoScalingMode  scalingMode)
pure virtual

Sets the local view display mode.
This method is used to set the display mode about the local view. The application can repeatedly call the method to change the display mode.

Note
You must set local secondary canvas before enabling screen sharing.
Parameters
[in]scalingModeThe video display mode RtcVideoScalingMode .
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalRenderMode()

abstract int nertc.IRtcEngine.SetLocalRenderMode ( RtcVideoScalingMode  scalingMode)
pure virtual

Sets the display mode for local substreams video of screen sharing. This method is used to set the display mode about the local view. The application can repeatedly call the method to change the display mode.

Note
You must set the local canvas for local substreams through SetupLocalSubstreamVideoCanvas .
Parameters
[in]scalingModeThe video display mode. RtcVideoScalingMode .
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalVideoMirrorMode()

abstract int nertc.IRtcEngine.SetLocalVideoMirrorMode ( RtcVideoMirrorMode  mirrorMode)
pure virtual

Sets the mirror mode of the local video. The method is used to set whether to enable the mirror mode for the local video. The mirror code determines whether to flip the screen view right or left. Mirror mode for local videos only affects what local users view. The views of remote users are not affected. App can repeatedly call this method to modify the mirror mode.

Parameters
[in]mirrorModeThe video mirror mode. For more information, see RtcVideoMirrorMode.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetRemoteRenderMode()

abstract int nertc.IRtcEngine.SetRemoteRenderMode ( ulong  uid,
RtcVideoScalingMode  scalingMode 
)
pure virtual

Sets display mode for remote views. This method is used to set the display mode for the remote view. App can repeatedly call this method to modify the display mode.

Parameters
[in]uidThe ID of a remote user.
[in]scalingModeThe video display mode. RtcVideoScalingMode.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetupRemoteSubstreamVideoCanvas()

abstract int nertc.IRtcEngine.SetupRemoteSubstreamVideoCanvas ( ulong  uid,
RtcVideoCanvas  canvas 
)
pure virtual

Sets a remote substream video canvas.
The method associates a remote user with a substream view. You can assign a specified uid to use a corresponding canvas.

Note
  • If the uid is not retrieved, you can set the user ID after the app receives a message delivered when the OnUserJoined "\ref nertc::OnUserJoined "OnUserJoined"" is triggered.
  • After a user leaves the room, the association between a remote user and the view is cleared.
  • After a user leaves the room, the association between a remote user and the canvas is cleared. The setting is automatically invalid.
Parameters
[in]uidThe ID of a remote user.
[in]canvasThe video canvas settings.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SubscribeRemoteVideoSubstream()

abstract int nertc.IRtcEngine.SubscribeRemoteVideoSubstream ( ulong  uid,
bool  subscribe 
)
pure virtual

Subscribes to or unsubscribes from remote substream video from screen sharing. You can receive the substream video data only after you subscribe to remote substream video stream.

Note
  • You must call the method after joining a room.
  • You must first set a remote substream canvas.
Parameters
[in]uidThe user ID.
[in]subscribe
  • true: Subscribes to or unsubscribes from video streams from specified remote users.
  • false: Unsubscribes from video streams of specified remote users.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetRemoteSubsteamRenderMode()

abstract int nertc.IRtcEngine.SetRemoteSubsteamRenderMode ( ulong  uid,
RtcVideoScalingMode  scalingMode 
)
pure virtual

Sets substream video display modes for remote screen sharing.
You can use the method when screen sharing is enabled in substreams on the remote side. The application can repeatedly call the method to change the display mode.

Parameters
[in]uidThe ID of a remote user.
[in]scalingModeThe video display mode. RtcVideoScalingMode.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartVideoPreview()

abstract int nertc.IRtcEngine.StartVideoPreview ( )
pure virtual

Enables video preview.
The method is used to enable local video preview before you join a room. Prerequisites for calling the API:

  • Calls SetupLocalVideoCanvas to set preview window.
    Note
    After the local video preview is enabled, you must first disable the local preview and call stopVideoPreview before joining the room.
    Returns
  • 0: Success.
  • Other values: Failure.

◆ StopVideoPreview()

abstract int nertc.IRtcEngine.StopVideoPreview ( )
pure virtual

Stops video preview.

Note
This method needs to be called before a user joins a room.
Returns
  • 0: Success.
  • Other values: Failure.

◆ MuteLocalVideoStream()

abstract int nertc.IRtcEngine.MuteLocalVideoStream ( bool  mute)
pure virtual

Enables or disables publishing the local video stream.
If the method is called Successfully, OnUserVideoMute is triggered remotely.

Note
  • When you call the method to disable video streams, the SDK doesn’t send local video streams but the camera is still working.
  • The method can be called before or after a user joins a room.
  • If you stop publishing the local video stream by calling this method, the option is reset to the default state that allows the app to publish the local video stream.
  • EnableLocalVideo (false) is different from EnableLocalVideo (false). The EnableLocalVideo (false) method turns off local camera devices. The MuteLocalVideoStream method does not affect local video capture, or disable cameras, and responds faster.
Parameters
[in]mute
  • true: Not publishing local video streams.
  • false: Publishing local video streams (default).
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLocalMediaPriority()

abstract int nertc.IRtcEngine.SetLocalMediaPriority ( int  priority,
bool  isPreemptive 
)
pure virtual

Sets the priority of media streams from a local user.
If a user has a high priority, the media stream from the user also has a high priority. In unreliable network connections, the SDK guarantees the quality the media stream from users with a high priority.

Note
  • You must call the method before you call JoinChannel.
  • After switching channels, media priority changes to the default value of normal priority.
  • An RTC room has only one user that has a high priority. We recommend that only one user in a room call the SetLocalMediaPriority method to set the local media stream a high priority. Otherwise, you need to enable the preempt mode to ensure the high priority of the local media stream.
Parameters
priorityThe priority of the local media stream. The default value is kNERtcMediaPriorityNormal . For more information, see RtcMediaPriorityType.
isPreemptivespecifies whether to enable the preempt mode. The default value is false, which indicates that the preempt mode is disabled.
  • If the preempt mode is enabled, the local media stream preempts the high priority over other users. The priority of the media stream whose priority is taken becomes normal. After the user whose priority is taken leaves the room, other users still keep the normal priority.
  • If the preempt mode is disabled, and a user in the room has a high priority. After that, the high priority of the local client remains invalid and is still normal.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetParameters()

abstract int nertc.IRtcEngine.SetParameters ( string  parameters)
pure virtual

Sets parameters for audio and video calls. You can configure the SDK through JSON to provide features like technology review and special customization. Publicizes JSON options in a standardized way.

Parameters
[in]parametersRelated parameters for audio and video calls whose format is the JSON string.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetRecordingAudioFrameParameters()

abstract int nertc.IRtcEngine.SetRecordingAudioFrameParameters ( RtcAudioFrameRequestFormat  format)
pure virtual

Sets the audio recording format.
The method is used to set audio recording format of OnAudioFrameDidRecord callback.

Note
  • The method can be called before or after a user joins a room.
  • Stops listening and sets the value as empty.
Parameters
formatThe sample rate and channels of data returned in the OnAudioFrameDidRecord . A value of NULL is allowed. The default value is NULL.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetPlaybackAudioFrameParameters()

abstract int nertc.IRtcEngine.SetPlaybackAudioFrameParameters ( RtcAudioFrameRequestFormat  format)
pure virtual

Sets the audio playback format.
The method is used to set audio recording format of OnAudioFrameWillPlayback callback.

Note
  • The method can be called or modified before or after a user joins a room.
  • Stops listening and sets the value as empty.
Parameters
formatThe sample rate and channels of data returned in the OnAudioFrameWillPlayback. A value of NULL is allowed. The default value is NULL.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetMixedAudioFrameParameters()

abstract int nertc.IRtcEngine.SetMixedAudioFrameParameters ( int  sampleRate)
pure virtual

Sets the sample rate of audio mixing stream after the audio is recording and playback.
The method is used to set audio recording format of OnMixedAudioFrame .

Note
  • The method can be called before or after a user joins a room.
  • Currently supports setting the sample rate only.
  • If you do not call the interface to set the data format, the sample rate in the callback return the default value set by the SDK.
Parameters
sampleRateThe sample rate of data returned in OnMixedAudioFrame . Only 8000, 16000, 32000, 44100, and 48000 are supported.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioFrameObserver()

abstract int nertc.IRtcEngine.SetAudioFrameObserver ( IAudioFrameObserver  observer)
pure virtual

Registers the audio observer object.
The method is used to set audio capture or play PCM data callbacks. You can use the method to process audios. You need to register callbacks with this method when engine needs to trigger callbacks of OnAudioFrameDidRecord or OnAudioFrameWillPlayback.

Parameters
observerThe object instance. If you pass in NULL, you cancel the registration and clear the settings of RtcAudioFrameRequestFormat.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartAudioDump()

abstract int nertc.IRtcEngine.StartAudioDump ( )
pure virtual

Starts recording an audio dump file. Audio dump files can be used to analyze audio issues.

Returns
  • 0: Success.
  • Other values: Failure.

◆ StopAudioDump()

abstract int nertc.IRtcEngine.StopAudioDump ( )
pure virtual

Finishes recording an audio dump file.

Returns
  • 0: Success.
  • Other values: Failure.

◆ SetLoudSpeakerMode()

abstract int nertc.IRtcEngine.SetLoudSpeakerMode ( bool  enable)
pure virtual

Set the speaker mode(for iOS and Android)

Parameters
enableWhether to enable the speaker mode
Returns
The return value. 0 is returned for success

◆ GetLoudSpeakerMode()

abstract int nertc.IRtcEngine.GetLoudSpeakerMode ( ref bool  enabled)
pure virtual

Get the current speaker mode(for iOS and Android)

Parameters
enabledWhether to enable the speaker mode
Returns
  • 0: success.
  • Other values: failure.

◆ StartAudioMixing()

abstract int nertc.IRtcEngine.StartAudioMixing ( RtcCreateAudioMixingOption  option)
pure virtual

Starts playing a music file.
This method mixes the specified local or online audio file with the audio stream captured by the audio devices.

  • Supported audio formats: MP3, M4A, AAC, 3GP, WMA, and WAV. Files that are stored in local or online URLs are supported.
  • After you successfully call the method, if the playback status is changed, the local triggers OnAudioMixingStateChanged callbacks.
    Note
  • You can call this method after joining a room.
  • Since V4.3.0, if you call this method to play a music file during a call, and manually set the playback volume of the audio mixing and the sent volume, the setting is used when you call the method again during the current call.
    Parameters
    [in]optionOptions of creating audio mixing configurations that include types, full path or URL. For more information, see RtcCreateAudioMixingOption .
    Returns
  • 0: Success.
  • Other values: Failure.

◆ StopAudioMixing()

abstract int nertc.IRtcEngine.StopAudioMixing ( )
pure virtual

Stops playing music files or audio mixing.
The method stops playing the audio mixing. You can call the method when you are in a room.

Returns
  • 0: Success.
  • Other values: Failure.

◆ PauseAudioMixing()

abstract int nertc.IRtcEngine.PauseAudioMixing ( )
pure virtual

Stops playing music files or audio mixing.
The method pauses playing audio mixing. You can call the method when you are in a room.

Returns
  • 0: Success.
  • Other values: Failure.

◆ ResumeAudioMixing()

abstract int nertc.IRtcEngine.ResumeAudioMixing ( )
pure virtual

Resumes playing the audio mixing.
The method resumes audio mixing, and continues playing the audio mixing. You can call the method when you are in a room.

Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioMixingSendVolume()

abstract int nertc.IRtcEngine.SetAudioMixingSendVolume ( uint  volume)
pure virtual

Adjusts the audio mixing volume for publishing.
The method adjusts the volume for publishing of the audio mixing in the audio mixing. You can call the method when you are in a room.

Parameters
[in]volumeThe audio mixing volume for publishing. Valid values: 0 to 100. The default value of 100 represents the original volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetAudioMixingSendVolume()

abstract int nertc.IRtcEngine.GetAudioMixingSendVolume ( ref uint  volume)
pure virtual

Gets the volume for publishing of audio mixing.
The method gets the volume for publishing of the audio mixing in the audio mixing. You can call the method when you are in a room.

Parameters
[out]volumeThe volume for publishing of the audio mixing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioMixingPlaybackVolume()

abstract int nertc.IRtcEngine.SetAudioMixingPlaybackVolume ( uint  volume)
pure virtual

Adjusts the playback volume of the audio mixing.
The method adjusts the playback volume of the audio mixing in the audio mixing. You can call the method when you are in a room.

Parameters
[in]volumeThe volume range of the audio mixing is 0 to 100. The default value of 100 represents the original volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetAudioMixingPlaybackVolume()

abstract int nertc.IRtcEngine.GetAudioMixingPlaybackVolume ( ref uint  volume)
pure virtual

Gets the playback volume of the audio mixing.
The method gets the playback volume of the audio mixing in the audio mixing. You can call the method when you are in a room.

Parameters
[out]volumeThe volume of the audio mixing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetAudioMixingDuration()

abstract int nertc.IRtcEngine.GetAudioMixingDuration ( ref ulong  duration)
pure virtual

Gets the duration of the audio mixing.
The method gets the duration of the audio mixing. Unit: milliseconds. You can call the method when you are in a room.

Parameters
[out]durationThe duration of the audio mixing. Unit: milliseconds.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetAudioMixingCurrentPosition()

abstract int nertc.IRtcEngine.GetAudioMixingCurrentPosition ( ref ulong  position)
pure virtual

Gets the playback position of the music file.
The method gets the playback position of the music file. Unit: milliseconds. You can call the method when you are in a room.

Parameters
[out]positionThe playback position of the audio mixing file. Unit: milliseconds.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetAudioMixingPosition()

abstract int nertc.IRtcEngine.SetAudioMixingPosition ( ulong  seekPosition)
pure virtual

Sets the playback position of the music file to a different starting position.
The method sets the playback position of the music file to a different starting position. The method allows you to play the music file from the position based on your requirements rather than from the beginning of the music file.

Parameters
[in]seekPositionThe playback position of the music file. Unit: milliseconds.
Returns
  • 0: Success.
  • Other values: Failure.

◆ PlayEffect()

abstract int nertc.IRtcEngine.PlayEffect ( uint  effectId,
RtcCreateAudioEffectOption  option 
)
pure virtual

Plays a specified audio effect file.

  • After the method is successfully called, if the playback ends, the OnAudioEffectFinished callback is triggered.
  • Supported audio formats: MP3, M4A, AAC, 3GP, WMA, and WAV. Files that are stored in local or online URLs are supported.
    Note
  • You can call this method after joining a room.
  • You can call the method for multiple times. You can play multiple audio effect files simultaneously by passing in different effectIds and options. Various audio effects are mixed. To gain optimal user experience, we recommend you to play no more than three audio effect files at the same time.
    Parameters
    [in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
    [in]optionThe options of creating audio effect files configurations including types, full path or URL of audio mixing files. For more information, see RtcCreateAudioEffectOption .
    Returns
  • 0: Success.
  • Other values: Failure.

◆ StopEffect()

abstract int nertc.IRtcEngine.StopEffect ( uint  effectId)
pure virtual

Stops playing a specified audio effect file.
You can call the method when you are in a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StopAllEffects()

abstract int nertc.IRtcEngine.StopAllEffects ( )
pure virtual

Stops playing all audio effects.

Returns
  • 0: Success.
  • Other values: Failure.

◆ PauseEffect()

abstract int nertc.IRtcEngine.PauseEffect ( uint  effectId)
pure virtual

Pauses playing all audio effects.
You can call the method when you are in a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
Returns
  • 0: Success.
  • Other values: Failure.

◆ ResumeEffect()

abstract int nertc.IRtcEngine.ResumeEffect ( uint  effectId)
pure virtual

Resumes playing a specified audio effect.
You can call the method when you are in a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
Returns
  • 0: Success.
  • Other values: Failure.

◆ PauseAllEffects()

abstract int nertc.IRtcEngine.PauseAllEffects ( )
pure virtual

Pauses all audio effect files.
You can call the method when you are in a room.

Returns
  • 0: Success.
  • Other values: Failure.

◆ ResumeAllEffects()

abstract int nertc.IRtcEngine.ResumeAllEffects ( )
pure virtual

Resumes playing all audio effects files.
You can call the method when you are in a room.

Returns
  • 0: Success.
  • Other values: Failure.

◆ SetEffectSendVolume()

abstract int nertc.IRtcEngine.SetEffectSendVolume ( uint  effectId,
uint  volume 
)
pure virtual

Adjusts the audio effect volume for publishing. The method adjusts the audio effect volume for publishing. You can call the method when you are in a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
[in]volumeThe audio effect volume. Value range: 0 to 100. The default value of 100 represents the original volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetEffectSendVolume()

abstract int nertc.IRtcEngine.GetEffectSendVolume ( uint  effectId,
ref uint  volume 
)
pure virtual

Gets the audio effect volume for publishing. The method gets the audio effect volume for publishing. You can call the method when you are in a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
[out]volumeThe audio effect volume for publishing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetEffectPlaybackVolume()

abstract int nertc.IRtcEngine.SetEffectPlaybackVolume ( uint  effectId,
uint  volume 
)
pure virtual

Sets the playback volume of an audio effect file. You can call this method after joining a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
[in]volumeThe audio effect volume for publishing. Valid values: 0 to 100. The default value is 100.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetEffectPlaybackVolume()

abstract int nertc.IRtcEngine.GetEffectPlaybackVolume ( uint  effectId,
ref uint  volume 
)
pure virtual

Gets the playback volume of the audio effects files.
You can call this method after joining a room.

Parameters
[in]effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.
[out]volumeThe audio effect playback volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableEarback()

abstract int nertc.IRtcEngine.EnableEarback ( bool  enabled,
uint  volume 
)
pure virtual

Enables or disables in-ear monitoring.

Note
  • You can call the method when you are in a room.
  • After in-ear monitoring is enabled, you must wear a headset or earpieces to use the in-ear monitoring feature. We recommend that you listen for changes of playback devices through OnAudioDeviceStateChanged and OnAudioDefaultDeviceChanged. Only when the device changes to headset, you can enable in-ear monitoring.
Parameters
[in]enabledEnabled or disabled.
[in]volumeThe volume of ear-monitoring.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetEarbackVolume()

abstract int nertc.IRtcEngine.SetEarbackVolume ( uint  volume)
pure virtual

Sets the volume for in-ear monitoring. You can call the method when you are in a room.

Parameters
[in]volumeThe volume of ear-monitoring. Valid values: to 100. The default value is 100.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableLoopbackRecording()

abstract int nertc.IRtcEngine.EnableLoopbackRecording ( bool  enabled,
string  deviceName 
)
pure virtual

Enables or disables local audio capture through the sound card.

Since
V4.4.0 After the feature is enabled, the audio played by the sound card is integrated into local video streams. In this way, you can publish the audio to the remote side.
Note
  • The method applies to only macOS and Windows.
  • The capture feature is not supported on the macOS by default. If you need to enable the feature, the app needs to enable a virtual sound card and name the sound card as deviceName to pass in the SDK. We recommend that you can use Soundflower as virtual sound card to deliver better audio effect.
  • You can call this method before or after you join a room.
Parameters
[in]enabledSpecifies whether to enable the capture feature through the sound card.
  • true: Enables audio capture through the sound card.
  • false: Disables audio capture through the sound card (default).
[in]deviceNameThe device name of the sound card. The name is set as NULL by default, which indicates capturing through the current sound card.
The parameter applies to macOS platform only.
If users use virtual sound cards such as “Soundflower”, you can set the sound card name of virtual card as parameter. In this way, the SDK finds the corresponding device of virtual sound cards and starts capturing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ AdjustLoopbackRecordingSignalVolume()

abstract int nertc.IRtcEngine.AdjustLoopbackRecordingSignalVolume ( uint  volume)
pure virtual

Adjusts the volume of captured signals of sound cards.

Since
V4.4.0 After calling sound card capturing by calling EnableLoopbackRecording, you can call the method to adjust the volume of captured signals of sound cards.
Parameters
[in]volumeThe captured signals volume through sound cards. Value range: 0 to 100. The default value of 100 represents the original volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetStatsObserver()

abstract int nertc.IRtcEngine.SetStatsObserver ( IMediaStatsObserver  observer)
pure virtual

Registers a stats observer.

Parameters
[in]observerThe stats observer.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableAudioVolumeIndication()

abstract int nertc.IRtcEngine.EnableAudioVolumeIndication ( bool  enable,
ulong  interval 
)
pure virtual

Enables volume indication for the speaker.
The method allows the SDK to report to the app the information about the volume of the user that pushes local streams and the remote user (up to three users) that has the highest instantaneous volume. The information about the current speaker and the volume is reported.
If this method is enabled, when a user joins a room and pushes streams, the SDK triggers OnRemoteAudioVolumeIndication based on the preset time intervals.

Parameters
enableWhether to prompt the speaker volume.
intervalThe time interval at which volume prompt is displayed. Unit: milliseconds. The value must be the multiples of 100 milliseconds.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartScreenCaptureByScreenRect()

abstract int nertc.IRtcEngine.StartScreenCaptureByScreenRect ( RtcRectangle  screenRect,
RtcRectangle  regionRect,
RtcScreenCaptureParameters  captureParams 
)
pure virtual

Shares screens through specifying regions. Shares a certain screen or part of region of a screen. Users need to specify the screen region they wants to share in the method.
When calling the method, you need to specify the screen region to be shared, and share the overall frame of the screen or designated regions.
If you join a room and successfully call this method to enable the substream, the OnUserSubStreamVideoStart and SetExcludeWindowList callback is remotely triggered.

Note
  • The method applies to Windows only.
  • The method enables video substreams.
Parameters
screenRectThe relative position of the screen to virtual screens that is shared.
regionRectThe relative position of shared screen to the full screen. If you set the shared region beyond the frame of the screen, only content within the screen is shared. If you set the value of width or height as 0, the full screen is shared.
captureParamsThe configurations of screen sharing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartScreenCaptureByDisplayId()

abstract int nertc.IRtcEngine.StartScreenCaptureByDisplayId ( ulong  displayId,
RtcRectangle  regionRect,
RtcScreenCaptureParameters  captureParams 
)
pure virtual

Enables screen sharing by specifying the ID of the screen. The content of screen sharing is sent by substreams.
If you join a room and call this method to enable the substream, the OnUserSubStreamVideoStart and onScreenCaptureStatus callback is remotely triggered.

Note
  • The method applies to only macOS.
  • The method enables video substreams.
Parameters
displayIdThe ID of the screen to be shared. Developers need to specify the screen they share through the parameters.
regionRectThe relative position of shared screen to the full screen.
captureParamsThe configurations of screen sharing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartScreenCaptureByWindowId()

abstract int nertc.IRtcEngine.StartScreenCaptureByWindowId ( IntPtr  windowId,
RtcRectangle  regionRect,
RtcScreenCaptureParameters  captureParams 
)
pure virtual

Enables screen sharing by specifying the ID of the window. The content of screen sharing is sent by substreams.
If you join a room and call this method to enable the substream, the OnUserSubStreamVideoStart and SetExcludeWindowList callback is remotely triggered.

Note
  • The method applies to Windows only and macOS.
  • The method enables video substreams.
Parameters
windowIdThe ID of the window to be shared.
regionRectThe relative position of shared screen to the full screen.
captureParamsThe configurations of screen sharing.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartScreenCapture()

abstract int nertc.IRtcEngine.StartScreenCapture ( RtcScreenCaptureParameters  captureParams,
bool  externalCapturer 
)
pure virtual

Start screen capture from external video sources.

Note
Parameters
captureParamsencoding parameters. Screen capture parameters becomes invalid.
externalCapturerwhether capture from external.
Returns
  • 0: Success.
  • Other values: Failure.

◆ UpdateScreenCaptureRegion()

abstract int nertc.IRtcEngine.UpdateScreenCaptureRegion ( RtcRectangle  regionRect)
pure virtual

When sharing a screen or window, updates the shared region.

Parameters
regionRectThe relative position of shared screen to the full screen. If you set the shared region beyond the frame of the screen, only content within the screen is shared. If you set width or height as 0, the full screen is shared.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StopScreenCapture()

abstract int nertc.IRtcEngine.StopScreenCapture ( )
pure virtual

Stops screen sharing.
If you use the method to disable the substream after joining a room, the OnUserSubStreamVideoStop callback is remotely triggered.

Returns
  • 0: Success.
  • Other values: Failure.

◆ PauseScreenCapture()

abstract int nertc.IRtcEngine.PauseScreenCapture ( )
pure virtual

Pauses screen sharing.

Returns
  • 0: Success.
  • Other values: Failure.

◆ ResumeScreenCapture()

abstract int nertc.IRtcEngine.ResumeScreenCapture ( )
pure virtual

Resumes screen sharing.

Returns
  • 0: Success.
  • Other values: Failure.

◆ SetExcludeWindowList()

abstract int nertc.IRtcEngine.SetExcludeWindowList ( IntPtr[]  windowList)
pure virtual

Sets the window list that need to be blocked in capturing screens. The method can be dynamically called in the capturing.

Since
V4.2.0
Parameters
windowListThe ID of the screen to be blocked.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetExternalVideoSource()

abstract int nertc.IRtcEngine.SetExternalVideoSource ( bool  enabled)
pure virtual

Enables or disables the external video source.
When you enable the external video source through the method, you need to set kNERtcExternalVideoDeviceID as the ID of external video source with SetDevice kNERtcExternalVideoDeviceID method.

Note
The method enables the internal engine, which is still valid after you call LeaveChannel.
Parameters
[in]enabledSpecifies whether input external video source data.
  • true: Enables external video source.
  • false: Disables the external video source (default).
Returns
  • 0: Success.
  • Other values: Failure.

◆ PushExternalVideoFrame()

abstract int nertc.IRtcEngine.PushExternalVideoFrame ( RtcExternalVideoFrame  frame)
pure virtual

Pushes the external video frames.
The method actively pushes the data of video frames that are encapsulated with the RtcExternalVideoFrame class to the SDK. Make sure that you have already called SetExternalVideoSource with a value of true before you call this method. Otherwise, an error message is repeatedly prompted if you call the method.

Note
The method enables the internal engine, which is invalid after you call LeaveChannel.
Parameters
[in]frameThe video frame data.
Returns
  • 0: Success.
  • Other values: Failure.

◆ PushSubstreamExternalVideoFrame()

abstract int nertc.IRtcEngine.PushSubstreamExternalVideoFrame ( RtcExternalVideoFrame  videoFrame)
pure virtual

Pushes the external video frames.
The method actively pushes the data of video frames that are encapsulated with the RtcExternalVideoFrame class to the SDK. Make sure that you have already called StartScreenCapture with a value of true before you call this method. Otherwise, an error message is repeatedly prompted if you call the method.

Note
The method enables the internal engine, which is invalid after you call LeaveChannel.
Parameters
[in]videoFrameThe video frame data.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetExternalAudioSource()

abstract int nertc.IRtcEngine.SetExternalAudioSource ( bool  enabled,
int  sampleRate,
int  channels 
)
pure virtual

Enables or disables the external audio stream source.
After you call the method, the setting becomes invalid if you choose audio input device or a sudden restart occurs. After the method is called, you can call PushExternalAudioFrame to send the pulse-code modulation (PCM) data.

Note
  • You can call this method before joining a room.
  • The method enables the internal engine. After enabled, the virtual component works instead of the physical microphones. The setting remains unchanged after the leaveChannel method is called. If you want to disable the feature, you must disable the setting before next call starts.
  • After you enable the external audio data input, some functionalities of the speakerphone supported by the SDK are replaced by the external audio source. Settings that are applied to the microphones become invalid or do not take effect in calls. For example, you can hear the external data input when you use loopback for testing.
Parameters
[in]enabledSpecifies whether to input external data.
  • true: Enables external data input.
  • false: Disables the external data input(default).
[in]sampleRateThe sample rate of data. You need to input following data in the same sample rate. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect.
[in]channelsThe number of channels. You need to input following data in the same number of channels. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. Valid values:
  • 1: Mono sound.
  • 2: Stereo sound.
Returns
  • 0: Success.
  • Other values: Failure.

◆ PushExternalAudioFrame()

abstract int nertc.IRtcEngine.PushExternalAudioFrame ( RtcAudioFrame  frame)
pure virtual

Pushes the external audio data input.
Pushes the audio frame data captured from the external audio source to the internal audio engine. If you enable the external audio data source by calling SetExternalAudioSource , you can use PushExternalAudioFrame to send audio PCM data.

Note
  • This method can be called only if a user joins a room.
  • We recommend that you set the duration of data frames to match a cycle of 10 ms.
  • External input data frame consists of the data duration and call duration.
  • The method becomes invalid if the audio input device is turned off. For example, disable local audio, end calls, and shut off the microphone test before calls.
Parameters
[in]frameThe data of frame cannot exceed 7680 bytes in length.
  • External input data frame consists of the data duration and call duration.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetExternalAudioRender()

abstract int nertc.IRtcEngine.SetExternalAudioRender ( bool  enabled,
int  sampleRate,
int  channels 
)
pure virtual

Sets external audio rendering.
The method is suitable for scenarios that require personalized audio rendering. By default, the setting is disabled. If you choose an audio playback device or a sudden restart occurs, the setting becomes invalid. After you call the method, you can use PullExternalAudioFrame to get audio PCM data.

Note
  • You can call this method before joining a room.
  • The method enables the internal engine. The virtual component works instead of the physical speaker. The setting remains valid after you call the LeaveChannel method. If you want to disable the functionality, you must disable the functionality before the next call starts.
  • After you enable the external audio rendering, some functionalities of the speakerphone supported by the SDK are replaced by the external audio source. Settings that are applied to the speakerphone become invalid or do not take effect in calls. For example, external rendering is required to play the external audio when you use loopback for testing.
Parameters
[in]enabledSpecifies whether to output external data.
  • true: Enables external data rendering.
  • false: Disables the external data rendering (default).
[in]sampleRateThe sample rate of data. You need to input following data in the same sample rate. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect.
[in]channelsThe number of data channels. You need to return following data in the same number of channels. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. Valid values:
  • 1: Mono sound.
  • 2: Stereo sound.
Returns
  • 0: Success.
  • Other values: Failure.

◆ PullExternalAudioFrame()

abstract int nertc.IRtcEngine.PullExternalAudioFrame ( byte[]  data,
int  length 
)
pure virtual

Pulls the external audio data.
The method pulls the audio data from the internal audio engine. After you enable the external audio data rendering functionality by calling SetExternalAudioRender, you can use PullExternalAudioFrame to get the audio PCM data.

Note
  • This method can be called only if a user joins a room.
  • We recommend that you set the duration of data frames to match a cycle of 10 ms.
  • The method becomes invalid if the audio rendering device is turned off. In this case, no data is returned. For example, calls end, and the speakerphone is shut off before calls.
Parameters
[out]dataData pointer. The SDK internally copies data into data.
[in]lengthThe size of the audio data that are pulled. Unit: bytes.
  • We recommend that the duration of the audio data at least last 10 ms, and the data size cannot exceed 7,680 bytes.
  • Formula: len = sampleRate/1000 × 2 × channels × duration of the audio data in milliseconds.
Returns
  • 0: Success.
  • Other values: Failure.

◆ GetVersion()

abstract string nertc.IRtcEngine.GetVersion ( )
pure virtual

Query the SDK version number.

  • You can call this method before or after you join a room.
    Returns
    The version of the current SDK, whose format is string such as 1.0.0.

◆ GetErrorDescription()

abstract string nertc.IRtcEngine.GetErrorDescription ( RtcErrorCode  errorCode)
pure virtual

Check the error description of specified error codes.

Note
The method is currently invalid. Returns the value of empty only. Please check returned error codes and specific error descriptions in the OnError .
Parameters
[in]errorCodeRtcErrorCode .
Returns
Detailed descriptions of error codes.

◆ UploadSdkInfo()

abstract int nertc.IRtcEngine.UploadSdkInfo ( )
pure virtual

Uploads the SDK information.
You can call the method only after joining a room.
The data that is published contains the log file and the audio dump file.

Returns
void

◆ AddLiveStreamTask()

abstract int nertc.IRtcEngine.AddLiveStreamTask ( RtcLiveStreamTaskInfo  info)
pure virtual

After the method is successfully called, the current user can receive the notification about the status of the live stream.

Note
  • The method is applicable to only live streaming.
  • You can call the method in a room. The method is valid in calls.
  • Only one address for the relayed stream is added in each call. You need to call the method for multiple times if you want to push many streams. An RTC room with the same channel id can create three different streaming tasks.
  • After the method is successfully called, the current user will receive related-status notifications of the live stream.
Parameters
[in]infoindicates information of live task. For more information, see RtcLiveStreamTaskInfo .
Returns
  • 0: Success.
  • Other values: Failure.

◆ UpdateLiveStreamTask()

abstract int nertc.IRtcEngine.UpdateLiveStreamTask ( RtcLiveStreamTaskInfo  info)
pure virtual

Updates and modifies a push task in a room.

Note
  • The method is applicable to only live streaming.
  • You can call the method in a room. The method is valid in calls.
Parameters
[in]infoindicates information of live task. For more information, see RtcLiveStreamTaskInfo .
Returns
  • 0: Success.
  • Other values: Failure.

◆ RemoveLiveStreamTask()

abstract int nertc.IRtcEngine.RemoveLiveStreamTask ( string  taskId)
pure virtual

Deletes a push task.

Note
  • The method is applicable to only live streaming.
  • You can call the method in a room. The method is valid in calls.
  • When calls stop and all members in the room leave the room, the SDK automatically deletes the streaming task. If some users are still in the room, users who create the streaming task need to delete the streaming task.
Parameters
[in]taskIdThe ID of a live streaming task.
Returns
  • 0: Success.
  • Other values: Failure.

◆ SendSEIMsg()

abstract int nertc.IRtcEngine.SendSEIMsg ( byte[]  data,
RtcVideoStreamType  type 
)
pure virtual

Sends SEI messages.
While the local video stream is pushed, SEI data is also sent to sync some additional information. After SEI data is sent, the receiver can retrieve the content by listening on OnRecvSEIMessage callback.

  • Condition: After the video stream (mainstream) is enabled, the function can be invoked.
  • Data size limits: The SEI data can contain a maximum of 4,096 bytes in size. Sending an SEI message fails if the data exceeds the size limit. If a large amount of data is sent, the video bitrate rises. This degrades the video quality or causes broken video frames.
  • Frequency limit: we recommend that the maximum video frame rate does not exceed 10 fps.
  • Time to take effect: After the method is called, the SEI data is sent from the next frame in the fastest fashion or after the next 5 frames at the slowest pace.
    Note
  • The SEI data is transmitted together with the video stream. Frame loss may occur in poor network connection. The SEI data will also get lost. We recommend that you send the data many times within the transmission frequency limits. In this way, the receiver can get the data.
  • By default, the SEI is transmitted by using the mainstream channel.
    Parameters
    dataThe custom SEI frame data.The custom SEI data size whose maximum value does not exceed 4096 bytes.
    typeThe type of the stream channel with which the SEI data is transmitted. For more information, see RtcVideoStreamType.
    Returns
    The value returned. A value of 0 That the operation is successful.
  • Success: Successfully joins the queue to be sent. The data are sent after the closest video frame.
  • failure: Date are limitedly sent for the high sent frequency and the overloaded queue. Or, the maximum data size exceeds 4k.

◆ SetLocalCanvasWatermarkConfigs()

abstract int nertc.IRtcEngine.SetLocalCanvasWatermarkConfigs ( RtcVideoStreamType  type,
RtcCanvasWatermarkConfig  config 
)
pure virtual

Adds a watermark image to the local video.

Note
  • The setLocalCanvasWatermarkConfigs method applies to the local video canvas and does not affect the video stream. If the canvas is removed, the watermark will be automatically deleted.
  • Before you set a watermark, you must first set the canvas by calling related methods.
  • Watermark-related methods are currently unsupported on the macOS platform.
Parameters
typeThe type of video streams. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType.
configThe configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null is set to remove the watermark. For more information, see RtcCanvasWatermarkConfig .
Returns
  • 0: Success.
  • Other values: Failure.

◆ SetRemoteCanvasWatermarkConfigs()

abstract int nertc.IRtcEngine.SetRemoteCanvasWatermarkConfigs ( ulong  uid,
RtcVideoStreamType  type,
RtcCanvasWatermarkConfig  config 
)
pure virtual

Adds a watermark to the remote video canvas.

Note
  • SetRemoteCanvasWatermarkConfigs method applies to the local video canvas and does not affect the video stream. If the canvas is removed, the watermark will be automatically deleted.
  • Before you set a watermark, you must first set the canvas by calling related methods.
  • Watermark-related methods are currently unsupported on the macOS platform.
Parameters
uidThe ID of a remote user.
typeThe type of video streams. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType.
configThe configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null is set to remove the watermark. For more information, see RtcCanvasWatermarkConfig.
Returns
  • 0: Success.
  • Other values: Failure.

◆ TakeLocalSnapshot()

abstract int nertc.IRtcEngine.TakeLocalSnapshot ( RtcVideoStreamType  streamType,
RtcTakeSnapshotCallback  callback 
)
pure virtual

Takes a local video snapshot.
The takeLocalSnapshot method takes a local video snapshot on the local substream or local mainstream, and call RtcTakeSnapshotCallback callback to return data of snapshot screen.

Note
  • Before you call the method to capture the snapshot from the mainstream, you must first call StartVideoPreview ,or EnableLocalVideo and JoinChannel.
  • Before you call the method to capture the snapshot from the substream, you must first JoinChannel,and start screen sharing.
  • You can set text, timestamp, and image watermarks at the same time. If different types of watermarks overlap, the layers override previous layers following image, text, and timestamp.
Parameters
streamTypeThe video stream type of the snapshot. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType.
callbackThe snapshot callback. For information, see RtcTakeSnapshotCallback.
Returns
  • 0: Success.
  • Other values: Failure.

◆ TakeRemoteSnapshot()

abstract int nertc.IRtcEngine.TakeRemoteSnapshot ( ulong  uid,
RtcVideoStreamType  streamType,
RtcTakeSnapshotCallback  callback 
)
pure virtual

Takes a snapshot of a remote video.
You can call takeRemoteSnapshot to specify the uid of video screen of remote mainstreams and substreams, and returns screenshot data of RtcTakeSnapshotCallback callback.

Note
  • You need to call TakeRemoteSnapshot after receiving callbacks of OnUserVideoStart and OnUserSubStreamVideoStart.
  • You can set text, timestamp, and image watermarks at the same time. If different types of watermarks overlap, the layers override previous layers following image, text, and timestamp.
Parameters
uidThe ID of a remote user.
streamTypeThe video stream type of the snapshot. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType.
callbackThe snapshot callback. For information, see RtcTakeSnapshotCallback .
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartAudioRecording()

abstract int nertc.IRtcEngine.StartAudioRecording ( string  filePath,
int  sampleRate,
RtcAudioRecordingQuality  quality 
)
pure virtual

Starts an audio recording on a client.
After calling the method, the client records the audio streams that are mixed by all users, and stores the streams in a local file. The OnAudioRecording callback is triggered when the recording starts or ends.
If you specify a type of audio quality, the recording file is saved in different formats.

  • WAV file is large with high quality.
  • AAC file is small with low quality.
    Note
  • You must call the method after calling the method after joining a room.
  • A client can only run a recording task. If you repeatedly call the StartAudioRecording method, the current recording task stops and a new recording task starts.
  • If the current user leaves the room, the audio recording automatically stops. You can call the method to manually stop recording during calls.
    Parameters
    filePathThe absolute path where the recording file is saved. The file name and format must be accurate. For example, sdcard/xxx/audio.aac.
    • Make sure that the specified path is valid and has the write permission.
    • Only WAV or AAC files are supported.
    sampleRateThe audio sample rate (Hz). Valid values: 16000, 32000, 44100, and 48000. The default value is 32000.
    qualityThe audio quality. The parameter is valid only the audio file is in AAC format. For more information, see RtcAudioRecordingQuality .
    Returns
    • 0: Success.
    • Other values: Failure.

◆ StopAudioRecording()

abstract int nertc.IRtcEngine.StopAudioRecording ( )
pure virtual

Stops the audio recording on the client.
If the local client leaves the room, audio recording automatically stops. You can call the StopAudioRecording method to manually stop recording during calls at any time.

Note
You must call this method before you call LeaveChannel .
Returns
  • 0: Success.
  • Other values: Failure.

◆ AdjustRecordingSignalVolume()

abstract int nertc.IRtcEngine.AdjustRecordingSignalVolume ( int  volume)
pure virtual

Adjusts the volume of captured signals.

Note
The method only adjusts the volume of captured signals in the application programs without modifying the volumes of the device. If you need to modify the volume of the device, see related interfaces of device management.
Parameters
[in]volumeindicates the volume of the captured recording. Valid values: 0 to 400. Where:
  • 0: Mute.
  • 100: The original volume.
  • 400: The maximum value can be four times the original volume. The limit value is protected.
Returns
  • 0: Success.
  • Other values: Failure.

◆ AdjustPlaybackSignalVolume()

abstract int nertc.IRtcEngine.AdjustPlaybackSignalVolume ( int  volume)
pure virtual

Adjusts the volume of the audio local playback.

Note
The method only adjusts the volume of captured signals in the application programs without modifying the volumes of the device. If you need to modify the volume of the device, see related interfaces of device management.
Parameters
[in]volumeindicates the playback volume. Valid range: 0 to 400. Where:
  • 0: Mute.
  • 100: The original volume.
  • 400: The maximum value can be four times the original volume. The limit value is protected.
Returns
  • 0: Success.
  • Other values: Failure.

◆ AdjustUserPlaybackSignalVolume()

abstract int nertc.IRtcEngine.AdjustUserPlaybackSignalVolume ( ulong  uid,
int  volume 
)
pure virtual

Adjusts the volume of local signal playback from a specified remote user.
After you join the room, you can call the method to adjust the volume of local audio playback from different remote users or repeatedly adjust the volume of audio playback from a specified remote user.

Note
  • You can call this method after joining a room.
  • The method is valid in the current call. If a remote user exits the room and rejoins the room again, the setting is still valid until the call ends.
  • The method adjusts the volume of the mixing audio published by a specified remote user. The volume of one remote user can be adjusted. If you want to adjust multiple remote users, you need to call the method for the required times.
Parameters
uidThe ID of a remote user.
volumePlayback volume: 0 to 100.
  • 0: Mute.
  • 100: The original volume.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartChannelMediaRelay()

abstract int nertc.IRtcEngine.StartChannelMediaRelay ( RtcChannelMediaRelayConfig  config)
pure virtual

Starts to relay media streams across rooms.

  • The method can invite co-hosts across rooms. Media streams from up to four rooms can be relayed. A room can receive multiple relayed media streams.
  • After you call this method, the SDK triggers OnMediaRelayStateChanged and OnMediaRelayEvent. The return reports the status and events about the current relayed media streams across rooms.
    Note
    - You can call this method after joining a room. Before you call the method, you must set the destination room in the RtcChannelMediaRelayConfig parameter in destInfos.
  • The method is applicable only to the host in live streaming.
  • If you want to call the method again, you must first call the StopChannelMediaRelay method to exit the current relaying status.
  • If you succeed in relaying the media stream across rooms, and want to change the destination room, for example, add or remove the destination room, you can call UpdateChannelMediaRelay to update the information about the destination room.
    Since
    V4.3.0
    Parameters
    configspecifies the configuration for the media stream relay across rooms. For more information, see RtcChannelMediaRelayInfo
    Returns
    0
    A value of 0 returned indicates that the method call is successful. Otherwise, the method call fails.

◆ UpdateChannelMediaRelay()

abstract int nertc.IRtcEngine.UpdateChannelMediaRelay ( RtcChannelMediaRelayConfig  config)
pure virtual

Updates the information of the destination room for the media stream relay.
You can call this method to relay the media stream to multiple rooms or exit the current room.

  • You can call this method to change the destination room, for example, add or remove the destination room.
  • After you call this method, the SDK triggers OnMediaRelayStateChanged and OnMediaRelayEvent. The return reports the status and events about the current relayed media streams across rooms.
    Note
    Before you call the method, you must join the room and call StartChannelMediaRelay to relay the media stream across rooms. Before you call the method, you must set the destination room in the RtcChannelMediaRelayConfig parameter in dest_infos.
    Since
    V4.3.0
    Parameters
    configThe configuration for destination rooms.
    Returns
    A value of 0 returned indicates that the method call is successful. Otherwise, the method call fails.

◆ StopChannelMediaRelay()

abstract int nertc.IRtcEngine.StopChannelMediaRelay ( )
pure virtual

Stops relaying media streams.
If the host leaves the room, media stream replay across rooms automatically stops. You can also call StopChannelMediaRelay. In this case, the host exits all destination rooms.

◆ SetLocalPublishFallbackOption()

abstract int nertc.IRtcEngine.SetLocalPublishFallbackOption ( RtcStreamFallbackOption  option)
pure virtual

Sets the fallback option for the published local video stream based on the network conditions.
The quality of the published local audio and video streams is degraded with poor quality network connections. After calling this method and setting the option to kNERtcStreamFallbackAudioOnly:

  • With unreliable upstream network connections and the quality of audio and video streams is downgraded, the SDK automatically disables video stream or stops receiving video streams. In this way, the communication quality is guaranteed.
  • The SDK monitors the network performance and recover audio and video streams if the network quality improves.
  • If the locally published audio and video stream falls back to audio stream, or recovers to audio and video stream, the SDK triggers the OnPublishFallbackToAudioOnly callback.
    Note
    You must call the method before you call JoinChannel.
    Since
    V4.3.0
    Parameters
    optionThe fallback option of publishing audio and video streams. The fallback kNERtcStreamFallbackAudioOnly is disabled by default. For more information, see RtcStreamFallbackOption .
    Returns
    0
    A value of 0 returned indicates that the method call is successful. Otherwise, the method call fails.

◆ SetRemoteSubscribeFallbackOption()

abstract int nertc.IRtcEngine.SetRemoteSubscribeFallbackOption ( RtcStreamFallbackOption  option)
pure virtual

Sets the fallback option for the subscribed remote audio and video stream with poor network connections.
The quality of the subscribed audio and video streams is degraded with unreliable network connections. You can use the interface to set the option as kNERtcStreamFallbackVideoStreamLow or kNERtcStreamFallbackAudioOnly.

  • In unreliable downstream network connections, the SDK switches to receive a low-quality video stream or stops receiving video streams. In this way, the communication quality is maintained or improved.
  • The SDK monitors the network quality and resumes the video stream when the network condition improves.
  • If the subscribed remote video stream falls back to audio only, or the audio-only stream switches back to the video stream, the SDK triggers the OnSubscribeFallbackToAudioOnly callback.
    Note
    You must call the method before you call JoinChannel.
    Since
    V4.3.0
    Parameters
    optionThe fallback option for the subscribed remote audio and video stream. With unreliable network connections, the stream falls back to a low-quality video stream of kNERtcStreamFallbackVideoStreamLow. For more information, see nertc::NERTCStreamFallbackOption .
    Returns
    0
    A value of 0 returned indicates that the method call is successful. Otherwise, the method call fails.

◆ EnableSuperResolution()

abstract int nertc.IRtcEngine.EnableSuperResolution ( bool  enable)
pure virtual

Enables or disables AI super resolution.

Since
V4.4.0
Note
  • Please contact our technical support to enable AI super resolution before you perform the feature.
  • AI super resolution is only valid when you enable the following types of video streams:
  • Video streams that are received from local 360P.
  • High stream video of mainstream that are captured by the camera. AI super resolution is currently unsupported to resume low streams or substreams of screen sharing.
Parameters
enableWhether to enable AI super resolution. By default, the setting is disabled.
Returns
  • 0: Success.
  • Other values: Failure.

◆ EnableEncryption()

abstract int nertc.IRtcEngine.EnableEncryption ( bool  enable,
RtcEncryptionConfig  config 
)
pure virtual

Enables or disables media stream encryption.

Since
V4.4.0 In scenes where high safety is required such as financial sectors, you can set encryption modes of media streams with the method before joining the room.
Note
  • Please calls the method before you join the room. The encryption mode and private key cannot be changed after you join the room. The SDK will automatically disable encryption after users leave the room. If you need to enable encryption again, users need to call the method before joining the room.
  • In the same room, all users who enable media stream encryption must share the same encryption mode and private keys. If not, members who use different private keys will report kNERtcErrEncryptNotSuitable (30113).
  • For safety, we recommend that you use a new private key every time you enable media stream encryption.
Parameters
enablewhether to enable media stream encryption.
  • true: Enabled.
  • false: Disabled. This is the default value.
configspecifies encryption plan for media streams. For more information, see RtcEncryptionConfig.
Returns
  • 0: Success.
  • Other values: Failure.

◆ StartLastmileProbeTest()

abstract int nertc.IRtcEngine.StartLastmileProbeTest ( RtcLastmileProbeConfig  config)
pure virtual

Starts the last-mile network probe test.
This method 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).This method is used to detect network quality before a call. Before a user joins a room, you can use this method to estimate the subjective experience and objective network status of a local user during an audio and video call. Once this method is enabled, the SDK returns the following callbacks:

  • OnLastmileQuality: the SDK triggers this callback within five seconds depending on the network conditions. This callback rates the network conditions with a score and is more closely linked to the user experience.
  • OnLastmileProbeResult`: the SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective.
    Note
  • You can call this method before joining a channel(JoinChannel).
  • Do not call other methods before receiving the OnLastmileQuality and OnLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted.
    Since
    V4.5.0
    Parameters
    configSets the configurations of the last-mile network probe test.

◆ StopLastmileProbeTest()

abstract int nertc.IRtcEngine.StopLastmileProbeTest ( )
pure virtual

Stops the last-mile network probe test.

Since
V4.5.0
Returns
  • 0: Success.
  • Other values: Failure.

◆ UpdateSpatializerAudioRecvRange()

abstract int nertc.IRtcEngine.UpdateSpatializerAudioRecvRange ( int  audibleDistance,
int  conversationalDistance,
RtcDistanceRolloffModel  rollOff 
)
pure virtual

Set the audio range in the spatializer

Note
with enableSpatializer enabled. Call the method before calling
Parameters
audibleDistanceThe distance for listeners to hear speakers and receive text messages. [0,1000] Default value 32。
conversationalDistancecontrol speaker audio within the original volume. If the volume exceeds the range, the voice starts to fade out. 默认值为 1。
rollOffDistance attenuation mode RtcDistanceRolloffModel. Default value: kNERtcDistanceRolloffNone
Returns
  • 0: success.
  • Other values: failure.

◆ UpdateSpatializerSelfPosition()

abstract int nertc.IRtcEngine.UpdateSpatializerSelfPosition ( RtcSpatializerPositionInfo  info)
pure virtual

Update the position of the current user in spatializer

Note
with EnableSpatializer enabled. Reset the setting if EnableSpatializer is disabled.
Parameters
infolocation info, For more information,see RtcSpatializerPositionInfo.
Returns
  • 0: success.
  • Other values: failure.

◆ EnableSpatializerRoomEffects()

abstract int nertc.IRtcEngine.EnableSpatializerRoomEffects ( bool  enable)
pure virtual

Enable or disable the room effects in the spatializer.

Note
with EnableSpatializer enabled
Parameters
enablereverb effect. the default value is disabled
Returns
  • 0: success.
  • Other values: failure.

◆ SetSpatializerRoomProperty()

abstract int nertc.IRtcEngine.SetSpatializerRoomProperty ( RtcSpatializerRoomProperty  roomProperty)
pure virtual

Set the room reverberation property in the spatializer

Note
with EnableSpatializer enabled
Parameters
roomPropertyRoom property RtcSpatializerRoomProperty
Returns
  • 0: success.
  • Other values: failure.

◆ SetSpatializerRenderMode()

abstract int nertc.IRtcEngine.SetSpatializerRenderMode ( RtcSpatializerRenderMode  mode)
pure virtual

Set the rendering mode of the spatializer

Note
with EnableSpatializer enabled
Parameters
modeRendering mode RtcSpatializerRenderMode ,Default value: kNERtcSpatializerRenderBinauralHighQuality
Returns
  • 0: success.
  • Other values: failure.

◆ EnableSpatializer()

abstract int nertc.IRtcEngine.EnableSpatializer ( bool  enable)
pure virtual

Enable or disable the spatializer

Note
Call the method before calling, the configuration will not be reset after the call ends
Parameters
enableWhether to enable the spatializer
Returns
  • 0: success.
  • Other values: failure.

◆ EnableAvatar()

abstract int nertc.IRtcEngine.EnableAvatar ( bool  enable)
pure virtual

Enable or disable a digital avatar.

Note
  • Call the method after the call starts. The server cleans up the setting only after the call ends.
  • Disable the digital avatar if a user leaves the room. The server reserves the setting when the user rejoin the room of the same cid using the same uid.
Parameters
enableWhether to enable a digital avatar.
Returns
  • 0: success.
  • Other values: failure.

Member Data Documentation

◆ OnError

OnError nertc.IRtcEngine.OnError

All Engine Events.

Property Documentation

◆ AudioDeviceManager

abstract IAudioDeviceManager nertc.IRtcEngine.AudioDeviceManager
get

Retrieves the audio device manager object.

Returns
The IAudioDeviceManager Object

◆ VideoDeviceManager

abstract IVideoDeviceManager nertc.IRtcEngine.VideoDeviceManager
get

Get the audio device manager object.

Returns
The IAudioDeviceManager Object

The documentation for this class was generated from the following file: