|
Agora RTC Objective-C API Reference
Refactor
|
Common Data Transmission | |
| (int) | - sendRdtMessageEx:type:data:connection: |
| (int) | - sendMediaControlMessageEx:data:connection: |
Stream Fallback | |
| (int) | - setHighPriorityUserListEx:option:connection: |
| (int) | - setSubscribeAudioAllowlistEx:connection: |
| (int) | - setSubscribeVideoAllowlistEx:connection: |
| (NSInteger) | - takeSnapshotEx:uid:filePath: |
| (NSInteger) | - takeSnapshotExWithConfig:uid:config: |
| (int) | - sendAudioMetadataEx:metadata: |
| (int) | - enableContentInspectEx:config:connection: |
| (int) | - startRtmpStreamWithoutTranscodingEx:connection: |
| (int) | - startRtmpStreamWithTranscodingEx:transcoding:connection: |
| (int) | - updateRtmpTranscodingEx:connection: |
| (int) | - stopRtmpStreamEx:connection: |
| (int) | - startOrUpdateChannelMediaRelayEx:connection: |
| (int) | - stopChannelMediaRelayEx: |
| (int) | - pauseAllChannelMediaRelayEx: |
| (int) | - resumeAllChannelMediaRelayEx: |
| (int) | - startMediaRenderingTracingEx: |
| (int) | - setParametersEx:connection: |
| (NSString *_Nullable) | - getCallIdEx: |
| (void) | - addDelegateEx:connection: |
| (void) | - removeDelegateEx:connection: |
| (int) | - enableEncryptionEx:encryptionConfig:connection: |
| - (int) joinChannelExByToken: | (NSString *_Nullable) | token | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
| delegate: | (id< AgoraRtcEngineDelegate > _Nullable) | delegate | |
| mediaOptions: | (AgoraRtcChannelMediaOptions *_Nonnull) | mediaOptions | |
| joinSuccess: | (void(^)(NSString *_Nonnull channel, NSUInteger uid, NSInteger elapsed)) | joinSuccessBlock | |
Join a channel using a token, and set the media options.
Before calling this method, if you have not called registerLocalUserAccountWithAppID:userAccount: to register a user account, when you call this method to join a channel, the SDK automatically creates a user account for you. Calling the registerLocalUserAccountWithAppID:userAccount: method to register a user account, and then calling this method to join a channel can shorten the time it takes to enter the channel. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billings. If you want to stop subscribing to the media stream of other users, you can set the mediaOptions parameter or call the corresponding mute method. Call timing: Call this method after sharedEngineWithConfig:delegate:. Related callbacks: After the user successfully joins the channel, the SDK triggers the following callbacks:
rtcEngine:didLocalUserRegisteredWithUserId:userAccount:, rtcEngine:didJoinChannel:withUid:elapsed: and rtcEngine:connectionChangedToState:reason: callbacks.rtcEngine:didJoinedOfUid:elapsed: and rtcEngine:didUserInfoUpdatedWithUserId:userInfo: callbacks if a user joins the channel in the COMMUNICATION profile, or if a host joins the channel in the LIVE_BROADCASTING profile.sharedEngineWithConfig:delegate: method; otherwise, you may fail to join the channel with the token. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.| token | The token generated on your server for authentication.Note:
|
| connection | The connection information. See AgoraRtcConnection. |
| delegate | The callback class of AgoraRtcEngine. See AgoraRtcEngineDelegate. You can get the callback events of multiple channels through the delegte object passed in this parameter. |
| mediaOptions | The channel media options. See AgoraRtcChannelMediaOptions. |
| joinSuccessBlock | Occurs when a user joins a channel. joinSuccessBlock takes higher priority than rtcEngine:didJoinChannel:withUid:elapsed:. When both are implemented, rtcEngine:didJoinChannel:withUid:elapsed: does not take effect. Agora recommends setting joinSuccessBlock as nil to use rtcEngine:didJoinChannel:withUid:elapsed:. |
uid parameter is not set to an integer, or the value of a member in AgoraRtcChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.AgoraRtcEngineKit object. You need to reinitialize the AgoraRtcEngineKit object.AgoraRtcEngineKit object has not been initialized. You need to initialize the AgoraRtcEngineKit object before calling this method.AgoraRtcEngineKit object is wrong. The typical cause is that after calling startEchoTestWithConfig: to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.rtcEngine:connectionChangedToState:reason: callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the AgoraConnectionStateDisconnected (1) state.channelId to rejoin the channel.uid to rejoin the channel. Extends class AgoraRtcEngineKit.
| - (int) joinChannelExByToken: | (NSString *_Nullable) | token | |
| channelId: | (NSString *_Nonnull) | channelId | |
| userAccount: | (NSString *_Nonnull) | userAccount | |
| delegate: | (id< AgoraRtcEngineDelegate > _Nullable) | delegate | |
| mediaOptions: | (AgoraRtcChannelMediaOptions *_Nonnull) | mediaOptions | |
| joinSuccess: | (void(^)(NSString *_Nonnull channel, NSUInteger uid, NSInteger elapsed)) | joinSuccessBlock | |
Join a channel using a user account and token, and set the media options.
Before calling this method, if you have not called registerLocalUserAccountWithAppID:userAccount: to register a user account, when you call this method to join a channel, the SDK automatically creates a user account for you. Calling the registerLocalUserAccountWithAppID:userAccount: method to register a user account, and then calling this method to join a channel can shorten the time it takes to enter the channel. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billings. If you want to stop subscribing to the media stream of other users, you can set the mediaOptions parameter or call the corresponding mute method. Call timing: Call this method after sharedEngineWithConfig:delegate:. Related callbacks: After the user successfully joins the channel, the SDK triggers the following callbacks:
rtcEngine:didLocalUserRegisteredWithUserId:userAccount:, rtcEngine:didJoinChannel:withUid:elapsed: and rtcEngine:connectionChangedToState:reason: callbacks.rtcEngine:didJoinedOfUid:elapsed: and rtcEngine:didUserInfoUpdatedWithUserId:userInfo: callbacks if a user joins the channel in the COMMUNICATION profile, or if a host joins the channel in the LIVE_BROADCASTING profile.sharedEngineWithConfig:delegate: method; otherwise, you may fail to join the channel with the token. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.| token | The token generated on your server for authentication.Note:
|
| channelId | The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
|
| userAccount | The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as nil. Supported characters are as follows(89 in total):
|
| delegate | The callback class of AgoraRtcEngine. See AgoraRtcEngineDelegate. You can get the callback events of multiple channels through the delegte object passed in this parameter. |
| mediaOptions | The channel media options. See AgoraRtcChannelMediaOptions. |
| joinSuccessBlock | Occurs when a user joins a channel. joinSuccessBlock takes higher priority than rtcEngine:didJoinChannel:withUid:elapsed:. When both are implemented, rtcEngine:didJoinChannel:withUid:elapsed: does not take effect. Agora recommends setting joinSuccessBlock as nil to use rtcEngine:didJoinChannel:withUid:elapsed:. |
uid parameter is not set to an integer, or the value of a member in AgoraRtcChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.AgoraRtcEngineKit object. You need to reinitialize the AgoraRtcEngineKit object.AgoraRtcEngineKit object has not been initialized. You need to initialize the AgoraRtcEngineKit object before calling this method.AgoraRtcEngineKit object is wrong. The typical cause is that after calling startEchoTestWithConfig: to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.rtcEngine:connectionChangedToState:reason: callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the AgoraConnectionStateDisconnected (1) state.channelId to rejoin the channel.uid to rejoin the channel. Extends class AgoraRtcEngineKit.
| - (int) updateChannelExWithMediaOptions: | (AgoraRtcChannelMediaOptions *_Nonnull) | mediaOptions | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Updates the channel media options after joining the channel.
| options | The channel media options. See AgoraRtcChannelMediaOptions. |
| connection | The connection information. See AgoraRtcConnection. |
AgoraRtcChannelMediaOptions is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.AgoraRtcEngineKit object has not been initialized. You need to initialize the AgoraRtcEngineKit object before calling this method.AgoraRtcEngineKit object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the rtcEngine:connectionChangedToState:reason: callback to see whether the user is in the channel. If you receive the AgoraConnectionStateDisconnected (1) or AgoraConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannelByToken:channelId:uid:mediaOptions:joinSuccess: to join a channel before calling this method. Extends class AgoraRtcEngineKit.
| - (int) setDelegateEx: | (id< AgoraRtcEngineDelegate > _Nullable) | delegate | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Resets the SDK delegate.
The SDK uses the delegate to inform the app on engine runtime events. All methods defined in the delegate are optional implementation methods.
| delegate | The AgoraRtcEngineDelegate protocol. |
| connection | The AgoraRtcConnection object. |
Extends class AgoraRtcEngineKit.
| - (int) muteLocalAudioStreamEx: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes publishing the local audio stream.
A successful call of this method triggers the rtcEngine:didAudioMuted:byUid: and rtcEngine:remoteAudioStateChangedOfUid:state:reason:elapsed: callbacks on the remote client.
| mute | Whether to stop publishing the local audio stream:
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) muteLocalVideoStreamEx: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes publishing the local video stream.
A successful call of this method triggers the rtcEngine:didVideoMuted:byUid: callback on the remote client.
| mute | Whether to stop publishing the local video stream.
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) muteRemoteAudioStreamEx: | (NSUInteger) | uid | |
| mute: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes receiving the audio stream of a specified user.
This method is used to stops or resumes receiving the audio stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
| uid | The ID of the specified user. |
| mute | Whether to stop receiving the audio stream of the specified user:
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) muteAllRemoteAudioStreamsEx: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes subscribing to the audio streams of all remote users.
After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.
autoSubscribeAudio as NO when calling joinChannelByToken:channelId:uid:mediaOptions:joinSuccess:.| mute | Whether to stop subscribing to the audio streams of all remote users:
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setVideoEncoderConfigurationEx: | (AgoraVideoEncoderConfiguration *_Nonnull) | config | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the video encoder configuration.
Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:.
config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found.| config | Video profile. See AgoraVideoEncoderConfiguration. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setupRemoteVideoEx: | (AgoraRtcVideoCanvas *_Nonnull) | remote | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Initializes the video view of a remote user.
This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. The application specifies the uid of the remote video in the AgoraRtcVideoCanvas method before the remote user joins the channel. If the remote uid is unknown to the application, set it after the application receives the rtcEngine:didJoinedOfUid:elapsed: callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user.
joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:.setRemoteRenderModeEx:mode:mirror:connection: method.| remote | The remote video view settings. See AgoraRtcVideoCanvas. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setRemoteRenderModeEx: | (NSUInteger) | uid | |
| mode: | (AgoraVideoRenderMode) | mode | |
| mirror: | (AgoraVideoMirrorMode) | mirror | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the video display mode of a specified remote user.
After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
setupRemoteVideo: method.| uid | The user ID of the remote user. |
| mode | The video display mode of the remote user. See AgoraVideoRenderMode. |
| mirror | The mirror mode of the remote user view. See AgoraVideoMirrorMode. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) muteRemoteVideoStreamEx: | (NSUInteger) | uid | |
| mute: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes receiving the video stream of a specified user.
This method is used to stop or resume receiving the video stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
| uid | The user ID of the remote user. |
| mute | Whether to stop receiving the video stream of the specified user:
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) muteAllRemoteVideoStreamsEx: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops or resumes subscribing to the video streams of all remote users.
After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users.
| mute | Whether to stop subscribing to the video streams of all remote users.
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) enableDualStreamModeEx: | (BOOL) | enabled | |
| streamConfig: | (AgoraSimulcastStreamConfig *) | streamConfig | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Enables or disables dual-stream mode on the sender side.
You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:
setRemoteVideoStream:type: to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.| enabled | Whether to enable dual-stream mode:
|
| streamConfig | The configuration of the low-quality video stream. See AgoraSimulcastStreamConfig.Note: When setting mode to AgoraDisableSimulcastStream, setting streamConfig will not take effect. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setDualStreamModeEx: | (AgoraSimulcastStreamMode) | mode | |
| streamConfig: | (AgoraSimulcastStreamConfig *) | streamConfig | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the dual-stream mode on the sender side.
The SDK defaults to enabling low-quality video stream adaptive mode ( AgoraAutoSimulcastStream ) on the sender side, which means the sender does not actively send low-quality video stream. The receiving end with the role of the host can initiate a low-quality video stream request by calling setRemoteVideoStreamEx:type:connection:, and upon receiving the request, the sending end automatically starts sending low-quality stream.
mode to AgoraDisableSimulcastStream (never send low-quality video streams) or AgoraEnableSimulcastStream (always send low-quality video streams).mode set to AgoraAutoSimulcastStream.enableDualStreamModeEx:streamConfig:connection: is as follows:mode to AgoraDisableSimulcastStream, it has the same effect as enableDualStreamModeEx:streamConfig:connection: (NO).mode to AgoraEnableSimulcastStream, it has the same effect as enableDualStreamModeEx:streamConfig:connection: (YES).| mode | The mode in which the video stream is sent. See AgoraSimulcastStreamMode. |
| streamConfig | The configuration of the low-quality video stream. See AgoraSimulcastStreamConfig.Note: When setting mode to AgoraDisableSimulcastStream, setting streamConfig will not take effect. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setSimulcastConfigEx: | (AgoraSimulcastConfig *) | simulcastConfig | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the simulcast video stream configuration.
This method can be called in scenarios involving multiple channels. You can call the setSimulcastConfig method to set video streams with different resolutions for the same video source. The subscribers can call to select which stream layer to receive. The broadcaster can publish up to four layers of video streams: one main stream (highest resolution) and three additional streams of different quality levels. setRemoteVideoStream:type: Applicable scenarios: This method can be called in scenarios involving multiple channels.
| simulcastConfig | Configuration for different video steam layers. This configuration includes seven layers, from AgoraStreamLayer1 to AgoraStreamLow, with a maximum of three layers enabled simultaneously. See AgoraSimulcastConfig. |
| connection | One AgoraRtcConnection object. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setRemoteVideoStreamEx: | (NSUInteger) | uid | |
| type: | (AgoraVideoStreamType) | streamType | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the video stream type to subscribe to.
Depending on the default behavior of the sender and the specific settings when calling setDualStreamMode:streamConfig:, the scenarios for the receiver calling this method are as follows:
AgoraAutoSimulcastStream ) on the sender side by default, meaning only the high-quality video stream is transmitted. Only the receiver with the role of the **host**can call this method to initiate a low-quality video stream request. Once the sender receives the request, it starts automatically sending the low-quality video stream. At this point, all users in the channel can call this method to switch to low-quality video stream subscription mode.setDualStreamMode:streamConfig: and sets mode to AgoraDisableSimulcastStream (never send low-quality video stream), then calling this method will have no effect.setDualStreamMode:streamConfig: and sets mode to AgoraEnableSimulcastStream (always send low-quality video stream), both the host and audience receivers can call this method to switch to low-quality video stream subscription mode. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream.setDualStreamModeEx:streamConfig:connection: and set mode to AgoraDisableSimulcastStream (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamModeEx:streamConfig:connection: again on the sending end and adjust the settings.| uid | The user ID. |
| streamType | The video stream type, see AgoraVideoStreamType. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setRemoteVideoSubscriptionOptionsEx: | (NSUInteger) | uid | |
| options: | (AgoraVideoSubscriptionOptions *_Nonnull) | options | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets options for subscribing to remote video streams.
When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.
| uid | The user ID of the remote user. |
| options | The video subscription options. See AgoraVideoSubscriptionOptions. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (AgoraUserInfo* _Nullable) getUserInfoByUserAccountEx: | (NSString *_Nonnull) | userAccount | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
| withError: | (AgoraErrorCode *_Nullable) | error | |
Gets the user information by passing in the user account.
After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the rtcEngine:didUserInfoUpdatedWithUserId:userInfo: callback on the local client. After receiving the callback, you can call this method and pass in the UID to get the user account of the specified user from the AgoraUserInfo object.
| userAccount | The user account. |
| connection | The connection information. See AgoraRtcConnection. |
| error | Error code. |
Extends class AgoraRtcEngineKit.
| - (AgoraUserInfo* _Nullable) getUserInfoByUidEx: | (NSUInteger) | uid | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
| withError: | (AgoraErrorCode *_Nullable) | error | |
Gets the user information by passing in the user ID.
After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the rtcEngine:didUserInfoUpdatedWithUserId:userInfo: callback on the local client. After receiving the callback, you can call this method and pass in the UID to get the user account of the specified user from the AgoraUserInfo object.
| uid | The user ID. |
| error | Error code. |
| connection | The connection information. See AgoraRtcConnection. |
AgoraUserInfo object, if the method call succeeds.Extends class AgoraRtcEngineKit.
| - (AgoraConnectionState) getConnectionStateEx: | (AgoraRtcConnection *_Nonnull) | connection |
Gets the current connection state of the SDK.
Call timing: This method can be called either before or after joining the channel.
| connection | The connection information. See AgoraRtcConnection. |
AgoraConnectionState. Extends class AgoraRtcEngineKit.
| - (int) adjustRecordingSignalVolumeEx: | (NSInteger) | volume | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Adjusts the recording volume.
| volume | The recording volume, which ranges from 0 to 400:
|
| connection | AgoraRtcConnection by channelId and uid combine |
Extends class AgoraRtcEngineKit.
| - (int) muteRecordingSignalEx: | (BOOL) | mute | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Mutes or resume recording signal volume.
| mute | Determines whether to mute or resume the recording signal volume.
|
| connection | AgoraRtcConnection by channelId and uid combine |
Extends class AgoraRtcEngineKit.
| - (int) adjustUserPlaybackSignalVolumeEx: | (NSUInteger) | uid | |
| volume: | (NSInteger) | volume | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Adjusts the playback signal volume of a specified remote user.
You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:.
| uid | The user ID of the remote user. |
| volume | The volume of the user. The value range is [0,400].
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) sendCustomReportMessageEx: | (NSString *_Nullable) | messageId | |
| category: | (NSString *_Nullable) | category | |
| event: | (NSString *_Nullable) | event | |
| label: | (NSString *_Nullable) | label | |
| value: | (NSInteger) | value | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Agora supports reporting and analyzing customized messages.
Agora supports reporting and analyzing customized messages. This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes and each string not exceeding 100 bytes. To try out this function, contact support@agora.io and discuss the format of customized messages with us.
Extends class AgoraRtcEngineKit.
| - (int) enableAudioVolumeIndicationEx: | (NSInteger) | interval | |
| smooth: | (NSInteger) | smooth | |
| reportVad: | (BOOL) | reportVad | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Enables the reporting of users' volume indication.
This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:. Related callbacks: The SDK triggers the rtcEngine:reportAudioVolumeIndicationOfSpeakers:totalVolume: callback according to the interval you set if this method is successfully called and there are users publishing streams in the channel.
| interval | Sets the time interval between two consecutive volume indications:
|
| smooth | The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator. |
| reportVad | - YES: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the rtcEngine:reportAudioVolumeIndicationOfSpeakers:totalVolume: callback reports the voice activity status of the local user.
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setRemoteVoicePositionEx: | (NSUInteger) | uid | |
| pan: | (double) | pan | |
| gain: | (double) | gain | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the 2D position (the position on the horizontal plane) of the remote user's voice.
This method sets the voice position and volume of a remote user. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.
| uid | The user ID of the remote user. |
| pan | The voice position of the remote user. The value ranges from -1.0 to 1.0:
|
| gain | The volume of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original volume of the remote user). The smaller the value, the lower the volume. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) addVideoWatermarkEx: | (NSURL *_Nonnull) | url | |
| options: | (WatermarkOptions *_Nonnull) | options | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Adds a watermark image to the local video.
This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a live video stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfigurationEx:connection: method:
AgoraVideoOutputOrientationMode ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.AgoraVideoOutputOrientationMode ) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.setVideoEncoderConfigurationEx:connection: method; otherwise, the watermark image will be cropped.enableVideo before calling this method.startPreview: method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview.| url | The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path. |
| options | The options of the watermark image to be added. See WatermarkOptions. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) addVideoWatermarkEx: | (WatermarkConfig *_Nonnull) | configs | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Adds a watermark image to the local video.
Applicable scenarios: This method applies to multi-channel scenarios.
| configs | Watermark configuration. See WatermarkConfig. |
| connection | AgoraRtcConnection object. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) removeVideoWatermarkEx: | (NSString *_Nonnull) | id | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Removes the specified watermark image from the local or remote video stream.
Applicable scenarios: This method applies to multi-channel scenarios.
| id | Identifier of the watermark to be removed. |
| connection | Connection information, including channel ID and user ID. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) clearVideoWatermarkEx: | (AgoraRtcConnection *_Nonnull) | connection |
Removes the watermark image from the video stream.
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) createDataStreamEx: | (NSInteger *_Nonnull) | streamId | |
| reliable: | (BOOL) | reliable | |
| ordered: | (BOOL) | ordered | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Creates a data stream.
You can call this method to create a data stream and improve the reliability and ordering of data transmission. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:. Related callbacks: After setting reliable to YES, if the recipient does not receive the data within five seconds, the SDK triggers the rtcEngine:didOccurStreamMessageErrorFromUid:streamId:error:missed:cached: callback and returns an error code.
AgoraRtcEngineKit. The data stream will be destroyed when leaving the channel, and the data stream needs to be recreated if needed.| streamId | An output parameter; the ID of the data stream created. |
| reliable | Sets whether the recipients are guaranteed to receive the data stream within five seconds:
|
| ordered | Sets whether the recipients receive the data stream in the sent order:
|
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) createDataStreamEx: | (NSInteger *_Nonnull) | streamId | |
| config: | (AgoraDataStreamConfig *_Nonnull) | config | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Creates a data stream.
Compared to createDataStreamEx:reliable:ordered:connection:, this method does not guarantee the reliability of data transmission. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:.
AgoraRtcEngineKit. The data stream will be destroyed when leaving the channel, and the data stream needs to be recreated if needed. If you need a more comprehensive solution for low-latency, high-concurrency, and scalable real-time messaging and status synchronization, it is recommended to use Signaling.| streamId | An output parameter; the ID of the data stream created. |
| config | The configurations for the data stream. See AgoraDataStreamConfig. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) sendStreamMessageEx: | (NSInteger) | streamId | |
| data: | (NSData *_Nonnull) | data | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sends data stream messages.
After calling createDataStream:config:, you can call this method to send data stream messages to all users in the channel. The SDK has the following restrictions on this method:
rtcEngine:receiveStreamMessageFromUid:streamId:data: callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the rtcEngine:didOccurStreamMessageErrorFromUid:streamId:error:missed:cached: callback on the remote client.Signaling.createDataStream:config: and joining the channel.| streamId | The data stream ID. You can get the data stream ID by calling createDataStream:config:. |
| data | The message to be sent. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) sendRdtMessageEx: | (NSInteger) | uid | |
| type: | (AgoraRdtStreamType) | type | |
| data: | (NSData *_Nonnull) | data | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Send Reliable message to remote uid in channel.
@technical preview
| uid | remote user id. |
| type | Reliable Data Transmission tunnel message type. See AgoraRdtStreamType. |
| data | The sent data. |
| connection | AgoraRtcConnection by channelId and uid combine. |
Extends class AgoraRtcEngineKit.
| - (int) sendMediaControlMessageEx: | (NSInteger) | uid | |
| data: | (NSData *_Nonnull) | data | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Send media control message.
@technical preview
| uid | Remote user id. In particular, if the uid is set to 0, it means broadcasting the message to the entire channel. |
| data | The sent data. |
| connection | AgoraRtcConnection by channelId and uid combine. |
Extends class AgoraRtcEngineKit.
| - (int) setHighPriorityUserListEx: | (NSArray< NSNumber * > *_Nullable) | uidList | |
| option: | (AgoraStreamFallbackOptions) | option | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the high priority user list and related remote subscribe fallback option.
| uidList | The uid list of high priority users. |
| option | The remote subscribe fallback option of high priority users. |
| connection | AgoraRtcConnection by channelId and uid combine. |
Extends class AgoraRtcEngineKit.
| - (int) setSubscribeAudioAllowlistEx: | (NSArray< NSNumber * > *_Nonnull) | allowlist | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the allowlist of subscriptions for audio streams.
You can call this method to specify the audio streams of a user that you want to subscribe to.
muteRemoteAudioStream:mute:, muteAllRemoteAudioStreams: and autoSubscribeAudio in AgoraRtcChannelMediaOptions.| allowlist | The user ID list of users that you want to subscribe to. If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist: method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setSubscribeVideoAllowlistEx: | (NSArray< NSNumber * > *_Nonnull) | allowlist | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Sets the allowlist of subscriptions for video streams.
You can call this method to specify the video streams of a user that you want to subscribe to.
muteRemoteVideoStream:mute:, muteAllRemoteVideoStreams: and autoSubscribeAudio in AgoraRtcChannelMediaOptions.| allowlist | The user ID list of users that you want to subscribe to. If you want to specify the video streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlistEx: method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (NSInteger) takeSnapshotEx: | (AgoraRtcConnection *_Nonnull) | connection | |
| uid: | (NSInteger) | uid | |
| filePath: | (NSString *_Nonnull) | filePath | |
Takes a snapshot of a video stream using connection ID.
This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:. Related callbacks: After a successful call of this method, the SDK triggers the rtcEngine:snapshotTaken:filePath:width:height:errCode: callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.
AgoraRtcChannelMediaOptions.| connection | The connection information. See AgoraRtcConnection. |
| uid | The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. |
| filePath | The local path (including filename extensions) of the snapshot. For example:
|
Extends class AgoraRtcEngineKit.
| - (NSInteger) takeSnapshotExWithConfig: | (AgoraRtcConnection *_Nonnull) | connection | |
| uid: | (NSInteger) | uid | |
| config: | (AgoraSnapshotConfig *_Nonnull) | config | |
Gets a video screenshot of the specified observation point using the connection ID.
This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. Call timing: Call this method after joinChannelExByToken:connection:delegate:mediaOptions:joinSuccess:. Related callbacks: After a successful call of this method, the SDK triggers the rtcEngine:snapshotTaken:filePath:width:height:errCode: callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.
AgoraRtcChannelMediaOptions.| connection | The connection information. See AgoraRtcConnection. |
| uid | The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. |
| config | The configuration of the snaptshot. See AgoraSnapshotConfig. |
Extends class AgoraRtcEngineKit.
| - (int) sendAudioMetadataEx: | (AgoraRtcConnection *_Nonnull) | connection | |
| metadata: | (NSData *_Nonnull) | metadata | |
send audio metadata
| metadata | The NSData of metadata |
| connection | AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) enableContentInspectEx: | (BOOL) | enabled | |
| config: | (AgoraContentInspectConfig *_Nonnull) | config | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Enables or disables video screenshot and upload.
This method can take screenshots for multiple video streams and upload them. When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in AgoraContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. Call timing: This method can be called either before or after joining the channel.
technical support to activate the video screenshot upload service.| enabled | Whether to enalbe video screenshot and upload:
|
| config | Screenshot and upload configuration. See AgoraContentInspectConfig. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) startRtmpStreamWithoutTranscodingEx: | (NSString *_Nonnull) | url | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Starts pushing media streams to a CDN without transcoding.
Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the rtcEngine:rtmpStreamingChangedToState:state:reason: callback on the local client to report the state of the streaming.
stopRtmpStream: first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.| url | The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) startRtmpStreamWithTranscodingEx: | (NSString *_Nonnull) | url | |
| transcoding: | (AgoraLiveTranscoding *_Nullable) | transcoding | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Starts Media Push and sets the transcoding configuration.
Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the rtcEngine:rtmpStreamingChangedToState:state:reason: callback on the local client to report the state of the streaming.
stopRtmpStreamEx:connection: first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.| url | The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
| transcoding | The transcoding configuration for Media Push. See AgoraLiveTranscoding. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) updateRtmpTranscodingEx: | (AgoraLiveTranscoding *_Nullable) | transcoding | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Updates the transcoding configuration.
Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the rtcEngineTranscodingUpdated: callback after the transcoding configuration is updated.
| transcoding | The transcoding configuration for Media Push. See AgoraLiveTranscoding. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) stopRtmpStreamEx: | (NSString *_Nonnull) | url | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Stops pushing media streams to a CDN.
Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the rtcEngine:rtmpStreamingChangedToState:state:reason: callback on the local client to report the state of the streaming.
| url | The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) startOrUpdateChannelMediaRelayEx: | (AgoraChannelMediaRelayConfiguration *_Nonnull) | config | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Starts relaying media streams across channels or updates channels for media relay.
The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. This feature supports relaying media streams to a maximum of six destination channels. After a successful method call, the SDK triggers the rtcEngine:channelMediaRelayStateDidChange:error: callback, and this callback returns the state of the media stream relay. Common states are as follows:
rtcEngine:channelMediaRelayStateDidChange:error: callback returns AgoraChannelMediaRelayStateRunning (2) and AgoraChannelMediaRelayErrorNone (0), it means that the SDK starts relaying media streams from the source channel to the destination channel.rtcEngine:channelMediaRelayStateDidChange:error: callback returns AgoraChannelMediaRelayStateFailure (3), an exception occurs during the media stream relay.technical support.| config | The configuration of the media stream relay. See AgoraChannelMediaRelayConfiguration. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) stopChannelMediaRelayEx: | (AgoraRtcConnection *_Nonnull) | connection |
Stops the media stream relay. Once the relay stops, the host quits all the target channels.
After a successful method call, the SDK triggers the rtcEngine:channelMediaRelayStateDidChange:error: callback. If the callback reports AgoraChannelMediaRelayStateIdle (0) and AgoraChannelMediaRelayErrorNone (0), the host successfully stops the relay.
rtcEngine:channelMediaRelayStateDidChange:error: callback with the AgoraChannelMediaRelayErrorServerNoResponse (2) or AgoraChannelMediaRelayErrorServerConnectionLost (8) status code. You can call the leaveChannel:leaveChannelBlock: method to leave the channel, and the media stream relay automatically stops.| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) pauseAllChannelMediaRelayEx: | (AgoraRtcConnection *_Nonnull) | connection |
Pauses the media stream relay to all target channels.
After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay.
startOrUpdateChannelMediaRelayEx:connection:.| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) resumeAllChannelMediaRelayEx: | (AgoraRtcConnection *_Nonnull) | connection |
Resumes the media stream relay to all target channels.
After calling the pauseAllChannelMediaRelayEx: method, you can call this method to resume relaying media streams to all destination channels.
pauseAllChannelMediaRelayEx:.| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) startMediaRenderingTracingEx: | (AgoraRtcConnection *_Nonnull) | connection |
Enables tracing the video frame rendering process.
The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the rtcEngine:videoRenderingTracingResultOfUid:currentEvent:tracingInfo: callback. Applicable scenarios: Agora recommends that you use this method in conjunction with the UI settings (such as buttons and sliders) in your app to improve the user experience. For example, call this method when the user clicks the Join Channel button, and then get the time spent during the video frame rendering process through the rtcEngine:videoRenderingTracingResultOfUid:currentEvent:tracingInfo: callback, so as to optimize the indicators accordingly.
joinChannelByToken:channelId:uid:mediaOptions:joinSuccess: to join the channel. You can call this method at an appropriate time according to the actual application scenario to set the starting position for tracking video rendering events.| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (int) setParametersEx: | (NSString *_Nonnull) | options | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.
| options | SDK options in JSON format. |
| connection | AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (NSString * _Nullable) getCallIdEx: | (AgoraRtcConnection *_Nonnull) | connection |
Gets the call ID with the connection ID.
When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get callId, and pass it in when calling methods such as rate:rating:description: and complain:description:. Call timing: Call this method after joining a channel.
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.
| - (void) addDelegateEx: | (id< AgoraRtcEngineDelegate > _Nonnull) | delegate | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Adds multiple SDK delegate.
| delegate | The AgoraRtcEngineDelegate object. |
| connection | The AgoraRtcConnection object. |
Extends class AgoraRtcEngineKit.
| - (void) removeDelegateEx: | (id< AgoraRtcEngineDelegate > _Nonnull) | delegate | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Removes multiple SDK delegate.
| delegate | The AgoraRtcEngineDelegate object. |
| connection | The AgoraRtcConnection object. |
Extends class AgoraRtcEngineKit.
| - (int) enableEncryptionEx: | (BOOL) | enabled | |
| encryptionConfig: | (AgoraEncryptionConfig *_Nonnull) | config | |
| connection: | (AgoraRtcConnection *_Nonnull) | connection | |
Enables or disables the built-in encryption.
After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. Applicable scenarios: Scenarios with higher security requirements. Call timing: Call this method before joining a channel.
| enabled | Whether to enable built-in encryption:
|
| config | Built-in encryption configurations. See AgoraEncryptionConfig. |
| connection | The connection information. See AgoraRtcConnection. |
Extends class AgoraRtcEngineKit.