This page provides the release notes for the Agora Web SDK.

Overview

The Agora Web SDK (WebRTC) is a JavaScript library loaded by an HTML web page. The Agora Web SDK library uses APIs in the web browser to establish connections and control the communication and live broadcast services. For the key features included in each scenario, see Voice Overview, Video Overview, and Interactive Broadcast Overview.

Compatibility

See the table below for the web browser support of the Agora Web SDK:

Platform Google Chrome 58 or later Firefox 56 or later Safari 11 or later Opera 45 or later QQ Browser 360 Secure Browser WeChat Built-in Browser
Android 4.1 or later N/A
iOS 11 or later
macOS 10 or later
Windows 7 or later N/A

The Agora Web SDK v2.5 or later also supports Google Chrome 49 on Windows XP.

To enable interoperability between the Agora Native SDK and Agora Web SDK, use the Agora Native SDK v1.12 or later.

Known Issues and Limitations

  • Due to web browser autoplay policy changes, Stream.play, Stream.startAudioMixing, and Stream.getAudioLevel need to be triggered by the user's gesture on Google Chrome 70 or later and Safari web browsers, see Autoplay Policy Changes.
  • The Agora Web SDK supports video profiles of up to 1080p resolutions if the client has a true HD camera installed. However, the maximum resolution is limited by camera device capabilities.
  • The Agora Web SDK does not support code obfuscation.

For more issues, see Web FAQs.

v2.5.1

v2.5.1 is released on February 19, 2019.

New Features

1. More Call Quality Statistics

Adds more statistics on the call quality.

  • Adds the Client.getSessionStats method to get the statistics of the call sessions, such as the duration in the channel, the total received and sent bitrate of the stream, and the number of users in the channel.
  • Adds the network-quality callback to report the uplink and downlink network conditions of the local user once every two seconds.
  • Adds the following audio statistics of the remote stream to the Client.getRemoteAudioStats method:
    • The total freeze time of the received audio.
    • The total playback duration of the received audio.
  • Adds the following video statistics of the remote stream to the Client.getRemoteVideoStats method:
    • The resolution width of the received video.
    • The resolution height of the received video.
    • The total playback duration of the received video.
    • The total freeze time of the received video.
  • Adds the following video statistics of the local stream to the Client.getLocalVideoStats method:
    • The resolution width of the sent video.
    • The resolution height of the sent video.
    • The frame rate of the sent video.
    • The total duration of the encoded video.
    • The total freeze time of the encoded video.
  • Adds the following statistics of the transmission quality to the Agora service to the Client.getTransportStats method:
    • The estimated uplink bandwidth.
    • The network type.

2. Support for Receiving the Audio/Video Data Independently

Adds the options parameter to the Client.subscribe method to set whether or not to receive the audio and/or video data.

This method can be called multiple times and enables users to switch between receiving and not receiving the audio and/or video data flexibly.

3. Support for Injecting Online Media Streams to Live Broadcasts

Adds the Client.addInjectStreamUrl method to pull a voice or video stream and inject it into a live channel. This is applicable to scenarios where all of the audience members in the channel can watch a live show and interact with each other.

Adds the streamInjectedStatus callback to inform the app of changes to the injection status.

4. Support for Setting the User Role

Adds the Client.setClientRole method to set the user role as a host or an audience in a live broadcast. A host can both send and receive streams while an audience can only receive streams.

Adds the client-role-changed callback to inform the app of changes to the user role.

5. Connection Status

  • Adds the Client.getConnectionState method to retrieve the connection status between the SDK and Agora's edge server.
  • Adds the connection-state-change callback to inform the app of changes to the connection status.

6. Other New Features

  • Adds the Stream.isPlaying method to detect whether or not a stream is playing.
  • Adds the following callbacks in Client.on:
    • peer-online: Informs the app that a remote user or host joins the channel.
    • stream-reconnect-start: Informs the app that the SDK starts republishing or re-subscribing to streams.
    • stream-reconnect-end: Informs the app that the SDK finishes republishing or re-subscribing to streams.
    • exception: Informs the app of exceptions.
  • Adds the following callbacks in Stream.on:
    • audioMixingPlayed: Informs the app that the audio mixing stream starts or resumes playing.
    • audioMixingFinished: Informs the app that the audio mixing stream finishes playing.

Improvements

  • Adds the muted parameter to the Stream.play method to work around the web browser's autoplay policy.
  • Adds the callback parameter to the Stream.setAudioMixingPosition method to return error messages when the method call fails.
  • Modifies the names of some events in Client.on to be consistent in style.

Issues Fixed

  • The video resolution of the remote video returned by the getStats method is 0 on Safari for macOS.
  • The user cannot hear the microphone when the enableAudio method is called after disabling audio and then starting audio mixing.
  • Logs cannot be uploaded when offline.
  • The volume retrieved by calling the getAudioLevel method is 0 after calling the switchDevice method to switch audio devices.
  • Users hear their own voice after calling the replaceTrack method.
  • Users cannot switch devices twice on iOS when calling the switchDevice method.

API Changes

New APIs

API Updates

  • Client.subscribe: Adds the options parameter.

  • Stream.setAudioMixingPosition: Adds the callback parameter.

  • Stream.play: Adds the muted parameter.

  • Renames the following events in Client.on:

    Old Event Name Current Event Name
    networkTypeChanged network-type-changed
    recordingDeviceChanged recording-device-changed
    playoutDeviceChanged playout-device-changed
    cameraChanged camera-changed
    streamTypeChange stream-type-changed

Deprecated APIs

  • Client.getNetworkStats
  • Stream.enableAudio
  • Stream.disableAudio
  • Stream.enableVideo
  • Stream.disableVideo

v2.5.0

v2.5.0 is released on October 30, 2018.

If you set the domain firewall, ensure that *.agoraio.cn and *.agora.io are added to your whitelist before using this version.

New Features

To enable better interoperability between the Agora Web SDK and other Agora SDKs, this version adds the following features. For detailed descriptions of the APIs, see Agora Web SDK API Reference.

1. Quality Transparency

Adds the following API methods on call statistics to give users a better idea of the call quality:

  • Client.getNetworkStats: Retrieves network statistics (network type).
  • Client.getSystemStats: Retrieves the system statistics (system battery level).
  • Client.getRemoteAudioStats: Retrieves the audio statistics of the remote stream.
  • Client.getLocalAudioStats: Retrieves the audio statistics of the local stream.
  • Client.getRemoteVideoStats: Retrieves the video statistics of the remote stream.
  • Client.getLocalVideoStats: Retrieves the video statistics of the local stream.
  • Client.getTransportStats: Retrieves the statistics of network transportation.

2. Device Management

Provides flexible device management and device status notification.

  • Device Enumeration

Adds the following API methods:

  • Client.getRecordingDevices: Enumerates the audio input device, such as the microphone.
  • Client.getPlayoutDevices: Enumerates the audio output device, such as the speaker.
  • Client.getCameras: Enumerates the video input device, such as the camera.

Adds the following callbacks to inform the app on relevant device changes:

  • recordingDeviceChanged: The audio input device is changed.
  • playoutDeviceChanged: The audio output device is changed.
  • cameraChanged: The video input device is changed.
  • Device Switching

Adds the following API methods:

  • Stream.switchDevice: Switches the media input devices in the channel. For example, the microphone and camera.
  • Stream.setAudioOutput: Sets the audio output device. You can use this method to switch between the microphone and the speaker.

3. Audio Mixing

Supports audio mixing, namely mixing the original sound (the audio captured by the microphone) with the audio playback (an audio file).

Adds the following API methods:

  • Stream.startAudioMixing: Starts audio mixing.
  • Stream.stopAudioMixing: Stops audio mixing.
  • Stream.pauseAudioMixing: Pauses audio mixing.
  • Stream.resumeAudioMixing: Resumes audio mixing.
  • Stream.adjustAudioMixingVolume: Adjusts the audio mixing volume.
  • Stream.getAudioMixingDuration: Retrieves the audio mixing duration.
  • Stream.getAudioMixingCurrentPosition: Retrieves the current position of the audio mixing.
  • Stream.setAudioMixingPosition: Sets the playback position of the audio mixing.

4. Audio/Video Track Management

Provides flexible management of the audio and video tracks.

Adds the following API methods:

  • Stream.getAudioTrack: Retrieves the audio track.
  • Stream.getVideoTrack: Retrieves the video track.
  • Stream.replaceTrack: Replaces the audio/video track.
  • Stream.addTrack: Adds an audio/video track.
  • Stream.removeTrack: Removes an audio/video track.

5. Other New Features

  • Support for two video display modes. You can set the display mode in the Stream.play method.
  • Adds the Client.enableAudioVolumeIndicator method to enable the SDK to regularly report on the active speakers and their volumes.
  • Adds the Stream.setAudioVolume method, which sets the audio volume of the subscribed stream.
  • Adds the networkTypeChanged callback to inform the app on network type changes.
  • Adde the streamTypeChanged callback to inform the app on stream type changes (from a low-stream video to a high-stream video or vice versa).
  • Supports both string and number types for the uid parameter in the Client.join method.
  • Supports 360 Secure Browser 9.1.0.432 and later.
  • Supports Google Chrome 49 on Windows XP.

Issues Fixed

  • The dependency on the video codec in audio-only calls when a user joins a channel from Safari or Google Chrome on mobile devices.
  • A failure to receive the stream-removed callback 10 seconds after another user calls Stream.close to stop streaming from the Safari browser.
  • A warning after a user uses the same UID to reset Stream.userID.

v2.4.1

v2.4.1 is released on September 19, 2018.

Issues Fixed

  • The local publisher may not automatically publish after an IP address change, so the remote subscriber cannot receive the video stream.
  • Unsubscribing from the remote stream triggers the stream-removed event.

v2.4.0

v2.4.0 is released on August 24, 2018.

New Features

1. Support for the Token

See Security Keys for details.

2. Support for Audio Processing

Adds the support for AEC (Acoustic Echo Cancellation) and ANS (Automatic Noise Suppression) in the audioProcessing property.

3. Support for Audio/Video Pre-processing

Adds the audioSource and videoSource properties in the client.createStream method, which specifies the audio and video tracks. Therefore, you can process the audio/video before creating a stream.

4. Support for Setting Audio Profile

Adds the stream.setAudioProfile method, which provides various audio profile options (the sample rate, mono or stereo, and the encoding rate).

5. Support for Setting Stream Fallback

Adds the client.setStreamFallbackOption method, which allows the receiver to automatically subscribe to the low-stream video or the audio-only stream under poor network conditions.

The callback function of stream.getStats adds delay-related statistics, including the delays from the publisher to the SD-RTN, from the SD-RTN to the subscriber, from end to end, and from sending to playing audio/video.

7. Support for Log Upload

Adds the AgoraRTC.Logger.enableLogUplaod method, which supports uploading the SDK’s log to Agora’s server.

Issues Fixed

  • The cameraId and microphoneId settings do not take effect unless stream.setVideoProfile is called.
  • Calling setScreenProfile does not take effect on the Firefox browser.
  • An error occurs if both audio and the screen are enabled in the client.createStream method.
  • The microphoneId setting does not take effect in screen sharing.
  • The audioProcessing settings do not take effect.
  • The stream.play method can be called repeatedly without calling the stream.stop method.

v2.3.1

v2.3.1 is released on June 7, 2018.

Issues Fixed

  • Occasional publishing failures on web browsers that installed the Adblock Plus extension.
  • Invalid IP jumps.

v2.3.0

v2.3.0 is released on June 4, 2018.

New Features

1. New Session Mode

To increase the application scenarios and improve interoperability with the Agora Native SDK, the mode and codec parameters are added in the createClient method, in which mode includes rtc and live, while codec includes vp8 and h264.

2. Support for Audio Gain Control

To meet customers’ needs for audio control during a communication or live broadcast session, the audioProcessing parameter is added in the createStream method.

3. Support for Proxy on the Web Side

To enable enterprises with a company firewall to access Agora’s services, the setProxyServer and setTurnServer methods are added. By calling these methods, you can bypass the firewall and send the signaling messages and media data directly to the Agora SD-RTN through the servers. You need to deploy the Nginx and TURN server before calling these methods before joining the channel. For more information, see Deploying the Enterprise Proxy.

4. Support for Encryption

Encryption is supported to enhance security for communication or live broadcast. Users need to set the encryption mode and password before joining a channel to use this function.

Issues Fixed

In the case of p2plost, the SDK stops reconnecting to the server after one or several reconnections.

v2.2

v2.2 is released on April 16, 2018.

New Features

1. Gets the version information.

Supports getting the version of the current Web SDK.

2. Sets the low-stream parameter.

Adds the setLowStreamParameter method to set the low-stream parameter.

3. Supports screen-sharing for the Firefox browser.

Adds the support for the Firefox browser to share the screen, by adding a mediaSource property in the createStream method. See Screen Sharing on Firefox for details.

4. Supports the QQ browser.

Adds the support for the QQ browser.

Issues Fixed

No voice in the voice-only mode when an iOS device joins a session using the Safari browser.

v2.1.1

v2.1.1 is released on March 19, 2018.

Fixed the issue of unable to view the remote video when using the Web SDK on the Firefox browser v59.01 on macOS.

v2.1.0

v2.1.0 is released on March 7, 2018.

New Features

Function Description
Quality Detection Adds callbacks to return the quality of the compatibility, microphone, camera, and network status.
Simulcast Adds the function of controlling which stream type (high or low) to send or receive.
User-ban Notification Adds a callback to notify a user of being banned from a channel.
RTMP Stream-Pushing Adds a method to support RTMP stream-pushing.
Log Output Level Settings Adds a method to set the log output level.
Mute/Unmute Adds a method to mute or unmute users in a call or an interactive broadcast.

Improvements

Improvement Description
P2P Connection Establishment Shortens the time from 1.8 s to 500 ms.
Packet Loss Optimizes the FEC packet loss and ULP FEC packet loss.

Issues Fixed

  • 90-degree video rotation on Safari
  • Not seeing the remote video when using the Web SDK on the Firefox browser v59.01 on macOS

v2.0 and Earlier

v2.0

v2.0 is released on November 21, 2017.

New Features

  • Adds the check web-browser compatibility function before calling the CreateClient method, to check the compatibility between the system and the web browser.
  • Adds the callback to notify the app that a user has granted or denied access to the camera or microphone.
  • Adds the video self-adjustment function, by automatically lowering the resolution or frame rate until the video profile matches the input hardware’s capability.

Issues Fixed

  • Volume issue with iOS SDK interop.
  • Disconnection on Google Chrome caused by prolonged communication.
  • Abnormal screen display on Android devices when the device switches between front and rear cameras.
  • Abnormal screen display on Android devices when one of the Android devices in the session leaves the channel.
  • No camera-access-grant notification on Google Chrome when it joins the channel without access to a camera.
  • No image on the iOS Safari web browser after the user returns from another app.

v1.14

v1.14 is released on October 20, 2017.

Adds the screen sharing function by modifying the screen parameter and adding the parameter in the createStream method.

v1.13

v1.13 is released on September 4, 2017.

New Features

  • Supports CDN Live with the configPublisher method.
  • Supports Google Chrome for Android.

v1.12

v1.12 is released on July 25, 2017.

  • Adds and updates the following APIs:

    API Type Description
    createClient New Creates a client object for web-only or web interop depending on which mode you set.
    renewChannelKey New Updates a Channel Key when the previous Channel Key expires.
    active-speaker New Indicates who is the active speaker in the current channel.
    setRemoteVideoStreamType New Specifies the video stream type of the remote user to be received by the local user when the remote user sends dual streams.
    setVideoProfile Update Sets the video profile. The default value is 480p_1.
    init Update Initializes the client object.
    join Update Allows a user to join an Agora channel.
  • Updates the error codes.

v1.8.1

v1.8.1 is released on March 16, 2017.

Fixes the incompatibility issue on Google Chrome v57.

v1.8

v1.8 is released on December 26, 2016.

The Agora Web SDK supports both communication and live broadcast scenarios starting from v1.8. This release is a beta version.