Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit effe774
Showing
60 changed files
with
18,361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# XDE | ||
.expo/ | ||
|
||
# VSCode | ||
.vscode/ | ||
jsconfig.json | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IJ | ||
# | ||
.idea | ||
.gradle | ||
local.properties | ||
android.iml | ||
|
||
# Cocoapods | ||
# | ||
example/ios/Pods | ||
example/ios/Podfile.lock | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
package-lock.json | ||
yarn.lock | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
android/app/libs | ||
android/keystores/debug.keystore | ||
docs/api/ | ||
gitpull.sh | ||
gitpush.sh | ||
|
||
# Expo | ||
.expo/* | ||
|
||
# generated by bob | ||
lib/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 agora | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Agora-Uniapp-SDK | ||
|
||
此 SDK 基于 uni-app 以及 Agora Android 和 iOS 的视频 SDK 实现。 | ||
|
||
## 发版说明 | ||
[变更日志](CHANGELOG.md) | ||
|
||
## 集成文档(离线打包) | ||
|
||
### 克隆或下载本工程 | ||
|
||
`git clone https://github.com/AgoraIO-Community/Agora-Uniapp-SDK.git` | ||
|
||
### 进入工程目录,执行 **install.sh** 脚本以下载 Agora iOS SDK | ||
|
||
`cd Agora-Uniapp-SDK && sh ./install.sh` | ||
|
||
并确保 **ios/libs** 目录中包含 **.framework** 文件 | ||
|
||
### 将 Android 和 iOS 工程分别放到 uni-app 离线 SDK 对应的目录中 | ||
|
||
* Android:**UniPlugin-Hello-AS** | ||
* iOS:**HBuilder-uniPluginDemo** | ||
|
||
### 将 Android 和 iOS 工程分别引入 uni-app 离线 SDK 工程 | ||
|
||
#### Android | ||
|
||
* 在 **settings.gradle** 中添加 | ||
``` | ||
include ':uniplugin_agora_rtc' | ||
project(':uniplugin_agora_rtc').projectDir = new File(rootProject.projectDir, 'android') | ||
``` | ||
|
||
* 在 **app/build.gradle** 中添加 `implementation project(':uniplugin_agora_rtc')` | ||
|
||
#### iOS | ||
|
||
在 Xcode 中右键 **HBuilder-uniPlugin** 工程,并点击 **Add Files to "HBuilder-uniPlugin"**, 选中 **AgoraRtcUniPlugin.xcodeproj** 并添加 | ||
|
||
在 Xcode 中点击 **HBuilder-uniPlugin** 工程,并点击 **HBuilder** Target,选中 **Build Phases** | ||
|
||
* 在 **Dependencies** 中添加 **AgoraRtcUniPlugin** | ||
* 在 **Link Binary With Libraries** 中添加 **AgoraRtcUniPlugin.framework** | ||
* 在 **Embed Frameworks** 中添加 **AgoraRtcKit.framework** **Agorafdkaac.framework** **Agoraffmpeg.framework** **AgoraSoundTouch.framework** (需要通过 **Add Other...** 选择 **ios/libs** 目录中的 **.framework** 文件添加) | ||
|
||
## 如何使用 | ||
|
||
```javascript | ||
const AgoraRtcEngineModule = uni.requireNativePlugin('AgoraRtcEngineModule'); | ||
AgoraRtcEngineModule.callMethod({ method: string, args: {} }, (res) => {}); | ||
``` | ||
|
||
具体如何调用可以参考[src](src)中的 **.ts** 文件 | ||
|
||
## 常见错误 | ||
|
||
## API文档 | ||
|
||
* [uni-app API](https://docs.agora.io/cn/Interactive%20Broadcast/API%20Reference/react_native/index.html) | ||
* [Android API](https://docs.agora.io/cn/Interactive%20Broadcast/API%20Reference/java/index.html) | ||
* [iOS API](https://docs.agora.io/cn/Interactive%20Broadcast/API%20Reference/oc/docs/headers/Agora-Objective-C-API-Overview.html) | ||
|
||
## 资源 | ||
|
||
* 完整的 [API Doc](https://docs.agora.io/cn/) 在开发者中心 | ||
* [反馈问题](https://github.com/AgoraIO-Community/Agora-Uniapp-SDK/issues) | ||
* [uni-app 原生插件](https://nativesupport.dcloud.net.cn/NativePlugin/README) | ||
|
||
## 开源许可 | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
buildscript { | ||
// Buildscript is evaluated before everything else so we can't use getExtOrDefault | ||
def kotlin_version = '1.3.50' | ||
|
||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.2.1' | ||
// noinspection DifferentKotlinGradleVersion | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
buildToolsVersion "28.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles "consumer-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
} | ||
|
||
def kotlin_version = '1.3.50' | ||
|
||
dependencies { | ||
compileOnly fileTree(dir: 'libs', include: ['*.jar']) | ||
compileOnly fileTree(dir: '../app/libs', include: ['uniapp-v8-release.aar']) | ||
|
||
compileOnly 'com.android.support:recyclerview-v7:28.0.0' | ||
compileOnly 'com.android.support:support-v4:28.0.0' | ||
compileOnly 'com.android.support:appcompat-v7:28.0.0' | ||
compileOnly 'com.alibaba:fastjson:1.1.46.android' | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" | ||
implementation 'io.agora.rtc:full-sdk:3.2.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-keepattributes *Annotation* | ||
-keep class kotlin.** { *; } | ||
-keep class org.jetbrains.** { *; } | ||
|
||
-keep class io.agora.**{*;} | ||
|
||
-keep public class * extends io.dcloud.feature.uniapp.common.UniModule{*;} | ||
-keep public class * extends io.dcloud.feature.uniapp.ui.component.UniComponent{*;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="io.agora.rtc.uni"> | ||
|
||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.BLUETOOTH" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission | ||
android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" | ||
tools:ignore="ProtectedPermissions" /> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea/ |
Oops, something went wrong.