Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rtc2.RtcEngineEx Class Referenceabstract
Inheritance diagram for io.agora.rtc2.RtcEngineEx:
io.agora.rtc2.RtcEngine io.agora.rtc2.RtcEngineInternal

Public Member Functions

abstract int muteLocalAudioStreamEx (boolean muted, RtcConnection connection)
 Stops or resumes publishing the local audio stream. More...
 
abstract int muteLocalVideoStreamEx (boolean muted, RtcConnection connection)
 Stops or resumes publishing the local video stream. More...
 
abstract int muteAllRemoteAudioStreamsEx (boolean muted, RtcConnection connection)
 Stops or resumes subscribing to the audio streams of all remote users. More...
 
abstract int muteAllRemoteVideoStreamsEx (boolean muted, RtcConnection connection)
 Stops or resumes subscribing to the video streams of all remote users. More...
 
abstract int muteRemoteAudioStreamEx (int uid, boolean muted, RtcConnection connection)
 Stops or resumes receiving the audio stream of a specified user. More...
 
abstract int muteRemoteVideoStreamEx (int uid, boolean muted, RtcConnection connection)
 Stops or resumes receiving the video stream of a specified user. More...
 
abstract int setRemoteVideoStreamTypeEx (int uid, Constants.VideoStreamType streamType, RtcConnection connection)
 Sets the video stream type to subscribe to. More...
 
abstract int setRemoteVideoStreamTypeEx (int uid, int streamType, RtcConnection connection)
 Sets the video stream type to subscribe to. More...
 
abstract int setHighPriorityUserListEx (int[] uidList, int option, RtcConnection connection)
 
abstract int setSubscribeAudioBlocklistEx (int[] uidList, RtcConnection connection)
 Sets the blocklist of subscriptions for audio streams. More...
 
abstract int setSubscribeAudioAllowlistEx (int[] uidList, RtcConnection connection)
 Sets the allowlist of subscriptions for audio streams. More...
 
abstract int setSubscribeVideoBlocklistEx (int[] uidList, RtcConnection connection)
 Sets the blocklist of subscriptions for video streams. More...
 
abstract int setSubscribeVideoAllowlistEx (int[] uidList, RtcConnection connection)
 Sets the allowlist of subscriptions for video streams. More...
 
abstract int setRemoteRenderModeEx (int uid, int renderMode, int mirrorMode, RtcConnection connection)
 Sets the video display mode of a specified remote user. More...
 
abstract int setupRemoteVideoEx (VideoCanvas remote, RtcConnection connection)
 Initializes the video view of a remote user. More...
 
abstract int setVideoEncoderConfigurationEx (VideoEncoderConfiguration config, RtcConnection connection)
 Sets the video encoder configuration. More...
 
abstract int updateChannelMediaOptionsEx (ChannelMediaOptions options, RtcConnection connection)
 Updates the channel media options after joining the channel. More...
 
abstract int joinChannelEx (String token, RtcConnection connection, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler)
 Joins a channel. More...
 
abstract int leaveChannelEx (RtcConnection connection)
 Leaves a channel. More...
 
abstract int leaveChannelEx (RtcConnection connection, LeaveChannelOptions options)
 Sets channel options and leaves the channel. More...
 
abstract int leaveChannelWithUserAccountEx (String channelId, String userAccount)
 
abstract int leaveChannelWithUserAccountEx (String channelId, String userAccount, LeaveChannelOptions options)
 
abstract int enableDualStreamModeEx (boolean enabled, SimulcastStreamConfig streamConfig, RtcConnection connection)
 Enables or disables dual-stream mode on the sender side. More...
 
abstract int setDualStreamModeEx (Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig, RtcConnection connection)
 Sets the dual-stream mode on the sender side. More...
 
abstract int setSimulcastConfigEx (SimulcastConfig simulcastConfig, RtcConnection connection)
 Sets the simulcast video stream configuration. More...
 
abstract int getConnectionStateEx (RtcConnection connection)
 Gets the current connection state of the SDK. More...
 
abstract int sendCustomReportMessageEx (String id, String category, String event, String label, int value, RtcConnection connection)
 Agora supports reporting and analyzing customized messages. More...
 
abstract int sendStreamMessageEx (int streamId, byte[] message, RtcConnection connection)
 Sends data stream messages. More...
 
abstract int sendRdtMessageEx (int uid, int type, byte[] message, RtcConnection connection)
 Send Reliable message to remote uid in channel. More...
 
abstract int sendMediaControlMessageEx (int uid, byte[] message, RtcConnection connection)
 Send media control message. More...
 
abstract int createDataStreamEx (boolean reliable, boolean ordered, RtcConnection connection)
 Creates a data stream. More...
 
abstract int createDataStreamEx (DataStreamConfig config, RtcConnection connection)
 Creates a data stream. More...
 
abstract int joinChannelWithUserAccountEx (String token, String channelId, String userAccount, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler)
 Join a channel using a user account and token, and set the media options. More...
 
abstract int getUserInfoByUserAccountEx (String userAccount, UserInfo userInfo, RtcConnection connection)
 Gets the user information by passing in the user account. More...
 
abstract int getUserInfoByUidEx (int uid, UserInfo userInfo, RtcConnection connection)
 Gets the user information by passing in the user ID. More...
 
abstract int adjustRecordingSignalVolumeEx (int volume, RtcConnection connection)
 
abstract int muteRecordingSignalEx (boolean muted, RtcConnection connection)
 
abstract int adjustUserPlaybackSignalVolumeEx (int uid, int volume, RtcConnection connection)
 Adjusts the playback signal volume of a specified remote user. More...
 
abstract int setRemoteVoicePositionEx (int uid, double pan, double gain, RtcConnection connection)
 Sets the 2D position (the position on the horizontal plane) of the remote user's voice. More...
 
abstract int setRemoteVideoSubscriptionOptionsEx (int uid, VideoSubscriptionOptions options, RtcConnection rtcConnection)
 Sets options for subscribing to remote video streams. More...
 
abstract int setRemoteUserSpatialAudioParamsEx (int uid, SpatialAudioParams params, RtcConnection connection)
 
abstract int addVideoWatermarkEx (String watermarkUrl, WatermarkOptions options, RtcConnection connection)
 Adds a watermark image to the local video. More...
 
abstract int addVideoWatermarkEx (WatermarkConfig config, RtcConnection connection)
 Adds a watermark image to the local video. More...
 
abstract int removeVideoWatermarkEx (String id, RtcConnection connection)
 Removes the specified watermark image from the local or remote video stream. More...
 
abstract int clearVideoWatermarkEx (RtcConnection connection)
 Removes the watermark image from the video stream. More...
 
abstract int enableAudioVolumeIndicationEx (int interval, int smooth, boolean reportVad, RtcConnection connection)
 Enables the reporting of users' volume indication. More...
 
abstract int takeSnapshotEx (RtcConnection connection, int uid, String filePath)
 Takes a snapshot of a video stream using connection ID. More...
 
abstract int takeSnapshotEx (RtcConnection connection, int uid, SnapshotConfig config)
 Gets a video screenshot of the specified observation point using the connection ID. More...
 
abstract int enableContentInspectEx (boolean enabled, ContentInspectConfig config, RtcConnection connection)
 Enables or disables video screenshot and upload. More...
 
abstract int startRtmpStreamWithoutTranscodingEx (String url, RtcConnection connection)
 Starts pushing media streams to a CDN without transcoding. More...
 
abstract int startRtmpStreamWithTranscodingEx (String url, LiveTranscoding transcoding, RtcConnection connection)
 Starts Media Push and sets the transcoding configuration. More...
 
abstract int updateRtmpTranscodingEx (LiveTranscoding transcoding, RtcConnection connection)
 Updates the transcoding configuration. More...
 
abstract int stopRtmpStreamEx (String url, RtcConnection connection)
 Stops pushing media streams to a CDN. More...
 
abstract int startOrUpdateChannelMediaRelayEx (ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection)
 Starts relaying media streams across channels or updates channels for media relay. More...
 
abstract int stopChannelMediaRelayEx (RtcConnection connection)
 Stops the media stream relay. Once the relay stops, the host quits all the target channels. More...
 
abstract int pauseAllChannelMediaRelayEx (RtcConnection connection)
 Pauses the media stream relay to all target channels. More...
 
abstract int resumeAllChannelMediaRelayEx (RtcConnection connection)
 Resumes the media stream relay to all target channels. More...
 
abstract int startMediaRenderingTracingEx (RtcConnection connection)
 Enables tracing the video frame rendering process. More...
 
abstract int setParametersEx (String parameters, RtcConnection connection)
 
abstract String getCallIdEx (RtcConnection connection)
 Gets the call ID with the connection ID. More...
 
abstract void addHandlerEx (IRtcEngineEventHandler handler, RtcConnection connection)
 
abstract void removeHandlerEx (IRtcEngineEventHandler handler, RtcConnection connection)
 
abstract int enableEncryptionEx (boolean enabled, EncryptionConfig config, RtcConnection connection)
 Enables or disables the built-in encryption. More...
 
abstract int sendAudioMetadataEx (byte[] metadata, RtcConnection connection)
 
abstract int preloadEffectEx (RtcConnection connection, int soundId, String filePath)
 Preloads a specified sound effect to the channel. More...
 
abstract int preloadEffectEx (RtcConnection connection, int soundId, String filePath, int startPos)
 Preloads a specified sound effect to a channel. More...
 
abstract int playEffectEx (RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish)
 Plays a specified sound effect in the channel. More...
 
abstract int playEffectEx (RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos)
 Plays a specified sound effect in a channel. More...
 
- Public Member Functions inherited from io.agora.rtc2.RtcEngine
abstract int setChannelProfile (int profile)
 Sets the channel profile. More...
 
abstract int setClientRole (int role)
 Sets the client role. More...
 
abstract int setClientRole (int role, ClientRoleOptions options)
 Sets the user role and the audience latency level in a live streaming scenario. More...
 
abstract int sendCustomReportMessage (String id, String category, String event, String label, int value)
 Reports customized messages. More...
 
abstract int preloadChannel (String token, String channelName, int optionalUid)
 Preloads a channel with token, channelName, and optionalUid. More...
 
abstract int preloadChannelWithUserAccount (String token, String channelName, String userAccount)
 Preloads a channel with token, channelName, and userAccount. More...
 
abstract int updatePreloadChannelToken (String token)
 Updates the wildcard token for preloading channels. More...
 
abstract int joinChannel (String token, String channelId, String optionalInfo, int uid)
 Joins a channel. More...
 
abstract int joinChannel (String token, String channelId, int uid, ChannelMediaOptions options)
 Joins a channel with media options. More...
 
abstract int registerLocalUserAccount (String appId, String userAccount)
 Registers a user account. More...
 
abstract int joinChannelWithUserAccount (String token, String channelName, String userAccount)
 Joins a channel with a User Account and Token. More...
 
abstract int joinChannelWithUserAccount (String token, String channelName, String userAccount, ChannelMediaOptions options)
 Join a channel using a user account and token, and set the media options. More...
 
abstract int getUserInfoByUserAccount (String userAccount, UserInfo userInfo)
 Gets the user information by passing in the user account. More...
 
abstract int getUserInfoByUid (int uid, UserInfo userInfo)
 Gets the user information by passing in the user ID. More...
 
abstract int leaveChannel ()
 Leaves a channel. More...
 
abstract int leaveChannel (LeaveChannelOptions options)
 Sets channel options and leaves the channel. More...
 
abstract int renewToken (String token)
 Renews the token. More...
 
abstract DeviceInfo getAudioDeviceInfo ()
 Gets the audio device information. More...
 
abstract int enableWebSdkInteroperability (boolean enabled)
 Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). More...
 
abstract int getConnectionState ()
 Gets the current connection state of the SDK. More...
 
abstract int enableAudio ()
 Enables the audio module. More...
 
abstract int disableAudio ()
 Disables the audio module. More...
 
abstract int pauseAudio ()
 
abstract int resumeAudio ()
 
abstract int setAudioProfile (int profile)
 Sets the audio profile. More...
 
abstract int setAudioProfile (int profile, int scenario)
 Sets the audio profile and audio scenario. More...
 
abstract int setAudioScenario (int scenario)
 Sets the audio scenario. More...
 
abstract int setHighQualityAudioParameters (boolean fullband, boolean stereo, boolean fullBitrate)
 
abstract int adjustRecordingSignalVolume (int volume)
 Adjusts the capturing signal volume. More...
 
abstract int adjustPlaybackSignalVolume (int volume)
 Adjusts the playback signal volume of all remote users. More...
 
abstract int enableAudioVolumeIndication (int interval, int smooth, boolean reportVad)
 Enables the reporting of users' volume indication. More...
 
abstract int enableLocalAudio (boolean enabled)
 Enables or disables the local audio capture. More...
 
abstract int muteLocalAudioStream (boolean muted)
 Stops or resumes publishing the local audio stream. More...
 
abstract int muteRemoteAudioStream (int uid, boolean muted)
 Stops or resumes subscribing to the audio stream of a specified user. More...
 
abstract int adjustUserPlaybackSignalVolume (int uid, int volume)
 Adjusts the playback signal volume of a specified remote user. More...
 
abstract int muteAllRemoteAudioStreams (boolean muted)
 Stops or resumes subscribing to the audio streams of all remote users. More...
 
abstract int enableVideo ()
 Enables the video module. More...
 
abstract int disableVideo ()
 Disables the video module. More...
 
abstract int setVideoEncoderConfiguration (VideoEncoderConfiguration config)
 Sets the video encoder configuration. More...
 
abstract CodecCapInfo[] queryCodecCapability ()
 Queries the video codec capabilities of the SDK. More...
 
abstract int queryDeviceScore ()
 Queries device score. More...
 
abstract AgoraFocalLengthInfo[] queryCameraFocalLengthCapability ()
 Queries the focal length capability supported by the camera. More...
 
abstract int setCameraCapturerConfiguration (CameraCapturerConfiguration config)
 Sets the camera capture configuration. More...
 
abstract int setupLocalVideo (VideoCanvas local)
 Initializes the local video view. More...
 
abstract int setupRemoteVideo (VideoCanvas remote)
 Initializes the video view of a remote user. More...
 
abstract int setRemoteRenderMode (int uid, int renderMode)
 
abstract int setLocalRenderMode (int renderMode)
 Sets the local video display mode. More...
 
abstract int setRemoteRenderMode (int uid, int renderMode, int mirrorMode)
 Updates the display mode of the video view of a remote user. More...
 
abstract int setLocalRenderMode (int renderMode, int mirrorMode)
 Updates the display mode of the local video view. More...
 
abstract int startPreview ()
 Enables the local video preview. More...
 
abstract int startPreview (Constants.VideoSourceType sourceType)
 Enables the local video preview and specifies the video source for the preview. More...
 
abstract int stopPreview ()
 Stops the local video preview. More...
 
abstract int stopPreview (Constants.VideoSourceType sourceType)
 Stops the local video preview. More...
 
abstract int enableLocalVideo (boolean enabled)
 Enables/Disables the local video capture. More...
 
abstract int startCameraCapture (Constants.VideoSourceType sourceType, CameraCapturerConfiguration config)
 Starts camera capture. More...
 
abstract int stopCameraCapture (Constants.VideoSourceType sourceType)
 Stops camera capture. More...
 
abstract int startLocalVideoTranscoder (LocalTranscoderConfiguration config)
 Starts the local video mixing. More...
 
abstract int stopLocalVideoTranscoder ()
 Stops the local video mixing. More...
 
abstract int updateLocalTranscoderConfiguration (LocalTranscoderConfiguration config)
 Updates the local video mixing configuration. More...
 
abstract int startLocalAudioMixer (LocalAudioMixerConfiguration config)
 Starts local audio mixing. More...
 
abstract int updateLocalAudioMixerConfiguration (LocalAudioMixerConfiguration config)
 Updates the configurations for mixing audio streams locally. More...
 
abstract int stopLocalAudioMixer ()
 Stops the local audio mixing. More...
 
abstract int muteLocalVideoStream (boolean muted)
 Stops or resumes publishing the local video stream. More...
 
abstract int muteRemoteVideoStream (int uid, boolean muted)
 Stops or resumes subscribing to the video stream of a specified user. More...
 
abstract int muteAllRemoteVideoStreams (boolean muted)
 Stops or resumes subscribing to the video streams of all remote users. More...
 
abstract int setBeautyEffectOptions (boolean enabled, BeautyOptions options)
 Sets the image enhancement options. More...
 
abstract int setBeautyEffectOptions (boolean enabled, BeautyOptions options, Constants.MediaSourceType sourceType)
 Sets the image enhancement options and specifies the media source. More...
 
abstract int setFaceShapeBeautyOptions (boolean enabled, FaceShapeBeautyOptions options)
 Sets the face shape beauty options. More...
 
abstract int setFaceShapeBeautyOptions (boolean enabled, FaceShapeBeautyOptions options, Constants.MediaSourceType sourceType)
 Sets the face shape options and specifies the media source. More...
 
abstract FaceShapeBeautyOptions getFaceShapeBeautyOptions ()
 Gets the beauty effect options. More...
 
abstract FaceShapeBeautyOptions getFaceShapeBeautyOptions (Constants.MediaSourceType sourceType)
 Gets the beauty effect options. More...
 
abstract int setFaceShapeAreaOptions (FaceShapeAreaOptions options)
 Sets the options for beauty enhancement facial areas. More...
 
abstract int setFaceShapeAreaOptions (FaceShapeAreaOptions options, Constants.MediaSourceType sourceType)
 Sets the image enhancement options for facial areas and specifies the media source. More...
 
abstract FaceShapeAreaOptions getFaceShapeAreaOptions (int shapeArea)
 Gets the facial beauty area options. More...
 
abstract FaceShapeAreaOptions getFaceShapeAreaOptions (int shapeArea, Constants.MediaSourceType sourceType)
 Gets the facial beauty area options. More...
 
abstract int setFilterEffectOptions (boolean enabled, FilterEffectOptions options)
 Sets the filter effect options. More...
 
abstract int setFilterEffectOptions (boolean enabled, FilterEffectOptions options, Constants.MediaSourceType sourceType)
 Sets the filter effect options and specifies the media source. More...
 
abstract int setLowlightEnhanceOptions (boolean enabled, LowLightEnhanceOptions options)
 Sets low-light enhancement. More...
 
abstract int setLowlightEnhanceOptions (boolean enabled, LowLightEnhanceOptions options, Constants.MediaSourceType sourceType)
 Sets low light enhance options and specifies the media source. More...
 
abstract int setVideoDenoiserOptions (boolean enabled, VideoDenoiserOptions options)
 Sets video noise reduction. More...
 
abstract int setVideoDenoiserOptions (boolean enabled, VideoDenoiserOptions options, Constants.MediaSourceType sourceType)
 Sets video noise reduction and specifies the media source. More...
 
abstract int setColorEnhanceOptions (boolean enabled, ColorEnhanceOptions options)
 Sets color enhancement. More...
 
abstract int setColorEnhanceOptions (boolean enabled, ColorEnhanceOptions options, Constants.MediaSourceType sourceType)
 Sets color enhance options and specifies the media source. More...
 
abstract IVideoEffectObject createVideoEffectObject (String bundlePath, Constants.MediaSourceType sourceType)
 Creates a video effect object. More...
 
abstract int destroyVideoEffectObject (IVideoEffectObject videoEffectObject)
 Destroys a video effect object. More...
 
abstract int enableVirtualBackground (boolean enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty)
 Enables/Disables the virtual background. More...
 
abstract int enableVirtualBackground (boolean enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty, Constants.MediaSourceType sourceType)
 Enables virtual background and specify the media source, or disables virtual background. More...
 
abstract int setDefaultAudioRoutetoSpeakerphone (boolean defaultToSpeaker)
 Sets the default audio playback route. More...
 
abstract int setEnableSpeakerphone (boolean enabled)
 Enables/Disables the audio route to the speakerphone. More...
 
abstract int setRouteInCommunicationMode (int route)
 Selects the audio playback route in communication audio mode. More...
 
abstract boolean isSpeakerphoneEnabled ()
 Checks whether the speakerphone is enabled. More...
 
abstract int enableInEarMonitoring (boolean enabled)
 Enables in-ear monitoring. More...
 
abstract int enableInEarMonitoring (boolean enabled, int includeAudioFilters)
 Enables in-ear monitoring. More...
 
abstract int setInEarMonitoringVolume (int volume)
 Sets the volume of the in-ear monitor. More...
 
abstract int setLocalVoicePitch (double pitch)
 Changes the voice pitch of the local speaker. More...
 
abstract int setLocalVoiceFormant (double formantRatio)
 Sets the formant ratio to change the timbre of human voice. More...
 
abstract int setLocalVoiceEqualization (Constants.AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain)
 Sets the local voice equalization effect. More...
 
abstract int setLocalVoiceReverb (Constants.AUDIO_REVERB_TYPE reverbKey, int value)
 Sets the local voice reverberation. More...
 
abstract int setHeadphoneEQPreset (int preset)
 Sets the preset headphone equalization effect. More...
 
abstract int setHeadphoneEQParameters (int lowGain, int highGain)
 Sets the low- and high-frequency parameters of the headphone equalizer. More...
 
abstract int setAudioEffectPreset (int preset)
 Sets an SDK preset audio effect. More...
 
abstract int setVoiceBeautifierPreset (int preset)
 Sets a preset voice beautifier effect. More...
 
abstract int setVoiceConversionPreset (int preset)
 Sets a preset voice beautifier effect. More...
 
abstract int setAudioEffectParameters (int preset, int param1, int param2)
 Sets parameters for SDK preset audio effects. More...
 
abstract int setVoiceBeautifierParameters (int preset, int param1, int param2)
 Sets parameters for the preset voice beautifier effects. More...
 
abstract int setVoiceConversionParameters (int preset, int param1, int param2)
 
abstract int enableSoundPositionIndication (boolean enabled)
 Enables or disables stereo panning for remote users. More...
 
abstract int setRemoteVoicePosition (int uid, double pan, double gain)
 Sets the 2D position (the position on the horizontal plane) of the remote user's voice. More...
 
abstract int enableVoiceAITuner (boolean enabled, Constants.VOICE_AI_TUNER_TYPE type)
 Enables or disables the voice AI tuner. More...
 
abstract int startAudioMixing (String filePath, boolean loopback, int cycle)
 Starts playing the music file. More...
 
abstract int enableSpatialAudio (boolean enabled)
 Enables or disables the spatial audio effect. More...
 
abstract int setRemoteUserSpatialAudioParams (int uid, SpatialAudioParams params)
 Sets the spatial audio effect parameters of the remote user. More...
 
abstract int setRemoteVideoSubscriptionOptions (int uid, VideoSubscriptionOptions options)
 Options for subscribing to remote video streams. More...
 
abstract int setAINSMode (boolean enabled, int mode)
 Sets whether to enable the AI ​​noise suppression function and set the noise suppression mode. More...
 
abstract int startAudioMixing (String filePath, boolean loopback, int cycle, int startPos)
 Starts playing the music file. More...
 
abstract int stopAudioMixing ()
 Stops playing the music file. More...
 
abstract int pauseAudioMixing ()
 Pauses playing and mixing the music file. More...
 
abstract int resumeAudioMixing ()
 Resumes playing and mixing the music file. More...
 
abstract int adjustAudioMixingVolume (int volume)
 Adjusts the volume during audio mixing. More...
 
abstract int adjustAudioMixingPlayoutVolume (int volume)
 Adjusts the volume of audio mixing for local playback. More...
 
abstract int adjustAudioMixingPublishVolume (int volume)
 Adjusts the volume of audio mixing for publishing. More...
 
abstract int getAudioMixingPlayoutVolume ()
 Retrieves the audio mixing volume for local playback. More...
 
abstract int getAudioMixingPublishVolume ()
 Retrieves the audio mixing volume for publishing. More...
 
abstract int getAudioMixingDuration ()
 Retrieves the duration (ms) of the music file. More...
 
abstract int getAudioMixingCurrentPosition ()
 Retrieves the playback position (ms) of the music file. More...
 
abstract int setAudioMixingPosition (int pos)
 Sets the audio mixing position. More...
 
abstract int setAudioMixingDualMonoMode (Constants.AudioMixingDualMonoMode mode)
 Sets the channel mode of the current audio file. More...
 
abstract int setAudioMixingPitch (int pitch)
 Sets the pitch of the local music file. More...
 
abstract int setAudioMixingPlaybackSpeed (int speed)
 Sets the playback speed of the current audio file. More...
 
abstract int selectAudioTrack (int audioIndex)
 Selects the audio track used during playback. More...
 
abstract int getAudioTrackCount ()
 Gets the index of audio tracks of the current music file. More...
 
abstract IAudioEffectManager getAudioEffectManager ()
 Gets the IAudioEffectManager class to manage the audio effect files. More...
 
abstract int startAudioRecording (String filePath, int quality)
 Starts client-side recording. More...
 
abstract int startAudioRecording (AudioRecordingConfiguration config)
 Starts client-side recording and applies recording configurations. More...
 
abstract int stopAudioRecording ()
 Stops client-side recording. More...
 
abstract int startEchoTest (EchoTestConfiguration config)
 Starts an audio device loopback test. More...
 
abstract int stopEchoTest ()
 Stops the audio call test. More...
 
abstract int startLastmileProbeTest (LastmileProbeConfig config)
 Starts the last mile network probe test. More...
 
abstract int stopLastmileProbeTest ()
 Stops the last mile network probe test. More...
 
abstract int setExternalAudioSource (boolean enabled, int sampleRate, int channels)
 Sets the external audio source. More...
 
abstract int setExternalAudioSink (boolean enabled, int sampleRate, int channels)
 Sets the external audio sink. More...
 
abstract int setExternalRemoteEglContext (Object eglContext)
 Sets the EGL context for rendering remote video streams. More...
 
abstract int pullPlaybackAudioFrame (byte[] data, int lengthInByte)
 Pulls the remote audio data. More...
 
abstract int pullPlaybackAudioFrame (ByteBuffer data, int lengthInByte)
 Pulls the remote audio data. More...
 
abstract int startRecordingDeviceTest (int indicationInterval)
 Starts the audio capturing device test. More...
 
abstract int stopRecordingDeviceTest ()
 Stops the audio capturing device test. More...
 
abstract int startPlaybackDeviceTest (String audioFileName)
 Starts the audio playback device test. More...
 
abstract int stopPlaybackDeviceTest ()
 Stops the audio playback device test. More...
 
abstract int createCustomAudioTrack (Constants.AudioTrackType trackType, AudioTrackConfig config)
 Creates a custom audio track. More...
 
abstract int destroyCustomAudioTrack (int trackId)
 Destroys the specified audio track. More...
 
abstract int setExternalAudioSource (boolean enabled, int sampleRate, int channels, boolean localPlayback, boolean publish)
 Sets the external audio source parameters. More...
 
abstract int pushExternalAudioFrame (byte[] data, long timestamp)
 
abstract int pushExternalAudioFrame (ByteBuffer data, long timestamp, int trackId)
 
abstract int pushExternalAudioFrame (byte[] data, long timestamp, int sampleRate, int channels, Constants.BytesPerSample bytesPerSample, int trackId)
 Pushes the external audio frame to the SDK. More...
 
abstract int pushExternalAudioFrame (ByteBuffer data, long timestamp, int sampleRate, int channels, Constants.BytesPerSample bytesPerSample, int trackId)
 
abstract int setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType)
 Configures the external video source. More...
 
abstract int setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType, EncodedVideoTrackOptions encodedOpt)
 
abstract boolean pushExternalVideoFrame (VideoFrame frame)
 Pushes the external raw video frame to the SDK. More...
 
abstract int pushExternalVideoFrameById (VideoFrame frame, int videoTrackId)
 Pushes the external raw video frame to the SDK through video tracks. More...
 
abstract int pushExternalVideoFrameById (AgoraVideoFrame frame, int videoTrackId)
 Pushes the external raw video frame to the SDK through video tracks. More...
 
abstract int pushExternalEncodedVideoFrame (ByteBuffer data, EncodedVideoFrameInfo frameInfo)
 
abstract int pushExternalEncodedVideoFrameById (ByteBuffer data, EncodedVideoFrameInfo frameInfo, int videoTrackId)
 
abstract boolean pushExternalVideoFrame (AgoraVideoFrame frame)
 Pushes the external raw video frame to the SDK. More...
 
abstract boolean isTextureEncodeSupported ()
 Check whether the video supports the Texture encoding. More...
 
abstract int registerAudioFrameObserver (IAudioFrameObserver observer)
 Registers an audio frame observer object. More...
 
abstract int registerAudioEncodedFrameObserver (AudioEncodedFrameObserverConfig config, IAudioEncodedFrameObserver observer)
 Registers an encoded audio observer. More...
 
abstract int setRecordingAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 Sets the format of the captured raw audio data. More...
 
abstract int setPlaybackAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 Sets the format of the raw audio playback data. More...
 
abstract int setMixedAudioFrameParameters (int sampleRate, int channel, int samplesPerCall)
 Sets the format of the raw audio data after mixing for audio capture and playback. More...
 
abstract int setEarMonitoringAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 Sets the format of the in-ear monitoring raw audio data. More...
 
abstract int addVideoWatermark (AgoraImage watermark)
 Adds a watermark image to the local video. More...
 
abstract int addVideoWatermark (String watermarkUrl, WatermarkOptions options)
 Adds a watermark image to the local video. More...
 
abstract int addVideoWatermark (WatermarkConfig config)
 Adds a watermark image to the local video. More...
 
abstract int removeVideoWatermark (String id)
 Removes the watermark image from the local video. More...
 
abstract int clearVideoWatermarks ()
 Removes the watermark image from the video stream. More...
 
abstract int setRemoteUserPriority (int uid, int userPriority)
 
abstract int setRemoteSubscribeFallbackOption (Constants.StreamFallbackOptions option)
 Sets the fallback option for the subscribed video stream based on the network conditions. More...
 
abstract int setRemoteSubscribeFallbackOption (int option)
 Sets the fallback option for the subscribed video stream based on the network conditions. More...
 
abstract int setHighPriorityUserList (int[] uidList, int option)
 
abstract int enableDualStreamMode (boolean enabled)
 Enables or disables dual-stream mode on the sender side. More...
 
abstract int enableDualStreamMode (boolean enabled, SimulcastStreamConfig streamConfig)
 Sets the dual-stream mode on the sender side and the low-quality video stream. More...
 
abstract int setDualStreamMode (Constants.SimulcastStreamMode mode)
 Sets the dual-stream mode on the sender side. More...
 
abstract int setDualStreamMode (Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig)
 Sets dual-stream mode configuration on the sender side. More...
 
abstract int setSimulcastConfig (SimulcastConfig simulcastConfig)
 Sets the simulcast video stream configuration. More...
 
abstract int setLocalRenderTargetFps (Constants.VideoSourceType sourceType, int targetFps)
 Sets the maximum frame rate for rendering local video. More...
 
abstract int setRemoteRenderTargetFps (int targetFps)
 Sets the maximum frame rate for rendering remote video. More...
 
abstract int setRemoteVideoStreamType (int uid, Constants.VideoStreamType streamType)
 Sets the video stream type to subscribe to. More...
 
abstract int setRemoteVideoStreamType (int uid, int streamType)
 Sets the video stream type to subscribe to. More...
 
abstract int setRemoteDefaultVideoStreamType (Constants.VideoStreamType streamType)
 Sets the default video stream type to subscribe to. More...
 
abstract int setRemoteDefaultVideoStreamType (int streamType)
 Sets the default video stream type to subscribe to. More...
 
abstract int setSubscribeAudioBlocklist (int[] uidList)
 Sets the blocklist of subscriptions for audio streams. More...
 
abstract int setSubscribeAudioAllowlist (int[] uidList)
 Sets the allowlist of subscriptions for audio streams. More...
 
abstract int setSubscribeVideoBlocklist (int[] uidList)
 Sets the blocklist of subscriptions for video streams. More...
 
abstract int setSubscribeVideoAllowlist (int[] uidList)
 Sets the allowlist of subscriptions for video streams. More...
 
abstract int enableEncryption (boolean enabled, EncryptionConfig config)
 Enables or disables the built-in encryption. More...
 
abstract int startRtmpStreamWithoutTranscoding (String url)
 Starts pushing media streams to a CDN without transcoding. More...
 
abstract int startRtmpStreamWithTranscoding (String url, LiveTranscoding transcoding)
 Starts Media Push and sets the transcoding configuration. More...
 
abstract int updateRtmpTranscoding (LiveTranscoding transcoding)
 Updates the transcoding configuration. More...
 
abstract int stopRtmpStream (String url)
 Stops pushing media streams to a CDN. More...
 
abstract int createDataStream (boolean reliable, boolean ordered)
 Creates a data stream. More...
 
abstract int createDataStream (DataStreamConfig config)
 Creates a data stream. More...
 
abstract int sendStreamMessage (int streamId, byte[] message)
 Sends data stream messages. More...
 
abstract int sendRdtMessage (int uid, int type, byte[] message)
 Send Reliable message to remote uid in channel. More...
 
abstract int sendMediaControlMessage (int uid, byte[] message)
 Send media control message. More...
 
abstract int setVideoQualityParameters (boolean preferFrameRateOverImageQuality)
 
abstract int setLocalVideoMirrorMode (int mode)
 Sets the local video mirror mode. More...
 
abstract int switchCamera ()
 Switches between front and rear cameras. More...
 
abstract int switchCamera (String cameraId)
 Switches cameras by camera ID. More...
 
abstract boolean isCameraZoomSupported ()
 Checks whether the device supports camera zoom. More...
 
abstract boolean isCameraTorchSupported ()
 Checks whether the device supports camera flash. More...
 
abstract boolean isCameraFocusSupported ()
 Check whether the device supports the manual focus function. More...
 
abstract boolean isCameraExposurePositionSupported ()
 Checks whether the device supports manual exposure. More...
 
abstract boolean isCameraAutoFocusFaceModeSupported ()
 Checks whether the device supports the face auto-focus function. More...
 
abstract boolean isCameraFaceDetectSupported ()
 Checks whether the device camera supports face detection. More...
 
abstract boolean isCameraExposureSupported ()
 Queries whether the current camera supports adjusting exposure value. More...
 
abstract int setCameraZoomFactor (float factor)
 Sets the camera zoom factor. More...
 
abstract float getCameraMaxZoomFactor ()
 Gets the maximum zoom ratio supported by the camera. More...
 
abstract int setCameraFocusPositionInPreview (float positionX, float positionY)
 Sets the camera manual focus position. More...
 
abstract int setCameraExposurePosition (float positionXinView, float positionYinView)
 Sets the camera exposure position. More...
 
abstract int enableFaceDetection (boolean enabled)
 Enables or disables face detection for the local user. More...
 
abstract int setCameraTorchOn (boolean isOn)
 Enables the camera flash. More...
 
abstract int setCameraAutoFocusFaceModeEnabled (boolean enabled)
 Enables the camera auto-face focus function. More...
 
abstract int setCameraExposureFactor (int factor)
 Sets the camera exposure value. More...
 
abstract String getCallId ()
 Retrieves the call ID. More...
 
abstract int rate (String callId, int rating, String description)
 Allows a user to rate a call after the call ends. More...
 
abstract int complain (String callId, String description)
 Allows a user to complain about the call quality after a call ends. More...
 
abstract int setLogFile (String filePath)
 Sets the log file. More...
 
abstract int setLogFilter (int filter)
 Sets the log output level of the SDK. More...
 
abstract int setLogLevel (int level)
 Sets the output log level of the SDK. More...
 
abstract int setLogFileSize (long fileSizeInKBytes)
 Sets the log file size. More...
 
abstract String uploadLogFile ()
 
abstract int writeLog (int level, String format, Object... args)
 
abstract long getNativeHandle ()
 Gets the C++ handle of the Native SDK. More...
 
void addHandler (IRtcEngineEventHandler handler)
 Adds event handlers. More...
 
void removeHandler (IRtcEngineEventHandler handler)
 Removes the specified IRtcEngineEventHandler instance. More...
 
abstract boolean enableHighPerfWifiMode (boolean enable)
 
abstract long getNativeMediaPlayer (int sourceId)
 
abstract int queryHDRCapability (Constants.VIDEO_MODULE_TYPE moduleType)
 
abstract int queryScreenCaptureCapability ()
 Queries the highest frame rate supported by the device during screen sharing. More...
 
abstract void monitorHeadsetEvent (boolean monitor)
 
abstract void monitorBluetoothHeadsetEvent (boolean monitor)
 
abstract void setPreferHeadset (boolean enabled)
 
abstract int setParameters (String parameters)
 Provides technical preview functionalities or special customizations by configuring the SDK with JSON options. More...
 
abstract String getParameters (String parameters)
 
abstract String getParameter (String parameter, String args)
 
abstract int registerMediaMetadataObserver (IMetadataObserver observer, int type)
 Registers the metadata observer. More...
 
abstract int unregisterMediaMetadataObserver (IMetadataObserver observer, int type)
 Unregisters the specified metadata observer. More...
 
abstract int startOrUpdateChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration)
 Starts relaying media streams across channels or updates channels for media relay. More...
 
abstract int stopChannelMediaRelay ()
 Stops the media stream relay. Once the relay stops, the host quits all the target channels. More...
 
abstract int pauseAllChannelMediaRelay ()
 Pauses the media stream relay to all target channels. More...
 
abstract int resumeAllChannelMediaRelay ()
 Resumes the media stream relay to all target channels. More...
 
abstract int updateChannelMediaOptions (ChannelMediaOptions options)
 Updates the channel media options after joining the channel. More...
 
abstract int muteRecordingSignal (boolean muted)
 Whether to mute the recording signal. More...
 
abstract int setPlaybackAudioFrameBeforeMixingParameters (int sampleRate, int channel)
 Sets the format of the raw audio playback data before mixing. More...
 
abstract int setPlaybackAudioFrameBeforeMixingParameters (int sampleRate, int channel, int samplesPerCall)
 Sets the format of audio data in the onPlaybackAudioFrameBeforeMixing callback. More...
 
abstract int enableAudioSpectrumMonitor (int intervalInMS)
 Turns on audio spectrum monitoring. More...
 
abstract int disableAudioSpectrumMonitor ()
 Disables audio spectrum monitoring. More...
 
abstract int registerAudioSpectrumObserver (IAudioSpectrumObserver observer)
 Registers an audio spectrum observer. More...
 
abstract int unRegisterAudioSpectrumObserver (IAudioSpectrumObserver observer)
 Unregisters the audio spectrum observer. More...
 
abstract double getEffectsVolume ()
 Retrieves the volume of the audio effects. More...
 
abstract int setEffectsVolume (double volume)
 Sets the volume of the audio effects. More...
 
abstract int preloadEffect (int soundId, String filePath)
 Preloads a specified audio effect file into the memory. More...
 
abstract int preloadEffect (int soundId, String filePath, int startPos)
 
abstract int playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish)
 Plays the specified local or online audio effect file. More...
 
abstract int playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos)
 Plays the specified local or online audio effect file. More...
 
abstract int playAllEffects (int loopCount, double pitch, double pan, double gain, boolean publish)
 
abstract int getVolumeOfEffect (int soundId)
 Gets the volume of a specified audio effect file. More...
 
abstract int setVolumeOfEffect (int soundId, double volume)
 Gets the volume of a specified audio effect file. More...
 
abstract int pauseEffect (int soundId)
 Pauses a specified audio effect file. More...
 
abstract int pauseAllEffects ()
 Pauses all audio effects. More...
 
abstract int resumeEffect (int soundId)
 Resumes playing a specified audio effect. More...
 
abstract int resumeAllEffects ()
 Resumes playing all audio effect files. More...
 
abstract int stopEffect (int soundId)
 Stops playing a specified audio effect. More...
 
abstract int stopAllEffects ()
 Stops playing all audio effects. More...
 
abstract int unloadEffect (int soundId)
 Releases a specified preloaded audio effect from the memory. More...
 
abstract int unloadAllEffects ()
 
abstract int getEffectDuration (String filePath)
 Retrieves the duration of the audio effect file. More...
 
abstract int setEffectPosition (int soundId, int pos)
 Sets the playback position of an audio effect file. More...
 
abstract int getEffectCurrentPosition (int soundId)
 Retrieves the playback position of the audio effect file. More...
 
abstract int registerVideoEncodedFrameObserver (IVideoEncodedFrameObserver receiver)
 Registers a receiver object for the encoded video image. More...
 
abstract int registerFaceInfoObserver (IFaceInfoObserver receiver)
 Registers or unregisters a facial information observer. More...
 
abstract int takeSnapshot (int uid, String filePath)
 Takes a snapshot of a video stream. More...
 
abstract int takeSnapshot (int uid, SnapshotConfig config)
 Takes a screenshot of the video at the specified observation point. More...
 
abstract int enableContentInspect (boolean enabled, ContentInspectConfig config)
 Enables or disables video screenshot and upload. More...
 
abstract int loadExtensionProvider (String path)
 
abstract int registerExtension (String provider, String extension, Constants.MediaSourceType sourceType)
 Registers an extension. More...
 
abstract int enableExtension (String provider, String extension, boolean enable)
 
abstract int enableExtension (String provider, String extension, boolean enable, Constants.MediaSourceType sourceType)
 Enables or disables extensions. More...
 
abstract int setExtensionProperty (String provider, String extension, String key, String value)
 Sets the properties of the extension. More...
 
abstract int setExtensionProperty (String provider, String extension, String key, String value, Constants.MediaSourceType sourceType)
 
abstract String getExtensionProperty (String provider, String extension, String key)
 Gets detailed information on the extensions. More...
 
abstract String getExtensionProperty (String provider, String extension, String key, Constants.MediaSourceType sourceType)
 Gets detailed information on the extensions. More...
 
abstract int setExtensionProviderProperty (String provider, String key, String value)
 Sets the properties of the extension provider. More...
 
abstract int enableExtension (String provider, String extension, ExtensionInfo extensionInfo, boolean enable)
 
abstract int setExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key, String value)
 
abstract String getExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key)
 
abstract int startScreenCapture (ScreenCaptureParameters screenCaptureParameters)
 Starts screen capture. More...
 
abstract int setExternalMediaProjection (MediaProjection mediaProjection)
 Configures MediaProjection outside of the SDK to capture screen video streams. More...
 
abstract int setScreenCaptureScenario (Constants.ScreenScenarioType screenScenario)
 Sets the screen sharing scenario. More...
 
abstract int stopScreenCapture ()
 Stops screen capture. More...
 
abstract int setVideoScenario (Constants.VideoScenario scenarioType)
 Sets video application scenarios. More...
 
abstract int setVideoQoEPreference (Constants.QoEPreference qoePreference)
 
abstract int updateScreenCaptureParameters (ScreenCaptureParameters screenCaptureParameters)
 Updates the screen capturing parameters. More...
 
abstract int registerVideoFrameObserver (IVideoFrameObserver observer)
 Registers a raw video frame observer object. More...
 
abstract IMediaPlayer createMediaPlayer ()
 Creates a media player object. More...
 
abstract AgoraMediaRecorder createMediaRecorder (RecorderStreamInfo info)
 Creates a recorder for audio and video. More...
 
abstract void destroyMediaRecorder (AgoraMediaRecorder mediaRecorder)
 Destroys the audio and video recording object. More...
 
abstract IMediaPlayerCacheManager getMediaPlayerCacheManager ()
 Gets one IMediaPlayerCacheManager instance. More...
 
abstract IH265Transcoder getH265Transcoder ()
 
abstract int enableExternalAudioSourceLocalPlayback (boolean enabled)
 
abstract int adjustCustomAudioPublishVolume (int trackId, int volume)
 Adjusts the volume of the custom audio track played remotely. More...
 
abstract int adjustCustomAudioPlayoutVolume (int trackId, int volume)
 Adjusts the volume of the custom audio track played locally. More...
 
abstract int startRhythmPlayer (String sound1, String sound2, AgoraRhythmPlayerConfig config)
 Enables the virtual metronome. More...
 
abstract int stopRhythmPlayer ()
 Disables the virtual metronome. More...
 
abstract int configRhythmPlayer (AgoraRhythmPlayerConfig config)
 Configures the virtual metronome. More...
 
abstract int setDirectCdnStreamingAudioConfiguration (int profile)
 Sets the audio profile of the audio streams directly pushed to the CDN by the host. More...
 
abstract int setDirectCdnStreamingVideoConfiguration (VideoEncoderConfiguration config)
 Sets the video profile of the media streams directly pushed to the CDN by the host. More...
 
abstract long getCurrentMonotonicTimeInMs ()
 Gets the current Monotonic Time of the SDK. More...
 
abstract int startDirectCdnStreaming (IDirectCdnStreamingEventHandler eventHandler, String publishUrl, DirectCdnStreamingMediaOptions options)
 Starts pushing media streams to the CDN directly. More...
 
abstract int stopDirectCdnStreaming ()
 Stops pushing media streams to the CDN directly. More...
 
abstract int updateDirectCdnStreamingMediaOptions (DirectCdnStreamingMediaOptions options)
 
abstract int createCustomVideoTrack ()
 Creates a custom video track. More...
 
abstract int createCustomEncodedVideoTrack (EncodedVideoTrackOptions encodedOpt)
 
abstract int destroyCustomVideoTrack (int video_track_id)
 Destroys the specified video track. More...
 
abstract int destroyCustomEncodedVideoTrack (int video_track_id)
 
abstract int setCloudProxy (int proxyType)
 Sets up cloud proxy service. More...
 
abstract int setLocalAccessPoint (LocalAccessPointConfiguration config)
 Configures the connection to the Agora private media server access module. More...
 
abstract int enableCustomAudioLocalPlayback (int trackId, boolean enabled)
 Sets whether to enable the local playback of external audio source. More...
 
abstract int setAdvancedAudioOptions (AdvancedAudioOptions options)
 Sets audio advanced options. More...
 
abstract int setAVSyncSource (String channelId, int uid)
 Sets audio-video synchronization on the publishing side. More...
 
abstract int enableVideoImageSource (boolean enabled, ImageTrackOptions options)
 Sets whether to replace the current video feeds with images when publishing video streams. More...
 
abstract int getNetworkType ()
 Gets the type of the local network connection. More...
 
abstract long getNtpWallTimeInMs ()
 Gets the current NTP (Network Time Protocol) time. More...
 
abstract int startMediaRenderingTracing ()
 Enables tracing the video frame rendering process. More...
 
abstract int enableInstantMediaRendering ()
 Enables audio and video frame instant rendering. More...
 
abstract int setupAudioAttributes (AudioAttributes attr)
 
abstract boolean isFeatureAvailableOnDevice (int type)
 Checks whether the device supports the specified advanced feature. More...
 
abstract int sendAudioMetadata (byte[] metadata)
 Send audio metadata. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from io.agora.rtc2.RtcEngine
static synchronized RtcEngine create (Context context, String appId, IRtcEngineEventHandler handler) throws Exception
 Creates and initializes RtcEngine. More...
 
static synchronized RtcEngine create (RtcEngineConfig config) throws Exception
 Creates and initializes RtcEngine. More...
 
static synchronized void destroy ()
 Releases the RtcEngine instance. More...
 
static synchronized void destroy (@Nullable IRtcEngineReleaseCallback callback)
 Destroys the RtcEngine instance and releases related resources. More...
 
static int getRecommendedEncoderType ()
 
static String getSdkVersion ()
 Gets the SDK version. More...
 
static String getMediaEngineVersion ()
 
static String getErrorDescription (int error)
 Gets the warning or error description. More...
 
- Static Protected Attributes inherited from io.agora.rtc2.RtcEngine
static RtcEngineImpl mInstance = null
 

Member Function Documentation

◆ muteLocalAudioStreamEx()

abstract int io.agora.rtc2.RtcEngineEx.muteLocalAudioStreamEx ( boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes publishing the local audio stream.

A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client.

Note
This method does not affect any ongoing audio recording, because it does not disable the audio capture device.
Parameters
mutedWhether to stop publishing the local audio stream:
  • true: Stops publishing the local audio stream.
  • false: (Default) Resumes publishing the local audio stream.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteLocalVideoStreamEx()

abstract int io.agora.rtc2.RtcEngineEx.muteLocalVideoStreamEx ( boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes publishing the local video stream.

A successful call of this method triggers the onUserMuteVideo callback on the remote client.

Note
This method does not affect any ongoing video recording, because it does not disable the camera.
Parameters
mutedWhether to stop publishing the local video stream.
  • true: Stop publishing the local video stream.
  • false: (Default) Publish the local video stream.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteAudioStreamsEx()

abstract int io.agora.rtc2.RtcEngineEx.muteAllRemoteAudioStreamsEx ( boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes subscribing to the audio streams of all remote users.

After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.

Note
  • Call this method after joining a channel.
  • If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel(String token, String channelId, int uid, ChannelMediaOptions options).
Parameters
mutedWhether to stop subscribing to the audio streams of all remote users:
  • true: Stops subscribing to the audio streams of all remote users.
  • false: (Default) Subscribes to the audio streams of all remote users by default.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteVideoStreamsEx()

abstract int io.agora.rtc2.RtcEngineEx.muteAllRemoteVideoStreamsEx ( boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes subscribing to the video streams of all remote users.

After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users.

Parameters
mutedWhether to stop subscribing to the video streams of all remote users.
  • true: Stop subscribing to the video streams of all remote users.
  • false: (Default) Subscribe to the video streams of all remote users by default.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteRemoteAudioStreamEx()

abstract int io.agora.rtc2.RtcEngineEx.muteRemoteAudioStreamEx ( int  uid,
boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes receiving the audio stream of a specified user.

This method is used to stops or resumes receiving the audio stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.

Parameters
uidThe ID of the specified user.
mutedWhether to stop receiving the audio stream of the specified user:
  • true: Stop receiving the audio stream of the specified user.
  • false: (Default) Resume receiving the audio stream of the specified user.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteRemoteVideoStreamEx()

abstract int io.agora.rtc2.RtcEngineEx.muteRemoteVideoStreamEx ( int  uid,
boolean  muted,
RtcConnection  connection 
)
abstract

Stops or resumes receiving the video stream of a specified user.

This method is used to stop or resume receiving the video stream of a specified user. You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.

Parameters
uidThe user ID of the remote user.
mutedWhether to stop receiving the video stream of the specified user:
  • true: Stop receiving the video stream of the specified user.
  • false: (Default) Resume receiving the video stream of the specified user.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoStreamTypeEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.setRemoteVideoStreamTypeEx ( int  uid,
Constants.VideoStreamType  streamType,
RtcConnection  connection 
)
abstract

Sets the video stream type to subscribe to.

Depending on the default behavior of the sender and the specific settings when calling setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig), the scenarios for the receiver calling this method are as follows:

  • The SDK enables low-quality video stream adaptive mode ( AUTO_SIMULCAST_STREAM ) on the sender side by default, meaning only the high-quality video stream is transmitted. Only the receiver with the role of the **host**can call this method to initiate a low-quality video stream request. Once the sender receives the request, it starts automatically sending the low-quality video stream. At this point, all users in the channel can call this method to switch to low-quality video stream subscription mode.
  • If the sender calls setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig) and sets mode to DISABLE_SIMULCAST_STREAM (never send low-quality video stream), then calling this method will have no effect.
  • If the sender calls setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig) and sets mode to ENABLE_SIMULCAST_STREAM (always send low-quality video stream), both the host and audience receivers can call this method to switch to low-quality video stream subscription mode. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream.
Note
If the publisher has already called setDualStreamModeEx and set mode to DISABLE_SIMULCAST_STREAM (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamModeEx again on the sending end and adjust the settings.
Parameters
uidThe user ID.
streamTypeThe video stream type, see VideoStreamType.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoStreamTypeEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.setRemoteVideoStreamTypeEx ( int  uid,
int  streamType,
RtcConnection  connection 
)
abstract

Sets the video stream type to subscribe to.

Depending on the default behavior of the sender and the specific settings when calling setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig), the scenarios for the receiver calling this method are as follows:

  • The SDK enables low-quality video stream adaptive mode ( AUTO_SIMULCAST_STREAM ) on the sender side by default, meaning only the high-quality video stream is transmitted. Only the receiver with the role of the **host**can call this method to initiate a low-quality video stream request. Once the sender receives the request, it starts automatically sending the low-quality video stream. At this point, all users in the channel can call this method to switch to low-quality video stream subscription mode.
  • If the sender calls setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig) and sets mode to DISABLE_SIMULCAST_STREAM (never send low-quality video stream), then calling this method will have no effect.
  • If the sender calls setDualStreamMode(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig) and sets mode to ENABLE_SIMULCAST_STREAM (always send low-quality video stream), both the host and audience receivers can call this method to switch to low-quality video stream subscription mode. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream.
Note
If the publisher has already called setDualStreamModeEx and set mode to DISABLE_SIMULCAST_STREAM (never send low-quality video stream), calling this method will not take effect, you should call setDualStreamModeEx again on the sending end and adjust the settings.
Parameters
uidThe user ID.
streamTypeThe video stream type:
  • 0: High-quality video stream.
  • 1: Low-quality video stream.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setHighPriorityUserListEx()

abstract int io.agora.rtc2.RtcEngineEx.setHighPriorityUserListEx ( int[]  uidList,
int  option,
RtcConnection  connection 
)
abstract

Sets the high priority user list and related fallback option for the remotely subscribed video stream based on the network conditions in NASA2.

Parameters
uidListThe id list of high priority users.
optionThe remote subscribe fallback option of high priority users.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioBlocklistEx()

abstract int io.agora.rtc2.RtcEngineEx.setSubscribeAudioBlocklistEx ( int[]  uidList,
RtcConnection  connection 
)
abstract

Sets the blocklist of subscriptions for audio streams.

You can call this method to specify the audio streams of a user that you do not want to subscribe to.

Note
  • You can call this method either before or after joining a channel.
  • The blocklist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams, and autoSubscribeAudio in ChannelMediaOptions.
  • Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
  • If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
Parameters
uidListThe user ID list of users that you do not want to subscribe to. If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioAllowlistEx()

abstract int io.agora.rtc2.RtcEngineEx.setSubscribeAudioAllowlistEx ( int[]  uidList,
RtcConnection  connection 
)
abstract

Sets the allowlist of subscriptions for audio streams.

You can call this method to specify the audio streams of a user that you want to subscribe to.

Note
  • You can call this method either before or after joining a channel.
  • The allowlist is not affected by the setting in muteRemoteAudioStream, muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions.
  • Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
  • If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
Parameters
uidListThe user ID list of users that you want to subscribe to. If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoBlocklistEx()

abstract int io.agora.rtc2.RtcEngineEx.setSubscribeVideoBlocklistEx ( int[]  uidList,
RtcConnection  connection 
)
abstract

Sets the blocklist of subscriptions for video streams.

You can call this method to specify the video streams of a user that you do not want to subscribe to.

Note
  • You can call this method either before or after joining a channel.
  • The blocklist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
  • Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
  • If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
Parameters
uidListThe user ID list of users that you do not want to subscribe to. If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoAllowlistEx()

abstract int io.agora.rtc2.RtcEngineEx.setSubscribeVideoAllowlistEx ( int[]  uidList,
RtcConnection  connection 
)
abstract

Sets the allowlist of subscriptions for video streams.

You can call this method to specify the video streams of a user that you want to subscribe to.

Note
  • You can call this method either before or after joining a channel.
  • The allowlist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.
  • Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.
  • If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.
Parameters
uidListThe user ID list of users that you want to subscribe to. If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteRenderModeEx()

abstract int io.agora.rtc2.RtcEngineEx.setRemoteRenderModeEx ( int  uid,
int  renderMode,
int  mirrorMode,
RtcConnection  connection 
)
abstract

Sets the video display mode of a specified remote user.

After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.

Note
  • Call this method after initializing the remote view by calling the setupRemoteVideo method.
  • During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
Parameters
uidThe user ID of the remote user.
renderModeThe video display mode of the remote user:
  • RENDER_MODE_HIDDEN (1): Hidden mode. Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
  • RENDER_MODE_FIT (2): Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio are filled with black.
  • RENDER_MODE_ADAPTIVE (3): Adaptive mode. Deprecated: This enumerator is deprecated and not recommended for use.
mirrorModeThe mirror mode of the remote user view:
  • VIDEO_MIRROR_MODE_AUTO (0): The SDK determines whether to enable the mirror mode. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
  • VIDEO_MIRROR_MODE_ENABLED (1): Enable the mirroring mode of the local view.
  • VIDEO_MIRROR_MODE_DISABLED (2): Disable the mirroring mode of the local view.
connectionThe connection information. See RtcConnection.
Returns
  • < 0: Failure.

◆ setupRemoteVideoEx()

abstract int io.agora.rtc2.RtcEngineEx.setupRemoteVideoEx ( VideoCanvas  remote,
RtcConnection  connection 
)
abstract

Initializes the video view of a remote user.

This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. The application specifies the uid of the remote video in the VideoCanvas method before the remote user joins the channel. If the remote uid is unknown to the application, set it after the application receives the onUserJoined callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user.

Note
  • Call this method after joinChannelEx.
  • To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderModeEx method.
Parameters
remoteThe remote video view settings. See VideoCanvas.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoEncoderConfigurationEx()

abstract int io.agora.rtc2.RtcEngineEx.setVideoEncoderConfigurationEx ( VideoEncoderConfiguration  config,
RtcConnection  connection 
)
abstract

Sets the video encoder configuration.

Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. Call timing: Call this method after joinChannelEx.

Note
The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found.
Parameters
configVideo profile. See VideoEncoderConfiguration.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateChannelMediaOptionsEx()

abstract int io.agora.rtc2.RtcEngineEx.updateChannelMediaOptionsEx ( ChannelMediaOptions  options,
RtcConnection  connection 
)
abstract

Updates the channel media options after joining the channel.

Parameters
optionsThe channel media options. See ChannelMediaOptions.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The value of a member in ChannelMediaOptions is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.
    • -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method.
    • -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. If you receive the CONNECTION_STATE_DISCONNECTED (1) or CONNECTION_STATE_FAILED (5) state, the user is not in the channel. You need to call joinChannel(String token, String channelId, int uid, ChannelMediaOptions options) to join a channel before calling this method.

◆ joinChannelEx()

abstract int io.agora.rtc2.RtcEngineEx.joinChannelEx ( String  token,
RtcConnection  connection,
ChannelMediaOptions  options,
IRtcEngineEventHandler  eventHandler 
)
abstract

Joins a channel.

You can call this method multiple times to join more than one channel. If you want to join the same channel from different devices, ensure that the user IDs are different for all devices. Applicable scenarios: This method can be called in scenarios involving multiple channels. Call timing: Call this method after create(RtcEngineConfig config). In a multi-camera capture scenario, you need to call the startPreview(Constants.VideoSourceType sourceType) method after calling this method to set the sourceType to VIDEO_SOURCE_CAMERA_SECONDARY, to ensure that the second camera captures normally. Related callbacks: A successful call of this method triggers the following callbacks:

  • The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.
  • The remote client: The onUserJoined callback, if a user joining the channel in the COMMUNICATION profile, or a host joining a channel in the LIVE_BROADCASTING profile. When the connection between the local client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.
Note
If you are already in a channel, you cannot rejoin the channel with the same user ID. Before joining a channel, ensure that the App ID you use to generate a token is the same as that you pass in the create(RtcEngineConfig config) method; otherwise, you may fail to join the channel with the token.
Parameters
tokenThe token generated on your server for authentication.Note:
  • (Recommended) If your project has enabled the security mode (using APP ID and Token for authentication), this parameter is required.
  • If you have only enabled the testing mode (using APP ID for authentication), this parameter is optional. You will automatically exit the channel 24 hours after successfully joining in.
  • If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. See Secure authentication with tokens.
connectionThe connection information. See RtcConnection.
optionsThe channel media options. See ChannelMediaOptions.
eventHandlerThe callback class of RtcEngineEx. See IRtcEngineEventHandler. You can get the callback events of multiple channels through the eventHandler object passed in this parameter.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
    • -3: Fails to initialize the RtcEngine object. You need to reinitialize the RtcEngine object.
    • -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method.
    • -8: The internal state of the RtcEngine object is wrong. The typical cause is that after calling startEchoTest to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.
    • -17: The request to join the channel is rejected. The typical cause is that the user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED (1) state.
    • -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
    • -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.

◆ leaveChannelEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.leaveChannelEx ( RtcConnection  connection)
abstract

Leaves a channel.

After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After calling joinChannelEx to join a channel, you must call this method or leaveChannelEx(RtcConnection connection, LeaveChannelOptions options) to end the call, otherwise, the next call cannot be started. Applicable scenarios: This method can be called in scenarios involving multiple channels. Call timing: Call this method after joinChannelEx. Related callbacks: A successful call of this method triggers the following callbacks:

  • The local client: The onLeaveChannel callback will be triggered.
  • The remote client: The onUserOffline callback will be triggered after the remote host leaves the channel.
Note
If you call destroy() immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
  • This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel.
  • If you call leaveChannel() or leaveChannel(LeaveChannelOptions options), you will leave all the channels you have joined by calling joinChannel(String token, String channelId, String optionalInfo, int uid), joinChannel(String token, String channelId, int uid, ChannelMediaOptions options), or joinChannelEx.
Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ leaveChannelEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.leaveChannelEx ( RtcConnection  connection,
LeaveChannelOptions  options 
)
abstract

Sets channel options and leaves the channel.

After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After calling joinChannelEx to join a channel, you must call this method or leaveChannelEx(RtcConnection connection) to end the call, otherwise, the next call cannot be started. Applicable scenarios: This method can be called in scenarios involving multiple channels. Call timing: Call this method after joinChannelEx. Related callbacks: A successful call of this method triggers the following callbacks:

  • The local client: The onLeaveChannel callback will be triggered.
  • The remote client: The onUserOffline callback will be triggered after the remote host leaves the channel.
Note
If you call destroy() immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.
  • This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel.
  • If you call leaveChannel() or leaveChannel(LeaveChannelOptions options), you will leave all the channels you have joined by calling joinChannel(String token, String channelId, String optionalInfo, int uid), joinChannel(String token, String channelId, int uid, ChannelMediaOptions options), or joinChannelEx.
Parameters
connectionThe connection information. See RtcConnection.
optionsSince v4.1.0 The options for leaving the channel. See LeaveChannelOptions. Note: This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect.
Returns
  • 0: Success.
  • < 0: Failure.

◆ leaveChannelWithUserAccountEx()

abstract int io.agora.rtc2.RtcEngineEx.leaveChannelWithUserAccountEx ( String  channelId,
String  userAccount,
LeaveChannelOptions  options 
)
abstract

Leaves a channel with the channel ID and user account and sets the options for leaving.

Parameters
channelIdThe channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • All numeric characters: 0 to 9.
  • The space character.
  • Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
userAccountThe user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • All numeric characters: 0 to 9.
  • The space character.
  • Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
optionsThe options for leaving the channel. See {LeaveChannelOptions}. 0: Success.< 0: Failure.

◆ enableDualStreamModeEx()

abstract int io.agora.rtc2.RtcEngineEx.enableDualStreamModeEx ( boolean  enabled,
SimulcastStreamConfig  streamConfig,
RtcConnection  connection 
)
abstract

Enables or disables dual-stream mode on the sender side.

Deprecated:
v4.2.0. This method is deprecated. Use setDualStreamModeEx instead.

You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:

  • High-quality video stream: High bitrate, high resolution.
  • Low-quality video stream: Low bitrate, low resolution. After you enable dual-stream mode, you can call setRemoteVideoStreamType(int uid, int streamType) to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.
Note
This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams.
Parameters
enabledWhether to enable dual-stream mode:
  • true: Enable dual-stream mode.
  • false: (Default) Disable dual-stream mode.
streamConfigThe configuration of the low-quality video stream. See SimulcastStreamConfig.Note: When setting mode to DISABLE_SIMULCAST_STREAM, setting streamConfig will not take effect.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setDualStreamModeEx()

abstract int io.agora.rtc2.RtcEngineEx.setDualStreamModeEx ( Constants.SimulcastStreamMode  mode,
SimulcastStreamConfig  streamConfig,
RtcConnection  connection 
)
abstract

Sets the dual-stream mode on the sender side.

The SDK defaults to enabling low-quality video stream adaptive mode ( AUTO_SIMULCAST_STREAM ) on the sender side, which means the sender does not actively send low-quality video stream. The receiving end with the role of the host can initiate a low-quality video stream request by calling setRemoteVideoStreamTypeEx(int uid, int streamType, RtcConnection connection), and upon receiving the request, the sending end automatically starts sending low-quality stream.

  • If you want to modify this behavior, you can call this method and set mode to DISABLE_SIMULCAST_STREAM (never send low-quality video streams) or ENABLE_SIMULCAST_STREAM (always send low-quality video streams).
  • If you want to restore the default behavior after making changes, you can call this method again with mode set to AUTO_SIMULCAST_STREAM.
Note
The difference and connection between this method and enableDualStreamModeEx is as follows:
  • When calling this method and setting mode to DISABLE_SIMULCAST_STREAM, it has the same effect as enableDualStreamModeEx (false).
  • When calling this method and setting mode to ENABLE_SIMULCAST_STREAM, it has the same effect as enableDualStreamModeEx (true).
  • Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence.
Parameters
modeThe mode in which the video stream is sent. See SimulcastStreamMode.
streamConfigThe configuration of the low-quality video stream. See SimulcastStreamConfig.Note: When setting mode to DISABLE_SIMULCAST_STREAM, setting streamConfig will not take effect.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSimulcastConfigEx()

abstract int io.agora.rtc2.RtcEngineEx.setSimulcastConfigEx ( SimulcastConfig  simulcastConfig,
RtcConnection  connection 
)
abstract

Sets the simulcast video stream configuration.

Since
v4.6.0

This method can be called in scenarios involving multiple channels. You can call the setSimulcastConfig method to set video streams with different resolutions for the same video source. The subscribers can call to select which stream layer to receive. The broadcaster can publish up to four layers of video streams: one main stream (highest resolution) and three additional streams of different quality levels. setRemoteVideoStreamType(int uid, int streamType) Applicable scenarios: This method can be called in scenarios involving multiple channels.

Parameters
simulcastConfigThis configuration includes seven layers, from STREAM_LAYER_1 to STREAM_LOW, with a maximum of three layers enabled simultaneously. See SimulcastConfig.
connectionConnection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getConnectionStateEx()

abstract int io.agora.rtc2.RtcEngineEx.getConnectionStateEx ( RtcConnection  connection)
abstract

Gets the current connection state of the SDK.

Call timing: This method can be called either before or after joining the channel.

Parameters
connectionThe connection information. See RtcConnection.
Returns
The current connection state.

◆ sendCustomReportMessageEx()

abstract int io.agora.rtc2.RtcEngineEx.sendCustomReportMessageEx ( String  id,
String  category,
String  event,
String  label,
int  value,
RtcConnection  connection 
)
abstract

Agora supports reporting and analyzing customized messages.

Agora supports reporting and analyzing customized messages. This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes and each string not exceeding 100 bytes. To try out this function, contact support@agora.io and discuss the format of customized messages with us.

◆ sendStreamMessageEx()

abstract int io.agora.rtc2.RtcEngineEx.sendStreamMessageEx ( int  streamId,
byte[]  message,
RtcConnection  connection 
)
abstract

Sends data stream messages.

After calling createDataStreamEx(DataStreamConfig config, RtcConnection connection), you can call this method to send data stream messages to all users in the channel. The SDK has the following restrictions on this method:

  • Each client within the channel can have up to 5 data channels simultaneously, with a total shared packet bitrate limit of 30 KB/s for all data channels.
  • Each data channel can send up to 60 packets per second, with each packet being a maximum of 1 KB. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client.
Note
  • If you need a more comprehensive solution for low-latency, high-concurrency, and scalable real-time messaging and status synchronization, it is recommended to use Signaling.
  • Call this method after joinChannelEx.
  • Ensure that you call createDataStreamEx(DataStreamConfig config, RtcConnection connection) to create a data channel before calling this method.
Parameters
streamIdThe data stream ID. You can get the data stream ID by calling createDataStreamEx(DataStreamConfig config, RtcConnection connection)
messageThe message to be sent.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ sendRdtMessageEx()

abstract int io.agora.rtc2.RtcEngineEx.sendRdtMessageEx ( int  uid,
int  type,
byte[]  message,
RtcConnection  connection 
)
abstract

Send Reliable message to remote uid in channel.

@technical preview

Parameters
uidremote user id.
typeReliable Data Transmission tunnel message type.
messageThe sent data.
connectionConnection ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ sendMediaControlMessageEx()

abstract int io.agora.rtc2.RtcEngineEx.sendMediaControlMessageEx ( int  uid,
byte[]  message,
RtcConnection  connection 
)
abstract

Send media control message.

@technical preview

Parameters
uidremote user id. In particular, if the uid is set to 0, it means broadcasting the message to the entire channel.
messageThe sent data, max 1024 Bytes.
connectionConnection ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ createDataStreamEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.createDataStreamEx ( boolean  reliable,
boolean  ordered,
RtcConnection  connection 
)
abstract

Creates a data stream.

You can call this method to create a data stream and improve the reliability and ordering of data transmission. Call timing: Call this method after joinChannelEx. Related callbacks: After setting reliable to true, if the recipient does not receive the data within five seconds, the SDK triggers the onStreamMessageError callback and returns an error code.

Note
Each user can create up to five data streams during the lifecycle of RtcEngine. The data stream will be destroyed when leaving the channel, and the data stream needs to be recreated if needed.
Parameters
reliableSets whether the recipients are guaranteed to receive the data stream within five seconds:
  • true: The recipients receive the data from the sender within five seconds. If the recipient does not receive the data within five seconds, the SDK triggers the onStreamMessageError callback and returns an error code.
  • false: There is no guarantee that the recipients receive the data stream within five seconds and no error message is reported for any delay or missing data stream. Attention: Please ensure that reliable and ordered are either both set totrue or both set to false.
orderedSets whether the recipients receive the data stream in the sent order:
  • true: The recipients receive the data in the sent order.
  • false: The recipients do not receive the data in the sent order.
connectionThe connection information. See RtcConnection.
Returns
  • ID of the created data stream, if the method call succeeds.
  • < 0: Failure.

◆ createDataStreamEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.createDataStreamEx ( DataStreamConfig  config,
RtcConnection  connection 
)
abstract

Creates a data stream.

Compared to createDataStreamEx(boolean reliable, boolean ordered, RtcConnection connection), this method does not guarantee the reliability of data transmission. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. Call timing: Call this method after joinChannelEx.

Note
Each user can create up to five data streams during the lifecycle of RtcEngine. The data stream will be destroyed when leaving the channel, and the data stream needs to be recreated if needed. If you need a more comprehensive solution for low-latency, high-concurrency, and scalable real-time messaging and status synchronization, it is recommended to use Signaling.
Parameters
configThe configurations for the data stream. See DataStreamConfig.
connectionThe connection information. See RtcConnection.
Returns
  • ID of the created data stream, if the method call succeeds.
  • < 0: Failure.

◆ joinChannelWithUserAccountEx()

abstract int io.agora.rtc2.RtcEngineEx.joinChannelWithUserAccountEx ( String  token,
String  channelId,
String  userAccount,
ChannelMediaOptions  options,
IRtcEngineEventHandler  eventHandler 
)
abstract

Join a channel using a user account and token, and set the media options.

Before calling this method, if you have not called registerLocalUserAccount to register a user account, when you call this method to join a channel, the SDK automatically creates a user account for you. Calling the registerLocalUserAccount method to register a user account, and then calling this method to join a channel can shorten the time it takes to enter the channel. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billings. If you want to stop subscribing to the media stream of other users, you can set the options parameter or call the corresponding mute method. Call timing: Call this method after create(RtcEngineConfig config). Related callbacks: After the user successfully joins the channel, the SDK triggers the following callbacks:

  • The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks.
  • The remote client: The onUserJoined and onUserInfoUpdated callbacks if a user joins the channel in the COMMUNICATION profile, or if a host joins the channel in the LIVE_BROADCASTING profile.
Note
  • This method only supports users joining one channel at a time.
  • Users with different App IDs cannot call each other.
  • Before joining a channel, ensure that the App ID you use to generate a token is the same as that you pass in the create(RtcEngineConfig config) method; otherwise, you may fail to join the channel with the token. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a UID, then ensure all the other users use the UID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.
Parameters
tokenThe token generated on your server for authentication.Note:
  • (Recommended) If your project has enabled the security mode (using APP ID and Token for authentication), this parameter is required.
  • If you have only enabled the testing mode (using APP ID for authentication), this parameter is optional. You will automatically exit the channel 24 hours after successfully joining in.
  • If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. See Secure authentication with tokens.
channelIdThe channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total):
  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • All numeric characters: 0 to 9.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
userAccountThe user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as NULL. Supported characters are as follows(89 in total):
  • The 26 lowercase English letters: a to z.
  • The 26 uppercase English letters: A to Z.
  • All numeric characters: 0 to 9.
  • Space
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
optionsThe channel media options. See ChannelMediaOptions.
eventHandlerThe callback class of RtcEngineEx. See IRtcEngineEventHandler. You can get the callback events of multiple channels through the eventHandler object passed in this parameter.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.
    • -3: Fails to initialize the RtcEngine object. You need to reinitialize the RtcEngine object.
    • -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method.
    • -8: The internal state of the RtcEngine object is wrong. The typical cause is that after calling startEchoTest to start a call loop test, you call this method to join the channel without calling stopEchoTest to stop the test. You need to call stopEchoTest before calling this method.
    • -17: The request to join the channel is rejected. The typical cause is that the user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to see whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED (1) state.
    • -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
    • -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.

◆ getUserInfoByUserAccountEx()

abstract int io.agora.rtc2.RtcEngineEx.getUserInfoByUserAccountEx ( String  userAccount,
UserInfo  userInfo,
RtcConnection  connection 
)
abstract

Gets the user information by passing in the user account.

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, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and pass in the UID to get the user account of the specified user from the UserInfo object.

Parameters
userAccountThe user account.
userInfoThe UserInfo object that identifies the user information.
  • Input value: A UserInfo object.
  • Output: A UserInfo object that contains the user account and user ID of the user.
connectionThe connection information. See RtcConnection.
Returns
  • A UserInfo object, if the method call succeeds.
  • NULL, if the method call fails.

◆ getUserInfoByUidEx()

abstract int io.agora.rtc2.RtcEngineEx.getUserInfoByUidEx ( int  uid,
UserInfo  userInfo,
RtcConnection  connection 
)
abstract

Gets the user information by passing in the user ID.

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, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and pass in the UID to get the user account of the specified user from the UserInfo object.

Parameters
uidThe user ID.
userInfoThe UserInfo object that identifies the user information.
  • Input value: A UserInfo object.
  • Output: A UserInfo object that contains the user account and user ID of the user.
connectionThe connection information. See RtcConnection.
Returns
  • A UserInfo object, if the method call succeeds.
  • NULL, if the method call fails.

◆ adjustRecordingSignalVolumeEx()

abstract int io.agora.rtc2.RtcEngineEx.adjustRecordingSignalVolumeEx ( int  volume,
RtcConnection  connection 
)
abstract

Adjusts the recording volume.

Parameters
volumeThe recording volume, which ranges from 0 to 400:
  • 0 : Mute the recording volume.
  • 100: The original volume.
  • 400: (Maximum) Four times the original volume with signal clipping protection.
connectionThe RtcConnection object.
Returns
  • 0 : Success.
  • < 0: Failure.

◆ muteRecordingSignalEx()

abstract int io.agora.rtc2.RtcEngineEx.muteRecordingSignalEx ( boolean  muted,
RtcConnection  connection 
)
abstract

Mute or resume recording signal volume.

Parameters
mutedDetermines whether to mute or resume the recording signal volume.
  • true: Mute the recording signal volume.
  • false: (Default) Resume the recording signal volume.
connectionThe RtcConnection object.
Returns
  • 0 : Success.
  • < 0: Failure.

◆ adjustUserPlaybackSignalVolumeEx()

abstract int io.agora.rtc2.RtcEngineEx.adjustUserPlaybackSignalVolumeEx ( int  uid,
int  volume,
RtcConnection  connection 
)
abstract

Adjusts the playback signal volume of a specified remote user.

You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user. Call timing: Call this method after joinChannelEx.

Parameters
uidThe user ID of the remote user.
volumeThe volume of the user. The value range is [0,400].
  • 0: Mute.
  • 100: (Default) The original volume.
  • 400: Four times the original volume (amplifying the audio signals by four times).
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVoicePositionEx()

abstract int io.agora.rtc2.RtcEngineEx.setRemoteVoicePositionEx ( int  uid,
double  pan,
double  gain,
RtcConnection  connection 
)
abstract

Sets the 2D position (the position on the horizontal plane) of the remote user's voice.

This method sets the voice position and volume of a remote user. When the local user calls this method to set the voice position of a remote user, the voice difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a sense of space. This method applies to massive multiplayer online games, such as Battle Royale games.

Note
  • For the best voice positioning, Agora recommends using a wired headset.
  • Call this method after joining a channel.
Parameters
uidThe user ID of the remote user.
panThe voice position of the remote user. The value ranges from -1.0 to 1.0:
  • -1.0: The remote voice comes from the left.
  • 0.0: (Default) The remote voice comes from the front.
  • 1.0: The remote voice comes from the right.
gainThe volume of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original volume of the remote user). The smaller the value, the lower the volume.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoSubscriptionOptionsEx()

abstract int io.agora.rtc2.RtcEngineEx.setRemoteVideoSubscriptionOptionsEx ( int  uid,
VideoSubscriptionOptions  options,
RtcConnection  rtcConnection 
)
abstract

Sets options for subscribing to remote video streams.

When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user.

Parameters
uidThe user ID of the remote user.
optionsThe video subscription options. See VideoSubscriptionOptions.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteUserSpatialAudioParamsEx()

abstract int io.agora.rtc2.RtcEngineEx.setRemoteUserSpatialAudioParamsEx ( int  uid,
SpatialAudioParams  params,
RtcConnection  connection 
)
abstract

Sets the 3D sound position of a remote user.

Note
  • For this method to work, enable stereo panning for remote users by calling the enableSoundPositionIndication method before joining a channel.
  • This method requires hardware support. For the best sound positioning, we recommend using a wired headset.
  • Ensure that you call this method after joining a channel.
Parameters
uidThe ID of the remote user.
azimuth
elevation
distance
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ addVideoWatermarkEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.addVideoWatermarkEx ( String  watermarkUrl,
WatermarkOptions  options,
RtcConnection  connection 
)
abstract

Adds a watermark image to the local video.

Since
v2.9.1
Deprecated:
From v4.6.0. We recommend using the {addVideoWatermark}2 method instead.

This method adds a PNG watermark image to the local video in the live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the capturing device can see and capture it. The Agora SDK supports adding only one watermark image onto a live video stream. The newly added watermark image replaces the previous one. The watermark coordinates are dependent on the settings in the setVideoEncoderConfigurationEx method:

  • If the orientation mode of the encoding video ( ORIENTATION_MODE ) is fixed landscape mode or the adaptive landscape mode, the watermark uses the landscape orientation.
  • If the orientation mode of the encoding video ( ORIENTATION_MODE ) is fixed portrait mode or the adaptive portrait mode, the watermark uses the portrait orientation.
  • When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfigurationEx method; otherwise, the watermark image will be cropped.
Note
  • Ensure that you have called enableVideo before calling this method.
  • This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.
  • If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.
  • If you have enabled the local video preview by calling the startPreview(Constants.VideoSourceType sourceType) method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview.
  • If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
Parameters
watermarkUrlThe local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
optionsThe options of the watermark image to be added. See WatermarkOptions.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ addVideoWatermarkEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.addVideoWatermarkEx ( WatermarkConfig  config,
RtcConnection  connection 
)
abstract

Adds a watermark image to the local video.

Since
v4.6.0

Applicable scenarios: This method applies to multi-channel scenarios.

Parameters
configWatermark configuration. See WatermarkConfig.
connectionRtcConnection object. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ removeVideoWatermarkEx()

abstract int io.agora.rtc2.RtcEngineEx.removeVideoWatermarkEx ( String  id,
RtcConnection  connection 
)
abstract

Removes the specified watermark image from the local or remote video stream.

Since
v4.6.0

Applicable scenarios: This method applies to multi-channel scenarios.

Parameters
idID of the watermark image to be removed.
connectionParameters used to control different connection instances. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ clearVideoWatermarkEx()

abstract int io.agora.rtc2.RtcEngineEx.clearVideoWatermarkEx ( RtcConnection  connection)
abstract

Removes the watermark image from the video stream.

Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ enableAudioVolumeIndicationEx()

abstract int io.agora.rtc2.RtcEngineEx.enableAudioVolumeIndicationEx ( int  interval,
int  smooth,
boolean  reportVad,
RtcConnection  connection 
)
abstract

Enables the reporting of users' volume indication.

This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Call timing: Call this method after joinChannelEx. Related callbacks: The SDK triggers the onAudioVolumeIndication callback according to the interval you set if this method is successfully called and there are users publishing streams in the channel.

Parameters
intervalSets the time interval between two consecutive volume indications:
  • ≤ 0: Disables the volume indication.
  • > 0: Time interval (ms) between two consecutive volume indications. Ensure this parameter is set to a value greater than 10, otherwise you will not receive the onAudioVolumeIndication callback. Agora recommends that this value is set as greater than 100.
smoothThe smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator.
reportVad- true: Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.
  • false: (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ takeSnapshotEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.takeSnapshotEx ( RtcConnection  connection,
int  uid,
String  filePath 
)
abstract

Takes a snapshot of a video stream using connection ID.

This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. Call timing: Call this method after joinChannelEx. Related callbacks: After a successful call of this method, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.

Note
  • The method is asynchronous, and the SDK has not taken the snapshot when the method call returns.
  • When used for local video snapshots, this method takes a snapshot for the video streams specified in ChannelMediaOptions.
  • If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
Parameters
connectionThe connection information. See RtcConnection.
uidThe user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
filePathThe local path (including filename extensions) of the snapshot. For example:
  • Android: /storage/emulated/0/Android/data/<package name>/files/example.jpg Attention: Ensure that the path you specify exists and is writable.
Returns
  • 0: Success.
  • < 0: Failure.

◆ takeSnapshotEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.takeSnapshotEx ( RtcConnection  connection,
int  uid,
SnapshotConfig  config 
)
abstract

Gets a video screenshot of the specified observation point using the connection ID.

This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. Call timing: Call this method after joinChannelEx. Related callbacks: After a successful call of this method, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.

Note
  • The method is asynchronous, and the SDK has not taken the snapshot when the method call returns.
  • When used for local video snapshots, this method takes a snapshot for the video streams specified in ChannelMediaOptions.
  • If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
Parameters
connectionThe connection information. See RtcConnection.
uidThe user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
configThe configuration of the snaptshot. See SnapshotConfig.
Returns
  • 0: Success.
  • < 0: Failure.

◆ enableContentInspectEx()

abstract int io.agora.rtc2.RtcEngineEx.enableContentInspectEx ( boolean  enabled,
ContentInspectConfig  config,
RtcConnection  connection 
)
abstract

Enables or disables video screenshot and upload.

This method can take screenshots for multiple video streams and upload them. When video screenshot and upload function is enabled, the SDK takes screenshots and uploads videos sent by local users based on the type and frequency of the module you set in ContentInspectConfig. After video screenshot and upload, the Agora server sends the callback notification to your app server in HTTPS requests and sends all screenshots to the third-party cloud storage service. Call timing: This method can be called either before or after joining the channel.

Note
Before calling this method, ensure that you have contacted technical support to activate the video screenshot upload service.
Parameters
enabledWhether to enalbe video screenshot and upload:
  • true: Enables video screenshot and upload.
  • false: Disables video screenshot and upload.
configScreenshot and upload configuration. See ContentInspectConfig.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startRtmpStreamWithoutTranscodingEx()

abstract int io.agora.rtc2.RtcEngineEx.startRtmpStreamWithoutTranscodingEx ( String  url,
RtcConnection  connection 
)
abstract

Starts pushing media streams to a CDN without transcoding.

Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.

Note
  • Call this method after joining a channel.
  • Only hosts in the LIVE_BROADCASTING profile can call this method.
  • If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
Parameters
urlThe address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The URL or configuration of transcoding is invalid; check your URL and transcoding configurations.
    • -7: The SDK is not initialized before calling this method.
    • -19: The Media Push URL is already in use; use another URL instead.

◆ startRtmpStreamWithTranscodingEx()

abstract int io.agora.rtc2.RtcEngineEx.startRtmpStreamWithTranscodingEx ( String  url,
LiveTranscoding  transcoding,
RtcConnection  connection 
)
abstract

Starts Media Push and sets the transcoding configuration.

Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.

Note
  • Ensure that you enable the Media Push service before using this function.
  • Call this method after joining a channel.
  • Only hosts in the LIVE_BROADCASTING profile can call this method.
  • If you want to retry pushing streams after a failed push, make sure to call stopRtmpStreamEx first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.
Parameters
urlThe address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
transcodingThe transcoding configuration for Media Push. See LiveTranscoding.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The URL or configuration of transcoding is invalid; check your URL and transcoding configurations.
    • -7: The SDK is not initialized before calling this method.
    • -19: The Media Push URL is already in use; use another URL instead.

◆ updateRtmpTranscodingEx()

abstract int io.agora.rtc2.RtcEngineEx.updateRtmpTranscodingEx ( LiveTranscoding  transcoding,
RtcConnection  connection 
)
abstract

Updates the transcoding configuration.

Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated.

Parameters
transcodingThe transcoding configuration for Media Push. See LiveTranscoding.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ stopRtmpStreamEx()

abstract int io.agora.rtc2.RtcEngineEx.stopRtmpStreamEx ( String  url,
RtcConnection  connection 
)
abstract

Stops pushing media streams to a CDN.

Agora recommends that you use the server-side Media Push function. For details, see Use RESTful API. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming.

Parameters
urlThe address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startOrUpdateChannelMediaRelayEx()

abstract int io.agora.rtc2.RtcEngineEx.startOrUpdateChannelMediaRelayEx ( ChannelMediaRelayConfiguration  channelMediaRelayConfiguration,
RtcConnection  connection 
)
abstract

Starts relaying media streams across channels or updates channels for media relay.

Since
v4.2.0

The first successful call to this method starts relaying media streams from the source channel to the destination channels. To relay the media stream to other channels, or exit one of the current media relays, you can call this method again to update the destination channels. This feature supports relaying media streams to a maximum of six destination channels. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback, and this callback returns the state of the media stream relay. Common states are as follows:

  • If the onChannelMediaRelayStateChanged callback returns RELAY_STATE_RUNNING (2) and RELAY_OK (0), it means that the SDK starts relaying media streams from the source channel to the destination channel.
  • If the onChannelMediaRelayStateChanged callback returns RELAY_STATE_FAILURE (3), an exception occurs during the media stream relay.
Note
  • Call this method after joining the channel.
  • This method takes effect only when you are a host in a live streaming channel.
  • The relaying media streams across channels function needs to be enabled by contacting technical support.
  • Agora does not support string user accounts in this API.
Parameters
channelMediaRelayConfigurationThe configuration of the media stream relay. See ChannelMediaRelayConfiguration.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -1: A general error occurs (no specified reason).
    • -2: The parameter is invalid.
    • -8: Internal state error. Probably because the user is not a broadcaster.

◆ stopChannelMediaRelayEx()

abstract int io.agora.rtc2.RtcEngineEx.stopChannelMediaRelayEx ( RtcConnection  connection)
abstract

Stops the media stream relay. Once the relay stops, the host quits all the target channels.

After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports RELAY_STATE_IDLE (0) and RELAY_OK (0), the host successfully stops the relay.

Note
If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the RELAY_ERROR_SERVER_NO_RESPONSE (2) or RELAY_ERROR_SERVER_CONNECTION_LOST (8) status code. You can call the leaveChannel(LeaveChannelOptions options) method to leave the channel, and the media stream relay automatically stops.
Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -5: The method call was rejected. There is no ongoing channel media relay.

◆ pauseAllChannelMediaRelayEx()

abstract int io.agora.rtc2.RtcEngineEx.pauseAllChannelMediaRelayEx ( RtcConnection  connection)
abstract

Pauses the media stream relay to all target channels.

Deprecated:
This method is deprecated from v4.2.0. Use startOrUpdateChannelMediaRelayEx instead.

After the cross-channel media stream relay starts, you can call this method to pause relaying media streams to all target channels; after the pause, if you want to resume the relay, call resumeAllChannelMediaRelay.

Note
Call this method after startOrUpdateChannelMediaRelayEx.
Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -5: The method call was rejected. There is no ongoing channel media relay.

◆ resumeAllChannelMediaRelayEx()

abstract int io.agora.rtc2.RtcEngineEx.resumeAllChannelMediaRelayEx ( RtcConnection  connection)
abstract

Resumes the media stream relay to all target channels.

After calling the pauseAllChannelMediaRelayEx method, you can call this method to resume relaying media streams to all destination channels.

Note
Call this method after pauseAllChannelMediaRelayEx.
Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.
    • -5: The method call was rejected. There is no paused channel media relay.

◆ startMediaRenderingTracingEx()

abstract int io.agora.rtc2.RtcEngineEx.startMediaRenderingTracingEx ( RtcConnection  connection)
abstract

Enables tracing the video frame rendering process.

Since
v4.1.1

The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback. Applicable scenarios: Agora recommends that you use this method in conjunction with the UI settings (such as buttons and sliders) in your app to improve the user experience. For example, call this method when the user clicks the Join Channel button, and then get the time spent during the video frame rendering process through the onVideoRenderingTracingResult callback, so as to optimize the indicators accordingly.

Note
  • If you have not called this method, the SDK tracks the rendering events of the video frames from the moment you call joinChannel(String token, String channelId, int uid, ChannelMediaOptions options) to join the channel. You can call this method at an appropriate time according to the actual application scenario to set the starting position for tracking video rendering events.
  • After the local user leaves the current channel, the SDK automatically tracks the video rendering events from the moment you join a channel.
Parameters
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setParametersEx()

abstract int io.agora.rtc2.RtcEngineEx.setParametersEx ( String  parameters,
RtcConnection  connection 
)
abstract

Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.

The JSON options are not public by default. Agora is working on making commonly used JSON options public in a standard way.

Parameters
parametersParameter to be set as a JSON string in the specified format.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • <0: Failure.

◆ getCallIdEx()

abstract String io.agora.rtc2.RtcEngineEx.getCallIdEx ( RtcConnection  connection)
abstract

Gets the call ID with the connection ID.

When a user joins a channel on a client, a callId is generated to identify the call from the client. You can call this method to get callId, and pass it in when calling methods such as rate and complain. Call timing: Call this method after joining a channel.

Parameters
connectionThe connection information. See RtcConnection.

◆ addHandlerEx()

abstract void io.agora.rtc2.RtcEngineEx.addHandlerEx ( IRtcEngineEventHandler  handler,
RtcConnection  connection 
)
abstract

Adds the IRtcEngineEventHandler.

Parameters
handlerThe IRtcEngineEventHandler instance.
connectionRtcConnection is used to control different connection instances.

◆ removeHandlerEx()

abstract void io.agora.rtc2.RtcEngineEx.removeHandlerEx ( IRtcEngineEventHandler  handler,
RtcConnection  connection 
)
abstract

Removes the IRtcEngineEventHandler.

Parameters
handlerThe IRtcEngineEventHandler instance.
connectionRtcConnection is used to control different connection instances.

◆ enableEncryptionEx()

abstract int io.agora.rtc2.RtcEngineEx.enableEncryptionEx ( boolean  enabled,
EncryptionConfig  config,
RtcConnection  connection 
)
abstract

Enables or disables the built-in encryption.

After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. Applicable scenarios: Scenarios with higher security requirements. Call timing: Call this method before joining a channel.

Note
  • All users within the same channel must set the same encryption configurations when calling this method.
  • If you enable the built-in encryption, you cannot use the Media Push function.
Parameters
enabledWhether to enable built-in encryption:
  • true: Enable the built-in encryption.
  • false: (Default) Disable the built-in encryption.
configBuilt-in encryption configurations. See EncryptionConfig.
connectionThe connection information. See RtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ sendAudioMetadataEx()

abstract int io.agora.rtc2.RtcEngineEx.sendAudioMetadataEx ( byte[]  metadata,
RtcConnection  connection 
)
abstract

Send audio metadata.

Since
v4.3.1
Parameters
metadataAudio Metadata.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure. @technical preview

◆ preloadEffectEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.preloadEffectEx ( RtcConnection  connection,
int  soundId,
String  filePath 
)
abstract

Preloads a specified sound effect to the channel.

Since
v4.6.0

Each time you call this method, you can only preload one sound effect file into memory. If you need to preload multiple sound files, please call this method multiple times. After preloading is complete, you can call playEffect(int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos) to play the preloaded sound effects, or call playAllEffects to play all preloaded sound effects. Applicable scenarios: This method can be called in scenarios involving multiple channels.

Note
  • To ensure a smooth experience, the size of sound effect files should not exceed the limit.
  • Agora recommends that you call this method before joining a channel.
  • If preloadEffectEx is called before playEffectEx is executed, the file resource will not be closed after playEffectEx. The next time playEffectEx is executed, it will directly seek to play at the beginning.
  • If preloadEffectEx is not called before playEffectEx is executed, the resource will be destroyed after playEffectEx. The next time playEffectEx is executed, it will try to reopen the file and play it from the beginning.
Parameters
connectionConnection information. See RtcConnection.
soundIdThe audio effect ID.
filePathThe absolute path of the local file or the URL of the online file. Supported audio formats include: mp3, mp4, m4a, aac, 3gp, mkv and wav.
Returns
  • 0: Success.
  • < 0: Failure.

◆ preloadEffectEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.preloadEffectEx ( RtcConnection  connection,
int  soundId,
String  filePath,
int  startPos 
)
abstract

Preloads a specified sound effect to a channel.

Since
v4.6.0

Each time you call this method, you can only preload one sound effect file into memory. If you need to preload multiple sound files, please call this method multiple times. After preloading is complete, you can call playEffect(int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos) to play the preloaded sound effects, or call playAllEffects to play all preloaded sound effects. Applicable scenarios: This method can be called in scenarios involving multiple channels.

Note
  • To ensure a smooth experience, the size of sound effect files should not exceed the limit.
  • Agora recommends that you call this method before joining a channel.
  • If preloadEffectEx is called before playEffectEx is executed, the file resource will not be closed after playEffectEx. The next time playEffectEx is executed, it will directly seek to play at the beginning.
  • If preloadEffectEx is not called before playEffectEx is executed, the resource will be destroyed after playEffectEx. The next time playEffectEx is executed, it will try to reopen the file and play it from the beginning.
Parameters
connectionConnection information. See RtcConnection.
soundIdThe audio effect ID.
filePathThe absolute path of the local file or the URL of the online file. Supported audio formats include: mp3, mp4, m4a, aac, 3gp, mkv and wav.
startPosThe playback position (ms) of the audio effect file.
Returns
  • 0: Success.
  • < 0: Failure.

◆ playEffectEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.playEffectEx ( RtcConnection  connection,
int  soundId,
String  filePath,
int  loopCount,
double  pitch,
double  pan,
double  gain,
boolean  publish 
)
abstract

Plays a specified sound effect in the channel.

Since
v4.6.0

This method allows you to set whether to publish sound effects in a channel. In order to play multiple sound files simultaneously, simply call the method multiple times with different soundId and filePath parameters. After calling preloadEffect to preload the sound effect, you can call this method to play the specified sound effect to all users in the channel. Each call to this method can only play one sound effect. To play multiple sound effects simultaneously, please call this method multiple times. Applicable scenarios: This method can be called in scenarios involving multiple channels.

Note
  • Agora recommends not playing more than three sound effects at the same time.
  • The sound effect ID and file path in this method must be consistent with those in the preloadEffectEx method.
  • If preloadEffectEx is called before playEffectEx is executed, the file resource will not be closed after playEffectEx. The next time playEffectEx is executed, it will directly seek to play at the beginning.
  • If preloadEffectEx is not called before playEffectEx is executed, the resource will be destroyed after playEffectEx. The next time playEffectEx is executed, it will try to reopen the file and play it from the beginning.
Parameters
connectionConnection information. See RtcConnection.
soundIdThe audio effect ID.
filePathThe absolute path of the local file or the URL of the online file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav.
loopCountNumber of times the sound effect to be looped:
  • -1: Loop infinitely until calling stopEffect or stopAllEffects.
  • 0: Play once.
  • 1: Play twice.
pitchThe pitch of the audio effect. The range is from 0.5 to 2.0, with a default value of 1.0 (original pitch). The lower the value, the lower the pitch.
panThe spatial position of the audio effect. The range of values is from -1.0 to 1.0:
  • -1.0: The audio effect is heard on the left of the user.
  • 0.0: The audio effect is heard in front of the user.
  • 1.0: The audio effect is heard on the right of the user.
gainThe volume of the audio effect. The value range is from 0.0 to 100.0, with a default value of 100 (original volume). The smaller the value, the lower the volume.
publishWhether to publish the audio effect in the channel:
  • true: Publish the audio effect in the channel.
  • false: Do not publish the audio effect in the channel.
Returns
  • 0: Success.
  • < 0: Failure.

◆ playEffectEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.playEffectEx ( RtcConnection  connection,
int  soundId,
String  filePath,
int  loopCount,
double  pitch,
double  pan,
double  gain,
boolean  publish,
int  startPos 
)
abstract

Plays a specified sound effect in a channel.

Since
v4.6.0

You can call this method to play a specified sound effect to all users in the channel. Each call to this method can only play one sound effect. To play multiple sound effects simultaneously, please call this method multiple times. This method allows you to set whether to publish sound effects in a channel. In order to play multiple sound files simultaneously, simply call the method multiple times with different soundId and filePath parameters. Applicable scenarios: This method can be called in scenarios involving multiple channels.

Note
  • Agora recommends not playing more than three sound effects at the same time.
  • The sound effect ID and file path in this method must be consistent with those in the preloadEffectEx method.
  • If preloadEffectEx is called before playEffectEx is executed, the file resource will not be closed after playEffectEx. The next time playEffectEx is executed, it will directly seek to play at the beginning.
  • If preloadEffectEx is not called before playEffectEx is executed, the resource will be destroyed after playEffectEx. The next time playEffectEx is executed, it will try to reopen the file and play it from the beginning.
Parameters
connectionConnection information. See RtcConnection.
soundIdThe audio effect ID.
filePathThe absolute path of the local file or the URL of the online file. Supported audio formats include: mp3, mp4, m4a, aac, 3gp, mkv and wav.
loopCountNumber of times the sound effect to be looped:
  • -1: Loop infinitely until calling stopEffect or stopAllEffects.
  • 0: Play once.
  • 1: Play twice.
pitchThe pitch of the audio effect. The range is from 0.5 to 2.0, with a default value of 1.0 (original pitch). The lower the value, the lower the pitch.
panThe spatial position of the audio effect. The range of values is from -1.0 to 1.0:
  • -1.0: The audio effect is heard on the left of the user.
  • 0.0: The audio effect is heard in front of the user.
  • 1.0: The audio effect is heard on the right of the user.
gainThe volume of the audio effect. The value range is from 0.0 to 100.0, with a default value of 100 (original volume). The smaller the value, the lower the volume.
publishWhether to publish the audio effect in the channel:
  • true: Publish the audio effect in the channel.
  • false: Do not publish the audio effect in the channel.
startPosThe playback position (ms) of the audio effect file.
Returns
  • 0: Success.
  • < 0: Failure.