=============== LIBRARY RULES =============== From library maintainers: - NERTC SDK supports 14+ platforms including Android, iOS, Web, Windows, macOS, Linux, Unity, Unreal Engine, Flutter, Electron, HarmonyOS, and more - Each platform has its own integration guide under guides/[Platform]/ directory - Always check the platform-specific Quick Start guide first: guides/[Platform]/快速开始/ - SDK supports both audio-only and audio-video modes - check integration requirements for each - AI features (noise reduction, super resolution, virtual background) require specific SDK versions and may have platform limitations - For production use, always implement proper error handling and connection state management - Refer to platform-specific Best Practices section for optimization recommendations - Cross-platform features may have different API names - check platform-specific documentation - When implementing custom audio/video capture, ensure proper device permission handling - For multi-room scenarios, check if the platform supports the multi-room management feature ### Start Audio Recording (With Configuration) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Starts audio recording using a detailed configuration object. ```java abstract int startAudioRecordingWithConfig(NERtcAudioRecordingConfiguration audioRecordConfig); ``` -------------------------------- ### Start Audio Recording (filePath, sampleRate, quality) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Starts an audio recording from a client, mixing audio from all room members and storing the recording file locally. The `onAudioRecording()` callback is triggered when the recording starts or ends. ```APIDOC ## POST /startAudioRecording ### Description Starts an audio recording from a client, capturing the mixed audio from all room members and saving it to a local file. The `onAudioRecording()` callback is triggered upon starting or ending the recording. Different audio qualities can be specified, affecting file format and size (WAV for high quality, AAC for low quality). ### Method POST ### Endpoint /startAudioRecording ### Parameters #### Request Body - **filePath** (string) - Required - The path where the recording file will be stored, including the file name and format (e.g., "sdcard/xxx/audio.aac"). Supported formats are WAV or AAC. The path must be valid and have write permissions. - **sampleRate** (int) - Optional - The recording sample rate. Valid values: 16000, 32000, 44100, and 48000. Defaults to 32000. - **quality** (NERtcAudioRecordingQuality) - Optional - The audio quality. This parameter is only valid if the recording file is in AAC format. See `NERtcAudioRecordingQuality` enum for details. ### Request Example ```json { "filePath": "/sdcard/recording.aac", "sampleRate": 44100, "quality": "NERtcAudioRecordingQualityMedium" } ``` ### Response #### Success Response (200) - **code** (int) - The return code. 0 indicates success. #### Response Example ```json { "code": 0 } ``` ``` -------------------------------- ### Setup Engine with Context (Objective-C) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/interface_n_e_rtc_engine-members.html Initializes the NERtc engine with the provided context. This is a fundamental step for starting any communication session. It requires a valid context object. ```objectivec @interface NERtcEngine () - (void)setupEngineWithContext:(id)context; @end ``` -------------------------------- ### NERtcBeauty - Start Beauty Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/interface_n_e_rtc_beauty-members.html Initializes and starts the beauty enhancement module. ```APIDOC ## POST /api/beauty/start ### Description Initializes and starts the beauty enhancement processing. ### Method POST ### Endpoint /api/beauty/start ``` -------------------------------- ### Start Audio Recording (Basic) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Starts recording audio to a file with specified sample rate and quality. ```java abstract int startAudioRecording(String filePath, int sampleRate, int quality); ``` -------------------------------- ### Engine Initialization and Setup Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/functions_func_s.html Methods related to the initialization and setup of the NERTC engine. ```APIDOC ## POST /api/engine/setup ### Description Sets up the NERTC engine with the provided context. ### Method POST ### Endpoint /api/engine/setup ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (object) - Required - The context for setting up the engine. ### Request Example ```json { "context": { "appKey": "your_app_key" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ## POST /api/engine/shared ### Description Retrieves the shared instance of the NERtcEngine. ### Method POST ### Endpoint /api/engine/shared ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **engineInstance** (object) - The shared NERtcEngine instance. #### Response Example ```json { "engineInstance": "" } ``` ``` -------------------------------- ### Audio and Video Setup Methods Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/zh/html/functions_func_s.html Methods for setting up and configuring audio and video streams, including local and remote canvas setup, and stream alignment. ```APIDOC ## Setup Local Video Canvas ### Description Sets up the canvas for the local video stream. ### Method Various (depends on implementation, likely a method call within IRtcChannel or IRtcEngineEx) ### Endpoint N/A (method call) ### Parameters * **canvas** (object) - Required - The canvas object to configure. ### Request Example ```json { "canvas": { "view": "" } } ``` ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example ```json { "result": 0 } ``` ## Setup Remote Video Canvas ### Description Sets up the canvas for a remote video stream. ### Method Various (depends on implementation, likely a method call within IRtcChannel or IRtcEngineEx) ### Endpoint N/A (method call) ### Parameters * **uid** (string) - Required - The user ID of the remote user. * **canvas** (object) - Required - The canvas object to configure. ### Request Example ```json { "uid": "remote_user_123", "canvas": { "view": "" } } ``` ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example ```json { "result": 0 } ``` ``` -------------------------------- ### Start Audio Mixing Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Starts to play or mix the music file. ```APIDOC ## POST /audio/mixing/start ### Description Starts to play or mix the music file. ### Method POST ### Endpoint /audio/mixing/start ### Parameters #### Path Parameters None #### Query Parameters - **filePath** (string) - Required - The path to the music file. - **option** (object) - Optional - Options for audio mixing. - **loopCount** (int) - Number of loops. - **cycle** (int) - Cycle time. - **startPos** (int) - Start position in milliseconds. ### Request Body None ### Request Example None ### Response #### Success Response (200) - **code** (int) - Indicates success or failure. #### Response Example ```json { "code": 0 } ``` ``` -------------------------------- ### User Video Start Callback (NERtcCallbackEx) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/interfacecom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_callback_ex-members.html Callback invoked when a user starts their video stream. ```APIDOC ## onUserVideoStart (NERtcCallbackEx) ### Description Callback invoked when a user starts their video stream. ### Method Callback ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### User Video Start Callback (NERtcCallback) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/interfacecom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_callback_ex-members.html Callback invoked when a user starts their video stream. ```APIDOC ## onUserVideoStart (NERtcCallback) ### Description Callback invoked when a user starts their video stream. ### Method Callback ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Start Beauty Effect Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Starts applying beauty effects using a specified file path, likely for preset configurations. Returns an integer status code. ```cpp virtual int startBeauty(const char *file_path)=0; ``` -------------------------------- ### Start Audio Recording with Configuration in NERtc Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/zh/html/classnertc_1_1_i_rtc_engine_ex-members.html Starts audio recording using a predefined configuration object. This provides more detailed control over the recording process. ```cpp virtual int startAudioRecordingWithConfig(const NERtcAudioRecordingConfiguration& config) = 0; ``` -------------------------------- ### switchCamera() Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Switches between the front and rear cameras. This method should be called after the camera has started, for example, after calling startVideoPreview or joinChannel. ```APIDOC ## POST /switchCamera ### Description Switches between the front and rear cameras. ### Method POST ### Endpoint /switchCamera ### Parameters #### Query Parameters - None #### Request Body - None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **result** (int) - 0 indicates success, otherwise failure. #### Response Example ```json { "result": 0 } ``` ``` -------------------------------- ### setupEngineWithContext: Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/protocol_i_n_e_rtc_engine_ex-p-members.html Sets up the engine with context. ```APIDOC ## setupEngineWithContext: ### Description Sets up the engine with context. ### Method N/A ### Endpoint setupEngineWithContext: ### Parameters #### Path Parameters - **context** (NERtcEngineContext) - Required - The engine context. ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Start Audio Mixing with Option Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Starts to play or mix a specified local or online audio file with the audio stream captured from the recording device. ```APIDOC ## POST /startAudioMixingWithOption ### Description Starts to play or mix the specified local or online audio file with the audio stream captured from the recording device. Supports various audio formats and local storage or URLs. The `onAudioMixingStateChanged` callback is triggered on the local client when the playback status changes. ### Method POST ### Endpoint /startAudioMixingWithOption ### Parameters #### Request Body - **option** (NERtcCreateAudioMixingOption) - Required - The options for configuring an audio mixing task, including the type of task, the full path of the audio file, or a URL. ### Request Example ```json { "option": { "filePath": "/path/to/audio.mp3", "loop": true, "volume": 0.8 } } ``` ### Response #### Success Response (200) - **code** (int) - The return code. 0 indicates success. #### Response Example ```json { "code": 0 } ``` ``` -------------------------------- ### Get Camera Max Zoom Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Retrieves the maximum zoom ratio supported by the camera. Ensure the camera is started before calling this method. ```APIDOC ## GET /getCameraMaxZoom ### Description Gets the maximum zoom ratio supported by the camera. Make sure that you call this method after the camera starts. For example, calling startVideoPreview or joinChannel. ### Method GET ### Endpoint /getCameraMaxZoom ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **maxZoomRatio** (int) - The maximum zoom ratio supported by the camera is returned. #### Response Example ```json { "maxZoomRatio": 5 } ``` ``` -------------------------------- ### Start Screen Capture (Java) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1channel_1_1_n_e_rtc_channel.html Initiates screen capture with specified configuration, media projection data, and a callback for projection events. Requires NERtcScreenConfig, Intent, and MediaProjection.Callback. ```java abstract void startScreenCapture(NERtcScreenConfig screenConfig, Intent mediaProjectionPermissionResultData, MediaProjection.Callback mediaProjectionCallback); ``` -------------------------------- ### Play Streaming Management Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html APIs for managing play streaming functionalities, including setup, start, stop, pause, resume, mute, and seek. ```APIDOC ## POST /streaming/setupPlayStreamingCanvas ### Description Sets up the video render for a specific play streaming session. ### Method POST ### Endpoint /streaming/setupPlayStreamingCanvas ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. - **render** (IVideoRender) - Required - The video render interface. ### Request Example ```json { "streamId": "stream123", "render": "" } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/startPlayStreaming ### Description Starts playing a streaming session with the specified configuration. ### Method POST ### Endpoint /streaming/startPlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. #### Request Body - **config** (NERtcPlayStreamingConfig) - Required - The configuration for play streaming. ### Request Example ```json { "streamId": "stream123", "config": { "url": "http://example.com/stream.m3u8" } } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/stopPlayStreaming ### Description Stops a play streaming session. ### Method POST ### Endpoint /streaming/stopPlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. ### Request Example ```json { "streamId": "stream123" } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/pausePlayStreaming ### Description Pauses a play streaming session. ### Method POST ### Endpoint /streaming/pausePlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. ### Request Example ```json { "streamId": "stream123" } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/resumePlayStreaming ### Description Resumes a paused play streaming session. ### Method POST ### Endpoint /streaming/resumePlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. ### Request Example ```json { "streamId": "stream123" } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/muteVideoForPlayStreaming ### Description Mutes or unmutes the video for a play streaming session. ### Method POST ### Endpoint /streaming/muteVideoForPlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. - **mute** (boolean) - Required - Whether to mute the video. ### Request Example ```json { "streamId": "stream123", "mute": true } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/muteAudioForPlayStreaming ### Description Mutes or unmutes the audio for a play streaming session. ### Method POST ### Endpoint /streaming/muteAudioForPlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. - **mute** (boolean) - Required - Whether to mute the audio. ### Request Example ```json { "streamId": "stream123", "mute": false } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ## POST /streaming/seekPlayStreaming ### Description Seeks to a specific position in a play streaming session. ### Method POST ### Endpoint /streaming/seekPlayStreaming ### Parameters #### Query Parameters - **streamId** (String) - Required - The ID of the play streaming session. - **positionMs** (long) - Required - The position in milliseconds to seek to. ### Request Example ```json { "streamId": "stream123", "positionMs": 5000 } ``` ### Response #### Success Response (200) - **result** (int) - Indicates the success or failure of the operation. #### Response Example ```json { "result": 0 } ``` ``` -------------------------------- ### startPreviewWithConfiguration Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/interface_n_e_rtc_engine-members.html Starts the video preview with a specific configuration. ```APIDOC ## START PREVIEW WITH CONFIGURATION ### Description Starts the video preview with a specific configuration. ### Method [Method details not provided in the source text] ### Endpoint [Endpoint details not provided in the source text] ### Parameters #### Path Parameters - **None provided** #### Query Parameters - **None provided** #### Request Body - **None provided** ### Request Example ```json { "example": "request body not provided" } ``` ### Response #### Success Response (200) - **None provided** #### Response Example ```json { "example": "response body not provided" } ``` ``` -------------------------------- ### Get Maximum Camera Zoom Scale Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Retrieves the maximum zoom ratio supported by the camera. Ensure the camera is started before calling. The audio-only SDK disables this API. ```objectivec - (float) maxCameraZoomScale; ``` -------------------------------- ### startAudioRecordingWithConfig Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/interface_n_e_rtc_engine-members.html Starts audio recording with a configuration object. ```APIDOC ## START AUDIO RECORDING WITH CONFIG ### Description Starts audio recording with a configuration object. ### Method [Method details not provided in the source text] ### Endpoint [Endpoint details not provided in the source text] ### Parameters #### Path Parameters - **None provided** #### Query Parameters - **None provided** #### Request Body - **None provided** ### Request Example ```json { "example": "request body not provided" } ``` ### Response #### Success Response (200) - **None provided** #### Response Example ```json { "example": "response body not provided" } ``` ``` -------------------------------- ### Switch Camera (Objective-C) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine-p.html Switches between the front and rear cameras. This method should be called after the camera starts, for example, after calling startPreview or joinChannel. The audio-only SDK disables this API. ```Objective-C - (int)switchCamera; ``` -------------------------------- ### Music File Playback and Mixing Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/index.html APIs for controlling music file playback, including starting, stopping, pausing, resuming, setting volume levels, and getting playback information. ```APIDOC ## Music File Playback and Mixing ### Description APIs for controlling music file playback, including starting, stopping, pausing, resuming, setting volume levels, and getting playback information. ### `startAudioMixing` #### Description Starts to play a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `stopAudioMixing` #### Description Stops playing a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `pauseAudioMixing` #### Description Pauses playing a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `resumeAudioMixing` #### Description Resumes playing a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `setAudioMixingPlaybackVolume` #### Description Sets the playback volume of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `setAudioMixingSendVolume` #### Description Sets the publishing volume of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `getAudioMixingPlaybackVolume` #### Description Gets the playback volume of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `getAudioMixingSendVolume` #### Description Get the publishing volume of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `getAudioMixingDuration` #### Description Gets the total duration of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `getAudioMixingCurrentPosition` #### Description Sets the playback position of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `setAudioMixingPosition` #### Description Gets the current playback position of a music file. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ``` -------------------------------- ### startAudioRecordingWithConfig Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Starts an audio recording from a client, capturing the mixed audio from all room members and saving it locally. The recording can be saved in WAV (high quality, large size) or AAC (low quality, small size) formats. This method must be called after joining a channel. A client can only run one recording task at a time. If the current user leaves the room, the audio recording stops automatically. ```APIDOC ## POST /startAudioRecordingWithConfig ### Description Starts an audio recording from a client, capturing the mixed audio from all room members and saving it locally. The recording can be saved in WAV (high quality, large size) or AAC (low quality, small size) formats. This method must be called after joining a channel. A client can only run one recording task at a time. If the current user leaves the room, the audio recording stops automatically. ### Method POST ### Endpoint /startAudioRecordingWithConfig ### Parameters #### Request Body - **filePath** (string) - Required - The file path where the recording file is stored. The file name and format are required (e.g., "sdcard/xxx/audio.aac"). Must be a valid path with write permissions. Only WAV or AAC files are supported. - **sampleRate** (integer) - Optional - The recording sample rate. Valid values: 16000, 32000, 44100, and 48000. Defaults to 32000. - **quality** (string) - Optional - The audio quality. This parameter is valid only if the recording file is in AAC format. Refer to `NERtcAudioRecordingQuality` for more details. - **position** (string) - Optional - The recording object. Refer to `NERtcAudioRecordingPosition` for more details. - **cycleTime** (integer) - Optional - The maximum number of seconds for loop caching. Valid values: 0, 10, 60, 360, and 900. Defaults to 0. The write operation runs in real time. ### Request Example ```json { "filePath": "/sdcard/recording.aac", "sampleRate": 44100, "quality": "high", "cycleTime": 60 } ``` ### Response #### Success Response (200) - **code** (integer) - 0 indicates success. Other values indicate failure. ``` -------------------------------- ### Beauty Effects API Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/index.html APIs for managing and applying beauty effects, including starting, stopping, enabling, disabling, setting, and getting beauty effect parameters. Also includes filter management. ```APIDOC ## Beauty Effects API ### Description APIs for managing and applying beauty effects, including starting, stopping, enabling, disabling, setting, and getting beauty effect parameters. Also includes filter management. ### `stopBeauty` (Windows) #### Description Stops the beauty module. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `stopBeauty` (macOS) #### Description Stops the beauty module. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `enableBeauty` (Windows) #### Description Pauses or resumes beauty effects. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `isOpenBeauty` (macOS) #### Description Pauses or resumes beauty effects. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `setBeautyEffect` (Windows) #### Description Sets a beauty effect. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `setBeautyEffectWithValue:atType:` (macOS) #### Description Sets a beauty effect. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `addTempleteWithPath:andName:` (macOS) #### Description Imports beauty assets or models. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `getBeautyEffect` (Windows) #### Description Gets the intensity setting for the specified beauty type. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `addBeautyFilter` (Windows) #### Description Adds a filter effect. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `addBeautyFilterWithPath:andName:` (macOS) #### Description Adds a filter effect. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `removeBeautyFilter` (Windows) #### Description Removes a filter. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ### `removeBeautyFilter` (macOS) #### Description Removes a filter. #### Method (Implied by context, likely a method call on a beauty object) #### Endpoint N/A (Local method call) ### `setBeautyFilterLevel` (Windows) #### Description Sets a filter intensity. #### Method (Implied by context, likely a method call on an engine object) #### Endpoint N/A (Local method call) ``` -------------------------------- ### Start Audio Recording - NERtcEx (Java) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Starts recording the mixed audio from all room members and saves it locally. Supports WAV (high quality, large file) and AAC (low quality, small file) formats. Requires a file path, sample rate, and quality setting. Returns 0 on success, non-zero on failure. ```java int startAudioRecording(String filePath, int sampleRate, int quality); ``` -------------------------------- ### Check Camera Exposure Support Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Checks if the camera exposure feature is supported on the device. This method should be called after the camera has started, for example, after calling startPreview or joinChannel. The audio-only SDK disables this API. ```objectivec - (BOOL) isCameraExposureSupported; ``` -------------------------------- ### Initialize and Control NERtcBeauty Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/nertc__beauty_8h_source.html Provides methods to get the singleton instance of NERtcBeauty, start, and stop the beauty processing. It's essential for initializing and managing the beauty effects session. ```objectivec @interface NERtcBeauty : NSObject + (instancetype)shareInstance; - (int)startBeauty; - (void)stopBeauty; @end ``` -------------------------------- ### NERTC Invalid State Error Codes Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/UE/doxygen/Latest/zh/html/namespacenertc.html These error codes indicate that an operation was attempted when the NERTC engine or a related component was not in the appropriate state. For example, trying to stop a stream that hasn't been started. ```text kNERtcErrInvalidState = 30005 kNERtcErrDevicePreviewAlreadyStarted = 30013 kNERtcErrDesktopCaptureInvalidState = 30020 kNERtcErrChannelAlreadyJoined = 30100 kNERtcErrChannelNotJoined = 30101 kNERtcErrSwitchChannelInvalidState = 30109 kNERtcErrChannelMediaRelayInvalidState = 30110 ``` -------------------------------- ### Start Audio Recording with Configuration Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_engine_ex-p.html Starts an audio recording from a client using a detailed configuration object. This method records mixed audio from all room members and saves it locally, triggering the `onAudioRecording()` callback. ```APIDOC ## POST /startAudioRecordingWithConfig ### Description Starts an audio recording from a client using a configuration object (`NERtcAudioRecordingConfiguration`). This method records the mixed audio from all room members and stores the recording file locally. The `onAudioRecording()` callback is triggered when the recording starts or ends. Supports different audio qualities, resulting in WAV (large, high quality) or AAC (small, low quality) files. ### Method POST ### Endpoint /startAudioRecordingWithConfig ### Parameters #### Request Body - **config** (NERtcAudioRecordingConfiguration) - Required - The configuration object for the audio recording task, specifying details like file path, sample rate, and audio quality. ### Request Example ```json { "config": { "filePath": "/data/local/tmp/recording.wav", "sampleRate": 48000, "quality": "NERtcAudioRecordingQualityHigh", "captureNeatLog": false } } ``` ### Response #### Success Response (200) - **code** (int) - The return code. 0 indicates success. #### Response Example ```json { "code": 0 } ``` ``` -------------------------------- ### Manage Audio Mixing and Effects (C++) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/linux/doxygen/Latest/zh/html/classnertc_1_1_i_rtc_engine_ex.html Control audio mixing and sound effects. This includes starting, stopping, pausing, and resuming audio mixing and individual sound effects, as well as setting and getting their playback and send volumes and pitch. ```cpp virtual int startAudioMixing(NERtcCreateAudioMixingOption *option) = 0; virtual int stopAudioMixing() = 0; virtual int pauseAudioMixing() = 0; virtual int resumeAudioMixing() = 0; virtual int setAudioMixingSendVolume(uint32_t volume) = 0; virtual int getAudioMixingSendVolume(uint32_t *volume) = 0; virtual int setAudioMixingPlaybackVolume(uint32_t volume) = 0; virtual int getAudioMixingPlaybackVolume(uint32_t *volume) = 0; virtual int getAudioMixingDuration(uint64_t *duration) = 0; virtual int getAudioMixingCurrentPosition(uint64_t *position) = 0; virtual int setAudioMixingPosition(uint64_t seek_position) = 0; virtual int setAudioMixingPitch(int32_t pitch) = 0; virtual int getAudioMixingPitch(int32_t *pitch) = 0; virtual int playEffect(uint32_t effect_id, NERtcCreateAudioEffectOption *option) = 0; virtual int stopEffect(uint32_t effect_id) = 0; virtual int stopAllEffects() = 0; virtual int pauseEffect(uint32_t effect_id) = 0; virtual int resumeEffect(uint32_t effect_id) = 0; virtual int pauseAllEffects() = 0; virtual int resumeAllEffects() = 0; virtual int setEffectSendVolume(uint32_t effect_id, uint32_t volume) = 0; virtual int getEffectSendVolume(uint32_t effect_id, uint32_t *volume) = 0; virtual int setEffectPlaybackVolume(uint32_t effect_id, uint32_t volume) = 0; virtual int getEffectPlaybackVolume(uint32_t effect_id, uint32_t *volume) = 0; virtual int setEffectPitch(uint32_t effect_id, int32_t pitch) = 0; virtual int getEffectPitch(uint32_t effect_id, int32_t *pitch) = 0; ``` -------------------------------- ### Start Screen Capture - C++ Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex-members.html Initiates screen capture using different methods: by display ID, screen rectangle, or window ID. Requires specific parameters for region and capture settings. ```cpp virtual int startScreenCaptureByDisplayId(unsigned int display_id, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params) = 0; virtual int startScreenCaptureByScreenRect(const NERtcRectangle &screen_rect, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params) = 0; virtual int startScreenCaptureByWindowId(source_id_t window_id, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params) = 0; ``` -------------------------------- ### Start Channel Media Relay Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1channel_1_1_n_e_rtc_channel.html Initiates relaying media streams across rooms, allowing co-hosting and receiving relayed streams from up to four rooms. This method triggers callbacks for status and events. It's applicable to hosts in live streaming and requires prior setup of destination rooms. To re-initiate relaying, stop the current relay first. ```java abstract int com.netease.lava.nertc.sdk.channel.NERtcChannel.startChannelMediaRelay( NERtcMediaRelayParam.ChannelMediaRelayConfiguration _config_ ) ``` -------------------------------- ### Engine Initialization and Instance Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/unity/doxygen/Latest/zh/html/classnertc_1_1_i_rtc_engine-members.html APIs for getting the engine instance and initializing the SDK. ```APIDOC ## GET /GetInstance ### Description Retrieves the singleton instance of the RTC engine. ### Method GET ### Endpoint /GetInstance ### Response #### Success Response (200) - **rtcEngine** (IRtcEngine) - The RTC engine instance. #### Response Example ```json { "rtcEngine": "[Instance object reference]" } ``` ## POST /Initialize ### Description Initializes the RTC engine with the provided context. ### Method POST ### Endpoint /Initialize ### Parameters #### Request Body - **param** (RtcEngineContext) - Required - The context parameters for initialization. ### Request Example ```json { "param": { "appId": "YOUR_APP_ID", "appKey": "YOUR_APP_KEY" } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the initialization was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Check Virtual Sound Card Installation (C++) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Checks if the NetEase virtual sound card is installed and is the latest version on a Mac system. If not installed and the NERTCPrivilegedTask library is integrated, it will prompt the user to install the virtual sound card. ```cpp /** * @brief Checks if the virtual sound card is installed successfully (Mac only). * * This method detects if the computer has the latest version of the virtual sound card installed. * If not installed, and NERTCPrivilegedTask is integrated, it will trigger the installation dialog. * * @return 0 if the virtual sound card is not installed or not the latest version. * 1 if the latest version of the virtual sound card is installed. */ virtual int checkNECastAudioDriver() = 0; ``` -------------------------------- ### Engine Setup Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/functions_s.html Methods for setting up the NERtc engine with context. ```APIDOC ## setUpEngineWithContext ### Description Initializes the NERtc engine with the provided context. ### Method (Method not specified in source, assumed to be part of INERtcLinkEngine) ### Endpoint N/A ### Parameters - **context** (type) - Required/Optional - The context object for engine setup. ### Request Example N/A ### Response #### Success Response (200) (Response details not specified in source) #### Response Example N/A ## setupEngineWithContext ### Description Sets up the NERtc engine with the provided context. ### Method (Method not specified in source, assumed to be part of INERtcEngine) ### Endpoint N/A ### Parameters - **context** (type) - Required/Optional - The context object for engine setup. ### Request Example N/A ### Response #### Success Response (200) (Response details not specified in source) #### Response Example N/A ``` -------------------------------- ### Audio Mixing Control (Objective-C) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/_i_n_e_rtc_engine_ex_8h_source.html Provides methods for controlling audio mixing, including starting, stopping, pausing, resuming, setting volume, and retrieving playback information. Options for creating audio mixing are passed via NERtcCreateAudioMixingOption. It allows setting and getting the send and playback volumes, duration, and current position of the audio mix. ```Objective-C - (int)startAudioMixingWithOption:([NERtcCreateAudioMixingOption](interface_n_e_rtc_create_audio_mixing_option.html) *)option; - (int)stopAudioMixing; - (int)pauseAudioMixing; - (int)resumeAudioMixing; - (int)setAudioMixingSendVolume:(uint32_t)volume; - (int)getAudioMixingSendVolume:(uint32_t *)volume; - (int)setAudioMixingPlaybackVolume:(uint32_t)volume; - (int)getAudioMixingPlaybackVolume:(uint32_t *)volume; - (int)getAudioMixingDuration:(uint64_t *)duration; - (int)getAudioMixingCurrentPosition:(uint64_t *)position; - (int)setAudioMixingPosition:(uint64_t)position; - (int)setAudioMixingPitch:(int32_t)pitch; - (int)getAudioMixingPitch:(int32_t *)pitch; ``` -------------------------------- ### startAudioMixingWithOption Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/interface_n_e_rtc_engine-members.html Starts audio mixing with specified options. ```APIDOC ## START AUDIO MIXING WITH OPTION ### Description Starts audio mixing with specified options. ### Method [Method details not provided in the source text] ### Endpoint [Endpoint details not provided in the source text] ### Parameters #### Path Parameters - **None provided** #### Query Parameters - **None provided** #### Request Body - **None provided** ### Request Example ```json { "example": "request body not provided" } ``` ### Response #### Success Response (200) - **None provided** #### Response Example ```json { "example": "response body not provided" } ``` ``` -------------------------------- ### C++ Audio Device Management Interface Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/wwise/doxygen/Latest/zh/Unreal/html/_i_audio_device_manager_8h_source.html Defines the interface for managing audio recording devices within the NERtc Wwise plugin for Unreal Engine. It includes methods to enumerate, set, get, and control the volume and mute status of recording devices, as well as start and stop device tests. This interface relies on NertcBase.h and IDeviceCollection.h. ```cpp #ifndef IAudioDeviceManager_h #define IAudioDeviceManager_h #include "NertcBase.h" #include "IDeviceCollection.h" namespace nertc { namespace wwiseplugin { class NERTC_PLUGIN_API IAudioDeviceManager { public: virtual ~IAudioDeviceManager() = default; virtual IDeviceCollection* enumerateRecordDevices() = 0; virtual int setRecordDevice(const char deviceId[kWWISEPLUGINMaxDeviceIDLength]) = 0; virtual int getRecordDevice(char deviceId[kWWISEPLUGINMaxDeviceIDLength]) = 0; virtual int setRecordDeviceVolume(uint32_t volume) = 0; virtual int getRecordDeviceVolume(uint32_t* volume) = 0; virtual int setRecordDeviceMute(bool mute) = 0; virtual int getRecordDeviceMute(bool* mute) = 0; virtual int startRecordDeviceTest(uint64_t indicationInterval) = 0; virtual int stopRecordDeviceTest() = 0; virtual int startAudioDeviceLoopbackTest(uint64_t indicationInterval) = 0; }; } } #endif ``` -------------------------------- ### Start Audio Mixing - NERtcEx (Java) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/en/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_n_e_rtc_ex.html Starts playing and mixing a specified audio file (local or online) with the microphone audio stream. Supports MP3, M4A, AAC, 3GP, WMA, and WAV formats. Requires a NERtcCreateAudioMixingOption object. Returns 0 on success, non-zero on failure. ```java int startAudioMixing(NERtcCreateAudioMixingOption option); ``` -------------------------------- ### Start Audio Recording with Configuration Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/windows/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Starts audio recording using a detailed configuration object. This method provides more control over the recording process compared to the basic startAudioRecording function. It returns an integer status code. ```cpp virtual int startAudioRecordingWithConfig(const NERtcAudioRecordingConfiguration &config)=0; ``` -------------------------------- ### startPreview Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/interface_n_e_rtc_engine-members.html Starts the video preview. This is typically used to display the local camera feed. ```APIDOC ## START PREVIEW ### Description Starts the video preview. This is typically used to display the local camera feed. ### Method [Method details not provided in the source text] ### Endpoint [Endpoint details not provided in the source text] ### Parameters #### Path Parameters - **None provided** #### Query Parameters - **None provided** #### Request Body - **None provided** ### Request Example ```json { "example": "request body not provided" } ``` ### Response #### Success Response (200) - **None provided** #### Response Example ```json { "example": "response body not provided" } ``` ``` -------------------------------- ### setupLocalVideoCanvas: Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/protocol_i_n_e_rtc_engine_ex-p-members.html Sets up the local video canvas. ```APIDOC ## setupLocalVideoCanvas: ### Description Sets up the local video canvas. ### Method N/A ### Endpoint setupLocalVideoCanvas: ### Parameters #### Path Parameters - **canvas** (NERtcVideoCanvas) - Required - The video canvas. ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### checkNECastAudioDriver Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Checks if the latest version of the virtual sound card is installed on macOS systems. If not installed, it can trigger a prompt for installation. ```APIDOC ## checkNECastAudioDriver ### Description This method checks whether the computer has the latest version of the virtual sound card installed. This is specifically for Mac systems. If the virtual sound card is not installed or is not the latest version, and the NERTCPrivilegedTask library is integrated, the interface will display a dialog box for the user to install it. ### Method `checkNECastAudioDriver` ### Endpoint This is a client-side SDK method and does not have a traditional API endpoint. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp nertc::IRtcEngineEx* rtcEngine = ...; int result = rtcEngine->checkNECastAudioDriver(); ``` ### Response #### Success Response (Return Value) - **0** (int) - The computer does not have a NetEase virtual sound card installed or the virtual sound card is not the latest version. - **1** (int) - The computer has installed the latest version of the NetEase virtual sound card. #### Response Example ``` // Example return values: int result_not_installed = 0; int result_installed = 1; ``` ``` -------------------------------- ### NERtc SDK: User Data Start Event Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_abs_n_e_rtc_callback_ex-members.html Callback invoked when a user starts sending data streams. It provides the user ID of the user who started sending data. ```Java void onUserDataStart(long uid); ``` -------------------------------- ### NERtc SDK: User Audio Start Event Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1lava_1_1nertc_1_1sdk_1_1_abs_n_e_rtc_callback_ex-members.html Callback invoked when a user starts sending audio streams. It provides the user ID of the user who started sending audio. ```Java void onUserAudioStart(long uid); ``` -------------------------------- ### Local Video Canvas Setup Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/protocol_i_n_e_rtc_channel-p.html Methods for setting up the local video canvas. ```APIDOC ## POST /api/v1/rtc/local/video/canvas/setup ### Description Sets the local view for the video stream. ### Method POST ### Endpoint /api/v1/rtc/local/video/canvas/setup ### Parameters #### Request Body - **canvas** (object) - Required - Configuration for the local video canvas. - **view** (any) - The view element to render the video on. - **renderMode** (string) - The render mode for the video (e.g., "fit", "fill"). ### Request Example ```json { "canvas": { "view": "myLocalVideoViewId", "renderMode": "fit" } } ``` ### Response #### Success Response (200) - **code** (integer) - Success code, usually 0. - **msg** (string) - Success message. #### Response Example ```json { "code": 0, "msg": "Success" } ``` ``` -------------------------------- ### Initialize NERtcEngine Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/flutter/dartdoc/Latest/zh/nertc/NERtcEngine-class-sidebar.html Demonstrates how to create an instance of the NERtcEngine. This is the primary entry point for all NERtc functionalities. It typically requires an app key and potentially other configuration parameters. ```dart final NERtcEngine engine = await NERtcEngine.create(appKey: 'YOUR_APP_KEY'); ``` -------------------------------- ### Check NetEase Virtual Audio Driver Installation (macOS) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/macOS/doxygen/Latest/en/html/classnertc_1_1_i_rtc_engine_ex.html Checks if the NetEase virtual sound card is installed and up-to-date on macOS systems. If not installed or outdated, and the NERTCPrivilegedTask library is integrated, it can trigger a prompt for the user to install the virtual sound card. ```cpp virtual int nertc::IRtcEngineEx::checkNECastAudioDriver() = 0; Returns: 0: The computer does not have a NetEase virtual sound card installed or the virtual sound card is not the latest version 1: The computer has installed the latest version of NetEase virtual sound card ``` -------------------------------- ### Start Audio Dump (Objective-C) Source: https://github.com/mingyuanqi/nertc_doc_source/blob/main/api-reference/iOS/doxygen/Latest/en/html/interface_n_e_rtc_engine-members.html Starts recording the raw audio data. This is useful for debugging and analysis purposes, allowing developers to capture and inspect audio streams. This method is part of the INERtcEngineEx protocol. ```objectivec @interface NERtcEngineEx () - (void)startAudioDump:(NERtcAudioDumpType)type; @end ```