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)
 
abstract int muteLocalVideoStreamEx (boolean muted, RtcConnection connection)
 
abstract int muteAllRemoteAudioStreamsEx (boolean muted, RtcConnection connection)
 
abstract int muteAllRemoteVideoStreamsEx (boolean muted, RtcConnection connection)
 
abstract int muteRemoteAudioStreamEx (int uid, boolean muted, RtcConnection connection)
 
abstract int muteRemoteVideoStreamEx (int uid, boolean muted, RtcConnection connection)
 
abstract int setRemoteVideoStreamTypeEx (int uid, int streamType, RtcConnection connection)
 
abstract int setSubscribeAudioBlacklistEx (int[] uidList, RtcConnection connection)
 
abstract int setSubscribeAudioWhitelistEx (int[] uidList, RtcConnection connection)
 
abstract int setSubscribeVideoBlacklistEx (int[] uidList, RtcConnection connection)
 
abstract int setSubscribeVideoWhitelistEx (int[] uidList, RtcConnection connection)
 
abstract int setRemoteRenderModeEx (int uid, int renderMode, int mirrorMode, RtcConnection connection)
 
abstract int setupRemoteVideoEx (VideoCanvas remote, RtcConnection connection)
 
abstract int setVideoEncoderConfigurationEx (VideoEncoderConfiguration config, RtcConnection connection)
 
abstract int updateChannelMediaOptionsEx (ChannelMediaOptions options, RtcConnection connection)
 
abstract int joinChannelEx (String token, RtcConnection connection, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler)
 
abstract int leaveChannelEx (RtcConnection connection)
 
abstract int pushExternalVideoFrameEx (VideoFrame frame, int videoTrackId)
 
abstract int pushExternalVideoFrameEx (AgoraVideoFrame frame, int videoTrackId)
 
abstract int enableDualStreamModeEx (boolean enabled, SimulcastStreamConfig streamConfig, RtcConnection connection)
 
abstract int setDualStreamModeEx (Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig, RtcConnection connection)
 
abstract int pushExternalEncodedVideoFrameEx (ByteBuffer data, EncodedVideoFrameInfo frameInfo, int videoTrackId)
 
abstract int getConnectionStateEx (RtcConnection connection)
 
abstract int sendCustomReportMessageEx (String id, String category, String event, String label, int value, RtcConnection connection)
 
abstract int sendStreamMessageEx (int streamId, byte[] message, RtcConnection connection)
 
abstract int createDataStreamEx (boolean reliable, boolean ordered, RtcConnection connection)
 
abstract int createDataStreamEx (DataStreamConfig config, RtcConnection connection)
 
abstract int joinChannelWithUserAccountEx (String token, String channelId, String userAccount, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler)
 
abstract int getUserInfoByUserAccountEx (String userAccount, UserInfo userInfo, RtcConnection connection)
 
abstract int getUserInfoByUidEx (int uid, UserInfo userInfo, RtcConnection connection)
 
abstract int setRemoteVoicePositionEx (int uid, double pan, double gain, RtcConnection connection)
 
abstract int setRemoteVideoSubscriptionOptionsEx (int uid, VideoSubscriptionOptions options, RtcConnection rtcConnection)
 
abstract int setRemoteUserSpatialAudioParamsEx (int uid, SpatialAudioParams params, RtcConnection connection)
 
abstract int addVideoWatermarkEx (String watermarkUrl, WatermarkOptions options, RtcConnection connection)
 
abstract int clearVideoWatermarkEx (RtcConnection connection)
 
abstract int enableAudioVolumeIndicationEx (int interval, int smooth, boolean reportVad, RtcConnection connection)
 
abstract int takeSnapshotEx (RtcConnection connection, int uid, String filePath)
 
abstract int startRtmpStreamWithoutTranscodingEx (String url, RtcConnection connection)
 
abstract int startRtmpStreamWithTranscodingEx (String url, LiveTranscoding transcoding, RtcConnection connection)
 
abstract int updateRtmpTranscodingEx (LiveTranscoding transcoding, RtcConnection connection)
 
abstract int stopRtmpStreamEx (String url, RtcConnection connection)
 
abstract int startChannelMediaRelayEx (ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection)
 
abstract int stopChannelMediaRelayEx (RtcConnection connection)
 
abstract int updateChannelMediaRelayEx (ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection)
 
abstract int pauseAllChannelMediaRelayEx (RtcConnection connection)
 
abstract int resumeAllChannelMediaRelayEx (RtcConnection connection)
 
- Public Member Functions inherited from io.agora.rtc2.RtcEngine
abstract int setChannelProfile (int profile)
 
abstract int setClientRole (int role)
 
abstract int setClientRole (int role, ClientRoleOptions options)
 
abstract int sendCustomReportMessage (String id, String category, String event, String label, int value)
 
abstract int joinChannel (String token, String channelName, String optionalInfo, int optionalUid)
 
abstract int joinChannel (String token, String channelId, int uid, ChannelMediaOptions options)
 
abstract int leaveChannel ()
 
abstract int leaveChannel (LeaveChannelOptions options)
 
abstract int renewToken (String token)
 
abstract int registerLocalUserAccount (String appId, String userAccount)
 
abstract int joinChannelWithUserAccount (String token, String channelName, String userAccount)
 
abstract int joinChannelWithUserAccount (String token, String channelName, String userAccount, ChannelMediaOptions options)
 
abstract int getUserInfoByUserAccount (String userAccount, UserInfo userInfo)
 
abstract int getUserInfoByUid (int uid, UserInfo userInfo)
 
abstract DeviceInfo getAudioDeviceInfo ()
 
abstract int enableWebSdkInteroperability (boolean enabled)
 
abstract int getConnectionState ()
 
abstract int enableAudio ()
 
abstract int disableAudio ()
 
abstract int pauseAudio ()
 
abstract int resumeAudio ()
 
abstract int setAudioProfile (int profile)
 
abstract int setAudioProfile (int profile, int scenario)
 
abstract int setAudioScenario (int scenario)
 
abstract int setHighQualityAudioParameters (boolean fullband, boolean stereo, boolean fullBitrate)
 
abstract int adjustRecordingSignalVolume (int volume)
 
abstract int adjustPlaybackSignalVolume (int volume)
 
abstract int enableAudioVolumeIndication (int interval, int smooth, boolean reportVad)
 
abstract int enableAudioQualityIndication (boolean enabled)
 
abstract int enableLocalAudio (boolean enabled)
 
abstract int muteLocalAudioStream (boolean muted)
 
abstract int muteRemoteAudioStream (int uid, boolean muted)
 
abstract int adjustUserPlaybackSignalVolume (int uid, int volume)
 
abstract int muteAllRemoteAudioStreams (boolean muted)
 
abstract int setDefaultMuteAllRemoteAudioStreams (boolean muted)
 
abstract int enableVideo ()
 
abstract int disableVideo ()
 
abstract int setVideoProfile (int profile, boolean swapWidthAndHeight)
 
abstract int setVideoEncoderConfiguration (VideoEncoderConfiguration config)
 
abstract CodecCapInfo[] queryCodecCapability ()
 
abstract int setCameraCapturerConfiguration (CameraCapturerConfiguration config)
 
abstract int setupLocalVideo (VideoCanvas local)
 
abstract int setupRemoteVideo (VideoCanvas remote)
 
abstract int setLocalRenderMode (int renderMode)
 
abstract int setLocalRenderMode (int renderMode, int mirrorMode)
 
abstract int setRemoteRenderMode (int userId, int renderMode)
 
abstract int setRemoteRenderMode (int userId, int renderMode, int mirrorMode)
 
abstract int startPreview ()
 
abstract int startPreview (Constants.VideoSourceType sourceType)
 
abstract int stopPreview ()
 
abstract int stopPreview (Constants.VideoSourceType sourceType)
 
abstract int enableLocalVideo (boolean enabled)
 
abstract int startSecondaryCameraCapture (CameraCapturerConfiguration config)
 
abstract int stopSecondaryCameraCapture ()
 
abstract int muteLocalVideoStream (boolean muted)
 
abstract int muteRemoteVideoStream (int userId, boolean muted)
 
abstract int muteAllRemoteVideoStreams (boolean muted)
 
abstract int setDefaultMuteAllRemoteVideoStreams (boolean muted)
 
abstract int setBeautyEffectOptions (boolean enabled, BeautyOptions options)
 
abstract int setLowlightEnhanceOptions (boolean enabled, LowLightEnhanceOptions options)
 
abstract int setVideoDenoiserOptions (boolean enabled, VideoDenoiserOptions options)
 
abstract int setColorEnhanceOptions (boolean enabled, ColorEnhanceOptions options)
 
abstract int enableVirtualBackground (boolean enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty)
 
abstract int enableRemoteSuperResolution (int uid, boolean enable)
 
abstract int setDefaultAudioRoutetoSpeakerphone (boolean defaultToSpeaker)
 
abstract int setEnableSpeakerphone (boolean enabled)
 
abstract boolean isSpeakerphoneEnabled ()
 
abstract int enableInEarMonitoring (boolean enabled)
 
abstract int enableInEarMonitoring (boolean enabled, int includeAudioFilters)
 
abstract int setInEarMonitoringVolume (int volume)
 
abstract int useExternalAudioDevice ()
 
abstract int setLocalVoicePitch (double pitch)
 
abstract int setLocalVoiceEqualization (Constants.AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain)
 
abstract int setLocalVoiceReverb (Constants.AUDIO_REVERB_TYPE reverbKey, int value)
 
abstract int setHeadphoneEQPreset (int preset)
 
abstract int setHeadphoneEQParameters (int lowGain, int highGain)
 
abstract int setAudioEffectPreset (int preset)
 
abstract int setVoiceBeautifierPreset (int preset)
 
abstract int setVoiceConversionPreset (int preset)
 
abstract int setAudioEffectParameters (int preset, int param1, int param2)
 
abstract int setVoiceBeautifierParameters (int preset, int param1, int param2)
 
abstract int setVoiceConversionParameters (int preset, int param1, int param2)
 
abstract int enableSoundPositionIndication (boolean enabled)
 
abstract int setRemoteVoicePosition (int uid, double pan, double gain)
 
abstract int startAudioMixing (String filePath, boolean loopback, int cycle)
 
abstract int enableSpatialAudio (boolean enabled)
 
abstract int setRemoteUserSpatialAudioParams (int uid, SpatialAudioParams params)
 
abstract int setRemoteVideoSubscriptionOptions (int uid, VideoSubscriptionOptions options)
 
abstract int startAudioMixing (String filePath, boolean loopback, int cycle, int startPos)
 
abstract int stopAudioMixing ()
 
abstract int pauseAudioMixing ()
 
abstract int resumeAudioMixing ()
 
abstract int adjustAudioMixingVolume (int volume)
 
abstract int adjustAudioMixingPlayoutVolume (int volume)
 
abstract int adjustAudioMixingPublishVolume (int volume)
 
abstract int getAudioMixingPlayoutVolume ()
 
abstract int getAudioMixingPublishVolume ()
 
abstract int getAudioMixingDuration ()
 
abstract int getAudioMixingCurrentPosition ()
 
abstract int setAudioMixingPosition (int pos)
 
abstract int setAudioMixingDualMonoMode (Constants.AudioMixingDualMonoMode mode)
 
abstract int setAudioMixingPitch (int pitch)
 
abstract int selectAudioTrack (int audioIndex)
 
abstract int getAudioTrackCount ()
 
abstract IAudioEffectManager getAudioEffectManager ()
 
abstract int startAudioRecording (String filePath, int quality)
 
abstract int startAudioRecording (AudioRecordingConfiguration config)
 
abstract int stopAudioRecording ()
 
abstract int startEchoTest ()
 
abstract int startEchoTest (int intervalInSeconds)
 
abstract int startEchoTest (EchoTestConfiguration config)
 
abstract int stopEchoTest ()
 
abstract int startLastmileProbeTest (LastmileProbeConfig config)
 
abstract int stopLastmileProbeTest ()
 
abstract int enableEchoCancellationExternal (boolean enabled, int audioSourceDelay)
 
abstract int setExternalAudioSink (boolean enabled, int sampleRate, int channels)
 
abstract int pushCaptureAudioFrame (byte[] data)
 
abstract int pushCaptureAudioFrame (ByteBuffer data, int lengthInByte)
 
abstract int pushReverseAudioFrame (byte[] data)
 
abstract int pushReverseAudioFrame (ByteBuffer data, int lengthInByte)
 
abstract int pullPlaybackAudioFrame (byte[] data, int lengthInByte)
 
abstract int pullPlaybackAudioFrame (ByteBuffer data, int lengthInByte)
 
abstract int startRecordingDeviceTest (int indicationInterval)
 
abstract int stopRecordingDeviceTest ()
 
abstract int setExternalAudioSource (boolean enabled, int sampleRate, int channels)
 
abstract int setExternalAudioSource (boolean enabled, int sampleRate, int channels, int sourceNumber, boolean localPlayback, boolean publish)
 
abstract int setDirectExternalAudioSource (boolean enabled)
 
abstract int setDirectExternalAudioSource (boolean enabled, boolean localPlayback)
 
abstract int pushDirectAudioFrame (ByteBuffer data, long timestamp, int sampleRate, int channels)
 
abstract int pushExternalAudioFrame (byte[] data, long timestamp)
 
abstract int pushExternalAudioFrame (ByteBuffer data, long timestamp, int sourceId)
 
abstract int setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType)
 
abstract int setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType, EncodedVideoTrackOptions encodedOpt)
 
abstract boolean pushExternalVideoFrame (AgoraVideoFrame frame)
 
abstract boolean pushExternalVideoFrame (VideoFrame frame)
 
abstract int pushExternalEncodedVideoFrame (ByteBuffer data, EncodedVideoFrameInfo frameInfo)
 
abstract boolean isTextureEncodeSupported ()
 
abstract int registerAudioFrameObserver (IAudioFrameObserver observer)
 
abstract int registerAudioEncodedFrameObserver (AudioEncodedFrameObserverConfig config, IAudioEncodedFrameObserver observer)
 
abstract int setRecordingAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 
abstract int setPlaybackAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 
abstract int setMixedAudioFrameParameters (int sampleRate, int channel, int samplesPerCall)
 
abstract int setEarMonitoringAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall)
 
abstract int addVideoWatermark (AgoraImage watermark)
 
abstract int addVideoWatermark (String watermarkUrl, WatermarkOptions options)
 
abstract int clearVideoWatermarks ()
 
abstract int setRemoteUserPriority (int uid, int userPriority)
 
abstract int setLocalPublishFallbackOption (int option)
 
abstract int setRemoteSubscribeFallbackOption (int option)
 
abstract int enableDualStreamMode (boolean enabled)
 
abstract int enableDualStreamMode (boolean enabled, SimulcastStreamConfig streamConfig)
 
abstract int setDualStreamMode (Constants.SimulcastStreamMode mode)
 
abstract int setDualStreamMode (Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig)
 
abstract int setRemoteVideoStreamType (int uid, int streamType)
 
abstract int setRemoteDefaultVideoStreamType (int streamType)
 
abstract int setSubscribeAudioBlacklist (int[] uidList)
 
abstract int setSubscribeAudioWhitelist (int[] uidList)
 
abstract int setSubscribeVideoBlacklist (int[] uidList)
 
abstract int setSubscribeVideoWhitelist (int[] uidList)
 
abstract int setEncryptionSecret (String secret)
 
abstract int setEncryptionMode (String encryptionMode)
 
abstract int enableEncryption (boolean enabled, EncryptionConfig config)
 
abstract int startRtmpStreamWithoutTranscoding (String url)
 
abstract int startRtmpStreamWithTranscoding (String url, LiveTranscoding transcoding)
 
abstract int updateRtmpTranscoding (LiveTranscoding transcoding)
 
abstract int stopRtmpStream (String url)
 
abstract int createDataStream (boolean reliable, boolean ordered)
 
abstract int createDataStream (DataStreamConfig config)
 
abstract int sendStreamMessage (int streamId, byte[] message)
 
abstract int setVideoQualityParameters (boolean preferFrameRateOverImageQuality)
 
abstract int setLocalVideoMirrorMode (int mode)
 
abstract int switchCamera ()
 
abstract boolean isCameraZoomSupported ()
 
abstract boolean isCameraTorchSupported ()
 
abstract boolean isCameraFocusSupported ()
 
abstract boolean isCameraExposurePositionSupported ()
 
abstract boolean isCameraAutoFocusFaceModeSupported ()
 
abstract boolean isCameraFaceDetectSupported ()
 
abstract int setCameraZoomFactor (float factor)
 
abstract float getCameraMaxZoomFactor ()
 
abstract int setCameraFocusPositionInPreview (float positionX, float positionY)
 
abstract int setCameraExposurePosition (float positionXinView, float positionYinView)
 
abstract int enableFaceDetection (boolean enabled)
 
abstract int setCameraTorchOn (boolean isOn)
 
abstract int setCameraAutoFocusFaceModeEnabled (boolean enabled)
 
abstract String getCallId ()
 
abstract int rate (String callId, int rating, String description)
 
abstract int complain (String callId, String description)
 
abstract int setLogFile (String filePath)
 
abstract int setLogFilter (int filter)
 
abstract int setLogLevel (int level)
 
abstract int setLogFileSize (long fileSizeInKBytes)
 
abstract String uploadLogFile ()
 
abstract long getNativeHandle ()
 
abstract long getNativeMediaPlayer (int sourceId)
 
void addHandler (IRtcEngineEventHandler handler)
 
void removeHandler (IRtcEngineEventHandler handler)
 
abstract boolean enableHighPerfWifiMode (boolean enable)
 
abstract void monitorHeadsetEvent (boolean monitor)
 
abstract void monitorBluetoothHeadsetEvent (boolean monitor)
 
abstract void setPreferHeadset (boolean enabled)
 
abstract int setParameters (String parameters)
 
abstract String getParameters (String parameters)
 
abstract String getParameter (String parameter, String args)
 
abstract int registerMediaMetadataObserver (IMetadataObserver observer, int type)
 
abstract int unregisterMediaMetadataObserver (IMetadataObserver observer, int type)
 
abstract int startChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration)
 
abstract int stopChannelMediaRelay ()
 
abstract int updateChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration)
 
abstract int pauseAllChannelMediaRelay ()
 
abstract int resumeAllChannelMediaRelay ()
 
abstract int updateChannelMediaOptions (ChannelMediaOptions options)
 
abstract int muteRecordingSignal (boolean muted)
 
abstract int setPlaybackAudioFrameBeforeMixingParameters (int sampleRate, int channel)
 
abstract int enableAudioSpectrumMonitor (int intervalInMS)
 
abstract int disableAudioSpectrumMonitor ()
 
abstract int registerAudioSpectrumObserver (IAudioSpectrumObserver observer)
 
abstract int unRegisterAudioSpectrumObserver (IAudioSpectrumObserver observer)
 
abstract double getEffectsVolume ()
 
abstract int setEffectsVolume (double volume)
 
abstract int preloadEffect (int soundId, String filePath)
 
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)
 
abstract int playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos)
 
abstract int playAllEffects (int loopCount, double pitch, double pan, double gain, boolean publish)
 
abstract int getVolumeOfEffect (int soundId)
 
abstract int setVolumeOfEffect (int soundId, double volume)
 
abstract int pauseEffect (int soundId)
 
abstract int pauseAllEffects ()
 
abstract int resumeEffect (int soundId)
 
abstract int resumeAllEffects ()
 
abstract int stopEffect (int soundId)
 
abstract int stopAllEffects ()
 
abstract int unloadEffect (int soundId)
 
abstract int unloadAllEffects ()
 
abstract int getEffectDuration (String filePath)
 
abstract int setEffectPosition (int soundId, int pos)
 
abstract int getEffectCurrentPosition (int soundId)
 
abstract int registerVideoEncodedFrameObserver (IVideoEncodedFrameObserver receiver)
 
abstract int takeSnapshot (int uid, String filePath)
 
abstract int enableContentInspect (boolean enabled, ContentInspectConfig config)
 
abstract int setAudioOptionParams (String params)
 
abstract String getAudioOptionParams ()
 
abstract int setAudioSessionParams (String params)
 
abstract String getAudioSessionParams ()
 
abstract int loadExtensionProvider (String path)
 
abstract int enableExtension (String provider, String extension, boolean enable)
 
abstract int enableExtension (String provider, String extension, boolean enable, Constants.MediaSourceType sourceType)
 
abstract int enableExtension (String provider, String extension, ExtensionInfo extensionInfo, boolean enable)
 
abstract int setExtensionProperty (String provider, String extension, String key, String value)
 
abstract int setExtensionProperty (String provider, String extension, String key, String value, Constants.MediaSourceType sourceType)
 
abstract int setExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key, String value)
 
abstract String getExtensionProperty (String provider, String extension, String key)
 
abstract String getExtensionProperty (String provider, String extension, String key, Constants.MediaSourceType sourceType)
 
abstract String getExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key)
 
abstract int setExtensionProviderProperty (String provider, String key, String value)
 
abstract int startScreenCapture (ScreenCaptureParameters screenCaptureParameters)
 
abstract int stopScreenCapture ()
 
abstract int updateScreenCaptureParameters (ScreenCaptureParameters screenCaptureParameters)
 
abstract int registerVideoFrameObserver (IVideoFrameObserver observer)
 
abstract IMediaPlayer createMediaPlayer ()
 
abstract IMediaPlayerCacheManager getMediaPlayerCacheManager ()
 
abstract int enableExternalAudioSourceLocalPlayback (boolean enabled)
 
abstract int adjustCustomAudioPublishVolume (int sourceId, int volume)
 
abstract int adjustCustomAudioPlayoutVolume (int sourceId, int volume)
 
abstract int startRhythmPlayer (String sound1, String sound2, AgoraRhythmPlayerConfig config)
 
abstract int stopRhythmPlayer ()
 
abstract int configRhythmPlayer (AgoraRhythmPlayerConfig config)
 
abstract int setDirectCdnStreamingAudioConfiguration (int profile)
 
abstract int setDirectCdnStreamingVideoConfiguration (VideoEncoderConfiguration config)
 
abstract long getCurrentMonotonicTimeInMs ()
 
abstract int startDirectCdnStreaming (IDirectCdnStreamingEventHandler eventHandler, String publishUrl, DirectCdnStreamingMediaOptions options)
 
abstract int stopDirectCdnStreaming ()
 
abstract int updateDirectCdnStreamingMediaOptions (DirectCdnStreamingMediaOptions options)
 
abstract int createCustomVideoTrack ()
 
abstract int createCustomEncodedVideoTrack (EncodedVideoTrackOptions encodedOpt)
 
abstract int destroyCustomVideoTrack (int video_track_id)
 
abstract int destroyCustomEncodedVideoTrack (int video_track_id)
 
abstract int setCloudProxy (int proxyType)
 
abstract int setLocalAccessPoint (LocalAccessPointConfiguration config)
 
abstract int enableCustomAudioLocalPlayback (int sourceId, boolean enabled)
 
abstract int SetAdvancedAudioOptions (AdvancedAudioOptions options)
 
abstract int setAVSyncSource (String channelId, int uid)
 
abstract int enableVideoImageSource (boolean enabled, ImageTrackOptions options)
 
abstract int enableWirelessAccelerate (boolean enabled)
 
abstract int getNetworkType ()
 
abstract long getNtpTimeInMs ()
 

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
 
static synchronized RtcEngine create (RtcEngineConfig config) throws Exception
 
static synchronized void destroy ()
 
static SurfaceView CreateRendererView (Context context)
 
static TextureView CreateTextureView (Context context)
 
static int getRecommendedEncoderType ()
 
static String getSdkVersion ()
 
static String getMediaEngineVersion ()
 
static String getErrorDescription (int error)
 
- 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 sending the local audio stream with connection.

Parameters
muteDetermines whether to send or stop sending the local audio stream:
  • true: Stop sending the local audio stream.
  • false: Send the local audio stream.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteLocalVideoStreamEx()

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

Stops or resumes sending the local video stream with connection.

Parameters
muteDetermines whether to send or stop sending the local video stream:
  • true: Stop sending the local video stream.
  • false: Send the local video stream.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteAudioStreamsEx()

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

Stops or resumes receiving all remote audio stream with connection.

Parameters
muteWhether to stop receiving remote audio streams:
  • true: Stop receiving any remote audio stream.
  • false: Resume receiving all remote audio streams.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteVideoStreamsEx()

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

Stops or resumes receiving all remote video stream with connection.

Parameters
muteWhether to stop receiving remote audio streams:
  • true: Stop receiving any remote audio stream.
  • false: Resume receiving all remote audio streams.
connectionRtcConnection is used to control different connection instances.
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 with specified connection.

Note
Once you leave the channel, the settings in this method becomes invalid.
Parameters
uidID of the specified remote user.
muteDetermines whether to receive or stop receiving the specified audio stream:
  • true: Stop receiving the specified audio stream.
  • false: (Default) Receive the specified audio stream.
connectionRtcConnection is used to control different connection instances.
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 with specified connection.

Note
Once you leave the channel, the settings in this method becomes invalid.
Parameters
uidID of the specified remote user.
mutedDetermines whether to receive or stop receiving a specified video stream:
  • true: Stop receiving the specified video stream.
  • false: (Default) Receive the specified video stream.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoStreamTypeEx()

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

Sets the remote video stream type.

If the remote user has enabled the dual-stream mode, by default the SDK receives the high-stream video by Call this method to switch to the low-stream video.

Note
This method applies to scenarios where the remote user has enabled the dual-stream mode using enableDualStreamMode(true) before joining the channel.
Parameters
uidID of the remote user sending the video stream.
streamTypeSets the video stream type:
  • 0: High-stream video.
  • 1: Low-stream video.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioBlacklistEx()

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

Sets the blacklist of subscribe remote stream audio.

Parameters
uidListThe id list of users who do not subscribe to audio.
connectionRtcConnection is used to control different connection instances.
Note
If uid is in uidList, the remote user's audio will not be subscribed, even if muteRemoteAudioStream(uid, false) and muteAllRemoteAudioStreams(false) are operated.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioWhitelistEx()

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

Sets the whitelist of subscribe remote stream audio.

Parameters
uidListThe id list of users who do subscribe to audio.
connectionRtcConnection is used to control different connection instances.
Note
If uid is in uidList, the remote user's audio will be subscribed, even if muteRemoteAudioStream(uid, true) and muteAllRemoteAudioStreams(true) are operated.

If a user is in the blacklist and whitelist at the same time, the user will not subscribe to audio.

Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoBlacklistEx()

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

Sets the blacklist of subscribe remote stream video.

Parameters
uidListThe id list of users who do not subscribe to video.
connectionRtcConnection is used to control different connection instances.
Note
If uid is in uidList, the remote user's video will not be subscribed, even if muteRemoteVideoStream(uid, false) and muteAllRemoteVideoStreams(false) are operated.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoWhitelistEx()

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

Sets the whitelist of subscribe remote stream video.

Parameters
uidListThe id list of users who do subscribe to video.
connectionRtcConnection is used to control different connection instances.
Note
If uid is in uidList, the remote user's video will be subscribed, even if muteRemoteVideoStream(uid, true) and muteAllRemoteVideoStreams(true) are operated.

If a user is in the blacklist and whitelist at the same time, the user will not subscribe to video.

Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteRenderModeEx()

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

Updates the display mode of the video view of a remote user with the specified connection.

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
  • Ensure that you have called setupRemoteVideo to initialize the remote video view before calling this 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
uidID of the remote user.
renderModeSets the remote display mode:
  • RENDER_MODE_HIDDEN(1): Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
  • RENDER_MODE_FIT(2): Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio will be filled with black.
mirrorModeSets the remote video mirror mode:
  • VIDEO_MIRROR_MODE_ENABLED(1): Enable the mirror mode.
  • VIDEO_MIRROR_MODE_DISABLED(2): Disable the mirror mode.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setupRemoteVideoEx()

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

Initializes the video view of a remote user with a specified connection ID.

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.

Usually the app should specify the uid of the remote video in the method call before the remote user joins the channel. If the remote uid is unknown to the app, set it later when the app receives the onUserJoined callback.

To unbind the remote user from the view, set view in VideoCanvas as null.

Note
Ensure that you call this method in the UI thread.
Parameters
remoteThe remote video view settings: VideoCanvas.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoEncoderConfigurationEx()

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

Sets the video encoder configuration with specified connection.

Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.

The parameters specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the parameters further down the list are considered until a successful configuration is found.

Parameters
configThe local video encoder configuration: VideoEncoderConfiguration.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateChannelMediaOptionsEx()

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

Updates the media options after joining the channel with specified connection.

Parameters
optionsThe channel media options: ChannelMediaOptions.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ joinChannelEx()

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

Joins a channel with the connection ID.

You can call this method multiple times to join more than one channels at a time.

Parameters
tokenThe token for authentication:
  • In situations not requiring high security: You can use the temporary token generated at Console. For details, see Get a temporary token.
  • In situations requiring high security: Set it as the token generated at your server. For details, see Get a token.
connectionRtcConnection is used to control different connection instances
  • when you join the same channel multiple times
optionsThe channel media options: ChannelMediaOptions.
eventHandlerThe pointer to the IRtcEngine event handler: IRtcEngineEventHandler.
Returns
  • 0: Success.
  • < 0: Failure.

◆ leaveChannelEx()

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

Leaves the channel with the specified connection ID.

Parameters
connectionRtcConnection is used to control different connection instances
  • when you join the same channel multiple times
Returns
  • 0: Success.
  • < 0: Failure.

◆ pushExternalVideoFrameEx() [1/2]

abstract int io.agora.rtc2.RtcEngineEx.pushExternalVideoFrameEx ( VideoFrame  frame,
int  videoTrackId 
)
abstract

Pushes the external video frame to the app.

Note
Ensure that you call setExternalVideoSource before calling this method.
Parameters
frameThe external video frame: VideoFrame.
videoTrackIdThe id of the video track.
Returns
  • 0: Success.
  • < 0: Failure.

◆ pushExternalVideoFrameEx() [2/2]

abstract int io.agora.rtc2.RtcEngineEx.pushExternalVideoFrameEx ( AgoraVideoFrame  frame,
int  videoTrackId 
)
abstract

Pushes the external video frame to the app with specified connection.

Note
Ensure that you call setExternalVideoSource before calling this method.
Parameters
frameThe external video frame: ExternalVideoFrame.
videoTrackIdThe id of the video track.
Returns
  • 0: Success, which means that the external video frame is pushed successfully.
  • < 0: Failure, which means that the external video frame fails to be pushed.

◆ enableDualStreamModeEx()

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

Enables or disables the dual video stream mode.

If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.

Parameters
enabled
  • true: Enable the dual-stream mode.
  • false: (default) Disable the dual-stream mode.
streamConfig
  • The minor stream config
connection
  • An output parameter which is used to control different connection instances.

◆ setDualStreamModeEx()

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

Enables, disables or auto enable the dual video stream mode.

If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.

Parameters
mode
  • The dual-stream mode
streamConfig
  • The minor stream config

◆ pushExternalEncodedVideoFrameEx()

abstract int io.agora.rtc2.RtcEngineEx.pushExternalEncodedVideoFrameEx ( ByteBuffer  data,
EncodedVideoFrameInfo  frameInfo,
int  videoTrackId 
)
abstract

Pushes the encoded external video frame to the app with specified connection.

Note
Ensure that you call setExternalVideoSource before calling this method.
Parameters
dataThe encoded external video data, which must be the direct buffer.
frameInfoThe encoded external video frame info: {EncodedVideoFrameInfo}. videoTrackId The id of the video track. 0: Success, which means that the encoded external video frame is pushed successfully.< 0: Failure, which means that the encoded external video frame fails to be pushed.

◆ getConnectionStateEx()

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

Gets the connection state of the SDK.

Parameters
connectionRtcConnection is used to control different connection instances.
Returns
The connection state:

◆ sendCustomReportMessageEx()

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

Report custom event to argus.

Parameters
idCustom Event ID
categoryCustom Event category
eventCustom Event to report
labelCustom Event label
valueCustom Event value
connectionThe connection ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ sendStreamMessageEx()

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

Sends data stream messages to all users in a channel.

Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 kB. The API controls the data channel transfer rate. Each client can send up to 6 kB of data per second. Each user can have up to five data channels simultaneously.

Parameters
streamIdStream ID
messageData to be sent.
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.

Each user can only have up to five data channels at the same time.

Parameters
reliable
  • True: The recipients will receive data from the sender within 5 seconds. If the recipient does not receive the sent data within 5 seconds, the data channel will report an error to the application.
  • False: The recipients will not receive any data, and it will not report any error upon data missing.
ordered
  • True: The recipients will receive data in the order of the sender.
  • False: The recipients will not receive data in the order of the sender.
Returns
  • > 0: the Stream ID when the data stream is created.
  • < 0: an error code when it fails to create the data srteam.

◆ createDataStreamEx() [2/2]

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

Creates a data stream.

Each user can create up to five data streams during the lifecycle of the RtcEngine.

Parameters
configThe config of data stream.
Returns

◆ joinChannelWithUserAccountEx()

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

Joins the channel with a user account.

After the user successfully joins the channel, the SDK triggers the following callbacks:

  • The local client: onLocalUserRegistered and onJoinChannelSuccess . The remote client: onUserJoined and onUserInfoUpdated , if the user joining the channel is in the COMMUNICATION profile, or is a host in the LIVE_BROADCASTING profile.
Note
To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
Parameters
tokenThe token generated at your server:
  • For low-security requirements: You can use the temporary token generated at Console. For details, see Get a temporary toke.
  • For high-security requirements: Set it as the token generated at your server. For details, see Get a token.
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 channel media options: ChannelMediaOptions
Returns
  • 0: Success.
  • < 0: Failure.
    • #ERR_INVALID_ARGUMENT (-2)
    • #ERR_NOT_READY (-3)
    • #ERR_REFUSED (-5)

◆ 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 user ID and user account of the remote user, caches them in a mapping table object (userInfo), and triggers the onUserInfoUpdated callback on the local client.

After receiving the oonUserInfoUpdated callback, you can call this method to get the user ID of the remote user from the userInfo object by passing in the user account.

Parameters
userAccountThe user account of the user. Ensure that you set this parameter.
userInfoA userInfo object that identifies the user
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ 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 user ID and user account of the remote user, caches them in a mapping table object (userInfo), and triggers the onUserInfoUpdated callback on the local client.

After receiving the onUserInfoUpdated callback, you can call this method to get the user account of the remote user from the userInfo object by passing in the user ID.

Parameters
uidThe user ID of the remote user. Ensure that you set this parameter.
userInfoA userInfo object that identifies the user
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVoicePositionEx()

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

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

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.
panThe sound position of the remote user. The value ranges from -1.0 to 1.0:
  • 0.0: the remote sound comes from the front.
  • -1.0: the remote sound comes from the left.
  • 1.0: the remote sound comes from the right.
gainGain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain.
connectionRtcConnection is used to control different connection instances.
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()

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 to replace addVideoWatermark1.

This method adds a PNG watermark image to the local video stream in a live streaming. Once the watermark image is added, all the audience in the channel (CDN audience included), and the sampling device can see and capture it.

Agora supports adding only one watermark image onto the local video, and the newly watermark image replaces the previous one.

The watermark position depends on the settings in the {setVideoEncoderConfiguration} method:If the orientation mode of the encoding video is ORIENTATION_MODE_FIXED_LANDSCAPE, or the landscape mode in ORIENTATION_MODE_ADAPTIVE, the watermark uses the landscape orientation.If the orientation mode of the encoding video is ORIENTATION_MODE_FIXED_PORTRAIT, or the portrait mode in ORIENTATION_MODE_ADAPTIVE, the watermark uses the portrait orientation.When setting the watermark position, the region must be less than the dimensions set in the setVideoEncoderConfiguration method. Otherwise, the watermark image will be cropped. Ensure that you have called the RtcEngine#enableVideo enableVideo} method to enable the video module before calling this method.If you only want to add a watermark image to the local video for the audience in the CDN live streaming channel to see and capture, you can call this method or the { RtcEngine#setLiveTranscoding setLiveTranscoding} 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 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 RtcEngine#startPreview startPreview} method, you can use the visibleInPreview member in the WatermarkOptions class to set whether or not the watermark is visible in 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. watermarkUrl The local file path of the watermark image to be added. This method supports adding a watermark image from either the local file path or the assets file path. If you use the assets file path, you need to start with /assets/ when filling in this parameter. options The options of the watermark image to be added. See { io.agora.rtc.video.WatermarkOptions Watermark Options}. connection RtcConnection} is used to control different connection instances. 0: Success.< 0: Failure.

◆ clearVideoWatermarkEx()

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

◆ enableAudioVolumeIndicationEx()

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

Enables the onAudioVolumeIndication callback to report on which users are speaking and the speakers' volume.

Once the onAudioVolumeIndication callback is enabled, the SDK returns the volume indication in the at the time interval set in enableAudioVolumeIndication, regardless of whether any user is speaking 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, and should be integral multiple of 200 (less than 200 will be set to 200).
smoothThe smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges is [0, 10]. The greater the value, the more sensitive the indicator. The recommended value is 3.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startRtmpStreamWithoutTranscodingEx()

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

Publishes the local stream without transcoding to a specified CDN live RTMP address. (CDN live only.)

Parameters
urlThe CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startRtmpStreamWithTranscodingEx()

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

Publishes the local stream with transcoding to a specified CDN live RTMP address. (CDN live only.)

Parameters
urlThe CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes.
transcodingSets the CDN live audio/video transcoding settings. See LiveTranscoding.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateRtmpTranscodingEx()

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

Update the video layout and audio settings for CDN live. (CDN live only.)

Note
This method applies to Live Broadcast only.
Parameters
transcodingSets the CDN live audio/video transcoding settings. See LiveTranscoding.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ stopRtmpStreamEx()

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

Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.)

Parameters
urlThe RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startChannelMediaRelayEx()

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

Starts to relay media streams across channels.

Parameters
configurationThe configuration of the media stream relay:ChannelMediaRelayConfiguration.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ 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 destination channels.

Parameters
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateChannelMediaRelayEx()

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

Updates the channels for media stream relay

Parameters
configurationThe media stream relay configuration: ChannelMediaRelayConfiguration.
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ pauseAllChannelMediaRelayEx()

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

pause the channels for media stream relay.

Parameters
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.

◆ resumeAllChannelMediaRelayEx()

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

resume the channels for media stream relay.

Parameters
connectionRtcConnection is used to control different connection instances.
Returns
  • 0: Success.
  • < 0: Failure.