Giter Club home page Giter Club logo

electron-sdk's Introduction

NOTE: These sdk and samples only for the Agora Video 4.x APIs. For examples using previous releases please see the following branches:

Agora RTC SDK for Electron

Platform npm npm License License

โœจ Features

  • ๐Ÿ“ฆ Newly designed middle-tier API and Native C++ SDK.
  • ๐Ÿ›ก Written in TypeScript with predictable static types.

๐Ÿ–ฅ Environment Support

  • ๐ŸŒˆ Support macOS x86-64 and arm64 (Electron 11+)
  • โš™๏ธ Support Windows ia32 and x64
  • Electron: 4.x ~ latest
Chrome
macOS
Safari
Windows
Electron
Electron
x86 | arm64 ia32 | x64 4.0.0 ~ Latest

๐Ÿ“ฆ Install

In newest version you can define installation configuration in package.json (or .npmrc, while package.json has a higher priority), usually you can just provide "prebuilt", and "arch".

// package.json
{
  ...
  "agora_electron": {
    "prebuilt": true,
    "arch": "x64"
  }
  ...
}


// .npmrc
agora_electron_sdk_pre_built=true // defalut value is true
agora_electron_sdk_arch=x64 // only support windows:

Properties detail:

  • prebuilt whether to automatically download prebuilt NodeJS C++ Addon or build locally(which need to provide development env)
  • arch: If not set, the script will automatically choose the arch. only support windows
  • platform darwin or win32
## Automatic platform and architecture selection
npm install agora-electron-sdk

or

## or select 32 bit architecture on Windows
npm install --agora_electron_sdk_arch=ia32

## or select 64 bit architecture on Windows
npm install --agora_electron_sdk_arch=x64

๐Ÿ”จ Usage

import createAgoraRtcEngine from "agora-electron-sdk";

const rtcEngine = createAgoraRtcEngine();
rtcEngine.initialize({appId: "<your agora 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"}

๐Ÿ”— Links

  • Document - Official document

  • Demo - A quick start demo based on Vue/React and this repo

  • Changelog - Attention to newest information

  • Release Notes - Attention to newest information

โŒจ๏ธ Development

Build From Source Code

You will need to build Agora RTC Electron SDK from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.

Prerequisites

Windows

  • Python 2.7
  • Visual Studio Code C++ Desktop Develop Framework

MacOS

  • Python 2.7
  • XCode

Clone locally:

$ git clone [email protected]:AgoraIO-Extensions/Electron-SDK.git
$ cd Electron-SDK
$ npm install #or yarn

# build macOS
$ npm install --agora_electron_sdk_pre_built=false

# build  32 bit architecture on Windows
$ npm install --verbose --agora_electron_sdk_pre_built=false  --agora_electron_sdk_arch=ia32

# build  64 bit architecture on Windows
$ npm install --verbose --agora_electron_sdk_pre_built=false  --agora_electron_sdk_arch=x64

๐Ÿค Contributing PRs Welcome

Read our contributing guide and let's build a better antd together. :)

  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

electron-sdk's People

Contributors

90mark avatar lichking-2234 avatar luz33c avatar rojohub avatar zhangtao1104 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.