Web Quickstart - WebAgent

Step 1: Obtain the SDK

Download the latest SDK from downloads or contact sales-us@agora.io.

Component Description
./agent [1] It includes the following applications:
AgoraWebAgent.pkg
AgoraWebAgentSetup.exe
./client Sample web application.
./lib Required libraries
./server Web service-side sample code

Footnotes

[1]Do not use the AgoraWebAgent plugin in this document. This plugin is used in the integration phase, refer to Communication Integration - WebAgent.

Step 2: Prepare the Environments

  1. Be sure that the following browser requirements are satisfied:

    Platform Browser Requirement
    Windows Edge 25.10586.0.0
    Windows 10 Chrome 51.0.2704.103 (64 bit)
    Mac Safari 9.1.1(11601.6.17)

    Note

    • Do not use an unsupported browser, for example, Opera, Firefox, and Chrome browsers are not supported and will behave unpredictably.
    • Chrome is supported on Windows at 640x480p 30fps resolution. Other higher resolutions will be supported in future releases.
  2. Be sure that the following requirements for operating systems are satisfied:

    OS Requirements
    Windows Windows 7 or later
    Mac OS X v10.10 or later
  3. Understand the following capabilities and limitations:

    • The maximum supported video resolution:720p 15fps and 480p 30fps.
    • A PC can only have one instance running.

Step 3: Use the Sample Code

The sample code is the web sample application included in the ./client when downloaded according to Step 1: Obtain the SDK.

Note

Do not mix the usage of web sample application with the AgoraWebAgent plugin. The plugin is used in Communication Integration - WebAgent.

Client

To run the provided sample web application with an App ID:

  1. Ensure that you have a local web server installed, such as Apache, NginX, or Node.js.
  2. Deploy the files under ./client/ to your web server.
  3. Access the sample application page on your web server using one of the supported browsers described in Step 2: Prepare the Environments.
  4. Fill your static App ID to the sample code web page. You can follow Obtaining an App ID to get your App ID.

The default sample code only requires your static App ID. Do the following if you want to run the sample application with a Channel Key:

  1. Set up and launch the key-generation server.
  2. Make an http/https request from the client to the key-generation server to fetch the generated Channel Key.
  3. Call the API method AgoraRTC.client.join.

Server

This code is only required when you want to experiment with using more secure Channel Key. In production use, you integrate this logic into your own server-side applications and (re)code this in the programming languages you are already using for your server-based functionality.

The sample code is in JavaScript and requires a standard Node.js server.

  1. Install a standard Node.js server in your server or cloud infrastructure.
  2. Run npm install under ../server/nodejs/.
  3. Fill in the values of your APP_ID and APP_CERTIFICATE in ../server/nodejs/DemoServer.js.
  4. Launch the server with node DemoServer.js.

Note

You can follow Obtaining an App ID and an App Certificate to get your App ID and APP Certificate.