### NECallEngine Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V2.0.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1_n_e_call_engine-members.html Initializes the NECallEngine with the provided context and setup configuration. ```APIDOC ## POST /call/p2p/setup ### Description Initializes the NECallEngine with the provided context and setup configuration. ### Method POST ### Endpoint /call/p2p/setup ### Parameters #### Request Body - **context** (Context) - Required - The application context. - **config** (NESetupConfig) - Required - The configuration object for setting up the call engine. ``` -------------------------------- ### Initialize and Setup NECallEngine Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/Latest/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1_n_e_call_engine-members.html Handles the initialization and setup of the NECallEngine. The `setup` method requires a context and configuration, while `sharedInstance` provides access to the singleton instance of the engine. These are fundamental for starting any call-related operations. ```Java public static NECallEngine sharedInstance() public void setup(Context context, NESetupConfig config) ``` -------------------------------- ### NECall - setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/web/typedoc/Latest/zh/classes/NEGroupCall.html Initializes and configures the NECall SDK. ```APIDOC ## POST /setup ### Description Initializes the NECall SDK with the necessary configuration parameters. This must be called before other NECall methods. ### Method POST ### Endpoint /setup ### Parameters #### Request Body - **config** (object) - Required - Configuration object for the NECall SDK. - **appKey** (string) - Required - Your application's unique key. - **account** (string) - Required - The user account ID. - **token** (string) - Required - The authentication token for the user. - **callerName** (string) - Optional - The display name for the caller. - **logLevel** (string) - Optional - The desired logging level (e.g., 'debug', 'info', 'warn', 'error'). - **onMultiportPush** (function) - Optional - Callback for handling multi-port push notifications. - **onCalled** (function) - Optional - Callback for handling incoming call invitations. - **onNetCallEvent** (function) - Optional - Callback for general network call events. ### Request Example ```json { "config": { "appKey": "your_app_key", "account": "user123", "token": "user_auth_token", "callerName": "John Doe", "logLevel": "info", "onCalled": "function(callInfo) { ... }" } } ``` ### Response None ``` -------------------------------- ### View Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.6.4/zh/html/functions.html Methods for setting up local and remote video views. ```APIDOC ## setupLocalView() ### Description Sets up a view to display the local user's video stream. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java SurfaceView localView = new SurfaceView(context); NERTCVideoCall.setupLocalView(localView); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` ```APIDOC ## setupRemoteView() ### Description Sets up a view to display a remote user's video stream. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java SurfaceView remoteView = new SurfaceView(context); String userId = "remote_user_id"; NERTCVideoCall.setupRemoteView(userId, remoteView); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` -------------------------------- ### Setup application key and options Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.5.4/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1_n_e_r_t_c_video_call-members.html Initializes the NERTCVideoCall service with the application context, app key, and video call options. This is a mandatory setup step before using other functionalities. Requires a Context, String appKey, and VideoCallOptions. ```java public void setupAppKey(Context context, String appKey, VideoCallOptions option) ``` -------------------------------- ### Initialization and View Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.5.4/zh/html/functions_func.html Covers methods for initializing the SDK with an app key and setting up local and remote video views. ```APIDOC ## setupAppKey() ### Description Initializes the NERTC SDK with the provided App Key. ### Method POST (or relevant method based on implementation) ### Endpoint /api/video-call/init/appkey ### Parameters #### Request Body - **appKey** (string) - Required - Your unique Netease Cloud Music App Key. ### Request Example ```json { "appKey": "your_app_key_here" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the initialization was successful. #### Response Example ```json { "success": true } ``` ## setupLocalView() ### Description Configures the view where the local user's video stream will be displayed. ### Method POST (or relevant method based on implementation) ### Endpoint /api/video-call/view/local ### Parameters #### Request Body - **viewId** (string) - Required - The identifier of the view component (e.g., view ID in Android/iOS). ### Request Example ```json { "viewId": "local_video_view" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the view setup was successful. #### Response Example ```json { "success": true } ``` ## setupRemoteView() ### Description Configures the view where a remote user's video stream will be displayed. ### Method POST (or relevant method based on implementation) ### Endpoint /api/video-call/view/remote ### Parameters #### Request Body - **userId** (string) - Required - The unique identifier of the remote user. - **viewId** (string) - Required - The identifier of the view component for the remote user's video. ### Request Example ```json { "userId": "remote_user_123", "viewId": "remote_video_view_123" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the view setup was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### P2P Call Setup Configuration Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.7.0/zh/html/functions_vars.html Details on the setup configuration for Peer-to-Peer (P2P) calls, including framework settings. ```APIDOC ## P2P Call Setup Configuration ### Description Provides details on the setup configuration for P2P calls, including framework-related settings. ### Method N/A (Configuration) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **framework** (NESetupConfig) - Specifies the framework used for the P2P call setup. ``` -------------------------------- ### Setup Call Engine Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.1.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1internal_1_1_n_e_call_engine_impl-members.html Performs the initial setup of the call engine using the application context and a configuration object. This is a fundamental step required before any call can be initiated or received. ```Java NECallEngineImpl.setup(Context context, NESetupConfig config); ``` -------------------------------- ### Configuration and Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.6.4/zh/html/functions.html Methods for enabling features, providing configuration, setting timeouts, and configuring authentication tokens. ```APIDOC ## setEnable() ### Description Enables or disables a specific feature or functionality. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java NERTCVideoCall.setEnable(true); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` ```APIDOC ## setPushConfigProvider() ### Description Sets a provider for push configuration details. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java NERTCVideoCall.setPushConfigProvider(new PushConfigProvider() { // ... implementation ... }); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` ```APIDOC ## setTimeOut() ### Description Sets the timeout duration for certain call operations. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java NERTCVideoCall.setTimeOut(30000); // 30 seconds ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` ```APIDOC ## setTokenService() ### Description Configures the service responsible for obtaining authentication tokens. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java NERTCVideoCall.setTokenService(new TokenService() { @Override public String getToken() { // Logic to get token return "your_auth_token"; } }); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` ```APIDOC ## setupAppKey() ### Description Initializes the SDK with the provided App Key. ### Method [Assumed POST or PUT based on typical API patterns, specific HTTP method not provided in source] ### Endpoint [Not specified in source, likely an internal SDK method] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a method call, not a REST API endpoint) ### Request Example ```java // Example of calling the method in Java NERTCVideoCall.setupAppKey("YOUR_APP_KEY"); ``` ### Response #### Success Response (200) None (This is a method call, not a REST API endpoint) #### Response Example None ``` -------------------------------- ### Initialization and Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/V3.8.0/zh/html/_n_e_rtc_call_kit_8h_source.html Methods for initializing the call kit, setting up application keys, and configuring call options. ```APIDOC ## Initialization and Setup ### Description Methods for initializing the call kit, setting up application keys, and configuring call options. ### Method `sharedInstance` ### Endpoint N/A (Class method) ### Parameters None ### Request Example ```objc NE(NERtcCallKit).sharedInstance ``` ### Response #### Success Response (Instance) - **NE(NERtcCallKit)** - The singleton instance of the NE Call Kit. ### Method `setupAppKey:options:` ### Endpoint N/A (Instance method) ### Parameters - **appKey** (NSString *) - Required - The application key for authentication. - **options** (nullable NERtcCallOptions *) - Optional - Configuration options for the call kit. ### Request Example ```objc [NE(NERtcCallKit).sharedInstance setupAppKey:@"your_app_key" options:nil] ``` ### Response #### Success Response (void) - None ### Method `setupAppKey:withRtcUid:options:` ### Endpoint N/A (Instance method) ### Parameters - **appKey** (NSString *) - Required - The application key for authentication. - **rtcUid** (uint64_t) - Required - The RTC user ID. - **options** (nullable NERtcCallOptions *) - Optional - Configuration options for the call kit. ### Request Example ```objc [NE(NERtcCallKit).sharedInstance setupAppKey:@"your_app_key" withRtcUid:12345 options:nil] ``` ### Response #### Success Response (void) - None ### Method `setupAppKey:options:withContext:` ### Endpoint N/A (Instance method) ### Parameters - **appKey** (NSString *) - Required - The application key for authentication. - **options** (nullable NERtcCallOptions *) - Optional - Configuration options for the call kit. - **context** (nonnull NERtcEngineContext *) - Required - The engine context for setup. ### Request Example ```objc NERtcEngineContext *context = [[NERtcEngineContext alloc] init]; context.appKey = @"your_app_key"; [NE(NERtcCallKit).sharedInstance setupAppKey:@"your_app_key" options:nil withContext:context] ``` ### Response #### Success Response (void) - None ``` -------------------------------- ### Video View Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.8.2/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1impl_1_1_n_e_r_t_c_video_call_impl.html APIs for setting up local and remote video views. ```APIDOC ## POST /api/video/setupRemoteView ### Description Sets up the video view for a remote user. ### Method POST ### Endpoint /api/video/setupRemoteView ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **videoRender** (NERtcVideoView) - Required - The view component to render the remote video. - **userId** (String) - Required - The unique identifier of the remote user. ### Request Example ```json { "videoRender": "", "userId": "remote_user_123" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success. #### Response Example ```json { "status": "success" } ``` ## POST /api/video/setupLocalView ### Description Sets up the video view for the local user. ### Method POST ### Endpoint /api/video/setupLocalView ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **videoRender** (NERtcVideoView) - Required - The view component to render the local video. ### Request Example ```json { "videoRender": "" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Initialize and Setup NERtcCallKit Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/V3.3.0/zh/html/_n_e_rtc_call_kit_8h_source.html Provides methods to initialize the NERtcCallKit with an App Key and optional configurations. It supports different setup overloads including specifying an RTC UID and providing an engine context. ```Objective-C @interface NERtcCallKit : NSObject + (instancetype)sharedInstance; - (void)setupAppKey:(NSString *)appKey options:(nullable NERtcCallOptions *)options; - (void)setupAppKey:(NSString *)appKey withRtcUid:(uint64_t)rtcUid options:(nullable NERtcCallOptions *)options; - (void)setupAppKey:(NSString *)appKey options:(nullable NERtcCallOptions *)options withContext:(nonnull NERtcEngineContext *)context; @end ``` -------------------------------- ### Setup NECall Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/web/typedoc/Latest/zh/classes/NECall.html Initializes and sets up the NECall instance. This is a prerequisite for most other call-related operations. ```typescript setup(config: NECallConfig): Promise ``` -------------------------------- ### View Setup and Controls Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.6.4/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1impl_1_1_n_e_r_t_c_video_call_impl.html Methods for setting up remote and local video views, and muting audio. ```APIDOC ## POST /api/view/remote/setup ### Description Sets up the video view for a remote participant. ### Method POST ### Endpoint /api/view/remote/setup ### Parameters #### Query Parameters - **videoRender** (NERtcVideoView) - Required - The video view component for rendering. - **userId** (String) - Required - The ID of the remote user. #### Request Body ```json { "videoRender": { /* NERtcVideoView details */ }, "userId": "remoteUser123" } ``` ### Response #### Success Response (200) - **message** (String) - Success message. #### Response Example ```json { "message": "Remote video view setup successfully" } ``` ## POST /api/view/local/setup ### Description Sets up the video view for the local participant. ### Method POST ### Endpoint /api/view/local/setup ### Parameters #### Query Parameters - **videoRender** (NERtcVideoView) - Required - The video view component for rendering. #### Request Body ```json { "videoRender": { /* NERtcVideoView details */ } } ``` ### Response #### Success Response (200) - **message** (String) - Success message. #### Response Example ```json { "message": "Local video view setup successfully" } ``` ## POST /api/audio/mute ### Description Mutes or unmutes the audio for a specific user. ### Method POST ### Endpoint /api/audio/mute ### Parameters #### Query Parameters - **mute** (boolean) - Required - True to mute, false to unmute. - **userId** (String) - Required - The ID of the user whose audio is to be controlled. #### Request Body ```json { "mute": true, "userId": "user123" } ``` ### Response #### Success Response (200) - **message** (String) - Success message. #### Response Example ```json { "message": "Audio mute status updated successfully" } ``` ``` -------------------------------- ### Call Setup and Configuration Parameters Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V2.0.0/zh/html/functions_vars.html Parameters and configurations related to setting up and managing P2P calls. ```APIDOC ## Parameters and Models for Call Setup ### NECallParam * **pushConfig** (NECallPushConfig) - Optional - Configuration for push notifications related to the call. * **rtcChannelName** (String) - Required - The name of the RTC channel for the call. ### NECallPushConfig * **pushContent** (String) - Optional - The content of the push notification. * **pushPayload** (String) - Optional - Additional payload data for the push notification. * **pushTitle** (String) - Optional - The title of the push notification. ### NESetupConfig * **rtcCallExtension** (Object) - Optional - Extension fields for RTC call configuration. * **rtcConfig** (Object) - Optional - General RTC configuration settings. ``` -------------------------------- ### NECallEngine Setup and Configuration Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.7.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1_n_e_call_engine-members.html Methods for initializing and configuring the NECallEngine, including setting call parameters and providing context. ```APIDOC ## POST /call/setup ### Description Initializes the NECallEngine with the provided configuration and context. ### Method POST ### Endpoint /call/setup ### Parameters #### Request Body - **context** (Context) - Required - The application context. - **config** (NESetupConfig) - Required - The setup configuration for the call engine. ``` ```APIDOC ## POST /call/config/set ### Description Sets the overall call configuration for the NECallEngine. ### Method POST ### Endpoint /call/config/set ### Parameters #### Request Body - **config** (NECallConfig) - Required - The configuration object for the call. ``` ```APIDOC ## POST /call/record/provider/set ### Description Sets the provider responsible for handling call records. ### Method POST ### Endpoint /call/record/provider/set ### Parameters #### Request Body - **recordProvider** (NERecordProvider) - Required - An instance of the record provider. ``` ```APIDOC ## POST /call/timeout/set ### Description Sets the timeout duration for call-related operations. ### Method POST ### Endpoint /call/timeout/set ### Parameters #### Request Body - **millisecond** (long) - Required - The timeout duration in milliseconds. ``` -------------------------------- ### Call Timing and Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.8.2/zh/html/functions_func.html Methods for setting call timeouts and configuring the application key and video views. ```APIDOC ## setTimeOut ### Description Sets the timeout duration for certain call-related operations. ### Method Not specified (likely a method call within the SDK). ### Endpoint N/A ### Parameters - **timeoutMillis** (long) - Required - The timeout duration in milliseconds. ### Request Example ```java // Example usage within the SDK videoCall.setTimeOut(5000); ``` ### Response None explicitly defined. ``` ```APIDOC ## setupAppKey ### Description Initializes the SDK with the provided application key. ### Method Not specified (likely a method call within the SDK). ### Endpoint N/A ### Parameters - **appKey** (String) - Required - The application key for authentication. ### Request Example ```java // Example usage within the SDK videoCall.setupAppKey("YOUR_APP_KEY"); ``` ### Response None explicitly defined. ``` ```APIDOC ## setupLocalView ### Description Configures the view to display the local video stream. ### Method Not specified (likely a method call within the SDK). ### Endpoint N/A ### Parameters - **view** (View) - Required - The view component to render the local video. ### Request Example ```java // Example usage within the SDK videoCall.setupLocalView(localVideoView); ``` ### Response None explicitly defined. ``` ```APIDOC ## setupRemoteView ### Description Configures the view to display a remote video stream. ### Method Not specified (likely a method call within the SDK). ### Endpoint N/A ### Parameters - **userId** (String) - Required - The ID of the remote user. - **view** (View) - Required - The view component to render the remote video. ### Request Example ```java // Example usage within the SDK videoCall.setupRemoteView("remoteUserId", remoteVideoView); ``` ### Response None explicitly defined. ``` -------------------------------- ### NECallEngine Setup and Initialization Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/V3.3.0/zh/html/_n_e_call_engine_8h_source.html This snippet demonstrates how to set up and initialize the NECallEngine using a configuration object. It also shows how to obtain the shared instance of the engine and how to destroy it when no longer needed. The setup method requires a NESetupConfig object, and the call method initiates a call with NECallParam. ```objective-c // Get the shared instance of the call engine + (instancetype)sharedInstance; // Set up the call engine with configuration - (void)setup:(NESetupConfig *)config; // Initiate a call - (void)call:(NECallParam *)param completion: (nullable void (^)(NSError *_Nullable error, NECallInfo *_Nullable callInfo))completion; // Destroy the call engine instance - (void)destroy; ``` -------------------------------- ### Video View Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V2.0.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1_n_e_call_engine-members.html Configures the local and remote video views for the call. ```APIDOC ## POST /call/p2p/video/local ### Description Sets up the video view for the local participant. ### Method POST ### Endpoint /call/p2p/video/local ### Parameters #### Request Body - **videoRender** (NERtcVideoView) - Required - The NERtcVideoView object to render the local video stream. ``` ```APIDOC ## POST /call/p2p/video/remote ### Description Sets up the video view for the remote participant. ### Method POST ### Endpoint /call/p2p/video/remote ### Parameters #### Request Body - **videoRender** (NERtcVideoView) - Required - The NERtcVideoView object to render the remote video stream. ``` -------------------------------- ### Initialize NECallEngine Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.5.5/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1_n_e_call_engine-members.html Initializes the NECallEngine with the provided Context and setup configuration. This is a prerequisite for using other functionalities of the engine. ```java NECallEngine.setup(Context context, NESetupConfig config); ``` -------------------------------- ### Start Group Call (Android) Source: https://context7.com/wuleihenbang/necallkit_doc_source/llms.txt Initiate a multi-party group audio or video call with multiple participants on Android. This involves preparing a list of callees and building a GroupCallParam object to start the call using CallKitUI. ```java import com.netease.yunxin.kit.call.ui.CallKitUI; import com.netease.yunxin.kit.call.ui.model.GroupCallParam; // Prepare list of participants String[] callees = new String[]{ "user_account_id_1", "user_account_id_2", "user_account_id_3" }; // Create group call parameters GroupCallParam groupCallParam = new GroupCallParam.Builder() .callId(UUID.randomUUID().toString()) // Unique call ID .callees(callees) // Array of user account IDs .build(); // Start group call (displays UI for all participants) CallKitUI.startGroupCall(this, groupCallParam); // Join existing group call GroupJoinParam joinParam = new GroupJoinParam.Builder() .callId("existing_call_id") // Call ID from invitation .build(); CallKitUI.joinGroupCall(this, joinParam); ``` -------------------------------- ### P2P Call Setup Configuration Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.1.0/zh/html/functions_vars.html Configuration options for P2P calls, including auto-joining signal channels and enabling RTC joining. ```APIDOC ## P2P Call Setup Configuration ### Description Configuration options for P2P calls, including settings related to signal channels and Real-Time Communication (RTC) joining. ### Parameters #### Request Body - **enableAutoJoinSignalChannel** (boolean) - Optional - Whether to automatically join the signal channel. - **enableJoinRtcWhenCall** (boolean) - Optional - Whether to enable joining RTC when a call is initiated. - **framework** (string) - Optional - Specifies the framework used for the call. ### Request Example ```json { "enableAutoJoinSignalChannel": true, "enableJoinRtcWhenCall": false, "framework": "default" } ``` ### Response #### Success Response (200) - **message** (string) - Success message. #### Response Example ```json { "message": "P2P call setup configuration updated successfully." } ``` ``` -------------------------------- ### Media Setup and Control Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/V3.3.0/zh/html/_n_e_rtc_call_kit_8h_source.html APIs for setting up local and remote video views, and controlling video/audio streams. ```APIDOC ## POST /NE_RTC_CallKit/setupLocalView ### Description Sets up the view for displaying the local video stream. ### Method `setupLocalView:(nullable UIView *)localView` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **localView** (UIView, optional) - The view to display the local video. ### Request Example ```objc UIView *myLocalView = [[UIView alloc] init]; [[NE_RTC_CallKit sharedInstance] setupLocalView:myLocalView]; ``` ### Response #### Success Response No explicit return value. #### Response Example N/A --- ## POST /NE_RTC_CallKit/setupRemoteView ### Description Sets up the view for displaying a remote user's video stream. ### Method `setupRemoteView:(nullable UIView *)remoteView forUser:(nullable NSString *)userID` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **remoteView** (UIView, optional) - The view to display the remote video. - **userID** (NSString, optional) - The ID of the remote user. ### Request Example ```objc UIView *remoteVideoView = [[UIView alloc] init]; [[NE_RTC_CallKit sharedInstance] setupRemoteView:remoteVideoView forUser:@"user456"]; ``` ### Response #### Success Response No explicit return value. #### Response Example N/A --- ## POST /NE_RTC_CallKit/enableLocalVideo ### Description Enables or disables the local video capture. ### Method `enableLocalVideo:(BOOL)enable` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **enable** (BOOL) - YES to enable local video, NO to disable. ### Request Example ```objc [[NE_RTC_CallKit sharedInstance] enableLocalVideo:YES]; ``` ### Response #### Success Response - **int** - Returns 0 on success, or an error code. #### Response Example ```json { "return_value": 0 } ``` --- ## POST /NE_RTC_CallKit/muteLocalVideo ### Description Mutes or unutes the local video stream. ### Method `muteLocalVideo:(BOOL)muted` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **muted** (BOOL) - YES to mute local video, NO to unmute. ### Request Example ```objc [[NE_RTC_CallKit sharedInstance] muteLocalVideo:YES]; ``` ### Response #### Success Response - **int** - Returns 0 on success, or an error code. #### Response Example ```json { "return_value": 0 } ``` --- ## POST /NE_RTC_CallKit/switchCamera ### Description Switches the camera being used for video capture (e.g., front to back). ### Method `switchCamera` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters None ### Request Example ```objc [[NE_RTC_CallKit sharedInstance] switchCamera]; ``` ### Response #### Success Response - **int** - Returns 0 on success, or an error code. #### Response Example ```json { "return_value": 0 } ``` --- ## POST /NE_RTC_CallKit/muteLocalAudio ### Description Mutes or unmutes the local audio stream. ### Method `muteLocalAudio:(BOOL)mute` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **mute** (BOOL) - YES to mute local audio, NO to unmute. ### Request Example ```objc [[NE_RTC_CallKit sharedInstance] muteLocalAudio:YES]; ``` ### Response #### Success Response - **int** - Returns 0 on success, or an error code. #### Response Example ```json { "return_value": 0 } ``` --- ## POST /NE_RTC_CallKit/switchCallType ### Description Switches the type of an ongoing call (e.g., from audio to video). ### Method `switchCallType:(NERtcCallType)type withState:([NERtcSwitchState])state completion:(nullable void (^)(NSError *_Nullable error))completion` ### Endpoint N/A (Method call on NE_RTC_CallKit instance) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **type** (NERtcCallType) - The desired call type. - **state** (NERtcSwitchState) - The state of the switch. - **completion** (void (^)(NSError *_Nullable error), optional) - Callback block for completion. ### Request Example ```objc [[NE_RTC_CallKit sharedInstance] switchCallType:NERtcCallTypeVideo withState:NERtcSwitchStateOk completion:^(NSError * _Nullable error) { // Handle completion }]; ``` ### Response #### Success Response - **error** (NSError, optional) - Error if the switch failed. #### Response Example ```json { "error": null } ``` ``` -------------------------------- ### Join and Accept Call (Java) Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.1.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1internal_1_1_default_signal_extra_handler-members.html Enables a user to join and immediately accept an incoming P2P call. It uses V2NIMSignallingCallSetupParams for setup and a NEResultObserver for the V2NIMSignallingCallSetupResult. ```java DefaultSignalExtraHandler.toJoinAndAccept(paramBuilder, observer); ``` -------------------------------- ### Audio and Video Settings Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.6.4/zh/html/functions_func.html Methods to control audio mute status and setup local and remote video views. ```APIDOC ## setAudioMute ### Description Sets the audio mute status for the local user. ### Method POST (or relevant method based on SDK implementation) ### Endpoint N/A (typically a method call within the SDK) ### Parameters #### Query Parameters - **mute** (boolean) - Required - True to mute, false to unmute. ### Request Example ```json { "method": "setAudioMute", "params": { "mute": true } } ``` ### Response #### Success Response (200) Indicates the operation was successful. #### Response Example ```json { "success": true } ``` ## setupLocalView ### Description Sets up the view for rendering the local user's video stream. ### Method POST (or relevant method based on SDK implementation) ### Endpoint N/A (typically a method call within the SDK) ### Parameters #### Request Body - **view** (View Object) - Required - The view component to render the video. - **userId** (String) - Optional - The user ID to associate with the view. ### Request Example ```json { "method": "setupLocalView", "params": { "view": "", "userId": "user123" } } ``` ### Response #### Success Response (200) Indicates the operation was successful. #### Response Example ```json { "success": true } ``` ## setupRemoteView ### Description Sets up the view for rendering a remote user's video stream. ### Method POST (or relevant method based on SDK implementation) ### Endpoint N/A (typically a method call within the SDK) ### Parameters #### Request Body - **view** (View Object) - Required - The view component to render the video. - **userId** (String) - Required - The user ID of the remote participant. ### Request Example ```json { "method": "setupRemoteView", "params": { "view": "", "userId": "user456" } } ``` ### Response #### Success Response (200) Indicates the operation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Setup Group Call (Objective-C) Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/interface_n_e_group_call_kit.html Sets up the group call with provided configuration parameters. It requires a GroupConfigParam object to define the call settings. ```Objective-C - (void) setupGroupCall:(GroupConfigParam *)param; ``` -------------------------------- ### NECallKit Configuration Parameters Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/V2.2.5/zh/html/functions_prop.html This section details various configuration parameters used within the NECallKit SDK, including options for call engine setup, RTC settings, and group call configurations. ```APIDOC ## NECallKit Configuration Parameters This document outlines key parameters and their associated types and descriptions within the NECallKit framework. ### Parameters #### `cid` - **Type**: `NERtcCallKitJoinChannelEvent` - **Description**: Channel ID related event. #### `cname` - **Type**: `NERtcCallKitContext`, `NERtcCallKitJoinChannelEvent` - **Description**: Channel name for RTC connection. #### `code` - **Type**: `GroupBaseResult` - **Description**: Result code for group operations. #### `config` - **Type**: `NECallEngine` - **Description**: Configuration object for the call engine. #### `currentAccId` - **Type**: `NECallInfo` - **Description**: The current account ID associated with the call. #### `currentAccid` - **Type**: `NEGroupCallKit()` - **Description**: The current account ID for group calls. #### `currentStatus` - **Type**: `NECallEngine()`, `NERtcCallKit()` - **Description**: The current status of the call engine or RTC kit. #### `currentUserUid` - **Type**: `NESetupConfig` - **Description**: The unique user ID of the current user. #### `disableRecord` - **Type**: `NERtcCallOptions` - **Description**: Disables audio recording for the call. #### `enableAutoJoinSignalChannel` - **Type**: `NESetupConfig` - **Description**: Enables automatic joining of the signal channel. #### `enableJoinRtcWhenCall` - **Type**: `NESetupConfig` - **Description**: Enables joining the RTC channel when a call is initiated. #### `enableOffline` - **Type**: `NECallConfig` - **Description**: Enables offline call functionality. #### `enableSwitchAudioConfirm` - **Type**: `NECallConfig` - **Description**: Enables confirmation for audio switching. #### `enableSwitchVideoConfirm` - **Type**: `NECallConfig` - **Description**: Enables confirmation for video switching. #### `engineDelegate` - **Type**: `NECallEngine`, `NERtcCallKit` - **Description**: Delegate for handling call engine events. #### `engineDelegateEx` - **Type**: `NECallEngine()` - **Description**: Extended delegate for call engine events. #### `extraInfo` - **Type**: `GroupCallMember`, `GroupCallParam`, `NECallParam`, `NEGroupCallInfo`, `NEGroupInfo`, `NEInviteInfo`, `NESignalInfo` - **Description**: Extra information associated with various call entities. #### `extraString` - **Type**: `NECallEndInfo`, `NEHangupParam` - **Description**: Additional string information related to call end or hangup. #### `framework` - **Type**: `NESetupConfig` - **Description**: Framework configuration settings. #### `globalExtraCopy` - **Type**: `NECallParam`, `NESignalInfo` - **Description**: Global extra copy information. #### `globalInit` - **Type**: `NERtcCallOptions` - **Description**: Global initialization option for RTC calls. #### `groupCallInfo` - **Type**: `GroupAcceptResult`, `GroupJoinResult`, `GroupQueryCallInfoResult` - **Description**: Information related to group calls. #### `groupID` - **Type**: `NERtcCallKitContext` - **Description**: The ID of the group for RTC context. #### `groupId` - **Type**: `GroupCallParam`, `NEGroupCallInfo`, `NEGroupInfo` - **Description**: The ID of the group. #### `groupType` - **Type**: `GroupCallParam`, `NEGroupCallInfo`, `NEGroupInfo` - **Description**: The type of the group. #### `host` - **Type**: `GroupConfigParam` - **Description**: Host information for group configuration. ``` -------------------------------- ### NE Call Kit Video View Setup Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/iOS/doxygen/Latest/zh/html/_n_e_rtc_call_kit_8h_source.html Methods for setting up local and remote video views. These are used to display the video streams of the local user and other participants in the call. ```Objective-C - (void)setupLocalView:(nullable UIView *)localView; - (void)setupRemoteView:(nullable UIView *)remoteView forUser:(nullable NSString *)userID; ``` -------------------------------- ### Start Single Call (Android) Source: https://context7.com/wuleihenbang/necallkit_doc_source/llms.txt Initiates a 1-on-1 audio or video call with another user using the pre-built UI. The SDK manages the entire call flow, from invitation to connection establishment. ```APIDOC ## Start Single Call (Android) ### Description Initiate a 1-on-1 audio or video call with another user using the pre-built UI. ### Method `CallKitUI.startSingleCall()` ### Endpoint N/A (Function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **activity** (Activity) - Required - The activity context to launch the call UI. - **callParam** (CallParam) - Required - Parameters for the call. - **callType** (NECallType) - Required - Type of call: `VIDEO` or `AUDIO`. - **calledAccId** (String) - Required - The account ID of the user to call. ### Request Example ```java import com.netease.yunxin.kit.call.ui.CallKitUI; import com.netease.yunxin.kit.call.ui.model.CallParam; import com.netease.yunxin.nertc.ui.base.CallParam.NECallType; // Make a video call CallParam videoCallParam = new CallParam.Builder() .callType(NECallType.VIDEO) // Call type: VIDEO or AUDIO .calledAccId("target_user_account_id") // Target user's account ID .build(); CallKitUI.startSingleCall(getActivity(), videoCallParam); // Make an audio call CallParam audioCallParam = new CallParam.Builder() .callType(NECallType.AUDIO) .calledAccId("target_user_account_id") .build(); CallKitUI.startSingleCall(getActivity(), audioCallParam); ``` ### Response #### Success Response (200) N/A (This method initiates a call and UI flow, it doesn't return a direct success/failure status in this context. Callbacks and listeners handle call events). #### Response Example N/A ### Notes - The SDK automatically handles: - Sending call invitation via signaling. - Showing outgoing call UI. - Playing ringtone. - Handling user accept/reject/timeout. - Establishing RTC connection. - Managing call state transitions. ``` -------------------------------- ### Join and Accept Call API Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V3.1.0/zh/html/classcom_1_1netease_1_1yunxin_1_1kit_1_1call_1_1p2p_1_1internal_1_1_default_signal_extra_handler-members.html Joins and accepts a P2P call simultaneously using provided setup parameters and an observer for the result. ```APIDOC ## POST /p2p/joinAndAccept ### Description Joins and accepts a P2P call in a single operation. ### Method POST ### Endpoint /p2p/joinAndAccept ### Parameters #### Request Body - **paramBuilder** (V2NIMSignallingCallSetupParams) - Required - Parameters for setting up and joining the call. - **observer** (NEResultObserver>) - Required - Observer to handle the outcome of joining and accepting the call. ### Request Example ```json { "paramBuilder": { "callId": "call_to_accept_id", "userId": "accepting_user_id", "customInfo": "meeting_details" }, "observer": { "onSuccess": "(result) => console.log('Call joined and accepted:', result)", "onFailure": "(error) => console.error('Failed to join and accept call:', error)" } } ``` ### Response #### Success Response (200) - **data** (V2NIMSignallingCallSetupResult) - Result object indicating successful call setup. #### Response Example ```json { "code": 200, "msg": "Call setup successful", "data": { "roomId": "setup_room_xyz", "callId": "call_to_accept_id" } } ``` ``` -------------------------------- ### Configure Floating Window (Flutter Dart) Source: https://context7.com/wuleihenbang/necallkit_doc_source/llms.txt Configures the floating window feature for Flutter applications. This involves setting up `NEExtraConfig` with `NEFloatingWindowConfig` during the engine setup. It allows enabling the feature and controlling if it shows automatically on call start. ```dart // Flutter floating window configuration // In Flutter, configure during initialization: final extraConfig = NEExtraConfig( floatingWindowConfig: NEFloatingWindowConfig( enableFloatingWindow: true, showFloatingWindowWhenCallStart: true, // Auto-show when call starts ), ); await NECallKitUI.instance.setupEngine( appKey, accountId, extraConfig: extraConfig, ); ``` -------------------------------- ### Initialization: Setup App Key and Views Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.2.0/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1_n_e_r_t_c_video_call-members.html Initializes the NERTCVideoCall SDK with application key and options, and sets up video rendering views for local and remote participants. 'setupAppKey' is the primary initialization method. 'setupLocalView' and 'setupRemoteView' bind video streams to UI components. ```Java public void setupAppKey(Context context, String appKey, VideoCallOptions option) public void setupLocalView(NERtcVideoView videoRender) public void setupRemoteView(NERtcVideoView videoRender, String userId) ``` -------------------------------- ### Handle User Substream Audio Start in NERtc Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.8.2/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1impl_1_1_n_e_rtc_callback_ex_temp-members.html Callback triggered when a user starts their substream audio. It receives the user ID. Implemented in NERtcCallbackExTemp. ```java /** * @param l User ID */ @Override public void onUserSubStreamAudioStart(long l) { // Handle user substream audio start event } ``` -------------------------------- ### Handle User Substream Video Start in NERtc Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.8.2/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1impl_1_1_n_e_rtc_callback_ex_temp-members.html Callback triggered when a user starts their substream video. It receives the user ID and an integer profile for the video. Implemented within NERtcCallbackExTemp. ```java /** * @param l User ID * @param i Video profile */ @Override public void onUserSubStreamVideoStart(long l, int i) { // Handle user substream video start event } ``` -------------------------------- ### Handle User Video Start in NERtc Source: https://github.com/wuleihenbang/necallkit_doc_source/blob/main/api-reference/android/doxygen/V1.8.2/zh/html/classcom_1_1netease_1_1yunxin_1_1nertc_1_1nertcvideocall_1_1model_1_1impl_1_1_n_e_rtc_callback_ex_temp-members.html Callback triggered when a user starts their main video stream. It receives the user ID and an integer profile for the video. This method is part of the NERtcCallbackExTemp interface. ```java /** * @param l User ID * @param i Video profile */ @Override public void onUserVideoStart(long l, int i) { // Handle user video start event } ```