This tutorial describes how to create an Agora account and build a sample app with Agora using Electron and React.
- Agora.io Developer Account
- Node.js 6.9.1+ with C++11 support
- Electron >= 1.8.3 && <= 4.0.3
This section shows you how to prepare and build the Agora Electron wrapper.
To build and run the sample application, first obtain an app ID:
- Create a developer account at agora.io. Once you finish the sign-up process, you are redirected to the dashboard.
- Navigate in the dashboard tree on the left to Projects > Project List.
- Copy the app ID that you obtain from the dashboard into a text file. You will use this when you launch the app.
Open the settings.js file and add the app ID.
Run the install
command in your project directory:
# install dependencies
npm install
Note: During install, the C++ add-on is downloaded instead of being built.
Use the run dev
or run dist
command to build the Agora Electron wrapper.
To enable dynamic compiling and HMR development, use run dev
:
# enable dynamic compiling and HMR developing environment
npm run dev
To build for release, use run dist
:
# build for release
npm run dist
Once the build is complete, use the resulting Agora Electron wrapper to build your application.
- Complete Electron API documentation at the Developer Center
- Complete Official Agora Native Windows/Mac API documentation
- File bugs about this sample
- Full Electron SDK wrapper addon source can be found at Agora RTC SDK for Electron
- General information about building apps with React and the Electron Webpack
This software is under the MIT License (MIT). View the license.