NERtc Unity SDK
V4.5.907
|
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] |
RtcEngine class provides main interface-related methods for applications to call. and you can activate the communication feature the NERTC SDK provides.
|
inlinestatic |
Retrieves the IRtcEngine static object.
|
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.
[in] | param | The passed RtcEngineContext object. |
|
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.
[in] | sync | The 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. |
|
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.
[in] | role | The role of a user. RtcClientRole. |
|
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.
[in] | profile | Sets the room scene. For more information, see RtcChannelProfileType . |
|
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.
[in] | token | The certification signature used in authentication (NERTC Token). Valid values:
|
[in] | channelName | The 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] | uid | The 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. |
|
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.
[in] | token | The certification signature used in authentication (NERTC Token). Valid values:
|
[in] | channelName | The room name that a user wants to switch to. |
|
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.
|
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.
[in] | enabled |
|
|
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.
[in] | canvas | The video canvas information. |
|
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.
[in] | uid | The ID of a remote user. |
[in] | canvas | The video canvas information. |
|
pure virtual |
Enables or disables local audio capture and rendering.
The method enables local video capture.
[in] | enabled | Whether to enable local video capture and rendering.
|
|
pure virtual |
Subscribes or unsubscribes video streams from specified remote users.
[in] | uid | The user ID. |
[in] | type | The type of the subscribed video streams. RtcRemoteVideoStreamType . |
[in] | subscribe |
|
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.
|
pure virtual |
Create an IRtcChannel object.
[in] | channelName | The 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, !#$%&()+-:;≤.,>? @[]^_{|}~”. |
|
pure virtual |
Get an IRtcChannel object.
[in] | channelName | The 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, !#$%&()+-:;≤.,>? @[]^_{|}~”. |
|
pure virtual |
Gets the current connection status.
|
pure virtual |
Enables or disabling publishing the local audio stream. The method is used to enable or disable publishing the local audio stream.
[in] | mute | Mute or Unmute.
|
|
pure virtual |
Sets the audio encoding profile.
[in] | profile | Sets the sample rate, bitrate, encoding mode, and the number of channels. RtcAudioProfileType . |
[in] | scenario | Sets the type of an audio application scenario. RtcAudioScenarioType . |
|
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.
[in] | type | The preset voice changer effect. By default, the audio effect is disabled. For more information, see RtcVoiceChangerType. |
|
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.
[in] | type | The present voice beautifier effect. By default, the voice beautifier effect is disabled. For more information, see RtcVoiceBeautifierType. |
|
pure virtual |
Sets the voice pitch of a local voice. The method changes the voice pitch of the local speaker.
[in] | pitch | The 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. |
|
pure virtual |
Sets the local voice equalization effect. You can customize the center frequencies of the local voice effects.
[in] | bandFrequency | Sets 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] | bandGain | Sets the gain of each band (dB). Value range: -15 to 15. The default value is 0. |
|
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.
[in] | uid | The user ID. |
[in] | subscribe |
|
|
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.
restriction | The restriction applied to the SDK for Audio Session. For more information, see RtcAudioSessionOperationRestriction. |
|
pure virtual |
Mutes or unmutes the audio playback device.
muted | The option whether to mute the playback device. By default, the setting is unmuted. |
|
pure virtual |
Gets the mute status of the audio playback device.
muted | The option whether the device is muted. |
|
pure virtual |
Mutes or unmutes the audio capture device.
muted | The option whether to mute the audio capture device. The default setting is unmuted. |
|
pure virtual |
Checks whether the audio capture device is muted.
muted | The option whether the device is muted. |
|
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 .
|
pure virtual |
Checks whether the camera flash feature is supported.
|
pure virtual |
Checks whether the camera manual focus feature is supported.
|
pure virtual |
Checks whether the camera exposure feature is supported.
|
pure virtual |
Sets the camera exposure position.
After you call the method, the OnCameraExposureChanged callback is triggered on the local client.
pointX | The x-axis value of the exposure position . |
pointY | The y-axis value of exposure position . |
|
pure virtual |
Enables or disables the camera flash feature.
on | YES: turn on. NO: turn off. |
|
pure virtual |
Check whether the flash is turned on on the device.
|
pure virtual |
Sets the current camera zoom ratio.
factor | The zoom ratio supported by the camera. |
|
pure virtual |
Gets maximum zoom ratio supported by the camera.
|
pure virtual |
Sets the camera manual focus position.
After you call the method, the OnCameraFocusChanged callback is triggered on the local client.
x | The horizontal coordinate of the touch point in the view. Value range: 0 to 1. |
y | The vertical coordinate of the touch point in the view. Value range: 0 to 1. |
|
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:
[in] | config | Capture preference and resolution of video cameras. |
|
pure virtual |
Unsubscribes or subscribes to audio streams from all remote users.
subscribe | Whether to unsubscribe audio streams from all remote users. |
|
pure virtual |
Sets local video parameters.
[in] | config | Sets the video encoding parameters. For more information, see RtcVideoConfig. |
|
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.
[in] | enable | Whether to enable dual-stream mode.
|
|
pure virtual |
Sets a remote substream canvas.
[in] | canvas | The video canvas information. |
|
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.
[in] | scalingMode | The video display mode RtcVideoScalingMode . |
|
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.
[in] | scalingMode | The video display mode. RtcVideoScalingMode . |
|
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.
[in] | mirrorMode | The video mirror mode. For more information, see RtcVideoMirrorMode. |
|
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.
[in] | uid | The ID of a remote user. |
[in] | scalingMode | The video display mode. RtcVideoScalingMode. |
|
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.
[in] | uid | The ID of a remote user. |
[in] | canvas | The video canvas settings. |
|
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.
[in] | uid | The user ID. |
[in] | subscribe |
|
|
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.
[in] | uid | The ID of a remote user. |
[in] | scalingMode | The video display mode. RtcVideoScalingMode. |
|
pure virtual |
Enables video preview.
The method is used to enable local video preview before you join a room. Prerequisites for calling the API:
|
pure virtual |
Stops video preview.
|
pure virtual |
Enables or disables publishing the local video stream.
If the method is called Successfully, OnUserVideoMute is triggered remotely.
[in] | mute |
|
|
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.
priority | The priority of the local media stream. The default value is kNERtcMediaPriorityNormal . For more information, see RtcMediaPriorityType. |
isPreemptive | specifies whether to enable the preempt mode. The default value is false, which indicates that the preempt mode is disabled.
|
|
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.
[in] | parameters | Related parameters for audio and video calls whose format is the JSON string. |
|
pure virtual |
Sets the audio recording format.
The method is used to set audio recording format of OnAudioFrameDidRecord callback.
format | The sample rate and channels of data returned in the OnAudioFrameDidRecord . A value of NULL is allowed. The default value is NULL. |
|
pure virtual |
Sets the audio playback format.
The method is used to set audio recording format of OnAudioFrameWillPlayback callback.
format | The sample rate and channels of data returned in the OnAudioFrameWillPlayback. A value of NULL is allowed. The default value is NULL. |
|
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 .
sampleRate | The sample rate of data returned in OnMixedAudioFrame . Only 8000, 16000, 32000, 44100, and 48000 are supported. |
|
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.
observer | The object instance. If you pass in NULL, you cancel the registration and clear the settings of RtcAudioFrameRequestFormat. |
|
pure virtual |
Starts recording an audio dump file. Audio dump files can be used to analyze audio issues.
|
pure virtual |
Finishes recording an audio dump file.
|
pure virtual |
Set the speaker mode(for iOS and Android)
enable | Whether to enable the speaker mode |
|
pure virtual |
Get the current speaker mode(for iOS and Android)
enabled | Whether to enable the speaker mode |
|
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.
[in] | option | Options of creating audio mixing configurations that include types, full path or URL. For more information, see RtcCreateAudioMixingOption . |
|
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.
|
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.
|
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.
|
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.
[in] | volume | The audio mixing volume for publishing. Valid values: 0 to 100. The default value of 100 represents the original 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.
[out] | volume | The volume for publishing of the audio mixing. |
|
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.
[in] | volume | The volume range of the audio mixing is 0 to 100. The default value of 100 represents the original 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.
[out] | volume | The volume of the audio mixing. |
|
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.
[out] | duration | The duration of the audio mixing. Unit: milliseconds. |
|
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.
[out] | position | The playback position of the audio mixing file. Unit: milliseconds. |
|
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.
[in] | seekPosition | The playback position of the music file. Unit: milliseconds. |
|
pure virtual |
Plays a specified audio effect file.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | option | The options of creating audio effect files configurations including types, full path or URL of audio mixing files. For more information, see RtcCreateAudioEffectOption . |
|
pure virtual |
Stops playing a specified audio effect file.
You can call the method when you are in a room.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Stops playing all audio effects.
|
pure virtual |
Pauses playing all audio effects.
You can call the method when you are in a room.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Resumes playing a specified audio effect.
You can call the method when you are in a room.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Pauses all audio effect files.
You can call the method when you are in a room.
|
pure virtual |
Resumes playing all audio effects files.
You can call the method when you are in a room.
|
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.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | volume | The audio effect volume. Value range: 0 to 100. The default value of 100 represents the original 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.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
[out] | volume | The audio effect volume for publishing. |
|
pure virtual |
Sets the playback volume of an audio effect file. You can call this method after joining a room.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | volume | The audio effect volume for publishing. Valid values: 0 to 100. The default value is 100. |
|
pure virtual |
Gets the playback volume of the audio effects files.
You can call this method after joining a room.
[in] | effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
[out] | volume | The audio effect playback volume. |
|
pure virtual |
Enables or disables in-ear monitoring.
[in] | enabled | Enabled or disabled. |
[in] | volume | The volume of ear-monitoring. |
|
pure virtual |
Sets the volume for in-ear monitoring. You can call the method when you are in a room.
[in] | volume | The volume of ear-monitoring. Valid values: to 100. The default value is 100. |
|
pure virtual |
Enables or disables local audio capture through the sound card.
[in] | enabled | Specifies whether to enable the capture feature through the sound card.
|
[in] | deviceName | The 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. |
|
pure virtual |
Adjusts the volume of captured signals of sound cards.
[in] | volume | The captured signals volume through sound cards. Value range: 0 to 100. The default value of 100 represents the original volume. |
|
pure virtual |
Registers a stats observer.
[in] | observer | The stats observer. |
|
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.
enable | Whether to prompt the speaker volume. |
interval | The time interval at which volume prompt is displayed. Unit: milliseconds. The value must be the multiples of 100 milliseconds. |
|
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.
screenRect | The relative position of the screen to virtual screens that is shared. |
regionRect | The 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. |
captureParams | The configurations of screen sharing. |
|
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.
displayId | The ID of the screen to be shared. Developers need to specify the screen they share through the parameters. |
regionRect | The relative position of shared screen to the full screen. |
captureParams | The configurations of screen sharing. |
|
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.
windowId | The ID of the window to be shared. |
regionRect | The relative position of shared screen to the full screen. |
captureParams | The configurations of screen sharing. |
|
pure virtual |
Start screen capture from external video sources.
captureParams | encoding parameters. Screen capture parameters becomes invalid. |
externalCapturer | whether capture from external. |
|
pure virtual |
When sharing a screen or window, updates the shared region.
regionRect | The 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. |
|
pure virtual |
Stops screen sharing.
If you use the method to disable the substream after joining a room, the OnUserSubStreamVideoStop callback is remotely triggered.
|
pure virtual |
Pauses screen sharing.
|
pure virtual |
Resumes screen sharing.
|
pure virtual |
Sets the window list that need to be blocked in capturing screens. The method can be dynamically called in the capturing.
windowList | The ID of the screen to be blocked. |
|
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.
[in] | enabled | Specifies whether input external video source data.
|
|
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.
[in] | frame | The video frame data. |
|
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.
[in] | videoFrame | The video frame data. |
|
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.
[in] | enabled | Specifies whether to input external data.
|
[in] | sampleRate | The 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] | channels | The 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:
|
|
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.
[in] | frame | The data of frame cannot exceed 7680 bytes in length.
|
|
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.
[in] | enabled | Specifies whether to output external data.
|
[in] | sampleRate | The 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] | channels | The 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:
|
|
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.
[out] | data | Data pointer. The SDK internally copies data into data. |
[in] | length | The size of the audio data that are pulled. Unit: bytes.
|
|
pure virtual |
Query the SDK version number.
|
pure virtual |
Check the error description of specified error codes.
[in] | errorCode | RtcErrorCode . |
|
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.
|
pure virtual |
After the method is successfully called, the current user can receive the notification about the status of the live stream.
[in] | info | indicates information of live task. For more information, see RtcLiveStreamTaskInfo . |
|
pure virtual |
Updates and modifies a push task in a room.
[in] | info | indicates information of live task. For more information, see RtcLiveStreamTaskInfo . |
|
pure virtual |
Deletes a push task.
[in] | taskId | The ID of a live streaming task. |
|
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.
data | The custom SEI frame data.The custom SEI data size whose maximum value does not exceed 4096 bytes. |
type | The type of the stream channel with which the SEI data is transmitted. For more information, see RtcVideoStreamType. |
|
pure virtual |
Adds a watermark image to the local video.
type | The type of video streams. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType. |
config | The 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 . |
|
pure virtual |
Adds a watermark to the remote video canvas.
uid | The ID of a remote user. |
type | The type of video streams. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType. |
config | The 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. |
|
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.
streamType | The video stream type of the snapshot. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType. |
callback | The snapshot callback. For information, see RtcTakeSnapshotCallback. |
|
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.
uid | The ID of a remote user. |
streamType | The video stream type of the snapshot. You can set the value to mainstream or substream. For more information, see RtcVideoStreamType. |
callback | The snapshot callback. For information, see RtcTakeSnapshotCallback . |
|
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.
filePath | The absolute path where the recording file is saved. The file name and format must be accurate. For example, sdcard/xxx/audio.aac.
|
sampleRate | The audio sample rate (Hz). Valid values: 16000, 32000, 44100, and 48000. The default value is 32000. |
quality | The audio quality. The parameter is valid only the audio file is in AAC format. For more information, see RtcAudioRecordingQuality . |
|
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.
|
pure virtual |
Adjusts the volume of captured signals.
[in] | volume | indicates the volume of the captured recording. Valid values: 0 to 400. Where:
|
|
pure virtual |
Adjusts the volume of the audio local playback.
[in] | volume | indicates the playback volume. Valid range: 0 to 400. Where:
|
|
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.
uid | The ID of a remote user. |
volume | Playback volume: 0 to 100.
|
|
pure virtual |
Starts to relay media streams across rooms.
destInfos
.config | specifies the configuration for the media stream relay across rooms. For more information, see RtcChannelMediaRelayInfo。 |
|
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.
dest_infos
. config | The configuration for destination rooms. |
|
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.
|
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:
option | The fallback option of publishing audio and video streams. The fallback kNERtcStreamFallbackAudioOnly is disabled by default. For more information, see RtcStreamFallbackOption . |
|
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.
option | The 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 . |
|
pure virtual |
Enables or disables AI super resolution.
enable | Whether to enable AI super resolution. By default, the setting is disabled. |
|
pure virtual |
Enables or disables media stream encryption.
enable | whether to enable media stream encryption.
|
config | specifies encryption plan for media streams. For more information, see RtcEncryptionConfig. |
|
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:
config | Sets the configurations of the last-mile network probe test. |
|
pure virtual |
Stops the last-mile network probe test.
|
pure virtual |
Set the audio range in the spatializer
audibleDistance | The distance for listeners to hear speakers and receive text messages. [0,1000] Default value 32。 |
conversationalDistance | control speaker audio within the original volume. If the volume exceeds the range, the voice starts to fade out. 默认值为 1。 |
rollOff | Distance attenuation mode RtcDistanceRolloffModel. Default value: kNERtcDistanceRolloffNone |
|
pure virtual |
Update the position of the current user in spatializer
info | location info, For more information,see RtcSpatializerPositionInfo. |
|
pure virtual |
Enable or disable the room effects in the spatializer.
enable | reverb effect. the default value is disabled |
|
pure virtual |
Set the room reverberation property in the spatializer
roomProperty | Room property RtcSpatializerRoomProperty |
|
pure virtual |
Set the rendering mode of the spatializer
mode | Rendering mode RtcSpatializerRenderMode ,Default value: kNERtcSpatializerRenderBinauralHighQuality |
|
pure virtual |
Enable or disable the spatializer
enable | Whether to enable the spatializer |
|
pure virtual |
Enable or disable a digital avatar.
enable | Whether to enable a digital avatar. |
OnError nertc.IRtcEngine.OnError |
All Engine Events.
|
get |
Retrieves the audio device manager object.
|
get |
Get the audio device manager object.