Skip to content

Commit

Permalink
chore: rename to agora-electron-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Sep 13, 2022
1 parent a100b2b commit 75c4a9e
Show file tree
Hide file tree
Showing 51 changed files with 2,636 additions and 4,156 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.9)
set(CMAKE_CXX_STANDARD 11)

project(electron-agora-rtc-ng)
project(agora-electron-sdk)

include_directories(${CMAKE_JS_INC})
set(BUILD_TYPE ${CMAKE_BUILD_TYPE})
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Agora RTC SDK for Electron

<div align="left">
<a href="https://github.com/AgoraIO-Community/electron-agora-rtc-ng"><img src="https://img.shields.io/badge/Platform-macOS--x86--64%20%7C%20macOS--arm64%20%7C%20win--32%20%7C%20win--64-blue?logo=Electron&labelColor=fff" alt="Platform"/></a>
<a href="https://www.npmjs.com/package/electron-agora-rtc-ng"><img alt="npm" src="https://img.shields.io/npm/v/electron-agora-rtc-ng?color=blue&style=flat-square&logo=npm"></a>
<a href="https://www.npmjs.com/package/electron-agora-rtc-ng"><img alt="npm" src="https://img.shields.io/npm/dm/electron-agora-rtc-ng?color=blue&style=flat-square&logo=npm"></a>
<a href="./LICENSE"><img src="https://img.shields.io/github/license/agoraio-community/electron-agora-rtc-ng?color=blue&style=flat-square" alt="License"/></a>
<a href="https://github.com/AgoraIO-Community/electron-agora-rtc-ng/issues"><img src="https://flat.badgen.net/github/label-issues/AgoraIO-Community/electron-agora-rtc-ng/help%20wanted/open" alt="License"/></a>
<a href="https://github.com/AgoraIO-Extensions/Electron-SDK"><img src="https://img.shields.io/badge/Platform-macOS--x86--64%20%7C%20macOS--arm64%20%7C%20win--32%20%7C%20win--64-blue?logo=Electron&labelColor=fff" alt="Platform"/></a>
<a href="https://www.npmjs.com/package/agora-electron-sdk"><img alt="npm" src="https://img.shields.io/npm/v/agora-electron-sdk?color=blue&style=flat-square&logo=npm"></a>
<a href="https://www.npmjs.com/package/agora-electron-sdk"><img alt="npm" src="https://img.shields.io/npm/dm/agora-electron-sdk?color=blue&style=flat-square&logo=npm"></a>
<a href="./LICENSE"><img src="https://img.shields.io/github/license/agoraio-extensions/electron-sdk?color=blue&style=flat-square" alt="License"/></a>
<a href="https://github.com/AgoraIO-Extensions/Electron-SDK/issues"><img src="https://flat.badgen.net/github/label-issues/AgoraIO-Extensions/Electron-SDK/help%20wanted/open" alt="License"/></a>

</div>

Expand Down Expand Up @@ -55,7 +55,7 @@ Properties detail:

```bash
## Automatic platform and architecture selection
npm install electron-agora-rtc-ng
npm install agora-electron-sdk
```

or
Expand All @@ -71,7 +71,7 @@ npm install --agora_electron_sdk_arch=x64
## 🔨 Usage

```javascript
import createAgoraRtcEngine from "electron-agora-rtc-ng";
import createAgoraRtcEngine from "agora-electron-sdk";

const rtcEngine = createAgoraRtcEngine();
rtcEngine.initialize({appId: "<your agora app id>"});
Expand All @@ -81,7 +81,7 @@ rtcEngine.initialize({appId: "<your agora app id>"});

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 `{"electron-agora-rtc-ng": "commonjs2 electron-agora-rtc-ng"}`
set `externals` property of your webpack config to `{"agora-electron-sdk": "commonjs2 agora-electron-sdk"}`

## 🔗 Links

Expand Down Expand Up @@ -119,8 +119,8 @@ latest features which are not released yet, or maintain your own fork with patch
### Clone locally:

```bash
$ git clone [email protected]:AgoraIO-Community/electron-agora-rtc-ng.git
$ cd electron-agora-rtc-ng
$ git clone [email protected]:AgoraIO-Extensions/Electron-SDK.git
$ cd Electron-SDK
$ npm install #or yarn

# build macOS
Expand All @@ -133,7 +133,7 @@ $ npm install --verbose --agora_electron_sdk_pre_built=false --agora_electron_s
$ npm install --verbose --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=x64
```

## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/AgoraIO-Community/electron-agora-rtc-ng/pulls)
## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/AgoraIO-Extensions/Electron-SDK/pulls)

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

Expand Down
6 changes: 3 additions & 3 deletions ci/.npmrc_x32
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sass_binary_site=https://npmmirror.com/mirrors/node-sass/

# for electron
arch=ia32
# for electron-agora-rtc-ng
# for agora-electron-sdk
agora_electron_arch=ia32
# for electron-agora-rtc-ng(iris)
agora_electron_sdk_arch=ia32
# for agora-electron-sdk(iris)
agora_electron_sdk_arch=ia32
6 changes: 3 additions & 3 deletions ci/.npmrc_x64
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sass_binary_site=https://npmmirror.com/mirrors/node-sass/

# for electron
arch=x64
# for electron-agora-rtc-ng
# for agora-electron-sdk
agora_electron_arch=x64
# for electron-agora-rtc-ng(iris)
agora_electron_sdk_arch=x64
# for agora-electron-sdk(iris)
agora_electron_sdk_arch=x64
8 changes: 4 additions & 4 deletions ci/packager-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ example_sdk_mode=${1:-1}

example_electron_version=${2:-'18.2.3'}

echo example_sdk_mode: $example_sdk_mode
echo example_sdk_mode: $example_sdk_mode
echo example_electron_version: $example_electron_version

packExample() {
Expand All @@ -17,16 +17,16 @@ packExample() {
if [ -n "$2" ]
then
echo 选择了 electron_version:$2
yarn add electron@$2
yarn add electron@$2
else
echo 安装example 依赖
yarn
fi

if [ "$3" -eq 1 ]
then
rm -rf node_modules/electron-agora-rtc-ng/build
cp -P -R ../Electron-*/* node_modules/electron-agora-rtc-ng/
rm -rf node_modules/agora-electron-sdk/build
cp -P -R ../Electron-*/* node_modules/agora-electron-sdk/
fi
export USE_HARD_LINKS=false
yarn dist:mac
Expand Down
16 changes: 8 additions & 8 deletions ci/packager-win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ function DistByArch($type)
function Package($archNum,$electronVersion,$example_sdk_mode){
# remove zip
Remove-Item -Path ../$outterZipName -Recurse -Force -ErrorAction Ignore;

# remove dist
Remove-Item -Path dist -Recurse -Force -ErrorAction Ignore;

# choose arch
ChooseArch -type $archNum

If([String]::IsNullOrEmpty($electronVersion))
{
Write-Host "安装example 依赖"
yarn
}
Else
{

Write-Host "选择了 electron_version:$electronVersion"
yarn add electron@$electronVersion
}
if($example_sdk_mode -eq 1){
Remove-Item -Path node_modules/electron-agora-rtc-ng/build -Recurse -Force -ErrorAction Ignore;
Remove-Item -Path node_modules/electron-agora-rtc-ng/js -Recurse -Force -ErrorAction Ignore;
Remove-Item -Path node_modules/electron-agora-rtc-ng/type -Recurse -Force -ErrorAction Ignore;
Remove-Item -Path node_modules/agora-electron-sdk/build -Recurse -Force -ErrorAction Ignore;
Remove-Item -Path node_modules/agora-electron-sdk/js -Recurse -Force -ErrorAction Ignore;
Remove-Item -Path node_modules/agora-electron-sdk/type -Recurse -Force -ErrorAction Ignore;
# copy native sdk
Copy-Item -Path ../Electron-*/* -Destination node_modules/electron-agora-rtc-ng/ -Recurse -Force
Copy-Item -Path ../Electron-*/* -Destination node_modules/agora-electron-sdk/ -Recurse -Force
}

# dist start
DistByArch -type $archNum
# move zip
Expand Down
8 changes: 4 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ First, create a developer account at [Agora.io](https://dashboard.agora.io/signi
Then do the following:

```bash
git clone [email protected]:AgoraIO-Community/electron-agora-rtc-ng.git
git clone [email protected]:AgoraIO-Extensions/Electron-SDK.git
cd example
yarn
yarn dev
Expand All @@ -29,11 +29,11 @@ yarn dev

```bash
# example path
rm -rf node_modules/electron-agora-rtc-ng
rm -rf node_modules/agora-electron-sdk
# sdk path
cd .. && npm install --agora_electron_sdk_pre_built=false && yarn link
# example path
cd example && yarn link "electron-agora-rtc-ng"
cd example && yarn link "agora-electron-sdk"
```

## 📖 Project structure
Expand All @@ -60,7 +60,7 @@ If you have any problems or suggestions regarding the sample projects, feel free
## 🚀 Reference

- You can find full API document at [Document Center](https://docs.agora.io/en/Video/API%20Reference/electron/index.html)
- You can file issues about this demo at [issue](https://github.com/AgoraIO-Community/electron-agora-rtc-ng/issues)
- You can file issues about this demo at [issue](https://github.com/AgoraIO-Extensions/Electron-SDK/issues)

## 🚀 Related resources

Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"dependencies": {
"antd": "^4.20.3",
"electron-agora-rtc-ng": "latest",
"agora-electron-sdk": "latest",
"history": "^5.0.0",
"react": "^18.1.0",
"react-color": "^2.19.3",
Expand Down
2 changes: 1 addition & 1 deletion example/src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Link,
Redirect,
} from 'react-router-dom';
import { createAgoraRtcEngine } from 'electron-agora-rtc-ng';
import { createAgoraRtcEngine } from 'agora-electron-sdk';
import {
HomeOutlined,
DingtalkOutlined,
Expand Down
2 changes: 1 addition & 1 deletion example/src/renderer/components/BaseComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
RtcConnection,
RtcStats,
UserOfflineReasonType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import { Card, List } from 'antd';

import AgoraStyle from '../examples/config/public.scss';
Expand Down
2 changes: 1 addition & 1 deletion example/src/renderer/components/RtcSurfaceView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
createAgoraRtcEngine,
IRtcEngineEx,
IMediaPlayer,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import { getRandomInt } from '../../utils';
import styles from './index.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ClientRoleType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
IAudioSpectrumObserver,
IRtcEngineEventHandler,
UserAudioSpectrumInfo,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import {
CartesianGrid,
Line,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
createAgoraRtcEngine,
IRtcEngineEventHandler,
LighteningContrastLevel,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ClientRoleType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ContentInspectType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
RtcStats,
VideoDeviceInfo,
VideoSourceType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
RtcStats,
VideoCodecType,
VideoMirrorModeType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
RtcConnection,
VideoCodecType,
VideoFrameType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import { Buffer } from 'buffer';

import Config from '../../../config/agora.config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
EncryptionMode,
IRtcEngineEventHandler,
RtcConnection,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ClientRoleType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
RtcConnection,
RtcStats,
UserOfflineReasonType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import { Card, List } from 'antd';

import Config from '../../../config/agora.config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ClientRoleType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createAgoraRtcEngine, {
VideoCodecType,
VideoMirrorModeType,
VideoSourceType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import { Component } from 'react';
import DropDownButton from '../../component/DropDownButton';
import JoinChannelBar from '../../component/JoinChannelBar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
MediaPlayerEvent,
MediaPlayerState,
VideoSourceType,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
RecorderErrorCode,
RecorderInfo,
RecorderState,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ClientRoleType,
createAgoraRtcEngine,
IRtcEngineEventHandler,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ScreenCaptureSourceInfo,
RtcConnection,
RtcStats,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';

import Config from '../../../config/agora.config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TranscodingUser,
VideoCodecProfileType,
VideoCodecTypeForStream,
} from 'electron-agora-rtc-ng';
} from 'agora-electron-sdk';
import { SketchPicker } from 'react-color';

import Config from '../../../config/agora.config';
Expand Down
Loading

0 comments on commit 75c4a9e

Please sign in to comment.