AgoraIO / signaling-sdk-samples-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agora Signaling SDK for Web reference app

This repository holds the code examples used for the Agora Signaling SDK for Web documentation. Clone the repo, run and test the samples, use the code in your own project. Enjoy.

This reference app uses Signaling SDK v2.x.

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/signaling-sdk-samples-web.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

    This app loads connection parameters from ./src/signaling_manager/config.json. If a valid serverUrl is provided, all samples use the token server to obtain a token, except the SDK quickstart which uses token.

    Ensure that config.json is populated with the required parameter values before running this reference app.

    • 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 run dev

    Open the reference app using the URL displayed in Terminal.

  5. Run the samples in the reference app

    Choose a sample and test the code.

Contact

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

About


Languages

Language:JavaScript 72.8%Language:HTML 21.6%Language:CSS 4.9%Language:Shell 0.7%