Package io.agora.rtc2
Class RtcEngineEx
java.lang.Object
io.agora.rtc2.RtcEngine
io.agora.rtc2.RtcEngineEx
- Direct Known Subclasses:
RtcEngineInternal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddHandlerEx(IRtcEngineEventHandler handler, RtcConnection connection) Adds the IRtcEngineEventHandler.abstract intaddVideoWatermarkEx(WatermarkConfig config, RtcConnection connection) abstract intaddVideoWatermarkEx(String watermarkUrl, WatermarkOptions options, RtcConnection connection) Deprecated.From v4.6.0.abstract intadjustRecordingSignalVolumeEx(int volume, RtcConnection connection) Adjusts the recording volume.abstract intadjustUserPlaybackSignalVolumeEx(int uid, int volume, RtcConnection connection) abstract intclearVideoWatermarkEx(RtcConnection connection) abstract intcreateDataStreamEx(boolean reliable, boolean ordered, RtcConnection connection) abstract intcreateDataStreamEx(DataStreamConfig config, RtcConnection connection) abstract intenableAudioVolumeIndicationEx(int interval, int smooth, boolean reportVad, RtcConnection connection) abstract intenableContentInspectEx(boolean enabled, ContentInspectConfig config, RtcConnection connection) abstract intenableDualStreamModeEx(boolean enabled, SimulcastStreamConfig streamConfig, RtcConnection connection) Deprecated.v4.2.0.abstract intenableEncryptionEx(boolean enabled, io.agora.rtc2.internal.EncryptionConfig config, RtcConnection connection) abstract StringgetCallIdEx(RtcConnection connection) abstract intgetConnectionStateEx(RtcConnection connection) abstract intgetUserInfoByUidEx(int uid, UserInfo userInfo, RtcConnection connection) abstract intgetUserInfoByUserAccountEx(String userAccount, UserInfo userInfo, RtcConnection connection) abstract intjoinChannelEx(String token, RtcConnection connection, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler) abstract intjoinChannelWithUserAccountEx(String token, String channelId, String userAccount, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler) abstract intleaveChannelEx(RtcConnection connection) abstract intleaveChannelEx(RtcConnection connection, LeaveChannelOptions options) abstract intleaveChannelWithUserAccountEx(String channelId, String userAccount) abstract intleaveChannelWithUserAccountEx(String channelId, String userAccount, LeaveChannelOptions options) Leaves a channel with the channel ID and user account and sets the options for leaving.abstract intmuteAllRemoteAudioStreamsEx(boolean muted, RtcConnection connection) abstract intmuteAllRemoteVideoStreamsEx(boolean muted, RtcConnection connection) abstract intmuteLocalAudioStreamEx(boolean muted, RtcConnection connection) abstract intmuteLocalVideoStreamEx(boolean muted, RtcConnection connection) abstract intmuteRecordingSignalEx(boolean muted, RtcConnection connection) Mute or resume recording signal volume.abstract intmuteRemoteAudioStreamEx(int uid, boolean muted, RtcConnection connection) abstract intmuteRemoteVideoStreamEx(int uid, boolean muted, RtcConnection connection) abstract intpauseAllChannelMediaRelayEx(RtcConnection connection) Deprecated.This method is deprecated from v4.2.0.abstract intplayEffectEx(RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish) abstract intplayEffectEx(RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos) abstract intpreloadEffectEx(RtcConnection connection, int soundId, String filePath) abstract intpreloadEffectEx(RtcConnection connection, int soundId, String filePath, int startPos) abstract voidremoveHandlerEx(IRtcEngineEventHandler handler, RtcConnection connection) Removes the IRtcEngineEventHandler.abstract intremoveVideoWatermarkEx(String id, RtcConnection connection) abstract intresumeAllChannelMediaRelayEx(RtcConnection connection) abstract intsendAudioMetadataEx(byte[] metadata, RtcConnection connection) Send audio metadata.abstract intsendCustomReportMessageEx(String id, String category, String event, String label, int value, RtcConnection connection) abstract intsendMediaControlMessageEx(int uid, byte[] message, RtcConnection connection) abstract intsendRdtMessageEx(int uid, int type, byte[] message, RtcConnection connection) abstract intsendStreamMessageEx(int streamId, byte[] message, RtcConnection connection) abstract intsetDualStreamModeEx(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig, RtcConnection connection) abstract intsetHighPriorityUserListEx(int[] uidList, int option, RtcConnection connection) Sets the high priority user list and related fallback option for the remotely subscribed video stream based on the network conditions in NASA2.abstract intsetParametersEx(String parameters, RtcConnection connection) Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.abstract intsetRemoteRenderModeEx(int uid, int renderMode, int mirrorMode, RtcConnection connection) abstract intsetRemoteUserSpatialAudioParamsEx(int uid, SpatialAudioParams params, RtcConnection connection) Sets the 3D sound position of a remote user.abstract intsetRemoteVideoStreamTypeEx(int uid, int streamType, RtcConnection connection) Deprecated.abstract intsetRemoteVideoStreamTypeEx(int uid, Constants.VideoStreamType streamType, RtcConnection connection) abstract intsetRemoteVideoSubscriptionOptionsEx(int uid, VideoSubscriptionOptions options, RtcConnection rtcConnection) abstract intsetRemoteVoicePositionEx(int uid, double pan, double gain, RtcConnection connection) abstract intsetSimulcastConfigEx(SimulcastConfig simulcastConfig, RtcConnection connection) abstract intsetSubscribeAudioAllowlistEx(int[] uidList, RtcConnection connection) abstract intsetSubscribeAudioBlocklistEx(int[] uidList, RtcConnection connection) abstract intsetSubscribeVideoAllowlistEx(int[] uidList, RtcConnection connection) abstract intsetSubscribeVideoBlocklistEx(int[] uidList, RtcConnection connection) abstract intsetupRemoteVideoEx(VideoCanvas remote, RtcConnection connection) abstract intsetVideoEncoderConfigurationEx(VideoEncoderConfiguration config, RtcConnection connection) abstract intstartMediaRenderingTracingEx(RtcConnection connection) abstract intstartOrUpdateChannelMediaRelayEx(ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection) abstract intstartRtmpStreamWithoutTranscodingEx(String url, RtcConnection connection) abstract intstartRtmpStreamWithTranscodingEx(String url, LiveTranscoding transcoding, RtcConnection connection) abstract intstopChannelMediaRelayEx(RtcConnection connection) abstract intstopRtmpStreamEx(String url, RtcConnection connection) abstract inttakeSnapshotEx(RtcConnection connection, int uid, SnapshotConfig config) abstract inttakeSnapshotEx(RtcConnection connection, int uid, String filePath) abstract intupdateChannelMediaOptionsEx(ChannelMediaOptions options, RtcConnection connection) abstract intupdateRtmpTranscodingEx(LiveTranscoding transcoding, RtcConnection connection) Methods inherited from class io.agora.rtc2.RtcEngine
addHandler, addVideoWatermark, addVideoWatermark, addVideoWatermark, adjustAudioMixingPlayoutVolume, adjustAudioMixingPublishVolume, adjustAudioMixingVolume, adjustCustomAudioPlayoutVolume, adjustCustomAudioPublishVolume, adjustPlaybackSignalVolume, adjustRecordingSignalVolume, adjustUserPlaybackSignalVolume, clearVideoWatermarks, complain, configRhythmPlayer, create, create, createCustomAudioTrack, createCustomEncodedVideoTrack, createCustomVideoTrack, createDataStream, createDataStream, createMediaPlayer, createMediaRecorder, createVideoEffectObject, destroy, destroy, destroyCustomAudioTrack, destroyCustomEncodedVideoTrack, destroyCustomVideoTrack, destroyMediaRecorder, destroyVideoEffectObject, disableAudio, disableAudioSpectrumMonitor, disableVideo, enableAudio, enableAudioSpectrumMonitor, enableAudioVolumeIndication, enableContentInspect, enableCustomAudioLocalPlayback, enableDualStreamMode, enableDualStreamMode, enableEncryption, enableExtension, enableExtension, enableExtension, enableExternalAudioSourceLocalPlayback, enableFaceDetection, enableHighPerfWifiMode, enableInEarMonitoring, enableInEarMonitoring, enableInstantMediaRendering, enableLocalAudio, enableLocalVideo, enableSoundPositionIndication, enableSpatialAudio, enableVideo, enableVideoImageSource, enableVirtualBackground, enableVirtualBackground, enableVoiceAITuner, enableWebSdkInteroperability, getAudioDeviceInfo, getAudioEffectManager, getAudioMixingCurrentPosition, getAudioMixingDuration, getAudioMixingPlayoutVolume, getAudioMixingPublishVolume, getAudioTrackCount, getCallId, getCameraMaxZoomFactor, getConnectionState, getCurrentMonotonicTimeInMs, getEffectCurrentPosition, getEffectDuration, getEffectsVolume, getErrorDescription, getExtensionProperty, getExtensionProperty, getExtensionProperty, getFaceShapeAreaOptions, getFaceShapeAreaOptions, getFaceShapeBeautyOptions, getFaceShapeBeautyOptions, getH265Transcoder, getMediaEngineVersion, getMediaPlayerCacheManager, getNativeHandle, getNativeMediaPlayer, getNetworkType, getNtpWallTimeInMs, getParameter, getParameters, getRecommendedEncoderType, getSdkVersion, getUserInfoByUid, getUserInfoByUserAccount, getVolumeOfEffect, isCameraAutoFocusFaceModeSupported, isCameraExposurePositionSupported, isCameraExposureSupported, isCameraFaceDetectSupported, isCameraFocusSupported, isCameraTorchSupported, isCameraZoomSupported, isFeatureAvailableOnDevice, isSpeakerphoneEnabled, isTextureEncodeSupported, joinChannel, joinChannel, joinChannelWithUserAccount, joinChannelWithUserAccount, leaveChannel, leaveChannel, loadExtensionProvider, monitorBluetoothHeadsetEvent, monitorHeadsetEvent, muteAllRemoteAudioStreams, muteAllRemoteVideoStreams, muteLocalAudioStream, muteLocalVideoStream, muteRecordingSignal, muteRemoteAudioStream, muteRemoteVideoStream, pauseAllChannelMediaRelay, pauseAllEffects, pauseAudio, pauseAudioMixing, pauseEffect, playAllEffects, playEffect, playEffect, preloadChannel, preloadChannelWithUserAccount, preloadEffect, preloadEffect, pullPlaybackAudioFrame, pullPlaybackAudioFrame, pushExternalAudioFrame, pushExternalAudioFrame, pushExternalAudioFrame, pushExternalAudioFrame, pushExternalEncodedVideoFrame, pushExternalEncodedVideoFrameById, pushExternalVideoFrame, pushExternalVideoFrameById, queryCameraFocalLengthCapability, queryCodecCapability, queryDeviceScore, queryHDRCapability, queryScreenCaptureCapability, rate, registerAudioEncodedFrameObserver, registerAudioFrameObserver, registerAudioSpectrumObserver, registerExtension, registerFaceInfoObserver, registerLocalUserAccount, registerMediaMetadataObserver, registerVideoEncodedFrameObserver, registerVideoFrameObserver, removeHandler, removeVideoWatermark, renewToken, resumeAllChannelMediaRelay, resumeAllEffects, resumeAudio, resumeAudioMixing, resumeEffect, selectAudioTrack, sendAudioMetadata, sendCustomReportMessage, sendMediaControlMessage, sendRdtMessage, sendStreamMessage, setAdvancedAudioOptions, setAINSMode, setAudioEffectParameters, setAudioEffectPreset, setAudioMixingDualMonoMode, setAudioMixingPitch, setAudioMixingPlaybackSpeed, setAudioMixingPosition, setAudioProfile, setAudioProfile, setAudioScenario, setAVSyncSource, setBeautyEffectOptions, setBeautyEffectOptions, setCameraAutoFocusFaceModeEnabled, setCameraCapturerConfiguration, setCameraExposureFactor, setCameraExposurePosition, setCameraFocusPositionInPreview, setCameraTorchOn, setCameraZoomFactor, setChannelProfile, setClientRole, setClientRole, setCloudProxy, setColorEnhanceOptions, setColorEnhanceOptions, setDefaultAudioRoutetoSpeakerphone, setDirectCdnStreamingAudioConfiguration, setDirectCdnStreamingVideoConfiguration, setDualStreamMode, setDualStreamMode, setEarMonitoringAudioFrameParameters, setEffectPosition, setEffectsVolume, setEnableSpeakerphone, setExtensionProperty, setExtensionProperty, setExtensionProperty, setExtensionProviderProperty, setExternalAudioSink, setExternalAudioSource, setExternalAudioSource, setExternalMediaProjection, setExternalRemoteEglContext, setExternalVideoSource, setExternalVideoSource, setFaceShapeAreaOptions, setFaceShapeAreaOptions, setFaceShapeBeautyOptions, setFaceShapeBeautyOptions, setFilterEffectOptions, setFilterEffectOptions, setHeadphoneEQParameters, setHeadphoneEQPreset, setHighPriorityUserList, setHighQualityAudioParameters, setInEarMonitoringVolume, setLocalAccessPoint, setLocalRenderMode, setLocalRenderMode, setLocalRenderTargetFps, setLocalVideoMirrorMode, setLocalVoiceEqualization, setLocalVoiceFormant, setLocalVoicePitch, setLocalVoiceReverb, setLogFile, setLogFileSize, setLogFilter, setLogLevel, setLowlightEnhanceOptions, setLowlightEnhanceOptions, setMixedAudioFrameParameters, setParameters, setPlaybackAudioFrameBeforeMixingParameters, setPlaybackAudioFrameBeforeMixingParameters, setPlaybackAudioFrameParameters, setPreferHeadset, setRecordingAudioFrameParameters, setRemoteDefaultVideoStreamType, setRemoteDefaultVideoStreamType, setRemoteRenderMode, setRemoteRenderMode, setRemoteRenderTargetFps, setRemoteSubscribeFallbackOption, setRemoteSubscribeFallbackOption, setRemoteUserPriority, setRemoteUserSpatialAudioParams, setRemoteVideoStreamType, setRemoteVideoStreamType, setRemoteVideoSubscriptionOptions, setRemoteVoicePosition, setRouteInCommunicationMode, setScreenCaptureScenario, setSimulcastConfig, setSubscribeAudioAllowlist, setSubscribeAudioBlocklist, setSubscribeVideoAllowlist, setSubscribeVideoBlocklist, setupAudioAttributes, setupLocalVideo, setupRemoteVideo, setVideoDenoiserOptions, setVideoDenoiserOptions, setVideoEncoderConfiguration, setVideoQoEPreference, setVideoQualityParameters, setVideoScenario, setVoiceBeautifierParameters, setVoiceBeautifierPreset, setVoiceConversionParameters, setVoiceConversionPreset, setVolumeOfEffect, startAudioMixing, startAudioMixing, startAudioRecording, startAudioRecording, startCameraCapture, startDirectCdnStreaming, startEchoTest, startLastmileProbeTest, startLocalAudioMixer, startLocalVideoTranscoder, startMediaRenderingTracing, startOrUpdateChannelMediaRelay, startPlaybackDeviceTest, startPreview, startPreview, startRecordingDeviceTest, startRhythmPlayer, startRtmpStreamWithoutTranscoding, startRtmpStreamWithTranscoding, startScreenCapture, stopAllEffects, stopAudioMixing, stopAudioRecording, stopCameraCapture, stopChannelMediaRelay, stopDirectCdnStreaming, stopEchoTest, stopEffect, stopLastmileProbeTest, stopLocalAudioMixer, stopLocalVideoTranscoder, stopPlaybackDeviceTest, stopPreview, stopPreview, stopRecordingDeviceTest, stopRhythmPlayer, stopRtmpStream, stopScreenCapture, switchCamera, switchCamera, takeSnapshot, takeSnapshot, unloadAllEffects, unloadEffect, unRegisterAudioSpectrumObserver, unregisterMediaMetadataObserver, updateChannelMediaOptions, updateDirectCdnStreamingMediaOptions, updateLocalAudioMixerConfiguration, updateLocalTranscoderConfiguration, updatePreloadChannelToken, updateRtmpTranscoding, updateScreenCaptureParameters, uploadLogFile, writeLog
-
Constructor Details
-
RtcEngineEx
public RtcEngineEx()
-
-
Method Details
-
muteLocalAudioStreamEx
- Parameters:
muted- Whether to stop publishing the local audio stream: - `true`: Stops publishing the local audio stream. - `false`: (Default) Resumes publishing the local audio stream.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
muteLocalVideoStreamEx
- Parameters:
muted- Whether to stop publishing the local video stream. - `true`: Stop publishing the local video stream. - `false`: (Default) Publish the local video stream.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
muteAllRemoteAudioStreamsEx
- Parameters:
muted- Whether 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
muteAllRemoteVideoStreamsEx
- Parameters:
muted- Whether 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
muteRemoteAudioStreamEx
- Parameters:
uid- The ID of the specified user.muted- Whether 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
muteRemoteVideoStreamEx
- Parameters:
uid- The user ID of the remote user.muted- Whether 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteVideoStreamTypeEx
public abstract int setRemoteVideoStreamTypeEx(int uid, Constants.VideoStreamType streamType, RtcConnection connection) - Parameters:
uid- The user ID.streamType- The video stream type, see `VideoStreamType`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteVideoStreamTypeEx
@Deprecated public abstract int setRemoteVideoStreamTypeEx(int uid, int streamType, RtcConnection connection) Deprecated.- Parameters:
uid- The user ID.streamType- The video stream type: - 0: High-quality video stream. - 1: Low-quality video stream.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setHighPriorityUserListEx
Sets the high priority user list and related fallback option for the remotely subscribed video stream based on the network conditions in NASA2.- Parameters:
uidList- The id list of high priority users.option- The remote subscribe fallback option of high priority users.connection-RtcConnectionis used to control different connection instances.- Returns:
- - 0: Success. - < 0: Failure.
-
setSubscribeAudioBlocklistEx
- Parameters:
uidList- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setSubscribeAudioAllowlistEx
- Parameters:
uidList- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setSubscribeVideoBlocklistEx
- Parameters:
uidList- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setSubscribeVideoAllowlistEx
- Parameters:
uidList- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteRenderModeEx
public abstract int setRemoteRenderModeEx(int uid, int renderMode, int mirrorMode, RtcConnection connection) - Parameters:
uid- The user ID of the remote user.renderMode- The 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.mirrorMode- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - < 0: Failure.
-
setupRemoteVideoEx
- Parameters:
remote- The remote video view settings. See `VideoCanvas`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setVideoEncoderConfigurationEx
public abstract int setVideoEncoderConfigurationEx(VideoEncoderConfiguration config, RtcConnection connection) - Parameters:
config- Video profile. See `VideoEncoderConfiguration`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
updateChannelMediaOptionsEx
public abstract int updateChannelMediaOptionsEx(ChannelMediaOptions options, RtcConnection connection) - Parameters:
options- The channel media options. See `ChannelMediaOptions`.connection- The 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
public abstract int joinChannelEx(String token, RtcConnection connection, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler) - Parameters:
token- The 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`.connection- The connection information. See `RtcConnection`.options- The channel media options. See `ChannelMediaOptions`.eventHandler- The 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
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
leaveChannelEx
- Parameters:
connection- The connection information. See `RtcConnection`.options- Since 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
-
leaveChannelWithUserAccountEx
public abstract int leaveChannelWithUserAccountEx(String channelId, String userAccount, LeaveChannelOptions options) Leaves a channel with the channel ID and user account and sets the options for leaving.- Parameters:
channelId- The 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: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".userAccount- The 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: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".options- The options for leaving the channel. SeeLeaveChannelOptions.- Returns:
- - 0: Success. - < 0: Failure.
-
enableDualStreamModeEx
@Deprecated public abstract int enableDualStreamModeEx(boolean enabled, SimulcastStreamConfig streamConfig, RtcConnection connection) Deprecated.v4.2.0. This method is deprecated. Use setDualStreamModeEx instead.- Parameters:
enabled- Whether to enable dual-stream mode: - `true`: Enable dual-stream mode. - `false`: (Default) Disable dual-stream mode.streamConfig- The configuration of the low-quality video stream. See `SimulcastStreamConfig`.Note: When setting `mode` to `DISABLE_SIMULCAST_STREAM`, setting `streamConfig` will not take effect.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setDualStreamModeEx
public abstract int setDualStreamModeEx(Constants.SimulcastStreamMode mode, SimulcastStreamConfig streamConfig, RtcConnection connection) - Parameters:
mode- The mode in which the video stream is sent. See `SimulcastStreamMode`.streamConfig- The configuration of the low-quality video stream. See `SimulcastStreamConfig`.Note: When setting `mode` to `DISABLE_SIMULCAST_STREAM`, setting `streamConfig` will not take effect.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setSimulcastConfigEx
- Parameters:
simulcastConfig- This configuration includes seven layers, from STREAM_LAYER_1 to STREAM_LOW, with a maximum of three layers enabled simultaneously. See `SimulcastConfig`.connection- Connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.6.0
-
getConnectionStateEx
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- The current connection state.
-
sendCustomReportMessageEx
public abstract int sendCustomReportMessageEx(String id, String category, String event, String label, int value, RtcConnection connection) -
sendStreamMessageEx
- Parameters:
streamId- The data stream ID. You can get the data stream ID by calling `createDataStreamEx(DataStreamConfig config, RtcConnection connection)` .message- The message to be sent.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
sendRdtMessageEx
- Parameters:
uid- remote user id.type- Reliable Data Transmission tunnel message type.message- The sent data.connection- Connection ID.- Returns:
- - 0: Success. - < 0: Failure.
-
sendMediaControlMessageEx
- Parameters:
uid- remote user id. In particular, if the uid is set to 0, it means broadcasting the message to the entire channel.message- The sent data, max 1024 Bytes.connection- Connection ID.- Returns:
- - 0: Success. - < 0: Failure.
-
createDataStreamEx
- Parameters:
reliable- Sets 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 to`true` or both set to `false`.ordered- Sets 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.connection- The connection information. See `RtcConnection`.- Returns:
- - ID of the created data stream, if the method call succeeds. - < 0: Failure.
-
createDataStreamEx
- Parameters:
config- The configurations for the data stream. See `DataStreamConfig`.connection- The connection information. See `RtcConnection`.- Returns:
- - ID of the created data stream, if the method call succeeds. - < 0: Failure.
-
joinChannelWithUserAccountEx
public abstract int joinChannelWithUserAccountEx(String token, String channelId, String userAccount, ChannelMediaOptions options, IRtcEngineEventHandler eventHandler) - Parameters:
token- The 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`.channelId- The 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. - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","userAccount- The 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 - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","options- The channel media options. See `ChannelMediaOptions`.eventHandler- The 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
public abstract int getUserInfoByUserAccountEx(String userAccount, UserInfo userInfo, RtcConnection connection) - Parameters:
userAccount- The user account.userInfo- The `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.connection- The connection information. See `RtcConnection`.- Returns:
- - A `UserInfo` object, if the method call succeeds. - NULL, if the method call fails.
-
getUserInfoByUidEx
- Parameters:
uid- The user ID.userInfo- The `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.connection- The connection information. See `RtcConnection`.- Returns:
- - A `UserInfo` object, if the method call succeeds. - NULL, if the method call fails.
-
adjustRecordingSignalVolumeEx
Adjusts the recording volume.- Parameters:
volume- The 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.connection- The RtcConnection object.- Returns:
- - 0 : Success. - < 0: Failure.
-
muteRecordingSignalEx
Mute or resume recording signal volume.- Parameters:
muted- Determines whether to mute or resume the recording signal volume. - true: Mute the recording signal volume. - false: (Default) Resume the recording signal volume.connection- The RtcConnection object.- Returns:
- - 0 : Success. - < 0: Failure.
-
adjustUserPlaybackSignalVolumeEx
- Parameters:
uid- The user ID of the remote user.volume- The 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).connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteVoicePositionEx
public abstract int setRemoteVoicePositionEx(int uid, double pan, double gain, RtcConnection connection) - Parameters:
uid- The user ID of the remote user.pan- The 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.gain- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteVideoSubscriptionOptionsEx
public abstract int setRemoteVideoSubscriptionOptionsEx(int uid, VideoSubscriptionOptions options, RtcConnection rtcConnection) - Parameters:
uid- The user ID of the remote user.options- The video subscription options. See `VideoSubscriptionOptions`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
setRemoteUserSpatialAudioParamsEx
public abstract int setRemoteUserSpatialAudioParamsEx(int uid, SpatialAudioParams params, RtcConnection connection) Sets the 3D sound position of a remote user.- Parameters:
uid- The ID of the remote user.azimuth-elevation-distance-connection-RtcConnectionis used to control different connection instances.- Returns:
- - 0: Success. - < 0: Failure.
-
addVideoWatermarkEx
@Deprecated public abstract int addVideoWatermarkEx(String watermarkUrl, WatermarkOptions options, RtcConnection connection) Deprecated.From v4.6.0. We recommend using theaddVideoWatermark2 method instead.- Parameters:
watermarkUrl- The 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.options- The options of the watermark image to be added. See `WatermarkOptions`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v2.9.1
-
addVideoWatermarkEx
- Parameters:
config- Watermark configuration. See `WatermarkConfig`.connection- `RtcConnection` object. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.6.0
-
removeVideoWatermarkEx
- Parameters:
id- ID of the watermark image to be removed.connection- Parameters used to control different connection instances. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.6.0
-
clearVideoWatermarkEx
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
enableAudioVolumeIndicationEx
public abstract int enableAudioVolumeIndicationEx(int interval, int smooth, boolean reportVad, RtcConnection connection) - Parameters:
interval- Sets 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.smooth- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
takeSnapshotEx
- Parameters:
connection- The connection information. See `RtcConnection`.uid- The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.filePath- The local path (including filename extensions) of the snapshot. For example: - Android: `/storage/emulated/0/Android/data//files/example.jpg` Attention: Ensure that the path you specify exists and is writable. - Returns:
- - 0: Success. - < 0: Failure.
-
takeSnapshotEx
- Parameters:
connection- The connection information. See `RtcConnection`.uid- The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.config- The configuration of the snaptshot. See `SnapshotConfig`.- Returns:
- - 0: Success. - < 0: Failure.
-
enableContentInspectEx
public abstract int enableContentInspectEx(boolean enabled, ContentInspectConfig config, RtcConnection connection) - Parameters:
enabled- Whether to enalbe video screenshot and upload: - `true`: Enables video screenshot and upload. - `false`: Disables video screenshot and upload.config- Screenshot and upload configuration. See `ContentInspectConfig`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
startRtmpStreamWithoutTranscodingEx
- Parameters:
url- The 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.connection- The 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
public abstract int startRtmpStreamWithTranscodingEx(String url, LiveTranscoding transcoding, RtcConnection connection) - Parameters:
url- The 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.transcoding- The transcoding configuration for Media Push. See `LiveTranscoding`.connection- The 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
- Parameters:
transcoding- The transcoding configuration for Media Push. See `LiveTranscoding`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
stopRtmpStreamEx
- Parameters:
url- The 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.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
startOrUpdateChannelMediaRelayEx
public abstract int startOrUpdateChannelMediaRelayEx(ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection) - Parameters:
channelMediaRelayConfiguration- The configuration of the media stream relay. See `ChannelMediaRelayConfiguration`.connection- The 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.
- Since:
- v4.2.0
-
stopChannelMediaRelayEx
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure. - -5: The method call was rejected. There is no ongoing channel media relay.
-
pauseAllChannelMediaRelayEx
Deprecated.This method is deprecated from v4.2.0. Use `startOrUpdateChannelMediaRelayEx` instead.- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure. - -5: The method call was rejected. There is no ongoing channel media relay.
-
resumeAllChannelMediaRelayEx
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure. - -5: The method call was rejected. There is no paused channel media relay.
-
startMediaRenderingTracingEx
- Parameters:
connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.1.1
-
setParametersEx
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:
parameters- Parameter to be set as a JSON string in the specified format.connection-RtcConnectionis used to control different connection instances.- Returns:
- 0: Success.
- <0: Failure.
-
getCallIdEx
- Parameters:
connection- The connection information. See `RtcConnection`.
-
addHandlerEx
Adds the IRtcEngineEventHandler.- Parameters:
handler- The IRtcEngineEventHandler instance.connection-RtcConnectionis used to control different connection instances.
-
removeHandlerEx
Removes the IRtcEngineEventHandler.- Parameters:
handler- The IRtcEngineEventHandler instance.connection-RtcConnectionis used to control different connection instances.
-
enableEncryptionEx
public abstract int enableEncryptionEx(boolean enabled, io.agora.rtc2.internal.EncryptionConfig config, RtcConnection connection) - Parameters:
enabled- Whether to enable built-in encryption: - true: Enable the built-in encryption. - false: (Default) Disable the built-in encryption.config- Built-in encryption configurations. See `EncryptionConfig`.connection- The connection information. See `RtcConnection`.- Returns:
- - 0: Success. - < 0: Failure.
-
sendAudioMetadataEx
Send audio metadata.- Parameters:
metadata- Audio Metadata.connection-RtcConnectionis used to control different connection instances.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.3.1
-
preloadEffectEx
- Parameters:
connection- Connection information. See `RtcConnection`.soundId- The audio effect ID.filePath- The 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.
- Since:
- v4.6.0
-
preloadEffectEx
public abstract int preloadEffectEx(RtcConnection connection, int soundId, String filePath, int startPos) - Parameters:
connection- Connection information. See `RtcConnection`.soundId- The audio effect ID.filePath- The 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.startPos- The playback position (ms) of the audio effect file.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.6.0
-
playEffectEx
public abstract int playEffectEx(RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish) - Parameters:
connection- Connection information. See `RtcConnection`.soundId- The audio effect ID.filePath- The absolute path of the local file or the URL of the online file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav.loopCount- Number of times the sound effect to be looped: - `-1`: Loop infinitely until calling `stopEffect` or `stopAllEffects`. - `0`: Play once. - `1`: Play twice.pitch- The 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.pan- The 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.gain- The 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.publish- Whether 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.
- Since:
- v4.6.0
-
playEffectEx
public abstract int playEffectEx(RtcConnection connection, int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos) - Parameters:
connection- Connection information. See `RtcConnection`.soundId- The audio effect ID.filePath- The 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.loopCount- Number of times the sound effect to be looped: - `-1`: Loop infinitely until calling `stopEffect` or `stopAllEffects`. - `0`: Play once. - `1`: Play twice.pitch- The 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.pan- The 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.gain- The 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.publish- Whether 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.startPos- The playback position (ms) of the audio effect file.- Returns:
- - 0: Success. - < 0: Failure.
- Since:
- v4.6.0
-