Skip to content

Commit 1c17b0f

Browse files
author
zhaoyongqiang
committed
Merge branch 'dev/4.0.1' of github.com:AgoraIO/API-Examples into dev/4.0.1
2 parents f2d43d6 + 7cb1e53 commit 1c17b0f

9 files changed

Lines changed: 101 additions & 18 deletions

File tree

.github/ci/build/build_ios.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,25 @@ rm ./$unzip_name/package_size_report.txt
6666
mkdir ./$unzip_name/samples
6767
mkdir ./$unzip_name/samples/API-Example
6868
cp -rf ./iOS/** ./$unzip_name/samples/API-Example
69-
if [ -z `echo ${sdk_url} | grep 'audio'` ]
69+
70+
result=$(echo $sdk_url | grep "audio")
71+
if [ ! -z "$result" ]
7072
then
7173
echo "包含"
7274
rm -rf ./$unzip_name/samples/API-Example/APIExample
7375
mv ./$unzip_name/samples/API-Example/APIExample-Audio ./$unzip_name/samples/APIExample-Audio
76+
mv ./$unzip_name/samples/APIExample-Audio/sdk.podspec ./$unzip_name/
77+
sed -i "s|pod 'sdk', :path => 'sdk.podspec'|pod 'sdk', :path => '../../sdk.podspec'|" ./$unzip_name/samples/APIExample-Audio/Podfile
78+
sed -i "s|pod 'Agora|#pod 'Agora|" ./$unzip_name/samples/APIExample-Audio/Podfile
7479
else
7580
echo "不包含"
76-
echo $unzip_name
7781
rm -rf ./$unzip_name/samples/API-Example/APIExample-Audio
7882
mv ./$unzip_name/samples/API-Example/APIExample ./$unzip_name/samples/APIExample
83+
mv ./$unzip_name/samples/APIExample/sdk.podspec ./$unzip_name/
84+
sed -i "s|pod 'sdk', :path => 'sdk.podspec'|pod 'sdk', :path => '../../sdk.podspec'|" ./$unzip_name/samples/APIExample/Podfile
85+
sed -i "s|pod 'Agora|#pod 'Agora|" ./$unzip_name/samples/APIExample/Podfile
7986
fi
8087

8188
rm -rf ./$unzip_name/samples/API-Example
82-
mv ./$unzip_name/samples/APIExample/sdk.podspec ./$unzip_name/
83-
sed -i "s|pod 'sdk', :path => 'sdk.podspec'|pod 'sdk', :path => '../../sdk.podspec'|" ./$unzip_name/samples/APIExample/Podfile
84-
sed -i "s|pod 'Agora|#pod 'Agora|" ./$unzip_name/samples/APIExample/Podfile
8589
7za a -tzip result.zip -r $unzip_name
8690
cp result.zip $WORKSPACE/withAPIExample_$zip_name

Android/APIExample-Audio/app/build.gradle

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apply plugin: 'com.android.application'
22
apply plugin: "androidx.navigation.safeargs"
33

4+
def localSdkPath= "${rootProject.projectDir.absolutePath}/../../sdk"
5+
46
android {
57
compileSdkVersion 31
68
buildToolsVersion "31.0.0"
@@ -29,7 +31,10 @@ android {
2931

3032
sourceSets {
3133
main {
32-
jniLibs.srcDirs = ['src/main/jniLibs']
34+
jniLibs.srcDirs += 'src/main/jniLibs'
35+
if(new File("${localSdkPath}").exists()){
36+
jniLibs.srcDirs += "${localSdkPath}"
37+
}
3338
}
3439
}
3540

@@ -38,14 +43,18 @@ android {
3843

3944
dependencies {
4045
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
41-
42-
def agora_sdk_version = "4.0.0-rc.1"
43-
// case 1: full single lib with voice only
44-
// implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
45-
// case 2: partial libs with voice only
46-
implementation "io.agora.rtc:voice-rtc-basic:${agora_sdk_version}"
47-
implementation "io.agora.rtc:spatial-audio:${agora_sdk_version}"
48-
implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}"
46+
if(new File("${localSdkPath}").exists()){
47+
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
48+
}
49+
else{
50+
def agora_sdk_version = "4.0.1"
51+
// case 1: full single lib with voice only
52+
// implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
53+
// case 2: partial libs with voice only
54+
implementation "io.agora.rtc:voice-rtc-basic:${agora_sdk_version}"
55+
implementation "io.agora.rtc:spatial-audio:${agora_sdk_version}"
56+
implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}"
57+
}
4958

5059
implementation 'androidx.appcompat:appcompat:1.1.0'
5160
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
230230
option.publishCustomAudioTrack = false;
231231
}
232232
engine.updateChannelMediaOptions(option);
233-
engine.enableCustomAudioLocalPlayback(0, true);
233+
engine.enableCustomAudioLocalPlayback(0, b);
234234
}
235235
}
236236

Android/APIExample-Audio/app/src/main/res/navigation/nav_graph.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<fragment
6060
android:id="@+id/CustomAudioRecord"
6161
android:name="io.agora.api.example.examples.advanced.customaudio.CustomAudioSource"
62-
android:label="@string/item_quickswitck"
62+
android:label="@string/item_customaudiosource"
6363
tools:layout="@layout/fragment_custom_audio_source" />
6464
<fragment
6565
android:id="@+id/CustomAudioRender"

Android/APIExample/app/build.gradle

Lines changed: 1 addition & 1 deletion
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.0.0-rc.1"
51+
def agora_sdk_version = "4.0.1"
5252
// case 1: full single lib
5353
implementation "io.agora.rtc:full-sdk:${agora_sdk_version}"
5454
implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}"

Android/APIExample/app/src/main/res/navigation/nav_graph.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
<fragment
172172
android:id="@+id/CustomAudioRecord"
173173
android:name="io.agora.api.example.examples.advanced.customaudio.CustomAudioSource"
174-
android:label="@string/item_quickswitck"
174+
android:label="@string/item_customaudiosource"
175175
tools:layout="@layout/fragment_custom_audio_source" />
176176
<fragment
177177
android:id="@+id/CustomAudioRender"

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Sample projects for the Agora RTC Native SDK
2+
3+
_English | [中文](README.zh.md)_
4+
5+
## Overview
6+
7+
This repository contains sample projects for the Agora RTC Native SDK, including the following platforms:
8+
9+
| Platform | Language | Project Location | SDK |
10+
| -------- | -------- | ------------------------------------------------------ | ------------------------------------------------------------ |
11+
| Android | Java | [/Android/APIExample](/Android/APIExample) | [RTC Java Video SDK](https://docs.agora.io/en/video-call-4.x-beta/API%20Reference/java_ng/API/rtc_api_overview_ng.html) |
12+
| Android | Java | [/Android/APIExample-Audio](/Android/APIExample-Audio) | [RTC Java Audio SDK](https://docs.agora.io/en/voice-call-4.x-beta/API%20Reference/java_ng/API/rtc_api_overview_ng.html) |
13+
| iOS | Swift | [/iOS/APIExample](/iOS/APIExample) | [RTC Objective-C Video SDK](https://docs.agora.io/en/video-call-4.x-beta/API%20Reference/ios_ng/API/rtc_api_overview_ng.html) |
14+
| iOS | Swift | [/iOS/APIExample-Audio](/iOS/APIExample-Audio) | [RTC Objective-C Audio SDK](https://docs.agora.io/en/voice-call-4.x-beta/API%20Reference/ios_ng/API/rtc_api_overview_ng.html) |
15+
| macOS | Swift | [/macOS](/macOS) | [RTC Objective-C Video SDK](https://docs.agora.io/en/video-call-4.x-beta/API%20Reference/mac_ng/API/rtc_api_overview_ng.html) |
16+
| Windows | C++ | [/windows](/windows) | [RTC C++ Video SDK](https://docs.agora.io/en/video-call-4.x-beta/API%20Reference/windows_ng/API/rtc_api_overview_ng.html) |
17+
18+
You can refer to each individual platform to learn more about the projects.
19+
20+
## Feedback
21+
22+
If you have any problems or suggestions regarding the sample projects, feel free to file an issue.
23+
24+
## Related resources
25+
26+
- Check our [FAQ](https://docs.agora.io/en/faq) to see if your issue has been recorded.
27+
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials.
28+
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case.
29+
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community).
30+
- If you encounter problems during integration, feel free to ask questions in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io).
31+
32+
## License
33+
34+
The sample projects are under the MIT license.

README.zh.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Agora RTC Native SDK 示例项目
2+
3+
[English](README.md) | 中文
4+
5+
## 简介
6+
7+
此仓库包含 Agora RTC Native SDK 的示例项目。
8+
9+
| 平台 | 语言 | 项目位置 | SDK |
10+
| -------- | -------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
11+
| Android | Java | [/Android/APIExample](/Android/APIExample) | [RTC Java Video SDK](https://docs.agora.io/cn/video-call-4.x/API%20Reference/java_ng/API/rtc_api_overview_ng.html) |
12+
| Android | Java | [/Android/APIExample-Audio](/Android/APIExample-Audio) | [RTC Java Audio SDK](https://docs.agora.io/cn/voice-call-4.x/API%20Reference/java_ng/API/rtc_api_overview_ng.html) |
13+
| iOS | Swift | [/iOS/APIExample](/iOS/APIExample) | [RTC Objective-C Video SDK](https://docs.agora.io/cn/video-call-4.x/API%20Reference/ios_ng/API/rtc_api_overview_ng.html) |
14+
| iOS | Swift | [/iOS/APIExample-Audio](/iOS/APIExample-Audio) | [RTC Objective-C Audio SDK](https://docs.agora.io/cn/voice-call-4.x/API%20Reference/ios_ng/API/rtc_api_overview_ng.html) |
15+
| macOS | Swift | [/macOS](/macOS) | [RTC Objective-C Video SDK](https://docs.agora.io/cn/video-call-4.x/API%20Reference/mac_ng/API/rtc_api_overview_ng.html) |
16+
| Windows | C++ | [/windows](/windows) | [RTC C++ Video SDK](https://docs.agora.io/cn/video-call-4.x/API%20Reference/windows_ng/API/rtc_api_overview_ng.html) |
17+
18+
你可以进入不同平台的项目进行试用或参考源代码。
19+
20+
## 反馈
21+
22+
如果你有任何问题或建议,可以通过 issue 的形式反馈。
23+
24+
## 相关资源
25+
26+
- 你可以先参阅 [常见问题](https://docs.agora.io/cn/faq)
27+
- 如果你想了解更多官方示例,可以参考 [官方 SDK 示例](https://github.com/AgoraIO)
28+
- 如果你想了解声网 SDK 在复杂场景下的应用,可以参考 [官方场景案例](https://github.com/AgoraIO-usecase)
29+
- 如果你想了解声网的一些社区开发者维护的项目,可以查看 [社区](https://github.com/AgoraIO-Community)
30+
- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问
31+
- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单
32+
33+
## 许可证
34+
35+
示例项目遵守 MIT 许可证。

windows/APIExample/APIExample/Basic/LiveBroadcasting/CLiveBroadcastingDlg.cpp

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ void CLiveBroadcastingDlg::OnBnClickedButtonJoinchannel()
482482
AfxMessageBox(_T("Fill channel name first"));
483483
return;
484484
}
485+
m_rtcEngine->enableLoopbackRecording(true);
485486

486487
VideoEncoderConfiguration config;
487488
if (m_cmbVideoEncoder.GetCurSel() < 3)

0 commit comments

Comments
 (0)