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

NERtcEngine extended callback. 更多...

#import <NERtcEngineDelegate.h>

类 <NERtcEngineDelegateEx> 继承关系图:
<NERtcEngineDelegate> <NERtcEngineVideoFrameObserver> <NERtcEngineAudioSessionObserver> <NERtcEngineLiveStreamObserver> <NERtcEngineVideoSEIObserver>

构造函数

(void) - onNERtcEngineUserVideoProfileDidUpdate:maxProfile:
 Occurs when the profile of the video streams from a remote user is updated. 更多...
 
(void) - onNERtcEngineUser:videoMuted:
 Occurs when a remote user stops or resumes sending video streams. 更多...
 
(void) - onNERtcEngineUser:audioMuted:
 Occurs when a remote user stops or resumes sending audio streams. 更多...
 
(void) - onNERtcEngineFirstVideoDataDidReceiveWithUserID:
 Occurs when the first audio frame from a remote user is received. 更多...
 
(void) - onNERtcEngineFirstAudioDataDidReceiveWithUserID:
 Occurs when the first audio frame from a remote user is received. 更多...
 
(void) - onEngineFirstAudioFrameDecoded:
 Occurs when the first audio frame from a remote user is decoded. 更多...
 
(void) - onEngineFirstVideoFrameDecoded:width:height:
 Occurs when the first video frame from a remote user is displayed. 更多...
 
(void) - onNERtcEngineAudioDeviceStateChangeWithDeviceID:deviceType:deviceState:
 Occurs when the state of the audio device changes. 更多...
 
(void) - onNERtcEngineVideoDeviceStateChangeWithDeviceID:deviceType:deviceState:
 Occurs when the video device changes. 更多...
 
(void) - onNERtcEngineNetworkConnectionTypeChanged:
 Occurs when the local network type changes. 更多...
 
(void) - onAudioMixingStateChanged:errorCode:
 Occurs when the playback state of a local music file changes. 更多...
 
(void) - onAudioMixingTimestampUpdate:
 Returns the playback position of a local music file. 更多...
 
(void) - onAudioEffectFinished:
 Occurs when the playback of a music file ends. 更多...
 
(void) - onLocalAudioVolumeIndication:
 Occurs when the system prompts the current local audio volume. 更多...
 
(void) - onRemoteAudioVolumeIndication:totalVolume:
 Occurs when the system prompts the active speaker and the audio volume. 更多...
 
(void) - onNERtcEngineHardwareResourceReleased:
 Occurs when the hardware resources are released. 更多...
 
(void) - onNERtcCameraFocusChanged:
 Occurs when the camera focus position changes. 更多...
 
(void) - onNERtcCameraExposureChanged:
 Occurs when the camera exposure position changes. 更多...
 
(void) - onNERtcEngineAudioHasHowling
 Occurs when howling is detected. 更多...
 
(void) - onNERtcEngineChannelMediaRelayStateDidChange:channelName:
 Occurs when the state of the media stream relay changes. 更多...
 
(void) - onNERtcEngineDidReceiveChannelMediaRelayEvent:channelName:error:
 Returns forwarding events during the media stream relay. 更多...
 
(void) - onNERtcEngineAudioRecording:filePath:
 Returns the audio recording state. 更多...
 
(void) - onNERtcEngineLocalPublishFallbackToAudioOnly:streamType:
 Occurs when the published local media stream falls back to an audio-only stream due to poor network conditions or switches back to audio and video stream after the network conditions improve. 更多...
 
(void) - onNERtcEngineRemoteSubscribeFallbackToAudioOnly:isFallback:streamType:
 Occurs when the subscribed remote media stream falls back to audio-only stream due to poor network conditions or switches back to the audio and video stream after the network conditions improve. 更多...
 
- 构造函数 继承自 <NERtcEngineDelegate>
(void) - onNERtcEngineDidError:
 Occurs when an error occurs. 更多...
 
(void) - onNERtcEngineDidWarning:msg:
 Occurs when a warning occurs. 更多...
 
(void) - onNERtcEngineConnectionStateChangeWithState:reason:
 Occurs when the state of the network connection between the SDK and the server changes. 更多...
 
(void) - onNERtcEngineDidLeaveChannelWithResult:
 Occurs when a user leaves a room. 更多...
 
(void) - onNERtcEngineDidDisconnectWithReason:
 After the connection breaks down and the SDK fails to connect to the server three consecutive times. 更多...
 
(void) - onNERtcEngineRejoinChannel:
 Occurs when a user rejoins a room. 更多...
 
(void) - onNERtcEngineUserDidJoinWithUserID:userName:
 Occurs when a remote user joins the current room. 更多...
 
(void) - onNERtcEngineUserDidLeaveWithUserID:reason:
 Occurs when a remote user leaves a room. 更多...
 
(void) - onNERtcEngineDidClientRoleChanged:newRole:
 Occurs when a user changes the role in live streaming. 更多...
 
(void) - onNERtcEngineReconnectingStart
 Occurs when reconnection starts. 更多...
 
(void) - onNERtcEngineUserAudioDidStart:
 Occurs when a remote user enables audio. 更多...
 
(void) - onNERtcEngineUserAudioDidStop:
 Occurs when a remote user disables audio. 更多...
 
(void) - onNERtcEngineUserVideoDidStartWithUserID:videoProfile:
 Occurs when a remote user enables video. 更多...
 
(void) - onNERtcEngineUserVideoDidStop:
 Occurs when a remote user disables video. 更多...
 
(void) - onNERtcEngineUserSubStreamDidStartWithUserID:subStreamProfile:
 Occurs when a remote user enables screen sharing by using the substream. 更多...
 
(void) - onNERtcEngineUserSubStreamDidStop:
 Occurs when a remote user stops screen sharing by using the substream. 更多...
 
- 构造函数 继承自 <NERtcEngineVideoFrameObserver>
(void) - onNERtcEngineVideoFrameCaptured:rotation:
 Returns the settings for video data capture and uses the settings for operations such as beautifiers. 更多...
 
- 构造函数 继承自 <NERtcEngineAudioSessionObserver>
(void) - onNERtcEngineAudioDeviceRoutingDidChange:
 Occurs when the audio routing changes. 更多...
 
- 构造函数 继承自 <NERtcEngineLiveStreamObserver>
(void) - onNERTCEngineLiveStreamState:taskID:url:
 Occurs when the streaming state in live streaming changes. 更多...
 
- 构造函数 继承自 <NERtcEngineVideoSEIObserver>
(void) - onNERtcEngineRecvSEIMsg:message:
 Occurs when the content of remote SEI is received. 更多...
 

详细描述

NERtcEngine extended callback.

函数文档

◆ onAudioEffectFinished:

- (void) onAudioEffectFinished: (uint32_t)  effectId
optional

Occurs when the playback of a music file ends.

参数
effectIdThe ID of the specified audio effect. Each audio effect has a unique ID.

◆ onAudioMixingStateChanged:errorCode:

- (void) onAudioMixingStateChanged: (NERtcAudioMixingState state
errorCode: (NERtcAudioMixingErrorCode errorCode 
optional

Occurs when the playback state of a local music file changes.

If you call the startAudioMixing method to play a mixing music file and the playback state changes, the callback is triggered.

  • If the playback of the music file ends normally, the state parameter returned in the response contains the corresponding status code kNERtcAudioMixingStateFinished, and the error_code parameter contains kNERtcAudioMixingErrorOK. -If an error occurs in the playback, the kNERtcAudioMixingStateFailed status code is returned, and the error_code parameter returned contains the corresponding reason. -If the local music file does not exist, the file format is not supported, or the URL of the online music file cannot be accessed, the error_code parameter returned contains kNERtcAudioMixingErrorCanNotOpen.
参数
stateThe playback state of the music file. For more information, see NERtcAudioMixingState.
errCodeThe error code. For more information, see NERtcAudioMixingErrorCode.

◆ onAudioMixingTimestampUpdate:

- (void) onAudioMixingTimestampUpdate: (uint64_t)  timeStampMS
optional

Returns the playback position of a local music file.

If you call the startAudioMixing method to play back a mixing music file and the playback position changes, the callback is triggered.

参数
timeStampMSThe playback progress of the music file. Unit: milliseconds.

◆ onEngineFirstAudioFrameDecoded:

- (void) onEngineFirstAudioFrameDecoded: (uint64_t)  userID
optional

Occurs when the first audio frame from a remote user is decoded.

参数
userIDThe ID of a remote user whose audio streams are sent.

◆ onEngineFirstVideoFrameDecoded:width:height:

- (void) onEngineFirstVideoFrameDecoded: (uint64_t)  userID
width: (uint32_t)  width
height: (uint32_t)  height 
optional

Occurs when the first video frame from a remote user is displayed.

If the engine receives the first frame of remote video streams, the callback is triggered. The callback allows the app to set the video 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.
参数
userIDThe ID of a remote user whose video streams are sent.
widthThe width of the first video frame. Unit: px.
heightThe height of the first video frame. Unit: px.

◆ onLocalAudioVolumeIndication:

- (void) onLocalAudioVolumeIndication: (int)  volume
optional

Occurs when the system prompts the current local audio volume.

This callback is disabled by default. You can enable the callback by calling the enableAudioVolumeIndication method.

After the callback is enabled, if a local user speaks, the SDK triggers the callback based on the time interval specified in the enableAudioVolumeIndication method.

If the local user mutes the local audio by calling muteLocalAudio, the SDK no longer reports this callback.

参数
volumeThe audio volume. Value range: 0 to 100.

◆ onNERtcCameraExposureChanged:

- (void) onNERtcCameraExposureChanged: (CGPoint)  exposurePoint
optional

Occurs when the camera exposure position changes.

The callback is triggered if a local user calls the setCameraExposurePosition method to change the exposure position.

注解
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.
参数
exposurePointThe new exposure position.

◆ onNERtcCameraFocusChanged:

- (void) onNERtcCameraFocusChanged: (CGPoint)  focusPoint
optional

Occurs when the camera focus position changes.

The callback indicates that the camera focus position changes.

The callback is triggered if a local user calls the setCameraFocusPosition method to change the focus position.

注解
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.
参数
focusPointThe new focus position.

◆ onNERtcEngineAudioDeviceStateChangeWithDeviceID:deviceType:deviceState:

- (void) onNERtcEngineAudioDeviceStateChangeWithDeviceID: (NSString *)  deviceID
deviceType: (NERtcAudioDeviceType deviceType
deviceState: (NERtcAudioDeviceState deviceState 
optional

Occurs when the state of the audio device changes.

参数
deviceIDThe ID of the device.
deviceTypeThe type of the device. For more information, see NERtcAudioDeviceType.
deviceStateThe state of the audio device. For more information, see NERtcAudioDeviceState.

◆ onNERtcEngineAudioHasHowling

- (void) onNERtcEngineAudioHasHowling
optional

Occurs when howling is detected.

When the distance between the sound source and the PA equipment is too close, howling may occur. The NERTC SDK supports howling detection. When a howling signal is detected, the callback is automatically triggered until the howling stops. The application layer can prompt the user to mute the microphone or directly mute the microphone when the app receives the howling information returned by the callback.

注解
Howling detection is used in human voice scenarios, such as voice chat rooms or online meetings. We recommend that you do not use howling detection in entertainment scenes that include background music.

◆ onNERtcEngineAudioRecording:filePath:

- (void) onNERtcEngineAudioRecording: (NERtcAudioRecordingCode code
filePath: (NSString *)  filePath 
optional

Returns the audio recording state.

参数
codeThe status code of the audio recording. For more information, see NERtcAudioRecordingCode.
filePathThe path based on which the recording file is stored.

◆ onNERtcEngineChannelMediaRelayStateDidChange:channelName:

- (void) onNERtcEngineChannelMediaRelayStateDidChange: (NERtcChannelMediaRelayState state
channelName: (NSString *)  channelName 
optional

Occurs when the state of the media stream relay changes.

参数
stateThe state of the media stream relay. For more information, see NERtcChannelMediaRelayState.
channelNameThe name of the destination room where the media streams are relayed.

◆ onNERtcEngineDidReceiveChannelMediaRelayEvent:channelName:error:

- (void) onNERtcEngineDidReceiveChannelMediaRelayEvent: (NERtcChannelMediaRelayEvent event
channelName: (NSString *)  channelName
error: (NERtcError error 
optional

Returns forwarding events during the media stream relay.

参数
eventThe media stream relay event. For more information, see NERtcChannelMediaRelayEvent.
channelNameThe name of the destination room where the media streams are relayed.
errorThe specific error code. For more information, see NERtcEngineErrorCode.NERtcError.

◆ onNERtcEngineFirstAudioDataDidReceiveWithUserID:

- (void) onNERtcEngineFirstAudioDataDidReceiveWithUserID: (uint64_t)  userID
optional

Occurs when the first audio frame from a remote user is received.

参数
userIDThe ID of a remote user whose audio streams are sent.

◆ onNERtcEngineFirstVideoDataDidReceiveWithUserID:

- (void) onNERtcEngineFirstVideoDataDidReceiveWithUserID: (uint64_t)  userID
optional

Occurs when the first audio frame from a remote user is received.

If the first video frame from a remote user is displayed in the view, the callback is triggered.

注解
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.
参数
userIDThe ID of a remote user whose video streams are sent.

◆ onNERtcEngineHardwareResourceReleased:

- (void) onNERtcEngineHardwareResourceReleased: (NERtcError result
optional

Occurs when the hardware resources are released.

If the callback returns a successful result, the SDK has completely released the hardware resources.

You can reconfigure or use hardware resources, such as AVAudioSession, after you receive the successful result.

参数
resultThe result. For more information, see NERtcEngineErrorCode.NERtcError.

◆ onNERtcEngineLocalPublishFallbackToAudioOnly:streamType:

- (void) onNERtcEngineLocalPublishFallbackToAudioOnly: (BOOL)  isFallback
streamType: (NERtcStreamChannelType streamType 
optional

Occurs when the published local media stream falls back to an audio-only stream due to poor network conditions or switches back to audio and video stream after the network conditions improve.

If you call setLocalPublishFallbackOption and set option to AUDIO_ONLY, this callback is triggered when the locally published stream falls back to audio-only mode due to poor uplink network conditions, or when the audio stream switches back to the audio and video stream after the uplink network conditions improve.

自从
V4.3.0
参数
isFallbackThe option whether the locally published stream falls back to audio-only mode or switches back to audio and video stream.
  • YES: The published stream from a local client falls back to audio-only mode due to poor uplink network conditions.
  • NO: The audio stream switches back to the audio and video stream after the uplink network condition improves.
streamTypeThe type of the video stream, such as bigstream and substream. For more information, see NERtcStreamChannelType.

◆ onNERtcEngineNetworkConnectionTypeChanged:

- (void) onNERtcEngineNetworkConnectionTypeChanged: (NERtcNetworkConnectionType newConnectionType
optional

Occurs when the local network type changes.

If the connection type of the local network changes, the callback is triggered and returns the network connection type that is used.

参数
newConnectionTypeThe current local network type. For more information, see NERtcNetworkConnectionType.

◆ onNERtcEngineRemoteSubscribeFallbackToAudioOnly:isFallback:streamType:

- (void) onNERtcEngineRemoteSubscribeFallbackToAudioOnly: (uint64_t)  uid
isFallback: (BOOL)  isFallback
streamType: (NERtcStreamChannelType streamType 
optional

Occurs when the subscribed remote media stream falls back to audio-only stream due to poor network conditions or switches back to the audio and video stream after the network conditions improve.

If you call setRemoteSubscribeFallbackOption and set option to AUDIO_ONLY, this callback is triggered when the subscribed remote media stream falls back to audio-only mode due to poor downlink network conditions, or when the subscribed remote media stream switches back to the audio and video stream after the downlink network conditions improve.

自从
V4.3.0
参数
isFallbackThe option whether the subscribed remote media stream falls back to audio-only mode or switches back to the audio and video stream.
  • YES: The subscribed remote media stream falls back to audio-only mode due to poor downstream network conditions.
  • NO: The subscribed remote media stream switches back to the audio and video stream after the downstream network conditions improve.
uidThe ID of a remote user.
streamTypeThe type of the video stream, such as bigstream and substream. For more information, see NERtcStreamChannelType.

◆ onNERtcEngineUser:audioMuted:

- (void) onNERtcEngineUser: (uint64_t)  userID
audioMuted: (BOOL)  muted 
optional

Occurs when a remote user stops or resumes sending audio streams.

参数
userIDThe ID of the user whose audio streams are sent.
mutedThe option whether to pause sending audio streams.

◆ onNERtcEngineUser:videoMuted:

- (void) onNERtcEngineUser: (uint64_t)  userID
videoMuted: (BOOL)  muted 
optional

Occurs when a remote user stops or resumes sending 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.
参数
userIDThe ID of the user whose video streams are sent.
mutedThe option whether to pause sending video streams.

◆ onNERtcEngineUserVideoProfileDidUpdate:maxProfile:

- (void) onNERtcEngineUserVideoProfileDidUpdate: (uint64_t)  userID
maxProfile: (NERtcVideoProfileType maxProfile 
optional

Occurs when the profile of the video streams from a remote user is updated.

注解
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.
参数
userIDThe ID of a remote user.
maxProfileThe video encoding parameters. For more information, see NERtcVideoProfileType.

◆ onNERtcEngineVideoDeviceStateChangeWithDeviceID:deviceType:deviceState:

- (void) onNERtcEngineVideoDeviceStateChangeWithDeviceID: (NSString *)  deviceID
deviceType: (NERtcVideoDeviceType deviceType
deviceState: (NERtcVideoDeviceState deviceState 
optional

Occurs when the video device changes.

The callback sends a message that the state of the video device changes. For example, the device is unplugged or removed. If an external camera that the device uses is unplugged, the video streaming is interrupted.

注解
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.
参数
deviceIDThe ID of the device.
deviceTypeThe type of the device. For more information, see NERtcAudioDeviceType.
deviceStateThe state of the audio device. For more information, see NERtcAudioDeviceState.

◆ onRemoteAudioVolumeIndication:totalVolume:

- (void) onRemoteAudioVolumeIndication: (nullable NSArray< NERtcAudioVolumeInfo * > *)  speakers
totalVolume: (int)  totalVolume 
optional

Occurs when the system prompts the active speaker and the audio volume.

By default, the callback is disabled. You can enable the callback by calling the enableAudioVolumeIndication method. After the callback is enabled, if a local user speaks, the SDK triggers the callback based on the time interval specified in the enableAudioVolumeIndication method.

In the array returned:

  • If a uid is contained in the array returned in the last response but not in the array returned in the current response. The remote user with the uid does not speak by default.
  • If the volume is 0, the user does not speak.
  • If the array is empty, the remote user does not speak.
参数
speakersThe array that contains the information about user IDs and volumes. For more information, see NERtcAudioVolumeInfo.
totalVolumeThe volume of the mixing audio. Value range: 0 to 100.

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