This app demonstrates use of Agora's Video SDK for real-time audio and video communication. It is a robust and comprehensive documentation reference app for Android, designed to enhance your productivity and understanding. It's built to be flexible, easily extensible, and beginner-friendly.
Clone the repo, run and test the samples, and use the code in your own project. Enjoy.
The runnable code examples are:
- SDK quickstart - the minimum code you need to integrate low-latency, high-concurrency video calling features into your app using Video SDK.
- Secure authentication with tokens - quickly set up an authentication token server, retrieve a token from the server, and use it to connect securely to Video SDK channel.
- Call quality best practice - ensure optimal audio and video quality in your app.
- Secure channels with encryption - integrate built-in encryption into your app using Video SDK..
Before getting started with this reference app, ensure you have the following set up:
- A supported browser.
- Physical media input devices, such as a camera and a microphone.
- The pnpm package manager.
To run the sample projects in this folder, take the following steps:
-
Clone the repository
To clone the repository to your local machine, open Terminal and navigate to the directory where you want to clone the repository. Then, use the following command:
git clone https://github.com/AgoraIO/video-sdk-samples-js.git
-
Install the dependencies
Open Terminal in the root directory of this project and run the following command:
pnpm install
-
Modify the project configuration
The app loads connection parameters from
./src/agora_manager/config.json
. If a validserverUrl
is provided, all samples use a token server to obtain a token except the SDK quickstart project that uses thertcToken
. If aserverUrl
is not specified, all samples except Secure authentication with tokens use thertcToken
fromconfig.json
.Ensure that the file is populated with the required parameter values before running the application.
uid
: The user ID associated with the application.appId
: (Required) The unique ID for the application obtained from Agora Console.channelName
: The default name of the channel to join.token
:An token generated forchannelName
. You generate a temporary token using the Agora token builder.serverUrl
: The URL for the token generator. See Secure authentication with tokens for information on how to set up a token server.tokenExpiryTime
: The time in seconds after which a token expires.
-
Build and run the project
In the project folder, open Terminal and run the following command:
pnpm dev
You open the project at the URL shown in your terminal.
-
Run the samples in the reference app
Choose a sample from the dropdown and test the code.
If you have any questions, issues, or suggestions, please file an issue in our GitHub Issue Tracker.