Skip to content

Commit

Permalink
Merge pull request #332 from AgoraIO/dev/4.1.1
Browse files Browse the repository at this point in the history
Dev/4.1.1
  • Loading branch information
plutoless committed Feb 10, 2023
2 parents 797186d + b8e9f3a commit ed4eae0
Show file tree
Hide file tree
Showing 93 changed files with 1,856 additions and 489 deletions.
14 changes: 13 additions & 1 deletion .github/ci/build/build_ios_ipa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ TARGET_NAME=${PROJECT_PATH##*/}

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

METHOD_PATH=${PROJECT_PATH}"/ExportOptions.plist"

# 打包环境
CONFIGURATION=Development
CONFIGURATION=$method

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

#修改build number
# Debug
/usr/libexec/PlistBuddy -c "Set :objects:03D13BF72448758C00B599B3:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
# Release
/usr/libexec/PlistBuddy -c "Set :objects:03D13BF82448758C00B599B3:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH

#修改打包方式
/usr/libexec/PlistBuddy -c "Set :method $CONFIGURATION" $METHOD_PATH


# 读取APPID环境变量
echo AGORA_APP_ID:$APP_ID
echo $AGORA_APP_ID
Expand Down
12 changes: 4 additions & 8 deletions .github/ci/build/build_mac_ipa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,11 @@ echo PBXPROJ_PATH: $PBXPROJ_PATH
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:DEVELOPMENT_TEAM 'YS397FG5PA'" $PBXPROJ_PATH
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:PROVISIONING_PROFILE_SPECIFIER 'apiexamplemac'" $PBXPROJ_PATH

# SimpleFilter
#修改build number
# Debug
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:CODE_SIGN_STYLE 'Manual'" $PBXPROJ_PATH
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:DEVELOPMENT_TEAM ''" $PBXPROJ_PATH
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7E272518D600E95B87:buildSettings:PROVISIONING_PROFILE_SPECIFIER ''" $PBXPROJ_PATH
# # Release
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:CODE_SIGN_STYLE 'Manual'" $PBXPROJ_PATH
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:DEVELOPMENT_TEAM ''" $PBXPROJ_PATH
# /usr/libexec/PlistBuddy -c "Set :objects:8BD4AE7F272518D600E95B87:buildSettings:PROVISIONING_PROFILE_SPECIFIER ''" $PBXPROJ_PATH
/usr/libexec/PlistBuddy -c "Set :objects:03896D5324F8A011008593CD:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH
# Release
/usr/libexec/PlistBuddy -c "Set :objects:03896D5424F8A011008593CD:buildSettings:CURRENT_PROJECT_VERSION ${BUILD_NUMBER}" $PBXPROJ_PATH

# 读取APPID环境变量
echo AGORA_APP_ID:$APP_ID
Expand Down
2 changes: 2 additions & 0 deletions .github/ci/build/build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ del /F /Q windows\APIExample\ci.py
xcopy /Y /E windows\APIExample Agora_Native_SDK_for_Windows_FULL\samples\API-example
xcopy /Y /E windows\README.md Agora_Native_SDK_for_Windows_FULL\samples\API-example
xcopy /Y /E windows\README.zh.md Agora_Native_SDK_for_Windows_FULL\samples\API-example
rmdir /S /Q Agora_Native_SDK_for_Windows_FULL\samples\API-example\APIExample\APIExample
dir Agora_Native_SDK_for_Windows_FULL\samples\API-example\APIExample
7z a -tzip result.zip -r Agora_Native_SDK_for_Windows_FULL
copy result.zip %WORKSPACE%\\withAPIExample_%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%_%zip_name%
del /F result.zip
Expand Down
2 changes: 1 addition & 1 deletion Android/APIExample-Audio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
}
else{
def agora_sdk_version = "4.1.0-1"
def agora_sdk_version = "4.1.1"
// case 1: full single lib with voice only
implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
// case 2: partial libs with voice only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class RhythmPlayer extends BaseFragment implements View.OnClickListener,
private boolean isPlaying = false;
private SeekBar beatPerMinute, beatPerMeasure;
private AgoraRhythmPlayerConfig agoraRhythmPlayerConfig = new AgoraRhythmPlayerConfig();
private ChannelMediaOptions mChannelMediaOptions;

@Override
public void onCreate(@Nullable Bundle savedInstanceState)
Expand Down Expand Up @@ -214,6 +215,10 @@ public void onClick(View v)
else if(v.getId() == R.id.play){
if(!isPlaying){
int ret = engine.startRhythmPlayer(URL_DOWNBEAT, URL_UPBEAT, agoraRhythmPlayerConfig);
if(joined){
mChannelMediaOptions.publishRhythmPlayerTrack = true;
engine.updateChannelMediaOptions(mChannelMediaOptions);
}
Log.i(TAG, "startRhythmPlayer result:" + ret);
isPlaying = true;
beatPerMeasure.setEnabled(false);
Expand All @@ -222,6 +227,10 @@ else if(v.getId() == R.id.play){
}
else if(v.getId() == R.id.stop){
engine.stopRhythmPlayer();
if(joined){
mChannelMediaOptions.publishRhythmPlayerTrack = false;
engine.updateChannelMediaOptions(mChannelMediaOptions);
}
isPlaying = false;
beatPerMeasure.setEnabled(true);
beatPerMinute.setEnabled(true);
Expand All @@ -246,15 +255,15 @@ private void joinChannel(String channelId)
/** Allows a user to join a channel.
if you do not specify the uid, we will generate the uid for you*/

ChannelMediaOptions option = new ChannelMediaOptions();
option.autoSubscribeAudio = true;
option.autoSubscribeVideo = true;
option.publishMicrophoneTrack = true;
mChannelMediaOptions = new ChannelMediaOptions();
mChannelMediaOptions.autoSubscribeAudio = true;
mChannelMediaOptions.autoSubscribeVideo = true;
mChannelMediaOptions.publishMicrophoneTrack = true;
/**
* config this for whether need push rhythem player to remote
*/
option.publishRhythmPlayerTrack = true;
int res = engine.joinChannel(accessToken, channelId, 0, option);
mChannelMediaOptions.publishRhythmPlayerTrack = isPlaying;
int res = engine.joinChannel(accessToken, channelId, 0, mChannelMediaOptions);
if (res != 0) {
// Usually happens with invalid parameters
// Error code description can be found at:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ public void onClick(View v) {
join.setText(getString(R.string.join));
mic.setEnabled(false);
pcm.setEnabled(false);
pcm.setChecked(false);
mic.setChecked(true);
if(pushingTask != null){
try {
pushingTask.join();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:checked="true"
android:enabled="false"
android:layout_marginEnd="16dp"
android:layout_marginBottom="64dp"/>

Expand All @@ -121,6 +122,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="16dp"
android:enabled="false"
android:layout_marginBottom="110dp"
android:text="@string/publish_local_audio" />

Expand Down
2 changes: 1 addition & 1 deletion Android/APIExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
}
else{
def agora_sdk_version = "4.1.0-1"
def agora_sdk_version = "4.1.1"
// case 1: full libs
implementation "io.agora.rtc:full-sdk:${agora_sdk_version}"
implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class GlobalSettings {

public String getVideoEncodingDimension() {
if (videoEncodingDimension == null)
return "VD_640x360";
return "VD_960x540";
else
return videoEncodingDimension;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public void onDestroy()
if(engine != null)
{
engine.leaveChannel();
engine.stopPreview();
}
handler.post(RtcEngine::destroy);
engine = null;
Expand Down Expand Up @@ -211,7 +210,6 @@ public void onClick(View v)
* 2:If you call the leaveChannel method during CDN live streaming, the SDK
* triggers the removeInjectStreamUrl method.*/
engine.leaveChannel();
engine.stopPreview();
join.setText(getString(R.string.join));
et_password.setEnabled(true);
encry_mode.setEnabled(true);
Expand Down Expand Up @@ -250,7 +248,6 @@ private void joinChannel(String channelId)
engine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);
// Enable video module
engine.enableVideo();
engine.startPreview();
// Setup video encoding configs
engine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
VD_640x360,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
fl_local = view.findViewById(R.id.fl_local);
contentInspectRetTv = view.findViewById(R.id.ret_content_inspect);
view.findViewById(R.id.btn_switch_camera).setOnClickListener(v -> {
if(engine != null){
if(engine != null && joined){
engine.switchCamera();
}
});
Expand Down Expand Up @@ -140,7 +140,6 @@ public void onDestroy() {
/**leaveChannel and Destroy the RtcEngine instance*/
if (engine != null) {
engine.leaveChannel();
engine.stopPreview();
}
handler.post(RtcEngine::destroy);
engine = null;
Expand Down Expand Up @@ -234,7 +233,6 @@ private void joinChannel(String channelId) {
contentInspectConfig.moduleCount = 1;
engine.enableContentInspect(true, contentInspectConfig);

engine.startPreview();

/**Please configure accessToken in the string_config file.
* A temporary token generated in Console. A temporary token is valid for 24 hours. For details, see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public void onDestroy()
if(engine != null)
{
engine.leaveChannel();
engine.stopPreview();
engine.stopChannelMediaRelay();
mediaRelaying = false;
}
Expand Down Expand Up @@ -277,7 +276,6 @@ private void joinChannel(String channelId)
engine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);
// Enable video module
engine.enableVideo();
engine.startPreview();
// Setup video encoding configs
engine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
((MainApplication)getActivity().getApplication()).getGlobalSettings().getVideoEncodingDimensionObject(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ private void joinChannel(String channelId) {
option.autoSubscribeVideo = true;
int res = engine.joinChannel(ret, channelId, 0, option);
if (res != 0) {
engine.stopPreview();
// Usually happens with invalid parameters
// Error code description can be found at:
// 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
Expand Down
Loading

0 comments on commit ed4eae0

Please sign in to comment.