Skip to content

Commit b7ac81b

Browse files
cleven1zhaoyongqiangsync2giteexgfd3zshbleaker
authored
Dev/4.3.1 (#375)
* update podfile source to china * update podfile source to china * gitee sync test * [Android] gitee sync >> use china repos. * fix sync shell * [Android]revert to use common repo url. * update sync script. * update sync script. * update sync script. * Add download agora SDK when executing pod install and modify dependencies * gitee sync modify source url * modify podfile file script * modify podfile file script * update download ijk and swiftlint * update ijk download script * iOS Adapt to RTC 4.3.1 version * [windows] Adapt to 4.3.1 sdk and ajust examples. * mac Adapt to RTC 4.3.1 version * [windows]enable use_audio4 * [Android]Adapt to 4.3.1 sdk * [Android][Audio]Adapt to 4.3.1 sdk * Change way of using salt (#374) * Change way of using salt * Add macOS support * [Windows]perfect screen parameter adjusting. * [windows]change way of using salt. * [Android]Renew beauty api and etc. * add package_script * [windows]fix case switch crash. * [windows]fix release compile problem. * [windows]change slider notify to NW_RELEASEDCAPTURE. * [windows]show startCameraCapture error. * [Android]Fix fragment back bug. * [windows]fix original video bug (NMS-20350). * fix pip bug * fix crash bug * fix volume bug * fix stutter bug * [Android]Update beauty api and fix bug(NMS-20393) * [Android]Fix beauty effect bug. * [Android]Update gradle config. * [Android]Update gradle config. * [Android]Add pip mode demo. * [windows]update ci. * [windows]update ci. * [windows]update ci. * [windows]update ci 2. * [windows]update ci 3. * open audio4 * Adapt to the new api * Adapt to the new api * Use AVPictureInPictureVideoCallViewController implements the function of custom View picture-in-picture * add package_script * update package script * fix crash bug * update package * update package script * [iOS/mac] update rtc version. * [Android]fix AgoraFocalLengthInfo params bug. * [Android]perfect code. * [windows] fix deviceId compile error. * fix gitee sync scrip bug. * fix gitee sync scrip bug. * [windows] fix device id bug. --------- Co-authored-by: zhaoyongqiang <[email protected]> Co-authored-by: sync2gitee <[email protected]> Co-authored-by: xucz <[email protected]> Co-authored-by: Sihán Zhū <[email protected]>
1 parent 0ec9b44 commit b7ac81b

File tree

157 files changed

+4523
-4606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+4523
-4606
lines changed

.github/ci/build/build_windows.bat

+2-5
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,11 @@ echo zip_name: %zip_name%
6666

6767
dir
6868

69-
echo off
70-
REM curl --silent %sdk_url% ./
71-
python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
69+
curl %sdk_url% -o %zip_name%
70+
REM python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
7271
7z x ./%zip_name% -y
73-
echo on
7472

7573
dir
76-
7774
rmdir /S /Q Agora_Native_SDK_for_Windows_FULL\demo
7875
del /F /Q Agora_Native_SDK_for_Windows_FULL\commits
7976
del /F /Q Agora_Native_SDK_for_Windows_FULL\package_size_report.txt

.github/ci/build/modify_podfile.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ def modfiy(path):
55
contents = []
66
for num, line in enumerate(file):
77
if "pod 'Agora" in line:
8-
line = '\t'+"pod 'sdk', :path => '../../sdk.podspec'"
8+
line = '\t'+"pod 'sdk', :path => '../../sdk.podspec'" + "\n"
99
elif "pod 'sdk" in line:
1010
line = ""
11+
elif 'sh .download_script' in line:
12+
line = line.replace('true', 'false') + "\n"
1113
contents.append(line)
1214
file.close()
1315

1416
with open(path, 'w', encoding='utf-8') as fw:
1517
for content in contents:
16-
fw.write(content + "\n")
18+
fw.write(content)
1719
fw.close()
1820

1921

.github/workflows/gitee-sync-shell.sh

+13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tence
1313
git add Android/APIExample/settings.gradle Android/APIExample/gradle/wrapper/gradle-wrapper.properties Android/APIExample-Audio/settings.gradle Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties
1414
git commit -m '[Android] gitee sync >> use china repos.'
1515

16+
# change iOS Podfile to china repos
17+
python3 .github/workflows/modify_podfile.py iOS/APIExample/Podfile
18+
python3 .github/workflows/modify_podfile.py iOS/APIExample-Audio/Podfile
19+
python3 .github/workflows/modify_podfile.py iOS/APIExample-OC/Podfile
20+
python3 .github/workflows/modify_podfile.py macOS/Podfile
21+
22+
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample/Podfile
23+
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-Audio/Podfile
24+
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-OC/Podfile
25+
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' macOS/Podfile
26+
git add iOS/APIExample/Podfile iOS/APIExample-Audio/Podfile iOS/APIExample-OC/Podfile macOS/Podfile
27+
git commit -m '[iOS] gitee sync >> use china repos.'
28+
1629
git branch
1730
git status
1831
git push gitee

.github/workflows/gitee-sync.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.actor != 'dependabot[bot]'
1515
steps:
1616
- name: Gitee sync repo
17-
uses: xgfd3/hub-mirror-action@v1.0
17+
uses: xgfd3/hub-mirror-action@v1.4
1818
with:
1919
src: github/AgoraIO
2020
dst: gitee/agoraio-community
@@ -25,4 +25,5 @@ jobs:
2525
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
2626
force_update: true
2727
account_type: org
28-
shell_path: ./.github/workflows/gitee-sync-shell.sh
28+
shell_path: ./.github/workflows/gitee-sync-shell.sh
29+
github_ref: ${{ github.ref }}

.github/workflows/modify_podfile.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import os, sys
2+
3+
def modfiy(path):
4+
with open(path, 'r', encoding='utf-8') as file:
5+
contents = []
6+
for num, line in enumerate(file):
7+
if "pod 'Agora" in line:
8+
line = '\t'+"pod 'sdk', :path => 'sdk.podspec'" + "\n"
9+
elif "pod 'sdk" in line:
10+
line = ""
11+
elif "pod 'Floaty" in line:
12+
line = '\t'+"pod 'Floaty', :git => 'https://gitee.com/shengwang-dependencies/Floaty.git'" + "\n"
13+
elif "pod 'AGEVideoLayout" in line:
14+
line = '\t'+"pod 'AGEVideoLayout', :git => 'https://gitee.com/shengwang-dependencies/AGEVideoLayout.git'" + "\n"
15+
elif "pod 'CocoaAsyncSocket" in line:
16+
line = '\t'+"pod 'CocoaAsyncSocket', :git => 'https://gitee.com/shengwang-dependencies/CocoaAsyncSocket.git'" + "\n"
17+
elif "pod 'SwiftLint" in line:
18+
line = '\t'+"pod 'SwiftLint', :git => 'https://gitee.com/shengwang-dependencies/SwiftLint', :commit => '1067113303c134ef472a71b30d21e5350de7889d'" + "\n"
19+
elif "pod 'ijkplayer" in line:
20+
line = '\t'+"pod 'ijkplayer', :path => 'ijkplayer.podspec'" + "\n"
21+
elif 'sh .download_script' in line:
22+
line = line.replace('#', '').replace('false', 'true')
23+
contents.append(line)
24+
file.close()
25+
26+
with open(path, 'w', encoding='utf-8') as fw:
27+
for content in contents:
28+
fw.write(content)
29+
fw.close()
30+
31+
32+
if __name__ == '__main__':
33+
path = sys.argv[1:][0]
34+
modfiy(path.strip())

Android/APIExample-Audio/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies {
4848
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
4949
}
5050
else{
51-
def agora_sdk_version = "4.3.0"
51+
def agora_sdk_version = "4.3.1"
5252
// case 1: full single lib with voice only
5353
implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
5454
// case 2: partial libs with voice only

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/MainActivity.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ protected void onCreate(Bundle savedInstanceState) {
3030

3131
@Override
3232
public boolean onSupportNavigateUp() {
33-
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
34-
return NavigationUI.navigateUp(navController, appBarConfiguration)
35-
|| super.onSupportNavigateUp();
33+
onBackPressed();
34+
return false;
3635
}
3736

3837
@Override

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/common/BaseFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void handleOnBackPressed() {
3636
public void onCreate(@Nullable Bundle savedInstanceState) {
3737
super.onCreate(savedInstanceState);
3838
handler = new Handler(Looper.getMainLooper());
39-
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
39+
requireActivity().getOnBackPressedDispatcher().addCallback(this, onBackPressedCallback);
4040
}
4141

4242
@Override

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/examples/advanced/ProcessAudioRawData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public boolean onEarMonitoringAudioFrame(int type, int samplesPerChannel, int by
334334
}
335335

336336
@Override
337-
public boolean onPlaybackAudioFrameBeforeMixing(String channel, int uid, int audioFrameType, int samples, int bytesPerSample, int channels, int samplesPerSec, ByteBuffer byteBuffer, long renderTimeMs, int bufferLength) {
337+
public boolean onPlaybackAudioFrameBeforeMixing(String channelId, int uid, int type, int samplesPerChannel, int bytesPerSample, int channels, int samplesPerSec, ByteBuffer buffer, long renderTimeMs, int avsync_type, int rtpTimestamp) {
338338
return false;
339339
}
340340

Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip
6+
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip

Android/APIExample-Audio/settings.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pluginManagement {
22
repositories {
3+
maven { url "https://maven.aliyun.com/repository/public" }
34
google()
45
mavenCentral()
56
gradlePluginPortal()
@@ -8,6 +9,7 @@ pluginManagement {
89
dependencyResolutionManagement {
910
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1011
repositories {
12+
maven { url "https://maven.aliyun.com/repository/public" }
1113
google()
1214
mavenCentral()
1315
maven { url "https://jitpack.io" }

Android/APIExample/app/build.gradle

+31-20
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply from: "${rootDir.absolutePath}/git-hooks.gradle"
4+
apply from: 'vendors.gradle'
45

6+
def agoraSdkVersion = "4.3.1"
57
def localSdkPath= "${rootProject.projectDir.absolutePath}/../../sdk"
68

9+
710
android {
811
compileSdkVersion 32
912
buildToolsVersion "32.0.0"
@@ -54,6 +57,14 @@ android {
5457
viewBinding true
5558
}
5659

60+
applicationVariants.all {
61+
variant ->
62+
variant.outputs.all { output ->
63+
outputFileName = new File(rootProject.name
64+
+ "_" + agoraSdkVersion
65+
+ "_" + new Date().format("yyyyMMddHHmm") + ".apk")
66+
}
67+
}
5768
}
5869

5970
dependencies {
@@ -62,26 +73,26 @@ dependencies {
6273
if(new File("${localSdkPath}").exists()){
6374
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
6475
}
65-
else{
66-
def agora_sdk_version = "4.3.0"
76+
else {
77+
6778
// case 1: full libs
68-
implementation "io.agora.rtc:full-sdk:${agora_sdk_version}"
69-
implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}"
79+
implementation "io.agora.rtc:full-sdk:${agoraSdkVersion}"
80+
implementation "io.agora.rtc:full-screen-sharing:${agoraSdkVersion}"
7081
// case 2: partial libs
71-
// implementation "io.agora.rtc:full-rtc-basic:${agora_sdk_version}"
72-
// implementation "io.agora.rtc:ains:${agora_sdk_version}"
73-
// implementation "io.agora.rtc:full-content-inspect:${agora_sdk_version}"
74-
// implementation "io.agora.rtc:full-virtual-background:${agora_sdk_version}"
75-
// implementation "io.agora.rtc:full-super-resolution:${agora_sdk_version}"
76-
// implementation "io.agora.rtc:spatial-audio:${agora_sdk_version}"
77-
// implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}"
78-
// implementation "io.agora.rtc:clear-vision:${agora_sdk_version}"
79-
// implementation "io.agora.rtc:pvc:${agora_sdk_version}"
80-
// implementation "io.agora.rtc:screen-capture:${agora_sdk_version}"
81-
// implementation "io.agora.rtc:aiaec:${agora_sdk_version}"
82-
// implementation "io.agora.rtc:drm-loader:${agora_sdk_version}"
83-
// implementation "io.agora.rtc:drm:${agora_sdk_version}"
84-
// implementation "io.agora.rtc:full-vqa:${agora_sdk_version}"
82+
// implementation "io.agora.rtc:full-rtc-basic:${agoraSdkVersion}"
83+
// implementation "io.agora.rtc:ains:${agoraSdkVersion}"
84+
// implementation "io.agora.rtc:full-content-inspect:${agoraSdkVersion}"
85+
// implementation "io.agora.rtc:full-virtual-background:${agoraSdkVersion}"
86+
// implementation "io.agora.rtc:full-super-resolution:${agoraSdkVersion}"
87+
// implementation "io.agora.rtc:spatial-audio:${agoraSdkVersion}"
88+
// implementation "io.agora.rtc:audio-beauty:${agoraSdkVersion}"
89+
// implementation "io.agora.rtc:clear-vision:${agoraSdkVersion}"
90+
// implementation "io.agora.rtc:pvc:${agoraSdkVersion}"
91+
// implementation "io.agora.rtc:screen-capture:${agoraSdkVersion}"
92+
// implementation "io.agora.rtc:aiaec:${agoraSdkVersion}"
93+
// implementation "io.agora.rtc:drm-loader:${agoraSdkVersion}"
94+
// implementation "io.agora.rtc:drm:${agoraSdkVersion}"
95+
// implementation "io.agora.rtc:full-vqa:${agoraSdkVersion}"
8596
}
8697

8798

@@ -111,8 +122,8 @@ dependencies {
111122
implementation "com.squareup.okhttp3:okhttp:4.10.0"
112123
implementation "com.squareup.okhttp3:logging-interceptor:4.10.0"
113124

114-
implementation 'com.faceunity:core:8.3.0'
115-
implementation 'com.faceunity:model:8.3.0'
125+
implementation 'com.faceunity:core:8.7.0'
126+
implementation 'com.faceunity:model:8.7.0'
116127

117128
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
118129
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Android/APIExample/app/src/main/AndroidManifest.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
1616

1717
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
18+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
1819

1920
<!-- <permission-group android:name="io.agora.api.example.andpermission"/>-->
2021
<permission-group android:name="${AppId}.andpermission"/>
@@ -34,10 +35,11 @@
3435

3536
<activity
3637
android:name=".MainActivity"
37-
android:configChanges="keyboardHidden|screenSize|orientation"
38+
android:configChanges="keyboardHidden|screenSize|orientation|smallestScreenSize|screenLayout"
3839
android:label="@string/app_name"
3940
android:screenOrientation="portrait"
4041
android:launchMode="singleTop"
42+
android:supportsPictureInPicture="true"
4143
android:exported="true">
4244
<intent-filter>
4345
<action android:name="android.intent.action.MAIN" />

Android/APIExample/app/src/main/java/io/agora/api/example/common/BaseFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void handleOnBackPressed() {
3636
public void onCreate(@Nullable Bundle savedInstanceState) {
3737
super.onCreate(savedInstanceState);
3838
handler = new Handler(Looper.getMainLooper());
39-
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
39+
requireActivity().getOnBackPressedDispatcher().addCallback(this, onBackPressedCallback);
4040
}
4141

4242
@Override

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ChannelEncryption.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import android.content.Context;
1111
import android.os.Bundle;
12+
import android.util.Base64;
1213
import android.util.Log;
1314
import android.view.LayoutInflater;
1415
import android.view.SurfaceView;
@@ -28,7 +29,6 @@
2829
import com.yanzhenjie.permission.runtime.Permission;
2930

3031
import java.lang.reflect.Method;
31-
import java.nio.charset.StandardCharsets;
3232

3333
import io.agora.api.example.MainApplication;
3434
import io.agora.api.example.R;
@@ -255,7 +255,10 @@ private void enablePacketProcessor(boolean enable) {
255255
}
256256

257257
private byte[] getKdfSaltFromServer() {
258-
return "EncryptionKdfSaltInBase64Strings".getBytes(StandardCharsets.UTF_8);
258+
// Salt string should be the output of the following command:
259+
// openssl rand -base64 32
260+
String saltBase64String = "NiIeJ08AbtcQVjvV+oOEvF/4Dz5dy1CIwa805C8J2w0=";
261+
return Base64.decode(saltBase64String, Base64.DEFAULT);
259262
}
260263

261264
private void joinChannel(String channelId) {

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/CustomRemoteVideoRender.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public void onDrawFrame(GL10 gl) {
568568
renderMatrix.preRotate(lastI420Frame.getRotation());
569569
renderMatrix.preTranslate(-0.5f, -0.5f);
570570
try {
571-
drawer.drawYuv(yuvUploader.getYuvTextures(),
571+
drawer.drawYuv(yuvUploader.getYuvTextures(), 0,
572572
RendererCommon.convertMatrixFromAndroidGraphicsMatrix(renderMatrix), lastI420Frame.getRotatedWidth(),
573573
lastI420Frame.getRotatedHeight(), 0, 0, viewportWidth, viewportHeight);
574574
} catch (NullPointerException exception) {

0 commit comments

Comments
 (0)