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 RTC SDK features.
This page shows how to compile, configure, and run the RTC SDK Electron sample project.
Prerequisites
-
A camera and a microphone
-
A valid Agora account and project. Please refer to Agora account management for details.
-
Installed Git
Project setup
Get the sample project
Run the following command to clone the repository locally:
git clone git@github.com:AgoraIO-Extensions/Electron-SDK.gitThis repository contains sample projects for Agora Web RTC SDK:
| Description | Path |
|---|---|
| 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
-
Install dependencies
Switch to the
/exampledirectory and run the following commands to integrate the SDK and install dependencies:yarn
Run the sample project
-
To run the sample project, execute the following command in the
/exampledirectory:yarn start -
After the operation is complete, you see the following application on your screen:
-
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.
-
Select a demo you want to experience from the menu on the left. Choose JoinChannelVideo, under Basic, as an example and click join channel.
-
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.
