English | 简体中文
This repository contains sample projects using the Agora RTC Web SDK 4.x.
The Web SDK 4.x refactors the Web SDK 3.x. Based on the features of 3.x, 4.x fully optimizes the internal architecture of the SDK and provides more flexible and easy-to-use APIs.
Compared to the Web SDK 3.x, the Web SDK 4.x has the following advantages:
- Uses promises for asynchronous operations, which improves the robustness and readability of your code.
- Supports TypeScript.
- Replaces the Stream object with Track objects for separate and flexible control over audio and video.
- Improves the channel event notification mechanism, making it easier for you to deal with reconnection.
- Provides more accurate and comprehensive error codes for troubleshooting.
Feature | Sample project location |
---|---|
Basic Examples | /src/example/basic |
Advanced Examples | /src/example/advanced |
Plugin Examples | /src/example/plugin |
Other Examples | /src/example/others |
Vue Framework Example | /src/example/framework/vue |
React Framework Example | /src/example/framework/react |
You need a supported browser to run the sample projects. See Product Overview for a list of supported browsers.
-
In the project root path run the following command to install dependencies.
npm install
-
Use the following command to run the sample project.
npm run dev
-
Open link http://localhost:3001/index.html in browser.
-
In the demo setting page, enter your App ID and App Certificate, then click SetUp button.
- See Get Started with Agora to learn how to get an App ID and App Certificate.
If you have any problems or suggestions regarding the sample projects, feel free to file an issue.
- Check our FAQ to see if your issue has been recorded.
- Dive into Agora SDK Samples to see more tutorials
- Take a look at Agora Use Case for more complicated real use case
- Repositories managed by developer communities can be found at Agora Community
- If you encounter problems during integration, feel free to ask questions in Stack Overflow
The sample projects are under the MIT license.