Skip to content

Commit ed4eae0

Browse files
authored
Merge pull request #332 from AgoraIO/dev/4.1.1
Dev/4.1.1
2 parents 797186d + b8e9f3a commit ed4eae0

File tree

93 files changed

+1856
-489
lines changed

Some content is hidden

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

93 files changed

+1856
-489
lines changed

.github/ci/build/build_ios_ipa.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ TARGET_NAME=${PROJECT_PATH##*/}
1717

1818
KEYCENTER_PATH=${PROJECT_PATH}"/"${TARGET_NAME}"/Common/KeyCenter.swift"
1919

20+
METHOD_PATH=${PROJECT_PATH}"/ExportOptions.plist"
21+
2022
# 打包环境
21-
CONFIGURATION=Development
23+
CONFIGURATION=$method
2224

2325
#工程文件路径
2426
APP_PATH="${PROJECT_PATH}/${TARGET_NAME}.xcworkspace"
@@ -57,6 +59,16 @@ echo PBXPROJ_PATH: $PBXPROJ_PATH
5759
/usr/libexec/PlistBuddy -c "Set :objects:8B10BE1826AFFFA6002E1373:buildSettings:DEVELOPMENT_TEAM ''" $PBXPROJ_PATH
5860
/usr/libexec/PlistBuddy -c "Set :objects:8B10BE1826AFFFA6002E1373:buildSettings:PROVISIONING_PROFILE_SPECIFIER ''" $PBXPROJ_PATH
5961

62+
#修改build number
63+
# Debug
64+
/usr/libexec/PlistBuddy -c "Set :objects:03D13BF72448758C00B599B3:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
65+
# Release
66+
/usr/libexec/PlistBuddy -c "Set :objects:03D13BF82448758C00B599B3:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
67+
68+
#修改打包方式
69+
/usr/libexec/PlistBuddy -c "Set :method $CONFIGURATION" $METHOD_PATH
70+
71+
6072
# 读取APPID环境变量
6173
echo AGORA_APP_ID:$APP_ID
6274
echo $AGORA_APP_ID

.github/ci/build/build_mac_ipa.sh

+4-8
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,11 @@ echo PBXPROJ_PATH: $PBXPROJ_PATH
3838
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:DEVELOPMENT_TEAM 'YS397FG5PA'" $PBXPROJ_PATH
3939
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:PROVISIONING_PROFILE_SPECIFIER 'apiexamplemac'" $PBXPROJ_PATH
4040

41-
# SimpleFilter
41+
#修改build number
4242
# Debug
43-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:CODE_SIGN_STYLE 'Manual'" $PBXPROJ_PATH
44-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:DEVELOPMENT_TEAM ''" $PBXPROJ_PATH
45-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:PROVISIONING_PROFILE_SPECIFIER ''" $PBXPROJ_PATH
46-
# # Release
47-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:CODE_SIGN_STYLE 'Manual'" $PBXPROJ_PATH
48-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:DEVELOPMENT_TEAM ''" $PBXPROJ_PATH
49-
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:PROVISIONING_PROFILE_SPECIFIER ''" $PBXPROJ_PATH
43+
/usr/libexec/PlistBuddy -c "Set :objects:03896D5324F8A011008593CD:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
44+
# Release
45+
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
5046

5147
# 读取APPID环境变量
5248
echo AGORA_APP_ID:$APP_ID

.github/ci/build/build_windows.bat

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ del /F /Q windows\APIExample\ci.py
8484
xcopy /Y /E windows\APIExample Agora_Native_SDK_for_Windows_FULL\samples\API-example
8585
xcopy /Y /E windows\README.md Agora_Native_SDK_for_Windows_FULL\samples\API-example
8686
xcopy /Y /E windows\README.zh.md Agora_Native_SDK_for_Windows_FULL\samples\API-example
87+
rmdir /S /Q Agora_Native_SDK_for_Windows_FULL\samples\API-example\APIExample\APIExample
88+
dir Agora_Native_SDK_for_Windows_FULL\samples\API-example\APIExample
8789
7z a -tzip result.zip -r Agora_Native_SDK_for_Windows_FULL
8890
copy result.zip %WORKSPACE%\\withAPIExample_%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%_%zip_name%
8991
del /F result.zip

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.1.0-1"
51+
def agora_sdk_version = "4.1.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/examples/advanced/RhythmPlayer.java

+15-6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public class RhythmPlayer extends BaseFragment implements View.OnClickListener,
5555
private boolean isPlaying = false;
5656
private SeekBar beatPerMinute, beatPerMeasure;
5757
private AgoraRhythmPlayerConfig agoraRhythmPlayerConfig = new AgoraRhythmPlayerConfig();
58+
private ChannelMediaOptions mChannelMediaOptions;
5859

5960
@Override
6061
public void onCreate(@Nullable Bundle savedInstanceState)
@@ -214,6 +215,10 @@ public void onClick(View v)
214215
else if(v.getId() == R.id.play){
215216
if(!isPlaying){
216217
int ret = engine.startRhythmPlayer(URL_DOWNBEAT, URL_UPBEAT, agoraRhythmPlayerConfig);
218+
if(joined){
219+
mChannelMediaOptions.publishRhythmPlayerTrack = true;
220+
engine.updateChannelMediaOptions(mChannelMediaOptions);
221+
}
217222
Log.i(TAG, "startRhythmPlayer result:" + ret);
218223
isPlaying = true;
219224
beatPerMeasure.setEnabled(false);
@@ -222,6 +227,10 @@ else if(v.getId() == R.id.play){
222227
}
223228
else if(v.getId() == R.id.stop){
224229
engine.stopRhythmPlayer();
230+
if(joined){
231+
mChannelMediaOptions.publishRhythmPlayerTrack = false;
232+
engine.updateChannelMediaOptions(mChannelMediaOptions);
233+
}
225234
isPlaying = false;
226235
beatPerMeasure.setEnabled(true);
227236
beatPerMinute.setEnabled(true);
@@ -246,15 +255,15 @@ private void joinChannel(String channelId)
246255
/** Allows a user to join a channel.
247256
if you do not specify the uid, we will generate the uid for you*/
248257

249-
ChannelMediaOptions option = new ChannelMediaOptions();
250-
option.autoSubscribeAudio = true;
251-
option.autoSubscribeVideo = true;
252-
option.publishMicrophoneTrack = true;
258+
mChannelMediaOptions = new ChannelMediaOptions();
259+
mChannelMediaOptions.autoSubscribeAudio = true;
260+
mChannelMediaOptions.autoSubscribeVideo = true;
261+
mChannelMediaOptions.publishMicrophoneTrack = true;
253262
/**
254263
* config this for whether need push rhythem player to remote
255264
*/
256-
option.publishRhythmPlayerTrack = true;
257-
int res = engine.joinChannel(accessToken, channelId, 0, option);
265+
mChannelMediaOptions.publishRhythmPlayerTrack = isPlaying;
266+
int res = engine.joinChannel(accessToken, channelId, 0, mChannelMediaOptions);
258267
if (res != 0) {
259268
// Usually happens with invalid parameters
260269
// Error code description can be found at:

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

+2
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ public void onClick(View v) {
282282
join.setText(getString(R.string.join));
283283
mic.setEnabled(false);
284284
pcm.setEnabled(false);
285+
pcm.setChecked(false);
286+
mic.setChecked(true);
285287
if(pushingTask != null){
286288
try {
287289
pushingTask.join();

Android/APIExample-Audio/app/src/main/res/layout/fragment_custom_audio_source.xml

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
android:layout_alignParentEnd="true"
112112
android:layout_alignParentBottom="true"
113113
android:checked="true"
114+
android:enabled="false"
114115
android:layout_marginEnd="16dp"
115116
android:layout_marginBottom="64dp"/>
116117

@@ -121,6 +122,7 @@
121122
android:layout_alignParentEnd="true"
122123
android:layout_alignParentBottom="true"
123124
android:layout_marginEnd="16dp"
125+
android:enabled="false"
124126
android:layout_marginBottom="110dp"
125127
android:text="@string/publish_local_audio" />
126128

Android/APIExample/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies {
6060
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
6161
}
6262
else{
63-
def agora_sdk_version = "4.1.0-1"
63+
def agora_sdk_version = "4.1.1"
6464
// case 1: full libs
6565
implementation "io.agora.rtc:full-sdk:${agora_sdk_version}"
6666
implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class GlobalSettings {
3737

3838
public String getVideoEncodingDimension() {
3939
if (videoEncodingDimension == null)
40-
return "VD_640x360";
40+
return "VD_960x540";
4141
else
4242
return videoEncodingDimension;
4343
}

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

-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ public void onDestroy()
148148
if(engine != null)
149149
{
150150
engine.leaveChannel();
151-
engine.stopPreview();
152151
}
153152
handler.post(RtcEngine::destroy);
154153
engine = null;
@@ -211,7 +210,6 @@ public void onClick(View v)
211210
* 2:If you call the leaveChannel method during CDN live streaming, the SDK
212211
* triggers the removeInjectStreamUrl method.*/
213212
engine.leaveChannel();
214-
engine.stopPreview();
215213
join.setText(getString(R.string.join));
216214
et_password.setEnabled(true);
217215
encry_mode.setEnabled(true);
@@ -250,7 +248,6 @@ private void joinChannel(String channelId)
250248
engine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);
251249
// Enable video module
252250
engine.enableVideo();
253-
engine.startPreview();
254251
// Setup video encoding configs
255252
engine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
256253
VD_640x360,

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
7474
fl_local = view.findViewById(R.id.fl_local);
7575
contentInspectRetTv = view.findViewById(R.id.ret_content_inspect);
7676
view.findViewById(R.id.btn_switch_camera).setOnClickListener(v -> {
77-
if(engine != null){
77+
if(engine != null && joined){
7878
engine.switchCamera();
7979
}
8080
});
@@ -140,7 +140,6 @@ public void onDestroy() {
140140
/**leaveChannel and Destroy the RtcEngine instance*/
141141
if (engine != null) {
142142
engine.leaveChannel();
143-
engine.stopPreview();
144143
}
145144
handler.post(RtcEngine::destroy);
146145
engine = null;
@@ -234,7 +233,6 @@ private void joinChannel(String channelId) {
234233
contentInspectConfig.moduleCount = 1;
235234
engine.enableContentInspect(true, contentInspectConfig);
236235

237-
engine.startPreview();
238236

239237
/**Please configure accessToken in the string_config file.
240238
* A temporary token generated in Console. A temporary token is valid for 24 hours. For details, see

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

-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public void onDestroy()
152152
if(engine != null)
153153
{
154154
engine.leaveChannel();
155-
engine.stopPreview();
156155
engine.stopChannelMediaRelay();
157156
mediaRelaying = false;
158157
}
@@ -277,7 +276,6 @@ private void joinChannel(String channelId)
277276
engine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);
278277
// Enable video module
279278
engine.enableVideo();
280-
engine.startPreview();
281279
// Setup video encoding configs
282280
engine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
283281
((MainApplication)getActivity().getApplication()).getGlobalSettings().getVideoEncodingDimensionObject(),

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

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ private void joinChannel(String channelId) {
266266
option.autoSubscribeVideo = true;
267267
int res = engine.joinChannel(ret, channelId, 0, option);
268268
if (res != 0) {
269+
engine.stopPreview();
269270
// Usually happens with invalid parameters
270271
// Error code description can be found at:
271272
// en: https://docs.agora.io/en/Voice/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_i_rtc_engine_event_handler_1_1_error_code.html

0 commit comments

Comments
 (0)