NERtc Unity SDK
V4.5.907
|
Functions | |
delegate void | RtcTakeSnapshotCallback (RtcErrorCode errorCode, string image) |
delegate void | OnError (int errorCode, string msg) |
delegate void | OnWarning (int warnCode, string msg) |
delegate void | OnReleasedHwResources (RtcErrorCode result) |
delegate void | OnJoinChannel (ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | OnReconnectingStart (ulong cid, ulong uid) |
delegate void | OnConnectionStateChange (RtcConnectionStateType state, RtcReasonConnectionChangedType reason) |
delegate void | OnNetworkTypeChanged (RtcNetworkType newType) |
delegate void | OnRejoinChannel (ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | OnLeaveChannel (RtcErrorCode result) |
delegate void | OnDisconnect (RtcErrorCode reason) |
delegate void | OnClientRoleChanged (RtcClientRole oldRole, RtcClientRole newRole) |
delegate void | OnUserJoined (ulong uid, string userName) |
delegate void | OnUserLeft (ulong uid, RtcSessionLeaveReason reason) |
delegate void | OnUserAudioStart (ulong uid) |
delegate void | OnUserAudioStop (ulong uid) |
delegate void | OnUserVideoStart (ulong uid, RtcVideoProfileType maxProfile) |
delegate void | OnUserVideoStop (ulong uid) |
delegate void | OnUserSubStreamVideoStart (ulong uid, RtcVideoProfileType maxProfile) |
delegate void | OnUserSubStreamVideoStop (ulong uid) |
delegate void | OnScreenCaptureStatusChanged (RtcScreenCaptureStatus status) |
delegate void | OnUserVideoProfileUpdate (ulong uid, RtcVideoProfileType maxProfile) |
delegate void | OnUserAudioMute (ulong uid, bool mute) |
delegate void | OnUserVideoMute (ulong uid, bool mute) |
delegate void | OnAudioDeviceRoutingDidChange (RtcAudioOutputRouting routing) |
delegate void | OnAudioDeviceStateChanged (string deviceId, RtcAudioDeviceType deviceType, RtcAudioDeviceState deviceState) |
delegate void | OnAudioDefaultDeviceChanged (string deviceId, RtcAudioDeviceType deviceType) |
delegate void | OnVideoDeviceStateChanged (string deviceId, RtcVideoDeviceType deviceType, RtcVideoDeviceState deviceState) |
delegate void | OnCameraFocusChanged (RtcCameraFocusAndExposureInfo info) |
delegate void | OnCameraExposureChanged (RtcCameraFocusAndExposureInfo info) |
delegate void | OnFirstAudioDataReceived (ulong uid) |
delegate void | OnFirstVideoDataReceived (ulong uid) |
delegate void | OnFirstAudioFrameDecoded (ulong uid) |
delegate void | OnFirstVideoFrameDecoded (ulong uid, uint width, uint height) |
delegate void | OnCaptureVideoFrame (IntPtr data, RtcVideoType type, uint width, uint height, uint count, uint[] offset, uint[] stride, RtcVideoRotation rotation) |
delegate void | OnAudioMixingStateChanged (RtcAudioMixingState state, RtcAudioMixingErrorCode errorCode) |
delegate void | OnAudioMixingTimestampUpdate (ulong timestampMS) |
delegate void | OnAudioEffectFinished (uint effectId) |
delegate void | OnLocalAudioVolumeIndication (int volume) |
delegate void | OnRemoteAudioVolumeIndication (RtcAudioVolumeInfo[] speakers, int totalVolume) |
delegate void | OnAddLiveStreamTask (string taskId, string url, int errorCode) |
delegate void | OnUpdateLiveStreamTask (string taskId, string url, int errorCode) |
delegate void | OnRemoveLiveStreamTask (string taskId, int errorCode) |
delegate void | OnLiveStreamStateChanged (string taskId, string url, RtcLiveStreamStateCode state) |
delegate void | OnAudioHowling (bool howling) |
delegate void | OnRecvSEIMessage (ulong uid, byte[] data, uint dataSize) |
delegate void | OnAudioRecording (RtcAudioRecordingCode code, string filePath) |
delegate void | OnMediaRelayStateChanged (RtcChannelMediaRelayState state, string channelName) |
delegate void | OnMediaRelayEvent (RtcChannelMediaRelayEvent evt, string channelName, RtcErrorCode error) |
delegate void | OnPublishFallbackToAudioOnly (bool isFallback, RtcVideoStreamType streamType) |
delegate void | OnSubscribeFallbackToAudioOnly (ulong uid, bool isFallback, RtcVideoStreamType streamType) |
delegate void | OnLastmileQuality (RtcNetworkQualityType quality) |
delegate void | OnLastmileProbeResult (RtcLastmileProbeResult result) |
delegate void | OnAvatarUserJoined (ulong srcUid, ulong uid, string userName) |
delegate void | OnAvatarUserLeft (ulong srcUid, ulong uid, RtcSessionLeaveReason reason) |
delegate void | OnAvatarStatus (bool enable, RtcErrorCode errorCode) |
delegate void | ChannelOnError (IRtcChannel channel, int errorCode, string msg) |
delegate void | ChannelOnWarning (IRtcChannel channel, int warnCode, string msg) |
delegate void | ChannelOnReleasedHwResources (IRtcChannel channel, RtcErrorCode result) |
delegate void | ChannelOnJoinChannel (IRtcChannel channel, ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | ChannelOnReconnectingStart (IRtcChannel channel, ulong cid, ulong uid) |
delegate void | ChannelOnConnectionStateChange (IRtcChannel channel, RtcConnectionStateType state, RtcReasonConnectionChangedType reason) |
delegate void | ChannelOnRejoinChannel (IRtcChannel channel, ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | ChannelOnLeaveChannel (IRtcChannel channel, RtcErrorCode result) |
delegate void | ChannelOnDisconnect (IRtcChannel channel, RtcErrorCode reason) |
delegate void | ChannelOnClientRoleChanged (IRtcChannel channel, RtcClientRole oldRole, RtcClientRole newRole) |
delegate void | ChannelOnUserJoined (IRtcChannel channel, ulong uid, string userName) |
delegate void | ChannelOnUserLeft (IRtcChannel channel, ulong uid, RtcSessionLeaveReason reason) |
delegate void | ChannelOnUserAudioStart (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnUserAudioStop (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnUserAudioMute (IRtcChannel channel, ulong uid, bool mute) |
delegate void | ChannelOnUserVideoStart (IRtcChannel channel, ulong uid, RtcVideoProfileType maxProfile) |
delegate void | ChannelOnUserVideoStop (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnUserVideoMute (IRtcChannel channel, ulong uid, bool mute) |
delegate void | ChannelOnUserSubStreamVideoStart (IRtcChannel channel, ulong uid, RtcVideoProfileType maxProfile) |
delegate void | ChannelOnUserSubStreamVideoStop (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnScreenCaptureStatusChanged (IRtcChannel channel, RtcScreenCaptureStatus status) |
delegate void | ChannelOnFirstAudioDataReceived (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnFirstVideoDataReceived (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnFirstAudioFrameDecoded (IRtcChannel channel, ulong uid) |
delegate void | ChannelOnFirstVideoFrameDecoded (IRtcChannel channel, ulong uid, uint width, uint height) |
delegate void | ChannelOnLocalAudioVolumeIndication (IRtcChannel channel, int volume) |
delegate void | ChannelOnRemoteAudioVolumeIndication (IRtcChannel channel, RtcAudioVolumeInfo[] speakers, int totalVolume) |
delegate void | ChannelOnAddLiveStreamTask (IRtcChannel channel, string taskId, string url, int errorCode) |
delegate void | ChannelOnUpdateLiveStreamTask (IRtcChannel channel, string taskId, string url, int errorCode) |
delegate void | ChannelOnRemoveLiveStreamTask (IRtcChannel channel, string taskId, int errorCode) |
delegate void | ChannelOnLiveStreamStateChanged (IRtcChannel channel, string taskId, string url, RtcLiveStreamStateCode state) |
delegate void | ChannelOnRecvSEIMessage (IRtcChannel channel, ulong uid, byte[] data, uint dataSize) |
delegate void | ChannelOnMediaRelayStateChanged (IRtcChannel channel, RtcChannelMediaRelayState state, string channelName) |
delegate void | ChannelOnMediaRelayEvent (IRtcChannel channel, RtcChannelMediaRelayEvent evt, string channelName, RtcErrorCode error) |
delegate void | ChannelOnPublishFallbackToAudioOnly (IRtcChannel channel, bool isFallback, RtcVideoStreamType streamType) |
delegate void | ChannelOnSubscribeFallbackToAudioOnly (IRtcChannel channel, ulong uid, bool isFallback, RtcVideoStreamType streamType) |
delegate void | ChannelOnAvatarUserJoined (IRtcChannel channel, ulong srcUid, ulong uid, string userName) |
delegate void | ChannelOnAvatarUserLeft (IRtcChannel channel, ulong srcUid, ulong uid, RtcSessionLeaveReason reason) |
delegate void | ChannelOnAvatarStatus (IRtcChannel channel, bool enable, RtcErrorCode errorCode) |
|
strong |
Error codes.
Error codes are returned when a problem that cannot be recovered without app intervention has occurred.
|
strong |
Mixing audio file error code。
|
strong |
Warning code. If the warning code occurs, the SDK reports an error that is likely to be solved. The warning code just informs you of the SDK status. In most cases, the application programs can pass the warning code.
|
strong |
|
strong |
Participant role type.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Video cropping mode in live streaming
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Audio profile. Audio sample rate, bitrate, encoding mode, and the number of channels.
|
strong |
Audio application scenarios. Different audio scenarios use different audio capture modes and playback modes.
|
strong |
The preset value of the voice changer.
|
strong |
Preset voice beautifier effect.
|
strong |
The center frequency of the sound equalization band.
|
strong |
The camera capture preference.
|
strong |
Video encoding configuration. The resolution used to measure encoding quality.
|
strong |
|
strong |
|
strong |
|
strong |
Audio device types.
|
strong |
|
strong |
|
strong |
|
strong |
Set the video scaling mode.
|
strong |
|
strong |
The video orientation mode.
|
strong |
The state of network connection
|
strong |
The reason for the connection state change.
|
strong |
Network quality type.
|
strong |
|
strong |
Video frame rate.
|
strong |
Video encoding strategy.
|
strong |
Video frame rate callback.
uid | The user ID |
frame | The video frame object Configuration parameters for screen sharing encoding. |
|
strong |
Screen sharing status.
|
strong |
Encoding strategy preference for screen sharing.
Enumerator | |
---|---|
kNERtcSubStreamContentPreferMotion | The animation mode. |
kNERtcSubStreamContentPreferDetails | The details mode. |
|
strong |
|
strong |
|
strong |
|
strong |
The video type.
|
strong |
|
strong |
The reasons why the user leaves.
|
strong |
The playback state of the music file.
Enumerator | |
---|---|
kNERtcAudioMixingStateFinished | The playback ends. |
kNERtcAudioMixingStateFailed | The playback fails because an error occurs. For more information, see RtcAudioMixingErrorCode. |
|
strong |
|
strong |
Status during media stream relay.
|
strong |
Events related to the media stream relay.
|
strong |
Log levels.
|
strong |
Video delivery strategy after publishing.
|
strong |
|
strong |
The error code of recording callbacks.
|
strong |
Fallback options when the uplink and downlink connections are weak.
|
strong |
|
strong |
States of the last-mile network probe test.
|
strong |
|
strong |
Spatializer material name.
|
strong |
Spatializer rendering mode.
|
strong |
|
strong |
Audio device error.
|
strong |
|
strong |
|
strong |
Network type.
|
strong |
Audio session control permissions
The SDK has the permissions of Audio Session.
delegate void nertc.RtcTakeSnapshotCallback | ( | RtcErrorCode | errorCode, |
string | image | ||
) |
Returns the screenshot result.
errorCode | The error code. For more information, see RtcErrorCode. |
image | The screenshot. Images on macOS are in CGImageRef format. |
delegate void nertc.OnError | ( | int | errorCode, |
string | msg | ||
) |
Occurs when the error occurs.
The callback is triggered to report an error related to network or media during SDK runtime. In most cases, the SDK cannot fix the issue and resume running. The SDK requires the app to take action or informs the user of the issue.
errorCode | The error code. For more information, see RtcErrorCode . |
msg | Error description. |
delegate void nertc.OnWarning | ( | int | warnCode, |
string | msg | ||
) |
Occurs when a warning occurs.
The callback is triggered to report a warning related to network or media during SDK runtime. In most cases, the app ignores the warning message and the SDK resumes running.
warnCode | The warning code. For more information, see RtcWarnCode. |
msg | The warning description. |
delegate void nertc.OnReleasedHwResources | ( | RtcErrorCode | result | ) |
Occurs when the hardware resources are released.
The SDK prompts whether hardware resources are successfully released.
result | The result. |
delegate void nertc.OnJoinChannel | ( | ulong | cid, |
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
Allows a user to join a room. The callback indicates that the client has already signed in.
cid | The ID of the room that the client joins. |
uid | Specifies the ID of a user. If you specify the uid in the IRtcEngine.JoinChannel method, a specified ID is returned at the time. If not, the ID automatically assigned by the CommsEase’s server is returned. |
result | Indicates the result. |
elapsed | The time elapsed from calling the joinChannel method to the occurrence of this event. Unit: milliseconds. |
delegate void nertc.OnReconnectingStart | ( | ulong | cid, |
ulong | uid | ||
) |
Triggers reconnection.
In some cases, a client may be disconnected from the server, the SDK starts reconnecting. The callback is triggered when the reconnection starts.
cid | Specifies the ID of a room. |
uid | Specifies the ID of a user. |
delegate void nertc.OnConnectionStateChange | ( | RtcConnectionStateType | state, |
RtcReasonConnectionChangedType | reason | ||
) |
Occurs when the state of network connection is changed.
The callback is triggered when the state of network connection is changed. The callback returns the current state of network connection and the reason why the network state changes.
state | The state of current network connection. |
reason | The reason why the network state changes. |
delegate void nertc.OnNetworkTypeChanged | ( | RtcNetworkType | newType | ) |
Occurs when the network type is changed.
The callback is triggered when network is changed. The callback returns the current network type.
newType | The new type of current network. |
delegate void nertc.OnRejoinChannel | ( | ulong | cid, |
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
Occurs when a user rejoins a room.
If a client is disconnected from the server due to poor network quality, the SDK starts reconnecting. If the client and server are reconnected, the callback is triggered.
cid | The ID of the room that the client joins. |
uid | The ID of a user. |
result | The result. |
elapsed | The time elapsed from reconnection to the occurrence of this event. Unit: milliseconds. |
delegate void nertc.OnLeaveChannel | ( | RtcErrorCode | result | ) |
Occurs when a user leaves a room.
After an app invokes the IRtcEngine.LeaveChannel method, SDK prompts whether the app successfully leaves the room.
result | The result. |
delegate void nertc.OnDisconnect | ( | RtcErrorCode | reason | ) |
Network connection interruption.
reason | The reason why the network is disconnected. |
delegate void nertc.OnClientRoleChanged | ( | RtcClientRole | oldRole, |
RtcClientRole | newRole | ||
) |
Occurs when a user changes the role in live streaming.
After the local user joins a room, the user can call the IRtcEngine.SetClientRole to change the role. Then, the callback is triggered. For example, you can switch the role from host to audience, or from audience to host.
oldRole | The role before the user changes the role. |
newRole | The role after the change. |
delegate void nertc.OnUserJoined | ( | ulong | uid, |
string | userName | ||
) |
Occurs when a remote user joins the current room.
The callback prompts that a remote user joins the room and returns the ID of the user that joins the room. If the user ID already exists, the remote user also receives a message that the user already joins the room, which is returned by the callback.
uid | The ID of the user that joins the room. |
userName | The name of the remote user who joins the room. |
delegate void nertc.OnUserLeft | ( | ulong | uid, |
RtcSessionLeaveReason | reason | ||
) |
Occurs when a remote user leaves a room.
A message is returned indicates that a remote user leaves the room or becomes disconnected. In most cases, a user leaves a room due to the following reasons: The user exit the room or connections time out.
uid | The ID of the user that leaves the room. |
reason | The reason why remote user leaves. |
delegate void nertc.OnUserAudioStart | ( | ulong | uid | ) |
Occurs when a remote user enables audio.
uid | The ID of a remote user. |
delegate void nertc.OnUserAudioStop | ( | ulong | uid | ) |
Occurs when a remote user disables audio.
uid | The ID of a remote user. |
delegate void nertc.OnUserVideoStart | ( | ulong | uid, |
RtcVideoProfileType | maxProfile | ||
) |
Occurs when a remote user enables video.
uid | The ID of a remote user. |
maxProfile | The resolution of video encoding measures the encoding quality. |
delegate void nertc.OnUserVideoStop | ( | ulong | uid | ) |
Occurs when a remote user disables video.
uid | The ID of a remote user. |
delegate void nertc.OnUserSubStreamVideoStart | ( | ulong | uid, |
RtcVideoProfileType | maxProfile | ||
) |
Occurs when a remote user enables screen sharing by using the substream.
uid | The ID of a remote user. |
maxProfile | The largest resolution of the remote video. |
delegate void nertc.OnUserSubStreamVideoStop | ( | ulong | uid | ) |
Occurs when a remote user stops screen sharing by using the substream.
uid | The ID of a remote user. |
delegate void nertc.OnScreenCaptureStatusChanged | ( | RtcScreenCaptureStatus | status | ) |
Occurs when screen sharing is paused/resumed/started/ended.
The method applies to Windows only.
status | Screen capture status. For more information, see RtcScreenCaptureStatus . |
delegate void nertc.OnUserVideoProfileUpdate | ( | ulong | uid, |
RtcVideoProfileType | maxProfile | ||
) |
Occurs when video configurations of remote users are updated.
uid | The ID of a remote user. |
maxProfile | The resolution of video encoding measures the encoding quality. |
delegate void nertc.OnUserAudioMute | ( | ulong | uid, |
bool | mute | ||
) |
Callbacks that specify whether to mute remote users.
uid | The ID of a remote user. |
mute | indicates whether to unmute the remote user. |
delegate void nertc.OnUserVideoMute | ( | ulong | uid, |
bool | mute | ||
) |
Occurs when a remote user stops or resumes sending video streams.
uid | The ID of a remote user. |
mute | Whether to disable video streams. |
delegate void nertc.OnAudioDeviceRoutingDidChange | ( | RtcAudioOutputRouting | routing | ) |
Occurs when the audio routing changes.
routing | The current audio output routing. |
delegate void nertc.OnAudioDeviceStateChanged | ( | string | deviceId, |
RtcAudioDeviceType | deviceType, | ||
RtcAudioDeviceState | deviceState | ||
) |
Occurs when the state of the audio device changes.
deviceId | Device ID. |
deviceType | The type of the device. For more information, see RtcAudioDeviceType . |
deviceState | The state of the audio device. |
delegate void nertc.OnAudioDefaultDeviceChanged | ( | string | deviceId, |
RtcAudioDeviceType | deviceType | ||
) |
Occurs when the default audio devices changes.
deviceId | Device ID. |
deviceType | The type of the device. |
delegate void nertc.OnVideoDeviceStateChanged | ( | string | deviceId, |
RtcVideoDeviceType | deviceType, | ||
RtcVideoDeviceState | deviceState | ||
) |
Occurs when the state of the video device is changed.
deviceId | Device ID. |
deviceType | The type of the video device. |
deviceState | The state of the video device. |
delegate void nertc.OnCameraFocusChanged | ( | RtcCameraFocusAndExposureInfo | info | ) |
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 IRtcEngine.SetCameraFocusPosition method to change the focus position.
info | The new focus position. |
delegate void nertc.OnCameraExposureChanged | ( | RtcCameraFocusAndExposureInfo | info | ) |
Occurs when the camera exposure position changes. The callback is triggered if a local user calls the IRtcEngine.SetCameraExposurePosition method to change the exposure position.
info | The new exposure position. |
delegate void nertc.OnFirstAudioDataReceived | ( | ulong | uid | ) |
Occurs when the first audio frame from a remote user is received.
uid | The ID of a remote user whose audio streams are sent. |
delegate void nertc.OnFirstVideoDataReceived | ( | ulong | uid | ) |
Occurs when the first video frame from a remote user is displayed.
If the first video frame from a remote user is displayed in the view, the callback is triggered.
uid | The ID of a user whose audio streams are sent. |
delegate void nertc.OnFirstAudioFrameDecoded | ( | ulong | uid | ) |
Occurs when the first audio frame from a remote user is decoded.
uid | The ID of a remote user whose audio streams are sent. |
delegate void nertc.OnFirstVideoFrameDecoded | ( | ulong | uid, |
uint | width, | ||
uint | height | ||
) |
Occurs when the remote video is received and decoded.
If the engine receives the first frame of remote video streams, the callback is triggered.
uid | The ID of a user whose audio streams are sent. |
width | The width of video streams (px). |
height | The height of video streams(px). |
delegate void nertc.OnCaptureVideoFrame | ( | IntPtr | data, |
RtcVideoType | type, | ||
uint | width, | ||
uint | height, | ||
uint | count, | ||
uint[] | offset, | ||
uint[] | stride, | ||
RtcVideoRotation | rotation | ||
) |
Occurs when video data are captured.
data | The video frame data. |
type | The type of the video data. |
width | The width of the video frame. |
height | The height of the video frame. |
count | Video plane count. |
offset | Video offset. |
stride | Video stride. |
rotation | The video rotation angle. |
delegate void nertc.OnAudioMixingStateChanged | ( | RtcAudioMixingState | state, |
RtcAudioMixingErrorCode | errorCode | ||
) |
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.
state | The playback state of the music file. For more information, see RtcAudioMixingState . |
errorCode | The error code. For more information, see RtcAudioMixingErrorCode . |
delegate void nertc.OnAudioMixingTimestampUpdate | ( | ulong | timestampMS | ) |
Occurs when the playback position of a local music file changes.
If you call the IRtcEngine.StartAudioMixing method to play a mixing music file and the position of the playing operation changes, the callback is triggered.
timestampMS | The position of the music file playing. Unit: milliseconds. |
delegate void nertc.OnAudioEffectFinished | ( | uint | effectId | ) |
Occurs when the playback of a music file ends.
After the audio effect ends the playback, the callback is triggered.
effectId | The ID of the specified audio effect. Each audio effect has a unique ID. |
delegate void nertc.OnLocalAudioVolumeIndication | ( | int | volume | ) |
Occurs when the system prompts current local audio volume.
volume | The volume of audio mixing. Value range: 0 to 100. |
delegate void nertc.OnRemoteAudioVolumeIndication | ( | RtcAudioVolumeInfo[] | speakers, |
int | totalVolume | ||
) |
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 IRtcEngine.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 IRtcEngine.EnableAudioVolumeIndication method. In the array of speakers returned:
speakers | The array that contains the information about user IDs and volumes is RtcAudioVolumeInfo . |
totalVolume | The total volume (after audio mixing). Value range: 0 to 100. |
delegate void nertc.OnAddLiveStreamTask | ( | string | taskId, |
string | url, | ||
int | errorCode | ||
) |
Notifies to add the result of live stream.
The callback asynchronously returns the callback result of IRtcEngine.AddLiveStreamTask . For information about actual pushing state, see OnLiveStreamStateChanged.
taskId | The ID of a stream-push task. |
url | Task ID. |
errorCode | The result.
|
delegate void nertc.OnUpdateLiveStreamTask | ( | string | taskId, |
string | url, | ||
int | errorCode | ||
) |
Notifies to Updates the result of live stream.
The callback asynchronously returns the callback result of ref IRtcEngine::UpdateLiveStreamTask . For information about actual pushing state, see OnLiveStreamStateChanged .
taskId | The ID of a stream-push task. |
url | The URL for the streaming task. |
errorCode | The result.
|
delegate void nertc.OnRemoveLiveStreamTask | ( | string | taskId, |
int | errorCode | ||
) |
Notifies to delete the result of live stream.
The callback asynchronously returns the callback result of ref IRtcEngine::RemoveLiveStreamTask . For information about actual pushing state, see OnLiveStreamStateChanged.
taskId | The ID of a task. |
errorCode | The result.
|
delegate void nertc.OnLiveStreamStateChanged | ( | string | taskId, |
string | url, | ||
RtcLiveStreamStateCode | state | ||
) |
Notifies the status in live stream-pushing.
taskId | The ID of a task. |
url | The URL for the streaming task. |
state | RtcLiveStreamStateCode The state of live stream-pushing.
|
delegate void nertc.OnAudioHowling | ( | bool | howling | ) |
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 the 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 | Whether a howling occurs.
|
delegate void nertc.OnRecvSEIMessage | ( | ulong | uid, |
byte[] | data, | ||
uint | dataSize | ||
) |
Occurs when the content of remote SEI is received.
After a remote client successfully sends SEI, the local client receives a message returned by the callback.
[in] | uid | The ID of the user who sends the SEI. |
[in] | data | The received SEI data. |
[in] | dataSize | The size of received SEI data. |
delegate void nertc.OnAudioRecording | ( | RtcAudioRecordingCode | code, |
string | filePath | ||
) |
Returns the audio recording state.
code | The status code of the audio recording. For more information, see RtcAudioRecordingCode . |
filePath | The path based on which the recording file is stored. |
delegate void nertc.OnMediaRelayStateChanged | ( | RtcChannelMediaRelayState | state, |
string | channelName | ||
) |
Occurs when the state of the media stream is relayed.
state | The state of the media stream. |
channelName | The name of the destination room where the media streams are relayed. |
delegate void nertc.OnMediaRelayEvent | ( | RtcChannelMediaRelayEvent | evt, |
string | channelName, | ||
RtcErrorCode | error | ||
) |
Occurs when events related to media stream relay are triggered.
evt | The media stream relay event. |
channelName | The name of the destination room where the media streams are relayed. |
error | Specific error codes. |
delegate void nertc.OnPublishFallbackToAudioOnly | ( | bool | isFallback, |
RtcVideoStreamType | 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.
If you call IRtcEngine.SetLocalPublishFallbackOption and set option to kNERtcStreamFallbackAudioOnly, 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.
isFallback | The locally published stream falls back to audio-only mode or switches back to audio and video stream.
|
streamType | The type of the video stream, such as mainstream and substream. |
delegate void nertc.OnSubscribeFallbackToAudioOnly | ( | ulong | uid, |
bool | isFallback, | ||
RtcVideoStreamType | streamType | ||
) |
Occurs when the subscribed remote media stream falls back to an audio-only stream due to poor network conditions or switches back to the audio and video stream after the network condition improves.
If you call IRtcEngine.SetRemoteSubscribeFallbackOption and set option to kNERtcStreamFallbackAudioOnly, 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 condition improves.
uid | The ID of a remote user. |
isFallback | The subscribed remote media stream falls back to audio-only mode or switches back to the audio and video stream.
|
streamType | The type of the video stream, such as mainstream and substream. |
delegate void nertc.OnLastmileQuality | ( | RtcNetworkQualityType | quality | ) |
Reports the last mile network quality of the local user once every two seconds before the user joins the channel.
After the application calls the IRtcEngine.StartLastmileProbeTest method, this callback reports once every five seconds the uplink and downlink last mile network conditions of the local user before the user joins the channel.
quality | The last mile network quality. |
delegate void nertc.OnLastmileProbeResult | ( | RtcLastmileProbeResult | result | ) |
Reports the last-mile network probe result.
This callback describes a detailed last-mile network detection report of a local user before joining a channel. The report provides objective data about the upstream and downstream network quality, including network jitter and packet loss rate. You can use the report to objectively predict the network status of local users during an audio and video call.
The SDK triggers this callback within 30 seconds after the app calls the IRtcEngine.StartLastmileProbeTest method.
result | The uplink and downlink last-mile network probe test result. |
delegate void nertc.OnAvatarUserJoined | ( | ulong | srcUid, |
ulong | uid, | ||
string | userName | ||
) |
Called when a digital avatar joins the current room.
srcUid | ID of a source user of the remote digital avatar leaving the room. The digital avatar of the current user srcUid is 0. |
uid | ID of the remote digital avatar joining the room。 |
userName | User name of the remote digital avatar joining the room |
delegate void nertc.OnAvatarUserLeft | ( | ulong | srcUid, |
ulong | uid, | ||
RtcSessionLeaveReason | reason | ||
) |
Called when a digital avatar leaves the current room.
The remote digital avatar leaves the room (or goes off-line).
srcUid | ID of a source user of the remote digital avatar leaving the room. The digital avatar of the current user srcUid is 0. |
uid | ID of the digital avatar leaving the room. |
reason | reason for leaving the room. |
delegate void nertc.OnAvatarStatus | ( | bool | enable, |
RtcErrorCode | errorCode | ||
) |
Called when the result of starting a digital avatar is returned.
enable | Start or stop a digital avatar. |
errorCode | result. |
delegate void nertc.ChannelOnError | ( | IRtcChannel | channel, |
int | errorCode, | ||
string | msg | ||
) |
Occurs when the error occurs.
The callback is triggered to report an error related to network or media during SDK runtime. In most cases, the SDK cannot fix the issue and resume running. The SDK requires the app to take action or informs the user of the issue.
channel | The current IRtcChannel object |
errorCode | The error code. For more information, see RtcErrorCode. |
msg | Error description. |
delegate void nertc.ChannelOnWarning | ( | IRtcChannel | channel, |
int | warnCode, | ||
string | msg | ||
) |
Occurs when a warning occurs.
The callback is triggered to report a warning related to network or media during SDK runtime. In most cases, the app ignores the warning message and the SDK resumes running.
channel | The current IRtcChannel object |
warnCode | The warning code. For more information, see RtcWarnCode. |
msg | The warning description. |
delegate void nertc.ChannelOnReleasedHwResources | ( | IRtcChannel | channel, |
RtcErrorCode | result | ||
) |
Occurs when the hardware resources are released.
The SDK prompts whether hardware resources are successfully released.
channel | The current IRtcChannel object |
result | The result. |
delegate void nertc.ChannelOnJoinChannel | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
Allows a user to join a room. The callback indicates that the client has already signed in.
cid | The ID of the room that the client joins. |
uid | Specifies the ID of a user. If you specify the uid in the joinChannel method, a specificed ID is returned at the time. If not, the ID automatically assigned by the CommsEase’s server is returned. |
channel | The current IRtcChannel object |
result | Indicates the result. |
elapsed | The time elapsed from calling the joinChannel method to the occurrence of this event. Unit: milliseconds. |
delegate void nertc.ChannelOnReconnectingStart | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid | ||
) |
Triggers reconnection.
In some cases, a client may be disconnected from the server, the SDK starts reconnecting. The callback is triggered when the reconnection starts.
channel | The current IRtcChannel object |
cid | Specifies the ID of a room. |
uid | Specifies the ID of a user. |
delegate void nertc.ChannelOnConnectionStateChange | ( | IRtcChannel | channel, |
RtcConnectionStateType | state, | ||
RtcReasonConnectionChangedType | reason | ||
) |
Occurs when the state of network connection is changed.
The callback is triggered when the state of network connection is changed. The callback returns the current state of network connection and the reason why the network state changes.
channel | The current IRtcChannel object |
state | The state of current network connection. |
reason | The reason why the network state changes. |
delegate void nertc.ChannelOnRejoinChannel | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
Occurs when a user rejoins a room.
If a client is disconnected from the server due to poor network quality, the SDK starts reconnecting. If the client and server are reconnected, the callback is triggered.
channel | The current IRtcChannel object |
cid | The ID of the room that the client joins. |
uid | The ID of a user. |
result | The result. |
elapsed | The time elapsed from reconnection to the occurrence of this event. Unit: milliseconds. |
delegate void nertc.ChannelOnLeaveChannel | ( | IRtcChannel | channel, |
RtcErrorCode | result | ||
) |
Occurs when a user leaves a room.
After an app invokes the IRtcChannel.LeaveChannel method, SDK prompts whether the app successfully leaves the room.
channel | The current IRtcChannel object |
result | The result. |
delegate void nertc.ChannelOnDisconnect | ( | IRtcChannel | channel, |
RtcErrorCode | reason | ||
) |
Network connection interruption.
channel | The current IRtcChannel object |
reason | The reason why the network is disconnected. |
delegate void nertc.ChannelOnClientRoleChanged | ( | IRtcChannel | channel, |
RtcClientRole | oldRole, | ||
RtcClientRole | newRole | ||
) |
Occurs when a user changes the role in live streaming.
After the local user joins a room, the user can call the IRtcChannel.SetClientRole to change the role. Then, the callback is triggered. For example, you can switch the role from host to audience, or from audience to host.
channel | The current IRtcChannel object |
oldRole | The role before the user changes the role. |
newRole | The role after the change. |
delegate void nertc.ChannelOnUserJoined | ( | IRtcChannel | channel, |
ulong | uid, | ||
string | userName | ||
) |
Occurs when a remote user joins the current room.
The callback prompts that a remote user joins the room and returns the ID of the user that joins the room. If the user ID already exists, the remote user also receives a message that the user already joins the room, which is returned by the callback.
channel | The current IRtcChannel object |
uid | The ID of the user that joins the room. |
userName | The name of the remote user who joins the room. |
delegate void nertc.ChannelOnUserLeft | ( | IRtcChannel | channel, |
ulong | uid, | ||
RtcSessionLeaveReason | reason | ||
) |
Occurs when a remote user leaves a room.
A message is returned indicates that a remote user leaves the room or becomes disconnected. In most cases, a user leaves a room due to the following reasons: The user exit the room or connections time out.
channel | The current IRtcChannel object |
uid | The ID of the user that leaves the room. |
reason | The reason why remote user leaves. |
delegate void nertc.ChannelOnUserAudioStart | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when a remote user enables audio.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
delegate void nertc.ChannelOnUserAudioStop | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when a remote user disables audio.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
delegate void nertc.ChannelOnUserAudioMute | ( | IRtcChannel | channel, |
ulong | uid, | ||
bool | mute | ||
) |
Callbacks that specify whether to mute remote users.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
mute | Whether to unmute the remote user. |
delegate void nertc.ChannelOnUserVideoStart | ( | IRtcChannel | channel, |
ulong | uid, | ||
RtcVideoProfileType | maxProfile | ||
) |
Occurs when a remote user enables video.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
maxProfile | The resolution of video encoding measures the encoding quality. |
delegate void nertc.ChannelOnUserVideoStop | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when a remote user disables video.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
delegate void nertc.ChannelOnUserVideoMute | ( | IRtcChannel | channel, |
ulong | uid, | ||
bool | mute | ||
) |
Occurs when a remote user stops or resumes sending video streams.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
mute | Whether to disable video streams. |
delegate void nertc.ChannelOnUserSubStreamVideoStart | ( | IRtcChannel | channel, |
ulong | uid, | ||
RtcVideoProfileType | maxProfile | ||
) |
Occurs when a remote user enables screen sharing by using the substream.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
maxProfile | The largest resolution of the remote video. |
delegate void nertc.ChannelOnUserSubStreamVideoStop | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when a remote user stops screen sharing by using the substream.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
delegate void nertc.ChannelOnScreenCaptureStatusChanged | ( | IRtcChannel | channel, |
RtcScreenCaptureStatus | status | ||
) |
Occurs when screen sharing is paused/resumed/started/ended.
The method applies to Windows only.
channel | The current IRtcChannel object |
status | The current state of screen sharing. |
delegate void nertc.ChannelOnFirstAudioDataReceived | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when the first audio frame from a remote user is received.
channel | The current IRtcChannel object |
uid | The ID of a remote user whose audio streams are sent. |
delegate void nertc.ChannelOnFirstVideoDataReceived | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when the first video frame from a remote user is displayed.
If the first video frame from a remote user is displayed in the view, the callback is triggered.
channel | The current IRtcChannel object |
uid | The ID of a user whose audio streams are sent. |
delegate void nertc.ChannelOnFirstAudioFrameDecoded | ( | IRtcChannel | channel, |
ulong | uid | ||
) |
Occurs when the first audio frame from a remote user is decoded.
channel | The current IRtcChannel object |
uid | The ID of a remote user whose audio streams are sent. |
delegate void nertc.ChannelOnFirstVideoFrameDecoded | ( | IRtcChannel | channel, |
ulong | uid, | ||
uint | width, | ||
uint | height | ||
) |
Occurs when the remote video is received and decoded.
If the engine receives the first frame of remote video streams, the callback is triggered.
channel | The current IRtcChannel object |
uid | The ID of a user whose audio streams are sent. |
width | The width of video streams (px). |
height | The height of video streams(px). |
delegate void nertc.ChannelOnLocalAudioVolumeIndication | ( | IRtcChannel | channel, |
int | volume | ||
) |
Occurs when the system prompts current local audio volume.
channel | The current IRtcChannel object |
volume | The volume of audio mixing. Value range: 0 to 100. |
delegate void nertc.ChannelOnRemoteAudioVolumeIndication | ( | IRtcChannel | channel, |
RtcAudioVolumeInfo[] | speakers, | ||
int | totalVolume | ||
) |
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 of speakers returned:
channel | The current IRtcChannel object |
speakers | The array that contains the information about user IDs and volumes is RtcAudioVolumeInfo. |
totalVolume | The total volume (after audio mixing). Value range: 0 to 100. |
delegate void nertc.ChannelOnAddLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
int | errorCode | ||
) |
Notifies to add the result of live stream.
The callback asynchronously returns the callback result of IRtcChannel.AddLiveStreamTask . For information about actual pushing state, see ChannelOnLiveStreamStateChanged.
channel | The current IRtcChannel object |
taskId | The ID of a stream-push task. |
url | Task ID. |
errorCode | The result.
|
delegate void nertc.ChannelOnUpdateLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
int | errorCode | ||
) |
Notifies to Updates the result of live stream.
The callback asynchronously returns the callback result of ref IRtcChannel::UpdateLiveStreamTask . For information about actual pushing state, see ChannelOnLiveStreamStateChanged.
channel | The current IRtcChannel object |
taskId | The ID of a stream-push task. |
url | The URL for the streaming task. |
errorCode | The result.
|
delegate void nertc.ChannelOnRemoveLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
int | errorCode | ||
) |
Notifies to delete the result of live stream.
The callback asynchronously returns the callback result of ref IRtcChannel::RemoveLiveStreamTask . For information about actual pushing state, see ChannelOnLiveStreamStateChanged .
channel | The current IRtcChannel object |
taskId | The ID of a task. |
errorCode | The result.
|
delegate void nertc.ChannelOnLiveStreamStateChanged | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
RtcLiveStreamStateCode | state | ||
) |
Notifies the status in live stream-pushing.
channel | The current IRtcChannel object |
taskId | The ID of a task. |
url | The URL for the streaming task. |
state | RtcLiveStreamStateCode The state of live stream-pushing.
|
delegate void nertc.ChannelOnRecvSEIMessage | ( | IRtcChannel | channel, |
ulong | uid, | ||
byte[] | data, | ||
uint | dataSize | ||
) |
Occurs when the content of remote SEI is received.
After a remote client successfully sends SEI, the local client receives a message returned by the callback.
channel | The current IRtcChannel object | |
[in] | uid | The ID of the user who sends the SEI. |
[in] | data | The received SEI data. |
[in] | dataSize | The size of received SEI data. |
delegate void nertc.ChannelOnMediaRelayStateChanged | ( | IRtcChannel | channel, |
RtcChannelMediaRelayState | state, | ||
string | channelName | ||
) |
Occurs when the state of the media stream is relayed.
channel | The current IRtcChannel object |
state | The state of the media stream. |
channelName | The name of the destination room where the media streams are relayed. |
delegate void nertc.ChannelOnMediaRelayEvent | ( | IRtcChannel | channel, |
RtcChannelMediaRelayEvent | evt, | ||
string | channelName, | ||
RtcErrorCode | error | ||
) |
Occurs when events related to media stream relay are triggered.
channel | The current IRtcChannel object |
evt | The media stream relay event. |
channelName | The name of the destination room where the media streams are relayed. |
error | Specific error codes. |
delegate void nertc.ChannelOnPublishFallbackToAudioOnly | ( | IRtcChannel | channel, |
bool | isFallback, | ||
RtcVideoStreamType | 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.
If you call IRtcChannel.SetLocalPublishFallbackOption and set option to kNERtcStreamFallbackAudioOnly , 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.
channel | The current IRtcChannel object |
isFallback | The locally published stream falls back to audio-only mode or switches back to audio and video stream.
|
streamType | The type of the video stream, such as mainstream and substream. |
delegate void nertc.ChannelOnSubscribeFallbackToAudioOnly | ( | IRtcChannel | channel, |
ulong | uid, | ||
bool | isFallback, | ||
RtcVideoStreamType | streamType | ||
) |
Occurs when the subscribed remote media stream falls back to an audio-only stream due to poor network conditions or switches back to the audio and video stream after the network condition improves.
If you call setLocalPublishFallbackOption and set option to kNERtcStreamFallbackAudioOnly , 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 condition improves.
channel | The current IRtcChannel object |
uid | The ID of a remote user. |
isFallback | The subscribed remote media stream falls back to audio-only mode or switches back to the audio and video stream.
|
streamType | The type of the video stream, such as mainstream and substream. |
delegate void nertc.ChannelOnAvatarUserJoined | ( | IRtcChannel | channel, |
ulong | srcUid, | ||
ulong | uid, | ||
string | userName | ||
) |
Called when a digital avatar joins the current room.
channel | The current IRtcChannel object |
srcUid | ID of a source user of the remote digital avatar leaving the room. The digital avatar of the current user srcUid is 0. |
uid | ID of the remote digital avatar joining the room。 |
userName | User name of the remote digital avatar joining the room |
delegate void nertc.ChannelOnAvatarUserLeft | ( | IRtcChannel | channel, |
ulong | srcUid, | ||
ulong | uid, | ||
RtcSessionLeaveReason | reason | ||
) |
Called when a digital avatar leaves the current room.
The remote digital avatar leaves the room (or goes offline).
channel | The current IRtcChannel object |
srcUid | ID of a source user of the remote digital avatar leaving the room. The digital avatar of the current user srcUid is 0. |
uid | ID of the digital avatar leaving the room. |
reason | reason for leaving the room. |
delegate void nertc.ChannelOnAvatarStatus | ( | IRtcChannel | channel, |
bool | enable, | ||
RtcErrorCode | errorCode | ||
) |
Called when the result of starting a digital avatar is returned.
channel | The current IRtcChannel object |
enable | Start or stop a digital avatar. |
errorCode | result. |