NERtc iOS SDK  V4.4.301
构造函数 | 所有成员列表
<INERtcEngineEx>协议 参考

NERtcEngine extended API 更多...

#import <INERtcEngineEx.h>

类 <INERtcEngineEx> 继承关系图:
<INERtcEngine> NERtcEngine

构造函数

(int) - enableDualStreamMode:
 Enables or disables the dual-stream mode. 更多...
 
(int) - setLocalMediaPriority:preemptive:
 Sets the priority of media streams from a local user. 更多...
 
(int) - setLocalPublishFallbackOption:
 Sets the fallback option for the published local video stream based on the network conditions. 更多...
 
(int) - setRemoteSubscribeFallbackOption:
 Sets the fallback option for the subscribed remote audio and video stream with poor network connections. 更多...
 
(int) - muteLocalAudio:
 Stops or resumes publishing the local audio stream. 更多...
 
(int) - subscribeRemoteAudio:forUserID:
 Subscribes to or unsubscribes from audio streams from specified remote users. 更多...
 
(int) - subscribeAllRemoteAudio:
 Subscribes to or unsubscribes from audio streams from all remote users. 更多...
 
(int) - subscribeRemoteVideo:forUserID:streamType:
 Subscribes to or unsubscribes from video streams from specified remote users. 更多...
 
(int) - startPreview
 Enables video preview. 更多...
 
(int) - stopPreview
 Stops video preview. 更多...
 
(int) - setLocalRenderScaleMode:
 Sets the local video display mode. 更多...
 
(int) - setRemoteRenderScaleMode:forUserID:
 Sets the remote video display mode. 更多...
 
(int) - setVideoRotationMode:
 Sets the orientation mode for the local video. 更多...
 
(int) - muteLocalVideo:
 Stops or resumes publishing the local video stream. 更多...
 
(int) - setLoudspeakerMode:
 Enables or disables the audio playback route to the speakerphone. 更多...
 
(int) - getLoudspeakerMode:
 Checks whether the speakerphone is enabled. 更多...
 
(int) - startAudioDump
 Starts recording an audio dump file. 更多...
 
(int) - stopAudioDump
 Stops recording an audio dump file. 更多...
 
(int) - setExternalVideoSource:isScreen:
 Enables or disables the external video input source. 更多...
 
(int) - pushExternalVideoFrame:
 Publishes the external video frames. 更多...
 
(int) - setupLocalSubStreamVideoCanvas:
 Sets the local substream canvas. 更多...
 
(int) - startScreenCapture:
 Enables screen sharing. 更多...
 
(int) - stopScreenCapture
 Disables screen sharing with the substream transmission. 更多...
 
(int) - setLocalRenderSubStreamScaleMode:
 Sets the display mode of the local substream video for screen sharing. 更多...
 
(int) - setupRemoteSubStreamVideoCanvas:forUserID:
 Sets a remote substream canvas. 更多...
 
(int) - subscribeRemoteSubStreamVideo:forUserID:
 Subscribes to or unsubscribes from remote video substream for screen sharing. 更多...
 
(int) - setRemoteRenderSubStreamVideoScaleMode:forUserID:
 Sets the display mode of to remote substream video for screen sharing. 更多...
 
(int) - setAudioSessionOperationRestriction:
 Sets permissions of the SDK over Audio Session. 更多...
 
(int) - setPlayoutDeviceMute:
 Mutes or unmutes the audio playback device. 更多...
 
(int) - getPlayoutDeviceMute:
 Gets the mute status of the audio playback device. 更多...
 
(int) - setRecordDeviceMute:
 Mutes or unmutes the audio capture device. 更多...
 
(int) - getRecordDeviceMute:
 Checks whether the audio capture device is muted. 更多...
 
(BOOL) - isCameraZoomSupported
 Checks whether the camera zooming feature is supported. 更多...
 
(BOOL) - isCameraTorchSupported
 Checks whether the camera flash feature is supported. 更多...
 
(BOOL) - isCameraFocusSupported
 Checks whether the camera manual focus feature is supported. 更多...
 
(BOOL) - isCameraExposurePositionSupported
 Checks whether the camera exposure feature is supported. 更多...
 
(int) - setCameraExposurePosition:
 Sets the camera exposure position. 更多...
 
(int) - setCameraTorchOn:
 Enables or disables the camera flash feature. 更多...
 
(BOOL) - isCameraTorchOn
 Check whether the flash is turned on on the device. 更多...
 
(int) - setCameraZoomFactor:
 Sets the current camera zoom ratio. 更多...
 
(float) - maxCameraZoomScale
 Gets maximum zoom ratio supported by the camera. 更多...
 
(int) - setCameraFocusPositionX:Y:
 Sets the camera manual focus position. 更多...
 
(int) - startAudioMixingWithOption:
 Starts to play or mix the music file. 更多...
 
(int) - stopAudioMixing
 Stops playing or mixing the music file. 更多...
 
(int) - pauseAudioMixing
 Pauses playing and mixing the music file. 更多...
 
(int) - resumeAudioMixing
 The method resumes mixing audio playback and continues playing the mixing audio. 更多...
 
(int) - setAudioMixingSendVolume:
 Sets the publishing volume of the mixing audio. 更多...
 
(int) - getAudioMixingSendVolume:
 Gets the volume for publishing mixing audio. 更多...
 
(int) - setAudioMixingPlaybackVolume:
 Adjusts the volume of mixing audio for local playback. 更多...
 
(int) - getAudioMixingPlaybackVolume:
 Gets the playback volume of the mixing audio. 更多...
 
(int) - getAudioMixingDuration:
 Gets the duration of the mixing audio file. 更多...
 
(int) - getAudioMixingCurrentPosition:
 Gets the playback position of the mixing audio file. 更多...
 
(int) - setAudioMixingPosition:
 Sets the playback position of the mixing audio file to a different starting position. 更多...
 
(int) - playEffectWitdId:effectOption:
 Plays back a specified sound effect file. 更多...
 
(int) - stopEffectWitdId:
 Stops playing all sound effect files. 更多...
 
(int) - stopAllEffects
 Stops playing all sound effect files. 更多...
 
(int) - pauseEffectWitdId:
 Pauses playing a specified sound effect file. 更多...
 
(int) - resumeEffectWitdId:
 Resumes playing a specified sound effect file. 更多...
 
(int) - pauseAllEffects
 Pauses playing all sound effect files. 更多...
 
(int) - resumeAllEffects
 Resumes playing all sound effect files. 更多...
 
(int) - setEffectSendVolumeWithId:volume:
 Sets the publishing volume of a sound effect file. 更多...
 
(int) - getEffectSendVolumeWithId:volume:
 Gets the publishing volume of a specified sound effect file. 更多...
 
(int) - setEffectPlaybackVolumeWithId:volume:
 Sets the playback volume of the sound effect files. 更多...
 
(int) - getEffectPlaybackVolumeWithId:volume:
 Gets the playback volume of the sound effect files 更多...
 
(int) - getEffectDurationWithId:duration:
 Gets the duration of a sound effect file. 更多...
 
(int) - getEffectCurrentPositionWithId:position:
 Gets the playback position of a sound effect file. 更多...
 
(int) - enableEarback:volume:
 Enables the in-ear monitoring feature. 更多...
 
(int) - setEarbackVolume:
 Sets the volume for in-ear monitoring. 更多...
 
(int) - startAudioRecording:sampleRate:quality:
 Starts an audio recording from a client. 更多...
 
(int) - stopAudioRecording
 Stops the audio recording on the client. 更多...
 
(int) - setExternalAudioSource:sampleRate:channels:
 Sets the external audio input source. 更多...
 
(int) - pushExternalAudioFrame:
 Publishes the external audio frame. 更多...
 
(int) - setExternalAudioRender:sampleRate:channels:
 Sets external audio rendering. 更多...
 
(int) - pullExternalAudioFrame:length:
 Pulls the external audio data. 更多...
 
(int) - addEngineMediaStatsObserver:
 Registers a stats observer. 更多...
 
(int) - removeEngineMediaStatsObserver:
 Removes the specified media stats observer. 更多...
 
(int) - cleanupEngineMediaStatsObserver
 Clears all media stats observers. 更多...
 
(int) - addLiveStreamTask:compeltion:
 Adds a streaming task in a room. 更多...
 
(int) - updateLiveStreamTask:compeltion:
 Updates a streaming task. 更多...
 
(int) - removeLiveStreamTask:compeltion:
 Deletes a streaming task. 更多...
 
(int) - setRecordingAudioFrameParameters:
 Sets the format of audio capture. 更多...
 
(int) - setPlaybackAudioFrameParameters:
 Sets the audio playback format. 更多...
 
(int) - setMixedAudioFrameParameters:
 Sets the format of the recording and mixing audio. 更多...
 
(int) - setAudioFrameObserver:
 Registers the audio observer. 更多...
 
(int) - enableAudioVolumeIndication:interval:
 Enables reporting users' volume indication. 更多...
 
(int) - adjustRecordingSignalVolume:
 Adjusts the volume of captured signals. 更多...
 
(int) - adjustPlaybackSignalVolume:
 Adjusts the playback signal volume of all remote users. 更多...
 
(int) - adjustUserPlaybackSignalVolume:forUserID:
 Adjust the volume of local signal playback from a specified remote user. 更多...
 
(int) - setLocalVoicePitch:
 Sets the voice pitch of the local audio. 更多...
 
(int) - setLocalVoiceEqualizationOfBandFrequency:withGain:
 Sets the local voice equalization effect, or customizes center frequencies of the local voice effects. 更多...
 
(int) - setVoiceBeautifierPreset:
 Sets an SDK preset voice beautifier effect. 更多...
 
(int) - setAudioEffectPreset:
 Sets an SDK preset voice changer effect. 更多...
 
(int) - setLocalCanvasWatermarkConfigs:withStreamType:
 Adds a watermark image to the local video. 更多...
 
(int) - setRemoteCanvasWatermarkConfigs:forUserID:withStreamType:
 Adds a watermark to the remote video canvas. 更多...
 
(int) - takeLocalSnapshot:callback:
 Takes a local video snapshot. 更多...
 
(int) - takeRemoteSnapshot:forUserID:callback:
 Takes a snapshot of a remote video. 更多...
 
(int) - uploadSdkInfo
 Uploads the SDK information. 更多...
 
(int) - sendSEIMsg:streamChannelType:
 Sends supplemental enhancement information (SEI) data through a specified bigstream or substream. 更多...
 
(int) - sendSEIMsg:
 Sends SEI data through the bigstream. 更多...
 
(int) - startChannelMediaRelay:
 Starts to relay media streams across rooms. 更多...
 
(int) - updateChannelMediaRelay:
 Updates the information of the destination room for media stream relay. 更多...
 
(int) - stopChannelMediaRelay
 Stops media stream relay across rooms. 更多...
 
(int) - enableSuperResolution:
 Enables or disables AI super resolution. 更多...
 
(int) - enableEncryption:config:
 Turns on or off media stream encryption. 更多...
 
(int) - setCloudProxy:
 开启并设置云代理服务。
在内网环境下,如果用户防火墙开启了网络限制,请参考《使用云代理》将指定 IP 地址和端口号加入防火墙白名单,然后调用此方法开启云代理,并将 proxyType 参数设置为 NERtcTransportTypeUDPProxy(1),即指定使用 UDP 协议的云代理。 更多...
 
- 构造函数 继承自 <INERtcEngine>
(NERtcConnectionStateType- connectionState
 Gets the connection status. 更多...
 
(int) - setupEngineWithContext:
 Creates an NERtcEngine instance and initializes the NERTC SDK. 更多...
 
(int) - joinChannelWithToken:channelName:myUid:completion:
 Joins an RTC room. 更多...
 
(int) - leaveChannel
 Leaves a room, such as hanging up or ending a call. 更多...
 
(int) - switchChannelWithToken:channelName:completion:
 Switches to a different RTC room. 更多...
 
(int) - enableLocalAudio:
 Enables or disables local audio capture. 更多...
 
(int) - enableLocalVideo:
 Specifies whether to enable local video capture. 更多...
 
(int) - setChannelProfile:
 Sets a room scene. 更多...
 
(int) - setLocalVideoConfig:
 Sets the video encoding profile. 更多...
 
(int) - setAudioProfile:scenario:
 Sets the audio encoding profile. 更多...
 
(int) - setupLocalVideoCanvas:
 Sets the local view. 更多...
 
(int) - setupRemoteVideoCanvas:forUserID:
 Sets views for remote users. 更多...
 
(int) - switchCamera
 Switches between the front and rear cameras. 更多...
 
(int) - setClientRole:
 Sets the role of a user in live streaming. 更多...
 
(int) - setParameters:
 Sets parameters for audio and video calls. 更多...
 

详细描述

NERtcEngine extended API

函数文档

◆ addEngineMediaStatsObserver:

- (int) addEngineMediaStatsObserver: (id< NERtcEngineMediaStatsObserver >)  observer

Registers a stats observer.

参数
observerThe stats observer. For more information, see NERtcEngineMediaStatsObserver.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ addLiveStreamTask:compeltion:

- (int) addLiveStreamTask: (NERtcLiveStreamTaskInfo *)  taskInfo
compeltion: (NERtcLiveStreamCompletion completion 

Adds a streaming task in a room.

After you call the method, the current user can receive a notification about the status of live streaming.

参数
taskInfoThe information about the streaming task. For more information, NERtcLiveStreamTaskInfo.
completionThe result. The callback is triggered after the method is called. For more information, see NERtcLiveStreamCompletion.
返回
The value returned. A value of 0 indicates that the operation is successful.
注解
  • The method is applicable to only live streaming.
  • You can call the method when you are in a room. The method is valid for calls.
  • Only one URL for the relayed stream is added in each call. You need to call the method multiple times if you want to push many streams. An RTC room with the same channelid can create three different streaming tasks.

◆ adjustPlaybackSignalVolume:

- (int) adjustPlaybackSignalVolume: (uint32_t)  volume

Adjusts the playback signal volume of all remote users.

参数
volumeThe playback signal volume. Valid range: 0 to 400. Where:
  • 0: muted.
  • 100: the original volume. This is the default value.
  • 400: The maximum value can be four times the original volume. The limit value is protected.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ adjustRecordingSignalVolume:

- (int) adjustRecordingSignalVolume: (uint32_t)  volume

Adjusts the volume of captured signals.

参数
volumeThe volume of captured signals. Valid values: 0 to 400. Where:
  • 0: muted.
  • 100: the original volume. This is the default value.
  • 400: The maximum value can be four times the original volume. The limit value is protected.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ adjustUserPlaybackSignalVolume:forUserID:

- (int) adjustUserPlaybackSignalVolume: (uint32_t)  volume
forUserID: (uint64_t)  userID 

Adjust the volume of local signal playback from a specified remote user.

After you join the room, you can call the method to set the volume of local audio playback from different remote users or repeatedly adjust the volume of audio playback from a specified remote user.

注解
  • You can call this method after you join a room.
  • The method is valid in the current call. If a remote user exits the room and rejoins the room again, the setting is still valid until the call ends.
  • The method adjusts the volume of the mixing audio published by a specified remote user. Only one remote user can be adjusted. If you want to adjust multiple remote users, you need to call the method for the required times.
参数
userIDThe ID of a remote user.
volumeThe playback volume. Valid values: 0 to 100.
  • 0: muted
  • 100: the original volume
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ cleanupEngineMediaStatsObserver

- (int) cleanupEngineMediaStatsObserver

Clears all media stats observers.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ enableAudioVolumeIndication:interval:

- (int) enableAudioVolumeIndication: (BOOL)  enable
interval: (uint64_t)  interval 

Enables reporting users' volume indication.

The method allows the SDK to report to the app the information about the volume of the user that publishes local streams and the remote users (up to three users) that have the highest instantaneous volume. The information about the current speaker and the volume is reported.

If this method is enabled. When a user joins a room and pushes streams, the SDK triggers the onRemoteAudioVolumeIndication callback based on the preset time intervals.

参数
enableThe option whether to prompt the speaker volume.
intervalThe time interval at which the volume prompt is displayed. Unit: milliseconds. The value must be multiples of 100 milliseconds. We recommend that you set the value 200 milliseconds or more.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ enableDualStreamMode:

- (int) enableDualStreamMode: (BOOL)  enable

Enables or disables the dual-stream mode.

The method sets the individual-stream mode or dual-stream mode. If the dual-stream mode is enabled on the publishing client, the receiver can choose to receive the high-quality stream or low-quality stream video. The high-quality stream has a high resolution and high bitrate. The low-quality stream has a low resolution and low bitrate.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • The method applies to only camera data. Video streams from external input and screen sharing are not affected.
  • You can call this method before or after you join a room.
参数
enableA value of YES indicates that the dual-stream mode is enabled. A value of NO indicates that the dual stream mode is disabled.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ enableEarback:volume:

- (int) enableEarback: (BOOL)  enabled
volume: (uint32_t)  volume 

Enables the in-ear monitoring feature.

注解
  • You can call the method when you join in a room.
  • After in-ear monitoring is enabled, you must wear a headset or earpieces to use the in-ear monitoring feature. We recommend that you call onAudioDeviceChanged to monitor the changes of audio devices. Only when the device changes to headset, you can enable in-ear monitoring.
  • In the V4.0.0 release, the volume parameter in enableEarback is invalid. You can call setEarbackVolume to set the volume for in-ear monitoring.
参数
enabledThe option whether to enable in-ear monitoring.
volumeThe volume for in-ear monitoring. Valid values: 0 to 100. The default value is 100.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ enableEncryption:config:

- (int) enableEncryption: (BOOL)  enable
config: (NERtcEncryptionConfig *)  config 

Turns on or off media stream encryption.

自从
V4.4.0

In scenarios with high security requirements such as finance, you can use this method to set the media stream encryption mode before you join the room.

注解
  • You must call this method before you join the room, the encryption mode and key cannot be modified after you join the room. After you leave the room, the SDK will automatically turn off encryption. If you need to turn on encryption again, you need to call this method before you join the room again.
  • In the same room, all users who enable media stream encryption must use the same encryption mode and key. Otherwise, an error kNERtcErrEncryptNotSuitable (30113) occurs if the members have different keys.
  • For security, we recommend that you replace the new key every time the media stream encryption is enabled.
参数
enableThe option whether to enable media stream encryption.
  • YES: enables media stream encryption.
  • NO: disables media stream encryption. This is the default value.
configThe configuration for media stream relay. For more information, see NERtcEncryptionConfig.
返回
0
operation is successful. Otherwise, the operation fails.

◆ enableSuperResolution:

- (int) enableSuperResolution: (BOOL)  enabled

Enables or disables AI super resolution.

自从
V4.4.0
注解
  • Before you enable the AI super resolution feature, contact technical support to activate the AI super resolution feature.
  • AI super resolution is only valid for the following types of video streams:
  • The first 360p video stream received by the local client.
  • The camera feeds captured into the bigstream. The AI super-resolution feature does not currently support restoration and reconstruction of small streams and screen sharing in the substream.
参数
enabledThe option whether to enable AI super resolution. By default, the setting is disabled.
返回
0
operation is successful. Otherwise, the operation fails.

◆ getAudioMixingCurrentPosition:

- (int) getAudioMixingCurrentPosition: (uint64_t *)  position

Gets the playback position of the mixing audio file.

The method gets the playback position of the audio file. Unit: milliseconds. You can call the method when you are in a room.

参数
positionThe playback position of the mixing audio file. Unit: milliseconds.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getAudioMixingDuration:

- (int) getAudioMixingDuration: (uint64_t *)  duration

Gets the duration of the mixing audio file.

The method gets the duration of the mixing audio file. Unit: milliseconds. You can call the method when you are in a room.

参数
durationThe duration of the mixing audio file. Unit: milliseconds.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getAudioMixingPlaybackVolume:

- (int) getAudioMixingPlaybackVolume: (uint32_t *)  volume

Gets the playback volume of the mixing audio.

The method gets the playback volume of mixing audio. You can call the method when you are in a room.

参数
volumeThe playback volume of the mixing audio. Valid values: 0 to 100.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getAudioMixingSendVolume:

- (int) getAudioMixingSendVolume: (uint32_t *)  volume

Gets the volume for publishing mixing audio.

The method gets the volume of mixing audio. You can call the method when you are in a room.

参数
volumeThe volume of publishing audio mixing.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getEffectCurrentPositionWithId:position:

- (int) getEffectCurrentPositionWithId: (uint32_t)  effectId
position: (uint64_t *)  position 

Gets the playback position of a sound effect file.

自从
V4.4.0

The method gets the playback position of the audio file. Unit: milliseconds.

注解
You can call the method when you join a room.
参数
[in]effectIdThe ID of a sound effect file.
[out]positionThe playback position of the sound effect file. Unit: milliseconds.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getEffectDurationWithId:duration:

- (int) getEffectDurationWithId: (uint32_t)  effectId
duration: (uint64_t *)  duration 

Gets the duration of a sound effect file.

自从
V4.4.0

The method gets the duration of the sound effect file. Unit: milliseconds.

注解
You can call the method when you join in a room.
参数
[in]effectIdThe ID of a sound effect file.
[out]durationThe duration of the sound effect file. Unit: milliseconds.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getEffectPlaybackVolumeWithId:volume:

- (int) getEffectPlaybackVolumeWithId: (uint32_t)  effectId
volume: (uint32_t *)  volume 

Gets the playback volume of the sound effect files

参数
effectIdThe ID of a sound effect file.
volumeThe returned volume of the sound effect file.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getEffectSendVolumeWithId:volume:

- (int) getEffectSendVolumeWithId: (uint32_t)  effectId
volume: (uint32_t *)  volume 

Gets the publishing volume of a specified sound effect file.

You can call this method after you join a room.

参数
effectIdThe ID of the specified sound effect file. Each sound effect file has a unique ID.
volumeThe returned publishing volume of the sound effect file.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getLoudspeakerMode:

- (int) getLoudspeakerMode: (bool *)  enabled

Checks whether the speakerphone is enabled.

注解
You can call this method before or after you join a room.
参数
enabledThe option whether to enable the speakerphone mode.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getPlayoutDeviceMute:

- (int) getPlayoutDeviceMute: (bool *)  muted

Gets the mute status of the audio playback device.

参数
mutedThe option whether the device is muted.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ getRecordDeviceMute:

- (int) getRecordDeviceMute: (bool *)  muted

Checks whether the audio capture device is muted.

参数
mutedThe option whether the device is muted.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ isCameraExposurePositionSupported

- (BOOL) isCameraExposurePositionSupported

Checks whether the camera exposure feature is supported.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
YES: The camera exposure feature is supported. NO: The camera exposure feature is not supported.

◆ isCameraFocusSupported

- (BOOL) isCameraFocusSupported

Checks whether the camera manual focus feature is supported.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
YES: The camera manual focus feature is supported. NO: The camera manual focus feature is not supported.

◆ isCameraTorchOn

- (BOOL) isCameraTorchOn

Check whether the flash is turned on on the device.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
YES: turned on; NO: turned off.

◆ isCameraTorchSupported

- (BOOL) isCameraTorchSupported

Checks whether the camera flash feature is supported.

注解
  • In most cases, the app opens the front camera by default. If the front camera does not support the flash feature and you call the method, a value of NO is returned. If you want to check whether the rear camera supports the flash feature, before you call this method, you must first call switchCamera to switch the camera.
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
YES: The camera flash feature is supported. NO: The camera flash feature is not supported.

◆ isCameraZoomSupported

- (BOOL) isCameraZoomSupported

Checks whether the camera zooming feature is supported.

Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
YES: The camera zooming feature is supported. NO: The camera zooming feature is not supported.

◆ maxCameraZoomScale

- (float) maxCameraZoomScale

Gets maximum zoom ratio supported by the camera.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The maximum zoom ratio is returned.

◆ muteLocalAudio:

- (int) muteLocalAudio: (BOOL)  muted

Stops or resumes publishing the local audio stream.

The method is used to stop or resume publishing the local audio stream.

注解
This method does not change the audio capture state because the audio capture devices are not disabled.
  • The mute state is reset to unmuted after the call ends.
参数
mutedThe option whether to enable publishing the local audio stream.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ muteLocalVideo:

- (int) muteLocalVideo: (BOOL)  muted

Stops or resumes publishing the local video stream.

If you call the method successfully, the remote client triggers the onNERtcEngineUser:videoMuted: callback.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • If you call this method to stop publishing the local video stream, the SDK no longer publishes the local video stream. You can call the method before or after you join a room.
  • If you stop publishing the local video stream by calling this method, the setting is reset to the default state that allows the app to publish the local video stream.
  • The method is different from enableLocalVideo. The enableLocalVideo method turns off local camera devices. The muteLocalVideoStreamvideo method does not affect local video capture, or disables cameras, and responds faster.
参数
mutedThe option whether to stop publishing the local video stream.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pauseAllEffects

- (int) pauseAllEffects

Pauses playing all sound effect files.

You can call this method after you join a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pauseAudioMixing

- (int) pauseAudioMixing

Pauses playing and mixing the music file.

The method pauses playing mixing audio. You can call the method when you are in a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pauseEffectWitdId:

- (int) pauseEffectWitdId: (uint32_t)  effectId

Pauses playing a specified sound effect file.

You can call this method after you join a room.

参数
effectIdThe ID of a sound effect file.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ playEffectWitdId:effectOption:

- (int) playEffectWitdId: (uint32_t)  effectId
effectOption: (NERtcCreateAudioEffectOption *)  option 

Plays back a specified sound effect file.

The method plays a specified local or online sound effect file.

  • If you call the method and the playback ends, the onAudioEffectFinished playback is triggered.
  • Supported audio formats: MP3, M4A, AAC, 3GP, WMA, and WAV. Files that are stored in local storage or URLs are supported.
注解
  • You can call this method after you join a room.
  • You can call the method multiple times. You can play multiple sound effect files simultaneously by passing in different effectId and options. Various sound effects are mixed. To gain optimal user experience, we recommend you play no more than three sound effect files at the same time.
参数
effectIdThe ID of the specified sound effect. Each sound effect has a unique ID.
optionThe parameters, such as the type of mixing audio tasks, and the path of the mixing audio file. For more information, see NERtcCreateAudioEffectOption.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pullExternalAudioFrame:length:

- (int) pullExternalAudioFrame: (void *_Nonnull)  data
length: (int)  len 

Pulls the external audio data.

The method pulls the audio data from the internal audio engine. After you enable the external audio data rendering functionality by calling setExternalAudioRender, you can use pullExternalAudioFrame to get the audio PCM data.

注解
  • You must join a room before you can call the method.
  • We recommend that you set the duration of data frames to match a cycle of 10 ms.
  • The method becomes invalid if the audio rendering device is turned off. In this case, no data is returned. For example, when calls end, and when the speakerphone is shut off before calls.
参数
dataThe data pointer.
lenThe size of the audio data that are pulled. Unit: bytes. We recommend that the duration of the audio data at least last 10 ms, and the data size cannot exceed 7680 bytes.
Formula: len = sampleRate/1000 × 2 × channels × duration of the audio data in milliseconds
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pushExternalAudioFrame:

- (int) pushExternalAudioFrame: (NERtcAudioFrame *)  frame

Publishes the external audio frame.

The method pushes the external audio frame data to the internal audio engine. If you enable the external audio data source by calling setExternalAudioSource, you can use pushExternalAudioFrame to send audio PCM data.

注解
  • You must join a room before you can call the method.
  • We recommend that you set the duration of data frames to match a cycle of 10 ms.
  • The method becomes invalid if the audio input device is turned off. For example, disable local audio, end calls, and shut off the microphone test before calls.
参数
frameThe external audio frame data. The data cannot exceed 7,680 bytes.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ pushExternalVideoFrame:

- (int) pushExternalVideoFrame: (NERtcVideoFrame *)  frame

Publishes the external video frames.

The method actively publishes the data of video frames that are encapsulated with the NERtcVideoFrame class to the SDK.

注解
  • The method enables the internal engine. The setting remains unchanged after you call the leaveChannel method.
  • Make sure that you have already called setExternalVideoSource with a value of YES before you call this method. Otherwise, an error message is repeatedly prompted if you call the method.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
frameThe information about video frame data. For more information, see NERtcVideoFrame.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ removeEngineMediaStatsObserver:

- (int) removeEngineMediaStatsObserver: (id< NERtcEngineMediaStatsObserver >)  observer

Removes the specified media stats observer.

参数
observerThe stats observer
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ removeLiveStreamTask:compeltion:

- (int) removeLiveStreamTask: (NSString *)  taskId
compeltion: (NERtcLiveStreamCompletion completion 

Deletes a streaming task.

注解
  • The method is applicable to only live streaming.
  • You can call the method when you are in a room. The method is valid for calls.
参数
taskIdThe ID of a streaming task.
completionThe result. The callback is triggered after the method is called. For more information, see NERtcLiveStreamCompletion.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ resumeAllEffects

- (int) resumeAllEffects

Resumes playing all sound effect files.

You can call this method after you join a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ resumeAudioMixing

- (int) resumeAudioMixing

The method resumes mixing audio playback and continues playing the mixing audio.

You can call the method when you are in a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ resumeEffectWitdId:

- (int) resumeEffectWitdId: (uint32_t)  effectId

Resumes playing a specified sound effect file.

You can call this method after you join a room.

参数
effectIdThe ID of the specified sound effect. Each sound effect has a unique ID.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ sendSEIMsg:

- (int) sendSEIMsg: (NSData *)  data

Sends SEI data through the bigstream.

When you publish the local audio and video stream, SEI data is also sent to sync some additional information. After SEI data is sent, the receiver can retrieve the content by listening for the onRecvSEIMsg callback.

  • Condition: After you publish the video stream using the bigstream and substream, you can invoke the method.
  • Data limit in length: The SEI data can contain a maximum of 4,096 bytes in size. Sending an SEI message fails if the data exceeds the size limit. If a large amount of data is sent, the video bitrate rises. This degrades the video quality or causes broken video frames.
  • Frequency limit: We recommend that the maximum video frame rate does not exceed 10 fps.
  • Time to take effect: After the method is called, the SEI data is sent from the next frame in the fastest fashion or after the next 5 frames at the slowest pace.
注解
  • The SEI data is transmitted together with the video stream. If video frame loss occurs due to poor connection quality, the SEI data will also get dropped. We recommend that you increase the frequency within the transmission limits. This way, the receiver can get the data.
  • By default, the SEI is transmitted by using the bigstream.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
dataThe custom SEI data.
返回
The value returned. A value of 0 indicates that the operation is successful. -Success: The SEI data joins the queue and is ready for delivery. The data will be sent after the most recent video frame. -Failure: If the data is restricted, the frequency may be too high, the queue is full, or the data size exceeds the maximum value of 4k

◆ sendSEIMsg:streamChannelType:

- (int) sendSEIMsg: (NSData *)  data
streamChannelType: (NERtcStreamChannelType type 

Sends supplemental enhancement information (SEI) data through a specified bigstream or substream.

When you publish the local audio and video stream, SEI data is also sent to sync some additional information. After SEI data is sent, the receiver can retrieve the content by listening for the onRecvSEIMsg callback.

  • Condition: After you publish the video stream using the bigstream and substream, you can invoke the method.
  • Data limit in length: The SEI data can contain a maximum of 4,096 bytes in size. Sending an SEI message fails if the data exceeds the size limit. If a large amount of data is sent, the video bitrate rises. This degrades the video quality or causes frozen frames.
  • Frequency limit: We recommend that the maximum video frame rate does not exceed 10 fps.
  • Time to take effect: After the method is called, the SEI data is sent from the next frame in the fastest fashion or after the next 5 frames at the slowest pace.
注解
  • The SEI data is transmitted together with the video stream. If video frame loss occurs due to poor connection quality, the SEI data will also get dropped. We recommend that you increase the frequency within the transmission limits. This way, the receiver can get the data.
  • Before you specify a channel to transmit the SEI data, you must first enable the data transmission channel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
dataThe custom SEI data.
typeThe type of the channel with which the SEI data is transmitted. For more information, see NERtcStreamChannelType.
返回
The value returned. A value of 0 indicates that the operation is successful. -Success: The SEI data joins the queue and is ready for delivery. The data will be sent after the most recent video frame. -Failure: If the data is restricted, the frequency may be too high, the queue is full, or the data exceeds the maximum value of 4k.

◆ setAudioEffectPreset:

- (int) setAudioEffectPreset: (NERtcVoiceChangerType type

Sets an SDK preset voice changer effect.

The method can apply multiple preset voice changer effects to original human voices and change audio profiles.

注解
  • You can call this method either before or after joining a room. By default, the audio effect is disabled after the call ends.
  • The method conflicts with setLocalVoicePitch. After you call this method, the voice pitch is reset to the default value 1.0.
参数
typeThe type of the preset voice changer effect. By default, the sound effect is disabled. For more information, see NERtcVoiceChangerType.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setAudioFrameObserver:

- (int) setAudioFrameObserver: (nullable id< NERtcEngineAudioFrameObserver >)  observer

Registers the audio observer.

The method can set audio capture or play PCM data callbacks. The method can process audio streams. The method can register the callback that is triggered by the audio engine, such as onPlaybackFrame.

注解
You can set or modify the method before or after you join a room.
参数
observerThe audio frame observer.
If you pass in NULL, you cancel the registration and clear the settings of NERtcAudioFrameRequestFormat. For more information, see NERtcEngineAudioFrameObserver.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setAudioMixingPlaybackVolume:

- (int) setAudioMixingPlaybackVolume: (uint32_t)  volume

Adjusts the volume of mixing audio for local playback.

The method adjusts the volume of mixing audio for local playback. You can call the method when you are in a room.

参数
volumeThe playback volume of the mixing audio. Valid values: 0 to 100. The default value of 100 indicates the original volume.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setAudioMixingPosition:

- (int) setAudioMixingPosition: (uint64_t)  position

Sets the playback position of the mixing audio file to a different starting position.

The method sets the playback position of the mixing audio file to a different starting position. The method allows you to play the mixing audio file from the position based on your requirements rather than from the beginning.

参数
positionThe playback position of the mixing audio file. Unit: milliseconds.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setAudioMixingSendVolume:

- (int) setAudioMixingSendVolume: (uint32_t)  volume

Sets the publishing volume of the mixing audio.

参数
volumeThe volume of publishing mixing audio. Valid values: 0 to 100. The default value of 100 indicates the original volume.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setAudioSessionOperationRestriction:

- (int) setAudioSessionOperationRestriction: (NERtcAudioSessionOperationRestriction restriction

Sets permissions of the SDK over Audio Session.

This method is only applicable to the iOS platform. This method controls the permissions of the SDK over Audio Session. By default, the SDK and the app have control over the Audio Session. However, in some cases, the app wants to restrict the SDK's permissions over Audio Session and uses other applications or third-party components to control Audio Session. The app can adjust the permissions of the SDK by calling this method. You can call this method only before you join the room.

注解
If you call this method to restrict the SDK's permissions over Audio Session, the SDK cannot set Audio Session. You need to manage Audio Session or use a third-party component to operate Audio Session.
参数
restrictionThe restriction applied to the SDK for Audio Session. For more information, see NERtcAudioSessionOperationRestriction.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setCameraExposurePosition:

- (int) setCameraExposurePosition: (CGPoint)  positionInView

Sets the camera exposure position.

After you call the method, the onCameraExposureChanged callback is triggered on the local client.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
positionInViewThe exposure position point.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setCameraFocusPositionX:Y:

- (int) setCameraFocusPositionX: (float)  focusX
Y: (float)  focusY 

Sets the camera manual focus position.

After you call the method, the onNERtcCameraFocusChanged callback is triggered on the local client.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
xThe horizontal coordinate of the touch point in the view. Value range: 0 to 1.
yThe vertical coordinate of the touch point in the view. Value range: 0 to 1.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setCameraTorchOn:

- (int) setCameraTorchOn: (BOOL)  on

Enables or disables the camera flash feature.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
onYES: turn on. NO: turn off.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setCameraZoomFactor:

- (int) setCameraZoomFactor: (float)  factor

Sets the current camera zoom ratio.

注解
  • Make sure that you call this method after the camera starts. For example, you can call this method after you call startPreview or joinChannel.
  • Before you call this method, we recommend that you view the maximum zoom ratio supported by the camera by calling getCameraMaxZoom and set a zooming ratio as required.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
factorThe zoom ratio supported by the camera.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setCloudProxy:

- (int) setCloudProxy: (NERtcTransportType proxyType

开启并设置云代理服务。
在内网环境下,如果用户防火墙开启了网络限制,请参考《使用云代理》将指定 IP 地址和端口号加入防火墙白名单,然后调用此方法开启云代理,并将 proxyType 参数设置为 NERtcTransportTypeUDPProxy(1),即指定使用 UDP 协议的云代理。

  • 成功连接云代理后,SDK 会触发 onNERtcEngineConnectionStateChangeWithState(kNERtcConnectionStateConnecting, kNERtcReasonConnectionChangedSettingProxyServer) 回调。
  • 如果需要关闭已设置的云代理,请调用 setCloudProxy(NERtcTransportTypeNoneProxy)
    注解
    请在加入房间前调用此方法。
    参数
    proxyType云代理类型。详细信息请参考 NERtcTransportType。该参数为必填参数,若未赋值,SDK 会报错。
    返回
    0
    方法调用成功,其他失败。

◆ setEarbackVolume:

- (int) setEarbackVolume: (uint32_t)  volume

Sets the volume for in-ear monitoring.

参数
volumeThe volume for in-ear monitoring. Valid values: 0 to 100. The default value is 100.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setEffectPlaybackVolumeWithId:volume:

- (int) setEffectPlaybackVolumeWithId: (uint32_t)  effectId
volume: (uint32_t)  volume 

Sets the playback volume of the sound effect files.

You can call this method after you join a room.

参数
effectIdThe ID of the specified audio effect file. Each sound effect file has a unique ID.
volumeThe playback volume of the sound effect file. Valid values: 0 to 100. The default value is 100.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setEffectSendVolumeWithId:volume:

- (int) setEffectSendVolumeWithId: (uint32_t)  effectId
volume: (uint32_t)  volume 

Sets the publishing volume of a sound effect file.

You can call this method after you join a room.

参数
effectIdThe ID of the specified sound effect. Each sound effect has a unique ID.
volumeThe publishing volume of the sound effect file. Valid values: 0 to 100. The default value of 100 indicates the original volume.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setExternalAudioRender:sampleRate:channels:

- (int) setExternalAudioRender: (BOOL)  enabled
sampleRate: (int32_t)  sampleRate
channels: (int32_t)  channels 

Sets external audio rendering.

The method is suitable for scenarios that require personalized audio rendering. By default, the setting is disabled. If you choose an audio playback device or a sudden restart occurs, the setting becomes invalid.

After you call the method, you can use pullExternalAudioFrame to get audio PCM data.

注解
  • You can call this method before you join a room.
  • The method enables the internal engine. The virtual component works instead of the physical speaker. The setting remains valid after you call the leaveChannel method. If you want to disable the functionality, you must disable the functionality before the next call starts.
  • After you enable the external audio rendering, some functionalities of the speakerphone supported by the SDK are replaced by the external audio source. Settings that are applied to the speakerphone become invalid or do not take effect in calls. For example, external rendering is required to play the external audio when you use loopback for testing.
参数
enabledThe option whether to enable external audio rendering.
sampleRateThe sample rate of the external audio rendering. Unit: Hz. Valid values: 16000, 32000, 44100, and 48000.
channelsThe number of channels for external audio rendering. Valid values:
  • 1: mono sound
  • 2: stereo sound
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setExternalAudioSource:sampleRate:channels:

- (int) setExternalAudioSource: (BOOL)  enabled
sampleRate: (int32_t)  sampleRate
channels: (int32_t)  channels 

Sets the external audio input source.

After you call the method, the setting becomes invalid if you choose an audio input device or a sudden restart occurs. After the method is called, you can call pushExternalAudioFrame to send the pulse-code modulation (PCM) data.

注解
  • You can call this method before you join a room.
  • The method enables the internal engine. The virtual component works instead of the physical speaker. The setting remains valid after you call the leaveChannel method. If you want to disable the feature, you must disable the setting before the next call starts.
  • After you enable the external audio data input, some functionalities of the speakerphone supported by the SDK are replaced by the external audio source. Settings that are applied to the speakerphone become invalid or do not take effect in calls. For example, you can hear the external data input when you use loopback for testing.
参数
enabledThe option whether to enable external data input. The default value is NO.
sampleRateThe sample rate of the external audio source. Unit: Hz. Recommended values: 8000, 16000, 32000, 44100, and 48000.
channelsThe number of sound channels. Valid values:
  • 1: mono sound
  • 2: stereo sound
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setExternalVideoSource:isScreen:

- (int) setExternalVideoSource: (BOOL)  enable
isScreen: (BOOL)  isScreen 

Enables or disables the external video input source.

  • The method enables the internal engine. The setting remains unchanged after you call the leaveChannel method. If you want to disable the setting, you must disable the setting before the next call starts.
  • If you want to use external video sources, you must call this method before you call startScreenCapture, enableLocalVideo, and startVideoPreview.
  • By default, the external video source uses the substream for screen sharing and uses the bigstream in scenarios other than screen sharing. The external video source cannot use the same stream as the camera.
  • If the bigstream is used and enabled for the external video source, do not change the setting. If the substream channel is used and enabled, do not change the setting.
注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
enableThe option whether to use the external video source.
  • true: uses the external video source.
  • false: does not use the external video source. This is the default value.
    参数
    isScreenThe option whether the external video source is used for screen sharing.
    返回
    The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalCanvasWatermarkConfigs:withStreamType:

- (int) setLocalCanvasWatermarkConfigs: (nullable NERtcCanvasWatermarkConfig *)  config
withStreamType: (NERtcStreamChannelType type 

Adds a watermark image to the local video.

注解
  • The setLocalCanvasWatermarkConfigs method applies to the local video canvas and does not affect the video stream. If the canvas is removed, the watermark will be automatically deleted.
  • Before you set a watermark, you must first set the canvas by calling related methods.
参数
typeThe type of video streams. You can set the value to bigstream or substream. For more information, see NERtcStreamChannelType.
configThe configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null indicates removing the watermark. For more information, see NERtcCanvasWatermarkConfig.
注解
The API is disabled in the audio-only SDK. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalMediaPriority:preemptive:

- (int) setLocalMediaPriority: (NERtcMediaPriorityType priority
preemptive: (BOOL)  preemptive 

Sets the priority of media streams from a local user.

If a user has a high priority, the media stream from the user also has a high priority. In unreliable network connections, the SDK guarantees the quality of the media stream from users with a high priority.

注解
  • You must call the method before you call joinChannel.
  • After you switch the room by calling switchChannel, the media stream priority is restored to the default normal priority.
参数
priorityThe priority of the local media stream. The default value is kNERtcMediaPriorityNormal, which indicates the normal priority. For more information, see NERtcMediaPriorityType.
isPreemptiveThe option whether to enable the preempt mode.
  • If the preempt mode is enabled, the local media stream preempts the high priority over other users. The priority of the media stream whose priority is taken becomes normal. After the user who preempts the priority leaves the room, other users still keep the normal priority.
  • If the preempt mode is disabled, and a user in the room has a high priority, then, the high priority of the local client remains invalid and is still normal.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalPublishFallbackOption:

- (int) setLocalPublishFallbackOption: (NERtcStreamFallbackOptions option

Sets the fallback option for the published local video stream based on the network conditions.

The quality of the published local audio and video streams is degraded with poor quality network connections. After you call this method and set the option to kNERtcStreamFallbackOptionAudioOnly:

  • With unreliable uplink network connections and the quality of audio and video streams degraded, the SDK switches to receive a low-quality video stream or stops receiving video streams. This way, the audio quality is maintained or improved. The SDK monitors the network performance and recover audio and video streams if the network quality improves.

If the published audio and video stream from the local client falls back to the audio stream, or recovers to the audio and video stream, the SDK triggers the onLocalPublishFallbackToAudioOnly callback.

注解
You must call the method before you call joinChannel.
自从
V4.3.0
参数
optionThe fallback options for publishing audio and video streams. The default value is disabled. For more information, see NERtcStreamFallbackOptions.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalRenderScaleMode:

- (int) setLocalRenderScaleMode: (NERtcVideoRenderScaleMode mode

Sets the local video display mode.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
modeThe video display mode. For more information, see NERtcVideoRenderScaleMode.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalRenderSubStreamScaleMode:

- (int) setLocalRenderSubStreamScaleMode: (NERtcVideoRenderScaleMode mode

Sets the display mode of the local substream video for screen sharing.

Use this method if you want to enable screen sharing through the local substream. Apps can call this method multiple times to change the display mode.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • Before you can call this method, you must set up the canvas for the local substream by calling setupLocalSubStreamVideoCanvas.
参数
modeThe video display mode. For more information, see NERtcVideoRenderScaleMode.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalVoiceEqualizationOfBandFrequency:withGain:

- (int) setLocalVoiceEqualizationOfBandFrequency: (NERtcAudioEqualizationBandFrequency bandFrequency
withGain: (NSInteger)  gain 

Sets the local voice equalization effect, or customizes center frequencies of the local voice effects.

注解
You can call this method before or after you join a room. By default, the audio effect is disabled after the call ends.
参数
bandFrequencyThe band frequency. Value range: 0 to 9. The values represent the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz.
bandGainThe gain of each band (dB). Value range: -15 to 15. The default value is 0.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLocalVoicePitch:

- (int) setLocalVoicePitch: (double)  pitch

Sets the voice pitch of the local audio.

The method changes the voice pitch of the local speaker.

注解
  • After the call ends, the setting changes back to the default value 1.0.
  • The method conflicts with setAudioEffectPreset. After you call this method, the preset voice beautifier effect will be removed.
参数
pitchThe voice frequency. Valid values: 0.5 to 2.0. Smaller values have lower pitches. The default value is 1, which indicates that the pitch is not changed.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setLoudspeakerMode:

- (int) setLoudspeakerMode: (bool)  enable

Enables or disables the audio playback route to the speakerphone.

The method is used to specify whether to route audio playback to the speakerphone.

注解
You can call this method before or after you join a room.
参数
enableThe option whether to route the audio playback to the external loudspeaker.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setMixedAudioFrameParameters:

- (int) setMixedAudioFrameParameters: (nullable NERtcAudioFrameRequestFormat *)  format

Sets the format of the recording and mixing audio.

The method sets the format of the audio frames returned by onNERtcEngineMixedAudioFrame.

  • You can set or modify the format before or after you join a room. leaveChannel is reset to nil.
  • You can set only the sample rate.
  • If you do not use the method to set the format, the default value of the sample rate supported by the SDK is returned.
参数
formatThe sample rate and the number of channels returned by onNERtcEngineMixedAudioFrame. A value of nil is allowed. The default value is nil, which indicates that the original format of the audio file is used. For more information, see NERtcAudioFrameRequestFormat.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setPlaybackAudioFrameParameters:

- (int) setPlaybackAudioFrameParameters: (nullable NERtcAudioFrameRequestFormat *)  format

Sets the audio playback format.

The method sets the playback format of the audio data returned by onNERtcEngineAudioFrameWillPlayback.

注解
  • You can set or modify the format before or after you join a room.
  • To cancel listeners for the callback, reset the value to nil.
参数
formatThe sample rate and the number of channels returned by onNERtcEngineAudioFrameDidRecord.
A value of nil is allowed. The default value is nil, which indicates that the original format of the audio file is used. For more information, see NERtcAudioFrameRequestFormat.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setPlayoutDeviceMute:

- (int) setPlayoutDeviceMute: (bool)  muted

Mutes or unmutes the audio playback device.

参数
mutedThe option whether to mute the playback device. By default, the setting is unmuted.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRecordDeviceMute:

- (int) setRecordDeviceMute: (bool)  muted

Mutes or unmutes the audio capture device.

参数
mutedThe option whether to mute the audio capture device. The default setting is unmuted.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRecordingAudioFrameParameters:

- (int) setRecordingAudioFrameParameters: (nullable NERtcAudioFrameRequestFormat *)  format

Sets the format of audio capture.

The method sets the format of the recording for onNERtcEngineAudioFrameDidRecord.

注解
  • You can set or modify the format before or after you join a room.
  • To cancel listeners for the callback, reset the value to nil.
参数
formatThe sample rate and the number of channels returned by onNERtcEngineAudioFrameDidRecord.
A value of nil is allowed. The default value is nil, which indicates that the original format of the audio file is used. For more information, see NERtcAudioFrameRequestFormat.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRemoteCanvasWatermarkConfigs:forUserID:withStreamType:

- (int) setRemoteCanvasWatermarkConfigs: (nullable NERtcCanvasWatermarkConfig *)  config
forUserID: (uint64_t)  userID
withStreamType: (NERtcStreamChannelType type 

Adds a watermark to the remote video canvas.

注解
  • The setRemoteCanvasWatermarkConfigs method Adds a watermark to the remote video canvas and does not affect the video stream. If the canvas is removed, the watermark will be automatically deleted.
  • Before you set a watermark, you must first set the canvas by calling related methods.
参数
userIDThe ID of a remote user.
typeThe type of video streams. You can set the value to bigstream or substream. For more information, see NERtcStreamChannelType.
configThe configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null indicates to remove the watermark. For more information, see NERtcCanvasWatermarkConfig.
注解
The API is disabled in the audio-only SDK. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRemoteRenderScaleMode:forUserID:

- (int) setRemoteRenderScaleMode: (NERtcVideoRenderScaleMode mode
forUserID: (uint64_t)  userID 

Sets the remote video display mode.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
modeThe video display mode. For more information, see NERtcVideoRenderScaleMode.
userIDThe ID of a remote user.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRemoteRenderSubStreamVideoScaleMode:forUserID:

- (int) setRemoteRenderSubStreamVideoScaleMode: (NERtcVideoRenderScaleMode mode
forUserID: (uint64_t)  userID 

Sets the display mode of to remote substream video for screen sharing.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK. -Before you call this API, you must subscribe to the remote video substream for screen sharing by using subscribeRemoteSubStreamVideo.
参数
modeThe video display mode. For more information, see NERtcVideoRenderScaleMode.
userIDThe ID of a remote user.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setRemoteSubscribeFallbackOption:

- (int) setRemoteSubscribeFallbackOption: (NERtcStreamFallbackOptions option

Sets the fallback option for the subscribed remote audio and video stream with poor network connections.

The quality of the subscribed audio and video streams is degraded with unreliable network connections. After you set the fallback options for the subscribed audio and video stream by using this method:

  • With unreliable downstream network connections, the SDK switches to receive a low-quality video stream or stops receiving video streams. This way, the audio quality is maintained or improved. The SDK monitors the network quality and resumes the video stream when the network conditions improve. If the subscribed remote video stream falls back to an audio-only stream, or the audio-only stream switches back to the video stream, the SDK triggers the onNERtcEngineRemoteSubscribeFallbackToAudioOnly callback.
注解
You must call the method before you call joinChannel.
自从
V4.3.0
参数
optionThe fallback option for subscribing to audio and video streams. The default setting is to fall back to the low-quality video stream in the poor network. For more information, see NERtcStreamFallbackOptions.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setupLocalSubStreamVideoCanvas:

- (int) setupLocalSubStreamVideoCanvas: (NERtcVideoCanvas *)  canvas

Sets the local substream canvas.

This method is used to set the display information about the local screen sharing with the substream video. The app associates with the video view of local substream by calling this method. During application development, in most cases, before joining a room, you must first call this method to set the local video view after the SDK is initialized.

注解
  • If the app uses external rendering, we recommend that you set the video view before you join the room.
  • Before you join a room, you must call the method after the SDK is initialized.
  • A canvas is configured for only one user.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
canvasThe video canvas. For more information, see NERtcVideoCanvas. To delete the canvas setting, set the value to nil.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setupRemoteSubStreamVideoCanvas:forUserID:

- (int) setupRemoteSubStreamVideoCanvas: (NERtcVideoCanvas *)  canvas
forUserID: (uint64_t)  userID 

Sets a remote substream canvas.

The method associates a remote user with a substream view. You can assign a specified userID to use a corresponding canvas.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • If the app uses external rendering, we recommend that you set the canvas after you receive the return of onUserJoined.
  • If the app does not retrieve the ID of a remote user, you can call the method after the remote user joins the room. You can retrieve the uid of the remote user from the return of onNERtcEngineUserDidJoinWithUserID. You can use this method to set the substream video canvas.
  • If the remote user leaves the room, the SDK disassociates the remote user from the canvas. The setting automatically becomes invalid.
参数
userIDThe ID of a remote user.
canvasThe video canvas. For more information, see NERtcVideoCanvas. To delete the canvas setting, set the value to nil.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setVideoRotationMode:

- (int) setVideoRotationMode: (NERtcVideoRotationMode rotationMode

Sets the orientation mode for the local video.

This API is used to set the orientation mode of the local video screen on the local and remote devices. You can specify that the local screen adapts to the landscape or portrait mode of the system device, or the landscape or portrait mode of the app UI.

注解
You must call this method before you join a room.
  • Regardless of which orientation mode you select, the modes of the capture client and the playback client must be the same. The local screen and the remote view of the local screen have the same mode.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
自从
V4.3.0
参数
rotationModeThe video orientation mode. For more information, see NERtcVideoRotationMode.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ setVoiceBeautifierPreset:

- (int) setVoiceBeautifierPreset: (NERtcVoiceBeautifierType type

Sets an SDK preset voice beautifier effect.

The method can set an SDK preset voice beautifier effect for a local user who publishes an audio stream.

注解
You can call this method before or after you join a room. By default, the audio effect is disabled after the call ends.
参数
typeThe type of the preset voice beautifier effect. By default, the voice beautifier effect is disabled. For more information, see NERtcVoiceBeautifierType.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ startAudioDump

- (int) startAudioDump

Starts recording an audio dump file.

Audio dump files can be used to analyze audio issues.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ startAudioMixingWithOption:

- (int) startAudioMixingWithOption: (NERtcCreateAudioMixingOption *)  option

Starts to play or mix the music file.

This method mixes the specified local or online audio file with the audio stream captured from the recording device.

  • Supported audio formats: MP3, M4A, AAC, 3GP, WMA, and WAV. Files that are stored in local storage or URLs are supported.
  • If the playback status changes, the onAudioMixingStateChanged callback is triggered on the local client.
注解
  • You can call this method after you join a room.
  • Starting from V4.3.0, if you call this method to play a music file during a call, and manually set the playback volume or publishing volume of the mixing audio, the setting is applied when you call the method again during the current call.
  • Starting from V4.4.0, the operation to turn on or off local audio capture no longer affects the playback of music files. The music file is still playing after you call enablingLocalAudio(NO).
参数
optionThe options when you configure a mixing audio task, such as the type of audio mixing tasks, the full path of the mixing audio file, or URL. For more information, see NERtcCreateAudioMixingOption.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ startAudioRecording:sampleRate:quality:

- (int) startAudioRecording: (NSString *)  filePath
sampleRate: (int)  sampleRate
quality: (NERtcAudioRecordingQuality quality 

Starts an audio recording from a client.

The method records the mixing audio from all room members in the room, and store the recording file locally. The onAudioRecording() callback is triggered when the recording starts or ends.

If you specify a type of audio quality, the recording file is saved in different formats.

  • A WAV file is large with high quality
  • An AAC file is small with low quality.
注解
  • You must call the method after you call joinChannel.
  • A client can only run a recording task. If you repeatedly call the startAudioRecording method, the current recording task stops and a new recording task starts.
  • If the current user leaves the room, audio recording automatically stops. You can call the stopAudioRecording method to manually stop recording during calls.
参数
filePathThe file path where the recording file is stored. The file name and format are required. For example, sdcard/xxx/audio.aac.
  • Make sure that the path is valid and has the write permissions.
  • Only WAV or AAC files are supported.
sampleRateThe recording sample rate. Valid values: 16000,32000, 44100, and 48000. The default value is 32000.
qualityThe audio quality. The parameter is valid only the recording file is in AAC format. For more information, see NERtcAudioRecordingQuality.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ startChannelMediaRelay:

- (int) startChannelMediaRelay: (NERtcChannelMediaRelayConfiguration *_Nonnull)  config

Starts to relay media streams across rooms.

  • The method can invite co-hosts across rooms. Media streams from up to four rooms can be relayed. A room can receive multiple relayed media streams.
  • After you call the method, the SDK triggers onNERtcEngineChannelMediaRelayStateDidChange and onNERtcEngineDidReceiveChannelMediaRelayEvent. The callback reports the status and events about the current relayed media streams across rooms.
注解
  • You can call this method after you join a room. Before you call the method, you must set the destination room by calling setDestinationInfo in the config parameter.
  • The method is applicable only to the host in live streaming.
    • If you want to call the method again, you must first call the stopChannelMediaRelay method to exit the current relay status.
  • If you succeed in relaying the media stream across rooms, and want to change the destination room, for example, add or remove the destination room, you can call updateChannelMediaRelay to update the information about the destination room.
参数
configThe configuration for media stream relay across rooms. For more information, see NERtcChannelMediaRelayConfiguration.
返回
A value of 0 returned indicates that the operation is successful. Otherwise, the operation fails.

◆ startPreview

- (int) startPreview

Enables video preview.

  • The method is used to enable the local video preview before you join a room. Before you can call the API, you must call setupLocalVideoCanvas to set up a video canvas.
  • If the local video preview is enabled, you must call the stopVideoPreview method to stop local video preview before you join the room.
注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ startScreenCapture:

- (int) startScreenCapture: (NERtcVideoSubStreamEncodeConfiguration *)  config

Enables screen sharing.

The content of the screen sharing is published through the substream.

You can call the method only after you join a room.

If you join a room and call this method to enable the substream, the onUserSubStreamVideoStart callback is triggered on the remote client.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
参数
configThe encoding configuration of the local substream. For more information, see NERtcVideoSubStreamEncodeConfiguration.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopAllEffects

- (int) stopAllEffects

Stops playing all sound effect files.

You can call this method after you join a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopAudioDump

- (int) stopAudioDump

Stops recording an audio dump file.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopAudioMixing

- (int) stopAudioMixing

Stops playing or mixing the music file.

The method stops playing mixing audio. You can call the method when you are in a room.

返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopAudioRecording

- (int) stopAudioRecording

Stops the audio recording on the client.

If the local client leaves the room, audio recording automatically stops. You can call the stopAudioRecording method to manually stop recording during calls.

注解
You must call this method before you call leaveChannel.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopChannelMediaRelay

- (int) stopChannelMediaRelay

Stops media stream relay across rooms.

If the host leave the room, media stream replay across rooms automatically stops. You can also call stopChannelMediaRelay. In this case, the host leaves all destination rooms. If you call this method, the SDK triggers the onNERtcEngineChannelMediaRelayStateDidChange callback. If NERtcChannelMediaRelayStateRunning is returned, the media stream relay stops.

  • If the operation fails, the SDK triggers the onNERtcEngineChannelMediaRelayStateDidChange callback that returns the status code NERtcChannelMediaRelayStateFailure.
    返回
    A value of 0 returned indicates that the operation is successful. Otherwise, the operation fails.

◆ stopEffectWitdId:

- (int) stopEffectWitdId: (uint32_t)  effectId

Stops playing all sound effect files.

You can call this method after you join a room.

参数
effectIdThe ID of the specified sound effect. Each sound effect has a unique ID.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopPreview

- (int) stopPreview

Stops video preview.

注解

  • You must call the method before you join a room.
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ stopScreenCapture

- (int) stopScreenCapture

Disables screen sharing with the substream transmission.

If you use the method to disable the substream after you join a room, the onNERtcEngineUserSubStreamDidStop callback is triggered on the remote client.

注解
The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ subscribeAllRemoteAudio:

- (int) subscribeAllRemoteAudio: (BOOL)  subscribe

Subscribes to or unsubscribes from audio streams from all remote users.

注解
  • After a user joins a room, audio streams from all remote users are subscribed by default. In this case, do not repeat subscribing to audio streams from all remote users by calling subscribeAllRemoteAudioStreams(YES).
  • You must join a room before you can call the method.
  • This setting applies to subsequent users that join the room.
参数
subscribeThe option whether to unsubscribe from audio streams from all remote users.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ subscribeRemoteAudio:forUserID:

- (int) subscribeRemoteAudio: (BOOL)  subscribe
forUserID: (uint64_t)  userID 

Subscribes to or unsubscribes from audio streams from specified remote users.

After a user joins a room, audio streams from all remote users are subscribed by default. You can call this method to subscribe to or unsubscribe from audio streams from all remote users.

注解
You can call this method before or after you join a room.
参数
subscribeThe option whether to subscribe to specified audio streams.
userIDThe ID of a specified remote user.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ subscribeRemoteSubStreamVideo:forUserID:

- (int) subscribeRemoteSubStreamVideo: (BOOL)  subscribe
forUserID: (uint64_t)  userID 

Subscribes to or unsubscribes from remote video substream for screen sharing.

You can receive the video substream data only after you subscribe to the video substream.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • You can call the method only after you join a room.
参数
subscribeThe option whether to subscribe to remote video substream for screen sharing.
userIDThe ID of a remote user.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ subscribeRemoteVideo:forUserID:streamType:

- (int) subscribeRemoteVideo: (BOOL)  subscribe
forUserID: (uint64_t)  userID
streamType: (NERtcRemoteVideoStreamType streamType 

Subscribes to or unsubscribes from video streams from specified remote users.

After a user joins a room, the video streams from remote users are not subscribed by default. If you want to view video streams from specified remote users, you can call this method to subscribe to the video streams from the user when the user joins the room or publishes the video streams.

注解
  • The audio-only SDK disables this API. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
  • You must join a room before you can call the method.
参数
subscribeThe option whether to unsubscribe from local video streams.
userIDThe ID of a specified user.
streamTypeThe type of the video streams. For more information, see NERtcRemoteVideoStreamType.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ takeLocalSnapshot:callback:

- (int) takeLocalSnapshot: (NERtcStreamChannelType streamType
callback: (NERtcTakeSnapshotCallback callback 

Takes a local video snapshot.

The takeLocalSnapshot method takes a local video snapshot on the local bigstream or local substream. The callback that belongs to the NERtcTakeSnapshotCallback class returns the data of the snapshot image.

注解

  • Before you call the method to capture the snapshot from the bigstream, you must first call startVideoPreview or enableLocalVideo, and joinChannel.
  • Before you call the method to capture the snapshot from the substream, you must first call joinChannel and startScreenCapture.
  • You can set text, timestamp, and image watermarks at the same time. If different types of watermarks overlap, the layers overlay previous layers in the image, text, and timestamp sequence.
参数
streamTypeThe video stream type of the snapshot. You can set the value to bigstream or substream.
callbackThe snapshot callback.
注解
The API is disabled in the audio-only SDK. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ takeRemoteSnapshot:forUserID:callback:

- (int) takeRemoteSnapshot: (NERtcStreamChannelType streamType
forUserID: (uint64_t)  userID
callback: (NERtcTakeSnapshotCallback callback 

Takes a snapshot of a remote video.

The takeRemoteSnapshot method takes a snapshot from the remote video published through the bigstream or substream with a specified uid. The callback that belongs to the NERtcTakeSnapshotCallback class returns the data of the snapshot image.

注解

  • Before you call takeRemoteSnapshot, you must first call onUserVideoStart and onNERtcEngineUserSubStreamDidStartWithUserID.
  • You can set text, timestamp, and image watermarks at the same time. If different types of watermarks overlap, the layers overlay previous layers in the image, text, and timestamp sequence.
参数
userIDThe ID of a remote user.
streamTypeThe video stream type of the snapshot. You can set the value to bigstream or substream.
callbackThe snapshot callback.
注解
The API is disabled in the audio-only SDK. If you need to use the API, you can download the standard SDK from the official website of YunXin and replace the audio-only SDK.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ updateChannelMediaRelay:

- (int) updateChannelMediaRelay: (NERtcChannelMediaRelayConfiguration *_Nonnull)  config

Updates the information of the destination room for media stream relay.

You can call this method to relay the media stream to multiple rooms or exit the current room.

  • You can call this method to change the destination room, for example, add or remove the destination room. If you call this method, the SDK triggers the onNERtcEngineChannelMediaRelayStateDidChange callback. If NERtcChannelMediaRelayStateRunning is returned, the media stream relay is successful.
注解
  • Before you call the method, you must join the room and call startChannelMediaRelay to relay the media stream across rooms. Before you call the method, you must set the destination room by calling setDestinationInfo in the config parameter.
  • You can relay the media stream up to four destination rooms. You can first call removeDestinationInfoForChannelName that belongs to the NERtcChannelMediaRelayConfiguration class to remove the rooms that you have no interest in and add new destination rooms.
参数
configThe configuration for media stream relay across rooms. For more information, see NERtcChannelMediaRelayConfiguration.
返回
A value of 0 returned indicates that the operation is successful. Otherwise, the operation fails.

◆ updateLiveStreamTask:compeltion:

- (int) updateLiveStreamTask: (NERtcLiveStreamTaskInfo *)  taskInfo
compeltion: (NERtcLiveStreamCompletion completion 

Updates a streaming task.

注解
  • The method is applicable to only live streaming.
  • You can call the method when you are in a room. The method is valid for calls.
参数
taskInfoThe information about the streaming task. For more information, see NERtcLiveStreamTaskInfo.
completionThe result. The callback is triggered after the method is called. For more information, see NERtcLiveStreamCompletion.
返回
The value returned. A value of 0 indicates that the operation is successful.

◆ uploadSdkInfo

- (int) uploadSdkInfo

Uploads the SDK information.

The data that is published contains the log file and the audio dump file.

注解
You must join a room before you can call the method.
返回
The value returned. A value of 0 indicates that the operation is successful.

该协议的文档由以下文件生成: