agora-electron-sdk

agora-electron-sdk

Usage no npm install needed!

<script type="module">
  import agoraElectronSdk from 'https://cdn.skypack.dev/agora-electron-sdk';
</script>

README

Mac Build Status Windows Build Status Npm Package MIT License

其他语言版本: 简体中文


Agora RTC Electron SDK

Agora RTC Electron SDK uses Agora RTC SDK (windows & macos) as NodeJS C++ addon for rapid RTC application development
Explore the docs »

View Demo · Report Bug · Plugins :new:

Table of Contents

Getting Started

Installation

Recommend to install through npm:

# install newest sdk and download prebuilt binary file automatically
npm install agora-electron-sdk

Usually you have to specify electron version of your application and whether to download prebuilt c++ addon or do node-gyp building locally by configuration in package.json:

// package.json
{
...
  "agora_electron": {
    "electron_version": "5.0.8",
    "prebuilt": true
  }
...
}

For more detail of configuration, visit wiki.

Usage

import AgoraRtcEngine from 'agora-electron-sdk'

const rtcEngine = new AgoraRtcEngine();
rtcEngine.initialize('<your agora app id>');

To obtain Agora APP ID, you need to first create an account at Agora.io. Then, you can create a new project and obtain the APP ID.

When using without electron-webpack

When using directly within a web electron project with custom webpack configuration, you may see errors when compiling. It's because you have not properly configured loader for node addon. A convenient way to skip the compile process is to set externals property of your webpack config to {"agora-electron-sdk": "commonjs2 agora-electron-sdk"}

Resources

Plugins

In newest version we have supported plugins for customize videoFrame and audioFrame data. In other words, you can integrate cool features like video filter, face recognition with your own plugins in C++.

We have already implement an official plugin for video filter based on FaceUnity:

For more detail about how plugins work and how to write your own plugins, visit wiki.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request