Skip to content

AgoraIO/video-sdk-samples-js

Repository files navigation

Agora Video SDK for Web reference app

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.

Samples

The runnable code examples are:

Prerequisites

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.

Run this project

To run the sample projects in this folder, take the following steps:

  1. 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
  2. Install the dependencies

    Open Terminal in the root directory of this project and run the following command:

    pnpm install
  3. Modify the project configuration

    The app loads connection parameters from ./src/agora_manager/config.json . If a valid serverUrl is provided, all samples use a token server to obtain a token except the SDK quickstart project that uses the rtcToken. If a serverUrl is not specified, all samples except Secure authentication with tokens use the rtcToken from config.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 for channelName. 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.
  4. 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.

  5. Run the samples in the reference app

    Choose a sample from the dropdown and test the code.

Contact

If you have any questions, issues, or suggestions, please file an issue in our GitHub Issue Tracker.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published