Agora Java API Reference for Android
|
Public Member Functions | |
RtcEngineImpl (Context context, String appId, IRtcEngineEventHandler handler) throws Exception | |
Context | getContext () |
void | doDestroy () |
void | reinitialize (Context context, String appId, IRtcEngineEventHandler handler) |
void | addHandler (IRtcEngineEventHandler handler) |
void | removeHandler (IRtcEngineEventHandler handler) |
int | setupRemoteVideo (VideoCanvas remote) |
int | setupLocalVideo (VideoCanvas local) |
int | setLocalRenderMode (int renderMode) |
int | setLocalRenderMode (int renderMode, int mirrorMode) |
int | setRemoteRenderMode (int uid, int renderMode) |
int | setRemoteRenderMode (int uid, int renderMode, int mirrorMode) |
int | setLocalVideoMirrorMode (int mode) |
int | addVideoWatermark (AgoraImage watermark) |
int | addVideoWatermark (String watermarkUrl, WatermarkOptions options) |
int | clearVideoWatermarks () |
int | enableDualStreamMode (boolean enabled) |
void | monitorHeadsetEvent (boolean monitor) |
void | monitorBluetoothHeadsetEvent (boolean monitor) |
boolean | enableHighPerfWifiMode (boolean enable) |
IRtcEngineEventHandler.RtcStats | getRtcStats () |
synchronized void | updateRtcStats (PMediaResRtcStats stats) |
int | joinChannel (String key, String channelName, String optionalInfo, int optionalUid) |
int | switchChannel (String key, String channelName) |
int | leaveChannel () |
int | startEchoTest () |
int | startEchoTest (int intervalInSeconds) |
int | stopEchoTest () |
int | enableLastmileTest () |
int | disableLastmileTest () |
int | startLastmileProbeTest (LastmileProbeConfig config) |
int | stopLastmileProbeTest () |
int | enableVideo () |
int | disableVideo () |
int | enableLocalVideo (boolean enabled) |
int | startPreview () |
int | stopPreview () |
int | enableAudio () |
int | enableLocalAudio (boolean enabled) |
int | disableAudio () |
int | pauseAudio () |
int | resumeAudio () |
int | muteLocalAudioStream (boolean muted) |
int | muteLocalVideoStream (boolean muted) |
int | muteAllRemoteAudioStreams (boolean muted) |
int | setDefaultMuteAllRemoteAudioStreams (boolean muted) |
int | muteAllRemoteVideoStreams (boolean muted) |
int | setDefaultMuteAllRemoteVideoStreams (boolean muted) |
int | setBeautyEffectOptions (boolean enabled, BeautyOptions options) |
int | muteRemoteAudioStream (int uid, boolean muted) |
int | adjustUserPlaybackSignalVolume (int uid, int volume) |
int | muteRemoteVideoStream (int uid, boolean muted) |
int | renewToken (String token) |
int | registerLocalUserAccount (String appId, String userAccount) |
int | joinChannelWithUserAccount (String token, String channelId, String userAccount) |
int | getUserInfoByUserAccount (String userAccount, UserInfo userInfo) |
int | getUserInfoByUid (int uid, UserInfo userInfo) |
int | setDefaultAudioRoutetoSpeakerphone (boolean defaultToSpeaker) |
int | setEnableSpeakerphone (boolean speakerOn) |
boolean | isSpeakerphoneEnabled () |
int | adjustRecordingSignalVolume (int volume) |
int | adjustPlaybackSignalVolume (int volume) |
int | setRecordingAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall) |
int | setPlaybackAudioFrameParameters (int sampleRate, int channel, int mode, int samplesPerCall) |
int | setMixedAudioFrameParameters (int sampleRate, int samplesPerCall) |
int | setHighQualityAudioParameters (boolean fullband, boolean stereo, boolean fullBitrate) |
int | enableInEarMonitoring (boolean enabled) |
int | enableWebSdkInteroperability (boolean enabled) |
int | setVideoQualityParameters (boolean preferFrameRateOverImageQuality) |
void | setPreferHeadset (boolean enabled) |
int | enableAudioVolumeIndication (int interval, int smooth, boolean report_vad) |
int | enableAudioQualityIndication (boolean enabled) |
int | enableTransportQualityIndication (boolean enabled) |
int | playRecap () |
int | enableRecap (int interval) |
int | setVideoProfile (int profile, boolean swapWidthAndHeight) |
int | setVideoProfile (int width, int height, int frameRate, int bitrate) |
int | setVideoEncoderConfiguration (VideoEncoderConfiguration config) |
int | setAudioProfile (int profile, int scenario) |
int | monitorAudioRouteChange (boolean isMonitoring) |
int | switchCamera () |
boolean | isCameraZoomSupported () |
boolean | isCameraTorchSupported () |
boolean | isCameraFocusSupported () |
boolean | isCameraExposurePositionSupported () |
boolean | isCameraAutoFocusFaceModeSupported () |
int | setCameraZoomFactor (float factor) |
float | getCameraMaxZoomFactor () |
int | setCameraFocusPositionInPreview (float positionX, float positionY) |
int | setCameraExposurePosition (float positionXinView, float positionYinView) |
int | setCameraTorchOn (boolean isOn) |
int | setCameraAutoFocusFaceModeEnabled (boolean enabled) |
int | enableRemoteVideo (boolean enabled, int uid) |
int | stopRemoteVideo (int uid) |
int | stopAllRemoteVideo () |
int | startAudioRecording (String filePath, int quality) |
int | startAudioRecording (String filePath, int sampeRate, int quality) |
int | stopAudioRecording () |
int | startAudioMixing (String filePath, boolean loopback, boolean replace, int cycle) |
int | stopAudioMixing () |
int | pauseAudioMixing () |
int | resumeAudioMixing () |
int | adjustAudioMixingVolume (int volume) |
int | adjustAudioMixingPlayoutVolume (int volume) |
int | adjustAudioMixingPublishVolume (int volume) |
int | getAudioMixingPlayoutVolume () |
int | getAudioMixingPublishVolume () |
int | getAudioMixingDuration () |
int | getAudioMixingCurrentPosition () |
int | setAudioMixingPosition (int pos) |
int | useExternalAudioDevice () |
int | registerAudioFrameObserver (IAudioFrameObserver observer) |
int | setExternalAudioSink (boolean enabled, int sampleRate, int channels) |
int | pullPlaybackAudioFrame (byte[] data, int lengthInBytes) |
int | setExternalAudioSource (boolean enabled, int sampleRate, int channels) |
int | pushExternalAudioFrame (byte[] data, long timestamp) |
int | setLogFile (String filePath) |
int | setLogFilter (int filter) |
int | setLogFileSize (int fileSizeInKBytes) |
int | setProfile (String profile, boolean merge) |
String | getProfile () |
int | setAppType (int appType) |
int | setParameters (String parameters) |
String | getParameters (String parameters) |
String | getParameter (String parameter, String args) |
String | makeQualityReportUrl (String channelName, int listenerUid, int speakerUid, int format) |
String | getCallId () |
int | rate (String callId, int rating, String description) |
int | complain (String callId, String description) |
int | setChannelProfile (int profile) |
int | setClientRole (int role) |
int | setCameraCapturerConfiguration (CameraCapturerConfiguration config) |
int | setRemoteVideoStreamType (int uid, int streamType) |
int | setRemoteUserPriority (int uid, int userPriority) |
int | setRemoteDefaultVideoStreamType (int streamType) |
int | setLocalPublishFallbackOption (int option) |
int | setRemoteSubscribeFallbackOption (int option) |
int | setEncryptionMode (String encryptionMode) |
int | setEncryptionSecret (String secret) |
int | createDataStream (boolean reliable, boolean ordered) |
int | sendStreamMessage (int streamId, byte[] message) |
int | updateSharedContext (EGLContext sharedContext) |
int | updateSharedContext (android.opengl.EGLContext sharedContext) |
int | setTextureId (int id, EGLContext sharedContext, int width, int height, long ts) |
int | setTextureId (int id, android.opengl.EGLContext sharedContext, int width, int height, long ts) |
int | setTextureIdWithMatrix (int id, EGLContext sharedContext, int format, int width, int height, long ts, float[] matrix) |
int | setTextureIdWithMatrix (int id, android.opengl.EGLContext sharedContext, int format, int width, int height, long ts, float[] matrix) |
boolean | isTextureEncodeSupported () |
void | setExternalVideoSource (boolean enable, boolean useTexture, boolean pushMode) |
boolean | pushExternalVideoFrame (AgoraVideoFrame frame) |
int | addPublishStreamUrl (String url, boolean transcodingEnabled) |
int | removePublishStreamUrl (String url) |
int | setLiveTranscoding (LiveTranscoding transcoding) |
int | addInjectStreamUrl (String url, LiveInjectStreamConfig config) |
int | removeInjectStreamUrl (String url) |
int | startChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration) |
int | stopChannelMediaRelay () |
int | updateChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration) |
int | startDumpVideoReceiveTrack (int uid, String dumpFile) |
int | stopDumpVideoReceiveTrack () |
long | getNativeHandle () |
int | setVideoSource (IVideoSource videoSource) |
int | setLocalVideoRenderer (IVideoSink render) |
int | setRemoteVideoRenderer (int uid, IVideoSink render) |
int | removeRemoteVideoTrack (int uid) |
IAudioEffectManager | getAudioEffectManager () |
int | enableSoundPositionIndication (boolean enabled) |
int | setRemoteVoicePosition (int uid, double pan, double gain) |
int | setLocalVoicePitch (double pitch) |
int | setLocalVoiceEqualization (int bandFrequency, int bandGain) |
int | setLocalVoiceReverb (int reverbKey, int value) |
int | setLocalVoiceChanger (int voiceChanger) |
int | setLocalVoiceReverbPreset (int preset) |
int | setInEarMonitoringVolume (int volume) |
double | getEffectsVolume () |
int | setEffectsVolume (double volume) |
int | setVolumeOfEffect (int soundId, double volume) |
int | playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain) |
int | playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish) |
int | stopEffect (int soundId) |
int | stopAllEffects () |
int | preloadEffect (int soundId, String filePath) |
int | unloadEffect (int soundId) |
int | pauseEffect (int soundId) |
int | pauseAllEffects () |
int | resumeEffect (int soundId) |
int | resumeAllEffects () |
int | setApiCallMode (int syncCallTimeout) |
int | getConnectionState () |
void | finalize () |
int | registerMediaMetadataObserver (IMetadataObserver observer, int type) |
RtcChannel | createRtcChannel (String channelId) |
int | destroyRtcChannel (String channelId) |
void | onRtcChannelJoinChannel () |
void | onRtcChannelLeaveChannel () |
![]() | |
abstract int | setProfile (String profile, boolean merge) |
abstract int | setAppType (int appType) |
abstract int | enableTransportQualityIndication (boolean enabled) |
abstract int | playRecap () |
abstract int | enableRecap (int interval) |
abstract String | getParameters (String parameters) |
abstract String | makeQualityReportUrl (String channel, int listenerUid, int speakerUid, int format) |
abstract int | updateSharedContext (EGLContext sharedContext) |
abstract int | updateSharedContext (android.opengl.EGLContext sharedContext) |
abstract int | setTextureId (int id, EGLContext eglContext, int width, int height, long ts) |
abstract int | setTextureId (int id, android.opengl.EGLContext eglContext, int width, int height, long ts) |
abstract int | monitorAudioRouteChange (boolean isMonitoring) |
abstract int | setApiCallMode (int syncCallTimeout) |
![]() | |
abstract int | setChannelProfile (int profile) |
abstract int | setClientRole (int role) |
abstract int | joinChannel (String token, String channelName, String optionalInfo, int optionalUid) |
abstract int | switchChannel (String token, String channelName) |
abstract int | leaveChannel () |
abstract int | renewToken (String token) |
abstract int | registerLocalUserAccount (String appId, String userAccount) |
abstract int | joinChannelWithUserAccount (String token, String channelName, String userAccount) |
abstract int | getUserInfoByUserAccount (String userAccount, UserInfo userInfo) |
abstract int | getUserInfoByUid (int uid, UserInfo userInfo) |
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, 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 report_vad) |
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 | setVideoProfile (int width, int height, int frameRate, int bitrate) |
abstract int | setVideoEncoderConfiguration (VideoEncoderConfiguration config) |
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 uid, int renderMode) |
abstract int | setRemoteRenderMode (int uid, int renderMode, int mirrorMode) |
abstract int | startPreview () |
abstract int | stopPreview () |
abstract int | enableLocalVideo (boolean enabled) |
abstract int | muteLocalVideoStream (boolean muted) |
abstract int | muteRemoteVideoStream (int uid, boolean muted) |
abstract int | muteAllRemoteVideoStreams (boolean muted) |
abstract int | setDefaultMuteAllRemoteVideoStreams (boolean muted) |
abstract int | setBeautyEffectOptions (boolean enabled, BeautyOptions options) |
abstract int | setDefaultAudioRoutetoSpeakerphone (boolean defaultToSpeaker) |
abstract int | setEnableSpeakerphone (boolean enabled) |
abstract boolean | isSpeakerphoneEnabled () |
abstract int | enableInEarMonitoring (boolean enabled) |
abstract int | setInEarMonitoringVolume (int volume) |
abstract int | useExternalAudioDevice () |
abstract int | setLocalVoicePitch (double pitch) |
abstract int | setLocalVoiceEqualization (int bandFrequency, int bandGain) |
abstract int | setLocalVoiceReverb (int reverbKey, int value) |
abstract int | setLocalVoiceChanger (int voiceChanger) |
abstract int | setLocalVoiceReverbPreset (int preset) |
abstract int | enableSoundPositionIndication (boolean enabled) |
abstract int | setRemoteVoicePosition (int uid, double pan, double gain) |
abstract int | startAudioMixing (String filePath, boolean loopback, boolean replace, int cycle) |
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 IAudioEffectManager | getAudioEffectManager () |
abstract int | startAudioRecording (String filePath, int quality) |
abstract int | startAudioRecording (String filePath, int sampleRate, int quality) |
abstract int | stopAudioRecording () |
abstract int | startEchoTest () |
abstract int | startEchoTest (int intervalInSeconds) |
abstract int | stopEchoTest () |
abstract int | enableLastmileTest () |
abstract int | disableLastmileTest () |
abstract int | startLastmileProbeTest (LastmileProbeConfig config) |
abstract int | stopLastmileProbeTest () |
abstract int | setVideoSource (IVideoSource source) |
abstract int | setLocalVideoRenderer (IVideoSink render) |
abstract int | setRemoteVideoRenderer (int uid, IVideoSink render) |
abstract int | setExternalAudioSink (boolean enabled, int sampleRate, int channels) |
abstract int | pullPlaybackAudioFrame (byte[] data, int lengthInByte) |
abstract int | setExternalAudioSource (boolean enabled, int sampleRate, int channels) |
abstract int | pushExternalAudioFrame (byte[] data, long timestamp) |
abstract void | setExternalVideoSource (boolean enable, boolean useTexture, boolean pushMode) |
abstract boolean | pushExternalVideoFrame (AgoraVideoFrame frame) |
abstract boolean | isTextureEncodeSupported () |
abstract int | registerAudioFrameObserver (IAudioFrameObserver 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 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 | setRemoteVideoStreamType (int uid, int streamType) |
abstract int | setRemoteDefaultVideoStreamType (int streamType) |
abstract int | setEncryptionSecret (String secret) |
abstract int | setEncryptionMode (String encryptionMode) |
abstract int | addInjectStreamUrl (String url, LiveInjectStreamConfig config) |
abstract int | removeInjectStreamUrl (String url) |
abstract int | addPublishStreamUrl (String url, boolean transcodingEnabled) |
abstract int | removePublishStreamUrl (String url) |
abstract int | setLiveTranscoding (LiveTranscoding transcoding) |
abstract int | createDataStream (boolean reliable, boolean ordered) |
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 int | setCameraZoomFactor (float factor) |
abstract float | getCameraMaxZoomFactor () |
abstract int | setCameraFocusPositionInPreview (float positionX, float positionY) |
abstract int | setCameraExposurePosition (float positionXinView, float positionYinView) |
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 | setLogFileSize (int fileSizeInKBytes) |
abstract long | getNativeHandle () |
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 | getParameter (String parameter, String args) |
abstract int | registerMediaMetadataObserver (IMetadataObserver observer, int type) |
abstract int | startChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration) |
abstract int | stopChannelMediaRelay () |
abstract int | updateChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration) |
abstract int | startDumpVideoReceiveTrack (int uid, String dumpFile) |
abstract int | stopDumpVideoReceiveTrack () |
abstract RtcChannel | createRtcChannel (String channelId) |
Static Public Member Functions | |
static synchronized void | loadNativeLibrary () |
static synchronized boolean | initializeNativeLibs () |
static boolean | checkIfInUIThread (String name) |
static native String | nativeGetSdkVersion () |
static native String | nativeGetChatEngineVersion () |
static native String | nativeGetErrorDescription (int err) |
![]() | |
static synchronized RtcEngine | create (Context context, String appId, IRtcEngineEventHandler handler) throws Exception |
static synchronized void | destroy () |
static SurfaceView | CreateRendererView (Context context) |
static int | getRecommendedEncoderType () |
static String | getSdkVersion () |
static String | getMediaEngineVersion () |
static String | getErrorDescription (int error) |
Protected Member Functions | |
void | onEvent (int eventId, byte[] evt) |
void | onChannelEvent (String channel, int eventId, byte[] evt) |
void | handleEvent (int eventId, byte[] evt, IRtcEngineEventHandler handler) |
void | handleChannelEvent (int eventId, byte[] evt, IRtcChannelEventHandler handler, RtcChannelImpl rtcChannel) |
AudioManager | getAudioManager (Context context) |
ActivityManager | getActivityManager (Context context) |
Static Protected Member Functions | |
static String | getLocalHost () |
int io.agora.rtc.internal.RtcEngineImpl.enableRemoteVideo | ( | boolean | enabled, |
int | uid | ||
) |
enable/disable remote video
enabled | true, start receiving and rendering remote video; false, stop receiving and rendering remote video |
uid | remote user id to enable/disable |
IAudioEffectManager io.agora.rtc.internal.RtcEngineImpl.getAudioEffectManager | ( | ) |
Begin of implementations of IAudioEffectManager
double io.agora.rtc.internal.RtcEngineImpl.getEffectsVolume | ( | ) |
Gets the volume of the audio effects.
The value ranges between 0.0 and 100.0.
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.setEffectsVolume | ( | double | volume | ) |
Sets the volume of the audio effects.
volume | Volume of the audio effects. The value ranges between 0.0 and 100.0 (default). |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.setVolumeOfEffect | ( | int | soundId, |
double | volume | ||
) |
Sets the volume of a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
volume | Volume of the audio effect. The value ranges between 0.0 and 100.0 (default). |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.playEffect | ( | int | soundId, |
String | filePath, | ||
int | loop, | ||
double | pitch, | ||
double | pan, | ||
double | gain | ||
) |
Plays a specified audio effect.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. If the audio effect is preloaded into the memory through the preloadEffect method, ensure that the soundID value is set to the same value as in the preloadEffect method. |
filePath | Absolute file path of the audio effect file. |
loop | Sets the number of times the audio effect loops:
|
pitch | Pitch of the audio effect. The value ranges between 0.5 and 2. The default value is 1 (no change to the pitch). The lower the value, the lower the pitch. |
pan | Spatial position of the audio effect. The value ranges between -1.0 and 1.0.
|
gain | Volume of the audio effect. The value ranges betwwen 0.0 and 100,0. The default value is 100.0. The lower the value, the lower the volume of the audio effect. |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.playEffect | ( | int | soundId, |
String | filePath, | ||
int | loopCount, | ||
double | pitch, | ||
double | pan, | ||
double | gain, | ||
boolean | publish | ||
) |
Plays a specified local or online audio effect file.
With this method, you can set the loop count, pitch, pan, and gain of the audio effect file and whether the remote user can hear the audio effect.
To play multiple audio effect files simultaneously, call this method multiple times with different soundIds and filePaths. We recommend playing no more than three audio effect files at the same time.
When the audio effect file playback is finished, the SDK triggers the onAudioEffectFinished callback.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. If you preloaded the audio effect into the memory through the preloadEffect method, ensure that the soundID value is set to the same value as in the preloadEffect method. |
filePath | The absolute file path (including the suffixes of the filename) of the audio effect file or the URL of the online audio effect file. For example, /sdcard/emulated/0/audio.mp4 . Supported audio formats: mp3, mp4, m4a, aac. 3gp, mkv, and wav. |
loopCount | Sets the number of times the audio effect loops:
|
pitch | Sets the pitch of the audio effect. The value ranges between 0.5 and 2. The default value is 1 (no change to the pitch). The lower the value, the lower the pitch. |
pan | Sets the spatial position of the audio effect. The value ranges between -1.0 and 1.0.
|
gain | Sets the volume of the audio effect. The value ranges between 0.0 and 100,0. The default value is 100.0. The lower the value, the lower the volume of the audio effect. |
publish | Set whether or not to publish the specified audio effect to the remote stream:
|
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.stopEffect | ( | int | soundId | ) |
Stops playing a specified audio effect.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. |
soundID
value is set to the same value as in the preloadEffect method. Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.stopAllEffects | ( | ) |
Stops playing all audio effects.
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.preloadEffect | ( | int | soundId, |
String | filePath | ||
) |
Preloads a specified audio effect file into the memory.
Supported audio formats: mp3, aac, m4a, 3gp, wav.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
filePath | Absolute path of the audio effect file. |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.unloadEffect | ( | int | soundId | ) |
Releases a specified preloaded audio effect from the memory.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.pauseEffect | ( | int | soundId | ) |
Pauses a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.pauseAllEffects | ( | ) |
Pauses all audio effects.
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.resumeEffect | ( | int | soundId | ) |
Resumes playing a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.resumeAllEffects | ( | ) |
Resumes playing all audio effects.
Implements io.agora.rtc.IAudioEffectManager.
int io.agora.rtc.internal.RtcEngineImpl.setApiCallMode | ( | int | syncCallTimeout | ) |
End of implementations of IAudioEffectManager