Voice SDK v3.7.1 API Reference for Unity
|
Functions |
|
delegate void | OnJoinChannelSuccessHandler (string channelName, uint uid, int elapsed) |
delegate void | OnLeaveChannelHandler (RtcStats stats) |
delegate void | OnReJoinChannelSuccessHandler (string channelName, uint uid, int elapsed) |
delegate void | OnConnectionLostHandler () |
delegate void | OnConnectionInterruptedHandler () |
delegate void | OnRequestTokenHandler () |
delegate void | OnUserJoinedHandler (uint uid, int elapsed) |
delegate void | OnUserOfflineHandler (uint uid, USER_OFFLINE_REASON reason) |
delegate void | OnVolumeIndicationHandler (AudioVolumeInfo[] speakers, int speakerNumber, int totalVolume) |
delegate void | OnLocalVoicePitchInHzHandler (int pitchInHz) |
delegate void | OnUserMutedAudioHandler (uint uid, bool muted) |
delegate void | OnSDKWarningHandler (int warn, string msg) |
delegate void | OnSDKErrorHandler (int error, string msg) |
delegate void | OnRtcStatsHandler (RtcStats stats) |
delegate void | OnAudioMixingFinishedHandler () |
delegate void | OnAudioRouteChangedHandler (AUDIO_ROUTE route) |
delegate void | OnFirstRemoteVideoDecodedHandler (uint uid, int width, int height, int elapsed) |
delegate void | OnVideoSizeChangedHandler (uint uid, int width, int height, int rotation) |
delegate void | OnClientRoleChangedHandler (CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole) |
delegate void | OnUserMuteVideoHandler (uint uid, bool muted) |
delegate void | OnMicrophoneEnabledHandler (bool isEnabled) |
delegate void | OnApiExecutedHandler (int err, string api, string result) |
delegate void | OnLastmileQualityHandler (int quality) |
delegate void | OnFirstLocalAudioFrameHandler (int elapsed) |
delegate void | OnFirstRemoteAudioFrameHandler (uint userId, int elapsed) |
delegate void | OnAudioQualityHandler (uint userId, int quality, ushort delay, ushort lost) |
delegate void | OnStreamUnpublishedHandler (string url) |
delegate void | OnStreamPublishedHandler (string url, int error) |
delegate void | OnStreamMessageErrorHandler (uint userId, int streamId, int code, int missed, int cached) |
delegate void | OnStreamMessageHandler (uint userId, int streamId, byte[] data, int length) |
delegate void | OnConnectionBannedHandler () |
delegate void | OnConnectionStateChangedHandler (CONNECTION_STATE_TYPE state, CONNECTION_CHANGED_REASON_TYPE reason) |
delegate void | OnTokenPrivilegeWillExpireHandler (string token) |
delegate void | OnActiveSpeakerHandler (uint uid) |
delegate void | OnVideoStoppedHandler () |
delegate void | OnFirstLocalVideoFrameHandler (int width, int height, int elapsed) |
delegate void | OnFirstRemoteVideoFrameHandler (uint uid, int width, int height, int elapsed) |
delegate void | OnUserEnableVideoHandler (uint uid, bool enabled) |
delegate void | OnUserEnableLocalVideoHandler (uint uid, bool enabled) |
delegate void | OnRemoteVideoStateChangedHandler (uint uid, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_STATE_REASON reason, int elapsed) |
delegate void | OnLocalPublishFallbackToAudioOnlyHandler (bool isFallbackOrRecover) |
delegate void | OnRemoteSubscribeFallbackToAudioOnlyHandler (uint uid, bool isFallbackOrRecover) |
delegate void | OnNetworkQualityHandler (uint uid, int txQuality, int rxQuality) |
delegate void | OnLocalVideoStatsHandler (LocalVideoStats localVideoStats) |
delegate void | OnRemoteVideoStatsHandler (RemoteVideoStats remoteVideoStats) |
delegate void | OnRemoteAudioStatsHandler (RemoteAudioStats remoteAudioStats) |
delegate void | OnAudioDeviceStateChangedHandler (string deviceId, int deviceType, int deviceState) |
delegate void | OnCameraReadyHandler () |
delegate void | OnCameraFocusAreaChangedHandler (int x, int y, int width, int height) |
delegate void | OnCameraExposureAreaChangedHandler (int x, int y, int width, int height) |
delegate void | OnRemoteAudioMixingBeginHandler () |
delegate void | OnRemoteAudioMixingEndHandler () |
delegate void | OnAudioEffectFinishedHandler (int soundId) |
delegate void | OnVideoDeviceStateChangedHandler (string deviceId, int deviceType, int deviceState) |
delegate void | OnRemoteVideoTransportStatsHandler (uint uid, ushort delay, ushort lost, ushort rxKBitRate) |
delegate void | OnRemoteAudioTransportStatsHandler (uint uid, ushort delay, ushort lost, ushort rxKBitRate) |
delegate void | OnTranscodingUpdatedHandler () |
delegate void | OnAudioDeviceVolumeChangedHandler (MEDIA_DEVICE_TYPE deviceType, int volume, bool muted) |
delegate void | OnMediaEngineStartCallSuccessHandler () |
delegate void | OnMediaEngineLoadSuccessHandler () |
delegate void | OnAudioMixingStateChangedHandler (AUDIO_MIXING_STATE_TYPE state, AUDIO_MIXING_REASON_TYPE reason) |
delegate void | OnFirstRemoteAudioDecodedHandler (uint uid, int elapsed) |
delegate void | OnLocalVideoStateChangedHandler (LOCAL_VIDEO_STREAM_STATE localVideoState, LOCAL_VIDEO_STREAM_ERROR error) |
delegate void | OnRtmpStreamingStateChangedHandler (string url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_ERROR_TYPE errCode) |
delegate void | OnNetworkTypeChangedHandler (NETWORK_TYPE type) |
delegate void | OnLastmileProbeResultHandler (LastmileProbeResult result) |
delegate void | OnLocalUserRegisteredHandler (uint uid, string userAccount) |
delegate void | OnUserInfoUpdatedHandler (uint uid, UserInfo userInfo) |
delegate void | OnLocalAudioStateChangedHandler (LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_ERROR error) |
delegate void | OnRemoteAudioStateChangedHandler (uint uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_STATE_REASON reason, int elapsed) |
delegate void | OnLocalAudioStatsHandler (LocalAudioStats localAudioStats) |
delegate void | OnChannelMediaRelayStateChangedHandler (CHANNEL_MEDIA_RELAY_STATE state, CHANNEL_MEDIA_RELAY_ERROR code) |
delegate void | OnChannelMediaRelayEventHandler (CHANNEL_MEDIA_RELAY_EVENT events) |
delegate void | OnFacePositionChangedHandler (int imageWidth, int imageHeight, Rectangle vecRectangle, int vecDistance, int numFaces) |
delegate void | OnRtmpStreamingEventHandler (string url, RTMP_STREAMING_EVENT eventCode) |
delegate void | OnAudioPublishStateChangedHandler (string channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) |
delegate void | OnVideoPublishStateChangedHandler (string channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) |
delegate void | OnAudioSubscribeStateChangedHandler (string channel, uint uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) |
delegate void | OnVideoSubscribeStateChangedHandler (string channel, uint uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) |
delegate void | OnFirstLocalAudioFramePublishedHandler (int elapsed) |
delegate void | OnFirstLocalVideoFramePublishedHandler (int elapsed) |
delegate void | OnUserSuperResolutionEnabledHandler (uint uid, bool enabled, SUPER_RESOLUTION_STATE_REASON reason) |
delegate void | OnVirtualBackgroundSourceEnabledHandler (bool enabled, VIRTUAL_BACKGROUND_SOURCE_STATE_REASON reason) |
delegate void | OnRequestAudioFileInfoHandler (AudioFileInfo info, AUDIO_FILE_INFO_ERROR error) |
delegate void | OnSnapshotTakenHandler (string channel, uint uid, string filePath, int width, int height, int errCode) |
delegate void | OnClientRoleChangeFailedHandler (CLIENT_ROLE_CHANGE_FAILED_REASON reason, CLIENT_ROLE_TYPE currentRole) |
delegate void | OnAudioDeviceTestVolumeIndicationHandler (AudioDeviceTestVolumeType volumeType, int volume) |
delegate void | OnProxyConnectedHandler (string channel, uint uid, PROXY_TYPE proxyType, string localProxyIp, int elapsed) |
delegate void | OnScreenCaptureInfoUpdatedHandler (ScreenCaptureInfo info) |
delegate void | ChannelOnWarningHandler (string channelId, int warn, string message) |
delegate void | ChannelOnErrorHandler (string channelId, int err, string message) |
delegate void | ChannelOnJoinChannelSuccessHandler (string channelId, uint uid, int elapsed) |
delegate void | ChannelOnReJoinChannelSuccessHandler (string channelId, uint uid, int elapsed) |
delegate void | ChannelOnLeaveChannelHandler (string channelId, RtcStats rtcStats) |
delegate void | ChannelOnClientRoleChangedHandler (string channelId, CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole) |
delegate void | ChannelOnUserJoinedHandler (string channelId, uint uid, int elapsed) |
delegate void | ChannelOnUserOffLineHandler (string channelId, uint uid, USER_OFFLINE_REASON reason) |
delegate void | ChannelOnConnectionLostHandler (string channelId) |
delegate void | ChannelOnRequestTokenHandler (string channelId) |
delegate void | ChannelOnTokenPrivilegeWillExpireHandler (string channelId, string token) |
delegate void | ChannelOnRtcStatsHandler (string channelId, RtcStats rtcStats) |
delegate void | ChannelOnNetworkQualityHandler (string channelId, uint uid, int txQuality, int rxQuality) |
delegate void | ChannelOnRemoteVideoStatsHandler (string channelId, RemoteVideoStats remoteVideoStats) |
delegate void | ChannelOnRemoteAudioStatsHandler (string channelId, RemoteAudioStats remoteAudioStats) |
delegate void | ChannelOnRemoteAudioStateChangedHandler (string channelId, uint uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_STATE_REASON reason, int elapsed) |
delegate void | ChannelOnActiveSpeakerHandler (string channelId, uint uid) |
delegate void | ChannelOnVideoSizeChangedHandler (string channelId, uint uid, int width, int height, int rotation) |
delegate void | ChannelOnRemoteVideoStateChangedHandler (string channelId, uint uid, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_STATE_REASON reason, int elapsed) |
delegate void | ChannelOnStreamMessageHandler (string channelId, uint uid, int streamId, string data, int length) |
delegate void | ChannelOnStreamMessageErrorHandler (string channelId, uint uid, int streamId, int code, int missed, int cached) |
delegate void | ChannelOnMediaRelayStateChangedHandler (string channelId, CHANNEL_MEDIA_RELAY_STATE state, CHANNEL_MEDIA_RELAY_ERROR code) |
delegate void | ChannelOnMediaRelayEventHandler (string channelId, CHANNEL_MEDIA_RELAY_EVENT events) |
delegate void | ChannelOnRtmpStreamingStateChangedHandler (string channelId, string url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_ERROR_TYPE errCode) |
delegate void | ChannelOnTranscodingUpdatedHandler (string channelId) |
delegate void | ChannelOnRemoteSubscribeFallbackToAudioOnlyHandler (string channelId, uint uid, bool isFallbackOrRecover) |
delegate void | ChannelOnConnectionStateChangedHandler (string channelId, CONNECTION_STATE_TYPE state, CONNECTION_CHANGED_REASON_TYPE reason) |
delegate void | ChannelOnLocalPublishFallbackToAudioOnlyHandler (string channelId, bool isFallbackOrRecover) |
delegate void | ChannelOnRtmpStreamingEventHandler (string channelId, string url, RTMP_STREAMING_EVENT eventCode) |
delegate void | ChannelOnAudioPublishStateChangedHandler (string channelId, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) |
delegate void | ChannelOnVideoPublishStateChangedHandler (string channelId, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) |
delegate void | ChannelOnAudioSubscribeStateChangedHandler (string channelId, uint uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) |
delegate void | ChannelOnVideoSubscribeStateChangedHandler (string channelId, uint uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) |
delegate void | ChannelOnUserSuperResolutionEnabledHandler (string channelId, uint uid, bool enabled, SUPER_RESOLUTION_STATE_REASON reason) |
delegate void | ChannelOnClientRoleChangeFailedHandler (string channelId, CLIENT_ROLE_CHANGE_FAILED_REASON reason, CLIENT_ROLE_TYPE currentRole) |
delegate void | ChannelOnFirstRemoteVideoFrameHandler (string channelId, uint uid, int width, int height, int elapsed) |
delegate void | ChannelOnChannelProxyConnectedHandler (string channelId, uint uid, PROXY_TYPE proxyType, string localProxyIp, int elapsed) |
|
strong |
|
strong |
|
strong |
|
strong |
Audio codec profile types. The default value is LC_ACC.
|
strong |
The options for SDK preset audio effects.
Enumerator | |
---|---|
AUDIO_EFFECT_OFF | Turn off audio effects and use the original voice. |
ROOM_ACOUSTICS_KTV |
An audio effect typical of a KTV venue.
|
ROOM_ACOUSTICS_VOCAL_CONCERT |
An audio effect typical of a concert hall.
|
ROOM_ACOUSTICS_STUDIO |
An audio effect typical of a recording studio.
|
ROOM_ACOUSTICS_PHONOGRAPH |
An audio effect typical of a vintage phonograph.
|
ROOM_ACOUSTICS_VIRTUAL_STEREO |
A virtual stereo effect that renders monophonic audio as stereo audio.
|
ROOM_ACOUSTICS_SPACIAL |
A more spatial audio effect.
|
ROOM_ACOUSTICS_ETHEREAL |
A more ethereal audio effect.
|
ROOM_ACOUSTICS_3D_VOICE |
A 3D voice effect that makes the voice appear to be moving around the user. The default cycle period of the 3D voice effect is 10 seconds. To change the cycle period, call SetAudioEffectParameters after this method.
|
VOICE_CHANGER_EFFECT_UNCLE |
The voice of an uncle.
|
VOICE_CHANGER_EFFECT_OLDMAN |
The voice of an old man.
|
VOICE_CHANGER_EFFECT_BOY |
The voice of a boy.
|
VOICE_CHANGER_EFFECT_SISTER |
The voice of a young woman.
|
VOICE_CHANGER_EFFECT_GIRL |
The voice of a girl.
|
VOICE_CHANGER_EFFECT_PIGKING |
The voice of Pig King, a character in Journey to the West who has a voice like a growling bear.
|
VOICE_CHANGER_EFFECT_HULK |
The voice of Hulk.
|
STYLE_TRANSFORMATION_RNB |
An audio effect typical of R&B music.
|
STYLE_TRANSFORMATION_POPULAR |
An audio effect typical of popular music.
|
PITCH_CORRECTION |
A pitch correction effect that corrects the user's pitch based on the pitch of the natural C major scale. To change the basic mode and tonic pitch, call SetAudioEffectParameters after this method.
|
Audio equalization band frequencies.
|
strong |
The information acquisition state. This enum is reported in OnRequestAudioFileInfoHandler.
Enumerator | |
---|---|
AUDIO_FILE_INFO_ERROR_OK | 0: Successfully get the information of an audio file. |
AUDIO_FILE_INFO_ERROR_FAILURE | 1: Fail to get the information of an audio file. |
|
strong |
|
strong |
The channel mode. Set in SetAudioMixingDualMonoMode.
|
strong |
The error codes of the local user's audio mixing file.
|
strong |
The reason of audio mixing state change.
|
strong |
The states of the local user's audio mixing file.
Enumerator | |
---|---|
AUDIO_MIXING_STATE_PLAYING |
710: The audio mixing file is playing. This state indicates that the SDK is in the following stages:
|
AUDIO_MIXING_STATE_PAUSED |
711: The audio mixing file pauses playing. This state indicates that the SDK calls PauseAudioMixing successfully. |
AUDIO_MIXING_STATE_STOPPED |
713: The audio mixing file stops playing. This state indicates that the SDK calls StopAudioMixing successfully. |
AUDIO_MIXING_STATE_FAILED |
714: An exception occurs during the playback of the audio mixing file. See error
types in the |
|
strong |
Audio profiles.
Sets the sample rate, bitrate, encoding mode, and the number of channels.
|
strong |
The reording content, set in StartAudioRecording.
|
strong |
The audio recording quality, which is set in StartAudioRecording.
|
strong |
Local voice reverberation presets.
|
strong |
Audio reverberation types.
|
strong |
Audio output routing.
|
strong |
|
strong |
Audio application scenarios.
Audio session restriction.
|
strong |
|
strong |
|
strong |
The degree of blurring applied to the custom background image.
|
strong |
|
strong |
|
strong |
The brightness level of the video image captured by the local camera.
|
strong |
Camera capturer configuration.
Enumerator | |
---|---|
CAPTURER_OUTPUT_PREFERENCE_AUTO |
0: (Default) self-adapts the camera output parameters to the system performance and network conditions to balance CPU consumption and video preview quality. |
CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE |
1: Prioritizes the system performance. The SDK chooses the dimension and frame rate of the local camera capture closest to those set by SetVideoEncoderConfiguration. |
CAPTURER_OUTPUT_PREFERENCE_PREVIEW |
2: Prioritizes the local preview quality. The SDK chooses higher camera output parameters to improve the local video preview quality. This option requires extra CPU and RAM usage for video pre-processing. |
CAPTURER_OUTPUT_PREFERENCE_MANUAL |
3: Allows you to customize the width and height of the video image captured by the local camera. @since v3.3.1 |
|
strong |
The definition of CHANNEL_MEDIA_RELAY_ERROR.
Enumerator | |
---|---|
RELAY_OK | 0: The state is normal. |
RELAY_ERROR_SERVER_ERROR_RESPONSE | 1: An error occurs in the server response. |
RELAY_ERROR_SERVER_NO_RESPONSE |
2: No server response. You can call the LeaveChannel method to leave the channel. This error can also occur if your project has not enabled co-host token authentication. Contact suppo to enable the co-host token authentication service before starting a channel media relay. rt@a gora. io |
RELAY_ERROR_NO_RESOURCE_AVAILABLE |
3: The SDK fails to access the service, probably due to limited resources of the server. |
RELAY_ERROR_FAILED_JOIN_SRC | 4: Fails to send the relay request. |
RELAY_ERROR_FAILED_JOIN_DEST | 5: Fails to accept the relay request. |
RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC | 6: The server fails to receive the media stream. |
RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST | 7: The server fails to send the media stream. |
RELAY_ERROR_SERVER_CONNECTION_LOST |
8: The SDK disconnects from the server due to poor network connections. You can call the LeaveChannel method to leave the channel. |
RELAY_ERROR_INTERNAL_ERROR | 9: An internal error occurs in the server. |
RELAY_ERROR_SRC_TOKEN_EXPIRED | 10: The token of the source channel has expired. |
RELAY_ERROR_DEST_TOKEN_EXPIRED | 11: The token of the destination channel has expired. |
|
strong |
The event code in CHANNEL_MEDIA_RELAY_EVENT.
|
strong |
The state code in CHANNEL_MEDIA_RELAY_STATE.
Enumerator | |
---|---|
RELAY_STATE_IDLE |
0: The initial state. After you successfully stop the channel media relay by calling StopChannelMediaRelay, the OnChannelMediaRelayStateChangedHandler callback returns this state. |
RELAY_STATE_CONNECTING |
1: The SDK tries to relay the media stream to the destination channel. |
RELAY_STATE_RUNNING |
2: The SDK successfully relays the media stream to the destination channel. |
RELAY_STATE_FAILURE | 3: A failure occurs. See the details in code. |
|
strong |
The channel profile.
Reasons for a user role switch failure, reported in OnClientRoleChangeFailedHandler.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Reasons for a connection state change.
Enumerator | |
---|---|
CONNECTION_CHANGED_CONNECTING | 0: The SDK is connecting to Agora's edge server. |
CONNECTION_CHANGED_JOIN_SUCCESS | 1: The SDK has joined the channel successfully. |
CONNECTION_CHANGED_INTERRUPTED |
2: The connection between the SDK and Agora's edge server is interrupted. |
CONNECTION_CHANGED_BANNED_BY_SERVER |
3: The user is banned by the server. This error occurs when the user is kicked out the channel from the server. |
CONNECTION_CHANGED_JOIN_FAILED |
4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel. |
CONNECTION_CHANGED_LEAVE_CHANNEL | 5: The SDK has left the channel. |
CONNECTION_CHANGED_INVALID_APP_ID | 6: The connection failed since Appid is not valid. |
CONNECTION_CHANGED_INVALID_CHANNEL_NAME |
7: The connection failed since channel name is not valid. |
CONNECTION_CHANGED_INVALID_TOKEN |
8: The connection failed since token is not valid, possibly because:
|
CONNECTION_CHANGED_TOKEN_EXPIRED | 9: The connection failed since token is expired. |
CONNECTION_CHANGED_REJECTED_BY_SERVER |
10: The connection is rejected by server. This error usually occurs in the following situations:
|
CONNECTION_CHANGED_SETTING_PROXY_SERVER |
11: The connection changed to reconnecting since SDK has set a proxy server. |
CONNECTION_CHANGED_RENEW_TOKEN |
12: When SDK is in connection failed, the renew token operation will make it connecting. |
CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED |
13: The IP Address of SDK client has changed. i.e., Network type or IP/Port changed by network operator might change client IP address. |
CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT |
14: Timeout for the keep-alive of the connection between the SDK and Agora's edge
server. The connection state changes to
|
CONNECTION_CHANGED_SAME_UID_LOGIN |
19: Join the same channel from different devices using the same user ID. |
CONNECTION_CHANGED_TOO_MANY_BROADCASTERS |
20: The number of hosts in the channel is already at the upper limit.
|
|
strong |
Connection states.
Enumerator | |
---|---|
CONNECTION_STATE_DISCONNECTED |
1: The SDK is disconnected from Agora's edge server.
|
CONNECTION_STATE_CONNECTING |
2: The SDK is connecting to Agora's edge server.
|
CONNECTION_STATE_CONNECTED |
3: The SDK is connected to Agora's edge server and has joined a channel. You can now publish or subscribe to a media stream in the channel. If the connection to the channel is lost because, for example, if the network is down or switched, the SDK automatically tries to reconnect and triggers:
|
CONNECTION_STATE_RECONNECTING |
4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.
|
CONNECTION_STATE_FAILED |
5: The SDK fails to connect to Agora's edge server or join the channel. You must call the LeaveChannel method to leave this state, and call the JoinChannelByKey method again to rejoin the channel. If the SDK is banned from joining the channel by Agora's edge server (through the RESTful API), the SDK triggers the OnConnectionBannedHandler (deprecated) and OnConnectionStateChangedHandler callbacks. |
|
strong |
Video degradation preferences when the bandwidth is a constraint.
|
strong |
Encryption mode.
|
strong |
Error code, see more in Error Code.
|
strong |
|
strong |
The reason for poor QoE of the local user when receiving a remote audio stream.
|
strong |
|
strong |
|
strong |
States of the last-mile network probe test.
|
strong |
Local audio state error codes.
|
strong |
Local audio state types.
|
strong |
Local video state error codes
Enumerator | |
---|---|
LOCAL_VIDEO_STREAM_ERROR_OK | 0: The local video is normal. |
LOCAL_VIDEO_STREAM_ERROR_FAILURE | 1: No specified reason for the local video failure. |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION |
2: No permission to use the local video capturing device. |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY | 3: The local video capturing device is in use. |
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE |
4: The local video capture fails. Check whether the capturing device is working properly. |
LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE | 5: The local video encoding fails. |
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_INBACKGROUND |
6: (iOS only) The application is in the background. @since v3.3.0 |
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_MULTIPLE_FOREGROUND_APPS |
7: (iOS only) The application is running in Slide Over, Split View, or Picture in Picture mode. @since v3.3.0 |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_NOT_FOUND | 8:capture not found |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_DISCONNECTED |
9: (macOS only) The external camera currently in use is disconnected (such as being unplugged).
|
LOCAL_VIDEO_STREAM_ERROR_DEVICE_INVALID_ID |
10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
|
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED |
11: The shared window is minimized when you call StartScreenCaptureByWindowId to share a window. |
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED |
12: The error code indicates that a window shared by the window ID has been closed, or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios for reporting this error code:
|
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_OCCLUDED |
13: (Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing.
|
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_NOT_SUPPORTED |
20: (Windows only) The SDK does not support sharing this type of window.
|
|
strong |
Local video state types.
Enumerator | |
---|---|
LOCAL_VIDEO_STREAM_STATE_STOPPED | 0: Initial state. |
LOCAL_VIDEO_STREAM_STATE_CAPTURING |
1: The local video capturing device starts successfully. The SDK also reports this state when you share a maximized window by calling StartScreenCaptureByWindowId. |
LOCAL_VIDEO_STREAM_STATE_ENCODING | 2: The first video frame is successfully encoded. |
LOCAL_VIDEO_STREAM_STATE_FAILED | 3: The local video fails to start. |
|
strong |
Output log filter level.
|
strong |
The output log level of the SDK.
|
strong |
The low-light enhancement level.
|
strong |
The low-light enhancement mode.
|
strong |
Media device states.
|
strong |
Media device types.
|
strong |
Enumerator | |
---|---|
AUDIO_PLAYOUT_SOURCE | 0: Audio playback device. |
AUDIO_RECORDING_SOURCE | 1: Microphone. |
|
strong |
|
strong |
|
strong |
Metadata type of the observer.
Enumerator | |
---|---|
UNKNOWN_METADATA | -1: The metadata type is unknown. |
VIDEO_METADATA | 0: The metadata type is video. |
|
strong |
Network type.
|
strong |
Video output orientation modes.
|
strong |
|
strong |
The proxy type.
|
strong |
Quality change of the local video in terms of target frame rate and target bit rate since last count.
|
strong |
Network quality types.
|
strong |
Use modes of the OnRecordAudioFrameHandler and OnPlaybackAudioFrameHandler callbacks.
Enumerator | |
---|---|
RAW_AUDIO_FRAME_OP_MODE_READ_ONLY |
0: Read-only mode: Users only read the AudioFrame data without modifying anything. For example, when users acquire the data with the Agora RTC SDK, then push the RTMP or RTMPS streams. |
RAW_AUDIO_FRAME_OP_MODE_WRITE_ONLY |
1: Write-only mode: Users replace the AudioFrame data with their own data and pass the data to the SDK for encoding. For example, when users acquire the data. |
RAW_AUDIO_FRAME_OP_MODE_READ_WRITE |
2: Read and write mode: Users read the data from AudioFrame, modify it, and then play it. For example, when users have their own sound-effect processing module and perform some voice pre-processing, such as a voice change. |
|
strong |
The reason for the state change.
|
strong |
The current recording state.
Enumerator | |
---|---|
RECORDER_STATE_ERROR |
An error occurs during the recording. See RecorderErrorCode for the reason. |
RECORDER_STATE_START | The audio and video recording is started. |
RECORDER_STATE_STOP | The audio and video recording is stopped. |
|
strong |
Remote audio states.
|
strong |
Remote audio state reasons.
|
strong |
The state of the remote video.
|
strong |
The reason of the remote video state change.
|
strong |
|
strong |
Video display modes.
Enumerator | |
---|---|
RENDER_MODE_HIDDEN |
1: Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents. |
RENDER_MODE_FIT |
2: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black. |
RENDER_MODE_ADAPTIVE |
|
|
strong |
Error codes of the RTMP or RTMPS streaming.
Enumerator | |
---|---|
RTMP_STREAM_PUBLISH_ERROR_OK | The RTMP or RTMPS streaming publishes successfully. |
RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT |
Invalid argument used. If, for example, you do not call the
|
RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED |
The RTMP or RTMPS streaming is encrypted and cannot be published. |
RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT |
Timeout for the RTMP or RTMPS streaming. Call the
|
RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR |
An error occurs in Agora's streaming server. Call the
|
RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR | An error occurs in the CDN server. |
RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN | The RTMP or RTMPS streaming publishes too frequently. |
RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT |
The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. |
RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED |
The host manipulates other hosts' URLs. Check your app logic. |
RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND |
Agora's server fails to find the RTMP or RTMPS streaming. |
RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED |
The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct. |
RTMP_STREAM_PUBLISH_ERROR_NOT_BROADCASTER |
11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic.
|
RTMP_STREAM_PUBLISH_ERROR_TRANSCODING_NO_MIX_STREAM |
13: UpdateRtmpTranscoding or SetLiveTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic.
|
RTMP_STREAM_PUBLISH_ERROR_NET_DOWN |
14: Errors occurred in the host's network.
|
RTMP_STREAM_PUBLISH_ERROR_INVALID_APPID |
15: Your App ID does not have permission to use the CDN live streaming function. Refer to Prerequisites to enable the CDN live streaming permission.
|
RTMP_STREAM_UNPUBLISH_ERROR_OK |
100: The streaming has been stopped normally. After you call RemovePublishStreamUrl to stop streaming, the SDK returns this value.
|
|
strong |
States of the RTMP or RTMPS streaming.
Enumerator | |
---|---|
RTMP_STREAM_PUBLISH_STATE_IDLE |
0: The RTMP or RTMPS streaming has not started or has ended. |
RTMP_STREAM_PUBLISH_STATE_CONNECTING |
1: The SDK is connecting to Agora's streaming server and the RTMP server. This state is triggered after you call the AddPublishStreamUrl method. |
RTMP_STREAM_PUBLISH_STATE_RUNNING |
2: The RTMP or RTMPS streaming publishes. The SDK successfully publishes the RTMP or RTMPS streaming and returns this state. |
RTMP_STREAM_PUBLISH_STATE_RECOVERING |
3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.
|
RTMP_STREAM_PUBLISH_STATE_FAILURE |
4: The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information. You can also call the AddPublishStreamUrl method to publish the RTMP or RTMPS streaming again. |
RTMP_STREAM_PUBLISH_STATE_DISCONNECTING |
5: The SDK is disconnecting from the Agora streaming server and CDN. When you call
|
|
strong |
Events during the RTMP or RTMPS streaming.
|
strong |
The screen sharing scenario, set in SetScreenCaptureScenario.
|
strong |
The type of the shared target.
|
strong |
Stream fallback options.
Enumerator | |
---|---|
STREAM_FALLBACK_OPTION_DISABLED |
0: No fallback behavior for the local/remote video stream when the uplink/downlink network conditions are poor. The quality of the stream is not guaranteed. |
STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW |
1: Under poor downlink network conditions, the remote video stream, to which you subscribe, falls back to the low-stream (low resolution and low bitrate) video. You can set this option only in the SetRemoteSubscribeFallbackOption method. Nothing happens when you set this in the SetLocalPublishFallbackOption method. |
STREAM_FALLBACK_OPTION_AUDIO_ONLY |
2: Under poor uplink network conditions, the locally published video stream falls back to audio only. Under poor downlink network conditions, the remote video stream, to which you subscribe, first falls back to the low-stream (low resolution and low bitrate) video; and then to an audio-only stream if the network conditions worsen. |
|
strong |
The publishing state.
Enumerator | |
---|---|
PUB_STATE_IDLE |
0: The initial publishing state after joining the channel. |
PUB_STATE_NO_PUBLISHED |
1: Fails to publish the local stream. Possible reasons:
|
PUB_STATE_PUBLISHING | 2: Publishing. |
PUB_STATE_PUBLISHED | 3: Publishes successfully. |
|
strong |
The subscribing state.
Enumerator | |
---|---|
SUB_STATE_IDLE |
0: The initial subscribing state after joining the channel. |
SUB_STATE_NO_SUBSCRIBED |
1: Fails to subscribe to the remote stream. Possible reasons:
|
SUB_STATE_SUBSCRIBING | 2: Subscribing. |
SUB_STATE_SUBSCRIBED |
3: Subscribes to and receives the remote stream successfully. |
|
strong |
The reason why super resolution is not successfully enabled or the message that confirms success.
|
strong |
Reasons for a user being offline.
|
strong |
Video codec profile types.
|
strong |
|
strong |
The video noise reduction level.
|
strong |
The video noise reduction mode.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Content hints for screen sharing.
The reason why the virtual background is not successfully enabled or the message that confirms success.
Enumerator | |
---|---|
VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_SUCCESS | 0: The virtual background is successfully enabled. |
VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_IMAGE_NOT_EXIST |
1: The custom background image does not exist. Please check the value of
|
VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_COLOR_FORMAT_NOT_SUPPORTED |
2: The color format of the custom background image is invalid. Please check the
value of |
VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_DEVICE_NOT_SUPPORTED |
3: The device does not support using the virtual background. |
|
strong |
The options for SDK preset voice beautifier effects.
Enumerator | |
---|---|
VOICE_BEAUTIFIER_OFF |
Turn off voice beautifier effects and use the original voice. |
CHAT_BEAUTIFIER_MAGNETIC |
A more magnetic voice.
|
CHAT_BEAUTIFIER_FRESH |
A fresher voice.
|
CHAT_BEAUTIFIER_VITALITY |
A more vital voice.
|
SINGING_BEAUTIFIER |
Singing beautifier effect.
|
TIMBRE_TRANSFORMATION_VIGOROUS | A more vigorous voice. |
TIMBRE_TRANSFORMATION_DEEP | A deeper voice. |
TIMBRE_TRANSFORMATION_MELLOW | A mellower voice. |
TIMBRE_TRANSFORMATION_FALSETTO | A falsetto voice. |
TIMBRE_TRANSFORMATION_FULL | A fuller voice. |
TIMBRE_TRANSFORMATION_CLEAR | A clearer voice. |
TIMBRE_TRANSFORMATION_RESOUNDING | A more resounding voice. |
TIMBRE_TRANSFORMATION_RINGING | A more ringing voice. |
|
strong |
Local voice beautifier options.
|
strong |
The options for SDK preset voice conversion effects.
|
strong |
|
strong |
Suggest an action for the user.
delegate void agora_gaming_rtc.ChannelOnActiveSpeakerHandler | ( | string | channelId, |
uint | uid | ||
) |
Reports which user is the loudest speaker.
If the user enables the audio volume indication by calling the
EnableAudioVolumeIndication
method, this callback returns the uid
of the active speaker detected by the
audio volume detection module of the SDK.
EnableAudioVolumeIndication
method.
channelId | The name of the channel that you join. |
uid |
The user ID of the active speaker. A uid of 0 represents the local
user.
|
delegate void agora_gaming_rtc.ChannelOnAudioPublishStateChangedHandler | ( | string | channelId, |
STREAM_PUBLISH_STATE | oldState, | ||
STREAM_PUBLISH_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio publishing state changes.
This callback indicates the publishing state change of the local audio stream.
channelId | The name of the channel that you join. |
oldState | The previous publishing state. For details, see STREAM_PUBLISH_STATE. |
newState | The current publishing state. For details, see STREAM_PUBLISH_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.ChannelOnAudioSubscribeStateChangedHandler | ( | string | channelId, |
uint | uid, | ||
STREAM_SUBSCRIBE_STATE | oldState, | ||
STREAM_SUBSCRIBE_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio subscribing state changes.
This callback indicates the subscribing state change of a remote audio stream.
channelId | The name of the channel that you join. |
uid | The ID of the remote user. |
oldState | The previous subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
newState | The current subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.ChannelOnChannelProxyConnectedHandler | ( | string | channelId, |
uint | uid, | ||
PROXY_TYPE | proxyType, | ||
string | localProxyIp, | ||
int | elapsed | ||
) |
Reports the proxy connection state.
You can use this callback to listen for the state of the SDK connecting to a proxy. For
example, when a user calls
SetCloudProxy
and joins a channel successfully, the SDK triggers this callback to report the user ID,
the proxy type connected, and the time elapsed from the user calling
joinChannel
until this callback is triggered.
channelId | The channel name. |
uid | The user ID. |
proxyType | The proxy type. See PROXY_TYPE. |
localProxyIp | Reserved for future use. |
elapsed |
The time elapsed (ms) from the user calling joinChannel until this
callback is triggered.
|
delegate void agora_gaming_rtc.ChannelOnClientRoleChangedHandler | ( | string | channelId, |
CLIENT_ROLE_TYPE | oldRole, | ||
CLIENT_ROLE_TYPE | newRole | ||
) |
Occurs when the user role switches in the interactive live streaming. For example, from a host to an audience or vice versa.
This callback notifies the application of a user role switch when the application calls the SetClientRole method.
The SDK triggers this callback when the local user switches the user role by calling the
SetClientRole
method after joining the channel.
channelId | The name of the channel that you join. |
oldRole | Role that the user switches from: CLIENT_ROLE_TYPE. |
newRole | Role that the user switches to: CLIENT_ROLE_TYPE. |
delegate void agora_gaming_rtc.ChannelOnClientRoleChangeFailedHandler | ( | string | channelId, |
CLIENT_ROLE_CHANGE_FAILED_REASON | reason, | ||
CLIENT_ROLE_TYPE | currentRole | ||
) |
Occurs when the user role switch fails in the interactive live streaming.
In the LIVE_BROADCASTING
channel profile, when the local user calls
SetClientRole
to switch their user role after joining the channel but the
switch fails, the SDK triggers this callback to report the reason for the failure and
the current user role.
channelId | The channel name. |
reason | The reason for the user role switch failure. See CLIENT_ROLE_CHANGE_FAILED_REASON. |
currentRole | The current user role. See CLIENT_ROLE_TYPE. |
delegate void agora_gaming_rtc.ChannelOnConnectionLostHandler | ( | string | channelId | ) |
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the JoinChannel method, whether or not it is in the channel.
This callback is different from OnConnectionInterruptedHandler:
OnConnectionInterruptedHandler
callback when it
loses connection with the server for more than four seconds after it successfully
joins the channel.
ChannelOnConnectionLostHandler
callback when it
loses connection with the server for more than 10 seconds, whether or not it joins the
channel.
If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
channelId | The name of the channel that you join. |
delegate void agora_gaming_rtc.ChannelOnConnectionStateChangedHandler | ( | string | channelId, |
CONNECTION_STATE_TYPE | state, | ||
CONNECTION_CHANGED_REASON_TYPE | reason | ||
) |
Occurs when the connection state between the SDK and the server changes.
channelId | The name of the channel that you join. |
state | See CONNECTION_STATE_TYPE. |
reason | See CONNECTION_CHANGED_REASON_TYPE. |
delegate void agora_gaming_rtc.ChannelOnErrorHandler | ( | string | channelId, |
int | err, | ||
string | message | ||
) |
Reports an error code of
AgoraChannel
.
In most cases, the SDK cannot fix the issue and resume running. The SDK requires the application to take action or informs the user about the issue.
For example, the SDK reports an ERR_START_CALL(1002)
error when failing to
initialize a call. The application informs the user that the call initialization failed
and invokes the
LeaveChannel
method to leave the channel.
channelId | The name of the channel that you join. |
err | The error code, see Error Code. |
message | The error message. |
delegate void agora_gaming_rtc.ChannelOnFirstRemoteVideoFrameHandler | ( | string | channelId, |
uint | uid, | ||
int | width, | ||
int | height, | ||
int | elapsed | ||
) |
Occurs when the first remote video frame is rendered.
The SDK triggers this callback when the first frame of the remote video is displayed in the user's video window. The application can get the time elapsed from a user joining the channel until the first video frame is displayed.
channelId | The name of the current channel. |
uid | User ID of the remote user sending the video stream. |
width | Width (px) of the video frame. |
height | Height (px) of the video stream. |
elapsed |
Time elapsed (ms) from the local user calling joinChannel until the
SDK triggers this callback.
|
delegate void agora_gaming_rtc.ChannelOnJoinChannelSuccessHandler | ( | string | channelId, |
uint | uid, | ||
int | elapsed | ||
) |
Occurs when a user joins a channel.
This callback notifies the application that a user joins a specified channel when the application calls the JoinChannel method.
The channel name assignment is based on channelId
specified in the
JoinChannel
method.
If the uid
is not specified in the JoinChannel
method, the
server automatically assigns a uid
.
channelId | The name of the channel that you join. |
uid | The user ID of the user joining the channel. |
elapsed |
Time elapsed (ms) from the user calling the JoinChannel method
until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.ChannelOnLeaveChannelHandler | ( | string | channelId, |
RtcStats | rtcStats | ||
) |
Occurs when a user leaves the channel.
This callback notifies the application that a user leaves the channel when the application calls the LeaveChannel method.
The application retrieves information, such as the call duration and statistics.
channelId | The name of the channel that you join. |
rtcStats | The statistics of the call: RtcStats. |
delegate void agora_gaming_rtc.ChannelOnLocalPublishFallbackToAudioOnlyHandler | ( | string | channelId, |
bool | isFallbackOrRecover | ||
) |
Occurs when the locally published media stream falls back to an audio-only stream due to poor network conditions or switches back to the video after the network conditions improve.
If you call
SetLocalPublishFallbackOption
and set option
as
STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK triggers this callback when the locally published stream falls back to
audio-only mode due to poor uplink conditions, or when the audio stream switches back to
the video after the uplink network condition improves.
channelId | The name of the channel that you join. |
isFallbackOrRecover |
Whether the locally published stream falls back to audio-only or switches back
to the video:
|
delegate void agora_gaming_rtc.ChannelOnMediaRelayEventHandler | ( | string | channelId, |
CHANNEL_MEDIA_RELAY_EVENT | events | ||
) |
Reports events during the media stream relay.
channelId | The name of the channel that you join. |
events | The event code in CHANNEL_MEDIA_RELAY_EVENT. |
delegate void agora_gaming_rtc.ChannelOnMediaRelayStateChangedHandler | ( | string | channelId, |
CHANNEL_MEDIA_RELAY_STATE | state, | ||
CHANNEL_MEDIA_RELAY_ERROR | code | ||
) |
Occurs when the state of the media stream relay changes.
The SDK returns the state of the current media relay with any error message.
channelId | The name of the channel that you join. |
state | The state code in CHANNEL_MEDIA_RELAY_STATE. |
code | The error code in CHANNEL_MEDIA_RELAY_ERROR. |
delegate void agora_gaming_rtc.ChannelOnNetworkQualityHandler | ( | string | channelId, |
uint | uid, | ||
int | txQuality, | ||
int | rxQuality | ||
) |
Reports the last mile network quality of each user in the channel once every two seconds.
Last mile refers to the connection between the local device and the Agora edge server. This callback reports once every two seconds the last mile network conditions of each user in the channel. If a channel includes multiple users, the SDK triggers this callback as many times.
channelId | The name of the channel that you join. |
uid |
User ID. The network quality of the user with this uid is reported.
If uid is 0, the local network quality is reported.
|
txQuality |
Uplink transmission quality rating of the user in terms of the transmission
bitrate, packet loss rate, average RTT (Round-Trip Time), and jitter of the
uplink network. txQuality is a quality rating helping you
understand how well the current uplink network conditions can support the
selected
VideoEncoderConfiguration. For example, a 1000 Kbps uplink network may be adequate for video frames with
a resolution of 640 × 480 and a frame rate of 15 fps in the Live-broadcast
profile, but may be inadequate for resolutions higher than 1280 × 720. See
QUALITY_TYPE.
|
rxQuality | Downlink network quality rating of the user in terms of the packet loss rate, average RTT, and jitter of the downlink network. See QUALITY_TYPE. |
delegate void agora_gaming_rtc.ChannelOnReJoinChannelSuccessHandler | ( | string | channelId, |
uint | uid, | ||
int | elapsed | ||
) |
Occurs when a user rejoins the channel after disconnection due to network problems.
When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
channelId | The name of the channel that you rejoin. |
uid | The user ID of the user rejoining the channel. |
elapsed | The time elapsed (ms) from starting to reconnect until the SDK triggers this callback. |
delegate void agora_gaming_rtc.ChannelOnRemoteAudioStateChangedHandler | ( | string | channelId, |
uint | uid, | ||
REMOTE_AUDIO_STATE | state, | ||
REMOTE_AUDIO_STATE_REASON | reason, | ||
int | elapsed | ||
) |
Occurs when the remote audio state changes.
This callback indicates the state change of the remote audio stream.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
channelId | The name of the channel that you join. |
uid | The ID of the remote user whose audio state changes. |
state | The state of the remote audio. See REMOTE_AUDIO_STATE. |
reason | The reason of the remote audio state change. See REMOTE_AUDIO_STATE_REASON. |
elapsed | Time elapsed (ms) from the local user calling the JoinChannel method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.ChannelOnRemoteAudioStatsHandler | ( | string | channelId, |
RemoteAudioStats | remoteAudioStats | ||
) |
Reports the statistics of the audio stream from each remote user or host.
This callback replaces the OnAudioQualityHandler callback.
The SDK triggers this callback once every two seconds for each remote user or host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
channelId | The name of the channel that you join. |
remoteAudioStats | The statistics of the received remote audio streams. See RemoteAudioStats. |
delegate void agora_gaming_rtc.ChannelOnRemoteSubscribeFallbackToAudioOnlyHandler | ( | string | channelId, |
uint | uid, | ||
bool | isFallbackOrRecover | ||
) |
Occurs when the remote media stream falls back to audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve.
If you call
SetRemoteSubscribeFallbackOption
and set option
as
STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK triggers this callback when the remote media stream falls back to audio-only
mode due to poor uplink conditions, or when the remote media stream switches back to the
video after the uplink network condition improves.
channelId | The name of the channel that you join. |
uid | ID of the remote user sending the stream. |
isFallbackOrRecover |
Whether the remotely subscribed media stream falls back to audio-only or
switches back to the video:
|
delegate void agora_gaming_rtc.ChannelOnRemoteVideoStateChangedHandler | ( | string | channelId, |
uint | uid, | ||
REMOTE_VIDEO_STATE | state, | ||
REMOTE_VIDEO_STATE_REASON | reason, | ||
int | elapsed | ||
) |
Occurs when the remote video state changes.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
channelId | The name of the channel that you join. |
uid | The ID of the remote user whose video state changes. |
state | The state of the remote video. See REMOTE_VIDEO_STATE. |
reason | The reason of the remote video state change. See REMOTE_VIDEO_STATE_REASON. |
elapsed | The time elapsed (ms) from the local user calling the JoinChannel method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.ChannelOnRemoteVideoStatsHandler | ( | string | channelId, |
RemoteVideoStats | remoteVideoStats | ||
) |
Reports the statistics of the video stream from each remote user or host.
The SDK triggers this callback once every two seconds for each remote user or host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
channelId | The name of the channel that you join. |
remoteVideoStats | The statistics of the remote video stream. See RemoteVideoStats. |
delegate void agora_gaming_rtc.ChannelOnRequestTokenHandler | ( | string | channelId | ) |
Occurs when the token expires.
After a token is specified by calling the JoinChannel method, if the SDK losses connection with the Agora server due to network issues, the token may expire after a certain period of time and a new token may be required to reconnect to the server.
This callback notifies the app to generate a new token and call
JoinChannel
to rejoin the channel with the new token.
channelId | The name of the channel that you join. |
delegate void agora_gaming_rtc.ChannelOnRtcStatsHandler | ( | string | channelId, |
RtcStats | rtcStats | ||
) |
Reports the statistics of the current call session once every two seconds.
channelId | The name of the channel that you join. |
rtcStats | The AgoraChannel engine statistics: RtcStats. |
delegate void agora_gaming_rtc.ChannelOnRtmpStreamingEventHandler | ( | string | channelId, |
string | url, | ||
RTMP_STREAMING_EVENT | eventCode | ||
) |
Reports events during the RTMP or RTMPS streaming.
channelId | The name of the channel that you join. |
url | The RTMP or RTMPS streaming URL. |
eventCode | The event code. See RTMP_STREAMING_EVENT |
delegate void agora_gaming_rtc.ChannelOnRtmpStreamingStateChangedHandler | ( | string | channelId, |
string | url, | ||
RTMP_STREAM_PUBLISH_STATE | state, | ||
RTMP_STREAM_PUBLISH_ERROR_TYPE | errCode | ||
) |
Occurs when the state of the RTMP or RTMPS streaming changes.
The SDK triggers this callback to report the result of the local user calling the AddPublishStreamUrl or RemovePublishStreamUrl method.
This callback indicates the state of the RTMP or RTMPS streaming. When exceptions occur,
you can troubleshoot issues by referring to the detailed error descriptions in the
errCode
parameter.
channelId | The name of the channel that you join. |
url | The CDN streaming URL. |
state | The RTMP or RTMPS streaming state. See: RTMP_STREAM_PUBLISH_STATE. |
errCode | The detailed error information for streaming. See: RTMP_STREAM_PUBLISH_ERROR_TYPE. |
delegate void agora_gaming_rtc.ChannelOnStreamMessageErrorHandler | ( | string | channelId, |
uint | uid, | ||
int | streamId, | ||
int | code, | ||
int | missed, | ||
int | cached | ||
) |
Occurs when the local user does not receive the data stream from the remote user within five seconds.
The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the SendStreamMessage method.
channelId | The name of the channel that you join. |
uid | The user ID of the remote user sending the message. |
streamId | The stream ID. |
code | The error code: Error Code. |
missed | The number of lost messages. |
cached | The number of incoming cached messages when the data stream is interrupted. |
delegate void agora_gaming_rtc.ChannelOnStreamMessageHandler | ( | string | channelId, |
uint | uid, | ||
int | streamId, | ||
string | data, | ||
int | length | ||
) |
Occurs when the local user receives the data stream from the remote user within five seconds.
The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the SendStreamMessage method.
channelId | The name of the channel that you join. |
uid | The user ID of the remote user sending the message. |
streamId | The stream ID. |
data | The data received by the local user. |
length | The length of the data in bytes. |
delegate void agora_gaming_rtc.ChannelOnTokenPrivilegeWillExpireHandler | ( | string | channelId, |
string | token | ||
) |
Occurs when the token expires in 30 seconds.
The user becomes offline if the token used in the JoinChannel method expires. The SDK triggers this callback 30 seconds before the token expires to remind the application to get a new token. Upon receiving this callback, generate a new token on the server and call the RenewToken method to pass the new token to the SDK.
channelId | The name of the channel that you join. |
token | The token that expires in 30 seconds. |
delegate void agora_gaming_rtc.ChannelOnTranscodingUpdatedHandler | ( | string | channelId | ) |
Occurs when the publisher's transcoding is updated.
When the
LiveTranscoding
class in the
SetLiveTranscoding
method updates, the SDK triggers the
ChannelOnTranscodingUpdatedHandler
callback to report the update
information to the local host.
SetLiveTranscoding
method to set the
LiveTranscoding
class for the first time, the SDK does not trigger the
ChannelOnTranscodingUpdatedHandler
callback.
channelId | The name of the channel that you join. |
delegate void agora_gaming_rtc.ChannelOnUserJoinedHandler | ( | string | channelId, |
uint | uid, | ||
int | elapsed | ||
) |
Occurs when a remote user (Communication) or host (Live Broadcast) joins the channel.
The SDK triggers this callback under one of the following circumstances:
channelId | The name of the channel that you join. |
uid | The user ID of the user or host joining the channel. |
elapsed |
Time delay (ms) from the local user calling the JoinChannel method
until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.ChannelOnUserOffLineHandler | ( | string | channelId, |
uint | uid, | ||
USER_OFFLINE_REASON | reason | ||
) |
Occurs when a remote user (Communication) or host (Live Broadcast) leaves the channel.
Reasons why the user is offline:
channelId | The name of the channel that you join. |
uid | The user ID of the user leaving the channel or going offline. |
reason | The reason why the user is offline: USER_OFFLINE_REASON. |
delegate void agora_gaming_rtc.ChannelOnUserSuperResolutionEnabledHandler | ( | string | channelId, |
uint | uid, | ||
bool | enabled, | ||
SUPER_RESOLUTION_STATE_REASON | reason | ||
) |
Reports whether the super resolution feature is successfully enabled. (beta feature)
After calling
EnableRemoteSuperResolution, the SDK triggers this callback to report whether the super-resolution algorithm is
successfully enabled. If not successfully enabled, you can use reason
for
troubleshooting.
channelId | The name of the channel that you join. |
uid | The user ID of the remote user. |
enabled |
Whether super resolution is successfully enabled:
|
reason | The reason why super resolution is not successfully enabled. See SUPER_RESOLUTION_STATE_REASON. |
delegate void agora_gaming_rtc.ChannelOnVideoPublishStateChangedHandler | ( | string | channelId, |
STREAM_PUBLISH_STATE | oldState, | ||
STREAM_PUBLISH_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the video publishing state changes.
This callback indicates the publishing state change of the local video stream.
channelId | The name of the channel that you join. |
oldState | The previous publishing state. For details, see STREAM_PUBLISH_STATE. |
newState | The current publishing state. For details, see STREAM_PUBLISH_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.ChannelOnVideoSizeChangedHandler | ( | string | channelId, |
uint | uid, | ||
int | width, | ||
int | height, | ||
int | rotation | ||
) |
Occurs when the video size or rotation of a specified user changes.
channelId | The name of the channel that you join. |
uid | The user ID of the remote user or local user (0) whose video size or rotation changes. |
width | The new width (pixels) of the video. |
height | The new height (pixels) of the video. |
rotation | The new rotation of the video [0 to 360). |
delegate void agora_gaming_rtc.ChannelOnVideoSubscribeStateChangedHandler | ( | string | channelId, |
uint | uid, | ||
STREAM_SUBSCRIBE_STATE | oldState, | ||
STREAM_SUBSCRIBE_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio subscribing state changes.
This callback indicates the subscribing state change of a remote video stream.
channelId | The name of the channel that you join. |
uid | The ID of the remote user. |
oldState | The previous subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
newState | The current subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.ChannelOnWarningHandler | ( | string | channelId, |
int | warn, | ||
string | message | ||
) |
Reports a warning during SDK runtime.
In most cases, the application can ignore the warning reported by the SDK because the
SDK can usually fix the issue and resume running. For example, when losing connection
with the server, the SDK may report WARN_LOOKUP_CHANNEL_TIMEOUT(104)
and
automatically try to reconnect.
channelId | The name of the channel that you join. |
warn | The warning code, see Warning Code. |
message | The warning message. |
delegate void agora_gaming_rtc.OnActiveSpeakerHandler | ( | uint | uid | ) |
Occurs when the most active speaker is detected.
After a successful call of EnableAudioVolumeIndication, the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user, who is detected as the loudest for the most times, is the most active user.
When the number of user is no less than two and an active speaker exists, the SDK
triggers this callback and reports the uid
of the most active speaker.
uid
of the new active speaker.
uid | The user ID of the most active speaker. |
delegate void agora_gaming_rtc.OnApiExecutedHandler | ( | int | err, |
string | api, | ||
string | result | ||
) |
Occurs when a method is executed by the SDK.
err | The Error Code. returned by the SDK when a method call fails. If the SDK returns 0, then the method call is successful. |
api | The method executed by the SDK. |
result | The result of the method call. |
delegate void agora_gaming_rtc.OnAudioDeviceStateChangedHandler | ( | string | deviceId, |
int | deviceType, | ||
int | deviceState | ||
) |
Occurs when the audio device state changes.
This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device.
deviceId | The device ID. |
deviceType | The device type: MEDIA_DEVICE_TYPE. |
deviceState | The device state: MEDIA_DEVICE_STATE_TYPE. |
delegate void agora_gaming_rtc.OnAudioDeviceTestVolumeIndicationHandler | ( | AudioDeviceTestVolumeType | volumeType, |
int | volume | ||
) |
Reports the result of an audio device test.
After successfully calling StartAudioRecordingDeviceTest, StartAudioPlaybackDeviceTest or StartAudioDeviceLoopbackTest to start an audio device test, the SDK triggers this callback at the set time interval to report the volume information of the audio device tested.
volumeType | The volume type. See AudioDeviceTestVolumeType. |
volume | The volume, in the range of [0,255]. |
delegate void agora_gaming_rtc.OnAudioDeviceVolumeChangedHandler | ( | MEDIA_DEVICE_TYPE | deviceType, |
int | volume, | ||
bool | muted | ||
) |
Occurs when the volume of the playback device, microphone, or application changes.
deviceType | Device type: MEDIA_DEVICE_TYPE. |
volume | Volume of the device. The value ranges between 0 and 255. |
muted |
|
delegate void agora_gaming_rtc.OnAudioEffectFinishedHandler | ( | int | soundId | ) |
Occurs when the local audio effect playback finishes.
The SDK triggers this callback when the local audio effect file playback finishes.
soundId | ID of the local audio effect. Each local audio effect has a unique ID. |
delegate void agora_gaming_rtc.OnAudioMixingFinishedHandler | ( | ) |
Occurs when the audio mixing file playback finishes.
You can start an audio mixing file playback by calling the StartAudioMixing method. The SDK triggers this callback when the audio mixing file playback finishes.
If the StartAudioMixing
method call fails, an error code returns in the
OnSDKErrorHandler
callback.
delegate void agora_gaming_rtc.OnAudioMixingStateChangedHandler | ( | AUDIO_MIXING_STATE_TYPE | state, |
AUDIO_MIXING_REASON_TYPE | reason | ||
) |
Occurs when the state of the local user's audio mixing file changes.
state
, and 0 in errorCode
.
state
and an error in errorCode
.
WARN_AUDIO_MIXING_OPEN_ERROR(701)
.
state | The state code. See AUDIO_MIXING_STATE_TYPE. |
reason | The error code. See AUDIO_MIXING_ERROR_TYPE. |
delegate void agora_gaming_rtc.OnAudioPublishStateChangedHandler | ( | string | channel, |
STREAM_PUBLISH_STATE | oldState, | ||
STREAM_PUBLISH_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio publishing state changes.
This callback indicates the publishing state change of the local audio stream.
channel | The channel name. |
oldState | The previous publishing state. For details, see STREAM_PUBLISH_STATE. |
newState | The current publishing state. For details, see STREAM_PUBLISH_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.OnAudioQualityHandler | ( | uint | userId, |
int | quality, | ||
ushort | delay, | ||
ushort | lost | ||
) |
Reports the statistics of the audio stream from each remote user/host.
The SDK triggers this callback once every two seconds to report the audio quality of each remote user/host sending an audio stream. If a channel has multiple users/hosts sending audio streams, the SDK triggers this callback as many times.
userId | The user ID of the speaker. |
quality | The audio quality of the user: QUALITY_TYPE. |
delay | The time delay (ms) of sending the audio packet from the sender to the receiver, including the time delay of audio sampling pre-processing, transmission, and the jitter buffer. |
lost | The packet loss rate (%) of the audio packet sent from the sender to the receiver. |
delegate void agora_gaming_rtc.OnAudioRouteChangedHandler | ( | AUDIO_ROUTE | route | ) |
Occurs when the local audio route changes.
The SDK triggers this callback when the local audio route switches to an earpiece, speakerphone, headset, or Bluetooth device.
route | The current audio routing. See: AUDIO_ROUTE. |
delegate void agora_gaming_rtc.OnAudioSubscribeStateChangedHandler | ( | string | channel, |
uint | uid, | ||
STREAM_SUBSCRIBE_STATE | oldState, | ||
STREAM_SUBSCRIBE_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio subscribing state changes.
This callback indicates the subscribing state change of a remote audio stream.
channel | The channel name. |
uid | The ID of the remote user. |
oldState | The previous subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
newState | The current subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.OnCameraExposureAreaChangedHandler | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Occurs when the camera exposure area changes.
The SDK triggers this callback when the local user changes the camera exposure position by calling the setCameraExposurePosition method.
x | x coordinate of the changed camera exposure area. |
y | y coordinate of the changed camera exposure area. |
width | Width of the changed camera exposure area. |
height | Height of the changed camera exposure area. |
delegate void agora_gaming_rtc.OnCameraFocusAreaChangedHandler | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Occurs when the camera focus area changes.
The SDK triggers this callback when the local user changes the camera focus position by calling the setCameraFocusPositionInPreview method.
x | x coordinate of the changed camera focus area. |
y | y coordinate of the changed camera focus area. |
width | Width of the changed camera focus area. |
height | Height of the changed camera focus area. |
delegate void agora_gaming_rtc.OnCameraReadyHandler | ( | ) |
Occurs when the camera turns on and is ready to capture the video.
If the camera fails to turn on, fix the error reported in the OnSDKErrorHandler callback.
delegate void agora_gaming_rtc.OnChannelMediaRelayEventHandler | ( | CHANNEL_MEDIA_RELAY_EVENT | events | ) |
Reports events during the media stream relay.
events | The event code in CHANNEL_MEDIA_RELAY_EVENT. |
delegate void agora_gaming_rtc.OnChannelMediaRelayStateChangedHandler | ( | CHANNEL_MEDIA_RELAY_STATE | state, |
CHANNEL_MEDIA_RELAY_ERROR | code | ||
) |
Occurs when the state of the media stream relay changes.
The SDK returns the state of the current media relay with any error message.
state | The state code in CHANNEL_MEDIA_RELAY_STATE. |
code | The error code in CHANNEL_MEDIA_RELAY_ERROR. |
delegate void agora_gaming_rtc.OnClientRoleChangedHandler | ( | CLIENT_ROLE_TYPE | oldRole, |
CLIENT_ROLE_TYPE | newRole | ||
) |
Occurs when the user role switches successfully in the interactive live streaming.
In the LIVE_BROADCASTING
channel profile, when the local user successfully
calls setClientRole
to switch their user role after joining the channel,
for example, from a host to an audience member or vice versa, the SDK triggers this
callback to report the user role before and after the switch.
oldRole | Role that the user switches from: CLIENT_ROLE_TYPE. |
newRole | Role that the user switches to: CLIENT_ROLE_TYPE. |
delegate void agora_gaming_rtc.OnClientRoleChangeFailedHandler | ( | CLIENT_ROLE_CHANGE_FAILED_REASON | reason, |
CLIENT_ROLE_TYPE | currentRole | ||
) |
Occurs when the user role switch fails in the interactive live streaming.
In the LIVE_BROADCASTING
channel profile, when the local user calls
SetClientRole
to switch their user role after joining the channel but the
switch fails, the SDK triggers this callback to report the reason for the failure and
the current user role.
reason | The reason for the user role switch failure. See CLIENT_ROLE_CHANGE_FAILED_REASON. |
currentRole | The current user role. See CLIENT_ROLE_TYPE. |
delegate void agora_gaming_rtc.OnConnectionBannedHandler | ( | ) |
Occurs when your connection is banned by the Agora Server.
delegate void agora_gaming_rtc.OnConnectionInterruptedHandler | ( | ) |
Occurs when the connection between the SDK and the server is interrupted.
The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established.
After triggering this callback, the SDK tries reconnecting to the server. You can use this callback to implement pop-up reminders.
This callback is different from OnConnectionLostHandler:
OnConnectionInterruptedHandler
callback when it
loses connection with the server for more than four seconds after it successfully
joins the channel.
OnConnectionLostHandler
callback when it loses
connection with the server for more than 10 seconds, whether or not it joins the
channel.
If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
delegate void agora_gaming_rtc.OnConnectionLostHandler | ( | ) |
Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the JoinChannelByKey method, whether or not it is in the channel.
This callback is different from OnConnectionInterruptedHandler:
OnConnectionInterruptedHandler
callback when it
loses connection with the server for more than four seconds after it successfully
joins the channel.
OnConnectionLostHandler
callback when it loses
connection with the server for more than 10 seconds, whether or not it joins the
channel.
If the SDK fails to rejoin the channel 20 minutes after being disconnected from Agora's edge server, the SDK stops rejoining the channel.
delegate void agora_gaming_rtc.OnConnectionStateChangedHandler | ( | CONNECTION_STATE_TYPE | state, |
CONNECTION_CHANGED_REASON_TYPE | reason | ||
) |
Occurs when the connection state between the SDK and the server changes.
state | See CONNECTION_STATE_TYPE. |
reason | See CONNECTION_CHANGED_REASON_TYPE. |
delegate void agora_gaming_rtc.OnFacePositionChangedHandler | ( | int | imageWidth, |
int | imageHeight, | ||
Rectangle | vecRectangle, | ||
int | vecDistance, | ||
int | numFaces | ||
) |
Reports the face detection result of the local user. Applies to Android and iOS only.
Once you enable face detection by calling EnableFaceDetection(true), you can get the following information on the local user in real-time:
distance
value reported in this callback may be
slightly different from the actual distance. Therefore, Agora does not recommend
using it for accurate calculation.
imageWidth | The width (px) of the local video. |
imageHeight | The height (px) of the local video. |
vecRectangle |
The position and size of the human face on the local video:
|
vecDistance | The distance (cm) between the human face and the screen. |
numFaces | The number of faces detected. If the value is 0, it means that no human face is detected. |
delegate void agora_gaming_rtc.OnFirstLocalAudioFrameHandler | ( | int | elapsed | ) |
Occurs when the engine sends the first local audio frame.
elapsed | The time elapsed (ms) from the local user calling JoinChannelByKey until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnFirstLocalAudioFramePublishedHandler | ( | int | elapsed | ) |
Occurs when the first audio frame is published.
The SDK triggers this callback under one of the following circumstances:
MuteLocalAudioStream(false)
in sequence.
elapsed |
The time elapsed (ms) from the local client calling
JoinChannelByKey until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.OnFirstLocalVideoFrameHandler | ( | int | width, |
int | height, | ||
int | elapsed | ||
) |
Occurs when the first local video frame is displayed/rendered on the local video view.
width | Width (px) of the first local video frame. |
height | Height (px) of the first local video frame. |
elapsed |
Time elapsed (ms) from the local user calling the
JoinChannelByKey
method until the SDK triggers this callback. If you call the
StartPreview
method before calling the JoinChannelByKey method, then
elapsed is the time elapsed from calling the
StartPreview method until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.OnFirstLocalVideoFramePublishedHandler | ( | int | elapsed | ) |
Occurs when the first video frame is published.
The SDK triggers this callback under one of the following circumstances:
MuteLocalVideoStream(false)
in sequence.
elapsed |
The time elapsed (ms) from the local client calling
JoinChannelByKey until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.OnFirstRemoteAudioDecodedHandler | ( | uint | uid, |
int | elapsed | ||
) |
Occurs when the SDK decodes the first remote audio frame for playback.
This callback is triggered in either of the following scenarios:
uid | User ID of the remote user sending the audio stream. |
elapsed | Time elapsed (ms) from the local user calling the JoinChannelByKey method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnFirstRemoteAudioFrameHandler | ( | uint | userId, |
int | elapsed | ||
) |
Occurs when the engine receives the first audio frame from a specific remote user.
userId | The user ID of the remote user. |
elapsed | The time elapsed (ms) from the remote user calling JoinChannelByKey until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnFirstRemoteVideoDecodedHandler | ( | uint | uid, |
int | width, | ||
int | height, | ||
int | elapsed | ||
) |
Occurs when the first remote video frame is received and decoded.
This callback is triggered in either of the following scenarios:
uid | The user ID of the remote user sending the video stream. |
width | The width (px) of the video stream. |
height | The height (px) of the video stream. |
elapsed | Time elapsed (ms) from the local user calling the JoinChannelByKey method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnFirstRemoteVideoFrameHandler | ( | uint | uid, |
int | width, | ||
int | height, | ||
int | elapsed | ||
) |
Occurs when the first remote video frame is received and decoded.
The SDK triggers this callback when the first frame of the remote video is displayed in the user's video window. The application can retrieve the time elapsed from a user joining the channel until the first video frame is displayed.
uid | User ID of the remote user sending the video stream. |
width | Width (px) of the video frame. |
height | Height (px) of the video stream. |
elapsed | Time elapsed (ms) from the local user calling the JoinChannelByKey method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnJoinChannelSuccessHandler | ( | string | channelName, |
uint | uid, | ||
int | elapsed | ||
) |
Occurs when a user joins a channel.
This callback notifies the application that a user joins a specified channel when the application calls the JoinChannelByKey method.
The channel name assignment is based on channelName
specified in the
JoinChannelByKey
method.
If the uid
is not specified in the JoinChannelByKey
method,
the server automatically assigns a uid
.
channelName | The name of the channel that you join. |
uid | The user ID of the user joining the channel. |
elapsed |
Time elapsed (ms) from the user calling the JoinChannelByKey method
until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.OnLastmileProbeResultHandler | ( | LastmileProbeResult | result | ) |
Reports the last-mile network probe result.
The SDK triggers this callback within 30 seconds after the app calls the StartLastmileProbeTest method.
result | The uplink and downlink last-mile network probe test result. See LastmileProbeResult. |
delegate void agora_gaming_rtc.OnLastmileQualityHandler | ( | int | quality | ) |
Reports the last mile network quality of the local user once every two seconds before the user joins the channel.
Last mile refers to the connection between the local device and Agora's edge server. After the application calls the EnableLastmileTest method, this callback reports once every two 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: QUALITY_TYPE. |
delegate void agora_gaming_rtc.OnLeaveChannelHandler | ( | RtcStats | stats | ) |
Occurs when a user leaves the channel.
This callback notifies the application that a user leaves the channel when the application calls the LeaveChannel method.
The application retrieves information, such as the call duration and statistics.
stats | The statistics of the call: RtcStats. |
delegate void agora_gaming_rtc.OnLocalAudioStateChangedHandler | ( | LOCAL_AUDIO_STREAM_STATE | state, |
LOCAL_AUDIO_STREAM_ERROR | error | ||
) |
Occurs when the local audio state changes.
This callback indicates the state change of the local audio stream, including the state of the audio capturing and encoding, and allows you to troubleshoot issues when exceptions occur.
error
parameter for details.
state | The state of the local audio. See LOCAL_AUDIO_STREAM_STATE. |
error | The error information of the local audio. See LOCAL_AUDIO_STREAM_ERROR. |
delegate void agora_gaming_rtc.OnLocalAudioStatsHandler | ( | LocalAudioStats | localAudioStats | ) |
Reports the statistics of the local audio stream.
The SDK triggers this callback once every two seconds.
localAudioStats | The statistics of the local audio stream. See LocalAudioStats. |
delegate void agora_gaming_rtc.OnLocalPublishFallbackToAudioOnlyHandler | ( | bool | isFallbackOrRecover | ) |
Occurs when the locally published media stream falls back to an audio-only stream due to poor network conditions or switches back to the video after the network conditions improve.
If you call
SetLocalPublishFallbackOption
and set option
as
STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK triggers this callback when the locally published stream falls back to
audio-only mode due to poor uplink conditions, or when the audio stream switches back to
the video after the uplink network condition improves.
isFallbackOrRecover |
Whether the locally published stream falls back to audio-only or switches back
to the video:
|
delegate void agora_gaming_rtc.OnLocalUserRegisteredHandler | ( | uint | uid, |
string | userAccount | ||
) |
Occurs when the local user successfully registers a user account by calling the RegisterLocalUserAccount method or joins a channel by calling the JoinChannelByKey method.This callback reports the user ID and user account of the local user.
uid | The ID of the local user. |
userAccount | The user account of the local user. |
delegate void agora_gaming_rtc.OnLocalVideoStateChangedHandler | ( | LOCAL_VIDEO_STREAM_STATE | localVideoState, |
LOCAL_VIDEO_STREAM_ERROR | error | ||
) |
Occurs when the local video stream state changes.
This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur.
localVideoState | State type LOCAL_VIDEO_STREAM_STATE. When the state is LOCAL_VIDEO_STREAM_STATE_FAILED(3), see the error parameter for details. |
error | The detailed error information. code LOCAL_VIDEO_STREAM_ERROR. |
delegate void agora_gaming_rtc.OnLocalVideoStatsHandler | ( | LocalVideoStats | localVideoStats | ) |
Reports the statistics of the local video stream.
The SDK triggers this callback once every two seconds for each user/host. If there are multiple users/hosts in the channel, the SDK triggers this callback as many times.
OnLocalVideoStatsHandler
callback reports the statistics of
the high-video stream (high bitrate, and high-resolution video stream).
localVideoStats | The statistics of the local video stream. See LocalVideoStats. |
delegate void agora_gaming_rtc.OnLocalVoicePitchInHzHandler | ( | int | pitchInHz | ) |
Reports the voice pitch of the local user.
After the local audio capture is enabled and you call
EnableLocalVoicePitchCallback, the SDK triggers this callback at the time interval set in
EnableLocalVoicePitchCallback
.
EnableLocalAudio(false)
, the SDK immediately stops
sending the OnLocalVoicePitchInHzHandler
callback.
pitchInHz | The voice pitch (Hz) of the local user. |
delegate void agora_gaming_rtc.OnMediaEngineLoadSuccessHandler | ( | ) |
Occurs when the media engine loads.
delegate void agora_gaming_rtc.OnMediaEngineStartCallSuccessHandler | ( | ) |
Occurs when the media engine call starts.
delegate void agora_gaming_rtc.OnMicrophoneEnabledHandler | ( | bool | isEnabled | ) |
Occurs when the microphone is enabled/disabled.
The SDK triggers this callback when the local user resumes or stops capturing the local audio stream by calling the EnableLocalAudio method.
isEnabled |
Whether the microphone is enabled/disabled:
|
delegate void agora_gaming_rtc.OnNetworkQualityHandler | ( | uint | uid, |
int | txQuality, | ||
int | rxQuality | ||
) |
Reports the last mile network quality of each user in the channel once every two seconds.
Last mile refers to the connection between the local device and the Agora edge server. This callback reports once every two seconds the last mile network conditions of each user in the channel. If a channel includes multiple users, the SDK triggers this callback as many times.
uid |
User ID. The network quality of the user with this uid is reported.
If uid is 0, the local network quality is reported.
|
txQuality |
Uplink transmission quality rating of the user in terms of the transmission
bitrate, packet loss rate, average RTT (Round-Trip Time), and jitter of the
uplink network. txQuality is a quality rating helping you
understand how well the current uplink network conditions can support the
selected
VideoEncoderConfiguration. For example, a 1000 Kbps uplink network may be adequate for video frames with
a resolution of 640 × 480 and a frame rate of 15 fps in the Live-broadcast
profile, but may be inadequate for resolutions higher than 1280 × 720. See
QUALITY_TYPE.
|
rxQuality | Downlink network quality rating of the user in terms of the packet loss rate, average RTT, and jitter of the downlink network. See QUALITY_TYPE. |
delegate void agora_gaming_rtc.OnNetworkTypeChangedHandler | ( | NETWORK_TYPE | type | ) |
Occurs when the local network type changes.
When the network connection is interrupted, this callback indicates whether the interruption is caused by a network type change or poor network conditions.
type | See NETWORK_TYPE. |
delegate void agora_gaming_rtc.OnProxyConnectedHandler | ( | string | channel, |
uint | uid, | ||
PROXY_TYPE | proxyType, | ||
string | localProxyIp, | ||
int | elapsed | ||
) |
Reports the proxy connection state.
You can use this callback to listen for the state of the SDK connecting to a proxy. For
example, when a user calls
SetCloudProxy
and joins a channel successfully, the SDK triggers this callback to report the user ID,
the proxy type connected, and the time elapsed from the user calling
joinChannel
until this callback is triggered.
channel | The channel name. |
uid | The user ID. |
proxyType | The proxy type. See PROXY_TYPE. |
localProxyIp | Reserved for future use. |
elapsed |
The time elapsed (ms) from the user calling joinChannel until this
callback is triggered.
|
delegate void agora_gaming_rtc.OnReJoinChannelSuccessHandler | ( | string | channelName, |
uint | uid, | ||
int | elapsed | ||
) |
Occurs when a user rejoins the channel after disconnection due to network problems.
When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
channelName | The name of the channel that you rejoin. |
uid | The user ID of the user rejoining the channel. |
elapsed | The time elapsed (ms) from starting to reconnect until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnRemoteAudioMixingBeginHandler | ( | ) |
Occurs when a remote user starts audio mixing.
When a remote user calls StartAudioMixing to play the background music, the SDK reports this callback.
delegate void agora_gaming_rtc.OnRemoteAudioMixingEndHandler | ( | ) |
Occurs when a remote user finishes audio mixing.
delegate void agora_gaming_rtc.OnRemoteAudioStateChangedHandler | ( | uint | uid, |
REMOTE_AUDIO_STATE | state, | ||
REMOTE_AUDIO_STATE_REASON | reason, | ||
int | elapsed | ||
) |
Occurs when the remote audio state changes.
This callback indicates the state change of the remote audio stream.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
uid | The ID of the remote user whose audio state changes. |
state | The state of the remote audio. See REMOTE_AUDIO_STATE. |
reason | The reason of the remote audio state change. See REMOTE_AUDIO_STATE_REASON. |
elapsed | Time elapsed (ms) from the local user calling the JoinChannelByKey method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnRemoteAudioStatsHandler | ( | RemoteAudioStats | remoteAudioStats | ) |
Reports the statistics of the audio stream from each remote user/host.
This callback replaces the OnAudioQualityHandler callback.
The SDK triggers this callback once every two seconds for each remote user/host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
remoteAudioStats | The statistics of the received remote audio streams. See RemoteAudioStats. |
delegate void agora_gaming_rtc.OnRemoteAudioTransportStatsHandler | ( | uint | uid, |
ushort | delay, | ||
ushort | lost, | ||
ushort | rxKBitRate | ||
) |
Reports the transport-layer statistics of each remote audio stream.
This callback reports the transport-layer statistics, such as the packet loss rate and network time delay, once every two seconds after the local user receives an audio packet from a remote user.
uid | User ID of the remote user sending the audio packet. |
delay | Network time delay (ms) from the remote user sending the audio packet to the local user. |
lost | Packet loss rate (%) of the audio packet sent from the remote user. |
rxKBitRate | Received bitrate (Kbps) of the audio packet sent from the remote user. |
delegate void agora_gaming_rtc.OnRemoteSubscribeFallbackToAudioOnlyHandler | ( | uint | uid, |
bool | isFallbackOrRecover | ||
) |
Occurs when the remote media stream falls back to audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve.
If you call
SetRemoteSubscribeFallbackOption
and set option
as
STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK triggers this callback when the remote media stream falls back to audio-only
mode due to poor uplink conditions, or when the remote media stream switches back to the
video after the uplink network condition improves.
uid | ID of the remote user sending the stream. |
isFallbackOrRecover |
Whether the remotely subscribed media stream falls back to audio-only or
switches back to the video:
|
delegate void agora_gaming_rtc.OnRemoteVideoStateChangedHandler | ( | uint | uid, |
REMOTE_VIDEO_STATE | state, | ||
REMOTE_VIDEO_STATE_REASON | reason, | ||
int | elapsed | ||
) |
Occurs when the remote video state changes.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
uid | The ID of the remote user whose video state changes. |
state | The state of the remote video. See REMOTE_VIDEO_STATE. |
reason | The reason of the remote video state change. See REMOTE_VIDEO_STATE_REASON. |
elapsed | The time elapsed (ms) from the local user calling the JoinChannelByKey method until the SDK triggers this callback. |
delegate void agora_gaming_rtc.OnRemoteVideoStatsHandler | ( | RemoteVideoStats | remoteVideoStats | ) |
Reports the statistics of the video stream from each remote user/host.
The SDK triggers this callback once every two seconds for each remote user/host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
remoteVideoStats | The statistics of the remote video stream. See RemoteVideoStats. |
delegate void agora_gaming_rtc.OnRemoteVideoTransportStatsHandler | ( | uint | uid, |
ushort | delay, | ||
ushort | lost, | ||
ushort | rxKBitRate | ||
) |
Reports the transport-layer statistics of each remote video stream.
This callback reports the transport-layer statistics, such as the packet loss rate and network time delay, once every two seconds after the local user receives a video packet from a remote user.
uid | User ID of the remote user sending the video packet. |
delay | Network time delay (ms) from the remote user sending the video packet to the local user. |
lost | Packet loss rate (%) of the video packet sent from the remote user. |
rxKBitRate | Received bitrate (Kbps) of the video packet sent from the remote user. |
delegate void agora_gaming_rtc.OnRequestAudioFileInfoHandler | ( | AudioFileInfo | info, |
AUDIO_FILE_INFO_ERROR | error | ||
) |
Reports the information of an audio file.
After successfully calling GetAudioFileInfo, the SDK triggers this callback to report the information of the audio file, such as the file path and duration.
info | The information of an audio file, see AudioFileInfo. |
error | The information acquisition state, see AUDIO_FILE_INFO_ERROR. |
delegate void agora_gaming_rtc.OnRequestTokenHandler | ( | ) |
Occurs when the token expires.
After a token is specified by calling the JoinChannelByKey method, if the SDK losses connection with the Agora server due to network issues, the token may expire after a certain period of time and a new token may be required to reconnect to the server.
This callback notifies the app to generate a new token and call
JoinChannelByKey
to rejoin the channel with the new token.
delegate void agora_gaming_rtc.OnRtcStatsHandler | ( | RtcStats | stats | ) |
Reports the statistics of the current call session once every two seconds.
stats | The RTC engine statistics: RtcStats. |
delegate void agora_gaming_rtc.OnRtmpStreamingEventHandler | ( | string | url, |
RTMP_STREAMING_EVENT | eventCode | ||
) |
Reports events during the RTMP or RTMPS streaming.
url | The RTMP or RTMPS streaming URL. |
eventCode | The event code. See RTMP_STREAMING_EVENT |
delegate void agora_gaming_rtc.OnRtmpStreamingStateChangedHandler | ( | string | url, |
RTMP_STREAM_PUBLISH_STATE | state, | ||
RTMP_STREAM_PUBLISH_ERROR_TYPE | errCode | ||
) |
Occurs when the state of the RTMP or RTMPS streaming changes.
The SDK triggers this callback to report the result of the local user calling the AddPublishStreamUrl or RemovePublishStreamUrl method.
This callback indicates the state of the RTMP or RTMPS streaming. When exceptions occur,
you can troubleshoot issues by referring to the detailed error descriptions in the
errCode
parameter.
url | The CDN streaming URL. |
state | The RTMP or RTMPS streaming state. See: RTMP_STREAM_PUBLISH_STATE. |
errCode | The detailed error information for streaming. See: RTMP_STREAM_PUBLISH_ERROR_TYPE. |
delegate void agora_gaming_rtc.OnScreenCaptureInfoUpdatedHandler | ( | ScreenCaptureInfo | info | ) |
Occurs when the screen sharing information is updated.
When you call
StartScreenCaptureByDisplayId
or
StartScreenCaptureByScreenRect
to start screen sharing and use the excludeWindowList
attribute to block
the specified window, the SDK triggers this callback if the window blocking fails.
info | The screen sharing information. See ScreenCaptureInfo. |
delegate void agora_gaming_rtc.OnSDKErrorHandler | ( | int | error, |
string | msg | ||
) |
Reports an error during SDK runtime.
In most cases, the SDK cannot fix the issue and resume running. The SDK requires the application to take action or informs the user about the issue.
For example, the SDK reports an ERR_START_CALL(1002)
error when failing to
initialize a call. The application informs the user that the call initialization failed
and invokes the
LeaveChannel
method to leave the channel.
error | The error code, see Error Code. |
msg | The error message. |
delegate void agora_gaming_rtc.OnSDKWarningHandler | ( | int | warn, |
string | msg | ||
) |
Reports a warning during SDK runtime.
In most cases, the application can ignore the warning reported by the SDK because the
SDK can usually fix the issue and resume running. For example, when losing connection
with the server, the SDK may report WARN_LOOKUP_CHANNEL_TIMEOUT(104)
and
automatically try to reconnect.
warn | The warning code, see Warning Code. |
msg | The warning message. |
delegate void agora_gaming_rtc.OnSnapshotTakenHandler | ( | string | channel, |
uint | uid, | ||
string | filePath, | ||
int | width, | ||
int | height, | ||
int | errCode | ||
) |
Reports the result of taking a video snapshot.
After a successful TakeSnapshot method call, the SDK triggers this callback to report whether the snapshot is successfully taken as well as the details for the snapshot taken.
channel | The channel name. |
uid |
The user ID of the user. A uid of 0 indicates the local user.
|
filePath | The local path of the snapshot. |
width | The width (px) of the snapshot. |
height | The height (px) of the snapshot. |
errCode |
The message that confirms success or the reason why the snapshot is not
successfully taken:
|
delegate void agora_gaming_rtc.OnStreamMessageErrorHandler | ( | uint | userId, |
int | streamId, | ||
int | code, | ||
int | missed, | ||
int | cached | ||
) |
Occurs when the local user does not receive the data stream from the remote user within five seconds.
The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the SendStreamMessage method.
userId | The user ID of the remote user sending the message. |
streamId | The stream ID. |
code | The error code: Error Code. |
missed | The number of lost messages. |
cached | The number of incoming cached messages when the data stream is interrupted. |
delegate void agora_gaming_rtc.OnStreamMessageHandler | ( | uint | userId, |
int | streamId, | ||
byte[] | data, | ||
int | length | ||
) |
Occurs when the local user receives the data stream from the remote user within five seconds.
The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the SendStreamMessage method.
userId | The user ID of the remote user sending the message. |
streamId | The stream ID. |
data | The data received by the local user. |
length | The length of the data in bytes. |
delegate void agora_gaming_rtc.OnStreamPublishedHandler | ( | string | url, |
int | error | ||
) |
Reports the result of calling the AddPublishStreamUrl method. (CDN live only.)
url | The CDN streaming URL. |
error |
Error code: Error Code.
|
delegate void agora_gaming_rtc.OnStreamUnpublishedHandler | ( | string | url | ) |
Reports the result of calling the RemovePublishStreamUrl method. (CDN live only.)
This callback indicates whether you have successfully removed an RTMP or RTMPS stream from the CDN.
url | The CDN streaming URL. |
delegate void agora_gaming_rtc.OnTokenPrivilegeWillExpireHandler | ( | string | token | ) |
Occurs when the token expires in 30 seconds.
The user becomes offline if the token used in the JoinChannelByKey method expires. The SDK triggers this callback 30 seconds before the token expires to remind the application to get a new token. Upon receiving this callback, generate a new token on the server and call the RenewToken method to pass the new token to the SDK.
token | The token that expires in 30 seconds. |
delegate void agora_gaming_rtc.OnTranscodingUpdatedHandler | ( | ) |
Occurs when the publisher's transcoding is updated.
When the
LiveTranscoding
class in the
SetLiveTranscoding
method updates, the SDK triggers the OnTranscodingUpdatedHandler
callback
to report the update information to the local host.
SetLiveTranscoding
method to set the
LiveTranscoding
class for the first time, the SDK does not trigger the
OnTranscodingUpdatedHandler
callback.
delegate void agora_gaming_rtc.OnUserEnableLocalVideoHandler | ( | uint | uid, |
bool | enabled | ||
) |
Occurs when a specified remote user enables/disables the local video capturing function.
This callback is only applicable to the scenario when the user only wants to watch the remote video without sending any video stream to the other user.
The SDK triggers this callback when the remote user resumes or stops capturing the video stream by calling the EnableLocalVideo method.
uid | User ID of the remote user. |
enabled |
Whether the specified remote user enables/disables the local video capturing
function:
|
delegate void agora_gaming_rtc.OnUserEnableVideoHandler | ( | uint | uid, |
bool | enabled | ||
) |
Occurs when a specific remote user enables/disables the video module.
Once the video module is disabled, the remote user can only use a voice call. The remote user cannot send or receive any video from other users.
The SDK triggers this callback when the remote user enables or disables the video module by calling the EnableVideo or DisableVideo method.
uid | User ID of the remote user. |
enabled |
Whether the specified remote user enables/disables the local video capturing
function:
|
delegate void agora_gaming_rtc.OnUserInfoUpdatedHandler | ( | uint | uid, |
UserInfo | userInfo | ||
) |
Occurs when the SDK gets the user ID and user account of the remote user.
After a remote user joins the channel, the SDK gets the UID and user account of the
remote user, caches them in a mapping table object (userInfo
), and triggers
this callback on the local client.
uid | The ID of the remote user. |
userInfo | The UserInfo object that contains the user ID and user account of the remote user. |
delegate void agora_gaming_rtc.OnUserJoinedHandler | ( | uint | uid, |
int | elapsed | ||
) |
Occurs when a remote user (Communication)/ host (Live Broadcast) joins the channel.
The SDK triggers this callback under one of the following circumstances:
uid | The user ID of the user or host joining the channel. |
elapsed |
Time delay (ms) from the local user calling the
JoinChannelByKey method until the SDK triggers this callback.
|
delegate void agora_gaming_rtc.OnUserMutedAudioHandler | ( | uint | uid, |
bool | muted | ||
) |
Occurs when a remote user's audio stream playback pauses/resumes.
The SDK triggers this callback when the remote user stops or resumes sending the audio stream by calling the MuteLocalAudioStream method.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
uid | The user ID of the remote user. |
muted |
Whether the remote user's audio stream is muted/unmuted:
|
delegate void agora_gaming_rtc.OnUserMuteVideoHandler | ( | uint | uid, |
bool | muted | ||
) |
Occurs when a remote user's video stream playback pauses/resumes.
You can also use the OnRemoteVideoStateChangedHandler callback with the following parameters:
The SDK triggers this callback when the remote user stops or resumes sending the video stream by calling the MuteLocalVideoStream method.
COMMUNICATION
profile) or hosts (in the
LIVE_BROADCASTING
profile) in the channel exceeds 17.
uid | The user ID of the remote user. |
muted |
Whether the remote user's video stream playback is paused/resumed:
|
delegate void agora_gaming_rtc.OnUserOfflineHandler | ( | uint | uid, |
USER_OFFLINE_REASON | reason | ||
) |
Occurs when a remote user (Communication)/host (Live Broadcast) leaves the channel.
Reasons why the user is offline:
uid | The user ID of the user leaving the channel or going offline. |
reason | The reason why the user is offline: USER_OFFLINE_REASON. |
delegate void agora_gaming_rtc.OnUserSuperResolutionEnabledHandler | ( | uint | uid, |
bool | enabled, | ||
SUPER_RESOLUTION_STATE_REASON | reason | ||
) |
Reports whether the super-resolution algorithm is enabled.
After calling EnableRemoteSuperResolution, the SDK triggers this callback to report whether the super-resolution algorithm is successfully enabled. If not successfully enabled, you can use reason for troubleshooting.
uid | The ID of the remote user. |
enabled |
Whether the super-resolution algorithm is successfully enabled:
|
reason | The reason why the super-resolution algorithm is not successfully enabled. See SUPER_RESOLUTION_STATE_REASON. |
delegate void agora_gaming_rtc.OnVideoDeviceStateChangedHandler | ( | string | deviceId, |
int | deviceType, | ||
int | deviceState | ||
) |
Occurs when the video device state changes.
deviceId | The device ID of the video device that changes state. |
deviceType | The device type: MEDIA_DEVICE_TYPE. |
deviceState | The device state: MEDIA_DEVICE_STATE_TYPE. |
delegate void agora_gaming_rtc.OnVideoPublishStateChangedHandler | ( | string | channel, |
STREAM_PUBLISH_STATE | oldState, | ||
STREAM_PUBLISH_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the video publishing state changes.
This callback indicates the publishing state change of the local video stream.
channel | The channel name. |
oldState | The previous publishing state. For details, see STREAM_PUBLISH_STATE. |
newState | The current publishing state. For details, see STREAM_PUBLISH_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.OnVideoSizeChangedHandler | ( | uint | uid, |
int | width, | ||
int | height, | ||
int | rotation | ||
) |
Occurs when the video size or rotation of a specified user changes.
uid | The user ID of the remote user or local user (0) whose video size or rotation changes. |
width | The new width (pixels) of the video. |
height | The new height (pixels) of the video. |
rotation | The new rotation of the video [0 to 360). |
delegate void agora_gaming_rtc.OnVideoStoppedHandler | ( | ) |
Occurs when the video stops playing.
The application can use this callback to change the configuration of the view (for example, displaying other pictures in the view) after the video stops playing.
delegate void agora_gaming_rtc.OnVideoSubscribeStateChangedHandler | ( | string | channel, |
uint | uid, | ||
STREAM_SUBSCRIBE_STATE | oldState, | ||
STREAM_SUBSCRIBE_STATE | newState, | ||
int | elapseSinceLastState | ||
) |
Occurs when the audio subscribing state changes.
This callback indicates the subscribing state change of a remote video stream.
channel | The channel name. |
uid | The ID of the remote user. |
oldState | The previous subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
newState | The current subscribing state. For details, see STREAM_SUBSCRIBE_STATE. |
elapseSinceLastState | The time elapsed (ms) from the previous state to the current state. |
delegate void agora_gaming_rtc.OnVirtualBackgroundSourceEnabledHandler | ( | bool | enabled, |
VIRTUAL_BACKGROUND_SOURCE_STATE_REASON | reason | ||
) |
Reports whether the virtual background is successfully enabled.
After you call EnableVirtualBackground, the SDK triggers this callback to report whether the virtual background is successfully enabled.
enabled |
Whether the virtual background is successfully enabled:
|
reason | The reason why the virtual background is not successfully enabled or the message that confirms success. See VIRTUAL_BACKGROUND_SOURCE_STATE_REASON. |
delegate void agora_gaming_rtc.OnVolumeIndicationHandler | ( | AudioVolumeInfo[] | speakers, |
int | speakerNumber, | ||
int | totalVolume | ||
) |
Reports the volume information of users.
By default, this callback is disabled. You can enable it by calling
EnableAudioVolumeIndication. Once this callback is enabled and users send streams in the channel, the SDK triggers
the OnVolumeIndicationHandler
callback at the time interval set in
EnableAudioVolumeIndication
.
The SDK triggers two independent OnVolumeIndicationHandler
callbacks
simultaneously, which separately report the volume information of the local user who
sends a stream and the remote users (up to three) whose instantaneous volumes are the
highest.
MuteLocalAudioStream
, the SDK stops
triggering the local user's callback.
MuteLocalAudioStream
, the remote users' callback excludes this remote
user's information; 20 seconds after all remote users call
MuteLocalAudioStream
, the SDK stops triggering the remote users'
callback.
speakers | The volume information of users. See AudioVolumeInfo. |
An empty speakers array in the callback indicates that no remote user is in the channel or sending a stream at the moment.
speakerNumber |
Total number of users.
|
totalVolume |
Total volume after audio mixing. The value ranges between 0 (lowest volume) and
255 (highest volume).
|
If the user calls
StartAudioMixing, totalVolume
is the sum of the voice volume and audio-mixing volume.