/* * Copyright (c) 2021 CommsEase, Inc. All rights reserved. */ #import #import "INERtcEngine.h" #import "INERtcEngineEx.h" #import "NERtcEngineErrorCode.h" #import "NERtcEngineDelegate.h" #import "NERtcEngineEnum.h" /** * @mainpage Introduction * @brief

CommsEase NERTC SDK * provides a comprehensive Real-time Communication (RTC) development platform that allows developers to implement Internet-based peer-to-peer audio and video calls, and group audio and video conferencing. The SDK enables users to manage audio and video devices and switch audio and video modes during calls. The SDK also implements capturing video data callbacks and offers additional features, such as personalized image enhancement.

* * - INERtcEngine interface classes that contain main methods invoked by applications. * - NERtcEngine interface classes that contain methods used to instantiate or destroy SDK instances. * - INERtcEngineEx interface classes that contain extension methods invoked by applications * - INERtcChannel classes used to implement audio and video calling in a room. Users can join multiple rooms by creating multiple INERtcChannel objects. * - NERtcChannelDelegate classes used to listen for and report events and data for a specified room. * - NERtcEngineAudioFrameObserver interface classes used to return audio frames to applications. * - NERtcEngineDelegate interface classes used to return notifications to applications using delegate methods. * - NERtcEngineDelegateEx interface classes used to return extended notifications to applications using delegate methods. * - NERtcEngineLiveStreamObserver interface classes used to return notifications about live media streams to applications. * - NERtcEngineMediaStatsObserver interface classes used to return notifications about media status to applications. * - NERtcEngineVideoFrameObserver interface classes used to return video frames to applications. * - NERtcEngineAudioSessionObserver interface classes used to return notifications about audio sessions to applications. * - NERtcBeauty interface classes used to add beauty effects. * * ## Error codes * * The SDK may return error codes or status codes when your app calls an API. You can learn about the status of the SDK or specific tasks based on the information provided by the error codes or status codes. If unknown errors are returned, you can contact our technical support for help. * * The following error codes are supported by the SDK and APIs. You can view the specific code at the top of the page for each error code. *- Common error codes: {@link NERtcEngineErrorCode.NERtcError} *- Error codes related to mixing audio: {@link NERtcAudioMixingErrorCode} *- Error codes related to publishing audio and video streams in live streaming: {@link NERtcEngineErrorCode.kNERtcLiveStreamError} *- Status codes related to audio recording: {@link NERtcAudioRecordingCode} * - Video watermark status codes: {@link NERtcConstants.NERtcLocalVideoWatermarkState} * - Warning codes: {@link NERtcWarning}

Room management

Method Description Supported version
{@link INERtcEngine#setupEngineWithContext:} Initializes NERtcEngine V3.5.0
{@link INERtcEngine#setChannelProfile:} Sets a room scene. V3.5.0
{@link INERtcEngine#setClientRole:} Sets the role of a user in live streaming. V3.5.0
{@link INERtcEngine#joinChannelWithToken:channelName:myUid:completion:} Joins an RTC channel. V3.6.0
{@link INERtcEngine#switchChannelWithToken:channelName:completion:} Switches to a different RTC room. V4.1.0
{@link INERtcEngine#leaveChannel} Leaves a room. V3.9.0
{@link INERtcEngine#connectionState} Gets the connection status of NERtcEngine. V3.5.0
{@link INERtcEngine#setParameters:} Sets complex parameters. V3.5.0
## Room event
Event Description Supported version
{@link NERtcEngineDelegate#onNERtcEngineDidClientRoleChanged: newRole:} Occurs when a user changes the role in live streaming. V3.9.0
{@link NERtcEngineDelegate#onNERtcEngineRejoinChannel:} Occurs when a user rejoins a room. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineDidLeaveChannelWithResult:} Occurs when a user leaves a room. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineUserDidJoinWithUserID:userName:} Occurs when a remote user joins the current room. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineUserDidLeaveWithUserID:reason:} Occurs when a remote user leaves a room. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineNetworkConnectionTypeChanged:} Occurs when the type of the local network changes. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineConnectionStateChangeWithState:reason:} Occurs when connection state changes. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineDidDisconnectWithReason:} Occurs when the server becomes disconnected. callback. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineReconnectingStart} Occurs when the reconnection starts V3.6.0
## Audio management
Method Description Supported version
{@link INERtcEngine#setAudioProfile:scenario:} Sets the audio profile. V3.5.0
{@link INERtcEngineEx#adjustRecordingSignalVolume:} Adjusts the recording volume. V3.5.0
{@link INERtcEngineEx#adjustPlaybackSignalVolume: } Adjusts the playback volume. V3.5.0
{@link INERtcEngineEx#adjustUserPlaybackSignalVolume:forUserID:} Adjusts the local playback volume of the stream from a specified remote user. V4.2.1
{@link INERtcEngine#enableLocalAudio:} Stops or resumes local audio capture. V3.5.0
{@link INERtcEngineEx#muteLocalAudio: } Mute or unmute local audio. V3.5.0
{@link INERtcEngineEx#subscribeRemoteAudio:forUserID:} Subscribes to or unsubscribes from specified audio streams. V3.5.0
{@link INERtcEngineEx#subscribeAllRemoteAudio:} Subscribes to or unsubscribes from all remote audio streams. V3.5.0
{@link INERtcEngineEx#setAudioSessionOperationRestriction:} Sets the permissions of Audio Session for the SDK. V3.5.0
{@link INERtcEngineEx#setRemoteHighPriorityAudioStream:forUserID:streamType:} Sets high priority to a remote audio stream. V4.6.0
{@link INERtcEngineEx#enableLocalSubStreamAudio:} Enables or disables the audio substream. V4.6.10
{@link INERtcEngineEx#subscribeRemoteSubStreamAudio:forUserID:} Subscribes to the audio substream from a specified remote user. V4.6.10
{@link INERtcEngineEx#muteLocalSubStreamAudio:} Mutes the local audio substream. V4.6.10
{@link INERtcEngineEx#setAudioSubscribeOnlyBy:} Allows the local audio stream to be subscribed only by specified users in the room. V4.6.10
{@link INERtcEngine#enableMediaPub:withMediaType:} Publishes or unpublishes the local audio stream. V4.6.10

Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineAudioHasHowling} Occurs when howling is detected. V3.9.0
{@link NERtcEngineAudioFrameObserver#onNERtcEngineSubStreamAudioFrameDidRecord:} Returns the audio substream data. V4.6.10
{@link NERtcEngineAudioFrameObserver#onNERtcEnginePlaybackSubStreamAudioFrameBeforeMixingWithUserID:frame:channelId:} Gets the audio substream data published by a specified remote user before mixing. V4.6.10
## Video management
Method Description Supported version
{@link INERtcEngine#enableLocalVideo:} Enables or disables the local video stream. V3.5.0
{@link INERtcEngine#setLocalVideoConfig:} Sets the local video configuration. V3.5.0
{@link INERtcEngineEx#setCameraCaptureConfig:} Sets the configuration for capturing the camera data. V4.5.0
{@link INERtcEngine#setupLocalVideoCanvas:} Sets the local video canvas. V3.5.0
{@link INERtcEngine#setupRemoteVideoCanvas:forUserID:} Sets the remote video canvas. V3.5.0
{@link INERtcEngineEx#startPreview} Starts video preview. V3.5.0
{@link INERtcEngineEx#stopPreview} Stops video preview V3.5.0
{@link INERtcEngineEx#muteLocalVideo:} Mutes or unmutes local video stream. V3.5.0
{@link INERtcEngineEx#subscribeRemoteVideo:forUserID:streamType:} Subscribes to or unsubscribes from video streams from specified remote users. V3.5.0
{@link INERtcEngineEx#setLocalRenderScaleMode:} Sets the zoom mode of local video rendering. V3.5.0
{@link INERtcEngineEx#setRemoteRenderScaleMode:forUserID:} Sets the zoom mode of remote video rendering. V3.5.0
{@link INERtcEngineEx#setVideoRotationMode:} Sets the rotation mode of the local video screen. V4.3.0
{@link INERtcEngineEx#enableSuperResolution:} Enables or disables AI super resolution. V4.4.0
{@link INERtcEngineEx#enableVideoCorrection:} Enables or disables video correction. V4.6.0
{@link INERtcEngineEx#setVideoCorrectionConfig:} Ses the parameters of video correction configuration. V4.6.0
{@link INERtcEngineEx#enableVirtualBackground:backData:} Enables the virtual background. V4.6.10

Local media events

Method Description Supported version
{@link NERtcEngineDelegateEx#onEngineFirstAudioFrameDecoded:} Occurs when the first audio frame from a remote user is decoded. V3.5.0
{@link NERtcEngineDelegateEx#onEngineFirstVideoFrameDecoded:width:height:} Occurs when the first video frame from a remote user is decoded. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineFirstVideoDataDidReceiveWithUserID:} Occurs when the first video frame from a remote user is received. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineFirstAudioDataDidReceiveWithUserID:} Occurs when the first audio frame from a remote user is received. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineMediaRightChangeWithAudio:video:} Occurs when audio and video permissions are revoked on the server side. V4.6.0
{@link NERtcEngineDelegateEx#onNERtcEngineVirtualBackgroundSourceEnabled:reason:} Callback that returns the result of enabling the virtual background V4.6.10

Remote media event

Method Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineUserVideoProfileDidUpdate:maxProfile:} Occurs when a remote user changes the video resolution type. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineUser:videoMuted:} Occurs when a remote user closes the video. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineUser:audioMuted:} Occurs when a remote user mutes the audio. V3.5.0
{@link NERtcChannelDelegate#onNERtcChannelUser:subStreamAudioMuted:} Occurs when a remote user unpublishes the audio substream. V4.6.10
{@link NERtcEngineDelegate#onNERtcEngineUserAudioDidStart:} Occurs when a remote user enables the audio. V3.5.0
{@link NERtcChannelDelegate#onNERtcChannelUserSubStreamAudioDidStart:} Occurs when a remote user publishes the audio substream. V4.6.10
{@link NERtcEngineDelegate#onNERtcEngineUserAudioDidStop:} Occurs when a remote user stops the audio stream. V3.5.0
{@link NERtcChannelDelegate#onNERtcChannelUserSubStreamAudioDidStop:} Occurs when a remote user unpublishes the audio substream. V4.6.10
{@link NERtcEngineDelegate#onNERtcEngineUserVideoDidStartWithUserID: videoProfile:} Occurs when a remote user enables the video. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineUserVideoDidStop:} Occurs when a remote user stops sending the video stream. V3.5.0

Stats event

Method Description Supported version
{@link NERtcEngineMediaStatsObserver#onRtcStats:} Occurs when the stats for the current call is collected. The callback is triggered every 2 seconds. V3.5.0
{@link NERtcEngineMediaStatsObserver#onNetworkQuality:} Occurs when the stats of uplink and downlink network quality for each user are reported during the call V3.5.0
{@link NERtcEngineMediaStatsObserver#onLocalAudioStat:} Occurs when the stats of the local audio stream are collected. V3.5.0
{@link NERtcEngineMediaStatsObserver#onLocalVideoStat:} Occurs when the stats of the local video stream are collected. V3.5.0
{@link NERtcEngineMediaStatsObserver#onRemoteAudioStats:} Occurs when the stats of the remote audio stream in the call are collected. V3.5.0
{@link NERtcEngineMediaStatsObserver#onRemoteVideoStats:} Occurs when the stats of the video stream in the call are collected. V3.5.0
{@link INERtcEngineEx#addEngineMediaStatsObserver:} Adds a media stats observer. V3.5.0
{@link INERtcEngineEx#removeEngineMediaStatsObserver: } Deletes the specified media stats observer. V3.5.0
{@link INERtcEngineEx#cleanupEngineMediaStatsObserver} Clears the media stats observer. V3.5.0
## Multiple room management
Method Description Supported version
{@link INERtcEngineEx#createChannel:} Creates and gets an NERtcChannel object. Users can join multiple rooms by creating multiple NERtcChannel objects. V4.5.0
INERtcChannel The classes provide methods to implement audio and video calling in a specified room. V4.5.0
NERtcChannelDelegate The classes provide callbacks for listening to events and returning data in a specified room. V4.5.0

Screen sharing

Method Description Supported version
{@link INERtcEngineEx#setupLocalSubStreamVideoCanvas:} Sets a playback canvas for local video substream. V3.9.0
{@link INERtcEngineEx#setupRemoteSubStreamVideoCanvas:forUserID:} Sets a playback canvas for remote video substream. V3.9.0
{@link INERtcEngineEx#startScreenCapture:} Starts screen sharing. V3.5.0
{@link INERtcEngineEx#stopScreenCapture} Stops screen sharing V3.5.0
{@link INERtcEngineEx#setLocalRenderSubStreamScaleMode:} Subscribes to or unsubscribes from local video substream from screen sharing. You can receive the video substream data only after you subscribe to the local video substream. V3.9.0
{@link INERtcEngineEx#setRemoteRenderSubStreamVideoScaleMode:forUserID:} Subscribes to or unsubscribes from the remote video substream from screen sharing. You can receive the video substream data only after you subscribe to the remote video substream. V3.9.0
{@link INERtcEngineEx#subscribeRemoteSubStreamVideo:forUserID:} Subscribes to or unsubscribes from the remote video substream from screen sharing. You can receive the video substream data only after you subscribe to the remote video substream. V3.9.0
Event Description Supported version
{@link NERtcEngineDelegate#onNERtcEngineUserSubStreamDidStartWithUserID:subStreamProfile:} Occurs when a remote user starts screen sharing through the substream. V3.9.0
{@link NERtcEngineDelegate#onNERtcEngineUserSubStreamDidStop:} Occurs when a remote user stops screen sharing through the substream. V3.9.0

Beauty

Method Description Supported version
{@link NERtcBeauty#startBeauty} Enables the beauty module. V4.6.10
{@link NERtcBeauty#stopBeauty} Stops the beauty module. V4.6.10
{@link NERtcBeauty#isOpenBeauty} Pauses or resumes beauty effects V4.6.10
{@link NERtcBeauty#setBeautyEffectWithValue} Sets a beauty effect. V4.6.10
{@link NERtcBeauty#addTempleteWithPath} Imports beauty resources or models V4.6.10
{@link NERtcBeauty#addBeautyFilter} Adds a filter effect V4.6.10
{@link NERtcBeauty#removeBeautyFilter} Removes a filter V4.6.10
## Network probe testing before calling
Method Description Supported version
{@link INERtcEngineEx#startLastmileProbeTest:} Performs a probe test before starting a call. V4.5.0
{@link INERtcEngineEx#stopLastmileProbeTest} Performs a probe test before stopping a call. V4.5.0
Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineLastmileQuality:} Reports the network quality of the current user. V4.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineLastmileProbeTestResult:} Reports the upstream and downstream network quality of the last mile before starting a call. V4.5.0

Music file playback and mixing

Method Description Supported version
{@link INERtcEngineEx#startAudioMixingWithOption:} Starts to play a music file. V3.5.0
{@link INERtcEngineEx#stopAudioMixing} Stops playing a music file. V3.5.0
{@link INERtcEngineEx#pauseAudioMixing} Pauses playing a music file. V3.5.0
{@link INERtcEngineEx#resumeAudioMixing} Resumes playing a music file. V3.5.0
{@link INERtcEngineEx#setAudioMixingPlaybackVolume:} Sets the playback volume of a music file. V3.5.0
{@link INERtcEngineEx#setAudioMixingSendVolume:} Sets the publishing volume of a music file. V3.5.0
{@link INERtcEngineEx#getAudioMixingPlaybackVolume:} Gets the playback volume of a music file. V3.5.0
{@link INERtcEngineEx#getAudioMixingSendVolume:} Get the publishing volume of a music file. V3.5.0
{@link INERtcEngineEx#getAudioMixingDuration:} Gets the total duration of a music file V3.5.0
{@link INERtcEngineEx#setAudioMixingPosition:} Sets the playback position of a music file. V3.5.0
{@link INERtcEngineEx#getAudioMixingCurrentPosition:} Gets the current playback position of a music file. V3.5.0

Event Description Supported version
{@link NERtcEngineDelegateEx#onAudioMixingStateChanged:errorCode:} Occurs when the playback status of a local music file changes. V3.5.0
{@link NERtcEngineDelegateEx#onAudioMixingTimestampUpdate:} Occurs when the timestamp of a music file is updated. V3.5.0

Audio effect file playback management

Method Description Supported version
{@link INERtcEngineEx#getEffectPlaybackVolumeWithId:volume:} Gets the playback volume of an audio effect file. V3.5.0
{@link INERtcEngineEx#setEffectPlaybackVolumeWithId:volume:} Sets the playback volume of an audio effect file. V3.5.0
{@link INERtcEngineEx#playEffectWitdId:effectOption:} Plays back a specified audio effect file V3.5.0
{@link INERtcEngineEx#stopEffectWitdId:} Stops playing a specified audio effect file. V3.5.0
{@link INERtcEngineEx#stopAllEffects} Stops playing all audio effect files. V3.5.0
{@link INERtcEngineEx#pauseEffectWitdId:} Pauses the playback of an audio effect file. V3.5.0
{@link INERtcEngineEx#pauseAllEffects} Pauses all audio file playback V3.5.0
{@link INERtcEngineEx#resumeEffectWitdId:} Resumes playing back a specified audio effect file. V3.5.0
{@link INERtcEngineEx#resumeAllEffects} Resumes playing back all audio effect files. V3.5.0
{@link INERtcEngineEx#setEffectSendVolumeWithId:volume:} Adjusts the publishing volume of a effect file. V3.5.0
{@link INERtcEngineEx#getEffectDurationWithId:duration:} Gets the duration of of an audio effect file. V4.4.0
{@link INERtcEngineEx#getEffectCurrentPositionWithId:position:} Gets the playback position of an audio effect file. V4.4.0

Voice change and reverberation

Method Description Supported version
{@link INERtcEngineEx#setAudioEffectPreset:} Sets a voice change effect preset by the SDK. 4.1.0
{@link INERtcEngineEx#setVoiceBeautifierPreset:} Sets an voice beautifier effect preset by the SDK. 4.0.0
{@link INERtcEngineEx#setLocalVoiceEqualizationOfBandFrequency:withGain:} Sets the local voice equalization effect. You can customize the center frequencies of the local voice effects. 4.0.0
{@link INERtcEngineEx#setLocalVoicePitch:} Sets the voice pitch of a local voice. 4.1.0
{@link INERtcEngineEx#setLocalVoiceReverbParam:} Enables the local reverb effect. 4.6.10

CDN relayed streaming

Note: This methods are applicable only to Interactive Live Streaming v2.0.
Method Description Supported version
{@link INERtcEngineEx#addLiveStreamTask:compeltion:} Adds a streaming task in a room. V3.5.0
{@link INERtcEngineEx#updateLiveStreamTask:compeltion:} Updates a streaming task in a room. V3.5.0
{@link INERtcEngineEx#removeLiveStreamTask:compeltion:} Deletes a streaming task in a room. V3.5.0

Event Description Supported version
{@link NERtcEngineLiveStreamObserver#onNERTCEngineLiveStreamState:taskID:url:} Live streaming status callbacks V3.5.0

Supplemental enhancement information

Method Description Supported version
{@link INERtcEngineEx#sendSEIMsg:} Sends supplemental enhancement information (SEI) messages through the bigtream. V4.0.0
{@link INERtcEngineEx#sendSEIMsg:streamChannelType:} Sends SEI messages. You can use the bigstream or substream to send SEI messages by calling this method. V4.0.0

Event Description Supported version
{@link NERtcEngineVideoSEIObserver#onNERtcEngineRecvSEIMsg:message:} Occurs when the message that contains the SEI of the remote stream. V4.0.0

Media stream relay across rooms

Method Description Supported version
{@link INERtcEngineEx#startChannelMediaRelay:} Starts to relay media streams across rooms. V4.2.1
{@link INERtcEngineEx#updateChannelMediaRelay:} Updates the information about the destination room to which the media stream is relayed. V4.2.1
{@link INERtcEngineEx#stopChannelMediaRelay} Stops media stream relay across rooms. V4.2.1

Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineChannelMediaRelayStateDidChange:channelName:} Occurs when the status of media stream relay changes. V4.2.1
{@link NERtcEngineDelegateEx#onNERtcEngineDidReceiveChannelMediaRelayEvent:channelName:error:} Occurs when events related to media stream relay are triggered. V4.2.1

Volume reminder

Method Description Supported version
{@link INERtcEngineEx#enableAudioVolumeIndication:interval:} Enables volume indication for the current speaker. V3.5.0
{@link INERtcEngineEx#enableAudioVolumeIndication:interval:vad:} Enables volume indication for the current speaker and voice detection. V4.6.10

Event Description Supported version
{@link NERtcEngineDelegateEx#onRemoteAudioVolumeIndication: totalVolume:} Occurs when the system indicates the active speaker and the audio volume. V3.5.0
{@link NERtcEngineDelegateEx#onLocalAudioVolumeIndication:} Occurs when the system indicates current local audio volume in the room. V3.5.0
{@link NERtcEngineDelegateEx#onLocalAudioVolumeIndication:withVad:} Occurs when the system indicates current local audio volume in the room and detects voice activities. V4.6.10

In-ears monitoring

Method Description Supported version
{@link INERtcEngineEx#enableEarback:volume:} enables the in-ear monitoring feature. V3.5.0
{@link INERtcEngineEx#setEarbackVolume:} Sets the volume for in-ear monitoring. V3.5.0

Audio playback routing

Method Description Supported version
{@link INERtcEngineEx#setLoudspeakerMode:} Enables or disables speakerphone playback. V3.5.0
{@link INERtcEngineEx#getLoudspeakerMode:} Gets the status of the speakerphone. V3.5.0

Event Description Supported version
{@link NERtcEngineAudioSessionObserver#onNERtcEngineAudioDeviceRoutingDidChange:} Occurs when the audio route changes. V3.6.0

Video dual stream mode

Method Description Supported version
{@link INERtcEngineEx#enableDualStreamMode:} Enables or disables the video dual stream mode. V3.5.0

Audio and video stream fallback

Method Description Supported version
{@link INERtcEngineEx#setLocalPublishFallbackOption:} Sets the fallback option for the published local video stream for unreliable network conditions. V4.3.0
{@link INERtcEngineEx#setRemoteSubscribeFallbackOption:} Sets the fallback option for the subscribed remote audio and video stream for unreliable network conditions. V4.3.0
{@link INERtcEngineEx#setLocalMediaPriority:preemptive:} Sets the priority of local media streams. V4.2.0

Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineLocalPublishFallbackToAudioOnly:streamType:} Occurs when the published local media stream falls back to an audio-only stream or switches back to an audio and video stream. V4.3.0
{@link NERtcEngineDelegateEx#onNERtcEngineRemoteSubscribeFallbackToAudioOnly:isFallback:streamType:} Occurs when the subscribed remote media stream falls back to an audio-only stream or switches back to an audio and video stream. V4.3.0

External audio source capture and rendering

Method Description Supported version
{@link INERtcEngineEx#setExternalAudioSource:sampleRate:channels:} Enables external source for the audio mainstream and sets the capture parameters. V3.9.0
{@link INERtcEngineEx#setExternalSubStreamAudioSource:sampleRate:channels:} Enables external source for the audio substream and sets the capture parameters. V4.6.10
{@link INERtcEngineEx#pushExternalAudioFrame:} Pushs the audio frame data captured from the external audio source to the internal audio engine. V3.9.0
{@link INERtcEngineEx#pushExternalSubStreamAudioFrame:} Pushes the audio substream data captured from the external audio source to the internal audio engine. V4.6.10
{@link INERtcEngineEx#setExternalAudioRender:sampleRate:channels:} Enables or disables the external audio rendering. V3.9.0
{@link INERtcEngineEx#pullExternalAudioFrame:length:} Pulls the audio frame data captured from the external audio source. V3.9.0
{@link INERtcEngineEx#setStreamAlignmentProperty:} Syncs the local system time with the server time. V4.6.10
{@link INERtcEngineEx#getNtpTimeOffset} Gets the difference between the local system time and the server time. V4.6.10

External video source capture

Method Description Supported version
{@link INERtcEngineEx#setExternalVideoSource:isScreen:} Configure external video source. V3.5.0
{@link INERtcEngineEx#pushExternalVideoFrame:} Pushes the external video frame data captured from the external video source. V3.5.0

Raw audio data

Method Description Supported version
{@link INERtcEngineEx#setRecordingAudioFrameParameters:} Sets the audio recording format. V3.5.0
{@link INERtcEngineEx#setPlaybackAudioFrameParameters:} Sets the audio playback format. V3.5.0
{@link INERtcEngineEx#setAudioFrameObserver:} Registers the audio frame observer. V3.5.0
{@link INERtcEngineEx#setMixedAudioFrameParameters:} Sets the sample rate of the mixed stream after the audio is captured and playback. You must call this method before you join a room. V3.5.0
Event Description Supported version
{@link NERtcEngineAudioFrameObserver#onNERtcEngineAudioFrameDidRecord:} Retrieves the audio data captured. V3.5.0
{@link NERtcEngineAudioFrameObserver#onNERtcEngineAudioFrameWillPlayback:} Retrieves the audio playback data. V3.5.0
{@link NERtcEngineAudioFrameObserver#onNERtcEngineMixedAudioFrame:} Retrieves the mixed recorded and playback audio frame. V3.5.0
{@link NERtcEngineAudioFrameObserver#onNERtcEnginePlaybackAudioFrameBeforeMixingWithUserID:frame:} Returns the raw audio frames of a remote user.
To be deprecated. User {@link NERtcEngineAudioFrameObserver#onNERtcEnginePlaybackAudioFrameBeforeMixingWithUserID:frame:channelId:}.
V3.5.0
{@link NERtcEngineAudioFrameObserver#onNERtcEnginePlaybackAudioFrameBeforeMixingWithUserID:frame:channelId:} Returns the raw audio frames of a remote user. V4.5.0

Raw video data

Event Description Supported version
{@link NERtcEngineVideoFrameObserver#onNERtcEngineVideoFrameCaptured:rotation:} Retrieves the video data captured. V3.5.0

Screenshots

Method Description Supported version
{@link INERtcEngineEx#takeLocalSnapshot:callback:} Takes a local video snapshot. V4.2.0
{@link INERtcEngineEx#takeRemoteSnapshot:forUserID:callback:} Takes a snapshot of a remote video screen. V4.2.0
Event Description Supported version
{@link INERtcEngine#NERtcTakeSnapshotCallback} Returns the screenshot result. V4.2.0

Watermark

Method Description Supported version
{@link INERtcEngineEx#setLocalVideoWatermarkConfigs:withStreamType:} Adds a watermark to the local video. V4.6.10

Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineLocalVideoWatermarkStateWithStreamType:state:} Returns the watermark result. V4.6.10

Encryption

Method Description Supported version
{@link INERtcEngineEx#enableEncryption:config:} Enables or disables media stream encryption. V4.4.0

Client audio recording

Method Description Supported version
{@link INERtcEngineEx#startAudioRecording:sampleRate:quality:} Starts an audio recording on a client. V4.2.0
{@link INERtcEngineEx#startAudioRecordingWithConfig:} Starts an audio recording on a client. V4.6.0
{@link INERtcEngineEx#stopAudioRecording} Stops an audio recording on the client. V4.2.0
Event Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineAudioRecording:filePath:} Returns the audio recording status. V4.2.0

Cloud prox

Method Description Supported version
{@link INERtcEngineEx#setCloudProxy:} Enables and sets the cloud proxy service. V4.6.0

Device management

Method Description Supported version
{@link INERtcEngine#switchCamera} Switches between front and rear cameras. V3.5.0
{@link INERtcEngineEx#switchCameraWithPosition:} Specifies the front or rear camera. V4.6.10
{@link INERtcEngineEx#isCameraTorchSupported} Checks whether the camera flash is supported. V3.5.0
{@link INERtcEngineEx#setCameraZoomFactor:} Sets the camera zoom ratio. V3.5.0
{@link INERtcEngineEx#setCameraFocusPositionX: Y:} Sets the current camera focus position V3.5.0
{@link INERtcEngineEx#setCameraTorchOn:} Sets the camera flash function. V3.5.0
{@link INERtcEngineEx#isCameraTorchOn} Check whether the camera flash is on. V3.5.0
{@link INERtcEngineEx#maxCameraZoomScale} Gets the maximum zoom ratio supported by the camera. V3.5.0
{@link INERtcEngineEx#isCameraZoomSupported} Checks whether the camera zoom function is supported. V3.5.0
{@link INERtcEngineEx#isCameraFocusSupported} Checks whether the camera manual focus function is supported. V3.5.0
{@link INERtcEngineEx#isCameraExposurePositionSupported} Checks whether the camera exposure function is supported. V3.5.0
{@link INERtcEngineEx#setCameraExposurePosition:} Sets the camera manual exposure position. V3.5.0
{@link INERtcEngineEx#setPlayoutDeviceMute:} Mutes or unmutes the audio playback device. V3.5.0
{@link INERtcEngineEx#getPlayoutDeviceMute:} Gets whether the audio playback device is muted. V3.5.0
{@link INERtcEngineEx#setRecordDeviceMute:} Sets the status of the recording device V3.5.0
{@link INERtcEngineEx#getRecordDeviceMute:} Gets whether the audio capture device is muted. V3.5.0
Method Description Supported version
{@link NERtcEngineDelegateEx#onNERtcEngineAudioDeviceStateChangeWithDeviceID:deviceType:deviceState:} Occurs when the status of the audio playback device changes. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineVideoDeviceStateChangeWithDeviceID:deviceType:deviceState:} Occurs when video devices change V3.5.0
{@link NERtcEngineDelegateEx#onNERtcEngineHardwareResourceReleased:} Occurs when the hardware resources are released. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcCameraFocusChanged:} Occurs when the camera focus position changes. V3.5.0
{@link NERtcEngineDelegateEx#onNERtcCameraExposureChanged:} Occurs when the camera exposure position changes. V3.5.0

Troubleshooting

Method Description Supported version
{@link INERtcEngineEx#uploadSdkInfo} Uploads the log records collected by the SDK. V3.5.0
{@link INERtcEngineEx#startAudioDump} Starts recording an audio dump file. V3.5.0
{@link INERtcEngineEx#stopAudioDump} Stops recording an audio dump file. V3.5.0
{@link INERtcEngineEx#startAudioDumpWithType:} Start creating an audio dump file V4.6.0
Event Description Supported version
{@link NERtcEngineDelegate#onNERtcEngineDidError:} Occurs when a runtime error occurred in the engine and manual troubleshooting is required. V3.5.0
{@link NERtcEngineDelegate#onNERtcEngineDidWarning:msg:} Occurs when a warnning occurs. V4.3.0
*/