Compile and run a sample project

Updated

Compile and run a project using Agora SDK

Agora provides Open-source sample projects on GitHub to demonstrate the implementation of basic and advanced Video SDK features.

This page shows how to compile, configure, and run the Video SDK Electron sample project.

Prerequisites

Project setup

Get the sample project

Run the following command to clone the repository locally:

git clone git@github.com:AgoraIO-Extensions/Electron-SDK.git

This repository contains sample projects for Agora Web Video SDK:

DescriptionPath
Basic functions/example/src/renderer/examples/basic
Advanced features/example/src/renderer/examples/advanced
Hook example/example/src/renderer/examples/hook

Configure the sample project

  1. Install dependencies

    Switch to the /example directory and run the following commands to integrate the SDK and install dependencies:

    yarn

Run the sample project

  1. To run the sample project, execute the following command in the /example directory:

    yarn start
  2. After the operation is complete, you see the following application on your screen:

  3. On the Settings page, fill in the App Id and temporary token you obtained from the Console. Fill in the same channel name you used when generating the temporary token. Click Save to save your settings.

  4. Select a demo you want to experience from the menu on the left. Choose JoinChannelVideo, under Basic, as an example and click join channel.

  5. To test various audio and video interaction use-cases, connect to the Agora web demo, or install and run the sample project on a second device. Make sure you use the same app ID on both devices. When you join the same channel from two devices, you can see and hear each other.