Agora Java API Reference for Android
|
Public Member Functions | |
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 | preloadChannel (String token, String channelName, int optionalUid) |
abstract int | preloadChannelWithUserAccount (String token, String channelName, String userAccount) |
abstract int | updatePreloadChannelToken (String token) |
abstract int | joinChannel (String token, String channelId, String optionalInfo, int uid) |
abstract int | joinChannel (String token, String channelId, int uid, ChannelMediaOptions options) |
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 int | leaveChannel () |
abstract int | leaveChannel (LeaveChannelOptions options) |
abstract int | renewToken (String token) |
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 | 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 | enableVideo () |
abstract int | disableVideo () |
abstract int | setVideoEncoderConfiguration (VideoEncoderConfiguration config) |
abstract CodecCapInfo[] | queryCodecCapability () |
abstract int | queryDeviceScore () |
abstract AgoraFocalLengthInfo[] | queryCameraFocalLengthCapability () |
abstract int | setCameraCapturerConfiguration (CameraCapturerConfiguration config) |
abstract int | setupLocalVideo (VideoCanvas local) |
abstract int | setupRemoteVideo (VideoCanvas remote) |
abstract int | setRemoteRenderMode (int uid, int renderMode) |
abstract int | setLocalRenderMode (int renderMode) |
abstract int | setRemoteRenderMode (int uid, int renderMode, int mirrorMode) |
abstract int | setLocalRenderMode (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 | startCameraCapture (Constants.VideoSourceType sourceType, CameraCapturerConfiguration config) |
abstract int | stopCameraCapture (Constants.VideoSourceType sourceType) |
abstract int | startLocalVideoTranscoder (LocalTranscoderConfiguration config) |
abstract int | stopLocalVideoTranscoder () |
abstract int | updateLocalTranscoderConfiguration (LocalTranscoderConfiguration config) |
abstract int | muteLocalVideoStream (boolean muted) |
abstract int | muteRemoteVideoStream (int uid, boolean muted) |
abstract int | muteAllRemoteVideoStreams (boolean muted) |
abstract int | setBeautyEffectOptions (boolean enabled, BeautyOptions options) |
abstract int | setBeautyEffectOptions (boolean enabled, BeautyOptions options, Constants.MediaSourceType sourceType) |
abstract int | setFaceShapeBeautyOptions (boolean enabled, FaceShapeBeautyOptions options) |
abstract int | setFaceShapeBeautyOptions (boolean enabled, FaceShapeBeautyOptions options, Constants.MediaSourceType sourceType) |
abstract FaceShapeBeautyOptions | getFaceShapeBeautyOptions () |
abstract FaceShapeBeautyOptions | getFaceShapeBeautyOptions (Constants.MediaSourceType sourceType) |
abstract int | setFaceShapeAreaOptions (FaceShapeAreaOptions options) |
abstract int | setFaceShapeAreaOptions (FaceShapeAreaOptions options, Constants.MediaSourceType sourceType) |
abstract FaceShapeAreaOptions | getFaceShapeAreaOptions (int shapeArea) |
abstract FaceShapeAreaOptions | getFaceShapeAreaOptions (int shapeArea, Constants.MediaSourceType sourceType) |
abstract int | setLowlightEnhanceOptions (boolean enabled, LowLightEnhanceOptions options) |
abstract int | setLowlightEnhanceOptions (boolean enabled, LowLightEnhanceOptions options, Constants.MediaSourceType sourceType) |
abstract int | setVideoDenoiserOptions (boolean enabled, VideoDenoiserOptions options) |
abstract int | setVideoDenoiserOptions (boolean enabled, VideoDenoiserOptions options, Constants.MediaSourceType sourceType) |
abstract int | setColorEnhanceOptions (boolean enabled, ColorEnhanceOptions options) |
abstract int | setColorEnhanceOptions (boolean enabled, ColorEnhanceOptions options, Constants.MediaSourceType sourceType) |
abstract int | enableVirtualBackground (boolean enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty) |
abstract int | enableVirtualBackground (boolean enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty, Constants.MediaSourceType sourceType) |
abstract int | setDefaultAudioRoutetoSpeakerphone (boolean defaultToSpeaker) |
abstract int | setEnableSpeakerphone (boolean enabled) |
abstract int | setRouteInCommunicationMode (int route) |
abstract boolean | isSpeakerphoneEnabled () |
abstract int | enableInEarMonitoring (boolean enabled) |
abstract int | enableInEarMonitoring (boolean enabled, int includeAudioFilters) |
abstract int | setInEarMonitoringVolume (int volume) |
abstract int | setLocalVoicePitch (double pitch) |
abstract int | setLocalVoiceFormant (double formantRatio) |
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 | enableVoiceAITuner (boolean enabled, Constants.VOICE_AI_TUNER_TYPE type) |
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 | setAINSMode (boolean enabled, int mode) |
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 | setAudioMixingPlaybackSpeed (int speed) |
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 (EchoTestConfiguration config) |
abstract int | stopEchoTest () |
abstract int | startLastmileProbeTest (LastmileProbeConfig config) |
abstract int | stopLastmileProbeTest () |
abstract int | setExternalAudioSource (boolean enabled, int sampleRate, int channels) |
abstract int | setExternalAudioSink (boolean enabled, int sampleRate, int channels) |
abstract int | pullPlaybackAudioFrame (byte[] data, int lengthInByte) |
abstract int | pullPlaybackAudioFrame (ByteBuffer data, int lengthInByte) |
abstract int | startRecordingDeviceTest (int indicationInterval) |
abstract int | stopRecordingDeviceTest () |
abstract int | startPlaybackDeviceTest (String audioFileName) |
abstract int | stopPlaybackDeviceTest () |
abstract int | createCustomAudioTrack (Constants.AudioTrackType trackType, AudioTrackConfig config) |
abstract int | destroyCustomAudioTrack (int trackId) |
abstract int | setExternalAudioSource (boolean enabled, int sampleRate, int channels, boolean localPlayback, boolean publish) |
abstract int | pushExternalAudioFrame (byte[] data, long timestamp) |
abstract int | pushExternalAudioFrame (ByteBuffer data, long timestamp, int trackId) |
abstract int | pushExternalAudioFrame (byte[] data, long timestamp, int sampleRate, int channels, Constants.BytesPerSample bytesPerSample, int trackId) |
abstract int | pushExternalAudioFrame (ByteBuffer data, long timestamp, int sampleRate, int channels, Constants.BytesPerSample bytesPerSample, int trackId) |
abstract int | setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType) |
abstract int | setExternalVideoSource (boolean enable, boolean useTexture, Constants.ExternalVideoSourceType sourceType, EncodedVideoTrackOptions encodedOpt) |
abstract boolean | pushExternalVideoFrame (VideoFrame frame) |
abstract int | pushExternalVideoFrameById (VideoFrame frame, int videoTrackId) |
abstract int | pushExternalVideoFrameById (AgoraVideoFrame frame, int videoTrackId) |
abstract int | pushExternalEncodedVideoFrame (ByteBuffer data, EncodedVideoFrameInfo frameInfo) |
abstract int | pushExternalEncodedVideoFrameById (ByteBuffer data, EncodedVideoFrameInfo frameInfo, int videoTrackId) |
abstract boolean | pushExternalVideoFrame (AgoraVideoFrame frame) |
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 (Constants.StreamFallbackOptions option) |
abstract int | setLocalPublishFallbackOption (int option) |
abstract int | setRemoteSubscribeFallbackOption (Constants.StreamFallbackOptions option) |
abstract int | setRemoteSubscribeFallbackOption (int option) |
abstract int | setHighPriorityUserList (int[] uidList, 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 | setSimulcastConfig (SimulcastConfig simulcastConfig) |
abstract int | setRemoteVideoStreamType (int uid, Constants.VideoStreamType streamType) |
abstract int | setRemoteVideoStreamType (int uid, int streamType) |
abstract int | setRemoteDefaultVideoStreamType (Constants.VideoStreamType streamType) |
abstract int | setRemoteDefaultVideoStreamType (int streamType) |
abstract int | setSubscribeAudioBlocklist (int[] uidList) |
abstract int | setSubscribeAudioAllowlist (int[] uidList) |
abstract int | setSubscribeVideoBlocklist (int[] uidList) |
abstract int | setSubscribeVideoAllowlist (int[] uidList) |
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 int | switchCamera (String cameraId) |
abstract boolean | isCameraZoomSupported () |
abstract boolean | isCameraTorchSupported () |
abstract boolean | isCameraFocusSupported () |
abstract boolean | isCameraExposurePositionSupported () |
abstract boolean | isCameraAutoFocusFaceModeSupported () |
abstract boolean | isCameraFaceDetectSupported () |
abstract boolean | isCameraExposureSupported () |
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 int | setCameraExposureFactor (int factor) |
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 int | writeLog (int level, String format, Object... args) |
abstract long | getNativeHandle () |
void | addHandler (IRtcEngineEventHandler handler) |
void | removeHandler (IRtcEngineEventHandler handler) |
abstract boolean | enableHighPerfWifiMode (boolean enable) |
abstract long | getNativeMediaPlayer (int sourceId) |
abstract int | queryScreenCaptureCapability () |
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 | startOrUpdateChannelMediaRelay (ChannelMediaRelayConfiguration channelMediaRelayConfiguration) |
abstract int | stopChannelMediaRelay () |
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 | registerFaceInfoObserver (IFaceInfoObserver receiver) |
abstract int | takeSnapshot (int uid, String filePath) |
abstract int | enableContentInspect (boolean enabled, ContentInspectConfig config) |
abstract int | loadExtensionProvider (String path) |
abstract int | registerExtension (String provider, String extension, Constants.MediaSourceType sourceType) |
abstract int | enableExtension (String provider, String extension, boolean enable) |
abstract int | enableExtension (String provider, String extension, boolean enable, Constants.MediaSourceType sourceType) |
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 String | getExtensionProperty (String provider, String extension, String key) |
abstract String | getExtensionProperty (String provider, String extension, String key, Constants.MediaSourceType sourceType) |
abstract int | setExtensionProviderProperty (String provider, String key, String value) |
abstract int | enableExtension (String provider, String extension, ExtensionInfo extensionInfo, boolean enable) |
abstract int | setExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key, String value) |
abstract String | getExtensionProperty (String provider, String extension, ExtensionInfo extensionInfo, String key) |
abstract int | startScreenCapture (ScreenCaptureParameters screenCaptureParameters) |
abstract int | setScreenCaptureScenario (Constants.ScreenScenarioType screenScenario) |
abstract int | stopScreenCapture () |
abstract int | setVideoScenario (Constants.VideoScenario scenarioType) |
abstract int | setVideoQoEPreference (Constants.QoEPreference qoePreference) |
abstract int | updateScreenCaptureParameters (ScreenCaptureParameters screenCaptureParameters) |
abstract int | registerVideoFrameObserver (IVideoFrameObserver observer) |
abstract IMediaPlayer | createMediaPlayer () |
abstract AgoraMediaRecorder | createMediaRecorder (RecorderStreamInfo info) |
abstract void | destroyMediaRecorder (AgoraMediaRecorder mediaRecorder) |
abstract IMediaPlayerCacheManager | getMediaPlayerCacheManager () |
abstract IH265Transcoder | getH265Transcoder () |
abstract int | enableExternalAudioSourceLocalPlayback (boolean enabled) |
abstract int | adjustCustomAudioPublishVolume (int trackId, int volume) |
abstract int | adjustCustomAudioPlayoutVolume (int trackId, 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 trackId, 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 | getNtpWallTimeInMs () |
abstract int | startMediaRenderingTracing () |
Start tracing media rendering events. More... | |
abstract int | enableInstantMediaRendering () |
Enable instant media rendering. More... | |
abstract int | setupAudioAttributes (AudioAttributes attr) |
abstract boolean | isFeatureAvailableOnDevice (int type) |
Whether the target feature is available for the device. More... | |
abstract int | sendAudioMetadata (byte[] metadata) |
Send audio metadata. More... | |
Static Public Member Functions | |
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 int | getRecommendedEncoderType () |
static String | getSdkVersion () |
static String | getMediaEngineVersion () |
static String | getErrorDescription (int error) |
Static Protected Attributes | |
static RtcEngineImpl | mInstance = null |
Main interface class of the Agora Native SDK.
Call the methods of this class to use all the functionalities of the SDK. Agora recommends calling the RtcEngine API methods in the same thread instead of in multiple threads. In previous versions, this class was named AgoraAudio, and was renamed to RtcEngine from version 1.0.
|
static |
Creates an RtcEngine instance.
Unless otherwise specified, all the methods provided by the RtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread.
context | The context of Android Activity. |
appId | The App ID issued to you by Agora. See How to get the App ID. Only users in apps with the same App ID can join the same channel and communicate with each other. Use an App ID to create only one RtcEngine instance. To change your App ID, call destroy to destroy the current RtcEngine instance and then call create to create an RtcEngine instance with the new App ID. |
handler | IRtcEngineEventHandler is an abstract class providing default implementation. The SDK uses this class to report to the app on SDK runtime events. |
Exception | Fails to create an RtcEngine instance. |
|
static |
Creates an RtcEngine instance.
The Agora Native SDK only supports one RtcEngine instance at a time, therefore the app should create one RtcEngine object only. Unless otherwise specified:
config | Configurations for the RtcEngine instance. For details, see {}. An RtcEngine object. Exception Fails to create an RtcEngine instance. |
|
static |
Releases all the resources used by the Agora SDK.
This method is useful for apps that occasionally make voice or video calls, to free up resources for other operations when not making calls.
|
abstract |
Sets the channel profile.
The RtcEngine differentiates channel profiles and applies different optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for a video broadcast.
joinChannel
. You cannot set the channel profile once you have joined the channel.profile | The channel profile:
|
|
abstract |
Sets the role of a user.
This method sets the user role as either BROADCASTER or AUDIENCE (default).
By default, all users are audience regardless of the channel profile. Call this method to change the user role to BROADCASTER so that the user can send a stream.
role | The role of the client:
|
|
abstract |
Sets the role of a user (LIVE_BROADCASTING
profile only).
This method sets the role of a user, such as a host or an audience (default), before joining a channel.
This method can be used to switch the user role after a user joins a channel. In the LIVE_BROADCASTING
profile, when a user switches user roles after joining a channel, a successful setClientRole method call triggers the following callbacks:
CLIENT_ROLE_BROADCASTER
(1): Host. A host can both send and receive streams.CLIENT_ROLE_AUDIENCE
(2): Audience, the default role. An audience can only receive streams. options Client role options of a user, see #ClientRoleOptions. 0(ERR_OK): Success.< 0: Failure.-1(ERR_FAILED): A general error occurs (no specified reason).-2(ERR_INVALID_ARGUMENT): The parameter is invalid.-7(ERR_NOT_INITIALIZED): The SDK is not initialized.
|
abstract |
Agora supports reporting and analyzing customized messages.
This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes.
To try out this function, contact support@agora.io and discuss the format of customized messages with us.
|
abstract |
Preload a channel.
This method enables users to preload a channel.
A successful call of this method will reduce the time of joining the same channel.
Note:
token | The token generated on your server for authentication. |
channelName | 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 character scopes are:
|
uid | The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2<h>32</h>-1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so. |
|
abstract |
Preload a channel.
This method enables users to preload a channel.
A successful call of this method will reduce the time of joining the same channel.
Note:
token | The token generated on your server for authentication. |
channelName | 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 character scopes are:
|
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:
|
|
abstract |
Update token of the preloaded channels.
An easy way to update all preloaded channels' tokens, if all preloaded channels use the same token.
If preloaded channels use different tokens, we need to call the 'preloadChannel' method with the same 'channelName' and 'uid' or 'userAccount' to update the corresponding token.
token | The token generated on your server for authentication. |
|
abstract |
Joins a channel.
Users in the same channel can talk to each other; and multiple users in the same channel can start a group chat. Note that users using different App IDs cannot call each other.
Once in a call, the user must call the leaveChannel method to exit the current call before entering another channel.
uid
s, that is, two users with the same uid. If you set uid
as 0, the system automatically assigns a user ID.token | The token for authentication.
|
channelId | The unique channel name for the AgoraRTC session in the string format. The string length must be less than 64 bytes. Supported character scopes are:
|
optionalInfo | (Optional) Additional information about the channel that you want to add. It can be set as a NULL string or channel related information. Other users in the channel will not receive this message. |
uid | (Optional) User ID: A 32-bit unsigned integer ranging from 1 to (2^32-1). It must be unique. If not assigned (or set to 0), the SDK assigns one and reports it in the onJoinChannelSuccess callback. Your app must record and maintain the returned value as the SDK does not maintain it. |
|
abstract |
Joins a channel with media options.
Users in the same channel can talk to each other; and multiple users in the same channel can start a group chat. Note that users using different App IDs cannot call each other.
Once in a call, the user must call the leaveChannel method to exit the current call before entering another channel.
uid
s, that is, two users with the same uid. If you set uid
as 0, the system automatically assigns a user ID.token | The token for authentication.
|
channelId | The unique channel name for the AgoraRTC session in the string format. The string length must be less than 64 bytes. Supported character scopes are:
|
uid | (Optional) User ID: A 32-bit unsigned integer ranging from 1 to (2^32-1). It must be unique. If not assigned (or set to 0), the SDK assigns one and reports it in the onJoinChannelSuccess callback. Your app must record and maintain the returned value as the SDK does not maintain it. |
options | The channel media options: ChannelMediaOptions. |
|
abstract |
Registers a user account.
Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and user account of the local user.
To join a channel with a user account, you can choose either of the following:
The difference between the two is that for the former, the time elapsed between calling the joinChannelWithUserAccount method and joining the channel is shorter than the latter.
userAccount
parameter. Otherwise, this method does not take effect.userAccount
parameter is unique in the channel.appId | The App ID of your project. |
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:
|
|
abstract |
Joins the channel with a user account.
After the user successfully joins the channel, the SDK triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.token | The token generated at your server:
|
channelName | The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
|
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:
|
options | The channel media options: ChannelMediaOptions |
|
abstract |
Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel.
After the user successfully joins the channel, the SDK triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile. Compared with RtcEngine#joinChannelWithUserAccount(String token, String channelName, String userAccount) joinChannelWithUserAccount}[1/2], this method has the options
parameter to configure whether the end user automatically subscribes to all remote audio and video streams in a channel when joining the channel. By default, the user subscribes to the audio and video streams of all the other users in the channel, thus incurring all associated usage costs. To unsubscribe, set the options
parameter or call the mute
methods accordingly.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. token The token generated at your server. For details, see Generate a token. channelName | The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are: |
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. |
options | The channel media options: ChannelMediaOptions. |
|
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.
userAccount | The user account of the user. Ensure that you set this parameter. |
userInfo | A userInfo object that identifies the user |
|
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.
uid | The user ID of the remote user. Ensure that you set this parameter. |
userInfo | A userInfo object that identifies the user |
|
abstract |
Leaves the channel.
This method allows a user to leave the channel, for example, by hanging up or exiting a call.
After joining a channel, the user must call this method to end the current call before joining another one. This method also releases all resources related to the call.
This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.
onLeaveChannel
callback.
|
abstract |
Leaves the channel.
options | The leave channel options. |
This method allows a user to leave the channel, for example, by hanging up or exiting a call.
This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.
onLeaveChannel
callback.
|
abstract |
Renews the token.
Once a token is enabled and used, it expires after a certain period of time.
Under the following circumstances, generate a new token on your server, and then call this method to renew it. Failure to do so results in the SDK disconnecting from the server.
ERR_TOKEN_EXPIRED(-109)
error is reported.token | The new token. |
|
abstract |
Gets the the Audio device Info
|
abstract |
Enables interoperability with the Agora Web SDK (Live Broadcast only).
Use this method when the channel profile is Live Broadcast. Interoperability with the Agora Web SDK is enabled by default when the channel profile is Communication.
enabled | Determines whether to enable interoperability with the Agora Web SDK.
|
|
abstract |
Gets the connection state of the SDK.
|
abstract |
Enables the audio.
The audio is enabled by default.
|
abstract |
Disables the audio.
|
abstract |
Disables the audio function in the channel.
Note: This method controls the underlying states of the Engine. It is still valid after one leaves channel.
|
abstract |
Enables the audio function in the channel.
|
abstract |
Sets the audio profile.
joinChannel
method.profile
as MUSIC_HIGH_QUALITY
(4).mAudioScenario
member.profile | Sets the sample rate, bitrate, encoding mode, and the number of channels. See AudioProfile. |
|
abstract |
Sets the audio parameters and application scenarios.
joinChannel
.profile
as MUSIC_HIGH_QUALITY
(4) and scenario
as AUDIO_SCENARIO_GAME_STREAMING
(3).profile | Sets the sample rate, bitrate, encoding mode, and the number of channels. See AudioProfile. |
scenario | Sets the audio application scenarios. See AudioScenario. |
|
abstract |
Sets high-quality audio preferences.
Call this method and set all the modes before joining a channel. Do NOT call this method again after joining a channel.
Note: Agora does not recommend using this method. If you want to set the audio profile, see setAudioProfile.
fullband | Full-band codec (48 kHz sampling rate), not compatible with versions before v1.7.4.
|
stereo | Stereo codec, not compatible with versions before v1.7.4.
|
fullBitrate | High bitrate. Recommended in voice-only mode.
|
|
abstract |
Adjusts the recording volume.
volume | Recording volume, ranges from 0 to 400:
|
|
abstract |
Adjusts the playback volume.
volume | Playback volume, ranges from 0 to 400:
|
|
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.
interval | Sets the time interval between two consecutive volume indications:
|
smooth | The 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. |
|
abstract |
Enables or disables the local audio capture.
The audio function is enabled by default. This method disables or re-enables the local audio function, that is, to stop or restart local audio capture and processing.
This method does not affect receiving or playing the remote audio streams, and enableLocalAudio
(false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.
enabled | Determines whether to disable or re-enable the local audio function:
|
|
abstract |
Stops or resumes sending the local audio stream.
muted | Determines whether to send or stop sending the local audio stream:
|
|
abstract |
Stops or resumes receiving the audio stream of a specified user.
You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
uid | The ID of the specified user. |
muted | Whether to stop receiving the audio stream of the specified user:
|
|
abstract |
Adjust the playback volume of the user specified by uid.
You can call this method to adjust the playback volume of the user specified by uid in call. If you want to adjust playback volume of the multi user, you can call this this method multi times.
uid | Remote user ID. |
volume | The playback volume, range is [0,100]: 0: mute, 100: The original volume |
|
abstract |
Stops or resumes receiving all remote audio streams.
This method works for all remote users that join or will join a channel using the joinChannel
method. It is equivalent to the autoSubscribeAudio
member in the ChannelMediaOptions class.
muteAllRemoteAudioStreams(true)
after joining a channel, the local use stops receiving any audio stream from any user in the channel, including any user who joins the channel after you call this method.muteAllRemoteAudioStreams(true)
after leaving a channel, the local user does not receive any audio stream the next time the user joins a channel.After you successfully call muteAllRemoteAudioStreams(true)
, you can take the following actions:
muteAllRemoteAudioStreams(false)
.muteRemoteAudioStream(uid, false)
, where uid
is the ID of the user whose audio stream you want to resume receiving.enableAudio
and disableAudio
. Settings in muteAllRemoteAudioStreams
stop taking effect if either of the following occurs:enableAudio
after muteAllRemoteAudioStreams(true)
.disableAudio
after muteAllRemoteAudioStreams(false)
.joinChannel
. To set whether to receive remote audio streams for a specific channel, Agora recommends using autoSubscribeAudio
in the ChannelMediaOptions
class.muted | Whether to stop receiving remote audio streams:
|
|
abstract |
Enables the video.
You can call this method either before joining a channel or during a call. If you call this method before entering a channel, the service starts the video; if you call it during a call, the audio call switches to a video call.
|
abstract |
Disables the video.
This method stops capturing the local video and receiving any remote video. To enable the local preview function, call enableLocalVideo (true).
|
abstract |
Sets the video encoder configuration.
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.
config | The local video encoder configuration: VideoEncoderConfiguration. |
|
abstract |
queryCodecCapability. query current device codec capacity. and will return actual codecCapInfo.
|
abstract |
Queries the score of the current device.
indicating better performance.0: The score of the current device. Most devices score between 60-100, with higher scores
< 0: Failure.
|
abstract |
Query all focal attributes supported by the camera.
|
abstract |
Sets the camera capturer configuration.
|
abstract |
Initializes the local video view.
This method initializes the video view of the local stream on the local device. It affects only the video view that the local user sees, not the published local video stream.
To unbind the local video from the view, set view
in VideoCanvas as null
.
local | The local video view setting: VideoCanvas. |
|
abstract |
Initializes the video view of a remote user.
This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees.
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
.
remote | The remote video view settings: VideoCanvas. |
|
abstract |
Updates the display mode of the video view of a remote user.
After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
uid | ID of the remote user. |
renderMode | Sets the remote display mode:
|
|
abstract |
Updates the display mode of the local video view.
After initializing the local video view, you can call this method to update its rendering mode. It affects only the video view that the local user sees, not the published local video stream.
renderMode | Sets the local display mode:
|
|
abstract |
Updates the display mode of the video view of a remote user.
After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
uid | ID of the remote user. |
renderMode | Sets the remote display mode:
|
mirrorMode | Sets the remote video mirror mode:
|
|
abstract |
Updates the display mode of the local video view.
After initializing the local video view, you can call this method to update its rendering mode. It affects only the video view that the local user sees, not the published local video stream.
renderMode | Sets the local display mode:
|
mirrorMode | Sets the local video mirror mode:
|
|
abstract |
Starts the local video preview before joining a channel.
Once you call this method to start the local video preview, if you leave the channel by calling leaveChannel, the local video preview remains until you call stopPreview to disable it.
|
abstract |
Starts the local video preview before joining a channel.
sourceType | - The video source type. |
|
abstract |
Stops the local video preview and the video.
|
abstract |
Stops the local video preview and the video.
sourceType | - The video source type. |
|
abstract |
Disables or re-enables the local video capture.
Once you enable the video using enableVideo, the local video is enabled by default. This method disables or re-enables the local video capture.
enableLocalVideo(false)
applies to scenarios when the user wants to watch the remote video without sending any video stream to the other user.
enableVideo
. Otherwise, this method may not work properly.enabled | Determines whether to disable or re-enable the local video, including the capturer, renderer, and sender:
|
|
abstract |
Starts video capture with a specified camera.
sourceType | - The video source type. |
config | - Camera capture configuration. See #CameraCapturerConfiguration. |
|
abstract |
Stops video capture with a specified camera.
sourceType | - The video source type. |
|
abstract |
Starts the local video with a transcoding video stream.
config | Sets the transcoding video stream layout settings. See LocalTranscoderConfiguration. |
|
abstract |
Stops a transcoding video stream.
|
abstract |
Update the video layout settings for the transcoding video stream.
config | Update the transcoding video stream layout settings. See LocalTranscoderConfiguration. |
|
abstract |
Stops or resumes sending the local video stream.
muted | Determines whether to send or stop sending the local video stream:
|
|
abstract |
Stops or resumes receiving the video stream of a specified user.
You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
uid | The ID of the specified user. |
muted | Whether to stop receiving the video stream of the specified user:
|
|
abstract |
Stops or resumes receiving all remote video streams.
This method works for all remote users that join or will join a channel using the joinChannel
method. It is equivalent to the autoSubscribeVideo
member in the ChannelMediaOptions class. Ensure that you call this method after joining a channel.
muteAllRemoteVideoStreams(true)
after joining a channel, the local use stops receiving any video stream from any user in the channel, including any user who joins the channel after you call this method.muteAllRemoteVideoStreams(true)
after leaving a channel, the local user does not receive any video stream the next time the user joins a channel.After you successfully call muteAllRemoteVideoStreams(true)
, you can take the following actions:
muteAllRemoteVideoStreams(false)
.muteRemoteVideoStream(uid, false)
, where uid
is the ID of the user whose video stream you want to resume receiving.enableVideo
and disableVideo
. Settings in muteAllRemoteVideoStreams
stop taking effect if either of the following occurs:enableVideo
after muteAllRemoteVideoStreams(true)
.disableVideo
after muteAllRemoteVideoStreams(false)
.joinChannel
. To set whether to receive remote audio streams for a specific channel, Agora recommends using autoSubscribeVideo
in the ChannelMediaOptions class.muted | Whether to stop receiving remote video streams:
|
|
abstract |
Enables/Disables image enhancement and sets the options.
enabled | Whether to enable image enhancement:
|
options | The image enhancement options. See BeautyOptions. |
|
abstract |
Enables/Disables image enhancement and sets the options.
enabled | Whether to enable image enhancement:
|
options | The image enhancement options. See BeautyOptions. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. 0: Success.< 0: Failure.ERR_NOT_SUPPORTED(4): The system version is earlier than Android 4.4, which does not support this function. |
|
abstract |
Enables/Disables face shape and sets the beauty options. @technical preview
enabled | Whether to enable face shape:
|
options | The face shape beauty options. See {FaceShapeBeautyOptions}. 0: Success.< 0: Failure.ERR_NOT_SUPPORTED(4): The system version is earlier than Android 4.4, which does not support this function. |
|
abstract |
Enables/Disables face shape and sets the beauty options. @technical preview
enabled | Whether to enable face shape:
|
options | The face shape beauty options. See {FaceShapeBeautyOptions}. sourceType The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See { Constants#MediaSourceType}. 0: Success.< 0: Failure.ERR_NOT_SUPPORTED(4): The system version is earlier than Android 4.4, which does not support this function. |
|
abstract |
Gets the face shape beauty options. @technical preview
|
abstract |
Gets the face shape beauty options. @technical preview
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. FaceShapeBeautyOptions |
|
abstract |
Sets the face shape area options. @technical preview
options | The face shape area options. See FaceShapeAreaOptions. |
|
abstract |
Sets the face shape area options. @technical preview
options | The face shape area options. See FaceShapeAreaOptions. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. 0: Success.< 0: Failure.ERR_NOT_SUPPORTED(4): The system version is earlier than Android 4.4, which does not support this function. |
|
abstract |
Gets the face shape area options. @technical preview
shapeArea | The face shape area. See io.agora.rtc2.video.FaceShapeAreaOptions. |
|
abstract |
Gets the face shape area options. @technical preview
shapeArea | The face shape area. See io.agora.rtc2.video.FaceShapeAreaOptions. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. FaceShapeAreaOptions |
|
abstract |
Sets low-light enhancement.
The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video.
You can call this method to enable the low-light enhancement feature and set the options of the low-light enhancement effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable low-light enhancement:
|
options | The low-light enhancement options. See {LowLightEnhanceOptions}. 0: Success.< 0: Failure. |
|
abstract |
Sets low-light enhancement.
The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video.
You can call this method to enable the low-light enhancement feature and set the options of the low-light enhancement effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable low-light enhancement:
|
options | The low-light enhancement options. See {LowLightEnhanceOptions}. sourceType The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See { Constants#MediaSourceType}. 0: Success.< 0: Failure. |
|
abstract |
Sets video noise reduction.
Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding.
You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable video noise reduction:
|
options | The video noise reduction options. See {VideoDenoiserOptions}. 0: Success.< 0: Failure. |
|
abstract |
Sets video noise reduction.
Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding.
You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable video noise reduction:
|
options | The video noise reduction options. See {VideoDenoiserOptions}. sourceType The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See { Constants#MediaSourceType}. 0: Success.< 0: Failure. |
|
abstract |
Sets color enhancement.
The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid.
You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable color enhancement:
|
options | The color enhancement options. See ColorEnhanceOptions. |
|
abstract |
Sets color enhancement.
The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid.
You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.
libagora_clear_vision_extension.so
dynamic library.enabled | Sets whether to enable color enhancement:
|
options | The color enhancement options. See ColorEnhanceOptions. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. 0: Success.< 0: Failure. |
|
abstract |
Enables/Disables portrait segmentation and repalce the background(not portrait area) with specified source.
enabled | Sets whether or not to enable capture image background subtitution:
|
backgroundSource | Sets the background source data. See {VirtualBackgroundSource}. segproperty 0: Success.< 0: Failure. VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_IMAGE_NOT_EXIST = -1, VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_COLOR_FORMAT_NOT_SUPPORTED = -2, VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_DEVICE_NOT_SUPPORTED = -3, |
|
abstract |
Enables/Disables portrait segmentation and repalce the background(not portrait area) with specified source.
enabled | Sets whether or not to enable capture image background subtitution:
|
VirtualBackgroundSource | Sets the background source data. See {VirtualBackgroundSource}. SegmentationProperty sourceType The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See { Constants#MediaSourceType}. 0: Success.< 0: Failure. VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_IMAGE_NOT_EXIST = -1, VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_COLOR_FORMAT_NOT_SUPPORTED = -2, VIRTUAL_BACKGROUND_SOURCE_STATE_REASON_DEVICE_NOT_SUPPORTED = -3, |
|
abstract |
Sets the default audio route.
Most mobile phones have two audio routes: an earpiece at the top, and a speakerphone at the bottom. The earpiece plays at a lower volume, and the speakerphone at a higher volume.
When setting the default audio route, you determine whether audio playback comes through the earpiece or speakerphone when no external audio device is connected.
Depending on the scenario, Agora uses different default audio routes:
Call this method before, during, or after a call, to change the default audio route. When the audio route changes, the SDK triggers the onAudioRouteChanged callback.
defaultToSpeaker | Whether to set the speakerphone as the default audio route:
|
|
abstract |
Enables or disables the speakerphone temporarily.
|
abstract |
Select preferred route in android communication mode.
route | The preferred route. For example, when a Bluetooth headset is connected, you can use this API to switch the route to a wired headset. |
|
abstract |
Checks whether the speakerphone is enabled.
|
abstract |
Enables in-ear monitoring.
enabled | Determines whether to enable in-ear monitoring.
|
|
abstract |
Enables in-ear monitoring.
enabled | Determines whether to enable in-ear monitoring.
|
includeAudioFilters | The type of the ear monitoring |
|
abstract |
Sets the volume of the in-ear monitoring.
volume | The volume of the in-ear monitor, ranging from 0 to 100. The default value is 100. |
|
abstract |
Sets the voice pitch of the local speaker.
pitch | Voice frequency, in the range of 0.5 to 2.0. The default value is 1.0. |
|
abstract |
Sets the voice formant ratio for local speaker.
formantRatio | Voice frequency, in the range of -1.0 to 1.0. The default value is 0.0. |
|
abstract |
Sets the local voice equalization effect.
bandFrequency | The band frequency ranging from 0 to 9; representing the respective 10-band center frequencies of voice effects, including 31, 62, 125, 500, 1k, 2k, 4k, 8k, and 16k Hz. Constants#AUDIO_EQUALIZATION_BAND_FREQUENCY |
bandGain | Gain of each band in dB; ranging from -15 to 15. |
|
abstract |
Sets the local voice reverberation.
reverbKey | The reverberation key. This method contains five reverberation keys. For details, see the description of each value. |
value | Local voice reverberation value: |
|
abstract |
Sets preset audio playback effect for remote headphones after remote audio is mixed.
preset | The preset key: #HEADPHONE_EQUALIZER_PRESET.
|
|
abstract |
Sets the parameters of audio playback effect for remote headphones after remote audio is mixed.
lowGain | The higher the parameter value, the deeper the sound. The value range is [-10,10]. |
highGain | The higher the parameter value, the sharper the sound. The value range is [-10,10]. |
|
abstract |
Sets an SDK preset audio effect.
Call this method to set an SDK preset audio effect for the local user who sends an audio stream. This audio effect does not change the gender characteristics of the original voice. After setting an audio effect, all users in the channel can hear the effect.
You can set different audio effects for different scenarios. See Set the Voice Effect.
|
abstract |
Sets an SDK preset voice beautifier effect.
Call this method to set an SDK preset voice beautifier effect for the local user who sends an audio stream. After setting a voice beautifier effect, all users in the channel can hear the effect.
You can set different voice beautifier effects for different scenarios. See Set the Voice Effect.
|
abstract |
Sets an SDK preset voice conversion effect.
Call this method to set an SDK preset voice conversion effect for the local user who sends an audio stream. After setting a voice conversion effect, all users in the channel can hear the effect.
You can set different voice conversion effects for different scenarios. See Set the Voice Effect.
|
abstract |
Sets parameters for SDK preset audio effects.
Call this method to set the following parameters for the local user who sends an audio stream:
After setting parameters, all users in the channel can hear the relevant effect.
setAudioProfile
and setting the scenario parameter to AUDIO_SCENARIO_GAME_STREAMING(3)
before calling this method.AUDIO_PROFILE_SPEECH_STANDARD(1)
; otherwise, this method call does not take effect.setAudioEffectParameters
:
preset | The options for SDK preset audio effects:
|
param1 |
|
param2 |
|
|
abstract |
Sets parameters for SDK preset voice beautifier effects.
Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream.
After you call this method successfully, all users in the channel can hear the relevant effect.
To achieve better audio effect quality, before you call this method, Agora recommends calling setAudioProfile, and setting the scenario parameter to AUDIO_SCENARIO_GAME_STREAMING(3)
and the profile parameter to AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)
or AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)
.
profile
parameter of setAudioProfile
to AUDIO_PROFILE_SPEECH_STANDARD(1)
; otherwise, this method call does not take effect.setVoiceBeautifierParameters
:
preset | The options for SDK preset voice beautifier effects:
|
param1 | The gender characteristics options for the singing voice:
|
param2 | The reverberation effects options:
|
|
abstract |
Set parameters for SDK preset voice conversion.
preset | The options for SDK preset audio effects. See #VOICE_CONVERSION_PRESET. |
param1 | reserved. |
param2 | reserved. |
|
abstract |
Enables/Disables stereo panning for remote users. Ensure that you call this method before joinChannel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling setRemoteVoicePosition.
enabled | Sets whether or not to enable stereo panning for remote users:
|
|
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.
uid | The ID of the remote user. |
pan | The sound position of the remote user. The value ranges from -1.0 to 1.0:
|
gain | Gain 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. |
|
abstract |
Enables or disables the voice AI tuner.
enabled | Determines whether to enable the voice AI tuner:
|
type. | The options for SDK voice AI tuner types. See #VOICE_AI_TUNER_TYPE. |
|
abstract |
Starts playing and mixing the music file.
This method mixes the specified local or online audio file with the audio stream from the microphone, or replaces the microphone’s audio stream with the specified local or remote audio file.
You can choose whether the other user can hear the local audio playback and specify the number of playback loops.
|
abstract |
Enables/Disables Agora AI Noise Suppression(AINS) with preset mode.
enabled | Sets whether or not to enable AINS.
|
mode | The preset AINS mode, range is [0,1,2]: 0: AINS mode with soft suppression level. 1: AINS mode with aggressive suppression level. 2: AINS mode with aggressive suppression level and low algorithm latency. |
|
abstract |
Starts playing and mixing the music file.
This method mixes the specified local or online audio file with the audio stream from the microphone, or replaces the microphone’s audio stream with the specified local or remote audio file.
You can choose whether the other user can hear the local audio playback and specify the number of playback loops.
|
abstract |
Stops playing or mixing the music file.
Call this method when you are in a channel.
|
abstract |
Pauses playing and mixing the music file.
Call this method when you are in a channel.
|
abstract |
Resumes playing and mixing the music file.
Call this method when you are in a channel.
|
abstract |
Adjusts the volume of audio mixing.
Call this method when you are in a channel.
volume | Audio mixing volume. The value ranges between 0 and 100 (default). |
|
abstract |
Adjusts the audio mixing volume for local playback.
volume | Audio mixing volume for local playback. The value ranges between 0 and 100 (default). |
|
abstract |
Adjusts the audio mixing volume for publishing (for remote users).
volume | Audio mixing volume for publishing. The value ranges between 0 and 100 (default). |
|
abstract |
Retrieves the audio mixing volume for local playback. This method helps troubleshoot audio volume related issues.
|
abstract |
Retrieves the audio mixing volume for publishing. This method helps troubleshoot audio volume related issues.
|
abstract |
Gets the duration (ms) of the music file.
Call this method when you are in a channel.
|
abstract |
Gets the playback position (ms) of the music file.
Call this method when you are in a channel.
|
abstract |
Sets the playback position (ms) of the music file to a different starting position (the default plays from the beginning).
pos | The playback starting position (ms) of the audio mixing file. |
|
abstract |
In dual-channel music files, different audio data can be stored on the left and right channels. According to actual needs, you can set the channel mode as the original mode, the left channel mode, the right channel mode or the mixed mode
mode | The mode of channel mode |
|
abstract |
Sets the pitch of the music file.
pitch | The pitch of the music file. |
|
abstract |
Sets the playback speed of the current music file.
speed | The playback speed. Agora recommends that you limit this value to between 50 and 400, defined as follows:
|
|
abstract |
select the track of the mixing music file.
Call this method after startAudioMixing is called.
audioIndex | Audio track index. The value begin from 0. |
|
abstract |
Get the audio track count of mixing music file.
Call this method After startAudioMixing is called.
|
abstract |
Gets the IAudioEffectManager object associated with the current RTC engine.
|
abstract |
Starts an audio recording.
The SDK allows recording during a call, which supports either one of the following formats:
Ensure that the directory to save the recording file exists and is writable. This method is usually called after the token, java.lang.String channelName, java.lang.String optionalInfo, int optionalUid) joinChannel method. The recording automatically stops when the leaveChannel method is called.
filePath | Full file path of the recording file. The string of the file name is in UTF-8 code. |
quality | Audio recording quality: |
|
abstract |
Starts an audio recording.
The SDK allows recording during a call, which supports either one of the following formats:
Ensure that the directory to save the recording file exists and is writable. This method is usually called after the token, java.lang.String channelName, java.lang.String optionalInfo, int optionalUid) joinChannel method. The recording automatically stops when the leaveChannel method is called.
config | audio file recording config |
|
abstract |
Stops the audio recording on the client.
Note: Call this method before calling leaveChannel, otherwise the recording automatically stops when the leaveChannel method is called.
|
abstract |
Starts a video call test.
config | The configuration of the echo test. |
|
abstract |
Stops an audio call test.
|
abstract |
Starts the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
|
abstract |
Stops the last-mile network probe test.
|
abstract |
Sets the external audio source.
joinChannel
.enabled | Determines whether to enable the external audio source:
|
sampleRate | The Sample rate (Hz) of the external audio source, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channels | The number of channels of the external audio source, which can be set as 1 or 2:
|
|
abstract |
Sets the external audio sink.
enabled | Sets whether or not to the external audio sink.
|
sampleRate | The sample rate (Hz) of the external audio sink. You can set this parameter as 16000, 32000, 44100, or 48000. |
channels | The number of audio channels of the external audio sink:
|
|
abstract |
Pulls the remote audio frame.
Before calling this method, call the int, int) method to enable and set the external audio sink.
Ensure that you call this method after joining a channel.
After a successful method call, the app pulls the decoded and mixed audio data for playback.
data | The audio data that you want to pull. The data format is in byte[]. |
lengthInByte | The data length (byte) of the external audio data. The value of this parameter is related to the audio duration, and the values of the sampleRate and channels parameters that you set in setExternalAudioSink. Agora recommends setting the audio duration no shorter than 10 ms. The formula for lengthInByte is: lengthInByte = sampleRate/1000 × 2 × channels × audio duration (ms). |
|
abstract |
Pulls the remote audio frame.
Before calling this method, call the setExternalAudioSink(enabled: true) method to enable and set the external audio sink.
Ensure that you call this method after joining a channel.
After a successful method call, the app pulls the decoded and mixed audio data for playback.
pullPlaybackAudioFrame
method successfully, the app will not retrieve any audio data from the int, int, int, int, ByteBuffer, long, int) onPlaybackFrame} callback.onPlaybackFrame
callback and the pullPlaybackAudioFrame
method is as follows:onPlaybackFrame
: The SDK sends the audio data to the app through this callback. Any delay in processing the audio frames may result in audio jitter.pullPlaybackAudioFrame
: The app pulls the remote audio data. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in the external audio playback.data | The audio data that you want to pull. The data format is in ByteBuffer. |
lengthInByte | The data length (byte) of the external audio data. The value of this parameter is related to the audio duration, and the values of the sampleRate and channels parameters that you set in setExternalAudioSink. Agora recommends setting the audio duration no shorter than 10 ms. The formula for lengthInByte is: lengthInByte = sampleRate/1000 × 2 × channels × audio duration (ms). |
|
abstract |
Starts the microphone test.
This method tests whether the microphone works properly. Once the test starts, the SDK uses the IRtcEngineEventHandler::onAudioVolumeIndication() callback to notify the application on the volume information.
indicationInterval | The time interval (ms) between which the SDK triggers the onAudioVolumeIndication() callback. |
|
abstract |
Stops the microphone test.
This method stops the microphone test. To stop the test, call this method after calling the startRecordingDeviceTest() method.
|
abstract |
Starts a playback device test.
This method tests whether the playback device works properly with the specified playback audio file.
audioFileName | File path of the audio file for the test, which is in utf8 absolute path: |
|
abstract |
Stops the playback device test.
This method stops testing the playback device. You must call this method to stop the test after calling [startPlaybackDeviceTest](startPlaybackDeviceTest:).
|
abstract |
Create a custom audio track and get the audio track id.
joinChannel
.trackType | The type of custom audio track:
|
config | The config of custom audio track: |
|
abstract |
Destroy custom audio track by trackId
trackId | The custom audio track id |
|
abstract |
Sets the external audio source.
joinChannel
.enabled | Determines whether to enable the external audio source:
|
sampleRate | The Sample rate (Hz) of the external audio source, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channels | The number of channels of the external audio source, which can be set as 1 or 2:
|
localPlayback | Enable/Disables the local playback of external audio track:
|
publish | Determines whether to publish the external audio track:
|
|
abstract |
Pushes the external audio data to the app.
data | The audio buffer data. |
timestamp | The timestamp of the audio data. |
|
abstract |
Pushes the external audio data to the app.
data | The audio buffer data. |
timestamp | The timestamp of the audio data. |
trackId | The audio track ID. |
|
abstract |
Pushes the external audio data to the app.
data | The audio buffer data. |
timestamp | The timestamp of the audio data. |
sampleRate | Sets the sample rate, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels
|
bytesPerSample | bytes per sample |
trackId | The audio track ID. |
|
abstract |
Pushes the external audio data to the app.
data | The audio buffer data. |
timestamp | The timestamp of the audio data. |
sampleRate | Sets the sample rate, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels
|
bytesPerSample | bytes per sample |
trackId | The audio track ID. |
|
abstract |
Sets the external video source.
Once the external video source is enabled, the SDK prepares to accept the external video frame.
enable | Determines whether to enable the external video source.
|
useTexture | Determines whether to use textured video data.
|
sourceType | Determines whether the external video source is encoded.
|
|
abstract |
Sets the external video source.
Once the external video source is enabled, the SDK prepares to accept the external video frame.
enable | Determines whether to enable the external video source.
|
useTexture | Determines whether to use textured video data.
|
sourceType | Determines whether the external video source is encoded.
|
encodedOpt | Determine encoded video track options including codec type, cc mode and target bitrate. |
|
abstract |
Pushes the video frame using the VideoFrame
class and passes the video frame to the Agora SDK.
Call the setExternalVideoSource method and set pushMode
as true
before calling this method. Otherwise, a failure returns after calling this method.
buffer
: Buffer The buffer of the video frame.rotation
: int Rotation of the video frame in degrees.timestampNs
: long Timestamp of the video frame in nanoseconds. In the COMMUNICATION
profile, the SDK does not support textured video frames. true
: The frame is pushed successfully.false
: Failed to push the frame.
|
abstract |
Pushes the external video frame to the app.
frame | The external video frame: VideoFrame. |
videoTrackId | The id of the video track. |
|
abstract |
Pushes the external video frame to the app with specified connection.
frame | The external video frame: ExternalVideoFrame. |
videoTrackId | The id of the video track. |
|
abstract |
Pushes the encoded external video frame to Agora SDK.
data | The encoded external video data, which must be the direct buffer. |
frameInfo | The encoded external video frame info: {EncodedVideoFrameInfo}. 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. |
|
abstract |
Pushes the encoded external video frame to the app with specified connection.
data | The encoded external video data, which must be the direct buffer. |
frameInfo | The 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. |
|
abstract |
Pushes the video frame using the AgoraVideoFrame class and passes the video frame to the Agora SDK.
Call the setExternalVideoSource method and set pushMode
as true
before calling this method. Otherwise, a failure returns after calling this method.
COMMUNICATION
profile, the SDK does not support textured video frames. true
: The frame is pushed successfully.false
: Failed to push the frame.
|
abstract |
Checks whether texture encoding is supported.
|
abstract |
Registers an audio frame observer object.
joinChannel
.observer | The IAudioFrameObserver interface, null means unregistering observer instead. |
|
abstract |
Registers an encoded audio frame observer object.
observer | The IAudioEncodedFrameObserver interface, null means unregistering observer instead. |
|
abstract |
Sets the audio recording format for the onRecordAudioFrame callback.
sampleRate | Sets the sample rate (samplesPerSec ) returned in the onRecordAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels (channels) returned in the onRecordAudioFrame callback:
|
mode | Sets the use mode of the onRecordAudioFrame callback:
|
samplesPerCall | Sets the number of samples the onRecordAudioFrame callback returns. In RTMP streaming scenarios, set it as 1024. |
sampleRate
, channel
, and samplesPerCall
parameters you set in this method. Sample interval (s) = samplePerCall/(sampleRate × channel). Ensure that the value of sample interval >= 0.01. The SDK triggers the onRecordAudioFrame
callback according to the sample interval.
|
abstract |
Sets the audio recording format for the onPlaybackAudioFrame callback.
sampleRate | Sets the sample rate (samplesPerSec ) returned in the onPlaybackAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels (channels) returned in the onPlaybackAudioFrame callback:
|
mode | Sets the use mode of the onPlaybackAudioFrame callback:
|
samplesPerCall | Sets the number of samples the onPlaybackAudioFrame callback returns. In RTMP streaming scenarios, set it as 1024. |
sampleRate
, channel
, and samplesPerCall
parameters you set in this method. Sample interval (s) = samplePerCall/(sampleRate × channel). Ensure that the value of sample interval >= 0.01. The SDK triggers the onPlaybackAudioFrame
callback according to the sample interval.
|
abstract |
Sets the mixed audio format for the onMixedAudioFrame callback.
sampleRate | Sets the sample rate (samplesPerSec ) returned in the onMixedAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels (channels) returned in the onPlaybackAudioFrame callback:
|
samplesPerCall | Sets the number of samples the onMixedAudioFrame callback returns. In RTMP streaming scenarios, set it as 1024. |
sampleRate
and samplesPerCall
parameters you set in this method. Sample interval (s) = samplePerCall/(sampleRate × channel). Ensure that the value of sample interval >= 0.01. The SDK triggers the onMixedAudioFrame
callback according to the sample interval.
|
abstract |
Sets the audio ear monitoring format for the onEarMonitoringAudioFrame callback.
sampleRate | Sets the sample rate (samplesPerSec ) returned in the onEarMonitoringAudioFrame callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Sets the number of audio channels (channels) returned in the onEarMonitoringAudioFrame callback:
|
mode | Sets the use mode of the onEarMonitoringAudioFrame callback:
|
samplesPerCall | Sets the number of samples the onEarMonitoringAudioFrame callback returns. In RTMP streaming scenarios, set it as 1024. |
sampleRate
, channel
, and samplesPerCall
parameters you set in this method. Sample interval (s) = samplePerCall/(sampleRate × channel). Ensure that the value of sample interval >= 0.01. The SDK triggers the onEarMonitoringAudioFrame
callback according to the sample interval.
|
abstract |
Adds a watermark image to the local video.
This method adds a PNG watermark image to the local video stream for the sampling device, channel audience, or CDN live audience to see and capture. To add the PNG file to a CDN live publishing stream, see the setLiveTranscoding method.
watermark | Watermark image to be added to the local video stream. See {Agora Image}. The URL descriptions are different for the local video and CDN live streams:
orientationMode as Adaptive in the {setVideoEncoderConfiguration} method, the watermark image rotates with the video frame around the upper left corner of the watermark image. |
|
abstract |
Adds a watermark image to the local video.
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.
|
abstract |
Removes the watermark image from the video stream added by {addVideoWatermark}. 0: Success.< 0: Failure.
|
abstract |
Sets the priority of a remote user's media stream.
Use this method with the setRemoteSubscribeFallbackOption method. If the fallback function is enabled for a subscribed stream, the SDK ensures the high-priority user gets the best possible stream quality.
uid | The ID of the remote user. |
userPriority | The priority of the remote user:
|
|
abstract |
Sets the fallback option for the locally published video stream based on the network conditions.
If option
is set as STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK will:
When the locally published video stream falls back to audio only or when the audio-only stream switches back to the video, the SDK triggers the {onLocalPublishFallbackToAudioOnly}. Ensure that you call this method before joining a channel. option The fallback option for the locally published video stream: io.agora.rtc.Constants#STREAM_FALLBACK_OPTION_DISABLED STREAM_FALLBACK_OPTION_DISABLED(0)}: (Default) No fallback behavior for the locally published video stream when the uplink network condition is poor. The stream quality is not guaranteed. io.agora.rtc.Constants#STREAM_FALLBACK_OPTION_AUDIO_ONLY STREAM_FALLBACK_OPTION_AUDIO_ONLY(2)}: The locally published video stream falls back to audio only when the uplink network condition is poor. Agora does not recommend using this method for CDN live streaming, because the remote CDN live user will have a noticeable lag when the locally published video stream falls back to audio only. 0: Success.< 0: Failure.
|
abstract |
Sets the fallback option for the remotely subscribed video stream based on the network conditions.
If option
is set as STREAM_FALLBACK_OPTION_AUDIO_ONLY(2), the SDK automatically switches the video from a high-stream to a low-stream, or disables the video when the downlink network condition cannot support both audio and video to guarantee the quality of the audio. The SDK monitors the network quality and restores the video stream when the network conditions improve. When the remotely subscribed video stream falls back to audio only, or the audio-only stream switches back to the video, the SDK triggers the {onRemoteSubscribeFallbackToAudioOnly} callback. Ensure that you call this method before joining a channel. option The fallback option for the remotely subscribed video stream: io.agora.rtc.Constants#STREAM_FALLBACK_OPTION_DISABLED STREAM_FALLBACK_OPTION_DISABLED(0)}: No fallback behavior for the remotely subscribed video stream when the downlink network condition is poor. The quality of the video stream is not guaranteed. io.agora.rtc.Constants#STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW(1)}: (Default) The remotely subscribed video stream falls back to the low-stream video when the downlink network condition worsens. This option works only for this method and not for the { io.agora.rtc.RtcEngine#setLocalPublishFallbackOption(int) setLocalPublishFallbackOption} method. io.agora.rtc.Constants#STREAM_FALLBACK_OPTION_AUDIO_ONLY STREAM_FALLBACK_OPTION_AUDIO_ONLY(2)}: Under poor downlink network conditions, the remotely subscribed video stream first falls back to the low-stream video; and then to an audio-only stream if the network condition worsens. 0: Success.< 0: Failure.
|
abstract |
Sets the high priority user list and related fallback option for the remotely subscribed video stream based on the network conditions in NASA2.
uidList | The id list of high priority users. |
option | The remote subscribe fallback option of high priority users. |
|
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.
enabled |
|
|
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.
enabled |
|
streamConfig |
|
|
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.
mode |
|
|
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.
mode |
|
streamConfig |
|
|
abstract |
Sets the multi-layer video stream configuration.
If multi-layer is configured, the subscriber can choose to receive the coresponding layer of video stream using setRemoteVideoStreamType.
simulcastConfig |
|
|
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.
uid | ID of the remote user sending the video stream. |
streamType | Sets the video stream type:
|
|
abstract |
Sets the default stream type of the remote video if the remote user has enabled dual-stream.
streamType | Sets the default video stream type:
|
|
abstract |
Sets the blocklist of subscribe remote stream audio.
uidList | The id list of users who do not subscribe to audio. |
|
abstract |
Sets the allowlist of subscribe remote stream audio.
uidList | The id list of users who do subscribe to audio. |
If a user is in the blocklist and allowlist at the same time, the user will not subscribe to audio.
|
abstract |
Sets the blocklist of subscribe remote stream video.
uidList | The id list of users who do not subscribe to video. |
|
abstract |
Sets the whitelist of subscribe remote stream video.
uidList | The id list of users who do subscribe to video. |
If a user is in the blacklist and whitelist at the same time, the user will not subscribe to video.
|
abstract |
Enables/Disables the built-in encryption.
In scenarios requiring high security, Agora recommends calling enableEncryption
to enable the built-in encryption before joining a channel.
All users in the same channel must use the same encryption mode and encryption key. Once all users leave the channel, the encryption key of this channel is automatically cleared.
enabled | Whether to enable the built-in encryption.
|
config | Configurations of built-in encryption schemas. See {EncryptionConfig}. 0: Success.< 0: Failure.-2(ERR_INVALID_ARGUMENT): An invalid parameter is used. Set the parameter with a valid value.-7(ERR_NOT_INITIALIZED: The SDK is not initialized. Initialize the IRtcEngine instance before calling this method.-4(ERR_NOT_SUPPORTED): The encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library. |
|
abstract |
Publishes the local stream without transcoding to a specified CDN live RTMP address. (CDN live only.)
The SDK returns the result of this method call in the onStreamPublished callback.
The startRtmpStreamWithoutTranscoding method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of adding a local stream to the CDN.
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
|
abstract |
Publishes the local stream with transcoding to a specified CDN live RTMP address. (CDN live only.)
The SDK returns the result of this method call in the onStreamPublished callback.
The startRtmpStreamWithTranscoding method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of adding a local stream to the CDN.
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
transcodingEnabled | Sets whether transcoding is enabled/disabled:
|
|
abstract |
Update the video layout and audio settings for CDN live. (CDN live only.)
transcoding | Sets the CDN live audio/video transcoding settings. See LiveTranscoding. |
|
abstract |
Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.)
This method removes the RTMP URL address (added by the startRtmpStreamWithoutTranscoding method or IRtcEngine::startRtmpStreamWithTranscoding "startRtmpStreamWithTranscoding" method) from a CDN live stream. The SDK returns the result of this method call in the onStreamUnpublished callback.
The stopRtmpStream method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of removing an RTMP stream from the CDN.
url | The RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes. |
|
abstract |
Creates a data stream.
You can call this method to create a data stream and improve the reliability and ordering of data transmission.
reliable
and ordered
.reliable | Sets whether the recipients are guaranteed to receive the data stream from the sender within five seconds:
|
ordered | Sets whether the recipients receive the data stream in the sent order:
|
|
abstract |
Creates a data stream.
Each user can create up to five data streams during the lifecycle of the RtcEngine.
config | The config of data stream. |
|
abstract |
Sends a data stream.
After calling createDataStream, you can call this method to send a data stream to all users in the channel.
The SDK has the following restrictions on this method:
After the remote user receives the data stream within 5 seconds, the SDK triggers the {onStreamMessage} callback on the remote client. After the remote user does not receive the data stream within 5 seconds, the SDK triggers the { IRtcEngineEventHandler#onStreamMessageError() onStreamMessageError} callback. Call this method after calling RtcEngine#createDataStream() createDataStream}.This method applies only to the COMMUNICATION
profile or to the hosts in the LIVE_BROADCASTING
profile. If an audience in the LIVE_BROADCASTING
profile calls this method, the audience may be switched to a host. streamId ID of the sent data stream returned by the { RtcEngine#createDataStream(boolean reliable, boolean ordered) createDataStream} method. message Sent data. 0: Success.< 0: Failure.
|
abstract |
Sets the video quality preferences.
preferFrameRateOverImageQuality | The video preference to be set:
|
|
abstract |
Sets the local video mirror mode.
Use this method before calling the startPreview method, or the mirror mode does not take effect until you call the startPreview
method again.
mode | Sets the local video mirror mode:
|
|
static |
Gets the recommended encoder type.
|
abstract |
Switches between front and rear cameras.
|
abstract |
Switches to appoint cameraId
|
abstract |
Checks whether the camera zoom function is supported.
|
abstract |
Checks whether the camera flash function is supported.
|
abstract |
Checks whether the camera manual focus function is supported.
|
abstract |
Checks whether the camera exposure function is supported.
Ensure that you call this method after the camera starts, for example, by calling startPreview
or joinChannel
.
|
abstract |
Checks whether the camera auto focus function is supported.
|
abstract |
Checks whether the camera face detect function is supported.
|
abstract |
Checks whether camera supports to set exposure value.
Ensure that you call this method after the camera starts, for example, by calling startPreview
or joinChannel
.
|
abstract |
Sets the camera zoom ratio.
factor | The camera zoom factor. It ranges from 1.0 to the maximum zoom supported by the camera. |
|
abstract |
Gets the maximum zoom ratio supported by the camera.
|
abstract |
Sets the manual focus position.
positionX | The horizontal coordinate of the touch point in the view. |
positionY | The vertical coordinate of the touch point in the view. |
|
abstract |
Sets the camera exposure position.
Ensure that you call this method after the camera starts, for example, by calling startPreview
or joinChannel
.
A successful setCameraExposurePosition method call triggers the onCameraExposureAreaChanged callback on the local client.
positionXinView | The horizontal coordinate of the touch point in the view. |
positionYinView | The vertical coordinate of the touch point in the view. |
|
abstract |
Enables the camera face detect.
enabled | Determines whether to enable the camera face detect.
|
|
abstract |
Enables the camera flash.
isOn | Determines whether to enable the camera flash.
|
|
abstract |
Enables the camera auto focus face function.
enabled | Determines whether to enable the camera auto focus face mode.
|
|
abstract |
Sets the camera exposure ratio.
factor | exposureFactor the recommended camera exposure factor ranging from -20 to 20 Absolute EV bias will set to camera. |
|
abstract |
Gets the current call ID.
When a user joins a channel on a client, a callId
is generated to identify the call.
After a call ends, you can call rate
or complain
to gather feedback from the customer. These methods require a callId
parameter. To use these feedback methods, call the this method first to retrieve the callId
during the call, and then pass the value as an argument in the rate
or complain
method after the call ends.
|
abstract |
Allows a user to rate the call.
It is usually called after the call ends.
callId | The call ID retrieved from the getCallId method. |
rating | The rating of the call between 1 (the lowest score) to 5 (the highest score). |
description | (Optional) The description of the rating. The string length must be less than 800 bytes. |
|
abstract |
Allows a user to complain about the call quality.
This method is usually called after the call ends.
callId | The call ID retrieved from the getCallId method. |
description | (Optional) The description of the complaint. The string length must be less than 800 bytes. |
|
static |
Gets the SDK version.
|
static |
Returns the media engine version.
|
abstract |
Specifies an SDK output log file.
The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable.
filePath | File path of the log file. The string of the log file is in UTF-8. |
|
abstract |
Sets the output log filter level of the SDK.
You can use one or a combination of the filters. The log level follows the sequence of OFF
, CRITICAL
, ERROR
, WARNING
, INFO
, and DEBUG
. Choose a level and you will see logs preceding that level. For example, if you set the log level to WARNING
, you see the logs within levels CRITICAL
, ERROR
, and WARNING
.
filter | Sets the log filter level:
|
|
abstract |
Sets the output log level of the SDK.
You can use one of the level defined in LogLevel.
level | Sets the log level: LogLevel. |
|
abstract |
Sets the log file size (KB).
The SDK has two log files, each with a default size of 512 KB. If you set fileSizeInBytes
as 1024 KB, the SDK outputs log files with a total maximum size of 2 MB. If the total size of the log files exceed the set value, the new output log files overwrite the old output log files.
fileSizeInKBytes | The SDK log file size (KB). |
|
abstract |
Upload current log file immediately to server. only use this when an error occurs block before log file upload success or timeout.
|
abstract |
Write the log to SDK . @technical preview
You can use one of the level defined in LogLevel.
level | Sets the log level: LogLevel. |
|
abstract |
Returns the native handler of the SDK Engine.
This interface is used to get native the C++ handler of the SDK engine that can be used in special scenarios, such as register the audio and video frame observer.
void io.agora.rtc2.RtcEngine.addHandler | ( | IRtcEngineEventHandler | handler | ) |
Adds the IRtcEngineEventHandler.
handler | The IRtcEngineEventHandler instance. |
void io.agora.rtc2.RtcEngine.removeHandler | ( | IRtcEngineEventHandler | handler | ) |
Removes the specified IRtcEngineEventHandler object.
For callback events that you only want to listen for once, call this method to remove subsequent IRtcEngineEventHandler objects after you have received them. This interface is used to remove the specific IRtcEngineEventHandler interface class instance.
handler | The IRtcEngineEventHandler object. |
|
abstract |
Enables the Wi-Fi mode.
enable | Whether to enable/disable the Wi-Fi mode:
|
|
abstract |
Returns the native handler of the mediaplayer.
|
static |
Gets the warning or error description.
error | The warning or error code. |
|
abstract |
Queries the ability of screen sharing to support the minimum frame rate.
|
abstract |
Monitors external headset device events.
monitor | Whether to enable monitoring external headset device events. True/False. |
|
abstract |
Monitors Bluetooth headset device events.
monitor | Whether to enable monitoring Bluetooth headset device events. True/False. |
|
abstract |
Sets the default audio route to the headset.
enabled | Sets whether or not the default audio route is to the headset:
|
|
abstract |
Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.
The JSON options are not public by default. Agora is working on making commonly used JSON options public in a standard way.
parameters | Parameter to be set as a JSON string in the specified format. |
|
abstract |
Queries internal states
parameters | JSON string |
|
abstract |
Gets the Agora SDK’s parameters for customization purposes. This method is not disclosed yet. Contact support@agora.io for more information.
|
abstract |
Registers the metadata observer.
You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.
|
abstract |
Unregisters the metadata observer.
observer | The IMetadataObserver class. |
type | The metadata type. Currently, the SDK supports {VIDEO_METADATA(0)} only. 0: Success.< 0: Failure. |
|
abstract |
Starts or update to relay media streams across channels.
After a successful method call, the SDK triggers the {onChannelMediaRelayStateChanged} callback, and this callback return the state of the media stream relay.If the onChannelMediaRelayStateChanged
callback returns RELAY_STATE_RUNNING(2)
and RELAY_OK(0)
, the SDK starts relaying media streams between the original and the destination channel.If the onChannelMediaRelayStateChanged
callback returns RELAY_STATE_FAILURE(3)
, an exception occurs during the media stream relay. Contact sales before implementing this function.We do not support string user accounts in this API.Call this method after the -us@ agora .iojoinChannel
method.This method takes effect only when you are a broadcaster in a Live-broadcast channel. v4.2.0 channelMediaRelayConfiguration The configuration of the media stream relay. See { io.agora.rtc2.video.ChannelMediaRelayConfiguration ChannelMediaRelayConfiguration}. 0: Success.< 0: Failure.-1(ERR_FAILED): A general error occurs (no specified reason).-2(ERR_INVALID_ARGUMENT): The argument is invalid.-5(ERR_REFUSED): The request is rejected.-8(ERR_INVALID_STATE): The current status is invalid, only allowed to be called when the role is the broadcaster.
|
abstract |
Stops the media stream relay.
Once the relay stops, the broadcaster quits all the destination channels. After a successful method call, the SDK triggers the {onChannelMediaRelayStateChanged} callback. If the callback returns RELAY_STATE_IDLE(0)
and RELAY_OK(0)
, the broadcaster successfully stops the relay. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged
callback with the RELAY_ERROR_SERVER_NO_RESPONSE(2)
or RELAY_ERROR_SERVER_CONNECTION_LOST(8)
state code. You can leave the channel by calling the leaveChannel() leaveChannel} method, and the media stream relay automatically stops. 0: Success.< 0: Failure.-1(ERR_FAILED): A general error occurs (no specified reason).-2(ERR_INVALID_ARGUMENT): The argument is invalid.-5(ERR_REFUSED): The request is rejected.-7(ERR_NOT_INITIALIZED): cross channel media streams are not relayed.
|
abstract |
pause the channels for media stream relay.
|
abstract |
resume the channels for media stream relay.
|
abstract |
Updates the channel media options after joining the channel.
options | The channel media options: ChannelMediaOptions. |
|
abstract |
Mute or resume recording signal volume.
muted | Determines whether to mute or resume the recording signal volume.
|
|
abstract |
Sets the audio playback format before mixing for the onPlaybackAudioFrameBeforeMixing callback.
sampleRate | Sets the sample rate (samplesPerSec ) returned in the onPlaybackAudioFrameBeforeMixing callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz. |
channel | Number of channels of the audio data returned in onPlaybackAudioFrameBeforeMixing , which can be set as 1 or 2:
|
sampleRate
and channel
parameters you set in this method. Ensure that the value of sample interval >= 0.01. The SDK triggers the onPlaybackAudioFrameBeforeMixing
callback according to the sample interval.
|
abstract |
Enable the audio spectrum monitor.
intervalInMS | Sets the time interval(ms) between two consecutive audio spectrum callback. The default value is 100. This param should be larger than 10. |
|
abstract |
Disalbe the audio spectrum monitor.
|
abstract |
Registers an audio spectrum observer.
You need to implement the IAudioSpectrumObserver
class in this method, and register the following callbacks according to your scenario:
observer | A pointer to the audio spectrum observer: IAudioSpectrumObserver. |
|
abstract |
Releases the audio spectrum observer.
observer | The pointer to the audio spectrum observer: IAudioSpectrumObserver. |
|
abstract |
Gets the volume of the audio effects.
|
abstract |
Sets the volume of audio effects.
volume | The volume of audio effects. The value ranges between 0.0 and 100.0 (default). |
|
abstract |
Preloads a specified audio effect.
This method preloads only one specified audio effect into the memory each time it is called. To preload multiple audio effects, call this method multiple times.
After preloading, you can call playEffect to play the preloaded audio effect or call playAllEffects to play all the preloaded audio effects.
soundId | The ID of the audio effect. |
filePath | The absolute path of the local audio effect file or the URL of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav. |
|
abstract |
Preloads a specified audio effect.
This method preloads only one specified audio effect into the memory each time it is called. To preload multiple audio effects, call this method multiple times.
After preloading, you can call playEffect to play the preloaded audio effect or call playAllEffects to play all the preloaded audio effects.
soundId | The ID of the audio effect. |
filePath | The absolute path of the local audio effect file or the URL |
startPos | The start position of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav. |
|
abstract |
Plays a specified audio effect.
After calling preloadEffect, you can call this method to play the specified audio effect for all users in the channel.
This method plays only one specified audio effect each time it is called. To play multiple audio effects, call this method multiple times.
soundId | The ID of the audio effect. |
filePath | The absolute path of the local audio effect file or the URL of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav. |
loopCount | The number of times the audio effect loops: |
|
abstract |
Plays a specified audio effect.
After calling preloadEffect, you can call this method to play the specified audio effect for all users in the channel.
This method plays only one specified audio effect each time it is called. To play multiple audio effects, call this method multiple times.
soundId | The ID of the audio effect. |
filePath | The absolute path of the local audio effect file or the URL of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac, 3gp, mkv and wav. |
loopCount | The number of times the audio effect loops: |
|
abstract |
Plays all audio effects.
After calling preloadEffect multiple times to preload multiple audio effects into the memory, you can call this method to play all the specified audio effects for all users in the channel.
loopCount | The number of times the audio effect loops: |
|
abstract |
Get the volume of a specified sound effect.
soundId | The ID of the audio effect. |
|
abstract |
Sets the volume of the specified audio effect.
soundId | The ID of the audio effect. |
volume | The volume of the specified audio effect. The value ranges between 0.0 and 100.0 (default). |
|
abstract |
Pauses playing the specified audio effect.
soundId | The ID of the audio effect. |
|
abstract |
Pauses playing all audio effects.
|
abstract |
Resumes playing the specified audio effect.
soundId | The ID of the audio effect. |
|
abstract |
Resumes playing all audio effects.
|
abstract |
Stops playing the specified audio effect.
soundId | The ID of the audio effect. |
|
abstract |
Stops playing all audio effects.
|
abstract |
Releases the specific preloaded audio effect from the memory.
soundId | The ID of the audio effect. |
|
abstract |
Releases all preloaded audio effects from the memory.
|
abstract |
Gets the duration of the audio effect file.
filePath | The file path of a local file, including the filename extensions. Agora supports using a URI address, an absolute path, or a path that starts with /assets/. Note: You might encounter permission issues if you use an absolute path to access a local file, so Agora recommends using a URI address instead. For example: "content://com.android.providers.media.documents/document/audio%3A14441". |
|
abstract |
Sets the playback position of an audio effect file.
After a successful setting, the local audio effect file starts playing at the specified position.
playEffect
.soundId | Audio effect ID. Ensure that this parameter is set to the same value as in playEffect . |
pos | The playback position (ms) of the audio effect file. |
|
abstract |
Gets the playback position of the audio effect file.
playEffect
.soundId | Audio effect ID. Ensure that this parameter is set to the same value as in playEffect . |
|
abstract |
Registers a receiver object for the encoded video image.
receiver | The IVideoEncodedFrameObserver object: {IVideoEncodedFrameObserver}. 0: Success.< 0: Failure. |
|
abstract |
Registers an face info observer object.
observer | A pointer to the face info observer object: IFaceInfoObserver. |
|
abstract |
Registers an extension. Normally, you should call this function immediately after initializing the engine. Once an extension is registered, the SDK will automatically create and add it to the pipeline.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. 0: Success.< 0: Failure. |
|
abstract |
Enable/Disable an extension. By calling this function, you can dynamically enable/disable the extension without changing the pipeline. For example, enabling/disabling Extension_A means the data will be adapted/bypassed by Extension_A.
NOTE: For compatibility reasons, if you haven't call registerExtension, enableExtension will automatically register the specified extension. We suggest you call registerExtension explicitly.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
enable | Whether to enable the extension:
|
|
abstract |
Enable/Disable an extension. By calling this function, you can dynamically enable/disable the extension without changing the pipeline. For example, enabling/disabling Extension_A means the data will be adapted/bypassed by Extension_A.
NOTE: For compatibility reasons, if you haven't call registerExtension, enableExtension will automatically register the specified extension. We suggest you call registerExtension explicitly.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
enable | Whether to enable the extension:
|
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. 0: Success.< 0: Failure. |
|
abstract |
Sets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | The key of the extension. |
value | The JSON formatted value of the extension key. |
|
abstract |
Sets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | The key of the extension. |
value | The JSON formatted value of the extension key. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. true, if get property success, otherwise false |
|
abstract |
Gets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | The key of the extension. |
|
abstract |
Gets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | The key of the extension. |
sourceType | The source type of the extension, e.g. PRIMARY_CAMERA_SOURCE. See {}. JSON formatted string of property's value; return null if failed |
|
abstract |
Sets the provider property of an extension.
provider | The name of the extension provider, e.g. agora.io. |
key | The key of the extension. |
value | The JSON formatted value of the extension key. |
|
abstract |
Enable/Disable an extension. By calling this function, you can dynamically enable/disable the extension without changing the pipeline. For example, enabling/disabling Extension_A means the data will be adapted/bypassed by Extension_A.
NOTE: For compatibility reasons, if you haven't call registerExtension, enableExtension will automatically register the specified extension. We suggest you call registerExtension explicitly.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. See ExtensionInfo. |
enable | Whether to enable the extension:
|
|
abstract |
Sets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. See ExtensionInfo. |
key | The key of the extension. |
value | The JSON formatted value of the extension key. |
|
abstract |
Gets the properties of an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. See ExtensionInfo. |
key | The key of the extension. |
|
abstract |
Starts screen sharing.
During screen sharing, make sure the user has granted screen capture permission to the application and the Android API level is not earlier than 21; otherwise, the SDK reports error codes ERR_SCREEN_CAPTURE_PERMISSION_DENIED(16) and ERR_SCREEN_CAPTURE_SYSTEM_NOT_SUPPORTED(2). To capture system audio during screen sharing, ensure that the Android API level is not earlier than 29 as well; otherwise, the SDK reports the error code ERR_SCREEN_CAPTURE_SYSTEM_AUDIO_NOT_SUPPORTED(3).
android.permission.FOREGROUND_SERVICE
) to the /app/Manifests/AndroidManifest.xml
file.ScreenCaptureParameters
. When you do not pass in these value, Agora bills you at 1280 × 720; when you pass in these values, Agora bills you at those value. For details, see Pricing for Real-time Communication.screenCaptureParameters | The configuration of the screen sharing. See {ScreenCaptureParameters}. 0: Success.< 0: Failure. |
|
abstract |
Sets the screen sharing scenario.
When you start screen sharing, you can call this method to set the screen sharing scenario. The SDK adjusts the video quality and experience of the sharing according to the scenario.
screenScenario | The screen sharing scenario. See #ScreenScenarioType. |
|
abstract |
Stops screen sharing.
After calling this method to stop screen sharing
|
abstract |
You can call this method to set the expected video scenario. The SDK will optimize the video experience for each scenario you set.
scenarioType | The video application scenario. |
|
abstract |
Sets the video qoe preference.
qoePreference | he qoe preference type. |
|
abstract |
Updates the screen sharing configuration.
screenCaptureParameters | The configuration of the screen sharing. See {ScreenCaptureParameters}. Note: This parameter is only available for scenarios where captureVideo is true . 0: Success.< 0: Failure. |
|
abstract |
Registers a video frame observer object.
You need to implement the IVideoFrameObserver class in this method, and register callbacks according to your scenarios.
After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
width
and height
parameters, which may be adapted under the following circumstances:observer | Video frame observer object instance. See {IVideoFrameObserver}. 0: Success.< 0: Failure. |
|
abstract |
Create a media player
You can use this function to create a ffmpeg or simple media player
|
abstract |
Create a media recorder
You can use this function to create a media recorder
info | The RecorderStreamInfo object. It contains user ID and channel name of user. |
|
abstract |
Destroy a media player source instance. This method releases the RtcEngine
object and all other resources used by the AgoraMediaRecorder
object. After calling this method, if you want to enable the recording again, you must call getMediaRecorder to get the AgoraMediaRecorder
object.
mediaRecorder | The Object of AgoraMediaRecorder. |
|
abstract |
get an MediaPlayerCacheManager instance, which is used to set and manage the player cache, implemented in the form of a singleton, independent of the player.
|
abstract |
get an H265Transcoder instance, which is used to
|
abstract |
Enable or disable the external audio source local playback.
enabled | Determines whether to enable the external audio source local playback: |
|
abstract |
Adjust the custom audio publish volume by source id.
trackId | The custom audio track id. |
volume | The volume, range is [0,100]: 0: mute, 100: The original volume |
|
abstract |
Adjust the custom audio playout volume by source id.
trackId | The custom audio track id. |
volume | The volume, range is [0,100]: 0: mute, 100: The original volume |
|
abstract |
Enables the rhythm player.
sound1 | The absolute path or URL address (including the filename extensions) of the file for the downbeat. |
sound2 | The absolute path or URL address (including the filename extensions) of the file for the upbeats. |
{ |
|
abstract |
Disables the rhythm player.
|
abstract |
Configures the rhythm player.
{ |
|
abstract |
Set audio parameters for direct streaming to CDN
Must call this api before "startDirectCdnStreaming"
profile | Sets the sample rate, bitrate, encoding mode, and the number of channels: #AUDIO_PROFILE_TYPE. |
|
abstract |
Set video parameters for direct streaming to CDN
Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
config | The local video encoder configuration: VideoEncoderConfiguration. |
|
abstract |
Start direct cdn streaming
eventHandler | A pointer to the direct cdn streaming event handler. "IDirectCdnStreamingEventHandler". |
publishUrl | The url of the cdn used to publish the stream. |
options | The direct cdn streaming media options: DirectCdnStreamingMediaOptions. This API must pass an audio-related option, and temporarily cannot pass more than one. For video-related options, you can either choose to not pass any, or only one. |
|
abstract |
Stop direct cdn streaming
|
abstract |
Change the media source during the pushing
options | The direct cdn streaming media options: DirectCdnStreamingMediaOptions. |
|
abstract |
Get an custom video track id created by internal,which could used to publish or preview
|
abstract |
Get an custom encoded video track id created by internal,which could used to publish or preview
|
abstract |
destroy a created custom video track id
video_track_id | The video track id which was created by createCustomVideoTrack |
|
abstract |
destroy a created custom encoded video track id
video_track_id | The video track id which was created by createCustomEncodedVideoTrack |
|
abstract |
Sets the Agora cloud proxy service.
When the user's firewall restricts the IP address and port, refer to Use Cloud Proxy to add the specific IP addresses and ports to the firewall whitelist; then, call this method to enable the cloud proxy and set the proxyType
parameter as TRANSPORT_TYPE_UDP_PROXY(1)
, which is the cloud proxy for the UDP protocol.
|
abstract |
set local access point addresses in local proxy mode, use this method before join channel.
config | Configurations for local access point. For details, see {LocalAccessPointConfiguration} |
|
abstract |
Sets the external audio track.
trackId | custom audio track id. |
enabled | Enable/Disables the local playback of external audio track:
|
|
abstract |
set advanced audio option
options | advanced audio option. |
|
abstract |
Bind local user and a remote user as an audio&video sync group. The remote user is defined by cid and uid. There’s a usage limit that local user must be a video stream sender. On the receiver side, media streams from same sync group will be time-synced
channelId | The channel id |
uid | The user ID of the remote user to be bound with (local user) |
|
abstract |
Enable or disable video image source to replace the current video source published or resume it
enabled | true for enable, false for disable |
options | options for image track |
|
abstract |
Turn WIFI acceleration on or off.
enabled |
|
|
abstract |
Get network type
|
abstract |
Return current NTP(unix timestamp) time in milliseconds.
|
abstract |
Start tracing media rendering events.
IRtcEngineEventHandler.onVideoRenderingTracingResult
RtcEngine.joinChannel
is called.RtcEngine
instance before calling this method.
|
abstract |
Enable instant media rendering.
RtcEngine
instance before calling this method.
|
abstract |
配置AudioAttribute
AudioAttributes |
|
abstract |
Whether the target feature is available for the device.
type | The feature type. |
|
abstract |
Send audio metadata.
metadata | Audio Metadata. |