Release Notes
Sunset plan
This section provides sunset plans for the Agora Video SDK v3.x. You should prepare to replace or upgrade affected solutions in a timely fashion to avoid service disruptions.
Date | Milestone |
---|---|
14 March 2023 - 31 December 2024 | We will no longer offer version 3.x of our Video and Voice SDK to new customers while supporting existing implementations of 3.x with bug fixes and critical security updates. |
31 December 2024 | We will stop supporting version 3.x. |
To use Agora Video SDK v4.x, see Migrate from Video SDK 3.x.
This page provides the release notes for the Agora Voice SDK for Android.
v3.7.2
v3.7.2 was released on November 2, 2022.
Security enhancements
To increase the security of the SDK, Agora updates the third-party open-source libraries used by the SDK in this release as follows:
- OpenSSL: Upgrade from 1.1.1l to 1.1.1q.
- zlib: Upgrade from 1.2.11 to 1.2.12.
- FFmpeg: Adds security patches CVE-2021-38114 and CVE-2021-38291.
Improvements
-
Virtual background
Because the user's image can be broken, for example, if the user downloads an incomplete image or a virus on the user's device damages the image, this release adds compatibility with broken images in the virtual background feature and supports setting some broken images as virtual backgrounds.
-
Bluetooth permissions
Due to Android 12.0 system limitations, you need to add the additional
BLUETOOTH_CONNECT
permission during integration; otherwise, users with devices running Android 12.0 or later cannot use Bluetooth properly. To simplify the integration steps and reduce the dependency of apps on permissions, this release adapts to the Android 12.0 Bluetooth scenario so that your app no longer depends on theBLUETOOTH_CONNECT
permission.
Fixed issues
This release fixes the following issues:
- The SDK did not support reporting end-to-end packet loss rate under some network conditions.
- The virtual metronome did not perform as expected; for example, audio in the MP3 format was not supported, and the beats played were sometimes incorrect.
- In the communication channel profile, when a user who was using a Bluetooth headset for a call left and then rejoined a channel, the sound was played through the speaker instead of the Bluetooth headset.
- Occasionally, the
onFacePositionChanged
callback reported empty data after you calledenableFaceDetection
to enable the local face detection. - Crashes occurred when you called
playEffect
multiple times to play audio effects, each time thesoundId
value increased progressively, and each time you did not callstopEffect
orstopAllEffects
to stop playing the audio effects. - When you called
setAudioMixingPosition
to set the position of the music file to play at 36 minutes or later, the music started playing from the beginning instead of from the specified position.
v3.7.1
v3.7.1 was released on August 4, 2022.
Compatibility changes
To facilitate troubleshooting, as of this release, the SDK no longer catches exceptions that are thrown by your own code implementation when triggering callbacks in the IRtcEngineEventHandler
class. You need to catch and handle the exceptions yourself; otherwise, it can cause a crash.
Improvements
1. Co-hosting across channels
This release enhances the connection mechanism between the SDK and the server of co-hosting across channels and therefore reduces the failure rate.
Fixed issues
- Occasional crashes occurred.
- The captured volume was too low on specific devices such as Samsung Galaxy S20+ and Note10+.
- The local user received the
onRemoteAudioStateChanged(2,6)
callback after disconnecting from and reconnecting to a network even though the remote user had not changed the audio state. - gatewayRtt reported by the
onRtcStats
callback was inaccurate when the network latency was too high or the router did not respond to ICMP packets. - Occasionally, it took users longer than normal to join a channel for the first time.
v3.7.0.2
v3.7.0.2 was released on June 6, 2022 and improved the stability of the SDK.
v3.7.0.1
v3.7.0.1 was released on May 9, 2022.
This release fixed echoes and compatibility issues that occasionally occurred on some devices.
v3.7.0
v3.7.0 was released on April 11, 2022.
Compatibility changes
Changes to the implementation fields of dynamic libraries
When you integrate the Android SDK with Maven Central, you can reduce the size of your app after integrating the SDK by modifying the implementation
field in dependencies
in the /Gradle Scripts/build.gradle(Module: .app)
file to specify the desired dynamic libraries. See Reduce App Size for details.
To align the implementation
fields of the same dynamic library in the Video and Audio SDKs, this release changes the implementation
fields of the following dynamic libraries:
Dynamic libraries | implementation field(v3.6.2) | implementation field (v3.7.0 and later) |
---|---|---|
Deep-learning noise reduction library:libagora_ai_denoise_extension.so | io.agora.rtc:full-ains | io.agora.rtc::ains |
Full-format audio decoding library:libagora_full_audio_format_extension.so | io.agora.rtc:full-full-audio-format | io.agora.rtc:full-audio-format |
New features
1. Spatial audio effect
This release adds the feature of spatial audio effect, which can add a sense of space to remote users' audio and simulate the audio transmission process in the real world. This enables the local user to hear remote users with the spatial audio effect.
To use this feature, contact support@agora.io.
2. Local voice pitch
This release adds the enableLocalVoicePitchCallback
method and the onLocalVoicePitchInHz
callback, to allow the SDK to report the voice pitch of the local user at the set time interval to the app.
3. Reporting the user role switch failure
This release adds the onClientRoleChangeFailed
callback to report the reason for a user role switch failure and the current user role in the interactive live streaming.
4. Reasons for connection state changes
To help users better understand the cause of connection state changes, this release adds the following enumerators:
CONNECTION_CHANGED_SAME_UID_LOGIN(19)
: Join the same channel from different devices using the same user ID.CONNECTION_CHANGED_TOO_MANY_BROADCASTERS(20)
: The number of hosts in the channel reaches the upper limit. This enumerator is reported only after the support for 128 hosts is enabled.
Improvements
1. Channel capacity improvement
As of this release, a single channel can support up to 128 concurrent online hosts, who can publish audio streams at the same time. The number of audience members in a channel is unlimited. Each host or audience member can subscribe to a maximum of 50 hosts at the same time.
To experience this improvement, contact support@agora.io.
2. A new version of deep-learning noise reduction
Agora has added the option of using a new version of deep-learning noise reduction to further improve audio quality. To experience this feature, contact support@agora.io
3. playEffect improvements
This release improves the internal implementation logic of playEffect
to avoid blocking and reduce freezing when playing an audio effect file.
4. Transmission upgrade
This release upgrades transmission protocols and algorithms to enhance the SDK's ability to counter poor network conditions.
API changes
Added
enableLocalVoicePitchCallback
onLocalVoicePitchInHz
onClientRoleChangeFailed
CONNECTION_CHANGED_SAME_UID_LOGIN(19)
andCONNECTION_CHANGED_TOO_MANY_BROADCASTERS(20)
Deprecated
- Warning code
WARN_SET_CLIENT_ROLE_NOT_AUTHORIZED
. Usereason
reported inonClientRoleChangeFailed
instead.
v3.6.2
v3.6.2 was released on February 22, 2022.
New features
1. Removing extension libraries when using Maven Central
Extension libraries are dynamic libraries that can be optionally integrated into a project. As of v3.6.2, when you integrate the Android SDK with Maven Central, Agora supports reducing the size of your app after integrating the SDK by modifying dependencies
in the /Gradle Scripts/build.gradle(Module: .app)
file to specify the desired dynamic libraries and exclude unnecessary extension libraries. For details about the sample code and the implementation
field in dependencies
, see Reduce App Size.
2. Loading .so files dynamically
This release adds the setAgoraLibPath
method for setting the directory of .so
files. After a successful method call, the SDK dynamically loads .so
files based on your specified directory when the app is running. This feature can help reduce the size of your app package. For detailed instructions, see Reduce App Size.
3. Passing in native TextureView
This release adds support for directly using Android native TextureView
. You can pass a native TextureView
directly to VideoCanvas.view
instead of calling CreateTextureView
to get a TextureView
object and then passing it to VideoCanvas.view
. After setting VideoCanvas
, you can call setupLocalVideo
and setupRemoteVideo
to initialize the local and remote user views.
Improvements
1. Cloud proxy
To enrich application scenarios of the Agora Cloud Proxy, this release updates the cloud proxy types as follows:
- Changes the meaning of
TRANSPORT_TYPE_NONE_PROXY(0)
from "Do not use the cloud proxy" to "Automatic mode". In this mode, the SDK attempts a direct connection to SD-RTN™ and automatically switches to TLS 443 if the attempt fails. As of v3.6.2, the SDK has this mode enabled by default. - Adds
TRANSPORT_TYPE_TCP_PROXY(2)
, which is the TCP (encrypted) mode. In this mode, the SDK always transmits data over TLS 443.
In addition, this release adds the onProxyConnected
callback to report the proxy connection state. For example, when a user calls setCloudProxy
and joins a channel successfully, the SDK triggers this callback to report the user ID, the proxy type connected, and the time elapsed from the user calling joinChannel
until this callback is triggered.
2. Audio recording
This release extends startAudioRecording
with support for setting recording with dual channels and higher audio quality.
- By adding
recordingChannel
toAudioRecordingConfiguration
, it enables you to set the recorded audio channel to be mono or dual. Because the actual recorded audio channel is related to the captured audio channel and the integration scheme affects the final recorded audio channel, contact technical support for assistance with stereo recording usingstartAudioRecording
. - By adding
AUDIO_RECORDING_QUALITY_ULTRA_HIGH(3)
toAudioRecordingConfiguration.recordingQuality
, it enables you to set the recorded audio quality to ultra-high. Ultra-high quality is the highest quality available inrecordingQuality
. When you record a 10-minute AAC audio file at a sample rate of 32,000 Hz and ultra-high quality, the file size is approximately 7.5 MB.
3. Music file playback
This release optimizes the experience of calling startAudioMixing
to play music files as follows:
- Reduces issues of audio freezes or no audio when playing music files.
- Increases the accuracy of the audio duration reported by
getAudioFileInfo
. - Supports more audio file formats. See Which audio file formats does the Agora Video SDK support.
If you want to experience these improvements, ensure that you have integrated the libagora-full-audio-format-extension.so
dynamic library. Given the large size of this library, if you have limitations on app size and do not need these improvements, you can remove this dynamic library when integrating the SDK. For more instructions, see Reduce App Size.
Fixed issues
This release fixed the issue that under certain circumstances, zipping noises occurred when using a Redmi 4A phone for live streaming.
API changes
Added
setAgoraLibPath
recordingChannel
inAudioRecordingConfiguration
AUDIO_RECORDING_QUALITY_ULTRA_HIGH(3)
inAudioRecordingConfiguration.recordingQuality
onProxyConnected
TRANSPORT_TYPE_TCP_PROXY(2)
Modified
- The behavior of
TRANSPORT_TYPE_NONE_PROXY(0)
v3.6.1.1
v3.6.1.1 was released on January 16, 2022.
This release fixed the following audio issue:
When an end user muted and unmuted audio from an application using the Agora Web SDK, end users using an application with Native SDK version 3.6.0 might not hear audio from this end user.
v3.6.1
v3.6.1 was released on January 14, 2022.
This release fixed the following issues:
-
The CDN live streaming failed because of the abnormal resolution of the RTMP streaming URL with a port number.
-
On some devices, occasional noises occurred when you used OpenSL.
-
Occasional crashes occurred.
v3.6.0.1
v3.6.0.1 was released on December 10, 2021.
This release fixed the issue that v3.6.0 incorrectly renamed the dynamic library libagora_fdkaac.so
to libagora_fdkaac_extension.so
.
v3.6.0
v3.6.0 was released on December 7, 2021.
Compatibility changes
Media Push
To reduce the difficulty of integrating Media Push, this release optimizes the API design of Media Push and improves the handling of network issues within Media Push clients and servers. You can experience the optimized Media Push functionality with the following new methods:
startRtmpStreamWithoutTranscoding
: Starts pushing media streams to a CDN without transcoding. This method works the same as the old methodaddPublishStreamUrl(false)
.startRtmpStreamWithTranscoding
: Starts pushing media streams to a CDN and sets the transcoding configuration. This method works the same as calling the old methodssetLiveTranscoding
andaddPublishStreamUrl(true)
in sequence.updateRtmpTranscoding
: Updates the transcoding configuration. This method works the same as the non-first call to the old methodsetLiveTranscoding
.stopRtmpStream
: Stops pushing media streams to a CDN. This method works the same as the old methodremovePublishStreamUrl
.
This release deprecates three old methods for Media Push: addPublishStreamUrl
, setLiveTranscoding
, and removePublishStreamUrl
. Agora recommends that you use the new methods for Media Push and update your code logic by referring to Media Push.
Also, as of this release, whether you use the new or old methods for Media Push, you can experience the following improvements:
-
Reporting streaming states, errors, and events:
- In the
RTMP_STREAM_PUBLISH_STATE
state code, addingRTMP_STREAM_PUBLISH_STATE_DISCONNECTING(5)
: The SDK is disconnecting from the Agora streaming server and CDN. When you callremove
orstop
to stop the streaming normally, the SDK reports the streaming state asDISCONNECTING
,IDLE
in sequence. - Adding the following to the
RTMP_STREAM_PUBLISH_ERROR
error code:RTMP_STREAM_PUBLISH_ERROR_NOT_BROADCASTER(11)
: The user role is not host, so the user cannot use the Media Push function. Check your application code logic.RTMP_STREAM_PUBLISH_ERROR_TRANSCODING_NO_MIX_STREAM(13)
: Theupdate
orsetLiveTranscoding
method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic.RTMP_STREAM_PUBLISH_ERROR_NET_DOWN(14)
: Errors occurred in the host's network.RTMP_STREAM_PUBLISH_ERROR_INVALID_APPID(15)
: Your App ID does not have permission to use the Media Push function. Refer to Prerequisites to enable the Media Push permission.
- Adding the following to the
RTMP_STREAMING_EVENT
event code:RTMP_STREAMING_EVENT_ADVANCED_FEATURE_NOT_SUPPORT(3)
: The feature is not supported.RTMP_STREAMING_EVENT_REQUEST_TOO_OFTEN(4)
: Reserved.
To ensure the quality of the Media Push, make sure to handle the business logic according to the state code, error code, and event code. - In the
-
Using the HE-AAC v2 audio codec during streaming with transcoding: This is achieved by adding
HE_AAC_V2
toAudioCodecProfileType
.
Fixed issues
This release fixed the following issues:
- The SDK caused the Bluetooth to restart and triggered the prompt to turn off the bluetooth when the SDK detected incorrect settings of the Bluetooth.
- When you were playing an original song, calling setAudioMixingPitch to adjust the pitch caused the played song to switch to accompaniment.
- In the
EDUCATION
scenario, occasionally the volume became unstable when the user called enableLocalAudio to enable and disable the local audio capture.
API changes
Added
-
RTMP_STREAM_PUBLISH_STATE_DISCONNECTING(5)
in thestate
parameter ofonRtmpStreamingStateChanged
-
The followin code in the
errCode
parameter ofonRtmpStreamingStateChanged
:RTMP_STREAM_PUBLISH_ERROR_NOT_BROADCASTER(11)
RTMP_STREAM_PUBLISH_ERROR_TRANSCODING_NO_MIX_STREAM(13)
RTMP_STREAM_PUBLISH_ERROR_NET_DOWN(14)
RTMP_STREAM_PUBLISH_ERROR_INVALID_APPID(15)
-
The following code in the
error
parameter ofonRtmpStreamingEvent
:RTMP_STREAMING_EVENT_ADVANCED_FEATURE_NOT_SUPPORT(3)
RTMP_STREAMING_EVENT_REQUEST_TOO_OFTEN(4)
-
HE_AAC_V2
inAudioCodecProfileType
v3.5.2
v3.5.2 was released on November 25, 2021.
Compatibility changes
Error codes returned when the request to join a channel is rejected
To more accurately report the reason for the failure to join a channel, as of this release, the SDK returns the error code -17 (ERR_JOIN_CHANNEL_REJECTED)
in the return value of the joining channel method in the following situations:
-
When a user who has already joined an
RtcEngine
channel calls the joining channel method of theRtcEngine
class with a valid channel name. -
When a user who has already joined an
RtcChannel
channel calls the joining channel method of thisRtcChannel
object.
In the SDK earlier than v3.5.2, when the above errors occur, the SDK might report the error code 17
through the onError
callback, or return the error code -5 (ERR_REFUSED)
in the return value of the joining channel method.
New features
Testing audio call loop
To check whether the local audio device and network conditions can guarantee the proper sending and receiving of audio streams, this release adds the startEchoTest
[3/3] method. You can call this method before joining a channel to test whether the loop of a user's audio devices and network conditions are working properly.
Compared to startEchoTest
[2/3], startEchoTest
[3/3] can secure the test, but cannot support setting the time interval for reporting test results.
Fixed issues
This release fixed the issue that remote users heard slightly unsynchronized voice and music when a user called startAudioMixing
on some Android devices.
API changes
This release adds startEchoTest
[3/3].
v3.5.1
3.5.1 was released on October 14, 2021.
New features
1. Pausing and resuming the media stream relay across channels
In order to enable the host to quickly pause or resume a cross-channel media stream relay, this release adds the following methods and event code:
pauseAllChannelMediaRelay
: Pauses the media stream relay to all destination channels.resumeAllChannelMediaRelay
: Resumes the media stream relay to all destination channels.RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS (12)
: The SDK successfully pauses relaying the media stream to destination channels.RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_FAILED (13)
: The SDK fails to pause relaying the media stream to destination channels.RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS (14)
: The SDK successfully resumes relaying the media stream to destination channels.RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_FAILED (15)
: The SDK fails to resume relaying the media stream to destination channels.
After a successful method call of pauseAllChannelMediaRelay
or resumeAllChannelMediaRelay
, the SDK triggers the onChannelMediaRelayEvent
callback to report whether the media stream relay is successfully paused or resumed.
2. Pushing the external audio frame to a specified position
To meet the different processing requirements of external audio frames in different scenarios, this release deprecates pushExternalAudioFrame
[1/2] and adds pushExternalAudioFrame
[2/2] with sourcePos
instead. You can push the external audio frame to one of three positions: after audio capture, before audio encoding, or before local playback. For example, in the KTV scenario, you can push the singing voice to after audio capture, and push the accompaniment to before audio encoding, so that the singing voice is processed by the SDK audio module, but the accompaniment is not affected by the SDK audio module.
This release also adds setExternalAudioSourceVolume
, which enables you to set the volume of external audio frames at a specified position.
3. Advanced settings of the music file
To set the playback speed, audio track, and channel mode of a music file, this release adds the following methods:
setAudioMixingPlaybackSpeed
: Sets the playback speed of the current music file. Agora recommends a value range of [50,400], where 100 represents the original speed.getAudioTrackCount
: Gets the number of audio tracks of the current music file.selectAudioTrack
: Specifies the playback audio track of the current music file. The range of index is [0, getAudioTrackCount()).setAudioMixingDualMonoMode
: Sets the channel mode of the current music file to original mode, left channel mode, right channel mode, or mixed channel mode.
4. Getting audio file information
To get the information of any audio file, this release deprecates getAudioMixingDuration
and adds getAudioFileInfo
instead. After joining a channel, you can call getAudioFileInfo
and get information such as duration for the specified audio file in onRequestAudioFileInfo
.
Improvements
1. Adapting OpenSL
This release adapts OpenSL to reduce the audio delay. It also adds a blacklist to disable OpenSL and enable Java adm on some devices that do not support OpenSL in order to improve the stability of audio functions.
2. Identification and quality testing for 5G mobile networks
This release adds identification and connection quality testing for 5G mobile networks:
- Adds
NETWORK_TYPE_MOBILE_5G (6)
. When the local network changes to 5G, the SDK triggers theonNetworkTypeChanged
callback to report this network connection type. - Supports calling
enableLastmileTest
orstartLastmileProbeTest
to test the connection quality of the 5G mobile network.
3. Other improvements
This release also improves the audio experience when using some Bluetooth headsets after deep-learning noise reduction is enabled.
Fixed issues
This release has fixed the following issues:
- In the
GAME_STREAMING
scenario, occasional echo or noise that was caused by inaccurate music detection occurred. - Updating the transcoding layout in Media Push occasionally failed under certain circumstances.
- When the local user called
muteAllRemoteAudioStreams
and receivedonRemoteAudioStateChanged
(REMOTE_AUDIO_REASON_LOCAL_MUTED
),onRemoteAudioStateChanged
(REMOTE_AUDIO_REASON_REMOTE_MUTED
) was incorrectly received after 15 seconds. - When using an app integrated with the SDK for real-time communication, if a user answered a system call and returned to the app, the audio route of the SDK changed. For example, when the audio was played through the speaker in the app, if a user answered a system call through the earpiece and returned to the app, the audio route of the SDK changed to the earpiece.
- Crashes occasionally occurred in audio scenarios.
- As of v3.4.5, the return value was inaccurate when you called
joinChannel
multiple times in a row. - When a user with the audio profile
MUSIC_HIGH_QUALITY_STEREO (5)
talked to a user with another audio profile, the latter was likely to hear a zipping noise. - The method call of
setExternalAudioSource
before joining the channel did not take effect. - When a Bluetooth headset and a wired headset were connected to the audio playback device at the same time, the SDK did not trigger
onAudioRouteChanged
after plugging and unplugging the wired headset multiple times. - The SDK additionally triggered the
onLocalAudioStateChanged
callback to reportLOCAL_AUDIO_STREAM_STATE_CAPTURING(1)
when you calledenableLocalAudio(false)
after joining a channel.
API changes
Added
pushExternalAudioFrame
[2/2]setExternalAudioSourceVolume
setAudioMixingPlaybackSpeed
getAudioTrackCount
selectAudioTrack
setAudioMixingDualMonoMode
pauseAllChannelMediaRelay
resumeAllChannelMediaRelay
- The following
RELAY_EVENT
enumerators: getAudioFileInfo
onRequestAudioFileInfo
NETWORK_TYPE_MOBILE_5G(6)
Deprecated
pushExternalAudioFrame
[1/2]getAudioMixingDuration
v3.5.0.4
v3.5.0.4 was released on September 26, 2021.
Improvements
To improve audio quality when a user uses a Bluetooth headset, this release optimizes the logic for selecting Bluetooth profiles and volume types.
-
Bluetooth profile: As of this release, the Bluetooth profile used by the SDK is only affected by the user role.
- If a user in the communication profile or a host in the interactive streaming profile uses a Bluetooth headset, the Bluetooth headset captures and plays audio through the Hands-Free Profile (HFP).
- If an audience member in the interactive streaming profile uses a Bluetooth headset, the Bluetooth headset plays audio through the Advanced Audio Distribution Profile (A2DP).
-
Volume type: This release regulates the volume type. When a user uses a Bluetooth headset, the SDK uses the following volume type:
Audio scenario User in the communication profile/Host in the interactive streaming profile Audience in the interactive streaming profile DEFAULT
In-call volume Media volume CHATROOM_GAMING
In-call volume In-call volume GAME_STREAMING
In-call volume Media volume CHATROOM_ENTERTAINMENT
In-call volume In-call volume EDUCATION
In-call volume Media volume SHOWROOM
In-call volume Media volume MEETING
In-call volume Media volume
Fixed issues
This release fixed the following issues:
- On some Xiaomi devices, the user could not use the device's volume button to adjust the volume after calling
setEnableSpeakerphone
. - On some devices, the main thread got stuck for 1 or 2 seconds after the
setEnableSpeakerphone
method call. - The SoundTouch open-source library occasionally caused crashes when you used
setLocalVoiceChanger
andsetLocalVoicePitch
. - When a third-party in-ear monitoring library and custom audio source were used and in-ear monitoring was enabled before joining a channel, in-ear monitoring did not take effect.
- On some Samsung devices, the
adjustRecordingSignalVolume(0)
method call occasionally failed. - When using previously released 3.5.x versions of the SDK, the local user could not be heard by remote users when the local user used custom audio capture by the Push method.
v3.5.0.3
v3.5.0.3 was released on September 6, 2021 and improved the stability of the SDK.
v3.5.0.1
v3.5.0.1 was released on August 4, 2021 and improved the stability of the SDK.
v3.5.0
v3.5.0 was released on July 20, 2021.
Compatibility changes
1. Support for SDK Integration with mavenCentral
As of this release, Agora publishes the SDK package to mavenCentral. To integrate the SDK with mavenCentral, see Integrate the SDK.
2. Changes to audio route behavior
To improve user experience, this release improves the following SDK behavior:
-
When the SDK uses the media volume, the audio route is affected as follows:
- With versions earlier than v3.5.0, the SDK cannot set the audio route as the earpiece.
- With v3.5.0 and later versions, the SDK can set the audio route as the earpiece. At the same time, the volume type becomes in-call volume. If you switch the audio route to the speakerphone, the SDK sets the volume type back to the media volume.
To learn about the scenarios where the SDK uses the media volume, see What is the difference between the in-call volume and the media volume? -
If multiple external audio devices are connected, when the user removes the current playback device, the audio route is affected as follows:
- With versions earlier than v3.5.0, the SDK does not play audio through any audio route, which causes a no-audio issue.
- With v3.5.0 and later versions, the SDK sets the audio route as follows (in order of priority): the external device connected next to last > ... > the external device connected first >
setEnableSpeakerphone
>setDefaultAudioRouteToSpeakerphone
> the default audio route of the SDK.
See Set the Audio Route.
Improvements
In scenarios where the AGC is enabled, the convergence time for noise reduction is shortened, which reduces noise fluctuations.
Fixed issues
This release fixed the following issues:
- After a remote user called
enableLoopbackRecording
, occasionally the local user heard an echo of their own audio. - After calling
muteLocalAudioStream(true)
to stop publishing a local audio stream, the local user could hear remote users when the local user joined a channel for the first time. After leaving the channel and joining another channel, occasionally the local user could not hear remote users. - When the local network quality was poor, the downlink network quality rating (
rxQuality
) of remote users reported by the SDK was not accurate.
API changes
Modified
v3.4.6
v3.4.6 was released on July 15, 2021.
This release fixed the following issues:
- Low-volume issues occurred when the user used Type-C headphones.
- The
interface xxx is not visible from class loader
error when running a project on some Android devices.
v3.4.5
v3.4.5 was released on June 22, 2021.
Compatibility changes
1. Support for GCM2 encryption
To further improve the security during real-time audio transmission process, this release adds the following:
AES_128_GCM2
andAES_256_GCM2
encryption modes inEncryptionMode
. The new GCM encryption modes use a more secure KDF (Key Derivation Function) and support setting the key and salt.- The
encryptionKdfSalt
member inEncryptionConfig
to add the salt for theAES_128_GCM2
andAES_256_GCM2
encryption modes.
This release also changes the default encryption mode from AES_128_XTS
to AES_128_GCM2
. If you use the default encryption mode in earlier versions, after upgrading the SDK to v3.4.5, ensure that you call enableEncryption
and set EncryptionMode
to AES_128_XTS
.
2. Audio stream publishing behavior changes
To flexibly control the publishing state in multiple channels, this release optimizes the RtcChannel
class as follows:
- Deprecates the
publish
andunpublish
methods, and addsmuteLocalAudioStream
instead. You can set the publishing state of the audio stream. - Adds the
publishLocalAudio
member inChannelMediaOptions
. The default value istrue
. You can set the publishing state when joining a channel. If a user publishes streams in a channel, regardless of whether the user is a host or an audience member, you need to setpublishLocalAudio
tofalse
when the user joins other channels; otherwise, the user fails to join the channel. You can set the publishing state when joining a channel. - After calling
setClientRole(BROADCASTER)
, the local user publishes audio stream by default. You no longer need to callpublish
.
publishLocalAudio = false
serves the same function as muteLocalAudioStream(true)
have the same function. If you call them together, the one called later takes effect.The above improvements bring the following changes in the RtcEngine
class:
muteLocalAudioStream
ofRtcEngine
does not take effect for channels created by theRtcChannel
class, so you need to use themuteLocalAudioStream
of theRtcChannel
class instead.- When a user joins a channel by using
joinChannel
with theoptions
parameter, you can set the publishing state. - If a user joins a channel by calling
joinChannel
with theoptions
parameter,muteLocalAudioStream
only takes effect when it is called afterjoinChannel
.
If you upgrade the SDK to v3.4.5 or later, to avoid affecting your service, Agora recommends modifying the implementation of muteLocalAudioStream
, publish
, and unpublish
.
See Set the Publishing State and Join Multiple Channels.
3. Raw audio data
The raw audio data function enables you to implement custom audio pre- and post-processing functions, such as audio recording and audio mixing. To conserve system resources on devices, reduce the development difficulty, and support the accurate observation of audio data at a specific node, this release optimizes the IAudioFrameObserver
class as follows:
-
Changes the data type of the samples parameter from byte[] to
DirectByteBuffer
in the following callbacks:onRecordFrame
onPlaybackFrame
onPlaybackFrameBeforeMixing
onMixedFrame
onPlaybackFrameBeforeMixingEx
This change reduces the copy operation when you call the Agora C++ interfaces to get the raw audio data through JNI.
-
Encapsulates the
samples
,numOfSamples
,bytesPerSample
,channels
, andsamplesPerSec
parameters in the precedingon
callbacks as theAudioFrame
class to simplify the interfaces and enhance API extensibility. -
Adds the following callbacks for you to get the raw audio data at different audio transmission stages and in your expected format:
getObservedAudioFramePosition
: Sets the audio observation positions.getRecordAudioParams
: Sets the audio recording format for theonRecordFrame
callback.getPlaybackAudioParams
: Sets the audio playback format for theonPlaybackFrame
callback.getMixedAudioParams
: Sets the audio mixing format for theonMixedFrame
callback.
If you upgrade the SDK to v3.4.5 or later, to avoid affecting your service, ensure that you modify the implementation of IAudioFrameObserver
.
4. startAudioMixing changes
To avoid blocking, this release changes the startAudioMixing
from a synchronous call to an asynchronous call.
Improvements
1. Media Push
To be more transparent to users about errors and events in Media Push, this release adds the following codes:
- To
onRtmpStreamingStateChanged
: Error codeRTMP_STREAM_UNPUBLISH_ERROR_OK (100)
, which reports that the streaming has been stopped normally. After you callremovePublishStreamUrl
to stop streaming, the SDK returns this error code and state codeRTMP_STREAM_PUBLISH_STATE_IDLE (0)
. - To
onRtmpStreamingEvent
: Event codeRTMP_STREAMING_EVENT_URL_ALREADY_IN_USE (2)
, which reports that the streaming URL is already being used for Media Push. If you want to start new streaming, use a new streaming URL.
2. Music file state
When you call startAudioMixing
after pauseAudioMixing
, this release adds the onAudioMixingStateChanged(MEDIA_ENGINE_AUDIO_EVENT_MIXING_STOPPED,AUDIO_MIXING_REASON_STOPPED_BY_USER)
state, which indicates the music file is stopped, before reporting onAudioMixingStateChanged(MEDIA_ENGINE_AUDIO_EVENT_MIXING_PLAY,AUDIO_MIXING_REASON_STARTED_BY_USER)
.
3. Audio device errors
To convey the impact of a system call on the audio sampling, this release adds LOCAL_AUDIO_STREAM_ERROR_INTERRUPTED (8)
in LOCAL_AUDIO_STREAM_ERROR
, which reports that the audio sampling is interrupted by a system call.
Fixed issues
This release fixed the following issues:
- Under poor network conditions, when you called
startAudioMixing
to play an online music file, occasionally the SDK response time was too long and caused a freeze. - Under poor network conditions, when you frequently called
startAudioMixing
to play an online music file, an ANR pop-up window occasionally appeared. - On some Android devices, after connecting a Bluetooth headset, the speaker still played audio.
- After switching the audio route to Bluetooth, the Bluetooth device occasionally failed to sample audio.
- Under poor network conditions, users were occasionally unable to switch roles.
- Under poor network conditions, after the host enabled an in-ear monitor, the audience frequently lost audio from the host.
API changes
Added
RTMP_STREAM_UNPUBLISH_ERROR_OK (100)
inRTMP_STREAM_PUBLISH_ERROR
RTMP_STREAMING_EVENT_URL_ALREADY_IN_USE (2)
inRTMP_STREAMING_EVENT
AES_128_GCM2 (7)
andAES_256_GCM2 (8)
inEncryptionMode
encryptionKdfSalt
inEncryptionConfig
muteLocalAudioStream
inRtcChannel
publishLocalAudio
inChannelMediaOptions
LOCAL_AUDIO_STREAM_ERROR_INTERRUPTED (8)
inLOCAL_AUDIO_STREAM_ERROR
- The following callbacks in the
IAudioFrameObserver
class:
Modified
-
The following callbacks in the
IAudioFrameObserver
class:
Deprecated
publish
andunpublish
inRtcChannel
v3.4.3
v3.4.3 was released on June 16, 2021. This release fixed the following issues:
- Under certain circumstances, the PCM dump file could not be printed.
- Using third-party in-ear monitoring libraries caused crashes.
- Occasional crashes occurred on some Vivo devices.
- The
startAudioMixing
method could not play the MP3 local music files with the.m4a
filename extension. - After a user of the SDK v3.0.0+ left a communication channel that had any user of the SDK versions earlier than 3.0.0 and switched the channel profile to live streaming, the user of the SDK v3.0.0+ set user role to host before joining the next channel, but the client role setting did not take effect.
- Under certain circumstances, an audio delay occasionally occurred 10 minutes after a user joined the channel.
v3.4.2
v3.4.2 was released on May 12, 2021.
To meet the requirements of Google Play Store, this release supports accessing a local file through URIs. When you call startAudioMixing
, getAudioMixingDuration
, preloadEffect
, playEffect
, getEffectDuration
or addVideoWatermark
and need to access a local file, Agora recommends the following steps:
- Use Storage Access Framework to get the URI of the local file.
- Call
Uri.toString
to convert the URI to a string. - Pass the string in the
filePath
orwatermarkUrl
parameter.
v3.4.1
v3.4.1 was released on April 22, 2021. This release fixed this issue: Crashes occurred in a certain voice conversion scenario.
v3.4.0
v3.4.0 was released on April 16, 2021.
Compatibility changes
Integration changes
- SDK package publishing platform
Because JCenter is about to retire, as of this release, Agora publishes the SDK package to JitPack instead of JCenter. To integrate the SDK with JitPack, see Integrate the SDK.
- Extension libraries
To reduce the app size after integrating the SDK, this release packages some features as extension libraries (with the Extension
suffix). For details, see Extension libraries. If you do not need to use the related features, you can remove the corresponding extension libraries and recompile the project.
Behavior changes
To monitor the reason why the playback state of a music file changes, this release modifies the onAudioMixingStateChanged
callback as follows:
- Replaces the
errorCode
parameter with thereason
parameter. - Deprecates the following constants and replace them with constants prefixed with
AUDIO_MIXING_REASON
:MEDIA_ENGINE_AUDIO_ERROR_MIXING_OPEN
MEDIA_ENGINE_AUDIO_ERROR_MIXING_TOO_FREQUENT
MEDIA_ENGINE_AUDIO_EVENT_MIXING_INTERRUPTED_EOF
Using constants prefixed with AUDIO_MIXING_REASON
, you can get the reason for the change of the playback state, such as start, pause, stop or fail.
- Modifies some logic of reporting
MEDIA_ENGINE_AUDIO_EVENT_MIXING
. For example, as of this release, when looping music, the SDK triggers theMEDIA_ENGINE_AUDIO_EVENT_MIXING_PLAY
state when each loop is completed or starts.
If you upgrade the SDK to v3.4.0 or later, to avoid affecting your service, Agora recommends that you modify the implementation of onAudioMixingStateChanged
.
New features
1. Virtual metronome
To meet the needs of online teaching scenarios that would benefit from a metronome, this release adds the following methods:
startRhythmPlayer
: Enables the virtual metronome.stopRhythmPlayer
: Disables the virtual metronome.configRhythmPlayer
: Reconfigures the virtual metronome after it is enabled.
2. Playback progress of audio effect files
To control the playback progress of audio effect files, this release adds the following methods:
playEffect
[3/3]: Sets the playback position when starting playback of an audio effect file by using thestartPos
parameter.setEffectPosition
: Sets the playback position after starting playback of an audio effect file.getEffectDuration
: Gets the duration of a local audio effect file.getEffectCurrentPosition
: Gets current playback progress of an audio effect file.
Also, this release deprecates the playEffect
[2/3] method. You can use playEffect
[3/3] instead.
Improvements
1. Playback progress of music files
To control the playback progress of music files, this release is optimized as follows:
- Deprecates the
startAudioMixing
method and adds a new method with the same name in its place. The newstartAudioMixing
method allows you to set the playback position when starting playback of a music file by using thestartPos
parameter. - Deprecates the
getAudioMixingDuration
method and adds a new method with the same name in its place. The newgetAudioMixingDuration
method allows you to get the duration of a local music file before playing it.
2. Audio recording
To set the recording configuration during audio recording, this release adds a new startAudioRecording
method and deprecates the old method with the same name. The config
parameter of the new startAudioRecording
method allows you to set the audio recording quality, content, sample rate, and storage path of the recording file.
This release also adds a new error code: ERR_ALREADY_IN_RECORDING(160)
. If you call the new startAudioRecording
[3/3] method again before the current recording ends, the SDK reports this error code.
3. Media device errors
To help users better understand the cause of local video errors, this release adds a new error code to LOCAL_VIDEO_STREAM_ERROR
: LOCAL_VIDEO_STREAM_ERROR_DEVICE_NOT_FOUND(8)
, which indicates that the SDK cannot find the local video-capture device.
Fixed issues
This release fixed the following issues:
- Crashes occurred when the audio sample rate exceeded 4.8 kHz.
- The
onAudioVolumeIndication
callback returned incorrect volume information after you calledenableSoundPositionIndication(true)
.
API changes
Added
getAudioMixingDuration
[2/2]startAudioRecording
[3/3]getEffectDuration
setEffectPosition
getEffectCurrentPosition
playEffect
[3/3]startAudioMixing
[2/2]- Error code:
ERR_ALREADY_IN_RECORDING(160)
Modified
Deprecated
getAudioMixingDuration
[1/2]startAudioRecording
[2/3]playEffect
[1/2]startAudioMixing
[1/2]- The following constants:
MEDIA_ENGINE_AUDIO_ERROR_MIXING_OPEN
MEDIA_ENGINE_AUDIO_ERROR_MIXING_TOO_FREQUENT
MEDIA_ENGINE_AUDIO_EVENT_MIXING_INTERRUPTED_EOF
v3.3.2
v3.3.2 was released on March 29, 2021. This release fixed the following issues:
- The Voice SDK requested the camera permission.
- Under certain circumstances, when a remote user was silent for a long time, the local user heard noises from the remote user.
v3.3.1
v3.3.1 was released on March 4, 2021.
New features
Voice Conversion
This release adds the setVoiceConversionPreset method to set a voice conversion effect (to disguise a user's voice). You can use this method to make a male-sounding voice sound steady or deep, and a female-sounding voice sound gender-neutral or sweet. See Set the Voice Effect.
Improvements
1. AES-GCM encryption mode
For scenarios requiring high security, to guarantee the confidentiality, integrity, and authenticity of data, and to improve the computational efficiency of data encryption, this release adds the following enumerators in encryptionMode
:
AES_128_GCM
: 128-bit AES encryption, GCM mode.AES_256_GCM
: 256-bit AES encryption, GCM mode.
2. Remote audio statistics
To monitor quality of experience (QoE) of the local user when receiving a remote audio stream, this release adds mosValue
to onRemoteAudioStats
, which reports the quality of the remote audio stream as determined by the Agora real-time audio MOS (Mean Opinion Score) measurement system.
Issues fixed
After enabling the sound position indication, you could not get the remote user's volume by the onAudioVolumeIndication
callback.
API changes
This release adds the following APIs:
setVoiceConversionPreset
AES_128_GCM
andAES_256_GCM
inencryptionMode
mosValue
inonRemoteAudioStats
v3.3.0
v3.3.0 was released on January 22, 2021.
Compatibility changes
1. Integration change
This release adds libagora-core.so
, the Agora basic calculation framework. To integrate the SDK into your project, see Integrate the SDK.
2. Changes to subscribing behavior
This release deprecates setDefaultMuteAllRemoteAudioStreams
and changes the behavior of mute
-related methods as follows:
mute
-related methods must be called after joining or switching to a channel; otherwise, the method call does not take effect.- Methods with the prefix
muteAll
are no longer the master switch, and eachmute
-related method independently controls the user's subscribing state. When you call methods with the prefixesmuteAll
andmuteRemote
together, the method that is called later takes effect. - Methods with the prefix
muteAll
set whether to subscribe to the audio streams of all remote users, including all subsequent users, which means methods with the prefixmuteAll
contain the function of methods with the prefixsetDefaultMute
. Agora recommends not calling methods with the prefixesmuteAll
andsetDefaultMute
together; otherwise, the setting may not take effect.
See details in Set the Subscribing State.
3. Changes to voice activity behavior
In the remote users' onAudioVolumeIndication
callback, this release changes the value of the vad
member from always 0
to always 1
.
New features
1. Channel media options
To help developers control media subscription more flexibly, this release adds the joinChannel
[2/2] and switchChannel
[2/2] methods to set whether users subscribe to all remote audio streams in a channel when joining and switching channels.
2. Cloud proxy
To improve the usability of the Agora Cloud Proxy, this release adds the setCloudProxy
method to set the cloud proxy and allows you to select a cloud proxy that uses the UDP protocol. For details, see Cloud Proxy.
3. Deep-learning noise reduction
To eliminate non-stationary noise based on traditional noise reduction, this release adds enableDeepLearningDenoise
to enable deep-learning noise reduction.
libagora_ai_denoise_extension.so
dynamic library into your project files.4. Singing beautifier
To beautify the voice and add reverberation effects in a singing scenario, this release adds the setVoiceBeautifierParameters
method and the SINGING_BEAUTIFIER
enumeration value.
You can call setVoiceBeautifierPreset(SINGING_BEAUTIFIER)
to beautify the male voice and add the reverberation effect for a voice in a small room. For more settings, you can call setVoiceBeautifierParameters(SINGING_BEAUTIFIER, param1, param2)
to beautify male or female voices and add reverberation effects for a voice in a small room, large room, or hall.
5. Log files
To ensure the integrity of log content, this release adds the mLogConfig
member variable to RtcEngineConfig
. You can use mLogConfig
to set the log files output by the Agora SDK when you initialize RtcEngine
. See How can I set the log file? for details.
As of v3.3.0, Agora does not recommend using the setLogFile
, setLogFileSize
, or setLogFilter
methods to set the log files.
6. Data streams
To support scenarios such as lyrics synchronization and courseware synchronization, this release deprecates the previous createDataStream
method and replaces it with a new method of the same name. You can use this new method to create a data stream and set whether to synchronize the data stream with the audio stream sent to the Agora channel and whether the received data is ordered.
Improvements
1. Raw audio data
This release adds raw audio data APIs for Android platforms. Once you obtain raw audio data through the following APIs, you can pre-process or post-process it for desired playback effects:
onPlaybackFrameBeforeMixing
onMixedFrame
isMultipleChannelFrameWanted
onPlaybackFrameBeforeMixingEx
2. Remote audio statistics
To monitor quality of experience (QoE) of the local user when receiving a remote audio stream, this release adds qoeQuality
and qualityChangedReason
to onRemoteAudioStats
, which report QoE of the local user and the reason for poor QoE, respectively.
Fixed issues
- The audio sampling failed on some Android devices after a headset was plugged in.
- Local audio sampling occasionally failed on Android 10.
API changes
Added
setVoiceBeautifierParameters
- The
SINGING_BEAUTIFIER
enumaration value enableDeepLearningDenoise
joinChannel
[2/2]switchChannel
[2/2]createDataStream
- The
mLogConfig
member variable in theRtcEngineConfig
class onPlaybackFrameBeforeMixing
onMixedFrame
isMultipleChannelFrameWanted
onPlaybackFrameBeforeMixingEx
qoeQuality
andqualityChangedReason
in theRemoteAudioStats
classsetCloudProxy
- Error code:
ERR_MODULE_NOT_FOUND(157)
Modified
Deprecated
setDefaultMuteAllRemoteAudioStreams
setLogFile
setLogFileSize
setLogFilter
createDataStream
v3.2.1
v3.2.1 was released on December 17, 2020. This release fixed the following issues:
- Crashes occurred when using IPv6.
- When Native clients integrated with the Agora Voice SDK interoperated with Web clients, the Web clients continuously reported the
Client.on(disable-local-video)
orClient.on(mute-video)
callback.
v3.2.0
v3.2.0 was released on November 30, 2020.
Compatibility changes
1. Integration change
SDK package change
Since v3.2.0, the following files have been added to the SDK package:
libagora-fdkaac.so
: The Fraunhofer FDK AAC dynamic library.libagora-mpg123.so
: The mpg123 dynamic library.libagora-soundtouch.so
: The SoundTouch dynamic library.
If you upgrade the SDK to v3.2.0 or later, ensure that you have copied the above files to the folder where the libagora-rtc-sdk.so
file is located.
This release also merges libagora-crypto.so
into libagora-rtc-sdk.so
. After integrating libagora-rtc-sdk.so
, you can use built-in encryption directly.
Spelling correction
This release renames USER_PRIORITY_NORANL
to USER_PRIORITY_NORMAL
.
2. Cloud proxy
This release optimizes the Agora cloud proxy architecture. If you are already using cloud proxy, to avoid compatibility issues between the new SDK and the old cloud proxy, please contact support@agora.io before upgrading the SDK. See Cloud Proxy.
3. Security and compliance
Agora has passed ISO 27001, ISO 27017, and ISO 27018 international certifications, providing safe and reliable real-time interactive cloud services for users worldwide. See ISO Certificates.
This release supports transport layer encryption by adding TLS (Transport Layer Security) and UDP (User Datagram Protocol) encryption methods.
New features
Interactive live streaming
This release adds setClientRole
for setting the latency level of an audience member. You can use this method to switch between Interactive Live Streaming Premium and Interactive Live Streaming Standard as follows:
- Set the latency level as ultra low latency to use Interactive Live Streaming Premium.
- Set the latency level as low latency to use Interactive Live Streaming Standard.
For details, see the product overview of Interactive Live Streaming.
Improvements
1. Meeting scenario
To improve the audio experience for multi-person meetings, this release adds AUDIO_SCENARIO_MEETING(8)
in setAudioProfile
.
2. Voice beautifier and audio effects
To improve the usability of the APIs related to voice beautifier and audio effects, this release deprecates setLocalVoiceChanger
and setLocalVoiceReverbPreset
, and adds the following methods instead:
setVoiceBeautifierPreset
: Compared withsetLocalVoiceChanger
, this method deletes audio effects such as a little boy’s voice and a more spatially resonant voice.setAudioEffectPreset
: Compared withsetLocalVoiceReverbPreset
, this method adds audio effects such as the 3D voice, the pitch correction, a little boy’s voice and a more spatially resonant voice.setAudioEffectParameters
: This method sets detailed parameters for a specified audio effect. In this release, the supported audio effects are the 3D voice and pitch correction.
3. Interactive streaming delay
This release reduces the latency on the audience's client during an interactive live streaming by about 500 ms.
Issues fixed
- Occasional audio sampling issues with Xiaomi speakers.
API changes
Added
setClientRole
setAudioEffectPreset
setVoiceBeautifierPreset
setAudioEffectParameters
AUDIO_SCENARIO_MEETING(8)
Deprecated
setLocalVoiceChanger
setLocalVoiceReverbPreset
v3.1.1
v3.1.1 was released on August 27, 2020. This release changes the AreaCode
for regional connection. The latest area codes are as follows:
AREA_CODE_CN
: Mainland China.AREA_CODE_NA
: North America.AREA_CODE_EU
: Europe.AREA_CODE_AS
: Asia, excluding Mainland China.AREA_CODE_JP
: Japan.AREA_CODE_IN
: India.AREA_CODE_GLOB
: (Default) Global.
If you have specified a region for connection when calling create
, ensure that you use the latest area code when migrating from an earlier SDK version.
v3.1.0
v3.1.0 was released on August 11, 2020.
New features
1. Publishing and subscription states
This release adds the following callbacks to report the current publishing and subscribing states:
onAudioPublishStateChanged
: Reports the change of the audio publishing state.onAudioSubscribeStateChanged
: Reports the change of the audio subscribing state.
2. First local frame published callback
This release adds the onFirstLocalAudioFramePublished
callback to report that the first audio frame is published. The onFirstLocalAudioFrame
callback is deprecated from v3.1.0.
3. Custom data report
This release adds the sendCustomReportMessage
method for reporting customized messages. To try out this function, contact support@agora.io and discuss the format of customized messages with us.
Improvement
1. Regional connection
This release adds the following regions for regional connection. After you specify the region for connection, your app that integrates the Agora SDK connects to the Agora servers within that region.
AREA_CODE_JAPAN
: Japan.AREA_CODE_INDIA
: India.
2. Encryption
This release adds the enableEncryption
method for enabling built-in encryption, and deprecates the following methods:
setEncryptionSecret
setEncryptionMode
3. More in-call statistics
This release adds the following attributes to provide more in-call statistics:
- Adds
txPacketLossRate
inLocalAudioStats
, which represents the audio packet loss rate (%) from the local client to the Agora edge server before applying anti-packet loss strategies. - Adds
publishDuration
inRemoteAudioStats
, which represents the total publish duration (ms) of the remote media stream.
4. Audio profile
To improve audio performance, this release adjusts the maximum audio bitrate of each audio profile as follows:
Profile | v3.1.0 | Earlier than v3.1.0 |
---|---|---|
AUDIO_PROFILE_DEFAULT | ||
AUDIO_PROFILE_SPEECH_STANDARD | 18 Kbps | 18 Kbps |
AUDIO_PROFILE_MUSIC_STANDARD | 64 Kbps | 48 Kbps |
AUDIO_PROFILE_MUSIC_STANDARD_STEREO | 80 Kbps | 56 Kbps |
AUDIO_PROFILE_MUSIC_HIGH_QUALITY | 96 Kbps | 128 Kbps |
AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO | 128 Kbps | 192 Kbps |
5. Log files
This release increases the default number of log files that the Agora SDK outputs from 2 to 5, and increases the default size of each log file from 512 KB to 1024 KB. By default, the SDK outputs five log files, agorasdk.log
, agorasdk_1.log
, agorasdk_2.log
, agorasdk_3.log
, agorasdk_4.log
. The SDK writes the latest logs in agorasdk.log
. When agorasdk.log
is full, the SDK deletes the log file with the earliest modification time among the other four, renames agorasdk.log
to the name of the deleted log file, and creates a new agorasdk.log
to record the latest logs.
6. In-ear monitoring improvement on OPPO models (Android)
This release reduces the delay of in-ear monitoring on the following OPPO models:
- Reno4 Pro 5G
- Reno4 5G
7. Others
- Reduces the audio delay.
- Reduces the playback time of the first remote audio frame.
Issues fixed
This release fixed the following issues:
setAudioMixingPitch
did not work when setting thepitch
parameter to certain values.
API changes
Added
onAudioPublishStateChanged
onAudioSubscribeStateChanged
onFirstLocalAudioFramePublished
enableEncryption
txPacketLossRate
inLocalAudioStats
publishDuration
inRemoteAudioStats
onRtmpStreamingEvent
- Error code:
ERR_NO_SERVER_RESOURCES(103)
- Warning code:
Deprecated
setEncryptionSecret
setEncryptionMode
onFirstLocalAudioFrame
v3.0.1
v3.0.1 was released on May 27, 2020.
New features
1. Audio mixing pitch
To set the pitch of the local music file during audio mixing, this release adds setAudioMixingPitch
. You can set the pitch
parameter to increase or decrease the pitch of the music file. This method sets the pitch of the local music file only. It does not affect the pitch of a human voice.
2. Voice enhancement
To improve the audio quality, this release adds the following enumerate elements in setLocalVoiceChanger
and setLocalVoiceReverbPreset
:
- Adds several elements that have the prefixes
VOICE_BEAUTY
andGENERAL_BEAUTY_VOICE
. TheVOICE_BEAUTY
elements enhance the local voice, and theGENERAL_BEAUTY_VOICE
enumerations add gender-based enhancement effects. - Adds the enumeration
AUDIO_VIRTUAL_STEREO
and several enumerations that have the prefixAUDIO_REVERB_FX
. TheAUDIO_VIRTUAL_STEREO
enumeration implements reverberation in the virtual stereo, and theAUDIO_REVERB_FX
enumerations implement additional enhanced reverberation effects.
See Set the Voice Changer and Reverberation Effects for more information.
3. Data post-processing in multiple channels (C++)
This release adds support for post-processing remote audio and video data in a multi-channel scenario by adding the following C++ methods:
- The
IAudioFrameObserver
class:isMultipleChannelFrameWanted
andonPlaybackAudioFrameBeforeMixingEx
.
After successfully registering the audio observer, if you set the return value of isMultipleChannelFrameWanted
as true
, you can get the corresponding audio data from onPlaybackAudioFrameBeforeMixingEx
. In a multi-channel scenario, Agora recommends setting the return value as true
.
Improvements
- Implements low in-ear device latency on Huawei phones with EMUI v10 and above.
- Improves in-call audio quality. When multiple users speak at the same time, the SDK does not decrease volume of any speaker.
- Reduces overall CPU usage of the device.
Fixed issues
- Inaccurate report of the
onRemoteAudioStateChanged
callback, no audio, audio mixing and audio freezing. - Failure to end a call, inaccurate report of the
onClientRoleChanged
callback, occasional crashes, and interoperability when using encryption.
API changes
This release adds the following APIs:
setAudioMixingPitch
- The enumeration
AUDIO_VIRTUAL_STEREO
and several elements that have the prefixesVOICE_BEAUTY
,GENERAL_BEAUTY_VOICE
, andAUDIO_REVERB_FX
totalActiveTime
inRemoteAudioStats
v3.0.0.2
v3.0.0.2 was released on Apr 22, 2020.
New features
Specifying the area of connection
This release adds create
for specifying the area of connection when creating an RtcEngine
instance. This advanced feature applies to scenarios that have regional restrictions. You can choose from areas including Mainland China, North America, Europe, Asia (excluding Mainland China), and global (default).
After specifying the area of connection:
- When the app that integrates the Agora SDK is used within the specified area, it connects to the Agora servers within the specified area under normal circumstances.
- When the app that integrates the Agora SDK is used out of the specified area, it connects to the Agora servers either in the specified area or in the area where the SDK is located.
Issues fixed
This release fixed the occasional no-audio issue.
API changes
Added
v3.0.0
v3.0.0 was released on Mar 4, 2020.
On Mar 24, 2020, we fixed occasional issues relating to no audio, audio mixing, multiple onClientRoleChanged
callbacks, and SDK crashes.
In this release, Agora improves the user experience under poor network conditions for both the COMMUNICATION
and LIVE_BROADCASTING
profiles through the following measures:
- Adopting a new architecture for the
COMMUNICATION
profile. - Upgrading the last-mile network strategy for both the
COMMUNICATION
andLIVE_BROADCASTING
profiles, which enhances the SDK's anti-packet-loss capacity by maximizing the net bitrate when the uplink and downlink bandwidth are insufficient.
To deal with any incompatibility issues caused by the architecture change, Agora uses the fallback mechanism to ensure that users of different versions of the SDKs can communicate with each other: if a user joins the channel from a client using a previous version, all clients using v3.0.0 automatically fall back to the older version. This has the effect that none of the users in the channel can enjoy the improved experience. Therefore we strongly recommend upgrading all your clients to v3.0.0.
We also upgrade the On-Premise Recording SDK to v3.0.0. Ensure that you upgrade your On-Premise Recording SDK to v3.0.0 so that all users can enjoy the improvements brought by the new architecture and network strategy.
Compatibility changes
Default log file path change
To avoid privilege issues, this release changes the default log file path from /storage/emulated/0/<package name>/
to /storage/emulated/0/Android/data/<package name>/files/
.
New features
1. Multiple channel management
To enable a user to join an unlimited number of channels at a time, this release adds the RtcChannel
and IRtcChannelEventHandler
classes. By creating multiple RtcChannel
objects, a user can join the corresponding channels at the same time.
After joining multiple channels, users can receive the audio and video streams of all the channels, but publish one stream to only one channel at a time. This feature applies to scenarios where users need to receive streams from multiple channels, or frequently switch between channels to publish streams. See Join multiple channels for details.
2. Adjusting the playback volume of the specified remote user
Adds adjustUserPlaybackSignalVolume
for adjusting the playback volume of a specified remote user. You can call this method as many times as necessary in a call or interactive live streaming to adjust the playback volume of different remote users, or to repeatedly adjust the playback volume of the same remote user.
3. Agora Mediaplayer Kit
To enrich the playability of the interactive live streaming, Agora releases the Mediaplayer Kit plug-in, which supports the host playing local or online media resources and sharing them with all users in the channel during the streaming. See Mediaplayer Kit release notes for details.
Improvements
1. Audio profiles
To meet the need for higher audio quality, this release adjusts the corresponding audio profile of AUDIO_PROFILE_DEFAULT (0)
in the LIVE_BROADCASTING
profile.
SDK | AUDIO_PROFILE_DEFAULT (0) |
---|---|
v3.0.0 | A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 52 Kbps. |
Earlier than v3.0.0 | A sample rate of 32 KHz, music encoding, mono, and a bitrate of up to 44 Kbps. |
2. Quality statistics
Adds the following members in the RtcStats
class for providing more in-call statistics, making it easier to monitor the call quality and memory usage in real time:
- gatewayRtt
memoryAppUsageRatio
memoryTotalUsageRatio
memoryAppUsageInKbytes
Others
This release enables interoperability between the Video Calling Native SDK and the Video Calling Web SDK by default, and deprecates the enableWebSdkInteroperability
method.
Issues fixed
- Audio issues relating to audio mixing, audio encoding, and echoing.
- Other issues relating to app crashes, log file, and unstable service during Media Push.
API changes
Behavior change
- Calling
enableLocalAudio
(false) does not change the in-call volume to media volume. - When the device is connected to the earpiece or Bluetooth, calling
setEnableSpeakerphone
(true) does not route the audio to the speakerphone.
Added
channelId
inAudioVolumeInfo
- gatewayRtt,
memoryAppUsageRatio
,memoryTotalUsageRatio
, andmemoryAppUsageInKbytes
inRtcStats
createRtcChannel
RtcChannel
IRtcChannelEventHandler
Deprecated
enableWebSdkInteroperability
.onStreamPublished
andonStreamUnpublished
, replaced byonRtmpStreamingStateChanged
.
v2.9.4
v2.9.4 was released on Feb 17, 2020.
This release fixed some abnormal behaviors on Android devices.
v2.9.2
v2.9.2 is released on Oct 18, 2019.
This release fixed crashes on some Android device.
v2.9.1
v2.9.1 is released on Sep 19, 2019.
New features
1. Detecting local voice activity
This release adds the report_vad
(bool) parameter to the enableAudioVolumeIndication method to enable local voice activity detection. Once it is enabled, you can check the AudioVolumeInfo struct of the onAudioVolumeIndication
callback for the voice activity status of the local user.
2. Removing the event handler This release adds the removeHandler method to remove specified IRtcEngineEventHandler objects when you want to stop listening for specific events.
Improvements
1. Supporting more audio sample rates for recording
To enable more audio sample rate options for recording, this release adds a new startAudioRecording method with a sampleRate
parameter. In the new method, you can set the sample rate as 16, 32, 44.1 or 48 kHz. The original method supports only a fixed sample rate of 32 kHz and is deprecated.
2. Adding error codes
This release adds the following error codes in the ErrorCode class:
ERR_ALREADY_IN_USE(19)
ERR_WATERMARK_PATH(125)
ERR_INVALID_USER_ACCOUNT(134)
ERR_AUDIO_BT_SCO_FAILED(1030)
ERR_ADM_NO_RECORDING_DEVICE(1359)
ERR_VCM_UNKNOWN_ERROR(1600)
ERR_VCM_ENCODER_INIT_ERROR(1601)
ERR_VCM_ENCODER_ENCODE_ERROR(1602)
ERR_VCM_ENCODER_SET_ERROR(1603)
For detailed descriptions for each error, see Error Codes.
Issues fixed
Audio
- A user makes a call after connecting to a Bluetooth device. After the call ends, the user watches YouTube and cannot hear any sound.
- The audio route is different from the settings in the
setEnableSpeakerphone
method when Bluetooth is connected in theCOMMUNICATION
profile. - Exceptions occur in the audio route when a user is in the channel.
- The app crashes when using external audio sources in the push mode.
- Audio freezes.
- After turning off the Bluetooth headset, the audio route becomes the earpiece instead of the loudspeaker.
- Echoes occur when a user is in the channel.
- Occasional noise occurs in the
LIVE_BROADCASTING
profile. - The app fails to play online music files using the
startAudioMixing
method on devices running Android 10.
Miscellaneous
- The OpenSSL version is outdated.
API Changes
Added
- startAudioRecording
- removeHandler
- The
report_vad
parameter in enableAudioVolumeIndication - The
vad
member in AudioVolumeInfo
Deprecated
startAudioRecording
v2.9.0
v2.9.0 is released on Aug 16, 2019.
Compatibility changes
1. Media Push
In this release, we deleted the following methods:
configPublisher
If your app implements CDN streaming with the methods above, ensure that you upgrade the SDK to the latest version and use the following methods for the same function:
For how to implement the new methods, see Media Push.
2. Disabling/enabling the local audio
To improve the audio quality in the COMMUNICATION
profile, this release sets the system volume to the media volume after you call the enableLocalAudio
(true) method. Calling enableLocalAudio
(false) switches the system volume back to the in-call volume.
New features
1. Faster switching to another channel
This release adds the switchChannel
method to enable the audience in a live-streaming channel to quickly switch to another channel. With this method, you can achieve a much faster switch than with the leaveChannel
and joinChannel
methods. After the audience successfully switches to another channel by calling the switchChannel
method, the SDK triggers the onLeaveChannel
and onJoinChannelSuccess
callbacks to indicate that the audience has left the original channel and joined a new one.
2. Channel media stream relay
This release adds the following methods to relay the media streams of a host from a source channel to a destination channel. This feature applies to scenarios such as online singing contests, where hosts of different live-streaming channels interact with each other.
During the media stream relay, the SDK reports the states and events of the relay with the onChannelMediaRelayStateChanged
and onChannelMediaRelayEvent
callbacks.
For more information on the implementation, API call sequence, sample code, and considerations, see Co-host across Channels.
3. Reporting the local and remote audio state
This release adds the onLocalAudioStateChanged
and onRemoteAudioStateChanged
callbacks to report the local and remote audio states. With these callbacks, the SDK reports the following states for the local and remote audio:
- The local audio: STOPPED(0), RECORDING(1), ENCODING(2), or FAILED(3). When the state is FAILED(3), see the
error
parameter for troubleshooting. - The remote audio: STOPPED(0), STARTING(1), DECODING(2), FROZEN(3), or FAILED(4). See the
reason
parameter for why the remote audio state changes.
4. Reporting the local audio statistics
This release adds the onLocalAudioStats
callback to report the statistics of the local audio during a call, including the number of channels, the sending sample rate, and the average sending bitrate of the local audio.
5. Pulling the remote audio data
To improve the experience in audio playback, this release adds the following methods to pull the remote audio data. After getting the audio data, you can process it and play it with the audio effects that you want.
The difference between the onPlaybackFrame
callback and the pullPlaybackAudioFrame
method is as follows:
onPlaybackFrame
: The SDK sends the audio data to the app once every 10 ms. Any delay in processing the audio frames may result in an audio delay.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 external audio playback.
Improvements
1. Reporting more statistics of the in-call quality
This release adds the following statistics in the RtcStats
class:
RtcStats
: The total number of the sent audio bytes and received audio bytes during a session.
2. Other Improvements
- Reduces the earpiece delay.
- Improves the audio quality when the audio scenario is set to Game Streaming.
- Improves the audio quality after the user disables the microphone in the
COMMUNICATION
profile.
Issues fixed
Audio
- When interoperating with a Web app, voice distortion occurs after the native app enables the remote sound position indication.
- The audience cannot hear the host after the host sets the in-ear monitoring volume to 0.
- Failure to play the audio file by calling the
startAudioMixing
method. - The audio route cannot be set to Bluetooth on some devices.
- Crashes occur when using the raw audio data.
- The audio route does not conform to the default settings after the device disconnects from Bluetooth.
Miscellaneous
- Occasionally mixed streams in CDN streaming.
- Occasional crashes occur after joining the channel on some devices.
API Changes
To improve the user experience, we made the following changes in v2.9.0:
Added
setExternalAudioSink
pullPlaybackAudioFrame
onLocalAudioStateChanged
onRemoteAudioStateChanged
onLocalAudioStats
switchChannel
startChannelMediaRelay
updateChannelMediaRelay
stopChannelMediaRelay
onChannelMediaRelayStateChanged
onChannelMediaRelayEvent
RtcStats
:txAudioBytes
andrxAudioBytes
Deprecated
onMicrophoneEnabled
. Use LOCAL_AUDIO_STREAM_STATE_CHANGED(0) or LOCAL_AUDIO_STREAM_STATE_RECORDING(1) in theonLocalAudioStateChanged
callback instead.onRemoteAudioTransportStats
. Use theonRemoteAudioStats
callback instead.
Deleted
configPublisher
v2.8.2
v2.8.2 is released on Aug 1, 2019.
This release fixed the interoperating problem with the Agora Web SDK.
v2.8.1
v2.8.1 is released on Jul. 20, 2019.
New features
- Support for the x86-64 architecture.
- Support for Android Q.
v2.8.0
v2.8.0 is released on Jul. 8, 2019.
New features
1. Supporting string user IDs
Many apps use string user IDs. This release adds the following methods to enable apps to join an Agora channel directly with string user IDs as user accounts:
For other methods, Agora uses the integer uid parameter. The Agora Engine maintains a mapping table that contains the user ID and string user account, and you can get the corresponding user account or ID by calling the getUserInfoByUid or getUserInfoByUserAccount method.
To ensure smooth communication, use the same parameter type to identify all users within a channel, that is, all users should use either the integer user ID or the string user account to join a channel.
Note:
- Do not mix parameter types within the same channel. The following Agora SDKs support string user accounts:
- The Native SDK: v2.8.0 and later.
- The Web SDK: v2.5.0 and later.
If you use SDKs that do not support string user accounts, only integer user IDs can be used in the channel.
- If you change your user IDs into string user accounts, ensure that all app clients are upgraded to the latest version.
- If you use string user accounts, ensure that the token generation script on your server is updated to the latest version. If you join the channel with a user account, ensure that you use the same user account or its corresponding integer user ID to generate a token. Call the
getUserInfoByUserAccount
method to get the user ID that corresponds to the user account.
2. Adding remote audio statistics
To monitor the audio transmission quality during a call or interactive live streaming, this release adds the totalFrozenTime
and frozenRate
members in the RemoteAudioStats class, to report the audio freeze time and freeze rate of the remote user.
This release also adds the numChannels
, receivedSampleRate
, and receivedBitrate
members in the RemoteAudioStats class.
Improvements
This release adds a CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT(14)
member to the reason
parameter of the onConnectionStateChanged callback. This member indicates a connection state change caused by the timeout of the connection keep-alive between the SDK and Agora's edge server.
Issues Fixed
Audio
- Occasional audio freezes.
Miscellaneous
- When the log file path specified in the
setLogFile
method does not exist, no log file is generated and the default log file is incomplete.
API Changes
To improve your experience, we made the following changes to the APIs:
Added
- registerLocalUserAccount
- joinChannelWithUserAccount
- getUserInfoByUid
- getUserInfoByUserAccount
- onLocalUserRegistered
- onUserInfoUpdated
- The
numChannels
,receivedSampleRate
,receivedBitrate
,totalFrozenTime
, andfrozenRate
members in the RemoteAudioStats class
Deprecated
- The lowLatency member in the LiveTranscoding class
v2.4.1
v2.4.1 is released on Jun 12, 2019.
Compatibility changes
Ensure that you read the following SDK behavior changes if you migrate from an earlier SDK version.
Publishing streams to the CDN
To improve the usability of the CDN streaming service, v2.4.1 defines the following parameter limits:
Class / Interface | Parameter Limit |
---|---|
LiveTranscoding | |
AgoraImage | url : The maximum length of this parameter is 1024 bytes. |
addPublishStreamUrl | url : The maximum length of this parameter is 1024 bytes. |
removePublishStreamUrl | url : The maximum length of this parameter is 1024 bytes. |
This release also adds the audioCodecProfile parameter in the LiveTranscoding
class to set the audio codec profile type. The default type is LC-AAC, which means the low-complexity audio codec profile.
v2.4.1 also adds five error codes to the error
parameter in the onStreamPublished method for quick troubleshooting.
New features
1. State of the Media Push
v2.4.1 adds the onRtmpStreamingStateChanged callback to indicate the state of the Media Push and help you troubleshoot issues when exceptions occur. In this callback, the SDK returns the IDLE, CONNECTING
, RUNNING
, RECOVERING
, or FAILURE
state. When the state is FAILURE
, you can use the error code for troubleshooting. You can still use the onStreamPublished
and onStreamUnpublished
callbacks, but we do not recommend using them.
2. More reasons for a network connection state change
In the onConnectionStateChanged callback, v2.4.1 adds error codes to the reason
parameter to help you troubleshoot issues when exceptions occur. The SDK returns the onConnectionStateChanged
callback whenever the connection state changes. This release also deprecates WARN_LOOK_UP_CHANNEL_REJECTED(105)
, ERR_TOKEN_EXPIRED(109)
, and ERR_INVALID_TOKEN(110)
.
**3. State of the local network type **
v2.4.1 adds the onNetworkTypeChanged callback to indicate the local network type. In this callback, the SDK returns the UNKNOWN
, DISCONNECTED
, LAN
, WIFI
, 2G
, 3G
, or 4G
type. When the network connection is interrupted, this callback indicates whether or not the interruption is caused by a network type change or poor network conditions.
4. Getting the audio mixing volume
v2.4.1 adds the getAudioMixingPlayoutVolume and getAudioMixingPublishVolume methods, which respectively gets the audio mixing volume for local playback and remote playback, to help you troubleshoot audio volume related issues.
5. Reporting when the first remote audio frame is received and decoded
To get the more accurate time of the first audio frame from a specified remote user, v2.4.1 adds the onFirstRemoteAudioDecoded callback to report to the app that the SDK decodes first remote audio. This callback is triggered in either of the following scenarios:
- The remote user joins the channel and sends the audio stream.
- The remote user stops sending the audio stream and re-sends it after 15 seconds.
The difference between the onFirstRemoteAudioDecoded and onFirstRemoteAudioFrame
callbacks is that the onFirstRemoteAudioFram
e callback occurs when the SDK receives the first audio packet. It occurs before the onFirstRemoteAudioDecoded
callback.
Improvements
1. Playing multiple online audio effect files simultaneously
v2.4.1 adds the support for playing multiple online audio effect files simultaneously by allowing you to call the playEffect method multiple times with the URLs of the online audio effect files.
2. Reporting more statistics
-
v2.4.1 adds the txPacketLossRate and rxPacketLossRate parameters in the RtcStats class. These parameters return the packet loss rate from the local client to the server and vice versa.
-
To provide more accurate statistics of the local and remote video, v2.4.1 makes the following changes to the following classes:
- LocalVideoStats: Adds the encoderOutputFrameRate and rendererOutputFrameRate parameters.
- RemoteVideoStats: Adds thedecoderOutputFrameRate parameter, and renames the
receivedFrameRate
parameter to the rendererOutputFrameRate parameter.
3. Miscellaneous
- Improved the sound quality of the GAME_STREAMING audio scenario.
- Reduced the audio latency.
- Reduced the SDK package size by 0.5 M.
- Improved the accuracy of the network quality after users change the video bitrate.
- Enabled the audio quality notification callback by default, that is, enabled the onRemoteAudioStats callback without calling the
enableAudioVolumeIndication
method. - Improved the stability of CDN streaming services.
Issues fixed
Audio
- The audio stream is played through the loudspeaker even after the user plugs in the earphone.
- The user cannot hear the audio mixing file through Bluetooth in the single-host scenario.
- Exceptions occur when playing the audio mixing file in the
LIVE_BROADCASTING
profile.
Miscellaneous
- Users still receive the
onNetworkQuality
callback after leaving the channel. - Occasional crashes.
- The app quits after calling
joinChannel
.
API changes
To improve your experience, we made the following changes to the APIs:
Unified the C++ interface for all platforms
v2.4.1 unifies the behavior of the C++ interfaces across different platforms so that you can apply the same code logic on different platforms. v2.4.1 implements the methods of the RtcEngineParameters
class in the IRtcEngine
class. Refer to Agora C++ API Reference for All Platforms home page for the applicable platforms and considerations of each interface.
Added
- getAudioMixingPlayoutVolume
- getAudioMixingPublishVolume
- onFirstRemoteAudioDecoded
- onNetworkTypeChanged
- onRtmpStreamingStateChanged
- The audioCodecProfile parameter in the
LiveTranscoding
class - The txPacketLossRate and rxPacketLossRate parameters in the
RtcStats
class
Deprecated
enableAudioQualityIndication
- The
WARN_LOOKUP_CHANNEL_REJECTED(105)
warning code. Use CONNECTION_CHANGED_REJECTED_BY_SERVER(10) in the onConnectionStateChanged callback instead. - The
ERR_TOKEN_EXPIRED(109)
error code. Use CONNECTION_CHANGED_TOKEN_EXPIRED(9) in the onConnectionStateChanged callback instead. - The
ERR_INVALID_TOKEN(110)
error code. Use CONNECTION_CHANGED_INVALID_TOKEN(8) in the onConnectionStateChanged callback instead.
v2.4.0 and Earlier
v2.4.0
v2.4.0 is released on April 1, 2019.
New features
1. Voice changer and voice reverberation
Adding voice changer and reverberation effects in an audio chat room brings much more fun. v2.4.0 adds the setLocalVoiceChanger
and setLocalVoiceReverbPreset
methods, allowing you to change your voice or reverberation by choosing from the preset options. See Adjust the pitch and tone.
2. Tracking the sound position of a remote user
v2.4.0 adds the enableSoundPositionIndication
and setRemoteVoicePosition
methods. Call the enableSoundPositionIndication
method before joining a channel to enable stereo panning for the remote users, and then you can call the setRemoteVoicePosition
method to track the position of a remote user.
3. Pre-call last-mile network probe test
Conducting a last-mile probe test before joining the channel helps the local user to evaluate or predict the uplink network conditions. v2.4.0 adds the startLastmileProbeTest
, stopLastmileProbeTest
, and onLastmileProbeResult
APIs, allowing you to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
4. State of an audio mixing file
v2.4.0 adds the onAudioMixingStateChanged
callback to report any change of the audio-mixing file playback state (playback succeeds or fails) and the corresponding reason. This release also adds the warning code 701, which is triggered if the local audio-mixing file does not exist, or if the SDK does not support the file format or cannot access the music file URL when playing the audio-mixing file.
5. Setting the log file size
The SDK has two log files, each with a default size of 512 KB. In case some customers require more than the default size, v2.4.0 adds the setLogFileSize
method for setting the log file size (KB).
6. Cloud proxy
Supports the cloud proxy service. See Use Cloud Proxy for details.
Improvements
1. Accuracy of call quality statistics
- v2.4.0 adds the
intervalInSeconds
parameter to thestartEchoTest
method, allowing you to set the interval between when you speak and when the recording plays back. - v2.4.0 adds three parameters to the
LocalVideoStats
class:targetBitrate
for setting the target bitrate of the current encoder,targetFrameRate
for setting the target frame rate, andqualityAdaptIndication
for reporting the quality of the local video since last count.
2. Core quality improvements
- Reduces the audio delay.
- Improves the video quality and stability.
- Shortens the time to render the first remote video frame.
- Reduces the time delay when playing through the earpiece and minimizes the echo.
Issues Fixed
Audio
- Calling the
enableLocalAudio
method disconnects all connected Bluetooth devices. - The SDK does not support audio mixing URLs with Chinese characters.
- Volume levels of the high-pitch sound are lowered.
- Sounds are occasionally played fast.
- The app cannot adjust the volume on some devices.
Miscellaneous
- The user drop-offline time between Android and iOS is not unified.
- The SEI information does not synchronize with the media stream when publishing transcoded streams to the CDN.
API Changes
To improve your experience, we made the following changes to the APIs:
Added
setLocalVoiceChanger
setLocalVoiceReverbPreset
enableSoundPositionIndication
setRemoteVoicePosition
startLastmileProbeTest
stopLastmileProbeTest
setRemoteUserPriority
startEchoTest
setLogFileSize
onAudioMixingStateChanged
onLastmileProbeResult
Deprecated
startEchoTest
v2.3.3
v2.3.3 is released on January 24, 2019.
Issues Fixed
- Occasional inaccurate statistics returned in the
onNetworkQuality
callback. - Occasional crashes on Huawei P9.
v2.3.2
v2.3.2 is released on January 16, 2019.
Compatibility changes
Besides the new features and improvements mentioned below, it is worth noting that v2.3.2:
- Improves the SDK's ability to counter packet loss under unreliable network conditions.
- Improves the communication smoothness.
- Reduces video freezes in the
LIVE_BROADCASTING
profile.
Before upgrading your SDK, ensure that the version is:
- Native SDK v1.11 or later.
- Web SDK v2.1 or later.
New features
Independent audio mixing volume adjustments for local playback and remote publishing
v2.3.2 adds the adjustAudioMixingPlayoutVolume
and adjustAudioMixingPublishVolume
methods to complement the adjustAudioMixingVolume
method, allowing you to independently adjust the audio mixing volume for local playback and remote publishing.
This release also changes the behavior of the adjustPlaybackSignalVolume method to control only the voice volume. Therefore, to mute the local audio playback, call both the adjustPlaybackSignalVolume(0)
and adjustAudioMixingVolume(0)
methods.
See Adjust the Volume for the scenarios and corresponding APIs.
Improvements
1. Improves the accuracy of the call quality statistics
v2.3.2 deprecates the onAudioQuality
callback and replaces it with the onRemoteAudioStats
callback to improve the accuracy of the call quality statistics. The onRemoteAudioStats
callback returns parameters such as the audio frame loss rate, end-to-end audio delay, and jitter buffer delay at the receiver, which are more closely linked to the real user experience. In addition, v2.3.2 optimizes the algorithm of the onNetworkQuality
callback for the uplink and downlink network qualities.
onRemoteAudioStats
: Reports the statistics of the remote audio stream from each user/host. This callback replaces the onAudioQuality callback.onNetworkQuality
: Reports the last mile network quality of each user in the channel.
We plan to improve the following callback in subsequent versions:
onLastmileQuality
: Reports the last mile network quality of the local user before the user joins a channel.
For the list of API methods related to the call quality statistics and on how and when to use them, see Report In-call Statistics.
2. New network connection policy
v2.3.2 adds the following API method and callback to get the current network connection state and the reason for a connection state change:
getConnectionState
: Gets the connection state of the SDK.onConnectionStateChanged
: Occurs when the connection state of the SDK to the server changes.
v2.3.2 deprecates the onConnectionInterrupted
and onConnectionBanned
callbacks.
In the new API method, the network connection states are "disconnected", "connecting", "connected", "reconnecting", and "failed". The SDK triggers the onConnectionStateChanged
callback when the network connection state changes. The SDK also triggers the onConnectionInterrupted
and onConnectionBanned
callbacks under certain circumstances, but we do not recommend using them.
3. Improves the call rating system
v2.3.2 changes the rating parameter in the rate
method to "1 to 5" to encourage more feedback from end-users on the quality of a call or interactive live streaming. You can use this feedback for future product improvement. We strongly recommend integrating this method in your app.
4. Other improvements
- Minimizes packet loss under unreliable network conditions in the
LIVE_BROADCASTING
profile. - Improves the stability in pushing streams.
- Improves the performance of the SDK on Android 6.0 or later.
- Optimizes the API calling threads.
- Checks the headset and Bluetooth device connection.
- Reduces the audio delay.
Issues Fixed
The following issues are fixed in v2.3.2:
SDK
- Crashes on emulators, such as Yeshen and mumu.
- Crashes on Android 6.0+ due to x86 .so relocation.
Audio
- A user joins a live-streaming channel with a Bluetooth headset. The audio is not played through the Bluetooth headset when the user leaves the channel and opens another app.
- Crashes when calling the
startAudioMixing
method to play music files. - A previously disabled microphone becomes enabled when the device connects to a headset.
- On Huawei Mate 20 X, a remote user cannot hear any voice when the app switches to the background and the user opens another app.
- Echo on Pixel 2.
- Cannot adjust the volume of the speaker when users change roles, join and leave channels, or a system phone or Siri interrupts.
- Users do not hear any voice for a while when an app switches back from the background.
API Changes
To improve your experience, we made the following changes to the APIs:
Added:
getConnectionState
adjustAudioMixingPlayoutVolume
adjustAudioMixingPublishVolume
onConnectionStateChanged
onCameraExposureAreaChanged
onRemoteAudioStats
Deprecated
v2.3.1
v2.3.1 is released on October 12, 2018.
New features
Disables/Re-enables the Local Audio Function
When a user joins a channel, the audio function is enabled by default.
To receive audio streams without sending any audio stream after joining a channel, this version adds the enableLocalAudio
method is to disable or re-enable the local audio function.
Once the local audio function is disabled or re-enabled, the SDK returns the onMicrophoneEnabled
callback, and the local audio capturing stops.
This method does not affect receiving or playing the remote audio streams.
The difference between this method and the muteLocalAudioStream
method is that the enableLocalAudio
method does not capture or send any audio stream, while the muteLocalAudioStream
method captures but does not send audio streams.
Issues Fixed
LIVE_BROADCASTING
profile: Delay at the client due to incorrect statistics.LIVE_BROADCASTING
profile: Occasional crashes on some Android devices after a user repeats the process of switching roles betweenBROADCASTER
andAUDIENCE
.- Occasionally on some Android devices, a user hears a popping sound if the user leaves the channel at the same time another user is speaking.
v2.3.0
v2.3.0 is released on August 31, 2018.
Compatibility changes
-
From v2.3.0, the
LiveTranscoding
class is moved from the io.agora.live package to theio.agora.rtc.live
package. -
Fixed a typo in the constants.java API in v2.3.0.
- Before:
- After:
-
The security keys are improved and updated in v2.1.0.
New features
1. Notifies the user that the token expires in 30 seconds
The SDK returns the onTokenPrivilegeWillExpire
callback 30 seconds before a token expires to notify the app to renew it. When this callback is received, you need to generate a new token on your server and call the renewToken
method to pass the newly-generated token to the SDK.
2. Returns user-specific upstream and downstream statistics, including the bitrate, frame rate, packet loss rate and time delay
The onRemoteAudioTransportStats
callback is added to provide user-specific upstream and downstream statistics, including the bitrate, frame rate, and packet loss rate. During a call or the interactive live streaming, the SDK triggers these callbacks once every two seconds after the user receives audio/video packets from a remote user. The callbacks include the user ID, audio bitrate at the receiver, packet loss rate, and time delay (ms).
Improvements
- Improves the quality for one-on-one voice/video scenarios with optimized latency and smoothness, especially for areas like Southeast Asia, South America, Africa, and the Middle East.
- Improves the audio encoder efficiency in the interactive live streaming to reduce user traffic while ensuring the call quality.
- Improves the audio quality during a call or the interactive live streaming using the deep-learning algorithm.
Issues Fixed
- Excessive increase in memory usage when multiple delegated hosts start streaming in the channel.
- Occasional crashes on some Android devices.
- Occasional crashes after interoperating with devices of other platforms for some Android devices.
- Excessive increase in the memory usage for the host when the host frequently joins and leaves a channel that has multiple delegated hosts.
- Occasionally, the remote user cannot hear the host when the host switches between
AUDIENCE
andBROADCASTER
. - Occasionally, the
destroy
method does not respond after a user enables the video and joins a channel. - Occasional crashes on Android devices when remote users frequently join and leave the channel.
- Occasionally, the audience cannot adjust the channel volume.
- Occasional crashes when one of the two hosts mutes or disables the local audio while playing the background music.
- Occasional crashes on some devices when preloading the sound effects.
- Failure to enable the hardware encoder on some Android devices.
- The host cannot receive the audio/video stream of the delegated host on some Android devices.
- Occasional crashes on some Android devices when a user frequently changes the token.
- Occasional inter-operational failures between SIP devices and the SDK.
- Occasional echo issues when using a specific audio card.
API Changes
To improve your experience, we made the following changes to the APIs:
To avoid adding too many users with the same uid into the CDN publishing channel, the following API method is deleted in v2.3.0, and the return value type of addUser
is changed from void to int.
-
setUser
The following API methods are deleted and no longer supported in v2.3.0. Agora provides the Recording SDK for better recording services. For more information on the Recording SDK, see Release Notes for Agora Recording SDK.
-
startRecordingService
-
stopRecordingService
-
refreshRecordingServiceStatus
The following deprecated API methods are deleted and no longer supported from v2.3.0:
-
monitorConnectionEvent
-
monitorBluetoothHeadsetEvent
-
monitorHeadsetEvent
-
setPreferHeadset
-
switchView
-
setSpeakerphoneVolume
v2.2.3
v2.2.3 is released on July 5, 2018.
Compatibility changes
The security keys are improved and updated in v2.1.0. If you are using an Agora SDK version below v2.1.0 and wish to migrate to the latest version, see Token Migration Guide
.
Issues Fixed
- Occasional online statistics crashes.
- The host's voice distorts occasionally on some Android devices.
- Occasional crashes during the interactive live streaming.
- Excessive increase in the memory usage when multiple delegated hosts start streaming in the channel.
- Receiving the
onLeaveChannel
callback long after a user has left the channel on some Android devices. - Failing to report the uid and volume of the speaker in a channel.
- Unsteady voice volume of the host's in the interactive live streaming.
v2.2.2
v2.2.2 is released on June 21, 2018.
Issues Fixed
- Fixed occasional online statistics crashes.
- Fixed occasional audio crashes on some Android devices.
- Fixed the issue that the host's voice distorts occasionally on some Android devices.
- Fixed the issue of failing to report the uid and volume of the speaker in a channel.
- Fixed the issue of receiving the
onLeaveChannel
callback long after a user has left the channel on some Android devices.
v2.2.1
v2.2.1 is released on May 30, 2018.
Issues Fixed
- Occasional crashes during gaming on some Android devices.
- The soundtrack pointer cannot be retrieved on some Android devices.
- Occasional crashes on some Android devices.
- The audio volume on some Android devices cannot be adjusted after a headset is plugged in.
v2.2.0
v2.2.0 is released on May 4, 2018.
New features
1. Play the audio effect in the channel
Adds a publish
parameter in the playEffect
method for the remote user in the channel to hear the audio effect played locally.
If your SDK is upgraded to v2.2 from a previous version, pay attention to the functional changes of this API.
2. Deploy the proxy at the server
We provide a proxy package for enterprise users with corporate firewalls to deploy before accessing our services.
Improvements
1. Audio volume indication
Improves the enableAudioVolumeIndication
method. This method once enabled, sends the audio volume indication of the speaker in its callback at set intervals, regardless of whether anyone is speaking in the channel.
2. Network quality detection during a session
To meet the customers’ need for real-time network quality detection in the channel, the onNetworkQuality
method improves its data accuracy.
3. Last mile network quality detection before joining a channel
To test if the customers’ network condition can support voice or video calls before joining the channel, the onLastmileQuality
callback changes the detection from a fixed bitrate to the bitrate set by the customer in the setVideoProfile
method to improve data accuracy. When the network condition is unknown, the SDK triggers this callback once every two seconds.
4. Audio quality enhancement
Improves the audio quality in scenarios that involve music playback.
v2.1.3
v2.1.3 is released on April 19, 2018.
In v2.1.3, Agora updates the bitrate values of the setVideoProfile
method in the LIVE_BROADCASTING
profile. The bitrate values in v2.1.3 stay consistent with those in v2.0.
Issues Fixed
Occasional recording failures on some phones when a user leaves a channel and turns on the built-in recording device.
v2.1.2
v2.1.2 is released on April 2, 2018.
Issues Fixed
Video freeze in DTX + AAC mode.
v2.1.1
v2.1.1 is released on March 16, 2018.
Agora has identified a critical issue in SDK v2.1. Upgrade to v2.1.1 if you are using Agora SDK v2.1.
v2.1.0
v2.1.0 is released on March 7, 2018.
New features
1. Voice Optimization
Adds a scenario for the game chat room to reduce the bandwidth and cancel the noise with the setAudioProfile
method.
2. Enhance the audio effect input from the built-in microphone
In an interactive-streaming scenario, the host can enhance the local audio effects from the built-in microphone with the setLocalVoiceEqualization
and setLocalVoiceReverb
methods by implementing the voice equalization and reverberation effects.
3. Online statistics query
Adds RESTful APIs to check the status of the users in the channel, the channel list of a specific company, and whether the user is an audience or a host.
Improvements
Improvement | Description |
---|---|
Video Freeze Rate | Reduces the video freeze rate in the audience mode and for specific devices. |
Authentication | Supports a new authentication mechanism. Each legacy Dynamic Key (Channel Key) corresponds to a single privilege (for example, joining a channel), but each token in the new authentication mechanism includes all privileges (for example, joining a channel, hosting in, and stream-pushing). |
Issues Fixed
- Occasional playback noise on specific devices.
- Occasional crackling voice playback on specific devices.
- Occasional crashes.
v2.0.2
v2.0.2 is released on December 15, 2017, and fixes occasional audio routing issues.
v2.0
v2.0 is released on December 6, 2017.
New Features
- Supports external audio sources in the
COMMUNICATION
andLIVE_BROADCASTING
profiles by adding the following API methods:
Name | Description |
---|---|
setExternalAudioSource |
Enables the external audio source function. |
pushExternalAudioFrame |
Pushes the external audio frame to the Agora SDK. |
- Provides a set of RESTful APIs to ban a peer user from the server in the
COMMUNICATION
andLIVE_BROADCASTING
profiles profiles. Contact support@agora.io to enable this function, if required. - Supports the following Android emulators: NOX, Lightning, and Xiaoyao.
Issues Fixed
- Audio routing and Bluetooth issues.
- Optimizes the volume balance control.
v1.14
v1.14 is released on October 20, 2017.
New Features
- Adds the
setAudioProfile
method to set the audio parameters and scenarios - Adds the
setLocalVoicePitch
method to set the local voice pitch LIVE_BROADCASTING
: Adds thesetInEarMonitoringVolume
method to adjust the volume of the in-ear monitor
Improvements
- Optimizes the audio at high bitrates.
LIVE_BROADCASTING
: The audience can view the host within one second in a single-stream mode (226 ms on average, and 204 ms under good network conditions).- Adds the ability to reduce the bandwidth.
- Before v1.14: If you muted the audio of a specific user, the network still sent the stream.
- Starting from v1.14: If you mute the audio of a specific user, the network will not send the stream of the user to reduce the bandwidth.
Issues Fixed
Camera related issues on Android devices.
v1.13.1
v1.13.1 is released on September 28, 2017, and optimizes the echo issue under certain circumstances.
v1.13
v1.13 is released on September 4, 2017.
New Features
- Adds the function to dynamically enable and disable acquiring the sound card in the interactive live streaming.
- Adds the function to disable the audio playback.
- Adds the
onClientRoleChanged
callback to report to the app on a user role switch between the host and the audience in the interactive live streaming. - Supports the push-stream failure callback on the server side.
Issues Fixed:
Occasional crashes on some devices.
v1.12
v1.12 is released on July 25, 2017.
New Features:
- Adds the
aes-128-ecb
encryption mode in thesetEncryptionMode
method. - Adds the
quality
parameter in thestartAudioRecording
method to set the recording audio quality. - Adds a set of APIs for audio effect management.
Issues Fixed:
- Android: Bluetooth issues related to audio routing.
- Android/iOS/Mac/Windows: Occasional crashes.