This page contains information on how to prepare the development environment before enabling a video call with the Agora Web SDK.
- Install a browser supported by the Agora Web SDK as shown in the following table:
Platform Chrome 58+ Firefox 56+ Safari 11+ Opera 45+ QQ Browser Latest 360 Security Browser Wechat Built-in Browser Android 4.1+ ✔ ✔ N/A ✘ ✘ ✘ ✘ iOS 11+ ✘ ✘ ✔ ✘ ✘ ✘ ✘ macOS 10+ ✔ ✔ ✔ ✔ ✔ ✘ ✘ Windows 7+ ✔ ✔ N/A ✔ ✔ ✔ ✘
Agora Web SDK 2.5 or later also supports Chrome 49 on Windows XP.
- Open the ports and whitelist the domains as specified in Firewall Requirements.
- Understand the limitations in Known Issues and FAQ.
Create an Agora Account and Get an App ID
Sign up for a developer account at https://dashboard.agora.io/.
Click Add New Project on the Projects page in Dashboard.
Fill in the Project Name and click Submit. You have created your first project at Agora.
Find the App ID under the created project.
Import the Agora Web SDK to Your Project
Choose one of the following methods to obtain the Agora Web SDK:
Method 1: Get the SDK through npm
This method requires npm, see Install npm for details.
- Run the following command to install the SDK.
npm install agora-rtc-sdk
Add the following code to your project.
import AgoraRTC from 'agora-rtc-sdk'
Method 2: Get the SDK through the CDN
Add the following code to the line above
</body> in your project.
Method 3: Get the SDK from the official Agora website
Download the latest Agora Web SDK.
AgoraRTCSDK-2.5.0.jsfile to your project.
AgoraRTCSDK-2.5.0.jsfile in your project.
The screenshots are for reference only, please use the latest version of the SDK.
Preparing the Web Server
- Install a web server, such as Apache, Nginx, or Node.js.
- Import the downloaded Agora Web SDK to your web server.
- Set up your web server so that you can access the sample app page or your own app page on the supported browsers, see Prerequisites.
You have now set up the environment and can start a call/live broadcast following the steps under Quickstart Guide:
- Initialize the SDK
- Join a Channel
- Publish and Subscribe to Streams