This Agora Electron SDK is developed upon the Native SDK for macOS and the Native SDK for Windows, with the Node.js C++ plug-in units. The Electron SDK supports all the functions of the Agora Native SDK. Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network optimized on all platforms.
- The AgoraRtcEngine calss provides the main methods that can be invoked by your application.
- The Events class enables callbacks to your application.
Method | Description |
---|---|
{@link AgoraRtcEngine.initialize initialize} | Initializes an AgoraRtcEngine instance. |
{@link AgoraRtcEngine.release release} | Releases an AgoraRtcEngine instance. |
{@link AgoraRtcEngine.setChannelProfile setChannelProfile} | Sets the channel profile. |
{@link AgoraRtcEngine.setClientRole setClientRole} | Sets the user role (Live Broadcast only). |
{@link AgoraRtcEngine.joinChannel joinChannel} | Allows a user to join a channel. |
{@link AgoraRtcEngine.switchChannel switchChannel} | Switches to a different channel (Live Broadcast only). |
{@link AgoraRtcEngine.leaveChannel leaveChannel} | Allows a user to leave a channel. |
{@link AgoraRtcEngine.subscribe subscribe} | Subscribes to the remote user and initializes the video sink |
{@link AgoraRtcEngine.renewToken renewToken} | Renews the token. |
{@link AgoraRtcEngine.enableWebSdkInteroperability enableWebSdkInteroperability} | Enables interoperability with the Agora Web SDK. |
{@link AgoraRtcEngine.getConnectionState getConnectionState} | Gets the connection state of the app. |
{@link AgoraRtcEngine.on on} | Monitors the events during AgoraRtcEngine runtime |
{@link AgoraRtcEngine.off off} | Stops monitoring the events during AgoraRtcEngine runtime |
Method | Description |
---|---|
{@link AgoraRtcEngine.registerLocalUserAccount registerLocalUserAccount} | Registers the local user account. |
{@link AgoraRtcEngine.joinChannelWithUserAccount joinChannelWithUserAccount} | Joins the channel with a user account. |
{@link AgoraRtcEngine.getUserInfoByUid getUserInfoByUid} | Gets the user information by passing in the user ID. |
{@link AgoraRtcEngine.getUserInfoByUserAccount getUserInfoByUserAccount} | Gets the user information by passing in the user account. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableAudio enableAudio} | Enables the audio module. |
{@link AgoraRtcEngine.disableAudio disableAudio} | Disables the audio module. |
{@link AgoraRtcEngine.setAudioProfile setAudioProfile} | Sets the audio parameters and application scenarios. |
{@link AgoraRtcEngine.adjustRecordingSignalVolume adjustRecordingSignalVolume} | Adjusts the recording volume. |
{@link AgoraRtcEngine.adjustPlaybackSignalVolume adjustPlaybackSignalVolume} | Adjusts the playback volume of the voice. |
{@link AgoraRtcEngine.enableLocalAudio enableLocalAudio} | Enables/disables the local audio capture. |
{@link AgoraRtcEngine.muteLocalAudioStream muteLocalAudioStream} | Stops/Resumes sending the local audio stream. |
{@link AgoraRtcEngine.muteRemoteAudioStream muteRemoteAudioStream} | Stops/Resumes receving a specified remote audio stream. |
{@link AgoraRtcEngine.muteAllRemoteAudioStreams muteAllRemoteAudioStreams} | Stops/Resumes receiving all remote audio streams. |
{@link AgoraRtcEngine.setDefaultMuteAllRemoteAudioStreams setDefaultMuteAllRemoteAudioStreams} | Sets whether to receive all remote audio streams by default. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableVideo enableVideo} | Enables the video module. |
{@link AgoraRtcEngine.disableVideo disableVideo} | Disables the video module. |
{@link AgoraRtcEngine.setVideoEncoderConfiguration setVideoEncoderConfiguration} | Sets the video encoder configuration. |
{@link AgoraRtcEngine.setupLocalVideo setupLocalVideo} | Sets the local video view. |
{@link AgoraRtcEngine.setupViewContentMode setupViewContentMode} | Sets the view content mode. |
{@link AgoraRtcEngine.setRenderMode setRenderMode} | Sets the view render mode. |
{@link AgoraRtcEngine.startPreview startPreview} | Starts the local video preview. |
{@link AgoraRtcEngine.stopPreview stopPreview} | Stops the local video preview. |
{@link AgoraRtcEngine.enableLocalVideo enableLocalVideo} | Enables/Disables the local video capture. |
{@link AgoraRtcEngine.muteLocalVideoStream muteLocalVideoStream} | Stops/Resumes sending the local video stream. |
{@link AgoraRtcEngine.muteRemoteVideoStream muteRemoteVideoStream} | Stops/Resumes receiving a specified remote video stream. |
{@link AgoraRtcEngine.muteAllRemoteVideoStreams muteAllRemoteVideoStreams} | Stops/Resumes receiving all remote video streams. |
{@link AgoraRtcEngine.setDefaultMuteAllRemoteVideoStreams setDefaultMuteAllRemoteVideoStreams} | Sets whether to receive all remote video streams by default. |
Method | Description |
---|---|
{@link AgoraRtcEngine.initRender initRender} | Initializes the video sink. |
{@link AgoraRtcEngine.destroyRender destroyRender} | Destroys the video sink. |
{@link AgoraRtcEngine.resizeRender resizeRender} | Resizes the rendered video. |
{@link AgoraRtcEngine.setVideoRenderDimension setVideoRenderDimension} | Ses the pixels the rendered video. |
{@link AgoraRtcEngine.setVideoRenderFPS setVideoRenderFPS} | Sets the frame rate of the rendered video. |
{@link AgoraRtcEngine.setVideoRenderHighFPS setVideoRenderHighFPS} | Sets the high frame rate of the rendered video. |
{@link AgoraRtcEngine.addVideoRenderToHighFPS addVideoRenderToHighFPS} | Adds the rendered video with high frame rate. |
{@link AgoraRtcEngine.removeVideoRenderFromHighFPS removeVideoRenderFromHighFPS} | Removes the rendered video with high frame rate. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setBeautyEffectOptions setBeautyEffectOptions} | Sets the image enhancement options. |
Method | Description |
---|---|
{@link AgoraRtcEngine.videoSourceInitialize videoSourceInitialize} | Initializes the video source object. |
{@link AgoraRtcEngine.videoSourceRelease videoSourceRelease} | Releases the video source object. |
{@link AgoraRtcEngine.getScreenDisplaysInfo getScreenDisplaysInfo} | Gets the display ID. |
{@link AgoraRtcEngine.getScreenWindowsInfo getScreenWindowsInfo} | Gets the window ID. |
{@link AgoraRtcEngine.startScreenCapturePreview startScreenCapturePreview} | Starts the sharing video preview. |
{@link AgoraRtcEngine.stopScreenCapturePreview stopScreenCapturePreview} | Stops the sharing video preview. |
{@link AgoraRtcEngine.videoSourceStartScreenCaptureByScreen videoSourceStartScreenCaptureByScreen} | Shares the whole or part of a screen by specifying the screen rect. |
{@link videosourceStartScreenCaptureByWindow videosourceStartScreenCaptureByWindow} | Shares the whole or part of a window by specifying the window ID. |
{@link AgoraRtcEngine.videoSourceUpdateScreenCaptureRegion videoSourceUpdateScreenCaptureRegion} | Updates the screen sharing region. |
{@link AgoraRtcEngine.videoSourceUpdateScreenCaptureParameters videoSourceUpdateScreenCaptureParameters} | Updates the screen sharing parameters. |
{@link AgoraRtcEngine.videoSourceSetScreenCaptureContentHint videoSourceSetScreenCaptureContentHint} | Sets the content hint for screen sharing. |
{@link AgoraRtcEngine.stopScreenCapture2 stopScreenCapture2} | Stops screen sharing. |
Method | Description |
---|---|
{@link AgoraRtcEngine.startAudioMixing startAudioMixing} | Starts playing and mixing the music file. |
{@link AgoraRtcEngine.stopAudioMixing stopAudioMixing} | Stops playing and mixing the music file. |
{@link AgoraRtcEngine.pauseAudioMixing pauseAudioMixing} | Pauses playing and mixing the music file. |
{@link AgoraRtcEngine.resumeAudioMixing resumeAudioMixing} | Resumes playing and mixing the music file. |
{@link AgoraRtcEngine.adjustAudioMixingVolume adjustAudioMixingVolume} | Adjusts the volume during audio mixing. |
{@link AgoraRtcEngine.adjustAudioMixingPlayoutVolume adjustAudioMixingPlayoutVolume} | Adjusts the volume of audio mixing for local playback. |
{@link AgoraRtcEngine.adjustAudioMixingPublishVolume adjustAudioMixingPublishVolume} | Adjusts the volume of audio mixing for remote playback. |
{@link AgoraRtcEngine.getAudioMixingPlayoutVolume getAudioMixingPlayoutVolume} | Adjusts the audio mixing volume for publishing (for remote users). |
{@link AgoraRtcEngine.getAudioMixingPublishVolume getAudioMixingPublishVolume} | Retrieves the audio mixing volume for publishing. |
{@link AgoraRtcEngine.getAudioMixingDuration getAudioMixingDuration} | Gets the duration (ms) of the music file. |
{@link AgoraRtcEngine.getAudioMixingCurrentPosition getAudioMixingCurrentPosition} | Gets the playback position (ms) of the music file. |
{@link AgoraRtcEngine.setAudioMixingPosition setAudioMixingPosition} | Sets the playback position of the music file. |
Method | Description |
---|---|
{@link AgoraRtcEngine.getEffectsVolume getEffectsVolume} | Gets the volume of the audio effects. |
{@link AgoraRtcEngine.setEffectsVolume setEffectsVolume} | Sets the volume of the audio effects. |
{@link AgoraRtcEngine.setVolumeOfEffect setVolumeOfEffect} | Sets the volume of the audio effect. |
{@link AgoraRtcEngine.playEffect playEffect} | Plays a specified audio effect. |
{@link AgoraRtcEngine.stopEffect stopEffect} | Stops playing a specified audio effect. |
{@link AgoraRtcEngine.preloadEffect preloadEffect} | Preloads a specified audio effect file into the memory. |
{@link AgoraRtcEngine.unloadEffect unloadEffect} | Releases a specified audio effect from the memory. |
{@link AgoraRtcEngine.pauseEffect pauseEffect} | Pauses a specified audio effect. |
{@link AgoraRtcEngine.pauseAllEffects pauseAllEffects} | Pauses all audio effects. |
{@link AgoraRtcEngine.resumeEffect resumeEffect} | Resumes playing a specified audio effect. |
{@link AgoraRtcEngine.resumeAllEffects resumeAllEffects} | Resumes playing all audio effects. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setLocalVoiceChanger setLocalVoiceChanger} | Sets the local voice changer option. |
{@link AgoraRtcEngine.setLocalVoiceReverbPreset setLocalVoiceReverbPreset} | Sets the preset local voice reverberation effect. |
{@link AgoraRtcEngine.setLocalVoicePitch setLocalVoicePitch} | Changes the voice pitch of the local speaker. |
{@link AgoraRtcEngine.setLocalVoiceEqualization setLocalVoiceEqualization} | Sets the local voice equalization effect. |
{@link AgoraRtcEngine.setLocalVoiceReverb setLocalVoiceReverb} | Sets the local voice reverberation. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableSoundPositionIndication enableSoundPositionIndication} | Enables/Disables stereo panning for remote users. |
{@link AgoraRtcEngine.setRemoteVoicePosition setRemoteVoicePosition} | Sets the sound position and gain of a remote user. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setLiveTranscoding setLiveTranscoding} | Sets the video layout and audio for CDN live. |
{@link AgoraRtcEngine.addPublishStreamUrl addPublishStreamUrl} | Adds a CDN stream address. |
{@link AgoraRtcEngine.removePublishStreamUrl removePublishStreamUrl} | Removes a CDN stream address. |
Method | Description |
---|---|
{@link AgoraRtcEngine.startChannelMediaRelay startChannelMediaRelay} | EStarts to relay media streams across channels. |
{@link AgoraRtcEngine.updateChannelMediaRelay updateChannelMediaRelay} | Updates the channels for media stream relay. |
{@link AgoraRtcEngine.stopChannelMediaRelay stopChannelMediaRelay} | Stops the media stream relay. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableAudioVolumeIndication enableAudioVolumeIndication} | Reports on which users are speaking and the speakers' volume. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setInEarMonitoringVolume setInEarMonitoringVolume} | Sets the volume of the in-ear monitor. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableDualStreamMode enableDualStreamMode} | Sets the stream mode to single- (default) or dual-stream mode. |
{@link AgoraRtcEngine.setRemoteVideoStreamType setRemoteVideoStreamType} | Sets the remote user’s video stream type received by the local user when the remote user sends dual streams. |
{@link AgoraRtcEngine.setRemoteDefaultVideoStreamType setRemoteDefaultVideoStreamType} | Sets the default video-stream type for the video received by the local user when the remote user sends dual streams. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setLocalPublishFallbackOption setLocalPublishFallbackOption} | Sets the fallback option for the published video stream under unreliable network conditions. |
{@link AgoraRtcEngine.setRemoteSubscribeFallbackOption setRemoteSubscribeFallbackOption} | Sets the fallback option for the remote stream under unreliable network conditions. |
{@link AgoraRtcEngine.setRemoteUserPriority setRemoteUserPriority} | Prioritizes a remote user's stream. |
Method | Description |
---|---|
{@link AgoraRtcEngine.startEchoTestWithInterval startEchoTestWithInterval} | Starts an audio call test. |
{@link AgoraRtcEngine.stopEchoTest stopEchoTest} | Stops the audio call test. |
{@link AgoraRtcEngine.enableLastmileTest enableLastmileTest} | Enables the network connection quality test. |
{@link AgoraRtcEngine.disableLastmileTest disableLastmileTest} | Disables the network connection quality test. |
{@link AgoraRtcEngine.startLastmileProbeTest startLastmileProbeTest} | Starts the last-mile network probe test. |
{@link AgoraRtcEngine.stopLastmileProbeTest stopLastmileProbeTest} | Stops the last-mile network probe test. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setExternalAudioSource setExternalAudioSource} | Configures the external audio source. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setRecordingAudioFrameParameters setRecordingAudioFrameParameters} | Sets the audio recording format. |
{@link AgoraRtcEngine.setPlaybackAudioFrameParameters setPlaybackAudioFrameParameters} | Sets the audio playback format. |
{@link AgoraRtcEngine.setMixedAudioFrameParameters setMixeAudioFrameParameters} | Sets the mixed audio format. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setEncryptionSecret setEncryptionSecret} | Enables built-in encryption with an encryption password before joining a channel. |
{@link AgoraRtcEngine.setEncryptionMode setEncryptionMode} | Sets the built-in encryption mode. |
Method | Description |
---|---|
{@link AgoraRtcEngine.addInjectStreamUrl addInjectStreamUrl} | Adds an online media stream to a live broadcast. |
{@link AgoraRtcEngine.removeInjectStreamUrl removeInjectStreamUrl} | Removes the online media stream from a live broadcast. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setAudioPlaybackDevice setAudioPlaybackDevice} | Sets the audio playback device using the device ID. |
{@link AgoraRtcEngine.getAudioPlaybackDevices getAudioPlaybackDevices} | Gets the audio playback device using the device ID. |
{@link AgoraRtcEngine.setAudioRecordingDevice setAudioRecordingDevice} | Sets the audio recording device using the device ID. |
{@link AgoraRtcEngine.getAudioRecordingDevices getAudioRecordingDevices} | Gets the audio recording device using the device ID. |
{@link AgoraRtcEngine.setVideoDevice setVideoDevice} | Sets the device with the device ID. |
{@link AgoraRtcEngine.getVideoDevices getVideoDevices} | Gets the video-capture device that is in use. |
{@link AgoraRtcEngine.setAudioPlaybackDeviceMute setAudioPlaybackDeviceMute} | Mutes/Unmutes the audio playback device. |
{@link AgoraRtcEngine.getAudioPlaybackDeviceMute getAudioPlaybackDeviceMute} | Gets the mute state of the audio playback device. |
{@link AgoraRtcEngine.setAudioRecordingDeviceMute setAudioRecordingDeviceMute} | Mutes/Unmutes the audio recording device. |
{@link AgoraRtcEngine.getAudioRecordingDeviceMute getAudioRecordingDeviceMute} | Gets the mute state of the audio recording device. |
{@link AgoraRtcEngine.getPlaybackDeviceInfo getPlaybackDeviceInfo} | Gets the information of the audio playback device. |
{@link AgoraRtcEngine.getRecordingDeviceInfo getRecordingDeviceInfo} | Gets the information of the recording device. |
{@link AgoraRtcEngine.getCurrentAudioPlaybackDevice getCurrentAudioPlaybackDevice} | Gets the current audio playback device. |
{@link AgoraRtcEngine.getCurrentAudioRecordingDevice getCurrentAudioRecordingDevice} | Gets the current audio recording device. |
{@link AgoraRtcEngine.getCurrentVideoDevice getCurrentVideoDevice} | Gets the current video device. |
{@link AgoraRtcEngine.startAudioDeviceLoopbackTest startAudioDeviceLoopbackTest} | Starts the audio device loopback test. |
{@link AgoraRtcEngine.stopAudioDeviceLoopbackTest stopAudioDeviceLoopbackTest} | Stops the audio device loopback test. |
{@link AgoraRtcEngine.startAudioPlaybackDeviceTest startAudioPlaybackDeviceTest} | Starts the audio playback device test. |
{@link AgoraRtcEngine.stopAudioPlaybackDeviceTest stopAudioPlaybackDeviceTest} | Stops the audio playback device test. |
{@link AgoraRtcEngine.startAudioRecordingDeviceTest startAudioRecordingDeviceTest} | Starts the recording device test. |
{@link AgoraRtcEngine.stopAudioRecordingDeviceTest stopAudioRecordingDeviceTest} | Stops the recording device test. |
{@link AgoraRtcEngine.startVideoDeviceTest startVideoDeviceTest} | Starts the video playback device test. |
{@link AgoraRtcEngine.stopVideoDeviceTest stopVideoDeviceTest} | Stops the video playback device test. |
{@link AgoraRtcEngine.setAudioPlaybackVolume setAudioPlaybackVolume} | Sets the volume of the audio playback device. |
{@link AgoraRtcEngine.getAudioPlaybackVolume getAudioPlaybackVolume} | Gets the volume of the audio playback device. |
{@link AgoraRtcEngine.setAudioRecordingVolume setAudioRecordingVolume} | Sets the volume of the recording device. |
{@link AgoraRtcEngine.getAudioRecordingVolume getAudioRecordingVolume} | Gets the volume of the recording device. |
Method | Description |
---|---|
{@link AgoraRtcEngine.createDataStream createDataStream} | Creates a data stream. |
{@link AgoraRtcEngine.sendStreamMessage sendStreamMessage} | Sends data stream messages. |
Method | Description |
---|---|
{@link AgoraRtcEngine.enableLoopbackRecording enableLoopbackRecording} | Enables loopback recording. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setLocalVideoMirrorMode setLocalVideoMirrorMode} | Sets the local video mirror mode. |
{@link AgoraRtcEngine.setCameraCapturerConfiguration setCameraCapturerConfiguration} | Sets the camera capturer configuration. |
Method | Description |
---|---|
{@link AgoraRtcEngine.getCallId getCallId} | Gets the current call ID. |
{@link AgoraRtcEngine.rate rate} | Allows the user to rate the call and is called after the call ends. |
{@link AgoraRtcEngine.complain complain} | Allows a user to complain about the call quality after a call ends. |
{@link AgoraRtcEngine.setLogFile setLogFile} | Specifies an SDK output log file. |
{@link AgoraRtcEngine.setLogFileSize setLogFileSize} | Sets the log file size (KB). |
{@link AgoraRtcEngine.setLogFile setLogFilter} | Sets the output log level of the SDK. |
{@link AgoraRtcEngine.getVersion getVersion} | Gets the SDK version number. |
{@link AgoraRtcEngine.getErrorDescription getErrorDescription} | Gets the warning or error description. |
Method | Description |
---|---|
{@link AgoraRtcEngine.setParameters setParameters} | Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options. |
Agora Electron SDK provides the methods for the second instance:
Method | Description |
---|---|
{@link AgoraRtcEngine.videoSourceSetChannelProfile videoSourceSetChannelProfile} | Sets the channel profile. |
{@link AgoraRtcEngine.videoSourceJoin videoSourceJoin} | Allows a user to join a channel. |
{@link AgoraRtcEngine.videoSourceLeave videoSourceLeave} | Allows a user to leave a channel. |
{@link AgoraRtcEngine.videoSourceRenewToken videoSourceRenewToken} | Renews the Token. |
{@link AgoraRtcEngine.videoSourceEnableWebSdkInteroperability videoSourceEnableWebSdkInteroperability} | Enables interoperability with the Agora Web SDK. |
{@link AgoraRtcEngine.setupLocalVideoSource setupLocalVideoSource} | Sets the local video view. |
{@link AgoraRtcEngine.videoSourceSetVideoProfile videoSourceSetVideoProfile} | Sets the video encoder configuration. |
{@link AgoraRtcEngine.videoSourceEnableDualStreamMode videoSourceEnableDualStreamMode} | Sets the stream mode to single- (default) or dual-stream mode (for live broadcast only). |
{@link AgoraRtcEngine.videoSourceSetLogFile videoSourceSetLogFile} | Specifies an SDK output log file. |
{@link AgoraRtcEngine.videoSourceSetParameters videoSourceSetParameters} | Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options. |
Agora Electron SDK use the {@link AgoraRtcEngine.on on} method to add listeners for the events above:
Event | Description |
---|---|
warning | Occurs when a warning occurs. |
error | Occurs when an error occurs. |
joinedChannel | Occurs when a user joins a channel. |
rejoinedChannel | Occurs when a user rejoins a channel. |
leaveChannel | Occurs when a user leaves a channel. |
clientRoleChanged | Occurs when the user role in a Live Broadcast changes. |
userJoined | Occurs when a remote user joins a channel. |
connectionStateChanged | Occurs when the network connection state changes. |
connectionLost | Occurs when the network connection state changes. |
apiCallExecuted | Occurs when an API method is executed. |
tokenPrivilegeWillExpire | Occurs when the token expires in 30 seconds. |
requestChannelKey | Occurs when the Channel Key expires. |
localUserRegistered | Occurs when the local user successfully registers a user account. |
userInfoUpdated | Occurs when the SDK gets the user ID and user account of the remote user. |
microphoneEnabled | Occurs when the state of the microphone changes. |
groupAudioVolumeIndication | Occurs when the state of the microphone changes. |
activeSpeaker | Reports which user is the loudest speaker. |
rtcStats | Reports the statistics of AgoraRtcEngine. |
localVideoStats | Reports the statistics of the uploading local video stream. |
remoteVideoStats | Reports the statistics of the video stream from each remote user/host. |
localAudioStats | Reports the statistics of the local audio stream. |
remoteAudioStats | Reports the statistics of the audio stream from each remote user/host. |
remoteVideoTransportStats | Reports the transport-layer statistics of each remote video stream. |
remoteAudioTransportStats | Reports the transport-layer statistics of each remote audio stream. |
audioDeviceStateChanged | Occurs when the audio device state changes. |
videoDeviceStateChanged | Occurs when the video device state changes. |
audioMixingStateChanged | Occurs when the state of the local user's audio mixing file changes. |
remoteAudioMixingBegin | Occurs when a remote user starts audio mixing. |
remoteAudioMixingEnd | Occurs when a remote user finishes audio mixing. |
audioEffectFinished | Occurs when the audio effect file playback finishes. |
networkQuality | Reports the network quality of each user. |
lastmileQuality | Reports the last-mile network quality of the local user before the user joins a channel. |
lastmileProbeResult | Reports the last-mile network probe result. |
firstLocalAudioFrame | Occurs when the first local audio frame is sent. |
firstRemoteAudioFrame | Occurs when the first remote audio frame is received. |
firstRemoteAudioDecoded | Occurs when the engine receives the first audio frame from a specified remote user. |
firstLocalVideoFrame | Occurs when the first local video frame is sent. |
firstRemoteVideoFrame | Occurs when the first remote video frame is rendered. |
videoSizeChanged | Occurs when the video size or rotation information of a specified remote user changes. |
addStream | Occurs when the SDK decodes the first remote audio frame for playback. |
removeStream | Occurs when the remote user leaves the channel. |
userMuteAudio | Occurs when a remote user stops/resumes sending the audio stream. |
userMuteVideo | Occurs when a remote user stops/resumes sending the video stream. |
userEnableVideo | Occurs when a remote user enables/disables the video module. |
userEnableLocalVideo | Occurs when a remote user enables/disables the local video capture. |
cameraReady | Occurs when the camera turns on and is ready to capture the video. |
videoStopped | Occurs when the video stops playing. |
streamMessage | Occurs when the local user receives a remote data stream within five seconds. |
streamMessageError | Occurs when the local user fails to receive the remote data stream. |
audioDeviceVolumeChanged | Occurs when the volume of the playback, microphone, or application changes. |
localAudioStateChanged | Occurs when the local audio state changes. |
remoteAudioStateChanged | Occurs when the remote audio state changes. |
localVideoStateChanged | Occurs when the local video state changes. |
remoteVideoStateChanged | Occurs when the remote video stream state changes. |
cameraFocusAreaChanged | Occurs when the camera focus area changes. |
cameraExposureAreaChanged | Occurs when the camera exposure area changes. |
streamPublished | Adds a CDN stream address. |
streamUnpublished | Removes a CDN stream address. |
transcodingUpdated | Occurs when the publisher's transcoding settings are updated. |
streamInjectStatus | Reports the status of the injected online media stream. |
channelMediaRelayState | Occurs when the state of the media stream relay changes. |
channelMediaRelayEvent | Reports events during the media stream relay. |
localPublishFallbackToAudioOnly | Occurs: |
remoteSubscribeFallbackToAudioOnly | Occurs: |
videoSourceJoinedSuccess | Occurs when a user joins a channel. (The second instance) |
videoSourceRequestNewToken | Occurs when the token expires. (The second instance) |
videoSourceLeaveChannel | Occurs when a user leaves a channel. (The second instance) |
Reports an error code or a warning code during SDK runtime:
- Error Code: 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.
- Warning Code: In most cases, the application can ignore the warning reported by the SDK because the SDK can usually fix the issue and resume running.
Error code | Enumerator | Description |
ERR_OK | 0 | No error occurs. |
ERR_FAILED | 1 | A general error occurs (no specified reason). |
ERR_INVALID_ARGUMENT | 2 | An invalid parameter is used. For example, the specific channel name includes illegal characters. |
ERR_NOT_READY | 3 | The SDK module is not ready. |
ERR_NOT_SUPPORTED | 4 | The SDK does not support this function. |
ERR_REFUSED | 5 | The request is rejected. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_BUFFER_TOO_SMALL | 6 | The buffer size is not big enough to store the returned data. |
ERR_NOT_INITIALIZED | 7 | The SDK is not initialized before calling this method. |
ERR_NO_PERMISSION | 9 | No permission exists. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_TIMEDOUT | 10 | An API method timeout occurs. Some API methods require the SDK to return the execution result, and this error occurs if the request takes too long (more than 10 seconds) for the SDK to process. |
ERR_CANCELED | 11 | The request is canceled. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_TOO_OFTEN | 12 | The method is called too often. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_BIND_SOCKET | 13 | The SDK fails to bind to the network socket. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_NET_DOWN | 14 | The network is unavailable. This is for internal SDK use only, and it does not return to the application through any method or callback. |
ERR_NET_NOBUFS | 15 | No network buffers are available. This is for internal SDK internal use only, and it does not return to the application through any method or callback. |
ERR_JOIN_CHANNEL_REJECTED | 17 | The request to join the channel is rejected. This error usually occurs when the user is already in the channel, and still calls the method to join the channel. |
ERR_LEAVE_CHANNEL_REJECTED | 18 | The request to leave the channel is rejected. This error usually occurs when the user has left the channel and still calls the method to leave the channel. |
ERR_ALREADY_IN_USE | 19 | Resources are occupied and cannot be reused. |
ERR_ABORTED | 20 | The SDK gives up the request due to too many requests. |
ERR_INIT_NET_ENGINE | 21 | In Windows, specific firewall settings can cause the SDK to fail to initialize and crash. |
ERR_INVALID_VENDOR_KEY | 101 | The specified App ID is invalid. |
ERR_INVALID_CHANNEL_NAME | 102 | The specified channel name is invalid. |
ERR_NOT_IN_CHANNEL | 113 | The user is not in the channel. |
ERR_SIZE_TOO_LARGE | 114 | The size of the sent data is over 1024 bytes. |
ERR_BITRATE_LIMIT | 115 | The bitrate of the sent data exceeds the limit of 6 Kbps. |
ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED | 119 | Switching roles fail. |
ERR_LOAD_MEDIA_ENGINE | 1001 | Fails to load the media engine. |
ERR_START_CALL | 1002 | Fails to start the call after enabling the media engine. |
ERR_ADM_GENERAL_ERROR | 1005 | A general error occurs in the Audio Device Module (no specified reason). |
ERR_ADM_JAVA_RESOURCE | 1006 | Audio Device Module: An error occurs in using the Java resources. |
ERR_ADM_SAMPLE_RATE | 1007 | Audio Device Module: An error occurs in setting the sampling frequency. |
ERR_ADM_INIT_PLAYOUT | 1008 | Audio Device Module: An error occurs in initializing the playback device. |
ERR_ADM_START_PLAYOUT | 1009 | Audio Device Module: An error occurs in starting the playback device. |
ERR_ADM_STOP_PLAYOUT | 1010 | Audio Device Module: An error occurs in stopping the playback device. |
ERR_ADM_INIT_RECORDING | 1011 | Audio Device Module: An error occurs in initializing the recording device. |
ERR_ADM_START_RECORDING | 1012 | Audio Device Module: An error occurs in starting the recording device. |
ERR_ADM_STOP_RECORDING | 1013 | Audio Device Module: An error occurs in stopping the recording device. |
ERR_ADM_RUNTIME_PLAYOUT_ERROR | 1015 | Audio Device Module: A playback error occurs. |
ERR_ADM_RUNTIME_RECORDING_ERROR | 1017 | Audio Device Module: A recording error occurs. |
ERR_ADM_RECORD_AUDIO_FAILED | 1018 | Audio Device Module: Fails to record. |
ERR_ADM_INIT_LOOPBACK | 1022 | Audio Device Module: An error occurs in initializing the loopback device. |
ERR_ADM_START_LOOPBACK | 1023 | Audio Device Module: An error occurs in starting the loopback device. |
ERR_ADM_NO_PERMISSION | 1027 | Audio Device Module: No recording permission exists. |
Warning code | Enumerator | Description |
WARN_PENDING | 20 | The request is pending, usually due to some module not being ready, and the SDK postponed processing the request. |
WARN_NO_AVAILABLE_CHANNEL | 103 | No channel resources are available. Maybe because the server cannot allocate any channel resource. |
WARN_LOOKUP_CHANNEL_TIMEOUT | 104 | A timeout occurs when looking up the channel. When joining a channel, the SDK looks up the specified channel. This warning usually occurs when the network condition is too poor for the SDK to connect to the server. |
WARN_LOOKUP_CHANNEL_REJECTED | 105 | The server rejects the request to look up the channel. The server cannot process this request or the request is illegal. |
WARN_OPEN_CHANNEL_TIMEOUT | 106 | A timeout occurs when opening the channel. Once the specific channel is found, the SDK opens the channel. This warning usually occurs when the network condition is too poor for the SDK to connect to the server. |
WARN_OPEN_CHANNEL_REJECTED | 107 | The server rejects the request to open the channel. The server cannot process this request or the request is illegal. |
WARN_SET_CLIENT_ROLE_TIMEOUT | 118 | A timeout occurs when setting the client role in the live broadcast profile. |
WARN_AUDIO_MIXING_OPEN_ERROR | 701 | An error occurs in opening the audio mixing file. |
WARN_ADM_RUNTIME_PLAYOUT_WARNING | 1014 | Audio Device Module: a warning occurs in the playback device. |
WARN_ADM_RUNTIME_RECORDING_WARNING | 1016 | Audio Device Module: a warning occurs in the recording device. |
WARN_ADM_RECORD_AUDIO_SILENCE | 1019 | Audio Device Module: no valid audio data is collected. |
WARN_ADM_PLAYOUT_MALFUNCTION | 1020 | Audio Device Module: the playback device fails. |
WARN_ADM_RECORD_MALFUNCTION | 1021 | Audio Device Module: the recording device fails. |
WARN_ADM_RECORD_MALFUNCTION | 1031 | Audio Device Module: the recorded audio voice is too low. |
WARN_ADM_HOWLING | 1051 | Audio Device Module: howling is detected. |